From owner-svn-src-user@freebsd.org Mon May 20 08:01:44 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AC0615A54E8 for ; Mon, 20 May 2019 08:01:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0BCFF6A653; Mon, 20 May 2019 08:01:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A883F1B841; Mon, 20 May 2019 08:01:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4K81hwU052664; Mon, 20 May 2019 08:01:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4K81chP052636; Mon, 20 May 2019 08:01:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905200801.x4K81chP052636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 20 May 2019 08:01:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r347987 - in user/ngie/bug-237403: . cddl/contrib/opensolaris/cmd/zfs contrib/netbsd-tests/lib/libc/sys contrib/wpa/wpa_supplicant etc lib/libbe lib/libc/amd64/sys lib/libc/gen lib/libc... X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in user/ngie/bug-237403: . cddl/contrib/opensolaris/cmd/zfs contrib/netbsd-tests/lib/libc/sys contrib/wpa/wpa_supplicant etc lib/libbe lib/libc/amd64/sys lib/libc/gen lib/libc/powerpc64/string lib/lib... X-SVN-Commit-Revision: 347987 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0BCFF6A653 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 20 May 2019 08:01:44 -0000 Author: ngie Date: Mon May 20 08:01:37 2019 New Revision: 347987 URL: https://svnweb.freebsd.org/changeset/base/347987 Log: MFhead@r347986 Added: user/ngie/bug-237403/lib/libc/gen/group - copied unchanged from r347986, head/lib/libc/gen/group user/ngie/bug-237403/lib/libc/gen/master.passwd - copied unchanged from r347986, head/lib/libc/gen/master.passwd user/ngie/bug-237403/sys/dev/usb/usb_fdt_support.c - copied unchanged from r347986, head/sys/dev/usb/usb_fdt_support.c user/ngie/bug-237403/sys/dev/usb/usb_fdt_support.h - copied unchanged from r347986, head/sys/dev/usb/usb_fdt_support.h user/ngie/bug-237403/sys/modules/lindebugfs/ - copied from r347986, head/sys/modules/lindebugfs/ user/ngie/bug-237403/sys/sys/_eventhandler.h - copied unchanged from r347986, head/sys/sys/_eventhandler.h user/ngie/bug-237403/tests/sys/sys/rb_test.c - copied unchanged from r347986, head/tests/sys/sys/rb_test.c user/ngie/bug-237403/tests/sys/sys/splay_test.c - copied unchanged from r347986, head/tests/sys/sys/splay_test.c Deleted: user/ngie/bug-237403/etc/group user/ngie/bug-237403/etc/master.passwd user/ngie/bug-237403/lib/libc/powerpc64/string/ user/ngie/bug-237403/share/man/man4/de.4 user/ngie/bug-237403/share/man/man4/ed.4 user/ngie/bug-237403/share/man/man4/man4.i386/cs.4 user/ngie/bug-237403/share/man/man4/man4.i386/ep.4 user/ngie/bug-237403/share/man/man4/man4.i386/ex.4 user/ngie/bug-237403/share/man/man4/man4.i386/fe.4 user/ngie/bug-237403/share/man/man4/man4.i386/vx.4 user/ngie/bug-237403/share/man/man4/man4.powerpc/bm.4 user/ngie/bug-237403/share/man/man4/pcn.4 user/ngie/bug-237403/share/man/man4/sf.4 user/ngie/bug-237403/share/man/man4/sn.4 user/ngie/bug-237403/share/man/man4/tl.4 user/ngie/bug-237403/share/man/man4/tx.4 user/ngie/bug-237403/share/man/man4/txp.4 user/ngie/bug-237403/share/man/man4/wb.4 user/ngie/bug-237403/share/man/man4/xe.4 user/ngie/bug-237403/sys/dev/bm/ user/ngie/bug-237403/sys/dev/cs/ user/ngie/bug-237403/sys/dev/de/ user/ngie/bug-237403/sys/dev/ed/ user/ngie/bug-237403/sys/dev/ep/ user/ngie/bug-237403/sys/dev/ex/ user/ngie/bug-237403/sys/dev/fe/ user/ngie/bug-237403/sys/dev/pcn/ user/ngie/bug-237403/sys/dev/sf/ user/ngie/bug-237403/sys/dev/sn/ user/ngie/bug-237403/sys/dev/tl/ user/ngie/bug-237403/sys/dev/tx/ user/ngie/bug-237403/sys/dev/txp/ user/ngie/bug-237403/sys/dev/vx/ user/ngie/bug-237403/sys/dev/wb/ user/ngie/bug-237403/sys/dev/xe/ user/ngie/bug-237403/sys/modules/bm/ user/ngie/bug-237403/sys/modules/cs/ user/ngie/bug-237403/sys/modules/de/ user/ngie/bug-237403/sys/modules/ed/ user/ngie/bug-237403/sys/modules/ep/ user/ngie/bug-237403/sys/modules/ex/ user/ngie/bug-237403/sys/modules/fe/ user/ngie/bug-237403/sys/modules/pcn/ user/ngie/bug-237403/sys/modules/sf/ user/ngie/bug-237403/sys/modules/sn/ user/ngie/bug-237403/sys/modules/tl/ user/ngie/bug-237403/sys/modules/tx/ user/ngie/bug-237403/sys/modules/txp/ user/ngie/bug-237403/sys/modules/vx/ user/ngie/bug-237403/sys/modules/wb/ user/ngie/bug-237403/sys/modules/xe/ Modified: user/ngie/bug-237403/Makefile.inc1 user/ngie/bug-237403/ObsoleteFiles.inc user/ngie/bug-237403/UPDATING user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c user/ngie/bug-237403/contrib/netbsd-tests/lib/libc/sys/t_mlock.c user/ngie/bug-237403/contrib/wpa/wpa_supplicant/main.c user/ngie/bug-237403/contrib/wpa/wpa_supplicant/wpa_supplicant.c user/ngie/bug-237403/etc/Makefile user/ngie/bug-237403/lib/libbe/be_access.c user/ngie/bug-237403/lib/libc/amd64/sys/amd64_get_fsbase.c user/ngie/bug-237403/lib/libc/amd64/sys/amd64_get_gsbase.c user/ngie/bug-237403/lib/libc/amd64/sys/amd64_set_fsbase.c user/ngie/bug-237403/lib/libc/amd64/sys/amd64_set_gsbase.c user/ngie/bug-237403/lib/libc/gen/Makefile.inc user/ngie/bug-237403/lib/libc/stdlib/bsearch.3 user/ngie/bug-237403/lib/libc/sys/mlock.2 user/ngie/bug-237403/lib/libc/sys/mlockall.2 user/ngie/bug-237403/lib/libc/tests/sys/mlock_helper.c user/ngie/bug-237403/lib/libc/x86/gen/getcontextx.c user/ngie/bug-237403/lib/libc/x86/sys/__vdso_gettc.c user/ngie/bug-237403/lib/libc/x86/sys/pkru.c user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/Makefile user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/cap_sysctl.3 user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/cap_sysctl.c user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/cap_sysctl.h user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/tests/Makefile user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/tests/sysctl_test.c user/ngie/bug-237403/lib/libnetgraph/msg.c user/ngie/bug-237403/lib/libomp/Makefile user/ngie/bug-237403/lib/libsecureboot/h/libsecureboot.h user/ngie/bug-237403/lib/libsecureboot/openpgp/opgp_key.c user/ngie/bug-237403/lib/libsecureboot/openpgp/opgp_sig.c user/ngie/bug-237403/lib/libsecureboot/tests/tvo.c user/ngie/bug-237403/lib/libsecureboot/vepcr.c user/ngie/bug-237403/lib/libsecureboot/verify_file.c user/ngie/bug-237403/libexec/rc/rc.conf user/ngie/bug-237403/libexec/rtld-elf/rtld_malloc.c user/ngie/bug-237403/release/powerpc/generate-hfs.sh user/ngie/bug-237403/release/powerpc/hfs-boot.bz2.uu user/ngie/bug-237403/sbin/fdisk/fdisk.c user/ngie/bug-237403/sbin/ifconfig/ifconfig.8 user/ngie/bug-237403/sbin/ifconfig/ifconfig.c user/ngie/bug-237403/sbin/nvmecontrol/nvmecontrol.8 user/ngie/bug-237403/share/man/man4/Makefile user/ngie/bug-237403/share/man/man4/ae.4 user/ngie/bug-237403/share/man/man4/man4.i386/Makefile user/ngie/bug-237403/share/man/man4/man4.powerpc/Makefile user/ngie/bug-237403/share/man/man4/ng_eiface.4 user/ngie/bug-237403/share/man/man4/nvd.4 user/ngie/bug-237403/share/man/man4/nvme.4 user/ngie/bug-237403/share/man/man5/rc.conf.5 user/ngie/bug-237403/share/man/man7/development.7 user/ngie/bug-237403/share/man/man9/vmem.9 user/ngie/bug-237403/share/misc/bsd-family-tree user/ngie/bug-237403/stand/common/module.c user/ngie/bug-237403/sys/amd64/amd64/copyout.c user/ngie/bug-237403/sys/amd64/amd64/exception.S user/ngie/bug-237403/sys/amd64/amd64/fpu.c user/ngie/bug-237403/sys/amd64/amd64/genassym.c user/ngie/bug-237403/sys/amd64/amd64/initcpu.c user/ngie/bug-237403/sys/amd64/amd64/machdep.c user/ngie/bug-237403/sys/amd64/amd64/mp_machdep.c user/ngie/bug-237403/sys/amd64/amd64/pmap.c user/ngie/bug-237403/sys/amd64/amd64/support.S user/ngie/bug-237403/sys/amd64/amd64/trap.c user/ngie/bug-237403/sys/amd64/amd64/vm_machdep.c user/ngie/bug-237403/sys/amd64/conf/GENERIC user/ngie/bug-237403/sys/amd64/conf/NOTES user/ngie/bug-237403/sys/amd64/include/pcpu.h user/ngie/bug-237403/sys/amd64/include/pmap.h user/ngie/bug-237403/sys/amd64/include/proc.h user/ngie/bug-237403/sys/amd64/linux/linux.h user/ngie/bug-237403/sys/amd64/linux/linux_machdep.c user/ngie/bug-237403/sys/amd64/linux/linux_ptrace.c user/ngie/bug-237403/sys/amd64/linux/linux_sysvec.c user/ngie/bug-237403/sys/amd64/linux32/linux.h user/ngie/bug-237403/sys/amd64/linux32/linux32_machdep.c user/ngie/bug-237403/sys/amd64/linux32/linux32_sysvec.c user/ngie/bug-237403/sys/amd64/vmm/io/iommu.c user/ngie/bug-237403/sys/amd64/vmm/vmm.c user/ngie/bug-237403/sys/amd64/vmm/x86.c user/ngie/bug-237403/sys/arm/allwinner/a10/a10_intc.c user/ngie/bug-237403/sys/arm/allwinner/a10_dmac.c user/ngie/bug-237403/sys/arm/allwinner/a31_dmac.c user/ngie/bug-237403/sys/arm/allwinner/aw_ccu.c user/ngie/bug-237403/sys/arm/allwinner/aw_reset.c user/ngie/bug-237403/sys/arm/allwinner/aw_rsb.c user/ngie/bug-237403/sys/arm/allwinner/aw_spi.c user/ngie/bug-237403/sys/arm/allwinner/aw_thermal.c user/ngie/bug-237403/sys/arm/allwinner/aw_wdog.c user/ngie/bug-237403/sys/arm/allwinner/clkng/aw_ccung.c user/ngie/bug-237403/sys/arm/allwinner/clkng/aw_clk_nm.c user/ngie/bug-237403/sys/arm/allwinner/clkng/aw_clk_prediv_mux.c user/ngie/bug-237403/sys/arm/allwinner/clkng/ccu_sun8i_r.c user/ngie/bug-237403/sys/arm/arm/machdep.c user/ngie/bug-237403/sys/arm/arm/pl190.c user/ngie/bug-237403/sys/arm/broadcom/bcm2835/bcm2835_rng.c user/ngie/bug-237403/sys/arm/broadcom/bcm2835/bcm2835_wdog.c user/ngie/bug-237403/sys/arm/broadcom/bcm2835/bcm2836.c user/ngie/bug-237403/sys/arm/freescale/imx/imx_wdog.c user/ngie/bug-237403/sys/arm/mv/armada/thermal.c user/ngie/bug-237403/sys/arm/mv/armada/wdt.c user/ngie/bug-237403/sys/arm/mv/mv_spi.c user/ngie/bug-237403/sys/arm/mv/timer.c user/ngie/bug-237403/sys/arm/nvidia/tegra124/tegra124_machdep.c user/ngie/bug-237403/sys/arm/nvidia/tegra124/tegra124_pmc.c user/ngie/bug-237403/sys/arm/nvidia/tegra_xhci.c user/ngie/bug-237403/sys/arm/ti/ti_pruss.c user/ngie/bug-237403/sys/arm/ti/ti_wdt.c user/ngie/bug-237403/sys/arm/versatile/versatile_pci.c user/ngie/bug-237403/sys/arm/versatile/versatile_sic.c user/ngie/bug-237403/sys/arm64/arm64/busdma_bounce.c user/ngie/bug-237403/sys/arm64/arm64/elf32_machdep.c user/ngie/bug-237403/sys/arm64/arm64/freebsd32_machdep.c user/ngie/bug-237403/sys/arm64/arm64/gicv3_its.c user/ngie/bug-237403/sys/arm64/arm64/machdep.c user/ngie/bug-237403/sys/arm64/coresight/coresight.c user/ngie/bug-237403/sys/arm64/include/bus_dma.h user/ngie/bug-237403/sys/arm64/include/bus_dma_impl.h user/ngie/bug-237403/sys/arm64/include/cpufunc.h user/ngie/bug-237403/sys/arm64/include/ifunc.h user/ngie/bug-237403/sys/arm64/linux/linux.h user/ngie/bug-237403/sys/arm64/linux/linux_sysvec.c user/ngie/bug-237403/sys/arm64/rockchip/clk/rk3399_cru.c user/ngie/bug-237403/sys/arm64/rockchip/clk/rk_clk_pll.c user/ngie/bug-237403/sys/arm64/rockchip/clk/rk_clk_pll.h user/ngie/bug-237403/sys/arm64/rockchip/clk/rk_cru.c user/ngie/bug-237403/sys/cam/cam_periph.h user/ngie/bug-237403/sys/cam/ctl/ctl_ha.c user/ngie/bug-237403/sys/cddl/compat/opensolaris/kern/opensolaris.c user/ngie/bug-237403/sys/cddl/dev/dtrace/amd64/dtrace_isa.c user/ngie/bug-237403/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S user/ngie/bug-237403/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c user/ngie/bug-237403/sys/compat/lindebugfs/lindebugfs.c user/ngie/bug-237403/sys/compat/linux/linux.c user/ngie/bug-237403/sys/compat/linux/linux.h user/ngie/bug-237403/sys/compat/linux/linux_common.h user/ngie/bug-237403/sys/compat/linux/linux_emul.h user/ngie/bug-237403/sys/compat/linux/linux_file.c user/ngie/bug-237403/sys/compat/linux/linux_fork.c user/ngie/bug-237403/sys/compat/linux/linux_getcwd.c user/ngie/bug-237403/sys/compat/linux/linux_ioctl.c user/ngie/bug-237403/sys/compat/linux/linux_misc.c user/ngie/bug-237403/sys/compat/linux/linux_misc.h user/ngie/bug-237403/sys/compat/linux/linux_signal.c user/ngie/bug-237403/sys/compat/linux/linux_socket.c user/ngie/bug-237403/sys/compat/linux/linux_socket.h user/ngie/bug-237403/sys/compat/linux/linux_stats.c user/ngie/bug-237403/sys/compat/linuxkpi/common/include/asm/uaccess.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/atomic.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/compiler.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/device.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/interrupt.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/kernel.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/ktime.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/mm_types.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/pci.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/preempt.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/random.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/sched.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/seq_file.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/timer.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/uaccess.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/ww_mutex.h user/ngie/bug-237403/sys/compat/linuxkpi/common/src/linux_compat.c user/ngie/bug-237403/sys/compat/linuxkpi/common/src/linux_current.c user/ngie/bug-237403/sys/compat/linuxkpi/common/src/linux_pci.c user/ngie/bug-237403/sys/compat/linuxkpi/common/src/linux_tasklet.c user/ngie/bug-237403/sys/conf/NOTES user/ngie/bug-237403/sys/conf/files user/ngie/bug-237403/sys/conf/files.arm64 user/ngie/bug-237403/sys/conf/files.i386 user/ngie/bug-237403/sys/conf/files.powerpc user/ngie/bug-237403/sys/conf/kern.post.mk user/ngie/bug-237403/sys/conf/kern.pre.mk user/ngie/bug-237403/sys/conf/kmod.mk user/ngie/bug-237403/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c user/ngie/bug-237403/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c user/ngie/bug-237403/sys/crypto/aesni/aesni.c user/ngie/bug-237403/sys/crypto/armv8/armv8_crypto.c user/ngie/bug-237403/sys/crypto/blake2/blake2_cryptodev.c user/ngie/bug-237403/sys/crypto/ccp/ccp.c user/ngie/bug-237403/sys/crypto/ccp/ccp_hardware.c user/ngie/bug-237403/sys/ddb/db_command.c user/ngie/bug-237403/sys/ddb/db_ps.c user/ngie/bug-237403/sys/dev/aac/aac_pci.c user/ngie/bug-237403/sys/dev/acpi_support/acpi_panasonic.c user/ngie/bug-237403/sys/dev/acpica/acpi.c user/ngie/bug-237403/sys/dev/acpica/acpi_lid.c user/ngie/bug-237403/sys/dev/acpica/acpi_thermal.c user/ngie/bug-237403/sys/dev/acpica/acpi_video.c user/ngie/bug-237403/sys/dev/acpica/acpivar.h user/ngie/bug-237403/sys/dev/adb/adb_kbd.c user/ngie/bug-237403/sys/dev/adb/adb_mouse.c user/ngie/bug-237403/sys/dev/ae/if_ae.c user/ngie/bug-237403/sys/dev/ahci/ahci_generic.c user/ngie/bug-237403/sys/dev/amdsbwd/amdsbwd.c user/ngie/bug-237403/sys/dev/atkbdc/psm.c user/ngie/bug-237403/sys/dev/bge/if_bge.c user/ngie/bug-237403/sys/dev/bge/if_bgereg.h user/ngie/bug-237403/sys/dev/cardbus/cardbus.c user/ngie/bug-237403/sys/dev/cmx/cmx.c user/ngie/bug-237403/sys/dev/coretemp/coretemp.c user/ngie/bug-237403/sys/dev/cpuctl/cpuctl.c user/ngie/bug-237403/sys/dev/cxgbe/cxgbei/cxgbei.c user/ngie/bug-237403/sys/dev/cxgbe/cxgbei/icl_cxgbei.c user/ngie/bug-237403/sys/dev/cxgbe/tom/t4_tls.c user/ngie/bug-237403/sys/dev/dcons/dcons_crom.c user/ngie/bug-237403/sys/dev/dcons/dcons_os.c user/ngie/bug-237403/sys/dev/dcons/dcons_os.h user/ngie/bug-237403/sys/dev/evdev/evdev_private.h user/ngie/bug-237403/sys/dev/extres/syscon/syscon_generic.c user/ngie/bug-237403/sys/dev/firewire/firewire.c user/ngie/bug-237403/sys/dev/firewire/fwohci.c user/ngie/bug-237403/sys/dev/ichwd/ichwd.c user/ngie/bug-237403/sys/dev/ida/ida_disk.c user/ngie/bug-237403/sys/dev/ida/ida_pci.c user/ngie/bug-237403/sys/dev/iicbus/twsi/a10_twsi.c user/ngie/bug-237403/sys/dev/iicbus/twsi/twsi.c user/ngie/bug-237403/sys/dev/iir/iir_ctrl.c user/ngie/bug-237403/sys/dev/ioat/ioat.c user/ngie/bug-237403/sys/dev/ipmi/ipmi.c user/ngie/bug-237403/sys/dev/ipmi/ipmi_opal.c user/ngie/bug-237403/sys/dev/ips/ips.c user/ngie/bug-237403/sys/dev/iscsi/icl_soft_proxy.c user/ngie/bug-237403/sys/dev/iscsi_initiator/iscsivar.h user/ngie/bug-237403/sys/dev/iwm/if_iwm_notif_wait.c user/ngie/bug-237403/sys/dev/ksyms/ksyms.c user/ngie/bug-237403/sys/dev/led/led.c user/ngie/bug-237403/sys/dev/liquidio/lio_bsd.h user/ngie/bug-237403/sys/dev/mfi/mfi_disk.c user/ngie/bug-237403/sys/dev/mfi/mfi_pci.c user/ngie/bug-237403/sys/dev/mfi/mfi_syspd.c user/ngie/bug-237403/sys/dev/mlx/mlxvar.h user/ngie/bug-237403/sys/dev/mmc/host/dwmmc.c user/ngie/bug-237403/sys/dev/mpr/mprvar.h user/ngie/bug-237403/sys/dev/mps/mpsvar.h user/ngie/bug-237403/sys/dev/mrsas/mrsas.h user/ngie/bug-237403/sys/dev/netmap/if_ptnet.c user/ngie/bug-237403/sys/dev/nmdm/nmdm.c user/ngie/bug-237403/sys/dev/ntb/if_ntb/if_ntb.c user/ngie/bug-237403/sys/dev/ntb/ntb_hw/ntb_hw_intel.c user/ngie/bug-237403/sys/dev/ow/ow.c user/ngie/bug-237403/sys/dev/pccard/pccard.c user/ngie/bug-237403/sys/dev/pci/pci.c user/ngie/bug-237403/sys/dev/pci/pci_host_generic.c user/ngie/bug-237403/sys/dev/pci/pci_host_generic_acpi.c user/ngie/bug-237403/sys/dev/pci/pci_iov.c user/ngie/bug-237403/sys/dev/pci/pci_pci.c user/ngie/bug-237403/sys/dev/pci/pcivar.h user/ngie/bug-237403/sys/dev/random/fortuna.c user/ngie/bug-237403/sys/dev/random/ivy.c user/ngie/bug-237403/sys/dev/scc/scc_core.c user/ngie/bug-237403/sys/dev/scc/scc_dev_quicc.c user/ngie/bug-237403/sys/dev/scc/scc_dev_sab82532.c user/ngie/bug-237403/sys/dev/scc/scc_dev_z8530.c user/ngie/bug-237403/sys/dev/smartpqi/smartpqi_includes.h user/ngie/bug-237403/sys/dev/sound/pcm/sound.h user/ngie/bug-237403/sys/dev/tws/tws.h user/ngie/bug-237403/sys/dev/usb/net/if_cdce.c user/ngie/bug-237403/sys/dev/usb/net/if_smsc.c user/ngie/bug-237403/sys/dev/usb/net/if_usie.c user/ngie/bug-237403/sys/dev/usb/net/uhso.c user/ngie/bug-237403/sys/dev/usb/serial/u3g.c user/ngie/bug-237403/sys/dev/usb/usb_device.c user/ngie/bug-237403/sys/dev/usb/usbdi.h user/ngie/bug-237403/sys/dev/usb/wlan/if_run.c user/ngie/bug-237403/sys/dev/veriexec/veriexec_ioctl.h user/ngie/bug-237403/sys/dev/veriexec/verified_exec.c user/ngie/bug-237403/sys/dev/viawd/viawd.c user/ngie/bug-237403/sys/dev/vkbd/vkbd.c user/ngie/bug-237403/sys/dev/vmware/vmci/vmci.c user/ngie/bug-237403/sys/dev/vt/vt_cpulogos.c user/ngie/bug-237403/sys/dev/vt/vt_sysmouse.c user/ngie/bug-237403/sys/dev/watchdog/watchdog.c user/ngie/bug-237403/sys/dev/xdma/xdma.c user/ngie/bug-237403/sys/dev/xdma/xdma_bank.c user/ngie/bug-237403/sys/dev/xdma/xdma_bio.c user/ngie/bug-237403/sys/dev/xdma/xdma_mbuf.c user/ngie/bug-237403/sys/dev/xdma/xdma_queue.c user/ngie/bug-237403/sys/dev/xdma/xdma_sg.c user/ngie/bug-237403/sys/dev/xen/console/xen_console.c user/ngie/bug-237403/sys/dev/xen/debug/debug.c user/ngie/bug-237403/sys/fs/devfs/devfs_vnops.c user/ngie/bug-237403/sys/i386/conf/GENERIC user/ngie/bug-237403/sys/i386/conf/NOTES user/ngie/bug-237403/sys/i386/i386/elan-mmcr.c user/ngie/bug-237403/sys/i386/i386/exception.s user/ngie/bug-237403/sys/i386/i386/genassym.c user/ngie/bug-237403/sys/i386/i386/geode.c user/ngie/bug-237403/sys/i386/i386/initcpu.c user/ngie/bug-237403/sys/i386/i386/longrun.c user/ngie/bug-237403/sys/i386/i386/mp_machdep.c user/ngie/bug-237403/sys/i386/i386/npx.c user/ngie/bug-237403/sys/i386/i386/pmap_base.c user/ngie/bug-237403/sys/i386/i386/support.s user/ngie/bug-237403/sys/i386/include/pcpu.h user/ngie/bug-237403/sys/i386/linux/linux.h user/ngie/bug-237403/sys/i386/linux/linux_machdep.c user/ngie/bug-237403/sys/i386/linux/linux_sysvec.c user/ngie/bug-237403/sys/kern/bus_if.m user/ngie/bug-237403/sys/kern/imgact_elf.c user/ngie/bug-237403/sys/kern/init_main.c user/ngie/bug-237403/sys/kern/kern_clock.c user/ngie/bug-237403/sys/kern/kern_exec.c user/ngie/bug-237403/sys/kern/kern_exit.c user/ngie/bug-237403/sys/kern/kern_fork.c user/ngie/bug-237403/sys/kern/kern_intr.c user/ngie/bug-237403/sys/kern/kern_proc.c user/ngie/bug-237403/sys/kern/kern_thread.c user/ngie/bug-237403/sys/kern/stack_protector.c user/ngie/bug-237403/sys/kern/subr_blist.c user/ngie/bug-237403/sys/kern/subr_bus_dma.c user/ngie/bug-237403/sys/kern/subr_intr.c user/ngie/bug-237403/sys/kern/subr_param.c user/ngie/bug-237403/sys/kern/subr_power.c user/ngie/bug-237403/sys/kern/subr_turnstile.c user/ngie/bug-237403/sys/kern/subr_vmem.c user/ngie/bug-237403/sys/kern/subr_witness.c user/ngie/bug-237403/sys/kern/tty_tty.c user/ngie/bug-237403/sys/kern/vfs_cache.c user/ngie/bug-237403/sys/kern/vfs_mountroot.c user/ngie/bug-237403/sys/kern/vfs_subr.c user/ngie/bug-237403/sys/libkern/arc4random.c user/ngie/bug-237403/sys/mips/atheros/ar71xx_gpio.c user/ngie/bug-237403/sys/mips/atheros/ar71xx_machdep.c user/ngie/bug-237403/sys/mips/atheros/ar71xx_wdog.c user/ngie/bug-237403/sys/mips/conf/std.AR_MIPS_BASE user/ngie/bug-237403/sys/mips/include/pmap.h user/ngie/bug-237403/sys/mips/mips/pmap.c user/ngie/bug-237403/sys/modules/Makefile user/ngie/bug-237403/sys/modules/ipsec/Makefile user/ngie/bug-237403/sys/modules/linprocfs/Makefile user/ngie/bug-237403/sys/modules/linsysfs/Makefile user/ngie/bug-237403/sys/modules/linux/Makefile user/ngie/bug-237403/sys/modules/linux64/Makefile user/ngie/bug-237403/sys/modules/linux_common/Makefile user/ngie/bug-237403/sys/modules/linuxkpi/Makefile user/ngie/bug-237403/sys/modules/usb/usb/Makefile user/ngie/bug-237403/sys/net/bpf.c user/ngie/bug-237403/sys/net/bpf.h user/ngie/bug-237403/sys/net/bpf_buffer.c user/ngie/bug-237403/sys/net/bpfdesc.h user/ngie/bug-237403/sys/net/ethernet.h user/ngie/bug-237403/sys/net/if.c user/ngie/bug-237403/sys/net/if_clone.h user/ngie/bug-237403/sys/net/if_llatbl.c user/ngie/bug-237403/sys/net/if_llatbl.h user/ngie/bug-237403/sys/net/if_tuntap.c user/ngie/bug-237403/sys/net/if_var.h user/ngie/bug-237403/sys/net/if_vlan_var.h user/ngie/bug-237403/sys/net/iflib.c user/ngie/bug-237403/sys/net/route.c user/ngie/bug-237403/sys/netinet/if_ether.c user/ngie/bug-237403/sys/netinet/ip_output.c user/ngie/bug-237403/sys/netinet/netdump/netdump_client.c user/ngie/bug-237403/sys/netinet/sctp_usrreq.c user/ngie/bug-237403/sys/netinet/sctputil.c user/ngie/bug-237403/sys/netinet/sctputil.h user/ngie/bug-237403/sys/netinet/tcp_hpts.c user/ngie/bug-237403/sys/netinet/tcp_offload.c user/ngie/bug-237403/sys/netinet/toecore.c user/ngie/bug-237403/sys/netinet/toecore.h user/ngie/bug-237403/sys/netinet6/icmp6.c user/ngie/bug-237403/sys/netinet6/ip6_output.c user/ngie/bug-237403/sys/netinet6/nd6.c user/ngie/bug-237403/sys/netinet6/nd6_nbr.c user/ngie/bug-237403/sys/powerpc/aim/mmu_oea64.c user/ngie/bug-237403/sys/powerpc/aim/mp_cpudep.c user/ngie/bug-237403/sys/powerpc/conf/GENERIC user/ngie/bug-237403/sys/powerpc/conf/NOTES user/ngie/bug-237403/sys/powerpc/ofw/ofw_machdep.c user/ngie/bug-237403/sys/powerpc/powermac/cpcht.c user/ngie/bug-237403/sys/powerpc/powermac/cuda.c user/ngie/bug-237403/sys/powerpc/powermac/pmu.c user/ngie/bug-237403/sys/powerpc/powermac/smu.c user/ngie/bug-237403/sys/powerpc/powermac/vcoregpio.c user/ngie/bug-237403/sys/powerpc/powernv/opal.h user/ngie/bug-237403/sys/powerpc/powernv/opal_async.c user/ngie/bug-237403/sys/powerpc/powernv/opal_console.c user/ngie/bug-237403/sys/powerpc/powernv/opal_dev.c user/ngie/bug-237403/sys/powerpc/powernv/opal_flash.c user/ngie/bug-237403/sys/powerpc/powernv/opal_sensor.c user/ngie/bug-237403/sys/powerpc/powernv/xive.c user/ngie/bug-237403/sys/powerpc/powerpc/cpu.c user/ngie/bug-237403/sys/powerpc/powerpc/openpic.c user/ngie/bug-237403/sys/powerpc/ps3/ps3bus.c user/ngie/bug-237403/sys/powerpc/pseries/rtas_dev.c user/ngie/bug-237403/sys/powerpc/pseries/xics.c user/ngie/bug-237403/sys/riscv/include/pcpu.h user/ngie/bug-237403/sys/riscv/riscv/intr_machdep.c user/ngie/bug-237403/sys/riscv/riscv/locore.S user/ngie/bug-237403/sys/riscv/riscv/machdep.c user/ngie/bug-237403/sys/riscv/riscv/mp_machdep.c user/ngie/bug-237403/sys/riscv/riscv/pmap.c user/ngie/bug-237403/sys/security/audit/audit.c user/ngie/bug-237403/sys/security/audit/audit_trigger.c user/ngie/bug-237403/sys/security/mac_veriexec/mac_veriexec.c user/ngie/bug-237403/sys/security/mac_veriexec/mac_veriexec.h user/ngie/bug-237403/sys/security/mac_veriexec/mac_veriexec_internal.h user/ngie/bug-237403/sys/security/mac_veriexec/veriexec_metadata.c user/ngie/bug-237403/sys/sparc64/conf/GENERIC user/ngie/bug-237403/sys/sys/_lock.h user/ngie/bug-237403/sys/sys/blist.h user/ngie/bug-237403/sys/sys/bus.h user/ngie/bug-237403/sys/sys/bus_dma.h user/ngie/bug-237403/sys/sys/conf.h user/ngie/bug-237403/sys/sys/cpu.h user/ngie/bug-237403/sys/sys/disk/mbr.h user/ngie/bug-237403/sys/sys/eventhandler.h user/ngie/bug-237403/sys/sys/interrupt.h user/ngie/bug-237403/sys/sys/lock.h user/ngie/bug-237403/sys/sys/malloc.h user/ngie/bug-237403/sys/sys/param.h user/ngie/bug-237403/sys/sys/pcpu.h user/ngie/bug-237403/sys/sys/power.h user/ngie/bug-237403/sys/sys/proc.h user/ngie/bug-237403/sys/sys/seqc.h user/ngie/bug-237403/sys/sys/systm.h user/ngie/bug-237403/sys/sys/vmmeter.h user/ngie/bug-237403/sys/sys/watchdog.h user/ngie/bug-237403/sys/vm/memguard.c user/ngie/bug-237403/sys/vm/swap_pager.c user/ngie/bug-237403/sys/vm/vm_glue.c user/ngie/bug-237403/sys/vm/vm_map.c user/ngie/bug-237403/sys/vm/vm_map.h user/ngie/bug-237403/sys/vm/vm_meter.c user/ngie/bug-237403/sys/vm/vm_mmap.c user/ngie/bug-237403/sys/vm/vm_pageout.c user/ngie/bug-237403/sys/vm/vm_pageout.h user/ngie/bug-237403/sys/vm/vm_unix.c user/ngie/bug-237403/sys/x86/acpica/OsdEnvironment.c user/ngie/bug-237403/sys/x86/cpufreq/smist.c user/ngie/bug-237403/sys/x86/include/bus_dma.h user/ngie/bug-237403/sys/x86/include/busdma_impl.h user/ngie/bug-237403/sys/x86/include/ifunc.h user/ngie/bug-237403/sys/x86/include/specialreg.h user/ngie/bug-237403/sys/x86/include/x86_smp.h user/ngie/bug-237403/sys/x86/include/x86_var.h user/ngie/bug-237403/sys/x86/iommu/busdma_dmar.c user/ngie/bug-237403/sys/x86/iommu/intel_drv.c user/ngie/bug-237403/sys/x86/iommu/intel_fault.c user/ngie/bug-237403/sys/x86/iommu/intel_gas.c user/ngie/bug-237403/sys/x86/iommu/intel_intrmap.c user/ngie/bug-237403/sys/x86/iommu/intel_qi.c user/ngie/bug-237403/sys/x86/iommu/intel_quirks.c user/ngie/bug-237403/sys/x86/x86/busdma_bounce.c user/ngie/bug-237403/sys/x86/x86/cpu_machdep.c user/ngie/bug-237403/sys/x86/x86/identcpu.c user/ngie/bug-237403/sys/x86/x86/mp_x86.c user/ngie/bug-237403/sys/x86/x86/tsc.c user/ngie/bug-237403/sys/x86/x86/ucode.c user/ngie/bug-237403/tests/sys/netipsec/tunnel/utils.subr user/ngie/bug-237403/tests/sys/sys/Makefile user/ngie/bug-237403/tools/build/beinstall.sh user/ngie/bug-237403/tools/build/mk/OptionalObsoleteFiles.inc user/ngie/bug-237403/tools/tools/tinybsd/conf/firewall/etc/rc.firewall user/ngie/bug-237403/usr.bin/dtc/fdt.hh user/ngie/bug-237403/usr.bin/vmstat/vmstat.c user/ngie/bug-237403/usr.sbin/bhyve/virtio.c user/ngie/bug-237403/usr.sbin/camdd/camdd.c user/ngie/bug-237403/usr.sbin/efibootmgr/efibootmgr.c user/ngie/bug-237403/usr.sbin/etcupdate/etcupdate.sh user/ngie/bug-237403/usr.sbin/jail/jail.8 user/ngie/bug-237403/usr.sbin/mergemaster/mergemaster.sh user/ngie/bug-237403/usr.sbin/mountd/mountd.c user/ngie/bug-237403/usr.sbin/ntp/ntpd/leap-seconds Directory Properties: user/ngie/bug-237403/ (props changed) user/ngie/bug-237403/cddl/ (props changed) user/ngie/bug-237403/cddl/contrib/opensolaris/ (props changed) user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/zfs/ (props changed) user/ngie/bug-237403/contrib/netbsd-tests/ (props changed) user/ngie/bug-237403/contrib/wpa/ (props changed) user/ngie/bug-237403/sys/contrib/ipfilter/ (props changed) Modified: user/ngie/bug-237403/Makefile.inc1 ============================================================================== --- user/ngie/bug-237403/Makefile.inc1 Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/Makefile.inc1 Mon May 20 08:01:37 2019 (r347987) @@ -871,8 +871,8 @@ DB_FROM_SRC= yes .endif .if defined(DB_FROM_SRC) -INSTALLFLAGS+= -N ${.CURDIR}/etc -MTREEFLAGS+= -N ${.CURDIR}/etc +INSTALLFLAGS+= -N ${.CURDIR}/lib/libc/gen +MTREEFLAGS+= -N ${.CURDIR}/lib/libc/gen .endif _INSTALL_DDIR= ${DESTDIR}/${DISTDIR} INSTALL_DDIR= ${_INSTALL_DDIR:S://:/:g:C:/$::} Modified: user/ngie/bug-237403/ObsoleteFiles.inc ============================================================================== --- user/ngie/bug-237403/ObsoleteFiles.inc Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/ObsoleteFiles.inc Mon May 20 08:01:37 2019 (r347987) @@ -38,9 +38,39 @@ # xargs -n1 | sort | uniq -d; # done +# 20190517: Remove obsolete 10 and 10/100 ethernet drivers. +OLD_FILES+=usr/share/man/man4/bm.4 +OLD_FILES+=usr/share/man/man4/cs.4 +OLD_FILES+=usr/share/man/man4/de.4 +OLD_FILES+=usr/share/man/man4/if_de.4 +OLD_FILES+=usr/share/man/man4/ed.4 +OLD_FILES+=usr/share/man/man4/if_ed.4 +OLD_FILES+=usr/share/man/man4/ep.4 +OLD_FILES+=usr/share/man/man4/ex.4 +OLD_FILES+=usr/share/man/man4/fe.4 +OLD_FILES+=usr/share/man/man4/pcn.4 +OLD_FILES+=usr/share/man/man4/if_pcn.4 +OLD_FILES+=usr/share/man/man4/sf.4 +OLD_FILES+=usr/share/man/man4/if_sf.4 +OLD_FILES+=usr/share/man/man4/sn.4 +OLD_FILES+=usr/share/man/man4/if_sn.4 +OLD_FILES+=usr/share/man/man4/tl.4 +OLD_FILES+=usr/share/man/man4/if_tl.4 +OLD_FILES+=usr/share/man/man4/tx.4 +OLD_FILES+=usr/share/man/man4/if_tx.4 +OLD_FILES+=usr/share/man/man4/txp.4 +OLD_FILES+=usr/share/man/man4/if_txp.4 +OLD_FILES+=usr/share/man/man4/vx.4 +OLD_FILES+=usr/share/man/man4/wb.4 +OLD_FILES+=usr/share/man/man4/xe.4 +OLD_FILES+=usr/share/man/man4/if_xe.4 +# 20190513: libcap_sysctl interface change +OLD_FILES+=lib/casper/libcap_sysctl.1 # 20190509: tests/sys/opencrypto requires the net/py-dpkt package. OLD_FILES+=usr/tests/sys/opencrypto/dpkt.py OLD_FILES+=usr/tests/sys/opencrypto/dpkt.pyc +# 20190326: tzdata 2019a import +OLD_FILES+=usr/share/zoneinfo/Etc/UCT # 20190304: new libc++ import which bumps version from 7.0.1 to 8.0.0. OLD_FILES+=usr/include/c++/v1/experimental/dynarray # 20190304: new clang import which bumps version from 7.0.1 to 8.0.0. @@ -199,16 +229,21 @@ OLD_FILES+=usr/include/sys/seq.h OLD_FILES+=usr/lib/libprivateifconfig.a OLD_FILES+=usr/lib/libprivateifconfig_p.a # 20190131: pfil(9) changed -OLD_FILES+=usr/share/man/man9/pfil_hook_get.9 -OLD_FILES+=usr/share/man/man9/pfil_rlock.9 -OLD_FILES+=usr/share/man/man9/pfil_runlock.9 -OLD_FILES+=usr/share/man/man9/pfil_wlock.9 -OLD_FILES+=usr/share/man/man9/pfil_wunlock.9 +OLD_FILES+=usr/share/man/man9/pfil_hook_get.9.gz +OLD_FILES+=usr/share/man/man9/pfil_rlock.9.gz +OLD_FILES+=usr/share/man/man9/pfil_runlock.9.gz +OLD_FILES+=usr/share/man/man9/pfil_wlock.9.gz +OLD_FILES+=usr/share/man/man9/pfil_wunlock.9.gz # 20190126: adv(4) / adw(4) removal OLD_FILES+=usr/share/man/man4/adv.4.gz OLD_FILES+=usr/share/man/man4/adw.4.gz +# 20190123: nonexistant cred_update_thread(9) removed +OLD_FILES+=usr/share/man/man9/cred_update_thread.9.gz # 20190114: old pbuf allocator removed +OLD_FILES+=usr/share/man/man9/getpbuf.9.gz OLD_FILES+=usr/share/man/man9/pbuf.9.gz +OLD_FILES+=usr/share/man/man9/relpbuf.9.gz +OLD_FILES+=usr/share/man/man9/trypbuf.9.gz # 20181219: ibcs removal OLD_FILES+=usr/share/examples/ibcs2/hello.uu OLD_FILES+=usr/share/examples/ibcs2/README Modified: user/ngie/bug-237403/UPDATING ============================================================================== --- user/ngie/bug-237403/UPDATING Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/UPDATING Mon May 20 08:01:37 2019 (r347987) @@ -31,6 +31,20 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20190517: + For users of mergemaster, after recent changes to locations of + master.passwd and group in the source tree mergemaster needs to be + updated. Before running `mergemaster -p', cd to usr.sbin/mergemaster + and run `make install'. + +20190513: + User-wired pages now have their own counter, + vm.stats.vm.v_user_wire_count. The vm.max_wired sysctl was renamed + to vm.max_user_wired and changed from an unsigned int to an unsigned + long. bhyve VMs wired with the -S are now subject to the user + wiring limit; the vm.max_user_wired sysctl may need to be tuned to + avoid running into the limit. + 20190507: The IPSEC option has been removed from GENERIC. Users requiring ipsec(4) must now load the ipsec(4) kernel module. @@ -68,13 +82,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: produce warnings in dmesg when the conditions are met. 20190416: - The tunable "security.stack_protect.permit_nonrandom_cookies" may be - set to a non-zero value to boot systems that do not provide early - entropy. Otherwise, such systems may see the panic message: - "cannot initialize stack cookies because random device is not yet - seeded." - -20190416: The loadable random module KPI has changed; the random_infra_init() routine now requires a 3rd function pointer for a bool (*)(void) method that returns true if the random device is seeded (and @@ -92,7 +99,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: The fuse(4) module has been renamed to fusefs(4) for consistency with other filesystems. You should update any kld_load="fuse" entries in /etc/rc.conf, fuse_load="YES" entries in /boot/loader.conf, and - "options FUSE" enties in kernel config files. + "options FUSE" entries in kernel config files. 20190304: Clang, llvm, lld, lldb, compiler-rt and libc++ have been upgraded to @@ -156,7 +163,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: 20181211: Remove the timed and netdate programs from the base tree. Setting - the time with these deamons has been obsolete for over a decade. + the time with these daemons has been obsolete for over a decade. 20181126: On amd64, arm64 and armv7 (architectures that install LLVM's ld.lld @@ -219,7 +226,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: 20181009: OpenSSL has been updated to version 1.1.1. This update included - additional various API changes througout the base system. It is + additional various API changes throughout the base system. It is important to rebuild third-party software after upgrading. The value of __FreeBSD_version has been bumped accordingly. @@ -316,13 +323,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: 20180719: ARM64 now have efifb support, if you want to have serial console on your arm64 board when an screen is connected and the bootloader - setup a framebuffer for us to use, just add : + setup a frame buffer for us to use, just add : boot_serial=YES boot_multicons=YES in /boot/loader.conf For Raspberry Pi 3 (RPI) users, this is needed even if you don't have - an screen connected as the firmware will setup a framebuffer are that - u-boot will expose as an EFI framebuffer. + an screen connected as the firmware will setup a frame buffer are that + u-boot will expose as an EFI frame buffer. 20180719: New uid:gid added, ntpd:ntpd (123:123). Be sure to run mergemaster @@ -421,7 +428,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: 20180508: The nxge(4) driver has been removed. This driver was for PCI-X 10g - cards made by s2io/Neterion. The company was aquired by Exar and + cards made by s2io/Neterion. The company was acquired by Exar and no longer sells or supports Ethernet products. If you have device nxge in your kernel config file it must be removed. @@ -512,7 +519,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: 20180212: FreeBSD boot loader enhanced with Lua scripting. It's purely opt-in for now by building WITH_LOADER_LUA and WITHOUT_FORTH in /etc/src.conf. - Co-existance for the transition period will come shortly. Booting is a + Co-existence for the transition period will come shortly. Booting is a complex environment and test coverage for Lua-enabled loaders has been thin, so it would be prudent to assume it might not work and make provisions for backup boot methods. Modified: user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon May 20 08:01:37 2019 (r347987) @@ -2361,6 +2361,7 @@ us_compare(const void *larg, const void *rarg, void *u case ZFS_PROP_NAME: propname = "name"; if (numname) { +compare_nums: (void) nvlist_lookup_uint64(lnvl, propname, &lv64); (void) nvlist_lookup_uint64(rnvl, propname, @@ -2368,10 +2369,12 @@ us_compare(const void *larg, const void *rarg, void *u if (rv64 != lv64) rc = (rv64 < lv64) ? 1 : -1; } else { - (void) nvlist_lookup_string(lnvl, propname, - &lvstr); - (void) nvlist_lookup_string(rnvl, propname, - &rvstr); + if ((nvlist_lookup_string(lnvl, propname, + &lvstr) == ENOENT) || + (nvlist_lookup_string(rnvl, propname, + &rvstr) == ENOENT)) { + goto compare_nums; + } rc = strcmp(lvstr, rvstr); } break; Modified: user/ngie/bug-237403/contrib/netbsd-tests/lib/libc/sys/t_mlock.c ============================================================================== --- user/ngie/bug-237403/contrib/netbsd-tests/lib/libc/sys/t_mlock.c Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/contrib/netbsd-tests/lib/libc/sys/t_mlock.c Mon May 20 08:01:37 2019 (r347987) @@ -51,7 +51,7 @@ __RCSID("$NetBSD: t_mlock.c,v 1.6 2016/08/09 12:02:44 #define _KMEMUSER #include -void set_vm_max_wired(int); +void set_vm_max_wired(u_long); void restore_vm_max_wired(void); #endif Modified: user/ngie/bug-237403/contrib/wpa/wpa_supplicant/main.c ============================================================================== --- user/ngie/bug-237403/contrib/wpa/wpa_supplicant/main.c Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/contrib/wpa/wpa_supplicant/main.c Mon May 20 08:01:37 2019 (r347987) @@ -199,6 +199,11 @@ int main(int argc, char *argv[]) wpa_supplicant_fd_workaround(1); +#ifdef CONFIG_DRIVER_NDIS + void driver_ndis_init_ops(void); + driver_ndis_init_ops(); +#endif /* CONFIG_DRIVER_NDIS */ + for (;;) { c = getopt(argc, argv, "b:Bc:C:D:de:f:g:G:hi:I:KLMm:No:O:p:P:qsTtuvW"); Modified: user/ngie/bug-237403/contrib/wpa/wpa_supplicant/wpa_supplicant.c ============================================================================== --- user/ngie/bug-237403/contrib/wpa/wpa_supplicant/wpa_supplicant.c Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/contrib/wpa/wpa_supplicant/wpa_supplicant.c Mon May 20 08:01:37 2019 (r347987) @@ -6357,13 +6357,6 @@ struct wpa_global * wpa_supplicant_init(struct wpa_par if (params == NULL) return NULL; -#ifdef CONFIG_DRIVER_NDIS - { - void driver_ndis_init_ops(void); - driver_ndis_init_ops(); - } -#endif /* CONFIG_DRIVER_NDIS */ - #ifndef CONFIG_NO_WPA_MSG wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb); #endif /* CONFIG_NO_WPA_MSG */ Modified: user/ngie/bug-237403/etc/Makefile ============================================================================== --- user/ngie/bug-237403/etc/Makefile Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/etc/Makefile Mon May 20 08:01:37 2019 (r347987) @@ -15,13 +15,17 @@ SUBDIR+=sendmail .endif BIN1= \ - group \ login.access \ rc.bsdextended \ + rc.firewall \ termcap.small # NB: keep these sorted by MK_* knobs +.if ${MK_SENDMAIL} != "no" +BIN1+= rc.sendmail +.endif + .if ${MK_SENDMAIL} == "no" ETCMAIL=mailer.conf aliases .else @@ -58,33 +62,9 @@ distribution: @echo "set DESTDIR before running \"make ${.TARGET}\"" @false .endif -.if ${MK_SENDMAIL} != "no" cd ${.CURDIR}; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "tags=package=sendmail"\ - rc.sendmail ${DESTDIR}/etc; -.endif -.if ${MK_IPFW} != "no" - cd ${.CURDIR}; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "tags=package=ipfw"\ - rc.firewall ${DESTDIR}/etc; -.endif - cd ${.CURDIR}; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 -T "tags=package=runtime"\ - ${BIN1} ${DESTDIR}/etc; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 -T "tags=package=runtime"\ - master.passwd ${DESTDIR}/etc; - -.if ${MK_TCSH} == "no" - sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd -.endif - pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd -.if defined(NO_ROOT) - ( \ - echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \ - echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \ - echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ - ) | ${METALOG.add} -.endif + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + ${BIN1} ${DESTDIR}/etc ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/mtree; ${MAKE} install ${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap Modified: user/ngie/bug-237403/lib/libbe/be_access.c ============================================================================== --- user/ngie/bug-237403/lib/libbe/be_access.c Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libbe/be_access.c Mon May 20 08:01:37 2019 (r347987) @@ -99,13 +99,12 @@ be_mount_iter(zfs_handle_t *zfs_hdl, void *data) if (strcmp("none", zfs_mnt) == 0) { /* * mountpoint=none; we'll mount it at info->mountpoint assuming - * we're at the root. If we're not at the root... that's less - * than stellar and not entirely sure what to do with that. - * For now, we won't treat it as an error condition -- we just - * won't mount it, and we'll continue on. + * we're at the root. If we're not at the root, we're likely + * at some intermediate dataset (e.g. zroot/var) that will have + * children that may need to be mounted. */ if (info->depth > 0) - return (0); + goto skipmount; snprintf(tmp, BE_MAXPATHLEN, "%s", info->mountpoint); } else { @@ -136,6 +135,7 @@ be_mount_iter(zfs_handle_t *zfs_hdl, void *data) if (!info->deepmount) return (0); +skipmount: ++info->depth; err = zfs_iter_filesystems(zfs_hdl, be_mount_iter, info); --info->depth; Modified: user/ngie/bug-237403/lib/libc/amd64/sys/amd64_get_fsbase.c ============================================================================== --- user/ngie/bug-237403/lib/libc/amd64/sys/amd64_get_fsbase.c Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libc/amd64/sys/amd64_get_fsbase.c Mon May 20 08:01:37 2019 (r347987) @@ -57,7 +57,7 @@ amd64_get_fsbase_syscall(void **addr) return (sysarch(AMD64_GET_FSBASE, addr)); } -DEFINE_UIFUNC(, int, amd64_get_fsbase, (void **), static) +DEFINE_UIFUNC(, int, amd64_get_fsbase, (void **)) { if (__getosreldate() >= P_OSREL_WRFSBASE && Modified: user/ngie/bug-237403/lib/libc/amd64/sys/amd64_get_gsbase.c ============================================================================== --- user/ngie/bug-237403/lib/libc/amd64/sys/amd64_get_gsbase.c Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libc/amd64/sys/amd64_get_gsbase.c Mon May 20 08:01:37 2019 (r347987) @@ -57,7 +57,7 @@ amd64_get_gsbase_syscall(void **addr) return (sysarch(AMD64_GET_GSBASE, addr)); } -DEFINE_UIFUNC(, int, amd64_get_gsbase, (void **), static) +DEFINE_UIFUNC(, int, amd64_get_gsbase, (void **)) { if (__getosreldate() >= P_OSREL_WRFSBASE && Modified: user/ngie/bug-237403/lib/libc/amd64/sys/amd64_set_fsbase.c ============================================================================== --- user/ngie/bug-237403/lib/libc/amd64/sys/amd64_set_fsbase.c Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libc/amd64/sys/amd64_set_fsbase.c Mon May 20 08:01:37 2019 (r347987) @@ -57,7 +57,7 @@ amd64_set_fsbase_syscall(void *addr) return (sysarch(AMD64_SET_FSBASE, &addr)); } -DEFINE_UIFUNC(, int, amd64_set_fsbase, (void *), static) +DEFINE_UIFUNC(, int, amd64_set_fsbase, (void *)) { if (__getosreldate() >= P_OSREL_WRFSBASE && Modified: user/ngie/bug-237403/lib/libc/amd64/sys/amd64_set_gsbase.c ============================================================================== --- user/ngie/bug-237403/lib/libc/amd64/sys/amd64_set_gsbase.c Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libc/amd64/sys/amd64_set_gsbase.c Mon May 20 08:01:37 2019 (r347987) @@ -57,7 +57,7 @@ amd64_set_gsbase_syscall(void *addr) return (sysarch(AMD64_SET_GSBASE, &addr)); } -DEFINE_UIFUNC(, int, amd64_set_gsbase, (void *), static) +DEFINE_UIFUNC(, int, amd64_set_gsbase, (void *)) { if (__getosreldate() >= P_OSREL_WRFSBASE && Modified: user/ngie/bug-237403/lib/libc/gen/Makefile.inc ============================================================================== --- user/ngie/bug-237403/lib/libc/gen/Makefile.inc Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libc/gen/Makefile.inc Mon May 20 08:01:37 2019 (r347987) @@ -4,7 +4,8 @@ # machine-independent gen sources .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/gen ${LIBC_SRCTOP}/gen -CONFS= shells +CONFS+= group master.passwd shells +CONFSMODE_master.passwd= 600 SRCS+= __getosreldate.c \ __pthread_mutex_init_calloc_cb_stub.c \ @@ -543,3 +544,16 @@ MLINKS+=vis.3 nvis.3 \ vis.3 svis.3 MLINKS+=wordexp.3 wordfree.3 + +afterinstallconfig: +.if ${MK_TCSH} == "no" + sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd +.endif + pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd +.if defined(NO_ROOT) && defined(METALOG) + ( \ + echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \ + echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ + echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \ + ) | cat -l >> ${METALOG} +.endif Copied: user/ngie/bug-237403/lib/libc/gen/group (from r347986, head/lib/libc/gen/group) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/ngie/bug-237403/lib/libc/gen/group Mon May 20 08:01:37 2019 (r347987, copy of r347986, head/lib/libc/gen/group) @@ -0,0 +1,36 @@ +# $FreeBSD$ +# +wheel:*:0:root +daemon:*:1: +kmem:*:2: +sys:*:3: +tty:*:4: +operator:*:5:root +mail:*:6: +bin:*:7: +news:*:8: +man:*:9: +games:*:13: +ftp:*:14: +staff:*:20: +sshd:*:22: +smmsp:*:25: +mailnull:*:26: +guest:*:31: +video:*:44: +bind:*:53: +unbound:*:59: +proxy:*:62: +authpf:*:63: +_pflogd:*:64: +_dhcp:*:65: +uucp:*:66: +dialer:*:68: +network:*:69: +audit:*:77: +www:*:80: +ntpd:*:123: +_ypldap:*:160: +hast:*:845: +nogroup:*:65533: +nobody:*:65534: Copied: user/ngie/bug-237403/lib/libc/gen/master.passwd (from r347986, head/lib/libc/gen/master.passwd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/ngie/bug-237403/lib/libc/gen/master.passwd Mon May 20 08:01:37 2019 (r347987, copy of r347986, head/lib/libc/gen/master.passwd) @@ -0,0 +1,28 @@ +# $FreeBSD$ +# +root::0:0::0:0:Charlie &:/root:/bin/csh +toor:*:0:0::0:0:Bourne-again Superuser:/root: +daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin +operator:*:2:5::0:0:System &:/:/usr/sbin/nologin +bin:*:3:7::0:0:Binaries Commands and Source:/:/usr/sbin/nologin +tty:*:4:65533::0:0:Tty Sandbox:/:/usr/sbin/nologin +kmem:*:5:65533::0:0:KMem Sandbox:/:/usr/sbin/nologin +games:*:7:13::0:0:Games pseudo-user:/:/usr/sbin/nologin +news:*:8:8::0:0:News Subsystem:/:/usr/sbin/nologin +man:*:9:9::0:0:Mister Man Pages:/usr/share/man:/usr/sbin/nologin +sshd:*:22:22::0:0:Secure Shell Daemon:/var/empty:/usr/sbin/nologin +smmsp:*:25:25::0:0:Sendmail Submission User:/var/spool/clientmqueue:/usr/sbin/nologin +mailnull:*:26:26::0:0:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin +bind:*:53:53::0:0:Bind Sandbox:/:/usr/sbin/nologin +unbound:*:59:59::0:0:Unbound DNS Resolver:/var/unbound:/usr/sbin/nologin +proxy:*:62:62::0:0:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin +_pflogd:*:64:64::0:0:pflogd privsep user:/var/empty:/usr/sbin/nologin +_dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin +uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico +pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin +auditdistd:*:78:77::0:0:Auditdistd unprivileged user:/var/empty:/usr/sbin/nologin +www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin +ntpd:*:123:123::0:0:NTP Daemon:/var/db/ntp:/usr/sbin/nologin +_ypldap:*:160:160::0:0:YP LDAP unprivileged user:/var/empty:/usr/sbin/nologin +hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin +nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin Modified: user/ngie/bug-237403/lib/libc/stdlib/bsearch.3 ============================================================================== --- user/ngie/bug-237403/lib/libc/stdlib/bsearch.3 Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libc/stdlib/bsearch.3 Mon May 20 08:01:37 2019 (r347987) @@ -32,7 +32,7 @@ .\" @(#)bsearch.3 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd February 22, 2013 +.Dd May 15, 2019 .Dt BSEARCH 3 .Os .Sh NAME @@ -83,6 +83,61 @@ The function returns a pointer to a matching member of the array, or a null pointer if no match is found. If two members compare as equal, which member is matched is unspecified. +.Sh EXAMPLES +A sample program that searches people by age in a sorted array: +.Bd -literal +#include +#include +#include +#include +#include + +struct person { + char name[5]; + int age; +}; + +int +compare(const void *key, const void *array_member) +{ + int age = (intptr_t) key; + struct person person = *(struct person *) array_member; + + return (age - person.age); +} + +int +main() +{ + struct person *friend; + + /* Sorted array */ + struct person friends[6] = { + { "paul", 22 }, + { "anne", 25 }, + { "fred", 25 }, + { "mary", 27 }, + { "mark", 35 }, + { "bill", 50 } + }; + + size_t array_size = sizeof(friends) / sizeof(struct person); + + friend = bsearch((void *)22, &friends, array_size, sizeof(struct person), compare); + assert(strcmp(friend->name, "paul") == 0); + printf("name: %s\enage: %d\en", friend->name, friend->age); + + friend = bsearch((void *)25, &friends, array_size, sizeof(struct person), compare); + assert(strcmp(friend->name, "fred") == 0 || strcmp(friend->name, "anne") == 0); + printf("name: %s\enage: %d\en", friend->name, friend->age); + + friend = bsearch((void *)30, &friends, array_size, sizeof(struct person), compare); + assert(friend == NULL); + printf("friend aged 30 not found\en"); + + return (EXIT_SUCCESS); +} +.Ed .Sh SEE ALSO .Xr db 3 , .Xr lsearch 3 , Modified: user/ngie/bug-237403/lib/libc/sys/mlock.2 ============================================================================== --- user/ngie/bug-237403/lib/libc/sys/mlock.2 Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libc/sys/mlock.2 Mon May 20 08:01:37 2019 (r347987) @@ -28,7 +28,7 @@ .\" @(#)mlock.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd March 20, 2018 +.Dd May 13, 2019 .Dt MLOCK 2 .Os .Sh NAME @@ -97,13 +97,13 @@ resource limit and the system-wide .Dq wired pages limit -.Va vm.max_wired . -.Va vm.max_wired +.Va vm.max_user_wired . +.Va vm.max_user_wired applies to the system as a whole, so the amount available to a single process at any given time is the difference between -.Va vm.max_wired +.Va vm.max_user_wired and -.Va vm.stats.vm.v_wire_count . +.Va vm.stats.vm.v_user_wire_count . .Pp If .Va security.bsd.unprivileged_mlock @@ -124,13 +124,11 @@ will fail if: is set to 0 and the caller is not the super-user. .It Bq Er EINVAL The address range given wraps around zero. -.It Bq Er EAGAIN -Locking the indicated range would exceed the system limit for locked memory. .It Bq Er ENOMEM Some portion of the indicated address range is not allocated. There was an error faulting/mapping a page. -Locking the indicated range would exceed the per-process limit for locked -memory. +Locking the indicated range would exceed the per-process or system-wide limits +for locked memory. .El The .Fn munlock @@ -171,11 +169,11 @@ system calls first appeared in Allocating too much wired memory can lead to a memory-allocation deadlock which requires a reboot to recover from. .Pp -The per-process resource limit is a limit on the amount of virtual -memory locked, while the system-wide limit is for the number of locked -physical pages. -Hence a process with two distinct locked mappings of the same physical page -counts as 2 pages against the per-process limit and as only a single page -in the system limit. +The per-process and system-wide resource limits of locked memory apply +to the amount of virtual memory locked, not the amount of locked physical +pages. +Hence two distinct locked mappings of the same physical page counts as +2 pages aginst the system limit, and also against the per-process limit +if both mappings belong to the same physical map. .Pp The per-process resource limit is not currently supported. Modified: user/ngie/bug-237403/lib/libc/sys/mlockall.2 ============================================================================== --- user/ngie/bug-237403/lib/libc/sys/mlockall.2 Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libc/sys/mlockall.2 Mon May 20 08:01:37 2019 (r347987) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 25, 2012 +.Dd May 13, 2019 .Dt MLOCKALL 2 .Os .Sh NAME @@ -69,7 +69,7 @@ limited in how much they can lock down. A single process can lock the minimum of a system-wide .Dq wired pages limit -.Va vm.max_wired +.Va vm.max_user_wired and the per-process .Dv RLIMIT_MEMLOCK resource limit. @@ -138,9 +138,9 @@ and functions first appeared in .Fx 5.1 . .Sh BUGS -The per-process resource limit is a limit on the amount of virtual -memory locked, while the system-wide limit is for the number of locked -physical pages. -Hence a process with two distinct locked mappings of the same physical page -counts as 2 pages against the per-process limit and as only a single page -in the system limit. +The per-process and system-wide resource limits of locked memory apply +to the amount of virtual memory locked, not the amount of locked physical +pages. +Hence two distinct locked mappings of the same physical page counts as +2 pages aginst the system limit, and also against the per-process limit +if both mappings belong to the same physical map. Modified: user/ngie/bug-237403/lib/libc/tests/sys/mlock_helper.c ============================================================================== --- user/ngie/bug-237403/lib/libc/tests/sys/mlock_helper.c Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libc/tests/sys/mlock_helper.c Mon May 20 08:01:37 2019 (r347987) @@ -39,16 +39,16 @@ __FBSDID("$FreeBSD$"); #include #include -#define VM_MAX_WIRED "vm.max_wired" +#define VM_MAX_WIRED "vm.max_user_wired" static void -vm_max_wired_sysctl(int *old_value, int *new_value) +vm_max_wired_sysctl(u_long *old_value, u_long *new_value) { size_t old_len; - size_t new_len = (new_value == NULL ? 0 : sizeof(int)); + size_t new_len = (new_value == NULL ? 0 : sizeof(*new_value)); if (old_value == NULL) - printf("Setting the new value to %d\n", *new_value); + printf("Setting the new value to %lu\n", *new_value); else { ATF_REQUIRE_MSG(sysctlbyname(VM_MAX_WIRED, NULL, &old_len, new_value, new_len) == 0, @@ -60,14 +60,14 @@ vm_max_wired_sysctl(int *old_value, int *new_value) "sysctlbyname(%s) failed: %s", VM_MAX_WIRED, strerror(errno)); if (old_value != NULL) - printf("Saved the old value (%d)\n", *old_value); + printf("Saved the old value (%lu)\n", *old_value); } void -set_vm_max_wired(int new_value) +set_vm_max_wired(u_long new_value) { FILE *fp; - int old_value; + u_long old_value; fp = fopen(VM_MAX_WIRED, "w"); if (fp == NULL) { @@ -78,7 +78,7 @@ set_vm_max_wired(int new_value) vm_max_wired_sysctl(&old_value, NULL); - ATF_REQUIRE_MSG(fprintf(fp, "%d", old_value) > 0, + ATF_REQUIRE_MSG(fprintf(fp, "%lu", old_value) > 0, "saving %s failed", VM_MAX_WIRED); fclose(fp); @@ -90,7 +90,7 @@ void restore_vm_max_wired(void) { FILE *fp; - int saved_max_wired; + u_long saved_max_wired; fp = fopen(VM_MAX_WIRED, "r"); if (fp == NULL) { @@ -98,14 +98,14 @@ restore_vm_max_wired(void) return; } - if (fscanf(fp, "%d", &saved_max_wired) != 1) { + if (fscanf(fp, "%lu", &saved_max_wired) != 1) { perror("fscanf failed\n"); fclose(fp); return; } fclose(fp); - printf("old value in %s: %d\n", VM_MAX_WIRED, saved_max_wired); + printf("old value in %s: %lu\n", VM_MAX_WIRED, saved_max_wired); if (saved_max_wired == 0) /* This will cripple the test host */ return; Modified: user/ngie/bug-237403/lib/libc/x86/gen/getcontextx.c ============================================================================== --- user/ngie/bug-237403/lib/libc/x86/gen/getcontextx.c Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libc/x86/gen/getcontextx.c Mon May 20 08:01:37 2019 (r347987) @@ -61,7 +61,7 @@ __getcontextx_size_xfpu(void) return (sizeof(ucontext_t) + xstate_sz); } -DEFINE_UIFUNC(, int, __getcontextx_size, (void), static) +DEFINE_UIFUNC(, int, __getcontextx_size, (void)) { u_int p[4]; @@ -100,7 +100,7 @@ __fillcontextx2_noxfpu(char *ctx) return (0); } -DEFINE_UIFUNC(, int, __fillcontextx2, (char *), static) +DEFINE_UIFUNC(, int, __fillcontextx2, (char *)) { return ((cpu_feature2 & CPUID2_OSXSAVE) != 0 ? __fillcontextx2_xfpu : Modified: user/ngie/bug-237403/lib/libc/x86/sys/__vdso_gettc.c ============================================================================== --- user/ngie/bug-237403/lib/libc/x86/sys/__vdso_gettc.c Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libc/x86/sys/__vdso_gettc.c Mon May 20 08:01:37 2019 (r347987) @@ -72,7 +72,7 @@ rdtsc_mb_none(void) { } -DEFINE_UIFUNC(static, void, rdtsc_mb, (void), static) +DEFINE_UIFUNC(static, void, rdtsc_mb, (void)) { u_int p[4]; /* Not a typo, string matches our do_cpuid() registers use. */ Modified: user/ngie/bug-237403/lib/libc/x86/sys/pkru.c ============================================================================== --- user/ngie/bug-237403/lib/libc/x86/sys/pkru.c Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libc/x86/sys/pkru.c Mon May 20 08:01:37 2019 (r347987) @@ -71,7 +71,7 @@ x86_pkru_get_perm_hw(u_int keyidx, int *access, int *m return (0); } -DEFINE_UIFUNC(, int, x86_pkru_get_perm, (u_int, int *, int *), static) +DEFINE_UIFUNC(, int, x86_pkru_get_perm, (u_int, int *, int *)) { return ((cpu_stdext_feature2 & CPUID_STDEXT2_OSPKE) == 0 ? @@ -106,7 +106,7 @@ x86_pkru_set_perm_hw(u_int keyidx, int access, int mod return (0); } -DEFINE_UIFUNC(, int, x86_pkru_set_perm, (u_int, int, int), static) +DEFINE_UIFUNC(, int, x86_pkru_set_perm, (u_int, int, int)) { return ((cpu_stdext_feature2 & CPUID_STDEXT2_OSPKE) == 0 ? Modified: user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/Makefile ============================================================================== --- user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/Makefile Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/Makefile Mon May 20 08:01:37 2019 (r347987) @@ -6,7 +6,7 @@ SHLIBDIR?= /lib/casper PACKAGE=libcasper -SHLIB_MAJOR= 1 +SHLIB_MAJOR= 2 INCSDIR?= ${INCLUDEDIR}/casper .if ${MK_CASPER} != "no" @@ -25,8 +25,12 @@ HAS_TESTS= SUBDIR.${MK_TESTS}+= tests MAN+= cap_sysctl.3 - -MLINKS+=cap_sysctl.3 libcap_sysctl.3 -MLINKS+=cap_sysctl.3 cap_sysctlbyname.3 +MLINKS+=cap_sysctl.3 libcap_sysctl.3 \ + cap_sysctl.3 cap_sysctlbyname.3 \ + cap_sysctl.3 cap_nametomib.3 \ + cap_sysctl.3 cap_sysctl_limit_init.3 \ + cap_sysctl.3 cap_sysctl_limit_mib.3 \ + cap_sysctl.3 cap_sysctl_limit_name.3 \ + cap_sysctl.3 cap_sysctl_limit.3 .include Modified: user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/cap_sysctl.3 ============================================================================== --- user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/cap_sysctl.3 Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/cap_sysctl.3 Mon May 20 08:01:37 2019 (r347987) @@ -24,72 +24,113 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2018 +.Dd May 13, 2019 .Dt CAP_SYSCTL 3 .Os .Sh NAME -.Nm cap_sysctlbyname +.Nm cap_sysctl .Nd "library for getting or setting system information in capability mode" .Sh LIBRARY .Lb libcap_sysctl .Sh SYNOPSIS -.In sys/nv.h .In libcasper.h .In casper/cap_sysctl.h .Ft int -.Fn cap_sysctlbyname "cap_channel_t *chan" " const char *name" " void *oldp" " size_t *oldlenp" " const void *newp" " size_t newlen" +.Fn cap_sysctl "cap_channel_t *chan" "const int *name" "u_int namelen" "void *oldp" "size_t *oldlenp" "const void *newp" "size_t newlen" +.Ft int +.Fn cap_sysctlbyname "cap_channel_t *chan" "const char *name" "void *oldp" "size_t *oldlenp" "const void *newp" "size_t newlen" +.Ft int +.Fn cap_sysctlnametomib "cap_channel_t *chan" "const char *name" "int *mibp" "size_t *sizep" +.Ft void * +.Fn cap_sysctl_limit_init "cap_channel_t *chan" +.Ft void * +.Fn cap_sysctl_limit_name "void *limit" "const char *name" "int flags" +.Ft void * +.Fn cap_sysctl_limit_mib "void *limit" "int *mibp" "u_int miblen" "int flags" +.Ft int +.Fn cap_sysctl_limit "void *limit" .Sh DESCRIPTION -The function +The +.Fn cap_sysctl , .Fn cap_sysctlbyname -is equivalent to +and +.Fn cap_sysctlnametomib +functions are equivalent to +.Xr sysctl 3 , .Xr sysctlbyname 3 -except that the connection to the -.Nm system.sysctl -service needs to be provided. +and +.Xr sysctlnametomib 3 , +except that they are implemented by the +.Ql system.sysctl +.Xr libcasper 3 +service and require a corresponding +.Xr libcasper 3 +capability. .Sh LIMITS -The service can be limited using -.Xr cap_limit_set 3 -function. +By default, the +.Nm +capability provides unrestricted access to the sysctl namespace. +Applications typically only require access to a small number of sysctl +variables; the +.Fn cap_sysctl_limit +interface can be used to restrict the sysctls that can be accessed using +the +.Nm +capability. +.Fn cap_sysctl_limit_init +returns an opaque limit handle used to store a list of permitted sysctls +and access rights. +Rights are encoded using the following flags: +.Pp +.Bd -literal -offset indent -compact +CAP_SYSCTL_READ allow reads of the sysctl variable +CAP_SYSCTL_WRITE allow writes of the sysctl variable +CAP_SYSCTL_RDWR allow reads and writes of the sysctl variable +CAP_RECURSIVE permit access to any child of the sysctl variable +.Ed +.Pp The -.Xr nvlist 9 -for that function can contain the following values and types: -.Bl -ohang -offset indent -.It ( NV_TYPE_NUMBER ) -The name of the element with type number will be treated as the limited sysctl. -The value of the element will describe the access rights for given sysctl. -There are four different rights +.Fn cap_sysctl_limit_name +function adds the sysctl identified by +.Ar name +to the limit list, and +.Fn cap_sysctl_limit_mib +function adds the sysctl identified by +.Ar mibp +to the limit list. +The access rights for the sysctl are specified in the +.Ar flags +parameter; at least one of .Dv CAP_SYSCTL_READ , -.Dv CAP_SYSCTL_WRITE , -.Dv CAP_SYSCTL_RDWR , +.Dv CAP_SYSCTL_WRITE and -.Dv CAP_SYSCTL_RECURSIVE . -The -.Dv CAP_SYSCTL_READ -flag allows to fetch the value of a given sysctl. -The -.Dv CAP_SYSCTL_WIRTE -flag allows to override the value of a given sysctl. -The .Dv CAP_SYSCTL_RDWR -is combination of the -.Dv CAP_SYSCTL_WIRTE -and -.Dv CAP_SYSCTL_READ -and allows to read and write the value of a given sysctl. -The -.Dv CAP_SYSCTL_RECURSIVE -allows access to all children of a given sysctl. -This right must be combined with at least one other right. +must be specified. +.Fn cap_sysctl_limit +applies a set of sysctl limits to the capability, denying access to sysctl +variables not belonging to the set. +.Pp +Once a set of limits is applied, subsequent calls to +.Fn cap_sysctl_limit +will fail unless the new set is a subset of the current set. +.Pp +.Fn cap_sysctlnametomib +will succeed so long as the named sysctl variable is present in the limit set, +regardless of its access rights. +When a sysctl variable name is added to a limit set, its MIB identifier is +automatically added to the set. .Sh EXAMPLES -The following example first opens a capability to casper and then uses this +The following example first opens a capability to casper, uses this capability to create the .Nm system.sysctl -casper service and uses it to get the value of +casper service, and then uses the +.Nm +capability to get the value of .Dv kern.trap_enotcap . .Bd -literal cap_channel_t *capcas, *capsysctl; const char *name = "kern.trap_enotcap"; -nvlist_t *limits; +void *limit; int value; size_t size; @@ -111,11 +152,11 @@ if (capsysctl == NULL) cap_close(capcas); /* Create limit for one MIB with read access only. */ -limits = nvlist_create(0); -nvlist_add_number(limits, name, CAP_SYSCTL_READ); +limit = cap_sysctl_limit_init(capsysctl); +(void)cap_sysctl_limit_name(limit, name, CAP_SYSCTL_READ); /* Limit system.sysctl. */ -if (cap_limit_set(capsysctl, limits) < 0) +if (cap_sysctl_limit(limit) < 0) err(1, "Unable to set limits"); /* Fetch value. */ @@ -129,7 +170,9 @@ cap_close(capsysctl); .Sh SEE ALSO .Xr cap_enter 2 , .Xr err 3 , +.Xr sysctl 3 , .Xr sysctlbyname 3 , +.Xr sysctlnametomib 3 , .Xr capsicum 4 , .Xr nv 9 .Sh AUTHORS Modified: user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/cap_sysctl.c ============================================================================== --- user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/cap_sysctl.c Mon May 20 03:35:14 2019 (r347986) +++ user/ngie/bug-237403/lib/libcasper/services/cap_sysctl/cap_sysctl.c Mon May 20 08:01:37 2019 (r347987) @@ -1,12 +1,15 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2013 The FreeBSD Foundation + * Copyright (c) 2013, 2018 The FreeBSD Foundation * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. * + * Portions of this software were developed by Mark Johnston + * under sponsorship from the FreeBSD Foundation. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Mon May 20 08:52:12 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67C2115A67F1 for ; Mon, 20 May 2019 08:52:12 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09CE46BFEE; Mon, 20 May 2019 08:52:12 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC1921C0C0; Mon, 20 May 2019 08:52:11 +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 x4K8qBGK081263; Mon, 20 May 2019 08:52:11 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4K8qBQO081262; Mon, 20 May 2019 08:52:11 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201905200852.x4K8qBQO081262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Mon, 20 May 2019 08:52:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r347988 - user/pho/stress2/misc X-SVN-Group: user X-SVN-Commit-Author: pho X-SVN-Commit-Paths: user/pho/stress2/misc X-SVN-Commit-Revision: 347988 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 09CE46BFEE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 20 May 2019 08:52:12 -0000 Author: pho Date: Mon May 20 08:52:11 2019 New Revision: 347988 URL: https://svnweb.freebsd.org/changeset/base/347988 Log: Added a regression test. Sponsored by: Dell EMC Isilon Added: user/pho/stress2/misc/mountro6.sh (contents, props changed) Added: user/pho/stress2/misc/mountro6.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/mountro6.sh Mon May 20 08:52:11 2019 (r347988) @@ -0,0 +1,59 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2019 Dell EMC Isilon +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# Test rw->ro remount when there is a text vnode mapping. +# Fixed by: r347968 + +. ../default.cfg +[ `id -u` -ne 0 ] && echo "Must be root!" && exit 1 + +set -e +mount | grep "on $mntpoint " | grep -q /dev/md && umount -f $mntpoint +[ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart +mdconfig -a -t swap -s 512m -u $mdstart +newfs $newfs_flags md$mdstart > /dev/null +mount /dev/md$mdstart $mntpoint +set +e + +cd $mntpoint +cp /bin/sleep . +./sleep 20 & +cd / +sleep .1 +mount -u -o ro $mntpoint || s=1 +wait +for i in `jot 5`; do + mount | grep -q "on $mntpoint " || break + umount $mntpoint && break || sleep 5 +done +mount | grep -q "on $mntpoint " && { umount -f $mntpoint; s=2; } +mdconfig -d -u $mdstart +exit $s From owner-svn-src-user@freebsd.org Mon May 20 16:16:29 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3091315B183F for ; Mon, 20 May 2019 16:16:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1CB085378; Mon, 20 May 2019 16:16:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AED1A20A74; Mon, 20 May 2019 16:16:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KGGSvr013923; Mon, 20 May 2019 16:16:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KGGSTN013922; Mon, 20 May 2019 16:16:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905201616.x4KGGSTN013922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 20 May 2019 16:16:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r347993 - user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Commit-Revision: 347993 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C1CB085378 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 20 May 2019 16:16:29 -0000 Author: ngie Date: Mon May 20 16:16:28 2019 New Revision: 347993 URL: https://svnweb.freebsd.org/changeset/base/347993 Log: Fix some improper binascii conversions .encode should use .hexlify, not .unhexlify. Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Mon May 20 16:00:32 2019 (r347992) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Mon May 20 16:16:28 2019 (r347993) @@ -552,15 +552,15 @@ if __name__ == '__main__': c = Crypto(CRYPTO_AES_ICM, key) enc = c.encrypt(pt, iv) - print('enc:', binascii.unhexlify(enc)) - print(' ct:', binascii.unhexlify(ct)) + print('enc:', binascii.hexlify(enc)) + print(' ct:', binascii.hexlify(ct)) assert ct == enc dec = c.decrypt(ct, iv) - print('dec:', binascii.unhexlify(dec)) - print(' pt:', binascii.unhexlify(pt)) + print('dec:', binascii.hexlify(dec)) + print(' pt:', binascii.hexlify(pt)) assert pt == dec elif False: Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Mon May 20 16:00:32 2019 (r347992) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Mon May 20 16:16:28 2019 (r347993) @@ -164,8 +164,8 @@ def GenTestCase(cname): if e.errno != errno.EINVAL: raise continue - data['rpt'] = binascii.unhexlify(rpt) - data['rtag'] = binascii.unhexlify(rtag) + data['rpt'] = binascii.hexlify(rpt) + data['rtag'] = binascii.hexlify(rtag) self.assertEqual(rpt, pt, repr(data)) From owner-svn-src-user@freebsd.org Mon May 20 16:23:36 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 337E015B1B7F for ; Mon, 20 May 2019 16:23:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C9BD8858DC; Mon, 20 May 2019 16:23:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81B8E20C19; Mon, 20 May 2019 16:23:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KGNZlq019117; Mon, 20 May 2019 16:23:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KGNZU0019116; Mon, 20 May 2019 16:23:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905201623.x4KGNZU0019116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 20 May 2019 16:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r347994 - user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Commit-Revision: 347994 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C9BD8858DC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 20 May 2019 16:23:36 -0000 Author: ngie Date: Mon May 20 16:23:35 2019 New Revision: 347994 URL: https://svnweb.freebsd.org/changeset/base/347994 Log: Replace more instances of .decode('hex') with binascii.unhexlify for py3 compatibility Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Mon May 20 16:16:28 2019 (r347993) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Mon May 20 16:23:35 2019 (r347994) @@ -248,15 +248,15 @@ def GenTestCase(cname): if Nlen != 12: # OCF only supports 12 byte IVs continue - key = data['Key'].decode('hex') - nonce = data['Nonce'].decode('hex') + key = binascii.unhexlify(data['Key']) + nonce = binascii.unhexlify(data['Nonce']) Alen = int(data['Alen']) if Alen != 0: - aad = data['Adata'].decode('hex') + aad = binascii.unhexlify(data['Adata']) else: aad = None - payload = data['Payload'].decode('hex') - ct = data['CT'].decode('hex') + payload = binascii.unhexlify(data['Payload']) + ct = binascii.unhexlify(data['CT']) try: c = Crypto(crid=crid, @@ -291,14 +291,14 @@ def GenTestCase(cname): if Tlen != 16: # OCF only supports 16 byte tags continue - key = data['Key'].decode('hex') - nonce = data['Nonce'].decode('hex') + key = binascii.unhexlify(data['Key']) + nonce = binascii.unhexlify(data['Nonce']) Alen = int(data['Alen']) if Alen != 0: - aad = data['Adata'].decode('hex') + aad = binascii.unhexlify(data['Adata']) else: aad = None - ct = data['CT'].decode('hex') + ct = binascii.unhexlify(data['CT']) tag = ct[-16:] ct = ct[:-16] @@ -320,7 +320,7 @@ def GenTestCase(cname): r = Crypto.decrypt(c, payload, nonce, aad, tag) - payload = data['Payload'].decode('hex') + payload = binascii.unhexlify(data['Payload']) plen = int(data('Plen')) payload = payload[:plen] self.assertEqual(r, payload, @@ -405,9 +405,9 @@ def GenTestCase(cname): continue for data in lines: - msg = data['Msg'].decode('hex') + msg = binascii.unhexlify(data['Msg']) msg = msg[:int(data['Len'])] - md = data['MD'].decode('hex') + md = binascii.unhexlify(data['MD']) try: c = Crypto(mac=alg, crid=crid, From owner-svn-src-user@freebsd.org Mon May 20 16:39:37 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0922815B233F for ; Mon, 20 May 2019 16:39:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8B0F868A3; Mon, 20 May 2019 16:39:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B81D020DD7; Mon, 20 May 2019 16:39:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KGdaH0024819; Mon, 20 May 2019 16:39:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KGdV0F024792; Mon, 20 May 2019 16:39:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905201639.x4KGdV0F024792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 20 May 2019 16:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r347997 - in user/ngie/bug-237403: contrib/libarchive contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar contrib/libarc... X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in user/ngie/bug-237403: contrib/libarchive contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar contrib/libarchive/tar/test contrib/lib... X-SVN-Commit-Revision: 347997 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C8B0F868A3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 20 May 2019 16:39:37 -0000 Author: ngie Date: Mon May 20 16:39:31 2019 New Revision: 347997 URL: https://svnweb.freebsd.org/changeset/base/347997 Log: MFhead@r347996 Added: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry_misc.3 - copied unchanged from r347996, head/contrib/libarchive/libarchive/archive_entry_misc.3 user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_mtree_noprint.mtree.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_mtree_noprint.mtree.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar5_distance_overflow.rar.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_rar5_distance_overflow.rar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar5_extra_field_version.rar.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_rar5_extra_field_version.rar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar5_fileattr.rar.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_rar5_fileattr.rar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar5_hardlink.rar.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_rar5_hardlink.rar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar5_invalid_dict_reference.rar.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_rar5_invalid_dict_reference.rar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar5_leftshift1.rar.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_rar5_leftshift1.rar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar5_leftshift2.rar.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_rar5_leftshift2.rar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar5_nonempty_dir_stream.rar.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_rar5_nonempty_dir_stream.rar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar5_owner.rar.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_rar5_owner.rar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar5_readtables_overflow.rar.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_rar5_readtables_overflow.rar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar5_symlink.rar.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_rar5_symlink.rar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar5_truncated_huff.rar.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_rar5_truncated_huff.rar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar_ppmd_use_after_free.rar.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_rar_ppmd_use_after_free.rar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_raw.data.gz.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_raw.data.gz.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_tar_empty_with_gnulabel.c - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_tar_empty_with_gnulabel.c user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_tar_empty_with_gnulabel.tar.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_tar_empty_with_gnulabel.tar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_zip_7075_utf8_paths.c - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_zip_7075_utf8_paths.c user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_zip_7075_utf8_paths.zip.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_zip_7075_utf8_paths.zip.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_zip_extra_padding.c - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_zip_extra_padding.c user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_zip_extra_padding.zip.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_zip_extra_padding.zip.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_alone_leak.zipx.uu - copied unchanged from r347996, head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_alone_leak.zipx.uu user/ngie/bug-237403/contrib/libarchive/tar/test/test_option_exclude_vcs.c - copied unchanged from r347996, head/contrib/libarchive/tar/test/test_option_exclude_vcs.c Modified: user/ngie/bug-237403/contrib/libarchive/NEWS user/ngie/bug-237403/contrib/libarchive/cpio/test/test_basic.c user/ngie/bug-237403/contrib/libarchive/cpio/test/test_format_newc.c user/ngie/bug-237403/contrib/libarchive/cpio/test/test_gcpio_compat.c user/ngie/bug-237403/contrib/libarchive/cpio/test/test_option_L_upper.c user/ngie/bug-237403/contrib/libarchive/cpio/test/test_option_a.c user/ngie/bug-237403/contrib/libarchive/cpio/test/test_option_c.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive.h user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry.h user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry_private.h user/ngie/bug-237403/contrib/libarchive/libarchive/archive_hmac.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_match.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_platform.h user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_disk_posix.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_private.h user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_set_format.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_filter_gzip.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_cab.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_mtree.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_rar.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_rar5.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_raw.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_tar.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_warc.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_xar.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_zip.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_util.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_write_add_filter_xz.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_write_disk_posix.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_write_set_format_pax.c user/ngie/bug-237403/contrib/libarchive/libarchive/archive_write_set_format_xar.c user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_entry.c user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_fuzz.c user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_disk_directory_traversals.c user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_extract.c user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_mtree.c user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar.c user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar5.c user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_rar5_win32.rar.uu user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_raw.c user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_read_format_zip.c user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_sparse_basic.c user/ngie/bug-237403/contrib/libarchive/libarchive/test/test_write_disk_symlink.c user/ngie/bug-237403/contrib/libarchive/tar/bsdtar.1 user/ngie/bug-237403/contrib/libarchive/tar/bsdtar.c user/ngie/bug-237403/contrib/libarchive/tar/bsdtar.h user/ngie/bug-237403/contrib/libarchive/tar/cmdline.c user/ngie/bug-237403/contrib/libarchive/tar/test/test_basic.c user/ngie/bug-237403/contrib/libarchive/tar/test/test_copy.c user/ngie/bug-237403/contrib/libarchive/tar/test/test_option_C_mtree.c user/ngie/bug-237403/contrib/libarchive/tar/test/test_option_H_upper.c user/ngie/bug-237403/contrib/libarchive/tar/test/test_option_L_upper.c user/ngie/bug-237403/contrib/libarchive/tar/test/test_option_U_upper.c user/ngie/bug-237403/contrib/libarchive/tar/test/test_option_n.c user/ngie/bug-237403/contrib/libarchive/tar/test/test_option_s.c user/ngie/bug-237403/contrib/libarchive/tar/test/test_strip_components.c user/ngie/bug-237403/contrib/libarchive/tar/test/test_symlink_dir.c user/ngie/bug-237403/contrib/libarchive/test_utils/test_common.h user/ngie/bug-237403/contrib/libarchive/test_utils/test_main.c user/ngie/bug-237403/gnu/usr.bin/binutils/Makefile user/ngie/bug-237403/lib/libarchive/Makefile user/ngie/bug-237403/lib/libarchive/tests/Makefile user/ngie/bug-237403/usr.bin/tar/tests/Makefile Directory Properties: user/ngie/bug-237403/ (props changed) user/ngie/bug-237403/contrib/libarchive/ (props changed) user/ngie/bug-237403/gnu/usr.bin/binutils/ (props changed) Modified: user/ngie/bug-237403/contrib/libarchive/NEWS ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/NEWS Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/NEWS Mon May 20 16:39:31 2019 (r347997) @@ -1,3 +1,13 @@ +Apr 16, 2019: Support for non-recursive list and extract + +Apr 14, 2019: New tar option: --exclude-vcs + +Mar 27, 2019: Support for file and directory symlinks on Windows + +Mar 12, 2019: Important fixes for storing file attributes and flags + +Jan 20, 2019: Support for xz, lzma, ppmd8 and bzip2 compression in zip archives + Oct 06, 2018: RAR 5.0 reader Sep 03, 2018: libarchive 3.3.3 released Modified: user/ngie/bug-237403/contrib/libarchive/cpio/test/test_basic.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/cpio/test/test_basic.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/cpio/test/test_basic.c Mon May 20 16:39:31 2019 (r347997) @@ -46,7 +46,7 @@ verify_files(const char *msg) /* Symlink */ if (canSymlink()) - assertIsSymlink("symlink", "file"); + assertIsSymlink("symlink", "file", 0); /* Another file with 1 link and different permissions. */ failure(msg); @@ -173,7 +173,7 @@ DEFINE_TEST(test_basic) /* Symlink to above file. */ if (canSymlink()) { - assertMakeSymlink("symlink", "file"); + assertMakeSymlink("symlink", "file", 0); fprintf(filelist, "symlink\n"); if (is_LargeInode("symlink")) { strncat(result, Modified: user/ngie/bug-237403/contrib/libarchive/cpio/test/test_format_newc.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/cpio/test/test_format_newc.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/cpio/test/test_format_newc.c Mon May 20 16:39:31 2019 (r347997) @@ -114,7 +114,7 @@ DEFINE_TEST(test_format_newc) /* "symlink" */ if (canSymlink()) { - assertMakeSymlink("symlink", "file1"); + assertMakeSymlink("symlink", "file1", 0); fprintf(list, "symlink\n"); } @@ -233,7 +233,12 @@ DEFINE_TEST(test_format_newc) assert(is_hex(e, 110)); assertEqualMem(e + 0, "070701", 6); /* Magic */ assert(is_hex(e + 6, 8)); /* ino */ +#if defined(_WIN32) && !defined(CYGWIN) + /* Mode: Group members bits and others bits do not work. */ + assertEqualInt(0xa180, from_hex(e + 14, 8) & 0xffc0); +#else assertEqualInt(0xa1ff, from_hex(e + 14, 8)); /* Mode */ +#endif assertEqualInt(from_hex(e + 22, 8), uid); /* uid */ assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */ assertEqualMem(e + 38, "00000001", 8); /* nlink */ Modified: user/ngie/bug-237403/contrib/libarchive/cpio/test/test_gcpio_compat.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/cpio/test/test_gcpio_compat.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/cpio/test/test_gcpio_compat.c Mon May 20 16:39:31 2019 (r347997) @@ -71,7 +71,7 @@ unpack_test(const char *from, const char *options, con /* Symlink */ if (canSymlink()) - assertIsSymlink("symlink", "file"); + assertIsSymlink("symlink", "file", 0); /* dir */ assertIsDir("dir", 0775); Modified: user/ngie/bug-237403/contrib/libarchive/cpio/test/test_option_L_upper.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/cpio/test/test_option_L_upper.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/cpio/test/test_option_L_upper.c Mon May 20 16:39:31 2019 (r347997) @@ -30,8 +30,10 @@ __FBSDID("$FreeBSD$"); * tests won't run on Windows. */ #if defined(_WIN32) && !defined(__CYGWIN__) #define CAT "type" +#define SEP "\\" #else #define CAT "cat" +#define SEP "/" #endif DEFINE_TEST(test_option_L_upper) @@ -51,7 +53,7 @@ DEFINE_TEST(test_option_L_upper) fprintf(filelist, "file\n"); /* Symlink to above file. */ - assertMakeSymlink("symlink", "file"); + assertMakeSymlink("symlink", "file", 0); fprintf(filelist, "symlink\n"); fclose(filelist); @@ -61,7 +63,7 @@ DEFINE_TEST(test_option_L_upper) assertTextFileContents("1 block\n", "copy.err"); failure("Regular -p without -L should preserve symlinks."); - assertIsSymlink("copy/symlink", NULL); + assertIsSymlink("copy/symlink", NULL, 0); r = systemf(CAT " filelist | %s -pd -L copy-L >copy-L.out 2>copy-L.err", testprog); assertEqualInt(r, 0); @@ -77,13 +79,14 @@ DEFINE_TEST(test_option_L_upper) assertMakeDir("unpack", 0755); assertChdir("unpack"); - r = systemf(CAT " ../archive.out | %s -i >unpack.out 2>unpack.err", testprog); + r = systemf(CAT " .." SEP "archive.out | %s -i >unpack.out 2>unpack.err", testprog); + failure("Error invoking %s -i", testprog); assertEqualInt(r, 0); assertTextFileContents("1 block\n", "unpack.err"); assertChdir(".."); - assertIsSymlink("unpack/symlink", NULL); + assertIsSymlink("unpack/symlink", NULL, 0); r = systemf(CAT " filelist | %s -oL >archive-L.out 2>archive-L.err", testprog); failure("Error invoking %s -oL", testprog); @@ -92,7 +95,8 @@ DEFINE_TEST(test_option_L_upper) assertMakeDir("unpack-L", 0755); assertChdir("unpack-L"); - r = systemf(CAT " ../archive-L.out | %s -i >unpack-L.out 2>unpack-L.err", testprog); + r = systemf(CAT " .." SEP "archive-L.out | %s -i >unpack-L.out 2>unpack-L.err", testprog); + failure("Error invoking %s -i < archive-L.out", testprog); assertEqualInt(r, 0); assertTextFileContents("1 block\n", "unpack-L.err"); Modified: user/ngie/bug-237403/contrib/libarchive/cpio/test/test_option_a.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/cpio/test/test_option_a.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/cpio/test/test_option_a.c Mon May 20 16:39:31 2019 (r347997) @@ -71,8 +71,13 @@ test_create(void) * #ifdef this section out. Most of the test below is * still valid. */ memset(×, 0, sizeof(times)); +#if defined(_WIN32) && !defined(CYGWIN) + times.actime = 86400; + times.modtime = 86400; +#else times.actime = 1; times.modtime = 3; +#endif assertEqualInt(0, utime(files[i].name, ×)); /* Record whatever atime the file ended up with. */ Modified: user/ngie/bug-237403/contrib/libarchive/cpio/test/test_option_c.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/cpio/test/test_option_c.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/cpio/test/test_option_c.c Mon May 20 16:39:31 2019 (r347997) @@ -85,7 +85,7 @@ DEFINE_TEST(test_option_c) /* "symlink" */ if (canSymlink()) { - assertMakeSymlink("symlink", "file"); + assertMakeSymlink("symlink", "file", 0); fprintf(filelist, "symlink\n"); } Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive.h ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive.h Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive.h Mon May 20 16:39:31 2019 (r347997) @@ -338,9 +338,9 @@ typedef const char *archive_passphrase_callback(struct #define ARCHIVE_FORMAT_LHA 0xB0000 #define ARCHIVE_FORMAT_CAB 0xC0000 #define ARCHIVE_FORMAT_RAR 0xD0000 -#define ARCHIVE_FORMAT_RAR_V5 (ARCHIVE_FORMAT_RAR | 1) #define ARCHIVE_FORMAT_7ZIP 0xE0000 #define ARCHIVE_FORMAT_WARC 0xF0000 +#define ARCHIVE_FORMAT_RAR_V5 0x100000 /* * Codes returned by archive_read_format_capabilities(). @@ -1095,6 +1095,8 @@ __LA_DECL int archive_match_excluded(struct archive *, */ __LA_DECL int archive_match_path_excluded(struct archive *, struct archive_entry *); +/* Control recursive inclusion of directory content when directory is included. Default on. */ +__LA_DECL int archive_match_set_inclusion_recursion(struct archive *, int); /* Add exclusion pathname pattern. */ __LA_DECL int archive_match_exclude_pattern(struct archive *, const char *); __LA_DECL int archive_match_exclude_pattern_w(struct archive *, Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry.c Mon May 20 16:39:31 2019 (r347997) @@ -168,6 +168,7 @@ archive_entry_clear(struct archive_entry *entry) archive_entry_xattr_clear(entry); archive_entry_sparse_clear(entry); free(entry->stat); + entry->ae_symlink_type = AE_SYMLINK_TYPE_UNDEFINED; memset(entry, 0, sizeof(*entry)); return entry; } @@ -202,6 +203,9 @@ archive_entry_clone(struct archive_entry *entry) entry2->ae_set = entry->ae_set; archive_mstring_copy(&entry2->ae_uname, &entry->ae_uname); + /* Copy symlink type */ + entry2->ae_symlink_type = entry->ae_symlink_type; + /* Copy encryption status */ entry2->encryption = entry->encryption; @@ -253,6 +257,7 @@ archive_entry_new2(struct archive *a) if (entry == NULL) return (NULL); entry->archive = a; + entry->ae_symlink_type = AE_SYMLINK_TYPE_UNDEFINED; return (entry); } @@ -675,6 +680,12 @@ archive_entry_symlink(struct archive_entry *entry) return (NULL); } +int +archive_entry_symlink_type(struct archive_entry *entry) +{ + return (entry->ae_symlink_type); +} + const char * archive_entry_symlink_utf8(struct archive_entry *entry) { @@ -1246,6 +1257,12 @@ archive_entry_set_symlink(struct archive_entry *entry, } void +archive_entry_set_symlink_type(struct archive_entry *entry, int type) +{ + entry->ae_symlink_type = type; +} + +void archive_entry_set_symlink_utf8(struct archive_entry *entry, const char *linkname) { archive_mstring_copy_utf8(&entry->ae_symlink, linkname); @@ -1749,6 +1766,10 @@ static const struct flag { { "nohidden", L"nohidden", UF_HIDDEN, 0}, { "nouhidden", L"nouhidden", UF_HIDDEN, 0}, #endif +#ifdef FILE_ATTRIBUTE_HIDDEN + { "nohidden", L"nohidden", FILE_ATTRIBUTE_HIDDEN, 0}, + { "nouhidden", L"nouhidden", FILE_ATTRIBUTE_HIDDEN, 0}, +#endif #ifdef UF_OFFLINE { "nooffline", L"nooffline", UF_OFFLINE, 0}, { "nouoffline", L"nouoffline", UF_OFFLINE, 0}, @@ -1758,6 +1779,11 @@ static const struct flag { { "nourdonly", L"nourdonly", UF_READONLY, 0}, { "noreadonly", L"noreadonly", UF_READONLY, 0}, #endif +#ifdef FILE_ATTRIBUTE_READONLY + { "nordonly", L"nordonly", FILE_ATTRIBUTE_READONLY, 0}, + { "nourdonly", L"nourdonly", FILE_ATTRIBUTE_READONLY, 0}, + { "noreadonly", L"noreadonly", FILE_ATTRIBUTE_READONLY, 0}, +#endif #ifdef UF_SPARSE { "nosparse", L"nosparse", UF_SPARSE, 0}, { "nousparse", L"nousparse", UF_SPARSE, 0}, @@ -1769,6 +1795,10 @@ static const struct flag { #ifdef UF_SYSTEM { "nosystem", L"nosystem", UF_SYSTEM, 0}, { "nousystem", L"nousystem", UF_SYSTEM, 0}, +#endif +#ifdef FILE_ATTRIBUTE_SYSTEM + { "nosystem", L"nosystem", FILE_ATTRIBUTE_SYSTEM, 0}, + { "nousystem", L"nousystem", FILE_ATTRIBUTE_SYSTEM, 0}, #endif #if defined(FS_UNRM_FL) /* 'u' */ { "noundel", L"noundel", FS_UNRM_FL, 0}, Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry.h ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry.h Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry.h Mon May 20 16:39:31 2019 (r347997) @@ -191,6 +191,13 @@ struct archive_entry; #define AE_IFIFO ((__LA_MODE_T)0010000) /* + * Symlink types + */ +#define AE_SYMLINK_TYPE_UNDEFINED 0 +#define AE_SYMLINK_TYPE_FILE 1 +#define AE_SYMLINK_TYPE_DIRECTORY 2 + +/* * Basic object manipulation */ @@ -275,6 +282,7 @@ __LA_DECL int archive_entry_size_is_set(struct archi __LA_DECL const char *archive_entry_strmode(struct archive_entry *); __LA_DECL const char *archive_entry_symlink(struct archive_entry *); __LA_DECL const char *archive_entry_symlink_utf8(struct archive_entry *); +__LA_DECL int archive_entry_symlink_type(struct archive_entry *); __LA_DECL const wchar_t *archive_entry_symlink_w(struct archive_entry *); __LA_DECL la_int64_t archive_entry_uid(struct archive_entry *); __LA_DECL const char *archive_entry_uname(struct archive_entry *); @@ -350,6 +358,7 @@ __LA_DECL void archive_entry_unset_size(struct archive __LA_DECL void archive_entry_copy_sourcepath(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_sourcepath_w(struct archive_entry *, const wchar_t *); __LA_DECL void archive_entry_set_symlink(struct archive_entry *, const char *); +__LA_DECL void archive_entry_set_symlink_type(struct archive_entry *, int); __LA_DECL void archive_entry_set_symlink_utf8(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_symlink(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_symlink_w(struct archive_entry *, const wchar_t *); @@ -692,7 +701,6 @@ __LA_DECL void archive_entry_linkify(struct archive_en struct archive_entry **, struct archive_entry **); __LA_DECL struct archive_entry *archive_entry_partial_links( struct archive_entry_linkresolver *res, unsigned int *links); - #ifdef __cplusplus } #endif Copied: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry_misc.3 (from r347996, head/contrib/libarchive/libarchive/archive_entry_misc.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry_misc.3 Mon May 20 16:39:31 2019 (r347997, copy of r347996, head/contrib/libarchive/libarchive/archive_entry_misc.3) @@ -0,0 +1,62 @@ +.\" Copyright (c) 2019 Martin Matuska +.\" 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. +.\" +.Dd April 15, 2019 +.Dt ARCHIVE_ENTRY_MISC 3 +.Os +.Sh NAME +.Nm archive_entry_symlink_type , +.Nm archive_entry_set_symlink_type +.Nd miscellaneous functions for manipulating properties of archive_entry. +.Sh LIBRARY +Streaming Archive Library (libarchive, -larchive) +.Sh SYNOPSIS +.In archive_entry.h +.Ft int +.Fn archive_entry_symlink_type "struct archive_entry *a" +.Ft void +.Fn archive_entry_set_symlink_type "struct archive_entry *a" "int" +.Sh DESCRIPTION +The function +.Fn archive_entry_symlink_type +returns and the function +.Fn archive_entry_set_symlink_type +sets the type of the symbolic link stored in an archive entry. These functions +have special meaning on operating systems that support multiple symbolic link +types (e.g. Microsoft Windows). +.Pp +Supported values are: +.Bl -tag -width "AE_SYMLINK_TYPE_DIRECTORY" -compact +.It AE_SYMLINK_TYPE_UNDEFINED +Symbolic link target type is not defined (default on unix systems) +.It AE_SYMLINK_TYPE_FILE +Symbolic link points to a file +.It AE_SYMLINK_TYPE_DIRECTORY +Symbolic link points to a directory +.El +.Sh SEE ALSO +.Xr archive_entry 3 , +.Xr archive_entry_paths 3 , +.Xr archive_entry_stat 3 , +.Xr libarchive 3 Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry_private.h ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry_private.h Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_entry_private.h Mon May 20 16:39:31 2019 (r347997) @@ -176,6 +176,9 @@ struct archive_entry { /* Miscellaneous. */ char strmode[12]; + + /* Symlink type support */ + int ae_symlink_type; }; #endif /* ARCHIVE_ENTRY_PRIVATE_H_INCLUDED */ Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_hmac.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_hmac.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_hmac.c Mon May 20 16:39:31 2019 (r347997) @@ -83,6 +83,7 @@ __hmac_sha1_cleanup(archive_hmac_sha1_ctx *ctx) static int __hmac_sha1_init(archive_hmac_sha1_ctx *ctx, const uint8_t *key, size_t key_len) { +#pragma GCC diagnostic ignored "-Wcast-qual" BCRYPT_ALG_HANDLE hAlg; BCRYPT_HASH_HANDLE hHash; DWORD hash_len; Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_match.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_match.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_match.c Mon May 20 16:39:31 2019 (r347997) @@ -93,6 +93,9 @@ struct archive_match { /* exclusion/inclusion set flag. */ int setflag; + /* Recursively include directory content? */ + int recursive_include; + /* * Matching filename patterns. */ @@ -223,6 +226,7 @@ archive_match_new(void) return (NULL); a->archive.magic = ARCHIVE_MATCH_MAGIC; a->archive.state = ARCHIVE_STATE_NEW; + a->recursive_include = 1; match_list_init(&(a->inclusions)); match_list_init(&(a->exclusions)); __archive_rb_tree_init(&(a->exclusion_tree), &rb_ops_mbs); @@ -471,6 +475,28 @@ archive_match_path_excluded(struct archive *_a, } /* + * When recursive inclusion of directory content is enabled, + * an inclusion pattern that matches a directory will also + * include everything beneath that directory. Enabled by default. + * + * For compatibility with GNU tar, exclusion patterns always + * match if a subset of the full patch matches (i.e., they are + * are not rooted at the beginning of the path) and thus there + * is no corresponding non-recursive exclusion mode. + */ +int +archive_match_set_inclusion_recursion(struct archive *_a, int enabled) +{ + struct archive_match *a; + + archive_check_magic(_a, ARCHIVE_MATCH_MAGIC, + ARCHIVE_STATE_NEW, "archive_match_set_inclusion_recursion"); + a = (struct archive_match *)_a; + a->recursive_include = enabled; + return (ARCHIVE_OK); +} + +/* * Utility functions to get statistic information for inclusion patterns. */ int @@ -781,7 +807,10 @@ static int match_path_inclusion(struct archive_match *a, struct match *m, int mbs, const void *pn) { - int flag = PATHMATCH_NO_ANCHOR_END; + /* Recursive operation requires only a prefix match. */ + int flag = a->recursive_include ? + PATHMATCH_NO_ANCHOR_END : + 0; int r; if (mbs) { @@ -1232,7 +1261,7 @@ set_timefilter_pathname_mbs(struct archive_match *a, i archive_set_error(&(a->archive), EINVAL, "pathname is empty"); return (ARCHIVE_FAILED); } - if (stat(path, &st) != 0) { + if (la_stat(path, &st) != 0) { archive_set_error(&(a->archive), errno, "Failed to stat()"); return (ARCHIVE_FAILED); } Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_platform.h ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_platform.h Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_platform.h Mon May 20 16:39:31 2019 (r347997) @@ -69,6 +69,8 @@ * either Windows or Posix APIs. */ #if (defined(__WIN32__) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__) #include "archive_windows.h" +#else +#define la_stat(path,stref) stat(path,stref) #endif /* Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read.c Mon May 20 16:39:31 2019 (r347997) @@ -611,6 +611,15 @@ choose_filters(struct archive_read *a) return (ARCHIVE_FATAL); } +int +__archive_read_header(struct archive_read *a, struct archive_entry *entry) +{ + if (a->filter->read_header) + return a->filter->read_header(a->filter, entry); + else + return (ARCHIVE_OK); +} + /* * Read header of next entry. */ Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Mon May 20 16:39:31 2019 (r347997) @@ -191,7 +191,7 @@ archive_read_disk_entry_from_file(struct archive *_a, } } else #endif - if (stat(path, &s) != 0) { + if (la_stat(path, &s) != 0) { archive_set_error(&a->archive, errno, "Can't stat %s", path); return (ARCHIVE_FAILED); Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_disk_posix.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_disk_posix.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_disk_posix.c Mon May 20 16:39:31 2019 (r347997) @@ -909,7 +909,7 @@ next_entry(struct archive_read_disk *a, struct tree *t } } break; - } + } } while (lst == NULL); #ifdef __APPLE__ @@ -1295,10 +1295,23 @@ archive_read_disk_descend(struct archive *_a) if (t->visit_type != TREE_REGULAR || !t->descend) return (ARCHIVE_OK); + /* + * We must not treat the initial specified path as a physical dir, + * because if we do then we will try and ascend out of it by opening + * ".." which is (a) wrong and (b) causes spurious permissions errors + * if ".." is not readable by us. Instead, treat it as if it were a + * symlink. (This uses an extra fd, but it can only happen once at the + * top level of a traverse.) But we can't necessarily assume t->st is + * valid here (though t->lst is), which complicates the logic a + * little. + */ if (tree_current_is_physical_dir(t)) { tree_push(t, t->basename, t->current_filesystem_id, t->lst.st_dev, t->lst.st_ino, &t->restore_time); - t->stack->flags |= isDir; + if (t->stack->parent->parent != NULL) + t->stack->flags |= isDir; + else + t->stack->flags |= isDirLink; } else if (tree_current_is_dir(t)) { tree_push(t, t->basename, t->current_filesystem_id, t->st.st_dev, t->st.st_ino, &t->restore_time); @@ -2151,6 +2164,17 @@ tree_open(const char *path, int symlink_mode, int rest static struct tree * tree_reopen(struct tree *t, const char *path, int restore_time) { +#if defined(O_PATH) + /* Linux */ + const int o_flag = O_PATH; +#elif defined(O_SEARCH) + /* SunOS */ + const int o_flag = O_SEARCH; +#elif defined(O_EXEC) + /* FreeBSD */ + const int o_flag = O_EXEC; +#endif + t->flags = (restore_time != 0)?needsRestoreTimes:0; t->flags |= onInitialDir; t->visit_type = 0; @@ -2172,6 +2196,15 @@ tree_reopen(struct tree *t, const char *path, int rest t->stack->flags = needsFirstVisit; t->maxOpenCount = t->openCount = 1; t->initial_dir_fd = open(".", O_RDONLY | O_CLOEXEC); +#if defined(O_PATH) || defined(O_SEARCH) || defined(O_EXEC) + /* + * Most likely reason to fail opening "." is that it's not readable, + * so try again for execute. The consequences of not opening this are + * unhelpful and unnecessary errors later. + */ + if (t->initial_dir_fd < 0) + t->initial_dir_fd = open(".", o_flag | O_CLOEXEC); +#endif __archive_ensure_cloexec_flag(t->initial_dir_fd); t->working_dir_fd = tree_dup(t->initial_dir_fd); return (t); @@ -2479,7 +2512,7 @@ tree_current_stat(struct tree *t) #else if (tree_enter_working_dir(t) != 0) return NULL; - if (stat(tree_current_access_path(t), &t->st) != 0) + if (la_stat(tree_current_access_path(t), &t->st) != 0) #endif return NULL; t->flags |= hasStat; Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_private.h ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_private.h Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_private.h Mon May 20 16:39:31 2019 (r347997) @@ -98,6 +98,8 @@ struct archive_read_filter { int (*close)(struct archive_read_filter *self); /* Function that handles switching from reading one block to the next/prev */ int (*sswitch)(struct archive_read_filter *self, unsigned int iindex); + /* Read any header metadata if available. */ + int (*read_header)(struct archive_read_filter *self, struct archive_entry *entry); /* My private data. */ void *data; @@ -250,6 +252,7 @@ int64_t __archive_read_seek(struct archive_read*, int6 int64_t __archive_read_filter_seek(struct archive_read_filter *, int64_t, int); int64_t __archive_read_consume(struct archive_read *, int64_t); int64_t __archive_read_filter_consume(struct archive_read_filter *, int64_t); +int __archive_read_header(struct archive_read *, struct archive_entry *); int __archive_read_program(struct archive_read_filter *, const char *); void __archive_read_free_filters(struct archive_read *); struct archive_read_extract *__archive_read_get_extract(struct archive_read *); Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_set_format.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_set_format.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_set_format.c Mon May 20 16:39:31 2019 (r347997) @@ -73,6 +73,9 @@ archive_read_set_format(struct archive *_a, int code) case ARCHIVE_FORMAT_RAR: strcpy(str, "rar"); break; + case ARCHIVE_FORMAT_RAR_V5: + strcpy(str, "rar5"); + break; case ARCHIVE_FORMAT_TAR: strcpy(str, "tar"); break; Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_filter_gzip.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_filter_gzip.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_filter_gzip.c Mon May 20 16:39:31 2019 (r347997) @@ -37,6 +37,9 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_LIMITS_H +#include +#endif #ifdef HAVE_UNISTD_H #include #endif @@ -45,6 +48,8 @@ __FBSDID("$FreeBSD$"); #endif #include "archive.h" +#include "archive_entry.h" +#include "archive_endian.h" #include "archive_private.h" #include "archive_read_private.h" @@ -56,6 +61,8 @@ struct private_data { size_t out_block_size; int64_t total_out; unsigned long crc; + uint32_t mtime; + char *name; char eof; /* True = found end of compressed data. */ }; @@ -123,7 +130,8 @@ archive_read_support_filter_gzip(struct archive *_a) * count of bits verified, suitable for use by bidder. */ static ssize_t -peek_at_header(struct archive_read_filter *filter, int *pbits) +peek_at_header(struct archive_read_filter *filter, int *pbits, + struct private_data *state) { const unsigned char *p; ssize_t avail, len; @@ -144,7 +152,9 @@ peek_at_header(struct archive_read_filter *filter, int return (0); bits += 3; header_flags = p[3]; - /* Bytes 4-7 are mod time. */ + /* Bytes 4-7 are mod time in little endian. */ + if (state) + state->mtime = archive_le32dec(p + 4); /* Byte 8 is deflate flags. */ /* XXXX TODO: return deflate flags back to consume_header for use in initializing the decompressor. */ @@ -161,6 +171,7 @@ peek_at_header(struct archive_read_filter *filter, int /* Null-terminated optional filename. */ if (header_flags & 8) { + ssize_t file_start = len; do { ++len; if (avail < len) @@ -169,6 +180,12 @@ peek_at_header(struct archive_read_filter *filter, int if (p == NULL) return (0); } while (p[len - 1] != 0); + + if (state) { + /* Reset the name in case of repeat header reads. */ + free(state->name); + state->name = strdup((const char *)&p[file_start]); + } } /* Null-terminated optional comment. */ @@ -214,12 +231,29 @@ gzip_bidder_bid(struct archive_read_filter_bidder *sel (void)self; /* UNUSED */ - if (peek_at_header(filter, &bits_checked)) + if (peek_at_header(filter, &bits_checked, NULL)) return (bits_checked); return (0); } +static int +gzip_read_header(struct archive_read_filter *self, struct archive_entry *entry) +{ + struct private_data *state; + state = (struct private_data *)self->data; + + /* A mtime of 0 is considered invalid/missing. */ + if (state->mtime != 0) + archive_entry_set_mtime(entry, state->mtime, 0); + + /* If the name is available, extract it. */ + if (state->name) + archive_entry_set_pathname(entry, state->name); + + return (ARCHIVE_OK); +} + #ifndef HAVE_ZLIB_H /* @@ -272,6 +306,7 @@ gzip_bidder_init(struct archive_read_filter *self) self->read = gzip_filter_read; self->skip = NULL; /* not supported */ self->close = gzip_filter_close; + self->read_header = gzip_read_header; state->in_stream = 0; /* We're not actually within a stream yet. */ @@ -289,7 +324,7 @@ consume_header(struct archive_read_filter *self) state = (struct private_data *)self->data; /* If this is a real header, consume it. */ - len = peek_at_header(self->upstream, NULL); + len = peek_at_header(self->upstream, NULL, state); if (len == 0) return (ARCHIVE_EOF); __archive_read_filter_consume(self->upstream, len); @@ -374,7 +409,7 @@ gzip_filter_read(struct archive_read_filter *self, con { struct private_data *state; size_t decompressed; - ssize_t avail_in; + ssize_t avail_in, max_in; int ret; state = (struct private_data *)self->data; @@ -408,6 +443,12 @@ gzip_filter_read(struct archive_read_filter *self, con "truncated gzip input"); return (ARCHIVE_FATAL); } + if (UINT_MAX >= SSIZE_MAX) + max_in = SSIZE_MAX; + else + max_in = UINT_MAX; + if (avail_in > max_in) + avail_in = max_in; state->stream.avail_in = (uInt)avail_in; /* Decompress and consume some of that data. */ @@ -469,6 +510,7 @@ gzip_filter_close(struct archive_read_filter *self) } } + free(state->name); free(state->out_block); free(state); return (ret); Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_cab.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_cab.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_cab.c Mon May 20 16:39:31 2019 (r347997) @@ -1509,8 +1509,8 @@ cab_read_ahead_cfdata_deflate(struct archive_read *a, } if (mszip == 1 && cab->stream.next_in[0] != 0x4b) goto nomszip; - else if (cab->stream.next_in[0] != 0x43 || - cab->stream.next_in[1] != 0x4b) + else if (mszip == 2 && (cab->stream.next_in[0] != 0x43 || + cab->stream.next_in[1] != 0x4b)) goto nomszip; cab->stream.next_in += mszip; cab->stream.avail_in -= mszip; Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_mtree.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Mon May 20 16:39:31 2019 (r347997) @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_CTYPE_H +#include +#endif #include "archive.h" #include "archive_entry.h" @@ -1011,7 +1014,7 @@ read_mtree(struct archive_read *a, struct mtree *mtree { ssize_t len; uintmax_t counter; - char *p; + char *p, *s; struct mtree_option *global; struct mtree_entry *last_entry; int r, is_form_d; @@ -1025,6 +1028,7 @@ read_mtree(struct archive_read *a, struct mtree *mtree (void)detect_form(a, &is_form_d); for (counter = 1; ; ++counter) { + r = ARCHIVE_OK; len = readline(a, mtree, &p, 65536); if (len == 0) { mtree->this_entry = mtree->entries; @@ -1045,6 +1049,15 @@ read_mtree(struct archive_read *a, struct mtree *mtree continue; if (*p == '\r' || *p == '\n' || *p == '\0') continue; + /* Non-printable characters are not allowed */ + for (s = p;s < p + len - 1; s++) { + if (!isprint(*s)) { + r = ARCHIVE_FATAL; + break; + } + } + if (r != ARCHIVE_OK) + break; if (*p != '/') { r = process_add_entry(a, mtree, &global, p, len, &last_entry, is_form_d); Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_rar.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_rar.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_rar.c Mon May 20 16:39:31 2019 (r347997) @@ -1024,8 +1024,10 @@ archive_read_format_rar_read_data(struct archive_read case COMPRESS_METHOD_GOOD: case COMPRESS_METHOD_BEST: ret = read_data_compressed(a, buff, size, offset); - if (ret != ARCHIVE_OK && ret != ARCHIVE_WARN) + if (ret != ARCHIVE_OK && ret != ARCHIVE_WARN) { __archive_ppmd7_functions.Ppmd7_Free(&rar->ppmd7_context); + rar->start_new_table = 1; + } break; default: Modified: user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_rar5.c ============================================================================== --- user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_rar5.c Mon May 20 16:38:12 2019 (r347996) +++ user/ngie/bug-237403/contrib/libarchive/libarchive/archive_read_support_format_rar5.c Mon May 20 16:39:31 2019 (r347997) @@ -33,6 +33,9 @@ #ifdef HAVE_ZLIB_H #include /* crc32 */ #endif +#ifdef HAVE_LIMITS_H +#include +#endif #include "archive.h" #ifndef HAVE_ZLIB_H @@ -78,230 +81,275 @@ static unsigned char rar5_signature[] = { 243, 192, 211, 128, 187, 166, 160, 161 }; static const ssize_t rar5_signature_size = sizeof(rar5_signature); -/* static const size_t g_unpack_buf_chunk_size = 1024; */ static const size_t g_unpack_window_size = 0x20000; +/* These could have been static const's, but they aren't, because of + * Visual Studio. */ +#define MAX_NAME_IN_CHARS 2048 +#define MAX_NAME_IN_BYTES (4 * MAX_NAME_IN_CHARS) + struct file_header { - ssize_t bytes_remaining; - ssize_t unpacked_size; - int64_t last_offset; /* Used in sanity checks. */ - int64_t last_size; /* Used in sanity checks. */ + ssize_t bytes_remaining; + ssize_t unpacked_size; + int64_t last_offset; /* Used in sanity checks. */ + int64_t last_size; /* Used in sanity checks. */ - uint8_t solid : 1; /* Is this a solid stream? */ - uint8_t service : 1; /* Is this file a service data? */ - uint8_t eof : 1; /* Did we finish unpacking the file? */ + uint8_t solid : 1; /* Is this a solid stream? */ + uint8_t service : 1; /* Is this file a service data? */ + uint8_t eof : 1; /* Did we finish unpacking the file? */ + uint8_t dir : 1; /* Is this file entry a directory? */ - /* Optional time fields. */ - uint64_t e_mtime; - uint64_t e_ctime; - uint64_t e_atime; - uint32_t e_unix_ns; + /* Optional time fields. */ + uint64_t e_mtime; + uint64_t e_ctime; + uint64_t e_atime; + uint32_t e_unix_ns; - /* Optional hash fields. */ - uint32_t stored_crc32; - uint32_t calculated_crc32; - uint8_t blake2sp[32]; - blake2sp_state b2state; - char has_blake2; + /* Optional hash fields. */ + uint32_t stored_crc32; + uint32_t calculated_crc32; + uint8_t blake2sp[32]; + blake2sp_state b2state; + char has_blake2; + + /* Optional redir fields */ + uint64_t redir_type; + uint64_t redir_flags; }; +enum EXTRA { + EX_CRYPT = 0x01, + EX_HASH = 0x02, + EX_HTIME = 0x03, + EX_VERSION = 0x04, + EX_REDIR = 0x05, + EX_UOWNER = 0x06, + EX_SUBDATA = 0x07 +}; + +#define REDIR_SYMLINK_IS_DIR 1 + +enum REDIR_TYPE { + REDIR_TYPE_NONE = 0, + REDIR_TYPE_UNIXSYMLINK = 1, + REDIR_TYPE_WINSYMLINK = 2, + REDIR_TYPE_JUNCTION = 3, + REDIR_TYPE_HARDLINK = 4, + REDIR_TYPE_FILECOPY = 5, +}; + +#define OWNER_USER_NAME 0x01 +#define OWNER_GROUP_NAME 0x02 +#define OWNER_USER_UID 0x04 +#define OWNER_GROUP_GID 0x08 +#define OWNER_MAXNAMELEN 256 + enum FILTER_TYPE { - FILTER_DELTA = 0, /* Generic pattern. */ - FILTER_E8 = 1, /* Intel x86 code. */ - FILTER_E8E9 = 2, /* Intel x86 code. */ - FILTER_ARM = 3, /* ARM code. */ - FILTER_AUDIO = 4, /* Audio filter, not used in RARv5. */ - FILTER_RGB = 5, /* Color palette, not used in RARv5. */ - FILTER_ITANIUM = 6, /* Intel's Itanium, not used in RARv5. */ - FILTER_PPM = 7, /* Predictive pattern matching, not used in RARv5. */ - FILTER_NONE = 8, + FILTER_DELTA = 0, /* Generic pattern. */ + FILTER_E8 = 1, /* Intel x86 code. */ + FILTER_E8E9 = 2, /* Intel x86 code. */ + FILTER_ARM = 3, /* ARM code. */ + FILTER_AUDIO = 4, /* Audio filter, not used in RARv5. */ + FILTER_RGB = 5, /* Color palette, not used in RARv5. */ + FILTER_ITANIUM = 6, /* Intel's Itanium, not used in RARv5. */ + FILTER_PPM = 7, /* Predictive pattern matching, not used in + RARv5. */ + FILTER_NONE = 8, }; struct filter_info { - int type; - int channels; - int pos_r; + int type; + int channels; + int pos_r; - int64_t block_start; - ssize_t block_length; - uint16_t width; + int64_t block_start; + ssize_t block_length; + uint16_t width; }; struct data_ready { - char used; - const uint8_t* buf; - size_t size; - int64_t offset; + char used; + const uint8_t* buf; + size_t size; + int64_t offset; }; struct cdeque { - uint16_t beg_pos; - uint16_t end_pos; - uint16_t cap_mask; - uint16_t size; - size_t* arr; + uint16_t beg_pos; + uint16_t end_pos; + uint16_t cap_mask; + uint16_t size; + size_t* arr; }; struct decode_table { - uint32_t size; - int32_t decode_len[16]; - uint32_t decode_pos[16]; - uint32_t quick_bits; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Mon May 20 21:55:46 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EFAA1593E53 for ; Mon, 20 May 2019 21:55:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C2F9F949A6; Mon, 20 May 2019 21:55:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9CD4224554; Mon, 20 May 2019 21:55:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KLtjoB099412; Mon, 20 May 2019 21:55:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KLtjuO099411; Mon, 20 May 2019 21:55:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905202155.x4KLtjuO099411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 20 May 2019 21:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348014 - user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Commit-Revision: 348014 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C2F9F949A6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 20 May 2019 21:55:46 -0000 Author: ngie Date: Mon May 20 21:55:45 2019 New Revision: 348014 URL: https://svnweb.freebsd.org/changeset/base/348014 Log: Add backwards compatibility method for python 2.x KATParser.__next__ must be called KATParser.next, per PEP-3114. Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Mon May 20 21:45:00 2019 (r348013) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Mon May 20 21:55:45 2019 (r348014) @@ -413,6 +413,9 @@ class KATParser: yield values +if sys.version_info[0] < 3: + KATParser.next = KATParser.__next__ + # The CCM files use a bit of a different syntax that doesn't quite fit # the generic KATParser. In particular, some keys are set globally at # the start of the file, and some are set globally at the start of a From owner-svn-src-user@freebsd.org Mon May 20 22:02:55 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F36015940F4 for ; Mon, 20 May 2019 22:02:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4340094E45; Mon, 20 May 2019 22:02:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 185EC24702; Mon, 20 May 2019 22:02:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KM2sn6004901; Mon, 20 May 2019 22:02:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KM2sZj004900; Mon, 20 May 2019 22:02:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905202202.x4KM2sZj004900@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 20 May 2019 22:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348015 - user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Commit-Revision: 348015 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4340094E45 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.986,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 20 May 2019 22:02:55 -0000 Author: ngie Date: Mon May 20 22:02:54 2019 New Revision: 348015 URL: https://svnweb.freebsd.org/changeset/base/348015 Log: Apply r346610 to `self.runSHA` to unbreak the test(s) Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Mon May 20 21:55:45 2019 (r348014) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Mon May 20 22:02:54 2019 (r348015) @@ -381,9 +381,12 @@ def GenTestCase(cname): # Skip SHA512_(224|256) tests if fname.find('SHA512_') != -1: return + columns = [ 'Len', 'Msg', 'MD' ] + with cryptodev.KATParser(fname, columns) as parser: + self.runSHAWithParser(parser) - for hashlength, lines in cryptodev.KATParser(fname, - [ 'Len', 'Msg', 'MD' ]): + def runSHAWithParser(self, parser): + for hashlength, lines in next(parser): # E.g., hashlength will be "L=20" (bytes) hashlen = int(hashlength.split("=")[1]) From owner-svn-src-user@freebsd.org Mon May 20 22:21:43 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B10C0159485D for ; Mon, 20 May 2019 22:21:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5625995BA8; Mon, 20 May 2019 22:21:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E56724A3F; Mon, 20 May 2019 22:21:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KMLhD6012438; Mon, 20 May 2019 22:21:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KMLg6W012436; Mon, 20 May 2019 22:21:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905202221.x4KMLg6W012436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 20 May 2019 22:21:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348017 - user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Commit-Revision: 348017 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5625995BA8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 20 May 2019 22:21:44 -0000 Author: ngie Date: Mon May 20 22:21:42 2019 New Revision: 348017 URL: https://svnweb.freebsd.org/changeset/base/348017 Log: Fix up KatCCMParser test usage This applies r346610 to the relevant test methods, along with the needed iterator and delayed evaluation of the global reading logic. Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Mon May 20 22:04:01 2019 (r348016) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Mon May 20 22:21:42 2019 (r348017) @@ -413,19 +413,25 @@ class KATParser: yield values -if sys.version_info[0] < 3: - KATParser.next = KATParser.__next__ - # The CCM files use a bit of a different syntax that doesn't quite fit # the generic KATParser. In particular, some keys are set globally at # the start of the file, and some are set globally at the start of a # section. class KATCCMParser: def __init__(self, fname): - self.fp = open(fname) self._pending = None + self.fname = fname + self.fp = None + + def __enter__(self): + self.fp = open(self.fname) self.read_globals() + return self + def __exit__(self, exc_type, exc_value, exc_tb): + if self.fp is not None: + self.fp.close() + def read_globals(self): self.global_values = {} while True: @@ -485,6 +491,9 @@ class KATCCMParser: self.section_values[f] = v def __iter__(self): + return self + + def __next__(self): while True: if self._pending: line = self._pending @@ -492,7 +501,7 @@ class KATCCMParser: else: line = self.fp.readline() if not line: - return + raise StopIteration if (line and line[0] == '#') or not line.strip(): continue @@ -521,10 +530,13 @@ class KATCCMParser: yield values - def _spdechex(s): return binascii.hexlify(''.join(s.split())) +if sys.version_info[0] < 3: + KATCCMParser.next = KATCCMParser.__next__ + KATParser.next = KATParser.__next__ + if __name__ == '__main__': if True: try: @@ -540,11 +552,13 @@ if __name__ == '__main__': except IOError: pass elif False: - kp = KATParser('/usr/home/jmg/aesni.testing/format tweak value input - data unit seq no/XTSGenAES128.rsp', [ 'COUNT', 'DataUnitLen', 'Key', 'DataUnitSeqNumber', 'PT', 'CT' ]) - for mode, ni in kp: - print(i, ni) - for j in ni: - print(j) + columns = [ 'COUNT', 'DataUnitLen', 'Key', 'DataUnitSeqNumber', 'PT', 'CT' ] + fname = '/usr/home/jmg/aesni.testing/format tweak value input - data unit seq no/XTSGenAES128.rsp' + with KATParser(fname, columns) as kp: + for mode, ni in kp: + print(i, ni) + for j in ni: + print(j) elif False: key = _spdechex('c939cc13397c1d37de6ae0e1cb7c423c') iv = _spdechex('00000000000000000000000000000001') Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Mon May 20 22:04:01 2019 (r348016) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Mon May 20 22:21:42 2019 (r348017) @@ -243,7 +243,11 @@ def GenTestCase(cname): self.assertEqual(r, ct) def runCCMEncrypt(self, fname): - for data in cryptodev.KATCCMParser(fname): + with cryptodev.KATCCMParser(fname) as parser: + self.runCCMEncryptWithParser(parser) + + def runCCMEncryptWithParser(self, parser): + for data in next(parser): Nlen = int(data['Nlen']) if Nlen != 12: # OCF only supports 12 byte IVs @@ -278,11 +282,15 @@ def GenTestCase(cname): repr(data) + " on " + cname) def runCCMDecrypt(self, fname): + with cryptodev.KATCCMParser(fname) as parser: + self.runCCMDecryptWithParser(parser) + + def runCCMDecryptWithParser(self, parser): # XXX: Note that all of the current CCM # decryption test vectors use IV and tag sizes # that aren't supported by OCF none of the # tests are actually ran. - for data in cryptodev.KATCCMParser(fname): + for data in next(parser): Nlen = int(data['Nlen']) if Nlen != 12: # OCF only supports 12 byte IVs From owner-svn-src-user@freebsd.org Mon May 20 22:37:43 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C55EB1594F2C for ; Mon, 20 May 2019 22:37:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 314E296616; Mon, 20 May 2019 22:37:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EBDC24C4F; Mon, 20 May 2019 22:37:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KMbgts021399; Mon, 20 May 2019 22:37:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4KMbgMd021398; Mon, 20 May 2019 22:37:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905202237.x4KMbgMd021398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 20 May 2019 22:37:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348021 - user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Commit-Revision: 348021 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 314E296616 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 20 May 2019 22:37:43 -0000 Author: ngie Date: Mon May 20 22:37:42 2019 New Revision: 348021 URL: https://svnweb.freebsd.org/changeset/base/348021 Log: Don't raise StopIteration when complete; a bare return suffices Bare return statements are valid terminators for generators: https://docs.python.org/2/reference/simple_stmts.html#the-return-statement . Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Mon May 20 22:32:31 2019 (r348020) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Mon May 20 22:37:42 2019 (r348021) @@ -356,7 +356,7 @@ class KATParser: didread = True if didread and not i: - raise StopIteration + return if not i.startswith('#') and i.strip(): break @@ -501,7 +501,7 @@ class KATCCMParser: else: line = self.fp.readline() if not line: - raise StopIteration + return if (line and line[0] == '#') or not line.strip(): continue From owner-svn-src-user@freebsd.org Tue May 21 00:07:59 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90D651596DDE for ; Tue, 21 May 2019 00:07:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3493A6A68D; Tue, 21 May 2019 00:07:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC98F25B76; Tue, 21 May 2019 00:07:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L07wgT068355; Tue, 21 May 2019 00:07:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L07sFm068330; Tue, 21 May 2019 00:07:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210007.x4L07sFm068330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 00:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348023 - in user/ngie/bug-237403: cddl/contrib/opensolaris/lib/libzfs/common lib/csu/mips lib/libarchive/tests share/man/man9 stand/common stand/ofw/libofw stand/powerpc/boot1.chrp sta... X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in user/ngie/bug-237403: cddl/contrib/opensolaris/lib/libzfs/common lib/csu/mips lib/libarchive/tests share/man/man9 stand/common stand/ofw/libofw stand/powerpc/boot1.chrp stand/powerpc/kboot stand/po... X-SVN-Commit-Revision: 348023 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3493A6A68D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 21 May 2019 00:08:00 -0000 Author: ngie Date: Tue May 21 00:07:53 2019 New Revision: 348023 URL: https://svnweb.freebsd.org/changeset/base/348023 Log: MFhead@r348022 Added: user/ngie/bug-237403/share/man/man9/DEFINE_IFUNC.9 - copied unchanged from r348022, head/share/man/man9/DEFINE_IFUNC.9 Modified: user/ngie/bug-237403/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c user/ngie/bug-237403/lib/csu/mips/crtn.S user/ngie/bug-237403/lib/libarchive/tests/Makefile user/ngie/bug-237403/share/man/man9/DRIVER_MODULE.9 user/ngie/bug-237403/share/man/man9/Makefile user/ngie/bug-237403/stand/common/load_elf.c user/ngie/bug-237403/stand/ofw/libofw/ofw_net.c user/ngie/bug-237403/stand/ofw/libofw/openfirm.c user/ngie/bug-237403/stand/powerpc/boot1.chrp/boot1.c user/ngie/bug-237403/stand/powerpc/kboot/Makefile user/ngie/bug-237403/stand/powerpc/kboot/main.c user/ngie/bug-237403/stand/powerpc/ofw/elf_freebsd.c user/ngie/bug-237403/stand/powerpc/ofw/ppc64_elf_freebsd.c user/ngie/bug-237403/sys/dev/netmap/netmap_freebsd.c user/ngie/bug-237403/sys/dev/usb/net/if_muge.c user/ngie/bug-237403/sys/dev/usb/net/if_mugereg.h user/ngie/bug-237403/sys/kern/kern_kcov.c user/ngie/bug-237403/sys/mips/mediatek/mtk_spi_v1.c user/ngie/bug-237403/sys/netinet/netdump/netdump_client.c user/ngie/bug-237403/tests/sys/opencrypto/runtests.sh user/ngie/bug-237403/tests/sys/sys/rb_test.c user/ngie/bug-237403/tests/sys/sys/splay_test.c Directory Properties: user/ngie/bug-237403/ (props changed) user/ngie/bug-237403/cddl/ (props changed) user/ngie/bug-237403/cddl/contrib/opensolaris/ (props changed) user/ngie/bug-237403/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: user/ngie/bug-237403/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c ============================================================================== --- user/ngie/bug-237403/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Tue May 21 00:07:53 2019 (r348023) @@ -114,7 +114,7 @@ get_stats_for_obj(differ_info_t *di, const char *dsnam (void) snprintf(di->errbuf, sizeof (di->errbuf), dgettext(TEXT_DOMAIN, "Unable to determine path or stats for " - "object %lld in %s"), obj, dsname); + "object %jd in %s"), (uintmax_t)obj, dsname); return (-1); } } @@ -406,8 +406,8 @@ write_free_diffs(FILE *fp, differ_info_t *di, dmu_diff } else { (void) snprintf(di->errbuf, sizeof (di->errbuf), dgettext(TEXT_DOMAIN, - "next allocated object (> %lld) find failure"), - zc.zc_obj); + "next allocated object (> %jd) find failure"), + (uintmax_t)zc.zc_obj); di->zerr = errno; break; } Modified: user/ngie/bug-237403/lib/csu/mips/crtn.S ============================================================================== --- user/ngie/bug-237403/lib/csu/mips/crtn.S Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/lib/csu/mips/crtn.S Tue May 21 00:07:53 2019 (r348023) @@ -5,7 +5,6 @@ __FBSDID("$FreeBSD$"); .gnu_attribute 4, 0 #endif .section .init,"ax",%progbits - .align 4 .set noreorder #if defined(__ABICALLS__) && (defined(__mips_n32) || defined(__mips_n64)) REG_L gp, CALLFRAME_GP(sp) @@ -16,7 +15,6 @@ __FBSDID("$FreeBSD$"); .set reorder .section .fini,"ax",%progbits - .align 4 .set noreorder #if defined(__ABICALLS__) && (defined(__mips_n32) || defined(__mips_n64)) REG_L gp, CALLFRAME_GP(sp) Modified: user/ngie/bug-237403/lib/libarchive/tests/Makefile ============================================================================== --- user/ngie/bug-237403/lib/libarchive/tests/Makefile Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/lib/libarchive/tests/Makefile Tue May 21 00:07:53 2019 (r348023) @@ -557,6 +557,7 @@ ${PACKAGE}FILES+= test_read_format_ustar_filename_eucj ${PACKAGE}FILES+= test_read_format_ustar_filename_koi8r.tar.Z.uu ${PACKAGE}FILES+= test_read_format_warc.warc.uu ${PACKAGE}FILES+= test_read_format_zip.zip.uu +${PACKAGE}FILES+= test_read_format_zip_7075_utf8_paths.zip.uu ${PACKAGE}FILES+= test_read_format_zip_bz2_hang.zip.uu ${PACKAGE}FILES+= test_read_format_zip_bzip2.zipx.uu ${PACKAGE}FILES+= test_read_format_zip_bzip2_multi.zipx.uu Copied: user/ngie/bug-237403/share/man/man9/DEFINE_IFUNC.9 (from r348022, head/share/man/man9/DEFINE_IFUNC.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/ngie/bug-237403/share/man/man9/DEFINE_IFUNC.9 Tue May 21 00:07:53 2019 (r348023, copy of r348022, head/share/man/man9/DEFINE_IFUNC.9) @@ -0,0 +1,143 @@ +.\" Copyright (c) 2019 The FreeBSD Foundation +.\" +.\" This documentation was written by Mark Johnston +.\" under sponsorship from the FreeBSD Foundation. +.\" +.\" 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$ +.\" +.Dd May 18, 2019 +.Dt DEFINE_IFUNC 9 +.Os +.Sh NAME +.Nm DEFINE_IFUNC +.Nd define a kernel function with an implementation selected at run-time +.Sh SYNOPSIS +.In machine/ifunc.h +.Fn DEFINE_IFUNC qual ret_type name args +.Sh DESCRIPTION +ifuncs are a linker feature which allows the programmer to define functions +whose implementation is selected at boot-time or module load-time. +The +.Nm +macro can be used to define an ifunc. +The selection is performed by a resolver function, which returns a pointer +to the selected function. +ifunc resolvers are invoked very early during the machine-dependent +initialization routine, or at load time for dynamically loaded modules. +Resolution must occur before the first call to an ifunc. +ifunc resolution is performed after CPU features are enumerated and after the +kernel's environment is initialized. +The typical use-case for an ifunc is a routine whose behavior depends on +optional CPU features. +For example, newer generations of a given CPU architecture may provide an +instruction to optimize a common operation. +To avoid the overhead of testing for the CPU feature each time the operation +is performed, an ifunc can be used to provide two implementations for the +operation: one targeting platforms with the extra instruction, and one +for older platforms. +.Pp +Because +.Nm +is a macro that defines a dynamically typed function, its usage looks somewhat +unusual. +The +.Ar qual +parameter is a list of zero or more C function qualifiers to be applied to the +ifunc. +This parameter is typically empty or the +.Dv static +qualifier. +.Ar ret_type +is the return type of the ifunc. +.Ar name +is the name of the ifunc. +.Ar args +is a parenthesized, comma-separated list of the parameter types of the function, +as they would appear in a C function declaration. +.Pp +The +.Nm +usage must be followed by the resolver function body. +The resolver must return a function with return type +.Ar ret_type +and parameter types +.Ar args . +The resolver function is defined with the +.Ql resolver +gcc-style function attribute, causing the corresponding +.Xr elf 5 +function symbol to be of type +.Dv STT_GNU_IFUNC +instead of +.Dv STT_FUNC . +The kernel linker invokes the resolver to process relocations targeting ifunc +calls and PLT entries referencing such symbols. +.Sh EXAMPLES +ifunc resolvers are executed early during boot, before most kernel facilities +are available. +They are effectively limited to checking CPU feature flags and tunables. +.Bd -literal +static size_t +fast_strlen(const char *s __unused) +{ + size_t len; + + /* Fast, but may not be correct in all cases. */ + __asm("movq $42,%0\\n" : "=r" (len)); + return (len); +} + +static size_t +slow_strlen(const char *s) +{ + const char *t; + + for (t = s; *t != '\\0'; t++); + return (t - s); +} + +DEFINE_IFUNC(, size_t, strlen, (const char *)) +{ + int enabled; + + enabled = 1; + TUNABLE_INT_FETCH("debug.use_fast_strlen", &enabled); + if (enabled && (cpu_features & CPUID_FAST_STRLEN) != 0) + return (fast_strlen); + else + return (slow_strlen); +} +.Ed +.Pp +This defines a +.Fn strlen +function with an optimized implementation for CPUs that advertise support. +.Sh SEE ALSO +.Xr elf 5 +.Sh NOTES +ifuncs are not supported on all architectures. +They require both toolchain support, to emit function symbols of type +.Dv STT_GNU_IFUNC , +and kernel linker support to invoke ifunc resolvers during boot or +during module load. Modified: user/ngie/bug-237403/share/man/man9/DRIVER_MODULE.9 ============================================================================== --- user/ngie/bug-237403/share/man/man9/DRIVER_MODULE.9 Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/share/man/man9/DRIVER_MODULE.9 Tue May 21 00:07:53 2019 (r348023) @@ -125,7 +125,7 @@ macro allows a driver to be registered for a specific The boot time probe and attach process makes multiple passes over the device tree. Certain critical drivers that provide basic services needed by other -devices are attach during earlier passes. +devices are attached during earlier passes. Most drivers are attached in a final general pass. A driver that attaches during an early pass must register for a specific pass level Modified: user/ngie/bug-237403/share/man/man9/Makefile ============================================================================== --- user/ngie/bug-237403/share/man/man9/Makefile Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/share/man/man9/Makefile Tue May 21 00:07:53 2019 (r348023) @@ -75,6 +75,7 @@ MAN= accept_filter.9 \ DB_COMMAND.9 \ DECLARE_GEOM_CLASS.9 \ DECLARE_MODULE.9 \ + DEFINE_IFUNC.9 \ DELAY.9 \ devclass.9 \ devclass_find.9 \ Modified: user/ngie/bug-237403/stand/common/load_elf.c ============================================================================== --- user/ngie/bug-237403/stand/common/load_elf.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/stand/common/load_elf.c Tue May 21 00:07:53 2019 (r348023) @@ -483,7 +483,7 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_ off += 0x01000000; ehdr->e_entry += off; #ifdef ELF_VERBOSE - printf("Converted entry 0x%08x\n", ehdr->e_entry); + printf("Converted entry 0x%jx\n", (uintmax_t)ehdr->e_entry); #endif } else off = 0; @@ -509,8 +509,8 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_ off -= ehdr->e_entry & ~PAGE_MASK; ehdr->e_entry += off; #ifdef ELF_VERBOSE - printf("ehdr->e_entry 0x%08x, va<->pa off %llx\n", - ehdr->e_entry, off); + printf("ehdr->e_entry 0x%jx", va<->pa off %llx\n", + (uintmax_t)ehdr->e_entry, off); #endif #else off = 0; /* other archs use direct mapped kernels */ Modified: user/ngie/bug-237403/stand/ofw/libofw/ofw_net.c ============================================================================== --- user/ngie/bug-237403/stand/ofw/libofw/ofw_net.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/stand/ofw/libofw/ofw_net.c Tue May 21 00:07:53 2019 (r348023) @@ -225,12 +225,12 @@ ofwn_init(struct iodesc *desc, void *machdep_hint) dmabuf = NULL; if (OF_call_method("dma-alloc", netinstance, 1, 1, (64 * 1024), &dmabuf) < 0) { - printf("Failed to allocate DMA buffer (got %08x).\n", dmabuf); + printf("Failed to allocate DMA buffer (got %p).\n", dmabuf); goto punt; } #if defined(NETIF_DEBUG) - printf("ofwn_init: allocated DMA buffer: %08x\n", dmabuf); + printf("ofwn_init: allocated DMA buffer: %p\n", dmabuf); #endif #endif Modified: user/ngie/bug-237403/stand/ofw/libofw/openfirm.c ============================================================================== --- user/ngie/bug-237403/stand/ofw/libofw/openfirm.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/stand/ofw/libofw/openfirm.c Tue May 21 00:07:53 2019 (r348023) @@ -669,7 +669,6 @@ OF_block_size(ihandle_t instance) } /* -/* * Memory functions */ Modified: user/ngie/bug-237403/stand/powerpc/boot1.chrp/boot1.c ============================================================================== --- user/ngie/bug-237403/stand/powerpc/boot1.chrp/boot1.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/stand/powerpc/boot1.chrp/boot1.c Tue May 21 00:07:53 2019 (r348023) @@ -23,6 +23,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "paths.h" Modified: user/ngie/bug-237403/stand/powerpc/kboot/Makefile ============================================================================== --- user/ngie/bug-237403/stand/powerpc/kboot/Makefile Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/stand/powerpc/kboot/Makefile Tue May 21 00:07:53 2019 (r348023) @@ -36,9 +36,6 @@ CFLAGS+= -DRELOC=${RELOC} LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc -# 64-bit bridge extensions -CFLAGS+= -Wa,-mppc64bridge - DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA} Modified: user/ngie/bug-237403/stand/powerpc/kboot/main.c ============================================================================== --- user/ngie/bug-237403/stand/powerpc/kboot/main.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/stand/powerpc/kboot/main.c Tue May 21 00:07:53 2019 (r348023) @@ -484,8 +484,18 @@ kboot_kseg_get(int *nseg, void **ptr) void _start(int argc, const char **argv, char **env) { +// This makes error "variable 'sp' is uninitialized" be just a warning on clang. +// Initializing 'sp' is not desired here as it would overwrite "r1" original value +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic warning "-Wuninitialized" +#endif register volatile void **sp asm("r1"); main((int)sp[0], (const char **)&sp[1]); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } /* Modified: user/ngie/bug-237403/stand/powerpc/ofw/elf_freebsd.c ============================================================================== --- user/ngie/bug-237403/stand/powerpc/ofw/elf_freebsd.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/stand/powerpc/ofw/elf_freebsd.c Tue May 21 00:07:53 2019 (r348023) @@ -84,7 +84,7 @@ __elfN(ofw_exec)(struct preloaded_file *fp) if ((error = md_load(fp->f_args, &mdp, &dtbp)) != 0) return (error); - printf("Kernel entry at 0x%lx ...\n", e->e_entry); + printf("Kernel entry at 0x%x ...\n", entry); dev_cleanup(); if (dtbp != 0) { Modified: user/ngie/bug-237403/stand/powerpc/ofw/ppc64_elf_freebsd.c ============================================================================== --- user/ngie/bug-237403/stand/powerpc/ofw/ppc64_elf_freebsd.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/stand/powerpc/ofw/ppc64_elf_freebsd.c Tue May 21 00:07:53 2019 (r348023) @@ -87,7 +87,7 @@ ppc64_ofw_elf_exec(struct preloaded_file *fp) if ((error = md_load64(fp->f_args, &mdp, &dtbp)) != 0) return (error); - printf("Kernel entry at 0x%lx ...\n", entry); + printf("Kernel entry at 0x%x ...\n", entry); dev_cleanup(); Modified: user/ngie/bug-237403/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- user/ngie/bug-237403/sys/dev/netmap/netmap_freebsd.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/sys/dev/netmap/netmap_freebsd.c Tue May 21 00:07:53 2019 (r348023) @@ -32,6 +32,7 @@ #include #include #include +#include #include #include /* POLLIN, POLLOUT */ #include /* types used in module initialization */ Modified: user/ngie/bug-237403/sys/dev/usb/net/if_muge.c ============================================================================== --- user/ngie/bug-237403/sys/dev/usb/net/if_muge.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/sys/dev/usb/net/if_muge.c Tue May 21 00:07:53 2019 (r348023) @@ -97,6 +97,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #endif #include @@ -173,6 +174,9 @@ struct muge_softc { struct mtx sc_mtx; struct usb_xfer *sc_xfer[MUGE_N_TRANSFER]; int sc_phyno; + uint32_t sc_leds; + uint16_t sc_led_modes; + uint16_t sc_led_modes_mask; /* Settings for the mac control (MAC_CSR) register. */ uint32_t sc_rfe_ctl; @@ -889,8 +893,9 @@ static int lan78xx_phy_init(struct muge_softc *sc) { muge_dbg_printf(sc, "Initializing PHY.\n"); - uint16_t bmcr; + uint16_t bmcr, lmsr; usb_ticks_t start_ticks; + uint32_t hw_reg; const usb_ticks_t max_ticks = USB_MS_TO_TICKS(1000); MUGE_LOCK_ASSERT(sc, MA_OWNED); @@ -931,6 +936,25 @@ lan78xx_phy_init(struct muge_softc *sc) bmcr |= BMCR_AUTOEN; lan78xx_miibus_writereg(sc->sc_ue.ue_dev, sc->sc_phyno, MII_BMCR, bmcr); bmcr = lan78xx_miibus_readreg(sc->sc_ue.ue_dev, sc->sc_phyno, MII_BMCR); + + /* Configure LED Modes. */ + if (sc->sc_led_modes_mask != 0) { + lmsr = lan78xx_miibus_readreg(sc->sc_ue.ue_dev, sc->sc_phyno, + MUGE_PHY_LED_MODE); + lmsr &= ~sc->sc_led_modes_mask; + lmsr |= sc->sc_led_modes; + lan78xx_miibus_writereg(sc->sc_ue.ue_dev, sc->sc_phyno, + MUGE_PHY_LED_MODE, lmsr); + } + + /* Enable appropriate LEDs. */ + if (sc->sc_leds != 0 && + lan78xx_read_reg(sc, ETH_HW_CFG, &hw_reg) == 0) { + hw_reg &= ~(ETH_HW_CFG_LEDO_EN_ | ETH_HW_CFG_LED1_EN_ | + ETH_HW_CFG_LED2_EN_ | ETH_HW_CFG_LED3_EN_ ); + hw_reg |= sc->sc_leds; + lan78xx_write_reg(sc, ETH_HW_CFG, hw_reg); + } return (0); } @@ -1431,101 +1455,7 @@ tr_setup: } } -#ifdef FDT /** - * muge_fdt_find_eth_node - find descendant node with required compatibility - * @start: start node - * @compatible: compatible string used to identify the node - * - * Loop through all descendant nodes and return first match with required - * compatibility. - * - * RETURNS: - * Returns node's phandle on success -1 otherwise - */ -static phandle_t -muge_fdt_find_eth_node(phandle_t start, const char *compatible) -{ - phandle_t child, node; - - /* Traverse through entire tree to find usb ethernet nodes. */ - for (node = OF_child(start); node != 0; node = OF_peer(node)) { - if (ofw_bus_node_is_compatible(node, compatible)) - return (node); - child = muge_fdt_find_eth_node(node, compatible); - if (child != -1) - return (child); - } - - return (-1); -} - -/** - * muge_fdt_read_mac_property - read MAC address from node - * @node: USB device node - * @mac: memory to store MAC address to - * - * Check for common properties that might contain MAC address - * passed by boot loader. - * - * RETURNS: - * Returns 0 on success, error code otherwise - */ -static int -muge_fdt_read_mac_property(phandle_t node, unsigned char *mac) -{ - int len; - - /* Check if there is property */ - if ((len = OF_getproplen(node, "local-mac-address")) > 0) { - if (len != ETHER_ADDR_LEN) - return (EINVAL); - - OF_getprop(node, "local-mac-address", mac, - ETHER_ADDR_LEN); - return (0); - } - - if ((len = OF_getproplen(node, "mac-address")) > 0) { - if (len != ETHER_ADDR_LEN) - return (EINVAL); - - OF_getprop(node, "mac-address", mac, - ETHER_ADDR_LEN); - return (0); - } - - return (ENXIO); -} - -/** - * muge_fdt_find_mac - read MAC address from node - * @compatible: compatible string for DTB node in the form "usb[N]NNN,[M]MMM" - * where NNN is vendor id and MMM is product id - * @mac: memory to store MAC address to - * - * Tries to find matching node in DTS and obtain MAC address info from it - * - * RETURNS: - * Returns 0 on success, error code otherwise - */ -static int -muge_fdt_find_mac(const char *compatible, unsigned char *mac) -{ - phandle_t node, root; - - root = OF_finddevice("/"); - node = muge_fdt_find_eth_node(root, compatible); - if (node != -1) { - if (muge_fdt_read_mac_property(node, mac) == 0) - return (0); - } - - return (ENXIO); -} -#endif - -/** * muge_set_mac_addr - Initiailizes NIC MAC address * @ue: the USB ethernet device * @@ -1537,12 +1467,8 @@ muge_set_mac_addr(struct usb_ether *ue) { struct muge_softc *sc = uether_getsc(ue); uint32_t mac_h, mac_l; -#ifdef FDT - char compatible[16]; - struct usb_attach_arg *uaa = device_get_ivars(ue->ue_dev); -#endif - memset(sc->sc_ue.ue_eaddr, 0xff, ETHER_ADDR_LEN); + memset(ue->ue_eaddr, 0xff, ETHER_ADDR_LEN); uint32_t val; lan78xx_read_reg(sc, 0, &val); @@ -1550,44 +1476,78 @@ muge_set_mac_addr(struct usb_ether *ue) /* Read current MAC address from RX_ADDRx registers. */ if ((lan78xx_read_reg(sc, ETH_RX_ADDRL, &mac_l) == 0) && (lan78xx_read_reg(sc, ETH_RX_ADDRH, &mac_h) == 0)) { - sc->sc_ue.ue_eaddr[5] = (uint8_t)((mac_h >> 8) & 0xff); - sc->sc_ue.ue_eaddr[4] = (uint8_t)((mac_h) & 0xff); - sc->sc_ue.ue_eaddr[3] = (uint8_t)((mac_l >> 24) & 0xff); - sc->sc_ue.ue_eaddr[2] = (uint8_t)((mac_l >> 16) & 0xff); - sc->sc_ue.ue_eaddr[1] = (uint8_t)((mac_l >> 8) & 0xff); - sc->sc_ue.ue_eaddr[0] = (uint8_t)((mac_l) & 0xff); + ue->ue_eaddr[5] = (uint8_t)((mac_h >> 8) & 0xff); + ue->ue_eaddr[4] = (uint8_t)((mac_h) & 0xff); + ue->ue_eaddr[3] = (uint8_t)((mac_l >> 24) & 0xff); + ue->ue_eaddr[2] = (uint8_t)((mac_l >> 16) & 0xff); + ue->ue_eaddr[1] = (uint8_t)((mac_l >> 8) & 0xff); + ue->ue_eaddr[0] = (uint8_t)((mac_l) & 0xff); } - /* If RX_ADDRx did not provide a valid MAC address, try EEPROM. */ - if (ETHER_IS_VALID(sc->sc_ue.ue_eaddr)) { + /* + * If RX_ADDRx did not provide a valid MAC address, try EEPROM. If that + * doesn't work, try OTP. Whether any of these methods work or not, try + * FDT data, because it is allowed to override the EEPROM/OTP values. + */ + if (ETHER_IS_VALID(ue->ue_eaddr)) { muge_dbg_printf(sc, "MAC assigned from registers\n"); - return; + } else if (lan78xx_eeprom_present(sc) && lan78xx_eeprom_read_raw(sc, + ETH_E2P_MAC_OFFSET, ue->ue_eaddr, ETHER_ADDR_LEN) == 0 && + ETHER_IS_VALID(ue->ue_eaddr)) { + muge_dbg_printf(sc, "MAC assigned from EEPROM\n"); + } else if (lan78xx_otp_read(sc, OTP_MAC_OFFSET, ue->ue_eaddr, + ETHER_ADDR_LEN) == 0 && ETHER_IS_VALID(ue->ue_eaddr)) { + muge_dbg_printf(sc, "MAC assigned from OTP\n"); } - if ((lan78xx_eeprom_present(sc) && - lan78xx_eeprom_read_raw(sc, ETH_E2P_MAC_OFFSET, - sc->sc_ue.ue_eaddr, ETHER_ADDR_LEN) == 0) || - (lan78xx_otp_read(sc, OTP_MAC_OFFSET, - sc->sc_ue.ue_eaddr, ETHER_ADDR_LEN) == 0)) { - if (ETHER_IS_VALID(sc->sc_ue.ue_eaddr)) { - muge_dbg_printf(sc, "MAC read from EEPROM\n"); - return; - } +#ifdef FDT + /* ue->ue_eaddr modified only if config exists for this dev instance. */ + usb_fdt_get_mac_addr(ue->ue_dev, ue); + if (ETHER_IS_VALID(ue->ue_eaddr)) { + muge_dbg_printf(sc, "MAC assigned from FDT data\n"); } +#endif + if (!ETHER_IS_VALID(ue->ue_eaddr)) { + muge_dbg_printf(sc, "MAC assigned randomly\n"); + arc4rand(ue->ue_eaddr, ETHER_ADDR_LEN, 0); + ue->ue_eaddr[0] &= ~0x01; /* unicast */ + ue->ue_eaddr[0] |= 0x02; /* locally administered */ + } +} + +/** + * muge_set_leds - Initializes NIC LEDs pattern + * @ue: the USB ethernet device + * + * Tries to store the LED modes. + * Supports only DTB blob like the Linux driver does. + */ +static void +muge_set_leds(struct usb_ether *ue) +{ #ifdef FDT - snprintf(compatible, sizeof(compatible), "usb%x,%x", - uaa->info.idVendor, uaa->info.idProduct); - if (muge_fdt_find_mac(compatible, sc->sc_ue.ue_eaddr) == 0) { - muge_dbg_printf(sc, "MAC assigned from FDT blob\n"); - return; + struct muge_softc *sc = uether_getsc(ue); + phandle_t node; + pcell_t modes[4]; /* 4 LEDs are possible */ + ssize_t proplen; + uint32_t count; + + if ((node = usb_fdt_get_node(ue->ue_dev, ue->ue_udev)) != -1 && + (proplen = OF_getencprop(node, "microchip,led-modes", modes, + sizeof(modes))) > 0) { + count = proplen / sizeof( uint32_t ); + sc->sc_leds = (count > 0) * ETH_HW_CFG_LEDO_EN_ | + (count > 1) * ETH_HW_CFG_LED1_EN_ | + (count > 2) * ETH_HW_CFG_LED2_EN_ | + (count > 3) * ETH_HW_CFG_LED3_EN_; + while (count-- > 0) { + sc->sc_led_modes |= (modes[count] & 0xf) << (4 * count); + sc->sc_led_modes_mask |= 0xf << (4 * count); + } + muge_dbg_printf(sc, "LED modes set from FDT data\n"); } #endif - - muge_dbg_printf(sc, "MAC assigned randomly\n"); - arc4rand(sc->sc_ue.ue_eaddr, ETHER_ADDR_LEN, 0); - sc->sc_ue.ue_eaddr[0] &= ~0x01; /* unicast */ - sc->sc_ue.ue_eaddr[0] |= 0x02; /* locally administered */ } /** @@ -1610,6 +1570,7 @@ muge_attach_post(struct usb_ether *ue) sc->sc_phyno = 1; muge_set_mac_addr(ue); + muge_set_leds(ue); /* Initialise the chip for the first time */ lan78xx_chip_init(sc); Modified: user/ngie/bug-237403/sys/dev/usb/net/if_mugereg.h ============================================================================== --- user/ngie/bug-237403/sys/dev/usb/net/if_mugereg.h Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/sys/dev/usb/net/if_mugereg.h Tue May 21 00:07:53 2019 (r348023) @@ -190,6 +190,8 @@ #define MUGE_EXT_PAGE_SPACE_1 0x0001 #define MUGE_EXT_PAGE_SPACE_2 0x0002 +#define MUGE_PHY_LED_MODE 29 + /* Extended Register Page 1 Space */ #define MUGE_EXT_MODE_CTRL 0x0013 #define MUGE_EXT_MODE_CTRL_MDIX_MASK_ 0x000C Modified: user/ngie/bug-237403/sys/kern/kern_kcov.c ============================================================================== --- user/ngie/bug-237403/sys/kern/kern_kcov.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/sys/kern/kern_kcov.c Tue May 21 00:07:53 2019 (r348023) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/ngie/bug-237403/sys/mips/mediatek/mtk_spi_v1.c ============================================================================== --- user/ngie/bug-237403/sys/mips/mediatek/mtk_spi_v1.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/sys/mips/mediatek/mtk_spi_v1.c Tue May 21 00:07:53 2019 (r348023) @@ -43,6 +43,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include "gpiobus_if.h" + +#include + #include #include #include "spibus_if.h" @@ -53,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -81,6 +87,8 @@ __FBSDID("$FreeBSD$"); struct mtk_spi_softc { device_t sc_dev; struct resource *sc_mem_res; + struct gpiobus_pin *gpio_cs; + int nonflash; }; static int mtk_spi_probe(device_t); @@ -127,7 +135,7 @@ mtk_spi_attach(device_t dev) sc->sc_dev = dev; rid = 0; sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, - RF_ACTIVE); + RF_SHAREABLE | RF_ACTIVE); if (!sc->sc_mem_res) { device_printf(dev, "Could not map memory\n"); return (ENXIO); @@ -138,14 +146,20 @@ mtk_spi_attach(device_t dev) return (EBUSY); } - SPI_WRITE(sc, MTK_SPICFG, MSBFIRST | SPICLKPOL | TX_ON_CLK_FALL | - SPI_CLK_DIV8); /* XXX: make it configurable */ - /* - * W25Q64CV max 104MHz, bus 120-192 MHz, so divide by 2. - * Update: divide by 4, DEV2 to fast for flash. - */ + if (ofw_bus_has_prop(dev, "non-flash")) + sc->nonflash = 1; + else + sc->nonflash = 0; - device_add_child(dev, "spibus", 0); + ofw_gpiobus_parse_gpios(dev, "cs-gpios", &sc->gpio_cs); + + if (sc->gpio_cs != NULL) { + GPIO_PIN_SETFLAGS(sc->gpio_cs->dev, sc->gpio_cs->pin, + GPIO_PIN_OUTPUT); + GPIO_PIN_SET(sc->gpio_cs->dev, sc->gpio_cs->pin, 1); + } + + device_add_child(dev, "spibus", -1); return (bus_generic_attach(dev)); } @@ -169,7 +183,12 @@ mtk_spi_chip_activate(struct mtk_spi_softc *sc) /* * Put all CSx to low */ - SPI_CLEAR_BITS(sc, MTK_SPICTL, CS_HIGH | HIZSMOSI); + if (sc->gpio_cs != NULL) { + GPIO_PIN_SET(sc->gpio_cs->dev, sc->gpio_cs->pin, 0); + SPI_CLEAR_BITS(sc, MTK_SPICTL, HIZSMOSI); + } else { + SPI_CLEAR_BITS(sc, MTK_SPICTL, CS_HIGH | HIZSMOSI); + } } static void @@ -179,7 +198,12 @@ mtk_spi_chip_deactivate(struct mtk_spi_softc *sc) /* * Put all CSx to high */ - SPI_SET_BITS(sc, MTK_SPICTL, CS_HIGH | HIZSMOSI); + if (sc->gpio_cs != NULL) { + GPIO_PIN_SET(sc->gpio_cs->dev, sc->gpio_cs->pin, 1); + SPI_SET_BITS(sc, MTK_SPICTL, HIZSMOSI); + } else { + SPI_SET_BITS(sc, MTK_SPICTL, CS_HIGH | HIZSMOSI); + } } static int @@ -224,12 +248,15 @@ mtk_spi_transfer(device_t dev, device_t child, struct { struct mtk_spi_softc *sc; uint8_t *buf, byte, *tx_buf; - uint32_t cs; + uint32_t cs, clock, mode; int i, sz, error = 0, write = 0; + int div, clk, cfgreg; sc = device_get_softc(dev); spibus_get_cs(child, &cs); + spibus_get_clock(child, &clock); + spibus_get_mode(child, &mode); cs &= ~SPIBUS_CS_HIGH; @@ -237,44 +264,80 @@ mtk_spi_transfer(device_t dev, device_t child, struct /* Only 1 CS */ return (ENXIO); - /* There is always a command to transfer. */ - tx_buf = (uint8_t *)(cmd->tx_cmd); - - /* Perform some fixup because MTK dont support duplex SPI */ - switch(tx_buf[0]) { - case CMD_READ_IDENT: - cmd->tx_cmd_sz = 1; - cmd->rx_cmd_sz = 3; + cfgreg = MSBFIRST; + switch(mode) { + case 0: /* This is workadound because of + mode 0 not work this soc. */ + case 3: + cfgreg |= SPICLKPOL | TX_ON_CLK_FALL; break; - case CMD_ENTER_4B_MODE: - case CMD_EXIT_4B_MODE: - case CMD_WRITE_ENABLE: - case CMD_WRITE_DISABLE: - cmd->tx_cmd_sz = 1; - cmd->rx_cmd_sz = 0; + case 1: + cfgreg |= TX_ON_CLK_FALL; break; - case CMD_READ_STATUS: - cmd->tx_cmd_sz = 1; - cmd->rx_cmd_sz = 1; + case 2: + cfgreg |= CAPT_ON_CLK_FALL; break; - case CMD_READ: - case CMD_FAST_READ: - cmd->rx_cmd_sz = cmd->tx_data_sz = 0; - break; - case CMD_SECTOR_ERASE: - cmd->rx_cmd_sz = 0; - break; - case CMD_PAGE_PROGRAM: - cmd->rx_cmd_sz = cmd->rx_data_sz = 0; - break; - } + } + + /* + * W25Q64CV max 104MHz, bus 120-192 MHz, so divide by 2. + * Update: divide by 4, DEV2 to fast for flash. + */ + if (clock != 0) { + div = (mtk_soc_get_cpuclk() + (clock - 1)) / clock; + clk = fls(div) - 2; + if (clk < 0) + clk = 0; + else if (clk > 6) + clk = 6; + } else { + clk = 6; + } + + SPI_WRITE(sc, MTK_SPICFG, cfgreg | clk); + + if (sc->nonflash == 0) { + /* There is always a command to transfer. */ + tx_buf = (uint8_t *)(cmd->tx_cmd); + + /* Perform some fixup because MTK dont support duplex SPI */ + switch(tx_buf[0]) { + case CMD_READ_IDENT: + cmd->tx_cmd_sz = 1; + cmd->rx_cmd_sz = 3; + break; + case CMD_ENTER_4B_MODE: + case CMD_EXIT_4B_MODE: + case CMD_WRITE_ENABLE: + case CMD_WRITE_DISABLE: + cmd->tx_cmd_sz = 1; + cmd->rx_cmd_sz = 0; + break; + case CMD_READ_STATUS: + cmd->tx_cmd_sz = 1; + cmd->rx_cmd_sz = 1; + break; + case CMD_READ: + case CMD_FAST_READ: + cmd->rx_cmd_sz = cmd->tx_data_sz = 0; + break; + case CMD_SECTOR_ERASE: + cmd->rx_cmd_sz = 0; + break; + case CMD_PAGE_PROGRAM: + cmd->rx_cmd_sz = cmd->rx_data_sz = 0; + break; + } + } mtk_spi_chip_activate(sc); if (cmd->tx_cmd_sz + cmd->rx_cmd_sz) { buf = (uint8_t *)(cmd->rx_cmd); tx_buf = (uint8_t *)(cmd->tx_cmd); - sz = cmd->tx_cmd_sz + cmd->rx_cmd_sz; + sz = cmd->tx_cmd_sz; + if (sc->nonflash == 0) + sz += cmd->rx_cmd_sz; for (i = 0; i < sz; i++) { if(i < cmd->tx_cmd_sz) { Modified: user/ngie/bug-237403/sys/netinet/netdump/netdump_client.c ============================================================================== --- user/ngie/bug-237403/sys/netinet/netdump/netdump_client.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/sys/netinet/netdump/netdump_client.c Tue May 21 00:07:53 2019 (r348023) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/ngie/bug-237403/tests/sys/opencrypto/runtests.sh ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/runtests.sh Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/tests/sys/opencrypto/runtests.sh Tue May 21 00:07:53 2019 (r348023) @@ -81,7 +81,7 @@ if ! sysctl $cdas_sysctl=1; then fi echo "1..1" -if "$PYTHON" $(dirname $0)/cryptotest.py; then +if "$PYTHON" $(dirname $0)/cryptotest.py $CRYPTOTEST_ARGS; then echo "ok 1" else echo "not ok 1" Modified: user/ngie/bug-237403/tests/sys/sys/rb_test.c ============================================================================== --- user/ngie/bug-237403/tests/sys/sys/rb_test.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/tests/sys/sys/rb_test.c Tue May 21 00:07:53 2019 (r348023) @@ -69,7 +69,7 @@ ATF_TC_BODY(rb_test, tc) for (i = 0; i < ITER; i++) { tmp = malloc(sizeof(struct node)); - ATF_CHECK_MSG(tmp != NULL, "malloc failed"); + ATF_REQUIRE_MSG(tmp != NULL, "malloc failed"); do { tmp->key = arc4random_uniform(MAX-MIN); tmp->key += MIN; @@ -82,20 +82,22 @@ ATF_TC_BODY(rb_test, tc) if (tmp->key < min) min = tmp->key; } - ATF_CHECK_EQ(NULL, RB_INSERT(tree, &root, tmp)); + ATF_REQUIRE_EQ(NULL, RB_INSERT(tree, &root, tmp)); } ins = RB_MIN(tree, &root); + ATF_REQUIRE_MSG(ins != NULL, "RB_MIN error"); ATF_CHECK_EQ(min, ins->key); tmp = ins; ins = RB_MAX(tree, &root); + ATF_REQUIRE_MSG(ins != NULL, "RB_MAX error"); ATF_CHECK_EQ(max, ins->key); ATF_CHECK_EQ(tmp, RB_REMOVE(tree, &root, tmp)); for (i = 0; i < ITER - 1; i++) { tmp = RB_ROOT(&root); - ATF_CHECK_MSG(tmp != NULL, "RB_ROOT error"); + ATF_REQUIRE_MSG(tmp != NULL, "RB_ROOT error"); ATF_CHECK_EQ(tmp, RB_REMOVE(tree, &root, tmp)); free(tmp); } Modified: user/ngie/bug-237403/tests/sys/sys/splay_test.c ============================================================================== --- user/ngie/bug-237403/tests/sys/sys/splay_test.c Tue May 21 00:04:19 2019 (r348022) +++ user/ngie/bug-237403/tests/sys/sys/splay_test.c Tue May 21 00:07:53 2019 (r348023) @@ -69,7 +69,7 @@ ATF_TC_BODY(splay_test, tc) for (i = 0; i < ITER; i++) { tmp = malloc(sizeof(struct node)); - ATF_CHECK_MSG(tmp != NULL, "malloc failed"); + ATF_REQUIRE_MSG(tmp != NULL, "malloc failed"); do { tmp->key = arc4random_uniform(MAX-MIN); tmp->key += MIN; @@ -82,20 +82,22 @@ ATF_TC_BODY(splay_test, tc) if (tmp->key < min) min = tmp->key; } - ATF_CHECK_EQ(NULL, SPLAY_INSERT(tree, &root, tmp)); + ATF_REQUIRE_EQ(NULL, SPLAY_INSERT(tree, &root, tmp)); } ins = SPLAY_MIN(tree, &root); + ATF_REQUIRE_MSG(ins != NULL, "SPLAY_MIN error"); ATF_CHECK_EQ(min, ins->key); tmp = ins; ins = SPLAY_MAX(tree, &root); + ATF_REQUIRE_MSG(ins != NULL, "SPLAY_MAX error"); ATF_CHECK_EQ(max, ins->key); ATF_CHECK_EQ(tmp, SPLAY_REMOVE(tree, &root, tmp)); for (i = 0; i < ITER - 1; i++) { tmp = SPLAY_ROOT(&root); - ATF_CHECK_MSG(tmp != NULL, "SPLAY_ROOT error"); + ATF_REQUIRE_MSG(tmp != NULL, "SPLAY_ROOT error"); ATF_CHECK_EQ(tmp, SPLAY_REMOVE(tree, &root, tmp)); free(tmp); } From owner-svn-src-user@freebsd.org Tue May 21 01:56:31 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B136B159A6CD for ; Tue, 21 May 2019 01:56:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B56F6E72B; Tue, 21 May 2019 01:56:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36A0826DEE; Tue, 21 May 2019 01:56:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L1uVwG026964; Tue, 21 May 2019 01:56:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L1uQtE026938; Tue, 21 May 2019 01:56:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210156.x4L1uQtE026938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 01:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348029 - in user/ngie/bug-237403: stand/common stand/powerpc sys/arm/allwinner sys/arm/amlogic/aml8726 sys/arm/freescale/imx sys/arm/rockchip sys/arm/ti/am335x sys/compat/linuxkpi/comm... X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in user/ngie/bug-237403: stand/common stand/powerpc sys/arm/allwinner sys/arm/amlogic/aml8726 sys/arm/freescale/imx sys/arm/rockchip sys/arm/ti/am335x sys/compat/linuxkpi/common/src sys/dev/drm2/ttm s... X-SVN-Commit-Revision: 348029 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5B56F6E72B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 21 May 2019 01:56:32 -0000 Author: ngie Date: Tue May 21 01:56:26 2019 New Revision: 348029 URL: https://svnweb.freebsd.org/changeset/base/348029 Log: MFhead@r348028 Modified: user/ngie/bug-237403/stand/common/load_elf.c user/ngie/bug-237403/stand/powerpc/Makefile user/ngie/bug-237403/sys/arm/allwinner/a10_fb.c user/ngie/bug-237403/sys/arm/allwinner/a10_hdmi.c user/ngie/bug-237403/sys/arm/amlogic/aml8726/aml8726_wdt.c user/ngie/bug-237403/sys/arm/freescale/imx/imx6_ipu.c user/ngie/bug-237403/sys/arm/rockchip/rk30xx_wdog.c user/ngie/bug-237403/sys/arm/ti/am335x/am335x_lcd.c user/ngie/bug-237403/sys/arm/ti/am335x/tda19988.c user/ngie/bug-237403/sys/compat/linuxkpi/common/src/linux_compat.c user/ngie/bug-237403/sys/dev/drm2/ttm/ttm_page_alloc.c user/ngie/bug-237403/sys/dev/fb/creator.c user/ngie/bug-237403/sys/dev/fb/fbd.c user/ngie/bug-237403/sys/dev/hdmi/dwc_hdmi.c user/ngie/bug-237403/sys/dev/iscsi_initiator/iscsi.c user/ngie/bug-237403/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c user/ngie/bug-237403/sys/dev/mlx5/mlx5_en/mlx5_en_main.c user/ngie/bug-237403/sys/mips/atheros/ar531x/ar5315_wdog.c user/ngie/bug-237403/sys/mips/cavium/octeon_wdog.c user/ngie/bug-237403/sys/mips/ingenic/jz4780_lcd.c user/ngie/bug-237403/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c user/ngie/bug-237403/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c user/ngie/bug-237403/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Directory Properties: user/ngie/bug-237403/ (props changed) Modified: user/ngie/bug-237403/stand/common/load_elf.c ============================================================================== --- user/ngie/bug-237403/stand/common/load_elf.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/stand/common/load_elf.c Tue May 21 01:56:26 2019 (r348029) @@ -509,7 +509,7 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_ off -= ehdr->e_entry & ~PAGE_MASK; ehdr->e_entry += off; #ifdef ELF_VERBOSE - printf("ehdr->e_entry 0x%jx", va<->pa off %llx\n", + printf("ehdr->e_entry 0x%jx, va<->pa off %llx\n", (uintmax_t)ehdr->e_entry, off); #endif #else Modified: user/ngie/bug-237403/stand/powerpc/Makefile ============================================================================== --- user/ngie/bug-237403/stand/powerpc/Makefile Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/stand/powerpc/Makefile Tue May 21 01:56:26 2019 (r348029) @@ -5,6 +5,9 @@ NO_OBJ=t .include SUBDIR.yes= boot1.chrp ofw uboot + +.if "${TARGET_ARCH}" == "powerpc64" SUBDIR.${MK_FDT}+= kboot +.endif .include Modified: user/ngie/bug-237403/sys/arm/allwinner/a10_fb.c ============================================================================== --- user/ngie/bug-237403/sys/arm/allwinner/a10_fb.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/arm/allwinner/a10_fb.c Tue May 21 01:56:26 2019 (r348029) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/ngie/bug-237403/sys/arm/allwinner/a10_hdmi.c ============================================================================== --- user/ngie/bug-237403/sys/arm/allwinner/a10_hdmi.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/arm/allwinner/a10_hdmi.c Tue May 21 01:56:26 2019 (r348029) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: user/ngie/bug-237403/sys/arm/amlogic/aml8726/aml8726_wdt.c ============================================================================== --- user/ngie/bug-237403/sys/arm/amlogic/aml8726/aml8726_wdt.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/arm/amlogic/aml8726/aml8726_wdt.c Tue May 21 01:56:26 2019 (r348029) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/ngie/bug-237403/sys/arm/freescale/imx/imx6_ipu.c ============================================================================== --- user/ngie/bug-237403/sys/arm/freescale/imx/imx6_ipu.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/arm/freescale/imx/imx6_ipu.c Tue May 21 01:56:26 2019 (r348029) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/ngie/bug-237403/sys/arm/rockchip/rk30xx_wdog.c ============================================================================== --- user/ngie/bug-237403/sys/arm/rockchip/rk30xx_wdog.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/arm/rockchip/rk30xx_wdog.c Tue May 21 01:56:26 2019 (r348029) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/ngie/bug-237403/sys/arm/ti/am335x/am335x_lcd.c ============================================================================== --- user/ngie/bug-237403/sys/arm/ti/am335x/am335x_lcd.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/arm/ti/am335x/am335x_lcd.c Tue May 21 01:56:26 2019 (r348029) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/ngie/bug-237403/sys/arm/ti/am335x/tda19988.c ============================================================================== --- user/ngie/bug-237403/sys/arm/ti/am335x/tda19988.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/arm/ti/am335x/tda19988.c Tue May 21 01:56:26 2019 (r348029) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/ngie/bug-237403/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- user/ngie/bug-237403/sys/compat/linuxkpi/common/src/linux_compat.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/compat/linuxkpi/common/src/linux_compat.c Tue May 21 01:56:26 2019 (r348029) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/ngie/bug-237403/sys/dev/drm2/ttm/ttm_page_alloc.c ============================================================================== --- user/ngie/bug-237403/sys/dev/drm2/ttm/ttm_page_alloc.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/dev/drm2/ttm/ttm_page_alloc.c Tue May 21 01:56:26 2019 (r348029) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #define NUM_PAGES_TO_ALLOC (PAGE_SIZE/sizeof(vm_page_t)) Modified: user/ngie/bug-237403/sys/dev/fb/creator.c ============================================================================== --- user/ngie/bug-237403/sys/dev/fb/creator.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/dev/fb/creator.c Tue May 21 01:56:26 2019 (r348029) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/ngie/bug-237403/sys/dev/fb/fbd.c ============================================================================== --- user/ngie/bug-237403/sys/dev/fb/fbd.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/dev/fb/fbd.c Tue May 21 01:56:26 2019 (r348029) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/ngie/bug-237403/sys/dev/hdmi/dwc_hdmi.c ============================================================================== --- user/ngie/bug-237403/sys/dev/hdmi/dwc_hdmi.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/dev/hdmi/dwc_hdmi.c Tue May 21 01:56:26 2019 (r348029) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: user/ngie/bug-237403/sys/dev/iscsi_initiator/iscsi.c ============================================================================== --- user/ngie/bug-237403/sys/dev/iscsi_initiator/iscsi.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/dev/iscsi_initiator/iscsi.c Tue May 21 01:56:26 2019 (r348029) @@ -37,6 +37,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef DO_EVENTHANDLER +#include +#endif #include #include #include Modified: user/ngie/bug-237403/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- user/ngie/bug-237403/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Tue May 21 01:56:26 2019 (r348029) @@ -47,6 +47,7 @@ #include #include +#include #include #include Modified: user/ngie/bug-237403/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- user/ngie/bug-237403/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue May 21 01:56:26 2019 (r348029) @@ -27,6 +27,7 @@ #include "en.h" +#include #include #include Modified: user/ngie/bug-237403/sys/mips/atheros/ar531x/ar5315_wdog.c ============================================================================== --- user/ngie/bug-237403/sys/mips/atheros/ar531x/ar5315_wdog.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/mips/atheros/ar531x/ar5315_wdog.c Tue May 21 01:56:26 2019 (r348029) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/ngie/bug-237403/sys/mips/cavium/octeon_wdog.c ============================================================================== --- user/ngie/bug-237403/sys/mips/cavium/octeon_wdog.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/mips/cavium/octeon_wdog.c Tue May 21 01:56:26 2019 (r348029) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/ngie/bug-237403/sys/mips/ingenic/jz4780_lcd.c ============================================================================== --- user/ngie/bug-237403/sys/mips/ingenic/jz4780_lcd.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/mips/ingenic/jz4780_lcd.c Tue May 21 01:56:26 2019 (r348029) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: user/ngie/bug-237403/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c ============================================================================== --- user/ngie/bug-237403/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Tue May 21 01:56:26 2019 (r348029) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include "core_priv.h" +#include #include #include Modified: user/ngie/bug-237403/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- user/ngie/bug-237403/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Tue May 21 01:56:26 2019 (r348029) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include "ipoib.h" +#include static int ipoib_resolvemulti(struct ifnet *, struct sockaddr **, struct sockaddr *); Modified: user/ngie/bug-237403/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c ============================================================================== --- user/ngie/bug-237403/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Tue May 21 01:56:26 2019 (r348029) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Tue May 21 01:42:57 2019 (r348028) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py Tue May 21 01:56:26 2019 (r348029) @@ -278,7 +278,7 @@ def GenTestCase(cname): out = r + tag self.assertEqual(out, ct, "Count " + data['Count'] + " Actual: " + \ - repr(out.encode("hex")) + " Expected: " + \ + repr(binascii.hexlify(out)) + " Expected: " + \ repr(data) + " on " + cname) def runCCMDecrypt(self, fname): @@ -333,7 +333,7 @@ def GenTestCase(cname): payload = payload[:plen] self.assertEqual(r, payload, "Count " + data['Count'] + \ - " Actual: " + repr(r.encode("hex")) + \ + " Actual: " + repr(binascii.hexlify(r)) + \ " Expected: " + repr(data) + \ " on " + cname) @@ -432,7 +432,7 @@ def GenTestCase(cname): _, r = c.encrypt(msg, iv="") self.assertEqual(r, md, "Actual: " + \ - repr(r.encode("hex")) + " Expected: " + repr(data) + " on " + cname) + repr(binascii.hexlify(r)) + " Expected: " + repr(data) + " on " + cname) @unittest.skipIf(cname not in shamodules, 'skipping SHA-HMAC on %s' % str(cname)) def test_sha1hmac(self): @@ -493,7 +493,7 @@ def GenTestCase(cname): _, r = c.encrypt(msg, iv="") self.assertEqual(r[:tlen], mac, "Actual: " + \ - repr(r.encode("hex")) + " Expected: " + repr(data)) + repr(binascii.hexlify(r)) + " Expected: " + repr(data)) return GendCryptoTestCase From owner-svn-src-user@freebsd.org Tue May 21 02:02:10 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32003159AC8C for ; Tue, 21 May 2019 02:02:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C65A16EC4B; Tue, 21 May 2019 02:02:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96CEE26F79; Tue, 21 May 2019 02:02:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L229Yp031804; Tue, 21 May 2019 02:02:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L2297K031803; Tue, 21 May 2019 02:02:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210202.x4L2297K031803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 02:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348030 - user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Commit-Revision: 348030 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C65A16EC4B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 21 May 2019 02:02:10 -0000 Author: ngie Date: Tue May 21 02:02:09 2019 New Revision: 348030 URL: https://svnweb.freebsd.org/changeset/base/348030 Log: Fix remaining encoding issues with python 3 * Cast all unicode strings to bytes arrays before passing them through to `fcntl.ioctl`, as the string width of unicode strings is different and not downcast to bytes when passed to `fcntl.ioctl`. * Use `array.array(..).tobytes()` instead of `array.array(..).tostring()` in python 3.2+, per the deprecation warning printed out by python 3.6 when the code is evaluated. Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Tue May 21 01:56:26 2019 (r348029) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Tue May 21 02:02:09 2019 (r348030) @@ -153,6 +153,11 @@ def _findop(crid, name): return fop.crid, name +def array_tobytes(array_obj): + if sys.version_info[:2] >= (3, 2): + return array_obj.tobytes() + return array_obj.tostring() + class Crypto: @staticmethod def findcrid(name): @@ -224,12 +229,13 @@ class Crypto: ivbuf = array.array('B', self._to_bytes(iv)) cop.iv = ivbuf.buffer_info()[0] - #print('cop:', cop) - ioctl(_cryptodev, CIOCCRYPT, str(cop)) + cop_b = bytes(cop) + #print('cop:', cop_b) + ioctl(_cryptodev, CIOCCRYPT, cop_b) - s = s.tostring() + s = array_tobytes(s) if self._maclen is not None: - return s, m.tostring() + return s, array_tobytes(m) return s @@ -265,11 +271,12 @@ class Crypto: caead.ivlen = len(iv) caead.iv = ivbuf.buffer_info()[0] - ioctl(_cryptodev, CIOCCRYPTAEAD, self._to_bytes(str(caead))) + caead_b = bytes(caead) + ioctl(_cryptodev, CIOCCRYPTAEAD, caead_b) - s = s.tostring() + s = array_tobytes(s) - return s, tag.tostring() + return s, array_tobytes(tag) def perftest(self, op, size, timeo=3): inp = array.array('B', (random.randint(0, 255) for x in range(size))) @@ -299,8 +306,9 @@ class Crypto: start = time.time() reps = 0 + cop_b = bytes(cop) while not exit[0]: - ioctl(_cryptodev, CIOCCRYPT, self._to_bytes(str(cop))) + ioctl(_cryptodev, CIOCCRYPT, cop_b) reps += 1 end = time.time() From owner-svn-src-user@freebsd.org Tue May 21 02:44:02 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F2E7159ECF4 for ; Tue, 21 May 2019 02:44:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41914702EB; Tue, 21 May 2019 02:44:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B9B12767A; Tue, 21 May 2019 02:44:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L2i13q053278; Tue, 21 May 2019 02:44:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L2i1hP053277; Tue, 21 May 2019 02:44:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210244.x4L2i1hP053277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 02:44:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348037 - user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Commit-Revision: 348037 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 41914702EB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 21 May 2019 02:44:02 -0000 Author: ngie Date: Tue May 21 02:44:01 2019 New Revision: 348037 URL: https://svnweb.freebsd.org/changeset/base/348037 Log: Rename Crypto._to_bytes to Crypto.str_to_ascii and push it into the module namespace Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Tue May 21 02:42:42 2019 (r348036) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Tue May 21 02:44:01 2019 (r348037) @@ -137,6 +137,12 @@ def _getdev(): _cryptodev = _getdev() +def str_to_ascii(val): + if sys.version_info[0] >= 3: + if isinstance(val, str): + return val.encode("ascii") + return val + def _findop(crid, name): fop = FindOp() fop.crid = crid @@ -208,13 +214,6 @@ class Crypto: pass self._ses = None - @staticmethod - def _to_bytes(val): - if sys.version_info[0] >= 3: - if isinstance(val, str): - return val.encode("ascii") - return val - def _doop(self, op, src, iv): cop = CryptOp() cop.ses = self._ses @@ -226,7 +225,7 @@ class Crypto: if self._maclen is not None: m = array.array('B', [0] * self._maclen) cop.mac = m.buffer_info()[0] - ivbuf = array.array('B', self._to_bytes(iv)) + ivbuf = array.array('B', str_to_ascii(iv)) cop.iv = ivbuf.buffer_info()[0] cop_b = bytes(cop) @@ -246,11 +245,11 @@ class Crypto: caead.flags = CRD_F_IV_EXPLICIT caead.flags = 0 caead.len = len(src) - src = self._to_bytes(src) + src = str_to_ascii(src) s = array.array("B", src) caead.src = caead.dst = s.buffer_info()[0] caead.aadlen = len(aad) - aad = self._to_bytes(aad) + aad = str_to_ascii(aad) saad = array.array('B', aad) caead.aad = saad.buffer_info()[0] @@ -262,7 +261,7 @@ class Crypto: else: assert len(tag) == self._maclen, \ '%d != %d' % (len(tag), self._maclen) - tag = self._to_bytes(tag) + tag = str_to_ascii(tag) tag = array.array('B', tag) caead.tag = tag.buffer_info()[0] @@ -280,7 +279,7 @@ class Crypto: def perftest(self, op, size, timeo=3): inp = array.array('B', (random.randint(0, 255) for x in range(size))) - out = array.array('B', self._to_bytes(inp)) + out = array.array('B', str_to_ascii(inp)) # prep ioctl cop = CryptOp() @@ -288,7 +287,7 @@ class Crypto: cop.op = op cop.flags = 0 cop.len = len(inp) - s = array.array('B', self._to_bytes(inp)) + s = array.array('B', str_to_ascii(inp)) cop.src = s.buffer_info()[0] cop.dst = out.buffer_info()[0] if self._maclen is not None: From owner-svn-src-user@freebsd.org Tue May 21 02:46:01 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 321ED159ED26 for ; Tue, 21 May 2019 02:46:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4D84703E8; Tue, 21 May 2019 02:46:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F09C2767C; Tue, 21 May 2019 02:46:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L2k0mc053441; Tue, 21 May 2019 02:46:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L2k0tQ053440; Tue, 21 May 2019 02:46:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210246.x4L2k0tQ053440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 02:46:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348038 - user/ngie/bug-237403 X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: user/ngie/bug-237403 X-SVN-Commit-Revision: 348038 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C4D84703E8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 21 May 2019 02:46:01 -0000 Author: ngie Date: Tue May 21 02:46:00 2019 New Revision: 348038 URL: https://svnweb.freebsd.org/changeset/base/348038 Log: MFhead@r348037 Modified: Directory Properties: user/ngie/bug-237403/ (props changed) From owner-svn-src-user@freebsd.org Tue May 21 03:06:11 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E3AB159F9B6 for ; Tue, 21 May 2019 03:06:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2DA1E714AA; Tue, 21 May 2019 03:06:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09F0227A43; Tue, 21 May 2019 03:06:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L36Apa065016; Tue, 21 May 2019 03:06:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L36AN6065015; Tue, 21 May 2019 03:06:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210306.x4L36AN6065015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 03:06:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348041 - user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Commit-Revision: 348041 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2DA1E714AA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 21 May 2019 03:06:11 -0000 Author: ngie Date: Tue May 21 03:06:10 2019 New Revision: 348041 URL: https://svnweb.freebsd.org/changeset/base/348041 Log: Leverage `str_to_ascii(..)` in `_findop(..)` when encoding `fop.name` Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Tue May 21 03:05:24 2019 (r348040) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Tue May 21 03:06:10 2019 (r348041) @@ -146,7 +146,7 @@ def str_to_ascii(val): def _findop(crid, name): fop = FindOp() fop.crid = crid - fop.name = name.encode("ascii") + fop.name = str_to_ascii(name) s = array.array('B', fop.pack_hdr()) ioctl(_cryptodev, CIOCFINDDEV, s, 1) fop.unpack(s) From owner-svn-src-user@freebsd.org Tue May 21 03:55:22 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 537CB15A1801 for ; Tue, 21 May 2019 03:55:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E839D7318B; Tue, 21 May 2019 03:55:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFE0D30E; Tue, 21 May 2019 03:55:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L3tLIX091199; Tue, 21 May 2019 03:55:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L3tL54091198; Tue, 21 May 2019 03:55:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210355.x4L3tL54091198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 03:55:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348043 - in user/ngie/bug-237403: stand/powerpc tests/sys/opencrypto X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in user/ngie/bug-237403: stand/powerpc tests/sys/opencrypto X-SVN-Commit-Revision: 348043 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E839D7318B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 21 May 2019 03:55:22 -0000 Author: ngie Date: Tue May 21 03:55:20 2019 New Revision: 348043 URL: https://svnweb.freebsd.org/changeset/base/348043 Log: MFhead@r348042 Modified: user/ngie/bug-237403/stand/powerpc/Makefile user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Directory Properties: user/ngie/bug-237403/ (props changed) Modified: user/ngie/bug-237403/stand/powerpc/Makefile ============================================================================== --- user/ngie/bug-237403/stand/powerpc/Makefile Tue May 21 03:52:48 2019 (r348042) +++ user/ngie/bug-237403/stand/powerpc/Makefile Tue May 21 03:55:20 2019 (r348043) @@ -6,7 +6,7 @@ NO_OBJ=t SUBDIR.yes= boot1.chrp ofw uboot -.if "${TARGET_ARCH}" == "powerpc64" +.if "${MACHINE_ARCH}" == "powerpc64" SUBDIR.${MK_FDT}+= kboot .endif Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Tue May 21 03:52:48 2019 (r348042) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Tue May 21 03:55:20 2019 (r348043) @@ -228,9 +228,8 @@ class Crypto: ivbuf = array.array('B', str_to_ascii(iv)) cop.iv = ivbuf.buffer_info()[0] - cop_b = bytes(cop) - #print('cop:', cop_b) - ioctl(_cryptodev, CIOCCRYPT, cop_b) + #print('cop:', cop) + ioctl(_cryptodev, CIOCCRYPT, bytes(cop)) s = array_tobytes(s) if self._maclen is not None: @@ -244,6 +243,7 @@ class Crypto: caead.op = op caead.flags = CRD_F_IV_EXPLICIT caead.flags = 0 + src = str_to_ascii(src) caead.len = len(src) src = str_to_ascii(src) s = array.array("B", src) @@ -256,6 +256,7 @@ class Crypto: if self._maclen is None: raise ValueError('must have a tag length') + tag = str_to_ascii(tag) if tag is None: tag = array.array('B', [0] * self._maclen) else: @@ -270,8 +271,7 @@ class Crypto: caead.ivlen = len(iv) caead.iv = ivbuf.buffer_info()[0] - caead_b = bytes(caead) - ioctl(_cryptodev, CIOCCRYPTAEAD, caead_b) + ioctl(_cryptodev, CIOCCRYPTAEAD, bytes(caead)) s = array_tobytes(s) @@ -279,7 +279,8 @@ class Crypto: def perftest(self, op, size, timeo=3): inp = array.array('B', (random.randint(0, 255) for x in range(size))) - out = array.array('B', str_to_ascii(inp)) + inp = str_to_ascii(inp) + out = array.array('B', inp) # prep ioctl cop = CryptOp() @@ -305,9 +306,9 @@ class Crypto: start = time.time() reps = 0 - cop_b = bytes(cop) + cop = bytes(cop) while not exit[0]: - ioctl(_cryptodev, CIOCCRYPT, cop_b) + ioctl(_cryptodev, CIOCCRYPT, cop) reps += 1 end = time.time() From owner-svn-src-user@freebsd.org Tue May 21 04:01:17 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB36315A193B for ; Tue, 21 May 2019 04:01:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D679734EE; Tue, 21 May 2019 04:01:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 12C13475; Tue, 21 May 2019 04:01:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L41Gw3092291; Tue, 21 May 2019 04:01:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L41GgG092290; Tue, 21 May 2019 04:01:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210401.x4L41GgG092290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 04:01:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348044 - user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: user/ngie/bug-237403/tests/sys/opencrypto X-SVN-Commit-Revision: 348044 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7D679734EE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 21 May 2019 04:01:18 -0000 Author: ngie Date: Tue May 21 04:01:16 2019 New Revision: 348044 URL: https://svnweb.freebsd.org/changeset/base/348044 Log: Diff reduce with ^/head Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py ============================================================================== --- user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Tue May 21 03:55:20 2019 (r348043) +++ user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py Tue May 21 04:01:16 2019 (r348044) @@ -245,11 +245,10 @@ class Crypto: caead.flags = 0 src = str_to_ascii(src) caead.len = len(src) - src = str_to_ascii(src) - s = array.array("B", src) + s = array.array('B', src) caead.src = caead.dst = s.buffer_info()[0] - caead.aadlen = len(aad) aad = str_to_ascii(aad) + caead.aadlen = len(aad) saad = array.array('B', aad) caead.aad = saad.buffer_info()[0] @@ -262,7 +261,6 @@ class Crypto: else: assert len(tag) == self._maclen, \ '%d != %d' % (len(tag), self._maclen) - tag = str_to_ascii(tag) tag = array.array('B', tag) caead.tag = tag.buffer_info()[0] @@ -288,7 +286,7 @@ class Crypto: cop.op = op cop.flags = 0 cop.len = len(inp) - s = array.array('B', str_to_ascii(inp)) + s = array.array('B', inp) cop.src = s.buffer_info()[0] cop.dst = out.buffer_info()[0] if self._maclen is not None: From owner-svn-src-user@freebsd.org Tue May 21 04:05:04 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96AED15A1C78 for ; Tue, 21 May 2019 04:05:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A62073875; Tue, 21 May 2019 04:05:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E245A4D7; Tue, 21 May 2019 04:05:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L453qt096796; Tue, 21 May 2019 04:05:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4L4533C096795; Tue, 21 May 2019 04:05:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201905210405.x4L4533C096795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Tue, 21 May 2019 04:05:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348046 - user/ngie/bug-237403 X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: user/ngie/bug-237403 X-SVN-Commit-Revision: 348046 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3A62073875 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 21 May 2019 04:05:04 -0000 Author: ngie Date: Tue May 21 04:05:03 2019 New Revision: 348046 URL: https://svnweb.freebsd.org/changeset/base/348046 Log: MFhead@r348045 Modified: Directory Properties: user/ngie/bug-237403/ (props changed) From owner-svn-src-user@freebsd.org Wed May 22 06:02:53 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E584F15A1C9D for ; Wed, 22 May 2019 06:02:52 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A6746D411; Wed, 22 May 2019 06:02:52 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63C3D19484; Wed, 22 May 2019 06:02:52 +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 x4M62qrm015662; Wed, 22 May 2019 06:02:52 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4M62qi7015661; Wed, 22 May 2019 06:02:52 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201905220602.x4M62qi7015661@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Wed, 22 May 2019 06:02:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348097 - user/pho/stress2/misc X-SVN-Group: user X-SVN-Commit-Author: pho X-SVN-Commit-Paths: user/pho/stress2/misc X-SVN-Commit-Revision: 348097 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8A6746D411 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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: Wed, 22 May 2019 06:02:53 -0000 Author: pho Date: Wed May 22 06:02:51 2019 New Revision: 348097 URL: https://svnweb.freebsd.org/changeset/base/348097 Log: Added a regression test. Sponsored by: Dell EMC Isilon Added: user/pho/stress2/misc/beneath3.sh (contents, props changed) Added: user/pho/stress2/misc/beneath3.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/beneath3.sh Wed May 22 06:02:51 2019 (r348097) @@ -0,0 +1,94 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2019 Dell EMC Isilon +# +# 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$ +# + +# vput: 0xfffff808d79c0278 is not locked but should be +# KDB: enter: lock violation +# Test scenario suggestions by kib@ and markj@ + +# Fixed by r348052. + +. ../default.cfg +[ `id -u` -ne 0 ] && echo "Must be root!" && exit 1 + +dir=/tmp +odir=`pwd` +cd $dir +sed '1,/^EOF/d' < $odir/$0 > $dir/beneath3.c +mycc -o beneath3 -Wall -Wextra -O0 -g beneath3.c || exit 1 +rm -f beneath3.c +cd $odir + +set -e +mount | grep "on $mntpoint " | grep -q /dev/md && umount -f $mntpoint +[ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart +mdconfig -a -t swap -s 1g -u $mdstart +bsdlabel -w md$mdstart auto +newfs $newfs_flags md${mdstart}$part > /dev/null +mount /dev/md${mdstart}$part $mntpoint +set +e + +cd $mntpoint +(cd /usr; $dir/beneath3) +s=$? +[ -f beneath3.core -a $s -eq 0 ] && + { ls -l beneath3.core; mv beneath3.core $dir; s=1; } +cd $odir + +for i in `jot 6`; do + mount | grep -q "on $mntpoint " || break + umount $mntpoint && break || sleep 10 + [ $i -eq 6 ] && + { echo FATAL; fstat -mf $mntpoint; exit 1; } +done +mdconfig -d -u $mdstart +rm -rf $dir/beneath3 +exit $s + +EOF +#include + +#include +#include +#include + +int +main(void) +{ + int fd; + char file[] = "/.."; + + errno = 0; + fd = open(file, O_CREAT | O_RDONLY | O_BENEATH); + if (fd != -1 || errno != ENOTCAPABLE) + err(1, "open(%s) returns %d", file, fd); + + return (0); +} From owner-svn-src-user@freebsd.org Sat May 25 03:18:42 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 354531596425 for ; Sat, 25 May 2019 03:18:42 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CCA378B2AE; Sat, 25 May 2019 03:18:41 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A592B26450; Sat, 25 May 2019 03:18:41 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4P3Ifmi019788; Sat, 25 May 2019 03:18:41 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4P3IfEg019787; Sat, 25 May 2019 03:18:41 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201905250318.x4P3IfEg019787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Sat, 25 May 2019 03:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348263 - user/cperciva/freebsd-update-build/scripts X-SVN-Group: user X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: user/cperciva/freebsd-update-build/scripts X-SVN-Commit-Revision: 348263 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CCA378B2AE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 25 May 2019 03:18:42 -0000 Author: gordon Date: Sat May 25 03:18:41 2019 New Revision: 348263 URL: https://svnweb.freebsd.org/changeset/base/348263 Log: Fix for newer versions of openssl. 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 Sat May 25 01:59:24 2019 (r348262) +++ user/cperciva/freebsd-update-build/scripts/build.subr Sat May 25 03:18:41 2019 (r348263) @@ -196,7 +196,7 @@ encryptkey () { KEYOWNER=${SUDO_USER:-${USER}} echo "Encrypting signing key for ${KEYOWNER}" - openssl enc -aes-256-cbc \ + openssl enc -aes-256-cbc -md md5 \ -in ${PRIVKEYDIR}/priv.ssl \ -out ${KEYDIR}/priv.ssl-${KEYOWNER} } @@ -206,7 +206,7 @@ decryptkey () { KEYOWNER=${SUDO_USER:-${USER}} echo "Decrypting signing key for ${KEYOWNER}" - openssl enc -d -aes-256-cbc \ + openssl enc -d -aes-256-cbc -md md5 \ -in ${KEYDIR}/priv.ssl-${KEYOWNER} \ -out ${PRIVKEYDIR}/priv.ssl } From owner-svn-src-user@freebsd.org Sat May 25 04:15:49 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 637451597666 for ; Sat, 25 May 2019 04:15:49 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 091098CBCF; Sat, 25 May 2019 04:15:49 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9FD726E9B; Sat, 25 May 2019 04:15:48 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4P4Fmhq051666; Sat, 25 May 2019 04:15:48 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4P4FmYX051665; Sat, 25 May 2019 04:15:48 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201905250415.x4P4FmYX051665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Sat, 25 May 2019 04:15:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348264 - user/cperciva/freebsd-update-build/scripts X-SVN-Group: user X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: user/cperciva/freebsd-update-build/scripts X-SVN-Commit-Revision: 348264 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 091098CBCF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 25 May 2019 04:15:49 -0000 Author: gordon Date: Sat May 25 04:15:48 2019 New Revision: 348264 URL: https://svnweb.freebsd.org/changeset/base/348264 Log: Only fetch the iso (and hence overwrite) if the file isn't already there. This allows us to drop the iso in the right place and avoid redownload. 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 Sat May 25 03:18:41 2019 (r348263) +++ user/cperciva/freebsd-update-build/scripts/build.subr Sat May 25 04:15:48 2019 (r348264) @@ -311,7 +311,9 @@ fetchiso () { # 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 + if ! [ -f "${WORKDIR}/iso.img" ]; then + fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1 + fi log "Verifying dvd1 hash" From owner-svn-src-user@freebsd.org Sat May 25 04:23:15 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7F1B1597936 for ; Sat, 25 May 2019 04:23:14 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82E7E8D167; Sat, 25 May 2019 04:23:14 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F62527080; Sat, 25 May 2019 04:23:14 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4P4NEpl056585; Sat, 25 May 2019 04:23:14 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4P4NEfo056584; Sat, 25 May 2019 04:23:14 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201905250423.x4P4NEfo056584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Sat, 25 May 2019 04:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348265 - in user/cperciva/freebsd-update-build/scripts/11.0-RELEASE: amd64 i386 X-SVN-Group: user X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in user/cperciva/freebsd-update-build/scripts/11.0-RELEASE: amd64 i386 X-SVN-Commit-Revision: 348265 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 82E7E8D167 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 25 May 2019 04:23:15 -0000 Author: gordon Date: Sat May 25 04:23:13 2019 New Revision: 348265 URL: https://svnweb.freebsd.org/changeset/base/348265 Log: Cleanup: Update EOL for 11.0-RELEASE to reflect reality. Modified: user/cperciva/freebsd-update-build/scripts/11.0-RELEASE/amd64/build.conf user/cperciva/freebsd-update-build/scripts/11.0-RELEASE/i386/build.conf Modified: user/cperciva/freebsd-update-build/scripts/11.0-RELEASE/amd64/build.conf ============================================================================== --- user/cperciva/freebsd-update-build/scripts/11.0-RELEASE/amd64/build.conf Sat May 25 04:15:48 2019 (r348264) +++ user/cperciva/freebsd-update-build/scripts/11.0-RELEASE/amd64/build.conf Sat May 25 04:23:13 2019 (r348265) @@ -7,4 +7,4 @@ export SOURCEPARTS="src" export KERNELPARTS="kernel kernel-dbg" # EOL date -export EOL=1509494399 +export EOL=1512086399 Modified: user/cperciva/freebsd-update-build/scripts/11.0-RELEASE/i386/build.conf ============================================================================== --- user/cperciva/freebsd-update-build/scripts/11.0-RELEASE/i386/build.conf Sat May 25 04:15:48 2019 (r348264) +++ user/cperciva/freebsd-update-build/scripts/11.0-RELEASE/i386/build.conf Sat May 25 04:23:13 2019 (r348265) @@ -7,4 +7,4 @@ export SOURCEPARTS="src" export KERNELPARTS="kernel kernel-dbg" # EOL date -export EOL=1509494399 +export EOL=1512086399 From owner-svn-src-user@freebsd.org Sat May 25 04:31:06 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F088F1597B57 for ; Sat, 25 May 2019 04:31:05 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9069D8D4D3; Sat, 25 May 2019 04:31:05 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C8F3270B0; Sat, 25 May 2019 04:31:05 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4P4V5Bi056984; Sat, 25 May 2019 04:31:05 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4P4V5Dt056983; Sat, 25 May 2019 04:31:05 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201905250431.x4P4V5Dt056983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Sat, 25 May 2019 04:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348266 - user/cperciva/freebsd-update-build/scripts X-SVN-Group: user X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: user/cperciva/freebsd-update-build/scripts X-SVN-Commit-Revision: 348266 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9069D8D4D3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 25 May 2019 04:31:06 -0000 Author: gordon Date: Sat May 25 04:31:04 2019 New Revision: 348266 URL: https://svnweb.freebsd.org/changeset/base/348266 Log: Add limit for XZ_THREADS to the buildworld invocation. This is needed for high core count machines on i386. The auto detect was exhausting the address space in i386. 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 Sat May 25 04:23:13 2019 (r348265) +++ user/cperciva/freebsd-update-build/scripts/build.subr Sat May 25 04:31:04 2019 (r348266) @@ -470,6 +470,7 @@ buildworld () { /usr/bin/env -i PATH=${PATH} RELP=${RELP} \ JFLAG=${JFLAG} \ BRANCH_OVERRIDE=$2 \ + XZ_THREADS=16 \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log # Function for logging what we're doing From owner-svn-src-user@freebsd.org Sat May 25 15:56:56 2019 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FE7F15AF936 for ; Sat, 25 May 2019 15:56:56 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B5DE274EDF; Sat, 25 May 2019 15:56:55 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8FE0567C8; Sat, 25 May 2019 15:56:55 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4PFutCJ024347; Sat, 25 May 2019 15:56:55 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4PFut5F024346; Sat, 25 May 2019 15:56:55 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201905251556.x4PFut5F024346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Sat, 25 May 2019 15:56:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r348272 - user/cperciva/freebsd-update-build/scripts X-SVN-Group: user X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: user/cperciva/freebsd-update-build/scripts X-SVN-Commit-Revision: 348272 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B5DE274EDF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 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, 25 May 2019 15:56:56 -0000 Author: gordon Date: Sat May 25 15:56:55 2019 New Revision: 348272 URL: https://svnweb.freebsd.org/changeset/base/348272 Log: Switch logic in indexfiles to always remove the uarch flag. On UFS filesystems, this is unneeded. On ZFS filesystems, the uarch flag is automatically set on file creation (and maybe update?). This is causing a lot of churn in the freebsd-update cycle where discrepancies in the uarch flag makes the system think a lot of metadata need to be corrected. 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 Sat May 25 11:27:56 2019 (r348271) +++ user/cperciva/freebsd-update-build/scripts/build.subr Sat May 25 15:56:55 2019 (r348272) @@ -580,17 +580,25 @@ indexfiles () { ( cd ${WORKDIR}/$1/R && find trees -mindepth 2 | grep -vE '/obj$' | while read F; do + eval $(stat -s ${F}) + # Remove the uarch flag as that is problematic + st_flags=$(($st_flags & ~04000)) + st_mode_mid=$(( ($st_mode & 07000) >> 9)) + st_mode_low=$(($st_mode & 0777)) if [ -L ${F} ]; then echo -n "${F}|L|" - stat -n -f '%i|%u|%g|%Mp%Lp|%Of|' ${F}; + printf "%u|%u|%u|%o%o|%o|" $st_ino $st_uid \ + $st_gid $st_mode_mid $st_mode_low $st_flags readlink ${F}; elif [ -f ${F} ]; then echo -n "${F}|f|" - stat -n -f '%i|%u|%g|%Mp%Lp|%Of|' ${F}; + printf "%u|%u|%u|%o%o|%o|" $st_ino $st_uid \ + $st_gid $st_mode_mid $st_mode_low $st_flags sha256 -q ${F}; elif [ -d ${F} ]; then echo -n "${F}|d|" - stat -f '%i|%u|%g|%Mp%Lp|%Of|' ${F}; + printf "%u|%u|%u|%o%o|%o|\n" $st_ino $st_uid \ + $st_gid $st_mode_mid $st_mode_low $st_flags else echo "Unknown file type: ${F}" \ >/dev/stderr