From owner-svn-src-user@freebsd.org Sun Aug 7 17:07:54 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D71BCBB1070 for ; Sun, 7 Aug 2016 17:07:54 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA950190D; Sun, 7 Aug 2016 17:07:54 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u77H7rX5026395; Sun, 7 Aug 2016 17:07:53 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u77H7rFT026393; Sun, 7 Aug 2016 17:07:53 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201608071707.u77H7rFT026393@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 7 Aug 2016 17:07:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r303815 - user/alc/PQ_LAUNDRY/sys/sys X-SVN-Group: user 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.22 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, 07 Aug 2016 17:07:54 -0000 Author: alc Date: Sun Aug 7 17:07:53 2016 New Revision: 303815 URL: https://svnweb.freebsd.org/changeset/base/303815 Log: Use "bool" where appropriate. Modified: user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h Modified: user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h ============================================================================== --- user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h Sun Aug 7 15:50:08 2016 (r303814) +++ user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h Sun Aug 7 17:07:53 2016 (r303815) @@ -200,7 +200,7 @@ vm_laundry_target(void) /* * Return true if we are in shortfall and must begin laundering dirty memory. */ -static inline int +static inline bool vm_laundering_needed(void) { From owner-svn-src-user@freebsd.org Mon Aug 8 01:01:06 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FE1ABA996F for ; Mon, 8 Aug 2016 01:01:06 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72F871895; Mon, 8 Aug 2016 01:01:06 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u78115tl002408; Mon, 8 Aug 2016 01:01:05 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u78115BQ002407; Mon, 8 Aug 2016 01:01:05 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201608080101.u78115BQ002407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 8 Aug 2016 01:01:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r303820 - user/alc/PQ_LAUNDRY/sys/vm X-SVN-Group: user 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.22 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: Mon, 08 Aug 2016 01:01:06 -0000 Author: alc Date: Mon Aug 8 01:01:05 2016 New Revision: 303820 URL: https://svnweb.freebsd.org/changeset/base/303820 Log: Avoid division by zero without putting a stop to laundering. Discussed with: markj Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Sun Aug 7 23:04:46 2016 (r303819) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Mon Aug 8 01:01:05 2016 (r303820) @@ -1130,7 +1130,7 @@ vm_pageout_laundry_worker(void *arg) ninact = vm_cnt.v_inactive_count; nlaundry = vm_cnt.v_laundry_count; wakeups = VM_METER_PCPU_CNT(v_pdwakeups); - if (target == 0 && ninact > 0 && wakeups != gen && + if (target == 0 && wakeups != gen && nlaundry * bkgrd_launder_ratio >= ninact) { gen = wakeups; @@ -1152,6 +1152,8 @@ vm_pageout_laundry_worker(void *arg) */ target = vm_cnt.v_free_target - vm_pageout_wakeup_thresh; + if (ninact == 0) + ninact = 1; target = nlaundry * (u_int)target / ninact / 10; if (target == 0) target = 1; From owner-svn-src-user@freebsd.org Mon Aug 8 17:44:55 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AEF1BB301C for ; Mon, 8 Aug 2016 17:44:55 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 285D21721; Mon, 8 Aug 2016 17:44:55 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u78HisJr086402; Mon, 8 Aug 2016 17:44:54 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u78His9D086401; Mon, 8 Aug 2016 17:44:54 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201608081744.u78His9D086401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 8 Aug 2016 17:44:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r303838 - user/alc/PQ_LAUNDRY/sys/vm X-SVN-Group: user 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.22 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: Mon, 08 Aug 2016 17:44:55 -0000 Author: alc Date: Mon Aug 8 17:44:54 2016 New Revision: 303838 URL: https://svnweb.freebsd.org/changeset/base/303838 Log: Add comment. Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Mon Aug 8 16:22:16 2016 (r303837) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Mon Aug 8 17:44:54 2016 (r303838) @@ -1152,6 +1152,7 @@ vm_pageout_laundry_worker(void *arg) */ target = vm_cnt.v_free_target - vm_pageout_wakeup_thresh; + /* Avoid division by zero. */ if (ninact == 0) ninact = 1; target = nlaundry * (u_int)target / ninact / 10; From owner-svn-src-user@freebsd.org Mon Aug 8 19:59:09 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C9D2BB2A1A for ; Mon, 8 Aug 2016 19:59:09 +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 mx1.freebsd.org (Postfix) with ESMTPS id 6B5D51374; Mon, 8 Aug 2016 19:59:09 +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 u78Jx8QN037782; Mon, 8 Aug 2016 19:59:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u78Jx8Yh037781; Mon, 8 Aug 2016 19:59:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201608081959.u78Jx8Yh037781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 8 Aug 2016 19:59:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r303851 - user/alc/PQ_LAUNDRY/sys/vm X-SVN-Group: user 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.22 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: Mon, 08 Aug 2016 19:59:09 -0000 Author: markj Date: Mon Aug 8 19:59:08 2016 New Revision: 303851 URL: https://svnweb.freebsd.org/changeset/base/303851 Log: Reset the laundering target if we haven't met it after the last cycle. Reviewed by: alc Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Mon Aug 8 19:44:13 2016 (r303850) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Mon Aug 8 19:59:08 2016 (r303851) @@ -1165,8 +1165,12 @@ vm_pageout_laundry_worker(void *arg) */ target = min(target, bkgrd_launder_max); } - if (target > 0 && cycle != 0) - launder = target / cycle--; + if (target > 0) { + if (cycle != 0) + launder = target / cycle--; + else + target = 0; + } dolaundry: if (launder > 0) From owner-svn-src-user@freebsd.org Mon Aug 8 20:01:59 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 216F3BB2B92 for ; Mon, 8 Aug 2016 20:01:59 +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 mx1.freebsd.org (Postfix) with ESMTPS id DEB7416E0; Mon, 8 Aug 2016 20:01:58 +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 u78K1wQj039225; Mon, 8 Aug 2016 20:01:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u78K1uIR039195; Mon, 8 Aug 2016 20:01:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201608082001.u78K1uIR039195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 8 Aug 2016 20:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r303852 - in user/alc/PQ_LAUNDRY: . contrib/binutils/bfd contrib/netbsd-tests/lib/libc/sys crypto/openssh lib/libc lib/libc/include lib/libc/stdlib lib/libc/tests/stdlib lib/libthr/arch... X-SVN-Group: user 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.22 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: Mon, 08 Aug 2016 20:01:59 -0000 Author: markj Date: Mon Aug 8 20:01:55 2016 New Revision: 303852 URL: https://svnweb.freebsd.org/changeset/base/303852 Log: MFH r303848 Added: user/alc/PQ_LAUNDRY/lib/libc/stdlib/cxa_thread_atexit.c - copied unchanged from r303851, head/lib/libc/stdlib/cxa_thread_atexit.c user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc - copied unchanged from r303851, head/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc - copied unchanged from r303851, head/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi_types.h - copied unchanged from r303851, head/sys/contrib/cloudabi/cloudabi_types.h user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi_vdso_aarch64.c - copied unchanged from r303851, head/sys/contrib/cloudabi/cloudabi_vdso_aarch64.c user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi_vdso_x86_64.c - copied unchanged from r303851, head/sys/contrib/cloudabi/cloudabi_vdso_x86_64.c user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl_pf_iov.c - copied unchanged from r303851, head/sys/dev/ixl/ixl_pf_iov.c user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl_pf_iov.h - copied unchanged from r303851, head/sys/dev/ixl/ixl_pf_iov.h user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl_pf_main.c - copied unchanged from r303851, head/sys/dev/ixl/ixl_pf_main.c user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl_pf_qmgr.c - copied unchanged from r303851, head/sys/dev/ixl/ixl_pf_qmgr.c user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl_pf_qmgr.h - copied unchanged from r303851, head/sys/dev/ixl/ixl_pf_qmgr.h Deleted: user/alc/PQ_LAUNDRY/sys/dev/mlx5/mlx5_en/tcp_tlro.c user/alc/PQ_LAUNDRY/sys/dev/mlx5/mlx5_en/tcp_tlro.h Modified: user/alc/PQ_LAUNDRY/Makefile user/alc/PQ_LAUNDRY/contrib/binutils/bfd/ppcboot.c user/alc/PQ_LAUNDRY/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c user/alc/PQ_LAUNDRY/crypto/openssh/servconf.c user/alc/PQ_LAUNDRY/lib/libc/Versions.def user/alc/PQ_LAUNDRY/lib/libc/include/libc_private.h user/alc/PQ_LAUNDRY/lib/libc/stdlib/Makefile.inc user/alc/PQ_LAUNDRY/lib/libc/stdlib/Symbol.map user/alc/PQ_LAUNDRY/lib/libc/stdlib/exit.c user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/Makefile user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/Makefile.depend user/alc/PQ_LAUNDRY/lib/libthr/arch/mips/include/pthread_md.h user/alc/PQ_LAUNDRY/lib/libthr/thread/thr_exit.c user/alc/PQ_LAUNDRY/lib/msun/tests/Makefile user/alc/PQ_LAUNDRY/libexec/rtld-elf/mips/reloc.c user/alc/PQ_LAUNDRY/release/Makefile.gce user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw2.c user/alc/PQ_LAUNDRY/share/man/man3/queue.3 user/alc/PQ_LAUNDRY/share/misc/organization.dot user/alc/PQ_LAUNDRY/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c user/alc/PQ_LAUNDRY/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c user/alc/PQ_LAUNDRY/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S user/alc/PQ_LAUNDRY/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c user/alc/PQ_LAUNDRY/sys/conf/files.amd64 user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi_types_common.h user/alc/PQ_LAUNDRY/sys/dev/bxe/bxe.c user/alc/PQ_LAUNDRY/sys/dev/etherswitch/arswitch/arswitch.c user/alc/PQ_LAUNDRY/sys/dev/etherswitch/arswitch/arswitch_8327.c user/alc/PQ_LAUNDRY/sys/dev/etherswitch/arswitch/arswitch_phy.c user/alc/PQ_LAUNDRY/sys/dev/etherswitch/arswitch/arswitch_reg.c user/alc/PQ_LAUNDRY/sys/dev/etherswitch/arswitch/arswitchvar.h user/alc/PQ_LAUNDRY/sys/dev/fdt/fdt_common.c user/alc/PQ_LAUNDRY/sys/dev/fdt/fdt_common.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_heartbeat.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_kvp.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_shutdown.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_timesync.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_util.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_util.h user/alc/PQ_LAUNDRY/sys/dev/ixl/i40e_adminq.c user/alc/PQ_LAUNDRY/sys/dev/ixl/i40e_adminq.h user/alc/PQ_LAUNDRY/sys/dev/ixl/i40e_adminq_cmd.h user/alc/PQ_LAUNDRY/sys/dev/ixl/i40e_common.c user/alc/PQ_LAUNDRY/sys/dev/ixl/i40e_devids.h user/alc/PQ_LAUNDRY/sys/dev/ixl/i40e_nvm.c user/alc/PQ_LAUNDRY/sys/dev/ixl/i40e_osdep.c user/alc/PQ_LAUNDRY/sys/dev/ixl/i40e_osdep.h user/alc/PQ_LAUNDRY/sys/dev/ixl/i40e_prototype.h user/alc/PQ_LAUNDRY/sys/dev/ixl/i40e_register.h user/alc/PQ_LAUNDRY/sys/dev/ixl/i40e_type.h user/alc/PQ_LAUNDRY/sys/dev/ixl/i40e_virtchnl.h user/alc/PQ_LAUNDRY/sys/dev/ixl/if_ixl.c user/alc/PQ_LAUNDRY/sys/dev/ixl/if_ixlv.c user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl.h user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl_pf.h user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl_txrx.c user/alc/PQ_LAUNDRY/sys/dev/ixl/ixlv.h user/alc/PQ_LAUNDRY/sys/dev/ixl/ixlvc.c user/alc/PQ_LAUNDRY/sys/dev/mlx5/mlx5_en/en.h user/alc/PQ_LAUNDRY/sys/dev/mlx5/mlx5_en/mlx5_en_main.c user/alc/PQ_LAUNDRY/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c user/alc/PQ_LAUNDRY/sys/dev/ofw/ofw_fdt.c user/alc/PQ_LAUNDRY/sys/dev/pci/pci_pci.c user/alc/PQ_LAUNDRY/sys/dev/usb/usbdevs user/alc/PQ_LAUNDRY/sys/fs/ext2fs/ext2_dinode.h user/alc/PQ_LAUNDRY/sys/fs/ext2fs/ext2fs.h user/alc/PQ_LAUNDRY/sys/mips/atheros/if_arge.c user/alc/PQ_LAUNDRY/sys/mips/conf/std.AR934X user/alc/PQ_LAUNDRY/sys/mips/include/cpufunc.h user/alc/PQ_LAUNDRY/sys/mips/include/cpuinfo.h user/alc/PQ_LAUNDRY/sys/mips/include/cpuregs.h user/alc/PQ_LAUNDRY/sys/mips/mips/cpu.c user/alc/PQ_LAUNDRY/sys/mips/mips/genassym.c user/alc/PQ_LAUNDRY/sys/mips/mips/swtch.S user/alc/PQ_LAUNDRY/sys/mips/mips/sys_machdep.c user/alc/PQ_LAUNDRY/sys/mips/mips/trap.c user/alc/PQ_LAUNDRY/sys/mips/mips/vm_machdep.c user/alc/PQ_LAUNDRY/sys/modules/ixl/Makefile user/alc/PQ_LAUNDRY/sys/modules/ixlv/Makefile (contents, props changed) user/alc/PQ_LAUNDRY/sys/modules/mlx5en/Makefile user/alc/PQ_LAUNDRY/sys/net/ethernet.h user/alc/PQ_LAUNDRY/sys/net/if_ethersubr.c user/alc/PQ_LAUNDRY/sys/net/if_gif.c user/alc/PQ_LAUNDRY/sys/net80211/ieee80211_input.c user/alc/PQ_LAUNDRY/sys/netgraph/ng_base.c user/alc/PQ_LAUNDRY/sys/netinet/sctp_indata.c user/alc/PQ_LAUNDRY/sys/netinet/sctp_input.c user/alc/PQ_LAUNDRY/sys/netinet/sctp_output.c user/alc/PQ_LAUNDRY/sys/netinet/sctp_pcb.c user/alc/PQ_LAUNDRY/sys/netinet/sctp_ss_functions.c user/alc/PQ_LAUNDRY/sys/netinet/sctp_structs.h user/alc/PQ_LAUNDRY/sys/netinet/sctp_usrreq.c user/alc/PQ_LAUNDRY/sys/netinet/sctputil.c user/alc/PQ_LAUNDRY/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c user/alc/PQ_LAUNDRY/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h user/alc/PQ_LAUNDRY/sys/powerpc/include/hid.h user/alc/PQ_LAUNDRY/sys/powerpc/powerpc/busdma_machdep.c user/alc/PQ_LAUNDRY/tools/build/mk/OptionalObsoleteFiles.inc user/alc/PQ_LAUNDRY/usr.bin/getconf/getconf.1 user/alc/PQ_LAUNDRY/usr.bin/getconf/progenv.gperf user/alc/PQ_LAUNDRY/usr.bin/sdiff/sdiff.c user/alc/PQ_LAUNDRY/usr.bin/systat/vmstat.c user/alc/PQ_LAUNDRY/usr.bin/tar/tests/Makefile user/alc/PQ_LAUNDRY/usr.bin/vmstat/vmstat.c user/alc/PQ_LAUNDRY/usr.sbin/Makefile user/alc/PQ_LAUNDRY/usr.sbin/etcupdate/etcupdate.sh user/alc/PQ_LAUNDRY/usr.sbin/pciconf/cap.c Directory Properties: user/alc/PQ_LAUNDRY/ (props changed) user/alc/PQ_LAUNDRY/contrib/binutils/ (props changed) user/alc/PQ_LAUNDRY/crypto/openssh/ (props changed) user/alc/PQ_LAUNDRY/sys/cddl/contrib/opensolaris/ (props changed) Modified: user/alc/PQ_LAUNDRY/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/Makefile Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/Makefile Mon Aug 8 20:01:55 2016 (r303852) @@ -315,7 +315,7 @@ world: upgrade_checks .PHONY ${_+_}@cd ${.CURDIR}; ${_MAKE} pre-world .endif ${_+_}@cd ${.CURDIR}; ${_MAKE} buildworld - ${_+_}@cd ${.CURDIR}; ${_MAKE} -B installworld + ${_+_}@cd ${.CURDIR}; ${_MAKE} installworld MK_META_MODE=no .if target(post-world) @echo @echo "--------------------------------------------------------------" Modified: user/alc/PQ_LAUNDRY/contrib/binutils/bfd/ppcboot.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/binutils/bfd/ppcboot.c Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/contrib/binutils/bfd/ppcboot.c Mon Aug 8 20:01:55 2016 (r303852) @@ -419,7 +419,7 @@ ppcboot_bfd_print_private_bfd_data (abfd if (tdata->header.os_id) fprintf (f, "OS_ID = 0x%.2x\n", tdata->header.os_id); - if (tdata->header.partition_name) + if (tdata->header.partition_name[0]) fprintf (f, _("Partition name = \"%s\"\n"), tdata->header.partition_name); for (i = 0; i < 4; i++) Modified: user/alc/PQ_LAUNDRY/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c Mon Aug 8 20:01:55 2016 (r303852) @@ -116,6 +116,61 @@ timer_signal_create(clockid_t cid, bool ATF_REQUIRE(timer_delete(t) == 0); } +#ifdef __FreeBSD__ +static void +timer_callback(union sigval value) +{ + timer_t *tp; + + tp = value.sival_ptr; + + if (*tp == t) + fail = false; +} + +static void +timer_thread_create(clockid_t cid, bool expire) +{ + struct itimerspec tim; + struct sigevent evt; + + t = 0; + fail = true; + + (void)memset(&evt, 0, sizeof(struct sigevent)); + (void)memset(&tim, 0, sizeof(struct itimerspec)); + + /* + * Create the timer (SIGEV_THREAD). + */ + evt.sigev_notify_function = timer_callback; + evt.sigev_value.sival_ptr = &t; + evt.sigev_notify = SIGEV_THREAD; + + ATF_REQUIRE(timer_create(cid, &evt, &t) == 0); + + /* + * Start the timer. + */ + tim.it_value.tv_sec = expire ? 5 : 1; + tim.it_value.tv_nsec = 0; + + ATF_REQUIRE(timer_settime(t, 0, &tim, NULL) == 0); + + (void)sleep(2); + + if (expire) { + if (!fail) + atf_tc_fail("timer fired too soon"); + } else { + if (fail) + atf_tc_fail("timer failed to fire"); + } + + ATF_REQUIRE(timer_delete(t) == 0); +} +#endif + ATF_TC(timer_create_err); ATF_TC_HEAD(timer_create_err, tc) { @@ -198,6 +253,64 @@ ATF_TC_BODY(timer_create_mono_expire, tc timer_signal_create(CLOCK_MONOTONIC, true); } +ATF_TC(timer_thread_create_real); +ATF_TC_HEAD(timer_thread_create_real, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks timer_create(2) with CLOCK_REALTIME and sigevent(3), " + "SIGEV_THREAD"); +} + +#ifdef __FreeBSD__ +ATF_TC_BODY(timer_thread_create_real, tc) +{ + timer_thread_create(CLOCK_REALTIME, false); +} + +ATF_TC(timer_thread_create_mono); +ATF_TC_HEAD(timer_thread_create_mono, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks timer_create(2) with CLOCK_MONOTONIC and sigevent(3), " + "SIGEV_THREAD"); +} + +ATF_TC_BODY(timer_thread_create_mono, tc) +{ + timer_thread_create(CLOCK_MONOTONIC, false); +} + +ATF_TC(timer_thread_create_real_expire); +ATF_TC_HEAD(timer_thread_create_real_expire, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks timer_create(2) with CLOCK_REALTIME and sigevent(3), " + "SIGEV_THREAD, with expiration"); +} + +ATF_TC_BODY(timer_thread_create_real_expire, tc) +{ + timer_thread_create(CLOCK_REALTIME, true); +} + +ATF_TC(timer_thread_create_mono_expire); +ATF_TC_HEAD(timer_thread_create_mono_expire, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks timer_create(2) with CLOCK_MONOTONIC and sigevent(3), " + "SIGEV_THREAD, with expiration"); +} + +ATF_TC_BODY(timer_thread_create_mono_expire, tc) +{ + timer_thread_create(CLOCK_MONOTONIC, true); +} +#endif + ATF_TP_ADD_TCS(tp) { @@ -206,6 +319,12 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, timer_create_mono); ATF_TP_ADD_TC(tp, timer_create_real_expire); ATF_TP_ADD_TC(tp, timer_create_mono_expire); +#ifdef __FreeBSD__ + ATF_TP_ADD_TC(tp, timer_thread_create_real); + ATF_TP_ADD_TC(tp, timer_thread_create_mono); + ATF_TP_ADD_TC(tp, timer_thread_create_real_expire); + ATF_TP_ADD_TC(tp, timer_thread_create_mono_expire); +#endif return atf_no_error(); } Modified: user/alc/PQ_LAUNDRY/crypto/openssh/servconf.c ============================================================================== --- user/alc/PQ_LAUNDRY/crypto/openssh/servconf.c Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/crypto/openssh/servconf.c Mon Aug 8 20:01:55 2016 (r303852) @@ -22,6 +22,7 @@ __RCSID("$FreeBSD$"); #include #include +#include #include #include #include @@ -206,24 +207,28 @@ fill_default_server_options(ServerOption /* Standard Options */ if (options->protocol == SSH_PROTO_UNKNOWN) options->protocol = SSH_PROTO_2; +#define add_host_key_file(path) \ + do { \ + if (access((path), O_RDONLY) == 0) \ + options->host_key_files \ + [options->num_host_key_files++] = (path); \ + } while (0) if (options->num_host_key_files == 0) { /* fill default hostkeys for protocols */ if (options->protocol & SSH_PROTO_1) - options->host_key_files[options->num_host_key_files++] = - _PATH_HOST_KEY_FILE; + add_host_key_file(_PATH_HOST_KEY_FILE); if (options->protocol & SSH_PROTO_2) { - options->host_key_files[options->num_host_key_files++] = - _PATH_HOST_RSA_KEY_FILE; - options->host_key_files[options->num_host_key_files++] = - _PATH_HOST_DSA_KEY_FILE; + add_host_key_file(_PATH_HOST_RSA_KEY_FILE); + add_host_key_file(_PATH_HOST_DSA_KEY_FILE); #ifdef OPENSSL_HAS_ECC - options->host_key_files[options->num_host_key_files++] = - _PATH_HOST_ECDSA_KEY_FILE; + add_host_key_file(_PATH_HOST_ECDSA_KEY_FILE); #endif - options->host_key_files[options->num_host_key_files++] = - _PATH_HOST_ED25519_KEY_FILE; + add_host_key_file(_PATH_HOST_ED25519_KEY_FILE); } } +#undef add_host_key_file + if (options->num_host_key_files == 0) + fatal("No host key files found"); /* No certificates by default */ if (options->num_ports == 0) options->ports[options->num_ports++] = SSH_DEFAULT_PORT; Modified: user/alc/PQ_LAUNDRY/lib/libc/Versions.def ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/Versions.def Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/lib/libc/Versions.def Mon Aug 8 20:01:55 2016 (r303852) @@ -27,6 +27,10 @@ FBSD_1.3 { FBSD_1.4 { } FBSD_1.3; +# This version was first added to 12.0-current. +FBSD_1.5 { +} FBSD_1.4; + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries @@ -35,4 +39,4 @@ FBSD_1.4 { # # Please do NOT increment the version of this namespace. FBSDprivate_1.0 { -} FBSD_1.4; +} FBSD_1.5; Modified: user/alc/PQ_LAUNDRY/lib/libc/include/libc_private.h ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/include/libc_private.h Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/lib/libc/include/libc_private.h Mon Aug 8 20:01:55 2016 (r303852) @@ -267,6 +267,12 @@ extern const char *__progname; void _malloc_thread_cleanup(void); /* + * This function is used by the threading libraries to notify libc that a + * thread is exiting, so its thread-local dtors should be called. + */ +void __cxa_thread_call_dtors(void); + +/* * These functions are used by the threading libraries in order to protect * malloc across fork(). */ Modified: user/alc/PQ_LAUNDRY/lib/libc/stdlib/Makefile.inc ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/stdlib/Makefile.inc Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/lib/libc/stdlib/Makefile.inc Mon Aug 8 20:01:55 2016 (r303852) @@ -5,7 +5,7 @@ .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/stdlib ${LIBC_SRCTOP}/stdlib MISRCS+=_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ - bsearch.c div.c exit.c getenv.c getopt.c getopt_long.c \ + bsearch.c cxa_thread_atexit.c div.c exit.c getenv.c getopt.c getopt_long.c \ getsubopt.c hcreate.c hcreate_r.c hdestroy_r.c heapsort.c heapsort_b.c \ hsearch_r.c imaxabs.c imaxdiv.c \ insque.c l64a.c labs.c ldiv.c llabs.c lldiv.c lsearch.c \ Modified: user/alc/PQ_LAUNDRY/lib/libc/stdlib/Symbol.map ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/stdlib/Symbol.map Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/lib/libc/stdlib/Symbol.map Mon Aug 8 20:01:55 2016 (r303852) @@ -116,8 +116,13 @@ FBSD_1.4 { reallocarray; }; +FBSD_1.5 { + __cxa_thread_atexit; +}; + FBSDprivate_1.0 { __system; _system; __libc_system; + __cxa_thread_call_dtors; }; Copied: user/alc/PQ_LAUNDRY/lib/libc/stdlib/cxa_thread_atexit.c (from r303851, head/lib/libc/stdlib/cxa_thread_atexit.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/alc/PQ_LAUNDRY/lib/libc/stdlib/cxa_thread_atexit.c Mon Aug 8 20:01:55 2016 (r303852, copy of r303851, head/lib/libc/stdlib/cxa_thread_atexit.c) @@ -0,0 +1,140 @@ +/*- + * Copyright (c) 2016 Mahdi Mokhtari + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include "namespace.h" +#include +#include +#include +#include +#include +#include +#include "un-namespace.h" +#include "libc_private.h" + +/* + * C++11 introduces the thread_local scope (like __thread with some + * additions). As a key-feature it should support non-trivial + * destructors, registered with __cxa_thread_atexit() to be executed + * at the thread termination. + * + * The implemention keeps a _Thread_local list of destructors per each + * thread, and calls __cxa_thread_call_dtors() on each thread's exit + * to do cleanup. For a thread calling exit(3), in particular, for + * the initial thread returning from main(), we call + * __cxa_thread_call_dtors() inside exit(). + * + * It could be possible that a dynamically loaded library, use + * thread_local variable but is dlclose()'d before thread exit. The + * destructor of this variable will then try to access the address, + * for calling it but it's unloaded, so it'll crash. We're using + * __elf_phdr_match_addr() to detect and prevent such cases and so + * prevent the crash. + */ + +#define CXA_DTORS_ITERATIONS 4 + +struct cxa_thread_dtor { + void *obj; + void (*func)(void *); + void *dso; + LIST_ENTRY(cxa_thread_dtor) entry; +}; +static _Thread_local LIST_HEAD(dtor_list, cxa_thread_dtor) dtors = + LIST_HEAD_INITIALIZER(dtors); + +int +__cxa_thread_atexit(void (*dtor_func)(void *), void *obj, void *dso_symbol) +{ + struct cxa_thread_dtor *new_dtor; + + new_dtor = malloc(sizeof(*new_dtor)); + if (new_dtor == NULL) { + errno = ENOMEM; /* forcibly override malloc(3) error */ + return (-1); + } + + new_dtor->obj = obj; + new_dtor->func = dtor_func; + new_dtor->dso = dso_symbol; + LIST_INSERT_HEAD(&dtors, new_dtor, entry); + return (0); +} + +static void +walk_cb_call(struct cxa_thread_dtor *dtor) +{ + struct dl_phdr_info phdr_info; + + if (_rtld_addr_phdr(dtor->dso, &phdr_info) && + __elf_phdr_match_addr(&phdr_info, dtor->func)) + dtor->func(dtor->obj); + else + fprintf(stderr, "__cxa_thread_call_dtors: dtr %p from " + "unloaded dso, skipping\n", (void *)(dtor->func)); +} + +static void +walk_cb_nocall(struct cxa_thread_dtor *dtor __unused) +{ +} + +static void +cxa_thread_walk(void (*cb)(struct cxa_thread_dtor *)) +{ + struct cxa_thread_dtor *dtor, *tdtor; + + LIST_FOREACH_SAFE(dtor, &dtors, entry, tdtor) { + LIST_REMOVE(dtor, entry); + cb(dtor); + free(dtor); + } +} + +/* + * This is the callback function we use to call destructors, once for + * each thread. It is called in exit(3) in libc/stdlib/exit.c and + * before exit_thread() in libthr/thread/thr_exit.c. + */ +void +__cxa_thread_call_dtors(void) +{ + int i; + + for (i = 0; i < CXA_DTORS_ITERATIONS && !LIST_EMPTY(&dtors); i++) + cxa_thread_walk(walk_cb_call); + + if (!LIST_EMPTY(&dtors)) { + fprintf(stderr, "Thread %p is exiting with more " + "thread-specific dtors created after %d iterations " + "of destructor calls\n", + _pthread_self(), i); + cxa_thread_walk(walk_cb_nocall); + } +} Modified: user/alc/PQ_LAUNDRY/lib/libc/stdlib/exit.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/stdlib/exit.c Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/lib/libc/stdlib/exit.c Mon Aug 8 20:01:55 2016 (r303852) @@ -63,6 +63,12 @@ exit(int status) _thread_autoinit_dummy_decl = 1; + /* + * We're dealing with cleaning up thread_local destructors in the case of + * the process termination through main() exit. + * Other cases are handled elsewhere. + */ + __cxa_thread_call_dtors(); __cxa_finalize(NULL); if (__cleanup) (*__cleanup)(); Modified: user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/Makefile Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/Makefile Mon Aug 8 20:01:55 2016 (r303852) @@ -1,9 +1,15 @@ # $FreeBSD$ +.include + ATF_TESTS_C+= heapsort_test ATF_TESTS_C+= mergesort_test ATF_TESTS_C+= qsort_test ATF_TESTS_C+= tsearch_test +.if ${COMPILER_FEATURES:Mc++11} +ATF_TESTS_CXX+= cxa_thread_atexit_test +ATF_TESTS_CXX+= cxa_thread_atexit_nothr_test +.endif # TODO: t_getenv_thread, t_mi_vector_hash NETBSD_ATF_TESTS_C+= abs_test @@ -33,6 +39,10 @@ PROGS+= h_getopt h_getopt_long CFLAGS+= -I${.CURDIR} +CXXFLAGS.cxa_thread_atexit_test+= -std=c++11 +CXXFLAGS.cxa_thread_atexit_nothr_test+= -std=c++11 +LIBADD.cxa_thread_atexit_test+= pthread + .for t in h_getopt h_getopt_long CFLAGS.$t+= -I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests LDFLAGS.$t+= -L${LIBNETBSD_OBJDIR} Modified: user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/Makefile.depend ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/Makefile.depend Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/Makefile.depend Mon Aug 8 20:01:55 2016 (r303852) @@ -8,7 +8,10 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/atf/libatf-c \ + lib/atf/libatf-c++ \ lib/libc \ + lib/libc++ \ + lib/libthr \ lib/libcompiler_rt \ lib/libnetbsd \ lib/libutil \ Copied: user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc (from r303851, head/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc Mon Aug 8 20:01:55 2016 (r303852, copy of r303851, head/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc) @@ -0,0 +1,102 @@ +/*- + * Copyright (c) 2016 Mahdi Mokhtari + * Copyright (c) 2016 The FreeBSD Foundation + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +static FILE *output = NULL; + +struct Foo { + Foo() { ATF_REQUIRE(fprintf(output, "Created\n") > 0); } + ~Foo() { ATF_REQUIRE(fprintf(output, "Destroyed\n") > 0); } + void use() { ATF_REQUIRE(fprintf(output, "Used\n") > 0); } +}; + +static thread_local Foo f; + +/* + * This test must not be linked to libpthread. + */ +ATF_TEST_CASE_WITHOUT_HEAD(cxx__nothr); +ATF_TEST_CASE_BODY(cxx__nothr) +{ + void *libthr_handle; + + /* Avoid coredump during f construction. */ + output = stderr; + + libthr_handle = dlopen("libthr.so.3", RTLD_LAZY | RTLD_GLOBAL | + RTLD_NOLOAD); + ATF_REQUIRE(libthr_handle == NULL); +} + +static void +check_local_main(void) +{ + static const char out_log[] = "Created\nUsed\nDestroyed\n"; + + fflush(output); + ATF_REQUIRE(atf::utils::compare_file("test_main.txt", out_log)); +} + +ATF_TEST_CASE_WITHOUT_HEAD(cxx__thread_local_main); +ATF_TEST_CASE_BODY(cxx__thread_local_main) +{ + + ATF_REQUIRE((output = fopen("test_main.txt", "w")) != NULL); + f.use(); + atexit(check_local_main); +} + +extern "C" int __cxa_thread_atexit(void (*)(void *), void *, void *); + +static void +again(void *arg) +{ + + __cxa_thread_atexit(again, arg, &output); +} + +ATF_TEST_CASE_WITHOUT_HEAD(cxx__thread_inf_dtors); +ATF_TEST_CASE_BODY(cxx__thread_inf_dtors) +{ + + again(NULL); +} + +ATF_INIT_TEST_CASES(tcs) +{ + + ATF_ADD_TEST_CASE(tcs, cxx__nothr); + ATF_ADD_TEST_CASE(tcs, cxx__thread_local_main); + ATF_ADD_TEST_CASE(tcs, cxx__thread_inf_dtors); +} Copied: user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc (from r303851, head/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc Mon Aug 8 20:01:55 2016 (r303852, copy of r303851, head/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc) @@ -0,0 +1,180 @@ +/*- + * Copyright (c) 2016 Mahdi Mokhtari + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +static FILE *output = NULL; + +struct Foo { + Foo() { ATF_REQUIRE(fprintf(output, "Created\n") > 0); } + ~Foo() { ATF_REQUIRE(fprintf(output, "Destroyed\n") > 0); } + void use() { ATF_REQUIRE(fprintf(output, "Used\n") > 0); } +}; + +struct Bar { + Bar() {} + ~Bar() { + thread_local static Foo foo; + ATF_REQUIRE(fprintf(output, "DIED\n") > 0); + } + void use() {} +}; + +extern "C" int __cxa_thread_atexit(void (*)(void *), void *, void *); + +static void +again(void *arg) +{ + + __cxa_thread_atexit(again, arg, &output); +} + +struct Baz { + Baz() {} + ~Baz() { + again(NULL); + } + void use() {} +}; + +static thread_local Foo f; +static thread_local Foo g; +static thread_local Bar h; +static thread_local Baz e; + +/* + * This test must be linked to libpthread. + */ +ATF_TEST_CASE_WITHOUT_HEAD(cxx__thr); +ATF_TEST_CASE_BODY(cxx__thr) +{ + void *libthr_handle; + + /* Avoid coredump during f construction. */ + output = stderr; + + libthr_handle = dlopen("libthr.so.3", RTLD_LAZY | RTLD_GLOBAL | + RTLD_NOLOAD); + ATF_REQUIRE(libthr_handle != NULL); + dlclose(libthr_handle); +} + +/* + * In this test f.use() will test cxa_thread_atexit() in non-threaded mode. + * After f.use() main will be threaded and we'll have one additional thread + * with its own TLS data. + */ +ATF_TEST_CASE_WITHOUT_HEAD(cxx__thread_local_before); +ATF_TEST_CASE_BODY(cxx__thread_local_before) +{ + static const char out_log[] = "Created\nCreated\nUsed\nCreated\n" + "Created\nUsed\nCreated\nDIED\nDestroyed\nDestroyed\nDestroyed\n"; + + ATF_REQUIRE((output = fopen("test_before.txt", "w")) != NULL); + + f.use(); + std::thread t([]() { f.use(); }); + t.join(); + + fflush(output); + + ATF_REQUIRE(atf::utils::compare_file("test_before.txt", out_log)); +} + +/* + * In this test, f.use() will test __cxa_thread_atexit() + * in threaded mode (but still in main-threaed). + */ +ATF_TEST_CASE_WITHOUT_HEAD(cxx__thread_local_after); +ATF_TEST_CASE_BODY(cxx__thread_local_after) +{ + static const char out_log[] = "Created\nCreated\nUsed\nCreated\n" + "DIED\nDestroyed\nDestroyed\nDestroyed\nCreated\nCreated\nUsed\n"; + + ATF_REQUIRE((output = fopen("test_after.txt", "w")) != NULL); + + std::thread t([]() { g.use(); }); + t.join(); + sleep(1); + g.use(); + + fflush(output); + + ATF_REQUIRE(atf::utils::compare_file("test_after.txt", out_log)); +} + +/* + * In this test, we register a new dtor while dtors are being run + * in __cxa_thread_atexit(). + */ +ATF_TEST_CASE_WITHOUT_HEAD(cxx__thread_local_add_while_calling_dtors); +ATF_TEST_CASE_BODY(cxx__thread_local_add_while_calling_dtors) +{ + static const char out_log[] = "Created\nCreated\nCreated\nDIED\n" + "Destroyed\nDestroyed\nDestroyed\n"; + + ATF_REQUIRE((output = fopen("test_add_meanwhile.txt", "w")) != NULL); + + std::thread t([]() { h.use(); }); + t.join(); + sleep(1); + + fflush(output); + + ATF_REQUIRE(atf::utils::compare_file("test_add_meanwhile.txt", out_log)); +} + +ATF_TEST_CASE_WITHOUT_HEAD(cxx__thread_inf_dtors); +ATF_TEST_CASE_BODY(cxx__thread_inf_dtors) +{ + + /* + * Only added to make isolated run of this test not + * coredumping. Construction of Foo objects require filled + * output. + */ + output = stderr; + + std::thread t([]() { e.use(); }); + t.join(); +} + +ATF_INIT_TEST_CASES(tcs) +{ + + ATF_ADD_TEST_CASE(tcs, cxx__thr); + ATF_ADD_TEST_CASE(tcs, cxx__thread_local_before); + ATF_ADD_TEST_CASE(tcs, cxx__thread_local_after); + ATF_ADD_TEST_CASE(tcs, cxx__thread_local_add_while_calling_dtors); + ATF_ADD_TEST_CASE(tcs, cxx__thread_inf_dtors); +} Modified: user/alc/PQ_LAUNDRY/lib/libthr/arch/mips/include/pthread_md.h ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libthr/arch/mips/include/pthread_md.h Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/lib/libthr/arch/mips/include/pthread_md.h Mon Aug 8 20:01:55 2016 (r303852) @@ -61,6 +61,7 @@ _tcb_set(struct tcb *tcb) /* * Get the current tcb. */ +#ifdef TLS_USE_SYSARCH static __inline struct tcb * _tcb_get(void) { @@ -70,6 +71,55 @@ _tcb_get(void) return tcb; } +#else /* ! TLS_USE_SYSARCH */ + +# if defined(__mips_n64) +static __inline struct tcb * +_tcb_get(void) +{ + uint64_t _rv; + + __asm__ __volatile__ ( + ".set\tpush\n\t" + ".set\tmips64r2\n\t" + "rdhwr\t%0, $29\n\t" + ".set\tpop" + : "=v" (_rv)); + + /* + * XXXSS See 'git show c6be4f4d2d1b71c04de5d3bbb6933ce2dbcdb317' + * + * Remove the offset since this really a request to get the TLS + * pointer via sysarch() (in theory). Of course, this may go away + * once the TLS code is rewritten. + */ + return (struct tcb *)(_rv - TLS_TP_OFFSET - TLS_TCB_SIZE); +} +# else /* mips 32 */ +static __inline struct tcb * +_tcb_get(void) +{ + uint32_t _rv; + + __asm__ __volatile__ ( + ".set\tpush\n\t" + ".set\tmips32r2\n\t" + "rdhwr\t%0, $29\n\t" + ".set\tpop" + : "=v" (_rv)); + + /* + * XXXSS See 'git show c6be4f4d2d1b71c04de5d3bbb6933ce2dbcdb317' + * + * Remove the offset since this really a request to get the TLS + * pointer via sysarch() (in theory). Of course, this may go away + * once the TLS code is rewritten. + */ + return (struct tcb *)(_rv - TLS_TP_OFFSET - TLS_TCB_SIZE); +} +# endif /* ! __mips_n64 */ +#endif /* ! TLS_USE_SYSARCH */ + extern struct pthread *_thr_initial; static __inline struct pthread * Modified: user/alc/PQ_LAUNDRY/lib/libthr/thread/thr_exit.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libthr/thread/thr_exit.c Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/lib/libthr/thread/thr_exit.c Mon Aug 8 20:01:55 2016 (r303852) @@ -153,8 +153,12 @@ thread_unwind_stop(int version, _Unwind_ __pthread_cleanup_pop_imp(1); } - if (done) + if (done) { + /* Tell libc that it should call non-trivial TLS dtors. */ + __cxa_thread_call_dtors(); + exit_thread(); /* Never return! */ + } return (_URC_NO_REASON); } @@ -258,6 +262,8 @@ cleanup: while (curthread->cleanup != NULL) { __pthread_cleanup_pop_imp(1); } + __cxa_thread_call_dtors(); + exit_thread(); } @@ -265,6 +271,7 @@ cleanup: while (curthread->cleanup != NULL) { __pthread_cleanup_pop_imp(1); } + __cxa_thread_call_dtors(); exit_thread(); #endif /* _PTHREAD_FORCED_UNWIND */ Modified: user/alc/PQ_LAUNDRY/lib/msun/tests/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/lib/msun/tests/Makefile Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/lib/msun/tests/Makefile Mon Aug 8 20:01:55 2016 (r303852) @@ -50,15 +50,9 @@ TAP_TESTS_C+= exponential_test TAP_TESTS_C+= fenv_test TAP_TESTS_C+= fma_test # clang 3.8.0 fails always fails this test. See: bug 208703 -# -# XXX: depending on this compiler version check doesn't work at -# buildworld/installworld time, which results in jenkins failures (bug 208963) -# because the build is run on a 10.x instance, which has an older clang -# compiler. -# -#.if ! (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} == 30800) -#TAP_TESTS_C+= fmaxmin_test -#.endif +.if ! (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} == 30800) +TAP_TESTS_C+= fmaxmin_test +.endif TAP_TESTS_C+= ilogb_test TAP_TESTS_C+= invtrig_test TAP_TESTS_C+= invctrig_test Modified: user/alc/PQ_LAUNDRY/libexec/rtld-elf/mips/reloc.c ============================================================================== --- user/alc/PQ_LAUNDRY/libexec/rtld-elf/mips/reloc.c Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/libexec/rtld-elf/mips/reloc.c Mon Aug 8 20:01:55 2016 (r303852) @@ -634,13 +634,67 @@ allocate_initial_tls(Obj_Entry *objs) sysarch(MIPS_SET_TLS, tls); } +#ifdef __mips_n64 +void * +_mips_get_tls(void) +{ + uint64_t _rv; + + __asm__ __volatile__ ( + ".set\tpush\n\t" + ".set\tmips64r2\n\t" + "rdhwr\t%0, $29\n\t" + ".set\tpop" + : "=v" (_rv)); + /* + * XXXSS See 'git show c6be4f4d2d1b71c04de5d3bbb6933ce2dbcdb317' + * + * Remove the offset since this really a request to get the TLS + * pointer via sysarch() (in theory). Of course, this may go away + * once the TLS code is rewritten. + */ + _rv = _rv - TLS_TP_OFFSET - TLS_TCB_SIZE; + + return (void *)_rv; +} + +#else /* mips 32 */ + +void * +_mips_get_tls(void) +{ + uint32_t _rv; + + __asm__ __volatile__ ( + ".set\tpush\n\t" + ".set\tmips32r2\n\t" + "rdhwr\t%0, $29\n\t" + ".set\tpop" + : "=v" (_rv)); + /* + * XXXSS See 'git show c6be4f4d2d1b71c04de5d3bbb6933ce2dbcdb317' + * + * Remove the offset since this really a request to get the TLS + * pointer via sysarch() (in theory). Of course, this may go away + * once the TLS code is rewritten. + */ + _rv = _rv - TLS_TP_OFFSET - TLS_TCB_SIZE; + + return (void *)_rv; +} +#endif /* ! __mips_n64 */ + void * __tls_get_addr(tls_index* ti) { Elf_Addr** tls; char *p; +#ifdef TLS_USE_SYSARCH sysarch(MIPS_GET_TLS, &tls); +#else + tls = _mips_get_tls(); +#endif p = tls_get_addr_common(tls, ti->ti_module, ti->ti_offset + TLS_DTP_OFFSET); Modified: user/alc/PQ_LAUNDRY/release/Makefile.gce ============================================================================== --- user/alc/PQ_LAUNDRY/release/Makefile.gce Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/release/Makefile.gce Mon Aug 8 20:01:55 2016 (r303852) @@ -35,7 +35,7 @@ gce-check-depends: @false . endif .endfor -.if !exists(/usr/local/bin/gcutil) +.if !exists(/usr/local/bin/gcloud) . if !exists(${PORTSDIR}/net/google-cloud-sdk/Makefile) . if !exists(/usr/local/sbin/pkg-static) env ASSUME_ALWAYS_YES=yes pkg bootstrap -yf @@ -63,7 +63,7 @@ gce-do-upload: /usr/local/bin/gsutil mb gs://${GCE_BUCKET} || true /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET}.tar.gz \ gs://${GCE_BUCKET}/ - /usr/local/bin/gcutil addimage ${GCE_TARGET} \ - gs://${GCE_BUCKET}/${GCE_TARGET}.tar.gz + /usr/local/bin/gcloud compute images create ${GCE_TARGET} \ + --source-uri gs://${GCE_BUCKET}/${GCE_TARGET}.tar.gz touch ${.OBJDIR}/${.TARGET} Modified: user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw2.c ============================================================================== --- user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw2.c Mon Aug 8 19:59:08 2016 (r303851) +++ user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw2.c Mon Aug 8 20:01:55 2016 (r303852) @@ -1590,8 +1590,11 @@ show_static_rule(struct cmdline_opts *co break; case O_SETFIB: - bprint_uint_arg(bp, "setfib ", cmd->arg1 & 0x7FFF); - break; + if (cmd->arg1 == IP_FW_TARG) + bprint_uint_arg(bp, "setfib ", cmd->arg1); + else + bprintf(bp, "setfib %u", cmd->arg1 & 0x7FFF); + break; case O_EXTERNAL_ACTION: { /* @@ -3957,15 +3960,19 @@ chkarg: NEED1("missing DSCP code"); if (_substrcmp(*av, "tablearg") == 0) { action->arg1 = IP_FW_TARG; - } else if (isalpha(*av[0])) { - if ((code = match_token(f_ipdscp, *av)) == -1) - errx(EX_DATAERR, "Unknown DSCP code"); - action->arg1 = code; - } else - action->arg1 = strtoul(*av, NULL, 10); - /* Add high-order bit to DSCP to make room for tablearg */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Tue Aug 9 04:41:34 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1751BB23FF for ; Tue, 9 Aug 2016 04:41:34 +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 mx1.freebsd.org (Postfix) with ESMTPS id AEB0A11C7; Tue, 9 Aug 2016 04:41:34 +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 u794fXJE032017; Tue, 9 Aug 2016 04:41:33 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u794fXaB032013; Tue, 9 Aug 2016 04:41:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201608090441.u794fXaB032013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 9 Aug 2016 04:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r303866 - in user/alc/PQ_LAUNDRY/sys: sys vm X-SVN-Group: user 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.22 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, 09 Aug 2016 04:41:35 -0000 Author: markj Date: Tue Aug 9 04:41:33 2016 New Revision: 303866 URL: https://svnweb.freebsd.org/changeset/base/303866 Log: Repurpose v_reactivate to count reactivations by the pagedaemon threads. Suggested and reviewed by: alc Modified: user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h user/alc/PQ_LAUNDRY/sys/vm/vm_meter.c user/alc/PQ_LAUNDRY/sys/vm/vm_page.c user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Modified: user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h ============================================================================== --- user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h Tue Aug 9 03:47:38 2016 (r303865) +++ user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h Tue Aug 9 04:41:33 2016 (r303866) @@ -75,7 +75,7 @@ struct vmmeter { u_int v_vnodepgsin; /* (p) vnode_pager pages paged in */ u_int v_vnodepgsout; /* (p) vnode pager pages paged out */ u_int v_intrans; /* (p) intransit blocking page faults */ - u_int v_reactivated; /* (f) pages reactivated from free list */ + u_int v_reactivated; /* (p) pages reactivated by the pagedaemon */ u_int v_pdwakeups; /* (p) times daemon has awaken from sleep */ u_int v_pdpages; /* (p) pages analyzed by daemon */ Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_meter.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_meter.c Tue Aug 9 03:47:38 2016 (r303865) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_meter.c Tue Aug 9 04:41:33 2016 (r303866) @@ -286,7 +286,7 @@ VM_STATS_VM(v_vnodeout, "Vnode pager pag VM_STATS_VM(v_vnodepgsin, "Vnode pages paged in"); VM_STATS_VM(v_vnodepgsout, "Vnode pages paged out"); VM_STATS_VM(v_intrans, "In transit page faults"); -VM_STATS_VM(v_reactivated, "Pages reactivated from free list"); +VM_STATS_VM(v_reactivated, "Pages reactivated by pagedaemon"); VM_STATS_VM(v_pdwakeups, "Pagedaemon wakeups"); VM_STATS_VM(v_pdpages, "Pages analyzed by pagedaemon"); VM_STATS_VM(v_tcached, "Total pages cached"); Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_page.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_page.c Tue Aug 9 03:47:38 2016 (r303865) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_page.c Tue Aug 9 04:41:33 2016 (r303866) @@ -1727,9 +1727,7 @@ vm_page_alloc(vm_object_t object, vm_pin ("vm_page_alloc: cached page %p is PG_ZERO", m)); KASSERT(m->valid != 0, ("vm_page_alloc: cached page %p is invalid", m)); - if (m->object == object && m->pindex == pindex) - vm_cnt.v_reactivated++; - else + if (m->object != object || m->pindex != pindex) m->valid = 0; m_object = m->object; vm_page_cache_remove(m); Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Tue Aug 9 03:47:38 2016 (r303865) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Tue Aug 9 04:41:33 2016 (r303866) @@ -954,6 +954,7 @@ vm_pageout_launder(struct vm_domain *vmd } if (act_delta != 0) { if (object->ref_count != 0) { + PCPU_INC(cnt.v_reactivated); vm_page_activate(m); /* @@ -1351,6 +1352,7 @@ unlock_page: } if (act_delta != 0) { if (object->ref_count != 0) { + PCPU_INC(cnt.v_reactivated); vm_page_activate(m); /* From owner-svn-src-user@freebsd.org Tue Aug 9 04:59:58 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9F2FBB27EF for ; Tue, 9 Aug 2016 04:59:57 +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 mx1.freebsd.org (Postfix) with ESMTPS id B38D21C96; Tue, 9 Aug 2016 04:59:57 +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 u794xvGk037295; Tue, 9 Aug 2016 04:59:57 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u794xukx037285; Tue, 9 Aug 2016 04:59:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201608090459.u794xukx037285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 9 Aug 2016 04:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r303868 - in user/alc/PQ_LAUNDRY/sys: conf contrib/dev/ath/ath_hal/ar9300 dev/cxgbe dev/hyperv/netvsc kern netinet netinet6 sys X-SVN-Group: user 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.22 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, 09 Aug 2016 04:59:58 -0000 Author: markj Date: Tue Aug 9 04:59:55 2016 New Revision: 303868 URL: https://svnweb.freebsd.org/changeset/base/303868 Log: MFH r303867 Added: user/alc/PQ_LAUNDRY/sys/netinet/in_jail.c - copied unchanged from r303867, head/sys/netinet/in_jail.c user/alc/PQ_LAUNDRY/sys/netinet6/in6_jail.c - copied unchanged from r303867, head/sys/netinet6/in6_jail.c Modified: user/alc/PQ_LAUNDRY/sys/conf/files user/alc/PQ_LAUNDRY/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c user/alc/PQ_LAUNDRY/sys/dev/cxgbe/adapter.h user/alc/PQ_LAUNDRY/sys/dev/cxgbe/t4_sge.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_rndis_filter.c user/alc/PQ_LAUNDRY/sys/kern/kern_jail.c user/alc/PQ_LAUNDRY/sys/kern/uipc_usrreq.c user/alc/PQ_LAUNDRY/sys/sys/jail.h user/alc/PQ_LAUNDRY/sys/sys/unpcb.h Directory Properties: user/alc/PQ_LAUNDRY/ (props changed) Modified: user/alc/PQ_LAUNDRY/sys/conf/files ============================================================================== --- user/alc/PQ_LAUNDRY/sys/conf/files Tue Aug 9 04:50:20 2016 (r303867) +++ user/alc/PQ_LAUNDRY/sys/conf/files Tue Aug 9 04:59:55 2016 (r303868) @@ -3748,6 +3748,7 @@ netinet/in_fib.c optional inet netinet/in_gif.c optional gif inet | netgraph_gif inet netinet/ip_gre.c optional gre inet netinet/ip_id.c optional inet +netinet/in_jail.c optional inet netinet/in_mcast.c optional inet netinet/in_pcb.c optional inet | inet6 netinet/in_pcbgroup.c optional inet pcbgroup | inet6 pcbgroup @@ -3816,6 +3817,7 @@ netinet6/in6_cksum.c optional inet6 netinet6/in6_fib.c optional inet6 netinet6/in6_gif.c optional gif inet6 | netgraph_gif inet6 netinet6/in6_ifattach.c optional inet6 +netinet6/in6_jail.c optional inet6 netinet6/in6_mcast.c optional inet6 netinet6/in6_pcb.c optional inet6 netinet6/in6_pcbgroup.c optional inet6 pcbgroup Modified: user/alc/PQ_LAUNDRY/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c Tue Aug 9 04:50:20 2016 (r303867) +++ user/alc/PQ_LAUNDRY/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c Tue Aug 9 04:59:55 2016 (r303868) @@ -447,6 +447,8 @@ ar9300_reset_tx_queue(struct ath_hal *ah */ if (value < 10) value = 10; + if (value < 0) + value = 10; HALDEBUG(ah, HAL_DEBUG_TXQUEUE, "%s: defaulting to rdytime = %d uS\n", __func__, value); Modified: user/alc/PQ_LAUNDRY/sys/dev/cxgbe/adapter.h ============================================================================== --- user/alc/PQ_LAUNDRY/sys/dev/cxgbe/adapter.h Tue Aug 9 04:50:20 2016 (r303867) +++ user/alc/PQ_LAUNDRY/sys/dev/cxgbe/adapter.h Tue Aug 9 04:59:55 2016 (r303868) @@ -195,6 +195,7 @@ enum { ADAP_SYSCTL_CTX = (1 << 4), /* TOM_INIT_DONE= (1 << 5), No longer used */ BUF_PACKING_OK = (1 << 6), + IS_VF = (1 << 7), CXGBE_BUSY = (1 << 9), Modified: user/alc/PQ_LAUNDRY/sys/dev/cxgbe/t4_sge.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/dev/cxgbe/t4_sge.c Tue Aug 9 04:50:20 2016 (r303867) +++ user/alc/PQ_LAUNDRY/sys/dev/cxgbe/t4_sge.c Tue Aug 9 04:59:55 2016 (r303868) @@ -590,7 +590,7 @@ t4_tweak_chip_settings(struct adapter *s /* * SGE wants the buffer to be at least 64B and then a multiple of 16. If - * padding is is use the buffer's start and end need to be aligned to the pad + * padding is in use, the buffer's start and end need to be aligned to the pad * boundary as well. We'll just make sure that the size is a multiple of the * boundary here, it is up to the buffer allocation code to make sure the start * of the buffer is aligned as well. Modified: user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.c Tue Aug 9 04:50:20 2016 (r303867) +++ user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.c Tue Aug 9 04:59:55 2016 (r303868) @@ -799,7 +799,8 @@ hv_nv_on_send_completion(netvsc_dev *net * Returns 0 on success, non-zero on failure. */ int -hv_nv_on_send(struct vmbus_channel *chan, netvsc_packet *pkt) +hv_nv_on_send(struct vmbus_channel *chan, + netvsc_packet *pkt, struct vmbus_gpa *gpa, int gpa_cnt) { nvsp_msg send_msg; int ret; @@ -818,8 +819,8 @@ hv_nv_on_send(struct vmbus_channel *chan send_msg.msgs.vers_1_msgs.send_rndis_pkt.send_buf_section_size = pkt->send_buf_section_size; - if (pkt->gpa_cnt) { - ret = vmbus_chan_send_sglist(chan, pkt->gpa, pkt->gpa_cnt, + if (gpa_cnt) { + ret = vmbus_chan_send_sglist(chan, gpa, gpa_cnt, &send_msg, sizeof(nvsp_msg), (uint64_t)(uintptr_t)pkt); } else { ret = vmbus_chan_send(chan, Modified: user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.h Tue Aug 9 04:50:20 2016 (r303867) +++ user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.h Tue Aug 9 04:59:55 2016 (r303868) @@ -1137,8 +1137,6 @@ typedef struct netvsc_packet_ { void *rndis_mesg; uint32_t tot_data_buf_len; void *data; - uint32_t gpa_cnt; - struct vmbus_gpa gpa[NETVSC_PACKET_MAXPAGE]; } netvsc_packet; typedef struct { @@ -1216,6 +1214,9 @@ struct hn_tx_ring { bus_dma_tag_t hn_tx_data_dtag; uint64_t hn_csum_assist; + int hn_gpa_cnt; + struct vmbus_gpa hn_gpa[NETVSC_PACKET_MAXPAGE]; + u_long hn_no_txdescs; u_long hn_send_failed; u_long hn_txdma_failed; @@ -1275,7 +1276,8 @@ netvsc_dev *hv_nv_on_device_add(struct h void *additional_info, struct hn_rx_ring *rxr); int hv_nv_on_device_remove(struct hn_softc *sc, boolean_t destroy_channel); -int hv_nv_on_send(struct vmbus_channel *chan, netvsc_packet *pkt); +int hv_nv_on_send(struct vmbus_channel *chan, netvsc_packet *pkt, + struct vmbus_gpa *gpa, int gpa_cnt); int hv_nv_get_next_send_section(netvsc_dev *net_dev); void hv_nv_subchan_attach(struct vmbus_channel *chan, struct hn_rx_ring *rxr); Modified: user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Aug 9 04:50:20 2016 (r303867) +++ user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Aug 9 04:59:55 2016 (r303868) @@ -993,7 +993,7 @@ hn_encap(struct hn_tx_ring *txr, struct packet->send_buf_section_idx = send_buf_section_idx; packet->send_buf_section_size = packet->tot_data_buf_len; - packet->gpa_cnt = 0; + txr->hn_gpa_cnt = 0; txr->hn_tx_chimney++; goto done; } @@ -1019,19 +1019,19 @@ hn_encap(struct hn_tx_ring *txr, struct } *m_head0 = m_head; - packet->gpa_cnt = nsegs + HV_RF_NUM_TX_RESERVED_PAGE_BUFS; + txr->hn_gpa_cnt = nsegs + HV_RF_NUM_TX_RESERVED_PAGE_BUFS; /* send packet with page buffer */ - packet->gpa[0].gpa_page = atop(txd->rndis_msg_paddr); - packet->gpa[0].gpa_ofs = txd->rndis_msg_paddr & PAGE_MASK; - packet->gpa[0].gpa_len = rndis_msg_size; + txr->hn_gpa[0].gpa_page = atop(txd->rndis_msg_paddr); + txr->hn_gpa[0].gpa_ofs = txd->rndis_msg_paddr & PAGE_MASK; + txr->hn_gpa[0].gpa_len = rndis_msg_size; /* * Fill the page buffers with mbuf info starting at index * HV_RF_NUM_TX_RESERVED_PAGE_BUFS. */ for (i = 0; i < nsegs; ++i) { - struct vmbus_gpa *gpa = &packet->gpa[ + struct vmbus_gpa *gpa = &txr->hn_gpa[ i + HV_RF_NUM_TX_RESERVED_PAGE_BUFS]; gpa->gpa_page = atop(segs[i].ds_addr); @@ -1068,7 +1068,8 @@ again: * Make sure that txd is not freed before ETHER_BPF_MTAP. */ hn_txdesc_hold(txd); - error = hv_nv_on_send(txr->hn_chan, &txd->netvsc_pkt); + error = hv_nv_on_send(txr->hn_chan, &txd->netvsc_pkt, + txr->hn_gpa, txr->hn_gpa_cnt); if (!error) { ETHER_BPF_MTAP(ifp, txd->m); if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); Modified: user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_rndis_filter.c Tue Aug 9 04:50:20 2016 (r303867) +++ user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_rndis_filter.c Tue Aug 9 04:59:55 2016 (r303868) @@ -238,33 +238,31 @@ static int hv_rf_send_request(rndis_device *device, rndis_request *request, uint32_t message_type) { - int ret; netvsc_packet *packet; netvsc_dev *net_dev = device->net_dev; int send_buf_section_idx; + struct vmbus_gpa gpa[2]; + int gpa_cnt; /* Set up the packet to send it */ packet = &request->pkt; packet->is_data_pkt = FALSE; packet->tot_data_buf_len = request->request_msg.msg_len; - packet->gpa_cnt = 1; - packet->gpa[0].gpa_page = - hv_get_phys_addr(&request->request_msg) >> PAGE_SHIFT; - packet->gpa[0].gpa_len = request->request_msg.msg_len; - packet->gpa[0].gpa_ofs = - (unsigned long)&request->request_msg & (PAGE_SIZE - 1); - - if (packet->gpa[0].gpa_ofs + packet->gpa[0].gpa_len > PAGE_SIZE) { - packet->gpa_cnt = 2; - packet->gpa[0].gpa_len = PAGE_SIZE - packet->gpa[0].gpa_ofs; - packet->gpa[1].gpa_page = - hv_get_phys_addr((char*)&request->request_msg + - packet->gpa[0].gpa_len) >> PAGE_SHIFT; - packet->gpa[1].gpa_ofs = 0; - packet->gpa[1].gpa_len = request->request_msg.msg_len - - packet->gpa[0].gpa_len; + gpa_cnt = 1; + gpa[0].gpa_page = hv_get_phys_addr(&request->request_msg) >> PAGE_SHIFT; + gpa[0].gpa_len = request->request_msg.msg_len; + gpa[0].gpa_ofs = (unsigned long)&request->request_msg & (PAGE_SIZE - 1); + + if (gpa[0].gpa_ofs + gpa[0].gpa_len > PAGE_SIZE) { + gpa_cnt = 2; + gpa[0].gpa_len = PAGE_SIZE - gpa[0].gpa_ofs; + gpa[1].gpa_page = + hv_get_phys_addr((char*)&request->request_msg + + gpa[0].gpa_len) >> PAGE_SHIFT; + gpa[1].gpa_ofs = 0; + gpa[1].gpa_len = request->request_msg.msg_len - gpa[0].gpa_len; } packet->compl.send.send_completion_context = request; /* packet */ @@ -286,7 +284,7 @@ hv_rf_send_request(rndis_device *device, memcpy(dest, &request->request_msg, request->request_msg.msg_len); packet->send_buf_section_idx = send_buf_section_idx; packet->send_buf_section_size = packet->tot_data_buf_len; - packet->gpa_cnt = 0; + gpa_cnt = 0; goto sendit; } /* Failed to allocate chimney send buffer; move on */ @@ -295,9 +293,8 @@ hv_rf_send_request(rndis_device *device, packet->send_buf_section_size = 0; sendit: - ret = hv_nv_on_send(device->net_dev->sc->hn_prichan, packet); - - return (ret); + return hv_nv_on_send(device->net_dev->sc->hn_prichan, packet, + gpa, gpa_cnt); } /* Modified: user/alc/PQ_LAUNDRY/sys/kern/kern_jail.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/kern/kern_jail.c Tue Aug 9 04:50:20 2016 (r303867) +++ user/alc/PQ_LAUNDRY/sys/kern/kern_jail.c Tue Aug 9 04:59:55 2016 (r303868) @@ -130,14 +130,6 @@ static void prison_racct_attach(struct p static void prison_racct_modify(struct prison *pr); static void prison_racct_detach(struct prison *pr); #endif -#ifdef INET -static int _prison_check_ip4(const struct prison *, const struct in_addr *); -static int prison_restrict_ip4(struct prison *pr, struct in_addr *newip4); -#endif -#ifdef INET6 -static int _prison_check_ip6(struct prison *pr, struct in6_addr *ia6); -static int prison_restrict_ip6(struct prison *pr, struct in6_addr *newip6); -#endif /* Flags for prison_deref */ #define PD_DEREF 0x01 @@ -252,54 +244,6 @@ prison0_init(void) strlcpy(prison0.pr_osrelease, osrelease, sizeof(prison0.pr_osrelease)); } -#ifdef INET -static int -qcmp_v4(const void *ip1, const void *ip2) -{ - in_addr_t iaa, iab; - - /* - * We need to compare in HBO here to get the list sorted as expected - * by the result of the code. Sorting NBO addresses gives you - * interesting results. If you do not understand, do not try. - */ - iaa = ntohl(((const struct in_addr *)ip1)->s_addr); - iab = ntohl(((const struct in_addr *)ip2)->s_addr); - - /* - * Do not simply return the difference of the two numbers, the int is - * not wide enough. - */ - if (iaa > iab) - return (1); - else if (iaa < iab) - return (-1); - else - return (0); -} -#endif - -#ifdef INET6 -static int -qcmp_v6(const void *ip1, const void *ip2) -{ - const struct in6_addr *ia6a, *ia6b; - int i, rc; - - ia6a = (const struct in6_addr *)ip1; - ia6b = (const struct in6_addr *)ip2; - - rc = 0; - for (i = 0; rc == 0 && i < sizeof(struct in6_addr); i++) { - if (ia6a->s6_addr[i] > ia6b->s6_addr[i]) - rc = 1; - else if (ia6a->s6_addr[i] < ia6b->s6_addr[i]) - rc = -1; - } - return (rc); -} -#endif - /* * struct jail_args { * struct jail *jail; @@ -845,7 +789,8 @@ kern_jail_set(struct thread *td, struct * address to connect from. */ if (ip4s > 1) - qsort(ip4 + 1, ip4s - 1, sizeof(*ip4), qcmp_v4); + qsort(ip4 + 1, ip4s - 1, sizeof(*ip4), + prison_qcmp_v4); /* * Check for duplicate addresses and do some simple * zero and broadcast checks. If users give other bogus @@ -893,7 +838,8 @@ kern_jail_set(struct thread *td, struct ip6 = malloc(ip6s * sizeof(*ip6), M_PRISON, M_WAITOK); bcopy(op, ip6, ip6s * sizeof(*ip6)); if (ip6s > 1) - qsort(ip6 + 1, ip6s - 1, sizeof(*ip6), qcmp_v6); + qsort(ip6 + 1, ip6s - 1, sizeof(*ip6), + prison_qcmp_v6); for (ii = 0; ii < ip6s; ii++) { if (IN6_IS_ADDR_UNSPECIFIED(&ip6[ii])) { error = EINVAL; @@ -1486,7 +1432,8 @@ kern_jail_set(struct thread *td, struct (ip4s == 1 && tpr->pr_ip4s == 1)) continue; for (ii = 0; ii < ip4s; ii++) { - if (_prison_check_ip4(tpr, &ip4[ii]) == 0) { + if (prison_check_ip4_locked(tpr, &ip4[ii]) == + 0) { error = EADDRINUSE; vfs_opterror(opts, "IPv4 addresses clash"); @@ -1552,7 +1499,8 @@ kern_jail_set(struct thread *td, struct (ip6s == 1 && tpr->pr_ip6s == 1)) continue; for (ii = 0; ii < ip6s; ii++) { - if (_prison_check_ip6(tpr, &ip6[ii]) == 0) { + if (prison_check_ip6_locked(tpr, &ip6[ii]) == + 0) { error = EADDRINUSE; vfs_opterror(opts, "IPv6 addresses clash"); @@ -2770,684 +2718,6 @@ prison_proc_free(struct prison *pr) mtx_unlock(&pr->pr_mtx); } - -#ifdef INET -/* - * Restrict a prison's IP address list with its parent's, possibly replacing - * it. Return true if the replacement buffer was used (or would have been). - */ -static int -prison_restrict_ip4(struct prison *pr, struct in_addr *newip4) -{ - int ii, ij, used; - struct prison *ppr; - - ppr = pr->pr_parent; - if (!(pr->pr_flags & PR_IP4_USER)) { - /* This has no user settings, so just copy the parent's list. */ - if (pr->pr_ip4s < ppr->pr_ip4s) { - /* - * There's no room for the parent's list. Use the - * new list buffer, which is assumed to be big enough - * (if it was passed). If there's no buffer, try to - * allocate one. - */ - used = 1; - if (newip4 == NULL) { - newip4 = malloc(ppr->pr_ip4s * sizeof(*newip4), - M_PRISON, M_NOWAIT); - if (newip4 != NULL) - used = 0; - } - if (newip4 != NULL) { - bcopy(ppr->pr_ip4, newip4, - ppr->pr_ip4s * sizeof(*newip4)); - free(pr->pr_ip4, M_PRISON); - pr->pr_ip4 = newip4; - pr->pr_ip4s = ppr->pr_ip4s; - } - return (used); - } - pr->pr_ip4s = ppr->pr_ip4s; - if (pr->pr_ip4s > 0) - bcopy(ppr->pr_ip4, pr->pr_ip4, - pr->pr_ip4s * sizeof(*newip4)); - else if (pr->pr_ip4 != NULL) { - free(pr->pr_ip4, M_PRISON); - pr->pr_ip4 = NULL; - } - } else if (pr->pr_ip4s > 0) { - /* Remove addresses that aren't in the parent. */ - for (ij = 0; ij < ppr->pr_ip4s; ij++) - if (pr->pr_ip4[0].s_addr == ppr->pr_ip4[ij].s_addr) - break; - if (ij < ppr->pr_ip4s) - ii = 1; - else { - bcopy(pr->pr_ip4 + 1, pr->pr_ip4, - --pr->pr_ip4s * sizeof(*pr->pr_ip4)); - ii = 0; - } - for (ij = 1; ii < pr->pr_ip4s; ) { - if (pr->pr_ip4[ii].s_addr == ppr->pr_ip4[0].s_addr) { - ii++; - continue; - } - switch (ij >= ppr->pr_ip4s ? -1 : - qcmp_v4(&pr->pr_ip4[ii], &ppr->pr_ip4[ij])) { - case -1: - bcopy(pr->pr_ip4 + ii + 1, pr->pr_ip4 + ii, - (--pr->pr_ip4s - ii) * sizeof(*pr->pr_ip4)); - break; - case 0: - ii++; - ij++; - break; - case 1: - ij++; - break; - } - } - if (pr->pr_ip4s == 0) { - free(pr->pr_ip4, M_PRISON); - pr->pr_ip4 = NULL; - } - } - return (0); -} - -/* - * Pass back primary IPv4 address of this jail. - * - * If not restricted return success but do not alter the address. Caller has - * to make sure to initialize it correctly (e.g. INADDR_ANY). - * - * Returns 0 on success, EAFNOSUPPORT if the jail doesn't allow IPv4. - * Address returned in NBO. - */ -int -prison_get_ip4(struct ucred *cred, struct in_addr *ia) -{ - struct prison *pr; - - KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); - KASSERT(ia != NULL, ("%s: ia is NULL", __func__)); - - pr = cred->cr_prison; - if (!(pr->pr_flags & PR_IP4)) - return (0); - mtx_lock(&pr->pr_mtx); - if (!(pr->pr_flags & PR_IP4)) { - mtx_unlock(&pr->pr_mtx); - return (0); - } - if (pr->pr_ip4 == NULL) { - mtx_unlock(&pr->pr_mtx); - return (EAFNOSUPPORT); - } - - ia->s_addr = pr->pr_ip4[0].s_addr; - mtx_unlock(&pr->pr_mtx); - return (0); -} - -/* - * Return 1 if we should do proper source address selection or are not jailed. - * We will return 0 if we should bypass source address selection in favour - * of the primary jail IPv4 address. Only in this case *ia will be updated and - * returned in NBO. - * Return EAFNOSUPPORT, in case this jail does not allow IPv4. - */ -int -prison_saddrsel_ip4(struct ucred *cred, struct in_addr *ia) -{ - struct prison *pr; - struct in_addr lia; - int error; - - KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); - KASSERT(ia != NULL, ("%s: ia is NULL", __func__)); - - if (!jailed(cred)) - return (1); - - pr = cred->cr_prison; - if (pr->pr_flags & PR_IP4_SADDRSEL) - return (1); - - lia.s_addr = INADDR_ANY; - error = prison_get_ip4(cred, &lia); - if (error) - return (error); - if (lia.s_addr == INADDR_ANY) - return (1); - - ia->s_addr = lia.s_addr; - return (0); -} - -/* - * Return true if pr1 and pr2 have the same IPv4 address restrictions. - */ -int -prison_equal_ip4(struct prison *pr1, struct prison *pr2) -{ - - if (pr1 == pr2) - return (1); - - /* - * No need to lock since the PR_IP4_USER flag can't be altered for - * existing prisons. - */ - while (pr1 != &prison0 && -#ifdef VIMAGE - !(pr1->pr_flags & PR_VNET) && -#endif - !(pr1->pr_flags & PR_IP4_USER)) - pr1 = pr1->pr_parent; - while (pr2 != &prison0 && -#ifdef VIMAGE - !(pr2->pr_flags & PR_VNET) && -#endif - !(pr2->pr_flags & PR_IP4_USER)) - pr2 = pr2->pr_parent; - return (pr1 == pr2); -} - -/* - * Make sure our (source) address is set to something meaningful to this - * jail. - * - * Returns 0 if jail doesn't restrict IPv4 or if address belongs to jail, - * EADDRNOTAVAIL if the address doesn't belong, or EAFNOSUPPORT if the jail - * doesn't allow IPv4. Address passed in in NBO and returned in NBO. - */ -int -prison_local_ip4(struct ucred *cred, struct in_addr *ia) -{ - struct prison *pr; - struct in_addr ia0; - int error; - - KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); - KASSERT(ia != NULL, ("%s: ia is NULL", __func__)); - - pr = cred->cr_prison; - if (!(pr->pr_flags & PR_IP4)) - return (0); - mtx_lock(&pr->pr_mtx); - if (!(pr->pr_flags & PR_IP4)) { - mtx_unlock(&pr->pr_mtx); - return (0); - } - if (pr->pr_ip4 == NULL) { - mtx_unlock(&pr->pr_mtx); - return (EAFNOSUPPORT); - } - - ia0.s_addr = ntohl(ia->s_addr); - if (ia0.s_addr == INADDR_LOOPBACK) { - ia->s_addr = pr->pr_ip4[0].s_addr; - mtx_unlock(&pr->pr_mtx); - return (0); - } - - if (ia0.s_addr == INADDR_ANY) { - /* - * In case there is only 1 IPv4 address, bind directly. - */ - if (pr->pr_ip4s == 1) - ia->s_addr = pr->pr_ip4[0].s_addr; - mtx_unlock(&pr->pr_mtx); - return (0); - } - - error = _prison_check_ip4(pr, ia); - mtx_unlock(&pr->pr_mtx); - return (error); -} - -/* - * Rewrite destination address in case we will connect to loopback address. - * - * Returns 0 on success, EAFNOSUPPORT if the jail doesn't allow IPv4. - * Address passed in in NBO and returned in NBO. - */ -int -prison_remote_ip4(struct ucred *cred, struct in_addr *ia) -{ - struct prison *pr; - - KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); - KASSERT(ia != NULL, ("%s: ia is NULL", __func__)); - - pr = cred->cr_prison; - if (!(pr->pr_flags & PR_IP4)) - return (0); - mtx_lock(&pr->pr_mtx); - if (!(pr->pr_flags & PR_IP4)) { - mtx_unlock(&pr->pr_mtx); - return (0); - } - if (pr->pr_ip4 == NULL) { - mtx_unlock(&pr->pr_mtx); - return (EAFNOSUPPORT); - } - - if (ntohl(ia->s_addr) == INADDR_LOOPBACK) { - ia->s_addr = pr->pr_ip4[0].s_addr; - mtx_unlock(&pr->pr_mtx); - return (0); - } - - /* - * Return success because nothing had to be changed. - */ - mtx_unlock(&pr->pr_mtx); - return (0); -} - -/* - * Check if given address belongs to the jail referenced by cred/prison. - * - * Returns 0 if jail doesn't restrict IPv4 or if address belongs to jail, - * EADDRNOTAVAIL if the address doesn't belong, or EAFNOSUPPORT if the jail - * doesn't allow IPv4. Address passed in in NBO. - */ -static int -_prison_check_ip4(const struct prison *pr, const struct in_addr *ia) -{ - int i, a, z, d; - - /* - * Check the primary IP. - */ - if (pr->pr_ip4[0].s_addr == ia->s_addr) - return (0); - - /* - * All the other IPs are sorted so we can do a binary search. - */ - a = 0; - z = pr->pr_ip4s - 2; - while (a <= z) { - i = (a + z) / 2; - d = qcmp_v4(&pr->pr_ip4[i+1], ia); - if (d > 0) - z = i - 1; - else if (d < 0) - a = i + 1; - else - return (0); - } - - return (EADDRNOTAVAIL); -} - -int -prison_check_ip4(const struct ucred *cred, const struct in_addr *ia) -{ - struct prison *pr; - int error; - - KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); - KASSERT(ia != NULL, ("%s: ia is NULL", __func__)); - - pr = cred->cr_prison; - if (!(pr->pr_flags & PR_IP4)) - return (0); - mtx_lock(&pr->pr_mtx); - if (!(pr->pr_flags & PR_IP4)) { - mtx_unlock(&pr->pr_mtx); - return (0); - } - if (pr->pr_ip4 == NULL) { - mtx_unlock(&pr->pr_mtx); - return (EAFNOSUPPORT); - } - - error = _prison_check_ip4(pr, ia); - mtx_unlock(&pr->pr_mtx); - return (error); -} -#endif - -#ifdef INET6 -static int -prison_restrict_ip6(struct prison *pr, struct in6_addr *newip6) -{ - int ii, ij, used; - struct prison *ppr; - - ppr = pr->pr_parent; - if (!(pr->pr_flags & PR_IP6_USER)) { - /* This has no user settings, so just copy the parent's list. */ - if (pr->pr_ip6s < ppr->pr_ip6s) { - /* - * There's no room for the parent's list. Use the - * new list buffer, which is assumed to be big enough - * (if it was passed). If there's no buffer, try to - * allocate one. - */ - used = 1; - if (newip6 == NULL) { - newip6 = malloc(ppr->pr_ip6s * sizeof(*newip6), - M_PRISON, M_NOWAIT); - if (newip6 != NULL) - used = 0; - } - if (newip6 != NULL) { - bcopy(ppr->pr_ip6, newip6, - ppr->pr_ip6s * sizeof(*newip6)); - free(pr->pr_ip6, M_PRISON); - pr->pr_ip6 = newip6; - pr->pr_ip6s = ppr->pr_ip6s; - } - return (used); - } - pr->pr_ip6s = ppr->pr_ip6s; - if (pr->pr_ip6s > 0) - bcopy(ppr->pr_ip6, pr->pr_ip6, - pr->pr_ip6s * sizeof(*newip6)); - else if (pr->pr_ip6 != NULL) { - free(pr->pr_ip6, M_PRISON); - pr->pr_ip6 = NULL; - } - } else if (pr->pr_ip6s > 0) { - /* Remove addresses that aren't in the parent. */ - for (ij = 0; ij < ppr->pr_ip6s; ij++) - if (IN6_ARE_ADDR_EQUAL(&pr->pr_ip6[0], - &ppr->pr_ip6[ij])) - break; - if (ij < ppr->pr_ip6s) - ii = 1; - else { - bcopy(pr->pr_ip6 + 1, pr->pr_ip6, - --pr->pr_ip6s * sizeof(*pr->pr_ip6)); - ii = 0; - } - for (ij = 1; ii < pr->pr_ip6s; ) { - if (IN6_ARE_ADDR_EQUAL(&pr->pr_ip6[ii], - &ppr->pr_ip6[0])) { - ii++; - continue; - } - switch (ij >= ppr->pr_ip6s ? -1 : - qcmp_v6(&pr->pr_ip6[ii], &ppr->pr_ip6[ij])) { - case -1: - bcopy(pr->pr_ip6 + ii + 1, pr->pr_ip6 + ii, - (--pr->pr_ip6s - ii) * sizeof(*pr->pr_ip6)); - break; - case 0: - ii++; - ij++; - break; - case 1: - ij++; - break; - } - } - if (pr->pr_ip6s == 0) { - free(pr->pr_ip6, M_PRISON); - pr->pr_ip6 = NULL; - } - } - return 0; -} - -/* - * Pass back primary IPv6 address for this jail. - * - * If not restricted return success but do not alter the address. Caller has - * to make sure to initialize it correctly (e.g. IN6ADDR_ANY_INIT). - * - * Returns 0 on success, EAFNOSUPPORT if the jail doesn't allow IPv6. - */ -int -prison_get_ip6(struct ucred *cred, struct in6_addr *ia6) -{ - struct prison *pr; - - KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); - KASSERT(ia6 != NULL, ("%s: ia6 is NULL", __func__)); - - pr = cred->cr_prison; - if (!(pr->pr_flags & PR_IP6)) - return (0); - mtx_lock(&pr->pr_mtx); - if (!(pr->pr_flags & PR_IP6)) { - mtx_unlock(&pr->pr_mtx); - return (0); - } - if (pr->pr_ip6 == NULL) { - mtx_unlock(&pr->pr_mtx); - return (EAFNOSUPPORT); - } - - bcopy(&pr->pr_ip6[0], ia6, sizeof(struct in6_addr)); - mtx_unlock(&pr->pr_mtx); - return (0); -} - -/* - * Return 1 if we should do proper source address selection or are not jailed. - * We will return 0 if we should bypass source address selection in favour - * of the primary jail IPv6 address. Only in this case *ia will be updated and - * returned in NBO. - * Return EAFNOSUPPORT, in case this jail does not allow IPv6. - */ -int -prison_saddrsel_ip6(struct ucred *cred, struct in6_addr *ia6) -{ - struct prison *pr; - struct in6_addr lia6; - int error; - - KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); - KASSERT(ia6 != NULL, ("%s: ia6 is NULL", __func__)); - - if (!jailed(cred)) - return (1); - - pr = cred->cr_prison; - if (pr->pr_flags & PR_IP6_SADDRSEL) - return (1); - - lia6 = in6addr_any; - error = prison_get_ip6(cred, &lia6); - if (error) - return (error); - if (IN6_IS_ADDR_UNSPECIFIED(&lia6)) - return (1); - - bcopy(&lia6, ia6, sizeof(struct in6_addr)); - return (0); -} - -/* - * Return true if pr1 and pr2 have the same IPv6 address restrictions. - */ -int -prison_equal_ip6(struct prison *pr1, struct prison *pr2) -{ - - if (pr1 == pr2) - return (1); - - while (pr1 != &prison0 && -#ifdef VIMAGE - !(pr1->pr_flags & PR_VNET) && -#endif - !(pr1->pr_flags & PR_IP6_USER)) - pr1 = pr1->pr_parent; - while (pr2 != &prison0 && -#ifdef VIMAGE - !(pr2->pr_flags & PR_VNET) && -#endif - !(pr2->pr_flags & PR_IP6_USER)) - pr2 = pr2->pr_parent; - return (pr1 == pr2); -} - -/* - * Make sure our (source) address is set to something meaningful to this jail. - * - * v6only should be set based on (inp->inp_flags & IN6P_IPV6_V6ONLY != 0) - * when needed while binding. - * - * Returns 0 if jail doesn't restrict IPv6 or if address belongs to jail, - * EADDRNOTAVAIL if the address doesn't belong, or EAFNOSUPPORT if the jail - * doesn't allow IPv6. - */ -int -prison_local_ip6(struct ucred *cred, struct in6_addr *ia6, int v6only) -{ - struct prison *pr; - int error; - - KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); - KASSERT(ia6 != NULL, ("%s: ia6 is NULL", __func__)); - - pr = cred->cr_prison; - if (!(pr->pr_flags & PR_IP6)) - return (0); - mtx_lock(&pr->pr_mtx); - if (!(pr->pr_flags & PR_IP6)) { - mtx_unlock(&pr->pr_mtx); - return (0); - } - if (pr->pr_ip6 == NULL) { - mtx_unlock(&pr->pr_mtx); - return (EAFNOSUPPORT); - } - - if (IN6_IS_ADDR_LOOPBACK(ia6)) { - bcopy(&pr->pr_ip6[0], ia6, sizeof(struct in6_addr)); - mtx_unlock(&pr->pr_mtx); - return (0); - } - - if (IN6_IS_ADDR_UNSPECIFIED(ia6)) { - /* - * In case there is only 1 IPv6 address, and v6only is true, - * then bind directly. - */ - if (v6only != 0 && pr->pr_ip6s == 1) - bcopy(&pr->pr_ip6[0], ia6, sizeof(struct in6_addr)); - mtx_unlock(&pr->pr_mtx); - return (0); - } - - error = _prison_check_ip6(pr, ia6); - mtx_unlock(&pr->pr_mtx); - return (error); -} - -/* - * Rewrite destination address in case we will connect to loopback address. - * - * Returns 0 on success, EAFNOSUPPORT if the jail doesn't allow IPv6. - */ -int -prison_remote_ip6(struct ucred *cred, struct in6_addr *ia6) -{ - struct prison *pr; - - KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); - KASSERT(ia6 != NULL, ("%s: ia6 is NULL", __func__)); - - pr = cred->cr_prison; - if (!(pr->pr_flags & PR_IP6)) - return (0); - mtx_lock(&pr->pr_mtx); - if (!(pr->pr_flags & PR_IP6)) { - mtx_unlock(&pr->pr_mtx); - return (0); - } - if (pr->pr_ip6 == NULL) { - mtx_unlock(&pr->pr_mtx); - return (EAFNOSUPPORT); - } - - if (IN6_IS_ADDR_LOOPBACK(ia6)) { - bcopy(&pr->pr_ip6[0], ia6, sizeof(struct in6_addr)); - mtx_unlock(&pr->pr_mtx); - return (0); - } - - /* - * Return success because nothing had to be changed. - */ - mtx_unlock(&pr->pr_mtx); - return (0); -} - -/* - * Check if given address belongs to the jail referenced by cred/prison. - * - * Returns 0 if jail doesn't restrict IPv6 or if address belongs to jail, - * EADDRNOTAVAIL if the address doesn't belong, or EAFNOSUPPORT if the jail - * doesn't allow IPv6. - */ -static int -_prison_check_ip6(struct prison *pr, struct in6_addr *ia6) -{ - int i, a, z, d; - - /* - * Check the primary IP. - */ - if (IN6_ARE_ADDR_EQUAL(&pr->pr_ip6[0], ia6)) - return (0); - - /* - * All the other IPs are sorted so we can do a binary search. - */ - a = 0; - z = pr->pr_ip6s - 2; - while (a <= z) { - i = (a + z) / 2; - d = qcmp_v6(&pr->pr_ip6[i+1], ia6); - if (d > 0) - z = i - 1; - else if (d < 0) - a = i + 1; - else - return (0); - } - - return (EADDRNOTAVAIL); -} - -int -prison_check_ip6(struct ucred *cred, struct in6_addr *ia6) -{ - struct prison *pr; - int error; - - KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); - KASSERT(ia6 != NULL, ("%s: ia6 is NULL", __func__)); - - pr = cred->cr_prison; - if (!(pr->pr_flags & PR_IP6)) - return (0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Tue Aug 9 11:37:09 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0195BB3943 for ; Tue, 9 Aug 2016 11:37:09 +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 mx1.freebsd.org (Postfix) with ESMTPS id 74FC71FAE; Tue, 9 Aug 2016 11:37:09 +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 u79Bb8DK086951; Tue, 9 Aug 2016 11:37:08 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u79Bb8ua086950; Tue, 9 Aug 2016 11:37:08 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201608091137.u79Bb8ua086950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Tue, 9 Aug 2016 11:37:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r303871 - user/pho/stress2/misc X-SVN-Group: user 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.22 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, 09 Aug 2016 11:37:09 -0000 Author: pho Date: Tue Aug 9 11:37:08 2016 New Revision: 303871 URL: https://svnweb.freebsd.org/changeset/base/303871 Log: Added a regression test. PR: 211531 Submitted by: markj Sponsored by: EMC / Isilon Storage Division Added: user/pho/stress2/misc/unix_socket_detach.sh (contents, props changed) Added: user/pho/stress2/misc/unix_socket_detach.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/unix_socket_detach.sh Tue Aug 9 11:37:08 2016 (r303871) @@ -0,0 +1,99 @@ +#!/bin/sh + +# Reproduce problem reported as PR 211531. +# https://reviews.freebsd.org/D7398 + +# Test scenario by Mark Johnston + +# "panic: __rw_wlock_hard: recursing but non-recursive rw unp_link_rwlock @ +# ../../../kern/uipc_usrreq.c:655" seen: +# https://people.freebsd.org/~pho/stress/log/unix_socket_detach.txt +# Fixed in r303855. + +. ../default.cfg + +cd /tmp +cat > unix_socket_detach.c < +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +static void +handler(int i __unused) { + _exit(0); +} + +int +main(void) +{ + struct sockaddr_un sun; + char *file; + pid_t pid; + int sd, flags, one; + + file = "unix_socket_detach.socket"; + memset(&sun, 0, sizeof(sun)); + sun.sun_family = AF_LOCAL; + sun.sun_len = sizeof(sun); + snprintf(sun.sun_path, sizeof(sun.sun_path), "%s", file); + + signal(SIGALRM, handler); + pid = fork(); + if (pid < 0) + err(1, "fork"); + if (pid == 0) { + alarm(300); + for (;;) { + sd = socket(PF_LOCAL, SOCK_STREAM, 0); + if (sd < 0) + err(1, "socket"); + one = 1; + if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &one, + sizeof(one)) < 0) + err(1, "setsockopt"); + if (bind(sd, (struct sockaddr *)&sun, sizeof(sun)) < 0) { + close(sd); + continue; + } + if (listen(sd, 10) != 0) + err(1, "listen"); + usleep(random() % 10); + (void)close(sd); + (void)unlink(file); + } + } else { + alarm(300); + for (;;) { + sd = socket(PF_LOCAL, SOCK_STREAM, 0); + if (sd < 0) + err(1, "socket"); + if ((flags = fcntl(sd, F_GETFL, 0)) < 0) + err(1, "fcntl(F_GETFL)"); + flags |= O_NONBLOCK; + if (fcntl(sd, F_SETFL, flags) < 0) + err(1, "fcntl(F_SETFL)"); + (void)connect(sd, (struct sockaddr *)&sun, sizeof(sun)); + usleep(random() % 10); + (void)close(sd); + } + } + return (0); +} +EOF + +mycc -o unix_socket_detach -Wall -Wextra -O2 -g unix_socket_detach.c || exit 1 + +rm -f unix_socket_detach.socket +/tmp/unix_socket_detach +s=$? + +rm -f unix_socket_detach.c unix_socket_detach unix_socket_detach.socket +exit $s From owner-svn-src-user@freebsd.org Tue Aug 9 23:47:45 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AD35BB403D for ; Tue, 9 Aug 2016 23:47:45 +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 mx1.freebsd.org (Postfix) with ESMTPS id 450781DC0; Tue, 9 Aug 2016 23:47:45 +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 u79NliGW063060; Tue, 9 Aug 2016 23:47:44 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u79Nlfvx063026; Tue, 9 Aug 2016 23:47:41 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201608092347.u79Nlfvx063026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 9 Aug 2016 23:47:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r303898 - in user/alc/PG_CACHED: . bin/sh bin/uuidgen cddl/contrib/opensolaris/lib/libdtrace/arm cddl/contrib/opensolaris/lib/libdtrace/i386 cddl/contrib/opensolaris/lib/libzpool/common... X-SVN-Group: user 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.22 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, 09 Aug 2016 23:47:45 -0000 Author: markj Date: Tue Aug 9 23:47:40 2016 New Revision: 303898 URL: https://svnweb.freebsd.org/changeset/base/303898 Log: Merge from PQ_LAUNDRY at r303897. Added: user/alc/PG_CACHED/lib/libc/stdlib/cxa_thread_atexit.c - copied unchanged from r303897, user/alc/PQ_LAUNDRY/lib/libc/stdlib/cxa_thread_atexit.c user/alc/PG_CACHED/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc - copied unchanged from r303897, user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc user/alc/PG_CACHED/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc - copied unchanged from r303897, user/alc/PQ_LAUNDRY/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc user/alc/PG_CACHED/share/man/man4/ng_checksum.4 - copied unchanged from r303897, user/alc/PQ_LAUNDRY/share/man/man4/ng_checksum.4 user/alc/PG_CACHED/sys/arm/arm/gic.h - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/arm/arm/gic.h user/alc/PG_CACHED/sys/arm/arm/gic_fdt.c - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/arm/arm/gic_fdt.c user/alc/PG_CACHED/sys/contrib/cloudabi/cloudabi_types.h - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi_types.h user/alc/PG_CACHED/sys/contrib/cloudabi/cloudabi_vdso_aarch64.c - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi_vdso_aarch64.c user/alc/PG_CACHED/sys/contrib/cloudabi/cloudabi_vdso_x86_64.c - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/contrib/cloudabi/cloudabi_vdso_x86_64.c user/alc/PG_CACHED/sys/dev/ixl/ixl_pf_iov.c - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl_pf_iov.c user/alc/PG_CACHED/sys/dev/ixl/ixl_pf_iov.h - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl_pf_iov.h user/alc/PG_CACHED/sys/dev/ixl/ixl_pf_main.c - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl_pf_main.c user/alc/PG_CACHED/sys/dev/ixl/ixl_pf_qmgr.c - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl_pf_qmgr.c user/alc/PG_CACHED/sys/dev/ixl/ixl_pf_qmgr.h - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl_pf_qmgr.h user/alc/PG_CACHED/sys/mips/conf/std.AR933X - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/mips/conf/std.AR933X user/alc/PG_CACHED/sys/mips/conf/std.AR934X - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/mips/conf/std.AR934X user/alc/PG_CACHED/sys/modules/netgraph/checksum/ - copied from r303897, user/alc/PQ_LAUNDRY/sys/modules/netgraph/checksum/ user/alc/PG_CACHED/sys/netgraph/ng_checksum.c - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/netgraph/ng_checksum.c user/alc/PG_CACHED/sys/netgraph/ng_checksum.h - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/netgraph/ng_checksum.h user/alc/PG_CACHED/sys/netinet/in_jail.c - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/netinet/in_jail.c user/alc/PG_CACHED/sys/netinet6/in6_jail.c - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/netinet6/in6_jail.c user/alc/PG_CACHED/sys/x86/x86/mp_watchdog.c - copied unchanged from r303897, user/alc/PQ_LAUNDRY/sys/x86/x86/mp_watchdog.c Deleted: user/alc/PG_CACHED/sys/amd64/amd64/mp_watchdog.c user/alc/PG_CACHED/sys/dev/mlx5/mlx5_en/tcp_tlro.c user/alc/PG_CACHED/sys/dev/mlx5/mlx5_en/tcp_tlro.h user/alc/PG_CACHED/sys/i386/i386/mp_watchdog.c user/alc/PG_CACHED/sys/mips/conf/AR933X_BASE user/alc/PG_CACHED/sys/mips/conf/AR934X_BASE user/alc/PG_CACHED/sys/ofed/drivers/infiniband/ulp/sdp/Kconfig user/alc/PG_CACHED/sys/ofed/drivers/infiniband/ulp/sdp/Makefile Modified: user/alc/PG_CACHED/Makefile user/alc/PG_CACHED/Makefile.inc1 user/alc/PG_CACHED/bin/sh/expand.c user/alc/PG_CACHED/bin/uuidgen/uuidgen.c user/alc/PG_CACHED/cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c user/alc/PG_CACHED/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c user/alc/PG_CACHED/cddl/contrib/opensolaris/lib/libzpool/common/util.c user/alc/PG_CACHED/contrib/binutils/bfd/ppcboot.c user/alc/PG_CACHED/contrib/blacklist/lib/bl.c user/alc/PG_CACHED/contrib/elftoolchain/readelf/readelf.c user/alc/PG_CACHED/contrib/libexecinfo/backtrace.c user/alc/PG_CACHED/contrib/libpcap/pcap-bpf.c user/alc/PG_CACHED/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp user/alc/PG_CACHED/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c user/alc/PG_CACHED/contrib/ofed/usr.lib/libibverbs/config.h user/alc/PG_CACHED/crypto/openssh/FREEBSD-upgrade user/alc/PG_CACHED/crypto/openssh/config.h user/alc/PG_CACHED/crypto/openssh/configure.ac user/alc/PG_CACHED/crypto/openssh/myproposal.h user/alc/PG_CACHED/crypto/openssh/servconf.c user/alc/PG_CACHED/crypto/openssh/ssh_config.5 user/alc/PG_CACHED/crypto/openssh/sshd_config.5 user/alc/PG_CACHED/etc/rc.d/sshd user/alc/PG_CACHED/include/grp.h user/alc/PG_CACHED/include/stdio.h user/alc/PG_CACHED/include/xlocale/_locale.h user/alc/PG_CACHED/lib/libc/Versions.def user/alc/PG_CACHED/lib/libc/gen/Makefile.inc user/alc/PG_CACHED/lib/libc/gen/clock_getcpuclockid.3 user/alc/PG_CACHED/lib/libc/gen/getgrent.3 user/alc/PG_CACHED/lib/libc/gen/getgrent.c user/alc/PG_CACHED/lib/libc/gen/glob.3 user/alc/PG_CACHED/lib/libc/gen/glob.c user/alc/PG_CACHED/lib/libc/include/libc_private.h user/alc/PG_CACHED/lib/libc/locale/freelocale.3 user/alc/PG_CACHED/lib/libc/locale/xlocale.c user/alc/PG_CACHED/lib/libc/stdio/dprintf.c user/alc/PG_CACHED/lib/libc/stdio/getline.3 user/alc/PG_CACHED/lib/libc/stdio/getline.c user/alc/PG_CACHED/lib/libc/stdio/printf.3 user/alc/PG_CACHED/lib/libc/stdlib/Makefile.inc user/alc/PG_CACHED/lib/libc/stdlib/Symbol.map user/alc/PG_CACHED/lib/libc/stdlib/exit.c user/alc/PG_CACHED/lib/libc/sys/mprotect.2 user/alc/PG_CACHED/lib/libc/tests/stdio/getdelim_test.c user/alc/PG_CACHED/lib/libc/tests/stdlib/Makefile user/alc/PG_CACHED/lib/libc/tests/stdlib/Makefile.depend user/alc/PG_CACHED/lib/libproc/Makefile user/alc/PG_CACHED/lib/libproc/_libproc.h user/alc/PG_CACHED/lib/libproc/libproc.h user/alc/PG_CACHED/lib/libproc/proc_create.c user/alc/PG_CACHED/lib/libproc/proc_rtld.c user/alc/PG_CACHED/lib/libproc/proc_util.c user/alc/PG_CACHED/lib/librtld_db/Makefile user/alc/PG_CACHED/lib/librtld_db/rtld_db.c user/alc/PG_CACHED/lib/librtld_db/rtld_db.h user/alc/PG_CACHED/lib/libthr/arch/mips/include/pthread_md.h user/alc/PG_CACHED/lib/libthr/thread/thr_exit.c user/alc/PG_CACHED/lib/msun/tests/Makefile user/alc/PG_CACHED/libexec/rtld-elf/mips/reloc.c user/alc/PG_CACHED/release/Makefile.gce user/alc/PG_CACHED/sbin/etherswitchcfg/etherswitchcfg.8 user/alc/PG_CACHED/sbin/etherswitchcfg/etherswitchcfg.c user/alc/PG_CACHED/sbin/fsdb/fsdb.c user/alc/PG_CACHED/sbin/geom/class/eli/geli.8 user/alc/PG_CACHED/sbin/ipfw/ipfw2.c user/alc/PG_CACHED/sbin/ipfw/tables.c user/alc/PG_CACHED/sbin/pfctl/parse.y user/alc/PG_CACHED/sbin/pfctl/pfctl.c user/alc/PG_CACHED/sbin/pfctl/pfctl_altq.c user/alc/PG_CACHED/sbin/pfctl/pfctl_optimize.c user/alc/PG_CACHED/sbin/pfctl/pfctl_osfp.c user/alc/PG_CACHED/sbin/pfctl/pfctl_parser.c user/alc/PG_CACHED/sbin/pfctl/pfctl_radix.c user/alc/PG_CACHED/sbin/resolvconf/Makefile user/alc/PG_CACHED/share/man/man3/pthread_getcpuclockid.3 user/alc/PG_CACHED/share/man/man3/queue.3 user/alc/PG_CACHED/share/man/man4/gpioled.4 user/alc/PG_CACHED/share/man/man4/if_ntb.4 user/alc/PG_CACHED/share/man/man4/ntb_transport.4 user/alc/PG_CACHED/share/man/man9/Makefile user/alc/PG_CACHED/share/man/man9/bitset.9 user/alc/PG_CACHED/share/man/man9/cpuset.9 user/alc/PG_CACHED/share/man/man9/lock.9 user/alc/PG_CACHED/share/man/man9/pci.9 user/alc/PG_CACHED/share/misc/bsd-family-tree user/alc/PG_CACHED/share/misc/organization.dot user/alc/PG_CACHED/share/mk/src.libnames.mk user/alc/PG_CACHED/sys/amd64/amd64/mem.c user/alc/PG_CACHED/sys/amd64/amd64/support.S user/alc/PG_CACHED/sys/amd64/vmm/vmm.c user/alc/PG_CACHED/sys/arm/allwinner/axp209.c user/alc/PG_CACHED/sys/arm/arm/gic.c user/alc/PG_CACHED/sys/arm/include/elf.h user/alc/PG_CACHED/sys/arm64/arm64/machdep.c user/alc/PG_CACHED/sys/arm64/arm64/mp_machdep.c user/alc/PG_CACHED/sys/arm64/arm64/nexus.c user/alc/PG_CACHED/sys/arm64/arm64/pmap.c user/alc/PG_CACHED/sys/arm64/include/armreg.h user/alc/PG_CACHED/sys/arm64/include/machdep.h user/alc/PG_CACHED/sys/boot/common/bcache.c user/alc/PG_CACHED/sys/boot/common/interp_parse.c user/alc/PG_CACHED/sys/boot/efi/boot1/boot1.c user/alc/PG_CACHED/sys/boot/efi/boot1/ufs_module.c user/alc/PG_CACHED/sys/boot/efi/boot1/zfs_module.c user/alc/PG_CACHED/sys/boot/fdt/dts/arm/zynq-7000.dtsi user/alc/PG_CACHED/sys/boot/fdt/dts/riscv/spike.dts user/alc/PG_CACHED/sys/boot/i386/libi386/biosdisk.c user/alc/PG_CACHED/sys/boot/zfs/libzfs.h user/alc/PG_CACHED/sys/boot/zfs/zfs.c user/alc/PG_CACHED/sys/boot/zfs/zfsimpl.c user/alc/PG_CACHED/sys/cddl/boot/zfs/zfsimpl.h user/alc/PG_CACHED/sys/cddl/compat/opensolaris/sys/vnode.h user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_dir.h user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_sa.c user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c user/alc/PG_CACHED/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S user/alc/PG_CACHED/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c user/alc/PG_CACHED/sys/cddl/dev/dtrace/riscv/dtrace_asm.S user/alc/PG_CACHED/sys/cddl/dev/dtrace/riscv/dtrace_subr.c user/alc/PG_CACHED/sys/compat/freebsd32/freebsd32_proto.h user/alc/PG_CACHED/sys/compat/freebsd32/freebsd32_syscall.h user/alc/PG_CACHED/sys/compat/freebsd32/freebsd32_syscalls.c user/alc/PG_CACHED/sys/compat/freebsd32/freebsd32_sysent.c user/alc/PG_CACHED/sys/compat/freebsd32/freebsd32_systrace_args.c user/alc/PG_CACHED/sys/compat/freebsd32/syscalls.master user/alc/PG_CACHED/sys/conf/files user/alc/PG_CACHED/sys/conf/files.amd64 user/alc/PG_CACHED/sys/conf/files.arm user/alc/PG_CACHED/sys/conf/files.arm64 user/alc/PG_CACHED/sys/conf/files.i386 user/alc/PG_CACHED/sys/conf/files.pc98 user/alc/PG_CACHED/sys/conf/files.powerpc user/alc/PG_CACHED/sys/conf/ldscript.riscv user/alc/PG_CACHED/sys/conf/options.powerpc user/alc/PG_CACHED/sys/contrib/cloudabi/cloudabi_types_common.h user/alc/PG_CACHED/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c user/alc/PG_CACHED/sys/contrib/libnv/nvlist.c user/alc/PG_CACHED/sys/ddb/db_ps.c user/alc/PG_CACHED/sys/dev/ath/if_athioctl.h user/alc/PG_CACHED/sys/dev/bxe/bxe.c user/alc/PG_CACHED/sys/dev/cfe/cfe_api.c user/alc/PG_CACHED/sys/dev/cfe/cfe_api.h user/alc/PG_CACHED/sys/dev/cfe/cfe_api_int.h user/alc/PG_CACHED/sys/dev/cfe/cfe_error.h user/alc/PG_CACHED/sys/dev/cfe/cfe_ioctl.h user/alc/PG_CACHED/sys/dev/cxgbe/adapter.h user/alc/PG_CACHED/sys/dev/cxgbe/iw_cxgbe/cq.c user/alc/PG_CACHED/sys/dev/cxgbe/iw_cxgbe/qp.c user/alc/PG_CACHED/sys/dev/cxgbe/t4_if.m user/alc/PG_CACHED/sys/dev/cxgbe/t4_iov.c user/alc/PG_CACHED/sys/dev/cxgbe/t4_main.c user/alc/PG_CACHED/sys/dev/cxgbe/t4_netmap.c user/alc/PG_CACHED/sys/dev/cxgbe/t4_sge.c user/alc/PG_CACHED/sys/dev/cxgbe/tom/t4_ddp.c user/alc/PG_CACHED/sys/dev/cxgbe/tom/t4_tom.h user/alc/PG_CACHED/sys/dev/e1000/if_em.c user/alc/PG_CACHED/sys/dev/etherswitch/arswitch/arswitch.c user/alc/PG_CACHED/sys/dev/etherswitch/arswitch/arswitch_8327.c user/alc/PG_CACHED/sys/dev/etherswitch/arswitch/arswitch_8327.h user/alc/PG_CACHED/sys/dev/etherswitch/arswitch/arswitch_phy.c user/alc/PG_CACHED/sys/dev/etherswitch/arswitch/arswitch_reg.c user/alc/PG_CACHED/sys/dev/etherswitch/arswitch/arswitchvar.h user/alc/PG_CACHED/sys/dev/etherswitch/etherswitch.h user/alc/PG_CACHED/sys/dev/fdt/fdt_common.c user/alc/PG_CACHED/sys/dev/fdt/fdt_common.h user/alc/PG_CACHED/sys/dev/gpio/gpioled.c user/alc/PG_CACHED/sys/dev/hwpmc/hwpmc_core.c user/alc/PG_CACHED/sys/dev/hyperv/include/vmbus.h user/alc/PG_CACHED/sys/dev/hyperv/netvsc/hv_net_vsc.c user/alc/PG_CACHED/sys/dev/hyperv/netvsc/hv_net_vsc.h user/alc/PG_CACHED/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c user/alc/PG_CACHED/sys/dev/hyperv/netvsc/hv_rndis_filter.c user/alc/PG_CACHED/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c user/alc/PG_CACHED/sys/dev/hyperv/utilities/hv_heartbeat.c user/alc/PG_CACHED/sys/dev/hyperv/utilities/hv_kvp.c user/alc/PG_CACHED/sys/dev/hyperv/utilities/hv_shutdown.c user/alc/PG_CACHED/sys/dev/hyperv/utilities/hv_timesync.c user/alc/PG_CACHED/sys/dev/hyperv/utilities/hv_util.c user/alc/PG_CACHED/sys/dev/hyperv/utilities/hv_util.h user/alc/PG_CACHED/sys/dev/hyperv/vmbus/vmbus_brvar.h user/alc/PG_CACHED/sys/dev/hyperv/vmbus/vmbus_chan.c user/alc/PG_CACHED/sys/dev/ioat/ioat.c user/alc/PG_CACHED/sys/dev/iwm/if_iwm.c user/alc/PG_CACHED/sys/dev/ixl/i40e_adminq.c user/alc/PG_CACHED/sys/dev/ixl/i40e_adminq.h user/alc/PG_CACHED/sys/dev/ixl/i40e_adminq_cmd.h user/alc/PG_CACHED/sys/dev/ixl/i40e_common.c user/alc/PG_CACHED/sys/dev/ixl/i40e_devids.h user/alc/PG_CACHED/sys/dev/ixl/i40e_nvm.c user/alc/PG_CACHED/sys/dev/ixl/i40e_osdep.c user/alc/PG_CACHED/sys/dev/ixl/i40e_osdep.h user/alc/PG_CACHED/sys/dev/ixl/i40e_prototype.h user/alc/PG_CACHED/sys/dev/ixl/i40e_register.h user/alc/PG_CACHED/sys/dev/ixl/i40e_type.h user/alc/PG_CACHED/sys/dev/ixl/i40e_virtchnl.h user/alc/PG_CACHED/sys/dev/ixl/if_ixl.c user/alc/PG_CACHED/sys/dev/ixl/if_ixlv.c user/alc/PG_CACHED/sys/dev/ixl/ixl.h user/alc/PG_CACHED/sys/dev/ixl/ixl_pf.h user/alc/PG_CACHED/sys/dev/ixl/ixl_txrx.c user/alc/PG_CACHED/sys/dev/ixl/ixlv.h user/alc/PG_CACHED/sys/dev/ixl/ixlvc.c user/alc/PG_CACHED/sys/dev/mlx5/mlx5_en/en.h user/alc/PG_CACHED/sys/dev/mlx5/mlx5_en/mlx5_en_main.c user/alc/PG_CACHED/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c user/alc/PG_CACHED/sys/dev/ntb/if_ntb/if_ntb.c user/alc/PG_CACHED/sys/dev/ntb/ntb.c user/alc/PG_CACHED/sys/dev/ntb/ntb_hw/ntb_hw.c user/alc/PG_CACHED/sys/dev/ntb/ntb_transport.c user/alc/PG_CACHED/sys/dev/ntb/ntb_transport.h user/alc/PG_CACHED/sys/dev/ofw/ofw_fdt.c user/alc/PG_CACHED/sys/dev/pci/pci_if.m user/alc/PG_CACHED/sys/dev/pci/pci_iov.c user/alc/PG_CACHED/sys/dev/pci/pci_iov.h user/alc/PG_CACHED/sys/dev/pci/pci_pci.c user/alc/PG_CACHED/sys/dev/pci/pci_private.h user/alc/PG_CACHED/sys/dev/usb/input/ukbd.c user/alc/PG_CACHED/sys/dev/usb/usbdevs user/alc/PG_CACHED/sys/dev/xen/netfront/netfront.c user/alc/PG_CACHED/sys/fs/ext2fs/ext2_dinode.h user/alc/PG_CACHED/sys/fs/ext2fs/ext2fs.h user/alc/PG_CACHED/sys/fs/nfsclient/nfs_clbio.c user/alc/PG_CACHED/sys/fs/nfsclient/nfs_clsubs.c user/alc/PG_CACHED/sys/fs/nfsclient/nfs_clvnops.c user/alc/PG_CACHED/sys/fs/nfsclient/nfsnode.h user/alc/PG_CACHED/sys/fs/pseudofs/pseudofs.c user/alc/PG_CACHED/sys/fs/pseudofs/pseudofs.h user/alc/PG_CACHED/sys/fs/pseudofs/pseudofs_fileno.c user/alc/PG_CACHED/sys/fs/pseudofs/pseudofs_vncache.c user/alc/PG_CACHED/sys/geom/geom_disk.c user/alc/PG_CACHED/sys/kern/init_sysent.c user/alc/PG_CACHED/sys/kern/kern_fork.c user/alc/PG_CACHED/sys/kern/kern_jail.c user/alc/PG_CACHED/sys/kern/kern_mutex.c user/alc/PG_CACHED/sys/kern/kern_rwlock.c user/alc/PG_CACHED/sys/kern/kern_sx.c user/alc/PG_CACHED/sys/kern/kern_tc.c user/alc/PG_CACHED/sys/kern/makesyscalls.sh user/alc/PG_CACHED/sys/kern/sched_4bsd.c user/alc/PG_CACHED/sys/kern/subr_lock.c user/alc/PG_CACHED/sys/kern/syscalls.c user/alc/PG_CACHED/sys/kern/syscalls.master user/alc/PG_CACHED/sys/kern/systrace_args.c user/alc/PG_CACHED/sys/kern/uipc_usrreq.c user/alc/PG_CACHED/sys/kern/vfs_aio.c user/alc/PG_CACHED/sys/kern/vfs_subr.c user/alc/PG_CACHED/sys/kern/vnode_if.src user/alc/PG_CACHED/sys/mips/atheros/ar71xx_gpio.c user/alc/PG_CACHED/sys/mips/atheros/if_arge.c user/alc/PG_CACHED/sys/mips/broadcom/uart_cpu_chipc.c user/alc/PG_CACHED/sys/mips/conf/ALFA_HORNET_UB user/alc/PG_CACHED/sys/mips/conf/AP121 user/alc/PG_CACHED/sys/mips/conf/CARAMBOLA2 user/alc/PG_CACHED/sys/mips/conf/DB120 user/alc/PG_CACHED/sys/mips/conf/DIR-825C1 user/alc/PG_CACHED/sys/mips/conf/ONIONOMEGA user/alc/PG_CACHED/sys/mips/conf/SENTRY5.hints user/alc/PG_CACHED/sys/mips/conf/TL-WDR4300 user/alc/PG_CACHED/sys/mips/conf/TL-WDR4300.hints user/alc/PG_CACHED/sys/mips/conf/TL-WR740Nv4 user/alc/PG_CACHED/sys/mips/conf/TP-MR3020 user/alc/PG_CACHED/sys/mips/include/cpufunc.h user/alc/PG_CACHED/sys/mips/include/cpuinfo.h user/alc/PG_CACHED/sys/mips/include/cpuregs.h user/alc/PG_CACHED/sys/mips/mips/cpu.c user/alc/PG_CACHED/sys/mips/mips/genassym.c user/alc/PG_CACHED/sys/mips/mips/swtch.S user/alc/PG_CACHED/sys/mips/mips/sys_machdep.c user/alc/PG_CACHED/sys/mips/mips/trap.c user/alc/PG_CACHED/sys/mips/mips/vm_machdep.c user/alc/PG_CACHED/sys/modules/ixl/Makefile user/alc/PG_CACHED/sys/modules/ixlv/Makefile (contents, props changed) user/alc/PG_CACHED/sys/modules/mlx5en/Makefile user/alc/PG_CACHED/sys/net/ethernet.h user/alc/PG_CACHED/sys/net/if_ethersubr.c user/alc/PG_CACHED/sys/net/if_gif.c user/alc/PG_CACHED/sys/net/iflib.c user/alc/PG_CACHED/sys/net/route.h user/alc/PG_CACHED/sys/net80211/ieee80211_input.c user/alc/PG_CACHED/sys/netgraph/ng_base.c user/alc/PG_CACHED/sys/netgraph/ng_patch.c user/alc/PG_CACHED/sys/netgraph/ng_patch.h user/alc/PG_CACHED/sys/netinet/sctp_indata.c user/alc/PG_CACHED/sys/netinet/sctp_input.c user/alc/PG_CACHED/sys/netinet/sctp_output.c user/alc/PG_CACHED/sys/netinet/sctp_pcb.c user/alc/PG_CACHED/sys/netinet/sctp_ss_functions.c user/alc/PG_CACHED/sys/netinet/sctp_structs.h user/alc/PG_CACHED/sys/netinet/sctp_usrreq.c user/alc/PG_CACHED/sys/netinet/sctputil.c user/alc/PG_CACHED/sys/netinet/tcp_lro.c user/alc/PG_CACHED/sys/netinet/tcp_lro.h user/alc/PG_CACHED/sys/netinet/tcp_subr.c user/alc/PG_CACHED/sys/netinet6/icmp6.c user/alc/PG_CACHED/sys/netinet6/ip6_output.c user/alc/PG_CACHED/sys/ofed/drivers/infiniband/core/cma.c user/alc/PG_CACHED/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c user/alc/PG_CACHED/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h user/alc/PG_CACHED/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c user/alc/PG_CACHED/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h user/alc/PG_CACHED/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c user/alc/PG_CACHED/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c user/alc/PG_CACHED/sys/ofed/drivers/infiniband/ulp/sdp/sdp_tx.c user/alc/PG_CACHED/sys/opencrypto/xform_aes_icm.c user/alc/PG_CACHED/sys/powerpc/conf/MPC85XX user/alc/PG_CACHED/sys/powerpc/conf/dpaa/DPAA user/alc/PG_CACHED/sys/powerpc/include/hid.h user/alc/PG_CACHED/sys/powerpc/mpc85xx/mpc85xx.c user/alc/PG_CACHED/sys/powerpc/mpc85xx/mpc85xx.h user/alc/PG_CACHED/sys/powerpc/mpc85xx/pci_mpc85xx.c user/alc/PG_CACHED/sys/powerpc/mpc85xx/platform_mpc85xx.c user/alc/PG_CACHED/sys/powerpc/powerpc/busdma_machdep.c user/alc/PG_CACHED/sys/riscv/conf/GENERIC user/alc/PG_CACHED/sys/riscv/htif/htif.c user/alc/PG_CACHED/sys/riscv/htif/htif_block.c user/alc/PG_CACHED/sys/riscv/htif/htif_console.c user/alc/PG_CACHED/sys/riscv/include/cpu.h user/alc/PG_CACHED/sys/riscv/include/cpufunc.h user/alc/PG_CACHED/sys/riscv/include/db_machdep.h user/alc/PG_CACHED/sys/riscv/include/intr.h user/alc/PG_CACHED/sys/riscv/include/pte.h user/alc/PG_CACHED/sys/riscv/include/riscvreg.h user/alc/PG_CACHED/sys/riscv/include/vmparam.h user/alc/PG_CACHED/sys/riscv/riscv/exception.S user/alc/PG_CACHED/sys/riscv/riscv/genassym.c user/alc/PG_CACHED/sys/riscv/riscv/identcpu.c user/alc/PG_CACHED/sys/riscv/riscv/intr_machdep.c user/alc/PG_CACHED/sys/riscv/riscv/locore.S user/alc/PG_CACHED/sys/riscv/riscv/machdep.c user/alc/PG_CACHED/sys/riscv/riscv/pmap.c user/alc/PG_CACHED/sys/riscv/riscv/swtch.S user/alc/PG_CACHED/sys/riscv/riscv/timer.c user/alc/PG_CACHED/sys/riscv/riscv/trap.c user/alc/PG_CACHED/sys/riscv/riscv/vm_machdep.c user/alc/PG_CACHED/sys/sys/buf.h user/alc/PG_CACHED/sys/sys/bus.h user/alc/PG_CACHED/sys/sys/elf_common.h user/alc/PG_CACHED/sys/sys/jail.h user/alc/PG_CACHED/sys/sys/lock.h user/alc/PG_CACHED/sys/sys/lockmgr.h user/alc/PG_CACHED/sys/sys/mman.h user/alc/PG_CACHED/sys/sys/pmc.h user/alc/PG_CACHED/sys/sys/syscall.h user/alc/PG_CACHED/sys/sys/syscall.mk user/alc/PG_CACHED/sys/sys/sysproto.h user/alc/PG_CACHED/sys/sys/unpcb.h user/alc/PG_CACHED/sys/sys/vmmeter.h user/alc/PG_CACHED/sys/sys/vnode.h user/alc/PG_CACHED/sys/vm/swap_pager.c user/alc/PG_CACHED/sys/vm/vm_meter.c user/alc/PG_CACHED/sys/vm/vm_page.c user/alc/PG_CACHED/sys/vm/vm_pageout.c user/alc/PG_CACHED/sys/x86/iommu/intel_drv.c user/alc/PG_CACHED/tests/sys/aio/aio_test.c user/alc/PG_CACHED/tools/build/mk/OptionalObsoleteFiles.inc user/alc/PG_CACHED/tools/regression/zfs/zpool/add/option-f_size_mismatch.t user/alc/PG_CACHED/tools/regression/zfs/zpool/add/option-f_type_mismatch.t user/alc/PG_CACHED/tools/regression/zfs/zpool/create/files.t user/alc/PG_CACHED/usr.bin/at/at.c user/alc/PG_CACHED/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.common user/alc/PG_CACHED/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.holiday (contents, props changed) user/alc/PG_CACHED/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.military user/alc/PG_CACHED/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.orthodox user/alc/PG_CACHED/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.pagan user/alc/PG_CACHED/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.common user/alc/PG_CACHED/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.military user/alc/PG_CACHED/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.pagan user/alc/PG_CACHED/usr.bin/calendar/io.c user/alc/PG_CACHED/usr.bin/checknr/checknr.c user/alc/PG_CACHED/usr.bin/comm/comm.c user/alc/PG_CACHED/usr.bin/cpuset/cpuset.1 user/alc/PG_CACHED/usr.bin/getconf/getconf.1 user/alc/PG_CACHED/usr.bin/getconf/progenv.gperf user/alc/PG_CACHED/usr.bin/grep/grep.c user/alc/PG_CACHED/usr.bin/grep/regex/tre-fastmatch.c user/alc/PG_CACHED/usr.bin/gzip/gzip.c user/alc/PG_CACHED/usr.bin/indent/args.c user/alc/PG_CACHED/usr.bin/indent/indent.1 user/alc/PG_CACHED/usr.bin/indent/indent.c user/alc/PG_CACHED/usr.bin/indent/indent.h user/alc/PG_CACHED/usr.bin/indent/indent_codes.h user/alc/PG_CACHED/usr.bin/indent/indent_globs.h user/alc/PG_CACHED/usr.bin/indent/io.c user/alc/PG_CACHED/usr.bin/indent/lexi.c user/alc/PG_CACHED/usr.bin/indent/parse.c user/alc/PG_CACHED/usr.bin/indent/pr_comment.c user/alc/PG_CACHED/usr.bin/locale/locale.c user/alc/PG_CACHED/usr.bin/mandoc/Makefile user/alc/PG_CACHED/usr.bin/netstat/pfkey.c user/alc/PG_CACHED/usr.bin/nl/nl.c user/alc/PG_CACHED/usr.bin/procstat/procstat_files.c user/alc/PG_CACHED/usr.bin/resizewin/resizewin.1 user/alc/PG_CACHED/usr.bin/sdiff/sdiff.c user/alc/PG_CACHED/usr.bin/sed/Makefile user/alc/PG_CACHED/usr.bin/sed/compile.c user/alc/PG_CACHED/usr.bin/sed/defs.h user/alc/PG_CACHED/usr.bin/sed/extern.h user/alc/PG_CACHED/usr.bin/sed/main.c user/alc/PG_CACHED/usr.bin/sed/misc.c user/alc/PG_CACHED/usr.bin/sed/process.c user/alc/PG_CACHED/usr.bin/soelim/soelim.c user/alc/PG_CACHED/usr.bin/systat/vmstat.c user/alc/PG_CACHED/usr.bin/tar/tests/Makefile user/alc/PG_CACHED/usr.bin/truss/setup.c user/alc/PG_CACHED/usr.bin/uniq/uniq.c user/alc/PG_CACHED/usr.bin/vmstat/vmstat.c user/alc/PG_CACHED/usr.sbin/Makefile user/alc/PG_CACHED/usr.sbin/autofs/common.c user/alc/PG_CACHED/usr.sbin/bsdinstall/scripts/hardening user/alc/PG_CACHED/usr.sbin/etcupdate/etcupdate.sh user/alc/PG_CACHED/usr.sbin/kgzip/kgzip.8 user/alc/PG_CACHED/usr.sbin/pciconf/cap.c user/alc/PG_CACHED/usr.sbin/pkg/pkg.c user/alc/PG_CACHED/usr.sbin/pw/pw.h user/alc/PG_CACHED/usr.sbin/pw/pw_vpw.c user/alc/PG_CACHED/usr.sbin/pw/pwupd.h user/alc/PG_CACHED/usr.sbin/services_mkdb/services_mkdb.c user/alc/PG_CACHED/usr.sbin/uathload/uathload.c Directory Properties: user/alc/PG_CACHED/ (props changed) user/alc/PG_CACHED/cddl/ (props changed) user/alc/PG_CACHED/cddl/contrib/opensolaris/ (props changed) user/alc/PG_CACHED/contrib/binutils/ (props changed) user/alc/PG_CACHED/contrib/elftoolchain/ (props changed) user/alc/PG_CACHED/contrib/libexecinfo/ (props changed) user/alc/PG_CACHED/contrib/libpcap/ (props changed) user/alc/PG_CACHED/contrib/llvm/ (props changed) user/alc/PG_CACHED/contrib/llvm/projects/libunwind/ (props changed) user/alc/PG_CACHED/crypto/openssh/ (props changed) user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/ (props changed) Modified: user/alc/PG_CACHED/Makefile ============================================================================== --- user/alc/PG_CACHED/Makefile Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/Makefile Tue Aug 9 23:47:40 2016 (r303898) @@ -315,7 +315,7 @@ world: upgrade_checks .PHONY ${_+_}@cd ${.CURDIR}; ${_MAKE} pre-world .endif ${_+_}@cd ${.CURDIR}; ${_MAKE} buildworld - ${_+_}@cd ${.CURDIR}; ${_MAKE} -B installworld + ${_+_}@cd ${.CURDIR}; ${_MAKE} installworld MK_META_MODE=no .if target(post-world) @echo @echo "--------------------------------------------------------------" Modified: user/alc/PG_CACHED/Makefile.inc1 ============================================================================== --- user/alc/PG_CACHED/Makefile.inc1 Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/Makefile.inc1 Tue Aug 9 23:47:40 2016 (r303898) @@ -2095,7 +2095,10 @@ cddl/lib/libctf__L: lib/libz__L # cddl/lib/libdtrace requires lib/libproc and lib/librtld_db; it's only built # on select architectures though (see cddl/lib/Makefile) .if ${MACHINE_CPUARCH} != "sparc64" -_prebuild_libs+= lib/libproc lib/librtld_db +_prebuild_libs+= lib/libprocstat lib/libproc lib/librtld_db +lib/libprocstat__L: lib/libelf__L lib/libkvm__L lib/libutil__L +lib/libproc__L: lib/libprocstat__L +lib/librtld_db__L: lib/libprocstat__L .endif .if ${MK_CRYPT} != "no" Modified: user/alc/PG_CACHED/bin/sh/expand.c ============================================================================== --- user/alc/PG_CACHED/bin/sh/expand.c Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/bin/sh/expand.c Tue Aug 9 23:47:40 2016 (r303898) @@ -473,7 +473,8 @@ expbackq(union node *cmd, int quoted, in if (--in.nleft < 0) { if (in.fd < 0) break; - while ((i = read(in.fd, buf, sizeof buf)) < 0 && errno == EINTR); + while ((i = read(in.fd, buf, sizeof buf)) < 0 && errno == EINTR) + ; TRACE(("expbackq: read returns %d\n", i)); if (i <= 0) break; Modified: user/alc/PG_CACHED/bin/uuidgen/uuidgen.c ============================================================================== --- user/alc/PG_CACHED/bin/uuidgen/uuidgen.c Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/bin/uuidgen/uuidgen.c Tue Aug 9 23:47:40 2016 (r303898) @@ -47,7 +47,7 @@ main(int argc, char *argv[]) FILE *fp; uuid_t *store, *uuid; char *p; - int ch, count, i, iterate; + int ch, count, i, iterate, status; count = -1; /* no count yet */ fp = stdout; /* default output file */ @@ -101,7 +101,9 @@ main(int argc, char *argv[]) uuid = store; while (count--) { - uuid_to_string(uuid++, &p, NULL); + uuid_to_string(uuid++, &p, &status); + if (status != uuid_s_ok) + err(1, "cannot stringify a UUID"); fprintf(fp, "%s\n", p); free(p); } Modified: user/alc/PG_CACHED/cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c ============================================================================== --- user/alc/PG_CACHED/cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c Tue Aug 9 23:47:40 2016 (r303898) @@ -38,9 +38,7 @@ #include #include -#if !defined(sun) -#define PR_MODEL_ILP32 1 -#define PR_MODEL_LP64 2 +#ifdef __FreeBSD__ #include #endif Modified: user/alc/PG_CACHED/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c ============================================================================== --- user/alc/PG_CACHED/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c Tue Aug 9 23:47:40 2016 (r303898) @@ -39,9 +39,8 @@ #include -#ifndef illumos -#define PR_MODEL_ILP32 1 -#define PR_MODEL_LP64 2 +#ifdef __FreeBSD__ +#include #include #endif @@ -93,11 +92,7 @@ dt_pid_has_jump_table(struct ps_prochand char dmodel = Pstatus(P)->pr_dmodel; #else pid_t pid = proc_getpid(P); -#if __i386__ - char dmodel = PR_MODEL_ILP32; -#elif __amd64__ - char dmodel = PR_MODEL_LP64; -#endif + char dmodel = proc_getmodel(P); #endif /* @@ -149,11 +144,7 @@ dt_pid_create_return_probe(struct ps_pro char dmodel = Pstatus(P)->pr_dmodel; #else pid_t pid = proc_getpid(P); -#if __i386__ - char dmodel = PR_MODEL_ILP32; -#elif __amd64__ - char dmodel = PR_MODEL_LP64; -#endif + char dmodel = proc_getmodel(P); #endif /* @@ -310,11 +301,7 @@ dt_pid_create_offset_probe(struct ps_pro char dmodel = Pstatus(P)->pr_dmodel; #else pid_t pid = proc_getpid(P); -#if __i386__ - char dmodel = PR_MODEL_ILP32; -#elif __amd64__ - char dmodel = PR_MODEL_LP64; -#endif + char dmodel = proc_getmodel(P); #endif if ((text = malloc(symp->st_size)) == NULL) { @@ -393,11 +380,7 @@ dt_pid_create_glob_offset_probes(struct char dmodel = Pstatus(P)->pr_dmodel; #else pid_t pid = proc_getpid(P); -#if __i386__ - char dmodel = PR_MODEL_ILP32; -#elif __amd64__ - char dmodel = PR_MODEL_LP64; -#endif + char dmodel = proc_getmodel(P); #endif ftp->ftps_type = DTFTP_OFFSETS; Modified: user/alc/PG_CACHED/cddl/contrib/opensolaris/lib/libzpool/common/util.c ============================================================================== --- user/alc/PG_CACHED/cddl/contrib/opensolaris/lib/libzpool/common/util.c Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/cddl/contrib/opensolaris/lib/libzpool/common/util.c Tue Aug 9 23:47:40 2016 (r303898) @@ -108,7 +108,7 @@ show_vdev_stats(const char *desc, const (void) printf("%*s%s%*s%*s%*s %5s %5s %5s %5s %5s %5s %5s\n", indent, "", prefix, - indent + strlen(prefix) - 25 - (vs->vs_space ? 0 : 12), + (int)(indent + strlen(prefix) - 25 - (vs->vs_space ? 0 : 12)), desc, vs->vs_space ? 6 : 0, vs->vs_space ? used : "", vs->vs_space ? 6 : 0, vs->vs_space ? avail : "", Modified: user/alc/PG_CACHED/contrib/binutils/bfd/ppcboot.c ============================================================================== --- user/alc/PG_CACHED/contrib/binutils/bfd/ppcboot.c Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/contrib/binutils/bfd/ppcboot.c Tue Aug 9 23:47:40 2016 (r303898) @@ -419,7 +419,7 @@ ppcboot_bfd_print_private_bfd_data (abfd if (tdata->header.os_id) fprintf (f, "OS_ID = 0x%.2x\n", tdata->header.os_id); - if (tdata->header.partition_name) + if (tdata->header.partition_name[0]) fprintf (f, _("Partition name = \"%s\"\n"), tdata->header.partition_name); for (i = 0; i < 4; i++) Modified: user/alc/PG_CACHED/contrib/blacklist/lib/bl.c ============================================================================== --- user/alc/PG_CACHED/contrib/blacklist/lib/bl.c Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/contrib/blacklist/lib/bl.c Tue Aug 9 23:47:40 2016 (r303898) @@ -152,8 +152,8 @@ bl_init(bl_t b, bool srv) b->b_fd = socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK|SOCK_NOSIGPIPE, 0); if (b->b_fd == -1) { - bl_log(b->b_fun, LOG_ERR, "%s: socket failed (%m)", - __func__); + bl_log(b->b_fun, LOG_ERR, "%s: socket failed (%s)", + __func__, strerror(errno)); BL_UNLOCK(b); return -1; } @@ -200,8 +200,8 @@ bl_init(bl_t b, bool srv) */ if (b->b_connected != 1) { bl_log(b->b_fun, LOG_DEBUG, - "%s: connect failed for `%s' (%m)", - __func__, sun->sun_path); + "%s: connect failed for `%s' (%s)", + __func__, sun->sun_path, strerror(errno)); b->b_connected = 1; } BL_UNLOCK(b); @@ -220,8 +220,8 @@ bl_init(bl_t b, bool srv) errno = serrno; if (rv == -1) { bl_log(b->b_fun, LOG_ERR, - "%s: bind failed for `%s' (%m)", - __func__, sun->sun_path); + "%s: bind failed for `%s' (%s)", + __func__, sun->sun_path, strerror(errno)); goto out; } } @@ -260,7 +260,8 @@ bl_init(bl_t b, bool srv) if (setsockopt(b->b_fd, CRED_LEVEL, CRED_NAME, &one, (socklen_t)sizeof(one)) == -1) { bl_log(b->b_fun, LOG_ERR, "%s: setsockopt %s " - "failed (%m)", __func__, __STRING(CRED_NAME)); + "failed (%s)", __func__, __STRING(CRED_NAME), + strerror(errno)); goto out; } #endif @@ -296,7 +297,8 @@ bl_create(bool srv, const char *path, vo return b; out: free(b); - bl_log(fun, LOG_ERR, "%s: malloc failed (%m)", __func__); + bl_log(fun, LOG_ERR, "%s: malloc failed (%s)", __func__, + strerror(errno)); return NULL; } @@ -451,7 +453,8 @@ bl_recv(bl_t b) rlen = recvmsg(b->b_fd, &msg, 0); if (rlen == -1) { - bl_log(b->b_fun, LOG_ERR, "%s: recvmsg failed (%m)", __func__); + bl_log(b->b_fun, LOG_ERR, "%s: recvmsg failed (%s)", __func__, + strerror(errno)); return NULL; } Modified: user/alc/PG_CACHED/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- user/alc/PG_CACHED/contrib/elftoolchain/readelf/readelf.c Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/contrib/elftoolchain/readelf/readelf.c Tue Aug 9 23:47:40 2016 (r303898) @@ -343,7 +343,7 @@ static const char *note_type_openbsd(uns static const char *note_type_unknown(unsigned int nt); static const char *note_type_xen(unsigned int nt); static const char *option_kind(uint8_t kind); -static const char *phdr_type(unsigned int ptype); +static const char *phdr_type(unsigned int mach, unsigned int ptype); static const char *ppc_abi_fp(uint64_t fp); static const char *ppc_abi_vector(uint64_t vec); static void readelf_usage(int status); @@ -622,10 +622,24 @@ elf_ver(unsigned int ver) } static const char * -phdr_type(unsigned int ptype) +phdr_type(unsigned int mach, unsigned int ptype) { static char s_ptype[32]; + if (ptype >= PT_LOPROC && ptype <= PT_HIPROC) { + switch (mach) { + case EM_ARM: + switch (ptype) { + case PT_ARM_ARCHEXT: return "ARM_ARCHEXT"; + case PT_ARM_EXIDX: return "ARM_EXIDX"; + } + break; + } + snprintf(s_ptype, sizeof(s_ptype), "LOPROC+%#x", + ptype - PT_LOPROC); + return (s_ptype); + } + switch (ptype) { case PT_NULL: return "NULL"; case PT_LOAD: return "LOAD"; @@ -639,10 +653,7 @@ phdr_type(unsigned int ptype) case PT_GNU_STACK: return "GNU_STACK"; case PT_GNU_RELRO: return "GNU_RELRO"; default: - if (ptype >= PT_LOPROC && ptype <= PT_HIPROC) - snprintf(s_ptype, sizeof(s_ptype), "LOPROC+%#x", - ptype - PT_LOPROC); - else if (ptype >= PT_LOOS && ptype <= PT_HIOS) + if (ptype >= PT_LOOS && ptype <= PT_HIOS) snprintf(s_ptype, sizeof(s_ptype), "LOOS+%#x", ptype - PT_LOOS); else @@ -659,6 +670,15 @@ section_type(unsigned int mach, unsigned if (stype >= SHT_LOPROC && stype <= SHT_HIPROC) { switch (mach) { + case EM_ARM: + switch (stype) { + case SHT_ARM_EXIDX: return "ARM_EXIDX"; + case SHT_ARM_PREEMPTMAP: return "ARM_PREEMPTMAP"; + case SHT_ARM_ATTRIBUTES: return "ARM_ATTRIBUTES"; + case SHT_ARM_DEBUGOVERLAY: return "ARM_DEBUGOVERLAY"; + case SHT_ARM_OVERLAYSECTION: return "ARM_OVERLAYSECTION"; + } + break; case EM_X86_64: switch (stype) { case SHT_X86_64_UNWIND: return "X86_64_UNWIND"; @@ -2273,9 +2293,10 @@ dump_phdr(struct readelf *re) #define PH_HDR "Type", "Offset", "VirtAddr", "PhysAddr", "FileSiz", \ "MemSiz", "Flg", "Align" -#define PH_CT phdr_type(phdr.p_type), (uintmax_t)phdr.p_offset, \ - (uintmax_t)phdr.p_vaddr, (uintmax_t)phdr.p_paddr, \ - (uintmax_t)phdr.p_filesz, (uintmax_t)phdr.p_memsz, \ +#define PH_CT phdr_type(re->ehdr.e_machine, phdr.p_type), \ + (uintmax_t)phdr.p_offset, (uintmax_t)phdr.p_vaddr, \ + (uintmax_t)phdr.p_paddr, (uintmax_t)phdr.p_filesz, \ + (uintmax_t)phdr.p_memsz, \ phdr.p_flags & PF_R ? 'R' : ' ', \ phdr.p_flags & PF_W ? 'W' : ' ', \ phdr.p_flags & PF_X ? 'E' : ' ', \ Modified: user/alc/PG_CACHED/contrib/libexecinfo/backtrace.c ============================================================================== --- user/alc/PG_CACHED/contrib/libexecinfo/backtrace.c Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/contrib/libexecinfo/backtrace.c Tue Aug 9 23:47:40 2016 (r303898) @@ -33,7 +33,6 @@ __RCSID("$NetBSD: backtrace.c,v 1.3 2013 #include #include -#define _WITH_DPRINTF #include #include #include Modified: user/alc/PG_CACHED/contrib/libpcap/pcap-bpf.c ============================================================================== --- user/alc/PG_CACHED/contrib/libpcap/pcap-bpf.c Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/contrib/libpcap/pcap-bpf.c Tue Aug 9 23:47:40 2016 (r303898) @@ -431,6 +431,22 @@ pcap_create_interface(const char *device p->activate_op = pcap_activate_bpf; p->can_set_rfmon_op = pcap_can_set_rfmon_bpf; +#ifdef BIOCSTSTAMP + /* + * We claim that we support microsecond and nanosecond time + * stamps. + */ + p->tstamp_precision_count = 2; + p->tstamp_precision_list = malloc(2 * sizeof(u_int)); + if (p->tstamp_precision_list == NULL) { + snprintf(ebuf, PCAP_ERRBUF_SIZE, "malloc: %s", + pcap_strerror(errno)); + free(p); + return (NULL); + } + p->tstamp_precision_list[0] = PCAP_TSTAMP_PRECISION_MICRO; + p->tstamp_precision_list[1] = PCAP_TSTAMP_PRECISION_NANO; +#endif /* BIOCSTSTAMP */ return (p); } @@ -946,7 +962,11 @@ pcap_read_bpf(pcap_t *p, int cnt, pcap_h /* * Loop through each packet. */ +#ifdef BIOCSTSTAMP +#define bhp ((struct bpf_xhdr *)bp) +#else #define bhp ((struct bpf_hdr *)bp) +#endif ep = bp + cc; #ifdef PCAP_FDDIPAD pad = p->fddipad; @@ -1008,7 +1028,25 @@ pcap_read_bpf(pcap_t *p, int cnt, pcap_h if (pb->filtering_in_kernel || bpf_filter(p->fcode.bf_insns, datap, bhp->bh_datalen, caplen)) { struct pcap_pkthdr pkthdr; +#ifdef BIOCSTSTAMP + struct bintime bt; + + bt.sec = bhp->bh_tstamp.bt_sec; + bt.frac = bhp->bh_tstamp.bt_frac; + if (p->opt.tstamp_precision == PCAP_TSTAMP_PRECISION_NANO) { + struct timespec ts; + + bintime2timespec(&bt, &ts); + pkthdr.ts.tv_sec = ts.tv_sec; + pkthdr.ts.tv_usec = ts.tv_nsec; + } else { + struct timeval tv; + bintime2timeval(&bt, &tv); + pkthdr.ts.tv_sec = tv.tv_sec; + pkthdr.ts.tv_usec = tv.tv_usec; + } +#else pkthdr.ts.tv_sec = bhp->bh_tstamp.tv_sec; #ifdef _AIX /* @@ -1019,6 +1057,7 @@ pcap_read_bpf(pcap_t *p, int cnt, pcap_h #else pkthdr.ts.tv_usec = bhp->bh_tstamp.tv_usec; #endif +#endif /* BIOCSTSTAMP */ #ifdef PCAP_FDDIPAD if (caplen > pad) pkthdr.caplen = caplen - pad; @@ -2192,6 +2231,16 @@ pcap_activate_bpf(pcap_t *p) } } +#ifdef BIOCSTSTAMP + v = BPF_T_BINTIME; + if (ioctl(p->fd, BIOCSTSTAMP, &v) < 0) { + snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "BIOCSTSTAMP: %s", + pcap_strerror(errno)); + status = PCAP_ERROR; + goto bad; + } +#endif /* BIOCSTSTAMP */ + if (ioctl(fd, BIOCGBLEN, (caddr_t)&v) < 0) { snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "BIOCGBLEN: %s", pcap_strerror(errno)); Modified: user/alc/PG_CACHED/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp ============================================================================== --- user/alc/PG_CACHED/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp Tue Aug 9 23:47:40 2016 (r303898) @@ -572,7 +572,7 @@ static _Unwind_Reason_Code unwind_phase2 unw_get_reg(cursor, UNW_REG_SP, &sp); if (unw_get_proc_info(cursor, &frameInfo) != UNW_ESUCCESS) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_get_proc_info " - "failed => _URC_FATAL_PHASE1_ERROR\n", + "failed => _URC_FATAL_PHASE2_ERROR\n", static_cast(exception_object)); return _URC_FATAL_PHASE2_ERROR; } Modified: user/alc/PG_CACHED/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c ============================================================================== --- user/alc/PG_CACHED/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c Tue Aug 9 23:47:40 2016 (r303898) @@ -116,6 +116,61 @@ timer_signal_create(clockid_t cid, bool ATF_REQUIRE(timer_delete(t) == 0); } +#ifdef __FreeBSD__ +static void +timer_callback(union sigval value) +{ + timer_t *tp; + + tp = value.sival_ptr; + + if (*tp == t) + fail = false; +} + +static void +timer_thread_create(clockid_t cid, bool expire) +{ + struct itimerspec tim; + struct sigevent evt; + + t = 0; + fail = true; + + (void)memset(&evt, 0, sizeof(struct sigevent)); + (void)memset(&tim, 0, sizeof(struct itimerspec)); + + /* + * Create the timer (SIGEV_THREAD). + */ + evt.sigev_notify_function = timer_callback; + evt.sigev_value.sival_ptr = &t; + evt.sigev_notify = SIGEV_THREAD; + + ATF_REQUIRE(timer_create(cid, &evt, &t) == 0); + + /* + * Start the timer. + */ + tim.it_value.tv_sec = expire ? 5 : 1; + tim.it_value.tv_nsec = 0; + + ATF_REQUIRE(timer_settime(t, 0, &tim, NULL) == 0); + + (void)sleep(2); + + if (expire) { + if (!fail) + atf_tc_fail("timer fired too soon"); + } else { + if (fail) + atf_tc_fail("timer failed to fire"); + } + + ATF_REQUIRE(timer_delete(t) == 0); +} +#endif + ATF_TC(timer_create_err); ATF_TC_HEAD(timer_create_err, tc) { @@ -198,6 +253,64 @@ ATF_TC_BODY(timer_create_mono_expire, tc timer_signal_create(CLOCK_MONOTONIC, true); } +ATF_TC(timer_thread_create_real); +ATF_TC_HEAD(timer_thread_create_real, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks timer_create(2) with CLOCK_REALTIME and sigevent(3), " + "SIGEV_THREAD"); +} + +#ifdef __FreeBSD__ +ATF_TC_BODY(timer_thread_create_real, tc) +{ + timer_thread_create(CLOCK_REALTIME, false); +} + +ATF_TC(timer_thread_create_mono); +ATF_TC_HEAD(timer_thread_create_mono, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks timer_create(2) with CLOCK_MONOTONIC and sigevent(3), " + "SIGEV_THREAD"); +} + +ATF_TC_BODY(timer_thread_create_mono, tc) +{ + timer_thread_create(CLOCK_MONOTONIC, false); +} + +ATF_TC(timer_thread_create_real_expire); +ATF_TC_HEAD(timer_thread_create_real_expire, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks timer_create(2) with CLOCK_REALTIME and sigevent(3), " + "SIGEV_THREAD, with expiration"); +} + +ATF_TC_BODY(timer_thread_create_real_expire, tc) +{ + timer_thread_create(CLOCK_REALTIME, true); +} + +ATF_TC(timer_thread_create_mono_expire); +ATF_TC_HEAD(timer_thread_create_mono_expire, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks timer_create(2) with CLOCK_MONOTONIC and sigevent(3), " + "SIGEV_THREAD, with expiration"); +} + +ATF_TC_BODY(timer_thread_create_mono_expire, tc) +{ + timer_thread_create(CLOCK_MONOTONIC, true); +} +#endif + ATF_TP_ADD_TCS(tp) { @@ -206,6 +319,12 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, timer_create_mono); ATF_TP_ADD_TC(tp, timer_create_real_expire); ATF_TP_ADD_TC(tp, timer_create_mono_expire); +#ifdef __FreeBSD__ + ATF_TP_ADD_TC(tp, timer_thread_create_real); + ATF_TP_ADD_TC(tp, timer_thread_create_mono); + ATF_TP_ADD_TC(tp, timer_thread_create_real_expire); + ATF_TP_ADD_TC(tp, timer_thread_create_mono_expire); +#endif return atf_no_error(); } Modified: user/alc/PG_CACHED/contrib/ofed/usr.lib/libibverbs/config.h ============================================================================== --- user/alc/PG_CACHED/contrib/ofed/usr.lib/libibverbs/config.h Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/contrib/ofed/usr.lib/libibverbs/config.h Tue Aug 9 23:47:40 2016 (r303898) @@ -1,2 +1 @@ -#define _WITH_GETLINE #include Modified: user/alc/PG_CACHED/crypto/openssh/FREEBSD-upgrade ============================================================================== --- user/alc/PG_CACHED/crypto/openssh/FREEBSD-upgrade Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/crypto/openssh/FREEBSD-upgrade Tue Aug 9 23:47:40 2016 (r303898) @@ -142,30 +142,25 @@ Support for TCP wrappers was removed in upstream 6.7p1. We've added it back by porting the 6.6p1 code forward. -6) DSA keys - - DSA keys were disabled by default in upstream 6.9p1. We've added - them back. - -7) Agent client reference counting +6) Agent client reference counting We've added code to ssh-agent.c to implement client reference counting; the agent will automatically exit when the last client disconnects. -8) Class-based login restrictions +7) Class-based login restrictions We've added code to auth2.c to enforce the host.allow, host.deny, times.allow and times.deny login class capabilities. -9) HPN +8) HPN We no longer have the HPN patches (adaptive buffer size for increased throughput on high-BxD links), but we recognize and ignore HPN-related configuration options to avoid breaking existing configurations. -A) AES-CBC +9) AES-CBC The AES-CBC ciphers were removed from the server-side proposal list in 6.7p1 due to theoretical weaknesses and the availability of Modified: user/alc/PG_CACHED/crypto/openssh/config.h ============================================================================== --- user/alc/PG_CACHED/crypto/openssh/config.h Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/crypto/openssh/config.h Tue Aug 9 23:47:40 2016 (r303898) @@ -1701,7 +1701,7 @@ /* #undef WITH_SELINUX */ /* include SSH protocol version 1 support */ -#define WITH_SSH1 1 +/* #undef WITH_SSH1 */ /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ Modified: user/alc/PG_CACHED/crypto/openssh/configure.ac ============================================================================== --- user/alc/PG_CACHED/crypto/openssh/configure.ac Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/crypto/openssh/configure.ac Tue Aug 9 23:47:40 2016 (r303898) @@ -123,7 +123,7 @@ AC_CHECK_DECL([PR_SET_NO_NEW_PRIVS], [ha ]) openssl=yes -ssh1=yes +ssh1=no AC_ARG_WITH([openssl], [ --without-openssl Disable use of OpenSSL; use only limited internal crypto **EXPERIMENTAL** ], [ if test "x$withval" = "xno" ; then Modified: user/alc/PG_CACHED/crypto/openssh/myproposal.h ============================================================================== --- user/alc/PG_CACHED/crypto/openssh/myproposal.h Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/crypto/openssh/myproposal.h Tue Aug 9 23:47:40 2016 (r303898) @@ -100,13 +100,11 @@ HOSTKEY_ECDSA_CERT_METHODS \ "ssh-ed25519-cert-v01@openssh.com," \ "ssh-rsa-cert-v01@openssh.com," \ - "ssh-dss-cert-v01@openssh.com," \ HOSTKEY_ECDSA_METHODS \ "ssh-ed25519," \ "rsa-sha2-512," \ "rsa-sha2-256," \ - "ssh-rsa," \ - "ssh-dss" + "ssh-rsa" /* the actual algorithms */ Modified: user/alc/PG_CACHED/crypto/openssh/servconf.c ============================================================================== --- user/alc/PG_CACHED/crypto/openssh/servconf.c Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/crypto/openssh/servconf.c Tue Aug 9 23:47:40 2016 (r303898) @@ -22,6 +22,7 @@ __RCSID("$FreeBSD$"); #include #include +#include #include #include #include @@ -206,26 +207,28 @@ fill_default_server_options(ServerOption /* Standard Options */ if (options->protocol == SSH_PROTO_UNKNOWN) options->protocol = SSH_PROTO_2; - if (options->protocol & SSH_PROTO_1) - error("WARNING: SSH protocol version 1 enabled"); +#define add_host_key_file(path) \ + do { \ + if (access((path), O_RDONLY) == 0) \ + options->host_key_files \ + [options->num_host_key_files++] = (path); \ + } while (0) if (options->num_host_key_files == 0) { /* fill default hostkeys for protocols */ if (options->protocol & SSH_PROTO_1) - options->host_key_files[options->num_host_key_files++] = - _PATH_HOST_KEY_FILE; + add_host_key_file(_PATH_HOST_KEY_FILE); if (options->protocol & SSH_PROTO_2) { - options->host_key_files[options->num_host_key_files++] = - _PATH_HOST_RSA_KEY_FILE; - options->host_key_files[options->num_host_key_files++] = - _PATH_HOST_DSA_KEY_FILE; + add_host_key_file(_PATH_HOST_RSA_KEY_FILE); + add_host_key_file(_PATH_HOST_DSA_KEY_FILE); #ifdef OPENSSL_HAS_ECC - options->host_key_files[options->num_host_key_files++] = - _PATH_HOST_ECDSA_KEY_FILE; + add_host_key_file(_PATH_HOST_ECDSA_KEY_FILE); #endif - options->host_key_files[options->num_host_key_files++] = - _PATH_HOST_ED25519_KEY_FILE; + add_host_key_file(_PATH_HOST_ED25519_KEY_FILE); } } +#undef add_host_key_file + if (options->num_host_key_files == 0) + fatal("No host key files found"); /* No certificates by default */ if (options->num_ports == 0) options->ports[options->num_ports++] = SSH_DEFAULT_PORT; Modified: user/alc/PG_CACHED/crypto/openssh/ssh_config.5 ============================================================================== --- user/alc/PG_CACHED/crypto/openssh/ssh_config.5 Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/crypto/openssh/ssh_config.5 Tue Aug 9 23:47:40 2016 (r303898) @@ -871,10 +871,8 @@ ecdsa-sha2-nistp384-cert-v01@openssh.com ecdsa-sha2-nistp521-cert-v01@openssh.com, ssh-ed25519-cert-v01@openssh.com, ssh-rsa-cert-v01@openssh.com, -ssh-dss-cert-v01@openssh.com, -ecdsa-sha2-nistp256,ecdsa-sha2-nistp384, -ecdsa-sha2-nistp521,ssh-ed25519, -ssh-rsa,ssh-dss +ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, +ssh-ed25519,ssh-rsa .Ed .Pp The @@ -896,10 +894,8 @@ ecdsa-sha2-nistp384-cert-v01@openssh.com ecdsa-sha2-nistp521-cert-v01@openssh.com, ssh-ed25519-cert-v01@openssh.com, ssh-rsa-cert-v01@openssh.com, -ssh-dss-cert-v01@openssh.com, -ecdsa-sha2-nistp256,ecdsa-sha2-nistp384, -ecdsa-sha2-nistp521,ssh-ed25519, -ssh-rsa,ssh-dss +ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, +ssh-ed25519,ssh-rsa .Ed .Pp If hostkeys are known for the destination host then this default is modified @@ -1336,10 +1332,8 @@ ecdsa-sha2-nistp384-cert-v01@openssh.com ecdsa-sha2-nistp521-cert-v01@openssh.com, ssh-ed25519-cert-v01@openssh.com, ssh-rsa-cert-v01@openssh.com, -ssh-dss-cert-v01@openssh.com, -ecdsa-sha2-nistp256,ecdsa-sha2-nistp384, -ecdsa-sha2-nistp521,ssh-ed25519, -ssh-rsa,ssh-dss +ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, +ssh-ed25519,ssh-rsa .Ed .Pp The Modified: user/alc/PG_CACHED/crypto/openssh/sshd_config.5 ============================================================================== --- user/alc/PG_CACHED/crypto/openssh/sshd_config.5 Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/crypto/openssh/sshd_config.5 Tue Aug 9 23:47:40 2016 (r303898) @@ -659,10 +659,8 @@ ecdsa-sha2-nistp384-cert-v01@openssh.com ecdsa-sha2-nistp521-cert-v01@openssh.com, ssh-ed25519-cert-v01@openssh.com, ssh-rsa-cert-v01@openssh.com, -ssh-dss-cert-v01@openssh.com, -ecdsa-sha2-nistp256,ecdsa-sha2-nistp384, -ecdsa-sha2-nistp521,ssh-ed25519, -ssh-rsa,ssh-dss +ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, +ssh-ed25519,ssh-rsa .Ed .Pp The @@ -753,10 +751,8 @@ ecdsa-sha2-nistp384-cert-v01@openssh.com ecdsa-sha2-nistp521-cert-v01@openssh.com, ssh-ed25519-cert-v01@openssh.com, ssh-rsa-cert-v01@openssh.com, -ssh-dss-cert-v01@openssh.com, -ecdsa-sha2-nistp256,ecdsa-sha2-nistp384, -ecdsa-sha2-nistp521,ssh-ed25519, -ssh-rsa,ssh-dss +ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, +ssh-ed25519,ssh-rsa .Ed .Pp The list of available key types may also be obtained using the @@ -1372,10 +1368,8 @@ ecdsa-sha2-nistp384-cert-v01@openssh.com ecdsa-sha2-nistp521-cert-v01@openssh.com, ssh-ed25519-cert-v01@openssh.com, ssh-rsa-cert-v01@openssh.com, -ssh-dss-cert-v01@openssh.com, -ecdsa-sha2-nistp256,ecdsa-sha2-nistp384, -ecdsa-sha2-nistp521,ssh-ed25519, -ssh-rsa,ssh-dss +ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, +ssh-ed25519,ssh-rsa .Ed .Pp The Modified: user/alc/PG_CACHED/etc/rc.d/sshd ============================================================================== --- user/alc/PG_CACHED/etc/rc.d/sshd Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/etc/rc.d/sshd Tue Aug 9 23:47:40 2016 (r303898) @@ -23,7 +23,7 @@ extra_commands="configtest keygen reload : ${sshd_rsa1_enable:="no"} : ${sshd_rsa_enable:="yes"} -: ${sshd_dsa_enable:="yes"} +: ${sshd_dsa_enable:="no"} : ${sshd_ecdsa_enable:="yes"} : ${sshd_ed25519_enable:="yes"} Modified: user/alc/PG_CACHED/include/grp.h ============================================================================== --- user/alc/PG_CACHED/include/grp.h Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/include/grp.h Tue Aug 9 23:47:40 2016 (r303898) @@ -75,8 +75,7 @@ int pwcache_groupdb(int (*)(int), void struct group * (*)(gid_t)); #endif #if __XSI_VISIBLE -/* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */ -int setgrent(void); +void setgrent(void); #endif #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE int getgrgid_r(gid_t, struct group *, char *, size_t, Modified: user/alc/PG_CACHED/include/stdio.h ============================================================================== --- user/alc/PG_CACHED/include/stdio.h Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/include/stdio.h Tue Aug 9 23:47:40 2016 (r303898) @@ -357,44 +357,9 @@ ssize_t getdelim(char ** __restrict, si FILE *open_memstream(char **, size_t *); int renameat(int, const char *, int, const char *); int vdprintf(int, const char * __restrict, __va_list); - -/* - * Every programmer and his dog wrote functions called getline() and dprintf() - * before POSIX.1-2008 came along and decided to usurp the names, so we - * don't prototype them by default unless one of the following is true: - * a) the app has requested them specifically by defining _WITH_GETLINE or - * _WITH_DPRINTF, respectively - * b) the app has requested a POSIX.1-2008 environment via _POSIX_C_SOURCE - * c) the app defines a GNUism such as _BSD_SOURCE or _GNU_SOURCE - */ -#ifndef _WITH_GETLINE -#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) -#define _WITH_GETLINE -#elif defined(_POSIX_C_SOURCE) -#if _POSIX_C_SOURCE >= 200809 -#define _WITH_GETLINE -#endif -#endif -#endif - -#ifdef _WITH_GETLINE +/* _WITH_GETLINE to allow pre 11 sources to build on 11+ systems */ ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); -#endif - -#ifndef _WITH_DPRINTF -#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) -#define _WITH_DPRINTF -#elif defined(_POSIX_C_SOURCE) -#if _POSIX_C_SOURCE >= 200809 -#define _WITH_DPRINTF -#endif -#endif -#endif - -#ifdef _WITH_DPRINTF -int (dprintf)(int, const char * __restrict, ...); -#endif - +int dprintf(int, const char * __restrict, ...); #endif /* __POSIX_VISIBLE >= 200809 */ /* Modified: user/alc/PG_CACHED/include/xlocale/_locale.h ============================================================================== --- user/alc/PG_CACHED/include/xlocale/_locale.h Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/include/xlocale/_locale.h Tue Aug 9 23:47:40 2016 (r303898) @@ -48,7 +48,7 @@ typedef struct _xlocale *locale_t; #endif locale_t duplocale(locale_t base); -int freelocale(locale_t loc); +void freelocale(locale_t loc); locale_t newlocale(int mask, const char *locale, locale_t base); const char *querylocale(int mask, locale_t loc); locale_t uselocale(locale_t loc); Modified: user/alc/PG_CACHED/lib/libc/Versions.def ============================================================================== --- user/alc/PG_CACHED/lib/libc/Versions.def Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/lib/libc/Versions.def Tue Aug 9 23:47:40 2016 (r303898) @@ -27,6 +27,10 @@ FBSD_1.3 { FBSD_1.4 { } FBSD_1.3; +# This version was first added to 12.0-current. +FBSD_1.5 { +} FBSD_1.4; + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries @@ -35,4 +39,4 @@ FBSD_1.4 { # # Please do NOT increment the version of this namespace. FBSDprivate_1.0 { -} FBSD_1.4; +} FBSD_1.5; Modified: user/alc/PG_CACHED/lib/libc/gen/Makefile.inc ============================================================================== --- user/alc/PG_CACHED/lib/libc/gen/Makefile.inc Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/lib/libc/gen/Makefile.inc Tue Aug 9 23:47:40 2016 (r303898) @@ -390,6 +390,7 @@ MLINKS+=getgrent.3 endgrent.3 \ getgrent.3 getgrgid_r.3 MLINKS+=gethostname.3 sethostname.3 MLINKS+=getnetgrent.3 endnetgrent.3 \ + getnetgrent.3 getnetgrent_r.3 \ getnetgrent.3 innetgr.3 \ getnetgrent.3 setnetgrent.3 MLINKS+=getprogname.3 setprogname.3 Modified: user/alc/PG_CACHED/lib/libc/gen/clock_getcpuclockid.3 ============================================================================== --- user/alc/PG_CACHED/lib/libc/gen/clock_getcpuclockid.3 Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/lib/libc/gen/clock_getcpuclockid.3 Tue Aug 9 23:47:40 2016 (r303898) @@ -70,7 +70,9 @@ Upon successful completion, returns zero; otherwise, an error number is returned to indicate the error. .Sh ERRORS -The clock_getcpuclockid() function will fail if: +The +.Fn clock_getcpuclockid +function will fail if: .Bl -tag -width Er .It Bq Er EPERM The requesting process does not have permission to access the CPU-time @@ -84,7 +86,7 @@ No process can be found corresponding to .Sh STANDARDS The .Fn clock_getcpuclockid -function conform to +function conforms to .St -p1003.1-2001 . .Sh HISTORY The Modified: user/alc/PG_CACHED/lib/libc/gen/getgrent.3 ============================================================================== --- user/alc/PG_CACHED/lib/libc/gen/getgrent.3 Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/lib/libc/gen/getgrent.3 Tue Aug 9 23:47:40 2016 (r303898) @@ -28,7 +28,7 @@ .\" From: @(#)getgrent.3 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd April 16, 2003 +.Dd July 31, 2016 .Dt GETGRENT 3 .Os .Sh NAME @@ -60,7 +60,7 @@ .Fn getgrgid_r "gid_t gid" "struct group *grp" "char *buffer" "size_t bufsize" "struct group **result" .Ft int .Fn setgroupent "int stayopen" -.Ft int +.Ft void .Fn setgrent void .Ft void .Fn endgrent void @@ -188,14 +188,13 @@ is set to .Dv NULL and the return value is 0, no matching entry exists.) .Pp -The functions +The function .Fn setgroupent -and -.Fn setgrent -return the value 1 if successful, otherwise the value +returns the value 1 if successful, otherwise the value 0 is returned. The functions -.Fn endgrent +.Fn endgrent , +.Fn setgrent and .Fn setgrfile have no return value. Modified: user/alc/PG_CACHED/lib/libc/gen/getgrent.c ============================================================================== --- user/alc/PG_CACHED/lib/libc/gen/getgrent.c Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/lib/libc/gen/getgrent.c Tue Aug 9 23:47:40 2016 (r303898) @@ -533,12 +533,10 @@ out: return (rv); } -/* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */ -int +void setgrent(void) { (void)_nsdispatch(NULL, setgrent_dtab, NSDB_GROUP, "setgrent", defaultsrc, 0); - return (1); } Modified: user/alc/PG_CACHED/lib/libc/gen/glob.3 ============================================================================== --- user/alc/PG_CACHED/lib/libc/gen/glob.3 Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/lib/libc/gen/glob.3 Tue Aug 9 23:47:40 2016 (r303898) @@ -363,7 +363,7 @@ file .It Dv GLOB_NOSPACE An attempt to allocate memory failed, or if .Fa errno -was 0 +was E2BIG, .Dv GLOB_LIMIT was specified in the flags and .Fa pglob\->gl_matchc Modified: user/alc/PG_CACHED/lib/libc/gen/glob.c ============================================================================== --- user/alc/PG_CACHED/lib/libc/gen/glob.c Tue Aug 9 22:48:46 2016 (r303897) +++ user/alc/PG_CACHED/lib/libc/gen/glob.c Tue Aug 9 23:47:40 2016 (r303898) @@ -177,6 +177,8 @@ static int globexp2(const Char *, const static int globfinal(glob_t *, struct glob_limit *, size_t, const char *); static int match(Char *, Char *, Char *); +static int err_nomatch(glob_t *, struct glob_limit *, const char *); +static int err_aborted(glob_t *, int, char *); #ifdef DEBUG static void qprintf(const char *, Char *); #endif @@ -217,8 +219,7 @@ glob(const char * __restrict pattern, in while (bufnext <= bufend) { clen = mbrtowc(&wc, patnext, MB_LEN_MAX, &mbs); if (clen == (size_t)-1 || clen == (size_t)-2) - return (globfinal(pglob, &limit, - pglob->gl_pathc, pattern)); + return (err_nomatch(pglob, &limit, pattern)); else if (clen == 0) { too_long = 0; break; @@ -240,8 +241,7 @@ glob(const char * __restrict pattern, in prot = 0; clen = mbrtowc(&wc, patnext, MB_LEN_MAX, &mbs); if (clen == (size_t)-1 || clen == (size_t)-2) - return (globfinal(pglob, &limit, - pglob->gl_pathc, pattern)); + return (err_nomatch(pglob, &limit, pattern)); else if (clen == 0) { too_long = 0; break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Thu Aug 11 13:54:19 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 237F5BB5B85 for ; Thu, 11 Aug 2016 13:54:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F18701987; Thu, 11 Aug 2016 13:54:18 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7BDsIYq020416; Thu, 11 Aug 2016 13:54:18 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7BDsHM2020410; Thu, 11 Aug 2016 13:54:17 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201608111354.u7BDsHM2020410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 11 Aug 2016 13:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r303960 - in user/cperciva/freebsd-update-build: patches/11.0-BETA3 patches/11.0-BETA4 scripts/11.0-BETA3 scripts/11.0-BETA3/amd64 scripts/11.0-BETA3/i386 scripts/11.0-BETA4 scripts/11.... X-SVN-Group: user 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.22 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, 11 Aug 2016 13:54:19 -0000 Author: glebius Date: Thu Aug 11 13:54:17 2016 New Revision: 303960 URL: https://svnweb.freebsd.org/changeset/base/303960 Log: Add configuration of BETA3 and BETA4. Added: user/cperciva/freebsd-update-build/patches/11.0-BETA3/ user/cperciva/freebsd-update-build/patches/11.0-BETA4/ user/cperciva/freebsd-update-build/scripts/11.0-BETA3/ user/cperciva/freebsd-update-build/scripts/11.0-BETA3/amd64/ user/cperciva/freebsd-update-build/scripts/11.0-BETA3/amd64/build.conf (contents, props changed) user/cperciva/freebsd-update-build/scripts/11.0-BETA3/build.subr user/cperciva/freebsd-update-build/scripts/11.0-BETA3/i386/ user/cperciva/freebsd-update-build/scripts/11.0-BETA3/i386/build.conf (contents, props changed) user/cperciva/freebsd-update-build/scripts/11.0-BETA4/ user/cperciva/freebsd-update-build/scripts/11.0-BETA4/amd64/ user/cperciva/freebsd-update-build/scripts/11.0-BETA4/amd64/build.conf (contents, props changed) user/cperciva/freebsd-update-build/scripts/11.0-BETA4/build.subr user/cperciva/freebsd-update-build/scripts/11.0-BETA4/i386/ user/cperciva/freebsd-update-build/scripts/11.0-BETA4/i386/build.conf (contents, props changed) Added: user/cperciva/freebsd-update-build/scripts/11.0-BETA3/amd64/build.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/scripts/11.0-BETA3/amd64/build.conf Thu Aug 11 13:54:17 2016 (r303960) @@ -0,0 +1,10 @@ +export RELH=7e46946d800ceea6b22ae4703f952bb111ccec8a1ee987450cd0b11d38f729a83c26bfdd00675146e68bb0382b19b3fe70273c14b5fa964fe5d41010bf6eaec4 +export FTP=https://people.freebsd.org/~gjb/11.0-BETA3/ + +# Components of the world, source, and kernels +export WORLDPARTS="base base-dbg doc lib32 lib32-dbg" +export SOURCEPARTS="src" +export KERNELPARTS="kernel kernel-dbg" + +# EOL date +export EOL=1473983999 Added: user/cperciva/freebsd-update-build/scripts/11.0-BETA3/build.subr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/scripts/11.0-BETA3/build.subr Thu Aug 11 13:54:17 2016 (r303960) @@ -0,0 +1,26 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 11.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the dvd1 ISO image is + RELNUM=${REL%-*} + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-dvd1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha512 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} Added: user/cperciva/freebsd-update-build/scripts/11.0-BETA3/i386/build.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/scripts/11.0-BETA3/i386/build.conf Thu Aug 11 13:54:17 2016 (r303960) @@ -0,0 +1,10 @@ +export RELH=5ee26f49edf7957a11e758687199d9931d2878b8f17132c06ca6fe87871a51f676e37f58a8b42965182a81400a5e7acae1cb4f05d321fc2ed51dd3c1819f8197 +export FTP=https://people.freebsd.org/~gjb/11.0-BETA3/ + +# Components of the world, source, and kernels +export WORLDPARTS="base base-dbg doc" +export SOURCEPARTS="src" +export KERNELPARTS="kernel kernel-dbg" + +# EOL date +export EOL=1473983999 Added: user/cperciva/freebsd-update-build/scripts/11.0-BETA4/amd64/build.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/scripts/11.0-BETA4/amd64/build.conf Thu Aug 11 13:54:17 2016 (r303960) @@ -0,0 +1,10 @@ +export RELH=deadc6daa6aa2bae25846c96bbd0e477608095a8c14f6b1835953341094ff495362f2d211a64f0157c1aa1cafd1b6f8a6ab25f66e2eb001701803b5f666ceaa9 +export FTP=https://people.freebsd.org/~gjb/11.0-BETA4/ + +# Components of the world, source, and kernels +export WORLDPARTS="base base-dbg doc lib32 lib32-dbg" +export SOURCEPARTS="src" +export KERNELPARTS="kernel kernel-dbg" + +# EOL date +export EOL=1474588799 Added: user/cperciva/freebsd-update-build/scripts/11.0-BETA4/build.subr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/scripts/11.0-BETA4/build.subr Thu Aug 11 13:54:17 2016 (r303960) @@ -0,0 +1,26 @@ +# Overrides to FreeBSD Update build subroutines for FreeBSD 11.0. + +# Download and verify a release ISO image. +fetchiso () { + log "Starting fetch" + + # Figure out where the dvd1 ISO image is + RELNUM=${REL%-*} + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-dvd1.iso + + # Fetch the ISO image. We consider the ISO image to be + # the One True Release and don't look at the files used + # for FTP installs. The FreeBSD 4.7-RELEASE ISO and FTP + # files were not identical, but this should never happen + # again. + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + + log "Verifying dvd1 hash" + + # Check that the downloaded ISO has the correct hash. + if ! [ "`sha512 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then + echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash." + rm ${WORKDIR}/iso.img + return 1 + fi +} Added: user/cperciva/freebsd-update-build/scripts/11.0-BETA4/i386/build.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/scripts/11.0-BETA4/i386/build.conf Thu Aug 11 13:54:17 2016 (r303960) @@ -0,0 +1,10 @@ +export RELH=8a466c3cb416247042db76ad17c71354e5c032de78476e5008d626693cffca4686325e86332b09031e691f5f3ae9c448ea1e7cc36c2c05679257aa0e92cf78a0 +export FTP=https://people.freebsd.org/~gjb/11.0-BETA4/ + +# Components of the world, source, and kernels +export WORLDPARTS="base base-dbg doc" +export SOURCEPARTS="src" +export KERNELPARTS="kernel kernel-dbg" + +# EOL date +export EOL=1474588799 From owner-svn-src-user@freebsd.org Thu Aug 11 18:13:50 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C202BB615A for ; Thu, 11 Aug 2016 18:13:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E2141BBF; Thu, 11 Aug 2016 18:13:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7BIDm2t019731; Thu, 11 Aug 2016 18:13:48 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7BIDmtt019722; Thu, 11 Aug 2016 18:13:48 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201608111813.u7BIDmtt019722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 11 Aug 2016 18:13:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r303965 - user/cperciva/freebsd-update-build/patches/10.3-RELEASE X-SVN-Group: user 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.22 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, 11 Aug 2016 18:13:50 -0000 Author: glebius Date: Thu Aug 11 18:13:48 2016 New Revision: 303965 URL: https://svnweb.freebsd.org/changeset/base/303965 Log: Add a bunch of ENs from Microsoft for the 10.3-RELEASE. Added: user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:10.dhclient user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:11.vmbus user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:12.hv_storvsc user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:13.vmbus user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:14.hv_storvsc user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:15.vmbus user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:16.hv_storvsc Added: user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:10.dhclient ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:10.dhclient Thu Aug 11 18:13:48 2016 (r303965) @@ -0,0 +1,39 @@ +Index: sbin/dhclient/dhclient.c +=================================================================== +--- sbin/dhclient/dhclient.c (revision 302284) ++++ sbin/dhclient/dhclient.c (working copy) +@@ -2277,6 +2277,17 @@ script_set_env(struct client_state *clie + { + int i, j, namelen; + ++ /* No `` or $() command substitution allowed in environment values! */ ++ for (j=0; j < strlen(value); j++) ++ switch (value[j]) { ++ case '`': ++ case '$': ++ warning("illegal character (%c) in value '%s'", ++ value[j], value); ++ /* Ignore this option */ ++ return; ++ } ++ + namelen = strlen(name); + + for (i = 0; client->scriptEnv[i]; i++) +@@ -2313,16 +2324,6 @@ script_set_env(struct client_state *clie + strlen(value) + 1); + if (client->scriptEnv[i] == NULL) + error("script_set_env: no memory for variable assignment"); +- +- /* No `` or $() command substitution allowed in environment values! */ +- for (j=0; j < strlen(value); j++) +- switch (value[j]) { +- case '`': +- case '$': +- error("illegal character (%c) in value '%s'", value[j], +- value); +- /* not reached */ +- } + snprintf(client->scriptEnv[i], strlen(prefix) + strlen(name) + + 1 + strlen(value) + 1, "%s%s=%s", prefix, name, value); + } Added: user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:11.vmbus ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:11.vmbus Thu Aug 11 18:13:48 2016 (r303965) @@ -0,0 +1,218 @@ +--- sys/dev/hyperv/vmbus/hv_channel.c.orig ++++ sys/dev/hyperv/vmbus/hv_channel.c +@@ -180,12 +180,12 @@ + if (user_data_len) + memcpy(open_msg->user_data, user_data, user_data_len); + +- mtx_lock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_lock(&hv_vmbus_g_connection.channel_msg_lock); + TAILQ_INSERT_TAIL( + &hv_vmbus_g_connection.channel_msg_anchor, + open_info, + msg_list_entry); +- mtx_unlock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock); + + ret = hv_vmbus_post_message( + open_msg, sizeof(hv_vmbus_channel_open_channel)); +@@ -212,12 +212,12 @@ + } + + cleanup: +- mtx_lock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_lock(&hv_vmbus_g_connection.channel_msg_lock); + TAILQ_REMOVE( + &hv_vmbus_g_connection.channel_msg_anchor, + open_info, + msg_list_entry); +- mtx_unlock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock); + sema_destroy(&open_info->wait_sema); + free(open_info, M_DEVBUF); + +@@ -401,13 +401,13 @@ + gpadl_msg->child_rel_id = channel->offer_msg.child_rel_id; + gpadl_msg->gpadl = next_gpadl_handle; + +- mtx_lock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_lock(&hv_vmbus_g_connection.channel_msg_lock); + TAILQ_INSERT_TAIL( + &hv_vmbus_g_connection.channel_msg_anchor, + msg_info, + msg_list_entry); + +- mtx_unlock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock); + + ret = hv_vmbus_post_message( + gpadl_msg, +@@ -446,10 +446,10 @@ + + cleanup: + +- mtx_lock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_lock(&hv_vmbus_g_connection.channel_msg_lock); + TAILQ_REMOVE(&hv_vmbus_g_connection.channel_msg_anchor, + msg_info, msg_list_entry); +- mtx_unlock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock); + + sema_destroy(&msg_info->wait_sema); + free(msg_info, M_DEVBUF); +@@ -488,10 +488,10 @@ + msg->child_rel_id = channel->offer_msg.child_rel_id; + msg->gpadl = gpadl_handle; + +- mtx_lock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_lock(&hv_vmbus_g_connection.channel_msg_lock); + TAILQ_INSERT_TAIL(&hv_vmbus_g_connection.channel_msg_anchor, + info, msg_list_entry); +- mtx_unlock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock); + + ret = hv_vmbus_post_message(msg, + sizeof(hv_vmbus_channel_gpadl_teardown)); +@@ -504,10 +504,10 @@ + /* + * Received a torndown response + */ +- mtx_lock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_lock(&hv_vmbus_g_connection.channel_msg_lock); + TAILQ_REMOVE(&hv_vmbus_g_connection.channel_msg_anchor, + info, msg_list_entry); +- mtx_unlock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock); + sema_destroy(&info->wait_sema); + free(info, M_DEVBUF); + +--- sys/dev/hyperv/vmbus/hv_channel_mgmt.c.orig ++++ sys/dev/hyperv/vmbus/hv_channel_mgmt.c +@@ -567,7 +567,7 @@ + /* + * Find the open msg, copy the result and signal/unblock the wait event + */ +- mtx_lock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_lock(&hv_vmbus_g_connection.channel_msg_lock); + + TAILQ_FOREACH(msg_info, &hv_vmbus_g_connection.channel_msg_anchor, + msg_list_entry) { +@@ -585,7 +585,7 @@ + } + } + } +- mtx_unlock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock); + + } + +@@ -609,7 +609,7 @@ + /* Find the establish msg, copy the result and signal/unblock + * the wait event + */ +- mtx_lock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_lock(&hv_vmbus_g_connection.channel_msg_lock); + TAILQ_FOREACH(msg_info, &hv_vmbus_g_connection.channel_msg_anchor, + msg_list_entry) { + request_header = (hv_vmbus_channel_msg_header*) msg_info->msg; +@@ -628,7 +628,7 @@ + } + } + } +- mtx_unlock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock); + } + + /** +@@ -653,7 +653,7 @@ + * wait event. + */ + +- mtx_lock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_lock(&hv_vmbus_g_connection.channel_msg_lock); + + TAILQ_FOREACH(msg_info, &hv_vmbus_g_connection.channel_msg_anchor, + msg_list_entry) { +@@ -673,7 +673,7 @@ + } + } + } +- mtx_unlock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock); + } + + /** +@@ -693,7 +693,7 @@ + + versionResponse = (hv_vmbus_channel_version_response*)hdr; + +- mtx_lock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_lock(&hv_vmbus_g_connection.channel_msg_lock); + TAILQ_FOREACH(msg_info, &hv_vmbus_g_connection.channel_msg_anchor, + msg_list_entry) { + requestHeader = (hv_vmbus_channel_msg_header*) msg_info->msg; +@@ -707,7 +707,7 @@ + sema_post(&msg_info->wait_sema); + } + } +- mtx_unlock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock); + + } + +--- sys/dev/hyperv/vmbus/hv_connection.c.orig ++++ sys/dev/hyperv/vmbus/hv_connection.c +@@ -101,26 +101,26 @@ + * Add to list before we send the request since we may receive the + * response before returning from this routine + */ +- mtx_lock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_lock(&hv_vmbus_g_connection.channel_msg_lock); + + TAILQ_INSERT_TAIL( + &hv_vmbus_g_connection.channel_msg_anchor, + msg_info, + msg_list_entry); + +- mtx_unlock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock); + + ret = hv_vmbus_post_message( + msg, + sizeof(hv_vmbus_channel_initiate_contact)); + + if (ret != 0) { +- mtx_lock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_lock(&hv_vmbus_g_connection.channel_msg_lock); + TAILQ_REMOVE( + &hv_vmbus_g_connection.channel_msg_anchor, + msg_info, + msg_list_entry); +- mtx_unlock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock); + return (ret); + } + +@@ -129,12 +129,12 @@ + */ + ret = sema_timedwait(&msg_info->wait_sema, 5 * hz); /* KYS 5 seconds */ + +- mtx_lock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_lock(&hv_vmbus_g_connection.channel_msg_lock); + TAILQ_REMOVE( + &hv_vmbus_g_connection.channel_msg_anchor, + msg_info, + msg_list_entry); +- mtx_unlock_spin(&hv_vmbus_g_connection.channel_msg_lock); ++ mtx_unlock(&hv_vmbus_g_connection.channel_msg_lock); + + /** + * Check if successful +@@ -173,7 +173,7 @@ + + TAILQ_INIT(&hv_vmbus_g_connection.channel_msg_anchor); + mtx_init(&hv_vmbus_g_connection.channel_msg_lock, "vmbus channel msg", +- NULL, MTX_SPIN); ++ NULL, MTX_DEF); + + TAILQ_INIT(&hv_vmbus_g_connection.channel_anchor); + mtx_init(&hv_vmbus_g_connection.channel_lock, "vmbus channel", Added: user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:12.hv_storvsc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:12.hv_storvsc Thu Aug 11 18:13:48 2016 (r303965) @@ -0,0 +1,205 @@ +--- sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c.orig ++++ sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c +@@ -81,12 +81,6 @@ + #define BLKVSC_MAX_IO_REQUESTS STORVSC_MAX_IO_REQUESTS + #define STORVSC_MAX_TARGETS (2) + +-#define STORVSC_WIN7_MAJOR 4 +-#define STORVSC_WIN7_MINOR 2 +- +-#define STORVSC_WIN8_MAJOR 5 +-#define STORVSC_WIN8_MINOR 1 +- + #define VSTOR_PKT_SIZE (sizeof(struct vstor_packet) - vmscsi_size_delta) + + #define HV_ALIGN(x, a) roundup2(x, a) +@@ -208,7 +202,7 @@ + * Sense buffer size changed in win8; have a run-time + * variable to track the size we should use. + */ +-static int sense_buffer_size; ++static int sense_buffer_size = PRE_WIN8_STORVSC_SENSE_BUFFER_SIZE; + + /* + * The size of the vmscsi_request has changed in win8. The +@@ -218,9 +212,46 @@ + * Track the correct size we need to apply. + */ + static int vmscsi_size_delta; ++/* ++ * The storage protocol version is determined during the ++ * initial exchange with the host. It will indicate which ++ * storage functionality is available in the host. ++*/ ++static int vmstor_proto_version; ++ ++struct vmstor_proto { ++ int proto_version; ++ int sense_buffer_size; ++ int vmscsi_size_delta; ++}; + +-static int storvsc_current_major; +-static int storvsc_current_minor; ++static const struct vmstor_proto vmstor_proto_list[] = { ++ { ++ VMSTOR_PROTOCOL_VERSION_WIN10, ++ POST_WIN7_STORVSC_SENSE_BUFFER_SIZE, ++ 0 ++ }, ++ { ++ VMSTOR_PROTOCOL_VERSION_WIN8_1, ++ POST_WIN7_STORVSC_SENSE_BUFFER_SIZE, ++ 0 ++ }, ++ { ++ VMSTOR_PROTOCOL_VERSION_WIN8, ++ POST_WIN7_STORVSC_SENSE_BUFFER_SIZE, ++ 0 ++ }, ++ { ++ VMSTOR_PROTOCOL_VERSION_WIN7, ++ PRE_WIN8_STORVSC_SENSE_BUFFER_SIZE, ++ sizeof(struct vmscsi_win8_extension), ++ }, ++ { ++ VMSTOR_PROTOCOL_VERSION_WIN6, ++ PRE_WIN8_STORVSC_SENSE_BUFFER_SIZE, ++ sizeof(struct vmscsi_win8_extension), ++ } ++}; + + /* static functions */ + static int storvsc_probe(device_t dev); +@@ -435,7 +466,7 @@ + static int + hv_storvsc_channel_init(struct hv_device *dev) + { +- int ret = 0; ++ int ret = 0, i; + struct hv_storvsc_request *request; + struct vstor_packet *vstor_packet; + struct storvsc_softc *sc; +@@ -484,19 +515,20 @@ + goto cleanup; + } + +- /* reuse the packet for version range supported */ ++ for (i = 0; i < nitems(vmstor_proto_list); i++) { ++ /* reuse the packet for version range supported */ + +- memset(vstor_packet, 0, sizeof(struct vstor_packet)); +- vstor_packet->operation = VSTOR_OPERATION_QUERYPROTOCOLVERSION; +- vstor_packet->flags = REQUEST_COMPLETION_FLAG; ++ memset(vstor_packet, 0, sizeof(struct vstor_packet)); ++ vstor_packet->operation = VSTOR_OPERATION_QUERYPROTOCOLVERSION; ++ vstor_packet->flags = REQUEST_COMPLETION_FLAG; + +- vstor_packet->u.version.major_minor = +- VMSTOR_PROTOCOL_VERSION(storvsc_current_major, storvsc_current_minor); ++ vstor_packet->u.version.major_minor = ++ vmstor_proto_list[i].proto_version; + +- /* revision is only significant for Windows guests */ +- vstor_packet->u.version.revision = 0; ++ /* revision is only significant for Windows guests */ ++ vstor_packet->u.version.revision = 0; + +- ret = hv_vmbus_channel_send_packet( ++ ret = hv_vmbus_channel_send_packet( + dev->channel, + vstor_packet, + VSTOR_PKT_SIZE, +@@ -504,20 +536,34 @@ + HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, + HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); + +- if (ret != 0) +- goto cleanup; ++ if (ret != 0) ++ goto cleanup; + +- /* wait 5 seconds */ +- ret = sema_timedwait(&request->synch_sema, 5 * hz); ++ /* wait 5 seconds */ ++ ret = sema_timedwait(&request->synch_sema, 5 * hz); + +- if (ret) +- goto cleanup; ++ if (ret) ++ goto cleanup; + +- /* TODO: Check returned version */ +- if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || +- vstor_packet->status != 0) +- goto cleanup; ++ if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO) { ++ ret = EINVAL; ++ goto cleanup; ++ } ++ if (vstor_packet->status == 0) { ++ vmstor_proto_version = ++ vmstor_proto_list[i].proto_version; ++ sense_buffer_size = ++ vmstor_proto_list[i].sense_buffer_size; ++ vmscsi_size_delta = ++ vmstor_proto_list[i].vmscsi_size_delta; ++ break; ++ } ++ } + ++ if (vstor_packet->status != 0) { ++ ret = EINVAL; ++ goto cleanup; ++ } + /** + * Query channel properties + */ +@@ -916,19 +962,6 @@ + int ata_disk_enable = 0; + int ret = ENXIO; + +- if (hv_vmbus_protocal_version == HV_VMBUS_VERSION_WS2008 || +- hv_vmbus_protocal_version == HV_VMBUS_VERSION_WIN7) { +- sense_buffer_size = PRE_WIN8_STORVSC_SENSE_BUFFER_SIZE; +- vmscsi_size_delta = sizeof(struct vmscsi_win8_extension); +- storvsc_current_major = STORVSC_WIN7_MAJOR; +- storvsc_current_minor = STORVSC_WIN7_MINOR; +- } else { +- sense_buffer_size = POST_WIN7_STORVSC_SENSE_BUFFER_SIZE; +- vmscsi_size_delta = 0; +- storvsc_current_major = STORVSC_WIN8_MAJOR; +- storvsc_current_minor = STORVSC_WIN8_MINOR; +- } +- + switch (storvsc_get_storage_type(dev)) { + case DRIVER_BLKVSC: + if(bootverbose) +@@ -2064,6 +2097,13 @@ + ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? + csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes); + if (cmd->opcode == INQUIRY && ++ /* ++ * XXX: Temporary work around disk hot plugin on win2k12r2, ++ * only filtering the invalid disk on win10 or 2016 server. ++ * So, the hot plugin on win10 and 2016 server needs ++ * to be fixed. ++ */ ++ vmstor_proto_version == VMSTOR_PROTOCOL_VERSION_WIN10 && + is_inquiry_valid( + (const struct scsi_inquiry_data *)csio->data_ptr) == 0) { + ccb->ccb_h.status |= CAM_DEV_NOT_THERE; +--- sys/dev/hyperv/storvsc/hv_vstorage.h.orig ++++ sys/dev/hyperv/storvsc/hv_vstorage.h +@@ -41,6 +41,11 @@ + #define VMSTOR_PROTOCOL_VERSION(MAJOR_, MINOR_) ((((MAJOR_) & 0xff) << 8) | \ + (((MINOR_) & 0xff) )) + ++#define VMSTOR_PROTOCOL_VERSION_WIN6 VMSTOR_PROTOCOL_VERSION(2, 0) ++#define VMSTOR_PROTOCOL_VERSION_WIN7 VMSTOR_PROTOCOL_VERSION(4, 2) ++#define VMSTOR_PROTOCOL_VERSION_WIN8 VMSTOR_PROTOCOL_VERSION(5, 1) ++#define VMSTOR_PROTOCOL_VERSION_WIN8_1 VMSTOR_PROTOCOL_VERSION(6, 0) ++#define VMSTOR_PROTOCOL_VERSION_WIN10 VMSTOR_PROTOCOL_VERSION(6, 2) + /* + * Invalid version. + */ Added: user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:13.vmbus ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:13.vmbus Thu Aug 11 18:13:48 2016 (r303965) @@ -0,0 +1,155 @@ +--- sys/dev/hyperv/vmbus/hv_hv.c.orig ++++ sys/dev/hyperv/vmbus/hv_hv.c +@@ -33,6 +33,7 @@ + __FBSDID("$FreeBSD$"); + + #include ++#include + #include + #include + #include +@@ -50,6 +51,9 @@ + + static u_int hv_get_timecount(struct timecounter *tc); + ++u_int hyperv_features; ++u_int hyperv_recommends; ++ + /** + * Globals + */ +@@ -211,8 +215,6 @@ + + hv_vmbus_g_context.hypercall_page = virt_addr; + +- tc_init(&hv_timecounter); /* register virtual timecount */ +- + hv_et_init(); + + return (0); +@@ -427,3 +429,93 @@ + wrmsr(HV_X64_MSR_SIEFP, siefp.as_uint64_t); + } + ++static bool ++hyperv_identify(void) ++{ ++ u_int regs[4]; ++ unsigned int maxLeaf; ++ unsigned int op; ++ ++ if (vm_guest != VM_GUEST_HV) ++ return (false); ++ ++ op = HV_CPU_ID_FUNCTION_HV_VENDOR_AND_MAX_FUNCTION; ++ do_cpuid(op, regs); ++ maxLeaf = regs[0]; ++ if (maxLeaf < HV_CPU_ID_FUNCTION_MS_HV_IMPLEMENTATION_LIMITS) ++ return (false); ++ ++ op = HV_CPU_ID_FUNCTION_HV_INTERFACE; ++ do_cpuid(op, regs); ++ if (regs[0] != 0x31237648 /* HV#1 */) ++ return (false); ++ ++ op = HV_CPU_ID_FUNCTION_MS_HV_FEATURES; ++ do_cpuid(op, regs); ++ if ((regs[0] & HV_FEATURE_MSR_HYPERCALL) == 0) { ++ /* ++ * Hyper-V w/o Hypercall is impossible; someone ++ * is faking Hyper-V. ++ */ ++ return (false); ++ } ++ hyperv_features = regs[0]; ++ ++ op = HV_CPU_ID_FUNCTION_MS_HV_VERSION; ++ do_cpuid(op, regs); ++ printf("Hyper-V Version: %d.%d.%d [SP%d]\n", ++ regs[1] >> 16, regs[1] & 0xffff, regs[0], regs[2]); ++ ++ printf(" Features: 0x%b\n", hyperv_features, ++ "\020" ++ "\001VPRUNTIME" ++ "\002TMREFCNT" ++ "\003SYNCIC" ++ "\004SYNCTM" ++ "\005APIC" ++ "\006HYERCALL" ++ "\007VPINDEX" ++ "\010RESET" ++ "\011STATS" ++ "\012REFTSC" ++ "\013IDLE" ++ "\014TMFREQ" ++ "\015DEBUG"); ++ ++ op = HV_CPU_ID_FUNCTION_MS_HV_ENLIGHTENMENT_INFORMATION; ++ do_cpuid(op, regs); ++ hyperv_recommends = regs[0]; ++ if (bootverbose) ++ printf(" Recommends: %08x %08x\n", regs[0], regs[1]); ++ ++ op = HV_CPU_ID_FUNCTION_MS_HV_IMPLEMENTATION_LIMITS; ++ do_cpuid(op, regs); ++ if (bootverbose) { ++ printf(" Limits: Vcpu:%d Lcpu:%d Int:%d\n", ++ regs[0], regs[1], regs[2]); ++ } ++ ++ if (maxLeaf >= HV_CPU_ID_FUNCTION_MS_HV_HARDWARE_FEATURE) { ++ op = HV_CPU_ID_FUNCTION_MS_HV_HARDWARE_FEATURE; ++ do_cpuid(op, regs); ++ if (bootverbose) { ++ printf(" HW Features: %08x AMD: %08x\n", ++ regs[0], regs[3]); ++ } ++ } ++ ++ return (true); ++} ++ ++static void ++hyperv_init(void *dummy __unused) ++{ ++ if (!hyperv_identify()) ++ return; ++ ++ if (hyperv_features & HV_FEATURE_MSR_TIME_REFCNT) { ++ /* Register virtual timecount */ ++ tc_init(&hv_timecounter); ++ } ++} ++SYSINIT(hyperv_initialize, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, hyperv_init, NULL); +--- sys/dev/hyperv/vmbus/hv_vmbus_priv.h.orig ++++ sys/dev/hyperv/vmbus/hv_vmbus_priv.h +@@ -471,10 +471,17 @@ + HV_CPU_ID_FUNCTION_MS_HV_VERSION = 0x40000002, + HV_CPU_ID_FUNCTION_MS_HV_FEATURES = 0x40000003, + HV_CPU_ID_FUNCTION_MS_HV_ENLIGHTENMENT_INFORMATION = 0x40000004, +- HV_CPU_ID_FUNCTION_MS_HV_IMPLEMENTATION_LIMITS = 0x40000005 +- ++ HV_CPU_ID_FUNCTION_MS_HV_IMPLEMENTATION_LIMITS = 0x40000005, ++ HV_CPU_ID_FUNCTION_MS_HV_HARDWARE_FEATURE = 0x40000006 + } hv_vmbus_cpuid_function; + ++#define HV_FEATURE_MSR_TIME_REFCNT (1 << 1) ++#define HV_FEATURE_MSR_SYNCIC (1 << 2) ++#define HV_FEATURE_MSR_STIMER (1 << 3) ++#define HV_FEATURE_MSR_APIC (1 << 4) ++#define HV_FEATURE_MSR_HYPERCALL (1 << 5) ++#define HV_FEATURE_MSR_GUEST_IDLE (1 << 10) ++ + /* + * Define the format of the SIMP register + */ +@@ -628,6 +635,9 @@ + extern hv_vmbus_context hv_vmbus_g_context; + extern hv_vmbus_connection hv_vmbus_g_connection; + ++extern u_int hyperv_features; ++extern u_int hyperv_recommends; ++ + typedef void (*vmbus_msg_handler)(hv_vmbus_channel_msg_header *msg); + + typedef struct hv_vmbus_channel_msg_table_entry { Added: user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:14.hv_storvsc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:14.hv_storvsc Thu Aug 11 18:13:48 2016 (r303965) @@ -0,0 +1,50 @@ +--- sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c.orig ++++ sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c +@@ -1273,6 +1273,7 @@ + } + #endif /* HVS_TIMEOUT_TEST */ + ++#ifdef notyet + /** + * @brief timeout handler for requests + * +@@ -1320,6 +1321,7 @@ + storvsc_timeout_test(reqp, MODE_SELECT_10, 1); + #endif + } ++#endif + + /** + * @brief StorVSC device poll function +@@ -1472,6 +1474,7 @@ + return; + } + ++#ifdef notyet + if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) { + callout_init(&reqp->callout, CALLOUT_MPSAFE); + callout_reset_sbt(&reqp->callout, +@@ -1491,6 +1494,7 @@ + } + #endif /* HVS_TIMEOUT_TEST */ + } ++#endif + + if ((res = hv_storvsc_io_request(sc->hs_dev, reqp)) != 0) { + xpt_print(ccb->ccb_h.path, +@@ -2039,6 +2043,7 @@ + mtx_unlock(&sc->hs_lock); + } + ++#ifdef notyet + /* + * callout_drain() will wait for the timer handler to finish + * if it is running. So we don't need any lock to synchronize +@@ -2049,6 +2054,7 @@ + if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) { + callout_drain(&reqp->callout); + } ++#endif + + ccb->ccb_h.status &= ~CAM_SIM_QUEUED; + ccb->ccb_h.status &= ~CAM_STATUS_MASK; Added: user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:15.vmbus ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:15.vmbus Thu Aug 11 18:13:48 2016 (r303965) @@ -0,0 +1,68 @@ +--- sys/dev/hyperv/vmbus/hv_connection.c.orig ++++ sys/dev/hyperv/vmbus/hv_connection.c +@@ -476,31 +476,35 @@ + /** + * Send a msg on the vmbus's message connection + */ +-int hv_vmbus_post_message(void *buffer, size_t bufferLen) { +- int ret = 0; ++int hv_vmbus_post_message(void *buffer, size_t bufferLen) ++{ + hv_vmbus_connection_id connId; +- unsigned retries = 0; +- +- /* NetScaler delays from previous code were consolidated here */ +- static int delayAmount[] = {100, 100, 100, 500, 500, 5000, 5000, 5000}; +- +- /* for(each entry in delayAmount) try to post message, +- * delay a little bit before retrying ++ sbintime_t time = SBT_1MS; ++ int retries; ++ int ret; ++ ++ connId.as_uint32_t = 0; ++ connId.u.id = HV_VMBUS_MESSAGE_CONNECTION_ID; ++ ++ /* ++ * We retry to cope with transient failures caused by host side's ++ * insufficient resources. 20 times should suffice in practice. + */ +- for (retries = 0; +- retries < sizeof(delayAmount)/sizeof(delayAmount[0]); retries++) { +- connId.as_uint32_t = 0; +- connId.u.id = HV_VMBUS_MESSAGE_CONNECTION_ID; +- ret = hv_vmbus_post_msg_via_msg_ipc(connId, 1, buffer, bufferLen); +- if (ret != HV_STATUS_INSUFFICIENT_BUFFERS) +- break; +- /* TODO: KYS We should use a blocking wait call */ +- DELAY(delayAmount[retries]); ++ for (retries = 0; retries < 20; retries++) { ++ ret = hv_vmbus_post_msg_via_msg_ipc(connId, 1, buffer, ++ bufferLen); ++ if (ret == HV_STATUS_SUCCESS) ++ return (0); ++ ++ pause_sbt("pstmsg", time, 0, C_HARDCLOCK); ++ if (time < SBT_1S * 2) ++ time *= 2; + } + +- KASSERT(ret == 0, ("Error VMBUS: Message Post Failed\n")); ++ KASSERT(ret == HV_STATUS_SUCCESS, ++ ("Error VMBUS: Message Post Failed, ret=%d\n", ret)); + +- return (ret); ++ return (EAGAIN); + } + + /** +--- sys/dev/hyperv/vmbus/hv_vmbus_priv.h.orig ++++ sys/dev/hyperv/vmbus/hv_vmbus_priv.h +@@ -70,6 +70,7 @@ + * You did not supply enough message buffers to send a message. + */ + ++#define HV_STATUS_SUCCESS ((uint16_t)0) + #define HV_STATUS_INSUFFICIENT_BUFFERS ((uint16_t)0x0013) + + typedef void (*hv_vmbus_channel_callback)(void *context); Added: user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:16.hv_storvsc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/10.3-RELEASE/7-EN-16:16.hv_storvsc Thu Aug 11 18:13:48 2016 (r303965) @@ -0,0 +1,165 @@ +--- sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c.orig ++++ sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c +@@ -805,6 +805,13 @@ + + vm_srb = &vstor_packet->u.vm_srb; + ++ /* ++ * Copy some fields of the host's response into the request structure, ++ * because the fields will be used later in storvsc_io_done(). ++ */ ++ request->vstor_packet.u.vm_srb.scsi_status = vm_srb->scsi_status; ++ request->vstor_packet.u.vm_srb.transfer_len = vm_srb->transfer_len; ++ + if (((vm_srb->scsi_status & 0xFF) == SCSI_STATUS_CHECK_COND) && + (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID)) { + /* Autosense data available */ +@@ -1939,62 +1946,24 @@ + } + + /* +- * Modified based on scsi_print_inquiry which is responsible to +- * print the detail information for scsi_inquiry_data. +- * ++ * SCSI Inquiry checks qualifier and type. ++ * If qualifier is 011b, means the device server is not capable ++ * of supporting a peripheral device on this logical unit, and ++ * the type should be set to 1Fh. ++ * + * Return 1 if it is valid, 0 otherwise. + */ + static inline int + is_inquiry_valid(const struct scsi_inquiry_data *inq_data) + { + uint8_t type; +- char vendor[16], product[48], revision[16]; +- +- /* +- * Check device type and qualifier +- */ +- if (!(SID_QUAL_IS_VENDOR_UNIQUE(inq_data) || +- SID_QUAL(inq_data) == SID_QUAL_LU_CONNECTED)) ++ if (SID_QUAL(inq_data) != SID_QUAL_LU_CONNECTED) { + return (0); +- ++ } + type = SID_TYPE(inq_data); +- switch (type) { +- case T_DIRECT: +- case T_SEQUENTIAL: +- case T_PRINTER: +- case T_PROCESSOR: +- case T_WORM: +- case T_CDROM: +- case T_SCANNER: +- case T_OPTICAL: +- case T_CHANGER: +- case T_COMM: +- case T_STORARRAY: +- case T_ENCLOSURE: +- case T_RBC: +- case T_OCRW: +- case T_OSD: +- case T_ADC: +- break; +- case T_NODEVICE: +- default: ++ if (type == T_NODEVICE) { + return (0); + } +- +- /* +- * Check vendor, product, and revision +- */ +- cam_strvis(vendor, inq_data->vendor, sizeof(inq_data->vendor), +- sizeof(vendor)); +- cam_strvis(product, inq_data->product, sizeof(inq_data->product), +- sizeof(product)); +- cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision), +- sizeof(revision)); +- if (strlen(vendor) == 0 || +- strlen(product) == 0 || +- strlen(revision) == 0) +- return (0); +- + return (1); + } + +@@ -2071,7 +2040,6 @@ + ccb->ccb_h.status &= ~CAM_STATUS_MASK; + if (vm_srb->scsi_status == SCSI_STATUS_OK) { + const struct scsi_generic *cmd; +- + /* + * Check whether the data for INQUIRY cmd is valid or + * not. Windows 10 and Windows 2016 send all zero +@@ -2080,23 +2048,59 @@ + cmd = (const struct scsi_generic *) + ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? + csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes); +- if (cmd->opcode == INQUIRY && +- /* +- * XXX: Temporary work around disk hot plugin on win2k12r2, +- * only filtering the invalid disk on win10 or 2016 server. +- * So, the hot plugin on win10 and 2016 server needs +- * to be fixed. ++ if (cmd->opcode == INQUIRY) { ++ /* ++ * The host of Windows 10 or 2016 server will response ++ * the inquiry request with invalid data for unexisted device: ++ [0x7f 0x0 0x5 0x2 0x1f ... ] ++ * But on windows 2012 R2, the response is: ++ [0x7f 0x0 0x0 0x0 0x0 ] ++ * That is why here wants to validate the inquiry response. ++ * The validation will skip the INQUIRY whose response is short, ++ * which is less than SHORT_INQUIRY_LENGTH (36). ++ * ++ * For more information about INQUIRY, please refer to: ++ * ftp://ftp.avc-pioneer.com/Mtfuji_7/Proposal/Jun09/INQUIRY.pdf + */ +- vmstor_proto_version == VMSTOR_PROTOCOL_VERSION_WIN10 && +- is_inquiry_valid( +- (const struct scsi_inquiry_data *)csio->data_ptr) == 0) { ++ const struct scsi_inquiry_data *inq_data = ++ (const struct scsi_inquiry_data *)csio->data_ptr; ++ uint8_t* resp_buf = (uint8_t*)csio->data_ptr; ++ /* Get the buffer length reported by host */ ++ int resp_xfer_len = vm_srb->transfer_len; ++ /* Get the available buffer length */ ++ int resp_buf_len = resp_xfer_len >= 5 ? resp_buf[4] + 5 : 0; ++ int data_len = (resp_buf_len < resp_xfer_len) ? resp_buf_len : resp_xfer_len; ++ if (data_len < SHORT_INQUIRY_LENGTH) { ++ ccb->ccb_h.status |= CAM_REQ_CMP; ++ if (bootverbose && data_len >= 5) { ++ mtx_lock(&sc->hs_lock); ++ xpt_print(ccb->ccb_h.path, ++ "storvsc skips the validation for short inquiry (%d)" ++ " [%x %x %x %x %x]\n", ++ data_len,resp_buf[0],resp_buf[1],resp_buf[2], ++ resp_buf[3],resp_buf[4]); ++ mtx_unlock(&sc->hs_lock); ++ } ++ } else if (is_inquiry_valid(inq_data) == 0) { + ccb->ccb_h.status |= CAM_DEV_NOT_THERE; ++ if (bootverbose && data_len >= 5) { ++ mtx_lock(&sc->hs_lock); ++ xpt_print(ccb->ccb_h.path, ++ "storvsc uninstalled invalid device" ++ " [%x %x %x %x %x]\n", ++ resp_buf[0],resp_buf[1],resp_buf[2],resp_buf[3],resp_buf[4]); ++ mtx_unlock(&sc->hs_lock); ++ } ++ } else { ++ ccb->ccb_h.status |= CAM_REQ_CMP; + if (bootverbose) { + mtx_lock(&sc->hs_lock); + xpt_print(ccb->ccb_h.path, +- "storvsc uninstalled device\n"); ++ "storvsc has passed inquiry response (%d) validation\n", ++ data_len); + mtx_unlock(&sc->hs_lock); + } ++ } + } else { + ccb->ccb_h.status |= CAM_REQ_CMP; + } From owner-svn-src-user@freebsd.org Thu Aug 11 20:07:46 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DA2FBB6314 for ; Thu, 11 Aug 2016 20:07:46 +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 mx1.freebsd.org (Postfix) with ESMTPS id D5D3015D0; Thu, 11 Aug 2016 20:07:45 +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 u7BK7jT6061199; Thu, 11 Aug 2016 20:07:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7BK7gnu061175; Thu, 11 Aug 2016 20:07:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201608112007.u7BK7gnu061175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 11 Aug 2016 20:07:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r303968 - in user/alc/PQ_LAUNDRY: . cddl/usr.sbin/dtrace/tests/common/raise cddl/usr.sbin/dtrace/tests/common/safety cddl/usr.sbin/dtrace/tests/tools etc/rc.d include lib/libc/rpc lib/l... X-SVN-Group: user 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.22 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, 11 Aug 2016 20:07:46 -0000 Author: markj Date: Thu Aug 11 20:07:42 2016 New Revision: 303968 URL: https://svnweb.freebsd.org/changeset/base/303968 Log: MFH r303967 Added: user/alc/PQ_LAUNDRY/sys/compat/cloudabi/cloudabi_vdso.c - copied unchanged from r303967, head/sys/compat/cloudabi/cloudabi_vdso.c user/alc/PQ_LAUNDRY/sys/compat/cloudabi64/cloudabi64_vdso.lds.s - copied unchanged from r303967, head/sys/compat/cloudabi64/cloudabi64_vdso.lds.s user/alc/PQ_LAUNDRY/sys/dev/hyperv/include/vmbus_xact.h - copied unchanged from r303967, head/sys/dev/hyperv/include/vmbus_xact.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/if_hnreg.h - copied unchanged from r303967, head/sys/dev/hyperv/netvsc/if_hnreg.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/if_hnvar.h - copied unchanged from r303967, head/sys/dev/hyperv/netvsc/if_hnvar.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/vmbus_xact.c - copied unchanged from r303967, head/sys/dev/hyperv/vmbus/vmbus_xact.c user/alc/PQ_LAUNDRY/sys/riscv/include/sbi.h - copied unchanged from r303967, head/sys/riscv/include/sbi.h user/alc/PQ_LAUNDRY/sys/riscv/riscv/riscv_console.c - copied unchanged from r303967, head/sys/riscv/riscv/riscv_console.c user/alc/PQ_LAUNDRY/sys/riscv/riscv/sbi.S - copied unchanged from r303967, head/sys/riscv/riscv/sbi.S user/alc/PQ_LAUNDRY/tools/tools/dmardump/ - copied from r303967, head/tools/tools/dmardump/ Deleted: user/alc/PQ_LAUNDRY/lib/libc/sys/kse.2 user/alc/PQ_LAUNDRY/sys/riscv/htif/ user/alc/PQ_LAUNDRY/usr.bin/kdump/linux32_syscalls.conf user/alc/PQ_LAUNDRY/usr.bin/kdump/linux_syscalls.conf user/alc/PQ_LAUNDRY/usr.bin/truss/makesyscallsconf.sh Modified: user/alc/PQ_LAUNDRY/Makefile.inc1 user/alc/PQ_LAUNDRY/cddl/usr.sbin/dtrace/tests/common/raise/Makefile user/alc/PQ_LAUNDRY/cddl/usr.sbin/dtrace/tests/common/safety/Makefile user/alc/PQ_LAUNDRY/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh user/alc/PQ_LAUNDRY/etc/rc.d/jail user/alc/PQ_LAUNDRY/include/unistd.h user/alc/PQ_LAUNDRY/lib/libc/rpc/svc_vc.c user/alc/PQ_LAUNDRY/lib/libcrypt/Makefile user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-md5.c user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-nthash.c user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-sha256.c user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-sha512.c user/alc/PQ_LAUNDRY/lib/libcrypt/crypt.3 user/alc/PQ_LAUNDRY/lib/libcrypt/crypt.c user/alc/PQ_LAUNDRY/lib/libcrypt/crypt.h user/alc/PQ_LAUNDRY/lib/libcrypt/misc.c user/alc/PQ_LAUNDRY/lib/libpcap/pcap-netmap.c user/alc/PQ_LAUNDRY/release/release.sh user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw2.c user/alc/PQ_LAUNDRY/secure/lib/libcrypt/crypt-blowfish.c user/alc/PQ_LAUNDRY/secure/lib/libcrypt/crypt-des.c user/alc/PQ_LAUNDRY/share/man/man4/pci.4 user/alc/PQ_LAUNDRY/share/mk/bsd.README user/alc/PQ_LAUNDRY/share/mk/bsd.progs.mk user/alc/PQ_LAUNDRY/sys/amd64/amd64/pmap.c user/alc/PQ_LAUNDRY/sys/amd64/amd64/trap.c user/alc/PQ_LAUNDRY/sys/amd64/cloudabi64/cloudabi64_sysvec.c user/alc/PQ_LAUNDRY/sys/arm/broadcom/bcm2835/bcm2835_vcio.c user/alc/PQ_LAUNDRY/sys/arm/xscale/ixp425/avila_ata.c user/alc/PQ_LAUNDRY/sys/arm/xscale/pxa/pxa_smi.c user/alc/PQ_LAUNDRY/sys/arm/xscale/pxa/pxa_space.c user/alc/PQ_LAUNDRY/sys/arm64/arm64/pmap.c user/alc/PQ_LAUNDRY/sys/arm64/arm64/vm_machdep.c user/alc/PQ_LAUNDRY/sys/arm64/cloudabi64/cloudabi64_sysvec.c user/alc/PQ_LAUNDRY/sys/boot/fdt/dts/riscv/qemu.dts user/alc/PQ_LAUNDRY/sys/boot/fdt/dts/riscv/rocket.dts user/alc/PQ_LAUNDRY/sys/boot/fdt/dts/riscv/spike.dts user/alc/PQ_LAUNDRY/sys/boot/i386/btx/btxldr/btxldr.S user/alc/PQ_LAUNDRY/sys/boot/i386/libi386/smbios.c user/alc/PQ_LAUNDRY/sys/boot/i386/zfsboot/zfsboot.c user/alc/PQ_LAUNDRY/sys/cam/ata/ata_all.c user/alc/PQ_LAUNDRY/sys/cam/scsi/scsi_all.c user/alc/PQ_LAUNDRY/sys/cam/scsi/scsi_da.c user/alc/PQ_LAUNDRY/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c user/alc/PQ_LAUNDRY/sys/compat/cloudabi/cloudabi_util.h user/alc/PQ_LAUNDRY/sys/compat/cloudabi64/cloudabi64_module.c user/alc/PQ_LAUNDRY/sys/conf/files user/alc/PQ_LAUNDRY/sys/conf/files.amd64 user/alc/PQ_LAUNDRY/sys/conf/files.arm64 user/alc/PQ_LAUNDRY/sys/conf/files.i386 user/alc/PQ_LAUNDRY/sys/conf/files.riscv user/alc/PQ_LAUNDRY/sys/conf/ldscript.riscv user/alc/PQ_LAUNDRY/sys/contrib/ncsw/user/env/xx.c user/alc/PQ_LAUNDRY/sys/contrib/octeon-sdk/cvmx-twsi.c user/alc/PQ_LAUNDRY/sys/dev/aic7xxx/aic7xxx_osm.c user/alc/PQ_LAUNDRY/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c user/alc/PQ_LAUNDRY/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c user/alc/PQ_LAUNDRY/sys/dev/auxio/auxio.c user/alc/PQ_LAUNDRY/sys/dev/bktr/bktr_os.c user/alc/PQ_LAUNDRY/sys/dev/bktr/bktr_reg.h user/alc/PQ_LAUNDRY/sys/dev/bxe/bxe.c user/alc/PQ_LAUNDRY/sys/dev/cxgbe/adapter.h user/alc/PQ_LAUNDRY/sys/dev/cxgbe/t4_sge.c user/alc/PQ_LAUNDRY/sys/dev/e1000/e1000_osdep.h user/alc/PQ_LAUNDRY/sys/dev/e1000/if_em.h user/alc/PQ_LAUNDRY/sys/dev/e1000/if_igb.h user/alc/PQ_LAUNDRY/sys/dev/e1000/if_lem.h user/alc/PQ_LAUNDRY/sys/dev/etherswitch/ip17x/ip17x.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/include/vmbus.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_rndis_filter.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_rndis_filter.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/vmbus.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/vmbus_var.h user/alc/PQ_LAUNDRY/sys/dev/ixgb/if_ixgb.h user/alc/PQ_LAUNDRY/sys/dev/ixgb/if_ixgb_osdep.h user/alc/PQ_LAUNDRY/sys/dev/ixgbe/ixgbe.h user/alc/PQ_LAUNDRY/sys/dev/ixl/i40e_osdep.h user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl.h user/alc/PQ_LAUNDRY/sys/dev/ixl/ixl_pf.h user/alc/PQ_LAUNDRY/sys/dev/ixl/ixlv.h user/alc/PQ_LAUNDRY/sys/dev/mlx5/mlx5_en/mlx5_en_main.c user/alc/PQ_LAUNDRY/sys/dev/mpt/mpt_pci.c user/alc/PQ_LAUNDRY/sys/dev/msk/if_msk.c user/alc/PQ_LAUNDRY/sys/dev/nand/nand_generic.c user/alc/PQ_LAUNDRY/sys/dev/nand/nandsim_chip.c user/alc/PQ_LAUNDRY/sys/dev/netmap/netmap_mem2.c user/alc/PQ_LAUNDRY/sys/dev/ofw/openfirmio.c user/alc/PQ_LAUNDRY/sys/dev/ofw/openpromio.c user/alc/PQ_LAUNDRY/sys/dev/pci/pci_user.c user/alc/PQ_LAUNDRY/sys/dev/pci/pcivar.h user/alc/PQ_LAUNDRY/sys/dev/sound/sbus/cs4231.c user/alc/PQ_LAUNDRY/sys/dev/tpm/tpm.c user/alc/PQ_LAUNDRY/sys/dev/tws/tws.c user/alc/PQ_LAUNDRY/sys/dev/usb/controller/ehci_ixp4xx.c user/alc/PQ_LAUNDRY/sys/fs/autofs/autofs_vnops.c user/alc/PQ_LAUNDRY/sys/fs/smbfs/smbfs_node.c user/alc/PQ_LAUNDRY/sys/fs/tmpfs/tmpfs_subr.c user/alc/PQ_LAUNDRY/sys/fs/unionfs/union_vnops.c user/alc/PQ_LAUNDRY/sys/i386/i386/trap.c user/alc/PQ_LAUNDRY/sys/kern/kern_descrip.c user/alc/PQ_LAUNDRY/sys/kern/kern_kthread.c user/alc/PQ_LAUNDRY/sys/kern/kern_ktrace.c user/alc/PQ_LAUNDRY/sys/kern/kern_timeout.c user/alc/PQ_LAUNDRY/sys/kern/subr_bus.c user/alc/PQ_LAUNDRY/sys/kern/vfs_bio.c user/alc/PQ_LAUNDRY/sys/kern/vfs_cluster.c user/alc/PQ_LAUNDRY/sys/kern/vfs_default.c user/alc/PQ_LAUNDRY/sys/kern/vfs_lookup.c user/alc/PQ_LAUNDRY/sys/kern/vfs_mount.c user/alc/PQ_LAUNDRY/sys/kern/vfs_subr.c user/alc/PQ_LAUNDRY/sys/mips/nlm/dev/net/xlpge.c user/alc/PQ_LAUNDRY/sys/mips/rmi/dev/nlge/if_nlge.c user/alc/PQ_LAUNDRY/sys/modules/cloudabi/Makefile user/alc/PQ_LAUNDRY/sys/modules/cloudabi64/Makefile user/alc/PQ_LAUNDRY/sys/modules/hyperv/vmbus/Makefile user/alc/PQ_LAUNDRY/sys/net80211/ieee80211_crypto_wep.c user/alc/PQ_LAUNDRY/sys/netinet/ip_fw.h user/alc/PQ_LAUNDRY/sys/netinet/sctp_indata.c user/alc/PQ_LAUNDRY/sys/netpfil/ipfw/ip_fw2.c user/alc/PQ_LAUNDRY/sys/netpfil/ipfw/ip_fw_sockopt.c user/alc/PQ_LAUNDRY/sys/powerpc/powerpc/busdma_machdep.c user/alc/PQ_LAUNDRY/sys/riscv/conf/GENERIC user/alc/PQ_LAUNDRY/sys/riscv/conf/QEMU user/alc/PQ_LAUNDRY/sys/riscv/conf/ROCKET user/alc/PQ_LAUNDRY/sys/riscv/conf/SPIKE user/alc/PQ_LAUNDRY/sys/riscv/include/cpufunc.h user/alc/PQ_LAUNDRY/sys/riscv/include/pcpu.h user/alc/PQ_LAUNDRY/sys/riscv/include/riscvreg.h user/alc/PQ_LAUNDRY/sys/riscv/include/vmparam.h user/alc/PQ_LAUNDRY/sys/riscv/riscv/exception.S user/alc/PQ_LAUNDRY/sys/riscv/riscv/genassym.c user/alc/PQ_LAUNDRY/sys/riscv/riscv/identcpu.c user/alc/PQ_LAUNDRY/sys/riscv/riscv/intr_machdep.c user/alc/PQ_LAUNDRY/sys/riscv/riscv/locore.S user/alc/PQ_LAUNDRY/sys/riscv/riscv/machdep.c user/alc/PQ_LAUNDRY/sys/riscv/riscv/mp_machdep.c user/alc/PQ_LAUNDRY/sys/riscv/riscv/pmap.c user/alc/PQ_LAUNDRY/sys/riscv/riscv/timer.c user/alc/PQ_LAUNDRY/sys/riscv/riscv/vm_machdep.c user/alc/PQ_LAUNDRY/sys/sparc64/fhc/clkbrd.c user/alc/PQ_LAUNDRY/sys/sparc64/pci/fire.c user/alc/PQ_LAUNDRY/sys/sys/buf.h user/alc/PQ_LAUNDRY/sys/sys/rman.h user/alc/PQ_LAUNDRY/sys/sys/vnode.h user/alc/PQ_LAUNDRY/sys/tools/embed_mfs.sh user/alc/PQ_LAUNDRY/sys/ufs/ffs/ffs_snapshot.c user/alc/PQ_LAUNDRY/sys/ufs/ffs/ffs_vnops.c user/alc/PQ_LAUNDRY/sys/ufs/ufs/ufs_lookup.c user/alc/PQ_LAUNDRY/sys/ufs/ufs/ufs_quota.c user/alc/PQ_LAUNDRY/sys/vm/vm_object.c user/alc/PQ_LAUNDRY/sys/x86/cpufreq/powernow.c user/alc/PQ_LAUNDRY/sys/x86/iommu/intel_reg.h user/alc/PQ_LAUNDRY/usr.bin/truss/syscalls.c user/alc/PQ_LAUNDRY/usr.bin/xinstall/xinstall.c user/alc/PQ_LAUNDRY/usr.sbin/ancontrol/ancontrol.c user/alc/PQ_LAUNDRY/usr.sbin/bsdinstall/scripts/hardening Directory Properties: user/alc/PQ_LAUNDRY/ (props changed) user/alc/PQ_LAUNDRY/cddl/ (props changed) user/alc/PQ_LAUNDRY/sys/cddl/contrib/opensolaris/ (props changed) user/alc/PQ_LAUNDRY/sys/contrib/octeon-sdk/ (props changed) Modified: user/alc/PQ_LAUNDRY/Makefile.inc1 ============================================================================== --- user/alc/PQ_LAUNDRY/Makefile.inc1 Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/Makefile.inc1 Thu Aug 11 20:07:42 2016 (r303968) @@ -1013,7 +1013,7 @@ distributeworld installworld stageworld: ${IMAKEENV} rm -rf ${INSTALLTMP} .if make(distributeworld) .for dist in ${EXTRA_DISTRIBUTIONS} - find ${DESTDIR}/${DISTDIR}/${dist} -mindepth 1 -empty -delete + find ${DESTDIR}/${DISTDIR}/${dist} -mindepth 1 -type d -empty -delete .endfor .if defined(NO_ROOT) .for dist in base ${EXTRA_DISTRIBUTIONS} Modified: user/alc/PQ_LAUNDRY/cddl/usr.sbin/dtrace/tests/common/raise/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/cddl/usr.sbin/dtrace/tests/common/raise/Makefile Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/cddl/usr.sbin/dtrace/tests/common/raise/Makefile Thu Aug 11 20:07:42 2016 (r303968) @@ -20,4 +20,6 @@ CFILES= \ tst.raise3.c \ +TEST_METADATA.t_dtrace_contrib+= required_memory="4g" + .include "../../dtrace.test.mk" Modified: user/alc/PQ_LAUNDRY/cddl/usr.sbin/dtrace/tests/common/safety/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/cddl/usr.sbin/dtrace/tests/common/safety/Makefile Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/cddl/usr.sbin/dtrace/tests/common/safety/Makefile Thu Aug 11 20:07:42 2016 (r303968) @@ -53,4 +53,6 @@ CFILES= \ +TEST_METADATA.t_dtrace_contrib+= required_memory="4g" + .include "../../dtrace.test.mk" Modified: user/alc/PQ_LAUNDRY/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh ============================================================================== --- user/alc/PQ_LAUNDRY/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh Thu Aug 11 20:07:42 2016 (r303968) @@ -34,15 +34,28 @@ genmakefile() # One-off variable definitions. local special - if [ "$basedir" = proc ]; then + case "$basedir" in + proc) special=" LIBADD.tst.sigwait.exe+= rt " - elif [ "$basedir" = uctf ]; then + ;; + raise) + special=" +TEST_METADATA.t_dtrace_contrib+= required_memory=\"4g\" +" + ;; + safety) + special=" +TEST_METADATA.t_dtrace_contrib+= required_memory=\"4g\" +" + ;; + uctf) special=" WITH_CTF=YES " - fi + ;; + esac local makefile=$(mktemp) cat <<__EOF__ > $makefile Modified: user/alc/PQ_LAUNDRY/etc/rc.d/jail ============================================================================== --- user/alc/PQ_LAUNDRY/etc/rc.d/jail Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/etc/rc.d/jail Thu Aug 11 20:07:42 2016 (r303968) @@ -260,6 +260,7 @@ parse_options() extract_var $_jv set_hostname_allow allow.set_hostname YN NO extract_var $_jv sysvipc_allow allow.sysvipc YN NO + extract_var $_jv enforce_statfs enforce_statfs - 2 extract_var $_jv osreldate osreldate extract_var $_jv osrelease osrelease for _p in $_parameters; do Modified: user/alc/PQ_LAUNDRY/include/unistd.h ============================================================================== --- user/alc/PQ_LAUNDRY/include/unistd.h Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/include/unistd.h Thu Aug 11 20:07:42 2016 (r303968) @@ -484,11 +484,18 @@ pid_t vfork(void) __returns_twice; #if __BSD_VISIBLE struct timeval; /* select(2) */ + +struct crypt_data { + int initialized; /* For compatibility with glibc. */ + char __buf[256]; /* Buffer returned by crypt_r(). */ +}; + int acct(const char *); int async_daemon(void); int check_utility_compat(const char *); const char * crypt_get_format(void); +char *crypt_r(const char *, const char *, struct crypt_data *); int crypt_set_format(const char *); int des_cipher(const char *, char *, long, int); int des_setkey(const char *key); Modified: user/alc/PQ_LAUNDRY/lib/libc/rpc/svc_vc.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/rpc/svc_vc.c Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/lib/libc/rpc/svc_vc.c Thu Aug 11 20:07:42 2016 (r303968) @@ -700,7 +700,7 @@ svc_vc_rendezvous_ops(SVCXPRT *xprt) ops.xp_reply = (bool_t (*)(SVCXPRT *, struct rpc_msg *))abort; ops.xp_freeargs = - (bool_t (*)(SVCXPRT *, xdrproc_t, void *))abort, + (bool_t (*)(SVCXPRT *, xdrproc_t, void *))abort; ops.xp_destroy = svc_vc_destroy; ops2.xp_control = svc_vc_rendezvous_control; } Modified: user/alc/PQ_LAUNDRY/lib/libcrypt/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libcrypt/Makefile Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/lib/libcrypt/Makefile Thu Aug 11 20:07:42 2016 (r303968) @@ -17,7 +17,8 @@ SRCS= crypt.c misc.c \ crypt-sha256.c sha256c.c \ crypt-sha512.c sha512c.c MAN= crypt.3 -MLINKS= crypt.3 crypt_get_format.3 crypt.3 crypt_set_format.3 +MLINKS= crypt.3 crypt_get_format.3 crypt.3 crypt_r.3 \ + crypt.3 crypt_set_format.3 CFLAGS+= -I${.CURDIR}/../libmd -I${.CURDIR}/../libutil \ -I${.CURDIR}/../../sys/crypto/sha2 Modified: user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-md5.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-md5.c Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-md5.c Thu Aug 11 20:07:42 2016 (r303968) @@ -41,31 +41,27 @@ __FBSDID("$FreeBSD$"); * UNIX password */ -char * -crypt_md5(const char *pw, const char *salt) +int +crypt_md5(const char *pw, const char *salt, char *buffer) { MD5_CTX ctx,ctx1; unsigned long l; int sl, pl; u_int i; u_char final[MD5_SIZE]; - static const char *sp, *ep; - static char passwd[120], *p; + const char *ep; static const char *magic = "$1$"; - /* Refine the Salt first */ - sp = salt; - - /* If it starts with the magic string, then skip that */ - if(!strncmp(sp, magic, strlen(magic))) - sp += strlen(magic); + /* If the salt starts with the magic string, skip that. */ + if (!strncmp(salt, magic, strlen(magic))) + salt += strlen(magic); /* It stops at the first '$', max 8 chars */ - for(ep = sp; *ep && *ep != '$' && ep < (sp + 8); ep++) + for (ep = salt; *ep && *ep != '$' && ep < salt + 8; ep++) continue; /* get the length of the true salt */ - sl = ep - sp; + sl = ep - salt; MD5Init(&ctx); @@ -76,12 +72,12 @@ crypt_md5(const char *pw, const char *sa MD5Update(&ctx, (const u_char *)magic, strlen(magic)); /* Then the raw salt */ - MD5Update(&ctx, (const u_char *)sp, (u_int)sl); + MD5Update(&ctx, (const u_char *)salt, (u_int)sl); /* Then just as many characters of the MD5(pw,salt,pw) */ MD5Init(&ctx1); MD5Update(&ctx1, (const u_char *)pw, strlen(pw)); - MD5Update(&ctx1, (const u_char *)sp, (u_int)sl); + MD5Update(&ctx1, (const u_char *)salt, (u_int)sl); MD5Update(&ctx1, (const u_char *)pw, strlen(pw)); MD5Final(final, &ctx1); for(pl = (int)strlen(pw); pl > 0; pl -= MD5_SIZE) @@ -99,9 +95,9 @@ crypt_md5(const char *pw, const char *sa MD5Update(&ctx, (const u_char *)pw, 1); /* Now make the output string */ - strcpy(passwd, magic); - strncat(passwd, sp, (u_int)sl); - strcat(passwd, "$"); + buffer = stpcpy(buffer, magic); + buffer = stpncpy(buffer, salt, (u_int)sl); + *buffer++ = '$'; MD5Final(final, &ctx); @@ -118,7 +114,7 @@ crypt_md5(const char *pw, const char *sa MD5Update(&ctx1, (const u_char *)final, MD5_SIZE); if(i % 3) - MD5Update(&ctx1, (const u_char *)sp, (u_int)sl); + MD5Update(&ctx1, (const u_char *)salt, (u_int)sl); if(i % 7) MD5Update(&ctx1, (const u_char *)pw, strlen(pw)); @@ -130,24 +126,22 @@ crypt_md5(const char *pw, const char *sa MD5Final(final, &ctx1); } - p = passwd + strlen(passwd); - l = (final[ 0]<<16) | (final[ 6]<<8) | final[12]; - _crypt_to64(p, l, 4); p += 4; + _crypt_to64(buffer, l, 4); buffer += 4; l = (final[ 1]<<16) | (final[ 7]<<8) | final[13]; - _crypt_to64(p, l, 4); p += 4; + _crypt_to64(buffer, l, 4); buffer += 4; l = (final[ 2]<<16) | (final[ 8]<<8) | final[14]; - _crypt_to64(p, l, 4); p += 4; + _crypt_to64(buffer, l, 4); buffer += 4; l = (final[ 3]<<16) | (final[ 9]<<8) | final[15]; - _crypt_to64(p, l, 4); p += 4; + _crypt_to64(buffer, l, 4); buffer += 4; l = (final[ 4]<<16) | (final[10]<<8) | final[ 5]; - _crypt_to64(p, l, 4); p += 4; + _crypt_to64(buffer, l, 4); buffer += 4; l = final[11]; - _crypt_to64(p, l, 2); p += 2; - *p = '\0'; + _crypt_to64(buffer, l, 2); buffer += 2; + *buffer = '\0'; /* Don't leave anything around in vm they could use. */ memset(final, 0, sizeof(final)); - return (passwd); + return (0); } Modified: user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-nthash.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-nthash.c Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-nthash.c Thu Aug 11 20:07:42 2016 (r303968) @@ -46,16 +46,14 @@ __FBSDID("$FreeBSD$"); */ /* ARGSUSED */ -char * -crypt_nthash(const char *pw, const char *salt __unused) +int +crypt_nthash(const char *pw, const char *salt __unused, char *buffer) { size_t unipwLen; - int i, j; - static char hexconvtab[] = "0123456789abcdef"; + int i; + static const char hexconvtab[] = "0123456789abcdef"; static const char *magic = "$3$"; - static char passwd[120]; u_int16_t unipw[128]; - char final[MD4_SIZE*2 + 1]; u_char hash[MD4_SIZE]; const char *s; MD4_CTX ctx; @@ -70,19 +68,14 @@ crypt_nthash(const char *pw, const char MD4Init(&ctx); MD4Update(&ctx, (u_char *)unipw, unipwLen*sizeof(u_int16_t)); MD4Final(hash, &ctx); - - for (i = j = 0; i < MD4_SIZE; i++) { - final[j++] = hexconvtab[hash[i] >> 4]; - final[j++] = hexconvtab[hash[i] & 15]; - } - final[j] = '\0'; - - strcpy(passwd, magic); - strcat(passwd, "$"); - strncat(passwd, final, MD4_SIZE*2); - /* Don't leave anything around in vm they could use. */ - memset(final, 0, sizeof(final)); + buffer = stpcpy(buffer, magic); + *buffer++ = '$'; + for (i = 0; i < MD4_SIZE; i++) { + *buffer++ = hexconvtab[hash[i] >> 4]; + *buffer++ = hexconvtab[hash[i] & 15]; + } + *buffer = '\0'; - return (passwd); + return (0); } Modified: user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-sha256.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-sha256.c Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-sha256.c Thu Aug 11 20:07:42 2016 (r303968) @@ -59,11 +59,10 @@ static const char sha256_rounds_prefix[] /* Maximum number of rounds. */ #define ROUNDS_MAX 999999999 -static char * -crypt_sha256_r(const char *key, const char *salt, char *buffer, int buflen) +int +crypt_sha256(const char *key, const char *salt, char *buffer) { u_long srounds; - int n; uint8_t alt_result[32], temp_result[32]; SHA256_CTX ctx, alt_ctx; size_t salt_len, key_len, cnt, rounds; @@ -210,42 +209,27 @@ crypt_sha256_r(const char *key, const ch /* Now we can construct the result string. It consists of three * parts. */ - cp = stpncpy(buffer, sha256_salt_prefix, MAX(0, buflen)); - buflen -= sizeof(sha256_salt_prefix) - 1; + cp = stpcpy(buffer, sha256_salt_prefix); - if (rounds_custom) { - n = snprintf(cp, MAX(0, buflen), "%s%zu$", - sha256_rounds_prefix, rounds); + if (rounds_custom) + cp += sprintf(cp, "%s%zu$", sha256_rounds_prefix, rounds); - cp += n; - buflen -= n; - } + cp = stpncpy(cp, salt, salt_len); - cp = stpncpy(cp, salt, MIN((size_t)MAX(0, buflen), salt_len)); - buflen -= MIN((size_t)MAX(0, buflen), salt_len); + *cp++ = '$'; - if (buflen > 0) { - *cp++ = '$'; - --buflen; - } - - b64_from_24bit(alt_result[0], alt_result[10], alt_result[20], 4, &buflen, &cp); - b64_from_24bit(alt_result[21], alt_result[1], alt_result[11], 4, &buflen, &cp); - b64_from_24bit(alt_result[12], alt_result[22], alt_result[2], 4, &buflen, &cp); - b64_from_24bit(alt_result[3], alt_result[13], alt_result[23], 4, &buflen, &cp); - b64_from_24bit(alt_result[24], alt_result[4], alt_result[14], 4, &buflen, &cp); - b64_from_24bit(alt_result[15], alt_result[25], alt_result[5], 4, &buflen, &cp); - b64_from_24bit(alt_result[6], alt_result[16], alt_result[26], 4, &buflen, &cp); - b64_from_24bit(alt_result[27], alt_result[7], alt_result[17], 4, &buflen, &cp); - b64_from_24bit(alt_result[18], alt_result[28], alt_result[8], 4, &buflen, &cp); - b64_from_24bit(alt_result[9], alt_result[19], alt_result[29], 4, &buflen, &cp); - b64_from_24bit(0, alt_result[31], alt_result[30], 3, &buflen, &cp); - if (buflen <= 0) { - errno = ERANGE; - buffer = NULL; - } - else - *cp = '\0'; /* Terminate the string. */ + b64_from_24bit(alt_result[0], alt_result[10], alt_result[20], 4, &cp); + b64_from_24bit(alt_result[21], alt_result[1], alt_result[11], 4, &cp); + b64_from_24bit(alt_result[12], alt_result[22], alt_result[2], 4, &cp); + b64_from_24bit(alt_result[3], alt_result[13], alt_result[23], 4, &cp); + b64_from_24bit(alt_result[24], alt_result[4], alt_result[14], 4, &cp); + b64_from_24bit(alt_result[15], alt_result[25], alt_result[5], 4, &cp); + b64_from_24bit(alt_result[6], alt_result[16], alt_result[26], 4, &cp); + b64_from_24bit(alt_result[27], alt_result[7], alt_result[17], 4, &cp); + b64_from_24bit(alt_result[18], alt_result[28], alt_result[8], 4, &cp); + b64_from_24bit(alt_result[9], alt_result[19], alt_result[29], 4, &cp); + b64_from_24bit(0, alt_result[31], alt_result[30], 3, &cp); + *cp = '\0'; /* Terminate the string. */ /* Clear the buffer for the intermediate result so that people * attaching to processes or reading core dumps cannot get any @@ -263,37 +247,7 @@ crypt_sha256_r(const char *key, const ch if (copied_salt != NULL) memset(copied_salt, '\0', salt_len); - return buffer; -} - -/* This entry point is equivalent to crypt(3). */ -char * -crypt_sha256(const char *key, const char *salt) -{ - /* We don't want to have an arbitrary limit in the size of the - * password. We can compute an upper bound for the size of the - * result in advance and so we can prepare the buffer we pass to - * `crypt_sha256_r'. */ - static char *buffer; - static int buflen; - int needed; - char *new_buffer; - - needed = (sizeof(sha256_salt_prefix) - 1 - + sizeof(sha256_rounds_prefix) + 9 + 1 - + strlen(salt) + 1 + 43 + 1); - - if (buflen < needed) { - new_buffer = (char *)realloc(buffer, needed); - - if (new_buffer == NULL) - return NULL; - - buffer = new_buffer; - buflen = needed; - } - - return crypt_sha256_r(key, salt, buffer, buflen); + return (0); } #ifdef TEST Modified: user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-sha512.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-sha512.c Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/lib/libcrypt/crypt-sha512.c Thu Aug 11 20:07:42 2016 (r303968) @@ -59,11 +59,10 @@ static const char sha512_rounds_prefix[] /* Maximum number of rounds. */ #define ROUNDS_MAX 999999999 -static char * -crypt_sha512_r(const char *key, const char *salt, char *buffer, int buflen) +int +crypt_sha512(const char *key, const char *salt, char *buffer) { u_long srounds; - int n; uint8_t alt_result[64], temp_result[64]; SHA512_CTX ctx, alt_ctx; size_t salt_len, key_len, cnt, rounds; @@ -210,54 +209,39 @@ crypt_sha512_r(const char *key, const ch /* Now we can construct the result string. It consists of three * parts. */ - cp = stpncpy(buffer, sha512_salt_prefix, MAX(0, buflen)); - buflen -= sizeof(sha512_salt_prefix) - 1; + cp = stpcpy(buffer, sha512_salt_prefix); - if (rounds_custom) { - n = snprintf(cp, MAX(0, buflen), "%s%zu$", - sha512_rounds_prefix, rounds); + if (rounds_custom) + cp += sprintf(cp, "%s%zu$", sha512_rounds_prefix, rounds); - cp += n; - buflen -= n; - } + cp = stpncpy(cp, salt, salt_len); - cp = stpncpy(cp, salt, MIN((size_t)MAX(0, buflen), salt_len)); - buflen -= MIN((size_t)MAX(0, buflen), salt_len); + *cp++ = '$'; - if (buflen > 0) { - *cp++ = '$'; - --buflen; - } + b64_from_24bit(alt_result[0], alt_result[21], alt_result[42], 4, &cp); + b64_from_24bit(alt_result[22], alt_result[43], alt_result[1], 4, &cp); + b64_from_24bit(alt_result[44], alt_result[2], alt_result[23], 4, &cp); + b64_from_24bit(alt_result[3], alt_result[24], alt_result[45], 4, &cp); + b64_from_24bit(alt_result[25], alt_result[46], alt_result[4], 4, &cp); + b64_from_24bit(alt_result[47], alt_result[5], alt_result[26], 4, &cp); + b64_from_24bit(alt_result[6], alt_result[27], alt_result[48], 4, &cp); + b64_from_24bit(alt_result[28], alt_result[49], alt_result[7], 4, &cp); + b64_from_24bit(alt_result[50], alt_result[8], alt_result[29], 4, &cp); + b64_from_24bit(alt_result[9], alt_result[30], alt_result[51], 4, &cp); + b64_from_24bit(alt_result[31], alt_result[52], alt_result[10], 4, &cp); + b64_from_24bit(alt_result[53], alt_result[11], alt_result[32], 4, &cp); + b64_from_24bit(alt_result[12], alt_result[33], alt_result[54], 4, &cp); + b64_from_24bit(alt_result[34], alt_result[55], alt_result[13], 4, &cp); + b64_from_24bit(alt_result[56], alt_result[14], alt_result[35], 4, &cp); + b64_from_24bit(alt_result[15], alt_result[36], alt_result[57], 4, &cp); + b64_from_24bit(alt_result[37], alt_result[58], alt_result[16], 4, &cp); + b64_from_24bit(alt_result[59], alt_result[17], alt_result[38], 4, &cp); + b64_from_24bit(alt_result[18], alt_result[39], alt_result[60], 4, &cp); + b64_from_24bit(alt_result[40], alt_result[61], alt_result[19], 4, &cp); + b64_from_24bit(alt_result[62], alt_result[20], alt_result[41], 4, &cp); + b64_from_24bit(0, 0, alt_result[63], 2, &cp); - b64_from_24bit(alt_result[0], alt_result[21], alt_result[42], 4, &buflen, &cp); - b64_from_24bit(alt_result[22], alt_result[43], alt_result[1], 4, &buflen, &cp); - b64_from_24bit(alt_result[44], alt_result[2], alt_result[23], 4, &buflen, &cp); - b64_from_24bit(alt_result[3], alt_result[24], alt_result[45], 4, &buflen, &cp); - b64_from_24bit(alt_result[25], alt_result[46], alt_result[4], 4, &buflen, &cp); - b64_from_24bit(alt_result[47], alt_result[5], alt_result[26], 4, &buflen, &cp); - b64_from_24bit(alt_result[6], alt_result[27], alt_result[48], 4, &buflen, &cp); - b64_from_24bit(alt_result[28], alt_result[49], alt_result[7], 4, &buflen, &cp); - b64_from_24bit(alt_result[50], alt_result[8], alt_result[29], 4, &buflen, &cp); - b64_from_24bit(alt_result[9], alt_result[30], alt_result[51], 4, &buflen, &cp); - b64_from_24bit(alt_result[31], alt_result[52], alt_result[10], 4, &buflen, &cp); - b64_from_24bit(alt_result[53], alt_result[11], alt_result[32], 4, &buflen, &cp); - b64_from_24bit(alt_result[12], alt_result[33], alt_result[54], 4, &buflen, &cp); - b64_from_24bit(alt_result[34], alt_result[55], alt_result[13], 4, &buflen, &cp); - b64_from_24bit(alt_result[56], alt_result[14], alt_result[35], 4, &buflen, &cp); - b64_from_24bit(alt_result[15], alt_result[36], alt_result[57], 4, &buflen, &cp); - b64_from_24bit(alt_result[37], alt_result[58], alt_result[16], 4, &buflen, &cp); - b64_from_24bit(alt_result[59], alt_result[17], alt_result[38], 4, &buflen, &cp); - b64_from_24bit(alt_result[18], alt_result[39], alt_result[60], 4, &buflen, &cp); - b64_from_24bit(alt_result[40], alt_result[61], alt_result[19], 4, &buflen, &cp); - b64_from_24bit(alt_result[62], alt_result[20], alt_result[41], 4, &buflen, &cp); - b64_from_24bit(0, 0, alt_result[63], 2, &buflen, &cp); - - if (buflen <= 0) { - errno = ERANGE; - buffer = NULL; - } - else - *cp = '\0'; /* Terminate the string. */ + *cp = '\0'; /* Terminate the string. */ /* Clear the buffer for the intermediate result so that people * attaching to processes or reading core dumps cannot get any @@ -275,37 +259,7 @@ crypt_sha512_r(const char *key, const ch if (copied_salt != NULL) memset(copied_salt, '\0', salt_len); - return buffer; -} - -/* This entry point is equivalent to crypt(3). */ -char * -crypt_sha512(const char *key, const char *salt) -{ - /* We don't want to have an arbitrary limit in the size of the - * password. We can compute an upper bound for the size of the - * result in advance and so we can prepare the buffer we pass to - * `crypt_sha512_r'. */ - static char *buffer; - static int buflen; - int needed; - char *new_buffer; - - needed = (sizeof(sha512_salt_prefix) - 1 - + sizeof(sha512_rounds_prefix) + 9 + 1 - + strlen(salt) + 1 + 86 + 1); - - if (buflen < needed) { - new_buffer = (char *)realloc(buffer, needed); - - if (new_buffer == NULL) - return NULL; - - buffer = new_buffer; - buflen = needed; - } - - return crypt_sha512_r(key, salt, buffer, buflen); + return (0); } #ifdef TEST Modified: user/alc/PQ_LAUNDRY/lib/libcrypt/crypt.3 ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libcrypt/crypt.3 Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/lib/libcrypt/crypt.3 Thu Aug 11 20:07:42 2016 (r303968) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 9, 2014 +.Dd August 10, 2016 .Dt CRYPT 3 .Os .Sh NAME @@ -41,6 +41,8 @@ .In unistd.h .Ft char * .Fn crypt "const char *key" "const char *salt" +.Ft char * +.Fn crypt_r "const char *key" "const char *salt" "struct crypt_data *data" .Ft const char * .Fn crypt_get_format "void" .Ft int @@ -246,10 +248,20 @@ The .Fn crypt_set_format function sets the default encoding format according to the supplied .Fa string . +.Pp +The +.Fn crypt_r +function behaves identically to +.Fn crypt , +except that the resulting string is stored in +.Fa data , +making it thread-safe. .Sh RETURN VALUES The .Fn crypt -function returns a pointer to the encrypted value on success, and NULL on +and +.Fn crypt_r +functions return a pointer to the encrypted value on success, and NULL on failure. Note: this is not a standard behaviour, AT&T .Fn crypt @@ -280,6 +292,11 @@ section of the code (FreeSec 1.0) was de States of America as an unencumbered replacement for the U.S.-only .Nx libcrypt encryption library. +.Pp +The +.Fn crypt_r +function was added in +.Fx 12.0 . .Sh AUTHORS .An -nosplit Originally written by Modified: user/alc/PQ_LAUNDRY/lib/libcrypt/crypt.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libcrypt/crypt.c Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/lib/libcrypt/crypt.c Thu Aug 11 20:07:42 2016 (r303968) @@ -46,9 +46,9 @@ __FBSDID("$FreeBSD$"); * and it needs to be the default for backward compatibility. */ static const struct crypt_format { - const char *const name; - char *(*const func)(const char *, const char *); - const char *const magic; + const char *name; + int (*func)(const char *, const char *, char *); + const char *magic; } crypt_formats[] = { { "md5", crypt_md5, "$1$" }, #ifdef HAS_BLOWFISH @@ -104,20 +104,37 @@ crypt_set_format(const char *format) * otherwise, the currently selected format is used. */ char * -crypt(const char *passwd, const char *salt) +crypt_r(const char *passwd, const char *salt, struct crypt_data *data) { const struct crypt_format *cf; + int (*func)(const char *, const char *, char *); #ifdef HAS_DES int len; #endif for (cf = crypt_formats; cf->name != NULL; ++cf) - if (cf->magic != NULL && strstr(salt, cf->magic) == salt) - return (cf->func(passwd, salt)); + if (cf->magic != NULL && strstr(salt, cf->magic) == salt) { + func = cf->func; + goto match; + } #ifdef HAS_DES len = strlen(salt); - if ((len == 13 || len == 2) && strspn(salt, DES_SALT_ALPHABET) == len) - return (crypt_des(passwd, salt)); + if ((len == 13 || len == 2) && strspn(salt, DES_SALT_ALPHABET) == len) { + func = crypt_des; + goto match; + } #endif - return (crypt_format->func(passwd, salt)); + func = crypt_format->func; +match: + if (func(passwd, salt, data->__buf) != 0) + return (NULL); + return (data->__buf); +} + +char * +crypt(const char *passwd, const char *salt) +{ + static struct crypt_data data; + + return (crypt_r(passwd, salt, &data)); } Modified: user/alc/PQ_LAUNDRY/lib/libcrypt/crypt.h ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libcrypt/crypt.h Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/lib/libcrypt/crypt.h Thu Aug 11 20:07:42 2016 (r303968) @@ -32,12 +32,12 @@ #define MD4_SIZE 16 #define MD5_SIZE 16 -char *crypt_des(const char *pw, const char *salt); -char *crypt_md5(const char *pw, const char *salt); -char *crypt_nthash(const char *pw, const char *salt); -char *crypt_blowfish(const char *pw, const char *salt); -char *crypt_sha256 (const char *pw, const char *salt); -char *crypt_sha512 (const char *pw, const char *salt); +int crypt_des(const char *pw, const char *salt, char *buf); +int crypt_md5(const char *pw, const char *salt, char *buf); +int crypt_nthash(const char *pw, const char *salt, char *buf); +int crypt_blowfish(const char *pw, const char *salt, char *buf); +int crypt_sha256 (const char *pw, const char *salt, char *buf); +int crypt_sha512 (const char *pw, const char *salt, char *buf); extern void _crypt_to64(char *s, u_long v, int n); -extern void b64_from_24bit(uint8_t B2, uint8_t B1, uint8_t B0, int n, int *buflen, char **cp); +extern void b64_from_24bit(uint8_t B2, uint8_t B1, uint8_t B0, int n, char **cp); Modified: user/alc/PQ_LAUNDRY/lib/libcrypt/misc.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libcrypt/misc.c Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/lib/libcrypt/misc.c Thu Aug 11 20:07:42 2016 (r303968) @@ -47,7 +47,7 @@ _crypt_to64(char *s, u_long v, int n) } void -b64_from_24bit(uint8_t B2, uint8_t B1, uint8_t B0, int n, int *buflen, char **cp) +b64_from_24bit(uint8_t B2, uint8_t B1, uint8_t B0, int n, char **cp) { uint32_t w; int i; @@ -56,8 +56,6 @@ b64_from_24bit(uint8_t B2, uint8_t B1, u for (i = 0; i < n; i++) { **cp = itoa64[w&0x3f]; (*cp)++; - if ((*buflen)-- < 0) - break; w >>= 6; } } Modified: user/alc/PQ_LAUNDRY/lib/libpcap/pcap-netmap.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libpcap/pcap-netmap.c Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/lib/libpcap/pcap-netmap.c Thu Aug 11 20:07:42 2016 (r303968) @@ -240,7 +240,7 @@ pcap_netmap_activate(pcap_t *p) p->linktype = DLT_EN10MB; p->selectable_fd = p->fd; p->read_op = pcap_netmap_dispatch; - p->inject_op = pcap_netmap_inject, + p->inject_op = pcap_netmap_inject; p->setfilter_op = install_bpf_program; p->setdirection_op = NULL; p->set_datalink_op = NULL; Modified: user/alc/PQ_LAUNDRY/release/release.sh ============================================================================== --- user/alc/PQ_LAUNDRY/release/release.sh Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/release/release.sh Thu Aug 11 20:07:42 2016 (r303968) @@ -287,9 +287,15 @@ extra_chroot_setup() { fi if [ ! -z "${EMBEDDEDPORTS}" ]; then + _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) + REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) + BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) + PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" + PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" + PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" for _PORT in ${EMBEDDEDPORTS}; do eval chroot ${CHROOTDIR} make -C /usr/ports/${_PORT} \ - BATCH=1 FORCE_PKG_REGISTER=1 install clean distclean + FORCE_PKG_REGISTER=1 ${PBUILD_FLAGS} install clean distclean done fi Modified: user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw2.c ============================================================================== --- user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw2.c Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw2.c Thu Aug 11 20:07:42 2016 (r303968) @@ -1583,7 +1583,7 @@ show_static_rule(struct cmdline_opts *co break; case O_NAT: - if (cmd->arg1 != 0) + if (cmd->arg1 != IP_FW_NAT44_GLOBAL) bprint_uint_arg(bp, "nat ", cmd->arg1); else bprintf(bp, "nat global"); @@ -3776,7 +3776,7 @@ compile_rule(char *av[], uint32_t *rbuf, action->len = F_INSN_SIZE(ipfw_insn_nat); CHECK_ACTLEN; if (*av != NULL && _substrcmp(*av, "global") == 0) { - action->arg1 = 0; + action->arg1 = IP_FW_NAT44_GLOBAL; av++; break; } else Modified: user/alc/PQ_LAUNDRY/secure/lib/libcrypt/crypt-blowfish.c ============================================================================== --- user/alc/PQ_LAUNDRY/secure/lib/libcrypt/crypt-blowfish.c Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/secure/lib/libcrypt/crypt-blowfish.c Thu Aug 11 20:07:42 2016 (r303968) @@ -75,8 +75,6 @@ __FBSDID("$FreeBSD$"); static void encode_base64(u_int8_t *, u_int8_t *, u_int16_t); static void decode_base64(u_int8_t *, u_int16_t, const u_int8_t *); -static char encrypted[_PASSWORD_LEN]; - const static u_int8_t Base64Code[] = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; @@ -135,8 +133,8 @@ decode_base64(u_int8_t *buffer, u_int16_ /* We handle $Vers$log2(NumRounds)$salt+passwd$ i.e. $2$04$iwouldntknowwhattosayetKdJ6iFtacBqJdKe6aW7ou */ -char * -crypt_blowfish(const char *key, const char *salt) +int +crypt_blowfish(const char *key, const char *salt, char *buffer) { blf_ctx state; u_int32_t rounds, i, k; @@ -157,10 +155,8 @@ crypt_blowfish(const char *key, const ch /* Discard "$" identifier */ salt++; - if (*salt > BCRYPT_VERSION) { - /* How do I handle errors ? Return NULL */ - return NULL; - } + if (*salt > BCRYPT_VERSION) + return (-1); /* Check for minor versions */ if (salt[1] != '$') { @@ -174,7 +170,7 @@ crypt_blowfish(const char *key, const ch salt++; break; default: - return NULL; + return (-1); } } else minr = 0; @@ -184,15 +180,15 @@ crypt_blowfish(const char *key, const ch if (salt[2] != '$') /* Out of sync with passwd entry */ - return NULL; + return (-1); memcpy(arounds, salt, sizeof(arounds)); if (arounds[sizeof(arounds) - 1] != '$') - return NULL; + return (-1); arounds[sizeof(arounds) - 1] = 0; logr = strtonum(arounds, BCRYPT_MINLOGROUNDS, 31, NULL); if (logr == 0) - return NULL; + return (-1); /* Computer power doesn't increase linearly, 2^x should be fine */ rounds = 1U << logr; @@ -201,7 +197,7 @@ crypt_blowfish(const char *key, const ch } if (strlen(salt) * 3 / 4 < BCRYPT_MAXSALT) - return NULL; + return (-1); /* We dont want the base64 salt but the raw data */ decode_base64(csalt, BCRYPT_MAXSALT, (const u_int8_t *) salt); @@ -248,23 +244,23 @@ crypt_blowfish(const char *key, const ch } - i = 0; - encrypted[i++] = '$'; - encrypted[i++] = BCRYPT_VERSION; + *buffer++ = '$'; + *buffer++ = BCRYPT_VERSION; if (minr) - encrypted[i++] = minr; - encrypted[i++] = '$'; + *buffer++ = minr; + *buffer++ = '$'; - snprintf(encrypted + i, 4, "%2.2u$", logr); + snprintf(buffer, 4, "%2.2u$", logr); + buffer += 3; - encode_base64((u_int8_t *) encrypted + i + 3, csalt, BCRYPT_MAXSALT); - encode_base64((u_int8_t *) encrypted + strlen(encrypted), ciphertext, - 4 * BCRYPT_BLOCKS - 1); + encode_base64((u_int8_t *)buffer, csalt, BCRYPT_MAXSALT); + buffer += strlen(buffer); + encode_base64((u_int8_t *)buffer, ciphertext, 4 * BCRYPT_BLOCKS - 1); memset(&state, 0, sizeof(state)); memset(ciphertext, 0, sizeof(ciphertext)); memset(csalt, 0, sizeof(csalt)); memset(cdata, 0, sizeof(cdata)); - return encrypted; + return (0); } static void Modified: user/alc/PQ_LAUNDRY/secure/lib/libcrypt/crypt-des.c ============================================================================== --- user/alc/PQ_LAUNDRY/secure/lib/libcrypt/crypt-des.c Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/secure/lib/libcrypt/crypt-des.c Thu Aug 11 20:07:42 2016 (r303968) @@ -588,13 +588,12 @@ des_cipher(const char *in, char *out, u_ return(retval); } -char * -crypt_des(const char *key, const char *setting) +int +crypt_des(const char *key, const char *setting, char *buffer) { int i; u_int32_t count, salt, l, r0, r1, keybuf[2]; - u_char *p, *q; - static char output[21]; + u_char *q; if (!des_initialised) des_init(); @@ -610,7 +609,7 @@ crypt_des(const char *key, const char *s key++; } if (des_setkey((char *)keybuf)) - return(NULL); + return (-1); if (*setting == _PASSWORD_EFMT1) { /* @@ -629,7 +628,7 @@ crypt_des(const char *key, const char *s * Encrypt the key with itself. */ if (des_cipher((char *)keybuf, (char *)keybuf, 0L, 1)) - return(NULL); + return (-1); /* * And XOR with the next 8 characters of the key. */ @@ -638,19 +637,9 @@ crypt_des(const char *key, const char *s *q++ ^= *key++ << 1; if (des_setkey((char *)keybuf)) - return(NULL); + return (-1); } - strncpy(output, setting, 9); - - /* - * Double check that we weren't given a short setting. - * If we were, the above code will probably have created - * wierd values for count and salt, but we don't really care. - * Just make sure the output string doesn't have an extra - * NUL in it. - */ - output[9] = '\0'; - p = (u_char *)output + strlen(output); + buffer = stpncpy(buffer, setting, 9); } else { /* * "old"-style: @@ -662,43 +651,41 @@ crypt_des(const char *key, const char *s salt = (ascii_to_bin(setting[1]) << 6) | ascii_to_bin(setting[0]); - output[0] = setting[0]; + *buffer++ = setting[0]; /* * If the encrypted password that the salt was extracted from * is only 1 character long, the salt will be corrupted. We * need to ensure that the output string doesn't have an extra * NUL in it! */ - output[1] = setting[1] ? setting[1] : output[0]; - - p = (u_char *)output + 2; + *buffer++ = setting[1] ? setting[1] : setting[0]; } setup_salt(salt); /* * Do it. */ if (do_des(0L, 0L, &r0, &r1, (int)count)) - return(NULL); + return (-1); /* * Now encode the result... */ l = (r0 >> 8); - *p++ = ascii64[(l >> 18) & 0x3f]; - *p++ = ascii64[(l >> 12) & 0x3f]; - *p++ = ascii64[(l >> 6) & 0x3f]; - *p++ = ascii64[l & 0x3f]; + *buffer++ = ascii64[(l >> 18) & 0x3f]; + *buffer++ = ascii64[(l >> 12) & 0x3f]; + *buffer++ = ascii64[(l >> 6) & 0x3f]; + *buffer++ = ascii64[l & 0x3f]; l = (r0 << 16) | ((r1 >> 16) & 0xffff); - *p++ = ascii64[(l >> 18) & 0x3f]; - *p++ = ascii64[(l >> 12) & 0x3f]; - *p++ = ascii64[(l >> 6) & 0x3f]; - *p++ = ascii64[l & 0x3f]; + *buffer++ = ascii64[(l >> 18) & 0x3f]; + *buffer++ = ascii64[(l >> 12) & 0x3f]; + *buffer++ = ascii64[(l >> 6) & 0x3f]; + *buffer++ = ascii64[l & 0x3f]; l = r1 << 2; - *p++ = ascii64[(l >> 12) & 0x3f]; - *p++ = ascii64[(l >> 6) & 0x3f]; - *p++ = ascii64[l & 0x3f]; - *p = 0; + *buffer++ = ascii64[(l >> 12) & 0x3f]; + *buffer++ = ascii64[(l >> 6) & 0x3f]; + *buffer++ = ascii64[l & 0x3f]; + *buffer = '\0'; - return(output); + return (0); } Modified: user/alc/PQ_LAUNDRY/share/man/man4/pci.4 ============================================================================== --- user/alc/PQ_LAUNDRY/share/man/man4/pci.4 Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/share/man/man4/pci.4 Thu Aug 11 20:07:42 2016 (r303968) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 3, 2008 +.Dd August 9, 2016 .Dt PCI 4 .Os .Sh NAME @@ -229,7 +229,8 @@ The status tells the user the dispositio The possible status values are: .Bl -ohang .It PCI_GETCONF_LAST_DEVICE -This means that there are no more devices in the PCI device list after the +This means that there are no more devices in the PCI device list matching +the specified criteria after the ones returned in the .Va matches buffer. @@ -245,9 +246,7 @@ and to zero to start over at the beginning of the list. .It PCI_GETCONF_MORE_DEVS This tells the user that his buffer was not large enough to hold all of the -remaining devices in the device list that possibly match his criteria. -It is possible for this status to be returned, even when none of the remaining -devices in the list would match the user's criteria. +remaining devices in the device list that match his criteria. .It PCI_GETCONF_ERROR This indicates a general error while servicing the user's request. If the Modified: user/alc/PQ_LAUNDRY/share/mk/bsd.README ============================================================================== --- user/alc/PQ_LAUNDRY/share/mk/bsd.README Thu Aug 11 19:13:30 2016 (r303967) +++ user/alc/PQ_LAUNDRY/share/mk/bsd.README Thu Aug 11 20:07:42 2016 (r303968) @@ -331,6 +331,7 @@ PROGS_CXX PROG and PROGS_CXX in one Make - DEBUG_FLAGS - DPADD *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Fri Aug 12 03:47:40 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3132BB6D97 for ; Fri, 12 Aug 2016 03:47:40 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E6141513; Fri, 12 Aug 2016 03:47:40 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7C3ldoS033377; Fri, 12 Aug 2016 03:47:39 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7C3ldfo033369; Fri, 12 Aug 2016 03:47:39 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201608120347.u7C3ldfo033369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 12 Aug 2016 03:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r303983 - in user/alc/PQ_LAUNDRY: sys/boot/fdt/dts/arm sys/dev/virtio/network sys/modules/dtb/allwinner sys/netinet sys/vm tools/tools/ath/ath_ee_9300_print X-SVN-Group: user 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.22 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, 12 Aug 2016 03:47:40 -0000 Author: alc Date: Fri Aug 12 03:47:38 2016 New Revision: 303983 URL: https://svnweb.freebsd.org/changeset/base/303983 Log: MFH r303982 Added: user/alc/PQ_LAUNDRY/sys/boot/fdt/dts/arm/pcduino3.dts - copied unchanged from r303982, head/sys/boot/fdt/dts/arm/pcduino3.dts Deleted: user/alc/PQ_LAUNDRY/sys/boot/fdt/dts/arm/pcduino3b.dts Modified: user/alc/PQ_LAUNDRY/sys/dev/virtio/network/if_vtnet.c user/alc/PQ_LAUNDRY/sys/dev/virtio/network/if_vtnetvar.h user/alc/PQ_LAUNDRY/sys/modules/dtb/allwinner/Makefile user/alc/PQ_LAUNDRY/sys/netinet/tcp_fastopen.c user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c user/alc/PQ_LAUNDRY/tools/tools/ath/ath_ee_9300_print/main.c Directory Properties: user/alc/PQ_LAUNDRY/ (props changed) Copied: user/alc/PQ_LAUNDRY/sys/boot/fdt/dts/arm/pcduino3.dts (from r303982, head/sys/boot/fdt/dts/arm/pcduino3.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/alc/PQ_LAUNDRY/sys/boot/fdt/dts/arm/pcduino3.dts Fri Aug 12 03:47:38 2016 (r303983, copy of r303982, head/sys/boot/fdt/dts/arm/pcduino3.dts) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2016 Emmanuel Vadot + * 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$ + */ + +#include "sun7i-a20-pcduino3.dts" +#include "sun7i-a20-hdmi.dtsi" +#include "xpowers-axp209.dtsi" + +/ { + soc@01c00000 { + hdmi@01c16000 { + status = "okay"; + }; + + hdmiaudio { + status = "okay"; + }; + }; +}; + +&gmac { + pinctrl-0 = <&gmac_pins_rgmii_a>; + phy-mode = "rgmii"; +}; Modified: user/alc/PQ_LAUNDRY/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/dev/virtio/network/if_vtnet.c Fri Aug 12 03:22:58 2016 (r303982) +++ user/alc/PQ_LAUNDRY/sys/dev/virtio/network/if_vtnet.c Fri Aug 12 03:47:38 2016 (r303983) @@ -230,18 +230,32 @@ static void vtnet_disable_interrupts(str static int vtnet_tunable_int(struct vtnet_softc *, const char *, int); /* Tunables. */ +static SYSCTL_NODE(_hw, OID_AUTO, vtnet, CTLFLAG_RD, 0, "VNET driver parameters"); static int vtnet_csum_disable = 0; TUNABLE_INT("hw.vtnet.csum_disable", &vtnet_csum_disable); +SYSCTL_INT(_hw_vtnet, OID_AUTO, csum_disable, CTLFLAG_RDTUN, + &vtnet_csum_disable, 0, "Disables receive and send checksum offload"); static int vtnet_tso_disable = 0; TUNABLE_INT("hw.vtnet.tso_disable", &vtnet_tso_disable); +SYSCTL_INT(_hw_vtnet, OID_AUTO, tso_disable, CTLFLAG_RDTUN, &vtnet_tso_disable, + 0, "Disables TCP Segmentation Offload"); static int vtnet_lro_disable = 0; TUNABLE_INT("hw.vtnet.lro_disable", &vtnet_lro_disable); +SYSCTL_INT(_hw_vtnet, OID_AUTO, lro_disable, CTLFLAG_RDTUN, &vtnet_lro_disable, + 0, "Disables TCP Large Receive Offload"); static int vtnet_mq_disable = 0; TUNABLE_INT("hw.vtnet.mq_disable", &vtnet_mq_disable); -static int vtnet_mq_max_pairs = 0; +SYSCTL_INT(_hw_vtnet, OID_AUTO, mq_disable, CTLFLAG_RDTUN, &vtnet_mq_disable, + 0, "Disables Multi Queue support"); +static int vtnet_mq_max_pairs = VTNET_MAX_QUEUE_PAIRS; TUNABLE_INT("hw.vtnet.mq_max_pairs", &vtnet_mq_max_pairs); +SYSCTL_INT(_hw_vtnet, OID_AUTO, mq_max_pairs, CTLFLAG_RDTUN, + &vtnet_mq_max_pairs, 0, "Sets the maximum number of Multi Queue pairs"); static int vtnet_rx_process_limit = 512; TUNABLE_INT("hw.vtnet.rx_process_limit", &vtnet_rx_process_limit); +SYSCTL_INT(_hw_vtnet, OID_AUTO, rx_process_limit, CTLFLAG_RDTUN, + &vtnet_rx_process_limit, 0, + "Limits the number RX segments processed in a single pass"); static uma_zone_t vtnet_tx_header_zone; @@ -597,7 +611,6 @@ static void vtnet_setup_features(struct vtnet_softc *sc) { device_t dev; - int max_pairs, max; dev = sc->vtnet_dev; @@ -646,32 +659,31 @@ vtnet_setup_features(struct vtnet_softc if (virtio_with_feature(dev, VIRTIO_NET_F_MQ) && sc->vtnet_flags & VTNET_FLAG_CTRL_VQ) { - max_pairs = virtio_read_dev_config_2(dev, + sc->vtnet_max_vq_pairs = virtio_read_dev_config_2(dev, offsetof(struct virtio_net_config, max_virtqueue_pairs)); - if (max_pairs < VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN || - max_pairs > VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX) - max_pairs = 1; } else - max_pairs = 1; + sc->vtnet_max_vq_pairs = 1; - if (max_pairs > 1) { + if (sc->vtnet_max_vq_pairs > 1) { /* - * Limit the maximum number of queue pairs to the number of - * CPUs or the configured maximum. The actual number of - * queues that get used may be less. + * Limit the maximum number of queue pairs to the lower of + * the number of CPUs and the configured maximum. + * The actual number of queues that get used may be less. */ + int max; + max = vtnet_tunable_int(sc, "mq_max_pairs", vtnet_mq_max_pairs); - if (max > 0 && max_pairs > max) - max_pairs = max; - if (max_pairs > mp_ncpus) - max_pairs = mp_ncpus; - if (max_pairs > VTNET_MAX_QUEUE_PAIRS) - max_pairs = VTNET_MAX_QUEUE_PAIRS; - if (max_pairs > 1) - sc->vtnet_flags |= VTNET_FLAG_MULTIQ; + if (max > VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN) { + if (max > mp_ncpus) + max = mp_ncpus; + if (max > VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX) + max = VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX; + if (max > 1) { + sc->vtnet_requested_vq_pairs = max; + sc->vtnet_flags |= VTNET_FLAG_MULTIQ; + } + } } - - sc->vtnet_max_vq_pairs = max_pairs; } static int @@ -2982,13 +2994,11 @@ vtnet_set_active_vq_pairs(struct vtnet_s dev = sc->vtnet_dev; if ((sc->vtnet_flags & VTNET_FLAG_MULTIQ) == 0) { - MPASS(sc->vtnet_max_vq_pairs == 1); sc->vtnet_act_vq_pairs = 1; return; } - /* BMV: Just use the maximum configured for now. */ - npairs = sc->vtnet_max_vq_pairs; + npairs = sc->vtnet_requested_vq_pairs; if (vtnet_ctrl_mq_cmd(sc, npairs) != 0) { device_printf(dev, @@ -3852,6 +3862,9 @@ vtnet_setup_sysctl(struct vtnet_softc *s SYSCTL_ADD_INT(ctx, child, OID_AUTO, "max_vq_pairs", CTLFLAG_RD, &sc->vtnet_max_vq_pairs, 0, "Maximum number of supported virtqueue pairs"); + SYSCTL_ADD_INT(ctx, child, OID_AUTO, "requested_vq_pairs", + CTLFLAG_RD, &sc->vtnet_requested_vq_pairs, 0, + "Requested number of virtqueue pairs"); SYSCTL_ADD_INT(ctx, child, OID_AUTO, "act_vq_pairs", CTLFLAG_RD, &sc->vtnet_act_vq_pairs, 0, "Number of active virtqueue pairs"); Modified: user/alc/PQ_LAUNDRY/sys/dev/virtio/network/if_vtnetvar.h ============================================================================== --- user/alc/PQ_LAUNDRY/sys/dev/virtio/network/if_vtnetvar.h Fri Aug 12 03:22:58 2016 (r303982) +++ user/alc/PQ_LAUNDRY/sys/dev/virtio/network/if_vtnetvar.h Fri Aug 12 03:47:38 2016 (r303983) @@ -155,6 +155,7 @@ struct vtnet_softc { int vtnet_if_flags; int vtnet_act_vq_pairs; int vtnet_max_vq_pairs; + int vtnet_requested_vq_pairs; struct virtqueue *vtnet_ctrl_vq; struct vtnet_mac_filter *vtnet_mac_filter; Modified: user/alc/PQ_LAUNDRY/sys/modules/dtb/allwinner/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/sys/modules/dtb/allwinner/Makefile Fri Aug 12 03:22:58 2016 (r303982) +++ user/alc/PQ_LAUNDRY/sys/modules/dtb/allwinner/Makefile Fri Aug 12 03:47:38 2016 (r303983) @@ -7,7 +7,7 @@ DTS= \ cubieboard2.dts \ olimex-a20-som-evb.dts \ olinuxino-lime.dts \ - pcduino3b.dts \ + pcduino3.dts \ sinovoip-bpi-m3.dts .include Modified: user/alc/PQ_LAUNDRY/sys/netinet/tcp_fastopen.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/netinet/tcp_fastopen.c Fri Aug 12 03:22:58 2016 (r303982) +++ user/alc/PQ_LAUNDRY/sys/netinet/tcp_fastopen.c Fri Aug 12 03:47:38 2016 (r303983) @@ -108,6 +108,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Fri Aug 12 03:22:58 2016 (r303982) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Fri Aug 12 03:47:38 2016 (r303983) @@ -1473,15 +1473,13 @@ drop_page: /* * Scan the active queue for pages that can be deactivated. Update * the per-page activity counter and use it to identify deactivation - * candidates. + * candidates. Held pages may be deactivated. */ for (m = TAILQ_FIRST(&pq->pq_pl), scanned = 0; m != NULL && (scanned < min_scan || (page_shortage > 0 && scanned < maxscan)); m = next, scanned++) { - KASSERT(m->queue == PQ_ACTIVE, ("vm_pageout_scan: page %p isn't active", m)); - next = TAILQ_NEXT(m, plinks.q); if ((m->flags & PG_MARKER) != 0) continue; @@ -1495,8 +1493,8 @@ drop_page: } /* - * The count for pagedaemon pages is done after checking the - * page for eligibility... + * The count for page daemon pages is updated after checking + * the page for eligibility. */ PCPU_INC(cnt.v_pdpages); @@ -1510,12 +1508,17 @@ drop_page: act_delta = 0; /* - * Unlocked object ref count check. Two races are possible. - * 1) The ref was transitioning to zero and we saw non-zero, - * the pmap bits will be checked unnecessarily. - * 2) The ref was transitioning to one and we saw zero. - * The page lock prevents a new reference to this page so - * we need not check the reference bits. + * Perform an unsynchronized object ref count check. While + * the page lock ensures that the page is not reallocated to + * another object, in particular, one with unmanaged mappings + * that cannot support pmap_ts_referenced(), two races are, + * nonetheless, possible: + * 1) The count was transitioning to zero, but we saw a non- + * zero value. pmap_ts_referenced() will return zero + * because the page is not mapped. + * 2) The count was transitioning to one, but we saw zero. + * This race delays the detection of a new reference. At + * worst, we will deactivate and reactivate the page. */ if (m->object->ref_count != 0) act_delta += pmap_ts_referenced(m); Modified: user/alc/PQ_LAUNDRY/tools/tools/ath/ath_ee_9300_print/main.c ============================================================================== --- user/alc/PQ_LAUNDRY/tools/tools/ath/ath_ee_9300_print/main.c Fri Aug 12 03:22:58 2016 (r303982) +++ user/alc/PQ_LAUNDRY/tools/tools/ath/ath_ee_9300_print/main.c Fri Aug 12 03:47:38 2016 (r303983) @@ -72,8 +72,10 @@ eeprom_9300_base_print(const uint16_t *b ee_base->device_cap, ee_base->device_type); - printf("| pwrTableOffset: %d dB, feature_enable: 0x%02x MiscConfig: 0x%02x |\n", + printf("| pwrTableOffset: %d dB, TuningCaps=0x%02x 0x%02x feature_enable: 0x%02x MiscConfig: 0x%02x |\n", ee_base->pwrTableOffset, + ee_base->params_for_tuning_caps[0], + ee_base->params_for_tuning_caps[1], ee_base->feature_enable, ee_base->misc_configuration); From owner-svn-src-user@freebsd.org Fri Aug 12 18:07:45 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58812BB8D03 for ; Fri, 12 Aug 2016 18:07:45 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25ADA1436; Fri, 12 Aug 2016 18:07:45 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7CI7iE3052209; Fri, 12 Aug 2016 18:07:44 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7CI7iqE052208; Fri, 12 Aug 2016 18:07:44 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201608121807.u7CI7iqE052208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 12 Aug 2016 18:07:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r304010 - user/alc/PQ_LAUNDRY/sys/vm X-SVN-Group: user 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.22 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, 12 Aug 2016 18:07:45 -0000 Author: alc Date: Fri Aug 12 18:07:44 2016 New Revision: 304010 URL: https://svnweb.freebsd.org/changeset/base/304010 Log: Add a comment to the laundering code explaining what happens when the additional pages that make up a cluster are newly referenced. Reviewed by: markj Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Fri Aug 12 16:13:50 2016 (r304009) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Fri Aug 12 18:07:44 2016 (r304010) @@ -1019,6 +1019,20 @@ requeue_page: vm_page_requeue_locked(m); goto drop_page; } + + /* + * Form a cluster with adjacent, dirty pages from the + * same object, and page out that entire cluster. + * + * The adjacent, dirty pages must also be in the + * laundry. However, their mappings are not checked + * for new references. Consequently, a recently + * referenced page may be paged out. However, that + * page will not be prematurely reclaimed. After page + * out, the page will be placed in the inactive queue, + * where any new references will be detected and the + * page reactivated. + */ error = vm_pageout_clean(m, &numpagedout); if (error == 0) { launder -= numpagedout; From owner-svn-src-user@freebsd.org Fri Aug 12 20:30:01 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A38DBBB780A for ; Fri, 12 Aug 2016 20:30:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59A8B1A66; Fri, 12 Aug 2016 20:30:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7CKU0rJ005578; Fri, 12 Aug 2016 20:30:00 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7CKU0kb005576; Fri, 12 Aug 2016 20:30:00 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201608122030.u7CKU0kb005576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 12 Aug 2016 20:30:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r304019 - in user/cperciva/freebsd-update-build/scripts/11.0-RC1: . amd64 i386 X-SVN-Group: user 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.22 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, 12 Aug 2016 20:30:01 -0000 Author: glebius Date: Fri Aug 12 20:30:00 2016 New Revision: 304019 URL: https://svnweb.freebsd.org/changeset/base/304019 Log: Configuration for 11.0-RC1. Added: user/cperciva/freebsd-update-build/scripts/11.0-RC1/ - copied from r304018, user/cperciva/freebsd-update-build/scripts/11.0-BETA4/ Deleted: user/cperciva/freebsd-update-build/scripts/11.0-RC1/build.subr Modified: user/cperciva/freebsd-update-build/scripts/11.0-RC1/amd64/build.conf user/cperciva/freebsd-update-build/scripts/11.0-RC1/i386/build.conf Modified: user/cperciva/freebsd-update-build/scripts/11.0-RC1/amd64/build.conf ============================================================================== --- user/cperciva/freebsd-update-build/scripts/11.0-BETA4/amd64/build.conf Fri Aug 12 19:47:20 2016 (r304018) +++ user/cperciva/freebsd-update-build/scripts/11.0-RC1/amd64/build.conf Fri Aug 12 20:30:00 2016 (r304019) @@ -1,5 +1,5 @@ -export RELH=deadc6daa6aa2bae25846c96bbd0e477608095a8c14f6b1835953341094ff495362f2d211a64f0157c1aa1cafd1b6f8a6ab25f66e2eb001701803b5f666ceaa9 -export FTP=https://people.freebsd.org/~gjb/11.0-BETA4/ +export RELH=3a01f637b46ea62eac9bbe94f367df4df2d9875c00385a078615bbe0fea13e56a1d3c8d0d8b9c4de10aec5b95eebfc6fd60e28f405eebe218ed3bf47c0e7f68f +export FTP=https://people.freebsd.org/~gjb/11.0-RC1/ # Components of the world, source, and kernels export WORLDPARTS="base base-dbg doc lib32 lib32-dbg" @@ -7,4 +7,4 @@ export SOURCEPARTS="src" export KERNELPARTS="kernel kernel-dbg" # EOL date -export EOL=1474588799 +export EOL=1472255999 Modified: user/cperciva/freebsd-update-build/scripts/11.0-RC1/i386/build.conf ============================================================================== --- user/cperciva/freebsd-update-build/scripts/11.0-BETA4/i386/build.conf Fri Aug 12 19:47:20 2016 (r304018) +++ user/cperciva/freebsd-update-build/scripts/11.0-RC1/i386/build.conf Fri Aug 12 20:30:00 2016 (r304019) @@ -1,5 +1,5 @@ -export RELH=8a466c3cb416247042db76ad17c71354e5c032de78476e5008d626693cffca4686325e86332b09031e691f5f3ae9c448ea1e7cc36c2c05679257aa0e92cf78a0 -export FTP=https://people.freebsd.org/~gjb/11.0-BETA4/ +export RELH=80fdfbdd03915241bb83b6e460669fc1ee60f477beb25df2bb4d783609c81a99637cd831dcad73464a7dbb46fb29eaa1a27320d931133153b1d4c92ee02d29cb +export FTP=https://people.freebsd.org/~gjb/11.0-RC1/ # Components of the world, source, and kernels export WORLDPARTS="base base-dbg doc" @@ -7,4 +7,4 @@ export SOURCEPARTS="src" export KERNELPARTS="kernel kernel-dbg" # EOL date -export EOL=1474588799 +export EOL=1472255999 From owner-svn-src-user@freebsd.org Fri Aug 12 20:33:24 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89F0ABB7B57 for ; Fri, 12 Aug 2016 20:33:24 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B1A012B2; Fri, 12 Aug 2016 20:33:24 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7CKXNFE009180; Fri, 12 Aug 2016 20:33:23 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7CKXNmN009179; Fri, 12 Aug 2016 20:33:23 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201608122033.u7CKXNmN009179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 12 Aug 2016 20:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r304020 - user/cperciva/freebsd-update-build/scripts X-SVN-Group: user 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.22 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, 12 Aug 2016 20:33:24 -0000 Author: glebius Date: Fri Aug 12 20:33:23 2016 New Revision: 304020 URL: https://svnweb.freebsd.org/changeset/base/304020 Log: Don't hardcode FTP path, let every release specify its own. Modified: user/cperciva/freebsd-update-build/scripts/build.subr Modified: user/cperciva/freebsd-update-build/scripts/build.subr ============================================================================== --- user/cperciva/freebsd-update-build/scripts/build.subr Fri Aug 12 20:30:00 2016 (r304019) +++ user/cperciva/freebsd-update-build/scripts/build.subr Fri Aug 12 20:33:23 2016 (r304020) @@ -304,7 +304,7 @@ fetchiso () { # Figure out where the dvd1 ISO image is RELNUM=${REL%-*} - ISO=${FTP}/releases/${TARGET}/${TARGET}/ISO-IMAGES/${RELNUM}/FreeBSD-${REL}-${TARGET}-dvd1.iso + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-dvd1.iso # Fetch the ISO image. We consider the ISO image to be # the One True Release and don't look at the files used From owner-svn-src-user@freebsd.org Fri Aug 12 22:48:44 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B35C6BB6518 for ; Fri, 12 Aug 2016 22:48:44 +0000 (UTC) (envelope-from pgollucci@p6m7g8.com) Received: from mail-yb0-x22b.google.com (mail-yb0-x22b.google.com [IPv6:2607:f8b0:4002:c09::22b]) (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 83B5D1F5F for ; Fri, 12 Aug 2016 22:48:44 +0000 (UTC) (envelope-from pgollucci@p6m7g8.com) Received: by mail-yb0-x22b.google.com with SMTP id z96so113532ybh.2 for ; Fri, 12 Aug 2016 15:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=p6m7g8-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LRs6bNZbINK1+ccvFYjHe1L5WvsHU9WKpzcNlZ0wKoQ=; b=atb0er9FRQzkq3Dc8BcD60hmRMLO4rxMkmjvXY/hch8XfOgOn0gNSd19hj208InRWR yUMJBmUzlgHnVhYoY6lrjw2a1G5m61Xw9QYTUMQ9LdPN/kYpES+Nth2S05jPXjBYvgeK rBb7GjD+CLp1S6cxEklt1pxoc3xJV7MH3qxtoGOiu9pmSRUm9hN1mRNA40cubcNO9FTy edZBesITtvUEJ74eVUoC4hdpjCOdLC5f3y257oofYVSfGapVEJXau0P5tMSR40CB1mIg V5grcrPzoaUF6/JOz3WGvCkyN7btrKftco0cGcQ/Iswbkhm23UUVx2S/41XoJkFZwk88 HZNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LRs6bNZbINK1+ccvFYjHe1L5WvsHU9WKpzcNlZ0wKoQ=; b=JBQd9ZvK7VNQwaj2MeybIP243OAqJqDlvlywSK79Rs3TnydiaYXkGF811YGUag37Kt fFwgjNUxuFgp8jHa5Deovu7HLvE7QW6t3ILGciYTj81SLoWGDlG+gGizwe+neBz49pC7 LLK9H6T2NiO35P2O3Rw5Gw1hEcnRH5vFjD17WR8xm8KWjTe0ngc4nh8BjneCXcW2oI50 zdMHJsLZ7wRzLzDgP+IrQpe43ahUyXrfVdCFtii3qHNmHWrGLHOGJMrhZJRxQ9uUBloF w1hk+edK1GoDtxsb3TJPog5eT5UiJZ9PcMYz9T0BUJE61xgoqwuMRDP+uyZX9RqLOf/J /T9w== X-Gm-Message-State: AEkoous85/lDSNEvG0mqQGvyQsxcRE/hxTjS/pf/QFdSi1qlPHgg3qkgZx+Pk2TAGSRAgSHB3QS0FrxZyLe/8g== X-Received: by 10.37.51.132 with SMTP id z126mr11459527ybz.2.1471042123740; Fri, 12 Aug 2016 15:48:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.91.132 with HTTP; Fri, 12 Aug 2016 15:48:03 -0700 (PDT) X-Originating-IP: [108.31.242.218] In-Reply-To: <201608122033.u7CKXNmN009179@repo.freebsd.org> References: <201608122033.u7CKXNmN009179@repo.freebsd.org> From: "Philip M. Gollucci" Date: Fri, 12 Aug 2016 18:48:03 -0400 Message-ID: Subject: Re: svn commit: r304020 - user/cperciva/freebsd-update-build/scripts To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.22 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, 12 Aug 2016 22:48:44 -0000 Thank you! On Fri, Aug 12, 2016 at 4:33 PM, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Aug 12 20:33:23 2016 > New Revision: 304020 > URL: https://svnweb.freebsd.org/changeset/base/304020 > > Log: > Don't hardcode FTP path, let every release specify its own. > > Modified: > user/cperciva/freebsd-update-build/scripts/build.subr > > Modified: user/cperciva/freebsd-update-build/scripts/build.subr > ============================================================ > ================== > --- user/cperciva/freebsd-update-build/scripts/build.subr Fri Aug > 12 20:30:00 2016 (r304019) > +++ user/cperciva/freebsd-update-build/scripts/build.subr Fri Aug > 12 20:33:23 2016 (r304020) > @@ -304,7 +304,7 @@ fetchiso () { > > # Figure out where the dvd1 ISO image is > RELNUM=${REL%-*} > - ISO=${FTP}/releases/${TARGET}/${TARGET}/ISO-IMAGES/${RELNUM} > /FreeBSD-${REL}-${TARGET}-dvd1.iso > + ISO=${FTP}/FreeBSD-${REL}-${TARGET}-dvd1.iso > > # Fetch the ISO image. We consider the ISO image to be > # the One True Release and don't look at the files used > _______________________________________________ > svn-src-user@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-user > To unsubscribe, send any mail to "svn-src-user-unsubscribe@freebsd.org" > -- --------------------------------------------------------------------------------- 4096R/D21D2752 ECDF B597 B54B 7F92 753E E0EA F699 A450 D21D 2752 Philip M. Gollucci (pgollucci@p6m7g8.com) c: 703.336.9354 Member, Apache Software Foundation Committer, FreeBSD Foundation Consultant, P6M7G8 Inc. Director Cloud Technology, Capital One What doesn't kill us can only make us stronger; Except it almost kills you. From owner-svn-src-user@freebsd.org Sat Aug 13 22:57:45 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08F65BB8A3C for ; Sat, 13 Aug 2016 22:57:45 +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 mx1.freebsd.org (Postfix) with ESMTPS id A98981320; Sat, 13 Aug 2016 22:57:44 +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 u7DMvhh1096608; Sat, 13 Aug 2016 22:57:43 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7DMvgWc096589; Sat, 13 Aug 2016 22:57:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201608132257.u7DMvgWc096589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 13 Aug 2016 22:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r304063 - in user/alc/PQ_LAUNDRY: . bin/ps cddl/contrib/opensolaris/tools/ctf/cvt lib/libc/gen lib/libc/net lib/libc/tests/resolv lib/libsysdecode libexec/rtld-elf sbin/ipfw share/misc ... X-SVN-Group: user 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.22 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, 13 Aug 2016 22:57:45 -0000 Author: markj Date: Sat Aug 13 22:57:41 2016 New Revision: 304063 URL: https://svnweb.freebsd.org/changeset/base/304063 Log: MFH r304062 Added: user/alc/PQ_LAUNDRY/lib/libc/gen/dirname_compat.c - copied unchanged from r304062, head/lib/libc/gen/dirname_compat.c user/alc/PQ_LAUNDRY/libexec/rtld-elf/rtld_utrace.h - copied unchanged from r304062, head/libexec/rtld-elf/rtld_utrace.h user/alc/PQ_LAUNDRY/sbin/ipfw/nat64lsn.c - copied unchanged from r304062, head/sbin/ipfw/nat64lsn.c user/alc/PQ_LAUNDRY/sbin/ipfw/nat64stl.c - copied unchanged from r304062, head/sbin/ipfw/nat64stl.c user/alc/PQ_LAUNDRY/sys/kern/subr_gtaskqueue.c - copied unchanged from r304062, head/sys/kern/subr_gtaskqueue.c user/alc/PQ_LAUNDRY/sys/modules/ipfw_nat64/ - copied from r304062, head/sys/modules/ipfw_nat64/ user/alc/PQ_LAUNDRY/sys/netinet6/ip_fw_nat64.h - copied unchanged from r304062, head/sys/netinet6/ip_fw_nat64.h user/alc/PQ_LAUNDRY/sys/netpfil/ipfw/ip_fw_bpf.c - copied unchanged from r304062, head/sys/netpfil/ipfw/ip_fw_bpf.c user/alc/PQ_LAUNDRY/sys/netpfil/ipfw/nat64/ - copied from r304062, head/sys/netpfil/ipfw/nat64/ user/alc/PQ_LAUNDRY/sys/sys/gtaskqueue.h - copied unchanged from r304062, head/sys/sys/gtaskqueue.h Modified: user/alc/PQ_LAUNDRY/Makefile user/alc/PQ_LAUNDRY/Makefile.inc1 user/alc/PQ_LAUNDRY/bin/ps/ps.1 user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c user/alc/PQ_LAUNDRY/lib/libc/gen/Makefile.inc user/alc/PQ_LAUNDRY/lib/libc/gen/Symbol.map user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.3 user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.c user/alc/PQ_LAUNDRY/lib/libc/net/getaddrinfo.c user/alc/PQ_LAUNDRY/lib/libc/tests/resolv/resolv_test.c user/alc/PQ_LAUNDRY/lib/libsysdecode/Makefile user/alc/PQ_LAUNDRY/lib/libsysdecode/utrace.c user/alc/PQ_LAUNDRY/libexec/rtld-elf/rtld.c user/alc/PQ_LAUNDRY/sbin/ipfw/Makefile user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw.8 user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw2.c user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw2.h user/alc/PQ_LAUNDRY/sbin/ipfw/main.c user/alc/PQ_LAUNDRY/sbin/ipfw/nptv6.c user/alc/PQ_LAUNDRY/sbin/ipfw/tables.c user/alc/PQ_LAUNDRY/share/misc/committers-src.dot user/alc/PQ_LAUNDRY/share/timedef/af_ZA.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/am_ET.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/ar_JO.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/ar_MA.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/ar_SA.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/be_BY.CP1131.src user/alc/PQ_LAUNDRY/share/timedef/be_BY.CP1251.src user/alc/PQ_LAUNDRY/share/timedef/be_BY.ISO8859-5.src user/alc/PQ_LAUNDRY/share/timedef/be_BY.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/bg_BG.CP1251.src user/alc/PQ_LAUNDRY/share/timedef/bg_BG.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/ca_IT.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/ca_IT.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/cs_CZ.ISO8859-2.src user/alc/PQ_LAUNDRY/share/timedef/cs_CZ.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/da_DK.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/da_DK.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/de_AT.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/de_AT.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/de_DE.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/de_DE.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/el_GR.ISO8859-7.src user/alc/PQ_LAUNDRY/share/timedef/el_GR.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/en_CA.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/en_GB.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/en_IE.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/en_PH.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/en_SG.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/en_US.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/en_ZA.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/es_AR.ISO8859-1.src user/alc/PQ_LAUNDRY/share/timedef/es_CR.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/es_ES.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/es_ES.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/es_MX.ISO8859-1.src user/alc/PQ_LAUNDRY/share/timedef/es_MX.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/et_EE.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/eu_ES.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/fi_FI.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/fi_FI.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/fr_BE.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/fr_BE.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/fr_CA.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/fr_CA.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/fr_CH.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/fr_CH.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/fr_FR.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/fr_FR.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/he_IL.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/hi_IN.ISCII-DEV.src user/alc/PQ_LAUNDRY/share/timedef/hi_IN.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/hr_HR.ISO8859-2.src user/alc/PQ_LAUNDRY/share/timedef/hr_HR.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/hu_HU.ISO8859-2.src user/alc/PQ_LAUNDRY/share/timedef/hu_HU.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/hy_AM.ARMSCII-8.src user/alc/PQ_LAUNDRY/share/timedef/hy_AM.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/is_IS.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/is_IS.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/it_CH.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/it_CH.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/it_IT.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/it_IT.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/ja_JP.SJIS.src user/alc/PQ_LAUNDRY/share/timedef/ja_JP.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/ja_JP.eucJP.src user/alc/PQ_LAUNDRY/share/timedef/kk_KZ.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/ko_KR.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/ko_KR.eucKR.src user/alc/PQ_LAUNDRY/share/timedef/lt_LT.ISO8859-13.src user/alc/PQ_LAUNDRY/share/timedef/lt_LT.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/lv_LV.ISO8859-13.src user/alc/PQ_LAUNDRY/share/timedef/lv_LV.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/mn_MN.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/nb_NO.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/nb_NO.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/nl_BE.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/nl_NL.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/nn_NO.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/nn_NO.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/pl_PL.ISO8859-2.src user/alc/PQ_LAUNDRY/share/timedef/pl_PL.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/pt_BR.ISO8859-1.src user/alc/PQ_LAUNDRY/share/timedef/pt_BR.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/pt_PT.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/pt_PT.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/ro_RO.ISO8859-2.src user/alc/PQ_LAUNDRY/share/timedef/ro_RO.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/ru_RU.CP1251.src user/alc/PQ_LAUNDRY/share/timedef/ru_RU.CP866.src user/alc/PQ_LAUNDRY/share/timedef/ru_RU.ISO8859-5.src user/alc/PQ_LAUNDRY/share/timedef/ru_RU.KOI8-R.src user/alc/PQ_LAUNDRY/share/timedef/ru_RU.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/se_FI.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/se_NO.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/sk_SK.ISO8859-2.src user/alc/PQ_LAUNDRY/share/timedef/sk_SK.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/sl_SI.ISO8859-2.src user/alc/PQ_LAUNDRY/share/timedef/sl_SI.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/sr_RS.ISO8859-2.src user/alc/PQ_LAUNDRY/share/timedef/sr_RS.ISO8859-5.src user/alc/PQ_LAUNDRY/share/timedef/sr_RS.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/sr_RS.UTF-8@latin.src user/alc/PQ_LAUNDRY/share/timedef/sv_FI.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/sv_SE.ISO8859-15.src user/alc/PQ_LAUNDRY/share/timedef/sv_SE.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/tr_TR.ISO8859-9.src user/alc/PQ_LAUNDRY/share/timedef/tr_TR.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/uk_UA.CP1251.src user/alc/PQ_LAUNDRY/share/timedef/uk_UA.ISO8859-5.src user/alc/PQ_LAUNDRY/share/timedef/uk_UA.KOI8-U.src user/alc/PQ_LAUNDRY/share/timedef/uk_UA.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/zh_CN.GB2312.src user/alc/PQ_LAUNDRY/share/timedef/zh_CN.GBK.src user/alc/PQ_LAUNDRY/share/timedef/zh_CN.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/zh_CN.eucCN.src user/alc/PQ_LAUNDRY/share/timedef/zh_HK.UTF-8.src user/alc/PQ_LAUNDRY/share/timedef/zh_TW.Big5.src user/alc/PQ_LAUNDRY/share/timedef/zh_TW.UTF-8.src user/alc/PQ_LAUNDRY/sys/arm64/arm64/pmap.c user/alc/PQ_LAUNDRY/sys/arm64/arm64/trap.c user/alc/PQ_LAUNDRY/sys/arm64/include/pmap.h user/alc/PQ_LAUNDRY/sys/boot/efi/loader/Makefile user/alc/PQ_LAUNDRY/sys/conf/NOTES user/alc/PQ_LAUNDRY/sys/conf/files user/alc/PQ_LAUNDRY/sys/conf/kern.post.mk user/alc/PQ_LAUNDRY/sys/conf/options user/alc/PQ_LAUNDRY/sys/dev/filemon/filemon.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_rndis.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/if_hnreg.h user/alc/PQ_LAUNDRY/sys/fs/nfs/nfs_commonkrpc.c user/alc/PQ_LAUNDRY/sys/fs/nfs/nfs_commonport.c user/alc/PQ_LAUNDRY/sys/fs/nfs/nfsport.h user/alc/PQ_LAUNDRY/sys/fs/nfs/nfsproto.h user/alc/PQ_LAUNDRY/sys/fs/nfsclient/nfs_clbio.c user/alc/PQ_LAUNDRY/sys/fs/nfsclient/nfs_clcomsubs.c user/alc/PQ_LAUNDRY/sys/fs/nfsclient/nfs_clstate.c user/alc/PQ_LAUNDRY/sys/fs/nfsclient/nfs_clsubs.c user/alc/PQ_LAUNDRY/sys/fs/nfsclient/nfs_clvfsops.c user/alc/PQ_LAUNDRY/sys/fs/nfsclient/nfs_clvnops.c user/alc/PQ_LAUNDRY/sys/fs/nfsserver/nfs_nfsdcache.c user/alc/PQ_LAUNDRY/sys/fs/nfsserver/nfs_nfsdport.c user/alc/PQ_LAUNDRY/sys/fs/nfsserver/nfs_nfsdsocket.c user/alc/PQ_LAUNDRY/sys/fs/nfsserver/nfs_nfsdstate.c user/alc/PQ_LAUNDRY/sys/kern/kern_exec.c user/alc/PQ_LAUNDRY/sys/kern/subr_taskqueue.c user/alc/PQ_LAUNDRY/sys/kern/vfs_subr.c user/alc/PQ_LAUNDRY/sys/kern/vnode_if.src user/alc/PQ_LAUNDRY/sys/modules/Makefile user/alc/PQ_LAUNDRY/sys/modules/ipfw/Makefile user/alc/PQ_LAUNDRY/sys/net/ifdi_if.m user/alc/PQ_LAUNDRY/sys/net/iflib.c user/alc/PQ_LAUNDRY/sys/net/iflib.h user/alc/PQ_LAUNDRY/sys/netinet/ip_fw.h user/alc/PQ_LAUNDRY/sys/netpfil/ipfw/ip_fw2.c user/alc/PQ_LAUNDRY/sys/netpfil/ipfw/ip_fw_log.c user/alc/PQ_LAUNDRY/sys/netpfil/ipfw/ip_fw_private.h user/alc/PQ_LAUNDRY/sys/netpfil/ipfw/ip_fw_table.c user/alc/PQ_LAUNDRY/sys/netpfil/ipfw/nptv6/nptv6.c user/alc/PQ_LAUNDRY/sys/powerpc/aim/locore.S user/alc/PQ_LAUNDRY/sys/powerpc/booke/locore.S user/alc/PQ_LAUNDRY/sys/powerpc/booke/pmap.c user/alc/PQ_LAUNDRY/sys/powerpc/mpc85xx/platform_mpc85xx.c user/alc/PQ_LAUNDRY/sys/powerpc/powerpc/machdep.c user/alc/PQ_LAUNDRY/sys/powerpc/powerpc/mmu_if.m user/alc/PQ_LAUNDRY/sys/powerpc/powerpc/pmap_dispatch.c user/alc/PQ_LAUNDRY/sys/sys/_task.h user/alc/PQ_LAUNDRY/sys/sys/taskqueue.h user/alc/PQ_LAUNDRY/sys/vm/vm_page.c user/alc/PQ_LAUNDRY/sys/vm/vm_phys.c user/alc/PQ_LAUNDRY/tests/sys/acl/00.sh user/alc/PQ_LAUNDRY/tests/sys/acl/01.sh user/alc/PQ_LAUNDRY/tests/sys/acl/02.sh user/alc/PQ_LAUNDRY/tests/sys/acl/03.sh user/alc/PQ_LAUNDRY/tests/sys/acl/04.sh user/alc/PQ_LAUNDRY/usr.bin/kdump/kdump.c user/alc/PQ_LAUNDRY/usr.bin/nfsstat/nfsstat.1 user/alc/PQ_LAUNDRY/usr.bin/nfsstat/nfsstat.c user/alc/PQ_LAUNDRY/usr.sbin/acpi/acpidump/acpi.c Directory Properties: user/alc/PQ_LAUNDRY/ (props changed) user/alc/PQ_LAUNDRY/cddl/ (props changed) user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/ (props changed) Modified: user/alc/PQ_LAUNDRY/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/Makefile Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/Makefile Sat Aug 13 22:57:41 2016 (r304063) @@ -209,7 +209,8 @@ SUB_MAKE= `test -x ${MYMAKE} && echo ${M SUB_MAKE= ${MAKE} -m ${.CURDIR}/share/mk .endif -_MAKE= PATH=${PATH} ${SUB_MAKE} -f Makefile.inc1 TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH} +_MAKE= PATH=${PATH} MAKE_CMD=${MAKE} ${SUB_MAKE} -f Makefile.inc1 \ + TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH} # Only allow meta mode for the whitelisted targets. See META_TGT_WHITELIST # above. Modified: user/alc/PQ_LAUNDRY/Makefile.inc1 ============================================================================== --- user/alc/PQ_LAUNDRY/Makefile.inc1 Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/Makefile.inc1 Sat Aug 13 22:57:41 2016 (r304063) @@ -2378,11 +2378,11 @@ check-old-dirs: .PHONY done delete-old: delete-old-files delete-old-dirs .PHONY - @echo "To remove old libraries run '${MAKE} delete-old-libs'." + @echo "To remove old libraries run '${MAKE_CMD} delete-old-libs'." check-old: check-old-files check-old-libs check-old-dirs .PHONY - @echo "To remove old files and directories run '${MAKE} delete-old'." - @echo "To remove old libraries run '${MAKE} delete-old-libs'." + @echo "To remove old files and directories run '${MAKE_CMD} delete-old'." + @echo "To remove old libraries run '${MAKE_CMD} delete-old-libs'." .endif Modified: user/alc/PQ_LAUNDRY/bin/ps/ps.1 ============================================================================== --- user/alc/PQ_LAUNDRY/bin/ps/ps.1 Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/bin/ps/ps.1 Sat Aug 13 22:57:41 2016 (r304063) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd July 28, 2016 +.Dd August 12, 2016 .Dt PS 1 .Os .Sh NAME @@ -319,7 +319,6 @@ the include file .It Dv "P_ADVLOCK" Ta No "0x00001" Ta "Process may hold a POSIX advisory lock" .It Dv "P_CONTROLT" Ta No "0x00002" Ta "Has a controlling terminal" .It Dv "P_KPROC" Ta No "0x00004" Ta "Kernel process" -.It Dv "P_FOLLOWFORK" Ta No "0x00008" Ta "Attach debugger to new children" .It Dv "P_PPWAIT" Ta No "0x00010" Ta "Parent is waiting for child to exec/exit" .It Dv "P_PROFIL" Ta No "0x00020" Ta "Has started profiling" .It Dv "P_STOPPROF" Ta No "0x00040" Ta "Has thread in requesting to stop prof" @@ -768,7 +767,8 @@ operating systems. The .Nm command appeared in -.At v4 . +.At v3 +in section 8 of the manual. .Sh BUGS Since .Nm Modified: user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c ============================================================================== --- user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Aug 13 22:57:41 2016 (r304063) @@ -816,6 +816,11 @@ die_enum_create(dwarf_t *dw, Dwarf_Die d Dwarf_Unsigned uval; Dwarf_Signed sval; + if (die_isdecl(dw, die)) { + tdp->t_type = FORWARD; + return; + } + debug(3, "die %llu: creating enum\n", off); tdp->t_type = ENUM; Modified: user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c ============================================================================== --- user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Sat Aug 13 22:57:41 2016 (r304063) @@ -338,7 +338,8 @@ fwd_equiv(tdesc_t *ctdp, tdesc_t *mtdp) { tdesc_t *defn = (ctdp->t_type == FORWARD ? mtdp : ctdp); - return (defn->t_type == STRUCT || defn->t_type == UNION); + return (defn->t_type == STRUCT || defn->t_type == UNION || + defn->t_type == ENUM); } static int Modified: user/alc/PQ_LAUNDRY/lib/libc/gen/Makefile.inc ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/gen/Makefile.inc Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/lib/libc/gen/Makefile.inc Sat Aug 13 22:57:41 2016 (r304063) @@ -29,6 +29,7 @@ SRCS+= __getosreldate.c \ devname.c \ dirfd.c \ dirname.c \ + dirname_compat.c \ disklabel.c \ dlfcn.c \ drand48.c \ Modified: user/alc/PQ_LAUNDRY/lib/libc/gen/Symbol.map ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/gen/Symbol.map Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/lib/libc/gen/Symbol.map Sat Aug 13 22:57:41 2016 (r304063) @@ -82,7 +82,6 @@ FBSD_1.0 { daemon; devname; devname_r; - dirname; getdiskbyname; dladdr; dlclose; @@ -418,6 +417,10 @@ FBSD_1.4 { stravis; }; +FBSD_1.5 { + dirname; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; Modified: user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.3 ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.3 Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.3 Sat Aug 13 22:57:41 2016 (r304063) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 29, 2016 +.Dd August 12, 2016 .Dt DIRNAME 3 .Os .Sh NAME @@ -37,6 +37,7 @@ Any trailing .Sq \&/ characters are not counted as part of the directory name. +.Sh RETURN VALUES If .Fa path is a null pointer, the empty string, or contains no @@ -46,40 +47,24 @@ characters, returns a pointer to the string .Qq \&. , signifying the current directory. +Otherwise, +it returns a pointer to the parent directory of +.Fa path . .Sh IMPLEMENTATION NOTES -The +This implementation of .Fn dirname -function -returns a pointer to internal storage space allocated on the first call -that will be overwritten -by subsequent calls. +uses the buffer provided by the caller to store the resulting parent +directory. +Other vendor implementations may return a pointer to internal storage +space instead. +The advantage of the former approach is that it ensures thread-safety, +while also placing no upper limit on the supported length of the +pathname. .Pp -Other vendor implementations of -.Fn dirname -may store their result in the input buffer, -making it safe to use in multithreaded applications. -Future versions of -.Fx -will follow this approach as well. -.Sh RETURN VALUES -On successful completion, -.Fn dirname -returns a pointer to the parent directory of -.Fa path . -.Pp -If -.Fn dirname -fails, a null pointer is returned and the global variable -.Va errno -is set to indicate the error. -.Sh ERRORS -The following error codes may be set in -.Va errno : -.Bl -tag -width Er -.It Bq Er ENAMETOOLONG -The path component to be returned was larger than -.Dv MAXPATHLEN . -.El +The algorithm used by this implementation also discards redundant +slashes and +.Qq \&. +pathname components from the pathname string. .Sh SEE ALSO .Xr basename 1 , .Xr dirname 1 , @@ -96,5 +81,10 @@ function first appeared in .Ox 2.2 and .Fx 4.2 . +.Pp +In +.Fx 12.0 , +this function was reimplemented to store its result in the provided +input buffer. .Sh AUTHORS -.An "Todd C. Miller" +.An Nuxi, the Netherlands Modified: user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.c Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/lib/libc/gen/dirname.c Sat Aug 13 22:57:41 2016 (r304063) @@ -1,77 +1,90 @@ -/* $OpenBSD: dirname.c,v 1.13 2005/08/08 08:05:33 espie Exp $ */ - -/* - * Copyright (c) 1997, 2004 Todd C. Miller +/*- + * Copyright (c) 2015-2016 Nuxi, https://nuxi.nl/ * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. + * 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. * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); -#include #include -#include +#include #include -#include char * dirname(char *path) { - static char *dname = NULL; - size_t len; - const char *endp; - - if (dname == NULL) { - dname = (char *)malloc(MAXPATHLEN); - if (dname == NULL) - return(NULL); - } - - /* Empty or NULL string gets treated as "." */ - if (path == NULL || *path == '\0') { - dname[0] = '.'; - dname[1] = '\0'; - return (dname); + const char *in, *prev, *begin, *end; + char *out; + size_t prevlen; + bool skipslash; + + /* + * If path is a null pointer or points to an empty string, + * dirname() shall return a pointer to the string ".". + */ + if (path == NULL || *path == '\0') + return ((char *)"."); + + /* Retain at least one leading slash character. */ + in = out = *path == '/' ? path + 1 : path; + + skipslash = true; + prev = "."; + prevlen = 1; + for (;;) { + /* Extract the next pathname component. */ + while (*in == '/') + ++in; + begin = in; + while (*in != '/' && *in != '\0') + ++in; + end = in; + if (begin == end) + break; + + /* + * Copy over the previous pathname component, except if + * it's dot. There is no point in retaining those. + */ + if (prevlen != 1 || *prev != '.') { + if (!skipslash) + *out++ = '/'; + skipslash = false; + memmove(out, prev, prevlen); + out += prevlen; + } + + /* Preserve the pathname component for the next iteration. */ + prev = begin; + prevlen = end - begin; } - /* Strip any trailing slashes */ - endp = path + strlen(path) - 1; - while (endp > path && *endp == '/') - endp--; - - /* Find the start of the dir */ - while (endp > path && *endp != '/') - endp--; - - /* Either the dir is "/" or there are no slashes */ - if (endp == path) { - dname[0] = *endp == '/' ? '/' : '.'; - dname[1] = '\0'; - return (dname); - } else { - /* Move forward past the separating slashes */ - do { - endp--; - } while (endp > path && *endp == '/'); - } - - len = endp - path + 1; - if (len >= MAXPATHLEN) { - errno = ENAMETOOLONG; - return (NULL); - } - memcpy(dname, path, len); - dname[len] = '\0'; - return (dname); + /* + * If path does not contain a '/', then dirname() shall return a + * pointer to the string ".". + */ + if (out == path) + *out++ = '.'; + *out = '\0'; + return (path); } Copied: user/alc/PQ_LAUNDRY/lib/libc/gen/dirname_compat.c (from r304062, head/lib/libc/gen/dirname_compat.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/alc/PQ_LAUNDRY/lib/libc/gen/dirname_compat.c Sat Aug 13 22:57:41 2016 (r304063, copy of r304062, head/lib/libc/gen/dirname_compat.c) @@ -0,0 +1,79 @@ +/* $OpenBSD: dirname.c,v 1.13 2005/08/08 08:05:33 espie Exp $ */ + +/* + * Copyright (c) 1997, 2004 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +char * +__freebsd11_dirname(char *path) +{ + static char *dname = NULL; + size_t len; + const char *endp; + + if (dname == NULL) { + dname = (char *)malloc(MAXPATHLEN); + if (dname == NULL) + return(NULL); + } + + /* Empty or NULL string gets treated as "." */ + if (path == NULL || *path == '\0') { + dname[0] = '.'; + dname[1] = '\0'; + return (dname); + } + + /* Strip any trailing slashes */ + endp = path + strlen(path) - 1; + while (endp > path && *endp == '/') + endp--; + + /* Find the start of the dir */ + while (endp > path && *endp != '/') + endp--; + + /* Either the dir is "/" or there are no slashes */ + if (endp == path) { + dname[0] = *endp == '/' ? '/' : '.'; + dname[1] = '\0'; + return (dname); + } else { + /* Move forward past the separating slashes */ + do { + endp--; + } while (endp > path && *endp == '/'); + } + + len = endp - path + 1; + if (len >= MAXPATHLEN) { + errno = ENAMETOOLONG; + return (NULL); + } + memcpy(dname, path, len); + dname[len] = '\0'; + return (dname); +} + +__sym_compat(dirname, __freebsd11_dirname, FBSD_1.0); Modified: user/alc/PQ_LAUNDRY/lib/libc/net/getaddrinfo.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/net/getaddrinfo.c Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/lib/libc/net/getaddrinfo.c Sat Aug 13 22:57:41 2016 (r304063) @@ -2249,6 +2249,8 @@ _dns_getaddrinfo(void *rv, void *cb_data struct res_target q, q2; res_state res; + ai = NULL; + hostname = va_arg(ap, char *); pai = va_arg(ap, const struct addrinfo *); @@ -2327,16 +2329,16 @@ _dns_getaddrinfo(void *rv, void *cb_data /* prefer IPv6 */ if (q.next) { ai = getanswer(buf2, q2.n, q2.name, q2.qtype, pai, res); - if (ai) { + if (ai != NULL) { cur->ai_next = ai; while (cur && cur->ai_next) cur = cur->ai_next; } } - if (!ai || pai->ai_family != AF_UNSPEC || + if (ai == NULL || pai->ai_family != AF_UNSPEC || (pai->ai_flags & (AI_ALL | AI_V4MAPPED)) != AI_V4MAPPED) { ai = getanswer(buf, q.n, q.name, q.qtype, pai, res); - if (ai) + if (ai != NULL) cur->ai_next = ai; } free(buf); Modified: user/alc/PQ_LAUNDRY/lib/libc/tests/resolv/resolv_test.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/tests/resolv/resolv_test.c Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/lib/libc/tests/resolv/resolv_test.c Sat Aug 13 22:57:41 2016 (r304063) @@ -291,7 +291,7 @@ do { \ ATF_TC(getaddrinfo_test); ATF_TC_HEAD(getaddrinfo_test, tc) { - atf_tc_set_md_var(tc, "timeout", "450"); + atf_tc_set_md_var(tc, "timeout", "1200"); } ATF_TC_BODY(getaddrinfo_test, tc) { @@ -301,7 +301,7 @@ ATF_TC_BODY(getaddrinfo_test, tc) ATF_TC(gethostby_test); ATF_TC_HEAD(gethostby_test, tc) { - atf_tc_set_md_var(tc, "timeout", "450"); + atf_tc_set_md_var(tc, "timeout", "1200"); } ATF_TC_BODY(gethostby_test, tc) { @@ -312,7 +312,7 @@ ATF_TC_BODY(gethostby_test, tc) ATF_TC(getipnodeby_test); ATF_TC_HEAD(getipnodeby_test, tc) { - atf_tc_set_md_var(tc, "timeout", "450"); + atf_tc_set_md_var(tc, "timeout", "1200"); } ATF_TC_BODY(getipnodeby_test, tc) { Modified: user/alc/PQ_LAUNDRY/lib/libsysdecode/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libsysdecode/Makefile Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/lib/libsysdecode/Makefile Sat Aug 13 22:57:41 2016 (r304063) @@ -9,6 +9,7 @@ SRCS= errno.c ioctl.c syscallnames.c utr INCS= sysdecode.h CFLAGS+= -I${.CURDIR}/../../sys +CFLAGS+= -I${.CURDIR}/../../libexec/rtld-elf MAN+= sysdecode.3 \ sysdecode_abi_to_freebsd_errno.3 \ Modified: user/alc/PQ_LAUNDRY/lib/libsysdecode/utrace.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libsysdecode/utrace.c Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/lib/libsysdecode/utrace.c Sat Aug 13 22:57:41 2016 (r304063) @@ -33,31 +33,21 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include +#include "rtld_utrace.h" -#define UTRACE_DLOPEN_START 1 -#define UTRACE_DLOPEN_STOP 2 -#define UTRACE_DLCLOSE_START 3 -#define UTRACE_DLCLOSE_STOP 4 -#define UTRACE_LOAD_OBJECT 5 -#define UTRACE_UNLOAD_OBJECT 6 -#define UTRACE_ADD_RUNDEP 7 -#define UTRACE_PRELOAD_FINISHED 8 -#define UTRACE_INIT_CALL 9 -#define UTRACE_FINI_CALL 10 -#define UTRACE_DLSYM_START 11 -#define UTRACE_DLSYM_STOP 12 - -struct utrace_rtld { - char sig[4]; /* 'RTLD' */ +#ifdef __LP64__ +struct utrace_rtld32 { + char sig[4]; int event; - void *handle; - void *mapbase; - size_t mapsize; + uint32_t handle; + uint32_t mapbase; + uint32_t mapsize; int refcnt; char name[MAXPATHLEN]; }; +#endif static int print_utrace_rtld(FILE *fp, void *p) @@ -145,6 +135,14 @@ struct utrace_malloc { void *r; }; +#ifdef __LP64__ +struct utrace_malloc32 { + uint32_t p; + uint32_t s; + uint32_t r; +}; +#endif + static void print_utrace_malloc(FILE *fp, void *p) { @@ -163,15 +161,49 @@ print_utrace_malloc(FILE *fp, void *p) int sysdecode_utrace(FILE *fp, void *p, size_t len) { +#ifdef __LP64__ + struct utrace_rtld ur; + struct utrace_rtld32 *pr; + struct utrace_malloc um; + struct utrace_malloc32 *pm; +#endif + static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] = RTLD_UTRACE_SIG; - if (len == sizeof(struct utrace_rtld) && bcmp(p, "RTLD", 4) == 0) { + if (len == sizeof(struct utrace_rtld) && bcmp(p, rtld_utrace_sig, + sizeof(rtld_utrace_sig)) == 0) return (print_utrace_rtld(fp, p)); - } if (len == sizeof(struct utrace_malloc)) { print_utrace_malloc(fp, p); return (1); } - + +#ifdef __LP64__ + if (len == sizeof(struct utrace_rtld32) && bcmp(p, rtld_utrace_sig, + sizeof(rtld_utrace_sig)) == 0) { + pr = p; + memset(&ur, 0, sizeof(ur)); + memcpy(ur.sig, pr->sig, sizeof(ur.sig)); + ur.event = pr->event; + ur.handle = (void *)(uintptr_t)pr->handle; + ur.mapbase = (void *)(uintptr_t)pr->mapbase; + ur.mapsize = pr->mapsize; + ur.refcnt = pr->refcnt; + memcpy(ur.name, pr->name, sizeof(ur.name)); + return (print_utrace_rtld(fp, &ur)); + } + + if (len == sizeof(struct utrace_malloc32)) { + pm = p; + memset(&um, 0, sizeof(um)); + um.p = pm->p == (uint32_t)-1 ? (void *)(intptr_t)-1 : + (void *)(uintptr_t)pm->p; + um.s = pm->s; + um.r = (void *)(uintptr_t)pm->r; + print_utrace_malloc(fp, &um); + return (1); + } +#endif + return (0); } Modified: user/alc/PQ_LAUNDRY/libexec/rtld-elf/rtld.c ============================================================================== --- user/alc/PQ_LAUNDRY/libexec/rtld-elf/rtld.c Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/libexec/rtld-elf/rtld.c Sat Aug 13 22:57:41 2016 (r304063) @@ -59,6 +59,7 @@ #include "paths.h" #include "rtld_tls.h" #include "rtld_printf.h" +#include "rtld_utrace.h" #include "notes.h" /* Types. */ @@ -273,29 +274,6 @@ char *ld_env_prefix = LD_; (dlp)->num_alloc = obj_count, \ (dlp)->num_used = 0) -#define UTRACE_DLOPEN_START 1 -#define UTRACE_DLOPEN_STOP 2 -#define UTRACE_DLCLOSE_START 3 -#define UTRACE_DLCLOSE_STOP 4 -#define UTRACE_LOAD_OBJECT 5 -#define UTRACE_UNLOAD_OBJECT 6 -#define UTRACE_ADD_RUNDEP 7 -#define UTRACE_PRELOAD_FINISHED 8 -#define UTRACE_INIT_CALL 9 -#define UTRACE_FINI_CALL 10 -#define UTRACE_DLSYM_START 11 -#define UTRACE_DLSYM_STOP 12 - -struct utrace_rtld { - char sig[4]; /* 'RTLD' */ - int event; - void *handle; - void *mapbase; /* Used for 'parent' and 'init/fini' */ - size_t mapsize; - int refcnt; /* Used for 'mode' */ - char name[MAXPATHLEN]; -}; - #define LD_UTRACE(e, h, mb, ms, r, n) do { \ if (ld_utrace != NULL) \ ld_utrace_log(e, h, mb, ms, r, n); \ @@ -306,11 +284,9 @@ ld_utrace_log(int event, void *handle, v int refcnt, const char *name) { struct utrace_rtld ut; + static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] = RTLD_UTRACE_SIG; - ut.sig[0] = 'R'; - ut.sig[1] = 'T'; - ut.sig[2] = 'L'; - ut.sig[3] = 'D'; + memcpy(ut.sig, rtld_utrace_sig, sizeof(ut.sig)); ut.event = event; ut.handle = handle; ut.mapbase = mapbase; @@ -1916,6 +1892,7 @@ static void init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) { Obj_Entry objtmp; /* Temporary rtld object */ + const Elf_Ehdr *ehdr; const Elf_Dyn *dyn_rpath; const Elf_Dyn *dyn_soname; const Elf_Dyn *dyn_runpath; @@ -1954,6 +1931,9 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo * relocate_objects(&objtmp, true, &objtmp, 0, NULL); } + ehdr = (Elf_Ehdr *)mapbase; + objtmp.phdr = (Elf_Phdr *)((char *)mapbase + ehdr->e_phoff); + objtmp.phsize = ehdr->e_phnum * sizeof(objtmp.phdr[0]); /* Initialize the object list. */ TAILQ_INIT(&obj_list); @@ -2164,8 +2144,7 @@ load_needed_objects(Obj_Entry *first, in { Obj_Entry *obj; - obj = first; - TAILQ_FOREACH_FROM(obj, &obj_list, next) { + for (obj = first; obj != NULL; obj = TAILQ_NEXT(obj, next)) { if (obj->marker) continue; if (process_needed(obj, obj->needed, flags) == -1) @@ -2769,9 +2748,8 @@ relocate_objects(Obj_Entry *first, bool Obj_Entry *obj; int error; - error = 0; - obj = first; - TAILQ_FOREACH_FROM(obj, &obj_list, next) { + for (error = 0, obj = first; obj != NULL; + obj = TAILQ_NEXT(obj, next)) { if (obj->marker) continue; error = relocate_object(obj, bind_now, rtldobj, flags, @@ -2811,8 +2789,7 @@ resolve_objects_ifunc(Obj_Entry *first, { Obj_Entry *obj; - obj = first; - TAILQ_FOREACH_FROM(obj, &obj_list, next) { + for (obj = first; obj != NULL; obj = TAILQ_NEXT(obj, next)) { if (obj->marker) continue; if (resolve_object_ifunc(obj, bind_now, flags, lockstate) == -1) @@ -4316,7 +4293,7 @@ trace_loaded_objects(Obj_Entry *obj) list_containers = getenv(_LD("TRACE_LOADED_OBJECTS_ALL")); - TAILQ_FOREACH_FROM(obj, &obj_list, next) { + for (; obj != NULL; obj = TAILQ_NEXT(obj, next)) { Needed_Entry *needed; char *name, *path; bool is_lib; @@ -4661,8 +4638,7 @@ allocate_tls(Obj_Entry *objs, void *oldt */ free_tls(oldtls, 2*sizeof(Elf_Addr), sizeof(Elf_Addr)); } else { - obj = objs; - TAILQ_FOREACH_FROM(obj, &obj_list, next) { + for (obj = objs; obj != NULL; obj = TAILQ_NEXT(obj, next)) { if (obj->marker || obj->tlsoffset == 0) continue; addr = segbase - obj->tlsoffset; Copied: user/alc/PQ_LAUNDRY/libexec/rtld-elf/rtld_utrace.h (from r304062, head/libexec/rtld-elf/rtld_utrace.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/alc/PQ_LAUNDRY/libexec/rtld-elf/rtld_utrace.h Sat Aug 13 22:57:41 2016 (r304063, copy of r304062, head/libexec/rtld-elf/rtld_utrace.h) @@ -0,0 +1,62 @@ +/*- + * Copyright (c) 2007 John Baldwin + * + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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$ + */ + +#ifndef RTLD_UTRACE_H +#define RTLD_UTRACE_H + +#include + +#define UTRACE_DLOPEN_START 1 +#define UTRACE_DLOPEN_STOP 2 +#define UTRACE_DLCLOSE_START 3 +#define UTRACE_DLCLOSE_STOP 4 +#define UTRACE_LOAD_OBJECT 5 +#define UTRACE_UNLOAD_OBJECT 6 +#define UTRACE_ADD_RUNDEP 7 +#define UTRACE_PRELOAD_FINISHED 8 +#define UTRACE_INIT_CALL 9 +#define UTRACE_FINI_CALL 10 +#define UTRACE_DLSYM_START 11 +#define UTRACE_DLSYM_STOP 12 + +#define RTLD_UTRACE_SIG_SZ 4 +#define RTLD_UTRACE_SIG "RTLD" + +struct utrace_rtld { + char sig[RTLD_UTRACE_SIG_SZ]; + int event; + void *handle; + void *mapbase; /* Used for 'parent' and 'init/fini' */ + size_t mapsize; + int refcnt; /* Used for 'mode' */ + char name[MAXPATHLEN]; +}; + +#endif Modified: user/alc/PQ_LAUNDRY/sbin/ipfw/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/sbin/ipfw/Makefile Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/sbin/ipfw/Makefile Sat Aug 13 22:57:41 2016 (r304063) @@ -5,7 +5,7 @@ PACKAGE=ipfw PROG= ipfw SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c tables.c -SRCS+= nptv6.c +SRCS+= nat64lsn.c nat64stl.c nptv6.c WARNS?= 2 .if ${MK_PF} != "no" Modified: user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw.8 ============================================================================== --- user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw.8 Sat Aug 13 22:51:36 2016 (r304062) +++ user/alc/PQ_LAUNDRY/sbin/ipfw/ipfw.8 Sat Aug 13 22:57:41 2016 (r304063) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 19, 2016 +.Dd August 13, 2016 .Dt IPFW 8 .Os .Sh NAME @@ -113,6 +113,37 @@ in-kernel NAT. .Oc .Oc .Ar pathname +.Ss STATEFUL IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION +.Nm +.Oo Cm set Ar N Oc Cm nat64lsn Ar name Cm create Ar create-options +.Nm +.Oo Cm set Ar N Oc Cm nat64lsn Ar name Cm config Ar config-options +.Nm +.Oo Cm set Ar N Oc Cm nat64lsn +.Brq Ar name | all +.Brq Cm list | show +.Op Cm states +.Nm +.Oo Cm set Ar N Oc Cm nat64lsn +.Brq Ar name | all +.Cm destroy +.Nm +.Oo Cm set Ar N Oc Cm nat64lsn Ar name Cm stats Op Cm reset +.Ss STATELESS IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION +.Nm +.Oo Cm set Ar N Oc Cm nat64stl Ar name Cm create Ar create-options +.Nm +.Oo Cm set Ar N Oc Cm nat64stl Ar name Cm config Ar config-options +.Nm +.Oo Cm set Ar N Oc Cm nat64stl +.Brq Ar name | all +.Brq Cm list | show +.Nm +.Oo Cm set Ar N Oc Cm nat64stl +.Brq Ar name | all +.Cm destroy +.Nm +.Oo Cm set Ar N Oc Cm nat64stl Ar name Cm stats Op Cm reset .Ss IPv6-to-IPv6 NETWORK PREFIX TRANSLATION .Nm .Oo Cm set Ar N Oc Cm nptv6 Ar name Cm create Ar create-options @@ -125,7 +156,7 @@ in-kernel NAT. .Brq Ar name | all .Cm destroy .Nm -.Oo Cm set Ar N Oc Cm nptv6 Ar name Cm stats +.Oo Cm set Ar N Oc Cm nptv6 Ar name Cm stats Op Cm reset .Ss INTERNAL DIAGNOSTICS .Nm .Cm internal iflist @@ -837,6 +868,16 @@ nat instance see the .Sx NETWORK ADDRESS TRANSLATION (NAT) Section for further information. +.It Cm nat64lsn Ar name +Pass packet to a stateful NAT64 instance (for IPv6/IPv4 network address and +protocol translation): see the +.Sx IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION +Section for further information. +.It Cm nat64stl Ar name +Pass packet to a stateless NAT64 instance (for IPv6/IPv4 network address and +protocol translation): see the +.Sx IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION +Section for further information. .It Cm nptv6 Ar name Pass packet to a NPTv6 instance (for IPv6-to-IPv6 network prefix translation): see the @@ -2927,9 +2968,189 @@ instances. See .Sx SYSCTL VARIABLES for more info. +.Sh IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION +.Nm +supports in-kernel IPv6/IPv4 network address and protocol translation. +Stateful NAT64 translation allows IPv6-only clients to contact IPv4 servers +using unicast TCP, UDP or ICMP protocols. +One or more IPv4 addresses assigned to a stateful NAT64 translator are shared +among serveral IPv6-only clients. +When stateful NAT64 is used in conjunction with DNS64, no changes are usually +required in the IPv6 client or the IPv4 server. +The kernel module +.Cm ipfw_nat64 +should be loaded or kernel should have +.Cm options IPFIREWALL_NAT64 +to be able use stateful NAT64 translator. +.Pp +Stateful NAT64 uses a bunch of memory for several types of objects. +When IPv6 client initiates connection, NAT64 translator creates a host entry +in the states table. +Each host entry has a number of ports group entries allocated on demand. +Ports group entries contains connection state entries. +There are several options to control limits and lifetime for these objects. +.Pp +NAT64 translator follows RFC7915 when does ICMPv6/ICMP translation, +unsupported message types will be silently dropped. +IPv6 needs several ICMPv6 message types to be explicitly allowed for correct +operation. +Make sure that ND6 neighbor solicitation (ICMPv6 type 135) and neighbor +advertisement (ICMPv6 type 136) messages will not be handled by translation +rules. +.Pp +After translation NAT64 translator sends packets through corresponding netisr +queue. +Thus translator host should be configured as IPv4 and IPv6 router. +.Pp +Currently both stateful and stateless NAT64 translators use Well-Known IPv6 +Prefix +.Ar 64:ff9b::/96 +to represent IPv4 addresses in the IPv6 address. +Thus DNS64 service and routing should be configured to use Well-Known IPv6 +Prefix. +.Pp +The stateful NAT64 configuration command is the following: +.Bd -ragged -offset indent +.Bk -words +.Cm nat64lsn +.Ar name +.Cm create +.Ar create-options +.Ek +.Ed +.Pp +The following parameters can be configured: +.Bl -tag -width indent +.It Cm prefix4 Ar ipv4_prefix/mask +The IPv4 prefix with mask defines the pool of IPv4 addresses used as +source address after translation. +Stateful NAT64 module translates IPv6 source address of client to one +IPv4 address from this pool. +Note that incoming IPv4 packets that don't have corresponding state entry +in the states table will be dropped by translator. +Make sure that translation rules handle packets, destined to configured prefix. +.It Cm max_ports Ar number +Maximum number of ports reserved for upper level protocols to one IPv6 client. +All reserved ports are divided into chunks between supported protocols. +The number of connections from one IPv6 client is limited by this option. +Note that closed TCP connections still remain in the list of connections until +.Cm tcp_close_age +interval will not expire. +Default value is +.Ar 2048 . +.It Cm host_del_age Ar seconds +The number of seconds until the host entry for a IPv6 client will be deleted +and all its resources will be released due to inactivity. +Default value is +.Ar 3600 . +.It Cm pg_del_age Ar seconds +The number of seconds until a ports group with unused state entries will +be released. +Default value is +.Ar 900 . +.It Cm tcp_syn_age Ar seconds +The number of seconds while a state entry for TCP connection with only SYN +sent will be kept. +If TCP connection establishing will not be finished, +state entry will be deleted. +Default value is +.Ar 10 . +.It Cm tcp_est_age Ar seconds +The number of seconds while a state entry for established TCP connection +will be kept. +Default value is +.Ar 7200 . +.It Cm tcp_close_age Ar seconds +The number of seconds while a state entry for closed TCP connection +will be kept. +Keeping state entries for closed connections is needed, because IPv4 servers +typically keep closed connections in a TIME_WAIT state for a several minutes. +Since translator's IPv4 addresses are shared among all IPv6 clients, +new connections from the same addresses and ports may be rejected by server, +because these connections are still in a TIME_WAIT state. +Keeping them in translator's state table protects from such rejects. +Default value is +.Ar 180 . *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Sat Aug 13 23:00:19 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0C01BB8A90 for ; Sat, 13 Aug 2016 23:00:19 +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 mx1.freebsd.org (Postfix) with ESMTPS id 5DBA41484; Sat, 13 Aug 2016 23:00:19 +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 u7DN0I8o096829; Sat, 13 Aug 2016 23:00:18 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7DN0G7A096805; Sat, 13 Aug 2016 23:00:16 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201608132300.u7DN0G7A096805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 13 Aug 2016 23:00:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r304064 - in user/alc/PG_CACHED: . bin/ps cddl/contrib/opensolaris/tools/ctf/cvt cddl/usr.sbin/dtrace/tests/common/raise cddl/usr.sbin/dtrace/tests/common/safety cddl/usr.sbin/dtrace/te... X-SVN-Group: user 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.22 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, 13 Aug 2016 23:00:19 -0000 Author: markj Date: Sat Aug 13 23:00:15 2016 New Revision: 304064 URL: https://svnweb.freebsd.org/changeset/base/304064 Log: Merge from PQ_LAUNDRY at r304063. Added: user/alc/PG_CACHED/lib/libc/gen/dirname_compat.c - copied unchanged from r304063, user/alc/PQ_LAUNDRY/lib/libc/gen/dirname_compat.c user/alc/PG_CACHED/libexec/rtld-elf/rtld_utrace.h - copied unchanged from r304063, user/alc/PQ_LAUNDRY/libexec/rtld-elf/rtld_utrace.h user/alc/PG_CACHED/sbin/ipfw/nat64lsn.c - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sbin/ipfw/nat64lsn.c user/alc/PG_CACHED/sbin/ipfw/nat64stl.c - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sbin/ipfw/nat64stl.c user/alc/PG_CACHED/sys/boot/fdt/dts/arm/pcduino3.dts - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sys/boot/fdt/dts/arm/pcduino3.dts user/alc/PG_CACHED/sys/compat/cloudabi/cloudabi_vdso.c - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sys/compat/cloudabi/cloudabi_vdso.c user/alc/PG_CACHED/sys/compat/cloudabi64/cloudabi64_vdso.lds.s - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sys/compat/cloudabi64/cloudabi64_vdso.lds.s user/alc/PG_CACHED/sys/dev/hyperv/include/vmbus_xact.h - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sys/dev/hyperv/include/vmbus_xact.h user/alc/PG_CACHED/sys/dev/hyperv/netvsc/if_hnreg.h - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/if_hnreg.h user/alc/PG_CACHED/sys/dev/hyperv/netvsc/if_hnvar.h - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/if_hnvar.h user/alc/PG_CACHED/sys/dev/hyperv/vmbus/vmbus_xact.c - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/vmbus_xact.c user/alc/PG_CACHED/sys/kern/subr_gtaskqueue.c - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sys/kern/subr_gtaskqueue.c user/alc/PG_CACHED/sys/modules/ipfw_nat64/ - copied from r304063, user/alc/PQ_LAUNDRY/sys/modules/ipfw_nat64/ user/alc/PG_CACHED/sys/netinet6/ip_fw_nat64.h - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sys/netinet6/ip_fw_nat64.h user/alc/PG_CACHED/sys/netpfil/ipfw/ip_fw_bpf.c - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sys/netpfil/ipfw/ip_fw_bpf.c user/alc/PG_CACHED/sys/netpfil/ipfw/nat64/ - copied from r304063, user/alc/PQ_LAUNDRY/sys/netpfil/ipfw/nat64/ user/alc/PG_CACHED/sys/riscv/include/sbi.h - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sys/riscv/include/sbi.h user/alc/PG_CACHED/sys/riscv/riscv/riscv_console.c - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sys/riscv/riscv/riscv_console.c user/alc/PG_CACHED/sys/riscv/riscv/sbi.S - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sys/riscv/riscv/sbi.S user/alc/PG_CACHED/sys/sys/gtaskqueue.h - copied unchanged from r304063, user/alc/PQ_LAUNDRY/sys/sys/gtaskqueue.h user/alc/PG_CACHED/tools/tools/dmardump/ - copied from r304063, user/alc/PQ_LAUNDRY/tools/tools/dmardump/ Deleted: user/alc/PG_CACHED/lib/libc/sys/kse.2 user/alc/PG_CACHED/sys/boot/fdt/dts/arm/pcduino3b.dts user/alc/PG_CACHED/sys/riscv/htif/ user/alc/PG_CACHED/usr.bin/kdump/linux32_syscalls.conf user/alc/PG_CACHED/usr.bin/kdump/linux_syscalls.conf user/alc/PG_CACHED/usr.bin/truss/makesyscallsconf.sh Modified: user/alc/PG_CACHED/Makefile user/alc/PG_CACHED/Makefile.inc1 user/alc/PG_CACHED/bin/ps/ps.1 user/alc/PG_CACHED/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c user/alc/PG_CACHED/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c user/alc/PG_CACHED/cddl/usr.sbin/dtrace/tests/common/raise/Makefile user/alc/PG_CACHED/cddl/usr.sbin/dtrace/tests/common/safety/Makefile user/alc/PG_CACHED/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh user/alc/PG_CACHED/etc/rc.d/jail user/alc/PG_CACHED/include/unistd.h user/alc/PG_CACHED/lib/libc/gen/Makefile.inc user/alc/PG_CACHED/lib/libc/gen/Symbol.map user/alc/PG_CACHED/lib/libc/gen/dirname.3 user/alc/PG_CACHED/lib/libc/gen/dirname.c user/alc/PG_CACHED/lib/libc/net/getaddrinfo.c user/alc/PG_CACHED/lib/libc/rpc/svc_vc.c user/alc/PG_CACHED/lib/libc/tests/resolv/resolv_test.c user/alc/PG_CACHED/lib/libcrypt/Makefile user/alc/PG_CACHED/lib/libcrypt/crypt-md5.c user/alc/PG_CACHED/lib/libcrypt/crypt-nthash.c user/alc/PG_CACHED/lib/libcrypt/crypt-sha256.c user/alc/PG_CACHED/lib/libcrypt/crypt-sha512.c user/alc/PG_CACHED/lib/libcrypt/crypt.3 user/alc/PG_CACHED/lib/libcrypt/crypt.c user/alc/PG_CACHED/lib/libcrypt/crypt.h user/alc/PG_CACHED/lib/libcrypt/misc.c user/alc/PG_CACHED/lib/libpcap/pcap-netmap.c user/alc/PG_CACHED/lib/libsysdecode/Makefile user/alc/PG_CACHED/lib/libsysdecode/utrace.c user/alc/PG_CACHED/libexec/rtld-elf/rtld.c user/alc/PG_CACHED/release/release.sh user/alc/PG_CACHED/sbin/ipfw/Makefile user/alc/PG_CACHED/sbin/ipfw/ipfw.8 user/alc/PG_CACHED/sbin/ipfw/ipfw2.c user/alc/PG_CACHED/sbin/ipfw/ipfw2.h user/alc/PG_CACHED/sbin/ipfw/main.c user/alc/PG_CACHED/sbin/ipfw/nptv6.c user/alc/PG_CACHED/sbin/ipfw/tables.c user/alc/PG_CACHED/secure/lib/libcrypt/crypt-blowfish.c user/alc/PG_CACHED/secure/lib/libcrypt/crypt-des.c user/alc/PG_CACHED/share/man/man4/pci.4 user/alc/PG_CACHED/share/misc/committers-src.dot user/alc/PG_CACHED/share/mk/bsd.README user/alc/PG_CACHED/share/mk/bsd.progs.mk user/alc/PG_CACHED/share/timedef/af_ZA.UTF-8.src user/alc/PG_CACHED/share/timedef/am_ET.UTF-8.src user/alc/PG_CACHED/share/timedef/ar_JO.UTF-8.src user/alc/PG_CACHED/share/timedef/ar_MA.UTF-8.src user/alc/PG_CACHED/share/timedef/ar_SA.UTF-8.src user/alc/PG_CACHED/share/timedef/be_BY.CP1131.src user/alc/PG_CACHED/share/timedef/be_BY.CP1251.src user/alc/PG_CACHED/share/timedef/be_BY.ISO8859-5.src user/alc/PG_CACHED/share/timedef/be_BY.UTF-8.src user/alc/PG_CACHED/share/timedef/bg_BG.CP1251.src user/alc/PG_CACHED/share/timedef/bg_BG.UTF-8.src user/alc/PG_CACHED/share/timedef/ca_IT.ISO8859-15.src user/alc/PG_CACHED/share/timedef/ca_IT.UTF-8.src user/alc/PG_CACHED/share/timedef/cs_CZ.ISO8859-2.src user/alc/PG_CACHED/share/timedef/cs_CZ.UTF-8.src user/alc/PG_CACHED/share/timedef/da_DK.ISO8859-15.src user/alc/PG_CACHED/share/timedef/da_DK.UTF-8.src user/alc/PG_CACHED/share/timedef/de_AT.ISO8859-15.src user/alc/PG_CACHED/share/timedef/de_AT.UTF-8.src user/alc/PG_CACHED/share/timedef/de_DE.ISO8859-15.src user/alc/PG_CACHED/share/timedef/de_DE.UTF-8.src user/alc/PG_CACHED/share/timedef/el_GR.ISO8859-7.src user/alc/PG_CACHED/share/timedef/el_GR.UTF-8.src user/alc/PG_CACHED/share/timedef/en_CA.UTF-8.src user/alc/PG_CACHED/share/timedef/en_GB.UTF-8.src user/alc/PG_CACHED/share/timedef/en_IE.UTF-8.src user/alc/PG_CACHED/share/timedef/en_PH.UTF-8.src user/alc/PG_CACHED/share/timedef/en_SG.UTF-8.src user/alc/PG_CACHED/share/timedef/en_US.UTF-8.src user/alc/PG_CACHED/share/timedef/en_ZA.UTF-8.src user/alc/PG_CACHED/share/timedef/es_AR.ISO8859-1.src user/alc/PG_CACHED/share/timedef/es_CR.UTF-8.src user/alc/PG_CACHED/share/timedef/es_ES.ISO8859-15.src user/alc/PG_CACHED/share/timedef/es_ES.UTF-8.src user/alc/PG_CACHED/share/timedef/es_MX.ISO8859-1.src user/alc/PG_CACHED/share/timedef/es_MX.UTF-8.src user/alc/PG_CACHED/share/timedef/et_EE.ISO8859-15.src user/alc/PG_CACHED/share/timedef/eu_ES.UTF-8.src user/alc/PG_CACHED/share/timedef/fi_FI.ISO8859-15.src user/alc/PG_CACHED/share/timedef/fi_FI.UTF-8.src user/alc/PG_CACHED/share/timedef/fr_BE.ISO8859-15.src user/alc/PG_CACHED/share/timedef/fr_BE.UTF-8.src user/alc/PG_CACHED/share/timedef/fr_CA.ISO8859-15.src user/alc/PG_CACHED/share/timedef/fr_CA.UTF-8.src user/alc/PG_CACHED/share/timedef/fr_CH.ISO8859-15.src user/alc/PG_CACHED/share/timedef/fr_CH.UTF-8.src user/alc/PG_CACHED/share/timedef/fr_FR.ISO8859-15.src user/alc/PG_CACHED/share/timedef/fr_FR.UTF-8.src user/alc/PG_CACHED/share/timedef/he_IL.UTF-8.src user/alc/PG_CACHED/share/timedef/hi_IN.ISCII-DEV.src user/alc/PG_CACHED/share/timedef/hi_IN.UTF-8.src user/alc/PG_CACHED/share/timedef/hr_HR.ISO8859-2.src user/alc/PG_CACHED/share/timedef/hr_HR.UTF-8.src user/alc/PG_CACHED/share/timedef/hu_HU.ISO8859-2.src user/alc/PG_CACHED/share/timedef/hu_HU.UTF-8.src user/alc/PG_CACHED/share/timedef/hy_AM.ARMSCII-8.src user/alc/PG_CACHED/share/timedef/hy_AM.UTF-8.src user/alc/PG_CACHED/share/timedef/is_IS.ISO8859-15.src user/alc/PG_CACHED/share/timedef/is_IS.UTF-8.src user/alc/PG_CACHED/share/timedef/it_CH.ISO8859-15.src user/alc/PG_CACHED/share/timedef/it_CH.UTF-8.src user/alc/PG_CACHED/share/timedef/it_IT.ISO8859-15.src user/alc/PG_CACHED/share/timedef/it_IT.UTF-8.src user/alc/PG_CACHED/share/timedef/ja_JP.SJIS.src user/alc/PG_CACHED/share/timedef/ja_JP.UTF-8.src user/alc/PG_CACHED/share/timedef/ja_JP.eucJP.src user/alc/PG_CACHED/share/timedef/kk_KZ.UTF-8.src user/alc/PG_CACHED/share/timedef/ko_KR.UTF-8.src user/alc/PG_CACHED/share/timedef/ko_KR.eucKR.src user/alc/PG_CACHED/share/timedef/lt_LT.ISO8859-13.src user/alc/PG_CACHED/share/timedef/lt_LT.UTF-8.src user/alc/PG_CACHED/share/timedef/lv_LV.ISO8859-13.src user/alc/PG_CACHED/share/timedef/lv_LV.UTF-8.src user/alc/PG_CACHED/share/timedef/mn_MN.UTF-8.src user/alc/PG_CACHED/share/timedef/nb_NO.ISO8859-15.src user/alc/PG_CACHED/share/timedef/nb_NO.UTF-8.src user/alc/PG_CACHED/share/timedef/nl_BE.UTF-8.src user/alc/PG_CACHED/share/timedef/nl_NL.UTF-8.src user/alc/PG_CACHED/share/timedef/nn_NO.ISO8859-15.src user/alc/PG_CACHED/share/timedef/nn_NO.UTF-8.src user/alc/PG_CACHED/share/timedef/pl_PL.ISO8859-2.src user/alc/PG_CACHED/share/timedef/pl_PL.UTF-8.src user/alc/PG_CACHED/share/timedef/pt_BR.ISO8859-1.src user/alc/PG_CACHED/share/timedef/pt_BR.UTF-8.src user/alc/PG_CACHED/share/timedef/pt_PT.ISO8859-15.src user/alc/PG_CACHED/share/timedef/pt_PT.UTF-8.src user/alc/PG_CACHED/share/timedef/ro_RO.ISO8859-2.src user/alc/PG_CACHED/share/timedef/ro_RO.UTF-8.src user/alc/PG_CACHED/share/timedef/ru_RU.CP1251.src user/alc/PG_CACHED/share/timedef/ru_RU.CP866.src user/alc/PG_CACHED/share/timedef/ru_RU.ISO8859-5.src user/alc/PG_CACHED/share/timedef/ru_RU.KOI8-R.src user/alc/PG_CACHED/share/timedef/ru_RU.UTF-8.src user/alc/PG_CACHED/share/timedef/se_FI.UTF-8.src user/alc/PG_CACHED/share/timedef/se_NO.UTF-8.src user/alc/PG_CACHED/share/timedef/sk_SK.ISO8859-2.src user/alc/PG_CACHED/share/timedef/sk_SK.UTF-8.src user/alc/PG_CACHED/share/timedef/sl_SI.ISO8859-2.src user/alc/PG_CACHED/share/timedef/sl_SI.UTF-8.src user/alc/PG_CACHED/share/timedef/sr_RS.ISO8859-2.src user/alc/PG_CACHED/share/timedef/sr_RS.ISO8859-5.src user/alc/PG_CACHED/share/timedef/sr_RS.UTF-8.src user/alc/PG_CACHED/share/timedef/sr_RS.UTF-8@latin.src user/alc/PG_CACHED/share/timedef/sv_FI.ISO8859-15.src user/alc/PG_CACHED/share/timedef/sv_SE.ISO8859-15.src user/alc/PG_CACHED/share/timedef/sv_SE.UTF-8.src user/alc/PG_CACHED/share/timedef/tr_TR.ISO8859-9.src user/alc/PG_CACHED/share/timedef/tr_TR.UTF-8.src user/alc/PG_CACHED/share/timedef/uk_UA.CP1251.src user/alc/PG_CACHED/share/timedef/uk_UA.ISO8859-5.src user/alc/PG_CACHED/share/timedef/uk_UA.KOI8-U.src user/alc/PG_CACHED/share/timedef/uk_UA.UTF-8.src user/alc/PG_CACHED/share/timedef/zh_CN.GB2312.src user/alc/PG_CACHED/share/timedef/zh_CN.GBK.src user/alc/PG_CACHED/share/timedef/zh_CN.UTF-8.src user/alc/PG_CACHED/share/timedef/zh_CN.eucCN.src user/alc/PG_CACHED/share/timedef/zh_HK.UTF-8.src user/alc/PG_CACHED/share/timedef/zh_TW.Big5.src user/alc/PG_CACHED/share/timedef/zh_TW.UTF-8.src user/alc/PG_CACHED/sys/amd64/amd64/pmap.c user/alc/PG_CACHED/sys/amd64/amd64/trap.c user/alc/PG_CACHED/sys/amd64/cloudabi64/cloudabi64_sysvec.c user/alc/PG_CACHED/sys/arm/broadcom/bcm2835/bcm2835_vcio.c user/alc/PG_CACHED/sys/arm/xscale/ixp425/avila_ata.c user/alc/PG_CACHED/sys/arm/xscale/pxa/pxa_smi.c user/alc/PG_CACHED/sys/arm/xscale/pxa/pxa_space.c user/alc/PG_CACHED/sys/arm64/arm64/pmap.c user/alc/PG_CACHED/sys/arm64/arm64/trap.c user/alc/PG_CACHED/sys/arm64/arm64/vm_machdep.c user/alc/PG_CACHED/sys/arm64/cloudabi64/cloudabi64_sysvec.c user/alc/PG_CACHED/sys/arm64/include/pmap.h user/alc/PG_CACHED/sys/boot/efi/loader/Makefile user/alc/PG_CACHED/sys/boot/fdt/dts/riscv/qemu.dts user/alc/PG_CACHED/sys/boot/fdt/dts/riscv/rocket.dts user/alc/PG_CACHED/sys/boot/fdt/dts/riscv/spike.dts user/alc/PG_CACHED/sys/boot/i386/btx/btxldr/btxldr.S user/alc/PG_CACHED/sys/boot/i386/libi386/smbios.c user/alc/PG_CACHED/sys/boot/i386/zfsboot/zfsboot.c user/alc/PG_CACHED/sys/cam/ata/ata_all.c user/alc/PG_CACHED/sys/cam/scsi/scsi_all.c user/alc/PG_CACHED/sys/cam/scsi/scsi_da.c user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c user/alc/PG_CACHED/sys/compat/cloudabi/cloudabi_util.h user/alc/PG_CACHED/sys/compat/cloudabi64/cloudabi64_module.c user/alc/PG_CACHED/sys/conf/NOTES user/alc/PG_CACHED/sys/conf/files user/alc/PG_CACHED/sys/conf/files.amd64 user/alc/PG_CACHED/sys/conf/files.arm64 user/alc/PG_CACHED/sys/conf/files.i386 user/alc/PG_CACHED/sys/conf/files.riscv user/alc/PG_CACHED/sys/conf/kern.post.mk user/alc/PG_CACHED/sys/conf/ldscript.riscv user/alc/PG_CACHED/sys/conf/options user/alc/PG_CACHED/sys/contrib/ncsw/user/env/xx.c user/alc/PG_CACHED/sys/contrib/octeon-sdk/cvmx-twsi.c user/alc/PG_CACHED/sys/dev/aic7xxx/aic7xxx_osm.c user/alc/PG_CACHED/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c user/alc/PG_CACHED/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c user/alc/PG_CACHED/sys/dev/auxio/auxio.c user/alc/PG_CACHED/sys/dev/bktr/bktr_os.c user/alc/PG_CACHED/sys/dev/bktr/bktr_reg.h user/alc/PG_CACHED/sys/dev/bxe/bxe.c user/alc/PG_CACHED/sys/dev/cxgbe/adapter.h user/alc/PG_CACHED/sys/dev/cxgbe/t4_sge.c user/alc/PG_CACHED/sys/dev/e1000/e1000_osdep.h user/alc/PG_CACHED/sys/dev/e1000/if_em.h user/alc/PG_CACHED/sys/dev/e1000/if_igb.h user/alc/PG_CACHED/sys/dev/e1000/if_lem.h user/alc/PG_CACHED/sys/dev/etherswitch/ip17x/ip17x.c user/alc/PG_CACHED/sys/dev/filemon/filemon.c user/alc/PG_CACHED/sys/dev/hyperv/include/vmbus.h user/alc/PG_CACHED/sys/dev/hyperv/netvsc/hv_net_vsc.c user/alc/PG_CACHED/sys/dev/hyperv/netvsc/hv_net_vsc.h user/alc/PG_CACHED/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c user/alc/PG_CACHED/sys/dev/hyperv/netvsc/hv_rndis.h user/alc/PG_CACHED/sys/dev/hyperv/netvsc/hv_rndis_filter.c user/alc/PG_CACHED/sys/dev/hyperv/netvsc/hv_rndis_filter.h user/alc/PG_CACHED/sys/dev/hyperv/vmbus/vmbus.c user/alc/PG_CACHED/sys/dev/hyperv/vmbus/vmbus_var.h user/alc/PG_CACHED/sys/dev/ixgb/if_ixgb.h user/alc/PG_CACHED/sys/dev/ixgb/if_ixgb_osdep.h user/alc/PG_CACHED/sys/dev/ixgbe/ixgbe.h user/alc/PG_CACHED/sys/dev/ixl/i40e_osdep.h user/alc/PG_CACHED/sys/dev/ixl/ixl.h user/alc/PG_CACHED/sys/dev/ixl/ixl_pf.h user/alc/PG_CACHED/sys/dev/ixl/ixlv.h user/alc/PG_CACHED/sys/dev/mlx5/mlx5_en/mlx5_en_main.c user/alc/PG_CACHED/sys/dev/mpt/mpt_pci.c user/alc/PG_CACHED/sys/dev/msk/if_msk.c user/alc/PG_CACHED/sys/dev/nand/nand_generic.c user/alc/PG_CACHED/sys/dev/nand/nandsim_chip.c user/alc/PG_CACHED/sys/dev/netmap/netmap_mem2.c user/alc/PG_CACHED/sys/dev/ofw/openfirmio.c user/alc/PG_CACHED/sys/dev/ofw/openpromio.c user/alc/PG_CACHED/sys/dev/pci/pci_user.c user/alc/PG_CACHED/sys/dev/pci/pcivar.h user/alc/PG_CACHED/sys/dev/sound/sbus/cs4231.c user/alc/PG_CACHED/sys/dev/tpm/tpm.c user/alc/PG_CACHED/sys/dev/tws/tws.c user/alc/PG_CACHED/sys/dev/usb/controller/ehci_ixp4xx.c user/alc/PG_CACHED/sys/dev/virtio/network/if_vtnet.c user/alc/PG_CACHED/sys/dev/virtio/network/if_vtnetvar.h user/alc/PG_CACHED/sys/fs/autofs/autofs_vnops.c user/alc/PG_CACHED/sys/fs/nfs/nfs_commonkrpc.c user/alc/PG_CACHED/sys/fs/nfs/nfs_commonport.c user/alc/PG_CACHED/sys/fs/nfs/nfsport.h user/alc/PG_CACHED/sys/fs/nfs/nfsproto.h user/alc/PG_CACHED/sys/fs/nfsclient/nfs_clbio.c user/alc/PG_CACHED/sys/fs/nfsclient/nfs_clcomsubs.c user/alc/PG_CACHED/sys/fs/nfsclient/nfs_clstate.c user/alc/PG_CACHED/sys/fs/nfsclient/nfs_clsubs.c user/alc/PG_CACHED/sys/fs/nfsclient/nfs_clvfsops.c user/alc/PG_CACHED/sys/fs/nfsclient/nfs_clvnops.c user/alc/PG_CACHED/sys/fs/nfsserver/nfs_nfsdcache.c user/alc/PG_CACHED/sys/fs/nfsserver/nfs_nfsdport.c user/alc/PG_CACHED/sys/fs/nfsserver/nfs_nfsdsocket.c user/alc/PG_CACHED/sys/fs/nfsserver/nfs_nfsdstate.c user/alc/PG_CACHED/sys/fs/smbfs/smbfs_node.c user/alc/PG_CACHED/sys/fs/tmpfs/tmpfs_subr.c user/alc/PG_CACHED/sys/fs/unionfs/union_vnops.c user/alc/PG_CACHED/sys/i386/i386/trap.c user/alc/PG_CACHED/sys/kern/kern_descrip.c user/alc/PG_CACHED/sys/kern/kern_exec.c user/alc/PG_CACHED/sys/kern/kern_kthread.c user/alc/PG_CACHED/sys/kern/kern_ktrace.c user/alc/PG_CACHED/sys/kern/kern_timeout.c user/alc/PG_CACHED/sys/kern/subr_bus.c user/alc/PG_CACHED/sys/kern/subr_taskqueue.c user/alc/PG_CACHED/sys/kern/vfs_bio.c user/alc/PG_CACHED/sys/kern/vfs_cluster.c user/alc/PG_CACHED/sys/kern/vfs_default.c user/alc/PG_CACHED/sys/kern/vfs_lookup.c user/alc/PG_CACHED/sys/kern/vfs_mount.c user/alc/PG_CACHED/sys/kern/vfs_subr.c user/alc/PG_CACHED/sys/kern/vnode_if.src user/alc/PG_CACHED/sys/mips/nlm/dev/net/xlpge.c user/alc/PG_CACHED/sys/mips/rmi/dev/nlge/if_nlge.c user/alc/PG_CACHED/sys/modules/Makefile user/alc/PG_CACHED/sys/modules/cloudabi/Makefile user/alc/PG_CACHED/sys/modules/cloudabi64/Makefile user/alc/PG_CACHED/sys/modules/dtb/allwinner/Makefile user/alc/PG_CACHED/sys/modules/hyperv/vmbus/Makefile user/alc/PG_CACHED/sys/modules/ipfw/Makefile user/alc/PG_CACHED/sys/net/ifdi_if.m user/alc/PG_CACHED/sys/net/iflib.c user/alc/PG_CACHED/sys/net/iflib.h user/alc/PG_CACHED/sys/net80211/ieee80211_crypto_wep.c user/alc/PG_CACHED/sys/netinet/ip_fw.h user/alc/PG_CACHED/sys/netinet/sctp_indata.c user/alc/PG_CACHED/sys/netinet/tcp_fastopen.c user/alc/PG_CACHED/sys/netpfil/ipfw/ip_fw2.c user/alc/PG_CACHED/sys/netpfil/ipfw/ip_fw_log.c user/alc/PG_CACHED/sys/netpfil/ipfw/ip_fw_private.h user/alc/PG_CACHED/sys/netpfil/ipfw/ip_fw_sockopt.c user/alc/PG_CACHED/sys/netpfil/ipfw/ip_fw_table.c user/alc/PG_CACHED/sys/netpfil/ipfw/nptv6/nptv6.c user/alc/PG_CACHED/sys/powerpc/aim/locore.S user/alc/PG_CACHED/sys/powerpc/booke/locore.S user/alc/PG_CACHED/sys/powerpc/booke/pmap.c user/alc/PG_CACHED/sys/powerpc/mpc85xx/platform_mpc85xx.c user/alc/PG_CACHED/sys/powerpc/powerpc/busdma_machdep.c user/alc/PG_CACHED/sys/powerpc/powerpc/machdep.c user/alc/PG_CACHED/sys/powerpc/powerpc/mmu_if.m user/alc/PG_CACHED/sys/powerpc/powerpc/pmap_dispatch.c user/alc/PG_CACHED/sys/riscv/conf/GENERIC user/alc/PG_CACHED/sys/riscv/conf/QEMU user/alc/PG_CACHED/sys/riscv/conf/ROCKET user/alc/PG_CACHED/sys/riscv/conf/SPIKE user/alc/PG_CACHED/sys/riscv/include/cpufunc.h user/alc/PG_CACHED/sys/riscv/include/pcpu.h user/alc/PG_CACHED/sys/riscv/include/riscvreg.h user/alc/PG_CACHED/sys/riscv/include/vmparam.h user/alc/PG_CACHED/sys/riscv/riscv/exception.S user/alc/PG_CACHED/sys/riscv/riscv/genassym.c user/alc/PG_CACHED/sys/riscv/riscv/identcpu.c user/alc/PG_CACHED/sys/riscv/riscv/intr_machdep.c user/alc/PG_CACHED/sys/riscv/riscv/locore.S user/alc/PG_CACHED/sys/riscv/riscv/machdep.c user/alc/PG_CACHED/sys/riscv/riscv/mp_machdep.c user/alc/PG_CACHED/sys/riscv/riscv/pmap.c user/alc/PG_CACHED/sys/riscv/riscv/timer.c user/alc/PG_CACHED/sys/riscv/riscv/vm_machdep.c user/alc/PG_CACHED/sys/sparc64/fhc/clkbrd.c user/alc/PG_CACHED/sys/sparc64/pci/fire.c user/alc/PG_CACHED/sys/sys/_task.h user/alc/PG_CACHED/sys/sys/buf.h user/alc/PG_CACHED/sys/sys/rman.h user/alc/PG_CACHED/sys/sys/taskqueue.h user/alc/PG_CACHED/sys/sys/vnode.h user/alc/PG_CACHED/sys/tools/embed_mfs.sh user/alc/PG_CACHED/sys/ufs/ffs/ffs_snapshot.c user/alc/PG_CACHED/sys/ufs/ffs/ffs_vnops.c user/alc/PG_CACHED/sys/ufs/ufs/ufs_lookup.c user/alc/PG_CACHED/sys/ufs/ufs/ufs_quota.c user/alc/PG_CACHED/sys/vm/vm_object.c user/alc/PG_CACHED/sys/vm/vm_page.c user/alc/PG_CACHED/sys/vm/vm_pageout.c user/alc/PG_CACHED/sys/vm/vm_phys.c user/alc/PG_CACHED/sys/x86/cpufreq/powernow.c user/alc/PG_CACHED/sys/x86/iommu/intel_reg.h user/alc/PG_CACHED/tests/sys/acl/00.sh user/alc/PG_CACHED/tests/sys/acl/01.sh user/alc/PG_CACHED/tests/sys/acl/02.sh user/alc/PG_CACHED/tests/sys/acl/03.sh user/alc/PG_CACHED/tests/sys/acl/04.sh user/alc/PG_CACHED/tools/tools/ath/ath_ee_9300_print/main.c user/alc/PG_CACHED/usr.bin/kdump/kdump.c user/alc/PG_CACHED/usr.bin/nfsstat/nfsstat.1 user/alc/PG_CACHED/usr.bin/nfsstat/nfsstat.c user/alc/PG_CACHED/usr.bin/truss/syscalls.c user/alc/PG_CACHED/usr.bin/xinstall/xinstall.c user/alc/PG_CACHED/usr.sbin/acpi/acpidump/acpi.c user/alc/PG_CACHED/usr.sbin/ancontrol/ancontrol.c user/alc/PG_CACHED/usr.sbin/bsdinstall/scripts/hardening Directory Properties: user/alc/PG_CACHED/ (props changed) user/alc/PG_CACHED/cddl/ (props changed) user/alc/PG_CACHED/cddl/contrib/opensolaris/ (props changed) user/alc/PG_CACHED/sys/cddl/contrib/opensolaris/ (props changed) user/alc/PG_CACHED/sys/contrib/octeon-sdk/ (props changed) Modified: user/alc/PG_CACHED/Makefile ============================================================================== --- user/alc/PG_CACHED/Makefile Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/Makefile Sat Aug 13 23:00:15 2016 (r304064) @@ -209,7 +209,8 @@ SUB_MAKE= `test -x ${MYMAKE} && echo ${M SUB_MAKE= ${MAKE} -m ${.CURDIR}/share/mk .endif -_MAKE= PATH=${PATH} ${SUB_MAKE} -f Makefile.inc1 TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH} +_MAKE= PATH=${PATH} MAKE_CMD=${MAKE} ${SUB_MAKE} -f Makefile.inc1 \ + TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH} # Only allow meta mode for the whitelisted targets. See META_TGT_WHITELIST # above. Modified: user/alc/PG_CACHED/Makefile.inc1 ============================================================================== --- user/alc/PG_CACHED/Makefile.inc1 Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/Makefile.inc1 Sat Aug 13 23:00:15 2016 (r304064) @@ -1013,7 +1013,7 @@ distributeworld installworld stageworld: ${IMAKEENV} rm -rf ${INSTALLTMP} .if make(distributeworld) .for dist in ${EXTRA_DISTRIBUTIONS} - find ${DESTDIR}/${DISTDIR}/${dist} -mindepth 1 -empty -delete + find ${DESTDIR}/${DISTDIR}/${dist} -mindepth 1 -type d -empty -delete .endfor .if defined(NO_ROOT) .for dist in base ${EXTRA_DISTRIBUTIONS} @@ -2378,11 +2378,11 @@ check-old-dirs: .PHONY done delete-old: delete-old-files delete-old-dirs .PHONY - @echo "To remove old libraries run '${MAKE} delete-old-libs'." + @echo "To remove old libraries run '${MAKE_CMD} delete-old-libs'." check-old: check-old-files check-old-libs check-old-dirs .PHONY - @echo "To remove old files and directories run '${MAKE} delete-old'." - @echo "To remove old libraries run '${MAKE} delete-old-libs'." + @echo "To remove old files and directories run '${MAKE_CMD} delete-old'." + @echo "To remove old libraries run '${MAKE_CMD} delete-old-libs'." .endif Modified: user/alc/PG_CACHED/bin/ps/ps.1 ============================================================================== --- user/alc/PG_CACHED/bin/ps/ps.1 Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/bin/ps/ps.1 Sat Aug 13 23:00:15 2016 (r304064) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd July 28, 2016 +.Dd August 12, 2016 .Dt PS 1 .Os .Sh NAME @@ -319,7 +319,6 @@ the include file .It Dv "P_ADVLOCK" Ta No "0x00001" Ta "Process may hold a POSIX advisory lock" .It Dv "P_CONTROLT" Ta No "0x00002" Ta "Has a controlling terminal" .It Dv "P_KPROC" Ta No "0x00004" Ta "Kernel process" -.It Dv "P_FOLLOWFORK" Ta No "0x00008" Ta "Attach debugger to new children" .It Dv "P_PPWAIT" Ta No "0x00010" Ta "Parent is waiting for child to exec/exit" .It Dv "P_PROFIL" Ta No "0x00020" Ta "Has started profiling" .It Dv "P_STOPPROF" Ta No "0x00040" Ta "Has thread in requesting to stop prof" @@ -768,7 +767,8 @@ operating systems. The .Nm command appeared in -.At v4 . +.At v3 +in section 8 of the manual. .Sh BUGS Since .Nm Modified: user/alc/PG_CACHED/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c ============================================================================== --- user/alc/PG_CACHED/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Aug 13 23:00:15 2016 (r304064) @@ -816,6 +816,11 @@ die_enum_create(dwarf_t *dw, Dwarf_Die d Dwarf_Unsigned uval; Dwarf_Signed sval; + if (die_isdecl(dw, die)) { + tdp->t_type = FORWARD; + return; + } + debug(3, "die %llu: creating enum\n", off); tdp->t_type = ENUM; Modified: user/alc/PG_CACHED/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c ============================================================================== --- user/alc/PG_CACHED/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Sat Aug 13 23:00:15 2016 (r304064) @@ -338,7 +338,8 @@ fwd_equiv(tdesc_t *ctdp, tdesc_t *mtdp) { tdesc_t *defn = (ctdp->t_type == FORWARD ? mtdp : ctdp); - return (defn->t_type == STRUCT || defn->t_type == UNION); + return (defn->t_type == STRUCT || defn->t_type == UNION || + defn->t_type == ENUM); } static int Modified: user/alc/PG_CACHED/cddl/usr.sbin/dtrace/tests/common/raise/Makefile ============================================================================== --- user/alc/PG_CACHED/cddl/usr.sbin/dtrace/tests/common/raise/Makefile Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/cddl/usr.sbin/dtrace/tests/common/raise/Makefile Sat Aug 13 23:00:15 2016 (r304064) @@ -20,4 +20,6 @@ CFILES= \ tst.raise3.c \ +TEST_METADATA.t_dtrace_contrib+= required_memory="4g" + .include "../../dtrace.test.mk" Modified: user/alc/PG_CACHED/cddl/usr.sbin/dtrace/tests/common/safety/Makefile ============================================================================== --- user/alc/PG_CACHED/cddl/usr.sbin/dtrace/tests/common/safety/Makefile Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/cddl/usr.sbin/dtrace/tests/common/safety/Makefile Sat Aug 13 23:00:15 2016 (r304064) @@ -53,4 +53,6 @@ CFILES= \ +TEST_METADATA.t_dtrace_contrib+= required_memory="4g" + .include "../../dtrace.test.mk" Modified: user/alc/PG_CACHED/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh ============================================================================== --- user/alc/PG_CACHED/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh Sat Aug 13 23:00:15 2016 (r304064) @@ -34,15 +34,28 @@ genmakefile() # One-off variable definitions. local special - if [ "$basedir" = proc ]; then + case "$basedir" in + proc) special=" LIBADD.tst.sigwait.exe+= rt " - elif [ "$basedir" = uctf ]; then + ;; + raise) + special=" +TEST_METADATA.t_dtrace_contrib+= required_memory=\"4g\" +" + ;; + safety) + special=" +TEST_METADATA.t_dtrace_contrib+= required_memory=\"4g\" +" + ;; + uctf) special=" WITH_CTF=YES " - fi + ;; + esac local makefile=$(mktemp) cat <<__EOF__ > $makefile Modified: user/alc/PG_CACHED/etc/rc.d/jail ============================================================================== --- user/alc/PG_CACHED/etc/rc.d/jail Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/etc/rc.d/jail Sat Aug 13 23:00:15 2016 (r304064) @@ -260,6 +260,7 @@ parse_options() extract_var $_jv set_hostname_allow allow.set_hostname YN NO extract_var $_jv sysvipc_allow allow.sysvipc YN NO + extract_var $_jv enforce_statfs enforce_statfs - 2 extract_var $_jv osreldate osreldate extract_var $_jv osrelease osrelease for _p in $_parameters; do Modified: user/alc/PG_CACHED/include/unistd.h ============================================================================== --- user/alc/PG_CACHED/include/unistd.h Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/include/unistd.h Sat Aug 13 23:00:15 2016 (r304064) @@ -484,11 +484,18 @@ pid_t vfork(void) __returns_twice; #if __BSD_VISIBLE struct timeval; /* select(2) */ + +struct crypt_data { + int initialized; /* For compatibility with glibc. */ + char __buf[256]; /* Buffer returned by crypt_r(). */ +}; + int acct(const char *); int async_daemon(void); int check_utility_compat(const char *); const char * crypt_get_format(void); +char *crypt_r(const char *, const char *, struct crypt_data *); int crypt_set_format(const char *); int des_cipher(const char *, char *, long, int); int des_setkey(const char *key); Modified: user/alc/PG_CACHED/lib/libc/gen/Makefile.inc ============================================================================== --- user/alc/PG_CACHED/lib/libc/gen/Makefile.inc Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/lib/libc/gen/Makefile.inc Sat Aug 13 23:00:15 2016 (r304064) @@ -29,6 +29,7 @@ SRCS+= __getosreldate.c \ devname.c \ dirfd.c \ dirname.c \ + dirname_compat.c \ disklabel.c \ dlfcn.c \ drand48.c \ Modified: user/alc/PG_CACHED/lib/libc/gen/Symbol.map ============================================================================== --- user/alc/PG_CACHED/lib/libc/gen/Symbol.map Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/lib/libc/gen/Symbol.map Sat Aug 13 23:00:15 2016 (r304064) @@ -82,7 +82,6 @@ FBSD_1.0 { daemon; devname; devname_r; - dirname; getdiskbyname; dladdr; dlclose; @@ -418,6 +417,10 @@ FBSD_1.4 { stravis; }; +FBSD_1.5 { + dirname; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; Modified: user/alc/PG_CACHED/lib/libc/gen/dirname.3 ============================================================================== --- user/alc/PG_CACHED/lib/libc/gen/dirname.3 Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/lib/libc/gen/dirname.3 Sat Aug 13 23:00:15 2016 (r304064) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 29, 2016 +.Dd August 12, 2016 .Dt DIRNAME 3 .Os .Sh NAME @@ -37,6 +37,7 @@ Any trailing .Sq \&/ characters are not counted as part of the directory name. +.Sh RETURN VALUES If .Fa path is a null pointer, the empty string, or contains no @@ -46,40 +47,24 @@ characters, returns a pointer to the string .Qq \&. , signifying the current directory. +Otherwise, +it returns a pointer to the parent directory of +.Fa path . .Sh IMPLEMENTATION NOTES -The +This implementation of .Fn dirname -function -returns a pointer to internal storage space allocated on the first call -that will be overwritten -by subsequent calls. +uses the buffer provided by the caller to store the resulting parent +directory. +Other vendor implementations may return a pointer to internal storage +space instead. +The advantage of the former approach is that it ensures thread-safety, +while also placing no upper limit on the supported length of the +pathname. .Pp -Other vendor implementations of -.Fn dirname -may store their result in the input buffer, -making it safe to use in multithreaded applications. -Future versions of -.Fx -will follow this approach as well. -.Sh RETURN VALUES -On successful completion, -.Fn dirname -returns a pointer to the parent directory of -.Fa path . -.Pp -If -.Fn dirname -fails, a null pointer is returned and the global variable -.Va errno -is set to indicate the error. -.Sh ERRORS -The following error codes may be set in -.Va errno : -.Bl -tag -width Er -.It Bq Er ENAMETOOLONG -The path component to be returned was larger than -.Dv MAXPATHLEN . -.El +The algorithm used by this implementation also discards redundant +slashes and +.Qq \&. +pathname components from the pathname string. .Sh SEE ALSO .Xr basename 1 , .Xr dirname 1 , @@ -96,5 +81,10 @@ function first appeared in .Ox 2.2 and .Fx 4.2 . +.Pp +In +.Fx 12.0 , +this function was reimplemented to store its result in the provided +input buffer. .Sh AUTHORS -.An "Todd C. Miller" +.An Nuxi, the Netherlands Modified: user/alc/PG_CACHED/lib/libc/gen/dirname.c ============================================================================== --- user/alc/PG_CACHED/lib/libc/gen/dirname.c Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/lib/libc/gen/dirname.c Sat Aug 13 23:00:15 2016 (r304064) @@ -1,77 +1,90 @@ -/* $OpenBSD: dirname.c,v 1.13 2005/08/08 08:05:33 espie Exp $ */ - -/* - * Copyright (c) 1997, 2004 Todd C. Miller +/*- + * Copyright (c) 2015-2016 Nuxi, https://nuxi.nl/ * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. + * 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. * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); -#include #include -#include +#include #include -#include char * dirname(char *path) { - static char *dname = NULL; - size_t len; - const char *endp; - - if (dname == NULL) { - dname = (char *)malloc(MAXPATHLEN); - if (dname == NULL) - return(NULL); - } - - /* Empty or NULL string gets treated as "." */ - if (path == NULL || *path == '\0') { - dname[0] = '.'; - dname[1] = '\0'; - return (dname); + const char *in, *prev, *begin, *end; + char *out; + size_t prevlen; + bool skipslash; + + /* + * If path is a null pointer or points to an empty string, + * dirname() shall return a pointer to the string ".". + */ + if (path == NULL || *path == '\0') + return ((char *)"."); + + /* Retain at least one leading slash character. */ + in = out = *path == '/' ? path + 1 : path; + + skipslash = true; + prev = "."; + prevlen = 1; + for (;;) { + /* Extract the next pathname component. */ + while (*in == '/') + ++in; + begin = in; + while (*in != '/' && *in != '\0') + ++in; + end = in; + if (begin == end) + break; + + /* + * Copy over the previous pathname component, except if + * it's dot. There is no point in retaining those. + */ + if (prevlen != 1 || *prev != '.') { + if (!skipslash) + *out++ = '/'; + skipslash = false; + memmove(out, prev, prevlen); + out += prevlen; + } + + /* Preserve the pathname component for the next iteration. */ + prev = begin; + prevlen = end - begin; } - /* Strip any trailing slashes */ - endp = path + strlen(path) - 1; - while (endp > path && *endp == '/') - endp--; - - /* Find the start of the dir */ - while (endp > path && *endp != '/') - endp--; - - /* Either the dir is "/" or there are no slashes */ - if (endp == path) { - dname[0] = *endp == '/' ? '/' : '.'; - dname[1] = '\0'; - return (dname); - } else { - /* Move forward past the separating slashes */ - do { - endp--; - } while (endp > path && *endp == '/'); - } - - len = endp - path + 1; - if (len >= MAXPATHLEN) { - errno = ENAMETOOLONG; - return (NULL); - } - memcpy(dname, path, len); - dname[len] = '\0'; - return (dname); + /* + * If path does not contain a '/', then dirname() shall return a + * pointer to the string ".". + */ + if (out == path) + *out++ = '.'; + *out = '\0'; + return (path); } Copied: user/alc/PG_CACHED/lib/libc/gen/dirname_compat.c (from r304063, user/alc/PQ_LAUNDRY/lib/libc/gen/dirname_compat.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/alc/PG_CACHED/lib/libc/gen/dirname_compat.c Sat Aug 13 23:00:15 2016 (r304064, copy of r304063, user/alc/PQ_LAUNDRY/lib/libc/gen/dirname_compat.c) @@ -0,0 +1,79 @@ +/* $OpenBSD: dirname.c,v 1.13 2005/08/08 08:05:33 espie Exp $ */ + +/* + * Copyright (c) 1997, 2004 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +char * +__freebsd11_dirname(char *path) +{ + static char *dname = NULL; + size_t len; + const char *endp; + + if (dname == NULL) { + dname = (char *)malloc(MAXPATHLEN); + if (dname == NULL) + return(NULL); + } + + /* Empty or NULL string gets treated as "." */ + if (path == NULL || *path == '\0') { + dname[0] = '.'; + dname[1] = '\0'; + return (dname); + } + + /* Strip any trailing slashes */ + endp = path + strlen(path) - 1; + while (endp > path && *endp == '/') + endp--; + + /* Find the start of the dir */ + while (endp > path && *endp != '/') + endp--; + + /* Either the dir is "/" or there are no slashes */ + if (endp == path) { + dname[0] = *endp == '/' ? '/' : '.'; + dname[1] = '\0'; + return (dname); + } else { + /* Move forward past the separating slashes */ + do { + endp--; + } while (endp > path && *endp == '/'); + } + + len = endp - path + 1; + if (len >= MAXPATHLEN) { + errno = ENAMETOOLONG; + return (NULL); + } + memcpy(dname, path, len); + dname[len] = '\0'; + return (dname); +} + +__sym_compat(dirname, __freebsd11_dirname, FBSD_1.0); Modified: user/alc/PG_CACHED/lib/libc/net/getaddrinfo.c ============================================================================== --- user/alc/PG_CACHED/lib/libc/net/getaddrinfo.c Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/lib/libc/net/getaddrinfo.c Sat Aug 13 23:00:15 2016 (r304064) @@ -2249,6 +2249,8 @@ _dns_getaddrinfo(void *rv, void *cb_data struct res_target q, q2; res_state res; + ai = NULL; + hostname = va_arg(ap, char *); pai = va_arg(ap, const struct addrinfo *); @@ -2327,16 +2329,16 @@ _dns_getaddrinfo(void *rv, void *cb_data /* prefer IPv6 */ if (q.next) { ai = getanswer(buf2, q2.n, q2.name, q2.qtype, pai, res); - if (ai) { + if (ai != NULL) { cur->ai_next = ai; while (cur && cur->ai_next) cur = cur->ai_next; } } - if (!ai || pai->ai_family != AF_UNSPEC || + if (ai == NULL || pai->ai_family != AF_UNSPEC || (pai->ai_flags & (AI_ALL | AI_V4MAPPED)) != AI_V4MAPPED) { ai = getanswer(buf, q.n, q.name, q.qtype, pai, res); - if (ai) + if (ai != NULL) cur->ai_next = ai; } free(buf); Modified: user/alc/PG_CACHED/lib/libc/rpc/svc_vc.c ============================================================================== --- user/alc/PG_CACHED/lib/libc/rpc/svc_vc.c Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/lib/libc/rpc/svc_vc.c Sat Aug 13 23:00:15 2016 (r304064) @@ -700,7 +700,7 @@ svc_vc_rendezvous_ops(SVCXPRT *xprt) ops.xp_reply = (bool_t (*)(SVCXPRT *, struct rpc_msg *))abort; ops.xp_freeargs = - (bool_t (*)(SVCXPRT *, xdrproc_t, void *))abort, + (bool_t (*)(SVCXPRT *, xdrproc_t, void *))abort; ops.xp_destroy = svc_vc_destroy; ops2.xp_control = svc_vc_rendezvous_control; } Modified: user/alc/PG_CACHED/lib/libc/tests/resolv/resolv_test.c ============================================================================== --- user/alc/PG_CACHED/lib/libc/tests/resolv/resolv_test.c Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/lib/libc/tests/resolv/resolv_test.c Sat Aug 13 23:00:15 2016 (r304064) @@ -291,7 +291,7 @@ do { \ ATF_TC(getaddrinfo_test); ATF_TC_HEAD(getaddrinfo_test, tc) { - atf_tc_set_md_var(tc, "timeout", "450"); + atf_tc_set_md_var(tc, "timeout", "1200"); } ATF_TC_BODY(getaddrinfo_test, tc) { @@ -301,7 +301,7 @@ ATF_TC_BODY(getaddrinfo_test, tc) ATF_TC(gethostby_test); ATF_TC_HEAD(gethostby_test, tc) { - atf_tc_set_md_var(tc, "timeout", "450"); + atf_tc_set_md_var(tc, "timeout", "1200"); } ATF_TC_BODY(gethostby_test, tc) { @@ -312,7 +312,7 @@ ATF_TC_BODY(gethostby_test, tc) ATF_TC(getipnodeby_test); ATF_TC_HEAD(getipnodeby_test, tc) { - atf_tc_set_md_var(tc, "timeout", "450"); + atf_tc_set_md_var(tc, "timeout", "1200"); } ATF_TC_BODY(getipnodeby_test, tc) { Modified: user/alc/PG_CACHED/lib/libcrypt/Makefile ============================================================================== --- user/alc/PG_CACHED/lib/libcrypt/Makefile Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/lib/libcrypt/Makefile Sat Aug 13 23:00:15 2016 (r304064) @@ -17,7 +17,8 @@ SRCS= crypt.c misc.c \ crypt-sha256.c sha256c.c \ crypt-sha512.c sha512c.c MAN= crypt.3 -MLINKS= crypt.3 crypt_get_format.3 crypt.3 crypt_set_format.3 +MLINKS= crypt.3 crypt_get_format.3 crypt.3 crypt_r.3 \ + crypt.3 crypt_set_format.3 CFLAGS+= -I${.CURDIR}/../libmd -I${.CURDIR}/../libutil \ -I${.CURDIR}/../../sys/crypto/sha2 Modified: user/alc/PG_CACHED/lib/libcrypt/crypt-md5.c ============================================================================== --- user/alc/PG_CACHED/lib/libcrypt/crypt-md5.c Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/lib/libcrypt/crypt-md5.c Sat Aug 13 23:00:15 2016 (r304064) @@ -41,31 +41,27 @@ __FBSDID("$FreeBSD$"); * UNIX password */ -char * -crypt_md5(const char *pw, const char *salt) +int +crypt_md5(const char *pw, const char *salt, char *buffer) { MD5_CTX ctx,ctx1; unsigned long l; int sl, pl; u_int i; u_char final[MD5_SIZE]; - static const char *sp, *ep; - static char passwd[120], *p; + const char *ep; static const char *magic = "$1$"; - /* Refine the Salt first */ - sp = salt; - - /* If it starts with the magic string, then skip that */ - if(!strncmp(sp, magic, strlen(magic))) - sp += strlen(magic); + /* If the salt starts with the magic string, skip that. */ + if (!strncmp(salt, magic, strlen(magic))) + salt += strlen(magic); /* It stops at the first '$', max 8 chars */ - for(ep = sp; *ep && *ep != '$' && ep < (sp + 8); ep++) + for (ep = salt; *ep && *ep != '$' && ep < salt + 8; ep++) continue; /* get the length of the true salt */ - sl = ep - sp; + sl = ep - salt; MD5Init(&ctx); @@ -76,12 +72,12 @@ crypt_md5(const char *pw, const char *sa MD5Update(&ctx, (const u_char *)magic, strlen(magic)); /* Then the raw salt */ - MD5Update(&ctx, (const u_char *)sp, (u_int)sl); + MD5Update(&ctx, (const u_char *)salt, (u_int)sl); /* Then just as many characters of the MD5(pw,salt,pw) */ MD5Init(&ctx1); MD5Update(&ctx1, (const u_char *)pw, strlen(pw)); - MD5Update(&ctx1, (const u_char *)sp, (u_int)sl); + MD5Update(&ctx1, (const u_char *)salt, (u_int)sl); MD5Update(&ctx1, (const u_char *)pw, strlen(pw)); MD5Final(final, &ctx1); for(pl = (int)strlen(pw); pl > 0; pl -= MD5_SIZE) @@ -99,9 +95,9 @@ crypt_md5(const char *pw, const char *sa MD5Update(&ctx, (const u_char *)pw, 1); /* Now make the output string */ - strcpy(passwd, magic); - strncat(passwd, sp, (u_int)sl); - strcat(passwd, "$"); + buffer = stpcpy(buffer, magic); + buffer = stpncpy(buffer, salt, (u_int)sl); + *buffer++ = '$'; MD5Final(final, &ctx); @@ -118,7 +114,7 @@ crypt_md5(const char *pw, const char *sa MD5Update(&ctx1, (const u_char *)final, MD5_SIZE); if(i % 3) - MD5Update(&ctx1, (const u_char *)sp, (u_int)sl); + MD5Update(&ctx1, (const u_char *)salt, (u_int)sl); if(i % 7) MD5Update(&ctx1, (const u_char *)pw, strlen(pw)); @@ -130,24 +126,22 @@ crypt_md5(const char *pw, const char *sa MD5Final(final, &ctx1); } - p = passwd + strlen(passwd); - l = (final[ 0]<<16) | (final[ 6]<<8) | final[12]; - _crypt_to64(p, l, 4); p += 4; + _crypt_to64(buffer, l, 4); buffer += 4; l = (final[ 1]<<16) | (final[ 7]<<8) | final[13]; - _crypt_to64(p, l, 4); p += 4; + _crypt_to64(buffer, l, 4); buffer += 4; l = (final[ 2]<<16) | (final[ 8]<<8) | final[14]; - _crypt_to64(p, l, 4); p += 4; + _crypt_to64(buffer, l, 4); buffer += 4; l = (final[ 3]<<16) | (final[ 9]<<8) | final[15]; - _crypt_to64(p, l, 4); p += 4; + _crypt_to64(buffer, l, 4); buffer += 4; l = (final[ 4]<<16) | (final[10]<<8) | final[ 5]; - _crypt_to64(p, l, 4); p += 4; + _crypt_to64(buffer, l, 4); buffer += 4; l = final[11]; - _crypt_to64(p, l, 2); p += 2; - *p = '\0'; + _crypt_to64(buffer, l, 2); buffer += 2; + *buffer = '\0'; /* Don't leave anything around in vm they could use. */ memset(final, 0, sizeof(final)); - return (passwd); + return (0); } Modified: user/alc/PG_CACHED/lib/libcrypt/crypt-nthash.c ============================================================================== --- user/alc/PG_CACHED/lib/libcrypt/crypt-nthash.c Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/lib/libcrypt/crypt-nthash.c Sat Aug 13 23:00:15 2016 (r304064) @@ -46,16 +46,14 @@ __FBSDID("$FreeBSD$"); */ /* ARGSUSED */ -char * -crypt_nthash(const char *pw, const char *salt __unused) +int +crypt_nthash(const char *pw, const char *salt __unused, char *buffer) { size_t unipwLen; - int i, j; - static char hexconvtab[] = "0123456789abcdef"; + int i; + static const char hexconvtab[] = "0123456789abcdef"; static const char *magic = "$3$"; - static char passwd[120]; u_int16_t unipw[128]; - char final[MD4_SIZE*2 + 1]; u_char hash[MD4_SIZE]; const char *s; MD4_CTX ctx; @@ -70,19 +68,14 @@ crypt_nthash(const char *pw, const char MD4Init(&ctx); MD4Update(&ctx, (u_char *)unipw, unipwLen*sizeof(u_int16_t)); MD4Final(hash, &ctx); - - for (i = j = 0; i < MD4_SIZE; i++) { - final[j++] = hexconvtab[hash[i] >> 4]; - final[j++] = hexconvtab[hash[i] & 15]; - } - final[j] = '\0'; - - strcpy(passwd, magic); - strcat(passwd, "$"); - strncat(passwd, final, MD4_SIZE*2); - /* Don't leave anything around in vm they could use. */ - memset(final, 0, sizeof(final)); + buffer = stpcpy(buffer, magic); + *buffer++ = '$'; + for (i = 0; i < MD4_SIZE; i++) { + *buffer++ = hexconvtab[hash[i] >> 4]; + *buffer++ = hexconvtab[hash[i] & 15]; + } + *buffer = '\0'; - return (passwd); + return (0); } Modified: user/alc/PG_CACHED/lib/libcrypt/crypt-sha256.c ============================================================================== --- user/alc/PG_CACHED/lib/libcrypt/crypt-sha256.c Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/lib/libcrypt/crypt-sha256.c Sat Aug 13 23:00:15 2016 (r304064) @@ -59,11 +59,10 @@ static const char sha256_rounds_prefix[] /* Maximum number of rounds. */ #define ROUNDS_MAX 999999999 -static char * -crypt_sha256_r(const char *key, const char *salt, char *buffer, int buflen) +int +crypt_sha256(const char *key, const char *salt, char *buffer) { u_long srounds; - int n; uint8_t alt_result[32], temp_result[32]; SHA256_CTX ctx, alt_ctx; size_t salt_len, key_len, cnt, rounds; @@ -210,42 +209,27 @@ crypt_sha256_r(const char *key, const ch /* Now we can construct the result string. It consists of three * parts. */ - cp = stpncpy(buffer, sha256_salt_prefix, MAX(0, buflen)); - buflen -= sizeof(sha256_salt_prefix) - 1; + cp = stpcpy(buffer, sha256_salt_prefix); - if (rounds_custom) { - n = snprintf(cp, MAX(0, buflen), "%s%zu$", - sha256_rounds_prefix, rounds); + if (rounds_custom) + cp += sprintf(cp, "%s%zu$", sha256_rounds_prefix, rounds); - cp += n; - buflen -= n; - } + cp = stpncpy(cp, salt, salt_len); - cp = stpncpy(cp, salt, MIN((size_t)MAX(0, buflen), salt_len)); - buflen -= MIN((size_t)MAX(0, buflen), salt_len); + *cp++ = '$'; - if (buflen > 0) { - *cp++ = '$'; - --buflen; - } - - b64_from_24bit(alt_result[0], alt_result[10], alt_result[20], 4, &buflen, &cp); - b64_from_24bit(alt_result[21], alt_result[1], alt_result[11], 4, &buflen, &cp); - b64_from_24bit(alt_result[12], alt_result[22], alt_result[2], 4, &buflen, &cp); - b64_from_24bit(alt_result[3], alt_result[13], alt_result[23], 4, &buflen, &cp); - b64_from_24bit(alt_result[24], alt_result[4], alt_result[14], 4, &buflen, &cp); - b64_from_24bit(alt_result[15], alt_result[25], alt_result[5], 4, &buflen, &cp); - b64_from_24bit(alt_result[6], alt_result[16], alt_result[26], 4, &buflen, &cp); - b64_from_24bit(alt_result[27], alt_result[7], alt_result[17], 4, &buflen, &cp); - b64_from_24bit(alt_result[18], alt_result[28], alt_result[8], 4, &buflen, &cp); - b64_from_24bit(alt_result[9], alt_result[19], alt_result[29], 4, &buflen, &cp); - b64_from_24bit(0, alt_result[31], alt_result[30], 3, &buflen, &cp); - if (buflen <= 0) { - errno = ERANGE; - buffer = NULL; - } - else - *cp = '\0'; /* Terminate the string. */ + b64_from_24bit(alt_result[0], alt_result[10], alt_result[20], 4, &cp); + b64_from_24bit(alt_result[21], alt_result[1], alt_result[11], 4, &cp); + b64_from_24bit(alt_result[12], alt_result[22], alt_result[2], 4, &cp); + b64_from_24bit(alt_result[3], alt_result[13], alt_result[23], 4, &cp); + b64_from_24bit(alt_result[24], alt_result[4], alt_result[14], 4, &cp); + b64_from_24bit(alt_result[15], alt_result[25], alt_result[5], 4, &cp); + b64_from_24bit(alt_result[6], alt_result[16], alt_result[26], 4, &cp); + b64_from_24bit(alt_result[27], alt_result[7], alt_result[17], 4, &cp); + b64_from_24bit(alt_result[18], alt_result[28], alt_result[8], 4, &cp); + b64_from_24bit(alt_result[9], alt_result[19], alt_result[29], 4, &cp); + b64_from_24bit(0, alt_result[31], alt_result[30], 3, &cp); + *cp = '\0'; /* Terminate the string. */ /* Clear the buffer for the intermediate result so that people * attaching to processes or reading core dumps cannot get any @@ -263,37 +247,7 @@ crypt_sha256_r(const char *key, const ch if (copied_salt != NULL) memset(copied_salt, '\0', salt_len); - return buffer; -} - -/* This entry point is equivalent to crypt(3). */ -char * -crypt_sha256(const char *key, const char *salt) -{ - /* We don't want to have an arbitrary limit in the size of the - * password. We can compute an upper bound for the size of the - * result in advance and so we can prepare the buffer we pass to - * `crypt_sha256_r'. */ - static char *buffer; - static int buflen; - int needed; - char *new_buffer; - - needed = (sizeof(sha256_salt_prefix) - 1 - + sizeof(sha256_rounds_prefix) + 9 + 1 - + strlen(salt) + 1 + 43 + 1); - - if (buflen < needed) { - new_buffer = (char *)realloc(buffer, needed); - - if (new_buffer == NULL) - return NULL; - - buffer = new_buffer; - buflen = needed; - } - - return crypt_sha256_r(key, salt, buffer, buflen); + return (0); } #ifdef TEST Modified: user/alc/PG_CACHED/lib/libcrypt/crypt-sha512.c ============================================================================== --- user/alc/PG_CACHED/lib/libcrypt/crypt-sha512.c Sat Aug 13 22:57:41 2016 (r304063) +++ user/alc/PG_CACHED/lib/libcrypt/crypt-sha512.c Sat Aug 13 23:00:15 2016 (r304064) @@ -59,11 +59,10 @@ static const char sha512_rounds_prefix[] /* Maximum number of rounds. */ #define ROUNDS_MAX 999999999 -static char * -crypt_sha512_r(const char *key, const char *salt, char *buffer, int buflen) +int +crypt_sha512(const char *key, const char *salt, char *buffer) { u_long srounds; - int n; uint8_t alt_result[64], temp_result[64]; SHA512_CTX ctx, alt_ctx; size_t salt_len, key_len, cnt, rounds; @@ -210,54 +209,39 @@ crypt_sha512_r(const char *key, const ch /* Now we can construct the result string. It consists of three * parts. */ - cp = stpncpy(buffer, sha512_salt_prefix, MAX(0, buflen)); - buflen -= sizeof(sha512_salt_prefix) - 1; + cp = stpcpy(buffer, sha512_salt_prefix); - if (rounds_custom) { - n = snprintf(cp, MAX(0, buflen), "%s%zu$", - sha512_rounds_prefix, rounds); + if (rounds_custom) + cp += sprintf(cp, "%s%zu$", sha512_rounds_prefix, rounds); - cp += n; - buflen -= n; - } + cp = stpncpy(cp, salt, salt_len); - cp = stpncpy(cp, salt, MIN((size_t)MAX(0, buflen), salt_len)); - buflen -= MIN((size_t)MAX(0, buflen), salt_len); + *cp++ = '$'; - if (buflen > 0) { - *cp++ = '$'; - --buflen; - } + b64_from_24bit(alt_result[0], alt_result[21], alt_result[42], 4, &cp); + b64_from_24bit(alt_result[22], alt_result[43], alt_result[1], 4, &cp); + b64_from_24bit(alt_result[44], alt_result[2], alt_result[23], 4, &cp); + b64_from_24bit(alt_result[3], alt_result[24], alt_result[45], 4, &cp); + b64_from_24bit(alt_result[25], alt_result[46], alt_result[4], 4, &cp); + b64_from_24bit(alt_result[47], alt_result[5], alt_result[26], 4, &cp); + b64_from_24bit(alt_result[6], alt_result[27], alt_result[48], 4, &cp); + b64_from_24bit(alt_result[28], alt_result[49], alt_result[7], 4, &cp); + b64_from_24bit(alt_result[50], alt_result[8], alt_result[29], 4, &cp); + b64_from_24bit(alt_result[9], alt_result[30], alt_result[51], 4, &cp); + b64_from_24bit(alt_result[31], alt_result[52], alt_result[10], 4, &cp); + b64_from_24bit(alt_result[53], alt_result[11], alt_result[32], 4, &cp); + b64_from_24bit(alt_result[12], alt_result[33], alt_result[54], 4, &cp); + b64_from_24bit(alt_result[34], alt_result[55], alt_result[13], 4, &cp); + b64_from_24bit(alt_result[56], alt_result[14], alt_result[35], 4, &cp); + b64_from_24bit(alt_result[15], alt_result[36], alt_result[57], 4, &cp); + b64_from_24bit(alt_result[37], alt_result[58], alt_result[16], 4, &cp); + b64_from_24bit(alt_result[59], alt_result[17], alt_result[38], 4, &cp); + b64_from_24bit(alt_result[18], alt_result[39], alt_result[60], 4, &cp); + b64_from_24bit(alt_result[40], alt_result[61], alt_result[19], 4, &cp); + b64_from_24bit(alt_result[62], alt_result[20], alt_result[41], 4, &cp); + b64_from_24bit(0, 0, alt_result[63], 2, &cp); - b64_from_24bit(alt_result[0], alt_result[21], alt_result[42], 4, &buflen, &cp); - b64_from_24bit(alt_result[22], alt_result[43], alt_result[1], 4, &buflen, &cp); - b64_from_24bit(alt_result[44], alt_result[2], alt_result[23], 4, &buflen, &cp); - b64_from_24bit(alt_result[3], alt_result[24], alt_result[45], 4, &buflen, &cp); - b64_from_24bit(alt_result[25], alt_result[46], alt_result[4], 4, &buflen, &cp); - b64_from_24bit(alt_result[47], alt_result[5], alt_result[26], 4, &buflen, &cp); - b64_from_24bit(alt_result[6], alt_result[27], alt_result[48], 4, &buflen, &cp); - b64_from_24bit(alt_result[28], alt_result[49], alt_result[7], 4, &buflen, &cp); - b64_from_24bit(alt_result[50], alt_result[8], alt_result[29], 4, &buflen, &cp); - b64_from_24bit(alt_result[9], alt_result[30], alt_result[51], 4, &buflen, &cp); - b64_from_24bit(alt_result[31], alt_result[52], alt_result[10], 4, &buflen, &cp); - b64_from_24bit(alt_result[53], alt_result[11], alt_result[32], 4, &buflen, &cp); - b64_from_24bit(alt_result[12], alt_result[33], alt_result[54], 4, &buflen, &cp); - b64_from_24bit(alt_result[34], alt_result[55], alt_result[13], 4, &buflen, &cp); - b64_from_24bit(alt_result[56], alt_result[14], alt_result[35], 4, &buflen, &cp); - b64_from_24bit(alt_result[15], alt_result[36], alt_result[57], 4, &buflen, &cp); - b64_from_24bit(alt_result[37], alt_result[58], alt_result[16], 4, &buflen, &cp); - b64_from_24bit(alt_result[59], alt_result[17], alt_result[38], 4, &buflen, &cp); - b64_from_24bit(alt_result[18], alt_result[39], alt_result[60], 4, &buflen, &cp); - b64_from_24bit(alt_result[40], alt_result[61], alt_result[19], 4, &buflen, &cp); - b64_from_24bit(alt_result[62], alt_result[20], alt_result[41], 4, &buflen, &cp); - b64_from_24bit(0, 0, alt_result[63], 2, &buflen, &cp); - - if (buflen <= 0) { - errno = ERANGE; - buffer = NULL; - } - else - *cp = '\0'; /* Terminate the string. */ + *cp = '\0'; /* Terminate the string. */ /* Clear the buffer for the intermediate result so that people * attaching to processes or reading core dumps cannot get any @@ -275,37 +259,7 @@ crypt_sha512_r(const char *key, const ch if (copied_salt != NULL) memset(copied_salt, '\0', salt_len); - return buffer; -} - -/* This entry point is equivalent to crypt(3). */ -char * -crypt_sha512(const char *key, const char *salt) *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***