From owner-svn-src-user@freebsd.org Mon Apr 29 20:21:50 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 20BAA159CAA9 for ; Mon, 29 Apr 2019 20:21:50 +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 E6AE471C11; Mon, 29 Apr 2019 20:21:46 +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 7CF25270EE; Mon, 29 Apr 2019 20:21:42 +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 x3TKLgSV000940; Mon, 29 Apr 2019 20:21:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3TKLd89000924; Mon, 29 Apr 2019 20:21:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201904292021.x3TKLd89000924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 29 Apr 2019 20:21:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r346926 - in user/ngie/bug-237403: . bin/date cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip etc/mtree lib/libbe lib/libc/gen lib/libvgl libexec/rc sbin/ifconfig sbin/ipfw share... X-SVN-Group: user X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in user/ngie/bug-237403: . bin/date cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip etc/mtree lib/libbe lib/libc/gen lib/libvgl libexec/rc sbin/ifconfig sbin/ipfw share/man/man4 stand stand/com... X-SVN-Commit-Revision: 346926 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E6AE471C11 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.979,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, 29 Apr 2019 20:21:50 -0000 Author: ngie Date: Mon Apr 29 20:21:38 2019 New Revision: 346926 URL: https://svnweb.freebsd.org/changeset/base/346926 Log: MFhead@r346925 Added: user/ngie/bug-237403/lib/libc/gen/auxv.3 - copied unchanged from r346925, head/lib/libc/gen/auxv.3 user/ngie/bug-237403/share/man/man4/dtrace_audit.4 - copied unchanged from r346925, head/share/man/man4/dtrace_audit.4 user/ngie/bug-237403/stand/common/vdisk.c - copied unchanged from r346925, head/stand/common/vdisk.c user/ngie/bug-237403/sys/modules/allwinner/aw_pwm/ - copied from r346925, head/sys/modules/allwinner/aw_pwm/ user/ngie/bug-237403/sys/modules/allwinner/aw_rsb/ - copied from r346925, head/sys/modules/allwinner/aw_rsb/ user/ngie/bug-237403/sys/modules/allwinner/aw_rtc/ - copied from r346925, head/sys/modules/allwinner/aw_rtc/ user/ngie/bug-237403/sys/modules/allwinner/aw_sid/ - copied from r346925, head/sys/modules/allwinner/aw_sid/ user/ngie/bug-237403/sys/modules/allwinner/aw_thermal/ - copied from r346925, head/sys/modules/allwinner/aw_thermal/ user/ngie/bug-237403/sys/modules/allwinner/axp81x/ - copied from r346925, head/sys/modules/allwinner/axp81x/ user/ngie/bug-237403/sys/modules/allwinner/if_awg/ - copied from r346925, head/sys/modules/allwinner/if_awg/ user/ngie/bug-237403/usr.sbin/kldxref/ef_mips.c - copied unchanged from r346925, head/usr.sbin/kldxref/ef_mips.c user/ngie/bug-237403/usr.sbin/pkg/FreeBSD.conf.latest - copied unchanged from r346925, head/usr.sbin/pkg/FreeBSD.conf.latest user/ngie/bug-237403/usr.sbin/pkg/FreeBSD.conf.quarterly - copied unchanged from r346925, head/usr.sbin/pkg/FreeBSD.conf.quarterly Deleted: user/ngie/bug-237403/usr.sbin/pkg/FreeBSD.conf Modified: user/ngie/bug-237403/MAINTAINERS (contents, props changed) user/ngie/bug-237403/bin/date/date.1 user/ngie/bug-237403/bin/date/date.c user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localsctp.ksh user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh.out user/ngie/bug-237403/etc/mtree/BSD.sendmail.dist user/ngie/bug-237403/etc/mtree/BSD.usr.dist user/ngie/bug-237403/etc/mtree/BSD.var.dist user/ngie/bug-237403/lib/libbe/Makefile user/ngie/bug-237403/lib/libbe/be.c user/ngie/bug-237403/lib/libc/gen/Makefile.inc user/ngie/bug-237403/lib/libvgl/bitmap.c user/ngie/bug-237403/lib/libvgl/main.c user/ngie/bug-237403/lib/libvgl/mouse.c user/ngie/bug-237403/lib/libvgl/simple.c user/ngie/bug-237403/lib/libvgl/vgl.h user/ngie/bug-237403/libexec/rc/rc.initdiskless user/ngie/bug-237403/sbin/ifconfig/ifgre.c user/ngie/bug-237403/sbin/ipfw/ipfw2.c user/ngie/bug-237403/share/man/man4/Makefile user/ngie/bug-237403/share/man/man4/audit.4 user/ngie/bug-237403/share/man/man4/auditpipe.4 user/ngie/bug-237403/share/man/man4/gre.4 user/ngie/bug-237403/share/man/man4/iflib.4 user/ngie/bug-237403/stand/common/disk.c user/ngie/bug-237403/stand/common/help.common user/ngie/bug-237403/stand/efi/include/efilib.h user/ngie/bug-237403/stand/efi/libefi/efienv.c user/ngie/bug-237403/stand/efi/loader/autoload.c user/ngie/bug-237403/stand/efi/loader/conf.c user/ngie/bug-237403/stand/efi/loader/main.c user/ngie/bug-237403/stand/fdt/fdt_loader_cmd.c user/ngie/bug-237403/stand/fdt/fdt_platform.h user/ngie/bug-237403/stand/i386/loader/conf.c user/ngie/bug-237403/stand/loader.mk user/ngie/bug-237403/sys/amd64/include/vmm.h user/ngie/bug-237403/sys/amd64/vmm/amd/svm.c user/ngie/bug-237403/sys/amd64/vmm/intel/vmx.c user/ngie/bug-237403/sys/amd64/vmm/io/vlapic.c user/ngie/bug-237403/sys/amd64/vmm/vmm.c user/ngie/bug-237403/sys/amd64/vmm/vmm_dev.c user/ngie/bug-237403/sys/amd64/vmm/vmm_lapic.c user/ngie/bug-237403/sys/amd64/vmm/vmm_stat.c user/ngie/bug-237403/sys/arm/allwinner/a10/a10_padconf.c user/ngie/bug-237403/sys/arm/allwinner/aw_rsb.c user/ngie/bug-237403/sys/arm/allwinner/aw_rtc.c user/ngie/bug-237403/sys/arm/allwinner/aw_sid.c user/ngie/bug-237403/sys/arm/allwinner/aw_syscon.c user/ngie/bug-237403/sys/arm/allwinner/aw_thermal.c user/ngie/bug-237403/sys/arm/allwinner/axp81x.c user/ngie/bug-237403/sys/arm/allwinner/clkng/ccu_de2.c user/ngie/bug-237403/sys/arm/allwinner/if_awg.c user/ngie/bug-237403/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c user/ngie/bug-237403/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h user/ngie/bug-237403/sys/compat/freebsd32/freebsd32_systrace_args.c user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/device.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/dma-mapping.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/dmapool.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/pci.h user/ngie/bug-237403/sys/compat/linuxkpi/common/include/linux/scatterlist.h user/ngie/bug-237403/sys/compat/linuxkpi/common/src/linux_compat.c user/ngie/bug-237403/sys/compat/linuxkpi/common/src/linux_pci.c user/ngie/bug-237403/sys/conf/files.powerpc user/ngie/bug-237403/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c user/ngie/bug-237403/sys/dev/acpi_support/acpi_ibm.c user/ngie/bug-237403/sys/dev/altera/atse/if_atse.c user/ngie/bug-237403/sys/dev/altera/softdma/softdma.c user/ngie/bug-237403/sys/dev/cadence/if_cgem.c user/ngie/bug-237403/sys/dev/cxgbe/crypto/t4_crypto.c user/ngie/bug-237403/sys/dev/cxgbe/crypto/t4_crypto.h user/ngie/bug-237403/sys/dev/cxgbe/t4_sge.c user/ngie/bug-237403/sys/dev/gpio/gpioc.c user/ngie/bug-237403/sys/dev/isp/isp_pci.c user/ngie/bug-237403/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c user/ngie/bug-237403/sys/dev/uart/uart_cpu_arm64.c user/ngie/bug-237403/sys/dev/xdma/xdma.h user/ngie/bug-237403/sys/dev/xdma/xdma_mbuf.c user/ngie/bug-237403/sys/dev/xdma/xdma_sg.c user/ngie/bug-237403/sys/geom/geom_dev.c user/ngie/bug-237403/sys/kern/kern_sig.c user/ngie/bug-237403/sys/kern/kern_thread.c user/ngie/bug-237403/sys/kern/systrace_args.c user/ngie/bug-237403/sys/kern/uipc_mbuf.c user/ngie/bug-237403/sys/kern/vfs_bio.c user/ngie/bug-237403/sys/modules/allwinner/Makefile user/ngie/bug-237403/sys/modules/fusefs/Makefile user/ngie/bug-237403/sys/modules/if_gre/Makefile user/ngie/bug-237403/sys/net/if_gre.c user/ngie/bug-237403/sys/net/if_gre.h user/ngie/bug-237403/sys/net/if_tap.c user/ngie/bug-237403/sys/net/if_tun.c user/ngie/bug-237403/sys/net/iflib.c user/ngie/bug-237403/sys/netinet/in_mcast.c user/ngie/bug-237403/sys/netinet/in_pcb.c user/ngie/bug-237403/sys/netinet/in_pcb.h user/ngie/bug-237403/sys/netinet/ip_gre.c user/ngie/bug-237403/sys/netinet/ip_output.c user/ngie/bug-237403/sys/netinet/tcp_syncache.c user/ngie/bug-237403/sys/netinet6/ip6_gre.c user/ngie/bug-237403/sys/netinet6/ip6_output.c user/ngie/bug-237403/sys/netpfil/ipfw/ip_fw2.c user/ngie/bug-237403/sys/opencrypto/cbc_mac.c user/ngie/bug-237403/sys/powerpc/aim/aim_machdep.c user/ngie/bug-237403/sys/powerpc/aim/mp_cpudep.c user/ngie/bug-237403/sys/powerpc/conf/GENERIC64 user/ngie/bug-237403/sys/powerpc/include/cpu.h user/ngie/bug-237403/sys/powerpc/include/pcb.h user/ngie/bug-237403/sys/powerpc/include/spr.h user/ngie/bug-237403/sys/powerpc/powernv/opal_dev.c user/ngie/bug-237403/sys/powerpc/powerpc/cpu.c user/ngie/bug-237403/sys/powerpc/powerpc/exec_machdep.c user/ngie/bug-237403/sys/powerpc/powerpc/genassym.c user/ngie/bug-237403/sys/powerpc/powerpc/swtch32.S user/ngie/bug-237403/sys/powerpc/powerpc/swtch64.S user/ngie/bug-237403/sys/powerpc/powerpc/trap.c user/ngie/bug-237403/sys/riscv/riscv/plic.c user/ngie/bug-237403/sys/sys/param.h user/ngie/bug-237403/sys/sys/proc.h user/ngie/bug-237403/sys/x86/x86/busdma_bounce.c user/ngie/bug-237403/sys/x86/x86/mp_x86.c user/ngie/bug-237403/tests/sys/opencrypto/cryptodev.py user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py user/ngie/bug-237403/tools/boot/ci-qemu-test.sh user/ngie/bug-237403/tools/boot/install-boot.sh user/ngie/bug-237403/tools/boot/rootgen.sh user/ngie/bug-237403/tools/regression/fsx/fsx.c user/ngie/bug-237403/usr.sbin/bhyve/acpi.c user/ngie/bug-237403/usr.sbin/bhyve/bhyverun.h user/ngie/bug-237403/usr.sbin/bhyve/smbiostbl.c user/ngie/bug-237403/usr.sbin/bsdinstall/scripts/netconfig_ipv4 user/ngie/bug-237403/usr.sbin/nfsdumpstate/nfsdumpstate.c user/ngie/bug-237403/usr.sbin/pkg/Makefile 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/sys/cddl/contrib/opensolaris/ (props changed) user/ngie/bug-237403/sys/contrib/ipfilter/ (props changed) Modified: user/ngie/bug-237403/MAINTAINERS ============================================================================== --- user/ngie/bug-237403/MAINTAINERS Mon Apr 29 20:19:21 2019 (r346925) +++ user/ngie/bug-237403/MAINTAINERS Mon Apr 29 20:21:38 2019 (r346926) @@ -35,17 +35,19 @@ makes a commit to the specified subtree. subsystem login notes ----------------------------- -atf freebsd-testing,jmmv,ngie Pre-commit review requested. ath(4) adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org +contrib/atf ngie,#test Pre-commit review requested. +contrib/capsicum-test ngie,#capsicum,#test Pre-commit review requested. contrib/compiler-rt dim Pre-commit review preferred. +contrib/googletest ngie,#test Pre-commit review requested. contrib/ipfilter cy Pre-commit review requested. contrib/libc++ dim Pre-commit review preferred. contrib/libcxxrt dim Pre-commit review preferred. contrib/libunwind dim,emaste,jhb Pre-commit review preferred. contrib/llvm dim Pre-commit review preferred. contrib/llvm/tools/lldb dim,emaste Pre-commit review preferred. -contrib/netbsd-tests freebsd-testing,ngie Pre-commit review requested. -contrib/pjdfstest freebsd-testing,asomers,ngie,pjd Pre-commit review requested. +contrib/netbsd-tests ngie,#test Pre-commit review requested. +contrib/pjdfstest asomers,ngie,pjd,#test Pre-commit review requested. *env(3) secteam Due to the problematic security history of this code, please have patches reviewed by secteam. etc/mail gshapiro Pre-commit review requested. Keep in sync with -STABLE. @@ -86,10 +88,15 @@ sh(1) jilles Pre-commit review requested. This also to kill(1), printf(1) and test(1) which are compiled in as builtins. share/mk imp, bapt, bdrewery, emaste, sjg Make is hard. -share/mk/*.test.mk freebsd-testing,ngie (same list as share/mk too) Pre-commit review requested. +share/mk/*.test.mk imp,bapt,bdrewery, Pre-commit review requested. + emaste,ngie,sjg,#test stand/forth dteske Pre-commit review requested. stand/lua kevans Pre-commit review requested -sys/compat/linuxkpi hselasky If in doubt, ask. +sys/compat/linuxkpi hselasky If in doubt, ask. + zeising, johalun pre-commit review requested via + #x11 phabricator group. + (to avoid drm graphics drivers + impact) sys/contrib/ipfilter cy Pre-commit review requested. sys/dev/e1000 erj Pre-commit phabricator review requested. sys/dev/ixgbe erj Pre-commit phabricator review requested. @@ -101,7 +108,7 @@ sys/netinet/ip_carp.c glebius Pre-commit review recomm sys/netpfil/pf kp,glebius Pre-commit review recommended. sys/x86/xen royger Pre-commit review recommended. sys/xen royger Pre-commit review recommended. -tests freebsd-testing,ngie Pre-commit review requested. +tests ngie,#test Pre-commit review requested. tools/build imp Pre-commit review requested, especially to fix bootstrap issues. top(1) eadler Pre-commit review requested. usr.sbin/bsdconfig dteske Pre-commit phabricator review requested. Modified: user/ngie/bug-237403/bin/date/date.1 ============================================================================== --- user/ngie/bug-237403/bin/date/date.1 Mon Apr 29 20:19:21 2019 (r346925) +++ user/ngie/bug-237403/bin/date/date.1 Mon Apr 29 20:21:38 2019 (r346926) @@ -32,7 +32,7 @@ .\" @(#)date.1 8.3 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd March 20, 2019 +.Dd April 23, 2019 .Dt DATE 1 .Os .Sh NAME @@ -40,7 +40,7 @@ .Nd display or set date and time .Sh SYNOPSIS .Nm -.Op Fl jRu +.Op Fl jnRu .Op Fl r Ar seconds | Ar filename .Oo .Fl v @@ -142,6 +142,8 @@ This allows you to use the flag in addition to the .Cm + option to convert one date format to another. +.It Fl n +Obsolete flag, accepted and ignored for compatibility. .It Fl R Use RFC 2822 date and time output format. This is equivalent to using Modified: user/ngie/bug-237403/bin/date/date.c ============================================================================== --- user/ngie/bug-237403/bin/date/date.c Mon Apr 29 20:19:21 2019 (r346925) +++ user/ngie/bug-237403/bin/date/date.c Mon Apr 29 20:21:38 2019 (r346926) @@ -108,7 +108,7 @@ main(int argc, char *argv[]) (void) setlocale(LC_TIME, ""); rflag = 0; Iflag = jflag = Rflag = 0; - while ((ch = getopt(argc, argv, "f:I::jRr:uv:")) != -1) + while ((ch = getopt(argc, argv, "f:I::jnRr:uv:")) != -1) switch((char)ch) { case 'f': fmt = optarg; @@ -131,6 +131,8 @@ main(int argc, char *argv[]) break; case 'j': jflag = 1; /* don't set time */ + break; + case 'n': break; case 'R': /* RFC 2822 datetime format */ if (Iflag) Modified: user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localsctp.ksh ============================================================================== --- user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localsctp.ksh Mon Apr 29 20:19:21 2019 (r346925) +++ user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localsctp.ksh Mon Apr 29 20:21:38 2019 (r346926) @@ -58,36 +58,52 @@ DIR=/var/tmp/dtest.$$ sctpport=1024 bound=5000 -while [ $sctpport -lt $bound ]; do - ncat --sctp -z $local $sctpport > /dev/null || break - sctpport=$(($sctpport + 1)) -done -if [ $sctpport -eq $bound ]; then - echo "couldn't find an available SCTP port" - exit 1 -fi mkdir $DIR cd $DIR -# ncat will exit when the association is closed. -ncat --sctp --listen $local $sctpport & - -cat > test.pl <<-EOPERL +cat > client.pl <<-EOPERL use IO::Socket; my \$s = IO::Socket::INET->new( Type => SOCK_STREAM, Proto => "sctp", LocalAddr => "$local", PeerAddr => "$local", - PeerPort => $sctpport, + PeerPort => \$ARGV[0], Timeout => 3); - die "Could not connect to host $local port $sctpport \$@" unless \$s; + die "Could not connect to host $local port \$ARGV[0] \$@" unless \$s; close \$s; - sleep(2); + sleep(\$ARGV[1]); EOPERL -$dtrace -c 'perl test.pl' -qs /dev/stdin <&- || break + sctpport=$(($sctpport + 1)) +done +if [ $sctpport -eq $bound ]; then + echo "couldn't find an available SCTP port" + exit 1 +fi + +cat > server.pl <<-EOPERL + use IO::Socket; + my \$l = IO::Socket::INET->new( + Type => SOCK_STREAM, + Proto => "sctp", + LocalAddr => "$local", + LocalPort => $sctpport, + Listen => 1, + Reuse => 1); + die "Could not listen on $local port $sctpport \$@" unless \$l; + my \$c = \$l->accept(); + close \$l; + while (<\$c>) {}; + close \$c; +EOPERL + +perl server.pl & + +$dtrace -c "perl client.pl $sctpport 2" -qs /dev/stdin <= 7 ? "yes" : "no"); - printf("ip:::receive (%d) - %s\n", ipreceive, ipreceive >= 7 ? "yes" : "no"); - printf("sctp:::send (%d) - %s\n", sctpsend, sctpsend >= 7 ? "yes" : "no"); - printf("sctp:::receive (%d) - %s\n", sctpreceive, sctpreceive >= 7 ? "yes" : "no"); + printf("ip:::send - %s\n", ipsend >= 7 ? "yes" : "no"); + printf("ip:::receive - %s\n", ipreceive >= 7 ? "yes" : "no"); + printf("sctp:::send - %s\n", sctpsend >= 7 ? "yes" : "no"); + printf("sctp:::receive - %s\n", sctpreceive >= 7 ? "yes" : "no"); } EODTRACE Modified: user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh ============================================================================== --- user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh Mon Apr 29 20:19:21 2019 (r346925) +++ user/ngie/bug-237403/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localsctpstate.ksh Mon Apr 29 20:21:38 2019 (r346926) @@ -61,36 +61,52 @@ DIR=/var/tmp/dtest.$$ sctpport=1024 bound=5000 -while [ $sctpport -lt $bound ]; do - ncat --sctp -z $local $sctpport > /dev/null || break - sctpport=$(($sctpport + 1)) -done -if [ $sctpport -eq $bound ]; then - echo "couldn't find an available SCTP port" - exit 1 -fi mkdir $DIR cd $DIR -# ncat will exit when the association is closed. -ncat --sctp --listen $local $sctpport & - -cat > test.pl <<-EOPERL +cat > client.pl <<-EOPERL use IO::Socket; my \$s = IO::Socket::INET->new( Type => SOCK_STREAM, Proto => "sctp", LocalAddr => "$local", PeerAddr => "$local", - PeerPort => $sctpport, + PeerPort => \$ARGV[0], Timeout => 3); - die "Could not connect to host $local port $sctpport \$@" unless \$s; + die "Could not connect to host $local port \$ARGV[0] \$@" unless \$s; close \$s; - sleep(2); + sleep(\$ARGV[1]); EOPERL -$dtrace -c 'perl test.pl' -qs /dev/stdin <&- || break + sctpport=$(($sctpport + 1)) +done +if [ $sctpport -eq $bound ]; then + echo "couldn't find an available SCTP port" + exit 1 +fi + +cat > server.pl <<-EOPERL + use IO::Socket; + my \$l = IO::Socket::INET->new( + Type => SOCK_STREAM, + Proto => "sctp", + LocalAddr => "$local", + LocalPort => $sctpport, + Listen => 1, + Reuse => 1); + die "Could not listen on $local port $sctpport \$@" unless \$l; + my \$c = \$l->accept(); + close \$l; + while (<\$c>) {}; + close \$c; +EOPERL + +perl server.pl & + +$dtrace -c "perl client.pl $sctpport 2" -qs /dev/stdin < PACKAGE= lib${LIB} LIB= be -SHLIBDIR?= /lib SHLIB_MAJOR= 1 SHLIB_MINOR= 0 Modified: user/ngie/bug-237403/lib/libbe/be.c ============================================================================== --- user/ngie/bug-237403/lib/libbe/be.c Mon Apr 29 20:19:21 2019 (r346925) +++ user/ngie/bug-237403/lib/libbe/be.c Mon Apr 29 20:21:38 2019 (r346926) @@ -431,8 +431,12 @@ be_deep_clone_prop(int prop, void *cb) /* Just continue if we fail to read a property */ return (ZPROP_CONT); - /* Only copy locally defined properties */ - if (src != ZPROP_SRC_LOCAL) + /* + * Only copy locally defined or received properties. This continues + * to avoid temporary/default/local properties intentionally without + * breaking received datasets. + */ + if (src != ZPROP_SRC_LOCAL && src != ZPROP_SRC_RECEIVED) return (ZPROP_CONT); /* Augment mountpoint with altroot, if needed */ Modified: user/ngie/bug-237403/lib/libc/gen/Makefile.inc ============================================================================== --- user/ngie/bug-237403/lib/libc/gen/Makefile.inc Mon Apr 29 20:19:21 2019 (r346925) +++ user/ngie/bug-237403/lib/libc/gen/Makefile.inc Mon Apr 29 20:21:38 2019 (r346926) @@ -193,6 +193,7 @@ SYM_MAPS+=${LIBC_SRCTOP}/gen/Symbol.map MAN+= alarm.3 \ arc4random.3 \ + auxv.3 \ basename.3 \ cap_rights_get.3 \ cap_sandboxed.3 \ @@ -321,6 +322,7 @@ MAN+= alarm.3 \ MLINKS+=arc4random.3 arc4random_buf.3 \ arc4random.3 arc4random_uniform.3 +MLINKS+=auxv.3 elf_aux_info.3 MLINKS+=ctermid.3 ctermid_r.3 MLINKS+=devname.3 devname_r.3 MLINKS+=devname.3 fdevname.3 Copied: user/ngie/bug-237403/lib/libc/gen/auxv.3 (from r346925, head/lib/libc/gen/auxv.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/ngie/bug-237403/lib/libc/gen/auxv.3 Mon Apr 29 20:21:38 2019 (r346926, copy of r346925, head/lib/libc/gen/auxv.3) @@ -0,0 +1,86 @@ +.\" +.\" Copyright (c) 2019 Ian Lepore +.\" +.\" 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 ``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 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 April 25, 2019 +.Dt ELF_AUX_INFO 3 +.Os +.Sh NAME +.Nm elf_aux_info +.Nd extract data from the elf auxiliary vector of the current process +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/auxv.h +.Ft int +.Fn elf_aux_info "int aux" "void *buf" "int buflen" +.Sh DESCRIPTION +The +.Fn elf_aux_info +function retrieves the auxiliary info vector requested in +.Va aux . +The information is stored into the provided buffer if it will fit. +The following values, defined in +.In sys/elf_common.h +can be requested: +.Bl -tag -width AT_OSRELDATE +.It AT_CANARY +The canary value for SSP. +.It AT_HWCAP +CPU / hardware feature flags. +.It AT_HWCAP2 +CPU / hardware feature flags. +.It AT_NCPUS +Number of CPUs. +.It AT_OSRELDATE +Kernel OSRELDATE. +.It AT_PAGESIZES +Vector of page sizes. +.It AT_PAGESZ +Page size in bytes. +.It AT_TIMEKEEP +Pointer to VDSO timehands (for library internal use). +.El +.Sh RETURN VALUES +Returns zero on success, or an error number on failure. +.Sh ERRORS +.Bl -tag -width Er +.It Bq Er EINVAL +An unknown item was requested. +.It Bq Er EINVAL +The provided buffer was not the right size for the requested item. +.It Bq Er ENOENT +The requested item is not available. +.El +.Sh HISTORY +The +.Fn elf_aux_info +function appeared in +.Fx 12.0 . +.Sh BUGS +Only a small subset of available auxiliary info vector items are +accessible with this function. +Some items require a "right-sized" buffer while others just require a +"big enough" buffer. Modified: user/ngie/bug-237403/lib/libvgl/bitmap.c ============================================================================== --- user/ngie/bug-237403/lib/libvgl/bitmap.c Mon Apr 29 20:19:21 2019 (r346925) +++ user/ngie/bug-237403/lib/libvgl/bitmap.c Mon Apr 29 20:21:38 2019 (r346926) @@ -167,8 +167,17 @@ int __VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy, VGLBitmap *dst, int dstx, int dsty, int width, int hight) { - int srcline, dstline, yend, yextra, ystep; - + byte *buffer, *p; + int mousemerge, srcline, dstline, yend, yextra, ystep; + + mousemerge = 0; + if (hight < 0) { + hight = -hight; + mousemerge = (dst == VGLDisplay && + VGLMouseOverlap(dstx, dsty, width, hight)); + if (mousemerge) + buffer = alloca(width*src->PixelBytes); + } if (srcx>src->VXsize || srcy>src->VYsize || dstx>dst->VXsize || dsty>dst->VYsize) return -1; @@ -198,14 +207,19 @@ __VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy, yextra = 0; ystep = 1; if (src->Bitmap == dst->Bitmap && srcy < dsty) { - yend = srcy; + yend = srcy - 1; yextra = hight - 1; ystep = -1; } for (srcline = srcy + yextra, dstline = dsty + yextra; srcline != yend; srcline += ystep, dstline += ystep) { - WriteVerticalLine(dst, dstx, dstline, width, - src->Bitmap+(srcline*src->VXsize+srcx)*dst->PixelBytes); + p = src->Bitmap+(srcline*src->VXsize+srcx)*dst->PixelBytes; + if (mousemerge && VGLMouseOverlap(dstx, dstline, width, 1)) { + bcopy(p, buffer, width*src->PixelBytes); + p = buffer; + VGLMouseMerge(dstx, dstline, width, p); + } + WriteVerticalLine(dst, dstx, dstline, width, p); } return 0; } @@ -216,19 +230,25 @@ VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy, { int error; + if (hight < 0) + return -1; if (src == VGLDisplay) src = &VGLVDisplay; if (src->Type != MEMBUF) return -1; /* invalid */ if (dst == VGLDisplay) { - VGLMouseFreeze(dstx, dsty, width, hight, 0); + VGLMouseFreeze(); __VGLBitmapCopy(src, srcx, srcy, &VGLVDisplay, dstx, dsty, width, hight); + error = __VGLBitmapCopy(src, srcx, srcy, &VGLVDisplay, dstx, dsty, + width, hight); + if (error != 0) + return error; src = &VGLVDisplay; srcx = dstx; srcy = dsty; } else if (dst->Type != MEMBUF) return -1; /* invalid */ - error = __VGLBitmapCopy(src, srcx, srcy, dst, dstx, dsty, width, hight); + error = __VGLBitmapCopy(src, srcx, srcy, dst, dstx, dsty, width, -hight); if (dst == VGLDisplay) VGLMouseUnFreeze(); return error; Modified: user/ngie/bug-237403/lib/libvgl/main.c ============================================================================== --- user/ngie/bug-237403/lib/libvgl/main.c Mon Apr 29 20:19:21 2019 (r346925) +++ user/ngie/bug-237403/lib/libvgl/main.c Mon Apr 29 20:21:38 2019 (r346926) @@ -42,8 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include "vgl.h" -/* XXX Direct Color 24bits modes unsupported */ - #define min(x, y) (((x) < (y)) ? (x) : (y)) #define max(x, y) (((x) > (y)) ? (x) : (y)) @@ -64,6 +62,7 @@ static unsigned int VGLCurWindow; static int VGLInitDone = 0; static video_info_t VGLOldModeInfo; static vid_info_t VGLOldVInfo; +static int VGLOldVXsize; void VGLEnd() @@ -74,16 +73,19 @@ struct vt_mode smode; if (!VGLInitDone) return; VGLInitDone = 0; + signal(SIGUSR1, SIG_IGN); + signal(SIGUSR2, SIG_IGN); VGLSwitchPending = 0; VGLAbortPending = 0; + VGLMouseMode(VGL_MOUSEHIDE); - signal(SIGUSR1, SIG_IGN); - if (VGLMem != MAP_FAILED) { VGLClear(VGLDisplay, 0); munmap(VGLMem, VGLAdpInfo.va_window_size); } + ioctl(0, FBIO_SETLINEWIDTH, &VGLOldVXsize); + if (VGLOldMode >= M_VESA_BASE) ioctl(0, _IO('V', VGLOldMode - M_VESA_BASE), 0); else @@ -219,11 +221,9 @@ VGLInit(int mode) case 2: VGLDisplay->Type = VIDBUF16; break; -#if notyet case 3: VGLDisplay->Type = VIDBUF24; break; -#endif case 4: VGLDisplay->Type = VIDBUF32; break; @@ -321,6 +321,7 @@ VGLInit(int mode) depth = VGLModeInfo.vi_depth; if (depth == 15) depth = 16; + VGLOldVXsize = VGLDisplay->VXsize = VGLAdpInfo.va_line_width *8/(depth/VGLModeInfo.vi_planes); VGLDisplay->VYsize = VGLBufSize/VGLModeInfo.vi_planes/VGLAdpInfo.va_line_width; Modified: user/ngie/bug-237403/lib/libvgl/mouse.c ============================================================================== --- user/ngie/bug-237403/lib/libvgl/mouse.c Mon Apr 29 20:19:21 2019 (r346925) +++ user/ngie/bug-237403/lib/libvgl/mouse.c Mon Apr 29 20:21:38 2019 (r346926) @@ -39,57 +39,138 @@ __FBSDID("$FreeBSD$"); #include #include "vgl.h" +static void VGLMouseAction(int dummy); + #define BORDER 0xff /* default border -- light white in rgb 3:3:2 */ #define INTERIOR 0xa0 /* default interior -- red in rgb 3:3:2 */ +#define LARGE_MOUSE_IMG_XSIZE 19 +#define LARGE_MOUSE_IMG_YSIZE 32 +#define SMALL_MOUSE_IMG_XSIZE 10 +#define SMALL_MOUSE_IMG_YSIZE 16 #define X 0xff /* any nonzero in And mask means part of cursor */ #define B BORDER #define I INTERIOR -static byte StdAndMask[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE] = { - X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - X,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0, - X,X,X,X,0,0,0,0,0,0,0,0,0,0,0,0, - X,X,X,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I,I,B, + B,I,I,I,I,I,B,B,B,B, + B,I,I,B,I,I,B,0,0,0, + B,I,B,0,B,I,I,B,0,0, + B,B,0,0,B,I,I,B,0,0, + 0,0,0,0,0,B,I,I,B,0, + 0,0,0,0,0,B,I,I,B,0, + 0,0,0,0,0,0,B,B,0,0, +}; #undef X #undef B #undef I -static VGLBitmap VGLMouseStdAndMask = - VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, StdAndMask); -static VGLBitmap VGLMouseStdOrMask = - VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, StdOrMask); +static VGLBitmap VGLMouseLargeAndMask = + VGLBITMAP_INITIALIZER(MEMBUF, LARGE_MOUSE_IMG_XSIZE, LARGE_MOUSE_IMG_YSIZE, + LargeAndMask); +static VGLBitmap VGLMouseLargeOrMask = + VGLBITMAP_INITIALIZER(MEMBUF, LARGE_MOUSE_IMG_XSIZE, LARGE_MOUSE_IMG_YSIZE, + LargeOrMask); +static VGLBitmap VGLMouseSmallAndMask = + VGLBITMAP_INITIALIZER(MEMBUF, SMALL_MOUSE_IMG_XSIZE, SMALL_MOUSE_IMG_YSIZE, + SmallAndMask); +static VGLBitmap VGLMouseSmallOrMask = + VGLBITMAP_INITIALIZER(MEMBUF, SMALL_MOUSE_IMG_XSIZE, SMALL_MOUSE_IMG_YSIZE, + SmallOrMask); static VGLBitmap *VGLMouseAndMask, *VGLMouseOrMask; -static int VGLMouseVisible = 0; -static int VGLMouseShown = 0; +static int VGLMouseShown = VGL_MOUSEHIDE; static int VGLMouseXpos = 0; static int VGLMouseYpos = 0; static int VGLMouseButtons = 0; @@ -102,91 +183,44 @@ static volatile sig_atomic_t VGLMsuppressint; VGLMouseAction(0); \ } while (0) -void -VGLMousePointerShow() +int +__VGLMouseMode(int mode) { - byte buf[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE*4]; - VGLBitmap buffer = - VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, buf); - byte crtcidx, crtcval, gdcidx, gdcval; - int pos; + int oldmode; - if (!VGLMouseVisible) { - INTOFF(); - VGLMouseVisible = 1; - if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) { - crtcidx = inb(0x3c4); - crtcval = inb(0x3c5); - gdcidx = inb(0x3ce); - gdcval = inb(0x3cf); - } - buffer.PixelBytes = VGLDisplay->PixelBytes; - __VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos, - &buffer, 0, 0, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE); - for (pos = 0; pos < MOUSE_IMG_SIZE*MOUSE_IMG_SIZE; pos++) - if (VGLMouseAndMask->Bitmap[pos]) - bcopy(&VGLMouseOrMask->Bitmap[pos*VGLDisplay->PixelBytes], - &buffer.Bitmap[pos*VGLDisplay->PixelBytes], - VGLDisplay->PixelBytes); - __VGLBitmapCopy(&buffer, 0, 0, VGLDisplay, - VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE); - if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) { - outb(0x3c4, crtcidx); - outb(0x3c5, crtcval); - outb(0x3ce, gdcidx); - outb(0x3cf, gdcval); - } - INTON(); - } -} - -void -VGLMousePointerHide() -{ - byte crtcidx, crtcval, gdcidx, gdcval; - - if (VGLMouseVisible) { - INTOFF(); - VGLMouseVisible = 0; - if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) { - crtcidx = inb(0x3c4); - crtcval = inb(0x3c5); - gdcidx = inb(0x3ce); - gdcval = inb(0x3cf); - } - __VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos, VGLDisplay, - VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE); - if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) { - outb(0x3c4, crtcidx); - outb(0x3c5, crtcval); - outb(0x3ce, gdcidx); - outb(0x3cf, gdcval); - } - INTON(); - } -} - -void -VGLMouseMode(int mode) -{ + INTOFF(); + oldmode = VGLMouseShown; if (mode == VGL_MOUSESHOW) { if (VGLMouseShown == VGL_MOUSEHIDE) { - VGLMousePointerShow(); VGLMouseShown = VGL_MOUSESHOW; + __VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos, + VGLDisplay, VGLMouseXpos, VGLMouseYpos, + VGLMouseAndMask->VXsize, -VGLMouseAndMask->VYsize); } } else { if (VGLMouseShown == VGL_MOUSESHOW) { - VGLMousePointerHide(); VGLMouseShown = VGL_MOUSEHIDE; + __VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos, + VGLDisplay, VGLMouseXpos, VGLMouseYpos, + VGLMouseAndMask->VXsize, VGLMouseAndMask->VYsize); } } + INTON(); + return oldmode; } void +VGLMouseMode(int mode) +{ + __VGLMouseMode(mode); +} + +static void VGLMouseAction(int dummy) { struct mouse_info mouseinfo; + int mousemode; if (VGLMsuppressint) { VGLMintpending = 1; @@ -197,13 +231,14 @@ again: VGLMintpending = 0; mouseinfo.operation = MOUSE_GETINFO; ioctl(0, CONS_MOUSECTL, &mouseinfo); - if (VGLMouseShown == VGL_MOUSESHOW) - VGLMousePointerHide(); - VGLMouseXpos = mouseinfo.u.data.x; - VGLMouseYpos = mouseinfo.u.data.y; + if (VGLMouseXpos != mouseinfo.u.data.x || + VGLMouseYpos != mouseinfo.u.data.y) { + mousemode = __VGLMouseMode(VGL_MOUSEHIDE); + VGLMouseXpos = mouseinfo.u.data.x; + VGLMouseYpos = mouseinfo.u.data.y; + __VGLMouseMode(mousemode); + } VGLMouseButtons = mouseinfo.u.data.buttons; - if (VGLMouseShown == VGL_MOUSESHOW) - VGLMousePointerShow(); /* * Loop to handle any new (suppressed) signals. This is INTON() without @@ -218,9 +253,10 @@ again: void VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *OrMask) { - if (VGLMouseShown == VGL_MOUSESHOW) - VGLMousePointerHide(); + int mousemode; + mousemode = __VGLMouseMode(VGL_MOUSEHIDE); + VGLMouseAndMask = AndMask; if (VGLMouseOrMask != NULL) { @@ -231,20 +267,23 @@ VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *OrMask VGLBitmapAllocateBits(VGLMouseOrMask); VGLBitmapCvt(OrMask, VGLMouseOrMask); - if (VGLMouseShown == VGL_MOUSESHOW) - VGLMousePointerShow(); + __VGLMouseMode(mousemode); } void VGLMouseSetStdImage() { - VGLMouseSetImage(&VGLMouseStdAndMask, &VGLMouseStdOrMask); + if (VGLDisplay->VXsize > 800) + VGLMouseSetImage(&VGLMouseLargeAndMask, &VGLMouseLargeOrMask); + else + VGLMouseSetImage(&VGLMouseSmallAndMask, &VGLMouseSmallOrMask); } int VGLMouseInit(int mode) { struct mouse_info mouseinfo; + VGLBitmap *ormask; int andmask, border, error, i, interior; switch (VGLModeInfo.vi_mem_model) { @@ -271,9 +310,14 @@ VGLMouseInit(int mode) border = strtoul(getenv("VGLMOUSEBORDERCOLOR"), NULL, 0); if (getenv("VGLMOUSEINTERIORCOLOR") != NULL) interior = strtoul(getenv("VGLMOUSEINTERIORCOLOR"), NULL, 0); - for (i = 0; i < MOUSE_IMG_SIZE*MOUSE_IMG_SIZE; i++) - VGLMouseStdOrMask.Bitmap[i] = VGLMouseStdOrMask.Bitmap[i] == BORDER ? - border : VGLMouseStdOrMask.Bitmap[i] == INTERIOR ? interior : 0; + ormask = &VGLMouseLargeOrMask; + for (i = 0; i < ormask->VXsize * ormask->VYsize; i++) + ormask->Bitmap[i] = ormask->Bitmap[i] == BORDER ? border : + ormask->Bitmap[i] == INTERIOR ? interior : 0; + ormask = &VGLMouseSmallOrMask; + for (i = 0; i < ormask->VXsize * ormask->VYsize; i++) + ormask->Bitmap[i] = ormask->Bitmap[i] == BORDER ? border : + ormask->Bitmap[i] == INTERIOR ? interior : 0; VGLMouseSetStdImage(); mouseinfo.operation = MOUSE_MODE; mouseinfo.u.mode.signal = SIGUSR2; @@ -316,48 +360,67 @@ VGLMouseStatus(int *x, int *y, char *buttons) return VGLMouseShown; } -int -VGLMouseFreeze(int x, int y, int width, int hight, u_long color) +void +VGLMouseFreeze(void) { - INTOFF(); - if (width > 1 || hight > 1 || (color & 0xc0000000) == 0) { /* bitmap */ - if (VGLMouseShown == 1) { - int overlap; + INTOFF(); +} - if (x > VGLMouseXpos) - overlap = (VGLMouseXpos + MOUSE_IMG_SIZE) - x; - else *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Tue Apr 30 08:09:34 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 139971587B4D for ; Tue, 30 Apr 2019 08:09:34 +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 AA5D992564; Tue, 30 Apr 2019 08:09:33 +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 7A7516C54; Tue, 30 Apr 2019 08:09:33 +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 x3U89XtW074008; Tue, 30 Apr 2019 08:09:33 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3U89X0K074007; Tue, 30 Apr 2019 08:09:33 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201904300809.x3U89X0K074007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Tue, 30 Apr 2019 08:09:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r346953 - 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: 346953 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AA5D992564 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.979,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, 30 Apr 2019 08:09:34 -0000 Author: pho Date: Tue Apr 30 08:09:32 2019 New Revision: 346953 URL: https://svnweb.freebsd.org/changeset/base/346953 Log: Added two multicast test cases. Sponsored by: Dell EMC Isilon Added: user/pho/stress2/misc/multicast.sh (contents, props changed) user/pho/stress2/misc/multicast2.sh (contents, props changed) Added: user/pho/stress2/misc/multicast.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/multicast.sh Tue Apr 30 08:09:32 2019 (r346953) @@ -0,0 +1,120 @@ +#!/bin/sh + +# Multicast test example by Mark Claypool, claypool at cs.wpi.edu +# https://web.cs.wpi.edu/~claypool/courses/4514-B99/samples/multicast.c + +# Kernel page fault seen with WiP branch: +# https://people.freebsd.org/~pho/stress/log/kip036.txt + +# $FreeBSD$ + +. ../default.cfg + +dir=/tmp +odir=`pwd` +cd $dir +sed '1,/^EOF/d' < $odir/$0 > $dir/multicast.c +mycc -o multicast -Wall -Wextra -O0 -g multicast.c || exit 1 +rm -f multicast.c +cd $odir + +cd $dir +( + timeout -k 1s 20s ./multicast & + sleep 1 + timeout -k 1s 25s ./multicast 1 +) > /dev/null +wait + +rm -f $dir/multicast +exit $s +EOF +/* +multicast.c + +The following program sends or receives multicast packets. If invoked +with one argument, it sends a packet containing the current time to an +arbitrarily chosen multicast group and UDP port. If invoked with no +arguments, it receives and prints these packets. Start it as a sender on +just one host and as a receiver on all the other hosts + +*/ + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#define EXAMPLE_PORT 6000 +#define EXAMPLE_GROUP "239.0.0.1" + +int +main(int argc, char *argv[] __unused) +{ + struct ip_mreq mreq; + struct sockaddr_in addr; + socklen_t addrlen; + int cnt, sock; + char message[50]; + + /* set up socket */ + sock = socket(AF_INET, SOCK_DGRAM, 0); + if (sock < 0) { + perror("socket"); + exit(1); + } + bzero((char *)&addr, sizeof(addr)); + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = htonl(INADDR_ANY); + addr.sin_port = htons(EXAMPLE_PORT); + addrlen = sizeof(addr); + + if (argc > 1) { + /* send */ + addr.sin_addr.s_addr = inet_addr(EXAMPLE_GROUP); + while (1) { + time_t t = time(0); + sprintf(message, "time is %-24.24s", ctime(&t)); + printf("sending: %s\n", message); + cnt = sendto(sock, message, sizeof(message), 0, + (struct sockaddr *) &addr, addrlen); + if (cnt < 0) { + perror("sendto"); + exit(1); + } + sleep(5); + } + } else { + + /* receive */ + if (bind(sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) { + perror("bind"); + exit(1); + } + mreq.imr_multiaddr.s_addr = inet_addr(EXAMPLE_GROUP); + mreq.imr_interface.s_addr = htonl(INADDR_ANY); + if (setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, + &mreq, sizeof(mreq)) < 0) { + perror("setsockopt mreq"); + exit(1); + } + while (1) { + cnt = recvfrom(sock, message, sizeof(message), 0, + (struct sockaddr *) &addr, &addrlen); + if (cnt < 0) { + perror("recvfrom"); + exit(1); + } else if (cnt == 0) { + break; + } + printf("%s: message = \"%s\"\n", inet_ntoa(addr.sin_addr), message); + } + } +} Added: user/pho/stress2/misc/multicast2.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/multicast2.sh Tue Apr 30 08:09:32 2019 (r346953) @@ -0,0 +1,26 @@ +#!/bin/sh + +# D19886 Fix numerous refcount bugs in multicast + +# Page fault in in6_pcbpurgeif0+0xc8 seen. +# https://people.freebsd.org/~pho/stress/log/mmacy035.txt +# Test scenario by mmacy + +# $FreeBSD$ + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +[ -x /usr/local/bin/mDNSResponderPosix ] || + { echo "mDNSResponder not installed"; exit 0; } + +(cd ../testcases/swap; ./swap -t 2m -i 50 -v -h -l 100) & +sleep 2 + +service mdnsd onestart +ifconfig vtnet0 delete 2>/dev/null +ifconfig epair create +ifconfig epair0a 0/24 up +ifconfig epair0a destroy +service mdnsd onestop + +while pkill swap; do :; done +wait