From owner-svn-src-head@freebsd.org Sun Aug 26 02:09:21 2018 Return-Path: Delivered-To: svn-src-head@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 3FB42109D92F; Sun, 26 Aug 2018 02:09:21 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E698B8B227; Sun, 26 Aug 2018 02:09:20 +0000 (UTC) (envelope-from brd@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 C7EF446D; Sun, 26 Aug 2018 02:09:20 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7Q29KGG003423; Sun, 26 Aug 2018 02:09:20 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7Q29Kqq003422; Sun, 26 Aug 2018 02:09:20 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201808260209.w7Q29Kqq003422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Sun, 26 Aug 2018 02:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338320 - head/usr.sbin/bluetooth/hcsecd X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/usr.sbin/bluetooth/hcsecd X-SVN-Commit-Revision: 338320 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2018 02:09:21 -0000 Author: brd Date: Sun Aug 26 02:09:20 2018 New Revision: 338320 URL: https://svnweb.freebsd.org/changeset/base/338320 Log: Fix the install location of hcsecd.conf Submitted by: vangyzen Approved by: re (marius) Modified: head/usr.sbin/bluetooth/hcsecd/Makefile Modified: head/usr.sbin/bluetooth/hcsecd/Makefile ============================================================================== --- head/usr.sbin/bluetooth/hcsecd/Makefile Sat Aug 25 20:19:16 2018 (r338319) +++ head/usr.sbin/bluetooth/hcsecd/Makefile Sun Aug 26 02:09:20 2018 (r338320) @@ -2,6 +2,7 @@ # $FreeBSD$ CONFS= hcsecd.conf +CONFSDIR= /etc/bluetooth CONFSMODE_hcsecd.conf= 600 PROG= hcsecd MAN= hcsecd.8 hcsecd.conf.5 From owner-svn-src-head@freebsd.org Sun Aug 26 03:56:56 2018 Return-Path: Delivered-To: svn-src-head@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 E6E6910A0DC1; Sun, 26 Aug 2018 03:56:55 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 92F518EF14; Sun, 26 Aug 2018 03:56:55 +0000 (UTC) (envelope-from cperciva@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 7107416E9; Sun, 26 Aug 2018 03:56:55 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7Q3uttY060164; Sun, 26 Aug 2018 03:56:55 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7Q3utx9060163; Sun, 26 Aug 2018 03:56:55 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201808260356.w7Q3utx9060163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 26 Aug 2018 03:56:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338321 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 338321 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2018 03:56:56 -0000 Author: cperciva Date: Sun Aug 26 03:56:54 2018 New Revision: 338321 URL: https://svnweb.freebsd.org/changeset/base/338321 Log: Disable atkbd0 and atkdbc0 in EC2 AMIs. This has the effect of skipping the probing and attaching of the PS/2 mouse (not present on EC2) and keyboard (emulated, but not accessible via EC2). Note that we disable atkbd0 separately even though during device probing it shows up as a child of atkbdc0; this is necessary because the device is also initialized during the early console setup from hammer_time. This change cuts the kernel boot time on an EC2 c5.4xlarge instance from 7259ms down to 4727 ms. Approved by: re (marius) Modified: head/release/tools/ec2.conf Modified: head/release/tools/ec2.conf ============================================================================== --- head/release/tools/ec2.conf Sun Aug 26 02:09:20 2018 (r338320) +++ head/release/tools/ec2.conf Sun Aug 26 03:56:54 2018 (r338321) @@ -68,6 +68,13 @@ vm_extra_pre_umount() { echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf + # The emulated keyboard attached to EC2 instances is inaccessible to + # users, and there is no mouse attached at all; disable to keyboard + # and the keyboard controller (to which the mouse would attach, if + # one existed) in order to save time in device probing. + echo 'hint.atkbd.0.disabled=1' >> ${DESTDIR}/boot/loader.conf + echo 'hint.atkbdc.0.disabled=1' >> ${DESTDIR}/boot/loader.conf + # EC2 has two consoles: An emulated serial port ("system log"), # which has been present since 2006; and a VGA console ("instance # screenshot") which was introduced in 2016. From owner-svn-src-head@freebsd.org Sun Aug 26 12:51:55 2018 Return-Path: Delivered-To: svn-src-head@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 2D9BA1075CCA; Sun, 26 Aug 2018 12:51:55 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D22727FD74; Sun, 26 Aug 2018 12:51:54 +0000 (UTC) (envelope-from markm@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 98C4F7208; Sun, 26 Aug 2018 12:51:54 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7QCps9l032480; Sun, 26 Aug 2018 12:51:54 GMT (envelope-from markm@FreeBSD.org) Received: (from markm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7QCplZb032438; Sun, 26 Aug 2018 12:51:47 GMT (envelope-from markm@FreeBSD.org) Message-Id: <201808261251.w7QCplZb032438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markm set sender to markm@FreeBSD.org using -f From: Mark Murray Date: Sun, 26 Aug 2018 12:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338324 - in head: . share/man/man4 share/man/man9 sys/arm/amlogic/aml8726 sys/arm/broadcom/bcm2835 sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/d... X-SVN-Group: head X-SVN-Commit-Author: markm X-SVN-Commit-Paths: in head: . share/man/man4 share/man/man9 sys/arm/amlogic/aml8726 sys/arm/broadcom/bcm2835 sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/syscons sys/dev/ubsec ... X-SVN-Commit-Revision: 338324 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2018 12:51:55 -0000 Author: markm Date: Sun Aug 26 12:51:46 2018 New Revision: 338324 URL: https://svnweb.freebsd.org/changeset/base/338324 Log: Remove the Yarrow PRNG algorithm option in accordance with due notice given in random(4). This includes updating of the relevant man pages, and no-longer-used harvesting parameters. Ensure that the pseudo-unit-test still does something useful, now also with the "other" algorithm instead of Yarrow. PR: 230870 Reviewed by: cem Approved by: so(delphij,gtetlow) Approved by: re(marius) Differential Revision: https://reviews.freebsd.org/D16898 Deleted: head/sys/dev/random/yarrow.c head/sys/dev/random/yarrow.h head/sys/modules/random_yarrow/Makefile Modified: head/UPDATING head/share/man/man4/random.4 head/share/man/man9/random_harvest.9 head/sys/arm/amlogic/aml8726/aml8726_rng.c head/sys/arm/broadcom/bcm2835/bcm2835_rng.c head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/dev/glxsb/glxsb.c head/sys/dev/hifn/hifn7751.c head/sys/dev/random/build.sh head/sys/dev/random/fortuna.c head/sys/dev/random/other_algorithm.c head/sys/dev/random/other_algorithm.h head/sys/dev/random/random_harvestq.c head/sys/dev/random/random_harvestq.h head/sys/dev/random/randomdev.c head/sys/dev/random/unit_test.c head/sys/dev/random/unit_test.h head/sys/dev/rndtest/rndtest.c head/sys/dev/safe/safe.c head/sys/dev/syscons/scmouse.c head/sys/dev/syscons/syscons.c head/sys/dev/ubsec/ubsec.c head/sys/dev/virtio/random/virtio_random.c head/sys/dev/vt/vt_core.c head/sys/dev/vt/vt_sysmouse.c head/sys/fs/tmpfs/tmpfs_subr.c head/sys/kern/kern_intr.c head/sys/kern/subr_bus.c head/sys/mips/cavium/octeon_rnd.c head/sys/modules/Makefile head/sys/net/if_ethersubr.c head/sys/net/if_tun.c head/sys/netgraph/ng_iface.c head/sys/sys/random.h head/sys/ufs/ffs/ffs_inode.c head/sys/vm/uma_core.c head/tools/tools/sysdoc/tunables.mdoc Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Aug 26 05:28:17 2018 (r338323) +++ head/UPDATING Sun Aug 26 12:51:46 2018 (r338324) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20180826: + The Yarrow CSPRNG has been removed from the kernel as it has not been + supported by its designers since at least 2003. Fortuna has been the + default since FreeBSD-11. + 20170822: devctl freeze/that have gone into the tree, the rc scripts have been updated to use them and devmatch has been changed. You should update Modified: head/share/man/man4/random.4 ============================================================================== --- head/share/man/man4/random.4 Sun Aug 26 05:28:17 2018 (r338323) +++ head/share/man/man4/random.4 Sun Aug 26 12:51:46 2018 (r338324) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 17, 2015 +.Dd August 26, 2018 .Dt RANDOM 4 .Os .Sh NAME @@ -153,26 +153,15 @@ the device is not created until an "algorithm module" is loaded. -Two of these modules -are built by default, -.Em random_fortuna -and -.Em random_yarrow . +The only module built by default is +.Em random_fortuna . The .Em random_yarrow -module is deprecated, -and will be removed in -.Fx 12. -Use of the Yarrow algorithm -is not encouraged, -but while still present -in the kernel source, -it can be selected with the -.Cd "options RANDOM_YARROW" -kernel option. -Note that these loadable modules -are slightly less efficient -than their compiled-in equivalents. +module was removed in +.Fx 12 . +Note that this loadable module +is slightly less efficient +than its compiled-in equivalent. This is because some functions must be locked against load and unload events, @@ -351,4 +340,4 @@ introduced in The Yarrow algorithm is no longer supported by its authors, -and is therefore deprecated. +and is therefore no longer available. Modified: head/share/man/man9/random_harvest.9 ============================================================================== --- head/share/man/man9/random_harvest.9 Sun Aug 26 05:28:17 2018 (r338323) +++ head/share/man/man9/random_harvest.9 Sun Aug 26 12:51:46 2018 (r338324) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 13, 2015 +.Dd August 26, 2018 .Dt RANDOM_HARVEST 9 .Os .Sh NAME @@ -38,21 +38,18 @@ .Fo random_harvest_direct .Fa "void *entropy" .Fa "u_int size" -.Fa "u_int bits" .Fa "enum esource source" .Fc .Ft void .Fo random_harvest_fast .Fa "void *entropy" .Fa "u_int size" -.Fa "u_int bits" .Fa "enum esource source" .Fc .Ft void .Fo random_harvest_queue .Fa "void *entropy" .Fa "u_int size" -.Fa "u_int bits" .Fa "enum esource source" .Fc .Sh DESCRIPTION @@ -107,18 +104,6 @@ and is the default choice for most entropy sources such as interrupts or console events. -.Pp -The -.Fa bits -argument is only used -by the deprecated Yarrow algorithm. -For compatibility, -the caller should -.Em "very conservatively" -estimate the number of random bits -in the sample, -and pass this in -.Fa bits . .Pp Interrupt harvesting has been in part simplified Modified: head/sys/arm/amlogic/aml8726/aml8726_rng.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_rng.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/arm/amlogic/aml8726/aml8726_rng.c Sun Aug 26 12:51:46 2018 (r338324) @@ -75,8 +75,7 @@ aml8726_rng_harvest(void *arg) rn[0] = CSR_READ_4(sc, AML_RNG_0_REG); rn[1] = CSR_READ_4(sc, AML_RNG_1_REG); - random_harvest(rn, sizeof(rn), sizeof(rn) * NBBY / 2, - RANDOM_PURE_AML8726); + random_harvest(rn, sizeof(rn), RANDOM_PURE_AML8726); callout_reset(&sc->co, sc->ticks, aml8726_rng_harvest, sc); } Modified: head/sys/arm/broadcom/bcm2835/bcm2835_rng.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_rng.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/arm/broadcom/bcm2835/bcm2835_rng.c Sun Aug 26 12:51:46 2018 (r338324) @@ -289,8 +289,7 @@ bcm2835_rng_harvest(void *arg) cnt = nread * sizeof(uint32_t); if (cnt > 0) - random_harvest_queue(sc->sc_buf, cnt, cnt * NBBY / 2, - RANDOM_PURE_BROADCOM); + random_harvest_queue(sc->sc_buf, cnt, RANDOM_PURE_BROADCOM); callout_reset(&sc->sc_rngto, RNG_CALLOUT_TICKS, bcm2835_rng_harvest, sc); } Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/conf/NOTES Sun Aug 26 12:51:46 2018 (r338324) @@ -3008,11 +3008,8 @@ options BROOKTREE_ALLOC_PAGES=(217*4+1) options MAXFILES=999 # Random number generator -# Only ONE of the below two may be used; they are mutually exclusive. -# If neither is present, then the Fortuna algorithm is selected. -#options RANDOM_YARROW # Yarrow CSPRNG (old default) -#options RANDOM_LOADABLE # Allow the algorithm to be loaded as - # a module. +# Allow the CSPRNG algorithm to be loaded as a module. +#options RANDOM_LOADABLE # Select this to allow high-rate but potentially expensive # harvesting of Slab-Allocator entropy. In very high-rate # situations the value of doing this is dubious at best. Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/conf/files Sun Aug 26 12:51:46 2018 (r338324) @@ -2821,12 +2821,9 @@ rt2860.fw optional rt2860fw | ralfw \ clean "rt2860.fw" dev/random/random_infra.c optional random dev/random/random_harvestq.c optional random -dev/random/randomdev.c optional random random_yarrow | \ - random !random_yarrow !random_loadable -dev/random/yarrow.c optional random random_yarrow -dev/random/fortuna.c optional random !random_yarrow !random_loadable -dev/random/hash.c optional random random_yarrow | \ - random !random_yarrow !random_loadable +dev/random/randomdev.c optional random +dev/random/fortuna.c optional random !random_loadable +dev/random/hash.c optional random dev/rc/rc.c optional rc dev/rccgpio/rccgpio.c optional rccgpio gpio dev/re/if_re.c optional re Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/conf/options Sun Aug 26 12:51:46 2018 (r338324) @@ -983,9 +983,6 @@ RACCT_DEFAULT_TO_DISABLED opt_global.h RCTL opt_global.h # Random number generator(s) -# Which CSPRNG hash we get. -# If Yarrow is not chosen, Fortuna is selected. -RANDOM_YARROW opt_global.h # With this, no entropy processor is loaded, but the entropy # harvesting infrastructure is present. This means an entropy # processor may be loaded as a module. Modified: head/sys/dev/glxsb/glxsb.c ============================================================================== --- head/sys/dev/glxsb/glxsb.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/glxsb/glxsb.c Sun Aug 26 12:51:46 2018 (r338324) @@ -457,7 +457,7 @@ glxsb_rnd(void *v) value = bus_read_4(sc->sc_sr, SB_RANDOM_NUM); /* feed with one uint32 */ /* MarkM: FIX!! Check that this does not swamp the harvester! */ - random_harvest_queue(&value, sizeof(value), 32/2, RANDOM_PURE_GLXSB); + random_harvest_queue(&value, sizeof(value), RANDOM_PURE_GLXSB); } callout_reset(&sc->sc_rngco, sc->sc_rnghz, glxsb_rnd, sc); Modified: head/sys/dev/hifn/hifn7751.c ============================================================================== --- head/sys/dev/hifn/hifn7751.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/hifn/hifn7751.c Sun Aug 26 12:51:46 2018 (r338324) @@ -259,7 +259,7 @@ static void default_harvest(struct rndtest_state *rsp, void *buf, u_int count) { /* MarkM: FIX!! Check that this does not swamp the harvester! */ - random_harvest_queue(buf, count, count*NBBY/2, RANDOM_PURE_HIFN); + random_harvest_queue(buf, count, RANDOM_PURE_HIFN); } static u_int Modified: head/sys/dev/random/build.sh ============================================================================== --- head/sys/dev/random/build.sh Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/random/build.sh Sun Aug 26 12:51:46 2018 (r338324) @@ -28,23 +28,23 @@ # # Basic script to build crude unit tests. # -# Diff-reduction checking between Yarrow and fortuna is done like so: +# Diff-reduction checking between fortuna and the other algorithm is done like so: # -# $ diff -u -B <(sed -e 's/yarrow/wombat/g' \ -# -e 's/YARROW/WOMBAT/g' yarrow.c) \ -# <(sed -e 's/fortuna/wombat/g' \ -# -e 's/FORTUNA/WOMBAT/g' fortuna.c) | less +# $ diff -u -B <(sed -e 's/random_other/random_wombat/g' \ +# -e 's/RANDOM_OTHER/RANDOM_WOMBAT/g' other_algorithm.c) \ +# <(sed -e 's/random_fortuna/random_wombat/g' \ +# -e 's/RANDOM_FORTUNA/RANDOM_WOMBAT/g' fortuna.c) | less # cc -g -O0 -pthread \ -I../.. -lstdthreads -Wall \ unit_test.c \ - yarrow.c \ + other_algorithm.c \ hash.c \ ../../crypto/rijndael/rijndael-api-fst.c \ ../../crypto/rijndael/rijndael-alg-fst.c \ ../../crypto/sha2/sha256c.c \ -lz \ - -o yunit_test + -o other_unit_test cc -g -O0 -pthread \ -I../.. -lstdthreads -Wall \ unit_test.c \ @@ -54,4 +54,4 @@ cc -g -O0 -pthread \ ../../crypto/rijndael/rijndael-alg-fst.c \ ../../crypto/sha2/sha256c.c \ -lz \ - -o funit_test + -o fortuna_unit_test Modified: head/sys/dev/random/fortuna.c ============================================================================== --- head/sys/dev/random/fortuna.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/random/fortuna.c Sun Aug 26 12:51:46 2018 (r338324) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #else /* !_KERNEL */ +#include #include #include #include @@ -97,9 +98,11 @@ CTASSERT(RANDOM_BLOCKSIZE == sizeof(uint128_t)); CTASSERT(RANDOM_KEYSIZE == 2*RANDOM_BLOCKSIZE); /* Probes for dtrace(1) */ +#ifdef _KERNEL SDT_PROVIDER_DECLARE(random); SDT_PROVIDER_DEFINE(random); SDT_PROBE_DEFINE2(random, fortuna, event_processor, debug, "u_int", "struct fs_pool *"); +#endif /* _KERNEL */ /* * This is the beastie that needs protecting. It contains all of the @@ -398,7 +401,9 @@ random_fortuna_pre_read(void) } else break; } +#ifdef _KERNEL SDT_PROBE2(random, fortuna, event_processor, debug, fortuna_state.fs_reseedcount, fortuna_state.fs_pool); +#endif /* FS&K */ random_fortuna_reseed_internal(s, i < RANDOM_FORTUNA_NPOOLS ? i + 1 : RANDOM_FORTUNA_NPOOLS); /* Clean up and secure */ Modified: head/sys/dev/random/other_algorithm.c ============================================================================== --- head/sys/dev/random/other_algorithm.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/random/other_algorithm.c Sun Aug 26 12:51:46 2018 (r338324) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Mark R V Murray + * Copyright (c) 2015-2018 Mark R V Murray * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,19 +30,21 @@ * containing an alternative entropy-processing algorithm for random(4). * * The functions below should be completed with the appropriate code, - * and the nearby yarrow.c and fortuna.c may be consulted for examples - * of working code. + * and the nearby fortuna.c may be consulted for examples of working code. * * The author is willing to provide reasonable help to those wishing to * write such a module for themselves. Please use the markm@ FreeBSD * email address, and ensure that you are developing this on a suitably - * supported branch (This is currently 11-CURRENT, and will be no - * older than 11-STABLE in the future). + * supported branch (This is currently 12-CURRENT, and may be no + * older than 12-STABLE in the future). */ #include __FBSDID("$FreeBSD$"); +#include + +#ifdef _KERNEL #include #include #include @@ -62,7 +64,25 @@ __FBSDID("$FreeBSD$"); #include #include #include +#else /* !_KERNEL */ +#include +#include +#include +#include +#include +#include +#include "unit_test.h" + +#include +#include + +#include +#include +#include +#include +#endif /* _KERNEL */ + static void random_other_pre_read(void); static void random_other_read(uint8_t *, u_int); static bool random_other_seeded(void); @@ -73,9 +93,7 @@ static void random_other_deinit_alg(void *); /* * RANDOM_OTHER_NPOOLS is used when reading hardware random * number sources to ensure that each pool gets one read sample - * per loop iteration. Yarrow has 2 such pools (FAST and SLOW), - * and fortuna has 32 (0-31). The RNG used prior to Yarrow and - * ported from Linux had just 1 pool. + * per loop iteration. Fortuna has 32 (0-31). */ #define RANDOM_OTHER_NPOOLS 1 Modified: head/sys/dev/random/other_algorithm.h ============================================================================== --- head/sys/dev/random/other_algorithm.h Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/random/other_algorithm.h Sun Aug 26 12:51:46 2018 (r338324) @@ -31,14 +31,13 @@ * containing an alternative entropy-processing algorithm for random(4). * * The functions below should be completed with the appropriate code, - * and the nearby yarrow.c and fortuna.c may be consulted for examples - * of working code. + * and the nearby fortuna.c may be consulted for examples of working code. * * The author is willing to provide reasonable help to those wishing to * write such a module for themselves. Please use the markm@ FreeBSD * email address, and ensure that you are developing this on a suitably - * supported branch (This is currently 11-CURRENT, and will be no - * older than 11-STABLE in the future). + * supported branch (This is currently 12-CURRENT, and may be no + * older than 12-STABLE in the future). */ #ifndef SYS_DEV_RANDOM_OTHER_H_INCLUDED Modified: head/sys/dev/random/random_harvestq.c ============================================================================== --- head/sys/dev/random/random_harvestq.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/random/random_harvestq.c Sun Aug 26 12:51:46 2018 (r338324) @@ -140,7 +140,7 @@ static struct kproc_desc random_proc_kp = { &harvest_context.hc_kthread_proc, }; -/* Pass the given event straight through to Fortuna/Yarrow/Whatever. */ +/* Pass the given event straight through to Fortuna/Whatever. */ static __inline void random_harvestq_fast_process_event(struct harvest_event *event) { @@ -178,7 +178,7 @@ random_kthread(void) /* XXX: FIX!! Increase the high-performance data rate? Need some measurements first. */ for (i = 0; i < RANDOM_ACCUM_MAX; i++) { if (harvest_context.hc_entropy_fast_accumulator.buf[i]) { - random_harvest_direct(harvest_context.hc_entropy_fast_accumulator.buf + i, sizeof(harvest_context.hc_entropy_fast_accumulator.buf[0]), 4, RANDOM_UMA); + random_harvest_direct(harvest_context.hc_entropy_fast_accumulator.buf + i, sizeof(harvest_context.hc_entropy_fast_accumulator.buf[0]), RANDOM_UMA); harvest_context.hc_entropy_fast_accumulator.buf[i] = 0; } } @@ -197,8 +197,7 @@ SYSINIT(random_device_h_proc, SI_SUB_KICK_SCHEDULER, S /* * Run through all fast sources reading entropy for the given * number of rounds, which should be a multiple of the number - * of entropy accumulation pools in use; 2 for Yarrow and 32 - * for Fortuna. + * of entropy accumulation pools in use; it is 32 for Fortuna. */ static void random_sources_feed(void) @@ -234,7 +233,7 @@ random_sources_feed(void) printf("%s: rs_read for hardware device '%s' returned no entropy.\n", __func__, rrs->rrs_source->rs_ident); continue; } - random_harvest_direct(entropy, n, (n*8)/2, rrs->rrs_source->rs_source); + random_harvest_direct(entropy, n, rrs->rrs_source->rs_source); } } explicit_bzero(entropy, sizeof(entropy)); @@ -380,7 +379,7 @@ SYSINIT(random_device_h_init, SI_SUB_RANDOM, SI_ORDER_ /* * This is used to prime the RNG by grabbing any early random stuff * known to the kernel, and inserting it directly into the hashing - * module, e.g. Fortuna or Yarrow. + * module, currently Fortuna. */ /* ARGSUSED */ static void @@ -414,7 +413,6 @@ random_harvestq_prime(void *unused __unused) count = sizeof(event.he_entropy); event.he_somecounter = (uint32_t)get_cyclecount(); event.he_size = count; - event.he_bits = count/4; /* Underestimate the size for Yarrow */ event.he_source = RANDOM_CACHED; event.he_destination = harvest_context.hc_destination[0]++; memcpy(event.he_entropy, data + i, sizeof(event.he_entropy)); @@ -459,8 +457,7 @@ SYSUNINIT(random_device_h_init, SI_SUB_RANDOM, SI_ORDE * read which can be quite expensive. */ void -random_harvest_queue_(const void *entropy, u_int size, u_int bits, - enum random_entropy_source origin) +random_harvest_queue_(const void *entropy, u_int size, enum random_entropy_source origin) { struct harvest_event *event; u_int ring_in; @@ -474,7 +471,6 @@ random_harvest_queue_(const void *entropy, u_int size, event->he_somecounter = (uint32_t)get_cyclecount(); event->he_source = origin; event->he_destination = harvest_context.hc_destination[origin]++; - event->he_bits = bits; if (size <= sizeof(event->he_entropy)) { event->he_size = size; memcpy(event->he_entropy, entropy, size); @@ -496,7 +492,7 @@ random_harvest_queue_(const void *entropy, u_int size, * This is the right place for high-rate harvested data. */ void -random_harvest_fast_(const void *entropy, u_int size, u_int bits) +random_harvest_fast_(const void *entropy, u_int size) { u_int pos; @@ -512,7 +508,7 @@ random_harvest_fast_(const void *entropy, u_int size, * (e.g.) booting when initial entropy is being gathered. */ void -random_harvest_direct_(const void *entropy, u_int size, u_int bits, enum random_entropy_source origin) +random_harvest_direct_(const void *entropy, u_int size, enum random_entropy_source origin) { struct harvest_event event; @@ -520,7 +516,6 @@ random_harvest_direct_(const void *entropy, u_int size size = MIN(size, sizeof(event.he_entropy)); event.he_somecounter = (uint32_t)get_cyclecount(); event.he_size = size; - event.he_bits = bits; event.he_source = origin; event.he_destination = harvest_context.hc_destination[origin]++; memcpy(event.he_entropy, entropy, size); Modified: head/sys/dev/random/random_harvestq.h ============================================================================== --- head/sys/dev/random/random_harvestq.h Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/random/random_harvestq.h Sun Aug 26 12:51:46 2018 (r338324) @@ -38,10 +38,9 @@ struct harvest_event { uint32_t he_somecounter; /* fast counter for clock jitter */ uint32_t he_entropy[HARVESTSIZE];/* some harvested entropy */ uint8_t he_size; /* harvested entropy byte count */ - uint8_t he_bits; /* stats about the entropy */ uint8_t he_destination; /* destination pool of this entropy */ uint8_t he_source; /* origin of the entropy */ -} __packed; +}; void read_rate_increment(u_int); Modified: head/sys/dev/random/randomdev.c ============================================================================== --- head/sys/dev/random/randomdev.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/random/randomdev.c Sun Aug 26 12:51:46 2018 (r338324) @@ -166,7 +166,7 @@ READ_RANDOM_UIO(struct uio *uio, bool nonblock) * Belt-and-braces. * Round up the read length to a crypto block size multiple, * which is what the underlying generator is expecting. - * See the random_buf size requirements in the Yarrow/Fortuna code. + * See the random_buf size requirements in the Fortuna code. */ read_len = roundup(read_len, RANDOM_BLOCKSIZE); /* Work in chunks page-sized or less */ @@ -250,7 +250,6 @@ randomdev_accumulate(uint8_t *buf, u_int count) for (i = 0; i < RANDOM_KEYSIZE_WORDS; i += sizeof(event.he_entropy)/sizeof(event.he_entropy[0])) { event.he_somecounter = (uint32_t)get_cyclecount(); event.he_size = sizeof(event.he_entropy); - event.he_bits = event.he_size/8; event.he_source = RANDOM_CACHED; event.he_destination = destination++; /* Harmless cheating */ memcpy(event.he_entropy, entropy_data + i, sizeof(event.he_entropy)); Modified: head/sys/dev/random/unit_test.c ============================================================================== --- head/sys/dev/random/unit_test.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/random/unit_test.c Sun Aug 26 12:51:46 2018 (r338324) @@ -31,7 +31,6 @@ cc -g -O0 -pthread -DRANDOM_ -I../.. -lstdthreads -Wall \ unit_test.c \ - yarrow.c \ fortuna.c \ hash.c \ ../../crypto/rijndael/rijndael-api-fst.c \ @@ -41,7 +40,9 @@ cc -g -O0 -pthread -DRANDOM_ -I../.. -lstdthreads -o unit_test ./unit_test -Where is YARROW or FORTUNA. +Where is FORTUNA. The parameterisation is a leftover from +when Yarrow was an option, and remains to enable the testing of +possible future algorithms. */ #include @@ -157,7 +158,6 @@ RunHarvester(void *arg __unused) e.he_somecounter = i; *((uint64_t *)e.he_entropy) = random(); e.he_size = 8; - e.he_bits = random()%4; e.he_destination = i; e.he_source = (i + 3)%7; e.he_next = NULL; Modified: head/sys/dev/random/unit_test.h ============================================================================== --- head/sys/dev/random/unit_test.h Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/random/unit_test.h Sun Aug 26 12:51:46 2018 (r338324) @@ -74,9 +74,8 @@ enum random_entropy_source { struct harvest_event { uintmax_t he_somecounter; /* fast counter for clock jitter */ uint32_t he_entropy[HARVESTSIZE];/* some harvested entropy */ - u_int he_size; /* harvested entropy byte count */ - u_int he_bits; /* stats about the entropy */ - u_int he_destination; /* destination pool of this entropy */ + uint8_t he_size; /* harvested entropy byte count */ + uint8_t he_destination; /* destination pool of this entropy */ enum random_entropy_source he_source; /* origin of the entropy */ void * he_next; /* next item on the list */ }; Modified: head/sys/dev/rndtest/rndtest.c ============================================================================== --- head/sys/dev/rndtest/rndtest.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/rndtest/rndtest.c Sun Aug 26 12:51:46 2018 (r338324) @@ -149,7 +149,7 @@ rndtest_harvest(struct rndtest_state *rsp, void *buf, rndstats.rst_discard += len; else /* MarkM: FIX!! Check that this does not swamp the harvester! */ - random_harvest_queue(buf, len, len*NBBY/2, RANDOM_PURE_RNDTEST); + random_harvest_queue(buf, len, RANDOM_PURE_RNDTEST); } static void Modified: head/sys/dev/safe/safe.c ============================================================================== --- head/sys/dev/safe/safe.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/safe/safe.c Sun Aug 26 12:51:46 2018 (r338324) @@ -212,7 +212,7 @@ static void default_harvest(struct rndtest_state *rsp, void *buf, u_int count) { /* MarkM: FIX!! Check that this does not swamp the harvester! */ - random_harvest_queue(buf, count, count*NBBY/2, RANDOM_PURE_SAFE); + random_harvest_queue(buf, count, RANDOM_PURE_SAFE); } #endif /* SAFE_NO_RNG */ Modified: head/sys/dev/syscons/scmouse.c ============================================================================== --- head/sys/dev/syscons/scmouse.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/syscons/scmouse.c Sun Aug 26 12:51:46 2018 (r338324) @@ -669,7 +669,7 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t dat mouse = (mouse_info_t*)data; - random_harvest_queue(mouse, sizeof(mouse_info_t), 2, RANDOM_MOUSE); + random_harvest_queue(mouse, sizeof(mouse_info_t), RANDOM_MOUSE); if (cmd == OLD_CONS_MOUSECTL) { static u_char swapb[] = { 0, 4, 2, 6, 1, 5, 3, 7 }; Modified: head/sys/dev/syscons/syscons.c ============================================================================== --- head/sys/dev/syscons/syscons.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/syscons/syscons.c Sun Aug 26 12:51:46 2018 (r338324) @@ -3734,7 +3734,7 @@ next_code: sc_touch_scrn_saver(); if (!(flags & SCGETC_CN)) - random_harvest_queue(&c, sizeof(c), 1, RANDOM_KEYBOARD); + random_harvest_queue(&c, sizeof(c), RANDOM_KEYBOARD); if (sc->kbd_open_level == 0 && scp->kbd_mode != K_XLATE) return KEYCHAR(c); Modified: head/sys/dev/ubsec/ubsec.c ============================================================================== --- head/sys/dev/ubsec/ubsec.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/ubsec/ubsec.c Sun Aug 26 12:51:46 2018 (r338324) @@ -260,7 +260,7 @@ static void default_harvest(struct rndtest_state *rsp, void *buf, u_int count) { /* MarkM: FIX!! Check that this does not swamp the harvester! */ - random_harvest_queue(buf, count, count*NBBY/2, RANDOM_PURE_UBSEC); + random_harvest_queue(buf, count, RANDOM_PURE_UBSEC); } static int Modified: head/sys/dev/virtio/random/virtio_random.c ============================================================================== --- head/sys/dev/virtio/random/virtio_random.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/virtio/random/virtio_random.c Sun Aug 26 12:51:46 2018 (r338324) @@ -217,8 +217,7 @@ vtrnd_harvest(struct vtrnd_softc *sc) virtqueue_notify(vq); virtqueue_poll(vq, NULL); - random_harvest_queue(&value, sizeof(value), sizeof(value) * NBBY / 2, - RANDOM_PURE_VIRTIO); + random_harvest_queue(&value, sizeof(value), RANDOM_PURE_VIRTIO); } static void Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/vt/vt_core.c Sun Aug 26 12:51:46 2018 (r338324) @@ -815,7 +815,7 @@ vt_processkey(keyboard_t *kbd, struct vt_device *vd, i { struct vt_window *vw = vd->vd_curwindow; - random_harvest_queue(&c, sizeof(c), 1, RANDOM_KEYBOARD); + random_harvest_queue(&c, sizeof(c), RANDOM_KEYBOARD); #if VT_ALT_TO_ESC_HACK if (c & RELKEY) { switch (c & ~RELKEY) { Modified: head/sys/dev/vt/vt_sysmouse.c ============================================================================== --- head/sys/dev/vt/vt_sysmouse.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/dev/vt/vt_sysmouse.c Sun Aug 26 12:51:46 2018 (r338324) @@ -214,7 +214,7 @@ sysmouse_process_event(mouse_info_t *mi) unsigned char buf[MOUSE_SYS_PACKETSIZE]; int x, y, iy, z; - random_harvest_queue(mi, sizeof *mi, 2, RANDOM_MOUSE); + random_harvest_queue(mi, sizeof *mi, RANDOM_MOUSE); mtx_lock(&sysmouse_lock); switch (mi->operation) { Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/fs/tmpfs/tmpfs_subr.c Sun Aug 26 12:51:46 2018 (r338324) @@ -1823,7 +1823,7 @@ tmpfs_itimes(struct vnode *vp, const struct timespec * TMPFS_NODE_UNLOCK(node); /* XXX: FIX? The entropy here is desirable, but the harvesting may be expensive */ - random_harvest_queue(node, sizeof(*node), 1, RANDOM_FS_ATIME); + random_harvest_queue(node, sizeof(*node), RANDOM_FS_ATIME); } void Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/kern/kern_intr.c Sun Aug 26 12:51:46 2018 (r338324) @@ -868,7 +868,7 @@ intr_event_schedule_thread(struct intr_event *ie) if (ie->ie_flags & IE_ENTROPY) { entropy.event = (uintptr_t)ie; entropy.td = ctd; - random_harvest_queue(&entropy, sizeof(entropy), 2, RANDOM_INTERRUPT); + random_harvest_queue(&entropy, sizeof(entropy), RANDOM_INTERRUPT); } KASSERT(td->td_proc != NULL, ("ithread %s has no process", ie->ie_name)); @@ -958,7 +958,7 @@ swi_sched(void *cookie, int flags) entropy.event = (uintptr_t)ih; entropy.td = curthread; - random_harvest_queue(&entropy, sizeof(entropy), 1, RANDOM_SWI); + random_harvest_queue(&entropy, sizeof(entropy), RANDOM_SWI); /* * Set ih_need for this handler so that if the ithread is already Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/kern/subr_bus.c Sun Aug 26 12:51:46 2018 (r338324) @@ -2925,6 +2925,7 @@ int device_attach(device_t dev) { uint64_t attachtime; + uint16_t attachentropy; int error; if (resource_disabled(dev->driver->name, dev->unit)) { @@ -2951,19 +2952,11 @@ device_attach(device_t dev) return (error); } dev->flags |= DF_ATTACHED_ONCE; - attachtime = get_cyclecount() - attachtime; - /* - * 4 bits per device is a reasonable value for desktop and server - * hardware with good get_cyclecount() implementations, but WILL - * need to be adjusted on other platforms. + /* We only need the low bits of this time, but ranges from tens to thousands + * have been seen, so keep 2 bytes' worth. */ -#define RANDOM_PROBE_BIT_GUESS 4 - if (bootverbose) - printf("random: harvesting attach, %zu bytes (%d bits) from %s%d\n", - sizeof(attachtime), RANDOM_PROBE_BIT_GUESS, - dev->driver->name, dev->unit); - random_harvest_direct(&attachtime, sizeof(attachtime), - RANDOM_PROBE_BIT_GUESS, RANDOM_ATTACH); + attachentropy = (uint16_t)(get_cyclecount() - attachtime); + random_harvest_direct(&attachentropy, sizeof(attachentropy), RANDOM_ATTACH); device_sysctl_update(dev); if (dev->busy) dev->state = DS_BUSY; Modified: head/sys/mips/cavium/octeon_rnd.c ============================================================================== --- head/sys/mips/cavium/octeon_rnd.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/mips/cavium/octeon_rnd.c Sun Aug 26 12:51:46 2018 (r338324) @@ -128,8 +128,7 @@ octeon_rnd_harvest(void *arg) for (i = 0; i < OCTEON_RND_WORDS; i++) sc->sc_entropy[i] = cvmx_rng_get_random64(); /* MarkM: FIX!! Check that this does not swamp the harvester! */ - random_harvest_queue(sc->sc_entropy, sizeof sc->sc_entropy, - (sizeof(sc->sc_entropy)*8)/2, RANDOM_PURE_OCTEON); + random_harvest_queue(sc->sc_entropy, sizeof sc->sc_entropy, RANDOM_PURE_OCTEON); callout_reset(&sc->sc_callout, hz * 5, octeon_rnd_harvest, sc); } Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/modules/Makefile Sun Aug 26 12:51:46 2018 (r338324) @@ -321,7 +321,6 @@ SUBDIR= \ ral \ ${_ralfw} \ ${_random_fortuna} \ - ${_random_yarrow} \ ${_random_other} \ rc4 \ ${_rdma} \ @@ -435,7 +434,6 @@ SUBDIR+= opensolaris _crypto= crypto _cryptodev= cryptodev _random_fortuna=random_fortuna -_random_yarrow= random_yarrow _random_other= random_other .endif .endif Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/net/if_ethersubr.c Sun Aug 26 12:51:46 2018 (r338324) @@ -514,7 +514,7 @@ ether_input_internal(struct ifnet *ifp, struct mbuf *m } eh = mtod(m, struct ether_header *); etype = ntohs(eh->ether_type); - random_harvest_queue_ether(m, sizeof(*m), 2); + random_harvest_queue_ether(m, sizeof(*m)); CURVNET_SET_QUIET(ifp->if_vnet); Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/net/if_tun.c Sun Aug 26 12:51:46 2018 (r338324) @@ -910,7 +910,7 @@ tunwrite(struct cdev *dev, struct uio *uio, int flag) m_freem(m); return (EAFNOSUPPORT); } - random_harvest_queue(m, sizeof(*m), 2, RANDOM_NET_TUN); + random_harvest_queue(m, sizeof(*m), RANDOM_NET_TUN); if_inc_counter(ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len); if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); CURVNET_SET(ifp->if_vnet); Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/netgraph/ng_iface.c Sun Aug 26 12:51:46 2018 (r338324) @@ -720,7 +720,7 @@ ng_iface_rcvdata(hook_p hook, item_p item) m_freem(m); return (EAFNOSUPPORT); } - random_harvest_queue(m, sizeof(*m), 2, RANDOM_NET_NG); + random_harvest_queue(m, sizeof(*m), RANDOM_NET_NG); M_SETFIB(m, ifp->if_fib); netisr_dispatch(isr, m); return (0); Modified: head/sys/sys/random.h ============================================================================== --- head/sys/sys/random.h Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/sys/random.h Sun Aug 26 12:51:46 2018 (r338324) @@ -35,12 +35,6 @@ #ifdef _KERNEL -#if !defined(KLD_MODULE) -#if defined(RANDOM_LOADABLE) && defined(RANDOM_YARROW) -#error "Cannot define both RANDOM_LOADABLE and RANDOM_YARROW" -#endif -#endif - struct uio; #if defined(DEV_RANDOM) @@ -108,57 +102,54 @@ enum random_entropy_source { #if defined(DEV_RANDOM) extern u_int hc_source_mask; -void random_harvest_queue_(const void *, u_int, u_int, enum random_entropy_source); -void random_harvest_fast_(const void *, u_int, u_int); -void random_harvest_direct_(const void *, u_int, u_int, enum random_entropy_source); +void random_harvest_queue_(const void *, u_int, enum random_entropy_source); +void random_harvest_fast_(const void *, u_int); +void random_harvest_direct_(const void *, u_int, enum random_entropy_source); static __inline void -random_harvest_queue(const void *entropy, u_int size, u_int bits, - enum random_entropy_source origin) +random_harvest_queue(const void *entropy, u_int size, enum random_entropy_source origin) { if (hc_source_mask & (1 << origin)) - random_harvest_queue_(entropy, size, bits, origin); + random_harvest_queue_(entropy, size, origin); } static __inline void -random_harvest_fast(const void *entropy, u_int size, u_int bits, - enum random_entropy_source origin) +random_harvest_fast(const void *entropy, u_int size, enum random_entropy_source origin) { if (hc_source_mask & (1 << origin)) - random_harvest_fast_(entropy, size, bits); + random_harvest_fast_(entropy, size); } static __inline void -random_harvest_direct(const void *entropy, u_int size, u_int bits, - enum random_entropy_source origin) +random_harvest_direct(const void *entropy, u_int size, enum random_entropy_source origin) { if (hc_source_mask & (1 << origin)) - random_harvest_direct_(entropy, size, bits, origin); + random_harvest_direct_(entropy, size, origin); } void random_harvest_register_source(enum random_entropy_source); void random_harvest_deregister_source(enum random_entropy_source); #else -#define random_harvest_queue(a, b, c, d) do {} while (0) -#define random_harvest_fast(a, b, c, d) do {} while (0) -#define random_harvest_direct(a, b, c, d) do {} while (0) +#define random_harvest_queue(a, b, c) do {} while (0) +#define random_harvest_fast(a, b, c) do {} while (0) +#define random_harvest_direct(a, b, c) do {} while (0) #define random_harvest_register_source(a) do {} while (0) #define random_harvest_deregister_source(a) do {} while (0) #endif #if defined(RANDOM_ENABLE_UMA) -#define random_harvest_fast_uma(a, b, c, d) random_harvest_fast(a, b, c, d) +#define random_harvest_fast_uma(a, b, c) random_harvest_fast(a, b, c) #else /* !defined(RANDOM_ENABLE_UMA) */ -#define random_harvest_fast_uma(a, b, c, d) do {} while (0) +#define random_harvest_fast_uma(a, b, c) do {} while (0) #endif /* defined(RANDOM_ENABLE_UMA) */ #if defined(RANDOM_ENABLE_ETHER) -#define random_harvest_queue_ether(a, b, c) random_harvest_queue(a, b, c, RANDOM_NET_ETHER) +#define random_harvest_queue_ether(a, b) random_harvest_queue(a, b, RANDOM_NET_ETHER) #else /* !defined(RANDOM_ENABLE_ETHER) */ -#define random_harvest_queue_ether(a, b, c) do {} while (0) +#define random_harvest_queue_ether(a, b) do {} while (0) #endif /* defined(RANDOM_ENABLE_ETHER) */ Modified: head/sys/ufs/ffs/ffs_inode.c ============================================================================== --- head/sys/ufs/ffs/ffs_inode.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/ufs/ffs/ffs_inode.c Sun Aug 26 12:51:46 2018 (r338324) @@ -149,12 +149,12 @@ loop: *((struct ufs1_dinode *)bp->b_data + ino_to_fsbo(fs, ip->i_number)) = *ip->i_din1; /* XXX: FIX? The entropy here is desirable, but the harvesting may be expensive */ - random_harvest_queue(&(ip->i_din1), sizeof(ip->i_din1), 1, RANDOM_FS_ATIME); + random_harvest_queue(&(ip->i_din1), sizeof(ip->i_din1), RANDOM_FS_ATIME); } else { *((struct ufs2_dinode *)bp->b_data + ino_to_fsbo(fs, ip->i_number)) = *ip->i_din2; /* XXX: FIX? The entropy here is desirable, but the harvesting may be expensive */ - random_harvest_queue(&(ip->i_din2), sizeof(ip->i_din2), 1, RANDOM_FS_ATIME); + random_harvest_queue(&(ip->i_din2), sizeof(ip->i_din2), RANDOM_FS_ATIME); } if (waitfor) error = bwrite(bp); Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sun Aug 26 05:28:17 2018 (r338323) +++ head/sys/vm/uma_core.c Sun Aug 26 12:51:46 2018 (r338324) @@ -2363,7 +2363,7 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags #endif /* Enable entropy collection for RANDOM_ENABLE_UMA kernel option */ - random_harvest_fast_uma(&zone, sizeof(zone), 1, RANDOM_UMA); + random_harvest_fast_uma(&zone, sizeof(zone), RANDOM_UMA); /* This is the fast path allocation */ CTR4(KTR_UMA, "uma_zalloc_arg thread %x zone %s(%p) flags %d", @@ -2572,7 +2572,7 @@ uma_zalloc_domain(uma_zone_t zone, void *udata, int do { /* Enable entropy collection for RANDOM_ENABLE_UMA kernel option */ - random_harvest_fast_uma(&zone, sizeof(zone), 1, RANDOM_UMA); + random_harvest_fast_uma(&zone, sizeof(zone), RANDOM_UMA); /* This is the fast path allocation */ CTR5(KTR_UMA, @@ -3032,7 +3032,7 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata #endif /* Enable entropy collection for RANDOM_ENABLE_UMA kernel option */ - random_harvest_fast_uma(&zone, sizeof(zone), 1, RANDOM_UMA); + random_harvest_fast_uma(&zone, sizeof(zone), RANDOM_UMA); CTR2(KTR_UMA, "uma_zfree_arg thread %x zone %s", curthread, zone->uz_name); @@ -3208,7 +3208,7 @@ uma_zfree_domain(uma_zone_t zone, void *item, void *ud { /* Enable entropy collection for RANDOM_ENABLE_UMA kernel option */ - random_harvest_fast_uma(&zone, sizeof(zone), 1, RANDOM_UMA); + random_harvest_fast_uma(&zone, sizeof(zone), RANDOM_UMA); CTR2(KTR_UMA, "uma_zfree_domain thread %x zone %s", curthread, zone->uz_name); Modified: head/tools/tools/sysdoc/tunables.mdoc ============================================================================== --- head/tools/tools/sysdoc/tunables.mdoc Sun Aug 26 05:28:17 2018 (r338323) +++ head/tools/tools/sysdoc/tunables.mdoc Sun Aug 26 12:51:46 2018 (r338324) @@ -1122,21 +1122,6 @@ kern.random.sys.harvest.swi kern.random.sys.seeded --- -kern.random.yarrow.bins - ---- -kern.random.yarrow.fastthresh - ---- -kern.random.yarrow.gengateinterval - ---- -kern.random.yarrow.slowoverthresh - ---- -kern.random.yarrow.slowthresh - ---- kern.randompid --- From owner-svn-src-head@freebsd.org Sun Aug 26 17:05:43 2018 Return-Path: Delivered-To: svn-src-head@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 DE648107B6F4; Sun, 26 Aug 2018 17:05:43 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93954871BF; Sun, 26 Aug 2018 17:05:43 +0000 (UTC) (envelope-from sbruno@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 75CDD11C49; Sun, 26 Aug 2018 17:05:43 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7QH5hl4063248; Sun, 26 Aug 2018 17:05:43 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7QH5hm6063247; Sun, 26 Aug 2018 17:05:43 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201808261705.w7QH5hm6063247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 26 Aug 2018 17:05:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338330 - head/lib/libmd X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/lib/libmd X-SVN-Commit-Revision: 338330 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2018 17:05:44 -0000 Author: sbruno Date: Sun Aug 26 17:05:43 2018 New Revision: 338330 URL: https://svnweb.freebsd.org/changeset/base/338330 Log: r338270 had the side effect of no longer installing libmd.so into /lib. For users who have a seperate zfs mount of /usr or /usr/lib, this will cause dynamic loading failures when attempting to execute zfs mount on bootup. E.g. the system won't boot. Including sets SHLIBDIR, so SHLIBDIR?= has no effect. The other lib/ Makefiles solve this problem by moving the SHLIBDIR assignment to before .include . Submitted by: jilles Reviewed by: allanjude Approved by: re (rgrimes) Differential Revision: https://reviews.freebsd.org/D16910 Modified: head/lib/libmd/Makefile Modified: head/lib/libmd/Makefile ============================================================================== --- head/lib/libmd/Makefile Sun Aug 26 13:08:50 2018 (r338329) +++ head/lib/libmd/Makefile Sun Aug 26 17:05:43 2018 (r338330) @@ -1,11 +1,12 @@ # $FreeBSD$ +SHLIBDIR?= /lib + .include PACKAGE=lib${LIB} LIB= md SHLIB_MAJOR= 6 -SHLIBDIR?= /lib SRCS= md4c.c md5c.c md4hl.c md5hl.c \ rmd160c.c rmd160hl.c \ sha0c.c sha0hl.c sha1c.c sha1hl.c \ From owner-svn-src-head@freebsd.org Sun Aug 26 17:11:21 2018 Return-Path: Delivered-To: svn-src-head@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 91584107BA03 for ; Sun, 26 Aug 2018 17:11:21 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2r.ore.mailhop.org (outbound2r.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C609880B7 for ; Sun, 26 Aug 2018 17:11:20 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 07fab455-a953-11e8-9234-0d515945242e X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 07fab455-a953-11e8-9234-0d515945242e; Sun, 26 Aug 2018 17:11:12 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w7QHBBwO006005; Sun, 26 Aug 2018 11:11:11 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1535303471.22114.1.camel@freebsd.org> Subject: Re: svn commit: r338330 - head/lib/libmd From: Ian Lepore To: Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 26 Aug 2018 11:11:11 -0600 In-Reply-To: <201808261705.w7QH5hm6063247@repo.freebsd.org> References: <201808261705.w7QH5hm6063247@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2018 17:11:21 -0000 On Sun, 2018-08-26 at 17:05 +0000, Sean Bruno wrote: > Author: sbruno > Date: Sun Aug 26 17:05:43 2018 > New Revision: 338330 > URL: https://svnweb.freebsd.org/changeset/base/338330 > > Log: >   r338270 had the side effect of no longer installing libmd.so into /lib. >   For users who have a seperate zfs mount of /usr or /usr/lib, this will >   cause dynamic loading failures when attempting to execute zfs mount on >   bootup. E.g. the system won't boot. >    >   Including sets SHLIBDIR, so SHLIBDIR?= has no >   effect.  The other lib/ Makefiles solve this problem by moving the >   SHLIBDIR  assignment to before .include . >    >   Submitted by: jilles >   Reviewed by: allanjude >   Approved by: re (rgrimes) >   Differential Revision: https://reviews.freebsd.org/D16910 > > Modified: >   head/lib/libmd/Makefile > > Modified: head/lib/libmd/Makefile > ============================================================================== > --- head/lib/libmd/Makefile Sun Aug 26 13:08:50 2018 (r338329) > +++ head/lib/libmd/Makefile Sun Aug 26 17:05:43 2018 (r338330) > @@ -1,11 +1,12 @@ >  # $FreeBSD$ >   > +SHLIBDIR?= /lib > + >  .include >   >  PACKAGE=lib${LIB} >  LIB= md >  SHLIB_MAJOR= 6 > -SHLIBDIR?= /lib >  SRCS= md4c.c md5c.c md4hl.c md5hl.c \ >   rmd160c.c rmd160hl.c \ >   sha0c.c sha0hl.c sha1c.c sha1hl.c \ > I'm curious why this is the preferred solution, as opposed to just leaving the assignment where it is and changing ?= to just =. -- Ian From owner-svn-src-head@freebsd.org Sun Aug 26 17:13:49 2018 Return-Path: Delivered-To: svn-src-head@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 7AE97107BD00; Sun, 26 Aug 2018 17:13:49 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C13C884BA; Sun, 26 Aug 2018 17:13:48 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.0.6] (97-123-187-182.albq.qwest.net [97.123.187.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 208DC1AF510; Sun, 26 Aug 2018 09:36:36 +0000 (UTC) Subject: Re: svn commit: r338330 - head/lib/libmd To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808261705.w7QH5hm6063247@repo.freebsd.org> <1535303471.22114.1.camel@freebsd.org> From: Sean Bruno Openpgp: preference=signencrypt Autocrypt: addr=sbruno@freebsd.org; prefer-encrypt=mutual; keydata= xsBNBFk+0UEBCADaf4bgxxKvMOhRV5NPoGWRCCGm49d6+1VFNlQ77WsY/+Zvf95TPULdRlnG w648KfxWt7+O3kdKhdRwnqlXWC7zA2Qt0dRE1yIqOGJ4jp4INvp/bcxWzgr0aoKOjrlnfxRV bh+s0rzdZt6TsNL3cVYxkC8oezjaUkHdW4mFJU249U1QJogkF8g0FeKNfEcjEkwJNX6lQJH+ EzCWT0NCk6J+Xyo+zOOljxPp1OUfdvZi3ulkU/qTZstGVWxFVsP8xQklV/y3AFcbIYx6iGJ4 5L7WuB0IWhO7Z4yHENr8wFaNYwpod9i4egX2BugbrM8pOfhN2/qqdeG1L5LMtXw3yyAhABEB AAHNN1NlYW4gQnJ1bm8gKEZyZWVCU0QgRGV2ZWxvcGVyIEtleSkgPHNicnVub0BmcmVlYnNk Lm9yZz7CwJQEEwEKAD4WIQToxOn4gDUE4eP0ujS95PX+ibX8tgUCWT7RQQIbAwUJBaOagAUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAAKCRC95PX+ibX8ttKTCACFKzRc56EBAlVotq02EjZP SfX+unlk6AuPBzShxqRxeK+bGYVCigrYd1M8nnskv0dEiZ5iYeND9HIxbpEyopqgpVTibA7w gBXaZ7SOEhNX1wXwg14JrralfSmPFMYni+sWegPMX/zwfAsn1z4mG1Nn44Xqo3o7CfpkMPy6 M5Bow2IDzIhEYISLR+urxs74/aHU35PLtBSDtu18914SEMDdva27MARN8mbeCDbuJVfGCPWy YHuy2t+9u2Zn5Dd+t3sBXLM9gpeaMm+4x6TNPpESygbVdh4tDdjVZ9DK/bWFg0kMgfZoaq6J l0jNsQXrZV3bzYNFbVw04pFcvA2GIJ7xzsBNBFk+0UEBCADIXBmQOaKMHGbc9vwjhV4Oj5aZ DdhNedn12FVeTdOXJvuTOusgxS29lla0RenHGDsgD08UiFpasBXWq/E+BhQ19d+iRbLLR17O KKc1ZGefoVbLARLXD68J5j4XAyK+6k2KqBLlqzAEpHTzsksM9naARkVXiEVcrt6ciw0FSm8n kuK3gDKKe93XfzfP+TQdbvvzJc7Fa+appLbXz61TM1aikaQlda8bWubDegwXbuoJdB34xU1m yjr/N4o+raL0x7QrzdH+wwgrTTo+H4S2c1972Skt5K5tbxLowfHicRl23V8itVQr3sBtlX4+ 66q+Apm7+R36bUS/k+G45Sp6iPpxABEBAAHCwHwEGAEKACYWIQToxOn4gDUE4eP0ujS95PX+ ibX8tgUCWT7RQQIbDAUJBaOagAAKCRC95PX+ibX8trrIB/9Pljqt/JGamD9tx4dOVmxSyFg9 z2xzgklTLuDgS73MM120mM7ao9AQUeWiSle/H0UCK7xPOzC/aeUC4oygDQKAfkkNbCNTo3+A qDjBRA8qx0e9a/QjDL+RFgD4L5kLT4tToY8T8HaBp8h03LBfk510IaI8oL/Jg7vpM3PDtJMW tUi2H+yNFmL3NfM2oBToWKLFsoP54f/eeeImrNnrlLjLHPzqS+/9apgYqX2Jwiv3tHBc4FTO GuY8VvF7BpixJs8Pc2RUuCfSyodrp1YG1kRGlXAH0cqwwr0Zmk4+7dZvtVQMCl6kS6q1+84q JwtItxS2eXSEA4NO0sQ3BXUywANh Message-ID: <99eb23a6-a359-7db0-99a7-bd844bdc40b9@freebsd.org> Date: Sun, 26 Aug 2018 11:13:44 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1535303471.22114.1.camel@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DQ55ldrGKt0MtRl5D9uiwzk7XfzEfb2Hj" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2018 17:13:49 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --DQ55ldrGKt0MtRl5D9uiwzk7XfzEfb2Hj Content-Type: multipart/mixed; boundary="MWYD95gi7p4PVgH1Dl9FYpWetKJ8PuHt7"; protected-headers="v1" From: Sean Bruno To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <99eb23a6-a359-7db0-99a7-bd844bdc40b9@freebsd.org> Subject: Re: svn commit: r338330 - head/lib/libmd References: <201808261705.w7QH5hm6063247@repo.freebsd.org> <1535303471.22114.1.camel@freebsd.org> In-Reply-To: <1535303471.22114.1.camel@freebsd.org> --MWYD95gi7p4PVgH1Dl9FYpWetKJ8PuHt7 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 08/26/18 11:11, Ian Lepore wrote: >> Modified: head/lib/libmd/Makefile >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libmd/Makefile Sun Aug 26 13:08:50 2018 (r338329) >> +++ head/lib/libmd/Makefile Sun Aug 26 17:05:43 2018 (r338330) >> @@ -1,11 +1,12 @@ >> =C2=A0# $FreeBSD$ >> =C2=A0 >> +SHLIBDIR?=3D /lib >> + >> =C2=A0.include=20 >> =C2=A0 >> =C2=A0PACKAGE=3Dlib${LIB} >> =C2=A0LIB=3D md >> =C2=A0SHLIB_MAJOR=3D 6 >> -SHLIBDIR?=3D /lib >> =C2=A0SRCS=3D md4c.c md5c.c md4hl.c md5hl.c \ >> =C2=A0 rmd160c.c rmd160hl.c \ >> =C2=A0 sha0c.c sha0hl.c sha1c.c sha1hl.c \ >> > I'm curious why this is the preferred solution, as opposed to just > leaving the assignment where it is and changing ?=3D to just =3D. >=20 > -- Ian >=20 >=20 I'm unsure if there is or isn't a preferred solution. There appear to be multiple ways of doing this strewn about the tree. This appears to be "a way" of fixing the state of -current at the moment. I leave it to others more versed in the intricacies of Makefile dark magic to scry a solution from the aether. sean --MWYD95gi7p4PVgH1Dl9FYpWetKJ8PuHt7-- --DQ55ldrGKt0MtRl5D9uiwzk7XfzEfb2Hj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAluC38hfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4 QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1 /LZS5AgAg3nco+5JvYHXrCzAK5SPsxw2HYdHbEYDU9IqZQx6/4gLNZOuL3UOYRza vi8JZGyiFROHts1aKPbj/TVAySsQuUt/orz1WMt0FgmdkiQ/TY79SeDcRRXN74DN ZVVHK7blIItU9/XgyZDe7hUqVOEWgXkOV6SaV8hLopgAxnN4u9oQW3YbDPB51Emb REj+ccG/Yn+y0mD8Qj0TwMw6sSXLpxcrpvvYYFB3Qs9dl9j+Ics/OZKNvowFxwLi tLyDXC1g8TZTWJvflwYt0TptwrHl1UYs+kd1n45mhXLx9lvsLBa91ysEHPHW6cTh hssG2xJcb9bdI5QGZEOs6RtBRwtXZA== =hz0N -----END PGP SIGNATURE----- --DQ55ldrGKt0MtRl5D9uiwzk7XfzEfb2Hj-- From owner-svn-src-head@freebsd.org Sun Aug 26 17:15:26 2018 Return-Path: Delivered-To: svn-src-head@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 4A1E3107BDF9; Sun, 26 Aug 2018 17:15:26 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF3EE88645; Sun, 26 Aug 2018 17:15:25 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w7QHFNDe006844; Sun, 26 Aug 2018 10:15:23 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w7QHFNkM006843; Sun, 26 Aug 2018 10:15:23 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808261715.w7QHFNkM006843@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r338330 - head/lib/libmd In-Reply-To: <1535303471.22114.1.camel@freebsd.org> To: Ian Lepore Date: Sun, 26 Aug 2018 10:15:23 -0700 (PDT) CC: Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2018 17:15:26 -0000 > On Sun, 2018-08-26 at 17:05 +0000, Sean Bruno wrote: > > Author: sbruno > > Date: Sun Aug 26 17:05:43 2018 > > New Revision: 338330 > > URL: https://svnweb.freebsd.org/changeset/base/338330 > > > > Log: > > ? r338270 had the side effect of no longer installing libmd.so into /lib. > > ? For users who have a seperate zfs mount of /usr or /usr/lib, this will > > ? cause dynamic loading failures when attempting to execute zfs mount on > > ? bootup. E.g. the system won't boot. > > ?? > > ? Including sets SHLIBDIR, so SHLIBDIR?= has no > > ? effect.??The other lib/ Makefiles solve this problem by moving the > > ? SHLIBDIR??assignment to before .include . > > ?? > > ? Submitted by: jilles > > ? Reviewed by: allanjude > > ? Approved by: re (rgrimes) > > ? Differential Revision: https://reviews.freebsd.org/D16910 > > > > Modified: > > ? head/lib/libmd/Makefile > > > > Modified: head/lib/libmd/Makefile > > ============================================================================== > > --- head/lib/libmd/Makefile Sun Aug 26 13:08:50 2018 (r338329) > > +++ head/lib/libmd/Makefile Sun Aug 26 17:05:43 2018 (r338330) > > @@ -1,11 +1,12 @@ > > ?# $FreeBSD$ > > ? > > +SHLIBDIR?= /lib > > + > > ?.include > > ? > > ?PACKAGE=lib${LIB} > > ?LIB= md > > ?SHLIB_MAJOR= 6 > > -SHLIBDIR?= /lib > > ?SRCS= md4c.c md5c.c md4hl.c md5hl.c \ > > ? rmd160c.c rmd160hl.c \ > > ? sha0c.c sha0hl.c sha1c.c sha1hl.c \ > > > > I'm curious why this is the preferred solution, as opposed to just > leaving the assignment where it is and changing ?= to just =. I think that reason would be that one could override SHLIBDIR from a higher level, if they happened to need to do that. Ie, I could build a FreeBSD release that had SHLIBDIR=/usr/lib from the top level and it would just work. (This can be done if you know that / and /usr/lib well be in the same file system for instance. I could also build SHLIBDIR=/lib and forgo the need for /usr/lib. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sun Aug 26 17:24:18 2018 Return-Path: Delivered-To: svn-src-head@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 990D7107C184 for ; Sun, 26 Aug 2018 17:24:18 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2227F88BA6 for ; Sun, 26 Aug 2018 17:24:18 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: d531aba1-a954-11e8-aff6-0b9b8210da61 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id d531aba1-a954-11e8-aff6-0b9b8210da61; Sun, 26 Aug 2018 17:24:06 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w7QHO53C006034; Sun, 26 Aug 2018 11:24:05 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1535304244.22114.3.camel@freebsd.org> Subject: Re: svn commit: r338330 - head/lib/libmd From: Ian Lepore To: rgrimes@freebsd.org Cc: Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 26 Aug 2018 11:24:04 -0600 In-Reply-To: <201808261715.w7QHFNkM006843@pdx.rh.CN85.dnsmgr.net> References: <201808261715.w7QHFNkM006843@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2018 17:24:18 -0000 On Sun, 2018-08-26 at 10:15 -0700, Rodney W. Grimes wrote: > > > > On Sun, 2018-08-26 at 17:05 +0000, Sean Bruno wrote: > > > > > > Author: sbruno > > > Date: Sun Aug 26 17:05:43 2018 > > > New Revision: 338330 > > > URL: https://svnweb.freebsd.org/changeset/base/338330 > > > > > > Log: > > > ? r338270 had the side effect of no longer installing libmd.so > > > into /lib. > > > ? For users who have a seperate zfs mount of /usr or /usr/lib, > > > this will > > > ? cause dynamic loading failures when attempting to execute zfs > > > mount on > > > ? bootup. E.g. the system won't boot. > > > ?? > > > ? Including  sets SHLIBDIR, so SHLIBDIR?= has no > > > ? effect.??The other lib/ Makefiles solve this problem by moving > > > the > > > ? SHLIBDIR??assignment to before .include . > > > ?? > > > ? Submitted by: jilles > > > ? Reviewed by: allanjude > > > ? Approved by: re (rgrimes) > > > ? Differential Revision: https://reviews.freebsd.org/D1691 > > > 0 > > > > > > Modified: > > > ? head/lib/libmd/Makefile > > > > > > Modified: head/lib/libmd/Makefile > > > ================================================================= > > > ============= > > > --- head/lib/libmd/Makefile Sun Aug 26 13:08:50 2018 > > > (r338329) > > > +++ head/lib/libmd/Makefile Sun Aug 26 17:05:43 2018 > > > (r338330) > > > @@ -1,11 +1,12 @@ > > > ?# $FreeBSD$ > > > ? > > > +SHLIBDIR?= /lib > > > + > > > ?.include  > > > ? > > > ?PACKAGE=lib${LIB} > > > ?LIB= md > > > ?SHLIB_MAJOR= 6 > > > -SHLIBDIR?= /lib > > > ?SRCS= md4c.c md5c.c md4hl.c md5hl.c \ > > > ? rmd160c.c rmd160hl.c \ > > > ? sha0c.c sha0hl.c sha1c.c sha1hl.c \ > > > > > I'm curious why this is the preferred solution, as opposed to just > > leaving the assignment where it is and changing ?= to just =. > I think that reason would be that one could override > SHLIBDIR from a higher level, if they happened to > need to do that.  Ie, I could build a FreeBSD release > that had SHLIBDIR=/usr/lib from the top level and > it would just work.  (This can be done if you know > that / and /usr/lib well be in the same file system > for instance.  I could also build SHLIBDIR=/lib and > forgo the need for /usr/lib. > Oh, hmm. I wasn't thinking of that as a knob that would be controllable from outside of the build system internals. IMO, that whole subject is a bit of a weakness of the freebsd build machinery... we don't define, either via documentation or (better, IMO) via consistant variable and target name prefixes, which things are intended to be user-settable controls and which are intended only for internal use. -- Ian From owner-svn-src-head@freebsd.org Sun Aug 26 17:30:31 2018 Return-Path: Delivered-To: svn-src-head@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 435F9107C4DA; Sun, 26 Aug 2018 17:30:31 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0EEA88F1B; Sun, 26 Aug 2018 17:30:30 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w7QHUSgB006923; Sun, 26 Aug 2018 10:30:28 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w7QHUQXc006922; Sun, 26 Aug 2018 10:30:26 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808261730.w7QHUQXc006922@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r338330 - head/lib/libmd In-Reply-To: <1535304244.22114.3.camel@freebsd.org> To: Ian Lepore Date: Sun, 26 Aug 2018 10:30:26 -0700 (PDT) CC: rgrimes@freebsd.org, Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2018 17:30:31 -0000 > On Sun, 2018-08-26 at 10:15 -0700, Rodney W. Grimes wrote: > > > > > > On Sun, 2018-08-26 at 17:05 +0000, Sean Bruno wrote: > > > > > > > > Author: sbruno > > > > Date: Sun Aug 26 17:05:43 2018 > > > > New Revision: 338330 > > > > URL: https://svnweb.freebsd.org/changeset/base/338330 > > > > > > > > Log: > > > > ? r338270 had the side effect of no longer installing libmd.so > > > > into /lib. > > > > ? For users who have a seperate zfs mount of /usr or /usr/lib, > > > > this will > > > > ? cause dynamic loading failures when attempting to execute zfs > > > > mount on > > > > ? bootup. E.g. the system won't boot. > > > > ?? > > > > ? Including??sets SHLIBDIR, so SHLIBDIR?= has no > > > > ? effect.??The other lib/ Makefiles solve this problem by moving > > > > the > > > > ? SHLIBDIR??assignment to before .include . > > > > ?? > > > > ? Submitted by: jilles > > > > ? Reviewed by: allanjude > > > > ? Approved by: re (rgrimes) > > > > ? Differential Revision: https://reviews.freebsd.org/D1691 > > > > 0 > > > > > > > > Modified: > > > > ? head/lib/libmd/Makefile > > > > > > > > Modified: head/lib/libmd/Makefile > > > > ================================================================= > > > > ============= > > > > --- head/lib/libmd/Makefile Sun Aug 26 13:08:50 2018 > > > > (r338329) > > > > +++ head/lib/libmd/Makefile Sun Aug 26 17:05:43 2018 > > > > (r338330) > > > > @@ -1,11 +1,12 @@ > > > > ?# $FreeBSD$ > > > > ? > > > > +SHLIBDIR?= /lib > > > > + > > > > ?.include? > > > > ? > > > > ?PACKAGE=lib${LIB} > > > > ?LIB= md > > > > ?SHLIB_MAJOR= 6 > > > > -SHLIBDIR?= /lib > > > > ?SRCS= md4c.c md5c.c md4hl.c md5hl.c \ > > > > ? rmd160c.c rmd160hl.c \ > > > > ? sha0c.c sha0hl.c sha1c.c sha1hl.c \ > > > > > > > I'm curious why this is the preferred solution, as opposed to just > > > leaving the assignment where it is and changing ?= to just =. > > I think that reason would be that one could override > > SHLIBDIR from a higher level, if they happened to > > need to do that.??Ie, I could build a FreeBSD release > > that had SHLIBDIR=/usr/lib from the top level and > > it would just work.??(This can be done if you know > > that / and /usr/lib well be in the same file system > > for instance.??I could also build SHLIBDIR=/lib and > > forgo the need for /usr/lib. > > > > Oh, hmm. I wasn't thinking of that as a knob that would be controllable > from outside of the build system internals. IMO, that whole subject is > a bit of a weakness of the freebsd build machinery... we don't define, > either via documentation or (better, IMO) via consistant variable and > target name prefixes, which things are intended to be user-settable > controls and which are intended only for internal use. Back in the day it most of it was defined fairly well, but over time as the complexity grew things have become rather muddy. I also suspect that there is probably some breakage if you try to do what I mention above, but those are bugs that should be fixed. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sun Aug 26 18:04:55 2018 Return-Path: Delivered-To: svn-src-head@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 7940E107D5BB; Sun, 26 Aug 2018 18:04:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F55A8A1FD; Sun, 26 Aug 2018 18:04:55 +0000 (UTC) (envelope-from delphij@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 0D741125EC; Sun, 26 Aug 2018 18:04:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7QI4sCf093988; Sun, 26 Aug 2018 18:04:54 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7QI4sgo093986; Sun, 26 Aug 2018 18:04:54 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201808261804.w7QI4sgo093986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 26 Aug 2018 18:04:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338331 - in head: include sys/sys X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head: include sys/sys X-SVN-Commit-Revision: 338331 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2018 18:04:55 -0000 Author: delphij Date: Sun Aug 26 18:04:54 2018 New Revision: 338331 URL: https://svnweb.freebsd.org/changeset/base/338331 Log: Remove arc4random_stir and arc4random_addrandom from stdlib.h. Users of arc4random(3) should never call them directly. All ports tree usage was fixed as part of bug 230756. Relnotes: yes Approved by: re (marius), exp-run (bug 230756 by portmgr antoine) Modified: head/include/stdlib.h head/sys/sys/param.h Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Sun Aug 26 17:05:43 2018 (r338330) +++ head/include/stdlib.h Sun Aug 26 18:04:54 2018 (r338331) @@ -254,12 +254,6 @@ void arc4random_buf(void *, size_t); __uint32_t arc4random_uniform(__uint32_t); -#if !defined(BURN_BRIDGES) -/* Deprecated arc4random() functions */ -#define arc4random_stir() -#define arc4random_addrandom(a,b) -#endif - #ifdef __BLOCKS__ int atexit_b(void (^ _Nonnull)(void)); void *bsearch_b(const void *, const void *, size_t, Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Aug 26 17:05:43 2018 (r338330) +++ head/sys/sys/param.h Sun Aug 26 18:04:54 2018 (r338331) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200082 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200083 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Sun Aug 26 20:55:16 2018 Return-Path: Delivered-To: svn-src-head@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 242051081DDD for ; Sun, 26 Aug 2018 20:55:16 +0000 (UTC) (envelope-from 010001657804d3c0-858697d6-ff41-4f90-aa49-211bc5b341e1-000000@amazonses.com) Received: from a8-52.smtp-out.amazonses.com (a8-52.smtp-out.amazonses.com [54.240.8.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7A1470BD7 for ; Sun, 26 Aug 2018 20:55:15 +0000 (UTC) (envelope-from 010001657804d3c0-858697d6-ff41-4f90-aa49-211bc5b341e1-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=dqtolf56kk3wpt62c3jnwboqvr7iedax; d=tarsnap.com; t=1535316908; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type; bh=oH9pcCj7VZGNM7R0xKdSkud/xleKpsYjciEV1Peu2n0=; b=YeKC0rZEpOCUQrSR0MZFYpX+bGsdw18m+Kkh/z1rCcOiGMsg2aJYyaiTgwuHdAXF 0r1bEdZOFseDYJrKCZmVGxwARsv40Mi/ycT3agssj/yEG1SoafiloI/bQ80SvrVFtSi RvwbiGKw1QmJXAOvuumyY/wlAvqsu7lvMv0C9zPI= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1535316908; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Feedback-ID; bh=oH9pcCj7VZGNM7R0xKdSkud/xleKpsYjciEV1Peu2n0=; b=gCY3MasMumlLMSwDZJak7PHbbJ1UWyLbyzxW/kvOeIycNLXCIBU4hHijLDZ6YEsN fvXAPDff4etYrb/lsomC4iGM0MP4JjNvfYXj0MyQfvJcggiujOnGa+vXkmNNbFvmWpj vQn1vY9nOqRR8XGCvp5W9LvuZyQ3VDvnSu53LDj4= Subject: Re: svn commit: r335668 - head/sys/x86/xen To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201806261500.w5QF0s1I071232@repo.freebsd.org> From: Colin Percival Openpgp: preference=signencrypt Autocrypt: addr=cperciva@tarsnap.com; prefer-encrypt=mutual; keydata= xsDhBElrAAcRBACDfDys4ZtK+ErCJ1HAzYeteKpm3OEsvT/49AjUTLihkF79HhIKrCQU+1KC zv7BwHCMLb6hq30As9L7iFKG7n5QFLFC4Te/VcITUnWHMG/c3ViLOfJGvi+9/nOEHaM1dVJY D6tEp5yM1nHmVQpo9932j4KGuGFR0LhOK5IHXOSfGwCgxSFDPdgxe2OEjWxjGgY+oV3EafcD +JROXCTjlcQiG/OguQH4Vks3mhHfFnEppLxTkDuYgHZQiUtpcT9ssH5khgqoTyMar05OUdAj ZIhNbWDh4LgTj+7ZmvLhXT5Zxw8LX9d7T36aTB8XDQSenDqEtinMWOb0TCBBLbsB8EFG1WTT ESbZci9jJS5yhtktuZoY/eM8uXMD/3k4FWFO80VRRkELSp+XSy/VlSQjyi/rhl2nQq/oOA9F oJbDaB0yq9VNhxP+uFBzBWSqeIX0t1ZWLtNfVFr4TRP5hihI5ICrg/0OpqgisKsU2NFe9xyO hyJLYmfD8ebpDJ/9k30C7Iju9pVrwLm1QgS4S2fqJRcR+U4WbjvP7CgSzSVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+wmEEExECACEFAklrALYCGwMHCwkIBwMCAQQV AggDBBYCAwECHgECF4AACgkQOM7KaQxqam6/igCgn+z2k3V5ggNppmWrZstt1U2lugsAoL7L wS9V9yLtil3oWmHtwpUqYruEzsFNBElrAAcQCAD3ZLMIsP4CIDoJORg+YY0lqLVBgcnF7pFb 4Uy2+KvdWofN+DKH61rZLjgXXkNE9M4EQC1B4lGttBP8IY2gs41y3AUogGdyFbidq99rCBz7 LTsgARHwFxZoaHmXyiZLEU1QZuMqwPZV1mCviRhN5E3rRqYNXVcrnXAAuhBpvNyj/ntHvcDN 2/m+ochiuBYueU4kX3lHya7sOj+mTsndcWmQ9soOUyr8O0r/BG088bMn4qqtUw4dl5/pglXk jbl7uOOPinKf0WVd2r6M0wLPJCD4NPHrCWRLLLAjwfjrtoSRvXxDbXhCdgGBa72+K8eYLzVs hgq7tJOoBWzjVK6XRxR7AAMGB/9Mo3iJ2DxqDecd02KCB5BsFDICbJGhPltU7FwrtbC7djSb XUrwsEVLHi4st4cbdGNCWCrp0BRezXZKohKnNAPFOTK++ZfgeKxrV2sJod+Q9RILF86tQ4XF 7A7Yme5hy92t/WgiU4vc/fWbgP8gV/19f8nunaT2E9NSa70mZFjZNu4iuwThoUUO5CV3Wo0Y UISsnRK8XD1+LR3A2qVyLiFRwh/miC1hgLFCTGCQ3GLxZeZzIpYSlGdQJ0L5lixW5ZQD9r1I 8i/8zhE6qRFAM0upUMI3Gt1Oq2w03DiXrZU0Fu/R8Rm8rlnkQKA+95mRTUq1xL5P5NZIi4gJ Z569OPMFwkkEGBECAAkFAklrAAcCGwwACgkQOM7KaQxqam41igCfbaldnFTu5uAdrnrghESv EI3CAo8AoLkNMks1pThl2BJNRm4CtTK9xZeH Message-ID: <010001657804d3c0-858697d6-ff41-4f90-aa49-211bc5b341e1-000000@email.amazonses.com> Date: Sun, 26 Aug 2018 20:55:07 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <201806261500.w5QF0s1I071232@repo.freebsd.org> Content-Language: en-US X-SES-Outgoing: 2018.08.26-54.240.8.52 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2018 20:55:16 -0000 This breaks the kernel boot in EC2 Xen-based instances; it now hangs in the taskqgroup_adjust_if_io_tqg SYSINIT. I've attached a verbose dmesg from r335666 in case that helps you figure out what's going on. My guess is that EC2 is numbering virtual CPUs oddly -- but regardless of the cause, this definitely needs to be fixed. Colin Percival On 6/26/18 8:00 AM, Roger Pau Monné wrote: > Author: royger > Date: Tue Jun 26 15:00:54 2018 > New Revision: 335668 > URL: https://svnweb.freebsd.org/changeset/base/335668 > > Log: > xen: obtain vCPU ID from CPUID > > The Xen vCPU ID can be fetched from the cpuid instead of inferring it > from the ACPI ID. > > Sponsored by: Citrix Systems R&D > > Modified: > head/sys/x86/xen/hvm.c > > Modified: head/sys/x86/xen/hvm.c > ============================================================================== > --- head/sys/x86/xen/hvm.c Tue Jun 26 14:48:23 2018 (r335667) > +++ head/sys/x86/xen/hvm.c Tue Jun 26 15:00:54 2018 (r335668) > @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include > #include > #include > > @@ -103,6 +104,9 @@ TUNABLE_INT("hw.xen.disable_pv_disks", &xen_disable_pv > TUNABLE_INT("hw.xen.disable_pv_nics", &xen_disable_pv_nics); > > /*---------------------- XEN Hypervisor Probe and Setup ----------------------*/ > + > +static uint32_t cpuid_base; > + > static uint32_t > xen_hvm_cpuid_base(void) > { > @@ -123,21 +127,21 @@ xen_hvm_cpuid_base(void) > static int > xen_hvm_init_hypercall_stubs(enum xen_hvm_init_type init_type) > { > - uint32_t base, regs[4]; > + uint32_t regs[4]; > > if (xen_pv_domain()) { > /* hypercall page is already set in the PV case */ > return (0); > } > > - base = xen_hvm_cpuid_base(); > - if (base == 0) > + cpuid_base = xen_hvm_cpuid_base(); > + if (cpuid_base == 0) > return (ENXIO); > > if (init_type == XEN_HVM_INIT_COLD) { > int major, minor; > > - do_cpuid(base + 1, regs); > + do_cpuid(cpuid_base + 1, regs); > > major = regs[0] >> 16; > minor = regs[0] & 0xffff; > @@ -165,7 +169,7 @@ xen_hvm_init_hypercall_stubs(enum xen_hvm_init_type in > /* > * Find the hypercall pages. > */ > - do_cpuid(base + 2, regs); > + do_cpuid(cpuid_base + 2, regs); > if (regs[0] != 1) > return (EINVAL); > > @@ -371,31 +375,14 @@ xen_hvm_sysinit(void *arg __unused) > { > xen_hvm_init(XEN_HVM_INIT_COLD); > } > +SYSINIT(xen_hvm_init, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, xen_hvm_sysinit, NULL); > > static void > -xen_set_vcpu_id(void) > -{ > - struct pcpu *pc; > - int i; > - > - if (!xen_hvm_domain()) > - return; > - > - /* Set vcpu_id to acpi_id */ > - CPU_FOREACH(i) { > - pc = pcpu_find(i); > - pc->pc_vcpu_id = pc->pc_acpi_id; > - if (bootverbose) > - printf("XEN: CPU %u has VCPU ID %u\n", > - i, pc->pc_vcpu_id); > - } > -} > - > -static void > xen_hvm_cpu_init(void) > { > struct vcpu_register_vcpu_info info; > struct vcpu_info *vcpu_info; > + uint32_t regs[4]; > int cpu, rc; > > if (!xen_domain()) > @@ -410,6 +397,22 @@ xen_hvm_cpu_init(void) > return; > } > > + /* > + * Set vCPU ID. If available fetch the ID from CPUID, if not just use > + * the ACPI ID. > + */ > + KASSERT(cpuid_base != 0, ("Invalid base Xen CPUID leaf")); > + cpuid_count(cpuid_base + 4, 0, regs); > + PCPU_SET(vcpu_id, (regs[0] & XEN_HVM_CPUID_VCPU_ID_PRESENT) ? > + regs[1] : PCPU_GET(acpi_id)); > + > + /* > + * Set the vCPU info. > + * > + * NB: the vCPU info for vCPUs < 32 can be fetched from the shared info > + * page, but in order to make sure the mapping code is correct always > + * attempt to map the vCPU info at a custom place. > + */ > vcpu_info = DPCPU_PTR(vcpu_local_info); > cpu = PCPU_GET(vcpu_id); > info.mfn = vtophys(vcpu_info) >> PAGE_SHIFT; > @@ -421,7 +424,4 @@ xen_hvm_cpu_init(void) > else > DPCPU_SET(vcpu_info, vcpu_info); > } > - > -SYSINIT(xen_hvm_init, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, xen_hvm_sysinit, NULL); > SYSINIT(xen_hvm_cpu_init, SI_SUB_INTR, SI_ORDER_FIRST, xen_hvm_cpu_init, NULL); > -SYSINIT(xen_set_vcpu_id, SI_SUB_CPU, SI_ORDER_ANY, xen_set_vcpu_id, NULL); > > > -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@freebsd.org Mon Aug 27 10:08:28 2018 Return-Path: Delivered-To: svn-src-head@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 3D0C91083309; Mon, 27 Aug 2018 10:08:28 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E90D388345; Mon, 27 Aug 2018 10:08:27 +0000 (UTC) (envelope-from andrew@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 C9C011C277; Mon, 27 Aug 2018 10:08:27 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7RA8R0v088804; Mon, 27 Aug 2018 10:08:27 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7RA8RFF088803; Mon, 27 Aug 2018 10:08:27 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201808271008.w7RA8RFF088803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 27 Aug 2018 10:08:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338336 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 338336 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2018 10:08:28 -0000 Author: andrew Date: Mon Aug 27 10:08:27 2018 New Revision: 338336 URL: https://svnweb.freebsd.org/changeset/base/338336 Log: Use the correct register when storing the arm VFP state. Previously we have been lucky where the state was already in r0, however this is not guaranteed. Use the passed in register as the location to store the upper half of the arm VFP registers rather than relying on it being r0. Approved by: re (kib) Modified: head/sys/arm/arm/vfp.c Modified: head/sys/arm/arm/vfp.c ============================================================================== --- head/sys/arm/arm/vfp.c Mon Aug 27 09:39:34 2018 (r338335) +++ head/sys/arm/arm/vfp.c Mon Aug 27 10:08:27 2018 (r338336) @@ -293,7 +293,7 @@ vfp_store(struct vfp_state *vfpsave, boolean_t disable " .fpu vfpv3\n" " vstmia %0!, {d0-d15}\n" /* d0-d15 */ " cmp %1, #0\n" /* -D16 or -D32? */ - " vstmiane r0!, {d16-d31}\n" /* d16-d31 */ + " vstmiane %0!, {d16-d31}\n" /* d16-d31 */ " addeq %0, %0, #128\n" /* skip missing regs */ : "+&r" (vfpsave) : "r" (is_d32) : "cc" ); From owner-svn-src-head@freebsd.org Mon Aug 27 10:18:38 2018 Return-Path: Delivered-To: svn-src-head@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 7655F108375D; Mon, 27 Aug 2018 10:18:38 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 127468891D; Mon, 27 Aug 2018 10:18:34 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A85FE260189; Mon, 27 Aug 2018 12:18:26 +0200 (CEST) Subject: Re: svn commit: r337943 - head/sys/net To: Navdeep Parhar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808170103.w7H13Nl5047960@repo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Mon, 27 Aug 2018 12:18:02 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <201808170103.w7H13Nl5047960@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2018 10:18:38 -0000 On 8/17/18 3:03 AM, Navdeep Parhar wrote: > Author: np > Date: Fri Aug 17 01:03:23 2018 > New Revision: 337943 > URL: https://svnweb.freebsd.org/changeset/base/337943 > > Log: > if_vlan(4): A VLAN always has a PCP and its ifnet's if_pcp should be set > to the PCP value in use instead of IFNET_PCP_NONE. > > MFC after: 1 week > Sponsored by: Chelsio Communications > > Modified: > head/sys/net/if_vlan.c > > Modified: head/sys/net/if_vlan.c > ============================================================================== > --- head/sys/net/if_vlan.c Fri Aug 17 00:49:35 2018 (r337942) > +++ head/sys/net/if_vlan.c Fri Aug 17 01:03:23 2018 (r337943) > @@ -1435,6 +1435,7 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint1 > ifp->if_resolvemulti = p->if_resolvemulti; > ifp->if_addrlen = p->if_addrlen; > ifp->if_broadcastaddr = p->if_broadcastaddr; > + ifp->if_pcp = ifv->ifv_pcp; > > /* > * Copy only a selected subset of flags from the parent. > @@ -1959,6 +1960,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data > break; > } > ifv->ifv_pcp = ifr->ifr_vlan_pcp; > + ifp->if_pcp = ifv->ifv_pcp; > vlan_tag_recalculate(ifv); > /* broadcast event about PCP change */ > EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_PCP); Hi Navdeep, FYI: This patch currently breaks OFED, because OFED doesn't expect if_pcp to be different from the NONE value with VLAN interfaces. Mellanox is working on a fix. --HPS From owner-svn-src-head@freebsd.org Mon Aug 27 10:36:56 2018 Return-Path: Delivered-To: svn-src-head@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 49FE21084002; Mon, 27 Aug 2018 10:36:56 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B032C8937C; Mon, 27 Aug 2018 10:36:55 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id w7RAXRLr097467; Mon, 27 Aug 2018 13:33:27 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Mon, 27 Aug 2018 13:33:27 +0300 (MSK) From: Dmitry Morozovsky To: Kyle Evans cc: Alan Somers , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r337497 - in head: . contrib/mdocml contrib/tnftp/src etc/root share/skel tools/tools/nanobsd/pcengines/Files/root tools/tools/nanobsd/rescue/Files/root usr.bin/mail usr.bin/man usr.bin... In-Reply-To: Message-ID: References: <201808081924.w78JOKLP061364@repo.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Mon, 27 Aug 2018 13:33:27 +0300 (MSK) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2018 10:36:56 -0000 On Fri, 24 Aug 2018, Kyle Evans wrote: [snip] > >> Any chance you'd consider `less -E` for mergemaster, instead of > >> unsalted less? After going through a second round of updates since > >> this, that one feels super repetitive as you end up with two > >> keystrokes at the end per file that differs as opposed to the previous > >> one. This is pretty nit-picky, so I won't be upset if you say no. =) > >> > >> Thanks, > >> > >> Kyle Evans > > > > > > Hmm, "-E" would make sense for mergemaster, even though I hate that > > behavior for man. But if mergemaster's pager is going to use different > > options than other applications, then it also should get its own variable; > > mergemaster should use MERGEMASTERPAGER the way that man uses MANPAGER. > > Agree? > > I'm inclined to agree on both counts. While I don't like a > proliferation of things to set to override defaults like this in the > general case, it seems to make sense for mergemaster. The application > of pager here is a different use case than most. What about freebsd-update then? Usually one should type 'q' twice on two empty lists there. -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-head@freebsd.org Mon Aug 27 11:14:50 2018 Return-Path: Delivered-To: svn-src-head@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 6E3E01084DF7; Mon, 27 Aug 2018 11:14:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 170E08A6F9; Mon, 27 Aug 2018 11:14:50 +0000 (UTC) (envelope-from andrew@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 DF3EA1CE15; Mon, 27 Aug 2018 11:14:49 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7RBEnLs024842; Mon, 27 Aug 2018 11:14:49 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7RBEn20024840; Mon, 27 Aug 2018 11:14:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201808271114.w7RBEn20024840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 27 Aug 2018 11:14:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338337 - in head/stand/efi: boot1 loader/arch/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/stand/efi: boot1 loader/arch/arm64 X-SVN-Commit-Revision: 338337 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2018 11:14:50 -0000 Author: andrew Date: Mon Aug 27 11:14:49 2018 New Revision: 338337 URL: https://svnweb.freebsd.org/changeset/base/338337 Log: Ensure we have a large enough stack for the lua loader Lua has a few places where it allocates a large buffer on the stack. This is normally fine, except there are a few places where there can be multiple frames with this buffer. This can cause a stack overflow on some arm64 SoCs. Fix this by allocating our own stack in loader.efi large enough for these objects. The required size has been found by tracing how the stack pointer changes in a virtual machine and found to be no larger than 50kB. A larger stack is allocated to reduce the likelihood of overflow from future changes. Reviewed by: kevans Approved by: re (kib) Differential Revision: https://reviews.freebsd.org/D16886 Modified: head/stand/efi/boot1/Makefile head/stand/efi/loader/arch/arm64/start.S Modified: head/stand/efi/boot1/Makefile ============================================================================== --- head/stand/efi/boot1/Makefile Mon Aug 27 10:08:27 2018 (r338336) +++ head/stand/efi/boot1/Makefile Mon Aug 27 11:14:49 2018 (r338337) @@ -6,6 +6,7 @@ PROG= boot1.sym INTERNALPROG= WARNS?= 6 +CFLAGS+= -DEFI_BOOT1 # We implement a slightly non-standard %S in that it always takes a # CHAR16 that's common in UEFI-land instead of a wchar_t. This only # seems to matter on arm64 where wchar_t defaults to an int instead Modified: head/stand/efi/loader/arch/arm64/start.S ============================================================================== --- head/stand/efi/loader/arch/arm64/start.S Mon Aug 27 10:08:27 2018 (r338336) +++ head/stand/efi/loader/arch/arm64/start.S Mon Aug 27 11:14:49 2018 (r338337) @@ -160,6 +160,23 @@ _start: ldp x0, x1, [sp], #16 +#ifndef EFI_BOOT1 + /* + * Load the stack to use. The default stack may be too small for + * the lua loader. + */ + adr x2, initstack_end + mov sp, x2 +#endif + bl efi_main 1: b 1b + +#ifndef EFI_BOOT1 +.bss + .align 4 +initstack: + .space (64 * 1024) +initstack_end: +#endif From owner-svn-src-head@freebsd.org Mon Aug 27 15:20:43 2018 Return-Path: Delivered-To: svn-src-head@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 E4D6D108DA1F; Mon, 27 Aug 2018 15:20:42 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AFBE7543B; Mon, 27 Aug 2018 15:20:42 +0000 (UTC) (envelope-from mckusick@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 7C5181F568; Mon, 27 Aug 2018 15:20:42 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7RFKgqr051718; Mon, 27 Aug 2018 15:20:42 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7RFKgrb051717; Mon, 27 Aug 2018 15:20:42 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201808271520.w7RFKgrb051717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 27 Aug 2018 15:20:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338340 - head/usr.bin/xinstall X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/usr.bin/xinstall X-SVN-Commit-Revision: 338340 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2018 15:20:43 -0000 Author: mckusick Date: Mon Aug 27 15:20:42 2018 New Revision: 338340 URL: https://svnweb.freebsd.org/changeset/base/338340 Log: When doing a -S "safe copy", the install command should do an fsync(2) system call after copying the installed file to ensure that it is on stable storage. PR: 230851 Reviewed by: kib Approved by: re (marius) Modified: head/usr.bin/xinstall/xinstall.c Modified: head/usr.bin/xinstall/xinstall.c ============================================================================== --- head/usr.bin/xinstall/xinstall.c Mon Aug 27 13:03:11 2018 (r338339) +++ head/usr.bin/xinstall/xinstall.c Mon Aug 27 15:20:42 2018 (r338340) @@ -1265,6 +1265,12 @@ copy(int from_fd, const char *from_name, int to_fd, co err(EX_OSERR, "%s", from_name); } } + if (safecopy && fsync(to_fd) == -1) { + serrno = errno; + (void)unlink(to_name); + errno = serrno; + err(EX_OSERR, "fsync failed for %s", to_name); + } return (digest_end(&ctx, NULL)); } From owner-svn-src-head@freebsd.org Mon Aug 27 15:31:38 2018 Return-Path: Delivered-To: svn-src-head@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 F19E6108DEDA; Mon, 27 Aug 2018 15:31:37 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 798F375BBA; Mon, 27 Aug 2018 15:31:37 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by mail-pf1-x444.google.com with SMTP id u24-v6so7891726pfn.13; Mon, 27 Aug 2018 08:31:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=poldrgs4P29ExumWgHfd6Uy7EocNJsCS4pr7BigPlfo=; b=c59nvC4+qwLlOg78ovjIa9tHcdospgccKOa3RyDpNCszqkkRrb4+3qdcVk7qLtFryN FWQVs7fdf/ks9M6aVSFQT/ot555lK1W4B6YEFK1i1j3nlJdxFF7BtJLxRhelYp4t1u80 6klzcC+GYyIFdZVSNcXybZwiqmZU4eN5gGqhbgvN65Dn1EE/4iYcNmLHdOYHoPELHX2U WI00yx64mjJqSbwltYJ2qPol7ElgDOG59w+rmVGVzKd9jrl063cbIJoEWVuY6efnOrQn gRWhFK3jBjdGplSLMNGHw91ePeUMUMYK/QtEB0AaWbSbACiZpq0qGfjXWA7yUMVBKhR3 bmHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=poldrgs4P29ExumWgHfd6Uy7EocNJsCS4pr7BigPlfo=; b=Clee5ex4gq3+bpwY5/x5XTtfYIwWCuBXcKxmXSMOMQeeKvX8xNoNRnWEtddFxqJkBd T1JvvmIm6Z5JqJMxF4SHH7FDVchrHs3RimhH0Xh3kKIjOxvE2RwqHtZ77RFwz8qnwEAA co7HyF4sNt9MwJUm1aWobJWjFU7JcuXfI/1EcMidnkrHgD7J/M9mYLoDv5M7BCSsnPrL 53Z5bCzE1YXUkZKGlLXGznfH3og3pK1YZX11yk4sAsxkTTcKmRqCptolOvJ6V8Niv0oJ fLF0FztNlPAuGpE4w7cUK6VuTNXP7FrkQfo/YG+6vP0usN7XcqmBnobGgybK9dwO3W8r FWOA== X-Gm-Message-State: APzg51D4DJ7ziKjcFvO2zk7OQ1/LMuLnsdhPgD+Z2ur/wSARn8s+7FHL BQjEtPeYzJmlsDJKkKzuiShCH0/X X-Google-Smtp-Source: ANB0VdYNc66zvGlXLIRAFFxwt298P7pt0jmcC8oePo891u0o5nbeQGt1nlk4qa6zV42p3whp9dRGvQ== X-Received: by 2002:a63:5fc8:: with SMTP id t191-v6mr12744909pgb.183.1535383896011; Mon, 27 Aug 2018 08:31:36 -0700 (PDT) Received: from ox ([2601:641:c000:b800:55d6:510e:316b:dc20]) by smtp.gmail.com with ESMTPSA id g5-v6sm20791567pgn.73.2018.08.27.08.31.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Aug 2018 08:31:34 -0700 (PDT) Sender: Navdeep Parhar Date: Mon, 27 Aug 2018 08:31:32 -0700 From: Navdeep Parhar To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r337943 - head/sys/net Message-ID: <20180827153132.GB10167@ox> Mail-Followup-To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808170103.w7H13Nl5047960@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2018 15:31:38 -0000 On Mon, Aug 27, 2018 at 12:18:02PM +0200, Hans Petter Selasky wrote: > On 8/17/18 3:03 AM, Navdeep Parhar wrote: > > Author: np > > Date: Fri Aug 17 01:03:23 2018 > > New Revision: 337943 > > URL: https://svnweb.freebsd.org/changeset/base/337943 > > > > Log: > > if_vlan(4): A VLAN always has a PCP and its ifnet's if_pcp should be set > > to the PCP value in use instead of IFNET_PCP_NONE. > > MFC after: 1 week > > Sponsored by: Chelsio Communications > > > > Modified: > > head/sys/net/if_vlan.c > > > > Modified: head/sys/net/if_vlan.c > > ============================================================================== > > --- head/sys/net/if_vlan.c Fri Aug 17 00:49:35 2018 (r337942) > > +++ head/sys/net/if_vlan.c Fri Aug 17 01:03:23 2018 (r337943) > > @@ -1435,6 +1435,7 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint1 > > ifp->if_resolvemulti = p->if_resolvemulti; > > ifp->if_addrlen = p->if_addrlen; > > ifp->if_broadcastaddr = p->if_broadcastaddr; > > + ifp->if_pcp = ifv->ifv_pcp; > > /* > > * Copy only a selected subset of flags from the parent. > > @@ -1959,6 +1960,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data > > break; > > } > > ifv->ifv_pcp = ifr->ifr_vlan_pcp; > > + ifp->if_pcp = ifv->ifv_pcp; > > vlan_tag_recalculate(ifv); > > /* broadcast event about PCP change */ > > EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_PCP); > > Hi Navdeep, > > FYI: This patch currently breaks OFED, because OFED doesn't expect > if_pcp to be different from the NONE value with VLAN interfaces. It turns out that the patch broke VLANs without OFED too, but that part was fixed in r338305. > > Mellanox is working on a fix. Ok, thanks. Looks like rdma_vlan_dev_vlan_id might need to check for if_type == IFT_L2VLAN rather than the if_pcp. Let me know in case you need any help. Regards, Navdeep From owner-svn-src-head@freebsd.org Mon Aug 27 18:13:21 2018 Return-Path: Delivered-To: svn-src-head@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 D02BA10928A5; Mon, 27 Aug 2018 18:13:21 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C0FC7D326; Mon, 27 Aug 2018 18:13:21 +0000 (UTC) (envelope-from gallatin@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 5D5342137D; Mon, 27 Aug 2018 18:13:21 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7RIDLPG046505; Mon, 27 Aug 2018 18:13:21 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7RIDLIt046504; Mon, 27 Aug 2018 18:13:21 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <201808271813.w7RIDLIt046504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Mon, 27 Aug 2018 18:13:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338341 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 338341 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2018 18:13:22 -0000 Author: gallatin Date: Mon Aug 27 18:13:20 2018 New Revision: 338341 URL: https://svnweb.freebsd.org/changeset/base/338341 Log: Reject IPv4 SO_REUSEPORT_LB groups when looking up an IPv6 listening socket Similar to how the IPv4 code will reject an IPv6 LB group, we must ignore IPv4 LB groups when looking up an IPv6 listening socket. If this is not done, a port only match may return an IPv4 socket, which causes problems (like sending IPv6 packets with a hopcount of 0, making them unrouteable). Thanks to rrs for all the work to diagnose this. Approved by: re (rgrimes) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D16899 Modified: head/sys/netinet6/in6_pcb.c Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Mon Aug 27 15:20:42 2018 (r338340) +++ head/sys/netinet6/in6_pcb.c Mon Aug 27 18:13:20 2018 (r338341) @@ -901,6 +901,10 @@ in6_pcblookup_lbgroup(const struct inpcbinfo *pcbinfo, * - Load balanced does not contain IPv4 mapped INET6 wild sockets. */ LIST_FOREACH(grp, hdr, il_list) { +#ifdef INET + if (!(grp->il_vflag & INP_IPV6)) + continue; +#endif if (grp->il_lport == lport) { idx = 0; int pkt_hash = INP_PCBLBGROUP_PKTHASH( From owner-svn-src-head@freebsd.org Mon Aug 27 19:34:52 2018 Return-Path: Delivered-To: svn-src-head@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 F09E410942F9; Mon, 27 Aug 2018 19:34:51 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C92D802B1; Mon, 27 Aug 2018 19:34:51 +0000 (UTC) (envelope-from kevans@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 7115822161; Mon, 27 Aug 2018 19:34:51 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7RJYppU086947; Mon, 27 Aug 2018 19:34:51 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7RJYpvU086946; Mon, 27 Aug 2018 19:34:51 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808271934.w7RJYpvU086946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 27 Aug 2018 19:34:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338342 - head/tools/bsdbox X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/tools/bsdbox X-SVN-Commit-Revision: 338342 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2018 19:34:52 -0000 Author: kevans Date: Mon Aug 27 19:34:50 2018 New Revision: 338342 URL: https://svnweb.freebsd.org/changeset/base/338342 Log: Fix bsdbox build WITH_OFED hostapd requires libpcap, which links against libmlx5 and libibverbs when building WITH_OFED. These were not pulled in to bsdbox and most bsdbox builds were WITHOUT_OFED up until recently, so it was not noticed. Approved by: re (gjb) Modified: head/tools/bsdbox/Makefile.hostapd Modified: head/tools/bsdbox/Makefile.hostapd ============================================================================== --- head/tools/bsdbox/Makefile.hostapd Mon Aug 27 18:13:20 2018 (r338341) +++ head/tools/bsdbox/Makefile.hostapd Mon Aug 27 19:34:50 2018 (r338342) @@ -3,6 +3,7 @@ # # $FreeBSD$ # +.include CRUNCH_PROGS_usr.sbin+= hostapd hostapd_cli CRUNCH_SRCDIR_hostapd= $(.CURDIR)/../../usr.sbin/wpa/hostapd CRUNCH_SRCDIR_hostapd_cli= $(.CURDIR)/../../usr.sbin/wpa/hostapd_cli @@ -11,5 +12,9 @@ CRUNCH_SRCDIR_hostapd_cli= $(.CURDIR)/../../usr.sbin/w #CRUNCH_SRCDIR_wpa_supplicant= $(.CURDIR)/../../usr.sbin/wpa/wpa_supplicant #CRUNCH_SRCDIR_wpa_cli= $(.CURDIR)/../../usr.sbin/wpa/wpa_cli +.if ${MK_OFED} != "no" +# libpcap dependencies if OFED is enabled +CRUNCH_LIBS+= -lmlx5 -libverbs +.endif CRUNCH_LIBS+= -lpcap From owner-svn-src-head@freebsd.org Tue Aug 28 14:46:51 2018 Return-Path: Delivered-To: svn-src-head@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 32E9D108E97E; Tue, 28 Aug 2018 14:46:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D3DA0871EB; Tue, 28 Aug 2018 14:46:50 +0000 (UTC) (envelope-from imp@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 B233663DC; Tue, 28 Aug 2018 14:46:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SEkok4086203; Tue, 28 Aug 2018 14:46:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SEkn16086197; Tue, 28 Aug 2018 14:46:49 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201808281446.w7SEkn16086197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 28 Aug 2018 14:46:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338347 - in head: sys/conf sys/modules tools/build/options X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: sys/conf sys/modules tools/build/options X-SVN-Commit-Revision: 338347 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 14:46:51 -0000 Author: imp Date: Tue Aug 28 14:46:49 2018 New Revision: 338347 URL: https://svnweb.freebsd.org/changeset/base/338347 Log: Put building of drm and drm2 modules behind options. Make the building of drm dependent on MK_MODULE_DRM and the building of module drm2 on MK_MODULE_DRM2. The defaults are unchanged. Approved by: re@ (gjb) Differential Review: https://reviews.freebsd.org/D16894 Added: head/tools/build/options/WITHOUT_MODULE_DRM (contents, props changed) head/tools/build/options/WITHOUT_MODULE_DRM2 (contents, props changed) head/tools/build/options/WITH_MODULE_DRM (contents, props changed) head/tools/build/options/WITH_MODULE_DRM2 (contents, props changed) Modified: head/sys/conf/kern.opts.mk head/sys/modules/Makefile Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Tue Aug 28 14:33:04 2018 (r338346) +++ head/sys/conf/kern.opts.mk Tue Aug 28 14:46:49 2018 (r338347) @@ -38,6 +38,8 @@ __DEFAULT_YES_OPTIONS = \ IPSEC_SUPPORT \ ISCSI \ KERNEL_SYMBOLS \ + MODULE_DRM \ + MODULE_DRM2 \ NETGRAPH \ PF \ SOURCELESS_HOST \ Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Aug 28 14:33:04 2018 (r338346) +++ head/sys/modules/Makefile Tue Aug 28 14:46:49 2018 (r338347) @@ -583,8 +583,12 @@ _cpuctl= cpuctl _cpufreq= cpufreq _cs= cs _dpms= dpms +.if ${MK_MODULE_DRM} != "no" _drm= drm +.endif +.if ${MK_MODULE_DRM2} != "no" _drm2= drm2 +.endif _ed= ed _em= em _ena= ena @@ -781,7 +785,9 @@ _cardbus= cardbus _cbb= cbb _cfi= cfi _cpufreq= cpufreq +.if ${MK_MODULE_DRM} != "no" _drm= drm +.endif _exca= exca _ffec= ffec _nvd= nvd @@ -791,7 +797,9 @@ _wi= wi .endif .if ${MACHINE_ARCH} == "powerpc64" +.if ${MK_MODULE_DRM2} != "no" _drm2= drm2 +.endif _ipmi= ipmi .endif .if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc" Added: head/tools/build/options/WITHOUT_MODULE_DRM ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_MODULE_DRM Tue Aug 28 14:46:49 2018 (r338347) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Disable creation of old drm video modules. + Added: head/tools/build/options/WITHOUT_MODULE_DRM2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_MODULE_DRM2 Tue Aug 28 14:46:49 2018 (r338347) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Disable creation of old drm2 video modules. Added: head/tools/build/options/WITH_MODULE_DRM ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_MODULE_DRM Tue Aug 28 14:46:49 2018 (r338347) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Enable creation of old drm video modules. Added: head/tools/build/options/WITH_MODULE_DRM2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_MODULE_DRM2 Tue Aug 28 14:46:49 2018 (r338347) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Enable creation of old drm2 video modules. From owner-svn-src-head@freebsd.org Tue Aug 28 14:46:59 2018 Return-Path: Delivered-To: svn-src-head@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 48B83108E9BE; Tue, 28 Aug 2018 14:46:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A1AF9872C5; Tue, 28 Aug 2018 14:46:58 +0000 (UTC) (envelope-from imp@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 CA13863DD; Tue, 28 Aug 2018 14:46:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SEkukP086260; Tue, 28 Aug 2018 14:46:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SEktos086256; Tue, 28 Aug 2018 14:46:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201808281446.w7SEktos086256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 28 Aug 2018 14:46:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338348 - in head/sys/dev: drm drm2 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/dev: drm drm2 X-SVN-Commit-Revision: 338348 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 14:46:59 -0000 Author: imp Date: Tue Aug 28 14:46:55 2018 New Revision: 338348 URL: https://svnweb.freebsd.org/changeset/base/338348 Log: Add big, nasty abandonware tags to this code. This code works for some people, but hasn't been updated in a long time. Still allow people to use this code for the moment, but put a big, nasty obsolete message to inform and encourage people to move to the port. Approved by: re@ (gjb) Differential Review: https://reviews.freebsd.org/D16894 Modified: head/sys/dev/drm/drm.h head/sys/dev/drm/drm_drv.c head/sys/dev/drm2/drm_os_freebsd.c head/sys/dev/drm2/drm_os_freebsd.h Modified: head/sys/dev/drm/drm.h ============================================================================== --- head/sys/dev/drm/drm.h Tue Aug 28 14:46:49 2018 (r338347) +++ head/sys/dev/drm/drm.h Tue Aug 28 14:46:55 2018 (r338348) @@ -1145,4 +1145,15 @@ typedef struct drm_mm_init_arg drm_mm_init_arg_t; typedef enum drm_bo_type drm_bo_type_t; #endif +#define DRM_PORT "graphics/drm-legacy-kmod" + +#define DRM_OBSOLETE(dev) \ + do { \ + device_printf(dev, "=======================================================\n"); \ + device_printf(dev, "This code is obsolete abandonware. Install the " DRM_PORT " pkg\n"); \ + device_printf(dev, "=======================================================\n"); \ + gone_in_dev(dev, 13, "drm drivers"); \ + } while (0) + + #endif Modified: head/sys/dev/drm/drm_drv.c ============================================================================== --- head/sys/dev/drm/drm_drv.c Tue Aug 28 14:46:49 2018 (r338347) +++ head/sys/dev/drm/drm_drv.c Tue Aug 28 14:46:55 2018 (r338348) @@ -174,7 +174,8 @@ int drm_probe(device_t kdev, drm_pci_id_list_t *idlist DRM_DEBUG("desc : %s\n", device_get_desc(kdev)); device_set_desc(kdev, id_entry->name); } - return 0; + DRM_OBSOLETE(kdev); + return BUS_PROBE_GENERIC; } return ENXIO; Modified: head/sys/dev/drm2/drm_os_freebsd.c ============================================================================== --- head/sys/dev/drm2/drm_os_freebsd.c Tue Aug 28 14:46:49 2018 (r338347) +++ head/sys/dev/drm2/drm_os_freebsd.c Tue Aug 28 14:46:55 2018 (r338348) @@ -126,7 +126,8 @@ drm_probe_helper(device_t kdev, const drm_pci_id_list_ device_get_nameunit(kdev), id_entry->name); device_set_desc(kdev, id_entry->name); } - return (0); + DRM_OBSOLETE(kdev); + return (-BUS_PROBE_GENERIC); } return (-ENXIO); Modified: head/sys/dev/drm2/drm_os_freebsd.h ============================================================================== --- head/sys/dev/drm2/drm_os_freebsd.h Tue Aug 28 14:46:49 2018 (r338347) +++ head/sys/dev/drm2/drm_os_freebsd.h Tue Aug 28 14:46:55 2018 (r338348) @@ -154,6 +154,20 @@ typedef void irqreturn_t; *(volatile u_int64_t *)(((vm_offset_t)(map)->handle) + \ (vm_offset_t)(offset)) = htole64(val) +#ifdef __LP64__ +#define DRM_PORT "graphics/drm-stable-kmod" +#else +#define DRM_PORT "graphics/drm-legacy-kmod" +#endif + +#define DRM_OBSOLETE(dev) \ + do { \ + device_printf(dev, "=======================================================\n"); \ + device_printf(dev, "This code is obsolete abandonware. Install the " DRM_PORT " pkg\n"); \ + device_printf(dev, "=======================================================\n"); \ + gone_in_dev(dev, 13, "drm2 drivers"); \ + } while (0) + /* DRM_READMEMORYBARRIER() prevents reordering of reads. * DRM_WRITEMEMORYBARRIER() prevents reordering of writes. * DRM_MEMORYBARRIER() prevents reordering of reads and writes. From owner-svn-src-head@freebsd.org Tue Aug 28 14:53:04 2018 Return-Path: Delivered-To: svn-src-head@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 EB1AD108EE72; Tue, 28 Aug 2018 14:53:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A19038856E; Tue, 28 Aug 2018 14:53:03 +0000 (UTC) (envelope-from imp@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 82AC46570; Tue, 28 Aug 2018 14:53:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SEr3lW093723; Tue, 28 Aug 2018 14:53:03 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SEr3PS093722; Tue, 28 Aug 2018 14:53:03 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201808281453.w7SEr3PS093722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 28 Aug 2018 14:53:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338349 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 338349 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 14:53:04 -0000 Author: imp Date: Tue Aug 28 14:53:03 2018 New Revision: 338349 URL: https://svnweb.freebsd.org/changeset/base/338349 Log: Regen src.conf.5 after r338347. Approved by: re@ (gjb) Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue Aug 28 14:46:55 2018 (r338348) +++ head/share/man/man5/src.conf.5 Tue Aug 28 14:53:03 2018 (r338349) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd August 16, 2018 +.Dd August 28, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1184,8 +1184,14 @@ Enable firewire support in /boot/loader on x86. This o on all other platforms. .It Va WITHOUT_LOADER_GELI Disable inclusion of GELI crypto support in the boot chain binaries. +.Pp +This is a default setting on +sparc64/sparc64. .It Va WITH_LOADER_LUA Set to build LUA bindings for the boot loader. +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_LOADER_OFW Disable building of openfirmware bootloader components. .Pp @@ -1342,6 +1348,11 @@ Set to build .Pp This is a default setting on amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITHOUT_MODULE_DRM +Disable creation of old drm video modules. + +.It Va WITHOUT_MODULE_DRM2 +Disable creation of old drm2 video modules. .It Va WITH_NAND Set to build the NAND Flash components. .It Va WITHOUT_NDIS From owner-svn-src-head@freebsd.org Tue Aug 28 15:18:15 2018 Return-Path: Delivered-To: svn-src-head@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 57CE2108F52C; Tue, 28 Aug 2018 15:18:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 048E989673; Tue, 28 Aug 2018 15:18:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CD0E568AA; Tue, 28 Aug 2018 15:18:14 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SFIEtj005016; Tue, 28 Aug 2018 15:18:14 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SFIEMo005015; Tue, 28 Aug 2018 15:18:14 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808281518.w7SFIEMo005015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 28 Aug 2018 15:18:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338350 - head/usr.sbin/nfsuserd X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.sbin/nfsuserd X-SVN-Commit-Revision: 338350 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 15:18:15 -0000 Author: markj Date: Tue Aug 28 15:18:14 2018 New Revision: 338350 URL: https://svnweb.freebsd.org/changeset/base/338350 Log: Add missing endpwent() and endgrent() calls to nfsuserd(8). PR: 230937 Submitted by: Peter Eriksson Reviewed by: rmacklem Approved by: re (gjb) MFC after: 1 week Modified: head/usr.sbin/nfsuserd/nfsuserd.c Modified: head/usr.sbin/nfsuserd/nfsuserd.c ============================================================================== --- head/usr.sbin/nfsuserd/nfsuserd.c Tue Aug 28 14:53:03 2018 (r338349) +++ head/usr.sbin/nfsuserd/nfsuserd.c Tue Aug 28 15:18:14 2018 (r338350) @@ -334,6 +334,7 @@ main(int argc, char *argv[]) #endif i++; } + endgrent(); /* * Loop around adding all users. @@ -382,6 +383,7 @@ main(int argc, char *argv[]) #endif i++; } + endpwent(); /* * I should feel guilty for not calling this for all the above exit() From owner-svn-src-head@freebsd.org Tue Aug 28 17:09:42 2018 Return-Path: Delivered-To: svn-src-head@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 38D331091DE6; Tue, 28 Aug 2018 17:09:42 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D91E68D101; Tue, 28 Aug 2018 17:09:41 +0000 (UTC) (envelope-from mw@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 9DEEA7A8E; Tue, 28 Aug 2018 17:09:41 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SH9fRR062598; Tue, 28 Aug 2018 17:09:41 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SH9fQK062597; Tue, 28 Aug 2018 17:09:41 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201808281709.w7SH9fQK062597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Tue, 28 Aug 2018 17:09:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338351 - head/sys/dev/al_eth X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/sys/dev/al_eth X-SVN-Commit-Revision: 338351 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 17:09:42 -0000 Author: mw Date: Tue Aug 28 17:09:41 2018 New Revision: 338351 URL: https://svnweb.freebsd.org/changeset/base/338351 Log: Use ip/ipv6 structures in al_eth only if they are supported The ip/ipv6 header files are included only if the appropriate definition exists, but the driver was missing similar checks when using the ip and ip6_hdr structures. If the kernel was not built with the INET or INET6 option, the driver was preventing kernel from being built. To fix that, the missing ifdef checks were added to the driver. PR: Bug 230886 Submitted by: Michal Krawczyk Reported by: O. Hartmann Approved by: re (gjb) Obtained from: Semihalf MFC after: 1 week Sponsored by: Amazon, Inc. Modified: head/sys/dev/al_eth/al_eth.c Modified: head/sys/dev/al_eth/al_eth.c ============================================================================== --- head/sys/dev/al_eth/al_eth.c Tue Aug 28 15:18:14 2018 (r338350) +++ head/sys/dev/al_eth/al_eth.c Tue Aug 28 17:09:41 2018 (r338351) @@ -1202,8 +1202,12 @@ al_eth_tx_csum(struct al_eth_ring *tx_ring, struct al_ uint32_t mss = m->m_pkthdr.tso_segsz; struct ether_vlan_header *eh; uint16_t etype; +#ifdef INET struct ip *ip; +#endif +#ifdef INET6 struct ip6_hdr *ip6; +#endif struct tcphdr *th = NULL; int ehdrlen, ip_hlen = 0; uint8_t ipproto = 0; @@ -1243,6 +1247,7 @@ al_eth_tx_csum(struct al_eth_ring *tx_ring, struct al_ } switch (etype) { +#ifdef INET case ETHERTYPE_IP: ip = (struct ip *)(m->m_data + ehdrlen); ip_hlen = ip->ip_hl << 2; @@ -1256,6 +1261,8 @@ al_eth_tx_csum(struct al_eth_ring *tx_ring, struct al_ else hal_pkt->l4_proto_idx = AL_ETH_PROTO_ID_UDP; break; +#endif /* INET */ +#ifdef INET6 case ETHERTYPE_IPV6: ip6 = (struct ip6_hdr *)(m->m_data + ehdrlen); hal_pkt->l3_proto_idx = AL_ETH_PROTO_ID_IPv6; @@ -1267,6 +1274,7 @@ al_eth_tx_csum(struct al_eth_ring *tx_ring, struct al_ else hal_pkt->l4_proto_idx = AL_ETH_PROTO_ID_UDP; break; +#endif /* INET6 */ default: break; } From owner-svn-src-head@freebsd.org Tue Aug 28 17:10:20 2018 Return-Path: Delivered-To: svn-src-head@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 7E66C1091E27; Tue, 28 Aug 2018 17:10:20 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34F888D230; Tue, 28 Aug 2018 17:10:20 +0000 (UTC) (envelope-from philip@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 15FEC7A93; Tue, 28 Aug 2018 17:10:20 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SHAJ74062727; Tue, 28 Aug 2018 17:10:19 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SHAJrM062725; Tue, 28 Aug 2018 17:10:19 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201808281710.w7SHAJrM062725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Tue, 28 Aug 2018 17:10:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338352 - head/usr.bin/last X-SVN-Group: head X-SVN-Commit-Author: philip X-SVN-Commit-Paths: head/usr.bin/last X-SVN-Commit-Revision: 338352 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 17:10:20 -0000 Author: philip Date: Tue Aug 28 17:10:19 2018 New Revision: 338352 URL: https://svnweb.freebsd.org/changeset/base/338352 Log: Add libxo(3) support to last(1). Reviewed by: kp Approved by: re (gjb) MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16922 Modified: head/usr.bin/last/Makefile head/usr.bin/last/last.1 head/usr.bin/last/last.c Modified: head/usr.bin/last/Makefile ============================================================================== --- head/usr.bin/last/Makefile Tue Aug 28 17:09:41 2018 (r338351) +++ head/usr.bin/last/Makefile Tue Aug 28 17:10:19 2018 (r338352) @@ -2,6 +2,7 @@ # $FreeBSD$ PROG= last +LIBADD= xo NO_WFORMAT= Modified: head/usr.bin/last/last.1 ============================================================================== --- head/usr.bin/last/last.1 Tue Aug 28 17:09:41 2018 (r338351) +++ head/usr.bin/last/last.1 Tue Aug 28 17:10:19 2018 (r338352) @@ -28,7 +28,7 @@ .\" @(#)last.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 1, 2018 +.Dd August 28, 2018 .Dt LAST 1 .Os .Sh NAME @@ -36,6 +36,7 @@ .Nd indicate last logins of users and ttys .Sh SYNOPSIS .Nm +.Op Fl -libxo .Op Fl swy .Oo .Fl d @@ -72,6 +73,13 @@ will so indicate. .Pp The following options are available: .Bl -tag -width indent-two +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl d Ar date Specify the snapshot date and time. All users logged in at the snapshot date and time will @@ -201,6 +209,8 @@ login data base .Xr getutxent 3 , .Xr ac 8 , .Xr lastlogin 8 +.Xr libxo 3 , +.Xr xo_parse_args 3 .Sh HISTORY .Nm utility first appeared in @@ -211,6 +221,10 @@ The original version was written by .An Howard P. Katseff ; .An Keith Bostic rewrote it in 1986/87 to add functionality and to improve code quality. +.An Philip Paeps +added +.Xr libxo 3 +support in August 2018. .Sh BUGS If a login shell should terminate abnormally for some reason, it is likely that a logout record will not be written to the Modified: head/usr.bin/last/last.c ============================================================================== --- head/usr.bin/last/last.c Tue Aug 28 17:09:41 2018 (r338351) +++ head/usr.bin/last/last.c Tue Aug 28 17:10:19 2018 (r338352) @@ -3,6 +3,7 @@ * * Copyright (c) 1987, 1993, 1994 * The Regents of the University of California. All rights reserved. + * Copyright (c) 2018 Philip Paeps * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -62,6 +63,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #define NO 0 /* false/no */ #define YES 1 /* true/yes */ #define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2; @@ -112,7 +115,7 @@ static void wtmp(void); static void usage(void) { - (void)fprintf(stderr, + xo_error( "usage: last [-swy] [-d [[CC]YY][MMDD]hhmm[.SS]] [-f file] [-h host]\n" " [-n maxrec] [-t tty] [user ...]\n"); exit(1); @@ -127,6 +130,11 @@ main(int argc, char *argv[]) (void) setlocale(LC_TIME, ""); d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); + argc = xo_parse_args(argc, argv); + if (argc < 0) + exit(1); + atexit(xo_finish_atexit); + maxrec = -1; snaptime = 0; while ((ch = getopt(argc, argv, "0123456789d:f:h:n:st:wy")) != -1) @@ -161,7 +169,7 @@ main(int argc, char *argv[]) maxrec = strtol(optarg, &p, 10); if (p == optarg || *p != '\0' || errno != 0 || maxrec <= 0) - errx(1, "%s: bad line count", optarg); + xo_errx(1, "%s: bad line count", optarg); break; case 's': sflag++; /* Show delta as seconds */ @@ -181,17 +189,17 @@ main(int argc, char *argv[]) } if (caph_limit_stdio() < 0) - err(1, "can't limit stdio rights"); + xo_err(1, "can't limit stdio rights"); caph_cache_catpages(); caph_cache_tzdata(); /* Cache UTX database. */ if (setutxdb(UTXDB_LOG, file) != 0) - err(1, "%s", file != NULL ? file : "(default utx db)"); + xo_err(1, "%s", file != NULL ? file : "(default utx db)"); if (caph_enter() < 0) - err(1, "cap_enter"); + xo_err(1, "cap_enter"); if (sflag && width == 8) usage(); @@ -229,12 +237,14 @@ wtmp(void) SLIST_INIT(&idlist); (void)time(&t); + xo_open_container("last-information"); + /* Load the last entries from the file. */ while ((ut = getutxent()) != NULL) { if (amount % 128 == 0) { buf = realloc(buf, (amount + 128) * sizeof *ut); if (buf == NULL) - err(1, "realloc"); + xo_err(1, "realloc"); } memcpy(&buf[amount++], ut, sizeof *ut); if (t > ut->ut_tv.tv_sec) @@ -243,12 +253,17 @@ wtmp(void) endutxent(); /* Display them in reverse order. */ + xo_open_list("last"); while (amount > 0) doentry(&buf[--amount]); + xo_close_list("last"); free(buf); tm = localtime(&t); (void) strftime(ct, sizeof(ct), "%+", tm); - printf("\n%s begins %s\n", ((file == NULL) ? "utx.log" : file), ct); + xo_emit("\n{:utxdb/%s}", (file == NULL) ? "utx.log" : file); + xo_attr("seconds", "%lu", (unsigned long) t); + xo_emit(" begins {:begins/%s}\n", ct); + xo_close_container("last-information"); } /* @@ -303,7 +318,7 @@ doentry(struct utmpx *bp) /* add new one */ tt = malloc(sizeof(struct idtab)); if (tt == NULL) - errx(1, "malloc failure"); + xo_errx(1, "malloc failure"); tt->logout = currentout; memcpy(tt->id, bp->ut_id, sizeof bp->ut_id); SLIST_INSERT_HEAD(&idlist, tt, list); @@ -339,6 +354,7 @@ printentry(struct utmpx *bp, struct idtab *tt) if (maxrec != -1 && !maxrec--) exit(0); + xo_open_instance("last"); t = bp->ut_tv.tv_sec; tm = localtime(&t); (void) strftime(ct, sizeof(ct), d_first ? @@ -346,48 +362,55 @@ printentry(struct utmpx *bp, struct idtab *tt) (yflag ? "%a %b %e %Y %R" : "%a %b %e %R"), tm); switch (bp->ut_type) { case BOOT_TIME: - printf("%-42s", "boot time"); + xo_emit("{:user/%-42s/%s}", "boot time"); break; case SHUTDOWN_TIME: - printf("%-42s", "shutdown time"); + xo_emit("{:user/%-42s/%s}", "shutdown time"); break; case OLD_TIME: - printf("%-42s", "old time"); + xo_emit("{:user/%-42s/%s}", "old time"); break; case NEW_TIME: - printf("%-42s", "new time"); + xo_emit("{:user/%-42s/%s}", "new time"); break; case USER_PROCESS: - printf("%-10s %-8s %-22.22s", + xo_emit("{:user/%-10s/%s} {:tty/%-8s/%s} {:from/%-22.22s/%s}", bp->ut_user, bp->ut_line, bp->ut_host); break; } - printf(" %s%c", ct, tt == NULL ? '\n' : ' '); + xo_attr("seconds", "%lu", (unsigned long)t); + xo_emit(" {:login-time/%s%c/%s}", ct, tt == NULL ? '\n' : ' '); if (tt == NULL) - return; + goto end; if (!tt->logout) { - puts(" still logged in"); - return; + xo_emit(" {:logout-time/still logged in}\n"); + goto end; } if (tt->logout < 0) { tt->logout = -tt->logout; - printf("- %s", crmsg); + xo_emit("- {:logout-reason/%s}", crmsg); } else { tm = localtime(&tt->logout); (void) strftime(ct, sizeof(ct), "%R", tm); - printf("- %s", ct); + xo_attr("seconds", "%lu", (unsigned long)tt->logout); + xo_emit("- {:logout-time/%s}", ct); } delta = tt->logout - bp->ut_tv.tv_sec; + xo_attr("seconds", "%ld", (long)delta); if (sflag) { - printf(" (%8ld)\n", (long)delta); + xo_emit(" ({:session-length/%8ld})\n", (long)delta); } else { tm = gmtime(&delta); (void) strftime(ct, sizeof(ct), width >= 8 ? "%T" : "%R", tm); if (delta < 86400) - printf(" (%s)\n", ct); + xo_emit(" ({:session-length/%s})\n", ct); else - printf(" (%ld+%s)\n", (long)delta / 86400, ct); + xo_emit(" ({:session-length/%ld+%s})\n", + (long)delta / 86400, ct); } + +end: + xo_close_instance("last"); } /* @@ -438,7 +461,7 @@ addarg(int type, char *arg) ARG *cur; if ((cur = malloc(sizeof(ARG))) == NULL) - errx(1, "malloc failure"); + xo_errx(1, "malloc failure"); cur->next = arglist; cur->type = type; cur->name = arg; @@ -463,7 +486,7 @@ hostconv(char *arg) if (first) { first = 0; if (gethostname(name, sizeof(name))) - err(1, "gethostname"); + xo_err(1, "gethostname"); hostdot = strchr(name, '.'); } if (hostdot && !strcasecmp(hostdot, argdot)) @@ -486,7 +509,7 @@ ttyconv(char *arg) if (strlen(arg) == 2) { /* either 6 for "ttyxx" or 8 for "console" */ if ((mval = malloc(8)) == NULL) - errx(1, "malloc failure"); + xo_errx(1, "malloc failure"); if (!strcmp(arg, "co")) (void)strcpy(mval, "console"); else { @@ -516,9 +539,9 @@ dateconv(char *arg) /* Start with the current time. */ if (time(&timet) < 0) - err(1, "time"); + xo_err(1, "time"); if ((t = localtime(&timet)) == NULL) - err(1, "localtime"); + xo_err(1, "localtime"); /* [[CC]YY]MMDDhhmm[.SS] */ if ((p = strchr(arg, '.')) == NULL) @@ -567,7 +590,7 @@ dateconv(char *arg) t->tm_isdst = -1; /* Figure out DST. */ timet = mktime(t); if (timet == -1) -terr: errx(1, +terr: xo_errx(1, "out of range or illegal time specification: [[CC]YY]MMDDhhmm[.SS]"); return timet; } From owner-svn-src-head@freebsd.org Tue Aug 28 17:12:38 2018 Return-Path: Delivered-To: svn-src-head@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 592921092018; Tue, 28 Aug 2018 17:12:38 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CF338D6CF; Tue, 28 Aug 2018 17:12:38 +0000 (UTC) (envelope-from philip@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 E19AE7C4C; Tue, 28 Aug 2018 17:12:37 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SHCbiQ067601; Tue, 28 Aug 2018 17:12:37 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SHCbGg067598; Tue, 28 Aug 2018 17:12:37 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201808281712.w7SHCbGg067598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Tue, 28 Aug 2018 17:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338353 - head/usr.sbin/lastlogin X-SVN-Group: head X-SVN-Commit-Author: philip X-SVN-Commit-Paths: head/usr.sbin/lastlogin X-SVN-Commit-Revision: 338353 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 17:12:38 -0000 Author: philip Date: Tue Aug 28 17:12:37 2018 New Revision: 338353 URL: https://svnweb.freebsd.org/changeset/base/338353 Log: Add libxo(3) support to lastlogin(8). Reviewed by: kp Approved by: re (gjb) MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16919 Modified: head/usr.sbin/lastlogin/Makefile head/usr.sbin/lastlogin/lastlogin.8 head/usr.sbin/lastlogin/lastlogin.c Modified: head/usr.sbin/lastlogin/Makefile ============================================================================== --- head/usr.sbin/lastlogin/Makefile Tue Aug 28 17:10:19 2018 (r338352) +++ head/usr.sbin/lastlogin/Makefile Tue Aug 28 17:12:37 2018 (r338353) @@ -2,5 +2,6 @@ PROG= lastlogin MAN= lastlogin.8 +LIBADD= xo .include Modified: head/usr.sbin/lastlogin/lastlogin.8 ============================================================================== --- head/usr.sbin/lastlogin/lastlogin.8 Tue Aug 28 17:10:19 2018 (r338352) +++ head/usr.sbin/lastlogin/lastlogin.8 Tue Aug 28 17:12:37 2018 (r338353) @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 6, 2011 +.Dd August 28, 2018 .Dt LASTLOGIN 8 .Os .Sh NAME @@ -39,6 +39,7 @@ .Nd indicate last login time of users .Sh SYNOPSIS .Nm +.Op Fl -libxo .Op Fl f Ar file .Op Fl rt .Op Ar user ... @@ -68,6 +69,13 @@ The last login database is never turned over or delete .Pp The following options are available: .Bl -tag -width indent +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl f Ar file Open last login database .Ar file @@ -86,9 +94,15 @@ last login database .Xr last 1 , .Xr getutxent 3 , .Xr ac 8 +.Xr libxo 3 , +.Xr xo_parse_args 3 .Sh AUTHORS +.An -nosplit .An John M. Vinopal wrote this program in January 1996 and contributed it to the .Nx project. +.An Philip Paeps added +.Xr libxo 3 +support in August 2018. Modified: head/usr.sbin/lastlogin/lastlogin.c ============================================================================== --- head/usr.sbin/lastlogin/lastlogin.c Tue Aug 28 17:10:19 2018 (r338352) +++ head/usr.sbin/lastlogin/lastlogin.c Tue Aug 28 17:12:37 2018 (r338353) @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-4-Clause * * Copyright (c) 1996 John M. Vinopal + * Copyright (c) 2018 Philip Paeps * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46,6 +47,8 @@ __RCSID("$NetBSD: lastlogin.c,v 1.4 1998/02/03 04:45:3 #include #include +#include + int main(int, char **); static void output(struct utmpx *); static void usage(void); @@ -79,6 +82,10 @@ main(int argc, char *argv[]) int ch, i, ulistsize; struct utmpx *u, *ulist; + argc = xo_parse_args(argc, argv); + if (argc < 0) + exit(1); + while ((ch = getopt(argc, argv, "f:rt")) != -1) { switch (ch) { case 'f': @@ -97,13 +104,16 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; + xo_open_container("lastlogin-information"); + xo_open_list("lastlogin"); + if (argc > 0) { /* Process usernames given on the command line. */ for (i = 0; i < argc; i++) { if (setutxdb(UTXDB_LASTLOGIN, file) != 0) - err(1, "failed to open lastlog database"); + xo_err(1, "failed to open lastlog database"); if ((u = getutxuser(argv[i])) == NULL) { - warnx("user '%s' not found", argv[i]); + xo_warnx("user '%s' not found", argv[i]); continue; } output(u); @@ -112,7 +122,7 @@ main(int argc, char *argv[]) } else { /* Read all lastlog entries, looking for active ones. */ if (setutxdb(UTXDB_LASTLOGIN, file) != 0) - err(1, "failed to open lastlog database"); + xo_err(1, "failed to open lastlog database"); ulist = NULL; ulistsize = 0; while ((u = getutxent()) != NULL) { @@ -122,7 +132,7 @@ main(int argc, char *argv[]) ulist = realloc(ulist, (ulistsize + 16) * sizeof(struct utmpx)); if (ulist == NULL) - err(1, "malloc"); + xo_err(1, "malloc"); } ulist[ulistsize++] = *u; } @@ -133,6 +143,10 @@ main(int argc, char *argv[]) output(&ulist[i]); } + xo_close_list("lastlogin"); + xo_close_container("lastlogin-information"); + xo_finish(); + exit(0); } @@ -142,13 +156,18 @@ output(struct utmpx *u) { time_t t = u->ut_tv.tv_sec; - printf("%-10s %-8s %-22.22s %s", - u->ut_user, u->ut_line, u->ut_host, ctime(&t)); + xo_open_instance("lastlogin"); + xo_emit("{:user/%-10s/%s} {:tty/%-8s/%s} {:from/%-22.22s/%s}", + u->ut_user, u->ut_line, u->ut_host); + xo_attr("seconds", "%lu", (unsigned long)t); + xo_emit(" {:login-time/%.24s/%.24s}\n", ctime(&t)); + xo_close_instance("lastlogin"); } static void usage(void) { - fprintf(stderr, "usage: lastlogin [-f file] [-rt] [user ...]\n"); + xo_error("usage: lastlogin [-f file] [-rt] [user ...]\n"); + xo_finish(); exit(1); } From owner-svn-src-head@freebsd.org Tue Aug 28 17:14:47 2018 Return-Path: Delivered-To: svn-src-head@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 B0C3710920D8; Tue, 28 Aug 2018 17:14:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6113F8D89E; Tue, 28 Aug 2018 17:14:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40D9E7C5F; Tue, 28 Aug 2018 17:14:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SHElHD067744; Tue, 28 Aug 2018 17:14:47 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SHElsf067743; Tue, 28 Aug 2018 17:14:47 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808281714.w7SHElsf067743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 28 Aug 2018 17:14:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338354 - head/stand/defaults X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/stand/defaults X-SVN-Commit-Revision: 338354 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 17:14:47 -0000 Author: markj Date: Tue Aug 28 17:14:46 2018 New Revision: 338354 URL: https://svnweb.freebsd.org/changeset/base/338354 Log: Document the cpu_microcode_* tunables. Reviewed by: bcr (previous version), kib Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16923 Modified: head/stand/defaults/loader.conf.5 Modified: head/stand/defaults/loader.conf.5 ============================================================================== --- head/stand/defaults/loader.conf.5 Tue Aug 28 17:12:37 2018 (r338353) +++ head/stand/defaults/loader.conf.5 Tue Aug 28 17:14:46 2018 (r338354) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd March 23, 2018 +.Dd August 28, 2018 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -289,6 +289,29 @@ See the entropy entries in .Pq Dq /boot/entropy The name of the very early boot-time entropy cache file. +.It Va cpu_microcode_load +.Pq Dq NO +If set to +.Dq YES , +the microcode update file specified by +.Va cpu_microcode_name +will be loaded and applied very early during boot. +This provides functionality similar to +.Xr cpucontrol 8 +but ensures that CPU features enabled by microcode updates can be +used by the kernel. +The update will be re-applied automatically when resuming from an +ACPI sleep state. +If the update file contains updates for multiple processor models, +the kernel will search for and extract a matching update. +Currently this setting is supported only on Intel +.Dv i386 +and +.Dv amd64 +processors. +It has no effect on other processor types. +.It Va cpu_microcode_name +A path to a microcode update file. .El .Sh OTHER SETTINGS Other settings that may be used in @@ -319,6 +342,7 @@ machine-specific settings for sites with a common load .Sh SEE ALSO .Xr rc.conf 5 , .Xr boot 8 , +.Xr cpucontrol 8 , .Xr loader 8 , .Xr loader.4th 8 .Sh HISTORY From owner-svn-src-head@freebsd.org Tue Aug 28 17:46:15 2018 Return-Path: Delivered-To: svn-src-head@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 CC66F10929C2 for ; Tue, 28 Aug 2018 17:46:15 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-21.consmr.mail.ne1.yahoo.com (sonic306-21.consmr.mail.ne1.yahoo.com [66.163.189.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68F198E766 for ; Tue, 28 Aug 2018 17:46:15 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: .V65hkAVM1lKqS5DiA1B4TiRBMoJzlShNWXqUsGsdSHqYcmMF2A4UwKKF3QCnFr 6XNsI872HIQv1FdytNKNK9aKThHXVBD3JfN4Mx7NtxvbFwfcaAwBx3M6oqBN31Yq5.y6IkPq8YF4 G1HaDm82SoCsh3LMOlHxVDIZDh.TfYNsoOmpI44chMERw2pl6Pe.2viGL65BmelZbcga9..N0stb RC072fvoW3ftdYh5l32aDceay2p6R3gww5tBNqZ8Z_gA9qTiZwvg6mwnPiyesOFerru8qQgz4QGS qjtPDtwqOSqyKrIrszLLPBlVv.CeKmld2E1FJ9xzHDN.URcYA6eoEkqtIOTKoTobnRnO5Nt1V0fC jK3l9ElwO.F9_LPo6PTmRfMxdHRc6S5r_CwRa12pU3C3_5_RziZmKUhmjwl5KMGyrO2z_cvewftU 5HEwCLqMStyKUIp18VWeXOccbfLHWSAKECrT3c4dQMZU6h_sd.NwNnnOrvthsoXsFvUEuXAKW25Z k09DzrjOKCJ1OJK1Y8DtO356PJ1KtbA1af5nu2t7vEPOaYw39gTiEymmxkg0.J4GAo9m7ZPJ3Lal 2XJ9KGYZQKJSjA9TdEZPv8PmCe6izkvVGCpvuSthQz2UJ5jVm_sxMhKsidUDeSPvLyfxj9bbgEI6 OLhjZaHR07q753DpeuPDpqrjJnJjcoEMY1gTvaQA6FMpDmLeA0G3G44.4D8RIEdkw1EprcZ6CVMx RFsVp9pZ6koEiypLLMVoWYdemajalxApBzGKyoWLqN9l19sjzm2aWpRhr7DfJGYXlqMjLjhD65xt atluZUqngzDuNTRuV7JBFIVNN7tGF_bBHlgVzzy0yM9BKSLZKqNGlHN9np2A6WrfeyZr9dvm_EQV vmG9K9gXhGPuLxrx0sBbFVi.Be3jwuqTac08FglrLa6.iQ5ZmBJRW7cKDtljnXVKPIMR4r513z_e mZNTNNwLOgCJkumNBlP8voRv775trUS.Wh6f5IXpB3wnYmoaIJx_1cyEmFvE2i.ycAx86fspo1f8 2bdeGPjwSVafO Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Tue, 28 Aug 2018 17:46:14 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp429.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 2c994cc739f311e13d1f89d4703136d1; Tue, 28 Aug 2018 17:36:02 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r338348 - in head/sys/dev: drm drm2 Message-Id: Date: Tue, 28 Aug 2018 10:36:01 -0700 To: imp@FreeBSD.org, svn-src-head@freebsd.org, FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 17:46:16 -0000 For the below I wonder if graphics/drm-stable-kmod would be correct for old powerpc64 PowerMac's and such. Presuming graphics/drm-legacy-kmod (I do not know): Tier 2, old equipment, etc. so it may just be an item for handling questions on the lists rather than making a mess instead of the below to cover sufficient alternatives. > Modified: head/sys/dev/drm2/drm_os_freebsd.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/drm2/drm_os_freebsd.h Tue Aug 28 14:46:49 2018 = (r338347) > +++ head/sys/dev/drm2/drm_os_freebsd.h Tue Aug 28 14:46:55 2018 = (r338348) > @@ -154,6 +154,20 @@ typedef void irqreturn_t; > *(volatile u_int64_t *)(((vm_offset_t)(map)->handle) + = \ > (vm_offset_t)(offset)) =3D htole64(val) > =20 > +#ifdef __LP64__ > +#define DRM_PORT "graphics/drm-stable-kmod" > +#else > +#define DRM_PORT "graphics/drm-legacy-kmod" > +#endif > + > +#define DRM_OBSOLETE(dev) = \ > + do { = \ > + device_printf(dev, = "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D\n"); \ > + device_printf(dev, "This code is obsolete abandonware. Install = the " DRM_PORT " pkg\n"); \ > + device_printf(dev, = "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D\n"); \ > + gone_in_dev(dev, 13, "drm2 drivers"); = \ > + } while (0) > + > /* DRM_READMEMORYBARRIER() prevents reordering of reads. > * DRM_WRITEMEMORYBARRIER() prevents reordering of writes. > * DRM_MEMORYBARRIER() prevents reordering of reads and writes. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Tue Aug 28 17:51:34 2018 Return-Path: Delivered-To: svn-src-head@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 570F81092BCD for ; Tue, 28 Aug 2018 17:51:34 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E78F58E901 for ; Tue, 28 Aug 2018 17:51:33 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mail-it0-x22b.google.com with SMTP id h1-v6so1682939itj.4 for ; Tue, 28 Aug 2018 10:51:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=WeyDsACLnn34vOUadNYYy4MaaJ8U3vEXGQLnilTjEVQ=; b=iSkhJQOGuL6eBL4gV6C4iuAPI0GArppWS409tz0TeJ65B6bVWqCsczSqayZjb6IeyH CHNtaIOU56rVoHSmenDrs6QCSMjWwyoaxRNGnEpErzjNosuZsmtw8YJ/Xnsx8wOkfLMw RQfI4etBPwH6WG/282Gh7YfrJTeCH7E+PoQgU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=WeyDsACLnn34vOUadNYYy4MaaJ8U3vEXGQLnilTjEVQ=; b=qYoqMEv4IVKGFteboANK1DBQ9XCwSeUOc7SKoaLt0NaXT6aqDThzCxHgimt+WcSkOb jo5sAbWV8wlIIeQvNvhYIm4WpljKSPAKxVozybszbjpLBeQe8veM+VhSwuN6MNbwKoHJ e3s0e8ldhNLXN/rPB88IG4/M+5V78XSPtolmAgVpmBPHpBHIDdME3cTS0xlJEFdwXLo7 O4aTyWzfAa2hfusicCk0HxCGgXqckKLcEgzd06O51i7qjU1jKXnuypLQtrc39EIVsAii a5Zi94qLwn4sJgHytqq019nJvFe8Ai2s6uO3Mw+2wYnLqzYOtQvcsozS/9veb0XAB3D6 wi7Q== X-Gm-Message-State: APzg51AcZtinCZHzk/7Gy1MDhzYY6OFyCB80Pvrw3ShHXrXetBt4wkTh 2/aN0RZI4iHCUmXkWYpXcxId+JPVs1Egj3w36Hb8VQ== X-Google-Smtp-Source: ANB0VdaCzmo85c+G8Tgu1dKT/kVj/ckOodi1hewT26FqRdDu0P7n/wgBpmRiRVzMt4pONK5MfsTqGG3gn6niArmtRJE= X-Received: by 2002:a24:7412:: with SMTP id o18-v6mr2462308itc.81.1535478693191; Tue, 28 Aug 2018 10:51:33 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:665b:0:0:0:0:0 with HTTP; Tue, 28 Aug 2018 10:51:32 -0700 (PDT) In-Reply-To: References: From: Kevin Bowling Date: Tue, 28 Aug 2018 10:51:32 -0700 Message-ID: Subject: Re: svn commit: r338348 - in head/sys/dev: drm drm2 To: Mark Millard Cc: imp@freebsd.org, svn-src-head@freebsd.org, FreeBSD PowerPC ML Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 17:51:34 -0000 Legacy would be needed by existing these existing ppc64 at the moment and I pointed out in the review that LP64 is not the correct heuristic but was dismissed without understanding the point. On Tue, Aug 28, 2018 at 10:36 AM, Mark Millard via svn-src-head wrote: > For the below I wonder if graphics/drm-stable-kmod > would be correct for old powerpc64 PowerMac's and > such. > > Presuming graphics/drm-legacy-kmod (I do not know): > Tier 2, old equipment, etc. so it may just be an item > for handling questions on the lists rather than making > a mess instead of the below to cover sufficient > alternatives. > >> Modified: head/sys/dev/drm2/drm_os_freebsd.h >> ============================================================================== >> --- head/sys/dev/drm2/drm_os_freebsd.h Tue Aug 28 14:46:49 2018 (r338347) >> +++ head/sys/dev/drm2/drm_os_freebsd.h Tue Aug 28 14:46:55 2018 (r338348) >> @@ -154,6 +154,20 @@ typedef void irqreturn_t; >> *(volatile u_int64_t *)(((vm_offset_t)(map)->handle) + \ >> (vm_offset_t)(offset)) = htole64(val) >> >> +#ifdef __LP64__ >> +#define DRM_PORT "graphics/drm-stable-kmod" >> +#else >> +#define DRM_PORT "graphics/drm-legacy-kmod" >> +#endif >> + >> +#define DRM_OBSOLETE(dev) \ >> + do { \ >> + device_printf(dev, "=======================================================\n"); \ >> + device_printf(dev, "This code is obsolete abandonware. Install the " DRM_PORT " pkg\n"); \ >> + device_printf(dev, "=======================================================\n"); \ >> + gone_in_dev(dev, 13, "drm2 drivers"); \ >> + } while (0) >> + >> /* DRM_READMEMORYBARRIER() prevents reordering of reads. >> * DRM_WRITEMEMORYBARRIER() prevents reordering of writes. >> * DRM_MEMORYBARRIER() prevents reordering of reads and writes. > > > === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) > > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Tue Aug 28 17:56:52 2018 Return-Path: Delivered-To: svn-src-head@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 45AB11092C7A for ; Tue, 28 Aug 2018 17:56:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C16818EB9A for ; Tue, 28 Aug 2018 17:56:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x229.google.com with SMTP id j81-v6so3944843ite.0 for ; Tue, 28 Aug 2018 10:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PTJ/1gAnp0XEtKVKbURYiOLuh0/VEkNWiiys7n3wvco=; b=TAZC/WBTsmsDStUIpVPNgkV5ImdmrP3T0t37Ptk2SlU0blLIigP7/ZTy4geQZBp4/b uZWMp0Wp7DB+fe8pkqjW3+cGyeLTld3nULOgeIF7luhzyxRZQPmZTjT1trDyr70rfm9h F9XLU2OSkKRnatE59T0jN3tTeIqnyQDTcQZZuix1doYsL0IoeqsCP+j1zaJVq0z0KRGh tzPYb0GiUR+2pj7z/yGkhIlBVNTFvylosOLlHzBtpl63RxWDXQBQAfsFfCtzoCP5ZA8q /xDZ4CjLpHtvby7YwHcHs3Tf/Xb+hBRMJV/MecfQauLLvia847q6mzxqP2NeImGui+6a 40Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PTJ/1gAnp0XEtKVKbURYiOLuh0/VEkNWiiys7n3wvco=; b=iedq4k8q4WMACBqLlZi/3aT4c9rDzmVUEQ75kmz0gYpF5EFPVedrA8snUPTir4KAYM YxypUqwx0ncurSNHGOO1WCYHzv8pIrCwlbjllqTqL5eEaCSFEQCq6+XVhhmnSp2q4WWh WAAFiqUvIzXIToQkBcoykg2nhF/H5QfR88XNIgXe6QxOzA5ix1tiAyqrmro34CgxS2HJ BYYyyS4roqR5v8W3z8LQxSPYzTTGSH7Eblul5+iO4MrGT0WlR3zoEFVjPQ0eIM4Jmqly bF9gOQSVt+6UxCwrOJYUDHqJwpqZ1sq5oLmqLyaLRGkQUEKnQ2egiJ7ZB36XRhNNHXZt 52vw== X-Gm-Message-State: APzg51DvOIWl0qQXdiWBOwsGAtEko58sBOSDpcK5GFHXn8GR/41JtIwU nZy0eddbZ60tSvyP31Je1iKEYC2mor80J/jnS1TZVg== X-Google-Smtp-Source: ANB0VdZBGVGCwcNxe2Md/w/urvmGipDPUuyFiYd48Plt3XhXQ9QqLf8tvwnKwKD+mBRWmjg8Wk89wedMtPVU+CZNXxQ= X-Received: by 2002:a24:c902:: with SMTP id h2-v6mr2489455itg.75.1535479010577; Tue, 28 Aug 2018 10:56:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Tue, 28 Aug 2018 11:56:39 -0600 Message-ID: Subject: Re: svn commit: r338348 - in head/sys/dev: drm drm2 To: Kevin Bowling Cc: Mark Millard , Warner Losh , svn-src-head@freebsd.org, FreeBSD PowerPC ML Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 17:56:52 -0000 Your comments weren't exactly clear in the review (even after clarification), and they were at odds with what I'd been told, I thought, the graphics folks wanted to message: all 64-bit platforms use drm-stable/drm-devel. Warner On Tue, Aug 28, 2018 at 11:51 AM Kevin Bowling wrote: > Legacy would be needed by existing these existing ppc64 at the moment > and I pointed out in the review that LP64 is not the correct heuristic > but was dismissed without understanding the point. > > On Tue, Aug 28, 2018 at 10:36 AM, Mark Millard via svn-src-head > wrote: > > For the below I wonder if graphics/drm-stable-kmod > > would be correct for old powerpc64 PowerMac's and > > such. > > > > Presuming graphics/drm-legacy-kmod (I do not know): > > Tier 2, old equipment, etc. so it may just be an item > > for handling questions on the lists rather than making > > a mess instead of the below to cover sufficient > > alternatives. > > > >> Modified: head/sys/dev/drm2/drm_os_freebsd.h > >> > ============================================================================== > >> --- head/sys/dev/drm2/drm_os_freebsd.h Tue Aug 28 14:46:49 2018 > (r338347) > >> +++ head/sys/dev/drm2/drm_os_freebsd.h Tue Aug 28 14:46:55 2018 > (r338348) > >> @@ -154,6 +154,20 @@ typedef void irqreturn_t; > >> *(volatile u_int64_t *)(((vm_offset_t)(map)->handle) + \ > >> (vm_offset_t)(offset)) = htole64(val) > >> > >> +#ifdef __LP64__ > >> +#define DRM_PORT "graphics/drm-stable-kmod" > >> +#else > >> +#define DRM_PORT "graphics/drm-legacy-kmod" > >> +#endif > >> + > >> +#define DRM_OBSOLETE(dev) > \ > >> + do { > \ > >> + device_printf(dev, > "=======================================================\n"); \ > >> + device_printf(dev, "This code is obsolete abandonware. Install > the " DRM_PORT " pkg\n"); \ > >> + device_printf(dev, > "=======================================================\n"); \ > >> + gone_in_dev(dev, 13, "drm2 drivers"); > \ > >> + } while (0) > >> + > >> /* DRM_READMEMORYBARRIER() prevents reordering of reads. > >> * DRM_WRITEMEMORYBARRIER() prevents reordering of writes. > >> * DRM_MEMORYBARRIER() prevents reordering of reads and writes. > > > > > > === > > Mark Millard > > marklmi at yahoo.com > > ( dsl-only.net went > > away in early 2018-Mar) > > > > _______________________________________________ > > svn-src-head@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@freebsd.org Tue Aug 28 18:16:03 2018 Return-Path: Delivered-To: svn-src-head@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 4D6A01093883; Tue, 28 Aug 2018 18:16:03 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0379D8FAD3; Tue, 28 Aug 2018 18:16:03 +0000 (UTC) (envelope-from np@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 D4A991062D; Tue, 28 Aug 2018 18:16:02 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SIG2aa098376; Tue, 28 Aug 2018 18:16:02 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SIG2km098375; Tue, 28 Aug 2018 18:16:02 GMT (envelope-from np@FreeBSD.org) Message-Id: <201808281816.w7SIG2km098375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 28 Aug 2018 18:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338355 - head/sys/dev/cxgbe/tom X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 338355 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 18:16:03 -0000 Author: np Date: Tue Aug 28 18:16:02 2018 New Revision: 338355 URL: https://svnweb.freebsd.org/changeset/base/338355 Log: cxgbe/tom: Unregister shared CPL handlers on module unload. This fixes a panic with INVARIANTS that occurs when t4_tom is unloaded and reloaded. Approved by: re@ (kib@) Modified: head/sys/dev/cxgbe/tom/t4_ddp.c Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Tue Aug 28 17:14:46 2018 (r338354) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Tue Aug 28 18:16:02 2018 (r338355) @@ -1970,6 +1970,8 @@ t4_ddp_mod_unload(void) taskqueue_drain(taskqueue_thread, &ddp_orphan_task); MPASS(TAILQ_EMPTY(&ddp_orphan_pagesets)); mtx_destroy(&ddp_orphan_pagesets_lock); + t4_register_shared_cpl_handler(CPL_SET_TCB_RPL, NULL, CPL_COOKIE_DDP0); + t4_register_shared_cpl_handler(CPL_SET_TCB_RPL, NULL, CPL_COOKIE_DDP1); t4_register_cpl_handler(CPL_RX_DATA_DDP, NULL); t4_register_cpl_handler(CPL_RX_DDP_COMPLETE, NULL); } From owner-svn-src-head@freebsd.org Tue Aug 28 18:47:03 2018 Return-Path: Delivered-To: svn-src-head@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 0E2201094EBD; Tue, 28 Aug 2018 18:47:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B4D2A91E2B; Tue, 28 Aug 2018 18:47:02 +0000 (UTC) (envelope-from kib@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 7BCD51220C; Tue, 28 Aug 2018 18:47:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SIl24J013937; Tue, 28 Aug 2018 18:47:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SIl2Dp013936; Tue, 28 Aug 2018 18:47:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808281847.w7SIl2Dp013936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 28 Aug 2018 18:47:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338356 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 338356 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 18:47:03 -0000 Author: kib Date: Tue Aug 28 18:47:02 2018 New Revision: 338356 URL: https://svnweb.freebsd.org/changeset/base/338356 Log: Several bug fixes and robustness improvements for the AP boot page table allocation. At the time that mp_bootaddress() is called, phys_avail[] array does not reflect some memory reservations already done, like kernel placement. Recent changes to DMAP protection which make kernel text read-only in DMAP revealed this, where on some machines AP boot page tables selection appears to intersect with the kernel itself. Fix this by checking the addresses selected using the same algorithm as bootaddr_rwx(). Also, try to chomp pages for the page table not only at the start of the contiguous range, but also at the end. This should improve robustness when the only suitable range is already consumed by the kernel. Reported and tested by: Michael Gmelin Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D16907 Modified: head/sys/amd64/amd64/mp_machdep.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Tue Aug 28 18:16:02 2018 (r338355) +++ head/sys/amd64/amd64/mp_machdep.c Tue Aug 28 18:47:02 2018 (r338356) @@ -86,6 +86,8 @@ __FBSDID("$FreeBSD$"); #define GiB(v) (v ## ULL << 30) +#define AP_BOOTPT_SZ (PAGE_SIZE * 3) + extern struct pcpu __pcpu[]; /* Temporary variables for init_secondary() */ @@ -100,45 +102,79 @@ char *dbg_stack; static int start_ap(int apic_id); +static bool +is_kernel_paddr(vm_paddr_t pa) +{ + + return (pa >= trunc_2mpage(btext - KERNBASE) && + pa < round_page(_end - KERNBASE)); +} + +static bool +is_mpboot_good(vm_paddr_t start, vm_paddr_t end) +{ + + return (start + AP_BOOTPT_SZ <= GiB(4) && atop(end) < Maxmem); +} + /* * Calculate usable address in base memory for AP trampoline code. */ void mp_bootaddress(vm_paddr_t *physmap, unsigned int *physmap_idx) { + vm_paddr_t start, end; unsigned int i; bool allocated; alloc_ap_trampoline(physmap, physmap_idx); + /* + * Find a memory region big enough below the 4GB boundary to + * store the initial page tables. Region must be mapped by + * the direct map. + * + * Note that it needs to be aligned to a page boundary. + */ allocated = false; for (i = *physmap_idx; i <= *physmap_idx; i -= 2) { /* - * Find a memory region big enough below the 4GB - * boundary to store the initial page tables. Region - * must be mapped by the direct map. - * - * Note that it needs to be aligned to a page - * boundary. + * First, try to chomp at the start of the physmap region. + * Kernel binary might claim it already. */ - if (physmap[i] >= GiB(4) || physmap[i + 1] - - round_page(physmap[i]) < PAGE_SIZE * 3 || - atop(physmap[i + 1]) > Maxmem) - continue; + start = round_page(physmap[i]); + end = start + AP_BOOTPT_SZ; + if (start < end && end <= physmap[i + 1] && + is_mpboot_good(start, end) && + !is_kernel_paddr(start) && !is_kernel_paddr(end - 1)) { + allocated = true; + physmap[i] = end; + break; + } - allocated = true; - mptramp_pagetables = round_page(physmap[i]); - physmap[i] = round_page(physmap[i]) + (PAGE_SIZE * 3); + /* + * Second, try to chomp at the end. Again, check + * against kernel. + */ + end = trunc_page(physmap[i + 1]); + start = end - AP_BOOTPT_SZ; + if (start < end && start >= physmap[i] && + is_mpboot_good(start, end) && + !is_kernel_paddr(start) && !is_kernel_paddr(end - 1)) { + allocated = true; + physmap[i + 1] = start; + break; + } + } + if (allocated) { + mptramp_pagetables = start; if (physmap[i] == physmap[i + 1] && *physmap_idx != 0) { memmove(&physmap[i], &physmap[i + 2], sizeof(*physmap) * (*physmap_idx - i + 2)); *physmap_idx -= 2; } - break; - } - - if (!allocated) { - mptramp_pagetables = trunc_page(boot_address) - (PAGE_SIZE * 3); + } else { + mptramp_pagetables = trunc_page(boot_address) - AP_BOOTPT_SZ; if (bootverbose) printf( "Cannot find enough space for the initial AP page tables, placing them at %#x", From owner-svn-src-head@freebsd.org Tue Aug 28 18:49:40 2018 Return-Path: Delivered-To: svn-src-head@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 C47DF1094F69; Tue, 28 Aug 2018 18:49:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7455391FC5; Tue, 28 Aug 2018 18:49:40 +0000 (UTC) (envelope-from kib@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 5028412215; Tue, 28 Aug 2018 18:49:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SInenU014097; Tue, 28 Aug 2018 18:49:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SIneC8014096; Tue, 28 Aug 2018 18:49:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808281849.w7SIneC8014096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 28 Aug 2018 18:49:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338357 - head/sys/compat/freebsd32 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/compat/freebsd32 X-SVN-Commit-Revision: 338357 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 18:49:40 -0000 Author: kib Date: Tue Aug 28 18:49:39 2018 New Revision: 338357 URL: https://svnweb.freebsd.org/changeset/base/338357 Log: Fix compat32 ftruncate cap mode after ino64. Reported by: asomers PR: 230120 Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Modified: head/sys/compat/freebsd32/capabilities.conf Modified: head/sys/compat/freebsd32/capabilities.conf ============================================================================== --- head/sys/compat/freebsd32/capabilities.conf Tue Aug 28 18:47:02 2018 (r338356) +++ head/sys/compat/freebsd32/capabilities.conf Tue Aug 28 18:49:39 2018 (r338357) @@ -108,6 +108,7 @@ freebsd32_fstat fstatfs fsync ftruncate +freebsd32_ftruncate freebsd32_futimens freebsd32_futimes getaudit From owner-svn-src-head@freebsd.org Tue Aug 28 18:50:35 2018 Return-Path: Delivered-To: svn-src-head@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 436BD1095003; Tue, 28 Aug 2018 18:50:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECABB9215F; Tue, 28 Aug 2018 18:50:34 +0000 (UTC) (envelope-from kib@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 CE8821221B; Tue, 28 Aug 2018 18:50:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SIoYhX014816; Tue, 28 Aug 2018 18:50:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SIoYG5014801; Tue, 28 Aug 2018 18:50:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808281850.w7SIoYG5014801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 28 Aug 2018 18:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338358 - head/sys/compat/freebsd32 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/compat/freebsd32 X-SVN-Commit-Revision: 338358 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 18:50:35 -0000 Author: kib Date: Tue Aug 28 18:50:34 2018 New Revision: 338358 URL: https://svnweb.freebsd.org/changeset/base/338358 Log: Regen after r338357. Approved by: re (gjb) Modified: head/sys/compat/freebsd32/freebsd32_sysent.c Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Tue Aug 28 18:49:39 2018 (r338357) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Tue Aug 28 18:50:34 2018 (r338358) @@ -257,7 +257,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 198 = __syscall */ { compat6(AS(freebsd6_freebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 199 = freebsd6 freebsd32_lseek */ { compat6(AS(freebsd6_freebsd32_truncate_args),freebsd32_truncate), AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 200 = freebsd6 freebsd32_truncate */ - { compat6(AS(freebsd6_freebsd32_ftruncate_args),freebsd32_ftruncate), AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 201 = freebsd6 freebsd32_ftruncate */ + { compat6(AS(freebsd6_freebsd32_ftruncate_args),freebsd32_ftruncate), AUE_FTRUNCATE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 201 = freebsd6 freebsd32_ftruncate */ { AS(freebsd32_sysctl_args), (sy_call_t *)freebsd32_sysctl, AUE_SYSCTL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 202 = freebsd32_sysctl */ { AS(mlock_args), (sy_call_t *)sys_mlock, AUE_MLOCK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 203 = mlock */ { AS(munlock_args), (sy_call_t *)sys_munlock, AUE_MUNLOCK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 204 = munlock */ @@ -537,14 +537,14 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 477 = freebsd32_mmap */ { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 478 = freebsd32_lseek */ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 479 = freebsd32_truncate */ - { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 480 = freebsd32_ftruncate */ + { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 480 = freebsd32_ftruncate */ #else { AS(freebsd32_pread_args), (sy_call_t *)freebsd32_pread, AUE_PREAD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 475 = freebsd32_pread */ { AS(freebsd32_pwrite_args), (sy_call_t *)freebsd32_pwrite, AUE_PWRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 476 = freebsd32_pwrite */ { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 477 = freebsd32_mmap */ { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 478 = freebsd32_lseek */ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 479 = freebsd32_truncate */ - { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 480 = freebsd32_ftruncate */ + { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 480 = freebsd32_ftruncate */ #endif { AS(thr_kill2_args), (sy_call_t *)sys_thr_kill2, AUE_THR_KILL2, NULL, 0, 0, 0, SY_THR_STATIC }, /* 481 = thr_kill2 */ { AS(shm_open_args), (sy_call_t *)sys_shm_open, AUE_SHMOPEN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 482 = shm_open */ From owner-svn-src-head@freebsd.org Tue Aug 28 20:21:38 2018 Return-Path: Delivered-To: svn-src-head@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 8FCE510975FE; Tue, 28 Aug 2018 20:21:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 44B879522E; Tue, 28 Aug 2018 20:21:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25C55132AB; Tue, 28 Aug 2018 20:21:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SKLctS060013; Tue, 28 Aug 2018 20:21:38 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SKLabG060006; Tue, 28 Aug 2018 20:21:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808282021.w7SKLabG060006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 28 Aug 2018 20:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338359 - in head/sys/cddl/dev/fbt: . aarch64 arm mips powerpc riscv x86 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys/cddl/dev/fbt: . aarch64 arm mips powerpc riscv x86 X-SVN-Commit-Revision: 338359 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 20:21:38 -0000 Author: markj Date: Tue Aug 28 20:21:36 2018 New Revision: 338359 URL: https://svnweb.freebsd.org/changeset/base/338359 Log: Allow multiple FBT probes to share a tracepoint. With GNU ifuncs, multiple FBT probes may correspond to the same instruction. fbt_invop() assumed that this could not happen and would return after the first probe found in the global FBT hash table, which might not be the one that's enabled. Fix the problem on x86 by linking probes that share a tracepoint and having each linked probe fire when the tracepoint is hit. PR: 230846 Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16921 Modified: head/sys/cddl/dev/fbt/aarch64/fbt_isa.c head/sys/cddl/dev/fbt/arm/fbt_isa.c head/sys/cddl/dev/fbt/fbt.c head/sys/cddl/dev/fbt/fbt.h head/sys/cddl/dev/fbt/mips/fbt_isa.c head/sys/cddl/dev/fbt/powerpc/fbt_isa.c head/sys/cddl/dev/fbt/riscv/fbt_isa.c head/sys/cddl/dev/fbt/x86/fbt_isa.c Modified: head/sys/cddl/dev/fbt/aarch64/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/aarch64/fbt_isa.c Tue Aug 28 18:50:34 2018 (r338358) +++ head/sys/cddl/dev/fbt/aarch64/fbt_isa.c Tue Aug 28 20:21:36 2018 (r338359) @@ -152,7 +152,7 @@ again: fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, name, FBT_RETURN, 3, fbt); } else { - retfbt->fbtp_next = fbt; + retfbt->fbtp_probenext = fbt; fbt->fbtp_id = retfbt->fbtp_id; } retfbt = fbt; Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/arm/fbt_isa.c Tue Aug 28 18:50:34 2018 (r338358) +++ head/sys/cddl/dev/fbt/arm/fbt_isa.c Tue Aug 28 20:21:36 2018 (r338359) @@ -165,7 +165,7 @@ again: fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, name, FBT_RETURN, 2, fbt); } else { - retfbt->fbtp_next = fbt; + retfbt->fbtp_probenext = fbt; fbt->fbtp_id = retfbt->fbtp_id; } retfbt = fbt; Modified: head/sys/cddl/dev/fbt/fbt.c ============================================================================== --- head/sys/cddl/dev/fbt/fbt.c Tue Aug 28 18:50:34 2018 (r338358) +++ head/sys/cddl/dev/fbt/fbt.c Tue Aug 28 20:21:36 2018 (r338359) @@ -156,7 +156,7 @@ fbt_doubletrap(void) for (i = 0; i < fbt_probetab_size; i++) { fbt = fbt_probetab[i]; - for (; fbt != NULL; fbt = fbt->fbtp_next) + for (; fbt != NULL; fbt = fbt->fbtp_probenext) fbt_patch_tracepoint(fbt, fbt->fbtp_savedval); } } @@ -205,39 +205,52 @@ fbt_provide_module(void *arg, modctl_t *lf) } static void +fbt_destroy_one(fbt_probe_t *fbt) +{ + fbt_probe_t *hash, *hashprev, *next; + int ndx; + + ndx = FBT_ADDR2NDX(fbt->fbtp_patchpoint); + for (hash = fbt_probetab[ndx], hashprev = NULL; hash != NULL; + hash = hash->fbtp_hashnext, hashprev = hash) { + if (hash == fbt) { + if ((next = fbt->fbtp_tracenext) != NULL) + next->fbtp_hashnext = hash->fbtp_hashnext; + else + next = hash->fbtp_hashnext; + if (hashprev != NULL) + hashprev->fbtp_hashnext = next; + else + fbt_probetab[ndx] = next; + goto free; + } else if (hash->fbtp_patchpoint == fbt->fbtp_patchpoint) { + for (next = hash; next->fbtp_tracenext != NULL; + next = next->fbtp_tracenext) { + if (fbt == next->fbtp_tracenext) { + next->fbtp_tracenext = + fbt->fbtp_tracenext; + goto free; + } + } + } + } + panic("probe %p not found in hash table", fbt); +free: + free(fbt, M_FBT); +} + +static void fbt_destroy(void *arg, dtrace_id_t id, void *parg) { - fbt_probe_t *fbt = parg, *next, *hash, *last; + fbt_probe_t *fbt = parg, *next; modctl_t *ctl; - int ndx; do { ctl = fbt->fbtp_ctl; - ctl->fbt_nentries--; - /* - * Now we need to remove this probe from the fbt_probetab. - */ - ndx = FBT_ADDR2NDX(fbt->fbtp_patchpoint); - last = NULL; - hash = fbt_probetab[ndx]; - - while (hash != fbt) { - ASSERT(hash != NULL); - last = hash; - hash = hash->fbtp_hashnext; - } - - if (last != NULL) { - last->fbtp_hashnext = fbt->fbtp_hashnext; - } else { - fbt_probetab[ndx] = fbt->fbtp_hashnext; - } - - next = fbt->fbtp_next; - free(fbt, M_FBT); - + next = fbt->fbtp_probenext; + fbt_destroy_one(fbt); fbt = next; } while (fbt != NULL); } @@ -265,14 +278,16 @@ fbt_enable(void *arg, dtrace_id_t id, void *parg) return; } - for (; fbt != NULL; fbt = fbt->fbtp_next) + for (; fbt != NULL; fbt = fbt->fbtp_probenext) { fbt_patch_tracepoint(fbt, fbt->fbtp_patchval); + fbt->fbtp_enabled++; + } } static void fbt_disable(void *arg, dtrace_id_t id, void *parg) { - fbt_probe_t *fbt = parg; + fbt_probe_t *fbt = parg, *hash; modctl_t *ctl = fbt->fbtp_ctl; ASSERT(ctl->nenabled > 0); @@ -281,8 +296,21 @@ fbt_disable(void *arg, dtrace_id_t id, void *parg) if ((ctl->loadcnt != fbt->fbtp_loadcnt)) return; - for (; fbt != NULL; fbt = fbt->fbtp_next) - fbt_patch_tracepoint(fbt, fbt->fbtp_savedval); + for (; fbt != NULL; fbt = fbt->fbtp_probenext) { + fbt->fbtp_enabled--; + + for (hash = fbt_probetab[FBT_ADDR2NDX(fbt->fbtp_patchpoint)]; + hash != NULL; hash = hash->fbtp_hashnext) { + if (hash->fbtp_patchpoint == fbt->fbtp_patchpoint) { + for (; hash != NULL; hash = hash->fbtp_tracenext) + if (hash->fbtp_enabled > 0) + break; + break; + } + } + if (hash == NULL) + fbt_patch_tracepoint(fbt, fbt->fbtp_savedval); + } } static void @@ -296,7 +324,7 @@ fbt_suspend(void *arg, dtrace_id_t id, void *parg) if ((ctl->loadcnt != fbt->fbtp_loadcnt)) return; - for (; fbt != NULL; fbt = fbt->fbtp_next) + for (; fbt != NULL; fbt = fbt->fbtp_probenext) fbt_patch_tracepoint(fbt, fbt->fbtp_savedval); } @@ -311,7 +339,7 @@ fbt_resume(void *arg, dtrace_id_t id, void *parg) if ((ctl->loadcnt != fbt->fbtp_loadcnt)) return; - for (; fbt != NULL; fbt = fbt->fbtp_next) + for (; fbt != NULL; fbt = fbt->fbtp_probenext) fbt_patch_tracepoint(fbt, fbt->fbtp_patchval); } Modified: head/sys/cddl/dev/fbt/fbt.h ============================================================================== --- head/sys/cddl/dev/fbt/fbt.h Tue Aug 28 18:50:34 2018 (r338358) +++ head/sys/cddl/dev/fbt/fbt.h Tue Aug 28 20:21:36 2018 (r338359) @@ -34,9 +34,18 @@ #include "fbt_isa.h" +/* + * fbt_probe is a bit of a misnomer. One of these structures is created for + * each trace point of an FBT probe. A probe might have multiple trace points + * (e.g., a function with multiple return instructions), and different probes + * might have a trace point at the same address (e.g., GNU ifuncs). + */ typedef struct fbt_probe { - struct fbt_probe *fbtp_hashnext; - fbt_patchval_t *fbtp_patchpoint; + struct fbt_probe *fbtp_hashnext; /* global hash table linkage */ + struct fbt_probe *fbtp_tracenext; /* next probe for tracepoint */ + struct fbt_probe *fbtp_probenext; /* next tracepoint for probe */ + int fbtp_enabled; + fbt_patchval_t *fbtp_patchpoint; int8_t fbtp_rval; fbt_patchval_t fbtp_patchval; fbt_patchval_t fbtp_savedval; @@ -46,7 +55,6 @@ typedef struct fbt_probe { modctl_t *fbtp_ctl; int fbtp_loadcnt; int fbtp_symindx; - struct fbt_probe *fbtp_next; } fbt_probe_t; struct linker_file; Modified: head/sys/cddl/dev/fbt/mips/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/mips/fbt_isa.c Tue Aug 28 18:50:34 2018 (r338358) +++ head/sys/cddl/dev/fbt/mips/fbt_isa.c Tue Aug 28 20:21:36 2018 (r338359) @@ -142,7 +142,7 @@ again: fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, name, FBT_RETURN, 3, fbt); } else { - retfbt->fbtp_next = fbt; + retfbt->fbtp_probenext = fbt; fbt->fbtp_id = retfbt->fbtp_id; } retfbt = fbt; Modified: head/sys/cddl/dev/fbt/powerpc/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Tue Aug 28 18:50:34 2018 (r338358) +++ head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Tue Aug 28 20:21:36 2018 (r338359) @@ -208,7 +208,7 @@ again: fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, name, FBT_RETURN, FBT_AFRAMES, fbt); } else { - retfbt->fbtp_next = fbt; + retfbt->fbtp_probenext = fbt; fbt->fbtp_id = retfbt->fbtp_id; } Modified: head/sys/cddl/dev/fbt/riscv/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/riscv/fbt_isa.c Tue Aug 28 18:50:34 2018 (r338358) +++ head/sys/cddl/dev/fbt/riscv/fbt_isa.c Tue Aug 28 20:21:36 2018 (r338359) @@ -141,7 +141,7 @@ again: fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, name, FBT_RETURN, 3, fbt); } else { - retfbt->fbtp_next = fbt; + retfbt->fbtp_probenext = fbt; fbt->fbtp_id = retfbt->fbtp_id; } retfbt = fbt; Modified: head/sys/cddl/dev/fbt/x86/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/x86/fbt_isa.c Tue Aug 28 18:50:34 2018 (r338358) +++ head/sys/cddl/dev/fbt/x86/fbt_isa.c Tue Aug 28 20:21:36 2018 (r338359) @@ -67,6 +67,7 @@ fbt_invop(uintptr_t addr, struct trapframe *frame, uin uintptr_t *stack; uintptr_t arg0, arg1, arg2, arg3, arg4; fbt_probe_t *fbt; + int8_t fbtrval; #ifdef __amd64__ stack = (uintptr_t *)frame->tf_rsp; @@ -78,7 +79,11 @@ fbt_invop(uintptr_t addr, struct trapframe *frame, uin cpu = &solaris_cpu[curcpu]; fbt = fbt_probetab[FBT_ADDR2NDX(addr)]; for (; fbt != NULL; fbt = fbt->fbtp_hashnext) { - if ((uintptr_t)fbt->fbtp_patchpoint == addr) { + if ((uintptr_t)fbt->fbtp_patchpoint != addr) + continue; + fbtrval = fbt->fbtp_rval; + for (; fbt != NULL; fbt = fbt->fbtp_tracenext) { + ASSERT(fbt->fbtp_rval == fbtrval); if (fbt->fbtp_roffset == 0) { #ifdef __amd64__ /* fbt->fbtp_rval == DTRACE_INVOP_PUSHQ_RBP */ @@ -135,9 +140,8 @@ fbt_invop(uintptr_t addr, struct trapframe *frame, uin rval, 0, 0, 0); cpu->cpu_dtrace_caller = 0; } - - return (fbt->fbtp_rval); } + return (fbtrval); } return (0); @@ -162,7 +166,7 @@ fbt_provide_module_function(linker_file_t lf, int symi { char *modname = opaque; const char *name = symval->name; - fbt_probe_t *fbt, *retfbt; + fbt_probe_t *fbt, *hash, *retfbt; int j; int size; uint8_t *instr, *limit; @@ -224,8 +228,18 @@ fbt_provide_module_function(linker_file_t lf, int symi fbt->fbtp_patchval = FBT_PATCHVAL; fbt->fbtp_symindx = symindx; - fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)]; - fbt_probetab[FBT_ADDR2NDX(instr)] = fbt; + for (hash = fbt_probetab[FBT_ADDR2NDX(instr)]; hash != NULL; + hash = hash->fbtp_hashnext) { + if (hash->fbtp_patchpoint == fbt->fbtp_patchpoint) { + fbt->fbtp_tracenext = hash->fbtp_tracenext; + hash->fbtp_tracenext = fbt; + break; + } + } + if (hash == NULL) { + fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)]; + fbt_probetab[FBT_ADDR2NDX(instr)] = fbt; + } lf->fbt_nentries++; @@ -301,7 +315,7 @@ again: fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, name, FBT_RETURN, 3, fbt); } else { - retfbt->fbtp_next = fbt; + retfbt->fbtp_probenext = fbt; fbt->fbtp_id = retfbt->fbtp_id; } From owner-svn-src-head@freebsd.org Tue Aug 28 21:09:22 2018 Return-Path: Delivered-To: svn-src-head@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 1EE24109829D; Tue, 28 Aug 2018 21:09:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C49F2969A1; Tue, 28 Aug 2018 21:09:21 +0000 (UTC) (envelope-from jhb@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 A5CE313A2A; Tue, 28 Aug 2018 21:09:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SL9Low085981; Tue, 28 Aug 2018 21:09:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SL9JwV085968; Tue, 28 Aug 2018 21:09:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201808282109.w7SL9JwV085968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 28 Aug 2018 21:09:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338360 - in head: sys/sys sys/x86/acpica sys/x86/include sys/x86/iommu sys/x86/isa sys/x86/x86 sys/x86/xen usr.bin/vmstat X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: sys/sys sys/x86/acpica sys/x86/include sys/x86/iommu sys/x86/isa sys/x86/x86 sys/x86/xen usr.bin/vmstat X-SVN-Commit-Revision: 338360 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 21:09:22 -0000 Author: jhb Date: Tue Aug 28 21:09:19 2018 New Revision: 338360 URL: https://svnweb.freebsd.org/changeset/base/338360 Log: Dynamically allocate IRQ ranges on x86. Previously, x86 used static ranges of IRQ values for different types of I/O interrupts. Interrupt pins on I/O APICs and 8259A PICs used IRQ values from 0 to 254. MSI interrupts used a compile-time-defined range starting at 256, and Xen event channels used a compile-time-defined range after MSI. Some recent systems have more than 255 I/O APIC interrupt pins which resulted in those IRQ values overflowing into the MSI range triggering an assertion failure. Replace statically assigned ranges with dynamic ranges. Do a single pass computing the sizes of the IRQ ranges (PICs, MSI, Xen) to determine the total number of IRQs required. Allocate the interrupt source and interrupt count arrays dynamically once this pass has completed. To minimize runtime complexity these arrays are only sized once during bootup. The PIC range is determined by the PICs present in the system. The MSI and Xen ranges continue to use a fixed size, though this does make it possible to turn the MSI range size into a tunable in the future. As a result, various places are updated to use dynamic limits instead of constants. In addition, the vmstat(8) utility has been taught to understand that some kernels may treat 'intrcnt' and 'intrnames' as pointers rather than arrays when extracting interrupt stats from a crashdump. This is determined by the presence (vs absence) of a global 'nintrcnt' symbol. This change reverts r189404 which worked around a buggy BIOS which enumerated an I/O APIC twice (using the same memory mapped address for both entries but using an IRQ base of 256 for one entry and a valid IRQ base for the second entry). Making the "base" of MSI IRQ values dynamic avoids the panic that r189404 worked around, and there may now be valid I/O APICs with an IRQ base above 256 which this workaround would incorrectly skip. If in the future the issue reported in PR 130483 reoccurs, we will have to add a pass over the I/O APIC entries in the MADT to detect duplicates using the memory mapped address and use some strategy to choose the "correct" one. While here, reserve room in intrcnts for the Hyper-V counters. PR: 229429, 130483 Reviewed by: kib, royger, cem Tested by: royger (Xen), kib (DMAR) Approved by: re (gjb) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16861 Modified: head/sys/sys/interrupt.h head/sys/x86/acpica/madt.c head/sys/x86/include/apicvar.h head/sys/x86/include/intr_machdep.h head/sys/x86/iommu/intel_intrmap.c head/sys/x86/isa/atpic.c head/sys/x86/x86/intr_machdep.c head/sys/x86/x86/io_apic.c head/sys/x86/x86/local_apic.c head/sys/x86/x86/msi.c head/sys/x86/x86/nexus.c head/sys/x86/xen/xen_intr.c head/sys/x86/xen/xen_msi.c head/sys/x86/xen/xen_nexus.c head/usr.bin/vmstat/vmstat.c Modified: head/sys/sys/interrupt.h ============================================================================== --- head/sys/sys/interrupt.h Tue Aug 28 20:21:36 2018 (r338359) +++ head/sys/sys/interrupt.h Tue Aug 28 21:09:19 2018 (r338360) @@ -154,8 +154,13 @@ extern struct intr_event *clk_intr_event; extern void *vm_ih; /* Counts and names for statistics (defined in MD code). */ +#if defined(__amd64__) || defined(__i386__) +extern u_long *intrcnt; /* counts for for each device and stray */ +extern char *intrnames; /* string table containing device names */ +#else extern u_long intrcnt[]; /* counts for for each device and stray */ extern char intrnames[]; /* string table containing device names */ +#endif extern size_t sintrcnt; /* size of intrcnt table */ extern size_t sintrnames; /* size of intrnames table */ Modified: head/sys/x86/acpica/madt.c ============================================================================== --- head/sys/x86/acpica/madt.c Tue Aug 28 20:21:36 2018 (r338359) +++ head/sys/x86/acpica/madt.c Tue Aug 28 21:09:19 2018 (r338360) @@ -428,10 +428,6 @@ madt_parse_apics(ACPI_SUBTABLE_HEADER *entry, void *ar apic->Id); if (ioapics[apic->Id].io_apic != NULL) panic("%s: Double APIC ID %u", __func__, apic->Id); - if (apic->GlobalIrqBase >= FIRST_MSI_INT) { - printf("MADT: Ignoring bogus I/O APIC ID %u", apic->Id); - break; - } ioapics[apic->Id].io_apic = ioapic_create(apic->Address, apic->Id, apic->GlobalIrqBase); ioapics[apic->Id].io_vector = apic->GlobalIrqBase; Modified: head/sys/x86/include/apicvar.h ============================================================================== --- head/sys/x86/include/apicvar.h Tue Aug 28 20:21:36 2018 (r338359) +++ head/sys/x86/include/apicvar.h Tue Aug 28 21:09:19 2018 (r338360) @@ -158,10 +158,10 @@ #define APIC_BUS_PCI 2 #define APIC_BUS_MAX APIC_BUS_PCI -#define IRQ_EXTINT (NUM_IO_INTS + 1) -#define IRQ_NMI (NUM_IO_INTS + 2) -#define IRQ_SMI (NUM_IO_INTS + 3) -#define IRQ_DISABLED (NUM_IO_INTS + 4) +#define IRQ_EXTINT -1 +#define IRQ_NMI -2 +#define IRQ_SMI -3 +#define IRQ_DISABLED -4 /* * An APIC enumerator is a pseudo bus driver that enumerates APIC's including Modified: head/sys/x86/include/intr_machdep.h ============================================================================== --- head/sys/x86/include/intr_machdep.h Tue Aug 28 20:21:36 2018 (r338359) +++ head/sys/x86/include/intr_machdep.h Tue Aug 28 21:09:19 2018 (r338360) @@ -34,55 +34,41 @@ #ifdef _KERNEL /* - * The maximum number of I/O interrupts we allow. This number is rather - * arbitrary as it is just the maximum IRQ resource value. The interrupt - * source for a given IRQ maps that I/O interrupt to device interrupt - * source whether it be a pin on an interrupt controller or an MSI interrupt. - * The 16 ISA IRQs are assigned fixed IDT vectors, but all other device - * interrupts allocate IDT vectors on demand. Currently we have 191 IDT - * vectors available for device interrupts. On many systems with I/O APICs, - * a lot of the IRQs are not used, so this number can be much larger than - * 191 and still be safe since only interrupt sources in actual use will - * allocate IDT vectors. + * Values used in determining the allocation of IRQ values among + * different types of I/O interrupts. These values are used as + * indices into a interrupt source array to map I/O interrupts to a + * device interrupt source whether it be a pin on an interrupt + * controller or an MSI interrupt. The 16 ISA IRQs are assigned fixed + * IDT vectors, but all other device interrupts allocate IDT vectors + * on demand. Currently we have 191 IDT vectors available for device + * interrupts on each CPU. On many systems with I/O APICs, a lot of + * the IRQs are not used, so the total number of IRQ values reserved + * can exceed the number of available IDT slots. * - * The first 255 IRQs (0 - 254) are reserved for ISA IRQs and PCI intline IRQs. - * IRQ values from 256 to 767 are used by MSI. When running under the Xen - * Hypervisor, IRQ values from 768 to 4863 are available for binding to - * event channel events. We leave 255 unused to avoid confusion since 255 is - * used in PCI to indicate an invalid IRQ. + * The first 16 IRQs (0 - 15) are reserved for ISA IRQs. Interrupt + * pins on I/O APICs for non-ISA interrupts use IRQ values starting at + * IRQ 17. This layout matches the GSI numbering used by ACPI so that + * IRQ values returned by ACPI methods such as _CRS can be used + * directly by the ACPI bus driver. + * + * MSI interrupts allocate a block of interrupts starting at either + * the end of the I/O APIC range or 256, whichever is higher. When + * running under the Xen Hypervisor, an additional range of IRQ values + * are available for binding to event channel events. We use 256 as + * the minimum IRQ value for MSI interrupts to attempt to leave 255 + * unused since 255 is used in PCI to indicate an invalid INTx IRQ. */ #define NUM_MSI_INTS 512 -#define FIRST_MSI_INT 256 -#ifdef XENHVM -#include -#include -#define NUM_EVTCHN_INTS NR_EVENT_CHANNELS -#define FIRST_EVTCHN_INT \ - (FIRST_MSI_INT + NUM_MSI_INTS) -#define LAST_EVTCHN_INT \ - (FIRST_EVTCHN_INT + NUM_EVTCHN_INTS - 1) -#else -#define NUM_EVTCHN_INTS 0 -#endif -#define NUM_IO_INTS (FIRST_MSI_INT + NUM_MSI_INTS + NUM_EVTCHN_INTS) +#define MINIMUM_MSI_INT 256 +extern u_int first_msi_irq; +extern u_int num_io_irqs; + /* * Default base address for MSI messages on x86 platforms. */ #define MSI_INTEL_ADDR_BASE 0xfee00000 -/* - * - 1 ??? dummy counter. - * - 2 counters for each I/O interrupt. - * - 1 counter for each CPU for lapic timer. - * - 8 counters for each CPU for IPI counters for SMP. - */ -#ifdef SMP -#define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + (1 + 8) * MAXCPU) -#else -#define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + 1) -#endif - #ifndef LOCORE typedef void inthand_t(void); @@ -97,6 +83,7 @@ struct intsrc; * return the vector associated with this source. */ struct pic { + void (*pic_register_sources)(struct pic *); void (*pic_enable_source)(struct intsrc *); void (*pic_disable_source)(struct intsrc *, int); void (*pic_eoi_source)(struct intsrc *); @@ -184,6 +171,9 @@ int msi_map(int irq, uint64_t *addr, uint32_t *data); int msi_release(int *irqs, int count); int msix_alloc(device_t dev, int *irq); int msix_release(int irq); +#ifdef XENHVM +void xen_intr_alloc_irqs(void); +#endif #endif /* !LOCORE */ #endif /* _KERNEL */ Modified: head/sys/x86/iommu/intel_intrmap.c ============================================================================== --- head/sys/x86/iommu/intel_intrmap.c Tue Aug 28 20:21:36 2018 (r338359) +++ head/sys/x86/iommu/intel_intrmap.c Tue Aug 28 21:09:19 2018 (r338360) @@ -337,7 +337,7 @@ dmar_init_irt(struct dmar_unit *unit) "QI disabled, disabling interrupt remapping\n"); return (0); } - unit->irte_cnt = clp2(NUM_IO_INTS); + unit->irte_cnt = clp2(num_io_irqs); unit->irt = (dmar_irte_t *)(uintptr_t)kmem_alloc_contig( unit->irte_cnt * sizeof(dmar_irte_t), M_ZERO | M_WAITOK, 0, dmar_high, PAGE_SIZE, 0, DMAR_IS_COHERENT(unit) ? Modified: head/sys/x86/isa/atpic.c ============================================================================== --- head/sys/x86/isa/atpic.c Tue Aug 28 20:21:36 2018 (r338359) +++ head/sys/x86/isa/atpic.c Tue Aug 28 21:09:19 2018 (r338360) @@ -95,6 +95,7 @@ inthand_t #define ATPIC(io, base, eoi) { \ .at_pic = { \ + .pic_register_sources = atpic_register_sources, \ .pic_enable_source = atpic_enable_source, \ .pic_disable_source = atpic_disable_source, \ .pic_eoi_source = (eoi), \ @@ -133,6 +134,7 @@ struct atpic_intsrc { u_long at_straycount; }; +static void atpic_register_sources(struct pic *pic); static void atpic_enable_source(struct intsrc *isrc); static void atpic_disable_source(struct intsrc *isrc, int eoi); static void atpic_eoi_master(struct intsrc *isrc); @@ -203,6 +205,36 @@ _atpic_eoi_slave(struct intsrc *isrc) } static void +atpic_register_sources(struct pic *pic) +{ + struct atpic *ap = (struct atpic *)pic; + struct atpic_intsrc *ai; + int i; + + /* + * If any of the ISA IRQs have an interrupt source already, then + * assume that the I/O APICs are being used and don't register any + * of our interrupt sources. This makes sure we don't accidentally + * use mixed mode. The "accidental" use could otherwise occur on + * machines that route the ACPI SCI interrupt to a different ISA + * IRQ (at least one machine routes it to IRQ 13) thus disabling + * that APIC ISA routing and allowing the ATPIC source for that IRQ + * to leak through. We used to depend on this feature for routing + * IRQ0 via mixed mode, but now we don't use mixed mode at all. + */ + for (i = 0; i < NUM_ISA_IRQS; i++) + if (intr_lookup_source(i) != NULL) + return; + + /* Loop through all interrupt sources and add them. */ + for (i = 0, ai = atintrs + ap->at_irqbase; i < 8; i++, ai++) { + if (ap->at_irqbase + i == ICU_SLAVEID) + continue; + intr_register_source(&ai->at_intsrc); + } +} + +static void atpic_enable_source(struct intsrc *isrc) { struct atpic_intsrc *ai = (struct atpic_intsrc *)isrc; @@ -467,8 +499,6 @@ atpic_startup(void) static void atpic_init(void *dummy __unused) { - struct atpic_intsrc *ai; - int i; /* * Register our PICs, even if we aren't going to use any of their @@ -478,27 +508,8 @@ atpic_init(void *dummy __unused) intr_register_pic(&atpics[1].at_pic) != 0) panic("Unable to register ATPICs"); - /* - * If any of the ISA IRQs have an interrupt source already, then - * assume that the APICs are being used and don't register any - * of our interrupt sources. This makes sure we don't accidentally - * use mixed mode. The "accidental" use could otherwise occur on - * machines that route the ACPI SCI interrupt to a different ISA - * IRQ (at least one machines routes it to IRQ 13) thus disabling - * that APIC ISA routing and allowing the ATPIC source for that IRQ - * to leak through. We used to depend on this feature for routing - * IRQ0 via mixed mode, but now we don't use mixed mode at all. - */ - for (i = 0; i < NUM_ISA_IRQS; i++) - if (intr_lookup_source(i) != NULL) - return; - - /* Loop through all interrupt sources and add them. */ - for (i = 0, ai = atintrs; i < NUM_ISA_IRQS; i++, ai++) { - if (i == ICU_SLAVEID) - continue; - intr_register_source(&ai->at_intsrc); - } + if (num_io_irqs == 0) + num_io_irqs = NUM_ISA_IRQS; } SYSINIT(atpic_init, SI_SUB_INTR, SI_ORDER_FOURTH, atpic_init, NULL); Modified: head/sys/x86/x86/intr_machdep.c ============================================================================== --- head/sys/x86/x86/intr_machdep.c Tue Aug 28 20:21:36 2018 (r338359) +++ head/sys/x86/x86/intr_machdep.c Tue Aug 28 21:09:19 2018 (r338360) @@ -38,6 +38,7 @@ #include "opt_atpic.h" #include "opt_ddb.h" +#include "opt_smp.h" #include #include @@ -45,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -78,10 +80,9 @@ typedef void (*mask_fn)(void *); static int intrcnt_index; -static struct intsrc *interrupt_sources[NUM_IO_INTS]; +static struct intsrc **interrupt_sources; #ifdef SMP -static struct intsrc *interrupt_sorted[NUM_IO_INTS]; -CTASSERT(sizeof(interrupt_sources) == sizeof(interrupt_sorted)); +static struct intsrc **interrupt_sorted; static int intrbalance; SYSCTL_INT(_hw, OID_AUTO, intrbalance, CTLFLAG_RW, &intrbalance, 0, "Interrupt auto-balance interval (seconds). Zero disables."); @@ -91,16 +92,20 @@ static struct sx intrsrc_lock; static struct mtx intrpic_lock; static struct mtx intrcnt_lock; static TAILQ_HEAD(pics_head, pic) pics; +u_int num_io_irqs; #if defined(SMP) && !defined(EARLY_AP_STARTUP) static int assign_cpu; #endif -u_long intrcnt[INTRCNT_COUNT]; -char intrnames[INTRCNT_COUNT * (MAXCOMLEN + 1)]; +u_long *intrcnt; +char *intrnames; size_t sintrcnt = sizeof(intrcnt); size_t sintrnames = sizeof(intrnames); +int nintrcnt; +static MALLOC_DEFINE(M_INTR, "intr", "Interrupt Sources"); + static int intr_assign_cpu(void *arg, int cpu); static void intr_disable_src(void *arg); static void intr_init(void *__dummy); @@ -109,6 +114,18 @@ static void intrcnt_setname(const char *name, int inde static void intrcnt_updatename(struct intsrc *is); static void intrcnt_register(struct intsrc *is); +/* + * SYSINIT levels for SI_SUB_INTR: + * + * SI_ORDER_FIRST: Initialize locks and pics TAILQ, xen_hvm_cpu_init + * SI_ORDER_SECOND: Xen PICs + * SI_ORDER_THIRD: Add I/O APIC PICs, alloc MSI and Xen IRQ ranges + * SI_ORDER_FOURTH: Add 8259A PICs + * SI_ORDER_FOURTH + 1: Finalize interrupt count and add interrupt sources + * SI_ORDER_MIDDLE: SMP interrupt counters + * SI_ORDER_ANY: Enable interrupts on BSP + */ + static int intr_pic_registered(struct pic *pic) { @@ -144,6 +161,58 @@ intr_register_pic(struct pic *pic) } /* + * Allocate interrupt source arrays and register interrupt sources + * once the number of interrupts is known. + */ +static void +intr_init_sources(void *arg) +{ + struct pic *pic; + + MPASS(num_io_irqs > 0); + + interrupt_sources = mallocarray(num_io_irqs, sizeof(*interrupt_sources), + M_INTR, M_WAITOK | M_ZERO); + interrupt_sorted = mallocarray(num_io_irqs, sizeof(*interrupt_sorted), + M_INTR, M_WAITOK | M_ZERO); + + /* + * - 1 ??? dummy counter. + * - 2 counters for each I/O interrupt. + * - 1 counter for each CPU for lapic timer. + * - 1 counter for each CPU for the Hyper-V vmbus driver. + * - 8 counters for each CPU for IPI counters for SMP. + */ + nintrcnt = 1 + num_io_irqs * 2 + mp_ncpus * 2; +#ifdef COUNT_IPIS + if (mp_ncpus > 1) + nintrcnt += 8 * mp_ncpus; +#endif + intrcnt = mallocarray(nintrcnt, sizeof(u_long), M_INTR, M_WAITOK | + M_ZERO); + intrnames = mallocarray(nintrcnt, MAXCOMLEN + 1, M_INTR, M_WAITOK | + M_ZERO); + sintrcnt = nintrcnt * sizeof(u_long); + sintrnames = nintrcnt * (MAXCOMLEN + 1); + + intrcnt_setname("???", 0); + intrcnt_index = 1; + + /* + * NB: intrpic_lock is not held here to avoid LORs due to + * malloc() in intr_register_source(). However, we are still + * single-threaded at this point in startup so the list of + * PICs shouldn't change. + */ + TAILQ_FOREACH(pic, &pics, pics) { + if (pic->pic_register_sources != NULL) + pic->pic_register_sources(pic); + } +} +SYSINIT(intr_init_sources, SI_SUB_INTR, SI_ORDER_FOURTH + 1, intr_init_sources, + NULL); + +/* * Register a new interrupt source with the global interrupt system. * The global interrupts need to be disabled when this function is * called. @@ -155,6 +224,8 @@ intr_register_source(struct intsrc *isrc) KASSERT(intr_pic_registered(isrc->is_pic), ("unregistered PIC")); vector = isrc->is_pic->pic_vector(isrc); + KASSERT(vector < num_io_irqs, ("IRQ %d too large (%u irqs)", vector, + num_io_irqs)); if (interrupt_sources[vector] != NULL) return (EEXIST); error = intr_event_create(&isrc->is_event, isrc, 0, vector, @@ -180,7 +251,7 @@ struct intsrc * intr_lookup_source(int vector) { - if (vector < 0 || vector >= nitems(interrupt_sources)) + if (vector < 0 || vector >= num_io_irqs) return (NULL); return (interrupt_sources[vector]); } @@ -378,6 +449,7 @@ intrcnt_register(struct intsrc *is) KASSERT(is->is_event != NULL, ("%s: isrc with no event", __func__)); mtx_lock_spin(&intrcnt_lock); + MPASS(intrcnt_index + 2 <= nintrcnt); is->is_index = intrcnt_index; intrcnt_index += 2; snprintf(straystr, MAXCOMLEN + 1, "stray irq%d", @@ -394,6 +466,7 @@ intrcnt_add(const char *name, u_long **countp) { mtx_lock_spin(&intrcnt_lock); + MPASS(intrcnt_index < nintrcnt); *countp = &intrcnt[intrcnt_index]; intrcnt_setname(name, intrcnt_index); intrcnt_index++; @@ -404,8 +477,6 @@ static void intr_init(void *dummy __unused) { - intrcnt_setname("???", 0); - intrcnt_index = 1; TAILQ_INIT(&pics); mtx_init(&intrpic_lock, "intrpic", NULL, MTX_DEF); sx_init(&intrsrc_lock, "intrsrc"); @@ -471,10 +542,10 @@ void intr_reprogram(void) { struct intsrc *is; - int v; + u_int v; sx_xlock(&intrsrc_lock); - for (v = 0; v < NUM_IO_INTS; v++) { + for (v = 0; v < num_io_irqs; v++) { is = interrupt_sources[v]; if (is == NULL) continue; @@ -491,14 +562,15 @@ intr_reprogram(void) DB_SHOW_COMMAND(irqs, db_show_irqs) { struct intsrc **isrc; - int i, verbose; + u_int i; + int verbose; if (strcmp(modif, "v") == 0) verbose = 1; else verbose = 0; isrc = interrupt_sources; - for (i = 0; i < NUM_IO_INTS && !db_pager_quit; i++, isrc++) + for (i = 0; i < num_io_irqs && !db_pager_quit; i++, isrc++) if (*isrc != NULL) db_dump_intr_event((*isrc)->is_event, verbose); } @@ -606,8 +678,7 @@ static void intr_shuffle_irqs(void *arg __unused) { struct intsrc *isrc; - u_int cpu; - int i; + u_int cpu, i; intr_init_cpus(); /* Don't bother on UP. */ @@ -617,7 +688,7 @@ intr_shuffle_irqs(void *arg __unused) /* Round-robin assign a CPU to each enabled source. */ sx_xlock(&intrsrc_lock); assign_cpu = 1; - for (i = 0; i < NUM_IO_INTS; i++) { + for (i = 0; i < num_io_irqs; i++) { isrc = interrupt_sources[i]; if (isrc != NULL && isrc->is_handlers > 0) { /* @@ -652,8 +723,8 @@ sysctl_hw_intrs(SYSCTL_HANDLER_ARGS) { struct sbuf sbuf; struct intsrc *isrc; + u_int i; int error; - int i; error = sysctl_wire_old_buffer(req, 0); if (error != 0) @@ -661,7 +732,7 @@ sysctl_hw_intrs(SYSCTL_HANDLER_ARGS) sbuf_new_for_sysctl(&sbuf, NULL, 128, req); sx_slock(&intrsrc_lock); - for (i = 0; i < NUM_IO_INTS; i++) { + for (i = 0; i < num_io_irqs; i++) { isrc = interrupt_sources[i]; if (isrc == NULL) continue; @@ -720,8 +791,9 @@ intr_balance(void *dummy __unused, int pending __unuse * Sort interrupts according to count. */ sx_xlock(&intrsrc_lock); - memcpy(interrupt_sorted, interrupt_sources, sizeof(interrupt_sorted)); - qsort(interrupt_sorted, NUM_IO_INTS, sizeof(interrupt_sorted[0]), + memcpy(interrupt_sorted, interrupt_sources, num_io_irqs * + sizeof(interrupt_sorted[0])); + qsort(interrupt_sorted, num_io_irqs, sizeof(interrupt_sorted[0]), intrcmp); /* @@ -733,7 +805,7 @@ intr_balance(void *dummy __unused, int pending __unuse /* * Assign round-robin from most loaded to least. */ - for (i = NUM_IO_INTS - 1; i >= 0; i--) { + for (i = num_io_irqs - 1; i >= 0; i--) { isrc = interrupt_sorted[i]; if (isrc == NULL || isrc->is_event->ie_cpu != NOCPU) continue; Modified: head/sys/x86/x86/io_apic.c ============================================================================== --- head/sys/x86/x86/io_apic.c Tue Aug 28 20:21:36 2018 (r338359) +++ head/sys/x86/x86/io_apic.c Tue Aug 28 21:09:19 2018 (r338360) @@ -80,7 +80,7 @@ static MALLOC_DEFINE(M_IOAPIC, "io_apic", "I/O APIC st struct ioapic_intsrc { struct intsrc io_intsrc; - u_int io_irq; + int io_irq; u_int io_intpin:8; u_int io_vector:8; u_int io_cpu; @@ -112,6 +112,7 @@ static u_int ioapic_read(volatile ioapic_t *apic, int static void ioapic_write(volatile ioapic_t *apic, int reg, u_int val); static const char *ioapic_bus_string(int bus_type); static void ioapic_print_irq(struct ioapic_intsrc *intpin); +static void ioapic_register_sources(struct pic *pic); static void ioapic_enable_source(struct intsrc *isrc); static void ioapic_disable_source(struct intsrc *isrc, int eoi); static void ioapic_eoi_source(struct intsrc *isrc); @@ -128,6 +129,7 @@ static void ioapic_reprogram_intpin(struct intsrc *isr static STAILQ_HEAD(,ioapic) ioapic_list = STAILQ_HEAD_INITIALIZER(ioapic_list); struct pic ioapic_template = { + .pic_register_sources = ioapic_register_sources, .pic_enable_source = ioapic_enable_source, .pic_disable_source = ioapic_disable_source, .pic_eoi_source = ioapic_eoi_source, @@ -142,7 +144,7 @@ struct pic ioapic_template = { .pic_reprogram_pin = ioapic_reprogram_intpin, }; -static int next_ioapic_base; +static u_int next_ioapic_base; static u_int next_id; static int enable_extint; @@ -250,7 +252,7 @@ ioapic_print_irq(struct ioapic_intsrc *intpin) printf("SMI"); break; default: - printf("%s IRQ %u", ioapic_bus_string(intpin->io_bus), + printf("%s IRQ %d", ioapic_bus_string(intpin->io_bus), intpin->io_irq); } } @@ -318,7 +320,7 @@ ioapic_program_intpin(struct ioapic_intsrc *intpin) * been enabled yet, just ensure that the pin is masked. */ mtx_assert(&icu_lock, MA_OWNED); - if (intpin->io_irq == IRQ_DISABLED || (intpin->io_irq < NUM_IO_INTS && + if (intpin->io_irq == IRQ_DISABLED || (intpin->io_irq >= 0 && intpin->io_vector == 0)) { low = ioapic_read(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin)); @@ -651,6 +653,8 @@ ioapic_create(vm_paddr_t addr, int32_t apic_id, int in io->io_id, intbase, next_ioapic_base); io->io_intbase = intbase; next_ioapic_base = intbase + numintr; + if (next_ioapic_base > num_io_irqs) + num_io_irqs = next_ioapic_base; io->io_numintr = numintr; io->io_addr = apic; io->io_paddr = addr; @@ -759,7 +763,7 @@ ioapic_remap_vector(void *cookie, u_int pin, int vecto io = (struct ioapic *)cookie; if (pin >= io->io_numintr || vector < 0) return (EINVAL); - if (io->io_pins[pin].io_irq >= NUM_IO_INTS) + if (io->io_pins[pin].io_irq < 0) return (EINVAL); io->io_pins[pin].io_irq = vector; if (bootverbose) @@ -778,7 +782,7 @@ ioapic_set_bus(void *cookie, u_int pin, int bus_type) io = (struct ioapic *)cookie; if (pin >= io->io_numintr) return (EINVAL); - if (io->io_pins[pin].io_irq >= NUM_IO_INTS) + if (io->io_pins[pin].io_irq < 0) return (EINVAL); if (io->io_pins[pin].io_bus == bus_type) return (0); @@ -799,7 +803,7 @@ ioapic_set_nmi(void *cookie, u_int pin) return (EINVAL); if (io->io_pins[pin].io_irq == IRQ_NMI) return (0); - if (io->io_pins[pin].io_irq >= NUM_IO_INTS) + if (io->io_pins[pin].io_irq < 0) return (EINVAL); io->io_pins[pin].io_bus = APIC_BUS_UNKNOWN; io->io_pins[pin].io_irq = IRQ_NMI; @@ -822,7 +826,7 @@ ioapic_set_smi(void *cookie, u_int pin) return (EINVAL); if (io->io_pins[pin].io_irq == IRQ_SMI) return (0); - if (io->io_pins[pin].io_irq >= NUM_IO_INTS) + if (io->io_pins[pin].io_irq < 0) return (EINVAL); io->io_pins[pin].io_bus = APIC_BUS_UNKNOWN; io->io_pins[pin].io_irq = IRQ_SMI; @@ -845,7 +849,7 @@ ioapic_set_extint(void *cookie, u_int pin) return (EINVAL); if (io->io_pins[pin].io_irq == IRQ_EXTINT) return (0); - if (io->io_pins[pin].io_irq >= NUM_IO_INTS) + if (io->io_pins[pin].io_irq < 0) return (EINVAL); io->io_pins[pin].io_bus = APIC_BUS_UNKNOWN; io->io_pins[pin].io_irq = IRQ_EXTINT; @@ -870,7 +874,7 @@ ioapic_set_polarity(void *cookie, u_int pin, enum intr io = (struct ioapic *)cookie; if (pin >= io->io_numintr || pol == INTR_POLARITY_CONFORM) return (EINVAL); - if (io->io_pins[pin].io_irq >= NUM_IO_INTS) + if (io->io_pins[pin].io_irq < 0) return (EINVAL); activehi = (pol == INTR_POLARITY_HIGH); if (io->io_pins[pin].io_activehi == activehi) @@ -891,7 +895,7 @@ ioapic_set_triggermode(void *cookie, u_int pin, enum i io = (struct ioapic *)cookie; if (pin >= io->io_numintr || trigger == INTR_TRIGGER_CONFORM) return (EINVAL); - if (io->io_pins[pin].io_irq >= NUM_IO_INTS) + if (io->io_pins[pin].io_irq < 0) return (EINVAL); edgetrigger = (trigger == INTR_TRIGGER_EDGE); if (io->io_pins[pin].io_edgetrigger == edgetrigger) @@ -927,12 +931,26 @@ ioapic_register(void *cookie) /* * Reprogram pins to handle special case pins (such as NMI and - * SMI) and register valid pins as interrupt sources. + * SMI) and disable normal pins until a handler is registered. */ intr_register_pic(&io->io_pic); - for (i = 0, pin = io->io_pins; i < io->io_numintr; i++, pin++) { + for (i = 0, pin = io->io_pins; i < io->io_numintr; i++, pin++) ioapic_reprogram_intpin(&pin->io_intsrc); - if (pin->io_irq < NUM_IO_INTS) +} + +/* + * Add interrupt sources for I/O APIC interrupt pins. + */ +static void +ioapic_register_sources(struct pic *pic) +{ + struct ioapic_intsrc *pin; + struct ioapic *io; + int i; + + io = (struct ioapic *)pic; + for (i = 0, pin = io->io_pins; i < io->io_numintr; i++, pin++) { + if (pin->io_irq >= 0) intr_register_source(&pin->io_intsrc); } } Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Tue Aug 28 20:21:36 2018 (r338359) +++ head/sys/x86/x86/local_apic.c Tue Aug 28 21:09:19 2018 (r338360) @@ -92,11 +92,16 @@ CTASSERT(APIC_TIMER_INT < APIC_LOCAL_INTS); CTASSERT(APIC_LOCAL_INTS == 240); CTASSERT(IPI_STOP < APIC_SPURIOUS_INT); -/* Magic IRQ values for the timer and syscalls. */ -#define IRQ_TIMER (NUM_IO_INTS + 1) -#define IRQ_SYSCALL (NUM_IO_INTS + 2) -#define IRQ_DTRACE_RET (NUM_IO_INTS + 3) -#define IRQ_EVTCHN (NUM_IO_INTS + 4) +/* + * I/O interrupts use non-negative IRQ values. These values are used + * to mark unused IDT entries or IDT entries reserved for a non-I/O + * interrupt. + */ +#define IRQ_FREE -1 +#define IRQ_TIMER -2 +#define IRQ_SYSCALL -3 +#define IRQ_DTRACE_RET -4 +#define IRQ_EVTCHN -5 enum lat_timer_mode { LAT_MODE_UNDEF = 0, @@ -648,7 +653,7 @@ native_lapic_create(u_int apic_id, int boot_cpu) lapics[apic_id].la_elvts[i].lvt_active = 0; } for (i = 0; i <= APIC_NUM_IOINTS; i++) - lapics[apic_id].la_ioint_irqs[i] = -1; + lapics[apic_id].la_ioint_irqs[i] = IRQ_FREE; lapics[apic_id].la_ioint_irqs[IDT_SYSCALL - APIC_IO_INTS] = IRQ_SYSCALL; lapics[apic_id].la_ioint_irqs[APIC_TIMER_INT - APIC_IO_INTS] = IRQ_TIMER; @@ -751,7 +756,6 @@ native_lapic_setup(int boot) uint32_t version; uint32_t maxlvt; register_t saveintr; - char buf[MAXCOMLEN + 1]; int elvt_count; int i; @@ -780,15 +784,11 @@ native_lapic_setup(int boot) LAPIC_LVT_PCINT)); } - /* Program timer LVT and setup handler. */ + /* Program timer LVT. */ la->lvt_timer_base = lvt_mode(la, APIC_LVT_TIMER, lapic_read32(LAPIC_LVT_TIMER)); la->lvt_timer_last = la->lvt_timer_base; lapic_write32(LAPIC_LVT_TIMER, la->lvt_timer_base); - if (boot) { - snprintf(buf, sizeof(buf), "cpu%d:timer", PCPU_GET(cpuid)); - intrcnt_add(buf, &la->la_timer_count); - } /* Calibrate the timer parameters using BSP. */ if (boot && IS_BSP()) { @@ -843,6 +843,28 @@ native_lapic_setup(int boot) } static void +native_lapic_intrcnt(void *dummy __unused) +{ + struct pcpu *pc; + struct lapic *la; + char buf[MAXCOMLEN + 1]; + + /* If there are no APICs, skip this function. */ + if (lapics == NULL) + return; + + STAILQ_FOREACH(pc, &cpuhead, pc_allcpu) { + la = &lapics[pc->pc_apic_id]; + KASSERT(la->la_present, ("missing APIC structure")); + + snprintf(buf, sizeof(buf), "cpu%d:timer", pc->pc_cpuid); + intrcnt_add(buf, &la->la_timer_count); + } +} +SYSINIT(native_lapic_intrcnt, SI_SUB_INTR, SI_ORDER_MIDDLE, native_lapic_intrcnt, + NULL); + +static void native_lapic_reenable_pmc(void) { #ifdef HWPMC_HOOKS @@ -1493,7 +1515,7 @@ native_apic_alloc_vector(u_int apic_id, u_int irq) { u_int vector; - KASSERT(irq < NUM_IO_INTS, ("Invalid IRQ %u", irq)); + KASSERT(irq < num_io_irqs, ("Invalid IRQ %u", irq)); /* * Search for a free vector. Currently we just use a very simple @@ -1501,7 +1523,7 @@ native_apic_alloc_vector(u_int apic_id, u_int irq) */ mtx_lock_spin(&icu_lock); for (vector = 0; vector < APIC_NUM_IOINTS; vector++) { - if (lapics[apic_id].la_ioint_irqs[vector] != -1) + if (lapics[apic_id].la_ioint_irqs[vector] != IRQ_FREE) continue; lapics[apic_id].la_ioint_irqs[vector] = irq; mtx_unlock_spin(&icu_lock); @@ -1527,7 +1549,7 @@ native_apic_alloc_vectors(u_int apic_id, u_int *irqs, KASSERT(align >= count, ("align < count")); #ifdef INVARIANTS for (run = 0; run < count; run++) - KASSERT(irqs[run] < NUM_IO_INTS, ("Invalid IRQ %u at index %u", + KASSERT(irqs[run] < num_io_irqs, ("Invalid IRQ %u at index %u", irqs[run], run)); #endif @@ -1541,7 +1563,7 @@ native_apic_alloc_vectors(u_int apic_id, u_int *irqs, for (vector = 0; vector < APIC_NUM_IOINTS; vector++) { /* Vector is in use, end run. */ - if (lapics[apic_id].la_ioint_irqs[vector] != -1) { + if (lapics[apic_id].la_ioint_irqs[vector] != IRQ_FREE) { run = 0; first = 0; continue; @@ -1622,7 +1644,7 @@ native_apic_free_vector(u_int apic_id, u_int vector, u KASSERT(vector >= APIC_IO_INTS && vector != IDT_SYSCALL && vector <= APIC_IO_INTS + APIC_NUM_IOINTS, ("Vector %u does not map to an IRQ line", vector)); - KASSERT(irq < NUM_IO_INTS, ("Invalid IRQ %u", irq)); + KASSERT(irq < num_io_irqs, ("Invalid IRQ %u", irq)); KASSERT(lapics[apic_id].la_ioint_irqs[vector - APIC_IO_INTS] == irq, ("IRQ mismatch")); #ifdef KDTRACE_HOOKS @@ -1643,7 +1665,7 @@ native_apic_free_vector(u_int apic_id, u_int vector, u thread_unlock(td); } mtx_lock_spin(&icu_lock); - lapics[apic_id].la_ioint_irqs[vector - APIC_IO_INTS] = -1; + lapics[apic_id].la_ioint_irqs[vector - APIC_IO_INTS] = IRQ_FREE; mtx_unlock_spin(&icu_lock); if (!rebooting) { thread_lock(td); @@ -1694,7 +1716,7 @@ DB_SHOW_COMMAND(apic, db_show_apic) db_printf("Interrupts bound to lapic %u\n", apic_id); for (i = 0; i < APIC_NUM_IOINTS + 1 && !db_pager_quit; i++) { irq = lapics[apic_id].la_ioint_irqs[i]; - if (irq == -1 || irq == IRQ_SYSCALL) + if (irq == IRQ_FREE || irq == IRQ_SYSCALL) continue; #ifdef KDTRACE_HOOKS if (irq == IRQ_DTRACE_RET) @@ -1707,7 +1729,7 @@ DB_SHOW_COMMAND(apic, db_show_apic) db_printf("vec 0x%2x -> ", i + APIC_IO_INTS); if (irq == IRQ_TIMER) db_printf("lapic timer\n"); - else if (irq < NUM_IO_INTS) { + else if (irq < num_io_irqs) { isrc = intr_lookup_source(irq); if (isrc == NULL || verbose == 0) db_printf("IRQ %u\n", irq); @@ -1934,6 +1956,10 @@ apic_setup_io(void *dummy __unused) /* Enable the MSI "pic". */ init_ops.msi_init(); + +#ifdef XENHVM + xen_intr_alloc_irqs(); +#endif } SYSINIT(apic_setup_io, SI_SUB_INTR, SI_ORDER_THIRD, apic_setup_io, NULL); Modified: head/sys/x86/x86/msi.c ============================================================================== --- head/sys/x86/x86/msi.c Tue Aug 28 20:21:36 2018 (r338359) +++ head/sys/x86/x86/msi.c Tue Aug 28 21:09:19 2018 (r338360) @@ -120,7 +120,7 @@ struct msi_intsrc { u_int msi_cpu; /* Local APIC ID. (g) */ u_int msi_count:8; /* Messages in this group. (g) */ u_int msi_maxcount:8; /* Alignment for this group. (g) */ - int *msi_irqs; /* Group's IRQ list. (g) */ + u_int *msi_irqs; /* Group's IRQ list. (g) */ u_int msi_remap_cookie; }; @@ -151,6 +151,8 @@ struct pic msi_pic = { .pic_reprogram_pin = NULL, }; +u_int first_msi_irq; + #ifdef SMP /** * Xen hypervisors prior to 4.6.0 do not properly handle updates to @@ -168,7 +170,7 @@ SYSCTL_INT(_machdep, OID_AUTO, disable_msix_migration, #endif static int msi_enabled; -static int msi_last_irq; +static u_int msi_last_irq; static struct mtx msi_lock; static void @@ -329,6 +331,10 @@ msi_init(void) } #endif + MPASS(num_io_irqs > 0); + first_msi_irq = max(MINIMUM_MSI_INT, num_io_irqs); + num_io_irqs = first_msi_irq + NUM_MSI_INTS; + msi_enabled = 1; intr_register_pic(&msi_pic); mtx_init(&msi_lock, "msi", NULL, MTX_DEF); @@ -345,7 +351,7 @@ msi_create_source(void) mtx_unlock(&msi_lock); return; } - irq = msi_last_irq + FIRST_MSI_INT; + irq = msi_last_irq + first_msi_irq; msi_last_irq++; mtx_unlock(&msi_lock); @@ -363,8 +369,8 @@ int msi_alloc(device_t dev, int count, int maxcount, int *irqs) { struct msi_intsrc *msi, *fsrc; - u_int cpu, domain; - int cnt, i, *mirqs, vector; + u_int cpu, domain, *mirqs; + int cnt, i, vector; #ifdef ACPI_DMAR u_int cookies[count]; int error; @@ -385,7 +391,7 @@ again: /* Try to find 'count' free IRQs. */ cnt = 0; - for (i = FIRST_MSI_INT; i < FIRST_MSI_INT + NUM_MSI_INTS; i++) { + for (i = first_msi_irq; i < first_msi_irq + NUM_MSI_INTS; i++) { msi = (struct msi_intsrc *)intr_lookup_source(i); /* End of allocated sources, so break. */ @@ -404,7 +410,7 @@ again: /* Do we need to create some new sources? */ if (cnt < count) { /* If we would exceed the max, give up. */ - if (i + (count - cnt) >= FIRST_MSI_INT + NUM_MSI_INTS) { + if (i + (count - cnt) >= first_msi_irq + NUM_MSI_INTS) { mtx_unlock(&msi_lock); free(mirqs, M_MSI); return (ENXIO); @@ -579,8 +585,8 @@ msi_map(int irq, uint64_t *addr, uint32_t *data) #ifdef ACPI_DMAR if (!msi->msi_msix) { - for (k = msi->msi_count - 1, i = FIRST_MSI_INT; k > 0 && - i < FIRST_MSI_INT + NUM_MSI_INTS; i++) { + for (k = msi->msi_count - 1, i = first_msi_irq; k > 0 && + i < first_msi_irq + NUM_MSI_INTS; i++) { if (i == msi->msi_irq) continue; msi1 = (struct msi_intsrc *)intr_lookup_source(i); @@ -630,7 +636,7 @@ again: mtx_lock(&msi_lock); /* Find a free IRQ. */ - for (i = FIRST_MSI_INT; i < FIRST_MSI_INT + NUM_MSI_INTS; i++) { + for (i = first_msi_irq; i < first_msi_irq + NUM_MSI_INTS; i++) { msi = (struct msi_intsrc *)intr_lookup_source(i); /* End of allocated sources, so break. */ @@ -645,7 +651,7 @@ again: /* Do we need to create a new source? */ if (msi == NULL) { /* If we would exceed the max, give up. */ - if (i + 1 >= FIRST_MSI_INT + NUM_MSI_INTS) { + if (i + 1 >= first_msi_irq + NUM_MSI_INTS) { mtx_unlock(&msi_lock); return (ENXIO); } Modified: head/sys/x86/x86/nexus.c ============================================================================== --- head/sys/x86/x86/nexus.c Tue Aug 28 20:21:36 2018 (r338359) +++ head/sys/x86/x86/nexus.c Tue Aug 28 21:09:19 2018 (r338360) @@ -223,7 +223,7 @@ nexus_init_resources(void) irq_rman.rm_start = 0; irq_rman.rm_type = RMAN_ARRAY; irq_rman.rm_descr = "Interrupt request lines"; - irq_rman.rm_end = NUM_IO_INTS - 1; + irq_rman.rm_end = num_io_irqs - 1; if (rman_init(&irq_rman)) panic("nexus_init_resources irq_rman"); @@ -231,7 +231,7 @@ nexus_init_resources(void) * We search for regions of existing IRQs and add those to the IRQ * resource manager. */ - for (irq = 0; irq < NUM_IO_INTS; irq++) + for (irq = 0; irq < num_io_irqs; irq++) if (intr_lookup_source(irq) != NULL) if (rman_manage_region(&irq_rman, irq, irq) != 0) panic("nexus_init_resources irq_rman add"); Modified: head/sys/x86/xen/xen_intr.c ============================================================================== --- head/sys/x86/xen/xen_intr.c Tue Aug 28 20:21:36 2018 (r338359) +++ head/sys/x86/xen/xen_intr.c Tue Aug 28 21:09:19 2018 (r338360) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -72,6 +73,8 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_XENINTR, "xen_intr", "Xen Interrupt Services"); +static u_int first_evtchn_irq; + /** * Per-cpu event channel processing state. */ @@ -187,7 +190,7 @@ struct pic xen_intr_pirq_pic = { }; static struct mtx xen_intr_isrc_lock; -static int xen_intr_auto_vector_count; +static u_int xen_intr_auto_vector_count; static struct xenisrc *xen_intr_port_to_isrc[NR_EVENT_CHANNELS]; static u_long *xen_intr_pirq_eoi_map; static boolean_t xen_intr_pirq_eoi_map_enabled; @@ -276,7 +279,7 @@ xen_intr_find_unused_isrc(enum evtchn_type type) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Aug 28 22:18:15 2018 Return-Path: Delivered-To: svn-src-head@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 23C87109958B; Tue, 28 Aug 2018 22:18:15 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC4B270A2B; Tue, 28 Aug 2018 22:18:14 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1D61621D03; Tue, 28 Aug 2018 18:18:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 28 Aug 2018 18:18:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.net; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=k8GORpdRBZh/Z7PehQ2dtAvqAfuTZ FuQY14e3+FMmrM=; b=r2H6Ju9RGu0+q/lUQ/w3sGlDc4gjQ11SdFo6aFMMFjaDE Tk6kRUxPre13vYFL3I/simzRFcTT7c8YJ3foHMF0BTcIE2xdPZrTDvcM7ZQNBBYR /4cbLms+eEy/e6XyAxAL2AHnQmGVPLNCW0Uzn/58VgVUAWz9/8cl1lHTqwMAjVQs 7QpIE2zViNUhM6GhZS36lFx4YowRnvMsXxvO+ng92iGL2hL6iPHEgeICPi2KhF74 KMk/u0WggJLiJb2NuArUwxVmQVt1fbSHtDp8MEKY2RN4nfR04Kn4tVqgAFZFUAjf R7XJ0eA2PtctdW6ltnJxdSGOcPj6LWFuRHX1Opegw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=k8GORp dRBZh/Z7PehQ2dtAvqAfuTZFuQY14e3+FMmrM=; b=byDcs8ga0wIKkn4tJf+cTa ElFdOw0wjFV8Uq0gpy1PRvPbIaSoEmJg0zoT040/mDRTUjajMSoziNUEwm20vN20 Zghp2rFBPmFE3yRV2P2LZIFNovfIdMR3t01SeCmHFSeYOFwV3nlZVgYJ09Aw3up8 MdJJGQtfd5DRL2pGf6zPhqZJrqpc/lP6fpQyfYt6YVneu4/OdH7mkFnjLojnunp1 fS2KRUVA2U6mqHkZ72zISjQMNIabmSRTKhonuKSaBBDBK102f5faYO+PezPLxklJ nb9+YlTHTmIdzYXmDeJeYpBJJy8zOWTDGdXSwEf3SCSgR8fdhwVK6HRn/EJaIrWA == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.2] (unknown [178.34.99.43]) by mail.messagingengine.com (Postfix) with ESMTPA id F1E4A1028D; Tue, 28 Aug 2018 18:18:11 -0400 (EDT) Subject: Re: svn commit: r338239 - head To: "Piotr P. Stefaniak" , Warner Losh Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <201808230506.w7N56WjJ063108@repo.freebsd.org> <20180823204636.GJ53055@freefall.freebsd.org> From: Yuri Pankov Message-ID: <2c969622-c35b-3c35-232c-b286d3e14024@yuripv.net> Date: Wed, 29 Aug 2018 01:18:10 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180823204636.GJ53055@freefall.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 22:18:15 -0000 Piotr P. Stefaniak wrote: > On 2018-08-23 05:06:32, Warner Losh wrote: >> Author: imp >> Date: Thu Aug 23 05:06:31 2018 >> New Revision: 338239 >> URL: https://svnweb.freebsd.org/changeset/base/338239 >> >> Log: >>  Add a special note to UPDATING for the devmatch stuff. While tested, >>  there's an elevated risk of trouble, and you must update kernel, >>  userland and rc scripts for the best experience. >> >> Modified: >>  head/UPDATING >> >> Modified: head/UPDATING >> ============================================================================== >> >> --- head/UPDATING    Thu Aug 23 05:06:27 2018    (r338238) >> +++ head/UPDATING    Thu Aug 23 05:06:31 2018    (r338239) >> @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: >>     disable the most expensive debugging functionality run >>     "ln -s 'abort:false,junk:false' /etc/malloc.conf".) >> >> +20170822: > > Shouldn't that be 20180822? Both issues still not fixed. From owner-svn-src-head@freebsd.org Tue Aug 28 22:22:07 2018 Return-Path: Delivered-To: svn-src-head@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 2A79510996D4; Tue, 28 Aug 2018 22:22:07 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D412F70ECE; Tue, 28 Aug 2018 22:22:06 +0000 (UTC) (envelope-from brd@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 B56841470F; Tue, 28 Aug 2018 22:22:06 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SMM6xK025374; Tue, 28 Aug 2018 22:22:06 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SMM6R1025373; Tue, 28 Aug 2018 22:22:06 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201808282222.w7SMM6R1025373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 28 Aug 2018 22:22:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338361 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 338361 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 22:22:07 -0000 Author: brd Date: Tue Aug 28 22:22:06 2018 New Revision: 338361 URL: https://svnweb.freebsd.org/changeset/base/338361 Log: Add beforeinstallconfig to bsd.confs.mk to enable running commands prior to the installconfig target. Approved by: re (rgrimes), bapt (mentor) Differential Revision: https://reviews.freebsd.org/D16874 Modified: head/share/mk/bsd.confs.mk Modified: head/share/mk/bsd.confs.mk ============================================================================== --- head/share/mk/bsd.confs.mk Tue Aug 28 21:09:19 2018 (r338360) +++ head/share/mk/bsd.confs.mk Tue Aug 28 22:22:06 2018 (r338361) @@ -29,8 +29,11 @@ all: buildconfig . if !target(afterinstallconfig) afterinstallconfig: . endif -installconfig: realinstallconfig afterinstallconfig -.ORDER: realinstallconfig afterinstallconfig +. if !target(beforeinstallconfig) +beforeinstallconfig: +. endif +installconfig: beforeinstallconfig realinstallconfig afterinstallconfig +.ORDER: beforeinstallconfig realinstallconfig afterinstallconfig ${group}OWN?= ${SHAREOWN} ${group}GRP?= ${SHAREGRP} From owner-svn-src-head@freebsd.org Tue Aug 28 22:51:47 2018 Return-Path: Delivered-To: svn-src-head@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 665ED109A096; Tue, 28 Aug 2018 22:51:46 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDFB871BB2; Tue, 28 Aug 2018 22:51:45 +0000 (UTC) (envelope-from brd@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 9F55C14CC9; Tue, 28 Aug 2018 22:51:45 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SMpjs7041884; Tue, 28 Aug 2018 22:51:45 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SMpjsD041883; Tue, 28 Aug 2018 22:51:45 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201808282251.w7SMpjsD041883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 28 Aug 2018 22:51:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338362 - head/bin/csh X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/bin/csh X-SVN-Commit-Revision: 338362 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 22:51:47 -0000 Author: brd Date: Tue Aug 28 22:51:45 2018 New Revision: 338362 URL: https://svnweb.freebsd.org/changeset/base/338362 Log: Fix the install of /root/.login missed as part of r337849. Approved by: re (rgrimes) Modified: head/bin/csh/Makefile Modified: head/bin/csh/Makefile ============================================================================== --- head/bin/csh/Makefile Tue Aug 28 22:22:06 2018 (r338361) +++ head/bin/csh/Makefile Tue Aug 28 22:51:45 2018 (r338362) @@ -8,8 +8,11 @@ .include -CONFGROUPS= ETC +CONFGROUPS= ETC ROOT ETC= csh.cshrc csh.login csh.logout +ROOT= dot.login +ROOTDIR= /root +ROOTNAME_dot.login= .login PACKAGE=runtime TCSHDIR= ${SRCTOP}/contrib/tcsh .PATH: ${TCSHDIR} From owner-svn-src-head@freebsd.org Tue Aug 28 23:56:53 2018 Return-Path: Delivered-To: svn-src-head@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 9BC82109B027; Tue, 28 Aug 2018 23:56:53 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D9CB7355A; Tue, 28 Aug 2018 23:56:53 +0000 (UTC) (envelope-from lwhsu@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 20CE315709; Tue, 28 Aug 2018 23:56:53 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SNuqDs073267; Tue, 28 Aug 2018 23:56:52 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SNuqqV073266; Tue, 28 Aug 2018 23:56:52 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201808282356.w7SNuqqV073266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 28 Aug 2018 23:56:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338363 - head X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 338363 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 23:56:53 -0000 Author: lwhsu Date: Tue Aug 28 23:56:52 2018 New Revision: 338363 URL: https://svnweb.freebsd.org/changeset/base/338363 Log: Fix 'install: symlink usr/src/sys -> /sys: File exists' in distributeworld Follow r334617, specify ${DISTDIR} (by ${INSTALL_DDIR}), '/base' and add ${INSTALLFLAGS} while installing the '/sys' symbolic link. Reviewed by: bapt (earlier version), markj Approved by: re (gjb), markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16877 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Aug 28 22:51:45 2018 (r338362) +++ head/Makefile.inc1 Tue Aug 28 23:56:52 2018 (r338363) @@ -1334,7 +1334,7 @@ distributeworld installworld stageworld: _installcheck METALOG=${METALOG} ${IMAKE_INSTALL} ${IMAKE_MTREE} \ DISTBASE=/base DESTDIR=${DESTDIR}/${DISTDIR}/base \ LOCAL_MTREE=${LOCAL_MTREE:Q} distrib-dirs - ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys + ${INSTALL_SYMLINK} ${INSTALLFLAGS} usr/src/sys ${INSTALL_DDIR}/base/sys .endif ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \ ${IMAKEENV} rm -rf ${INSTALLTMP} From owner-svn-src-head@freebsd.org Wed Aug 29 02:49:19 2018 Return-Path: Delivered-To: svn-src-head@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 6A738109F006; Wed, 29 Aug 2018 02:49:19 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0DCDF78362; Wed, 29 Aug 2018 02:49:19 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D87CD172F3; Wed, 29 Aug 2018 02:49:18 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7T2nIbT060704; Wed, 29 Aug 2018 02:49:18 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7T2nIn0060703; Wed, 29 Aug 2018 02:49:18 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808290249.w7T2nIn0060703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 29 Aug 2018 02:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338365 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 338365 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 02:49:19 -0000 Author: markj Date: Wed Aug 29 02:49:18 2018 New Revision: 338365 URL: https://svnweb.freebsd.org/changeset/base/338365 Log: Add a sysctl for the ZFS abd_scatter_enabled setting. Submitted by: Yamagi Burmeister (original version) Approved by: re (rgrimes) MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed Aug 29 02:18:13 2018 (r338364) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed Aug 29 02:49:18 2018 (r338365) @@ -153,6 +153,8 @@ size_t zfs_abd_chunk_size = 4096; #if defined(__FreeBSD__) && defined(_KERNEL) SYSCTL_DECL(_vfs_zfs); +SYSCTL_INT(_vfs_zfs, OID_AUTO, abd_scatter_enabled, CTLFLAG_RWTUN, + &zfs_abd_scatter_enabled, 0, "Enable scattered ARC data buffers"); SYSCTL_ULONG(_vfs_zfs, OID_AUTO, abd_chunk_size, CTLFLAG_RDTUN, &zfs_abd_chunk_size, 0, "The size of the chunks ABD allocates"); #endif From owner-svn-src-head@freebsd.org Wed Aug 29 04:37:54 2018 Return-Path: Delivered-To: svn-src-head@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 C8B6510A0DA3; Wed, 29 Aug 2018 04:37:54 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F1917B4D5; Wed, 29 Aug 2018 04:37:54 +0000 (UTC) (envelope-from np@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 4BAD218566; Wed, 29 Aug 2018 04:37:54 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7T4bsbO017870; Wed, 29 Aug 2018 04:37:54 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7T4bslS017869; Wed, 29 Aug 2018 04:37:54 GMT (envelope-from np@FreeBSD.org) Message-Id: <201808290437.w7T4bslS017869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 29 Aug 2018 04:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338366 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe/iw_cxgbe X-SVN-Commit-Revision: 338366 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 04:37:55 -0000 Author: np Date: Wed Aug 29 04:37:53 2018 New Revision: 338366 URL: https://svnweb.freebsd.org/changeset/base/338366 Log: cxgbe/iw_cxgbe: Fix iWARP RDMA + VIMAGE operation by setting the VNET properly in a couple of places in the driver. Submitted by: Krishnamraju Eraparaju @ Chelsio Approved by: re@ (rgrimes@) Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Aug 29 02:49:18 2018 (r338365) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Aug 29 04:37:53 2018 (r338366) @@ -76,6 +76,7 @@ struct cpl_set_tcb_rpl; #include #include #include +#include static spinlock_t req_lock; static TAILQ_HEAD(c4iw_ep_list, c4iw_ep_common) req_list; @@ -2523,6 +2524,8 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_ struct c4iw_dev *dev = to_c4iw_dev(cm_id->device); struct c4iw_ep *ep = NULL; struct ifnet *nh_ifp; /* Logical egress interface */ + struct rdma_cm_id *rdma_id = (struct rdma_cm_id*)cm_id->context; + struct vnet *vnet = rdma_id->route.addr.dev_addr.net; CTR2(KTR_IW_CXGBE, "%s:ccB %p", __func__, cm_id); @@ -2568,7 +2571,10 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_ ref_qp(ep); ep->com.thread = curthread; + CURVNET_SET(vnet); err = get_ifnet_from_raddr(&cm_id->remote_addr, &nh_ifp); + CURVNET_RESTORE(); + if (err) { CTR2(KTR_IW_CXGBE, "%s:cc7 %p", __func__, ep); @@ -2811,7 +2817,10 @@ int c4iw_ep_disconnect(struct c4iw_ep *ep, int abrupt, if (!ep->parent_ep) ep->com.state = MORIBUND; + + CURVNET_SET(ep->com.so->so_vnet); sodisconnect(ep->com.so); + CURVNET_RESTORE(); } } From owner-svn-src-head@freebsd.org Wed Aug 29 06:04:55 2018 Return-Path: Delivered-To: svn-src-head@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 5778E10A2839; Wed, 29 Aug 2018 06:04:55 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EFF3C7DD0C; Wed, 29 Aug 2018 06:04:54 +0000 (UTC) (envelope-from cy@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 CB64C193F4; Wed, 29 Aug 2018 06:04:54 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7T64sof063901; Wed, 29 Aug 2018 06:04:54 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7T64sQ2063900; Wed, 29 Aug 2018 06:04:54 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201808290604.w7T64sQ2063900@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 29 Aug 2018 06:04:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338367 - head/crypto/heimdal/doc/doxyout/krb5/man/man3 X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/crypto/heimdal/doc/doxyout/krb5/man/man3 X-SVN-Commit-Revision: 338367 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 06:04:55 -0000 Author: cy Date: Wed Aug 29 06:04:54 2018 New Revision: 338367 URL: https://svnweb.freebsd.org/changeset/base/338367 Log: Avoid printing extraneous function names when searching man page database (apropos, man -k). This commit Replaces .SS with .SH, similar to the man page provided by original heimdal (as in port). PR: 230573 Submitted by: yuripv@yuripv.net Approved by: re (rgrimes@) MFC after: 3 days Modified: head/crypto/heimdal/doc/doxyout/krb5/man/man3/krb5.3 Modified: head/crypto/heimdal/doc/doxyout/krb5/man/man3/krb5.3 ============================================================================== --- head/crypto/heimdal/doc/doxyout/krb5/man/man3/krb5.3 Wed Aug 29 04:37:53 2018 (r338366) +++ head/crypto/heimdal/doc/doxyout/krb5/man/man3/krb5.3 Wed Aug 29 06:04:54 2018 (r338367) @@ -2,9 +2,8 @@ .ad l .nh .SH NAME -Heimdal Kerberos 5 library \- -.SS "Functions" - +krb5 \- Heimdal Kerberos 5 library +.SH SYNOPSIS .in +1c .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_add_et_list\fP (krb5_context context, void(*func)(struct et_list **))" From owner-svn-src-head@freebsd.org Wed Aug 29 12:24:22 2018 Return-Path: Delivered-To: svn-src-head@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 E6A21108898C; Wed, 29 Aug 2018 12:24:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B7BE8AEC2; Wed, 29 Aug 2018 12:24:21 +0000 (UTC) (envelope-from kib@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 789C11D1C6; Wed, 29 Aug 2018 12:24:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7TCOLY2057331; Wed, 29 Aug 2018 12:24:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7TCOJdn057319; Wed, 29 Aug 2018 12:24:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808291224.w7TCOJdn057319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 29 Aug 2018 12:24:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338370 - in head/sys: amd64/amd64 arm/arm arm64/arm64 cddl/contrib/opensolaris/uts/common/fs/zfs/sys i386/i386 mips/mips riscv/riscv vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 arm/arm arm64/arm64 cddl/contrib/opensolaris/uts/common/fs/zfs/sys i386/i386 mips/mips riscv/riscv vm X-SVN-Commit-Revision: 338370 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 12:24:22 -0000 Author: kib Date: Wed Aug 29 12:24:19 2018 New Revision: 338370 URL: https://svnweb.freebsd.org/changeset/base/338370 Log: Remove {max/min}_offset() macros, use vm_map_{max/min}() inlines. Exposing max_offset and min_offset defines in public headers is causing clashes with variable names, for example when building QEMU. Based on the submission by: royger Reviewed by: alc, markj (previous version) Sponsored by: The FreeBSD Foundation (kib) MFC after: 1 week Approved by: re (marius) Differential revision: https://reviews.freebsd.org/D16881 Modified: head/sys/amd64/amd64/pmap.c head/sys/arm/arm/pmap-v6.c head/sys/arm64/arm64/pmap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h head/sys/i386/i386/pmap.c head/sys/mips/mips/pmap.c head/sys/riscv/riscv/pmap.c head/sys/vm/vm_glue.c head/sys/vm/vm_init.c head/sys/vm/vm_map.c head/sys/vm/vm_map.h Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Aug 29 08:35:23 2018 (r338369) +++ head/sys/amd64/amd64/pmap.c Wed Aug 29 12:24:19 2018 (r338370) @@ -3094,8 +3094,8 @@ pmap_growkernel(vm_offset_t addr) return; addr = roundup2(addr, NBPDR); - if (addr - 1 >= kernel_map->max_offset) - addr = kernel_map->max_offset; + if (addr - 1 >= vm_map_max(kernel_map)) + addr = vm_map_max(kernel_map); while (kernel_vm_end < addr) { pdpe = pmap_pdpe(kernel_pmap, kernel_vm_end); if ((*pdpe & X86_PG_V) == 0) { @@ -3115,8 +3115,8 @@ pmap_growkernel(vm_offset_t addr) pde = pmap_pdpe_to_pde(pdpe, kernel_vm_end); if ((*pde & X86_PG_V) != 0) { kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK; - if (kernel_vm_end - 1 >= kernel_map->max_offset) { - kernel_vm_end = kernel_map->max_offset; + if (kernel_vm_end - 1 >= vm_map_max(kernel_map)) { + kernel_vm_end = vm_map_max(kernel_map); break; } continue; @@ -3134,8 +3134,8 @@ pmap_growkernel(vm_offset_t addr) pde_store(pde, newpdir); kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK; - if (kernel_vm_end - 1 >= kernel_map->max_offset) { - kernel_vm_end = kernel_map->max_offset; + if (kernel_vm_end - 1 >= vm_map_max(kernel_map)) { + kernel_vm_end = vm_map_max(kernel_map); break; } } Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Wed Aug 29 08:35:23 2018 (r338369) +++ head/sys/arm/arm/pmap-v6.c Wed Aug 29 12:24:19 2018 (r338370) @@ -2043,21 +2043,21 @@ pmap_growkernel(vm_offset_t addr) * not called, it could be first unused KVA (which is not * rounded up to PTE1_SIZE), * - * (2) when all KVA space is mapped and kernel_map->max_offset + * (2) when all KVA space is mapped and vm_map_max(kernel_map) * address is not rounded up to PTE1_SIZE. (For example, * it could be 0xFFFFFFFF.) */ kernel_vm_end = pte1_roundup(kernel_vm_end); mtx_assert(&kernel_map->system_mtx, MA_OWNED); addr = roundup2(addr, PTE1_SIZE); - if (addr - 1 >= kernel_map->max_offset) - addr = kernel_map->max_offset; + if (addr - 1 >= vm_map_max(kernel_map)) + addr = vm_map_max(kernel_map); while (kernel_vm_end < addr) { pte1 = pte1_load(kern_pte1(kernel_vm_end)); if (pte1_is_valid(pte1)) { kernel_vm_end += PTE1_SIZE; - if (kernel_vm_end - 1 >= kernel_map->max_offset) { - kernel_vm_end = kernel_map->max_offset; + if (kernel_vm_end - 1 >= vm_map_max(kernel_map)) { + kernel_vm_end = vm_map_max(kernel_map); break; } continue; @@ -2099,8 +2099,8 @@ pmap_growkernel(vm_offset_t addr) pmap_kenter_pte1(kernel_vm_end, PTE1_LINK(pt2_pa)); kernel_vm_end = kernel_vm_end_new; - if (kernel_vm_end - 1 >= kernel_map->max_offset) { - kernel_vm_end = kernel_map->max_offset; + if (kernel_vm_end - 1 >= vm_map_max(kernel_map)) { + kernel_vm_end = vm_map_max(kernel_map); break; } } Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Wed Aug 29 08:35:23 2018 (r338369) +++ head/sys/arm64/arm64/pmap.c Wed Aug 29 12:24:19 2018 (r338370) @@ -1744,8 +1744,8 @@ pmap_growkernel(vm_offset_t addr) mtx_assert(&kernel_map->system_mtx, MA_OWNED); addr = roundup2(addr, L2_SIZE); - if (addr - 1 >= kernel_map->max_offset) - addr = kernel_map->max_offset; + if (addr - 1 >= vm_map_max(kernel_map)) + addr = vm_map_max(kernel_map); while (kernel_vm_end < addr) { l0 = pmap_l0(kernel_pmap, kernel_vm_end); KASSERT(pmap_load(l0) != 0, @@ -1768,8 +1768,8 @@ pmap_growkernel(vm_offset_t addr) l2 = pmap_l1_to_l2(l1, kernel_vm_end); if ((pmap_load(l2) & ATTR_AF) != 0) { kernel_vm_end = (kernel_vm_end + L2_SIZE) & ~L2_OFFSET; - if (kernel_vm_end - 1 >= kernel_map->max_offset) { - kernel_vm_end = kernel_map->max_offset; + if (kernel_vm_end - 1 >= vm_map_max(kernel_map)) { + kernel_vm_end = vm_map_max(kernel_map); break; } continue; @@ -1787,8 +1787,8 @@ pmap_growkernel(vm_offset_t addr) pmap_invalidate_page(kernel_pmap, kernel_vm_end); kernel_vm_end = (kernel_vm_end + L2_SIZE) & ~L2_OFFSET; - if (kernel_vm_end - 1 >= kernel_map->max_offset) { - kernel_vm_end = kernel_map->max_offset; + if (kernel_vm_end - 1 >= vm_map_max(kernel_map)) { + kernel_vm_end = vm_map_max(kernel_map); break; } } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h Wed Aug 29 08:35:23 2018 (r338369) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h Wed Aug 29 12:24:19 2018 (r338370) @@ -104,13 +104,6 @@ extern "C" { #include #include #include -/* There is clash. vm_map.h defines the two below and vdev_cache.c use them. */ -#ifdef min_offset -#undef min_offset -#endif -#ifdef max_offset -#undef max_offset -#endif #include #include Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Wed Aug 29 08:35:23 2018 (r338369) +++ head/sys/i386/i386/pmap.c Wed Aug 29 12:24:19 2018 (r338370) @@ -2229,13 +2229,13 @@ pmap_growkernel(vm_offset_t addr) mtx_assert(&kernel_map->system_mtx, MA_OWNED); addr = roundup2(addr, NBPDR); - if (addr - 1 >= kernel_map->max_offset) - addr = kernel_map->max_offset; + if (addr - 1 >= vm_map_max(kernel_map)) + addr = vm_map_max(kernel_map); while (kernel_vm_end < addr) { if (pdir_pde(PTD, kernel_vm_end)) { kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK; - if (kernel_vm_end - 1 >= kernel_map->max_offset) { - kernel_vm_end = kernel_map->max_offset; + if (kernel_vm_end - 1 >= vm_map_max(kernel_map)) { + kernel_vm_end = vm_map_max(kernel_map); break; } continue; @@ -2257,8 +2257,8 @@ pmap_growkernel(vm_offset_t addr) pmap_kenter_pde(kernel_vm_end, newpdir); kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK; - if (kernel_vm_end - 1 >= kernel_map->max_offset) { - kernel_vm_end = kernel_map->max_offset; + if (kernel_vm_end - 1 >= vm_map_max(kernel_map)) { + kernel_vm_end = vm_map_max(kernel_map); break; } } Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Wed Aug 29 08:35:23 2018 (r338369) +++ head/sys/mips/mips/pmap.c Wed Aug 29 12:24:19 2018 (r338370) @@ -1255,8 +1255,8 @@ pmap_growkernel(vm_offset_t addr) mtx_assert(&kernel_map->system_mtx, MA_OWNED); req_class = VM_ALLOC_INTERRUPT; addr = roundup2(addr, NBSEG); - if (addr - 1 >= kernel_map->max_offset) - addr = kernel_map->max_offset; + if (addr - 1 >= vm_map_max(kernel_map)) + addr = vm_map_max(kernel_map); while (kernel_vm_end < addr) { pdpe = pmap_segmap(kernel_pmap, kernel_vm_end); #ifdef __mips_n64 @@ -1272,8 +1272,8 @@ pmap_growkernel(vm_offset_t addr) pde = pmap_pdpe_to_pde(pdpe, kernel_vm_end); if (*pde != 0) { kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK; - if (kernel_vm_end - 1 >= kernel_map->max_offset) { - kernel_vm_end = kernel_map->max_offset; + if (kernel_vm_end - 1 >= vm_map_max(kernel_map)) { + kernel_vm_end = vm_map_max(kernel_map); break; } continue; @@ -1305,8 +1305,8 @@ pmap_growkernel(vm_offset_t addr) pte[i] = PTE_G; kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK; - if (kernel_vm_end - 1 >= kernel_map->max_offset) { - kernel_vm_end = kernel_map->max_offset; + if (kernel_vm_end - 1 >= vm_map_max(kernel_map)) { + kernel_vm_end = vm_map_max(kernel_map); break; } } Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Wed Aug 29 08:35:23 2018 (r338369) +++ head/sys/riscv/riscv/pmap.c Wed Aug 29 12:24:19 2018 (r338370) @@ -1424,8 +1424,8 @@ pmap_growkernel(vm_offset_t addr) mtx_assert(&kernel_map->system_mtx, MA_OWNED); addr = roundup2(addr, L2_SIZE); - if (addr - 1 >= kernel_map->max_offset) - addr = kernel_map->max_offset; + if (addr - 1 >= vm_map_max(kernel_map)) + addr = vm_map_max(kernel_map); while (kernel_vm_end < addr) { l1 = pmap_l1(kernel_pmap, kernel_vm_end); if (pmap_load(l1) == 0) { @@ -1452,8 +1452,8 @@ pmap_growkernel(vm_offset_t addr) l2 = pmap_l1_to_l2(l1, kernel_vm_end); if ((pmap_load(l2) & PTE_A) != 0) { kernel_vm_end = (kernel_vm_end + L2_SIZE) & ~L2_OFFSET; - if (kernel_vm_end - 1 >= kernel_map->max_offset) { - kernel_vm_end = kernel_map->max_offset; + if (kernel_vm_end - 1 >= vm_map_max(kernel_map)) { + kernel_vm_end = vm_map_max(kernel_map); break; } continue; @@ -1478,8 +1478,8 @@ pmap_growkernel(vm_offset_t addr) pmap_invalidate_page(kernel_pmap, kernel_vm_end); kernel_vm_end = (kernel_vm_end + L2_SIZE) & ~L2_OFFSET; - if (kernel_vm_end - 1 >= kernel_map->max_offset) { - kernel_vm_end = kernel_map->max_offset; + if (kernel_vm_end - 1 >= vm_map_max(kernel_map)) { + kernel_vm_end = vm_map_max(kernel_map); break; } } Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Wed Aug 29 08:35:23 2018 (r338369) +++ head/sys/vm/vm_glue.c Wed Aug 29 12:24:19 2018 (r338370) @@ -122,7 +122,7 @@ kernacc(void *addr, int len, int rw) KASSERT((rw & ~VM_PROT_ALL) == 0, ("illegal ``rw'' argument to kernacc (%x)\n", rw)); - if ((vm_offset_t)addr + len > kernel_map->max_offset || + if ((vm_offset_t)addr + len > vm_map_max(kernel_map) || (vm_offset_t)addr + len < (vm_offset_t)addr) return (FALSE); Modified: head/sys/vm/vm_init.c ============================================================================== --- head/sys/vm/vm_init.c Wed Aug 29 08:35:23 2018 (r338369) +++ head/sys/vm/vm_init.c Wed Aug 29 12:24:19 2018 (r338370) @@ -259,8 +259,8 @@ again: * Discount the physical memory larger than the size of kernel_map * to avoid eating up all of KVA space. */ - physmem_est = lmin(physmem, btoc(kernel_map->max_offset - - kernel_map->min_offset)); + physmem_est = lmin(physmem, btoc(vm_map_max(kernel_map) - + vm_map_min(kernel_map))); v = kern_vfs_bio_buffer_alloc(v, physmem_est); Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Wed Aug 29 08:35:23 2018 (r338369) +++ head/sys/vm/vm_map.c Wed Aug 29 12:24:19 2018 (r338370) @@ -339,8 +339,8 @@ vmspace_dofree(struct vmspace *vm) * Delete all of the mappings and pages they hold, then call * the pmap module to reclaim anything left. */ - (void)vm_map_remove(&vm->vm_map, vm->vm_map.min_offset, - vm->vm_map.max_offset); + (void)vm_map_remove(&vm->vm_map, vm_map_min(&vm->vm_map), + vm_map_max(&vm->vm_map)); pmap_release(vmspace_pmap(vm)); vm->vm_map.pmap = NULL; @@ -799,8 +799,8 @@ _vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t mi map->needs_wakeup = FALSE; map->system_map = 0; map->pmap = pmap; - map->min_offset = min; - map->max_offset = max; + map->header.end = min; + map->header.start = max; map->flags = 0; map->root = NULL; map->timestamp = 0; @@ -1198,7 +1198,8 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_oof /* * Check that the start and end points are not bogus. */ - if (start < map->min_offset || end > map->max_offset || start >= end) + if (start < vm_map_min(map) || end > vm_map_max(map) || + start >= end) return (KERN_INVALID_ADDRESS); /* @@ -1401,9 +1402,8 @@ vm_map_findspace(vm_map_t map, vm_offset_t start, vm_s * Request must fit within min/max VM address and must avoid * address wrap. */ - if (start < map->min_offset) - start = map->min_offset; - if (start + length > map->max_offset || start + length < start) + start = MAX(start, vm_map_min(map)); + if (start + length > vm_map_max(map) || start + length < start) return (1); /* Empty tree means wide open address space. */ @@ -3429,7 +3429,7 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c old_map = &vm1->vm_map; /* Copy immutable fields of vm1 to vm2. */ - vm2 = vmspace_alloc(old_map->min_offset, old_map->max_offset, NULL); + vm2 = vmspace_alloc(vm_map_min(old_map), vm_map_max(old_map), NULL); if (vm2 == NULL) return (NULL); vm2->vm_taddr = vm1->vm_taddr; @@ -4329,14 +4329,14 @@ vm_offset_t vm_map_max_KBI(const struct vm_map *map) { - return (map->max_offset); + return (vm_map_max(map)); } vm_offset_t vm_map_min_KBI(const struct vm_map *map) { - return (map->min_offset); + return (vm_map_min(map)); } pmap_t Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Wed Aug 29 08:35:23 2018 (r338369) +++ head/sys/vm/vm_map.h Wed Aug 29 12:24:19 2018 (r338370) @@ -173,19 +173,26 @@ vm_map_entry_system_wired_count(vm_map_entry_t entry) * A map is a set of map entries. These map entries are * organized both as a binary search tree and as a doubly-linked * list. Both structures are ordered based upon the start and - * end addresses contained within each map entry. The list - * header has max start value and min end value to act as - * sentinels for sequential search of the doubly-linked list. + * end addresses contained within each map entry. + * + * Counterintuitively, the map's min offset value is stored in + * map->header.end, and its max offset value is stored in + * map->header.start. + * + * The list header has max start value and min end value to act + * as sentinels for sequential search of the doubly-linked list. * Sleator and Tarjan's top-down splay algorithm is employed to * control height imbalance in the binary search tree. * - * List of locks + * List of locks * (c) const until freed */ struct vm_map { struct vm_map_entry header; /* List of entries */ -#define min_offset header.end /* (c) */ -#define max_offset header.start /* (c) */ +/* + map min_offset header.end (c) + map max_offset header.start (c) +*/ struct sx lock; /* Lock for map data */ struct mtx system_mtx; int nentries; /* Number of entries */ @@ -214,13 +221,15 @@ struct vm_map { static __inline vm_offset_t vm_map_max(const struct vm_map *map) { - return (map->max_offset); + + return (map->header.start); } static __inline vm_offset_t vm_map_min(const struct vm_map *map) { - return (map->min_offset); + + return (map->header.end); } static __inline pmap_t From owner-svn-src-head@freebsd.org Wed Aug 29 12:41:54 2018 Return-Path: Delivered-To: svn-src-head@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 3D68210892D9; Wed, 29 Aug 2018 12:41:54 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E6C5B8B768; Wed, 29 Aug 2018 12:41:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 9EA4D1421A; Wed, 29 Aug 2018 12:41:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [10.0.2.164] (ptr-8rgnodx4lgssngonp86.18120a2.ip6.access.telenet.be [IPv6:2a02:1811:240b:b802:f552:1840:7e47:a776]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 832C7479D9; Wed, 29 Aug 2018 14:41:51 +0200 (CEST) From: "Kristof Provost" To: "Matt Macy" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334647 - in head: lib/libpmc sys/dev/hwpmc sys/kern sys/sys usr.sbin usr.sbin/pmc Date: Wed, 29 Aug 2018 14:41:49 +0200 X-Mailer: MailMate (2.0BETAr6116) Message-ID: <7049241C-BA3D-4652-9568-C4387557F8E3@FreeBSD.org> In-Reply-To: <201806050426.w554QfVq001396@repo.freebsd.org> References: <201806050426.w554QfVq001396@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 12:41:54 -0000 On 5 Jun 2018, at 6:26, Matt Macy wrote: > Author: mmacy > Date: Tue Jun 5 04:26:40 2018 > New Revision: 334647 > URL: https://svnweb.freebsd.org/changeset/base/334647 > > Log: > hwpmc: log name->pid, name->tid mappings > > By logging all threads and processes 'pmc filter' > can now filter on process or thread name, relieving > the user of the burden of determining which tid or > pid was which when the sample was taken. > > % pmc filter -T if_io_tqg -P nginx pmc.log pmc-iflib.log > > % pmc filter -x -T idle pmc.log pmc-noidle.log > > Added: > head/usr.sbin/pmc/cmd_pmc_filter.cc > - copied, changed from r334645, > head/usr.sbin/pmc/cmd_pmc_filter.c > Deleted: > head/usr.sbin/pmc/cmd_pmc_filter.c > Modified: > head/lib/libpmc/pmclog.c > head/lib/libpmc/pmclog.h > head/sys/dev/hwpmc/hwpmc_logging.c > head/sys/dev/hwpmc/hwpmc_mod.c > head/sys/kern/kern_kthread.c > head/sys/kern/kern_thr.c > head/sys/kern/kern_thread.c > head/sys/sys/pmc.h > head/sys/sys/pmckern.h > head/sys/sys/pmclog.h > head/usr.sbin/Makefile > head/usr.sbin/pmc/Makefile (contents, props changed) > head/usr.sbin/pmc/cmd_pmc.h (contents, props changed) > > Modified: head/lib/libpmc/pmclog.c > ============================================================================== > --- head/lib/libpmc/pmclog.c Tue Jun 5 01:05:58 2018 (r334646) > +++ head/lib/libpmc/pmclog.c Tue Jun 5 04:26:40 2018 (r334647) > @@ -404,6 +404,19 @@ pmclog_get_event(void *cookie, char **data, > ssize_t *l > case PMCLOG_TYPE_USERDATA: > PMCLOG_READ32(le,ev->pl_u.pl_u.pl_userdata); > break; > + case PMCLOG_TYPE_THR_CREATE: > + PMCLOG_READ32(le,ev->pl_u.pl_tc.pl_tid); > + PMCLOG_READ32(le,ev->pl_u.pl_tc.pl_pid); > + PMCLOG_READ32(le,noop); > + memcpy(ev->pl_u.pl_tc.pl_tdname, le, MAXCOMLEN+1); > + break; > + case PMCLOG_TYPE_THR_EXIT: > + PMCLOG_READ32(le,ev->pl_u.pl_te.pl_tid); > + break; > + case PMCLOG_TYPE_PROC_CREATE: > + PMCLOG_READ32(le,ev->pl_u.pl_pc.pl_pid); > + memcpy(ev->pl_u.pl_pc.pl_pcomm, le, MAXCOMLEN+1); > + break; > default: /* unknown record type */ > ps->ps_state = PL_STATE_ERROR; > ev->pl_state = PMCLOG_ERROR; > pmcstat does not know about these new event types, so a `pmcstat -S cpu_clk_unhalted.core -l 10 -G data.test` produces error messages about unknown events: # pmcstat -S cpu_clk_unhalted.core -l 10 -G data.test initlog 0x9030000 "INTEL_ATOM_SILVERMONT" allocate 0x711 "cpu_clk_unhalted.core" 0x20080 allocate 0x100711 "cpu_clk_unhalted.core" 0x20080 allocate 0x200711 "cpu_clk_unhalted.core" 0x20080 allocate 0x300711 "cpu_clk_unhalted.core" 0x20080 allocate 0x400711 "cpu_clk_unhalted.core" 0x20080 allocate 0x500711 "cpu_clk_unhalted.core" 0x20080 allocate 0x600711 "cpu_clk_unhalted.core" 0x20080 allocate 0x700711 "cpu_clk_unhalted.core" 0x20080 unknown event (type 20). unknown event (type 18). unknown event (type 20). unknown event (type 18). unknown event (type 20). unknown event (type 18). unknown event (type 20). unknown event (type 18). unknown event (type 20). unknown event (type 18). unknown event (type 20). unknown event (type 18). unknown event (type 20). unknown event (type 18). unknown event (type 20). unknown event (type 18). unknown event (type 20). … I’ve added this locally, but I’m not familiar enough with the pmc tooling to know if this is complete, or correct. diff --git a/usr.sbin/pmcstat/pmcstat_log.c b/usr.sbin/pmcstat/pmcstat_log.c index 5f88d274f39..5444181ce0c 100644 --- a/usr.sbin/pmcstat/pmcstat_log.c +++ b/usr.sbin/pmcstat/pmcstat_log.c @@ -478,6 +478,21 @@ pmcstat_print_log(void) PMCSTAT_PRINT_ENTRY("exit","%d", ev.pl_u.pl_se.pl_pid); break; + case PMCLOG_TYPE_THR_CREATE: + PMCSTAT_PRINT_ENTRY("thrcreate","%d %d \"%s\"", + ev.pl_u.pl_tc.pl_tid, + ev.pl_u.pl_tc.pl_pid, + ev.pl_u.pl_tc.pl_tdname); + break; + case PMCLOG_TYPE_THR_EXIT: + PMCSTAT_PRINT_ENTRY("threxit","%d", + ev.pl_u.pl_te.pl_tid); + break; + case PMCLOG_TYPE_PROC_CREATE: + PMCSTAT_PRINT_ENTRY("proccreate","%d \"%s\"", + ev.pl_u.pl_pc.pl_pid, + ev.pl_u.pl_pc.pl_pcomm); + break; default: fprintf(args.pa_printfile, "unknown event (type %d).\n", ev.pl_type); Regards, Kristof From owner-svn-src-head@freebsd.org Wed Aug 29 14:01:28 2018 Return-Path: Delivered-To: svn-src-head@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 CF06E108AE64; Wed, 29 Aug 2018 14:01:28 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 853538DF14; Wed, 29 Aug 2018 14:01:28 +0000 (UTC) (envelope-from manu@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 664D01E1EA; Wed, 29 Aug 2018 14:01:28 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7TE1SAs003457; Wed, 29 Aug 2018 14:01:28 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7TE1RK7003454; Wed, 29 Aug 2018 14:01:27 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201808291401.w7TE1RK7003454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 29 Aug 2018 14:01:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338371 - in head/sys: arm/nvidia dev/sdhci X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/nvidia dev/sdhci X-SVN-Commit-Revision: 338371 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 14:01:29 -0000 Author: manu Date: Wed Aug 29 14:01:27 2018 New Revision: 338371 URL: https://svnweb.freebsd.org/changeset/base/338371 Log: arm64: GENERIC-MMCCAM: Fix build and module depend Fix the build of the GENERIC-MMCCAM kernel config after the sdhci_xenon driver was commited. While here correct sdhci_fdt and tegra_sdhci, even with MMCCAM they do need to depend on sdhci(4) Reported by: Reshetnikov Dmitriy Approved by: re (kib) Sponsored by: Rubicon Communications, LLC ("NetGate") Modified: head/sys/arm/nvidia/tegra_sdhci.c head/sys/dev/sdhci/sdhci_fdt.c head/sys/dev/sdhci/sdhci_xenon.c Modified: head/sys/arm/nvidia/tegra_sdhci.c ============================================================================== --- head/sys/arm/nvidia/tegra_sdhci.c Wed Aug 29 12:24:19 2018 (r338370) +++ head/sys/arm/nvidia/tegra_sdhci.c Wed Aug 29 14:01:27 2018 (r338371) @@ -465,7 +465,7 @@ static DEFINE_CLASS_0(sdhci, tegra_sdhci_driver, tegra sizeof(struct tegra_sdhci_softc)); DRIVER_MODULE(sdhci_tegra, simplebus, tegra_sdhci_driver, tegra_sdhci_devclass, NULL, NULL); -#ifndef MMCCAM MODULE_DEPEND(sdhci_tegra, sdhci, 1, 1, 1); +#ifndef MMCCAM MMC_DECLARE_BRIDGE(sdhci); #endif Modified: head/sys/dev/sdhci/sdhci_fdt.c ============================================================================== --- head/sys/dev/sdhci/sdhci_fdt.c Wed Aug 29 12:24:19 2018 (r338370) +++ head/sys/dev/sdhci/sdhci_fdt.c Wed Aug 29 14:01:27 2018 (r338371) @@ -353,7 +353,7 @@ static devclass_t sdhci_fdt_devclass; DRIVER_MODULE(sdhci_fdt, simplebus, sdhci_fdt_driver, sdhci_fdt_devclass, NULL, NULL); -#ifndef MMCCAM MODULE_DEPEND(sdhci_fdt, sdhci, 1, 1, 1); +#ifndef MMCCAM MMC_DECLARE_BRIDGE(sdhci_fdt); #endif Modified: head/sys/dev/sdhci/sdhci_xenon.c ============================================================================== --- head/sys/dev/sdhci/sdhci_xenon.c Wed Aug 29 12:24:19 2018 (r338370) +++ head/sys/dev/sdhci/sdhci_xenon.c Wed Aug 29 14:01:27 2018 (r338371) @@ -61,6 +61,8 @@ __FBSDID("$FreeBSD$"); #include "mmcbr_if.h" #include "sdhci_if.h" +#include "opt_mmccam.h" + #define MAX_SLOTS 6 static struct ofw_compat_data compat_data[] = { @@ -542,5 +544,8 @@ static devclass_t sdhci_xenon_devclass; DRIVER_MODULE(sdhci_xenon, simplebus, sdhci_xenon_driver, sdhci_xenon_devclass, NULL, NULL); + MODULE_DEPEND(sdhci_xenon, sdhci, 1, 1, 1); +#ifndef MMCCAM MMC_DECLARE_BRIDGE(sdhci_xenon); +#endif From owner-svn-src-head@freebsd.org Wed Aug 29 14:02:34 2018 Return-Path: Delivered-To: svn-src-head@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 827A7108AFFD; Wed, 29 Aug 2018 14:02:34 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 047F88E229; Wed, 29 Aug 2018 14:02:34 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf1-x435.google.com with SMTP id s13-v6so2318018pfi.7; Wed, 29 Aug 2018 07:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gykFQft97ZUIKvWqOEEeFLjJHNjClfnZuN7Yp8/diA0=; b=QZU1Jw2NwbFJ3GiugU21D+zbhxRA7P/5dTh/rn7dCykgq5tlYdoGcld0Woc4Ydv0tq sGMnuOY2MWMUU8WcNWsu7us8IqrjWLGKx1iTEyVwmuDTdZaquuuPQunjIA0jt4GgqyxC EMJ/6Xk5l8C933pwhvlmT1HqusCyOzoCBxvQQ1QjBPvOyktdIHJraVFlClFQEXn9HRGk bfB3qai5egM3QhM0mXBVYP1Nn+p7UmrPWNzNgZM38CpKlssYoiv/lqVnaFFsJ4aWn6at VBFyjycrAP3yd8trAxfBq55Hw+e78mNXw20IDL/unnLMjBOoPIAacHGBATW7SisdciOn e3Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=gykFQft97ZUIKvWqOEEeFLjJHNjClfnZuN7Yp8/diA0=; b=LeaRi7VqmdUQX3y9usOYE2bqS7PtkFdy7XZvm6s3PF2PAX47qStw/FpbHA41CoB7aA GmpIQisMPlfO60canI92dhM9kL2tfRBT7+yGYFPslUwpaLQ0hr/rV43GcNX+O+yhb8Jo wMeBh/1kdp2RPejR4YN3YwHcBn/9l1CuMMZzKMFvkAqfKr/ccKbzCJvFWILGd+b8pYb1 sr5k4LETYlMxF09ijk69Ga5sCbCPDKfe8s3ansxbDU43uqfX0dVLT2OsZxu1omLOOYgj ZsVp2iSHBQKq72D+MGjsGILxeXNixbkpSO2uWbkq0d4O9R4GlrtuWVBU+pClwLx097rX FgSg== X-Gm-Message-State: APzg51CWTT03Fg0dm4TjciHompDTaXr6GmFWbpza2g2sezFAVHZL3CoL Sjdb6IGoXciH7iZUZ8i6vq+JqDmf+t8= X-Google-Smtp-Source: ANB0Vdb1z8rE+F+1B2nmYYZml0EsWessQCZFrpFcHmtB0y+GV3sf+nm2gMFSOyYHwcM+/lk9e7nQBQ== X-Received: by 2002:a63:b914:: with SMTP id z20-v6mr5900760pge.396.1535551352697; Wed, 29 Aug 2018 07:02:32 -0700 (PDT) Received: from raichu (toroon0560w-lp130-09-70-52-224-239.dsl.bell.ca. [70.52.224.239]) by smtp.gmail.com with ESMTPSA id y124-v6sm7866941pfg.63.2018.08.29.07.02.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Aug 2018 07:02:31 -0700 (PDT) Sender: Mark Johnston Date: Wed, 29 Aug 2018 10:02:28 -0400 From: Mark Johnston To: Kristof Provost Cc: Matt Macy , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334647 - in head: lib/libpmc sys/dev/hwpmc sys/kern sys/sys usr.sbin usr.sbin/pmc Message-ID: <20180829140228.GE5641@raichu> References: <201806050426.w554QfVq001396@repo.freebsd.org> <7049241C-BA3D-4652-9568-C4387557F8E3@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7049241C-BA3D-4652-9568-C4387557F8E3@FreeBSD.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 14:02:34 -0000 On Wed, Aug 29, 2018 at 02:41:49PM +0200, Kristof Provost wrote: > On 5 Jun 2018, at 6:26, Matt Macy wrote: > > Author: mmacy > > Date: Tue Jun 5 04:26:40 2018 > > New Revision: 334647 > > URL: https://svnweb.freebsd.org/changeset/base/334647 > > > > Log: > > hwpmc: log name->pid, name->tid mappings > > > > By logging all threads and processes 'pmc filter' > > can now filter on process or thread name, relieving > > the user of the burden of determining which tid or > > pid was which when the sample was taken. > > > > % pmc filter -T if_io_tqg -P nginx pmc.log pmc-iflib.log > > > > % pmc filter -x -T idle pmc.log pmc-noidle.log > > > > Added: > > head/usr.sbin/pmc/cmd_pmc_filter.cc > > - copied, changed from r334645, > > head/usr.sbin/pmc/cmd_pmc_filter.c > > Deleted: > > head/usr.sbin/pmc/cmd_pmc_filter.c > > Modified: > > head/lib/libpmc/pmclog.c > > head/lib/libpmc/pmclog.h > > head/sys/dev/hwpmc/hwpmc_logging.c > > head/sys/dev/hwpmc/hwpmc_mod.c > > head/sys/kern/kern_kthread.c > > head/sys/kern/kern_thr.c > > head/sys/kern/kern_thread.c > > head/sys/sys/pmc.h > > head/sys/sys/pmckern.h > > head/sys/sys/pmclog.h > > head/usr.sbin/Makefile > > head/usr.sbin/pmc/Makefile (contents, props changed) > > head/usr.sbin/pmc/cmd_pmc.h (contents, props changed) > > > > Modified: head/lib/libpmc/pmclog.c > > ============================================================================== > > --- head/lib/libpmc/pmclog.c Tue Jun 5 01:05:58 2018 (r334646) > > +++ head/lib/libpmc/pmclog.c Tue Jun 5 04:26:40 2018 (r334647) > > @@ -404,6 +404,19 @@ pmclog_get_event(void *cookie, char **data, > > ssize_t *l > > case PMCLOG_TYPE_USERDATA: > > PMCLOG_READ32(le,ev->pl_u.pl_u.pl_userdata); > > break; > > + case PMCLOG_TYPE_THR_CREATE: > > + PMCLOG_READ32(le,ev->pl_u.pl_tc.pl_tid); > > + PMCLOG_READ32(le,ev->pl_u.pl_tc.pl_pid); > > + PMCLOG_READ32(le,noop); > > + memcpy(ev->pl_u.pl_tc.pl_tdname, le, MAXCOMLEN+1); > > + break; > > + case PMCLOG_TYPE_THR_EXIT: > > + PMCLOG_READ32(le,ev->pl_u.pl_te.pl_tid); > > + break; > > + case PMCLOG_TYPE_PROC_CREATE: > > + PMCLOG_READ32(le,ev->pl_u.pl_pc.pl_pid); > > + memcpy(ev->pl_u.pl_pc.pl_pcomm, le, MAXCOMLEN+1); > > + break; > > default: /* unknown record type */ > > ps->ps_state = PL_STATE_ERROR; > > ev->pl_state = PMCLOG_ERROR; > > > > pmcstat does not know about these new event types, so a `pmcstat -S > cpu_clk_unhalted.core -l 10 -G data.test` produces error messages about > unknown events: See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230984 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230985 From owner-svn-src-head@freebsd.org Wed Aug 29 14:05:46 2018 Return-Path: Delivered-To: svn-src-head@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 26DC3108B177; Wed, 29 Aug 2018 14:05:46 +0000 (UTC) (envelope-from loos.br@gmail.com) Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B30378E47B; Wed, 29 Aug 2018 14:05:45 +0000 (UTC) (envelope-from loos.br@gmail.com) Received: by mail-it0-x22d.google.com with SMTP id j198-v6so5192995ita.0; Wed, 29 Aug 2018 07:05:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l9PlRHVhuEBoJS+BF4URK6HG2/eJQVKrjAZ1NsHvvoc=; b=Sp+B1uUl5at4U1ne8lZN54PPsW3DT4OzRY4x9dcti6YKgECeC+3SwHcM7Id01iF/Om Ff2dSTwtvA4iRlZu3sq1CSGkC36i1P0536vrrudxaEWCIj1c5yqXz/mz3OlB4IfftbxC HmVk/MRbojaEKnoWXpi01ys7Dttl1ppJ3ZrtOUYOUles8y/6plgG8BtNA13bgaN/+ejU injef/PcY3sosHlEECdC9JhJnCIcpZ8EgaesEkVXmsBEdo3X6YSv09Tfrk9+p2L6awmv vK+BGehv05HheK3EEjhm3b0O0+Q4NnTB9enVe8H9e43qp1h3YKRd8/MqqaVhxHVJVRQa U+Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l9PlRHVhuEBoJS+BF4URK6HG2/eJQVKrjAZ1NsHvvoc=; b=EW6i4LqO5TD57qhWvv1op0gDTpajD1IjhWAEzhENqF9xkx6fhADHTe354SpraffHFT bH3EBnoAzDPGRNL4Vs7qwu3I86hNuwXXCvUboz5EbInbeqTTUGII2S8/HujSBnaIkZnb is+TGwNYxGP3oXOT8TVn1V5u43qhjh0VydSbvdElyA07K0qNbrWyBjLKOh4ZnDD6fTLH nVuz8DRS+e32Vt+IaTLkqCy+XJBebWD/02ZqJrF5wRCqLg/9c4iyVO26vVOlRoBfR5Hp ob9zCfIghhDyfUsFbGIHvNl9VkmYDe0nWpVNz7OZQNNs5VmD4/yaidTZ8CSHLfz5MLco CeuA== X-Gm-Message-State: APzg51C7UVagjTwOh+vsHbeMS8Tt13JbIRN+d6fmsdAPLl2ODIQLYEer joKMzgguEE4mteZlwHBJ1nxMOiAAFeN+8rRXe7cgjw== X-Google-Smtp-Source: ANB0VdbPGJ10r+6cHT8Ad2+H3RGdLOf5GG/Xz0Gr2j4lHTRT1d9UskSPMZEK5OCCXg6gsz5QqawAmHuxBxYuwMGyuz0= X-Received: by 2002:a24:764d:: with SMTP id z74-v6mr5210261itb.34.1535551545016; Wed, 29 Aug 2018 07:05:45 -0700 (PDT) MIME-Version: 1.0 References: <201808291401.w7TE1RK7003454@repo.freebsd.org> In-Reply-To: <201808291401.w7TE1RK7003454@repo.freebsd.org> From: Luiz Otavio O Souza Date: Wed, 29 Aug 2018 11:05:33 -0300 Message-ID: Subject: Re: svn commit: r338371 - in head/sys: arm/nvidia dev/sdhci To: manu@freebsd.org Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 14:05:46 -0000 On Wed, Aug 29, 2018 at 11:01 AM Emmanuel Vadot wrote: > > Author: manu > Date: Wed Aug 29 14:01:27 2018 > New Revision: 338371 > URL: https://svnweb.freebsd.org/changeset/base/338371 > > Log: > arm64: GENERIC-MMCCAM: Fix build and module depend > > Fix the build of the GENERIC-MMCCAM kernel config after the sdhci_xenon > driver was commited. > While here correct sdhci_fdt and tegra_sdhci, even with MMCCAM they do > need to depend on sdhci(4) > > Reported by: Reshetnikov Dmitriy Thanks Manu! From owner-svn-src-head@freebsd.org Wed Aug 29 15:55:26 2018 Return-Path: Delivered-To: svn-src-head@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 DE4AB108DC9A; Wed, 29 Aug 2018 15:55:26 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 842887263E; Wed, 29 Aug 2018 15:55:26 +0000 (UTC) (envelope-from shurd@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 603B91F419; Wed, 29 Aug 2018 15:55:26 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7TFtQfM065592; Wed, 29 Aug 2018 15:55:26 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7TFtQKM065591; Wed, 29 Aug 2018 15:55:26 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201808291555.w7TFtQKM065591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Wed, 29 Aug 2018 15:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338372 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 338372 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 15:55:27 -0000 Author: shurd Date: Wed Aug 29 15:55:25 2018 New Revision: 338372 URL: https://svnweb.freebsd.org/changeset/base/338372 Log: Fix potential data corruption in iflib The MP ring may have txq pointers enqueued. Previously, these were passed to m_free() when IFC_QFLUSH was set. This patch checks for the value and doesn't call m_free(). Reviewed by: gallatin Approved by: re (gjb) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D16882 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Wed Aug 29 14:01:27 2018 (r338371) +++ head/sys/net/iflib.c Wed Aug 29 15:55:25 2018 (r338372) @@ -3636,7 +3636,8 @@ iflib_txq_drain(struct ifmp_ring *r, uint32_t cidx, ui if (__predict_false(ctx->ifc_flags & IFC_QFLUSH)) { DBG_COUNTER_INC(txq_drain_flushing); for (i = 0; i < avail; i++) { - m_free(r->items[(cidx + i) & (r->size-1)]); + if (__predict_true(r->items[(cidx + i) & (r->size-1)] != (void *)txq) + m_free(r->items[(cidx + i) & (r->size-1)]); r->items[(cidx + i) & (r->size-1)] = NULL; } return (avail); From owner-svn-src-head@freebsd.org Wed Aug 29 16:21:35 2018 Return-Path: Delivered-To: svn-src-head@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 8EEF3108E547; Wed, 29 Aug 2018 16:21:35 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47933734C6; Wed, 29 Aug 2018 16:21:35 +0000 (UTC) (envelope-from shurd@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 28A6B1F7DE; Wed, 29 Aug 2018 16:21:35 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7TGLZHS079869; Wed, 29 Aug 2018 16:21:35 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7TGLZli079868; Wed, 29 Aug 2018 16:21:35 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201808291621.w7TGLZli079868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Wed, 29 Aug 2018 16:21:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338373 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 338373 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 16:21:35 -0000 Author: shurd Date: Wed Aug 29 16:21:34 2018 New Revision: 338373 URL: https://svnweb.freebsd.org/changeset/base/338373 Log: Fix compile error due to missing parenthesis in r338372 Approved by: re (gjb) Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Wed Aug 29 15:55:25 2018 (r338372) +++ head/sys/net/iflib.c Wed Aug 29 16:21:34 2018 (r338373) @@ -3636,7 +3636,7 @@ iflib_txq_drain(struct ifmp_ring *r, uint32_t cidx, ui if (__predict_false(ctx->ifc_flags & IFC_QFLUSH)) { DBG_COUNTER_INC(txq_drain_flushing); for (i = 0; i < avail; i++) { - if (__predict_true(r->items[(cidx + i) & (r->size-1)] != (void *)txq) + if (__predict_true(r->items[(cidx + i) & (r->size-1)] != (void *)txq)) m_free(r->items[(cidx + i) & (r->size-1)]); r->items[(cidx + i) & (r->size-1)] = NULL; } From owner-svn-src-head@freebsd.org Wed Aug 29 16:59:21 2018 Return-Path: Delivered-To: svn-src-head@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 26752108F39C; Wed, 29 Aug 2018 16:59:21 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA8E974883; Wed, 29 Aug 2018 16:59:20 +0000 (UTC) (envelope-from brd@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 7C2171FE27; Wed, 29 Aug 2018 16:59:20 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7TGxKKL096286; Wed, 29 Aug 2018 16:59:20 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7TGxJqF096282; Wed, 29 Aug 2018 16:59:19 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201808291659.w7TGxJqF096282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Wed, 29 Aug 2018 16:59:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338374 - in head: bin/csh bin/sh etc etc/root X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: bin/csh bin/sh etc etc/root X-SVN-Commit-Revision: 338374 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 16:59:21 -0000 Author: brd Date: Wed Aug 29 16:59:19 2018 New Revision: 338374 URL: https://svnweb.freebsd.org/changeset/base/338374 Log: Finish moving dot.cshrc and dot.profile to bin/csh/ and bin/sh/. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D16770 Added: head/bin/csh/dot.cshrc - copied unchanged from r338373, head/etc/root/dot.cshrc head/bin/sh/dot.profile - copied unchanged from r338373, head/etc/root/dot.profile Deleted: head/etc/root/dot.cshrc head/etc/root/dot.profile Modified: head/bin/csh/Makefile head/bin/sh/Makefile head/etc/Makefile Modified: head/bin/csh/Makefile ============================================================================== --- head/bin/csh/Makefile Wed Aug 29 16:21:34 2018 (r338373) +++ head/bin/csh/Makefile Wed Aug 29 16:59:19 2018 (r338374) @@ -10,8 +10,9 @@ CONFGROUPS= ETC ROOT ETC= csh.cshrc csh.login csh.logout -ROOT= dot.login +ROOT= dot.cshrc dot.login ROOTDIR= /root +ROOTNAME_dot.cshrc= .cshrc ROOTNAME_dot.login= .login PACKAGE=runtime TCSHDIR= ${SRCTOP}/contrib/tcsh @@ -152,5 +153,11 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h s sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ sort >> ${.TARGET} @echo '#endif /* _h_tc_const */' >> ${.TARGET} + +beforeinstallconfig: + rm -f ${DESTDIR}/.cshrc + +afterinstallconfig: + ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc .include Copied: head/bin/csh/dot.cshrc (from r338373, head/etc/root/dot.cshrc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/csh/dot.cshrc Wed Aug 29 16:59:19 2018 (r338374, copy of r338373, head/etc/root/dot.cshrc) @@ -0,0 +1,43 @@ +# $FreeBSD$ +# +# .cshrc - csh resource script, read at beginning of execution by each shell +# +# see also csh(1), environ(7). +# more examples available at /usr/share/examples/csh/ +# + +alias h history 25 +alias j jobs -l +alias la ls -aF +alias lf ls -FA +alias ll ls -lAF + +# A righteous umask +umask 22 + +set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin) + +setenv EDITOR vi +setenv PAGER less +setenv BLOCKSIZE K + +if ($?prompt) then + # An interactive shell -- set some stuff up + set prompt = "%N@%m:%~ %# " + set promptchars = "%#" + + set filec + set history = 1000 + set savehist = (1000 merge) + set autolist = ambiguous + # Use history to aid expansion + set autoexpand + set autorehash + set mail = (/var/mail/$USER) + if ( $?tcsh ) then + bindkey "^W" backward-delete-word + bindkey -k up history-search-backward + bindkey -k down history-search-forward + endif + +endif Modified: head/bin/sh/Makefile ============================================================================== --- head/bin/sh/Makefile Wed Aug 29 16:21:34 2018 (r338373) +++ head/bin/sh/Makefile Wed Aug 29 16:59:19 2018 (r338374) @@ -3,7 +3,9 @@ .include -CONFS= profile +CONFS= dot.profile profile +CONFSDIR_dot.profile= /root +CONFSNAME_dot.profile= .profile PACKAGE=runtime PROG= sh INSTALLFLAGS= -S @@ -60,5 +62,11 @@ token.h: mktokens HAS_TESTS= SUBDIR.${MK_TESTS}+= tests + +beforeinstallconfig: + rm -f ${DESTDIR}/.profile + +afterinstallconfig: + ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile .include Copied: head/bin/sh/dot.profile (from r338373, head/etc/root/dot.profile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/dot.profile Wed Aug 29 16:59:19 2018 (r338374, copy of r338373, head/etc/root/dot.profile) @@ -0,0 +1,16 @@ +# $FreeBSD$ +# +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin +export PATH +HOME=/root +export HOME +TERM=${TERM:-xterm} +export TERM +PAGER=less +export PAGER + +# Query terminal size; useful for serial lines. +if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi + +# Uncomment to display a random cookie on each login. +# if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune -s ; fi Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Wed Aug 29 16:21:34 2018 (r338373) +++ head/etc/Makefile Wed Aug 29 16:59:19 2018 (r338374) @@ -155,18 +155,6 @@ distribution: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.k5login ${DESTDIR}/root/.k5login; .endif - cd ${.CURDIR}/root; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ - dot.profile ${DESTDIR}/root/.profile; \ - rm -f ${DESTDIR}/.profile; \ - ${INSTALL_LINK} ${DESTDIR}/root/.profile ${DESTDIR}/.profile -.if ${MK_TCSH} != "no" - cd ${.CURDIR}/root; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ - dot.cshrc ${DESTDIR}/root/.cshrc; \ - rm -f ${DESTDIR}/.cshrc; \ - ${INSTALL_LINK} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc -.endif .if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ From owner-svn-src-head@freebsd.org Wed Aug 29 17:09:05 2018 Return-Path: Delivered-To: svn-src-head@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 7A5F7108F646; Wed, 29 Aug 2018 17:09:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F44B74F25; Wed, 29 Aug 2018 17:09:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FA9C1FFC4; Wed, 29 Aug 2018 17:09:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7TH94GY001572; Wed, 29 Aug 2018 17:09:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7TH94Mn001568; Wed, 29 Aug 2018 17:09:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808291709.w7TH94Mn001568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 29 Aug 2018 17:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338375 - in head/usr.bin/sed: . tests X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/usr.bin/sed: . tests X-SVN-Commit-Revision: 338375 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 17:09:05 -0000 Author: markj Date: Wed Aug 29 17:09:03 2018 New Revision: 338375 URL: https://svnweb.freebsd.org/changeset/base/338375 Log: sed: Fix -i option behavior with 'q' command. Don't just exit when encountering the 'q' command if we edit file inplace, and give mf_fgets() a chance to actually handle the inplace case. Also add a regression test. Submitted by: Yuri Pankov Approved by: re (kib) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D16798 Modified: head/usr.bin/sed/extern.h head/usr.bin/sed/main.c head/usr.bin/sed/process.c head/usr.bin/sed/tests/sed2_test.sh Modified: head/usr.bin/sed/extern.h ============================================================================== --- head/usr.bin/sed/extern.h Wed Aug 29 16:59:19 2018 (r338374) +++ head/usr.bin/sed/extern.h Wed Aug 29 17:09:03 2018 (r338375) @@ -46,6 +46,8 @@ extern int aflag, eflag, nflag; extern const char *fname, *outfname; extern FILE *infile, *outfile; extern int rflags; /* regex flags to use */ +extern const char *inplace; +extern int quit; void cfclose(struct s_command *, struct s_command *); void compile(void); Modified: head/usr.bin/sed/main.c ============================================================================== --- head/usr.bin/sed/main.c Wed Aug 29 16:59:19 2018 (r338374) +++ head/usr.bin/sed/main.c Wed Aug 29 17:09:03 2018 (r338375) @@ -102,6 +102,7 @@ FILE *outfile; /* Current output file */ int aflag, eflag, nflag; int rflags = 0; +int quit = 0; static int rval; /* Exit status */ static int ispan; /* Whether inplace editing spans across files */ @@ -115,7 +116,7 @@ const char *fname; /* File name. */ const char *outfname; /* Output file name */ static char oldfname[PATH_MAX]; /* Old file name (for in-place editing) */ static char tmpfname[PATH_MAX]; /* Temporary file name (for in-place editing) */ -static const char *inplace; /* Inplace edit file extension. */ +const char *inplace; /* Inplace edit file extension. */ u_long linenum; static void add_compunit(enum e_cut, char *); @@ -338,7 +339,7 @@ mf_fgets(SPACE *sp, enum e_spflag spflag) } for (;;) { - if (infile != NULL && (c = getc(infile)) != EOF) { + if (infile != NULL && (c = getc(infile)) != EOF && !quit) { (void)ungetc(c, infile); break; } Modified: head/usr.bin/sed/process.c ============================================================================== --- head/usr.bin/sed/process.c Wed Aug 29 16:59:19 2018 (r338374) +++ head/usr.bin/sed/process.c Wed Aug 29 17:09:03 2018 (r338375) @@ -210,10 +210,14 @@ redirect: } break; case 'q': - if (!nflag && !pd) - OUT(); - flush_appends(); - exit(0); + if (inplace == NULL) { + if (!nflag && !pd) + OUT(); + flush_appends(); + exit(0); + } + quit = 1; + break; case 'r': if (appendx >= appendnum) if ((appends = realloc(appends, Modified: head/usr.bin/sed/tests/sed2_test.sh ============================================================================== --- head/usr.bin/sed/tests/sed2_test.sh Wed Aug 29 16:59:19 2018 (r338374) +++ head/usr.bin/sed/tests/sed2_test.sh Wed Aug 29 17:09:03 2018 (r338375) @@ -38,6 +38,7 @@ inplace_hardlink_src_body() atf_check ln a b atf_check sed -i '' -e 's,foo,bar,g' b atf_check -o 'inline:bar\n' -s exit:0 cat b + atf_check -s not-exit:0 stat -q '.!'* } atf_test_case inplace_symlink_src @@ -50,10 +51,27 @@ inplace_symlink_src_body() echo foo > a atf_check ln -s a b atf_check -e not-empty -s not-exit:0 sed -i '' -e 's,foo,bar,g' b + atf_check -s not-exit:0 stat -q '.!'* } +atf_test_case inplace_command_q +inplace_command_q_head() +{ + atf_set "descr" "Verify -i works correctly with the 'q' command" +} +inplace_command_q_body() +{ + printf '1\n2\n3\n' > a + atf_check -o 'inline:1\n2\n' sed '2q' a + atf_check sed -i.bak '2q' a + atf_check -o 'inline:1\n2\n' cat a + atf_check -o 'inline:1\n2\n3\n' cat a.bak + atf_check -s not-exit:0 stat -q '.!'* +} + atf_init_test_cases() { + atf_add_test_case inplace_command_q atf_add_test_case inplace_hardlink_src atf_add_test_case inplace_symlink_src } From owner-svn-src-head@freebsd.org Wed Aug 29 17:27:26 2018 Return-Path: Delivered-To: svn-src-head@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 46C801090051; Wed, 29 Aug 2018 17:27:26 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFDA975C8B; Wed, 29 Aug 2018 17:27:25 +0000 (UTC) (envelope-from yuripv@yuripv.net) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 32C5721B6D; Wed, 29 Aug 2018 13:27:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 29 Aug 2018 13:27:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.net; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=TTF5hrB7GrqxOov7FyxBtrr/8sgD9 89+nmGbjJkb7gk=; b=kCCiIPd5CBgli/XpMJFF07gPp2Z0DmadYM6A2DrYudi3V uJI7RVhLo8sTCNALaXhXgEqicu59/CpjlFs51iI8JfsUM+AYORQejE+T2R6vvaJq oS6bhg5P4RvvVTZvpYJz4UeY9OgTi4TKNYuVJfntJC00EsajQBjkhuM+Vvx7TuxU mwU3/GRTOl9bTpWwEwffYa57je385rBE4Kl23ki1pAWOXLRw/Jr8qR4ZqJXaQzZi GCQrmm3yWd7gp+hjL3Df+hqQzN6yLjgeHmGcGazbZb4SpJy62TsedDBgMWrqCO/g mpxC3fjcxfK4qfQLdLZc7efB+PwAUBIpruHqT8X+Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=TTF5hr B7GrqxOov7FyxBtrr/8sgD989+nmGbjJkb7gk=; b=C5BopN3vIeEg3v1yagYEfh K+a9f4V7BvWSyCkkTIR/b0u4rzZt/rOHU/AO+N9C3rTMLUK5mTHEydypas2w0oN8 UBDZXsC12wPZK+ne9h7WDl1kc9EO8KNsdBE2FyjpSaxhBr3veJbLH+/jNg/6xcEz vGV7Rpv6BglTdPyD7v/zDzI4ajvjawaKePfQykX18x1yaB6dH8rIWUTx8v8JKRIq L35W/8CMtJ38sdUbzJt05OT7Nqg/dWWaSBPYwL3KOLYZEjMhCuNRXnAWLfMjsg+Z aWTQOE82c55jQUB018ksTU/WFeHDg2kmR6MP5pzSBfuz1cKQmJumPYBf1zQawE6w == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.2] (unknown [178.34.99.43]) by mail.messagingengine.com (Postfix) with ESMTPA id E828B1028F; Wed, 29 Aug 2018 13:27:23 -0400 (EDT) Subject: Re: svn commit: r338375 - in head/usr.bin/sed: . tests To: Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808291709.w7TH94Mn001568@repo.freebsd.org> From: Yuri Pankov Message-ID: Date: Wed, 29 Aug 2018 20:27:23 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <201808291709.w7TH94Mn001568@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 17:27:26 -0000 Mark Johnston wrote: > Author: markj > Date: Wed Aug 29 17:09:03 2018 > New Revision: 338375 > URL: https://svnweb.freebsd.org/changeset/base/338375 > > Log: > sed: Fix -i option behavior with 'q' command. > > Don't just exit when encountering the 'q' command if we edit file > inplace, and give mf_fgets() a chance to actually handle the > inplace case. > > Also add a regression test. > > Submitted by: Yuri Pankov > Approved by: re (kib) > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D16798 This is also: PR: 230507 From owner-svn-src-head@freebsd.org Wed Aug 29 17:37:24 2018 Return-Path: Delivered-To: svn-src-head@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 311F0109056E; Wed, 29 Aug 2018 17:37:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDE6A764DC; Wed, 29 Aug 2018 17:37:23 +0000 (UTC) (envelope-from imp@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 B9E72204A8; Wed, 29 Aug 2018 17:37:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7THbN4M017213; Wed, 29 Aug 2018 17:37:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7THbNmj017212; Wed, 29 Aug 2018 17:37:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201808291737.w7THbNmj017212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 29 Aug 2018 17:37:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338376 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 338376 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 17:37:24 -0000 Author: imp Date: Wed Aug 29 17:37:23 2018 New Revision: 338376 URL: https://svnweb.freebsd.org/changeset/base/338376 Log: Tweak typos in UPDATING Approved by: re@ (gjb) Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Aug 29 17:09:03 2018 (r338375) +++ head/UPDATING Wed Aug 29 17:37:23 2018 (r338376) @@ -36,8 +36,8 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: supported by its designers since at least 2003. Fortuna has been the default since FreeBSD-11. -20170822: - devctl freeze/that have gone into the tree, the rc scripts have been +20180822: + devctl freeze/thaw have gone into the tree, the rc scripts have been updated to use them and devmatch has been changed. You should update kernel, userland and rc scripts all at the same time. From owner-svn-src-head@freebsd.org Wed Aug 29 19:21:11 2018 Return-Path: Delivered-To: svn-src-head@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 0229B1093872; Wed, 29 Aug 2018 19:21:11 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 471FF7D7AA; Wed, 29 Aug 2018 19:21:10 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id v61UfnZtpp5A1v61WfQ6ua; Wed, 29 Aug 2018 13:21:03 -0600 X-Authority-Analysis: v=2.3 cv=JLKPTPCb c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=dapMudl6Dx4A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=7q0Mil2CJ7WIWtF3S7kA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 3AA89DA9; Wed, 29 Aug 2018 12:21:44 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w7TJKhHg047021; Wed, 29 Aug 2018 12:20:43 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w7TJKhKs047018; Wed, 29 Aug 2018 12:20:43 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201808291920.w7TJKhKs047018@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Alex Richardson cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338098 - in head: . tools/build In-Reply-To: Message from Alex Richardson of "Mon, 20 Aug 2018 10:39:53 -0000." <201808201039.w7KAdrMM079556@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 29 Aug 2018 12:20:43 -0700 X-CMAE-Envelope: MS4wfHR24ilD5A5CPwnViMtZrtOOR4GXbTUMQynmbTbNL72i4+p280hoH3nLn5P40V1OCD6fHVTqFA2voke0Dc/JIyg18+AJr4VHYiEysjfhvd2bii4RDXFN VA9w5wRsBnyvDYMUlqTel8U4PdyonY3go+jsQBdi6i7lgp7dc6OQKZ6VcfEww17+n1SQ/qA4oVI1k4xL10xx8U801sry2MlaFqC5JraRbOWrZ+Ln6x+BE8CF EVRwDqCu2qwmWZq5FViz2swhS6wVIgroBBveC0nbleSjZNCgt53bA1cVgUug3qFO X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 19:21:11 -0000 In message <201808201039.w7KAdrMM079556@repo.freebsd.org>, Alex Richardson writ es: > Author: arichardson > Date: Mon Aug 20 10:39:53 2018 > New Revision: 338098 > URL: https://svnweb.freebsd.org/changeset/base/338098 > > Log: > Don't create directories in ${WORLDTMP}/legacy with mtree > > This has two advantages: > 1) We no longer create lots of empty directories that are not needed > 2) This is a requirement for building on non-FreeBSD hosts since mtree will > only exist after the bootstrap-tools phase there. > > Aproved By: jhb (mentor) > Differential Revision: https://reviews.freebsd.org/D16773 > > Modified: > head/Makefile.inc1 > head/tools/build/Makefile > > Modified: head/Makefile.inc1 > ============================================================================= > = > --- head/Makefile.inc1 Mon Aug 20 10:39:48 2018 (r338097) > +++ head/Makefile.inc1 Mon Aug 20 10:39:53 2018 (r338098) > @@ -968,29 +968,10 @@ _worldtmp: .PHONY > .endif # !defined(NO_CLEAN) > @mkdir -p ${WORLDTMP} > @touch ${WORLDTMP}/${.TARGET} > - > -.for _dir in \ > - lib lib/casper lib/geom usr legacy/bin legacy/usr > - mkdir -p ${WORLDTMP}/${_dir} > -.endfor > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ > - -p ${WORLDTMP}/legacy/usr >/dev/null > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ > - -p ${WORLDTMP}/legacy/usr/include >/dev/null > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ > - -p ${WORLDTMP}/usr >/dev/null > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ > - -p ${WORLDTMP}/usr/include >/dev/null > - ln -sf ${.CURDIR}/sys ${WORLDTMP} > -.if ${MK_DEBUG_FILES} != "no" > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ > - -p ${WORLDTMP}/legacy/usr/lib >/dev/null > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ > - -p ${WORLDTMP}/usr/lib >/dev/null > -.endif > -.for _mtree in ${LOCAL_MTREE} > - ${WORLDTMP_MTREE} -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null > -.endfor > +# We can't use mtree to create the worldtmp directories since it may not be > +# available on the target system (this happens e.g. when building on non-Fre > eBSD) > + cd ${.CURDIR}/tools/build; \ > + ${MAKE} DIRPRFX=tools/build/ DESTDIR=${WORLDTMP}/legacy installdirs > _legacy: > @echo > @echo "--------------------------------------------------------------" > @@ -1003,6 +984,19 @@ _bootstrap-tools: > @echo ">>> stage 1.2: bootstrap tools" > @echo "--------------------------------------------------------------" > ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools > + mkdir -p ${WORLDTMP}/usr ${WORLDTMP}/lib/casper ${WORLDTMP}/lib/geom > + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ > + -p ${WORLDTMP}/usr >/dev/null > + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ > + -p ${WORLDTMP}/usr/include >/dev/null > + ln -sf ${.CURDIR}/sys ${WORLDTMP} > +.if ${MK_DEBUG_FILES} != "no" > + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ > + -p ${WORLDTMP}/usr/lib >/dev/null > +.endif > +.for _mtree in ${LOCAL_MTREE} > + ${WORLDTMP_MTREE} -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null > +.endfor > _cleanobj: > .if !defined(NO_CLEAN) > @echo > > Modified: head/tools/build/Makefile > ============================================================================= > = > --- head/tools/build/Makefile Mon Aug 20 10:39:48 2018 (r338097) > +++ head/tools/build/Makefile Mon Aug 20 10:39:53 2018 (r338098) > @@ -59,4 +59,17 @@ SUBDIR= cross-build > # Needed to build config (since it uses libnv) > SYSINCS+= ${SRCTOP}/sys/sys/nv.h ${SRCTOP}/sys/sys/cnv.h > > + > +# Create all the directories that are needed during the legacy, bootstrap-to > ols > +# and cross-tools stages. We do this here using mkdir since mtree may not ex > ist > +# yet (this happens if we are crossbuilding from Linux/Mac). > +installdirs: > +.for _dir in bin sbin usr/bin usr/sbin usr/lib usr/include lib/geom lib/casp > er > + mkdir -p "${DESTDIR}/${_dir}" > +.endfor > + > +.for _group in ${INCSGROUPS:NINCS} > + mkdir -p "${DESTDIR}/${${_group}DIR}" > +.endfor > + > .include > This broke my krb5 project branch. The fix for me is easy but rather inelegant, adding yet another for loop. Would it not be better to guarantee that mtree is in $WORLDTEMP for platforms that don't have it naturally or unconditionally? And, before we use it? With this change it requires, depending on what any future patch changes, that etc/mtree and this fragment be updated. To me it feels klunky. I'll work around this for now but IMO long term we should use a different strategy and reduce redundancy. Thoughts? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Thu Aug 30 11:40:00 2018 Return-Path: Delivered-To: svn-src-head@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 74021109C364; Thu, 30 Aug 2018 11:40:00 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8D627C996; Thu, 30 Aug 2018 11:39:59 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([2.247.42.92]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LfkUs-1fasbO0Hxi-00pMSK; Thu, 30 Aug 2018 13:39:56 +0200 Date: Thu, 30 Aug 2018 13:39:20 +0200 From: "O. Hartmann" To: Brad Davis Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338374 - in head: bin/csh bin/sh etc etc/root Message-ID: <20180830133947.5e68bea3@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201808291659.w7TGxJqF096282@repo.freebsd.org> References: <201808291659.w7TGxJqF096282@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:chrSTQNewTBAqUqgUoYevMXY2aF9bnuvdRwRQ5kLV3P6mFQLpX+ s57mtYDlPGS9xzGDvXUtax0mPAey8TSZtYP2XCaOGyMNp9BWSs0r0WDe9LRQehDTpXrvg7u Ygop5CrlHE1U0tVsPrtCiQC1KK9KZlCda/d6MxZvjt0+sRsgbjCHkknFDSUX6hdyJpbSrGF LPOVMmU2pRsMMixglZB4Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:KmHKb2+ag0A=:OOIN5L0Dlab3/5Ff5oK+af D9GLIFkQ5uQORs44NYNF0NBse47c7ZI6msXTo+mERZvO3pwrhwcO1ApK45X72tCxdTaMy6Zt0 iuX2oAn4Wg3BNWuBXKlvK6ZLz13pE/rN364kMkAyz/zea/3nVvSWGCox7viLZmvySVFClVQ7y VKBeZFN2wNSzE9JzvupsrC1kVB7VmtOuBD9d6BgocHclJEwbwECL/1+7iC4tdgLIUIRlDq7LC mBWoZ5T9jCoAKMJLBQZPgu0Re+pA5iR6KU/uY1L42TB5XuQgDht+SPz4mol9yxTWUdX5NgfEz m2W+uox/EflQJzELMcEe3p/49NPZBCUSQMIj9pqnDOcJsu66g2xpXYdF2LwFieZ2Pv1iDA5vm T0kvr/xGEZMKytpYm653V/uDuhTCiDNMHTxVgt2KtEBs/CKy+U1nj8hx3BDsXpyy2F/7+IAJP YnehD65OTXLSsu+5tpkmeWlCNDqwIfaAOivIPpGESh67DX133uXzJWw4uQa09vAa2JImx+Dqp qouvv26U/5oUbnZnLixHMdhyBPuhkvNaW/3pPD2r36mgayuzoq6byNWjdLavDxn6zm4HVZuqU iBp/Ffx0i2yiTRv2FqZjZHKfdirWBPQR+HU4JIqVJ+IetOfsDFBojhPO9QfN7duF/9GciDBwz gu+YKtIjY99LSaJBuXrejsUoPnOa4PG6u+NFYI3PBR44tTA9lFplTrULLhCZDGMbCD2wtDvCS ReQo47X3lFckd6cXcH3ZWZGzRXAlxsylUUuYFn2ad8U49hUbY9pqjQ7TbkuvTFExmj/F179+l yNeDxOs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 11:40:00 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBNTEyDQoNCkFtIFdl ZCwgMjkgQXVnIDIwMTggMTY6NTk6MTkgKzAwMDAgKFVUQykNCkJyYWQgRGF2aXMgPGJyZEBGcmVl QlNELm9yZz4gc2NocmllYjoNCg0KPiBBdXRob3I6IGJyZA0KPiBEYXRlOiBXZWQgQXVnIDI5IDE2 OjU5OjE5IDIwMTgNCj4gTmV3IFJldmlzaW9uOiAzMzgzNzQNCj4gVVJMOiBodHRwczovL3N2bndl Yi5mcmVlYnNkLm9yZy9jaGFuZ2VzZXQvYmFzZS8zMzgzNzQNCj4gDQo+IExvZzoNCj4gICBGaW5p c2ggbW92aW5nIGRvdC5jc2hyYyBhbmQgZG90LnByb2ZpbGUgdG8gYmluL2NzaC8gYW5kIGJpbi9z aC8uDQo+ICAgDQo+ICAgQXBwcm92ZWQgYnk6CXJlIChnamIpLCB3aWxsIChtZW50b3IpDQo+ICAg RGlmZmVyZW50aWFsIFJldmlzaW9uOglodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDE2Nzcw DQo+IA0KPiBBZGRlZDoNCj4gICBoZWFkL2Jpbi9jc2gvZG90LmNzaHJjDQo+ICAgICAgLSBjb3Bp ZWQgdW5jaGFuZ2VkIGZyb20gcjMzODM3MywgaGVhZC9ldGMvcm9vdC9kb3QuY3NocmMNCj4gICBo ZWFkL2Jpbi9zaC9kb3QucHJvZmlsZQ0KPiAgICAgIC0gY29waWVkIHVuY2hhbmdlZCBmcm9tIHIz MzgzNzMsIGhlYWQvZXRjL3Jvb3QvZG90LnByb2ZpbGUNCj4gRGVsZXRlZDoNCj4gICBoZWFkL2V0 Yy9yb290L2RvdC5jc2hyYw0KPiAgIGhlYWQvZXRjL3Jvb3QvZG90LnByb2ZpbGUNCj4gTW9kaWZp ZWQ6DQo+ICAgaGVhZC9iaW4vY3NoL01ha2VmaWxlDQo+ICAgaGVhZC9iaW4vc2gvTWFrZWZpbGUN Cj4gICBoZWFkL2V0Yy9NYWtlZmlsZQ0KPiANCj4gTW9kaWZpZWQ6IGhlYWQvYmluL2NzaC9NYWtl ZmlsZQ0KPiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCj4gLS0tIGhlYWQvYmluL2NzaC9NYWtlZmls ZQlXZWQgQXVnIDI5IDE2OjIxOjM0IDIwMTgJKHIzMzgzNzMpDQo+ICsrKyBoZWFkL2Jpbi9jc2gv TWFrZWZpbGUJV2VkIEF1ZyAyOSAxNjo1OToxOSAyMDE4CShyMzM4Mzc0KQ0KPiBAQCAtMTAsOCAr MTAsOSBAQA0KPiAgDQo+ICBDT05GR1JPVVBTPQlFVEMgUk9PVA0KPiAgRVRDPQljc2guY3NocmMg Y3NoLmxvZ2luIGNzaC5sb2dvdXQNCj4gLVJPT1Q9CWRvdC5sb2dpbg0KPiArUk9PVD0JZG90LmNz aHJjIGRvdC5sb2dpbg0KPiAgUk9PVERJUj0JL3Jvb3QNCj4gK1JPT1ROQU1FX2RvdC5jc2hyYz0J LmNzaHJjDQo+ICBST09UTkFNRV9kb3QubG9naW49CS5sb2dpbg0KPiAgUEFDS0FHRT1ydW50aW1l DQo+ICBUQ1NIRElSPSAke1NSQ1RPUH0vY29udHJpYi90Y3NoDQo+IEBAIC0xNTIsNSArMTUzLDEx IEBAIHRjLmNvbnN0Lmg6IHRjLmNvbnN0LmMgc2guY2hhci5oIGNvbmZpZy5oIGNvbmZpZ19mLmgg cw0KPiAgCSAgICBzZWQgLWUgJ3MvQ2hhciBcKFthLXpBLVowLTlfXSpcKVwoLipcKS9leHRlcm4g Q2hhciBcMVtdOy8nIHwgXA0KPiAgCSAgICBzb3J0ID4+ICR7LlRBUkdFVH0NCj4gIAlAZWNobyAn I2VuZGlmIC8qIF9oX3RjX2NvbnN0ICovJyA+PiAkey5UQVJHRVR9DQo+ICsNCj4gK2JlZm9yZWlu c3RhbGxjb25maWc6DQo+ICsJcm0gLWYgJHtERVNURElSfS8uY3NocmMNCj4gKw0KPiArYWZ0ZXJp bnN0YWxsY29uZmlnOg0KPiArCSR7SU5TVEFMTF9MSU5LfSAke1RBR19BUkdTfSAke0RFU1RESVJ9 L3Jvb3QvLmNzaHJjICR7REVTVERJUn0vLmNzaHJjDQo+ICANCj4gIC5pbmNsdWRlIDxic2QucHJv Zy5taz4NCj4gDQo+IENvcGllZDogaGVhZC9iaW4vY3NoL2RvdC5jc2hyYyAoZnJvbSByMzM4Mzcz LCBoZWFkL2V0Yy9yb290L2RvdC5jc2hyYykNCj4gPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQo+IC0t LSAvZGV2L251bGwJMDA6MDA6MDAgMTk3MAkoZW1wdHksIGJlY2F1c2UgZmlsZSBpcyBuZXdseSBh ZGRlZCkNCj4gKysrIGhlYWQvYmluL2NzaC9kb3QuY3NocmMJV2VkIEF1ZyAyOSAxNjo1OToxOSAy MDE4CShyMzM4Mzc0LCBjb3B5IG9mDQo+IHIzMzgzNzMsIGhlYWQvZXRjL3Jvb3QvZG90LmNzaHJj KSBAQCAtMCwwICsxLDQzIEBADQo+ICsjICRGcmVlQlNEJA0KPiArIw0KPiArIyAuY3NocmMgLSBj c2ggcmVzb3VyY2Ugc2NyaXB0LCByZWFkIGF0IGJlZ2lubmluZyBvZiBleGVjdXRpb24gYnkgZWFj aCBzaGVsbA0KPiArIw0KPiArIyBzZWUgYWxzbyBjc2goMSksIGVudmlyb24oNykuDQo+ICsjIG1v cmUgZXhhbXBsZXMgYXZhaWxhYmxlIGF0IC91c3Ivc2hhcmUvZXhhbXBsZXMvY3NoLw0KPiArIw0K PiArDQo+ICthbGlhcyBoCQloaXN0b3J5IDI1DQo+ICthbGlhcyBqCQlqb2JzIC1sDQo+ICthbGlh cyBsYQlscyAtYUYNCj4gK2FsaWFzIGxmCWxzIC1GQQ0KPiArYWxpYXMgbGwJbHMgLWxBRg0KPiAr DQo+ICsjIEEgcmlnaHRlb3VzIHVtYXNrDQo+ICt1bWFzayAyMg0KPiArDQo+ICtzZXQgcGF0aCA9 ICgvc2JpbiAvYmluIC91c3Ivc2JpbiAvdXNyL2JpbiAvdXNyL2xvY2FsL3NiaW4gL3Vzci9sb2Nh bC9iaW4gJEhPTUUvYmluKQ0KPiArDQo+ICtzZXRlbnYJRURJVE9SCXZpDQo+ICtzZXRlbnYJUEFH RVIJbGVzcw0KPiArc2V0ZW52CUJMT0NLU0laRQlLDQo+ICsNCj4gK2lmICgkP3Byb21wdCkgdGhl bg0KPiArCSMgQW4gaW50ZXJhY3RpdmUgc2hlbGwgLS0gc2V0IHNvbWUgc3R1ZmYgdXANCj4gKwlz ZXQgcHJvbXB0ID0gIiVOQCVtOiV+ICUjICINCj4gKwlzZXQgcHJvbXB0Y2hhcnMgPSAiJSMiDQo+ ICsNCj4gKwlzZXQgZmlsZWMNCj4gKwlzZXQgaGlzdG9yeSA9IDEwMDANCj4gKwlzZXQgc2F2ZWhp c3QgPSAoMTAwMCBtZXJnZSkNCj4gKwlzZXQgYXV0b2xpc3QgPSBhbWJpZ3VvdXMNCj4gKwkjIFVz ZSBoaXN0b3J5IHRvIGFpZCBleHBhbnNpb24NCj4gKwlzZXQgYXV0b2V4cGFuZA0KPiArCXNldCBh dXRvcmVoYXNoDQo+ICsJc2V0IG1haWwgPSAoL3Zhci9tYWlsLyRVU0VSKQ0KPiArCWlmICggJD90 Y3NoICkgdGhlbg0KPiArCQliaW5ka2V5ICJeVyIgYmFja3dhcmQtZGVsZXRlLXdvcmQNCj4gKwkJ YmluZGtleSAtayB1cCBoaXN0b3J5LXNlYXJjaC1iYWNrd2FyZA0KPiArCQliaW5ka2V5IC1rIGRv d24gaGlzdG9yeS1zZWFyY2gtZm9yd2FyZA0KPiArCWVuZGlmDQo+ICsNCj4gK2VuZGlmDQo+IA0K PiBNb2RpZmllZDogaGVhZC9iaW4vc2gvTWFrZWZpbGUNCj4gPT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 DQo+IC0tLSBoZWFkL2Jpbi9zaC9NYWtlZmlsZQlXZWQgQXVnIDI5IDE2OjIxOjM0IDIwMTgJKHIz MzgzNzMpDQo+ICsrKyBoZWFkL2Jpbi9zaC9NYWtlZmlsZQlXZWQgQXVnIDI5IDE2OjU5OjE5IDIw MTgJKHIzMzgzNzQpDQo+IEBAIC0zLDcgKzMsOSBAQA0KPiAgDQo+ICAuaW5jbHVkZSA8c3JjLm9w dHMubWs+DQo+ICANCj4gLUNPTkZTPQlwcm9maWxlDQo+ICtDT05GUz0JZG90LnByb2ZpbGUgcHJv ZmlsZQ0KPiArQ09ORlNESVJfZG90LnByb2ZpbGU9CS9yb290DQo+ICtDT05GU05BTUVfZG90LnBy b2ZpbGU9CS5wcm9maWxlDQo+ICBQQUNLQUdFPXJ1bnRpbWUNCj4gIFBST0c9CXNoDQo+ICBJTlNU QUxMRkxBR1M9IC1TDQo+IEBAIC02MCw1ICs2MiwxMSBAQCB0b2tlbi5oOiBta3Rva2Vucw0KPiAg DQo+ICBIQVNfVEVTVFM9DQo+ICBTVUJESVIuJHtNS19URVNUU30rPSB0ZXN0cw0KPiArDQo+ICti ZWZvcmVpbnN0YWxsY29uZmlnOg0KPiArCXJtIC1mICR7REVTVERJUn0vLnByb2ZpbGUNCj4gKw0K PiArYWZ0ZXJpbnN0YWxsY29uZmlnOg0KPiArCSR7SU5TVEFMTF9MSU5LfSAke1RBR19BUkdTfSAk e0RFU1RESVJ9L3Jvb3QvLnByb2ZpbGUgJHtERVNURElSfS8ucHJvZmlsZQ0KPiAgDQo+ICAuaW5j bHVkZSA8YnNkLnByb2cubWs+DQo+IA0KPiBDb3BpZWQ6IGhlYWQvYmluL3NoL2RvdC5wcm9maWxl IChmcm9tIHIzMzgzNzMsIGhlYWQvZXRjL3Jvb3QvZG90LnByb2ZpbGUpDQo+ID09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PQ0KPiAtLS0gL2Rldi9udWxsCTAwOjAwOjAwIDE5NzAJKGVtcHR5LCBiZWNhdXNl IGZpbGUgaXMgbmV3bHkgYWRkZWQpDQo+ICsrKyBoZWFkL2Jpbi9zaC9kb3QucHJvZmlsZQlXZWQg QXVnIDI5IDE2OjU5OjE5IDIwMTgJKHIzMzgzNzQsIGNvcHkgb2YNCj4gcjMzODM3MywgaGVhZC9l dGMvcm9vdC9kb3QucHJvZmlsZSkgQEAgLTAsMCArMSwxNiBAQA0KPiArIyAkRnJlZUJTRCQNCj4g KyMNCj4gK1BBVEg9L3NiaW46L2JpbjovdXNyL3NiaW46L3Vzci9iaW46L3Vzci9sb2NhbC9zYmlu Oi91c3IvbG9jYWwvYmluOn4vYmluDQo+ICtleHBvcnQgUEFUSA0KPiArSE9NRT0vcm9vdA0KPiAr ZXhwb3J0IEhPTUUNCj4gK1RFUk09JHtURVJNOi14dGVybX0NCj4gK2V4cG9ydCBURVJNDQo+ICtQ QUdFUj1sZXNzDQo+ICtleHBvcnQgUEFHRVINCj4gKw0KPiArIyBRdWVyeSB0ZXJtaW5hbCBzaXpl OyB1c2VmdWwgZm9yIHNlcmlhbCBsaW5lcy4NCj4gK2lmIFsgLXggL3Vzci9iaW4vcmVzaXpld2lu IF0gOyB0aGVuIC91c3IvYmluL3Jlc2l6ZXdpbiAteiA7IGZpDQo+ICsNCj4gKyMgVW5jb21tZW50 IHRvIGRpc3BsYXkgYSByYW5kb20gY29va2llIG9uIGVhY2ggbG9naW4uDQo+ICsjIGlmIFsgLXgg L3Vzci9iaW4vZm9ydHVuZSBdIDsgdGhlbiAvdXNyL2Jpbi9mb3J0dW5lIC1zIDsgZmkNCj4gDQo+ IE1vZGlmaWVkOiBoZWFkL2V0Yy9NYWtlZmlsZQ0KPiA9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCj4g LS0tIGhlYWQvZXRjL01ha2VmaWxlCVdlZCBBdWcgMjkgMTY6MjE6MzQgMjAxOAkocjMzODM3MykN Cj4gKysrIGhlYWQvZXRjL01ha2VmaWxlCVdlZCBBdWcgMjkgMTY6NTk6MTkgMjAxOAkocjMzODM3 NCkNCj4gQEAgLTE1NSwxOCArMTU1LDYgQEAgZGlzdHJpYnV0aW9uOg0KPiAgCSAgICAke0lOU1RB TEx9IC1vICR7QklOT1dOfSAtZyAke0JJTkdSUH0gLW0gNjQ0IFwNCj4gIAkJZG90Lms1bG9naW4g JHtERVNURElSfS9yb290Ly5rNWxvZ2luOw0KPiAgLmVuZGlmDQo+IC0JY2QgJHsuQ1VSRElSfS9y b290OyBcDQo+IC0JICAgICR7SU5TVEFMTH0gLW8gJHtCSU5PV059IC1nICR7QklOR1JQfSAtbSA2 NDQgXA0KPiAtCQlkb3QucHJvZmlsZSAke0RFU1RESVJ9L3Jvb3QvLnByb2ZpbGU7IFwNCj4gLQkg ICAgcm0gLWYgJHtERVNURElSfS8ucHJvZmlsZTsgXA0KPiAtCSAgICAke0lOU1RBTExfTElOS30g JHtERVNURElSfS9yb290Ly5wcm9maWxlICR7REVTVERJUn0vLnByb2ZpbGUNCj4gLS5pZiAke01L X1RDU0h9ICE9ICJubyINCj4gLQljZCAkey5DVVJESVJ9L3Jvb3Q7IFwNCj4gLQkgICAgJHtJTlNU QUxMfSAtbyAke0JJTk9XTn0gLWcgJHtCSU5HUlB9IC1tIDY0NCBcDQo+IC0JCWRvdC5jc2hyYyAk e0RFU1RESVJ9L3Jvb3QvLmNzaHJjOyBcDQo+IC0JICAgIHJtIC1mICR7REVTVERJUn0vLmNzaHJj OyBcDQo+IC0JICAgICR7SU5TVEFMTF9MSU5LfSAke0RFU1RESVJ9L3Jvb3QvLmNzaHJjICR7REVT VERJUn0vLmNzaHJjDQo+IC0uZW5kaWYNCj4gIA0KPiAgLmlmICR7TUtfTUFJTH0gIT0gIm5vIg0K PiAgCWNkICR7LkNVUkRJUn0vbWFpbDsgJHtJTlNUQUxMfSAtbyAke0JJTk9XTn0gLWcgJHtCSU5H UlB9IC1tIDY0NCBcDQo+IF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fDQo+IHN2bi1zcmMtaGVhZEBmcmVlYnNkLm9yZyBtYWlsaW5nIGxpc3QNCj4gaHR0cHM6 Ly9saXN0cy5mcmVlYnNkLm9yZy9tYWlsbWFuL2xpc3RpbmZvL3N2bi1zcmMtaGVhZA0KPiBUbyB1 bnN1YnNjcmliZSwgc2VuZCBhbnkgbWFpbCB0byAic3ZuLXNyYy1oZWFkLXVuc3Vic2NyaWJlQGZy ZWVic2Qub3JnIg0KDQpUaGlzIGNvbW1pdCBicmVha3MgIm1ha2UgcGFja2FnZSIsIGF0IGxlYXN0 IGZvciBtZSB3aXRoIGFuIG9ic2N1cmUgIkVycm9yIDcwIiBpbiB0aGUNCm1ha2UgcHJvY2Vzcy4N Cg0KLSAtLSANCk8uIEhhcnRtYW5uDQoNCkljaCB3aWRlcnNwcmVjaGUgZGVyIE51dHp1bmcgb2Rl ciDDnGJlcm1pdHRsdW5nIG1laW5lciBEYXRlbiBmw7xyDQpXZXJiZXp3ZWNrZSBvZGVyIGbDvHIg ZGllIE1hcmt0LSBvZGVyIE1laW51bmdzZm9yc2NodW5nICjCpyAyOCBBYnMuIDQgQkRTRykuDQot LS0tLUJFR0lOIFBHUCBTSUdOQVRVUkUtLS0tLQ0KDQppTFVFQVJNS0FCMFdJUVFaVlpNekF0d0My VC84NlRyUzUyOGZ5RmhZbEFVQ1c0Zlhnd0FLQ1JEUzUyOGZ5RmhZDQpsTEdjQWY5WU41SUtxUHVt aDJSL3d0Vm9ic2tCdzNTeVBrMUszK1RaRU5jYmc3T0tOZFQxdGUraFRnYzU2em10DQpOc1ZRSmhI cUFvajhwaitZMmQ4bUFQdVA2eHBMQWdDU0FhOE9nM29ZQm4zcHFiUFp3MnVkMC9yNzdrd2xBOWMw DQoyNGRORUJ5bWZMQzIxVWRtbWQvT0xDUzl0bGtHczdhM3ZtN0t4WURTSzVtZTUvMWtCMnJBDQo9 alNGZg0KLS0tLS1FTkQgUEdQIFNJR05BVFVSRS0tLS0tDQo= From owner-svn-src-head@freebsd.org Thu Aug 30 12:41:14 2018 Return-Path: Delivered-To: svn-src-head@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 EA570109D9F4; Thu, 30 Aug 2018 12:41:13 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A4F8D7E689; Thu, 30 Aug 2018 12:41:13 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 41E771D2D0; Thu, 30 Aug 2018 12:41:13 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f53.google.com with SMTP id z11-v6so7058636lff.9; Thu, 30 Aug 2018 05:41:13 -0700 (PDT) X-Gm-Message-State: APzg51Dil0SBMAHByb4Va2Fc49UaqnjJikmZ7l5qAOTjityzt7eWqN4y T/oK28rJus3W99rPLItR5EgQ3+XQJ9xIMuvYBWM= X-Google-Smtp-Source: ANB0Vdbj64dspHJGVyb8LKz7h9AbJ3eaqu7fhuQ/p6oJ7nKHChRWqdh6TzBuskrjQxU2GYaUPhzKKx/Ip9Hzc2iuBF8= X-Received: by 2002:a19:a715:: with SMTP id q21-v6mr1341089lfe.146.1535632871908; Thu, 30 Aug 2018 05:41:11 -0700 (PDT) MIME-Version: 1.0 References: <201808171619.w7HGJlZe015255@repo.freebsd.org> In-Reply-To: <201808171619.w7HGJlZe015255@repo.freebsd.org> From: Kyle Evans Date: Thu, 30 Aug 2018 07:40:59 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r337978 - in head/libexec/rtld-elf: . aarch64 arm mips powerpc powerpc64 riscv To: Brooks Davis Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 12:41:14 -0000 On Fri, Aug 17, 2018 at 11:20 AM Brooks Davis wrote: > > Author: brooks > Date: Fri Aug 17 16:19:47 2018 > New Revision: 337978 > URL: https://svnweb.freebsd.org/changeset/base/337978 > > Log: > Rework rtld's TLS Variant I implementation to match r326794 > > The above commit fixed handling overaligned TLS segments in libc's > TLS Variant I implementation, but rtld provides its own implementation > for dynamically-linked executables which lacks these fixes. Thus, > port these changes to rtld. > Hello! Any plan on re-introducing this during the freeze, now that mmel@ has fixed the armv7 bits as of r338317? Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Thu Aug 30 13:29:32 2018 Return-Path: Delivered-To: svn-src-head@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 DE336109E795; Thu, 30 Aug 2018 13:29:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 96DA2804A0; Thu, 30 Aug 2018 13:29:32 +0000 (UTC) (envelope-from kevans@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 75535512E; Thu, 30 Aug 2018 13:29:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7UDTW15042065; Thu, 30 Aug 2018 13:29:32 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7UDTWr8042064; Thu, 30 Aug 2018 13:29:32 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808301329.w7UDTWr8042064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 30 Aug 2018 13:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338394 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 338394 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 13:29:33 -0000 Author: kevans Date: Thu Aug 30 13:29:32 2018 New Revision: 338394 URL: https://svnweb.freebsd.org/changeset/base/338394 Log: lualoader: fix color usage Resetting to the default color scheme was done prior to reading the config. This is bogus; colors may only be declined by the user with the loader.conf(5) variable "loader_color", so such a request for no color will not be completely honored as we reset to the default color scheme unconditionally. Approved by: re (rgrimes) Modified: head/stand/lua/loader.lua Modified: head/stand/lua/loader.lua ============================================================================== --- head/stand/lua/loader.lua Thu Aug 30 01:38:32 2018 (r338393) +++ head/stand/lua/loader.lua Thu Aug 30 13:29:32 2018 (r338394) @@ -42,15 +42,14 @@ local password = require("password") -- need it. local menu +try_include("local") + +config.load() -- Our console may have been setup for a different color scheme before we get -- here, so make sure we set the default. if color.isEnabled() then printc(color.default()) end - -try_include("local") - -config.load() if not core.isMenuSkipped() then menu = require("menu") end From owner-svn-src-head@freebsd.org Thu Aug 30 13:42:02 2018 Return-Path: Delivered-To: svn-src-head@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 45687109EEA2; Thu, 30 Aug 2018 13:42:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0BD0810FA; Thu, 30 Aug 2018 13:42:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2B0C5433; Thu, 30 Aug 2018 13:42:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7UDg1ee053580; Thu, 30 Aug 2018 13:42:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7UDg1IT053579; Thu, 30 Aug 2018 13:42:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808301342.w7UDg1IT053579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 30 Aug 2018 13:42:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338395 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 338395 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 13:42:02 -0000 Author: markj Date: Thu Aug 30 13:42:01 2018 New Revision: 338395 URL: https://svnweb.freebsd.org/changeset/base/338395 Log: Re-add kstat.zfs.misc.arcstats.other_size under COMPAT_FREEBSD11. It is used by a number of applications, notably top(1). Reported by: netchild Reviewed by: allanjude Approved by: re (delphij) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16943 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Aug 30 13:29:32 2018 (r338394) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Aug 30 13:42:01 2018 (r338395) @@ -661,7 +661,13 @@ typedef struct arc_stats { * Number of bytes consumed by bonus buffers. */ kstat_named_t arcstat_bonus_size; +#if defined(__FreeBSD__) && defined(COMPAT_FREEBSD11) /* + * Sum of the previous three counters, provided for compatibility. + */ + kstat_named_t arcstat_other_size; +#endif + /* * Total number of bytes consumed by ARC buffers residing in the * arc_anon state. This includes *all* buffers in the arc_anon * state; e.g. data, metadata, evictable, and unevictable buffers @@ -875,6 +881,9 @@ static arc_stats_t arc_stats = { { "dbuf_size", KSTAT_DATA_UINT64 }, { "dnode_size", KSTAT_DATA_UINT64 }, { "bonus_size", KSTAT_DATA_UINT64 }, +#if defined(__FreeBSD__) && defined(COMPAT_FREEBSD11) + { "other_size", KSTAT_DATA_UINT64 }, +#endif { "anon_size", KSTAT_DATA_UINT64 }, { "anon_evictable_data", KSTAT_DATA_UINT64 }, { "anon_evictable_metadata", KSTAT_DATA_UINT64 }, @@ -6825,6 +6834,11 @@ arc_kstat_update(kstat_t *ksp, int rw) ARCSTAT(arcstat_bonus_size) = aggsum_value(&astat_bonus_size); ARCSTAT(arcstat_dnode_size) = aggsum_value(&astat_dnode_size); ARCSTAT(arcstat_dbuf_size) = aggsum_value(&astat_dbuf_size); +#if defined(__FreeBSD__) && defined(COMPAT_FREEBSD11) + ARCSTAT(arcstat_other_size) = aggsum_value(&astat_bonus_size) + + aggsum_value(&astat_dnode_size) + + aggsum_value(&astat_dbuf_size); +#endif ARCSTAT(arcstat_l2_hdr_size) = aggsum_value(&astat_l2_hdr_size); } From owner-svn-src-head@freebsd.org Thu Aug 30 14:32:11 2018 Return-Path: Delivered-To: svn-src-head@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 F099010A031C; Thu, 30 Aug 2018 14:32:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5D1B8388B; Thu, 30 Aug 2018 14:32:10 +0000 (UTC) (envelope-from manu@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 87E555CE7; Thu, 30 Aug 2018 14:32:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7UEWAcw080567; Thu, 30 Aug 2018 14:32:10 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7UEWAHe080566; Thu, 30 Aug 2018 14:32:10 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201808301432.w7UEWAHe080566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 30 Aug 2018 14:32:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338397 - head/sys/modules/dtb/omap4 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/modules/dtb/omap4 X-SVN-Commit-Revision: 338397 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 14:32:11 -0000 Author: manu Date: Thu Aug 30 14:32:10 2018 New Revision: 338397 URL: https://svnweb.freebsd.org/changeset/base/338397 Log: dtb: Add LINKS for omap4 DTBs We do not use the upstream name so add links so u-boot can load the dtb for us. Approved by: re (rgrimes) Modified: head/sys/modules/dtb/omap4/Makefile Modified: head/sys/modules/dtb/omap4/Makefile ============================================================================== --- head/sys/modules/dtb/omap4/Makefile Thu Aug 30 13:45:14 2018 (r338396) +++ head/sys/modules/dtb/omap4/Makefile Thu Aug 30 14:32:10 2018 (r338397) @@ -5,4 +5,8 @@ DTS= \ pandaboard.dts \ pandaboard-es.dts +LINKS= \ + ${DTBDIR}/pandaboard.dtb ${DTBDIR}/omap4-panda.dtb \ + ${DTBDIR}/pandaboard-es.dtb ${DTBDIR}/omap4-panda-es.dtb + .include From owner-svn-src-head@freebsd.org Thu Aug 30 14:32:48 2018 Return-Path: Delivered-To: svn-src-head@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 C67C010A0394; Thu, 30 Aug 2018 14:32:48 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B50283A05; Thu, 30 Aug 2018 14:32:48 +0000 (UTC) (envelope-from manu@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 443665D0F; Thu, 30 Aug 2018 14:32:48 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7UEWmjK080639; Thu, 30 Aug 2018 14:32:48 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7UEWmgA080638; Thu, 30 Aug 2018 14:32:48 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201808301432.w7UEWmgA080638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 30 Aug 2018 14:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338398 - head/sys/arm/ti/omap4 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/ti/omap4 X-SVN-Commit-Revision: 338398 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 14:32:49 -0000 Author: manu Date: Thu Aug 30 14:32:47 2018 New Revision: 338398 URL: https://svnweb.freebsd.org/changeset/base/338398 Log: omap4_prcm: Delay the frequencies read check Same as r333305, with Linux 4.17 dts the compatible for the prcm added 'simplebus', it mean that the simplebus driver will attach to it at the BUS_PASS_BUS pass. Change the pass for the prcm driver to be at BUS_PASS_BUS so we will win the attach. This introduce a problem as this driver needs the omap_scm one to be already attached. omap_scm also attach at BUS_PASS_BUS but after the prcm one as it is after in the dtb and the simplebus driver simpy walk the tree to attach it's children. Use the bus_new_pass method to defer the frequencies read at BUS_PASS_TIMER. This fixes booting on pandaboard Approved by: re (rgrimes) Modified: head/sys/arm/ti/omap4/omap4_prcm_clks.c Modified: head/sys/arm/ti/omap4/omap4_prcm_clks.c ============================================================================== --- head/sys/arm/ti/omap4/omap4_prcm_clks.c Thu Aug 30 14:32:10 2018 (r338397) +++ head/sys/arm/ti/omap4/omap4_prcm_clks.c Thu Aug 30 14:32:47 2018 (r338398) @@ -176,6 +176,7 @@ struct omap4_prcm_softc { struct resource *sc_res; int sc_rid; int sc_instance; + int attach_done; }; static int omap4_clk_generic_activate(struct ti_clock_dev *clkdev); @@ -1446,10 +1447,8 @@ static int omap4_prcm_attach(device_t dev) { struct omap4_prcm_softc *sc; - unsigned int freq; const struct ofw_compat_data *ocd; - sc = device_get_softc(dev); ocd = ofw_bus_search_compatible(dev, compat_data); sc->sc_instance = (int)ocd->ocd_data; @@ -1463,6 +1462,22 @@ omap4_prcm_attach(device_t dev) ti_cpu_reset = omap4_prcm_reset; + return (0); +} + +static void +omap4_prcm_new_pass(device_t dev) +{ + struct omap4_prcm_softc *sc = device_get_softc(dev); + unsigned int freq; + + if (sc->attach_done || + bus_current_pass < (BUS_PASS_TIMER + BUS_PASS_ORDER_EARLY)) { + bus_generic_new_pass(dev); + return; + } + sc->attach_done = 1; + /* * In order to determine ARM frequency we need both RPM and CM1 * instances up and running. So wait until all CRM devices are @@ -1473,12 +1488,16 @@ omap4_prcm_attach(device_t dev) arm_tmr_change_frequency(freq / 2); } - return (0); + return; } static device_method_t omap4_prcm_methods[] = { DEVMETHOD(device_probe, omap4_prcm_probe), DEVMETHOD(device_attach, omap4_prcm_attach), + + /* Bus interface */ + DEVMETHOD(bus_new_pass, omap4_prcm_new_pass), + {0, 0}, }; @@ -1491,5 +1510,5 @@ static driver_t omap4_prcm_driver = { static devclass_t omap4_prcm_devclass; EARLY_DRIVER_MODULE(omap4_prcm, simplebus, omap4_prcm_driver, - omap4_prcm_devclass, 0, 0, BUS_PASS_TIMER + BUS_PASS_ORDER_EARLY); + omap4_prcm_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); MODULE_VERSION(omap4_prcm, 1); From owner-svn-src-head@freebsd.org Thu Aug 30 15:23:47 2018 Return-Path: Delivered-To: svn-src-head@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 20ECD10A1774; Thu, 30 Aug 2018 15:23:47 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDA1D85CCE; Thu, 30 Aug 2018 15:23:46 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id D05AE398ED7; Thu, 30 Aug 2018 15:23:44 +0000 (UTC) Date: Thu, 30 Aug 2018 15:23:44 +0000 From: Brooks Davis To: Kyle Evans Cc: Brooks Davis , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r337978 - in head/libexec/rtld-elf: . aarch64 arm mips powerpc powerpc64 riscv Message-ID: <20180830152344.GA21890@spindle.one-eyed-alien.net> References: <201808171619.w7HGJlZe015255@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sdtB3X0nJg68CQEu" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 15:23:47 -0000 --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 30, 2018 at 07:40:59AM -0500, Kyle Evans wrote: > On Fri, Aug 17, 2018 at 11:20 AM Brooks Davis wrote: > > > > Author: brooks > > Date: Fri Aug 17 16:19:47 2018 > > New Revision: 337978 > > URL: https://svnweb.freebsd.org/changeset/base/337978 > > > > Log: > > Rework rtld's TLS Variant I implementation to match r326794 > > > > The above commit fixed handling overaligned TLS segments in libc's > > TLS Variant I implementation, but rtld provides its own implementation > > for dynamically-linked executables which lacks these fixes. Thus, > > port these changes to rtld. > > >=20 > Hello! >=20 > Any plan on re-introducing this during the freeze, now that mmel@ has > fixed the armv7 bits as of r338317? It's on my list. I'll craft a commit request. -- Brooks --sdtB3X0nJg68CQEu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJbiAwAAAoJEKzQXbSebgfACzIH/37QsJ7snuw8Q23kHT35B3OY 6Itya0TYJc3kCLeXmDB20A54ARmTYSjk5YuzgK+N8Ex30DPP3ubxggqB+y75cvM1 VCvSODPYpDMbDs55UYDskNzkKkQkunJKU80k0euL1OXTGCs5rXozn9lqzHzo2kDY 9MKz7YMJHJBhYSJmj5Cqmgnlpt6RMR0VSWuDqOxvphktIvDmu9RgPQ6dKg6gxLJp An+gomwNZM0lPiFsCR+mP8qomfPYRqgE1IPwALP9zMhTqcn5u7YlnjQdNSF24Uc8 sXOjfco64ZC1qNYSvGpQQhtabQ8592+5Cn1E9KckKwWf3/qqiRy8xg4USvCnR0g= =rFU5 -----END PGP SIGNATURE----- --sdtB3X0nJg68CQEu-- From owner-svn-src-head@freebsd.org Thu Aug 30 15:38:09 2018 Return-Path: Delivered-To: svn-src-head@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 C322A10A1B16; Thu, 30 Aug 2018 15:38:09 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E1D98632E; Thu, 30 Aug 2018 15:38:09 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: brd/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 431351E503; Thu, 30 Aug 2018 15:38:09 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 829DB21F21; Thu, 30 Aug 2018 11:38:08 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute5.internal (MEProxy); Thu, 30 Aug 2018 11:38:08 -0400 X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id ABBCC4135; Thu, 30 Aug 2018 11:38:07 -0400 (EDT) Message-Id: <1535643487.1731188.1491479248.1AC042E6@webmail.messagingengine.com> From: Brad Davis To: "O. Hartmann" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-7b72137a Subject: Re: svn commit: r338374 - in head: bin/csh bin/sh etc etc/root In-Reply-To: <20180830133947.5e68bea3@thor.intern.walstatt.dynvpn.de> Date: Thu, 30 Aug 2018 09:38:07 -0600 References: <201808291659.w7TGxJqF096282@repo.freebsd.org> <20180830133947.5e68bea3@thor.intern.walstatt.dynvpn.de> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 15:38:10 -0000 On Thu, Aug 30, 2018, at 5:39 AM, O. Hartmann wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Am Wed, 29 Aug 2018 16:59:19 +0000 (UTC) > Brad Davis schrieb: > > > Author: brd > > Date: Wed Aug 29 16:59:19 2018 > > New Revision: 338374 > > URL: https://svnweb.freebsd.org/changeset/base/338374 > > > > Log: > > Finish moving dot.cshrc and dot.profile to bin/csh/ and bin/sh/. > > > > Approved by: re (gjb), will (mentor) > > Differential Revision: https://reviews.freebsd.org/D16770 > > > > Added: > > head/bin/csh/dot.cshrc > > - copied unchanged from r338373, head/etc/root/dot.cshrc > > head/bin/sh/dot.profile > > - copied unchanged from r338373, head/etc/root/dot.profile > > Deleted: > > head/etc/root/dot.cshrc > > head/etc/root/dot.profile > > Modified: > > head/bin/csh/Makefile > > head/bin/sh/Makefile > > head/etc/Makefile > > > > Modified: head/bin/csh/Makefile > > ============================================================================== > > --- head/bin/csh/Makefile Wed Aug 29 16:21:34 2018 (r338373) > > +++ head/bin/csh/Makefile Wed Aug 29 16:59:19 2018 (r338374) > > @@ -10,8 +10,9 @@ > > > > CONFGROUPS= ETC ROOT > > ETC= csh.cshrc csh.login csh.logout > > -ROOT= dot.login > > +ROOT= dot.cshrc dot.login > > ROOTDIR= /root > > +ROOTNAME_dot.cshrc= .cshrc > > ROOTNAME_dot.login= .login > > PACKAGE=runtime > > TCSHDIR= ${SRCTOP}/contrib/tcsh > > @@ -152,5 +153,11 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h s > > sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ > > sort >> ${.TARGET} > > @echo '#endif /* _h_tc_const */' >> ${.TARGET} > > + > > +beforeinstallconfig: > > + rm -f ${DESTDIR}/.cshrc > > + > > +afterinstallconfig: > > + ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc > > > > .include > > > > Copied: head/bin/csh/dot.cshrc (from r338373, head/etc/root/dot.cshrc) > > ============================================================================== > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/bin/csh/dot.cshrc Wed Aug 29 16:59:19 2018 (r338374, copy of > > r338373, head/etc/root/dot.cshrc) @@ -0,0 +1,43 @@ > > +# $FreeBSD$ > > +# > > +# .cshrc - csh resource script, read at beginning of execution by each shell > > +# > > +# see also csh(1), environ(7). > > +# more examples available at /usr/share/examples/csh/ > > +# > > + > > +alias h history 25 > > +alias j jobs -l > > +alias la ls -aF > > +alias lf ls -FA > > +alias ll ls -lAF > > + > > +# A righteous umask > > +umask 22 > > + > > +set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin) > > + > > +setenv EDITOR vi > > +setenv PAGER less > > +setenv BLOCKSIZE K > > + > > +if ($?prompt) then > > + # An interactive shell -- set some stuff up > > + set prompt = "%N@%m:%~ %# " > > + set promptchars = "%#" > > + > > + set filec > > + set history = 1000 > > + set savehist = (1000 merge) > > + set autolist = ambiguous > > + # Use history to aid expansion > > + set autoexpand > > + set autorehash > > + set mail = (/var/mail/$USER) > > + if ( $?tcsh ) then > > + bindkey "^W" backward-delete-word > > + bindkey -k up history-search-backward > > + bindkey -k down history-search-forward > > + endif > > + > > +endif > > > > Modified: head/bin/sh/Makefile > > ============================================================================== > > --- head/bin/sh/Makefile Wed Aug 29 16:21:34 2018 (r338373) > > +++ head/bin/sh/Makefile Wed Aug 29 16:59:19 2018 (r338374) > > @@ -3,7 +3,9 @@ > > > > .include > > > > -CONFS= profile > > +CONFS= dot.profile profile > > +CONFSDIR_dot.profile= /root > > +CONFSNAME_dot.profile= .profile > > PACKAGE=runtime > > PROG= sh > > INSTALLFLAGS= -S > > @@ -60,5 +62,11 @@ token.h: mktokens > > > > HAS_TESTS= > > SUBDIR.${MK_TESTS}+= tests > > + > > +beforeinstallconfig: > > + rm -f ${DESTDIR}/.profile > > + > > +afterinstallconfig: > > + ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile > > > > .include > > > > Copied: head/bin/sh/dot.profile (from r338373, head/etc/root/dot.profile) > > ============================================================================== > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/bin/sh/dot.profile Wed Aug 29 16:59:19 2018 (r338374, copy of > > r338373, head/etc/root/dot.profile) @@ -0,0 +1,16 @@ > > +# $FreeBSD$ > > +# > > +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin > > +export PATH > > +HOME=/root > > +export HOME > > +TERM=${TERM:-xterm} > > +export TERM > > +PAGER=less > > +export PAGER > > + > > +# Query terminal size; useful for serial lines. > > +if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi > > + > > +# Uncomment to display a random cookie on each login. > > +# if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune -s ; fi > > > > Modified: head/etc/Makefile > > ============================================================================== > > --- head/etc/Makefile Wed Aug 29 16:21:34 2018 (r338373) > > +++ head/etc/Makefile Wed Aug 29 16:59:19 2018 (r338374) > > @@ -155,18 +155,6 @@ distribution: > > ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ > > dot.k5login ${DESTDIR}/root/.k5login; > > .endif > > - cd ${.CURDIR}/root; \ > > - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ > > - dot.profile ${DESTDIR}/root/.profile; \ > > - rm -f ${DESTDIR}/.profile; \ > > - ${INSTALL_LINK} ${DESTDIR}/root/.profile ${DESTDIR}/.profile > > -.if ${MK_TCSH} != "no" > > - cd ${.CURDIR}/root; \ > > - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ > > - dot.cshrc ${DESTDIR}/root/.cshrc; \ > > - rm -f ${DESTDIR}/.cshrc; \ > > - ${INSTALL_LINK} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc > > -.endif > > > > .if ${MK_MAIL} != "no" > > cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ > > _______________________________________________ > > svn-src-head@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > > This commit breaks "make package", at least for me with an obscure > "Error 70" in the > make process. Thanks for the report. The error is above that: 09:15:27 pkg: Plist error, @config /root/.cshrc: not a regular file 09:15:27 pkg: Plist error, @config /root/.profile: not a regular file Which is interesting.. I will think about how to solve this. Regards, Brad Davis From owner-svn-src-head@freebsd.org Thu Aug 30 15:52:05 2018 Return-Path: Delivered-To: svn-src-head@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 4D41910A220D; Thu, 30 Aug 2018 15:52:05 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F192186E87; Thu, 30 Aug 2018 15:52:04 +0000 (UTC) (envelope-from brd@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 CDE226A1A; Thu, 30 Aug 2018 15:52:04 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7UFq4ak023046; Thu, 30 Aug 2018 15:52:04 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7UFq3su023041; Thu, 30 Aug 2018 15:52:03 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201808301552.w7UFq3su023041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Thu, 30 Aug 2018 15:52:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338399 - in head: etc usr.bin/login X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc usr.bin/login X-SVN-Commit-Revision: 338399 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 15:52:05 -0000 Author: brd Date: Thu Aug 30 15:52:03 2018 New Revision: 338399 URL: https://svnweb.freebsd.org/changeset/base/338399 Log: Move fbtab, login.conf, and motd to usr.bin/login/ Approved by: Approved by: re (gjb), bapt (mentor), will (mentor) Differential Revision: https://reviews.freebsd.org/D16947 Added: head/usr.bin/login/fbtab - copied unchanged from r338398, head/etc/fbtab head/usr.bin/login/login.conf - copied unchanged from r338398, head/etc/login.conf head/usr.bin/login/motd - copied unchanged from r338398, head/etc/motd Deleted: head/etc/fbtab head/etc/login.conf head/etc/motd Modified: head/etc/Makefile head/usr.bin/login/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Aug 30 14:32:47 2018 (r338398) +++ head/etc/Makefile Thu Aug 30 15:52:03 2018 (r338399) @@ -15,7 +15,6 @@ SUBDIR+=sendmail BIN1= crontab \ dhclient.conf \ disktab \ - fbtab \ gettytab \ group \ hosts \ @@ -24,9 +23,7 @@ BIN1= crontab \ libalias.conf \ libmap.conf \ login.access \ - login.conf \ mac.conf \ - motd \ netconfig \ networks \ nsswitch.conf \ @@ -117,7 +114,6 @@ distribution: cd ${.CURDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${BIN1} ${DESTDIR}/etc; \ - cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; @@ -127,7 +123,6 @@ distribution: pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd .if defined(NO_ROOT) ( \ - echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel"; \ 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"; \ Modified: head/usr.bin/login/Makefile ============================================================================== --- head/usr.bin/login/Makefile Thu Aug 30 14:32:47 2018 (r338398) +++ head/usr.bin/login/Makefile Thu Aug 30 15:52:03 2018 (r338399) @@ -3,6 +3,7 @@ .include +CONFS= fbtab login.conf motd PROG= login SRCS= login.c login_fbtab.c CFLAGS+=-DLOGALL @@ -20,6 +21,14 @@ LIBADD+= bsm BINOWN= root BINMODE=4555 PRECIOUSPROG= +.endif + +.include +afterinstallconfig: + cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf +.if defined(NO_ROOT) && defined(METALOG) + echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel" | \ + cat -l >> ${METALOG} .endif .include Copied: head/usr.bin/login/fbtab (from r338398, head/etc/fbtab) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/login/fbtab Thu Aug 30 15:52:03 2018 (r338399, copy of r338398, head/etc/fbtab) @@ -0,0 +1,4 @@ +# $FreeBSD$ +# +#/dev/ttyv0 0600 /dev/console +#/dev/ttyv0 0600 /dev/pcaudio:/dev/pcaudioctl Copied: head/usr.bin/login/login.conf (from r338398, head/etc/login.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/login/login.conf Thu Aug 30 15:52:03 2018 (r338399, copy of r338398, head/etc/login.conf) @@ -0,0 +1,322 @@ +# login.conf - login class capabilities database. +# +# Remember to rebuild the database after each change to this file: +# +# cap_mkdb /etc/login.conf +# +# This file controls resource limits, accounting limits and +# default user environment settings. +# +# $FreeBSD$ +# + +# Default settings effectively disable resource limits, see the +# examples below for a starting point to enable them. + +# defaults +# These settings are used by login(1) by default for classless users +# Note that entries like "cputime" set both "cputime-cur" and "cputime-max" +# +# Note that since a colon ':' is used to separate capability entries, +# a \c escape sequence must be used to embed a literal colon in the +# value or name of a capability (see the ``CGETNUM AND CGETSTR SYNTAX +# AND SEMANTICS'' section of getcap(3) for more escape sequences). + +default:\ + :passwd_format=sha512:\ + :copyright=/etc/COPYRIGHT:\ + :welcome=/etc/motd:\ + :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ + :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\ + :nologin=/var/run/nologin:\ + :cputime=unlimited:\ + :datasize=unlimited:\ + :stacksize=unlimited:\ + :memorylocked=64K:\ + :memoryuse=unlimited:\ + :filesize=unlimited:\ + :coredumpsize=unlimited:\ + :openfiles=unlimited:\ + :maxproc=unlimited:\ + :sbsize=unlimited:\ + :vmemoryuse=unlimited:\ + :swapuse=unlimited:\ + :pseudoterminals=unlimited:\ + :kqueues=unlimited:\ + :umtxp=unlimited:\ + :priority=0:\ + :ignoretime@:\ + :umask=022: + + +# +# A collection of common class names - forward them all to 'default' +# (login would normally do this anyway, but having a class name +# here suppresses the diagnostic) +# +standard:\ + :tc=default: +xuser:\ + :tc=default: +staff:\ + :tc=default: +daemon:\ + :memorylocked=128M:\ + :tc=default: +news:\ + :tc=default: +dialer:\ + :tc=default: + +# +# Root can always login +# +# N.B. login_getpwclass(3) will use this entry for the root account, +# in preference to 'default'. +root:\ + :ignorenologin:\ + :memorylocked=unlimited:\ + :tc=default: + +# +# Russian Users Accounts. Setup proper environment variables. +# +russian|Russian Users Accounts:\ + :charset=UTF-8:\ + :lang=ru_RU.UTF-8:\ + :tc=default: + + +###################################################################### +###################################################################### +## +## Example entries +## +###################################################################### +###################################################################### + +## Example defaults +## These settings are used by login(1) by default for classless users +## Note that entries like "cputime" set both "cputime-cur" and "cputime-max" +# +#default:\ +# :cputime=infinity:\ +# :datasize-cur=22M:\ +# :stacksize-cur=8M:\ +# :memorylocked-cur=10M:\ +# :memoryuse-cur=30M:\ +# :filesize=infinity:\ +# :coredumpsize=infinity:\ +# :maxproc-cur=64:\ +# :openfiles-cur=64:\ +# :priority=0:\ +# :requirehome@:\ +# :umask=022:\ +# :tc=auth-defaults: +# +# +## +## standard - standard user defaults +## +#standard:\ +# :copyright=/etc/COPYRIGHT:\ +# :welcome=/etc/motd:\ +# :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ +# :path=~/bin /bin /usr/bin /usr/local/bin:\ +# :manpath=/usr/share/man /usr/local/man:\ +# :nologin=/var/run/nologin:\ +# :cputime=1h30m:\ +# :datasize=8M:\ +# :vmemoryuse=100M:\ +# :stacksize=2M:\ +# :memorylocked=4M:\ +# :memoryuse=8M:\ +# :filesize=8M:\ +# :coredumpsize=8M:\ +# :openfiles=24:\ +# :maxproc=32:\ +# :priority=0:\ +# :requirehome:\ +# :passwordtime=90d:\ +# :umask=002:\ +# :ignoretime@:\ +# :tc=default: +# +# +## +## users of X (needs more resources!) +## +#xuser:\ +# :manpath=/usr/share/man /usr/local/man:\ +# :cputime=4h:\ +# :datasize=12M:\ +# :vmemoryuse=infinity:\ +# :stacksize=4M:\ +# :filesize=8M:\ +# :memoryuse=16M:\ +# :openfiles=32:\ +# :maxproc=48:\ +# :tc=standard: +# +# +## +## Staff users - few restrictions and allow login anytime +## +#staff:\ +# :ignorenologin:\ +# :ignoretime:\ +# :requirehome@:\ +# :accounted@:\ +# :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\ +# :umask=022:\ +# :tc=standard: +# +# +## +## root - fallback for root logins +## +#root:\ +# :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\ +# :cputime=infinity:\ +# :datasize=infinity:\ +# :stacksize=infinity:\ +# :memorylocked=infinity:\ +# :memoryuse=infinity:\ +# :filesize=infinity:\ +# :coredumpsize=infinity:\ +# :openfiles=infinity:\ +# :maxproc=infinity:\ +# :memoryuse-cur=32M:\ +# :maxproc-cur=64:\ +# :openfiles-cur=1024:\ +# :priority=0:\ +# :requirehome@:\ +# :umask=022:\ +# :tc=auth-root-defaults: +# +# +## +## Settings used by /etc/rc +## +#daemon:\ +# :coredumpsize@:\ +# :coredumpsize-cur=0:\ +# :datasize=infinity:\ +# :datasize-cur@:\ +# :maxproc=512:\ +# :maxproc-cur@:\ +# :memoryuse-cur=64M:\ +# :memorylocked-cur=64M:\ +# :openfiles=1024:\ +# :openfiles-cur@:\ +# :stacksize=16M:\ +# :stacksize-cur@:\ +# :tc=default: +# +# +## +## Settings used by news subsystem +## +#news:\ +# :path=/usr/local/news/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\ +# :cputime=infinity:\ +# :filesize=128M:\ +# :datasize-cur=64M:\ +# :stacksize-cur=32M:\ +# :coredumpsize-cur=0:\ +# :maxmemorysize-cur=128M:\ +# :memorylocked=32M:\ +# :maxproc=128:\ +# :openfiles=256:\ +# :tc=default: +# +# +## +## The dialer class should be used for a dialup PPP account +## Welcome messages/news suppressed +## +#dialer:\ +# :hushlogin:\ +# :requirehome@:\ +# :cputime=unlimited:\ +# :filesize=2M:\ +# :datasize=2M:\ +# :stacksize=4M:\ +# :coredumpsize=0:\ +# :memoryuse=4M:\ +# :memorylocked=1M:\ +# :maxproc=16:\ +# :openfiles=32:\ +# :tc=standard: +# +# +## +## Site full-time 24/7 PPP connection +## - no time accounting, restricted to access via dialin lines +## +#site:\ +# :ignoretime:\ +# :passwordtime@:\ +# :refreshtime@:\ +# :refreshperiod@:\ +# :sessionlimit@:\ +# :autodelete@:\ +# :expireperiod@:\ +# :graceexpire@:\ +# :gracetime@:\ +# :warnexpire@:\ +# :warnpassword@:\ +# :idletime@:\ +# :sessiontime@:\ +# :daytime@:\ +# :weektime@:\ +# :monthtime@:\ +# :warntime@:\ +# :accounted@:\ +# :tc=dialer:\ +# :tc=staff: +# +# +## +## Example standard accounting entries for subscriber levels +## +# +#subscriber|Subscribers:\ +# :accounted:\ +# :refreshtime=180d:\ +# :refreshperiod@:\ +# :sessionlimit@:\ +# :autodelete=30d:\ +# :expireperiod=180d:\ +# :graceexpire=7d:\ +# :gracetime=10m:\ +# :warnexpire=7d:\ +# :warnpassword=7d:\ +# :idletime=30m:\ +# :sessiontime=4h:\ +# :daytime=6h:\ +# :weektime=40h:\ +# :monthtime=120h:\ +# :warntime=4h:\ +# :tc=standard: +# +# +## +## Subscriber accounts. These accounts have their login times +## accounted and have access limits applied. +## +#subppp|PPP Subscriber Accounts:\ +# :tc=dialer:\ +# :tc=subscriber: +# +# +#subshell|Shell Subscriber Accounts:\ +# :tc=subscriber: +# +## +## If you want some of the accounts to use traditional UNIX DES based +## password hashes. +## +#des_users:\ +# :passwd_format=des:\ +# :tc=default: Copied: head/usr.bin/login/motd (from r338398, head/etc/motd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/login/motd Thu Aug 30 15:52:03 2018 (r338399, copy of r338398, head/etc/motd) @@ -0,0 +1,21 @@ +FreeBSD ?.?.? (UNKNOWN) + +Welcome to FreeBSD! + +Release Notes, Errata: https://www.FreeBSD.org/releases/ +Security Advisories: https://www.FreeBSD.org/security/ +FreeBSD Handbook: https://www.FreeBSD.org/handbook/ +FreeBSD FAQ: https://www.FreeBSD.org/faq/ +Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ +FreeBSD Forums: https://forums.FreeBSD.org/ + +Documents installed with the system are in the /usr/local/share/doc/freebsd/ +directory, or can be installed later with: pkg install en-freebsd-doc +For other languages, replace "en" with a language code like de or fr. + +Show the version of FreeBSD installed: freebsd-version ; uname -a +Please include that output and any error messages when posting questions. +Introduction to manual pages: man man +FreeBSD directory layout: man hier + +Edit /etc/motd to change this login announcement. From owner-svn-src-head@freebsd.org Thu Aug 30 18:00:29 2018 Return-Path: Delivered-To: svn-src-head@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 062C0EA8AD5; Thu, 30 Aug 2018 18:00:29 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B4D0D8CA09; Thu, 30 Aug 2018 18:00:28 +0000 (UTC) (envelope-from kevans@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 95A777DC7; Thu, 30 Aug 2018 18:00:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7UI0Smt086997; Thu, 30 Aug 2018 18:00:28 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7UI0ShY086996; Thu, 30 Aug 2018 18:00:28 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808301800.w7UI0ShY086996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 30 Aug 2018 18:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338400 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 338400 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 18:00:29 -0000 Author: kevans Date: Thu Aug 30 18:00:28 2018 New Revision: 338400 URL: https://svnweb.freebsd.org/changeset/base/338400 Log: release.sh: disable colors and the beastie menu for ARM/ARM64 targets lualoader has moved to a model where the user is expected to disable color as desired, rather than disabling it automatically for serial boots, due to more wide-spread support for color sequences. In a similar vain, though also to reduce special cases, lualoader no longer disables the beastie menu automatically for !x86. This was done in Forth land with a different loader.rc that simply didn't invoke the menu routines, thus wasn't necessary. This set of changes puts release images back to how they would've been experienced prior to the switch to Lua. Approved by: re (rgrimes) Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Thu Aug 30 15:52:03 2018 (r338399) +++ head/release/tools/arm.subr Thu Aug 30 18:00:28 2018 (r338400) @@ -151,6 +151,15 @@ arm_setup_fdt_overlays() { >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf } +arm_setup_minimal_loader() { + echo '# Disable the beastie menu and color' \ + >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf + echo 'beastie_disable="YES"' \ + >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf + echo 'loader_color="NO"' \ + >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf +} + arm_install_base() { chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR} eval chroot ${CHROOTDIR} make -C ${WORLDDIR} \ @@ -164,6 +173,7 @@ arm_install_base() { arm_setup_usb_otg arm64_setup_multicons arm_setup_fdt_overlays + arm_setup_minimal_loader echo '# Custom /etc/fstab for FreeBSD embedded images' \ > ${CHROOTDIR}/${DESTDIR}/etc/fstab From owner-svn-src-head@freebsd.org Thu Aug 30 20:05:56 2018 Return-Path: Delivered-To: svn-src-head@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 0B8E6EF790E; Thu, 30 Aug 2018 20:05:56 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-yw1-f43.google.com (mail-yw1-f43.google.com [209.85.161.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A792970B6A; Thu, 30 Aug 2018 20:05:55 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-yw1-f43.google.com with SMTP id w202-v6so4233968yww.3; Thu, 30 Aug 2018 13:05:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x4ra/j2/TgDVebE7JOcjDJUxvo1MvPh+WKg37wXQzPc=; b=C1nF234xbRH6fmCfc4KX40gMX9Aa4ErUjHjsENxd/syY+4rqNRVmEvcal1iqGOYcmY 0TrfcElRkWArOwFLBZ6HpHr24J90MR3mTE/AVLi+I1q1xeOsVqNScfqoTFnHNF/crcJV 9V/nLq+vlJklfq3lZaib1vKizBngHx8Np9R+bUlRCLW3vdHzaWqCmMtmbygpYoBD+T7i WzXGI8eTymYzsuiPRxGpUIG88pNQ1sFL4Qd+tzoyX/RjwUO0Ric/CNwx4bstnvOqEQ9t qxJ7ftCLwx00uVmEAYmRDVD2mjLHI1fZJB/5bcRQ4Z5DchlHw7459i/BDuLLivuPVm+G Uktw== X-Gm-Message-State: APzg51Bfsfq3Y+XLlXvqP5LN8RNDVeuGRn/Cv1JgS2naGlXlSyInUhr8 2/0HIKF8+AYCrblDNPmTzk7qeu/sCxta/6cn X-Google-Smtp-Source: ANB0VdZx+YS7Sb0S+uioGJHr+Aj/ylaJUJIVegG31e8+KzFzQmIwDLuArXFOZwth9I02JvnFlwegqA== X-Received: by 2002:a81:7484:: with SMTP id p126-v6mr6869930ywc.287.1535659549546; Thu, 30 Aug 2018 13:05:49 -0700 (PDT) Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com. [209.85.219.181]) by smtp.gmail.com with ESMTPSA id i123-v6sm3820315ywe.14.2018.08.30.13.05.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 13:05:49 -0700 (PDT) Received: by mail-yb1-f181.google.com with SMTP id o17-v6so71699yba.2; Thu, 30 Aug 2018 13:05:49 -0700 (PDT) X-Received: by 2002:a25:9b82:: with SMTP id v2-v6mr6781768ybo.193.1535659548914; Thu, 30 Aug 2018 13:05:48 -0700 (PDT) MIME-Version: 1.0 References: <201808201039.w7KAdrMM079556@repo.freebsd.org> <201808291920.w7TJKhKs047018@slippy.cwsent.com> In-Reply-To: <201808291920.w7TJKhKs047018@slippy.cwsent.com> From: Alexander Richardson Date: Thu, 30 Aug 2018 21:05:37 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r338098 - in head: . tools/build To: Cy Schubert Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 20:05:56 -0000 On Wed, 29 Aug 2018 at 20:21 Cy Schubert wrote: > In message <201808201039.w7KAdrMM079556@repo.freebsd.org>, Alex > Richardson writ > es: > > Author: arichardson > > Date: Mon Aug 20 10:39:53 2018 > > New Revision: 338098 > > URL: https://svnweb.freebsd.org/changeset/base/338098 > > > > Log: > > Don't create directories in ${WORLDTMP}/legacy with mtree > > > > This has two advantages: > > 1) We no longer create lots of empty directories that are not needed > > 2) This is a requirement for building on non-FreeBSD hosts since mtree > will > > only exist after the bootstrap-tools phase there. > > > > Aproved By: jhb (mentor) > > Differential Revision: https://reviews.freebsd.org/D16773 > > > > Modified: > > head/Makefile.inc1 > > head/tools/build/Makefile > > > > Modified: head/Makefile.inc1 > > > ============================================================================= > > = > > --- head/Makefile.inc1 Mon Aug 20 10:39:48 2018 (r338097) > > +++ head/Makefile.inc1 Mon Aug 20 10:39:53 2018 (r338098) > > @@ -968,29 +968,10 @@ _worldtmp: .PHONY > > .endif # !defined(NO_CLEAN) > > @mkdir -p ${WORLDTMP} > > @touch ${WORLDTMP}/${.TARGET} > > - > > -.for _dir in \ > > - lib lib/casper lib/geom usr legacy/bin legacy/usr > > - mkdir -p ${WORLDTMP}/${_dir} > > -.endfor > > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ > > - -p ${WORLDTMP}/legacy/usr >/dev/null > > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ > > - -p ${WORLDTMP}/legacy/usr/include >/dev/null > > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ > > - -p ${WORLDTMP}/usr >/dev/null > > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ > > - -p ${WORLDTMP}/usr/include >/dev/null > > - ln -sf ${.CURDIR}/sys ${WORLDTMP} > > -.if ${MK_DEBUG_FILES} != "no" > > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ > > - -p ${WORLDTMP}/legacy/usr/lib >/dev/null > > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ > > - -p ${WORLDTMP}/usr/lib >/dev/null > > -.endif > > -.for _mtree in ${LOCAL_MTREE} > > - ${WORLDTMP_MTREE} -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > > /dev/null > > -.endfor > > +# We can't use mtree to create the worldtmp directories since it may > not be > > +# available on the target system (this happens e.g. when building on > non-Fre > > eBSD) > > + cd ${.CURDIR}/tools/build; \ > > + ${MAKE} DIRPRFX=tools/build/ DESTDIR=${WORLDTMP}/legacy > installdirs > > _legacy: > > @echo > > @echo > "--------------------------------------------------------------" > > @@ -1003,6 +984,19 @@ _bootstrap-tools: > > @echo ">>> stage 1.2: bootstrap tools" > > @echo > "--------------------------------------------------------------" > > ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools > > + mkdir -p ${WORLDTMP}/usr ${WORLDTMP}/lib/casper > ${WORLDTMP}/lib/geom > > + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ > > + -p ${WORLDTMP}/usr >/dev/null > > + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ > > + -p ${WORLDTMP}/usr/include >/dev/null > > + ln -sf ${.CURDIR}/sys ${WORLDTMP} > > +.if ${MK_DEBUG_FILES} != "no" > > + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ > > + -p ${WORLDTMP}/usr/lib >/dev/null > > +.endif > > +.for _mtree in ${LOCAL_MTREE} > > + ${WORLDTMP_MTREE} -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > > /dev/null > > +.endfor > > _cleanobj: > > .if !defined(NO_CLEAN) > > @echo > > > > Modified: head/tools/build/Makefile > > > ============================================================================= > > = > > --- head/tools/build/Makefile Mon Aug 20 10:39:48 2018 (r338097) > > +++ head/tools/build/Makefile Mon Aug 20 10:39:53 2018 (r338098) > > @@ -59,4 +59,17 @@ SUBDIR= cross-build > > # Needed to build config (since it uses libnv) > > SYSINCS+= ${SRCTOP}/sys/sys/nv.h ${SRCTOP}/sys/sys/cnv.h > > > > + > > +# Create all the directories that are needed during the legacy, > bootstrap-to > > ols > > +# and cross-tools stages. We do this here using mkdir since mtree may > not ex > > ist > > +# yet (this happens if we are crossbuilding from Linux/Mac). > > +installdirs: > > +.for _dir in bin sbin usr/bin usr/sbin usr/lib usr/include lib/geom > lib/casp > > er > > + mkdir -p "${DESTDIR}/${_dir}" > > +.endfor > > + > > +.for _group in ${INCSGROUPS:NINCS} > > + mkdir -p "${DESTDIR}/${${_group}DIR}" > > +.endfor > > + > > .include > > > > This broke my krb5 project branch. The fix for me is easy but rather > inelegant, adding yet another for loop. Would it not be better to > guarantee that mtree is in $WORLDTEMP for platforms that don't have it > naturally or unconditionally? And, before we use it? With this change > it requires, depending on what any future patch changes, that etc/mtree > and this fragment be updated. To me it feels klunky. > > I'll work around this for now but IMO long term we should use a > different strategy and reduce redundancy. > > Thoughts? > > Sorry about the breakage. WORLDTMP is still populated using mtree, only the limited subset of directories needed in $WORLDTMP/legacy is created here. I wonder why you need a separate loop for krb5? What other directories are needed by the bootstrap tools? $WORLDTMP/legacy should only contain a few binaries + headers and libs for the bootstrap tools so I don't think we will add more directories very frequently. I think for now this is fine and long-term I was under the impression that creating directories with mtree would eventuall go away and be replaced with bsd.dirs.mk (added in r336640). It looks like all mtree calls are gone in https://github.com/brd/freebsd/blob/etc-DIR/Makefile.inc1 so it looks like this is possible. Alex From owner-svn-src-head@freebsd.org Thu Aug 30 22:00:28 2018 Return-Path: Delivered-To: svn-src-head@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 8F1BBEF9D70; Thu, 30 Aug 2018 22:00:28 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36813742D2; Thu, 30 Aug 2018 22:00:28 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id B7AEB20B77; Thu, 30 Aug 2018 22:00:27 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [10.0.2.164] (ptr-8rgnodvsrj9z8q8721q.18120a2.ip6.access.telenet.be [IPv6:2a02:1811:240b:b802:9df3:70fc:be86:f61e]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id ADFF84BE31; Fri, 31 Aug 2018 00:00:24 +0200 (CEST) From: "Kristof Provost" To: "Jonathan T. Looney" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r337776 - head/sys/netinet6 Date: Fri, 31 Aug 2018 00:00:23 +0200 X-Mailer: MailMate (2.0BETAr6116) Message-ID: <7C9F31C2-839C-4537-A43D-F51A54380BDA@FreeBSD.org> In-Reply-To: <201808141717.w7EHHcPf010971@repo.freebsd.org> References: <201808141717.w7EHHcPf010971@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 22:00:28 -0000 On 14 Aug 2018, at 19:17, Jonathan T. Looney wrote: > Author: jtl > Date: Tue Aug 14 17:17:37 2018 > New Revision: 337776 > URL: https://svnweb.freebsd.org/changeset/base/337776 > > Log: > Improve IPv6 reassembly performance by hashing fragments into > buckets. > > Currently, all IPv6 fragment reassembly queues are kept in a flat > linked list. This has a number of implications. Two significant > implications are: all reassembly operations share a common lock, > and it is possible for the linked list to grow quite large. > > Improve IPv6 reassembly performance by hashing fragments into > buckets, > each of which has its own lock. Calculate the hash key using a > Jenkins > hash with a random seed. > > Reviewed by: jhb > Security: FreeBSD-SA-18:10.ip > Security: CVE-2018-6923 > > Modified: > head/sys/netinet6/frag6.c > > Modified: head/sys/netinet6/frag6.c > ============================================================================== > --- head/sys/netinet6/frag6.c Tue Aug 14 17:15:47 2018 (r337775) > +++ head/sys/netinet6/frag6.c Tue Aug 14 17:17:37 2018 (r337776) > @@ -157,12 +176,13 @@ frag6_input(struct mbuf **mp, int *offp, int > proto) > struct mbuf *m = *mp, *t; > struct ip6_hdr *ip6; > struct ip6_frag *ip6f; > - struct ip6q *q6; > + struct ip6q *head, *q6; > struct ip6asfrag *af6, *ip6af, *af6dwn; > struct in6_ifaddr *ia; > int offset = *offp, nxt, i, next; > int first_frag = 0; > int fragoff, frgpartlen; /* must be larger than u_int16_t */ > + uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], *hashkeyp; I’m pretty sure you didn’t mean for the hashkey to be 1028 bytes long. > struct ifnet *dstifp; > u_int8_t ecn, ecn0; > #ifdef RSS > @@ -231,7 +251,16 @@ frag6_input(struct mbuf **mp, int *offp, int > proto) > return (ip6f->ip6f_nxt); > } > > - IP6Q_LOCK(); > + hashkeyp = hashkey; > + memcpy(hashkeyp, &ip6->ip6_src, sizeof(struct in6_addr)); > + hashkeyp += sizeof(struct in6_addr) / sizeof(*hashkeyp); > + memcpy(hashkeyp, &ip6->ip6_dst, sizeof(struct in6_addr)); > + hashkeyp += sizeof(struct in6_addr) / sizeof(*hashkeyp); > + *hashkeyp = ip6f->ip6f_ident; > + hash = jenkins_hash32(hashkey, nitems(hashkey), V_ip6q_hashseed); Especially combined with this, because it means we hash a lot more than the src/dst dress and ident. We end up hashing random stack garbage, so the hash isn’t guaranteed to be the same every time. So we end up not always being able to reassemble the packet. It’s especially fun when you consider that a Dtrace fbt:::entry probe will leave a consistent stack state, so when you try to probe frag6_input() the problem magically goes away. This broke the sys.netpfil.pf.fragmentation.v6 test. I’ve done this, which fixes the problem: diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index 0f30801540a..e1f2b3f5842 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -218,7 +218,9 @@ frag6_input(struct mbuf **mp, int *offp, int proto) int offset = *offp, nxt, i, next; int first_frag = 0; int fragoff, frgpartlen; /* must be larger than u_int16_t */ - uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], *hashkeyp; + uint32_t hashkey[(sizeof(struct in6_addr) * 2 + sizeof(u_int32_t)) / + sizeof(uint32_t)]; + uint32_t hash, *hashkeyp; struct ifnet *dstifp; u_int8_t ecn, ecn0; #ifdef RSS Regards, Kristof From owner-svn-src-head@freebsd.org Thu Aug 30 22:07:52 2018 Return-Path: Delivered-To: svn-src-head@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 12C8DEFA02C; Thu, 30 Aug 2018 22:07:52 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A05074704; Thu, 30 Aug 2018 22:07:51 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id E66958D4A13F; Thu, 30 Aug 2018 22:07:49 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 426FCD1F83F; Thu, 30 Aug 2018 22:07:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id Z-KCP7ALD71y; Thu, 30 Aug 2018 22:07:46 +0000 (UTC) Received: from [192.168.124.1] (fresh-ayiya.sbone.de [IPv6:fde9:577b:c1a9:f001::2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B2C1DD1F7EB; Thu, 30 Aug 2018 22:07:38 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Kristof Provost" Cc: "Jonathan T. Looney" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r337776 - head/sys/netinet6 Date: Thu, 30 Aug 2018 22:07:28 +0000 X-Mailer: MailMate (2.0BETAr6116) Message-ID: <0793AABF-F027-407B-8ACD-1CA4B67260EE@lists.zabbadoz.net> In-Reply-To: <7C9F31C2-839C-4537-A43D-F51A54380BDA@FreeBSD.org> References: <201808141717.w7EHHcPf010971@repo.freebsd.org> <7C9F31C2-839C-4537-A43D-F51A54380BDA@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 22:07:52 -0000 On 30 Aug 2018, at 22:00, Kristof Provost wrote: > On 14 Aug 2018, at 19:17, Jonathan T. Looney wrote: >> Author: jtl >> Date: Tue Aug 14 17:17:37 2018 >> New Revision: 337776 >> URL: https://svnweb.freebsd.org/changeset/base/337776 >> >> Log: >> Improve IPv6 reassembly performance by hashing fragments into = >> buckets. >> >> Currently, all IPv6 fragment reassembly queues are kept in a flat >> linked list. This has a number of implications. Two significant >> implications are: all reassembly operations share a common lock, >> and it is possible for the linked list to grow quite large. >> >> Improve IPv6 reassembly performance by hashing fragments into = >> buckets, >> each of which has its own lock. Calculate the hash key using a = >> Jenkins >> hash with a random seed. >> >> Reviewed by: jhb >> Security: FreeBSD-SA-18:10.ip >> Security: CVE-2018-6923 >> >> Modified: >> head/sys/netinet6/frag6.c >> >> Modified: head/sys/netinet6/frag6.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/netinet6/frag6.c Tue Aug 14 17:15:47 2018 (r337775) >> +++ head/sys/netinet6/frag6.c Tue Aug 14 17:17:37 2018 (r337776) >> @@ -157,12 +176,13 @@ frag6_input(struct mbuf **mp, int *offp, int = >> proto) >> struct mbuf *m =3D *mp, *t; >> struct ip6_hdr *ip6; >> struct ip6_frag *ip6f; >> - struct ip6q *q6; >> + struct ip6q *head, *q6; >> struct ip6asfrag *af6, *ip6af, *af6dwn; >> struct in6_ifaddr *ia; >> int offset =3D *offp, nxt, i, next; >> int first_frag =3D 0; >> int fragoff, frgpartlen; /* must be larger than u_int16_t */ >> + uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], *hashkeyp; > > I=E2=80=99m pretty sure you didn=E2=80=99t mean for the hashkey to be 1= 028 bytes = > long. > >> struct ifnet *dstifp; >> u_int8_t ecn, ecn0; >> #ifdef RSS >> @@ -231,7 +251,16 @@ frag6_input(struct mbuf **mp, int *offp, int = >> proto) >> return (ip6f->ip6f_nxt); >> } >> >> - IP6Q_LOCK(); >> + hashkeyp =3D hashkey; >> + memcpy(hashkeyp, &ip6->ip6_src, sizeof(struct in6_addr)); >> + hashkeyp +=3D sizeof(struct in6_addr) / sizeof(*hashkeyp); >> + memcpy(hashkeyp, &ip6->ip6_dst, sizeof(struct in6_addr)); >> + hashkeyp +=3D sizeof(struct in6_addr) / sizeof(*hashkeyp); >> + *hashkeyp =3D ip6f->ip6f_ident; >> + hash =3D jenkins_hash32(hashkey, nitems(hashkey), V_ip6q_hashseed); > > Especially combined with this, because it means we hash a lot more = > than the src/dst dress and ident. > We end up hashing random stack garbage, so the hash isn=E2=80=99t guara= nteed = > to be the same every time. > So we end up not always being able to reassemble the packet. > > It=E2=80=99s especially fun when you consider that a Dtrace fbt:::entry= = > probe will leave a consistent stack state, so when you try to probe = > frag6_input() the problem magically goes away. > > This broke the sys.netpfil.pf.fragmentation.v6 test. > > I=E2=80=99ve done this, which fixes the problem: > > diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c > index 0f30801540a..e1f2b3f5842 100644 > --- a/sys/netinet6/frag6.c > +++ b/sys/netinet6/frag6.c > @@ -218,7 +218,9 @@ frag6_input(struct mbuf **mp, int *offp, int = > proto) > int offset =3D *offp, nxt, i, next; > int first_frag =3D 0; > int fragoff, frgpartlen; /* must be larger than = > u_int16_t */ > - uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], = > *hashkeyp; > + uint32_t hashkey[(sizeof(struct in6_addr) * 2 + = > sizeof(u_int32_t)) / Can we actually make it the size of the field rather than uint32_t (not = u_int32_t)? I guess not easily but at least change the type spelling = and leave a comment what it is? > + sizeof(uint32_t)]; > + uint32_t hash, *hashkeyp; > struct ifnet *dstifp; > u_int8_t ecn, ecn0; > #ifdef RSS > > Regards, > Kristof From owner-svn-src-head@freebsd.org Thu Aug 30 22:12:43 2018 Return-Path: Delivered-To: svn-src-head@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 88E95EFA263; Thu, 30 Aug 2018 22:12:43 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BF1D74B6C; Thu, 30 Aug 2018 22:12:43 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id E65D120D89; Thu, 30 Aug 2018 22:12:42 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [10.0.2.164] (ptr-8rgnodvsrj9z8q8721q.18120a2.ip6.access.telenet.be [IPv6:2a02:1811:240b:b802:9df3:70fc:be86:f61e]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 9B53C4BE8D; Fri, 31 Aug 2018 00:12:41 +0200 (CEST) From: "Kristof Provost" To: "Bjoern A. Zeeb" Cc: "Jonathan T. Looney" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r337776 - head/sys/netinet6 Date: Fri, 31 Aug 2018 00:12:40 +0200 X-Mailer: MailMate (2.0BETAr6116) Message-ID: <11A2CD98-032D-4181-9CC9-D8A14ACAFCDE@FreeBSD.org> In-Reply-To: <0793AABF-F027-407B-8ACD-1CA4B67260EE@lists.zabbadoz.net> References: <201808141717.w7EHHcPf010971@repo.freebsd.org> <7C9F31C2-839C-4537-A43D-F51A54380BDA@FreeBSD.org> <0793AABF-F027-407B-8ACD-1CA4B67260EE@lists.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 22:12:43 -0000 On 31 Aug 2018, at 0:07, Bjoern A. Zeeb wrote: > On 30 Aug 2018, at 22:00, Kristof Provost wrote: >> I’ve done this, which fixes the problem: >> >> diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c >> index 0f30801540a..e1f2b3f5842 100644 >> --- a/sys/netinet6/frag6.c >> +++ b/sys/netinet6/frag6.c >> @@ -218,7 +218,9 @@ frag6_input(struct mbuf **mp, int *offp, int >> proto) >> int offset = *offp, nxt, i, next; >> int first_frag = 0; >> int fragoff, frgpartlen; /* must be larger than >> u_int16_t */ >> - uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], >> *hashkeyp; >> + uint32_t hashkey[(sizeof(struct in6_addr) * 2 + >> sizeof(u_int32_t)) / > > Can we actually make it the size of the field rather than uint32_t > (not u_int32_t)? I guess not easily but at least change the type > spelling and leave a comment what it is? > I think we can spell that `sizeof(ip6f->ip6f_ident))`, yes. Kristof From owner-svn-src-head@freebsd.org Thu Aug 30 22:51:54 2018 Return-Path: Delivered-To: svn-src-head@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 762C1EFB403; Thu, 30 Aug 2018 22:51:54 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670073.outbound.protection.outlook.com [40.107.67.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D0EA76248; Thu, 30 Aug 2018 22:51:54 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM (52.132.44.160) by YTOPR0101MB1163.CANPRD01.PROD.OUTLOOK.COM (52.132.50.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.16; Thu, 30 Aug 2018 22:51:52 +0000 Received: from YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM ([fe80::7d32:736f:ee9e:e78c]) by YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM ([fe80::7d32:736f:ee9e:e78c%4]) with mapi id 15.20.1101.016; Thu, 30 Aug 2018 22:51:52 +0000 From: Rick Macklem To: Kristof Provost , "Bjoern A. Zeeb" CC: "Jonathan T. Looney" , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r337776 - head/sys/netinet6 Thread-Topic: svn commit: r337776 - head/sys/netinet6 Thread-Index: AQHUQKzk5rC3xzr8VUWOGIAav8TBVqTY2lQAgAABdACAAAl6TA== Date: Thu, 30 Aug 2018 22:51:52 +0000 Message-ID: References: <201808141717.w7EHHcPf010971@repo.freebsd.org> <7C9F31C2-839C-4537-A43D-F51A54380BDA@FreeBSD.org> <0793AABF-F027-407B-8ACD-1CA4B67260EE@lists.zabbadoz.net>, <11A2CD98-032D-4181-9CC9-D8A14ACAFCDE@FreeBSD.org> In-Reply-To: <11A2CD98-032D-4181-9CC9-D8A14ACAFCDE@FreeBSD.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTOPR0101MB1163; 6:UhAyQpH5knvaNUoQ5G+JGHW1ZFodpSqwyrf+17aWpzBD+umegvJ3IkKtHoDvfooclokpiE4YGQrB86UYWM7Pi1H3+RuzZijX+hqc3aMmcKUTrxc3HEynGI7sGZFJz0uKBuBx6rXeBQxBR6ymwbViuN1DAiQdC03Y+16nZuL3LZJyIjThls5Rd/ybwYMzzpiWu52YdO82zq12dRB6jkd+fW5df/fJAq2m21bkUMzhateDvYPVmrG3w/sg8YKCji5/Xf7JMfMbjX0VeMaGWEJ+JKY3xXpVb1Oz4zMYTgkhamqDjibJkoLq42Q1LY5F2aed+fRdRSiN84+4qJ6UqsVHdzqfV4hXYyQ2mN/W/vpLKYxipQBv+MnDCX0fgAY3M/TDNkI6tOMrqQ4iBWA37cqlV/M5dq4XQ6NX9T7Wv4VuFcA2RrYlH60gpONTMSeRlMd1SOUSRyCTxCjU2F2+NZ/qXg==; 5:A/I9NvpfDtRFOTei7vpxAyMRJbnzzNItqEabjG3v2VMKPNC9o/1bSNRtBOSBTXGx+iCWuuYrEky4MBla2+ySgR7ZlbFJm6KTXPkTJiDpNjJYvJhGKg77IFEC0u+1Bqf13YEN7Aabgh7VzzGADwh/VTh0mzmWl6f/AIH1BTgV3ng=; 7:BMQMVCId4Iaxvbk/IIL1s7fPkB7qvztkl8N51ybjOVNFtmfxEbDnmJ25ZQ8cIR37g2JBev7emWxqStuK8AZyJ+8won+P3CL2w8ouZDq0DCVxKgxMbL02AYr90IYZRVOtEQwPOfsANmX599iwLRxaERd4d0hjwvZw2qNYcbP3TrvcgZuFgDk/SJUZwWp8iQDrZ7iDEF06CsGtrSEBP2XHA/gPu5WTyt7k+fHp5/JUQR9/qm1NAb6bAE3IZuDRdknS x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 28d4ec76-0b79-4419-f8d2-08d60ecb2dba x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:YTOPR0101MB1163; x-ms-traffictypediagnostic: YTOPR0101MB1163: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(201708071742011)(7699016); SRVR:YTOPR0101MB1163; BCL:0; PCL:0; RULEID:; SRVR:YTOPR0101MB1163; x-forefront-prvs: 07807C55DC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39850400004)(396003)(136003)(346002)(376002)(199004)(189003)(2900100001)(97736004)(4326008)(74482002)(229853002)(316002)(14454004)(25786009)(786003)(106356001)(53936002)(105586002)(86362001)(55016002)(54906003)(486006)(6436002)(966005)(110136005)(33656002)(478600001)(256004)(476003)(446003)(53546011)(6506007)(102836004)(5250100002)(6246003)(8676002)(9686003)(76176011)(5660300001)(8936002)(7696005)(186003)(81156014)(26005)(6306002)(305945005)(68736007)(81166006)(11346002)(2906002)(99286004)(74316002)(93886005); DIR:OUT; SFP:1101; SCL:1; SRVR:YTOPR0101MB1163; H:YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: FTIHNobUr8mkmGZxZxvgPN5Z/Q5Naqg3uYPAmeQ857GlE9YTELqiwf1mRo4peoGUdZO0bRwhv4bbI3Elq+WQQrS/cr9SyBL+2YM/FDdSTs1bvIOQJZJjKbTfrUEOsAgrT/j0DIzNkY198BxMqU7Xfl8qpDXCVWKauR3eCdaZBhMt0yCC4z2Jc2jtaZFWc/b7x4E/yG5nTS3ztshsDvGkZUjpMgM/+esWTo1uYdzG5KtAHjFmBMsa+51/ECGH9/UmvF2IpaVRG4AoVTYOZ/ZI11O9L3Y9wQSg4ewLADCAAQfmFUN6ygvfxunivbWThmO6Ix7UbhDYTEE+tiAgaadflCNfom7TBcPFyvndyFga6UA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 28d4ec76-0b79-4419-f8d2-08d60ecb2dba X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Aug 2018 22:51:52.7256 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB1163 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 22:51:54 -0000 Sorry for the top post, but I'm on a web based email. pi@freebsd.org reported a problem w.r.t. IPv6 fragmentation when using NFS. (He switched from UDP --> TCP and the problem went away.) It's over here on freebsd-stable: http://docs.FreeBSD.org/cgi/mid.cgi?20180827155651.GW2118 I don't know if this is related, given that it is a recent commit. (There have been a bunch of other IPv6 fragmentation commits.) rick ________________________________________ From: owner-src-committers@freebsd.org o= n behalf of Kristof Provost Sent: Thursday, August 30, 2018 6:12:40 PM To: Bjoern A. Zeeb Cc: Jonathan T. Looney; src-committers@freebsd.org; svn-src-all@freebsd.org= ; svn-src-head@freebsd.org Subject: Re: svn commit: r337776 - head/sys/netinet6 On 31 Aug 2018, at 0:07, Bjoern A. Zeeb wrote: On 30 Aug 2018, at 22:00, Kristof Provost wrote: I=92ve done this, which fixes the problem: diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index 0f30801540a..e1f2b3f5842 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -218,7 +218,9 @@ frag6_input(struct mbuf **mp, int *offp, int proto) int offset =3D *offp, nxt, i, next; int first_frag =3D 0; int fragoff, frgpartlen; /* must be larger than u_int16_t */ - uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], *hashkeyp; + uint32_t hashkey[(sizeof(struct in6_addr) * 2 + sizeof(u_int32_t)) / Can we actually make it the size of the field rather than uint32_t (not u_i= nt32_t)? I guess not easily but at least change the type spelling and leave= a comment what it is? I think we can spell that sizeof(ip6f->ip6f_ident)), yes. Kristof From owner-svn-src-head@freebsd.org Fri Aug 31 00:05:39 2018 Return-Path: Delivered-To: svn-src-head@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 1B51FEFC853; Fri, 31 Aug 2018 00:05:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C135977F8D; Fri, 31 Aug 2018 00:05:38 +0000 (UTC) (envelope-from gjb@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 9E32013A85; Fri, 31 Aug 2018 00:05:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7V05cle080261; Fri, 31 Aug 2018 00:05:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7V05cOF080260; Fri, 31 Aug 2018 00:05:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201808310005.w7V05cOF080260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 31 Aug 2018 00:05:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338401 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 338401 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 00:05:39 -0000 Author: gjb Date: Fri Aug 31 00:05:38 2018 New Revision: 338401 URL: https://svnweb.freebsd.org/changeset/base/338401 Log: Update head from ALPHA3 to ALPHA4 as part of the 12.0-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Thu Aug 30 18:00:28 2018 (r338400) +++ head/sys/conf/newvers.sh Fri Aug 31 00:05:38 2018 (r338401) @@ -46,7 +46,7 @@ TYPE="FreeBSD" REVISION="12.0" -BRANCH="ALPHA3" +BRANCH="ALPHA4" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-head@freebsd.org Fri Aug 31 01:01:17 2018 Return-Path: Delivered-To: svn-src-head@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 E7EBDEFDB9F; Fri, 31 Aug 2018 01:01:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A79317A5B2; Fri, 31 Aug 2018 01:01:16 +0000 (UTC) (envelope-from imp@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 8A192142C5; Fri, 31 Aug 2018 01:01:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7V11GjT008420; Fri, 31 Aug 2018 01:01:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7V11GuQ008419; Fri, 31 Aug 2018 01:01:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201808310101.w7V11GuQ008419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 31 Aug 2018 01:01:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338402 - head/sys/crypto/ccp X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/crypto/ccp X-SVN-Commit-Revision: 338402 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 01:01:17 -0000 Author: imp Date: Fri Aug 31 01:01:16 2018 New Revision: 338402 URL: https://svnweb.freebsd.org/changeset/base/338402 Log: Don't load ccp automatically with devmatch Remove the PNP info for the moment from the driver. It's an experimental driver (as noted in r328150). It's performance is about 1/10th that of aesni. It will often panic when used with GELI (PR 2279820). It's not in our best interest to have such a driver be autoloaded by default. Approved by: re@ (rgrimes) Reviewed By: cem@ Differential Review: https://reviews.freebsd.org/D16959 Modified: head/sys/crypto/ccp/ccp.c Modified: head/sys/crypto/ccp/ccp.c ============================================================================== --- head/sys/crypto/ccp/ccp.c Fri Aug 31 00:05:38 2018 (r338401) +++ head/sys/crypto/ccp/ccp.c Fri Aug 31 01:01:16 2018 (r338402) @@ -734,8 +734,10 @@ DRIVER_MODULE(ccp, pci, ccp_driver, ccp_devclass, NULL MODULE_VERSION(ccp, 1); MODULE_DEPEND(ccp, crypto, 1, 1, 1); MODULE_DEPEND(ccp, random_device, 1, 1, 1); +#if 0 /* There are enough known issues that we shouldn't load automatically */ MODULE_PNP_INFO("W32:vendor/device", pci, ccp, ccp_ids, sizeof(ccp_ids[0]), nitems(ccp_ids)); +#endif static int ccp_queue_reserve_space(struct ccp_queue *qp, unsigned n, int mflags) From owner-svn-src-head@freebsd.org Fri Aug 31 01:15:57 2018 Return-Path: Delivered-To: svn-src-head@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 671F3EFE3CC; Fri, 31 Aug 2018 01:15:57 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E50607AD30; Fri, 31 Aug 2018 01:15:56 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: by mail-ed1-f66.google.com with SMTP id l5so5230076edw.9; Thu, 30 Aug 2018 18:15:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FKKPaoiOrduGMd1g27oNpQcTDT0KtUWVDhSFDoS1LsA=; b=t4BMGPvqAPLB5NOEzJBlSVvRuPvgZyRTS01emK/Q/wwouxV6/E1swChehoCKZVmmAx uAQkCjMmc5kV7KDu8eIsF577VYz3wKBkdJD/1SM5qBSCEtlQiITgD3ruqCSmNTH50Lzx uVUrHrCoa9JRgBlCkbG0S+tf2+VUvVjSMf6HGCGqNpaQM+Rng4G9IzNSjF2xgqupha9q PQLkZnLBC4a+eY+PnHfOq9fhs68vF+L/rewTfREDCZEyzWPFOz+xUwWP7KvzEDDhxaup /XtRX6FN7AqnCh1RkSkhQGcEwMtEYJv+wFTOXPLfOBVkU9cyEXYvpwAi8XzWiuC2hyRJ OEIg== X-Gm-Message-State: APzg51BDBnHZzZ/yaA7OTODUMnZvDq5JQkYJJ44pIRKO0sJNrbDag6cr ODYSufFyItvyw2arlfvL+w15yg8M X-Google-Smtp-Source: ANB0Vdb/1sXuxYCEpoVuWyr4ovZty71I9zUAwRhRz1WUi6/PnRac6lPhWWtOZH9wwV0CBmfAjO3C8A== X-Received: by 2002:a50:a5af:: with SMTP id a44-v6mr15435901edc.289.1535678149740; Thu, 30 Aug 2018 18:15:49 -0700 (PDT) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com. [74.125.82.44]) by smtp.gmail.com with ESMTPSA id c11-v6sm3865611eda.48.2018.08.30.18.15.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 18:15:49 -0700 (PDT) Received: by mail-wm0-f44.google.com with SMTP id q8-v6so3738745wmq.4; Thu, 30 Aug 2018 18:15:49 -0700 (PDT) X-Received: by 2002:a1c:ac04:: with SMTP id v4-v6mr3417535wme.51.1535678149187; Thu, 30 Aug 2018 18:15:49 -0700 (PDT) MIME-Version: 1.0 References: <201808141717.w7EHHcPf010971@repo.freebsd.org> <7C9F31C2-839C-4537-A43D-F51A54380BDA@FreeBSD.org> In-Reply-To: <7C9F31C2-839C-4537-A43D-F51A54380BDA@FreeBSD.org> From: "Jonathan T. Looney" Date: Thu, 30 Aug 2018 21:15:37 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r337776 - head/sys/netinet6 To: kp@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 01:15:57 -0000 On Thu, Aug 30, 2018 at 6:00 PM Kristof Provost wrote: > On 14 Aug 2018, at 19:17, Jonathan T. Looney wrote: > > + uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], *hashkeyp; > > I=E2=80=99m pretty sure you didn=E2=80=99t mean for the hashkey to be 102= 8 bytes long. > Yikes. Yep, that's a bug. I originally spelled this as 9; however, decided to rewrite it to avoid "magic numbers". It made it through all my manual testing; but, that makes sense since all my positive functional tests were on an unloaded machine, so the extra stack garbage would be more likely to be consistent. > I=E2=80=99ve done this, which fixes the problem: > > diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c > index 0f30801540a..e1f2b3f5842 100644 > --- a/sys/netinet6/frag6.c > +++ b/sys/netinet6/frag6.c > @@ -218,7 +218,9 @@ frag6_input(struct mbuf **mp, int *offp, int proto) > int offset =3D *offp, nxt, i, next; > int first_frag =3D 0; > int fragoff, frgpartlen; /* must be larger than u_int16_t = */ > - uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], *hashkey= p; > + uint32_t hashkey[(sizeof(struct in6_addr) * 2 + sizeof(u_int32_t)= ) / > + sizeof(uint32_t)]; > + uint32_t hash, *hashkeyp; > struct ifnet *dstifp; > u_int8_t ecn, ecn0; > #ifdef RSS > > That looks fine to me, either with or without the followup suggestion of using sizeof(ip6f->ip6f_ident). Feel free to commit this change (after appropriate re@ approval). Or, let me know if you prefer I do it. Either way, I'll wear the pointy hat (sadly, I suspect it is neither the first nor last I will earn). Jonathan From owner-svn-src-head@freebsd.org Fri Aug 31 02:22:34 2018 Return-Path: Delivered-To: svn-src-head@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 B07D0EFF7AF; Fri, 31 Aug 2018 02:22:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6504F7CCBF; Fri, 31 Aug 2018 02:22:34 +0000 (UTC) (envelope-from gjb@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 475F015125; Fri, 31 Aug 2018 02:22:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7V2MYFv052980; Fri, 31 Aug 2018 02:22:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7V2MYtK052979; Fri, 31 Aug 2018 02:22:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201808310222.w7V2MYtK052979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 31 Aug 2018 02:22:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338404 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 338404 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 02:22:34 -0000 Author: gjb Date: Fri Aug 31 02:22:33 2018 New Revision: 338404 URL: https://svnweb.freebsd.org/changeset/base/338404 Log: Revert r338401, as the i386 build is broken. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Fri Aug 31 01:50:40 2018 (r338403) +++ head/sys/conf/newvers.sh Fri Aug 31 02:22:33 2018 (r338404) @@ -46,7 +46,7 @@ TYPE="FreeBSD" REVISION="12.0" -BRANCH="ALPHA4" +BRANCH="ALPHA3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-head@freebsd.org Fri Aug 31 02:46:10 2018 Return-Path: Delivered-To: svn-src-head@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 1AFE8F6E567; Fri, 31 Aug 2018 02:46:10 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1D207D9BB; Fri, 31 Aug 2018 02:46:09 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 4A1A915FC5; Fri, 31 Aug 2018 02:46:09 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Fri, 31 Aug 2018 02:46:07 +0000 From: Glen Barber To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338404 - head/sys/conf Message-ID: <20180831024607.GE82038@FreeBSD.org> References: <201808310222.w7V2MYtK052979@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3rxX7Uty8SZY8iU1" Content-Disposition: inline In-Reply-To: <201808310222.w7V2MYtK052979@repo.freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 02:46:10 -0000 --3rxX7Uty8SZY8iU1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 31, 2018 at 02:22:34AM +0000, Glen Barber wrote: > Author: gjb > Date: Fri Aug 31 02:22:33 2018 > New Revision: 338404 > URL: https://svnweb.freebsd.org/changeset/base/338404 >=20 > Log: > Revert r338401, as the i386 build is broken. > =20 > Approved by: re (implicit) > Sponsored by: The FreeBSD Foundation >=20 > Modified: > head/sys/conf/newvers.sh >=20 > Modified: head/sys/conf/newvers.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/newvers.sh Fri Aug 31 01:50:40 2018 (r338403) > +++ head/sys/conf/newvers.sh Fri Aug 31 02:22:33 2018 (r338404) > @@ -46,7 +46,7 @@ > =20 > TYPE=3D"FreeBSD" > REVISION=3D"12.0" > -BRANCH=3D"ALPHA4" > +BRANCH=3D"ALPHA3" > if [ -n "${BRANCH_OVERRIDE}" ]; then > BRANCH=3D${BRANCH_OVERRIDE} > fi >=20 As I look closer at the log, I have a sneaking suspicion this may have been a transient. I'm redoing the i386 build against the original r338401 for i386 alone as a test, if nothing else, to see if it fails in the same place. I see no obvious suspicious commit at fault here otherwise. Glen --3rxX7Uty8SZY8iU1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAluIq+8ACgkQAxRYpUeP 4pMCAw//bzR5XaSphT8keBRCrtMssmMjx438Pf6jRjHZeXr5g29NWVTpUF56OKpe NGAnLbUiEmT31APJgrQLeNjYuAxxFGyph3z47a1wlSkcgdPI/66++TRw6+9APW9u 4vQECU1fI0fg9GssLukbup3o/7uMMn7SJcj10IEEojvjDvlHpo8qDxLvgD96bJIL 0Di8BzKvs1+eeSHOfLdcwqiZCSecwCHHblTFjbGPI7rzQwUYDC1h489oeVG6eLY+ I3ps+O7If8gsHBeS8a9f2gXSmRuQOLJgkKQAEv/7kfSfC+zMHtjY1Ffx13GKeUEJ kWOkwqYu5QZ/DsDKqvesWT6AFqgWCcCYtQLEYpL5uel4ya+tPvmWQ0H9lr49fgGE Y4df1xjLcpjL8ofnmDayEHLErLh+Z3bLDpQcmbzXPLxj0RO2PODeiyQVhZpCaW5D suZh1xTRp76OvkeUXoKQ8geroJ5H2wvUZVLJJG3LA3L5tkGDeIu9CsJ3rpbRRwYv XuWDRj5qT7E257972WIHbQ+6Hq16NXA+uPWzxk+xBShxO13OZb6uML/iffNtmDyR CPZYOgHavoYDlETdAYDv63Q/hw/CrP/l2OXg1YS34KmBOI45wrx6MQWMGnB/qbPz w2joARR8DZs59gdaNTkp/wQazJ+mOhW9lXyo3JyA9P/1LPafWgY= =BfTy -----END PGP SIGNATURE----- --3rxX7Uty8SZY8iU1-- From owner-svn-src-head@freebsd.org Fri Aug 31 03:45:04 2018 Return-Path: Delivered-To: svn-src-head@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 A8E68F7202D; Fri, 31 Aug 2018 03:45:04 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59BF67FF10; Fri, 31 Aug 2018 03:45:04 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id C2AE216DB4; Fri, 31 Aug 2018 03:45:03 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Fri, 31 Aug 2018 03:45:01 +0000 From: Glen Barber To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338404 - head/sys/conf Message-ID: <20180831034501.GF82038@FreeBSD.org> References: <201808310222.w7V2MYtK052979@repo.freebsd.org> <20180831024607.GE82038@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OzigliFs3e0dNr73" Content-Disposition: inline In-Reply-To: <20180831024607.GE82038@FreeBSD.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 03:45:04 -0000 --OzigliFs3e0dNr73 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 31, 2018 at 02:46:07AM +0000, Glen Barber wrote: > On Fri, Aug 31, 2018 at 02:22:34AM +0000, Glen Barber wrote: > > Author: gjb > > Date: Fri Aug 31 02:22:33 2018 > > New Revision: 338404 > > URL: https://svnweb.freebsd.org/changeset/base/338404 > >=20 > > Log: > > Revert r338401, as the i386 build is broken. > > =20 > > Approved by: re (implicit) > > Sponsored by: The FreeBSD Foundation > >=20 > > Modified: > > head/sys/conf/newvers.sh > >=20 > > Modified: head/sys/conf/newvers.sh > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/conf/newvers.sh Fri Aug 31 01:50:40 2018 (r338403) > > +++ head/sys/conf/newvers.sh Fri Aug 31 02:22:33 2018 (r338404) > > @@ -46,7 +46,7 @@ > > =20 > > TYPE=3D"FreeBSD" > > REVISION=3D"12.0" > > -BRANCH=3D"ALPHA4" > > +BRANCH=3D"ALPHA3" > > if [ -n "${BRANCH_OVERRIDE}" ]; then > > BRANCH=3D${BRANCH_OVERRIDE} > > fi > >=20 >=20 > As I look closer at the log, I have a sneaking suspicion this may have > been a transient. I'm redoing the i386 build against the original > r338401 for i386 alone as a test, if nothing else, to see if it fails in > the same place. >=20 > I see no obvious suspicious commit at fault here otherwise. >=20 Nope. Seems like a legitimate failure, though where is still unclear to me. Better luck tomorrow, I guess. Glen --OzigliFs3e0dNr73 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAluIub0ACgkQAxRYpUeP 4pNuxA//dKQOr5Cww1kV6mo8x05uyskw9YlbQHrdHF12IKDmtrGCxUki83gtXtmU Z5nn9W2raVV2RFBRUjAqSbcZfRmnH+s6hgDaxAinFpUKwV0zuDM9Nlun0/1NHYfU hbqeMpQu+LeKUZuyviyRccfQKaVxmipz/vJweOt+fS7cyGNPS397UVn7LD2bqkii p9/mz1OQPQqzoSfb531yLzy0cR/NAME96XcgPFkz24yqKqv492bdsGayMKh/ZIvu agJforbHwg3ZL6wjAyurVKUPG8KjOj5Vp8G4a9A1xP/M3s5AUgtvnpLSl5EgJAQs 5QQLRw/z4cA/8PQVdZwE4nxGJdRe9ZGUcLLARILzOA1JLKVahtQGxryUcDn/2s3/ pVC8CJ4lgZLnkiVaBslSlqQe/LLrEpFKAA8iaijKziJC31rks4aU4ZC+cHIwm5YK LICLReqqjA0gnVpNIixmLSaAPVwc5lxVXXW36Q07sS/26Pm/9ynojl/vDfvznNn5 /AUPQkonIJl/Aca2eToTiYcYxrNgPb4DCNIiNAz90RQtZfv1MXra6s430I+DXOeI g1FY7ONxrzKlpFcBjIj5gsdQCsxWXzwntjdOofFzDE/wZYq7scs4TGHM2/EL4Tjn JWoQpiYMMXfIgPNAuptiCPz+MY2WSKlY79YQ9KY2k2206aueVXA= =SITc -----END PGP SIGNATURE----- --OzigliFs3e0dNr73-- From owner-svn-src-head@freebsd.org Fri Aug 31 08:37:16 2018 Return-Path: Delivered-To: svn-src-head@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 6856DF788A4; Fri, 31 Aug 2018 08:37:16 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 203E3892CA; Fri, 31 Aug 2018 08:37:16 +0000 (UTC) (envelope-from kp@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 EA87318E80; Fri, 31 Aug 2018 08:37:15 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7V8bF3S044015; Fri, 31 Aug 2018 08:37:15 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7V8bFsF044014; Fri, 31 Aug 2018 08:37:15 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201808310837.w7V8bFsF044014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 31 Aug 2018 08:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338406 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 338406 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 08:37:16 -0000 Author: kp Date: Fri Aug 31 08:37:15 2018 New Revision: 338406 URL: https://svnweb.freebsd.org/changeset/base/338406 Log: frag6: Fix fragment reassembly r337776 started hashing the fragments into buckets for faster lookup. The hashkey is larger than intended. This results in random stack data being included in the hashed data, which in turn means that fragments of the same packet might end up in different buckets, causing the reassembly to fail. Set the correct size for hashkey. PR: 231045 Approved by: re (kib) MFC after: 3 days Modified: head/sys/netinet6/frag6.c Modified: head/sys/netinet6/frag6.c ============================================================================== --- head/sys/netinet6/frag6.c Fri Aug 31 05:21:33 2018 (r338405) +++ head/sys/netinet6/frag6.c Fri Aug 31 08:37:15 2018 (r338406) @@ -218,7 +218,9 @@ frag6_input(struct mbuf **mp, int *offp, int proto) int offset = *offp, nxt, i, next; int first_frag = 0; int fragoff, frgpartlen; /* must be larger than u_int16_t */ - uint32_t hash, hashkey[sizeof(struct in6_addr) * 2 + 1], *hashkeyp; + uint32_t hashkey[(sizeof(struct in6_addr) * 2 + + sizeof(ip6f->ip6f_ident)) / sizeof(uint32_t)]; + uint32_t hash, *hashkeyp; struct ifnet *dstifp; u_int8_t ecn, ecn0; #ifdef RSS From owner-svn-src-head@freebsd.org Fri Aug 31 12:51:51 2018 Return-Path: Delivered-To: svn-src-head@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 2E5AEF7FC83; Fri, 31 Aug 2018 12:51:51 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B7FED71481; Fri, 31 Aug 2018 12:51:50 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x236.google.com with SMTP id 139-v6so7012807itf.0; Fri, 31 Aug 2018 05:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=F3PN1bZHjNSiCuuadfsmxGmsoigtmr6agcBHiFofGlQ=; b=ZCFpG5bx9DGv4gtSREoyOeK1h2/z1zaKfFn2nUN+wM6wIuYFbwMkAPn3Vcu8w0ihat hJZB84zHvTR9NISQjR6XUXu89npVHvGWBr3sXTqKXx4VegFI8HtQiPxL73SZ5lV92O2W 9GV7JFJ/XE+OjVwWzVS/zZ0hWGM6ueOGkRWSW3L8DWqeH86I2S+w95Kr/aW95QwieklD 50t4by0falbudR21r7wYD3E3EntrBjGEdYec/5G5jfvnhu5u49HPqHprRUb2+ShEEqVl okv3ZCIfu1I09C/+hXhiFnpnUrHkJgeB5kiKBh1+Jt1Zyx2ABuGUJwxkiYrzDngX3Afn yJMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=F3PN1bZHjNSiCuuadfsmxGmsoigtmr6agcBHiFofGlQ=; b=KfnVXTD3V6Qt44vBXywQQWLGV2uUZRic3hjptaVePhHMdorH0BVqQjtqBMmehECC3K GDbWR8fwtUYjl5oY0ep+ZgJdADz2W2u0pe4881fmmPGXaT94SUqm53IzQFS6xx3X0qPN v/LW1a1FAjF7UwvMvH/QzFKIQSopCimQHl6lFO/9hbg25YytBvTsE1H/yC6I1m+3XMMF uPNs6swodJo4lITgMGBhwmE5dx1pxjYQjCB5RxiXxgGi5b9QDozfiwvmYy2ApBa3cJ7L ROZK44BUaC6GEZdUMjDNFF/AFqY9Uu61DF7My2CpAgzNzo7Z8AI8rpff4CugybRUCO4V uBZw== X-Gm-Message-State: APzg51B9HTxkh9sjvI0b8rnM6Gt3XNdubay7wV0uX4NrdLGnql4FmWhz 1F8IcpUUW264utrBaYHS7GZB8NNVaGnmEf18mac5UA== X-Google-Smtp-Source: ANB0VdYWZU7V8DmbZis1t3nVI14Sj/WuH/yuMbzhb1wHyEiMqGhXUKKx7J0L+aa80DWmIDd58k2MjxD5jR31pAdai/0= X-Received: by 2002:a24:728f:: with SMTP id x137-v6mr4891402itc.40.1535719909951; Fri, 31 Aug 2018 05:51:49 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 2002:a6b:d404:0:0:0:0:0 with HTTP; Fri, 31 Aug 2018 05:51:29 -0700 (PDT) In-Reply-To: <20180831024607.GE82038@FreeBSD.org> References: <201808310222.w7V2MYtK052979@repo.freebsd.org> <20180831024607.GE82038@FreeBSD.org> From: Ed Maste Date: Fri, 31 Aug 2018 08:51:29 -0400 X-Google-Sender-Auth: 6so9j8WZUqksdvHgBm68rIYUVnk Message-ID: Subject: Re: svn commit: r338404 - head/sys/conf To: Glen Barber Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 12:51:51 -0000 On 30 August 2018 at 22:46, Glen Barber wrote: > > As I look closer at the log, I have a sneaking suspicion this may have > been a transient. I'm redoing the i386 build against the original > r338401 for i386 alone as a test, if nothing else, to see if it fails in > the same place. What's the failure? I see head/i386 is green in CI. From owner-svn-src-head@freebsd.org Fri Aug 31 14:20:12 2018 Return-Path: Delivered-To: svn-src-head@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 C7D5DFCCB96; Fri, 31 Aug 2018 14:20:12 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CFD574283; Fri, 31 Aug 2018 14:20:12 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 1FBD11E593; Fri, 31 Aug 2018 14:20:12 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Fri, 31 Aug 2018 14:20:09 +0000 From: Glen Barber To: Ed Maste Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338404 - head/sys/conf Message-ID: <20180831142009.GG82038@FreeBSD.org> References: <201808310222.w7V2MYtK052979@repo.freebsd.org> <20180831024607.GE82038@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qCuyVVLLFvr0p6ls" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 14:20:13 -0000 --qCuyVVLLFvr0p6ls Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 31, 2018 at 08:51:29AM -0400, Ed Maste wrote: > On 30 August 2018 at 22:46, Glen Barber wrote: > > > > As I look closer at the log, I have a sneaking suspicion this may have > > been a transient. I'm redoing the i386 build against the original > > r338401 for i386 alone as a test, if nothing else, to see if it fails in > > the same place. >=20 > What's the failure? >>> stage 3.1: building everything -------------------------------------------------------------- In file included from /usr/src/sys/kern/genoffset.c:35: In file included from /usr/src/sys/sys/param.h:96: /usr/src/sys/sys/types.h:46:10: fatal error: 'machine/endian.h' file not f= ound #include ^~~~~~~~~~~~~~~~~~ 1 error generated. --- genoffset.o --- *** [genoffset.o] Error code 1 So far, 100% reproducible with an empty /usr/obj/. > I see head/i386 is green in CI. >=20 Does CI prune .OBJDIR for each build? Glen --qCuyVVLLFvr0p6ls Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAluJTpUACgkQAxRYpUeP 4pPq5g/+LGv5uwzZn7J5OFiY1tOGxjNu6eIrAkOYQ0WIo3hY6jQVnD+fX8sJ/JPH 3ukaqsmLP8fCznPRTIto0SlGKF0U6IH6giLNmIpnXiynGIoLSqf7A3NmEL7hGKCx vTVwYAMo5t41oZCfLdrsHi8WT97JXwOjqps/QZgtt88JcCuGK1yY3vuz9htv31S4 /N/t775ecAq2WqCeqNvcsgrNMaJgZy6CyAVsMDT5JBwhuAHiUgjsRVzvZjU1KR4B 24o17OCBIQjW69v1c3yIuWXAR9yqK54sTiNVinYqHVKJc5Nn7dRJuXCt7ImZBTuu VmC5HMfhlBU8dDGc6tyI9IDD8nqDnILmFqbLQxkex4ZF6BpuE9eMXJUWe7xd9KQv wuDpx8LZfdCp941GW9zcSL3xrCRbRAXjmCeE+y68AQZv2QMODDRwwU6TLZnvm1Pa 0QhUQAse/kNDwlPF0+CZWgJQevHAndD0OA691mHGDspw3wp8QxMAh708ymLuDizF wqjHYi/3BXw1jZW5jj22iE9lCBwpbntBElVMPE3QmuxZKQNhpviBlDCzMcWmCuhu dVNQm4G06Sdwm5Km7vTg9pyPbZKkKyzfBkdPwP7xbJL5xPJ1eiLZrUtQ8I6S+oh9 8YA1SCzcP4OzBg6F2Q4tMNGVTMdhGghtS/xvOoAI2ws6UMI9bD8= =/ONQ -----END PGP SIGNATURE----- --qCuyVVLLFvr0p6ls-- From owner-svn-src-head@freebsd.org Fri Aug 31 14:22:23 2018 Return-Path: Delivered-To: svn-src-head@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 E37C2FCCCD2; Fri, 31 Aug 2018 14:22:22 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98B187464A; Fri, 31 Aug 2018 14:22:22 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 51F441E6E8; Fri, 31 Aug 2018 14:22:22 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Fri, 31 Aug 2018 14:22:20 +0000 From: Glen Barber To: Ed Maste Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338404 - head/sys/conf Message-ID: <20180831142220.GH82038@FreeBSD.org> References: <201808310222.w7V2MYtK052979@repo.freebsd.org> <20180831024607.GE82038@FreeBSD.org> <20180831142009.GG82038@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="RbAp84Sx/Z5HOs1D" Content-Disposition: inline In-Reply-To: <20180831142009.GG82038@FreeBSD.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 14:22:23 -0000 --RbAp84Sx/Z5HOs1D Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 31, 2018 at 02:20:09PM +0000, Glen Barber wrote: > On Fri, Aug 31, 2018 at 08:51:29AM -0400, Ed Maste wrote: > > On 30 August 2018 at 22:46, Glen Barber wrote: > > > > > > As I look closer at the log, I have a sneaking suspicion this may have > > > been a transient. I'm redoing the i386 build against the original > > > r338401 for i386 alone as a test, if nothing else, to see if it fails= in > > > the same place. > >=20 > > What's the failure? >=20 > >>> stage 3.1: building everything > -------------------------------------------------------------- > In file included from /usr/src/sys/kern/genoffset.c:35: > In file included from /usr/src/sys/sys/param.h:96: > /usr/src/sys/sys/types.h:46:10: fatal error: 'machine/endian.h' file not= found > #include > ^~~~~~~~~~~~~~~~~~ > 1 error generated. > --- genoffset.o --- > *** [genoffset.o] Error code 1 >=20 > So far, 100% reproducible with an empty /usr/obj/. >=20 > > I see head/i386 is green in CI. > >=20 >=20 > Does CI prune .OBJDIR for each build? >=20 Make that 75% reproducible. I suspect there is a build race occurring. Glen --RbAp84Sx/Z5HOs1D Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAluJTxwACgkQAxRYpUeP 4pO3ExAAnx+SJ0f8U01844gFuMnfZT123np+P980H09YQJZncJ0Gh/GzG3LksVA1 dmiyP/ZSRPrfw0VNSSdbUojVy+yolyAC7OJAvS9wO2SnQgRFV1OVpuowTtd3VElO wKLdPK7bJU/EK58uux8ksZaw3Uxluvp5DtTAyczhFFEU8AB0/Y24sboojwV21CEI P5SBXYwFmgA/NAFSZ3sibaaloTKjTv1ja1dFRL1k51BpVc9PK/9RvlEflkvW3KGW 76+/8WjyRywLrlvbACcxjnoJe9gsk/0rirXLiGmSO3E5O3z4CERmKb0hmVhiKYvh VjKzW8GYFV0fmdSfEtHrv06k8NiBhIvE6WQSK8ZnP+Y2YtoDeIwsAZshTOjoE08z dwMt5E8omOWBYFdDV4NWJXRcGRS6q8YPJHrlkB4+ask0Be1RGmQt6ybj0upwzMLb e+ars1gugeCbqBGHBG+57mOFavjNCmj5Zj/Xf0jIdzD3WHyRygBa+k5KcKVHoadg th9wGuksPo2Z3pCYYciNTVdDqo8HSOY/Jp62OLqBzAvEcLspK5AHXfoIHnyHKe0i aI71npLiwpUj9y2jcfmsqxsFt/Bwvt6EiQ3v0l0UYMYDBe1nk6FO2lUGwX0Ithu4 yxc/1CUa3RBtUKieaQoERV8wQTI/aAU37rB79v/Zcww6jl43GgI= =MzTF -----END PGP SIGNATURE----- --RbAp84Sx/Z5HOs1D-- From owner-svn-src-head@freebsd.org Fri Aug 31 15:02:54 2018 Return-Path: Delivered-To: svn-src-head@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 E724BFCDE10; Fri, 31 Aug 2018 15:02:53 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C78D77618; Fri, 31 Aug 2018 15:02:53 +0000 (UTC) (envelope-from kevans@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 7D8AA1CDA2; Fri, 31 Aug 2018 15:02:53 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7VF2rZ2050698; Fri, 31 Aug 2018 15:02:53 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7VF2rjM050697; Fri, 31 Aug 2018 15:02:53 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808311502.w7VF2rjM050697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 31 Aug 2018 15:02:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338407 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 338407 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 15:02:54 -0000 Author: kevans Date: Fri Aug 31 15:02:53 2018 New Revision: 338407 URL: https://svnweb.freebsd.org/changeset/base/338407 Log: lualoader: Print error messages from command failures at the prompt Previously lualoader would remain silent, rather than printing command_errmsg or noting that a command had failed or was not found. Approved by: re (gjb) Modified: head/stand/common/interp_lua.c Modified: head/stand/common/interp_lua.c ============================================================================== --- head/stand/common/interp_lua.c Fri Aug 31 08:37:15 2018 (r338406) +++ head/stand/common/interp_lua.c Fri Aug 31 15:02:53 2018 (r338407) @@ -135,7 +135,7 @@ interp_run(const char *line) char **argv; lua_State *luap; struct interp_lua_softc *softc = &lua_softc; - int status; + int status, ret; luap = softc->luap; LDBG("executing line..."); @@ -147,14 +147,16 @@ interp_run(const char *line) * run it through cli_execute. If that fails, then we'll try it * as a builtin. */ + command_errmsg = NULL; if (parse(&argc, &argv, line) == 0) { lua_getglobal(luap, "cli_execute"); for (nargc = 0; nargc < argc; ++nargc) { lua_pushstring(luap, argv[nargc]); } status = lua_pcall(luap, argc, 1, 0); + ret = lua_tointeger(luap, 1); lua_pop(luap, 1); - if (status != 0) { + if (status != 0 || ret != 0) { /* * Lua cli_execute will pass the function back * through loader.command, which is a proxy to @@ -166,7 +168,10 @@ interp_run(const char *line) status = interp_builtin_cmd(argc, argv); } if (status != 0) { - printf("Command failed\n"); + if (command_errmsg != NULL) + printf("%s\n", command_errmsg); + else + printf("Command failed\n"); status = CMD_ERROR; } free(argv); From owner-svn-src-head@freebsd.org Fri Aug 31 16:10:02 2018 Return-Path: Delivered-To: svn-src-head@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 15679FCF3D0; Fri, 31 Aug 2018 16:10:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C153E79B06; Fri, 31 Aug 2018 16:10:01 +0000 (UTC) (envelope-from jhb@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 A27BA1D758; Fri, 31 Aug 2018 16:10:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7VGA1Do081428; Fri, 31 Aug 2018 16:10:01 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7VGA1cR081427; Fri, 31 Aug 2018 16:10:01 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201808311610.w7VGA1cR081427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 31 Aug 2018 16:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338408 - head/sys/dev/pci X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/pci X-SVN-Commit-Revision: 338408 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 16:10:02 -0000 Author: jhb Date: Fri Aug 31 16:10:01 2018 New Revision: 338408 URL: https://svnweb.freebsd.org/changeset/base/338408 Log: Don't directly dereference a user pointer in the VPD ioctl. The PCIOCLISTVPD ioctl on /dev/pci is used to fetch a list of VPD key-value pairs for a specific PCI function. It is used by 'pciconf -l -V'. The list is stored in a userland-supplied buffer as an array of variable-length structures where the key and data length are stored in a fixed-size header followed by the variable-length value as a byte array. To facilitate walking this array in userland, provides a PVE_NEXT() helper macro to return a pointer to the next array element by reading the the length out of the current header and using it to compute the address of the next header. To simplify the implementation, the ioctl handler was also using PVE_NEXT() when on the user address of the user buffer to compute the user address of the next array element. However, the PVE_NEXT() macro when used with a user address was reading the value's length by indirecting the user pointer. The value was ready after the current record had been copied out to the user buffer, so it appeared to work on architectures where user addresses are directly dereferencable from the kernel (all but powerpc and i386 after the 4:4 split). The recent enablement of SMAP on amd64 caught this violation however. To fix, add a variant of PVE_NEXT() for use in the ioctl handler that takes an explicit value length. Reported by: Jeffrey Pieper @ Intel Reviewed by: kib Approved by: re (gjb) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D16800 Modified: head/sys/dev/pci/pci_user.c Modified: head/sys/dev/pci/pci_user.c ============================================================================== --- head/sys/dev/pci/pci_user.c Fri Aug 31 15:02:53 2018 (r338407) +++ head/sys/dev/pci/pci_user.c Fri Aug 31 16:10:01 2018 (r338408) @@ -446,6 +446,14 @@ pci_conf_match(u_long cmd, struct pci_match_conf *matc } } +/* + * Like PVE_NEXT but takes an explicit length since 'pve' is a user + * pointer that cannot be dereferenced. + */ +#define PVE_NEXT_LEN(pve, datalen) \ + ((struct pci_vpd_element *)((char *)(pve) + \ + sizeof(struct pci_vpd_element) + (datalen))) + static int pci_list_vpd(device_t dev, struct pci_list_vpd_io *lvio) { @@ -494,7 +502,7 @@ pci_list_vpd(device_t dev, struct pci_list_vpd_io *lvi strlen(vpd->vpd_ident)); if (error) return (error); - vpd_user = PVE_NEXT(vpd_user); + vpd_user = PVE_NEXT_LEN(vpd_user, vpd_element.pve_datalen); vpd_element.pve_flags = 0; for (i = 0; i < vpd->vpd_rocnt; i++) { vpd_element.pve_keyword[0] = vpd->vpd_ros[i].keyword[0]; @@ -507,7 +515,7 @@ pci_list_vpd(device_t dev, struct pci_list_vpd_io *lvi vpd->vpd_ros[i].len); if (error) return (error); - vpd_user = PVE_NEXT(vpd_user); + vpd_user = PVE_NEXT_LEN(vpd_user, vpd_element.pve_datalen); } vpd_element.pve_flags = PVE_FLAG_RW; for (i = 0; i < vpd->vpd_wcnt; i++) { @@ -521,7 +529,7 @@ pci_list_vpd(device_t dev, struct pci_list_vpd_io *lvi vpd->vpd_w[i].len); if (error) return (error); - vpd_user = PVE_NEXT(vpd_user); + vpd_user = PVE_NEXT_LEN(vpd_user, vpd_element.pve_datalen); } KASSERT((char *)vpd_user - (char *)lvio->plvi_data == len, ("length mismatch")); From owner-svn-src-head@freebsd.org Fri Aug 31 16:15:47 2018 Return-Path: Delivered-To: svn-src-head@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 787D7FCF9DE; Fri, 31 Aug 2018 16:15:47 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 328FB7A14A; Fri, 31 Aug 2018 16:15:47 +0000 (UTC) (envelope-from br@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 13A5B1D8F0; Fri, 31 Aug 2018 16:15:47 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7VGFkna086703; Fri, 31 Aug 2018 16:15:46 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7VGFkbH086702; Fri, 31 Aug 2018 16:15:46 GMT (envelope-from br@FreeBSD.org) Message-Id: <201808311615.w7VGFkbH086702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 31 Aug 2018 16:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338409 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 338409 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 16:15:47 -0000 Author: br Date: Fri Aug 31 16:15:46 2018 New Revision: 338409 URL: https://svnweb.freebsd.org/changeset/base/338409 Log: Fix an integer overflow while setting the kernel address (MODINFO_ADDR). This eliminates build warning and makes kldstat happy. Approved by: re (marius) Modified: head/sys/riscv/riscv/machdep.c Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Fri Aug 31 16:10:01 2018 (r338408) +++ head/sys/riscv/riscv/machdep.c Fri Aug 31 16:15:46 2018 (r338409) @@ -734,13 +734,15 @@ cache_setup(void) vm_offset_t fake_preload_metadata(struct riscv_bootparams *rvbp __unused) { + static uint32_t fake_preload[35]; #ifdef DDB vm_offset_t zstart = 0, zend = 0; #endif vm_offset_t lastaddr; - int i = 0; - static uint32_t fake_preload[35]; + int i; + i = 0; + fake_preload[i++] = MODINFO_NAME; fake_preload[i++] = strlen("kernel") + 1; strcpy((char*)&fake_preload[i++], "kernel"); @@ -751,12 +753,13 @@ fake_preload_metadata(struct riscv_bootparams *rvbp __ i += 3; fake_preload[i++] = MODINFO_ADDR; fake_preload[i++] = sizeof(vm_offset_t); - fake_preload[i++] = (uint64_t)(KERNBASE + KERNENTRY); + *(vm_offset_t *)&fake_preload[i++] = + (vm_offset_t)(KERNBASE + KERNENTRY); i += 1; fake_preload[i++] = MODINFO_SIZE; - fake_preload[i++] = sizeof(uint64_t); - printf("end is 0x%016lx\n", (uint64_t)&end); - fake_preload[i++] = (uint64_t)&end - (uint64_t)(KERNBASE + KERNENTRY); + fake_preload[i++] = sizeof(vm_offset_t); + fake_preload[i++] = (vm_offset_t)&end - + (vm_offset_t)(KERNBASE + KERNENTRY); i += 1; #ifdef DDB #if 0 From owner-svn-src-head@freebsd.org Fri Aug 31 16:29:37 2018 Return-Path: Delivered-To: svn-src-head@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 4A094FD0054; Fri, 31 Aug 2018 16:29:37 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 03B5A7A878; Fri, 31 Aug 2018 16:29:37 +0000 (UTC) (envelope-from gjb@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 D89281DACF; Fri, 31 Aug 2018 16:29:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7VGTa9N092115; Fri, 31 Aug 2018 16:29:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7VGTaOA092114; Fri, 31 Aug 2018 16:29:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201808311629.w7VGTaOA092114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 31 Aug 2018 16:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338410 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 338410 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 16:29:37 -0000 Author: gjb Date: Fri Aug 31 16:29:36 2018 New Revision: 338410 URL: https://svnweb.freebsd.org/changeset/base/338410 Log: Update head from ALPHA3 to ALPHA4 as part of the 12.0-RELEASE cycle. The i386 build failure appears to be transient, and now becoming more difficult to reliably reproduce to identify the cause. I will continue to investigate this, however. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Fri Aug 31 16:15:46 2018 (r338409) +++ head/sys/conf/newvers.sh Fri Aug 31 16:29:36 2018 (r338410) @@ -46,7 +46,7 @@ TYPE="FreeBSD" REVISION="12.0" -BRANCH="ALPHA3" +BRANCH="ALPHA4" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-head@freebsd.org Fri Aug 31 16:32:50 2018 Return-Path: Delivered-To: svn-src-head@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 89249FD02E3; Fri, 31 Aug 2018 16:32:50 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C2E57AD69; Fri, 31 Aug 2018 16:32:50 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-wr1-f67.google.com with SMTP id w11-v6so11767214wrc.5; Fri, 31 Aug 2018 09:32:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y+POgS/gLEeI/hry8NIlAwLhpjPPGVMfBOEN856i3/4=; b=lllj3D81hb6Exv0VsL0qClgrn6zm7u1FUAJ27y4b6IJ+qyntSNVMerUuLC0rkpwQDG tauhoaN2Fg91x79smZt/JFDXeLQwtACp8uJUBTVPkhGal3E50vsG2CzouxK8InKOR2R0 f2Ex+upJ12vwTVjqo9XEASh/btPU4k+CD5R/L0GAPg9bCSxesGjXkJKLeeu0bG4lwly7 yAZ7YpRPl4JUoH8GzEi7O5eGsA9EcE35qzqte1q4SGn8PX3UWJgF0yixBnukJIzl2uBw VXqKEv9l90XSBRRrz0pYsacJalRSEM9ZxNd0zkxB41pqIPs9gBOp8AWwPUhKbH9j5GT8 lLsw== X-Gm-Message-State: APzg51ApeFcZ08M0EXS7UJEmn10pPqsJc64B8ikymLrbI7tfsCNa64Af iQuPzYWIkGlZgjNPoFPNireeZFIm0lxINg/xoi7eiADe X-Google-Smtp-Source: ANB0VdYXT1gumw4kl2VjMhHhsg9oosv3k+y2SRZO1w3ZIAfyQsxbmBQ1crjDH7km+HeUm7GiX9HVbL9TJNkCCzAHVhY= X-Received: by 2002:adf:a196:: with SMTP id u22-v6mr11530925wru.50.1535726173474; Fri, 31 Aug 2018 07:36:13 -0700 (PDT) MIME-Version: 1.0 References: <201808310222.w7V2MYtK052979@repo.freebsd.org> <20180831024607.GE82038@FreeBSD.org> <20180831142009.GG82038@FreeBSD.org> In-Reply-To: <20180831142009.GG82038@FreeBSD.org> From: Li-Wen Hsu Date: Fri, 31 Aug 2018 15:36:02 +0100 Message-ID: Subject: Re: svn commit: r338404 - head/sys/conf To: Glen Barber Cc: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 16:32:50 -0000 On Fri, Aug 31, 2018 at 3:20 PM Glen Barber wrote: > > On Fri, Aug 31, 2018 at 08:51:29AM -0400, Ed Maste wrote: > > On 30 August 2018 at 22:46, Glen Barber wrote: > > > > > > As I look closer at the log, I have a sneaking suspicion this may have > > > been a transient. I'm redoing the i386 build against the original > > > r338401 for i386 alone as a test, if nothing else, to see if it fails in > > > the same place. > > > > What's the failure? > > >>> stage 3.1: building everything > -------------------------------------------------------------- > In file included from /usr/src/sys/kern/genoffset.c:35: > In file included from /usr/src/sys/sys/param.h:96: > /usr/src/sys/sys/types.h:46:10: fatal error: 'machine/endian.h' file not found > #include > ^~~~~~~~~~~~~~~~~~ > 1 error generated. > --- genoffset.o --- > *** [genoffset.o] Error code 1 > > So far, 100% reproducible with an empty /usr/obj/. > > > I see head/i386 is green in CI. > > > > Does CI prune .OBJDIR for each build? Yes, each build is a clean build for now. More precisely, each build happens in a fresh jail and will be thrown away after the build. Many people ask for incremental build to speed up but that takes some further work. The current plan is still to have clean build but run less frequently after having incremental build for catching dependence or race problems. Best, Li-Wen -- Li-Wen Hsu https://lwhsu.org From owner-svn-src-head@freebsd.org Fri Aug 31 16:34:06 2018 Return-Path: Delivered-To: svn-src-head@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 812CBFD03D5 for ; Fri, 31 Aug 2018 16:34:06 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-21.consmr.mail.ne1.yahoo.com (sonic306-21.consmr.mail.ne1.yahoo.com [66.163.189.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 223AB7AF06 for ; Fri, 31 Aug 2018 16:34:05 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 2yETvfsVM1kLVhb3lTKO0DJCrA5KkAnYnZQWgMItArw1Ufo8LeUONGwevhJlGdU IhMTDh8SyQikokWSXbd0bES1vTLkCcPSc8CmqE4sjWyjjUXsYGE.mLNd8P.tEM_zGnKQ3Q9ycecj V5lQL97HxT419ugudCwckeEaRGZgNb0J1rIQA2iInKUS2gHOjdRvLcjIIWz7AvlVvG9FG5EuMRKP iLu_tnJJmaKdckPWmdeF2S.RhMwT46T3gfrl64KEevlXMIPCruZRticnirXW5RBLIIHyal4HClO6 GRk3HleICQfrwqZDJxRlXuoHN2qqNvQAejI1NZQwWJTQWvmBiEdABVg91bs7dWGypkVv6iX_FNWe nRQz6N0KgYEGahBIhH9P0blG3SE9XG32kLKVL7uQNxf44BIF7QAmY6d6TW7uKckJTbQLAdWiPH.. zjtdcyXTu234XcmLkWs3luf5urfdlyT9iFRwEwJ5rNtvgvxkpxPSuHD4QtQGpdmDSSx8lF7qCqUy uiOJ9UpzeQg58snPdo75Ohc5tm6s0inzBq3RGTHVJnLLSKW0pLV9SOPYgKd1OuX_p_WGxJtD6yxI qJ168w.AJHiKsje1ZokEX15a9QbyYaMq6sV3TAZ4VH4AXUbWzPKkns2byrAUwNka9YKXX2x_RIGj _0CLAE1cYbTFUCXqzk0KlHyuhrhVg465W_DuVncjHEshxbAiSC8vOkJ43cysFDtQmBj5tb8NM46d YP2Qs0Z2I2NoVi_j7jvJIaJmaT6PmDgrghNeHxCivI1nedFUh2blZ3xkcygAuc1aS_ktU074B043 SbyHtqqfxEUa7SlDjqCSAiar9zErs2Kn__se5J8CTO4BZqPM8KBiaSbw6c2pJCIIjqPyc_LQPsqi DTIoZY4Hg13nnzPTkkkjqLGafDXfytB1iHE8S7poEAO4M95HTOz.phu2CeRi0JEB0UUvkcyuF_WX nVAMoC8ktPxjvlSLE665IIv5G2QuA9ci3vgaXAvIdsb09qxcVc5bZxpREfzEm.kyyuG35w3crLHU yXLq5DLg1nDbE Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Fri, 31 Aug 2018 16:34:05 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp432.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID d8a9fc476221b245b69d644861c8c38c; Fri, 31 Aug 2018 16:34:02 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r338404 - head/sys/conf Message-Id: <46CC762D-410A-4A23-902F-89452565B34D@yahoo.com> Date: Fri, 31 Aug 2018 09:34:00 -0700 To: gjb@freebsd.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 16:34:06 -0000 On Fri, Aug 31, 2018 at 02:20:09PM +0000, Glen Barber wrote: > > On Fri, Aug 31, 2018 at 08:51:29AM -0400, Ed Maste wrote: > > > On 30 August 2018 at 22:46, Glen Barber = wrote: > > > > > > > > As I look closer at the log, I have a sneaking suspicion this = may have > > > > been a transient. I'm redoing the i386 build against the = original > > > > r338401 for i386 alone as a test, if nothing else, to see if it = fails in > > > > the same place. > > >=20 > > > What's the failure? > >=20 > > >>> stage 3.1: building everything > > -------------------------------------------------------------- > > In file included from /usr/src/sys/kern/genoffset.c:35: > > In file included from /usr/src/sys/sys/param.h:96: > > /usr/src/sys/sys/types.h:46:10: fatal error: 'machine/endian.h' = file not found > > #include > > ^~~~~~~~~~~~~~~~~~ > > 1 error generated. > > --- genoffset.o --- > > *** [genoffset.o] Error code 1 > >=20 > > So far, 100% reproducible with an empty /usr/obj/. > >=20 > > > I see head/i386 is green in CI. > > >=20 > >=20 > > Does CI prune .OBJDIR for each build? > >=20 >=20 > Make that 75% reproducible. I suspect there is a build race = occurring. ci.freebsd.org occasionally shows examples of this race. For example: https://ci.freebsd.org/job/FreeBSD-head-powerpc-build/7454/consoleText shows: --- genoffset.o --- /usr/src/sys/sys/types.h:46:28: error: machine/endian.h: No such file or = directory *** [genoffset.o] Error code 1 for -r338319 but the prior build (for -r338318) and following build (for -r338320) worked fine. -r338319 was for something that should make no difference to the issue: QUOTE Remove trailing slash in pathname so that valid METALOG is created in = the NO_ROOT case of make packages. END QUOTE I've seen other occasional examples. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Fri Aug 31 16:40:55 2018 Return-Path: Delivered-To: svn-src-head@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 5D851FD04F9 for ; Fri, 31 Aug 2018 16:40:55 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1AF4C7B187; Fri, 31 Aug 2018 16:40:55 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id D51462794; Fri, 31 Aug 2018 16:40:54 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Fri, 31 Aug 2018 16:40:52 +0000 From: Glen Barber To: Mark Millard Cc: svn-src-head@freebsd.org Subject: Re: svn commit: r338404 - head/sys/conf Message-ID: <20180831164052.GI82038@FreeBSD.org> References: <46CC762D-410A-4A23-902F-89452565B34D@yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qih7n4MdZQ4fb9uN" Content-Disposition: inline In-Reply-To: <46CC762D-410A-4A23-902F-89452565B34D@yahoo.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 16:40:55 -0000 --qih7n4MdZQ4fb9uN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 31, 2018 at 09:34:00AM -0700, Mark Millard wrote: > On Fri, Aug 31, 2018 at 02:20:09PM +0000, Glen Barber wrote: > > > On Fri, Aug 31, 2018 at 08:51:29AM -0400, Ed Maste wrote: > > > > On 30 August 2018 at 22:46, Glen Barber wrote: > > > > > > > > > > As I look closer at the log, I have a sneaking suspicion this may= have > > > > > been a transient. I'm redoing the i386 build against the original > > > > > r338401 for i386 alone as a test, if nothing else, to see if it f= ails in > > > > > the same place. > > > >=20 > > > > What's the failure? > > >=20 > > > >>> stage 3.1: building everything > > > -------------------------------------------------------------- > > > In file included from /usr/src/sys/kern/genoffset.c:35: > > > In file included from /usr/src/sys/sys/param.h:96: > > > /usr/src/sys/sys/types.h:46:10: fatal error: 'machine/endian.h' file= not found > > > #include > > > ^~~~~~~~~~~~~~~~~~ > > > 1 error generated. > > > --- genoffset.o --- > > > *** [genoffset.o] Error code 1 > > >=20 > > > So far, 100% reproducible with an empty /usr/obj/. > > >=20 > > > > I see head/i386 is green in CI. > > > >=20 > > >=20 > > > Does CI prune .OBJDIR for each build? > > >=20 > >=20 > > Make that 75% reproducible. I suspect there is a build race occurring. >=20 > ci.freebsd.org occasionally shows examples of this race. For example: >=20 > https://ci.freebsd.org/job/FreeBSD-head-powerpc-build/7454/consoleText >=20 > shows: >=20 > --- genoffset.o --- > /usr/src/sys/sys/types.h:46:28: error: machine/endian.h: No such file or = directory > *** [genoffset.o] Error code 1 >=20 > for -r338319 but the prior build (for -r338318) and > following build (for -r338320) worked fine. >=20 > -r338319 was for something that should make no difference > to the issue: >=20 > QUOTE > Remove trailing slash in pathname so that valid METALOG is created in the > NO_ROOT case of make packages. > END QUOTE >=20 > I've seen other occasional examples. >=20 Thanks for the link to this specific failure. I see nothing in that range of commits that should have any impact here. What caused me to back out the ALPHA rename is this is the first time I've seen this since the code freeze started, and following the first failure, restarted the builds with the same result. I'll go poking around at the CI console output to try to find when the first occurrence happened. Glen --qih7n4MdZQ4fb9uN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAluJb44ACgkQAxRYpUeP 4pPpfBAAowwGDPpaI5oGeEFBocq++foIIYh4ykeM5nn1FLOX1gIKgULD3FZGZHtI lHDwAdEfn52JNZ9gwGFGpkJApqmHKMhqncA4LLUsXLMrOtsKHUKn7kkvLdkNNcY7 7z+eH7/vQN+jqo7T4V/tjlcdifPdO6DegEmjDVi2ivfZ726BcbwnRdC3z+fh2jiE POAApGCheSTh5KDdiK/oZ8WlnlkLUMHAcIQbx9T96NLYAhZP+cknuIeXtzbtXWle 2kwo3Rpaim8OTDlKcWb1TokX2uD3s8jEpOG1TUQA8E7XdFslHGCp4Thnayu+JyaZ KY8yJRwzdOn3SUexcEnmTIZICqhoKQqW0cJHH/vqDZeigumk4iv8PaaCYZJJj3Vo U+9jaeIJ5QQPHx0Lox74sccekjdZYUOUDD5x+AaWXp4BgGAkvMm3w2OYmsn6xEC9 p60mvX8g2cDr8TyPS13CuhQk+q4w+6d8sy+/LnOe8h00LgHsmDWItragZtBg42dF RCTPHk722i14uYEFrWG5fv1dBYTvecpj5ljHNgmKDy+DbmRQsjy3vg9E5Jbu3Y4Q L2Pj9ZRFCKF/v2BmgtWLlY2bFQc8AEpTjaEdPiSkqIdx+kg/O7lWeXaf8HczQYru bAG5KJYgw23xjs2d7/5kyA7xTmdyOYPxeZLabLawvF3bP26bGr8= =5Vcg -----END PGP SIGNATURE----- --qih7n4MdZQ4fb9uN-- From owner-svn-src-head@freebsd.org Fri Aug 31 17:31:55 2018 Return-Path: Delivered-To: svn-src-head@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 80A11FD1717 for ; Fri, 31 Aug 2018 17:31:55 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-4.consmr.mail.bf2.yahoo.com (sonic302-4.consmr.mail.bf2.yahoo.com [74.6.135.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C76A7CF61 for ; Fri, 31 Aug 2018 17:31:55 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: zuNFf08VM1kXqhFO2hwGmHOXbmuSn2ZmBaw4l92xHhfDm2uz1BHuRL.Z5s0M.fe 6daYstnkHuzgk7oDzOU5DLnjkoxM9ABzliAlDcQhayepETqCWHaTu2Me1oho4ohO_usIPYB4VfJU 48icq5WjBOD9kMUc1HZ1KA.b0_O78HlbELuZLG0NmmjCahwOz_oGndrCxVAHfwqLd2ZjZ4EwMM0g hap4d1WNJt74038uB3t4jZuuFQCuDJL1CSHX.U4b6NXqqLVN1mVpJBuBxBboOWgVm5.X84tgvh9A E2fe4YKWgGnBfst30_yOchmKLveOp.RkaLjHclwJJP5nTJ4QzTSBKrPbf3hdf4Vhw0lAvevjp.0. 8RmuGqVv3ruJufXKB07.lcEGGf3TrXwLkyPohpgFl_KisjIJTlNqXp46z5yVk4.kjUnADbWY8Hm9 ed.ouqGS6Yv7NPzjtgi1XQL2GTBY.aJDoqUVGbN_Ln4UHscXBr2JLlnVUe5YuN_kqyobRzmZXQVk n0fw7mwgC71hp9bCJRcvsjwrogUP5WI0_yySzPZ_Egu12_MtsbrpnP4LK4YQLYDqDtlWxOvo64No f1VnjOHQGDJWDDw99rDxsj9yEH4rqtB4JUpBCF7abT.lhR_Xs_6OrkAhtLsikNz4VQVrK3.afV5k z5NbJ4kFAq17heduJeTD3exL.O4yYLG7YvE8Q9ooy1QF_k_TSSjh9.OnD71ZTqD7XHwVl8PCERCZ hG6A_izYxhJ8S3iMRTxwbs1VZ5xcbWkYvXj3yOYaMZ1eQ.Dqsb353tRgul9HfOR_Yqvh2o5V7WE0 VhA2Uuut9lgvX2jBkYeic8sDD7FqfzKg4J8aoDUm0nDjATReRma2W5Q_gEFsS248yzpUU.DkJ0gM WFD9uCm1tp7tRWIF2.OCTsSGseTZzLbfh2DD9cEHcXC78cpVDSacnE5SD54aBWbKhiBJ2yj5kmSR yE7.6rOlWqH1q1Rr6sKOMgcLQ0tYRl9sGogi3TATAr730yQv_P6D5uTDpKlrQah0W4k.1FiKkR4c - Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.bf2.yahoo.com with HTTP; Fri, 31 Aug 2018 17:31:54 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp420.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID b3ccf02a5d128df493245602b99e663a; Fri, 31 Aug 2018 17:31:50 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r338404 - head/sys/conf From: Mark Millard In-Reply-To: <20180831164052.GI82038@FreeBSD.org> Date: Fri, 31 Aug 2018 10:31:48 -0700 Cc: svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <46CC762D-410A-4A23-902F-89452565B34D@yahoo.com> <20180831164052.GI82038@FreeBSD.org> To: Glen Barber X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 17:31:55 -0000 On 2018-Aug-31, at 9:40 AM, Glen Barber wrote: > On Fri, Aug 31, 2018 at 09:34:00AM -0700, Mark Millard wrote: >> On Fri, Aug 31, 2018 at 02:20:09PM +0000, Glen Barber wrote: >>>> On Fri, Aug 31, 2018 at 08:51:29AM -0400, Ed Maste wrote: >>>>> On 30 August 2018 at 22:46, Glen Barber = wrote: >>>>>>=20 >>>>>> As I look closer at the log, I have a sneaking suspicion this may = have >>>>>> been a transient. I'm redoing the i386 build against the = original >>>>>> r338401 for i386 alone as a test, if nothing else, to see if it = fails in >>>>>> the same place. >>>>>=20 >>>>> What's the failure? >>>>=20 >>>>>>> stage 3.1: building everything >>>> -------------------------------------------------------------- >>>> In file included from /usr/src/sys/kern/genoffset.c:35: >>>> In file included from /usr/src/sys/sys/param.h:96: >>>> /usr/src/sys/sys/types.h:46:10: fatal error: 'machine/endian.h' = file not found >>>> #include >>>> ^~~~~~~~~~~~~~~~~~ >>>> 1 error generated. >>>> --- genoffset.o --- >>>> *** [genoffset.o] Error code 1 >>>>=20 >>>> So far, 100% reproducible with an empty /usr/obj/. >>>>=20 >>>>> I see head/i386 is green in CI. >>>>>=20 >>>>=20 >>>> Does CI prune .OBJDIR for each build? >>>>=20 >>>=20 >>> Make that 75% reproducible. I suspect there is a build race = occurring. >>=20 >> ci.freebsd.org occasionally shows examples of this race. For example: >>=20 >> = https://ci.freebsd.org/job/FreeBSD-head-powerpc-build/7454/consoleText >>=20 >> shows: >>=20 >> --- genoffset.o --- >> /usr/src/sys/sys/types.h:46:28: error: machine/endian.h: No such file = or directory >> *** [genoffset.o] Error code 1 >>=20 >> for -r338319 but the prior build (for -r338318) and >> following build (for -r338320) worked fine. >>=20 >> -r338319 was for something that should make no difference >> to the issue: >>=20 >> QUOTE >> Remove trailing slash in pathname so that valid METALOG is created in = the >> NO_ROOT case of make packages. >> END QUOTE >>=20 >> I've seen other occasional examples. >>=20 >=20 > Thanks for the link to this specific failure. I see nothing in that > range of commits that should have any impact here. What caused me to > back out the ALPHA rename is this is the first time I've seen this = since > the code freeze started, and following the first failure, restarted = the > builds with the same result. >=20 > I'll go poking around at the CI console output to try to find when the > first occurrence happened. Other than I'd seen the one on ci.free.org recently and thought "oh, that again" and "although its been a long time", I think the failures have been rare enough that without an archive of files to search automatically, it would not be practical to find examples via just looking around via the web interface for ci.freebsd.org . I've seen rare failures in personal builds. But most of my personal builds are incremental where a old file would be around. So I expect more rare for this context. But I do not remember the ci.freebsd.org vs. personal status for the one I saw prior to the one that I reported --or when. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Fri Aug 31 18:10:13 2018 Return-Path: Delivered-To: svn-src-head@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 A9638FD3D20 for ; Fri, 31 Aug 2018 18:10:13 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61D047E8EB; Fri, 31 Aug 2018 18:10:13 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 1FBAF40AA; Fri, 31 Aug 2018 18:10:13 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Fri, 31 Aug 2018 18:10:10 +0000 From: Glen Barber To: svn-src-head@freebsd.org Subject: Re: svn commit: r338404 - head/sys/conf Message-ID: <20180831181010.GK82038@FreeBSD.org> References: <46CC762D-410A-4A23-902F-89452565B34D@yahoo.com> <20180831164052.GI82038@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rxd0khGtqYUbFQFd" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 18:10:13 -0000 --rxd0khGtqYUbFQFd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Trimmed Mark's last reply, to provide more verbose output from the sparc64 build that failed just now with the same error, but more verbosity. >>> stage 3.1: building everything -------------------------------------------------------------- In file included from /usr/src/sys/sys/param.h:96, from /usr/src/sys/kern/genoffset.c:35: /usr/src/sys/sys/types.h:46:28: error: machine/endian.h: No such file or directory In file included from /usr/src/sys/sys/types.h:47, from /usr/src/sys/sys/param.h:96, from /usr/src/sys/kern/genoffset.c:35: /usr/src/sys/sys/_types.h:35:28: error: machine/_types.h: No such file or directory In file included from /usr/src/sys/sys/types.h:47, from /usr/src/sys/sys/param.h:96, from /usr/src/sys/kern/genoffset.c:35: /usr/src/sys/sys/_types.h:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__blksize_t' /usr/src/sys/sys/_types.h:41: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__blkcnt_t' /usr/src/sys/sys/_types.h:42: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__clockid_t' /usr/src/sys/sys/_types.h:43: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__fflags_t' /usr/src/sys/sys/_types.h:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__fsblkcnt_t' /usr/src/sys/sys/_types.h:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__fsfilcnt_t' /usr/src/sys/sys/_types.h:46: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gid_t' /usr/src/sys/sys/_types.h:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__id_t' /usr/src/sys/sys/_types.h:48: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__ino_t' /usr/src/sys/sys/_types.h:50: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__lwpid_t' /usr/src/sys/sys/_types.h:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__mode_t' /usr/src/sys/sys/_types.h:54: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__nlink_t' /usr/src/sys/sys/_types.h:55: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__off_t' /usr/src/sys/sys/_types.h:56: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__off64_t' /usr/src/sys/sys/_types.h:57: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__pid_t' /usr/src/sys/sys/_types.h:58: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__rlim_t' /usr/src/sys/sys/_types.h:61: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__sa_family_t' /usr/src/sys/sys/_types.h:62: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__socklen_t' /usr/src/sys/sys/_types.h:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__uid_t' /usr/src/sys/sys/_types.h:96: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__char16_t' /usr/src/sys/sys/_types.h:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__char32_t' /usr/src/sys/sys/_types.h:112: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__dev_t' /usr/src/sys/sys/_types.h:114: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__fixpt_t' /usr/src/sys/sys/_types.h:122: error: expected specifier-qualifier-list before '__int64_t' /usr/src/sys/sys/_types.h:125: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__rman_res_t' In file included from /usr/src/sys/sys/types.h:65, from /usr/src/sys/sys/param.h:96, from /usr/src/sys/kern/genoffset.c:35: [...] /usr/src/sys/kern/genoffset.c:43: warning: type defaults to 'int' in declaration of 'type name' /usr/src/sys/kern/genoffset.c:44: error: 'struct thread' has no member named 'td_owepreempt' /usr/src/sys/kern/genoffset.c:44: error: 'struct thread' has no member named 'td_owepreempt' /usr/src/sys/kern/genoffset.c:44: error: 'struct thread' has no member named 'td_owepreempt' /usr/src/sys/kern/genoffset.c:44: error: 'struct thread' has no member named 'td_owepreempt' /usr/src/sys/kern/genoffset.c:44: error: 'struct thread' has no member named 'td_owepreempt' /usr/src/sys/kern/genoffset.c:44: error: 'struct thread' has no member named 'td_owepreempt' /usr/src/sys/kern/genoffset.c:44: error: 'struct thread' has no member named 'td_owepreempt' /usr/src/sys/kern/genoffset.c:44: error: 'struct thread' has no member named 'td_owepreempt' /usr/src/sys/kern/genoffset.c:44: error: 'struct thread' has no member named 'td_owepreempt' /usr/src/sys/kern/genoffset.c:44: error: 'struct thread' has no member named 'td_owepreempt' /usr/src/sys/kern/genoffset.c:44: error: 'struct thread' has no member named 'td_owepreempt' /usr/src/sys/kern/genoffset.c:44: error: 'struct thread' has no member named 'td_owepreempt' /usr/src/sys/kern/genoffset.c:44: error: 'struct thread' has no member named 'td_owepreempt' /usr/src/sys/kern/genoffset.c:44: error: 'struct thread' has no member named 'td_owepreempt' /usr/src/sys/kern/genoffset.c:44: warning: type defaults to 'int' in declaration of 'type name' /usr/src/sys/kern/genoffset.c:44: error: size of array '__assert_5' is negative --- genoffset.o --- *** [genoffset.o] Error code 1 make[2]: stopped in /usr/obj/usr/src/sparc64.sparc64/sys/GENERIC A failure has been detected in another branch of the parallel make Glen --rxd0khGtqYUbFQFd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAluJhIIACgkQAxRYpUeP 4pP8mRAAh2QfVjNeInTUBRlaYIAuROug5CddiINJb+rphNWJfbFLzHYijf/vVOJ7 82+uTIMtxmcrcuHwZCXjVKw39hlATSAsUuW0Rtv3/ySZ+pk2qFgWTT9uOh/LU0hI YG+VLOeXjsvVDodPbYRsfLtkstmp32VNTW2JCBNz/Iw5EGwBdXEsW+EQo2vKTCgL QDew2oMKaEa4QI/mUijICMACvWa0B99VGDYJE4Kz7RUdn3gThOZNt+8+apc2D102 0U2k2Yr3VXZqf+l/y4QtfDTphtSOZxkCEVdDV8mANo7I2eIOM9ww0RJTPASF/zyB CzxEY2bFuhUpN9fmra8nt7FirzEvfBLsvXWed+Nc4Bq+vn2+1LkRaJvbp6+8XVlz fz0YhZsztwnQS506mlJ4B9ZRvX6QhtViYSQ2sCZtF81DQR4fzihdz3sBud7LfdhD FKZnhhnTnz8oVhzJzRrOGY9yK0dRVHn4n85Iq26RGRYMj4WCFFowyk2q9ZsJQgAH b43R6ynOXynHwHQxtu35C9nnNBeWlGiVaoVYm4PVsmX8Lpmzd84TqDhM2uuQBfEI 1JO2Spto9KJY1hMYL54W7vrTPfFymr5gOo38mCh5KrDhUUAINWVeDcKw4xH4NFUr rpyzSbQAGLOTGkDg4bbdgnjlQWtrp7NRkBGenp3rBnlRmtVix9M= =mP24 -----END PGP SIGNATURE----- --rxd0khGtqYUbFQFd-- From owner-svn-src-head@freebsd.org Fri Aug 31 18:26:38 2018 Return-Path: Delivered-To: svn-src-head@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 90569FD422F; Fri, 31 Aug 2018 18:26:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 490ED7F7A4; Fri, 31 Aug 2018 18:26:38 +0000 (UTC) (envelope-from jhb@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 2627B1EE9F; Fri, 31 Aug 2018 18:26:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7VIQcj6055426; Fri, 31 Aug 2018 18:26:38 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7VIQbmX055425; Fri, 31 Aug 2018 18:26:37 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201808311826.w7VIQbmX055425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 31 Aug 2018 18:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338415 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 338415 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 18:26:38 -0000 Author: jhb Date: Fri Aug 31 18:26:37 2018 New Revision: 338415 URL: https://svnweb.freebsd.org/changeset/base/338415 Log: Fix build of x86 UP kernels after dynamic IRQ changes in r338360. Reported by: Ian FREISLICH Approved by: re (gjb) MFC after: 2 weeks Modified: head/sys/x86/x86/intr_machdep.c Modified: head/sys/x86/x86/intr_machdep.c ============================================================================== --- head/sys/x86/x86/intr_machdep.c Fri Aug 31 17:36:45 2018 (r338414) +++ head/sys/x86/x86/intr_machdep.c Fri Aug 31 18:26:37 2018 (r338415) @@ -173,8 +173,10 @@ intr_init_sources(void *arg) interrupt_sources = mallocarray(num_io_irqs, sizeof(*interrupt_sources), M_INTR, M_WAITOK | M_ZERO); +#ifdef SMP interrupt_sorted = mallocarray(num_io_irqs, sizeof(*interrupt_sorted), M_INTR, M_WAITOK | M_ZERO); +#endif /* * - 1 ??? dummy counter. From owner-svn-src-head@freebsd.org Fri Aug 31 19:43:51 2018 Return-Path: Delivered-To: svn-src-head@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 C3FEAFDA538 for ; Fri, 31 Aug 2018 19:43:51 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-20.consmr.mail.gq1.yahoo.com (sonic313-20.consmr.mail.gq1.yahoo.com [98.137.65.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C23C82445 for ; Fri, 31 Aug 2018 19:43:51 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: sq4bEoQVM1mc6wunzcZqfTyzBEdfKhOTkSXRJPP02Cqe58jF.t.G8ZRYDKj175D MUI_fyYYCr.OSVgPqtx34xdmK68hcQQRPxCkd1N4Wp2PZAMRV993RXpEgIrIoe_cQyocuZu6V9sa 4yc02Xxd34pr82jnGafnuf9aOS76rWKGSfAq6cQD1ireCHjzDlAbgZOhaoinneR0C4zQbGOoS2nx 529UPhiZo4RMgtHOL9L4SMo1zjtfnwZTLyMHgJnf_PCLECyKUdH5.6ROPCmWRGtIK90cL_3uhTKp 598DlMfSg5FzigchhvdqPEqvcwZB4N1G3mIddHe7ACeEnRycYn3.YdE1pvpZgDnS6sUxmcEtlgBo MBMfWCESpc7U6s3HcEFdzRqYnKca0yo8MTAm3L95fKj2h9r_bXGKPl1gxHVnsiVVZT.MW5q67C2i rfRl9DDolfdPtZSfRup5dGSoxwe0ccdvbPeGrNvpejdHB9plmeMvXKEpSS402.m4aPCsaiS9vgea gIjIo0SsXybceOYElICPmXI94jnqo21KXoM1Sj2eQrLHgqiH82mcju3d4vFoPw3zBYH_KL7Ri9F. wQXkclsusv9PrrFzulLLdbHyGQ20xsrovV0A3pQPKF4Aw14vpRcQ8CoXJynoWNFS6PiVg7nPW2Bh HrjvfhGQXomFbAD84FJHXRc5fVcQVDkTt8LQgBYvBq9LJ658H1CZJlUGEow4smiJnrbOifrp5v8d M5YoL.d1Ai1kvcoqiRhRBUkQQ53AZijG.w5aQLILFNe30htg_X_uaJ7g9FqTR31Y5BL_pfhPw10S FWfRsoh95xWiA2lqNysek6Is4I0.ZmYGUl7_L8VV9AwoydKLvWyQs8rFFo2FoGINwtCG1Gi3qfqU .c45WhnWoc4s5nSx9EfDS84vsbqsQ4GWuVx50MppaFyqUejrFzg8aLYEllNKDaNDeueTwwKQES9K 4MZFhmP4k5w.CNTw28LfDkCxesGZ_GBHN3ItugUWrx3.jlIX2YWw4r8qy6vCF.xRooCCRcEyNK91 CBLifZxVc Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Fri, 31 Aug 2018 19:43:49 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp420.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 6299e54f8e5e7b4f0361c24a22a4ea94; Fri, 31 Aug 2018 19:33:38 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r338400 - head/release/tools Message-Id: Date: Fri, 31 Aug 2018 12:33:37 -0700 To: kevans@FreeBSD.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 19:43:51 -0000 I'm not sure if the following is intended or not. I tried using beastie_disable=3D"YES" loader_color=3D"NO" in boot/loader.conf on head -r338341 . The default colors are still changed during: (some characters are filtered out) QUOTE Setting currdev to disk2p2: = /=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08= |=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08= \=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08= -=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08= /=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08=1B= [0;37;40m\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\= =08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08= -=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08= /=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08= |=08Loading /boot/defaults/loader.conf END QUOTE (Note the =08=1B[0;37;40m in the long line: White FG code and Black BG = code.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Fri Aug 31 19:46:38 2018 Return-Path: Delivered-To: svn-src-head@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 1940CFDA661 for ; Fri, 31 Aug 2018 19:46:38 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCDBB8262C for ; Fri, 31 Aug 2018 19:46:37 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 5C8F190E2 for ; Fri, 31 Aug 2018 19:46:37 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f180.google.com with SMTP id u83-v6so10930673lje.12 for ; Fri, 31 Aug 2018 12:46:37 -0700 (PDT) X-Gm-Message-State: APzg51AVMWAOMEFXR/lvbpokCKP9htTJsztEeanAR5Ugaps2iLpOHOBL leLHR69xFxWd1qQEbv8/+1QtqLFdrwgJKbr4Cto= X-Google-Smtp-Source: ANB0VdZ15NYNdVHwS9amAdxmCWFD+O7qSRldBAh7K3TegdVtyOREv6LFZtHUKh3Hn2+nzE7QdSncQU+FhKaIoPENFfk= X-Received: by 2002:a2e:2e02:: with SMTP id u2-v6mr11740933lju.77.1535744795960; Fri, 31 Aug 2018 12:46:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kyle Evans Date: Fri, 31 Aug 2018 14:46:23 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r338400 - head/release/tools To: marklmi@yahoo.com Cc: svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 19:46:38 -0000 On Fri, Aug 31, 2018 at 2:44 PM Mark Millard wrote: > > I'm not sure if the following is intended or not. > > I tried using > > beastie_disable="YES" > loader_color="NO" > > in boot/loader.conf on head -r338341 . > Usage of loader_color was fixed in r338394 so that color reset happens after config is read in. Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Fri Aug 31 21:45:06 2018 Return-Path: Delivered-To: svn-src-head@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 D8E71FDDA54; Fri, 31 Aug 2018 21:45:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 857AA86981; Fri, 31 Aug 2018 21:45:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6628420EB5; Fri, 31 Aug 2018 21:45:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7VLj6Ua059160; Fri, 31 Aug 2018 21:45:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7VLj6pp059159; Fri, 31 Aug 2018 21:45:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808312145.w7VLj6pp059159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 31 Aug 2018 21:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338416 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 338416 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 21:45:07 -0000 Author: markj Date: Fri Aug 31 21:45:05 2018 New Revision: 338416 URL: https://svnweb.freebsd.org/changeset/base/338416 Log: Re-compute the ARC size before computing the MFU target. This fixes an upstream regression introduced in r331404, causing overly aggressive reclamation of the ARC when under pressure. Diagnosed by: Paul Approved by: re (gjb) MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Aug 31 18:26:37 2018 (r338415) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Aug 31 21:45:05 2018 (r338416) @@ -4447,6 +4447,12 @@ arc_adjust(void) } /* + * Re-sum ARC stats after the first round of evictions. + */ + asize = aggsum_value(&arc_size); + ameta = aggsum_value(&arc_meta_used); + + /* * Adjust MFU size * * Now that we've tried to evict enough from the MRU to get its From owner-svn-src-head@freebsd.org Sat Sep 1 02:22:29 2018 Return-Path: Delivered-To: svn-src-head@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 C7573FDA2FA; Sat, 1 Sep 2018 02:22:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8208091464; Sat, 1 Sep 2018 02:22:28 +0000 (UTC) (envelope-from kevans@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 6479C23C9F; Sat, 1 Sep 2018 02:22:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w812MSs6006153; Sat, 1 Sep 2018 02:22:28 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w812MRc5006148; Sat, 1 Sep 2018 02:22:27 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201809010222.w812MRc5006148@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 1 Sep 2018 02:22:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338417 - head/lib/libbe X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libbe X-SVN-Commit-Revision: 338417 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2018 02:22:29 -0000 Author: kevans Date: Sat Sep 1 02:22:26 2018 New Revision: 338417 URL: https://svnweb.freebsd.org/changeset/base/338417 Log: libbe(3): Fix error handling with respect to be_exists Some paths through be_exists will set the error state, others will not There are multiple reasons that a call can fail, so clean it up a bit: all paths now return an appropriate error code so the caller can attempt to distinguish between a BE legitimately not existing and just having the wrong mountpoint. The caller is expected to bubble the error through to the internal error handler as needed. This fixes some unfriendliness with bectl(8)'s activate subcommand, where it might fail due to a bad mountpoint but the only message output is a generic "failed to activate" message. Approved by: re (gjb) Modified: head/lib/libbe/be.c head/lib/libbe/be.h head/lib/libbe/be_access.c head/lib/libbe/be_error.c head/lib/libbe/be_info.c head/lib/libbe/libbe.3 Modified: head/lib/libbe/be.c ============================================================================== --- head/lib/libbe/be.c Fri Aug 31 21:45:05 2018 (r338416) +++ head/lib/libbe/be.c Sat Sep 1 02:22:26 2018 (r338417) @@ -270,8 +270,8 @@ be_snapshot(libbe_handle_t *lbh, const char *source, c be_root_concat(lbh, source, buf); - if (!be_exists(lbh, buf)) - return (BE_ERR_NOENT); + if ((err = be_exists(lbh, buf)) != 0) + return (set_error(lbh, err)); if (snap_name != NULL) { if (strlcat(buf, "@", sizeof(buf)) >= sizeof(buf)) @@ -528,10 +528,10 @@ be_validate_snap(libbe_handle_t *lbh, const char *snap if ((err = zfs_prop_get(zfs_hdl, ZFS_PROP_MOUNTPOINT, buf, sizeof(buf), NULL, NULL, 0, 1)) != 0) - err = BE_ERR_INVORIGIN; + err = BE_ERR_BADMOUNT; if ((err != 0) && (strncmp(buf, "/", sizeof(buf)) != 0)) - err = BE_ERR_INVORIGIN; + err = BE_ERR_BADMOUNT; zfs_close(zfs_hdl); @@ -935,8 +935,8 @@ be_activate(libbe_handle_t *lbh, const char *bootenv, be_root_concat(lbh, bootenv, be_path); /* Note: be_exists fails if mountpoint is not / */ - if (!be_exists(lbh, be_path)) - return (BE_ERR_NOENT); + if ((err = be_exists(lbh, be_path)) != 0) + return (set_error(lbh, err)); if (temporary) { config = zpool_get_config(lbh->active_phandle, NULL); Modified: head/lib/libbe/be.h ============================================================================== --- head/lib/libbe/be.h Fri Aug 31 21:45:05 2018 (r338416) +++ head/lib/libbe/be.h Sat Sep 1 02:22:26 2018 (r338417) @@ -49,7 +49,7 @@ typedef enum be_error { BE_ERR_BADPATH, /* path not suitable for operation */ BE_ERR_PATHBUSY, /* requested path is busy */ BE_ERR_PATHLEN, /* provided name exceeds maximum length limit */ - BE_ERR_INVORIGIN, /* snapshot origin's mountpoint is not '/' */ + BE_ERR_BADMOUNT, /* mountpoint is not '/' */ BE_ERR_NOORIGIN, /* could not open snapshot's origin */ BE_ERR_MOUNTED, /* boot environment is already mounted */ BE_ERR_NOMOUNT, /* boot environment is not mounted */ @@ -118,7 +118,7 @@ void libbe_print_on_error(libbe_handle_t *, bool); int be_root_concat(libbe_handle_t *, const char *, char *); int be_validate_name(libbe_handle_t * __unused, const char *); int be_validate_snap(libbe_handle_t *, const char *); -bool be_exists(libbe_handle_t *, char *); +int be_exists(libbe_handle_t *, char *); int be_export(libbe_handle_t *, const char *, int fd); int be_import(libbe_handle_t *, const char *, int fd); Modified: head/lib/libbe/be_access.c ============================================================================== --- head/lib/libbe/be_access.c Fri Aug 31 21:45:05 2018 (r338416) +++ head/lib/libbe/be_access.c Sat Sep 1 02:22:26 2018 (r338417) @@ -114,8 +114,8 @@ be_mount(libbe_handle_t *lbh, char *bootenv, char *mou if ((err = be_root_concat(lbh, bootenv, be)) != 0) return (set_error(lbh, err)); - if (!be_exists(lbh, bootenv)) - return (set_error(lbh, BE_ERR_NOENT)); + if ((err = be_exists(lbh, bootenv)) != 0) + return (set_error(lbh, err)); if (is_mounted(lbh->lzh, be, NULL)) return (set_error(lbh, BE_ERR_MOUNTED)); Modified: head/lib/libbe/be_error.c ============================================================================== --- head/lib/libbe/be_error.c Fri Aug 31 21:45:05 2018 (r338416) +++ head/lib/libbe/be_error.c Sat Sep 1 02:22:26 2018 (r338417) @@ -75,8 +75,8 @@ libbe_error_description(libbe_handle_t *lbh) case BE_ERR_PATHLEN: return ("provided path name exceeds maximum length limit"); - case BE_ERR_INVORIGIN: - return ("snapshot origin's mountpoint is not \"/\""); + case BE_ERR_BADMOUNT: + return ("mountpoint is not \"/\""); case BE_ERR_NOORIGIN: return ("could not open snapshot's origin"); Modified: head/lib/libbe/be_info.c ============================================================================== --- head/lib/libbe/be_info.c Fri Aug 31 21:45:05 2018 (r338416) +++ head/lib/libbe/be_info.c Sat Sep 1 02:22:26 2018 (r338417) @@ -285,7 +285,7 @@ be_prop_list_free(nvlist_t *be_list) /* * Usage */ -bool +int be_exists(libbe_handle_t *lbh, char *be) { char buf[BE_MAXPATHLEN]; @@ -296,25 +296,23 @@ be_exists(libbe_handle_t *lbh, char *be) be_root_concat(lbh, be, buf); if (!zfs_dataset_exists(lbh->lzh, buf, ZFS_TYPE_DATASET)) - return (false); + return (BE_ERR_NOENT); /* Also check if it's mounted at / */ - if (be_prop_list_alloc(&dsprops) != 0) { - set_error(lbh, BE_ERR_UNKNOWN); - return (false); - } + if (be_prop_list_alloc(&dsprops) != 0) + return (BE_ERR_UNKNOWN); if (be_get_dataset_props(lbh, buf, dsprops) != 0) { nvlist_free(dsprops); - return (false); + return (BE_ERR_UNKNOWN); } if (nvlist_lookup_string(dsprops, "mountpoint", &mntpoint) == 0) { valid = (strcmp(mntpoint, "/") == 0); nvlist_free(dsprops); - return (valid); + return (valid ? BE_ERR_SUCCESS : BE_ERR_BADMOUNT); } nvlist_free(dsprops); - return (false); + return (BE_ERR_BADMOUNT); } Modified: head/lib/libbe/libbe.3 ============================================================================== --- head/lib/libbe/libbe.3 Fri Aug 31 21:45:05 2018 (r338416) +++ head/lib/libbe/libbe.3 Sat Sep 1 02:22:26 2018 (r338417) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 24, 2018 +.Dd August 31, 2018 .Dt LIBBE 3 .Os .Sh NAME @@ -111,7 +111,7 @@ .Ft int .Fn be_validate_snap "libbe_handle_t *hdl" "const char *snap" .Pp -.Ft bool +.Ft int .Fn be_exists "libbe_handle_t *hdl" "char *be_name" .Pp .Ft int @@ -352,6 +352,8 @@ The function will check whether the given boot environment exists and has a mountpoint of .Pa / . +This function does not set the internal library error state, but will return +the appropriate error. .Pp The .Fn be_export @@ -444,7 +446,7 @@ BE_ERR_DESTROYMNT, BE_ERR_BADPATH, BE_ERR_PATHBUSY, BE_ERR_PATHLEN, -BE_ERR_INVORIGIN, +BE_ERR_BADMOUNT, BE_ERR_NOORIGIN, BE_ERR_MOUNTED, BE_ERR_NOMOUNT, From owner-svn-src-head@freebsd.org Sat Sep 1 02:23:49 2018 Return-Path: Delivered-To: svn-src-head@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 D79DFFDA3CA; Sat, 1 Sep 2018 02:23:48 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90DF9915ED; Sat, 1 Sep 2018 02:23:48 +0000 (UTC) (envelope-from kevans@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 7205423CCB; Sat, 1 Sep 2018 02:23:48 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w812Nmr5006262; Sat, 1 Sep 2018 02:23:48 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w812NjIR006250; Sat, 1 Sep 2018 02:23:45 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201809010223.w812NjIR006250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 1 Sep 2018 02:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338418 - in head: stand/common stand/userboot stand/userboot/userboot stand/userboot/userboot_4th stand/userboot/userboot_lua usr.sbin/bhyveload X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: stand/common stand/userboot stand/userboot/userboot stand/userboot/userboot_4th stand/userboot/userboot_lua usr.sbin/bhyveload X-SVN-Commit-Revision: 338418 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2018 02:23:49 -0000 Author: kevans Date: Sat Sep 1 02:23:45 2018 New Revision: 338418 URL: https://svnweb.freebsd.org/changeset/base/338418 Log: userboot: handle guest interpreter mismatches more intelligently The switch to lualoader creates a problem with userboot: the host is inclined to build userboot with Lua, but the host userboot's interpreter must match what's available on the guest. For almost all FreeBSD guests in the wild, Lua is not yet available and a Lua-based userboot will fail. This revision updates userboot protocol to version 5, which adds a swap_interpreter callback to request a different interpreter, and tries to determine the proper interpreter to be used based on how the guest /boot/loader is compiled. This is still a bit of a guess, but it's likely the best possible guess we can make in order to get it right. The interpreter is now embedded in the resulting executable, so we can open /boot/loader on the guest and hunt that down to derive the interpreter it was built with. Using -l with bhyveload will not allow an intepreter swap, even if the loader specified happens to be a userboot with the wrong interpreter. We'll simply complain about the mismatch and bail out. For legacy guests without the interpreter marker, we assume they're 4th. For new guests with the interpreter marker, we'll read it and swap over to the proper interpreter if it doesn't match what the userboot we're using was compiled with. Both flavors of userboot are installed by default, userboot_4th.so and userboot_lua.so. This fixes the build WITHOUT_FORTH as a coincidence, which was broken by userboot being forced to 4th. Reviewed by: imp, jhb, araujo (earlier version) Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D16945 Added: head/stand/userboot/userboot_4th/ head/stand/userboot/userboot_4th/Makefile (contents, props changed) head/stand/userboot/userboot_lua/ head/stand/userboot/userboot_lua/Makefile (contents, props changed) Modified: head/stand/common/bootstrap.h head/stand/common/interp_forth.c head/stand/common/interp_lua.c head/stand/common/interp_simple.c head/stand/userboot/Makefile head/stand/userboot/userboot.h head/stand/userboot/userboot/Makefile head/stand/userboot/userboot/main.c head/stand/userboot/userboot/version head/usr.sbin/bhyveload/bhyveload.c Modified: head/stand/common/bootstrap.h ============================================================================== --- head/stand/common/bootstrap.h Sat Sep 1 02:22:26 2018 (r338417) +++ head/stand/common/bootstrap.h Sat Sep 1 02:23:45 2018 (r338418) @@ -164,6 +164,14 @@ extern int isapnp_readport; extern char bootprog_info[]; /* + * Interpreter information + */ +extern const char bootprog_interp[]; +#define INTERP_DEFINE(interpstr) \ +const char bootprog_interp[] = "$Interpreter:" interpstr + + +/* * Preloaded file metadata header. * * Metadata are allocated on our heap, and copied into kernel space Modified: head/stand/common/interp_forth.c ============================================================================== --- head/stand/common/interp_forth.c Sat Sep 1 02:22:26 2018 (r338417) +++ head/stand/common/interp_forth.c Sat Sep 1 02:23:45 2018 (r338418) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include "ficl.h" extern unsigned bootprog_rev; +INTERP_DEFINE("4th"); /* #define BFORTH_DEBUG */ Modified: head/stand/common/interp_lua.c ============================================================================== --- head/stand/common/interp_lua.c Sat Sep 1 02:22:26 2018 (r338417) +++ head/stand/common/interp_lua.c Sat Sep 1 02:23:45 2018 (r338418) @@ -60,6 +60,7 @@ static struct interp_lua_softc lua_softc; #define LDBG(...) #endif +INTERP_DEFINE("lua"); static void * interp_lua_realloc(void *ud __unused, void *ptr, size_t osize __unused, size_t nsize) Modified: head/stand/common/interp_simple.c ============================================================================== --- head/stand/common/interp_simple.c Sat Sep 1 02:22:26 2018 (r338417) +++ head/stand/common/interp_simple.c Sat Sep 1 02:23:45 2018 (r338418) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include "bootstrap.h" +INTERP_DEFINE("simp"); + void interp_init(void) { Modified: head/stand/userboot/Makefile ============================================================================== --- head/stand/userboot/Makefile Sat Sep 1 02:22:26 2018 (r338417) +++ head/stand/userboot/Makefile Sat Sep 1 02:23:45 2018 (r338418) @@ -1,8 +1,10 @@ # $FreeBSD$ -.include +.include -SUBDIR= test userboot +SUBDIR.yes= test +SUBDIR.${MK_FORTH}+= userboot_4th +SUBDIR.${MK_LOADER_LUA}+= userboot_lua .include Modified: head/stand/userboot/userboot.h ============================================================================== --- head/stand/userboot/userboot.h Sat Sep 1 02:22:26 2018 (r338417) +++ head/stand/userboot/userboot.h Sat Sep 1 02:23:45 2018 (r338418) @@ -42,6 +42,13 @@ #define USERBOOT_VERSION_4 4 /* + * Version 5 added a callback for indicating that the guest + * should be restarted with a different interpreter. The callback + * structure is still backward compatible. + */ +#define USERBOOT_VERSION_5 5 + +/* * Exit codes from the loader */ #define USERBOOT_EXIT_QUIT 1 @@ -210,4 +217,9 @@ struct loader_callbacks { int (*vm_set_register)(void *arg, int vcpu, int reg, uint64_t val); int (*vm_set_desc)(void *arg, int vcpu, int reg, uint64_t base, u_int limit, u_int access); + + /* + * Version 5 addition. + */ + void (*swap_interpreter)(void *arg, const char *interp); }; Modified: head/stand/userboot/userboot/Makefile ============================================================================== --- head/stand/userboot/userboot/Makefile Sat Sep 1 02:22:26 2018 (r338417) +++ head/stand/userboot/userboot/Makefile Sat Sep 1 02:23:45 2018 (r338418) @@ -5,14 +5,14 @@ LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= no LOADER_EXT2FS_SUPPORT?= no PIC=yes -LOADER_INTERP=4th .include -SHLIB_NAME= userboot.so +SHLIB_NAME= userboot_${LOADER_INTERP}.so STRIP= LIBDIR= /boot +.PATH: ${.CURDIR}/../userboot SRCS= autoload.c SRCS+= bcache.c SRCS+= biossmap.c @@ -38,7 +38,12 @@ CWARNFLAGS.main.c += -Wno-implicit-function-declaratio LDFLAGS+= -nostdlib -Wl,-Bsymbolic -NEWVERSWHAT= "User boot" ${MACHINE_CPUARCH} +NEWVERSWHAT= "User boot ${LOADER_INTERP}" ${MACHINE_CPUARCH} +VERSION_FILE= ${.CURDIR}/../userboot/version + +.if ${LOADER_INTERP} == ${LOADER_DEFAULT_INTERP} +LINKS+= ${BINDIR}/${SHLIB_NAME} ${BINDIR}/userboot.so +.endif .if ${MK_ZFS} != "no" CFLAGS+= -DUSERBOOT_ZFS_SUPPORT Modified: head/stand/userboot/userboot/main.c ============================================================================== --- head/stand/userboot/userboot/main.c Sat Sep 1 02:22:26 2018 (r338417) +++ head/stand/userboot/userboot/main.c Sat Sep 1 02:23:45 2018 (r338418) @@ -47,6 +47,9 @@ static int userboot_zfs_found; /* Minimum version required */ #define USERBOOT_VERSION USERBOOT_VERSION_3 +#define LOADER_PATH "/boot/loader" +#define INTERP_MARKER "$Interpreter:" + #define MALLOCSZ (64*1024*1024) struct loader_callbacks *callbacks; @@ -57,6 +60,7 @@ static jmp_buf jb; struct arch_switch archsw; /* MI/MD interface boundary */ static void extract_currdev(void); +static void check_interpreter(void); void delay(int usec) @@ -73,6 +77,62 @@ exit(int v) longjmp(jb, 1); } +static void +check_interpreter(void) +{ + struct stat st; + size_t marklen, rdsize; + const char *guest_interp, *my_interp; + char *buf; + int fd; + + /* + * If we can't stat(2) or open(2) LOADER_PATH, then we'll fail by + * simply letting us roll on with whatever interpreter we were compiled + * with. This is likely not going to be an issue in reality. + */ + buf = NULL; + if (stat(LOADER_PATH, &st) != 0) + return; + if ((fd = open(LOADER_PATH, O_RDONLY)) < 0) + return; + + rdsize = st.st_size; + buf = malloc(rdsize); + if (buf == NULL) + goto out; + if (read(fd, buf, rdsize) < rdsize) + goto out; + + marklen = strlen(INTERP_MARKER); + my_interp = bootprog_interp + marklen; + + /* + * Here we make the assumption that a loader binary without the + * interpreter marker is a 4th one. All loader binaries going forward + * should have this properly specified, so our assumption should always + * be a good one. + */ + if ((guest_interp = memmem(buf, rdsize, INTERP_MARKER, + marklen)) != NULL) + guest_interp += marklen; + else + guest_interp = "4th"; + + /* + * The guest interpreter may not have a version of loader that + * specifies the interpreter installed. If that's the case, we'll + * assume it's legacy (4th) and request a swap to that if we're + * a Lua-userboot. + */ + if (strcmp(my_interp, guest_interp) != 0) + CALLBACK(swap_interpreter, guest_interp); +out: + free(buf); + close(fd); + return; +} + void loader_main(struct loader_callbacks *cb, void *arg, int version, int ndisks) { @@ -137,6 +197,14 @@ loader_main(struct loader_callbacks *cb, void *arg, in (devsw[i]->dv_init)(); extract_currdev(); + + /* + * Checking the interpreter isn't worth the overhead unless we + * actually have the swap_interpreter callback, so we actually version + * check here rather than later on. + */ + if (version >= USERBOOT_VERSION_5) + check_interpreter(); if (setjmp(jb)) return; Modified: head/stand/userboot/userboot/version ============================================================================== --- head/stand/userboot/userboot/version Sat Sep 1 02:22:26 2018 (r338417) +++ head/stand/userboot/userboot/version Sat Sep 1 02:23:45 2018 (r338418) @@ -1,4 +1,5 @@ $FreeBSD$ +1.2: Userboot with lua or forth 1.1: Initial userland boot Added: head/stand/userboot/userboot_4th/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/userboot/userboot_4th/Makefile Sat Sep 1 02:23:45 2018 (r338418) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +LOADER_INTERP=4th + +.include "../userboot/Makefile" + Added: head/stand/userboot/userboot_lua/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/userboot/userboot_lua/Makefile Sat Sep 1 02:23:45 2018 (r338418) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +LOADER_INTERP=lua + +.include "../userboot/Makefile" + Modified: head/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.c Sat Sep 1 02:22:26 2018 (r338417) +++ head/usr.sbin/bhyveload/bhyveload.c Sat Sep 1 02:23:45 2018 (r338418) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -98,6 +99,13 @@ static int disk_fd[NDISKS]; static int ndisks; static int consin_fd, consout_fd; +static int need_reinit; + +static void *loader_hdl; +static char *loader; +static int explicit_loader; +static jmp_buf jb; + static char *vmname, *progname; static struct vmctx *ctx; @@ -560,6 +568,30 @@ cb_vm_set_desc(void *arg, int vcpu, int reg, uint64_t return (vm_set_desc(ctx, vcpu, reg, base, limit, access)); } +static void +cb_swap_interpreter(void *arg, const char *interp_req) +{ + + /* + * If the user specified a loader but we detected a mismatch, we should + * not try to pivot to a different loader on them. + */ + free(loader); + if (explicit_loader == 1) { + perror("requested loader interpreter does not match guest userboot"); + cb_exit(NULL, 1); + } + if (interp_req == NULL || *interp_req == '\0') { + perror("guest failed to request an interpreter"); + cb_exit(NULL, 1); + } + + if (asprintf(&loader, "/boot/userboot_%s.so", interp_req) == -1) + err(EX_OSERR, "malloc"); + need_reinit = 1; + longjmp(jb, 1); +} + static struct loader_callbacks cb = { .getc = cb_getc, .putc = cb_putc, @@ -593,6 +625,9 @@ static struct loader_callbacks cb = { /* Version 4 additions */ .vm_set_register = cb_vm_set_register, .vm_set_desc = cb_vm_set_desc, + + /* Version 5 additions */ + .swap_interpreter = cb_swap_interpreter, }; static int @@ -661,16 +696,12 @@ usage(void) int main(int argc, char** argv) { - char *loader; - void *h; void (*func)(struct loader_callbacks *, void *, int, int); uint64_t mem_size; - int opt, error, need_reinit, memflags; + int opt, error, memflags; progname = basename(argv[0]); - loader = NULL; - memflags = 0; mem_size = 256 * MB; @@ -705,6 +736,7 @@ main(int argc, char** argv) loader = strdup(optarg); if (loader == NULL) err(EX_OSERR, "malloc"); + explicit_loader = 1; break; case 'm': @@ -747,6 +779,13 @@ main(int argc, char** argv) exit(1); } + /* + * setjmp in the case the guest wants to swap out interpreter, + * cb_swap_interpreter will swap out loader as appropriate and set + * need_reinit so that we end up in a clean state once again. + */ + setjmp(jb); + if (need_reinit) { error = vm_reinit(ctx); if (error) { @@ -767,13 +806,15 @@ main(int argc, char** argv) if (loader == NULL) err(EX_OSERR, "malloc"); } - h = dlopen(loader, RTLD_LOCAL); - if (!h) { + if (loader_hdl != NULL) + dlclose(loader_hdl); + loader_hdl = dlopen(loader, RTLD_LOCAL); + if (!loader_hdl) { printf("%s\n", dlerror()); free(loader); return (1); } - func = dlsym(h, "loader_main"); + func = dlsym(loader_hdl, "loader_main"); if (!func) { printf("%s\n", dlerror()); free(loader); @@ -790,7 +831,7 @@ main(int argc, char** argv) addenv("smbios.bios.vendor=BHYVE"); addenv("boot_serial=1"); - func(&cb, NULL, USERBOOT_VERSION_4, ndisks); + func(&cb, NULL, USERBOOT_VERSION_5, ndisks); free(loader); return (0); From owner-svn-src-head@freebsd.org Sat Sep 1 11:26:55 2018 Return-Path: Delivered-To: svn-src-head@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 1FB33FEC376; Sat, 1 Sep 2018 11:26:55 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8A8286A9F; Sat, 1 Sep 2018 11:26:54 +0000 (UTC) (envelope-from avatar@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 C36931833; Sat, 1 Sep 2018 11:26:54 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w81BQsFo084885; Sat, 1 Sep 2018 11:26:54 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w81BQsVC084882; Sat, 1 Sep 2018 11:26:54 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201809011126.w81BQsVC084882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Sat, 1 Sep 2018 11:26:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338422 - in head/sys: dev/sound/midi dev/sound/pci modules/sound/driver/csa X-SVN-Group: head X-SVN-Commit-Author: avatar X-SVN-Commit-Paths: in head/sys: dev/sound/midi dev/sound/pci modules/sound/driver/csa X-SVN-Commit-Revision: 338422 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2018 11:26:55 -0000 Author: avatar Date: Sat Sep 1 11:26:53 2018 New Revision: 338422 URL: https://svnweb.freebsd.org/changeset/base/338422 Log: Adding support for CS46xx MIDI output. With this patch, users can play the MIDI files through /dev/sequencer device with tools like playmidi. The audio output will go through the external MIDI device such like wavetable synthesis card. Reviewed by: matk (a long time ago), kib Approved by: re (kib) Tested with: Terratec SiXPack 5.1+ + Yamaha DB50XG MFC after: 4 weeks Added: head/sys/dev/sound/pci/csamidi.c (contents, props changed) Modified: head/sys/dev/sound/midi/midi.c head/sys/modules/sound/driver/csa/Makefile Modified: head/sys/dev/sound/midi/midi.c ============================================================================== --- head/sys/dev/sound/midi/midi.c Sat Sep 1 10:03:30 2018 (r338421) +++ head/sys/dev/sound/midi/midi.c Sat Sep 1 11:26:53 2018 (r338422) @@ -1467,18 +1467,14 @@ midi_modevent(module_t mod, int type, void *data) switch (type) { case MOD_LOAD: retval = midi_load(); -#if 0 if (retval == 0) retval = seq_modevent(mod, type, data); -#endif break; case MOD_UNLOAD: retval = midi_unload(); -#if 0 if (retval == 0) retval = seq_modevent(mod, type, data); -#endif break; default: Added: head/sys/dev/sound/pci/csamidi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/sound/pci/csamidi.c Sat Sep 1 11:26:53 2018 (r338422) @@ -0,0 +1,290 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + + * Copyright (c) 2015-2018 Tai-hwa Liang + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_snd.h" +#endif + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include "mpufoi_if.h" + +SND_DECLARE_FILE("$FreeBSD$"); + +/* pulled from mpu401.c */ +#define MPU_DATAPORT 0 +#define MPU_CMDPORT 1 +#define MPU_STATPORT 1 +#define MPU_RESET 0xff +#define MPU_UART 0x3f +#define MPU_ACK 0xfe +#define MPU_STATMASK 0xc0 +#define MPU_OUTPUTBUSY 0x40 +#define MPU_INPUTBUSY 0x80 + +/* device private data */ +struct csa_midi_softc { + /* hardware resources */ + int io_rid; /* io rid */ + struct resource *io; /* io */ + + struct mtx mtx; + device_t dev; + struct mpu401 *mpu; + mpu401_intr_t *mpu_intr; + int mflags; /* MIDI flags */ +}; + +static struct kobj_class csamidi_mpu_class; +static devclass_t midicsa_devclass; + +static u_int32_t +csamidi_readio(struct csa_midi_softc *scp, u_long offset) +{ + if (offset < BA0_AC97_RESET) + return bus_space_read_4(rman_get_bustag(scp->io), rman_get_bushandle(scp->io), offset) & 0xffffffff; + else + return (0); +} + +static void +csamidi_writeio(struct csa_midi_softc *scp, u_long offset, u_int32_t data) +{ + if (offset < BA0_AC97_RESET) + bus_space_write_4(rman_get_bustag(scp->io), rman_get_bushandle(scp->io), offset, data); +} + +static void +csamidi_midi_intr(void *arg) +{ + struct csa_midi_softc *scp = (struct csa_midi_softc *)arg; + + if (scp->mpu_intr) + (scp->mpu_intr)(scp->mpu); +} + +static unsigned char +csamidi_mread(struct mpu401 *arg __unused, void *cookie, int reg) +{ + struct csa_midi_softc *scp = cookie; + unsigned int rc; + unsigned int uart_stat; + + rc = 0; + /* hacks to convert hardware status to MPU compatible ones */ + switch (reg) { + case MPU_STATPORT: + uart_stat = csamidi_readio(scp, BA0_MIDSR); + if (uart_stat & MIDSR_TBF) + rc |= MPU_OUTPUTBUSY; /* Tx buffer full */ + if (uart_stat & MIDSR_RBE) + rc |= MPU_INPUTBUSY; + break; + case MPU_DATAPORT: + rc = csamidi_readio(scp, BA0_MIDRP); + break; + default: + printf("csamidi_mread: unknown register %d\n", reg); + break; + } + return (rc); +} + +static void +csamidi_mwrite(struct mpu401 *arg __unused, void *cookie, int reg, unsigned char b) +{ + struct csa_midi_softc *scp = cookie; + unsigned int val; + + switch (reg) { + case MPU_CMDPORT: + switch (b) + { + case MPU_RESET: + /* preserve current operation mode */ + val = csamidi_readio(scp, BA0_MIDCR); + /* reset the MIDI port */ + csamidi_writeio(scp, BA0_MIDCR, MIDCR_MRST); + csamidi_writeio(scp, BA0_MIDCR, MIDCR_MLB); + csamidi_writeio(scp, BA0_MIDCR, 0x00); + /* restore previous operation mode */ + csamidi_writeio(scp, BA0_MIDCR, val); + break; + case MPU_UART: + /* switch to UART mode, no-op */ + default: + break; + } + break; + case MPU_DATAPORT: + /* put the MIDI databyte in the write port */ + csamidi_writeio(scp, BA0_MIDWP, b); + break; + default: + printf("csamidi_mwrite: unknown register %d\n", reg); + break; + } +} + +static int +csamidi_muninit(struct mpu401 *arg __unused, void *cookie) +{ + struct csa_midi_softc *scp = cookie; + + mtx_lock(&scp->mtx); + scp->mpu_intr = NULL; + mtx_unlock(&scp->mtx); + + return (0); +} + +static int +midicsa_probe(device_t dev) +{ + struct sndcard_func *func; + + /* The parent device has already been probed. */ + + func = device_get_ivars(dev); + if (func == NULL || func->func != SCF_MIDI) + return (ENXIO); + + device_set_desc(dev, "CS461x MIDI"); + return (0); +} + +static int +midicsa_attach(device_t dev) +{ + struct csa_midi_softc *scp; + struct sndcard_func *func; + int rc = ENXIO; + + scp = device_get_softc(dev); + func = device_get_ivars(dev); + + bzero(scp, sizeof(struct csa_midi_softc)); + scp->dev = dev; + + /* allocate the required resources */ + scp->io_rid = PCIR_BAR(0); + scp->io = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &scp->io_rid, RF_ACTIVE); + if (scp->io == NULL) + goto err0; + + /* init the fake MPU401 interface. */ + scp->mpu = mpu401_init(&csamidi_mpu_class, scp, csamidi_midi_intr, + &scp->mpu_intr); + if (scp->mpu == NULL) { + rc = ENOMEM; + goto err1; + } + + mtx_init(&scp->mtx, device_get_nameunit(dev), "csamidi softc", + MTX_DEF); + + /* reset the MIDI port */ + csamidi_writeio(scp, BA0_MIDCR, MIDCR_MRST); + /* MIDI transmit enable, no interrupt */ + csamidi_writeio(scp, BA0_MIDCR, MIDCR_TXE | MIDCR_RXE); + csamidi_writeio(scp, BA0_HICR, HICR_IEV | HICR_CHGM); + + return (0); +err1: + bus_release_resource(dev, SYS_RES_MEMORY, scp->io_rid, scp->io); + scp->io = NULL; +err0: + return (rc); +} + +static int +midicsa_detach(device_t dev) +{ + struct csa_midi_softc *scp; + int rc = 0; + + scp = device_get_softc(dev); + rc = mpu401_uninit(scp->mpu); + if (rc) + return (rc); + if (scp->io != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, scp->io_rid, + scp->io); + scp->io = NULL; + } + mtx_destroy(&scp->mtx); + return (rc); +} + +static kobj_method_t csamidi_mpu_methods[] = { + KOBJMETHOD(mpufoi_read, csamidi_mread), + KOBJMETHOD(mpufoi_write, csamidi_mwrite), + KOBJMETHOD(mpufoi_uninit, csamidi_muninit), + KOBJMETHOD_END +}; + +static DEFINE_CLASS(csamidi_mpu, csamidi_mpu_methods, 0); + +static device_method_t midicsa_methods[] = { + DEVMETHOD(device_probe, midicsa_probe), + DEVMETHOD(device_attach, midicsa_attach), + DEVMETHOD(device_detach, midicsa_detach), + + DEVMETHOD_END +}; + +static driver_t midicsa_driver = { + "midi", + midicsa_methods, + sizeof(struct csa_midi_softc), +}; +DRIVER_MODULE(snd_csa_midi, csa, midicsa_driver, midicsa_devclass, 0, 0); +MODULE_DEPEND(snd_csa_midi, snd_csa, 1, 1, 1); +MODULE_DEPEND(snd_csa_midi, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); +MODULE_VERSION(snd_csa_midi, 1); Modified: head/sys/modules/sound/driver/csa/Makefile ============================================================================== --- head/sys/modules/sound/driver/csa/Makefile Sat Sep 1 10:03:30 2018 (r338421) +++ head/sys/modules/sound/driver/csa/Makefile Sat Sep 1 11:26:53 2018 (r338422) @@ -3,7 +3,7 @@ .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_csa -SRCS= device_if.h bus_if.h pci_if.h -SRCS+= csa.c csapcm.c +SRCS= device_if.h bus_if.h mpufoi_if.h pci_if.h +SRCS+= csa.c csamidi.c csapcm.c .include From owner-svn-src-head@freebsd.org Sat Sep 1 13:43:15 2018 Return-Path: Delivered-To: svn-src-head@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 837CFFEFF15; Sat, 1 Sep 2018 13:43:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2AFFA8C35A; Sat, 1 Sep 2018 13:43:15 +0000 (UTC) (envelope-from gjb@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 205642F42; Sat, 1 Sep 2018 13:43:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w81DhE8K058249; Sat, 1 Sep 2018 13:43:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w81DhEmG058248; Sat, 1 Sep 2018 13:43:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201809011343.w81DhEmG058248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 1 Sep 2018 13:43:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338423 - in head/sys: dev/sound/midi dev/sound/pci modules/sound/driver/csa X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in head/sys: dev/sound/midi dev/sound/pci modules/sound/driver/csa X-SVN-Commit-Revision: 338423 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2018 13:43:15 -0000 Author: gjb Date: Sat Sep 1 13:43:14 2018 New Revision: 338423 URL: https://svnweb.freebsd.org/changeset/base/338423 Log: Revert r338422, which was did not get official approval from re@. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Deleted: head/sys/dev/sound/pci/csamidi.c Modified: head/sys/dev/sound/midi/midi.c head/sys/modules/sound/driver/csa/Makefile Modified: head/sys/dev/sound/midi/midi.c ============================================================================== --- head/sys/dev/sound/midi/midi.c Sat Sep 1 11:26:53 2018 (r338422) +++ head/sys/dev/sound/midi/midi.c Sat Sep 1 13:43:14 2018 (r338423) @@ -1467,14 +1467,18 @@ midi_modevent(module_t mod, int type, void *data) switch (type) { case MOD_LOAD: retval = midi_load(); +#if 0 if (retval == 0) retval = seq_modevent(mod, type, data); +#endif break; case MOD_UNLOAD: retval = midi_unload(); +#if 0 if (retval == 0) retval = seq_modevent(mod, type, data); +#endif break; default: Modified: head/sys/modules/sound/driver/csa/Makefile ============================================================================== --- head/sys/modules/sound/driver/csa/Makefile Sat Sep 1 11:26:53 2018 (r338422) +++ head/sys/modules/sound/driver/csa/Makefile Sat Sep 1 13:43:14 2018 (r338423) @@ -3,7 +3,7 @@ .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_csa -SRCS= device_if.h bus_if.h mpufoi_if.h pci_if.h -SRCS+= csa.c csamidi.c csapcm.c +SRCS= device_if.h bus_if.h pci_if.h +SRCS+= csa.c csapcm.c .include From owner-svn-src-head@freebsd.org Sat Sep 1 15:07:40 2018 Return-Path: Delivered-To: svn-src-head@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 D2ECDFF2030; Sat, 1 Sep 2018 15:07:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82BF68F7E5; Sat, 1 Sep 2018 15:07:39 +0000 (UTC) (envelope-from gjb@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 6E32840B8; Sat, 1 Sep 2018 15:07:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w81F7dgm099913; Sat, 1 Sep 2018 15:07:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w81F7cgS099908; Sat, 1 Sep 2018 15:07:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201809011507.w81F7cgS099908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 1 Sep 2018 15:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338424 - in head/sys: dev/sound/midi dev/sound/pci modules/sound/driver/csa X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in head/sys: dev/sound/midi dev/sound/pci modules/sound/driver/csa X-SVN-Commit-Revision: 338424 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2018 15:07:40 -0000 Author: gjb Date: Sat Sep 1 15:07:38 2018 New Revision: 338424 URL: https://svnweb.freebsd.org/changeset/base/338424 Log: Revert r338423, reapplying r338422, which did get approval but communication lines got crossed. Apologies to avatar@ for the confusion. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Added: head/sys/dev/sound/pci/csamidi.c - copied unchanged from r338422, head/sys/dev/sound/pci/csamidi.c Modified: head/sys/dev/sound/midi/midi.c head/sys/modules/sound/driver/csa/Makefile Modified: head/sys/dev/sound/midi/midi.c ============================================================================== --- head/sys/dev/sound/midi/midi.c Sat Sep 1 13:43:14 2018 (r338423) +++ head/sys/dev/sound/midi/midi.c Sat Sep 1 15:07:38 2018 (r338424) @@ -1467,18 +1467,14 @@ midi_modevent(module_t mod, int type, void *data) switch (type) { case MOD_LOAD: retval = midi_load(); -#if 0 if (retval == 0) retval = seq_modevent(mod, type, data); -#endif break; case MOD_UNLOAD: retval = midi_unload(); -#if 0 if (retval == 0) retval = seq_modevent(mod, type, data); -#endif break; default: Copied: head/sys/dev/sound/pci/csamidi.c (from r338422, head/sys/dev/sound/pci/csamidi.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/sound/pci/csamidi.c Sat Sep 1 15:07:38 2018 (r338424, copy of r338422, head/sys/dev/sound/pci/csamidi.c) @@ -0,0 +1,290 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + + * Copyright (c) 2015-2018 Tai-hwa Liang + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_snd.h" +#endif + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include "mpufoi_if.h" + +SND_DECLARE_FILE("$FreeBSD$"); + +/* pulled from mpu401.c */ +#define MPU_DATAPORT 0 +#define MPU_CMDPORT 1 +#define MPU_STATPORT 1 +#define MPU_RESET 0xff +#define MPU_UART 0x3f +#define MPU_ACK 0xfe +#define MPU_STATMASK 0xc0 +#define MPU_OUTPUTBUSY 0x40 +#define MPU_INPUTBUSY 0x80 + +/* device private data */ +struct csa_midi_softc { + /* hardware resources */ + int io_rid; /* io rid */ + struct resource *io; /* io */ + + struct mtx mtx; + device_t dev; + struct mpu401 *mpu; + mpu401_intr_t *mpu_intr; + int mflags; /* MIDI flags */ +}; + +static struct kobj_class csamidi_mpu_class; +static devclass_t midicsa_devclass; + +static u_int32_t +csamidi_readio(struct csa_midi_softc *scp, u_long offset) +{ + if (offset < BA0_AC97_RESET) + return bus_space_read_4(rman_get_bustag(scp->io), rman_get_bushandle(scp->io), offset) & 0xffffffff; + else + return (0); +} + +static void +csamidi_writeio(struct csa_midi_softc *scp, u_long offset, u_int32_t data) +{ + if (offset < BA0_AC97_RESET) + bus_space_write_4(rman_get_bustag(scp->io), rman_get_bushandle(scp->io), offset, data); +} + +static void +csamidi_midi_intr(void *arg) +{ + struct csa_midi_softc *scp = (struct csa_midi_softc *)arg; + + if (scp->mpu_intr) + (scp->mpu_intr)(scp->mpu); +} + +static unsigned char +csamidi_mread(struct mpu401 *arg __unused, void *cookie, int reg) +{ + struct csa_midi_softc *scp = cookie; + unsigned int rc; + unsigned int uart_stat; + + rc = 0; + /* hacks to convert hardware status to MPU compatible ones */ + switch (reg) { + case MPU_STATPORT: + uart_stat = csamidi_readio(scp, BA0_MIDSR); + if (uart_stat & MIDSR_TBF) + rc |= MPU_OUTPUTBUSY; /* Tx buffer full */ + if (uart_stat & MIDSR_RBE) + rc |= MPU_INPUTBUSY; + break; + case MPU_DATAPORT: + rc = csamidi_readio(scp, BA0_MIDRP); + break; + default: + printf("csamidi_mread: unknown register %d\n", reg); + break; + } + return (rc); +} + +static void +csamidi_mwrite(struct mpu401 *arg __unused, void *cookie, int reg, unsigned char b) +{ + struct csa_midi_softc *scp = cookie; + unsigned int val; + + switch (reg) { + case MPU_CMDPORT: + switch (b) + { + case MPU_RESET: + /* preserve current operation mode */ + val = csamidi_readio(scp, BA0_MIDCR); + /* reset the MIDI port */ + csamidi_writeio(scp, BA0_MIDCR, MIDCR_MRST); + csamidi_writeio(scp, BA0_MIDCR, MIDCR_MLB); + csamidi_writeio(scp, BA0_MIDCR, 0x00); + /* restore previous operation mode */ + csamidi_writeio(scp, BA0_MIDCR, val); + break; + case MPU_UART: + /* switch to UART mode, no-op */ + default: + break; + } + break; + case MPU_DATAPORT: + /* put the MIDI databyte in the write port */ + csamidi_writeio(scp, BA0_MIDWP, b); + break; + default: + printf("csamidi_mwrite: unknown register %d\n", reg); + break; + } +} + +static int +csamidi_muninit(struct mpu401 *arg __unused, void *cookie) +{ + struct csa_midi_softc *scp = cookie; + + mtx_lock(&scp->mtx); + scp->mpu_intr = NULL; + mtx_unlock(&scp->mtx); + + return (0); +} + +static int +midicsa_probe(device_t dev) +{ + struct sndcard_func *func; + + /* The parent device has already been probed. */ + + func = device_get_ivars(dev); + if (func == NULL || func->func != SCF_MIDI) + return (ENXIO); + + device_set_desc(dev, "CS461x MIDI"); + return (0); +} + +static int +midicsa_attach(device_t dev) +{ + struct csa_midi_softc *scp; + struct sndcard_func *func; + int rc = ENXIO; + + scp = device_get_softc(dev); + func = device_get_ivars(dev); + + bzero(scp, sizeof(struct csa_midi_softc)); + scp->dev = dev; + + /* allocate the required resources */ + scp->io_rid = PCIR_BAR(0); + scp->io = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &scp->io_rid, RF_ACTIVE); + if (scp->io == NULL) + goto err0; + + /* init the fake MPU401 interface. */ + scp->mpu = mpu401_init(&csamidi_mpu_class, scp, csamidi_midi_intr, + &scp->mpu_intr); + if (scp->mpu == NULL) { + rc = ENOMEM; + goto err1; + } + + mtx_init(&scp->mtx, device_get_nameunit(dev), "csamidi softc", + MTX_DEF); + + /* reset the MIDI port */ + csamidi_writeio(scp, BA0_MIDCR, MIDCR_MRST); + /* MIDI transmit enable, no interrupt */ + csamidi_writeio(scp, BA0_MIDCR, MIDCR_TXE | MIDCR_RXE); + csamidi_writeio(scp, BA0_HICR, HICR_IEV | HICR_CHGM); + + return (0); +err1: + bus_release_resource(dev, SYS_RES_MEMORY, scp->io_rid, scp->io); + scp->io = NULL; +err0: + return (rc); +} + +static int +midicsa_detach(device_t dev) +{ + struct csa_midi_softc *scp; + int rc = 0; + + scp = device_get_softc(dev); + rc = mpu401_uninit(scp->mpu); + if (rc) + return (rc); + if (scp->io != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, scp->io_rid, + scp->io); + scp->io = NULL; + } + mtx_destroy(&scp->mtx); + return (rc); +} + +static kobj_method_t csamidi_mpu_methods[] = { + KOBJMETHOD(mpufoi_read, csamidi_mread), + KOBJMETHOD(mpufoi_write, csamidi_mwrite), + KOBJMETHOD(mpufoi_uninit, csamidi_muninit), + KOBJMETHOD_END +}; + +static DEFINE_CLASS(csamidi_mpu, csamidi_mpu_methods, 0); + +static device_method_t midicsa_methods[] = { + DEVMETHOD(device_probe, midicsa_probe), + DEVMETHOD(device_attach, midicsa_attach), + DEVMETHOD(device_detach, midicsa_detach), + + DEVMETHOD_END +}; + +static driver_t midicsa_driver = { + "midi", + midicsa_methods, + sizeof(struct csa_midi_softc), +}; +DRIVER_MODULE(snd_csa_midi, csa, midicsa_driver, midicsa_devclass, 0, 0); +MODULE_DEPEND(snd_csa_midi, snd_csa, 1, 1, 1); +MODULE_DEPEND(snd_csa_midi, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); +MODULE_VERSION(snd_csa_midi, 1); Modified: head/sys/modules/sound/driver/csa/Makefile ============================================================================== --- head/sys/modules/sound/driver/csa/Makefile Sat Sep 1 13:43:14 2018 (r338423) +++ head/sys/modules/sound/driver/csa/Makefile Sat Sep 1 15:07:38 2018 (r338424) @@ -3,7 +3,7 @@ .PATH: ${SRCTOP}/sys/dev/sound/pci KMOD= snd_csa -SRCS= device_if.h bus_if.h pci_if.h -SRCS+= csa.c csapcm.c +SRCS= device_if.h bus_if.h mpufoi_if.h pci_if.h +SRCS+= csa.c csamidi.c csapcm.c .include From owner-svn-src-head@freebsd.org Sat Sep 1 16:16:41 2018 Return-Path: Delivered-To: svn-src-head@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 F034EFF3BC1; Sat, 1 Sep 2018 16:16:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE23F7233B; Sat, 1 Sep 2018 16:16:40 +0000 (UTC) (envelope-from trasz@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 A4F9D4C1C; Sat, 1 Sep 2018 16:16:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w81GGeX7036531; Sat, 1 Sep 2018 16:16:40 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w81GGe7g036530; Sat, 1 Sep 2018 16:16:40 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201809011616.w81GGe7g036530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 1 Sep 2018 16:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338426 - head/sys/cam/ctl X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/cam/ctl X-SVN-Commit-Revision: 338426 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2018 16:16:41 -0000 Author: trasz Date: Sat Sep 1 16:16:40 2018 New Revision: 338426 URL: https://svnweb.freebsd.org/changeset/base/338426 Log: Try harder in cfiscsi_offline(). This is believed to be the workaround for the "ctld hanging on reload" problem observed in same cases under high load. I'm not 100% sure it's _the_ fix, as the issue is rather hard to reproduce, but it was tested as part of a larger path and the problem disappeared. It certainly shouldn't break anything. Now, technically, it shouldn't be needed. Quoting mav@, "After ct->ct_online == 0 there should be no new sessions attached to the target. And if you see some problems abbout it, it may either mean that there are some races where single cfiscsi_session_terminate(cs) call may be lost, or as a guess while this thread was sleeping target was reenabbled and redisabled again". Should such race be discovered and properly fixed in the future, than this and the followup two commits can be backed out. PR: 220175 Reported by: Eugene M. Zheganin Tested by: Eugene M. Zheganin Discussed with: mav Approved by: re (gjb) MFC after: 2 weeks Sponsored by: playkey.net Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sat Sep 1 16:13:56 2018 (r338425) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sat Sep 1 16:16:40 2018 (r338426) @@ -1447,11 +1447,11 @@ cfiscsi_offline(void *arg) ct->ct_online = 0; online = --softc->online; - TAILQ_FOREACH(cs, &softc->sessions, cs_next) { - if (cs->cs_target == ct) - cfiscsi_session_terminate(cs); - } do { + TAILQ_FOREACH(cs, &softc->sessions, cs_next) { + if (cs->cs_target == ct) + cfiscsi_session_terminate(cs); + } TAILQ_FOREACH(cs, &softc->sessions, cs_next) { if (cs->cs_target == ct) break; From owner-svn-src-head@freebsd.org Sat Sep 1 18:16:17 2018 Return-Path: Delivered-To: svn-src-head@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 DBBF4FF69F0; Sat, 1 Sep 2018 18:16:17 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 692BC75A08; Sat, 1 Sep 2018 18:16:17 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (mh0.gentlemail.de [IPv6:2a00:e10:2800::a135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id w81IGF0r032262; Sat, 1 Sep 2018 20:16:15 +0200 (CEST) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 7EB5A21B; Sat, 1 Sep 2018 20:16:15 +0200 (CEST) Subject: Post r337773 EFIRT-boot-panic still happening with r337838 [Was: Re: svn commit: r337838 - head/sys/amd64/amd64] To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808151248.w7FCmnfQ012183@repo.freebsd.org> From: Harry Schmalzbauer Organization: OmniLAN Message-ID: <37ef34d3-3d23-aa08-504c-c9f3c1dc8cf0@omnilan.de> Date: Sat, 1 Sep 2018 20:16:15 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201808151248.w7FCmnfQ012183@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]); Sat, 01 Sep 2018 20:16:15 +0200 (CEST) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: ; Sender-helo: mh0.gentlemail.de; ) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2018 18:16:18 -0000 Am 15.08.2018 um 14:48 schrieb Konstantin Belousov: > Author: kib > Date: Wed Aug 15 12:48:49 2018 > New Revision: 337838 > URL: https://svnweb.freebsd.org/changeset/base/337838 > > Log: > Fix early EFIRT on PCID machines after r337773. > > Ensure that the valid PCID state is created for proc0 pmap, since it > might be used by efirt enter() before first context switch on the BSP. > > Sponsored by: The FreeBSD Foundation > MFC after: 6 days > > Modified: > head/sys/amd64/amd64/pmap.c Hello, I'm testing ALPHA4 on a Ivy bridge machine, without recent firmware update, so no PCID. This fix doesn't cover that hardware. Setting efi.rt.disabled=1 in loader.conf makes it bootable. Without this tweak, the following panic happens: Fatal trap 12: Page fault while in kernel mode : cpuid = 5; apic id = 05 : fault code: supervisor read data, page not present. : Stopped at 0xbed7143d calll *ll+0x27(%rax) Unfortunately keyboard doesn't work and no serial connection easily possible. But I'll be able to connect a serail console if more info is needed/useful, please tell me! -harry From owner-svn-src-head@freebsd.org Sat Sep 1 19:01:41 2018 Return-Path: Delivered-To: svn-src-head@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 0EAA6FF77BD; Sat, 1 Sep 2018 19:01:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8997D7719A; Sat, 1 Sep 2018 19:01:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w81J1UEv034757 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 1 Sep 2018 22:01:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w81J1UEv034757 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w81J1TFo034756; Sat, 1 Sep 2018 22:01:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 1 Sep 2018 22:01:29 +0300 From: Konstantin Belousov To: Harry Schmalzbauer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: Post r337773 EFIRT-boot-panic still happening with r337838 [Was: Re: svn commit: r337838 - head/sys/amd64/amd64] Message-ID: <20180901190129.GE2340@kib.kiev.ua> References: <201808151248.w7FCmnfQ012183@repo.freebsd.org> <37ef34d3-3d23-aa08-504c-c9f3c1dc8cf0@omnilan.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37ef34d3-3d23-aa08-504c-c9f3c1dc8cf0@omnilan.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2018 19:01:41 -0000 On Sat, Sep 01, 2018 at 08:16:15PM +0200, Harry Schmalzbauer wrote: > I'm testing ALPHA4 on a Ivy bridge machine, without recent firmware > update, so no PCID. I have no idea what is the connection between firware updates and PCID. Ivy CPUs do have the PCID feature. > This fix doesn't cover that hardware. > Setting efi.rt.disabled=1 in loader.conf makes it bootable. > > Without this tweak, the following panic happens: > Fatal trap 12: Page fault while in kernel mode > : > cpuid = 5; apic id = 05 > : > fault code: supervisor read data, page not present. > : Try https://reviews.freebsd.org/D16972 From owner-svn-src-head@freebsd.org Sat Sep 1 21:22:19 2018 Return-Path: Delivered-To: svn-src-head@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 6634FFCC3C5; Sat, 1 Sep 2018 21:22:19 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0FE37C4E8; Sat, 1 Sep 2018 21:22:18 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (ezra.dcm1.omnilan.net [IPv6:2a00:e10:2800::a135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id w81LMGpb033677; Sat, 1 Sep 2018 23:22:16 +0200 (CEST) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 75FDA251; Sat, 1 Sep 2018 23:22:15 +0200 (CEST) Subject: Re: Post r337773 EFIRT-boot-panic still happening with r337838 [Was: Re: svn commit: r337838 - head/sys/amd64/amd64] To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808151248.w7FCmnfQ012183@repo.freebsd.org> <37ef34d3-3d23-aa08-504c-c9f3c1dc8cf0@omnilan.de> <20180901190129.GE2340@kib.kiev.ua> From: Harry Schmalzbauer Organization: OmniLAN Message-ID: <40eab93f-6a64-92fe-15d8-c3a8c36db1a0@omnilan.de> Date: Sat, 1 Sep 2018 23:22:14 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180901190129.GE2340@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]); Sat, 01 Sep 2018 23:22:16 +0200 (CEST) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: ; Sender-helo: mh0.gentlemail.de; ) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2018 21:22:19 -0000 Am 01.09.2018 um 21:01 schrieb Konstantin Belousov: > On Sat, Sep 01, 2018 at 08:16:15PM +0200, Harry Schmalzbauer wrote: >> I'm testing ALPHA4 on a Ivy bridge machine, without recent firmware >> update, so no PCID. > I have no idea what is the connection between firware updates and PCID. > Ivy CPUs do have the PCID feature. Sorry, I confused it with INVPCID which is nonsense too. IBPB was firmware related, but this is completely different to this EFIRT... Ignore please. >> This fix doesn't cover that hardware. >> Setting efi.rt.disabled=1 in loader.conf makes it bootable. >> >> Without this tweak, the following panic happens: >> Fatal trap 12: Page fault while in kernel mode >> : >> cpuid = 5; apic id = 05 >> : >> fault code: supervisor read data, page not present. >> : > Try https://reviews.freebsd.org/D16972 Panic vanished, boots fine with D16972-47525, nothing more checked. Thanks a lot, -harry