From owner-svn-src-head@freebsd.org Sun Aug 19 00:22: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 7D2E8107A524; Sun, 19 Aug 2018 00:22:32 +0000 (UTC) (envelope-from cem@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 303B07DC72; Sun, 19 Aug 2018 00:22:32 +0000 (UTC) (envelope-from cem@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 111331ED3F; Sun, 19 Aug 2018 00:22:32 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7J0MVJn022124; Sun, 19 Aug 2018 00:22:31 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7J0MLBE022075; Sun, 19 Aug 2018 00:22:21 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201808190022.w7J0MLBE022075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sun, 19 Aug 2018 00:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338035 - in head/sys: crypto/ccp dev/aac dev/aacraid dev/adlink dev/ae dev/age dev/ahci dev/alc dev/ale dev/amdsmn dev/amdtemp dev/amr dev/an dev/bce dev/bfe dev/bge dev/bwi dev/bwn de... X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: crypto/ccp dev/aac dev/aacraid dev/adlink dev/ae dev/age dev/ahci dev/alc dev/ale dev/amdsmn dev/amdtemp dev/amr dev/an dev/bce dev/bfe dev/bge dev/bwi dev/bwn dev/cas dev/ciss dev/dc dev... X-SVN-Commit-Revision: 338035 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, 19 Aug 2018 00:22:32 -0000 Author: cem Date: Sun Aug 19 00:22:21 2018 New Revision: 338035 URL: https://svnweb.freebsd.org/changeset/base/338035 Log: Remove unused and easy to misuse PNP macro parameter Inspired by r338025, just remove the element size parameter to the MODULE_PNP_INFO macro entirely. The 'table' parameter is now required to have correct pointer (or array) type. Since all invocations of the macro already had this property and the emitted PNP data continues to include the element size, there is no functional change. Mostly done with the coccinelle 'spatch' tool: $ cat modpnpsize0.cocci @normaltables@ identifier b,c; expression a,d,e; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,d, -sizeof(d[0]), e); @singletons@ identifier b,c,d; expression a; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,&d, -sizeof(d), 1); $ rg -l MODULE_PNP_INFO -- sys | \ xargs spatch --in-place --sp-file modpnpsize0.cocci (Note that coccinelle invokes diff(1) via a PATH search and expects diff to tolerate the -B flag, which BSD diff does not. So I had to link gdiff into PATH as diff to use spatch.) Tinderbox'd (-DMAKE_JUST_KERNELS). Modified: head/sys/crypto/ccp/ccp.c head/sys/dev/aac/aac_pci.c head/sys/dev/aacraid/aacraid_pci.c head/sys/dev/adlink/adlink.c head/sys/dev/ae/if_ae.c head/sys/dev/age/if_age.c head/sys/dev/ahci/ahci_pci.c head/sys/dev/alc/if_alc.c head/sys/dev/ale/if_ale.c head/sys/dev/amdsmn/amdsmn.c head/sys/dev/amdtemp/amdtemp.c head/sys/dev/amr/amr_pci.c head/sys/dev/an/if_an_pci.c head/sys/dev/bce/if_bce.c head/sys/dev/bfe/if_bfe.c head/sys/dev/bge/if_bge.c head/sys/dev/bwi/if_bwi_pci.c head/sys/dev/bwn/if_bwn_pci.c head/sys/dev/cas/if_cas.c head/sys/dev/ciss/ciss.c head/sys/dev/dc/if_dc.c head/sys/dev/drm2/i915/i915_drv.c head/sys/dev/drm2/radeon/radeon_drv.c head/sys/dev/ed/if_ed_pci.c head/sys/dev/ena/ena.c head/sys/dev/et/if_et.c head/sys/dev/fxp/if_fxp.c head/sys/dev/gem/if_gem_pci.c head/sys/dev/intpm/intpm.c head/sys/dev/ioat/ioat.c head/sys/dev/ipw/if_ipw.c head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ncr/ncr.c head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c head/sys/dev/ofw/ofw_bus_subr.h head/sys/dev/pccard/pccardvar.h head/sys/dev/pci/pcivar.h head/sys/dev/puc/puc_pci.c head/sys/dev/spibus/spi.h head/sys/dev/uart/uart_bus_pccard.c head/sys/dev/usb/usbdi.h head/sys/dev/xl/if_xl.c head/sys/isa/isavar.h head/sys/net/iflib.h head/sys/sys/module.h Modified: head/sys/crypto/ccp/ccp.c ============================================================================== --- head/sys/crypto/ccp/ccp.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/crypto/ccp/ccp.c Sun Aug 19 00:22:21 2018 (r338035) @@ -734,7 +734,7 @@ 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); -MODULE_PNP_INFO("W32:vendor/device", pci, ccp, ccp_ids, sizeof(ccp_ids[0]), +MODULE_PNP_INFO("W32:vendor/device", pci, ccp, ccp_ids, nitems(ccp_ids)); static int Modified: head/sys/dev/aac/aac_pci.c ============================================================================== --- head/sys/dev/aac/aac_pci.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/aac/aac_pci.c Sun Aug 19 00:22:21 2018 (r338035) @@ -494,7 +494,7 @@ static driver_t aacch_driver = { static devclass_t aacch_devclass; DRIVER_MODULE(aacch, pci, aacch_driver, aacch_devclass, NULL, NULL); MODULE_PNP_INFO("U16:vendor;U16:device;", pci, aac, - aac_identifiers, sizeof(aac_identifiers[0]), nitems(aac_identifiers) - 1); + aac_identifiers, nitems(aac_identifiers) - 1); static int aacch_probe(device_t dev) Modified: head/sys/dev/aacraid/aacraid_pci.c ============================================================================== --- head/sys/dev/aacraid/aacraid_pci.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/aacraid/aacraid_pci.c Sun Aug 19 00:22:21 2018 (r338035) @@ -106,7 +106,7 @@ struct aac_ident DRIVER_MODULE(aacraid, pci, aacraid_pci_driver, aacraid_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device", pci, aacraid, - aacraid_family_identifiers, sizeof(aacraid_family_identifiers[0]), + aacraid_family_identifiers, nitems(aacraid_family_identifiers) - 1); MODULE_DEPEND(aacraid, pci, 1, 1, 1); Modified: head/sys/dev/adlink/adlink.c ============================================================================== --- head/sys/dev/adlink/adlink.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/adlink/adlink.c Sun Aug 19 00:22:21 2018 (r338035) @@ -438,6 +438,6 @@ static driver_t adlink_driver = { }; DRIVER_MODULE(adlink, pci, adlink_driver, adlink_devclass, 0, 0); -MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, adlink, adlink_id, sizeof(adlink_id[0]), +MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, adlink, adlink_id, nitems(adlink_id)); #endif /* _KERNEL */ Modified: head/sys/dev/ae/if_ae.c ============================================================================== --- head/sys/dev/ae/if_ae.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/ae/if_ae.c Sun Aug 19 00:22:21 2018 (r338035) @@ -178,7 +178,7 @@ static devclass_t ae_devclass; DRIVER_MODULE(ae, pci, ae_driver, ae_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, ae, ae_devs, - sizeof(ae_devs[0]), nitems(ae_devs)); + nitems(ae_devs)); DRIVER_MODULE(miibus, ae, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(ae, pci, 1, 1, 1); MODULE_DEPEND(ae, ether, 1, 1, 1); Modified: head/sys/dev/age/if_age.c ============================================================================== --- head/sys/dev/age/if_age.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/age/if_age.c Sun Aug 19 00:22:21 2018 (r338035) @@ -184,7 +184,7 @@ static devclass_t age_devclass; DRIVER_MODULE(age, pci, age_driver, age_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, age, age_devs, - sizeof(age_devs[0]), nitems(age_devs)); + nitems(age_devs)); DRIVER_MODULE(miibus, age, miibus_driver, miibus_devclass, 0, 0); static struct resource_spec age_res_spec_mem[] = { Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/ahci/ahci_pci.c Sun Aug 19 00:22:21 2018 (r338035) @@ -667,7 +667,7 @@ static driver_t ahci_driver = { DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, NULL, NULL); /* Also matches class / subclass / progid XXX need to add when we have masking support */ MODULE_PNP_INFO("W32:vendor/device", pci, ahci, ahci_ids, - sizeof(ahci_ids[0]), nitems(ahci_ids) - 1); + nitems(ahci_ids) - 1); static device_method_t ahci_ata_methods[] = { DEVMETHOD(device_probe, ahci_ata_probe), DEVMETHOD(device_attach, ahci_pci_attach), Modified: head/sys/dev/alc/if_alc.c ============================================================================== --- head/sys/dev/alc/if_alc.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/alc/if_alc.c Sun Aug 19 00:22:21 2018 (r338035) @@ -244,7 +244,7 @@ static devclass_t alc_devclass; DRIVER_MODULE(alc, pci, alc_driver, alc_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device", pci, alc, alc_ident_table, - sizeof(alc_ident_table[0]), nitems(alc_ident_table) - 1); + nitems(alc_ident_table) - 1); DRIVER_MODULE(miibus, alc, miibus_driver, miibus_devclass, 0, 0); static struct resource_spec alc_res_spec_mem[] = { Modified: head/sys/dev/ale/if_ale.c ============================================================================== --- head/sys/dev/ale/if_ale.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/ale/if_ale.c Sun Aug 19 00:22:21 2018 (r338035) @@ -179,7 +179,7 @@ static devclass_t ale_devclass; DRIVER_MODULE(ale, pci, ale_driver, ale_devclass, NULL, NULL); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, ale, ale_devs, - sizeof(ale_devs[0]), nitems(ale_devs)); + nitems(ale_devs)); DRIVER_MODULE(miibus, ale, miibus_driver, miibus_devclass, NULL, NULL); static struct resource_spec ale_res_spec_mem[] = { Modified: head/sys/dev/amdsmn/amdsmn.c ============================================================================== --- head/sys/dev/amdsmn/amdsmn.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/amdsmn/amdsmn.c Sun Aug 19 00:22:21 2018 (r338035) @@ -90,7 +90,7 @@ static devclass_t amdsmn_devclass; DRIVER_MODULE(amdsmn, hostb, amdsmn_driver, amdsmn_devclass, NULL, NULL); MODULE_VERSION(amdsmn, 1); MODULE_PNP_INFO("W32:vendor/device", pci, amdsmn, amdsmn_ids, - sizeof(amdsmn_ids[0]), nitems(amdsmn_ids)); + nitems(amdsmn_ids)); static bool amdsmn_match(device_t parent) Modified: head/sys/dev/amdtemp/amdtemp.c ============================================================================== --- head/sys/dev/amdtemp/amdtemp.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/amdtemp/amdtemp.c Sun Aug 19 00:22:21 2018 (r338035) @@ -167,7 +167,7 @@ DRIVER_MODULE(amdtemp, hostb, amdtemp_driver, amdtemp_ MODULE_VERSION(amdtemp, 1); MODULE_DEPEND(amdtemp, amdsmn, 1, 1, 1); MODULE_PNP_INFO("U16:vendor;U16:device", pci, amdtemp, amdtemp_products, - sizeof(amdtemp_products[0]), nitems(amdtemp_products)); + nitems(amdtemp_products)); static int amdtemp_match(device_t dev) Modified: head/sys/dev/amr/amr_pci.c ============================================================================== --- head/sys/dev/amr/amr_pci.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/amr/amr_pci.c Sun Aug 19 00:22:21 2018 (r338035) @@ -142,7 +142,7 @@ static struct amr_ident static devclass_t amr_devclass; DRIVER_MODULE(amr, pci, amr_pci_driver, amr_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device", pci, amr, amr_device_ids, - sizeof(amr_device_ids[0]), nitems(amr_device_ids) - 1); + nitems(amr_device_ids) - 1); MODULE_DEPEND(amr, pci, 1, 1, 1); MODULE_DEPEND(amr, cam, 1, 1, 1); Modified: head/sys/dev/an/if_an_pci.c ============================================================================== --- head/sys/dev/an/if_an_pci.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/an/if_an_pci.c Sun Aug 19 00:22:21 2018 (r338035) @@ -274,6 +274,6 @@ static devclass_t an_devclass; DRIVER_MODULE(an, pci, an_pci_driver, an_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, an, - an_devs, sizeof(an_devs[0]), nitems(an_devs) - 1); + an_devs, nitems(an_devs) - 1); MODULE_DEPEND(an, pci, 1, 1, 1); MODULE_DEPEND(an, wlan, 1, 1, 1); Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/bce/if_bce.c Sun Aug 19 00:22:21 2018 (r338035) @@ -530,7 +530,7 @@ MODULE_DEPEND(bce, miibus, 1, 1, 1); DRIVER_MODULE(bce, pci, bce_driver, bce_devclass, NULL, NULL); DRIVER_MODULE(miibus, bce, miibus_driver, miibus_devclass, NULL, NULL); MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#;D:#", pci, bce, - bce_devs, sizeof(bce_devs[0]), nitems(bce_devs) - 1); + bce_devs, nitems(bce_devs) - 1); /****************************************************************************/ /* Tunable device values */ Modified: head/sys/dev/bfe/if_bfe.c ============================================================================== --- head/sys/dev/bfe/if_bfe.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/bfe/if_bfe.c Sun Aug 19 00:22:21 2018 (r338035) @@ -158,7 +158,7 @@ static devclass_t bfe_devclass; DRIVER_MODULE(bfe, pci, bfe_driver, bfe_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, bfe, bfe_devs, - sizeof(bfe_devs[0]), nitems(bfe_devs) - 1); + nitems(bfe_devs) - 1); DRIVER_MODULE(miibus, bfe, miibus_driver, miibus_devclass, 0, 0); /* Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/bge/if_bge.c Sun Aug 19 00:22:21 2018 (r338035) @@ -548,7 +548,7 @@ static devclass_t bge_devclass; DRIVER_MODULE(bge, pci, bge_driver, bge_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device", pci, bge, bge_devs, - sizeof(bge_devs[0]), nitems(bge_devs) - 1); + nitems(bge_devs) - 1); DRIVER_MODULE(miibus, bge, miibus_driver, miibus_devclass, 0, 0); static int bge_allow_asf = 1; Modified: head/sys/dev/bwi/if_bwi_pci.c ============================================================================== --- head/sys/dev/bwi/if_bwi_pci.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/bwi/if_bwi_pci.c Sun Aug 19 00:22:21 2018 (r338035) @@ -257,7 +257,7 @@ static driver_t bwi_driver = { static devclass_t bwi_devclass; DRIVER_MODULE(bwi, pci, bwi_driver, bwi_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, bwi, bwi_devices, - sizeof(bwi_devices[0]), nitems(bwi_devices) - 1); + nitems(bwi_devices) - 1); MODULE_DEPEND(bwi, wlan, 1, 1, 1); /* 802.11 media layer */ MODULE_DEPEND(bwi, firmware, 1, 1, 1); /* firmware support */ MODULE_DEPEND(bwi, wlan_amrr, 1, 1, 1); Modified: head/sys/dev/bwn/if_bwn_pci.c ============================================================================== --- head/sys/dev/bwn/if_bwn_pci.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/bwn/if_bwn_pci.c Sun Aug 19 00:22:21 2018 (r338035) @@ -296,9 +296,9 @@ DEFINE_CLASS_0(bwn_pci, bwn_pci_driver, bwn_pci_method DRIVER_MODULE_ORDERED(bwn_pci, pci, bwn_pci_driver, bwn_pci_devclass, NULL, NULL, SI_ORDER_ANY); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, bwn_siba, - siba_devices, sizeof(siba_devices[0]), nitems(siba_devices) - 1); + siba_devices, nitems(siba_devices) - 1); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, bwn_bcma, - bcma_devices, sizeof(bcma_devices[0]), nitems(bcma_devices) - 1); + bcma_devices, nitems(bcma_devices) - 1); DRIVER_MODULE(bhndb, bwn_pci, bhndb_pci_driver, bhndb_devclass, NULL, NULL); MODULE_DEPEND(bwn_pci, bwn, 1, 1, 1); Modified: head/sys/dev/cas/if_cas.c ============================================================================== --- head/sys/dev/cas/if_cas.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/cas/if_cas.c Sun Aug 19 00:22:21 2018 (r338035) @@ -2617,7 +2617,7 @@ static const struct cas_pci_dev { DRIVER_MODULE(cas, pci, cas_pci_driver, cas_devclass, 0, 0); MODULE_PNP_INFO("W32:vendor/device", pci, cas, cas_pci_devlist, - sizeof(cas_pci_devlist[0]), nitems(cas_pci_devlist) - 1); + nitems(cas_pci_devlist) - 1); DRIVER_MODULE(miibus, cas, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(cas, pci, 1, 1, 1); Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/ciss/ciss.c Sun Aug 19 00:22:21 2018 (r338035) @@ -365,7 +365,7 @@ static struct static devclass_t ciss_devclass; DRIVER_MODULE(ciss, pci, ciss_pci_driver, ciss_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;", pci, ciss, ciss_vendor_data, - sizeof(ciss_vendor_data[0]), nitems(ciss_vendor_data) - 1); + nitems(ciss_vendor_data) - 1); MODULE_DEPEND(ciss, cam, 1, 1, 1); MODULE_DEPEND(ciss, pci, 1, 1, 1); Modified: head/sys/dev/dc/if_dc.c ============================================================================== --- head/sys/dev/dc/if_dc.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/dc/if_dc.c Sun Aug 19 00:22:21 2018 (r338035) @@ -360,7 +360,7 @@ static devclass_t dc_devclass; DRIVER_MODULE_ORDERED(dc, pci, dc_driver, dc_devclass, NULL, NULL, SI_ORDER_ANY); MODULE_PNP_INFO("W32:vendor/device;U8:revision;D:#", pci, dc, dc_devs, - sizeof(dc_devs[0]), nitems(dc_devs) - 1); + nitems(dc_devs) - 1); DRIVER_MODULE(miibus, dc, miibus_driver, miibus_devclass, NULL, NULL); #define DC_SETBIT(sc, reg, x) \ Modified: head/sys/dev/drm2/i915/i915_drv.c ============================================================================== --- head/sys/dev/drm2/i915/i915_drv.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/drm2/i915/i915_drv.c Sun Aug 19 00:22:21 2018 (r338035) @@ -1237,7 +1237,7 @@ MODULE_DEPEND(i915kms, iicbus, 1, 1, 1); MODULE_DEPEND(i915kms, iic, 1, 1, 1); MODULE_DEPEND(i915kms, iicbb, 1, 1, 1); MODULE_PNP_INFO("U32:vendor;U32:device;P:#;D:#", vgapci, i915, pciidlist, - sizeof(pciidlist[0]), nitems(pciidlist) - 1); + nitems(pciidlist) - 1); /* We give fast paths for the really cool registers */ #define NEEDS_FORCE_WAKE(dev_priv, reg) \ Modified: head/sys/dev/drm2/radeon/radeon_drv.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_drv.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/drm2/radeon/radeon_drv.c Sun Aug 19 00:22:21 2018 (r338035) @@ -402,4 +402,4 @@ MODULE_DEPEND(radeonkms, iic, 1, 1, 1); MODULE_DEPEND(radeonkms, iicbb, 1, 1, 1); MODULE_DEPEND(radeonkms, firmware, 1, 1, 1); MODULE_PNP_INFO("U32:vendor;U32:device;P:#;D:#", vgapci, radeonkms, - pciidlist, sizeof(pciidlist[0]), nitems(pciidlist) - 1); + pciidlist, nitems(pciidlist) - 1); Modified: head/sys/dev/ed/if_ed_pci.c ============================================================================== --- head/sys/dev/ed/if_ed_pci.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/ed/if_ed_pci.c Sun Aug 19 00:22:21 2018 (r338035) @@ -145,5 +145,5 @@ static driver_t ed_pci_driver = { DRIVER_MODULE(ed, pci, ed_pci_driver, ed_devclass, 0, 0); MODULE_DEPEND(ed, pci, 1, 1, 1); MODULE_DEPEND(ed, ether, 1, 1, 1); -MODULE_PNP_INFO("W32:vendor/device;D:#", pci, ed, pci_ids, sizeof(pci_ids[0]), +MODULE_PNP_INFO("W32:vendor/device;D:#", pci, ed, pci_ids, nitems(pci_ids) - 1); Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/ena/ena.c Sun Aug 19 00:22:21 2018 (r338035) @@ -3948,7 +3948,7 @@ static driver_t ena_driver = { devclass_t ena_devclass; DRIVER_MODULE(ena, pci, ena_driver, ena_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device", pci, ena, ena_vendor_info_array, - sizeof(ena_vendor_info_array[0]), nitems(ena_vendor_info_array) - 1); + nitems(ena_vendor_info_array) - 1); MODULE_DEPEND(ena, pci, 1, 1, 1); MODULE_DEPEND(ena, ether, 1, 1, 1); Modified: head/sys/dev/et/if_et.c ============================================================================== --- head/sys/dev/et/if_et.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/et/if_et.c Sun Aug 19 00:22:21 2018 (r338035) @@ -189,7 +189,7 @@ static devclass_t et_devclass; DRIVER_MODULE(et, pci, et_driver, et_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, et, et_devices, - sizeof(et_devices[0]), nitems(et_devices) - 1); + nitems(et_devices) - 1); DRIVER_MODULE(miibus, et, miibus_driver, miibus_devclass, 0, 0); static int et_rx_intr_npkts = 32; Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/fxp/if_fxp.c Sun Aug 19 00:22:21 2018 (r338035) @@ -308,7 +308,7 @@ static devclass_t fxp_devclass; DRIVER_MODULE_ORDERED(fxp, pci, fxp_driver, fxp_devclass, NULL, NULL, SI_ORDER_ANY); MODULE_PNP_INFO("U16:vendor;U16:device", pci, fxp, fxp_ident_table, - sizeof(fxp_ident_table[0]), nitems(fxp_ident_table) - 1); + nitems(fxp_ident_table) - 1); DRIVER_MODULE(miibus, fxp, miibus_driver, miibus_devclass, NULL, NULL); static struct resource_spec fxp_res_spec_mem[] = { Modified: head/sys/dev/gem/if_gem_pci.c ============================================================================== --- head/sys/dev/gem/if_gem_pci.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/gem/if_gem_pci.c Sun Aug 19 00:22:21 2018 (r338035) @@ -116,7 +116,7 @@ static driver_t gem_pci_driver = { DRIVER_MODULE(gem, pci, gem_pci_driver, gem_devclass, 0, 0); MODULE_PNP_INFO("W32:vendor/device", pci, gem, gem_pci_devlist, - sizeof(gem_pci_devlist[0]), nitems(gem_pci_devlist) - 1); + nitems(gem_pci_devlist) - 1); MODULE_DEPEND(gem, pci, 1, 1, 1); MODULE_DEPEND(gem, ether, 1, 1, 1); Modified: head/sys/dev/intpm/intpm.c ============================================================================== --- head/sys/dev/intpm/intpm.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/intpm/intpm.c Sun Aug 19 00:22:21 2018 (r338035) @@ -896,4 +896,4 @@ DRIVER_MODULE(smbus, intsmb, smbus_driver, smbus_devcl MODULE_DEPEND(intsmb, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER); MODULE_VERSION(intsmb, 1); MODULE_PNP_INFO("W32:vendor/device;D:#", pci, intpm, intsmb_products, - sizeof(intsmb_products[0]), nitems(intsmb_products)); + nitems(intsmb_products)); Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/ioat/ioat.c Sun Aug 19 00:22:21 2018 (r338035) @@ -241,7 +241,7 @@ static struct _pcsid }; MODULE_PNP_INFO("W32:vendor/device;D:#", pci, ioat, pci_ids, - sizeof(pci_ids[0]), nitems(pci_ids)); + nitems(pci_ids)); /* * OS <-> Driver linkage functions Modified: head/sys/dev/ipw/if_ipw.c ============================================================================== --- head/sys/dev/ipw/if_ipw.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/ipw/if_ipw.c Sun Aug 19 00:22:21 2018 (r338035) @@ -203,7 +203,7 @@ static devclass_t ipw_devclass; DRIVER_MODULE(ipw, pci, ipw_driver, ipw_devclass, NULL, NULL); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, ipw, ipw_ident_table, - sizeof(ipw_ident_table[0]), nitems(ipw_ident_table) - 1); + nitems(ipw_ident_table) - 1); MODULE_VERSION(ipw, 1); Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/ixgbe/if_ix.c Sun Aug 19 00:22:21 2018 (r338035) @@ -238,7 +238,7 @@ static driver_t ix_driver = { devclass_t ix_devclass; DRIVER_MODULE(ix, pci, ix_driver, ix_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device", pci, ix, ixgbe_vendor_info_array, - sizeof(ixgbe_vendor_info_array[0]), nitems(ixgbe_vendor_info_array) - 1); + nitems(ixgbe_vendor_info_array) - 1); MODULE_DEPEND(ix, pci, 1, 1, 1); MODULE_DEPEND(ix, ether, 1, 1, 1); Modified: head/sys/dev/ixgbe/if_ixv.c ============================================================================== --- head/sys/dev/ixgbe/if_ixv.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/ixgbe/if_ixv.c Sun Aug 19 00:22:21 2018 (r338035) @@ -144,7 +144,7 @@ static driver_t ixv_driver = { devclass_t ixv_devclass; DRIVER_MODULE(ixv, pci, ixv_driver, ixv_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device", pci, ixv, ixv_vendor_info_array, - sizeof(ixv_vendor_info_array[0]), nitems(ixv_vendor_info_array) - 1); + nitems(ixv_vendor_info_array) - 1); MODULE_DEPEND(ixv, pci, 1, 1, 1); MODULE_DEPEND(ixv, ether, 1, 1, 1); #ifdef DEV_NETMAP Modified: head/sys/dev/ncr/ncr.c ============================================================================== --- head/sys/dev/ncr/ncr.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/ncr/ncr.c Sun Aug 19 00:22:21 2018 (r338035) @@ -7109,7 +7109,7 @@ static devclass_t ncr_devclass; DRIVER_MODULE(ncr, pci, ncr_driver, ncr_devclass, 0, 0); MODULE_PNP_INFO("W32:vendor/device;U16:#;D:#", pci, ncr, ncr_chip_table, - sizeof(ncr_chip_table[0]), nitems(ncr_chip_table)); + nitems(ncr_chip_table)); MODULE_DEPEND(ncr, cam, 1, 1, 1); MODULE_DEPEND(ncr, pci, 1, 1, 1); Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Sun Aug 19 00:22:21 2018 (r338035) @@ -3120,4 +3120,4 @@ DRIVER_MODULE(ntb_hw_intel, pci, ntb_intel_driver, ntb MODULE_DEPEND(ntb_hw_intel, ntb, 1, 1, 1); MODULE_VERSION(ntb_hw_intel, 1); MODULE_PNP_INFO("W32:vendor/device;D:#", pci, ntb_hw_intel, pci_ids, - sizeof(pci_ids[0]), nitems(pci_ids)); + nitems(pci_ids)); Modified: head/sys/dev/ofw/ofw_bus_subr.h ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.h Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/ofw/ofw_bus_subr.h Sun Aug 19 00:22:21 2018 (r338035) @@ -67,7 +67,7 @@ struct intr_map_data_fdt { #define SIMPLEBUS_PNP_DESCR "Z:compat;P:#;" #define SIMPLEBUS_PNP_INFO(t) \ - MODULE_PNP_INFO(SIMPLEBUS_PNP_DESCR, simplebus, t, t, sizeof(t[0]), sizeof(t) / sizeof(t[0])); + MODULE_PNP_INFO(SIMPLEBUS_PNP_DESCR, simplebus, t, t, sizeof(t) / sizeof(t[0])); /* Generic implementation of ofw_bus_if.m methods and helper routines */ int ofw_bus_gen_setup_devinfo(struct ofw_bus_devinfo *, phandle_t); Modified: head/sys/dev/pccard/pccardvar.h ============================================================================== --- head/sys/dev/pccard/pccardvar.h Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/pccard/pccardvar.h Sun Aug 19 00:22:21 2018 (r338035) @@ -102,7 +102,7 @@ struct pccard_product { */ #define PCCARD_PNP_DESCR "D:#;V32:manufacturer;V32:product;Z:cisvendor;Z:cisproduct;" #define PCCARD_PNP_INFO(t) \ - MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), nitems(t) - 1); \ + MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, nitems(t) - 1) typedef int (*pccard_product_match_fn) (device_t dev, const struct pccard_product *ent, int vpfmatch); Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/pci/pcivar.h Sun Aug 19 00:22:21 2018 (r338035) @@ -311,7 +311,7 @@ struct pci_device_table { "M16:mask;U16:vendor;U16:device;U16:subvendor;U16:subdevice;" \ "U16:class;U16:subclass;U16:revid;" #define PCI_PNP_INFO(table) \ - MODULE_PNP_INFO(PCI_PNP_STR, pci, table, table, sizeof(table[0]), \ + MODULE_PNP_INFO(PCI_PNP_STR, pci, table, table, \ sizeof(table) / sizeof(table[0])) const struct pci_device_table *pci_match_device(device_t child, Modified: head/sys/dev/puc/puc_pci.c ============================================================================== --- head/sys/dev/puc/puc_pci.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/puc/puc_pci.c Sun Aug 19 00:22:21 2018 (r338035) @@ -200,4 +200,4 @@ static driver_t puc_pci_driver = { DRIVER_MODULE(puc, pci, puc_pci_driver, puc_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#;D:#", pci, puc, - puc_pci_devices, sizeof(puc_pci_devices[0]), nitems(puc_pci_devices) - 1); + puc_pci_devices, nitems(puc_pci_devices) - 1); Modified: head/sys/dev/spibus/spi.h ============================================================================== --- head/sys/dev/spibus/spi.h Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/spibus/spi.h Sun Aug 19 00:22:21 2018 (r338035) @@ -43,4 +43,4 @@ struct spi_command { #define SPIBUS_PNP_DESCR "Z:compat;P:#;" #define SPIBUS_PNP_INFO(t) \ - MODULE_PNP_INFO(SPIBUS_PNP_DESCR, spibus, t, t, sizeof(t[0]), sizeof(t) / sizeof(t[0])); + MODULE_PNP_INFO(SPIBUS_PNP_DESCR, spibus, t, t, sizeof(t) / sizeof(t[0])); Modified: head/sys/dev/uart/uart_bus_pccard.c ============================================================================== --- head/sys/dev/uart/uart_bus_pccard.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/uart/uart_bus_pccard.c Sun Aug 19 00:22:21 2018 (r338035) @@ -103,4 +103,4 @@ uart_pccard_attach(device_t dev) DRIVER_MODULE(uart, pccard, uart_pccard_driver, uart_devclass, 0, 0); MODULE_PNP_INFO("U32:function_type;", pccard, uart, &uart_pccard_function, - sizeof(uart_pccard_function), 1); + 1); Modified: head/sys/dev/usb/usbdi.h ============================================================================== --- head/sys/dev/usb/usbdi.h Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/usb/usbdi.h Sun Aug 19 00:22:21 2018 (r338035) @@ -342,13 +342,13 @@ struct usb_device_id { #define USB_STD_PNP_HOST_INFO USB_STD_PNP_INFO "T:mode=host;" #define USB_STD_PNP_DEVICE_INFO USB_STD_PNP_INFO "T:mode=device;" #define USB_PNP_HOST_INFO(table) \ - MODULE_PNP_INFO(USB_STD_PNP_HOST_INFO, uhub, table, table, sizeof(table[0]), \ + MODULE_PNP_INFO(USB_STD_PNP_HOST_INFO, uhub, table, table, \ sizeof(table) / sizeof(table[0])) #define USB_PNP_DEVICE_INFO(table) \ - MODULE_PNP_INFO(USB_STD_PNP_DEVICE_INFO, uhub, table, table, sizeof(table[0]), \ + MODULE_PNP_INFO(USB_STD_PNP_DEVICE_INFO, uhub, table, table, \ sizeof(table) / sizeof(table[0])) #define USB_PNP_DUAL_INFO(table) \ - MODULE_PNP_INFO(USB_STD_PNP_INFO, uhub, table, table, sizeof(table[0]), \ + MODULE_PNP_INFO(USB_STD_PNP_INFO, uhub, table, table, \ sizeof(table) / sizeof(table[0])) /* check that the size of the structure above is correct */ Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/dev/xl/if_xl.c Sun Aug 19 00:22:21 2018 (r338035) @@ -334,7 +334,7 @@ static devclass_t xl_devclass; DRIVER_MODULE_ORDERED(xl, pci, xl_driver, xl_devclass, NULL, NULL, SI_ORDER_ANY); DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, NULL, NULL); -MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, xl, xl_devs, sizeof(xl_devs[0]), +MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, xl, xl_devs, nitems(xl_devs) - 1); static void Modified: head/sys/isa/isavar.h ============================================================================== --- head/sys/isa/isavar.h Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/isa/isavar.h Sun Aug 19 00:22:21 2018 (r338035) @@ -142,7 +142,7 @@ enum isa_device_ivars { #define ISA_PNP_DESCR "E:pnpid;D:#" #define ISA_PNP_INFO(t) \ - MODULE_PNP_INFO(ISA_PNP_DESCR, isa, t, t, sizeof(t[0]), nitems(t) - 1); \ + MODULE_PNP_INFO(ISA_PNP_DESCR, isa, t, t, nitems(t) - 1); \ /* * Simplified accessors for isa devices Modified: head/sys/net/iflib.h ============================================================================== --- head/sys/net/iflib.h Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/net/iflib.h Sun Aug 19 00:22:21 2018 (r338035) @@ -173,7 +173,7 @@ typedef struct pci_vendor_info { #define IFLIB_PNP_DESCR "U32:vendor;U32:device;U32:subvendor;U32:subdevice;" \ "U32:revision;U32:class;D:#" #define IFLIB_PNP_INFO(b, u, t) \ - MODULE_PNP_INFO(IFLIB_PNP_DESCR, b, u, t, sizeof(t[0]), nitems(t) - 1) + MODULE_PNP_INFO(IFLIB_PNP_DESCR, b, u, t, nitems(t) - 1) typedef struct if_txrx { int (*ift_txd_encap) (void *, if_pkt_info_t); Modified: head/sys/sys/module.h ============================================================================== --- head/sys/sys/module.h Sat Aug 18 23:24:53 2018 (r338034) +++ head/sys/sys/module.h Sun Aug 19 00:22:21 2018 (r338035) @@ -178,12 +178,12 @@ struct mod_pnp_match_info * to allow external tools to parse their internal device tables * to make an informed guess about what driver(s) to load. */ -#define MODULE_PNP_INFO(d, b, unique, t, l, n) \ +#define MODULE_PNP_INFO(d, b, unique, t, n) \ static const struct mod_pnp_match_info _module_pnp_##b##_##unique = { \ .descr = d, \ .bus = #b, \ .table = t, \ - .entry_len = l, \ + .entry_len = sizeof((t)[0]), \ .num_entry = n \ }; \ MODULE_METADATA(_md_##b##_pnpinfo_##unique, MDT_PNP_INFO, \ From owner-svn-src-head@freebsd.org Sun Aug 19 00:31: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 5E543107A9D3 for ; Sun, 19 Aug 2018 00:31:35 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (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 C7C107E3CC for ; Sun, 19 Aug 2018 00:31:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x230.google.com with SMTP id h20-v6so16277019itf.2 for ; Sat, 18 Aug 2018 17:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=XvgbRmC+1NI2Kxgi9RtrMKkwnMRkUh4D4q/1cDlLqFU=; b=qs0DVGjoeYqv30Y8NfimDg0StufARXUutC07AZqy3ymUreXQIsC35qljAt1X345z+r azx/sEQ/Jdvwn4EIu0tM5DdPZYhLre7kf7BDqa4deRy8JVBrcSROjDHm6Bgfi5R3YG82 juaowMFpzj5aeaAYA/nSiTIQ8aB5wwZDioWj+AajZeYuOYB43yTFdpdo/iXpYzbnfnv9 04VNwUnwb8BxBk6ifkumWmYQEELeylM4H7qKZYWucnagNYG2Bo4li9UWqed2sWHjaEHP Wi1aNNmUOwYmfH9ToP1QKcKgCnsy0B8pwpmIyOh6uo3+8KrGe2vN4XwMDVH4/nkexKNV xkcA== 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=XvgbRmC+1NI2Kxgi9RtrMKkwnMRkUh4D4q/1cDlLqFU=; b=niwxrKudahV7cqG2kba+ardoB8aZXlVTF5mcpkg3hWxMP44O9qFNrDpJGQ5hWhcol3 x+8Fld02uP/zC1CNMFvpmxv7m7SIOr6deIgVgu+4TabEJvofD1IdGuajBd3wr+Ql+qZe GYlONfyTi6o4wU5gFt+Ds7u45RhXyDG9+vMgKUmjob4Qw4d3lCfZT3Rzb4nO9SItunMb qK4kPfEWkPsx/2VIrgk90f/7ENQdPXHfdfEoVZOKSvFZFK+/pKb4drN6nMaS09Tce5Gf ML2S+zx1FwBrWl0oOuRlyEDXbsXB6qCSrrlop3dar81AKc3xhkfDz6oIVbxBR8TAQUvS MpLw== X-Gm-Message-State: AOUpUlHP85ZAAygspeAFzAiG9c4zhsmNapuq7BW4dumShxzlwk5miRDD a1StN2/M2YHwpJodsRQ3KW1IW1K4k5MzVlwr4EfYkA== X-Google-Smtp-Source: AA+uWPyTiBE1T2fXCg4v0S5QXrmKtcP3IpA8t0EBs6eAYbx0Nw1lEO/2M8YkCZ0850Zb7oKnhELPqTWXCWrmfdY+jA8= X-Received: by 2002:a24:9197:: with SMTP id i145-v6mr8298320ite.39.1534638693620; Sat, 18 Aug 2018 17:31:33 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:2806:0:0:0:0:0 with HTTP; Sat, 18 Aug 2018 17:31:33 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <201808190022.w7J0MLBE022075@repo.freebsd.org> References: <201808190022.w7J0MLBE022075@repo.freebsd.org> From: Warner Losh Date: Sat, 18 Aug 2018 18:31:33 -0600 X-Google-Sender-Auth: 0bM7_9E4Ryu95EImPhVP8Xg0x_Q Message-ID: Subject: Re: svn commit: r338035 - in head/sys: crypto/ccp dev/aac dev/aacraid dev/adlink dev/ae dev/age dev/ahci dev/alc dev/ale dev/amdsmn dev/amdtemp dev/amr dev/an dev/bce dev/bfe dev/bge dev/bwi dev/bwn de... To: Conrad Meyer Cc: src-committers , 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: Sun, 19 Aug 2018 00:31:36 -0000 I strongly object to this change. Please back this out. It totally screws the SoC WIP that hasn't landed. And you didn't even ask me. I'm rather irked. Warner On Sat, Aug 18, 2018 at 6:22 PM, Conrad Meyer wrote: > Author: cem > Date: Sun Aug 19 00:22:21 2018 > New Revision: 338035 > URL: https://svnweb.freebsd.org/changeset/base/338035 > > Log: > Remove unused and easy to misuse PNP macro parameter > > Inspired by r338025, just remove the element size parameter to the > MODULE_PNP_INFO macro entirely. The 'table' parameter is now required to > have correct pointer (or array) type. Since all invocations of the macro > already had this property and the emitted PNP data continues to include > the > element size, there is no functional change. > > Mostly done with the coccinelle 'spatch' tool: > > $ cat modpnpsize0.cocci > @normaltables@ > identifier b,c; > expression a,d,e; > declarer MODULE_PNP_INFO; > @@ > MODULE_PNP_INFO(a,b,c,d, > -sizeof(d[0]), > e); > > @singletons@ > identifier b,c,d; > expression a; > declarer MODULE_PNP_INFO; > @@ > MODULE_PNP_INFO(a,b,c,&d, > -sizeof(d), > 1); > > $ rg -l MODULE_PNP_INFO -- sys | \ > xargs spatch --in-place --sp-file modpnpsize0.cocci > > (Note that coccinelle invokes diff(1) via a PATH search and expects diff > to > tolerate the -B flag, which BSD diff does not. So I had to link gdiff > into > PATH as diff to use spatch.) > > Tinderbox'd (-DMAKE_JUST_KERNELS). > > Modified: > head/sys/crypto/ccp/ccp.c > head/sys/dev/aac/aac_pci.c > head/sys/dev/aacraid/aacraid_pci.c > head/sys/dev/adlink/adlink.c > head/sys/dev/ae/if_ae.c > head/sys/dev/age/if_age.c > head/sys/dev/ahci/ahci_pci.c > head/sys/dev/alc/if_alc.c > head/sys/dev/ale/if_ale.c > head/sys/dev/amdsmn/amdsmn.c > head/sys/dev/amdtemp/amdtemp.c > head/sys/dev/amr/amr_pci.c > head/sys/dev/an/if_an_pci.c > head/sys/dev/bce/if_bce.c > head/sys/dev/bfe/if_bfe.c > head/sys/dev/bge/if_bge.c > head/sys/dev/bwi/if_bwi_pci.c > head/sys/dev/bwn/if_bwn_pci.c > head/sys/dev/cas/if_cas.c > head/sys/dev/ciss/ciss.c > head/sys/dev/dc/if_dc.c > head/sys/dev/drm2/i915/i915_drv.c > head/sys/dev/drm2/radeon/radeon_drv.c > head/sys/dev/ed/if_ed_pci.c > head/sys/dev/ena/ena.c > head/sys/dev/et/if_et.c > head/sys/dev/fxp/if_fxp.c > head/sys/dev/gem/if_gem_pci.c > head/sys/dev/intpm/intpm.c > head/sys/dev/ioat/ioat.c > head/sys/dev/ipw/if_ipw.c > head/sys/dev/ixgbe/if_ix.c > head/sys/dev/ixgbe/if_ixv.c > head/sys/dev/ncr/ncr.c > head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c > head/sys/dev/ofw/ofw_bus_subr.h > head/sys/dev/pccard/pccardvar.h > head/sys/dev/pci/pcivar.h > head/sys/dev/puc/puc_pci.c > head/sys/dev/spibus/spi.h > head/sys/dev/uart/uart_bus_pccard.c > head/sys/dev/usb/usbdi.h > head/sys/dev/xl/if_xl.c > head/sys/isa/isavar.h > head/sys/net/iflib.h > head/sys/sys/module.h > > Modified: head/sys/crypto/ccp/ccp.c > ============================================================ > ================== > --- head/sys/crypto/ccp/ccp.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/crypto/ccp/ccp.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -734,7 +734,7 @@ 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); > -MODULE_PNP_INFO("W32:vendor/device", pci, ccp, ccp_ids, > sizeof(ccp_ids[0]), > +MODULE_PNP_INFO("W32:vendor/device", pci, ccp, ccp_ids, > nitems(ccp_ids)); > > static int > > Modified: head/sys/dev/aac/aac_pci.c > ============================================================ > ================== > --- head/sys/dev/aac/aac_pci.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/aac/aac_pci.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -494,7 +494,7 @@ static driver_t aacch_driver = { > static devclass_t aacch_devclass; > DRIVER_MODULE(aacch, pci, aacch_driver, aacch_devclass, NULL, NULL); > MODULE_PNP_INFO("U16:vendor;U16:device;", pci, aac, > - aac_identifiers, sizeof(aac_identifiers[0]), nitems(aac_identifiers) > - 1); > + aac_identifiers, nitems(aac_identifiers) - 1); > > static int > aacch_probe(device_t dev) > > Modified: head/sys/dev/aacraid/aacraid_pci.c > ============================================================ > ================== > --- head/sys/dev/aacraid/aacraid_pci.c Sat Aug 18 23:24:53 2018 > (r338034) > +++ head/sys/dev/aacraid/aacraid_pci.c Sun Aug 19 00:22:21 2018 > (r338035) > @@ -106,7 +106,7 @@ struct aac_ident > > DRIVER_MODULE(aacraid, pci, aacraid_pci_driver, aacraid_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device", pci, aacraid, > - aacraid_family_identifiers, sizeof(aacraid_family_identifiers[0]), > + aacraid_family_identifiers, > nitems(aacraid_family_identifiers) - 1); > MODULE_DEPEND(aacraid, pci, 1, 1, 1); > > > Modified: head/sys/dev/adlink/adlink.c > ============================================================ > ================== > --- head/sys/dev/adlink/adlink.c Sat Aug 18 23:24:53 2018 > (r338034) > +++ head/sys/dev/adlink/adlink.c Sun Aug 19 00:22:21 2018 > (r338035) > @@ -438,6 +438,6 @@ static driver_t adlink_driver = { > }; > > DRIVER_MODULE(adlink, pci, adlink_driver, adlink_devclass, 0, 0); > -MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, adlink, adlink_id, > sizeof(adlink_id[0]), > +MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, adlink, adlink_id, > nitems(adlink_id)); > #endif /* _KERNEL */ > > Modified: head/sys/dev/ae/if_ae.c > ============================================================ > ================== > --- head/sys/dev/ae/if_ae.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/ae/if_ae.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -178,7 +178,7 @@ static devclass_t ae_devclass; > > DRIVER_MODULE(ae, pci, ae_driver, ae_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, ae, ae_devs, > - sizeof(ae_devs[0]), nitems(ae_devs)); > + nitems(ae_devs)); > DRIVER_MODULE(miibus, ae, miibus_driver, miibus_devclass, 0, 0); > MODULE_DEPEND(ae, pci, 1, 1, 1); > MODULE_DEPEND(ae, ether, 1, 1, 1); > > Modified: head/sys/dev/age/if_age.c > ============================================================ > ================== > --- head/sys/dev/age/if_age.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/age/if_age.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -184,7 +184,7 @@ static devclass_t age_devclass; > > DRIVER_MODULE(age, pci, age_driver, age_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, age, age_devs, > - sizeof(age_devs[0]), nitems(age_devs)); > + nitems(age_devs)); > DRIVER_MODULE(miibus, age, miibus_driver, miibus_devclass, 0, 0); > > static struct resource_spec age_res_spec_mem[] = { > > Modified: head/sys/dev/ahci/ahci_pci.c > ============================================================ > ================== > --- head/sys/dev/ahci/ahci_pci.c Sat Aug 18 23:24:53 2018 > (r338034) > +++ head/sys/dev/ahci/ahci_pci.c Sun Aug 19 00:22:21 2018 > (r338035) > @@ -667,7 +667,7 @@ static driver_t ahci_driver = { > DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, NULL, NULL); > /* Also matches class / subclass / progid XXX need to add when we have > masking support */ > MODULE_PNP_INFO("W32:vendor/device", pci, ahci, ahci_ids, > - sizeof(ahci_ids[0]), nitems(ahci_ids) - 1); > + nitems(ahci_ids) - 1); > static device_method_t ahci_ata_methods[] = { > DEVMETHOD(device_probe, ahci_ata_probe), > DEVMETHOD(device_attach, ahci_pci_attach), > > Modified: head/sys/dev/alc/if_alc.c > ============================================================ > ================== > --- head/sys/dev/alc/if_alc.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/alc/if_alc.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -244,7 +244,7 @@ static devclass_t alc_devclass; > > DRIVER_MODULE(alc, pci, alc_driver, alc_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device", pci, alc, alc_ident_table, > - sizeof(alc_ident_table[0]), nitems(alc_ident_table) - 1); > + nitems(alc_ident_table) - 1); > DRIVER_MODULE(miibus, alc, miibus_driver, miibus_devclass, 0, 0); > > static struct resource_spec alc_res_spec_mem[] = { > > Modified: head/sys/dev/ale/if_ale.c > ============================================================ > ================== > --- head/sys/dev/ale/if_ale.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/ale/if_ale.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -179,7 +179,7 @@ static devclass_t ale_devclass; > > DRIVER_MODULE(ale, pci, ale_driver, ale_devclass, NULL, NULL); > MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, ale, ale_devs, > - sizeof(ale_devs[0]), nitems(ale_devs)); > + nitems(ale_devs)); > DRIVER_MODULE(miibus, ale, miibus_driver, miibus_devclass, NULL, NULL); > > static struct resource_spec ale_res_spec_mem[] = { > > Modified: head/sys/dev/amdsmn/amdsmn.c > ============================================================ > ================== > --- head/sys/dev/amdsmn/amdsmn.c Sat Aug 18 23:24:53 2018 > (r338034) > +++ head/sys/dev/amdsmn/amdsmn.c Sun Aug 19 00:22:21 2018 > (r338035) > @@ -90,7 +90,7 @@ static devclass_t amdsmn_devclass; > DRIVER_MODULE(amdsmn, hostb, amdsmn_driver, amdsmn_devclass, NULL, NULL); > MODULE_VERSION(amdsmn, 1); > MODULE_PNP_INFO("W32:vendor/device", pci, amdsmn, amdsmn_ids, > - sizeof(amdsmn_ids[0]), nitems(amdsmn_ids)); > + nitems(amdsmn_ids)); > > static bool > amdsmn_match(device_t parent) > > Modified: head/sys/dev/amdtemp/amdtemp.c > ============================================================ > ================== > --- head/sys/dev/amdtemp/amdtemp.c Sat Aug 18 23:24:53 2018 > (r338034) > +++ head/sys/dev/amdtemp/amdtemp.c Sun Aug 19 00:22:21 2018 > (r338035) > @@ -167,7 +167,7 @@ DRIVER_MODULE(amdtemp, hostb, amdtemp_driver, amdtemp_ > MODULE_VERSION(amdtemp, 1); > MODULE_DEPEND(amdtemp, amdsmn, 1, 1, 1); > MODULE_PNP_INFO("U16:vendor;U16:device", pci, amdtemp, amdtemp_products, > - sizeof(amdtemp_products[0]), nitems(amdtemp_products)); > + nitems(amdtemp_products)); > > static int > amdtemp_match(device_t dev) > > Modified: head/sys/dev/amr/amr_pci.c > ============================================================ > ================== > --- head/sys/dev/amr/amr_pci.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/amr/amr_pci.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -142,7 +142,7 @@ static struct amr_ident > static devclass_t amr_devclass; > DRIVER_MODULE(amr, pci, amr_pci_driver, amr_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device", pci, amr, amr_device_ids, > - sizeof(amr_device_ids[0]), nitems(amr_device_ids) - 1); > + nitems(amr_device_ids) - 1); > MODULE_DEPEND(amr, pci, 1, 1, 1); > MODULE_DEPEND(amr, cam, 1, 1, 1); > > > Modified: head/sys/dev/an/if_an_pci.c > ============================================================ > ================== > --- head/sys/dev/an/if_an_pci.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/an/if_an_pci.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -274,6 +274,6 @@ static devclass_t an_devclass; > > DRIVER_MODULE(an, pci, an_pci_driver, an_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, an, > - an_devs, sizeof(an_devs[0]), nitems(an_devs) - 1); > + an_devs, nitems(an_devs) - 1); > MODULE_DEPEND(an, pci, 1, 1, 1); > MODULE_DEPEND(an, wlan, 1, 1, 1); > > Modified: head/sys/dev/bce/if_bce.c > ============================================================ > ================== > --- head/sys/dev/bce/if_bce.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/bce/if_bce.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -530,7 +530,7 @@ MODULE_DEPEND(bce, miibus, 1, 1, 1); > DRIVER_MODULE(bce, pci, bce_driver, bce_devclass, NULL, NULL); > DRIVER_MODULE(miibus, bce, miibus_driver, miibus_devclass, NULL, NULL); > MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#;D:#", pci, bce, > - bce_devs, sizeof(bce_devs[0]), nitems(bce_devs) - 1); > + bce_devs, nitems(bce_devs) - 1); > > /*********************************************************** > *****************/ > /* Tunable device values > */ > > Modified: head/sys/dev/bfe/if_bfe.c > ============================================================ > ================== > --- head/sys/dev/bfe/if_bfe.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/bfe/if_bfe.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -158,7 +158,7 @@ static devclass_t bfe_devclass; > > DRIVER_MODULE(bfe, pci, bfe_driver, bfe_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, bfe, bfe_devs, > - sizeof(bfe_devs[0]), nitems(bfe_devs) - 1); > + nitems(bfe_devs) - 1); > DRIVER_MODULE(miibus, bfe, miibus_driver, miibus_devclass, 0, 0); > > /* > > Modified: head/sys/dev/bge/if_bge.c > ============================================================ > ================== > --- head/sys/dev/bge/if_bge.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/bge/if_bge.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -548,7 +548,7 @@ static devclass_t bge_devclass; > > DRIVER_MODULE(bge, pci, bge_driver, bge_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device", pci, bge, bge_devs, > - sizeof(bge_devs[0]), nitems(bge_devs) - 1); > + nitems(bge_devs) - 1); > DRIVER_MODULE(miibus, bge, miibus_driver, miibus_devclass, 0, 0); > > static int bge_allow_asf = 1; > > Modified: head/sys/dev/bwi/if_bwi_pci.c > ============================================================ > ================== > --- head/sys/dev/bwi/if_bwi_pci.c Sat Aug 18 23:24:53 2018 > (r338034) > +++ head/sys/dev/bwi/if_bwi_pci.c Sun Aug 19 00:22:21 2018 > (r338035) > @@ -257,7 +257,7 @@ static driver_t bwi_driver = { > static devclass_t bwi_devclass; > DRIVER_MODULE(bwi, pci, bwi_driver, bwi_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, bwi, bwi_devices, > - sizeof(bwi_devices[0]), nitems(bwi_devices) - 1); > + nitems(bwi_devices) - 1); > MODULE_DEPEND(bwi, wlan, 1, 1, 1); /* 802.11 media layer */ > MODULE_DEPEND(bwi, firmware, 1, 1, 1); /* firmware support */ > MODULE_DEPEND(bwi, wlan_amrr, 1, 1, 1); > > Modified: head/sys/dev/bwn/if_bwn_pci.c > ============================================================ > ================== > --- head/sys/dev/bwn/if_bwn_pci.c Sat Aug 18 23:24:53 2018 > (r338034) > +++ head/sys/dev/bwn/if_bwn_pci.c Sun Aug 19 00:22:21 2018 > (r338035) > @@ -296,9 +296,9 @@ DEFINE_CLASS_0(bwn_pci, bwn_pci_driver, bwn_pci_method > DRIVER_MODULE_ORDERED(bwn_pci, pci, bwn_pci_driver, bwn_pci_devclass, > NULL, > NULL, SI_ORDER_ANY); > MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, bwn_siba, > - siba_devices, sizeof(siba_devices[0]), nitems(siba_devices) - 1); > + siba_devices, nitems(siba_devices) - 1); > MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, bwn_bcma, > - bcma_devices, sizeof(bcma_devices[0]), nitems(bcma_devices) - 1); > + bcma_devices, nitems(bcma_devices) - 1); > DRIVER_MODULE(bhndb, bwn_pci, bhndb_pci_driver, bhndb_devclass, NULL, > NULL); > > MODULE_DEPEND(bwn_pci, bwn, 1, 1, 1); > > Modified: head/sys/dev/cas/if_cas.c > ============================================================ > ================== > --- head/sys/dev/cas/if_cas.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/cas/if_cas.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -2617,7 +2617,7 @@ static const struct cas_pci_dev { > > DRIVER_MODULE(cas, pci, cas_pci_driver, cas_devclass, 0, 0); > MODULE_PNP_INFO("W32:vendor/device", pci, cas, cas_pci_devlist, > - sizeof(cas_pci_devlist[0]), nitems(cas_pci_devlist) - 1); > + nitems(cas_pci_devlist) - 1); > DRIVER_MODULE(miibus, cas, miibus_driver, miibus_devclass, 0, 0); > MODULE_DEPEND(cas, pci, 1, 1, 1); > > > Modified: head/sys/dev/ciss/ciss.c > ============================================================ > ================== > --- head/sys/dev/ciss/ciss.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/ciss/ciss.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -365,7 +365,7 @@ static struct > static devclass_t ciss_devclass; > DRIVER_MODULE(ciss, pci, ciss_pci_driver, ciss_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device;", pci, ciss, ciss_vendor_data, > - sizeof(ciss_vendor_data[0]), nitems(ciss_vendor_data) - 1); > + nitems(ciss_vendor_data) - 1); > MODULE_DEPEND(ciss, cam, 1, 1, 1); > MODULE_DEPEND(ciss, pci, 1, 1, 1); > > > Modified: head/sys/dev/dc/if_dc.c > ============================================================ > ================== > --- head/sys/dev/dc/if_dc.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/dc/if_dc.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -360,7 +360,7 @@ static devclass_t dc_devclass; > DRIVER_MODULE_ORDERED(dc, pci, dc_driver, dc_devclass, NULL, NULL, > SI_ORDER_ANY); > MODULE_PNP_INFO("W32:vendor/device;U8:revision;D:#", pci, dc, dc_devs, > - sizeof(dc_devs[0]), nitems(dc_devs) - 1); > + nitems(dc_devs) - 1); > DRIVER_MODULE(miibus, dc, miibus_driver, miibus_devclass, NULL, NULL); > > #define DC_SETBIT(sc, reg, x) \ > > Modified: head/sys/dev/drm2/i915/i915_drv.c > ============================================================ > ================== > --- head/sys/dev/drm2/i915/i915_drv.c Sat Aug 18 23:24:53 2018 > (r338034) > +++ head/sys/dev/drm2/i915/i915_drv.c Sun Aug 19 00:22:21 2018 > (r338035) > @@ -1237,7 +1237,7 @@ MODULE_DEPEND(i915kms, iicbus, 1, 1, 1); > MODULE_DEPEND(i915kms, iic, 1, 1, 1); > MODULE_DEPEND(i915kms, iicbb, 1, 1, 1); > MODULE_PNP_INFO("U32:vendor;U32:device;P:#;D:#", vgapci, i915, pciidlist, > - sizeof(pciidlist[0]), nitems(pciidlist) - 1); > + nitems(pciidlist) - 1); > > /* We give fast paths for the really cool registers */ > #define NEEDS_FORCE_WAKE(dev_priv, reg) \ > > Modified: head/sys/dev/drm2/radeon/radeon_drv.c > ============================================================ > ================== > --- head/sys/dev/drm2/radeon/radeon_drv.c Sat Aug 18 23:24:53 2018 > (r338034) > +++ head/sys/dev/drm2/radeon/radeon_drv.c Sun Aug 19 00:22:21 2018 > (r338035) > @@ -402,4 +402,4 @@ MODULE_DEPEND(radeonkms, iic, 1, 1, 1); > MODULE_DEPEND(radeonkms, iicbb, 1, 1, 1); > MODULE_DEPEND(radeonkms, firmware, 1, 1, 1); > MODULE_PNP_INFO("U32:vendor;U32:device;P:#;D:#", vgapci, radeonkms, > - pciidlist, sizeof(pciidlist[0]), nitems(pciidlist) - 1); > + pciidlist, nitems(pciidlist) - 1); > > Modified: head/sys/dev/ed/if_ed_pci.c > ============================================================ > ================== > --- head/sys/dev/ed/if_ed_pci.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/ed/if_ed_pci.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -145,5 +145,5 @@ static driver_t ed_pci_driver = { > DRIVER_MODULE(ed, pci, ed_pci_driver, ed_devclass, 0, 0); > MODULE_DEPEND(ed, pci, 1, 1, 1); > MODULE_DEPEND(ed, ether, 1, 1, 1); > -MODULE_PNP_INFO("W32:vendor/device;D:#", pci, ed, pci_ids, > sizeof(pci_ids[0]), > +MODULE_PNP_INFO("W32:vendor/device;D:#", pci, ed, pci_ids, > nitems(pci_ids) - 1); > > Modified: head/sys/dev/ena/ena.c > ============================================================ > ================== > --- head/sys/dev/ena/ena.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/ena/ena.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -3948,7 +3948,7 @@ static driver_t ena_driver = { > devclass_t ena_devclass; > DRIVER_MODULE(ena, pci, ena_driver, ena_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device", pci, ena, ena_vendor_info_array, > - sizeof(ena_vendor_info_array[0]), nitems(ena_vendor_info_array) - 1); > + nitems(ena_vendor_info_array) - 1); > MODULE_DEPEND(ena, pci, 1, 1, 1); > MODULE_DEPEND(ena, ether, 1, 1, 1); > > > Modified: head/sys/dev/et/if_et.c > ============================================================ > ================== > --- head/sys/dev/et/if_et.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/et/if_et.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -189,7 +189,7 @@ static devclass_t et_devclass; > > DRIVER_MODULE(et, pci, et_driver, et_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, et, et_devices, > - sizeof(et_devices[0]), nitems(et_devices) - 1); > + nitems(et_devices) - 1); > DRIVER_MODULE(miibus, et, miibus_driver, miibus_devclass, 0, 0); > > static int et_rx_intr_npkts = 32; > > Modified: head/sys/dev/fxp/if_fxp.c > ============================================================ > ================== > --- head/sys/dev/fxp/if_fxp.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/fxp/if_fxp.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -308,7 +308,7 @@ static devclass_t fxp_devclass; > DRIVER_MODULE_ORDERED(fxp, pci, fxp_driver, fxp_devclass, NULL, NULL, > SI_ORDER_ANY); > MODULE_PNP_INFO("U16:vendor;U16:device", pci, fxp, fxp_ident_table, > - sizeof(fxp_ident_table[0]), nitems(fxp_ident_table) - 1); > + nitems(fxp_ident_table) - 1); > DRIVER_MODULE(miibus, fxp, miibus_driver, miibus_devclass, NULL, NULL); > > static struct resource_spec fxp_res_spec_mem[] = { > > Modified: head/sys/dev/gem/if_gem_pci.c > ============================================================ > ================== > --- head/sys/dev/gem/if_gem_pci.c Sat Aug 18 23:24:53 2018 > (r338034) > +++ head/sys/dev/gem/if_gem_pci.c Sun Aug 19 00:22:21 2018 > (r338035) > @@ -116,7 +116,7 @@ static driver_t gem_pci_driver = { > > DRIVER_MODULE(gem, pci, gem_pci_driver, gem_devclass, 0, 0); > MODULE_PNP_INFO("W32:vendor/device", pci, gem, gem_pci_devlist, > - sizeof(gem_pci_devlist[0]), nitems(gem_pci_devlist) - 1); > + nitems(gem_pci_devlist) - 1); > MODULE_DEPEND(gem, pci, 1, 1, 1); > MODULE_DEPEND(gem, ether, 1, 1, 1); > > > Modified: head/sys/dev/intpm/intpm.c > ============================================================ > ================== > --- head/sys/dev/intpm/intpm.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/intpm/intpm.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -896,4 +896,4 @@ DRIVER_MODULE(smbus, intsmb, smbus_driver, smbus_devcl > MODULE_DEPEND(intsmb, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER); > MODULE_VERSION(intsmb, 1); > MODULE_PNP_INFO("W32:vendor/device;D:#", pci, intpm, intsmb_products, > - sizeof(intsmb_products[0]), nitems(intsmb_products)); > + nitems(intsmb_products)); > > Modified: head/sys/dev/ioat/ioat.c > ============================================================ > ================== > --- head/sys/dev/ioat/ioat.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/ioat/ioat.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -241,7 +241,7 @@ static struct _pcsid > }; > > MODULE_PNP_INFO("W32:vendor/device;D:#", pci, ioat, pci_ids, > - sizeof(pci_ids[0]), nitems(pci_ids)); > + nitems(pci_ids)); > > /* > * OS <-> Driver linkage functions > > Modified: head/sys/dev/ipw/if_ipw.c > ============================================================ > ================== > --- head/sys/dev/ipw/if_ipw.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/ipw/if_ipw.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -203,7 +203,7 @@ static devclass_t ipw_devclass; > > DRIVER_MODULE(ipw, pci, ipw_driver, ipw_devclass, NULL, NULL); > MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, ipw, ipw_ident_table, > - sizeof(ipw_ident_table[0]), nitems(ipw_ident_table) - 1); > + nitems(ipw_ident_table) - 1); > > MODULE_VERSION(ipw, 1); > > > Modified: head/sys/dev/ixgbe/if_ix.c > ============================================================ > ================== > --- head/sys/dev/ixgbe/if_ix.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/ixgbe/if_ix.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -238,7 +238,7 @@ static driver_t ix_driver = { > devclass_t ix_devclass; > DRIVER_MODULE(ix, pci, ix_driver, ix_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device", pci, ix, > ixgbe_vendor_info_array, > - sizeof(ixgbe_vendor_info_array[0]), nitems(ixgbe_vendor_info_array) > - 1); > + nitems(ixgbe_vendor_info_array) - 1); > > MODULE_DEPEND(ix, pci, 1, 1, 1); > MODULE_DEPEND(ix, ether, 1, 1, 1); > > Modified: head/sys/dev/ixgbe/if_ixv.c > ============================================================ > ================== > --- head/sys/dev/ixgbe/if_ixv.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/ixgbe/if_ixv.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -144,7 +144,7 @@ static driver_t ixv_driver = { > devclass_t ixv_devclass; > DRIVER_MODULE(ixv, pci, ixv_driver, ixv_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device", pci, ixv, ixv_vendor_info_array, > - sizeof(ixv_vendor_info_array[0]), nitems(ixv_vendor_info_array) - 1); > + nitems(ixv_vendor_info_array) - 1); > MODULE_DEPEND(ixv, pci, 1, 1, 1); > MODULE_DEPEND(ixv, ether, 1, 1, 1); > #ifdef DEV_NETMAP > > Modified: head/sys/dev/ncr/ncr.c > ============================================================ > ================== > --- head/sys/dev/ncr/ncr.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/ncr/ncr.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -7109,7 +7109,7 @@ static devclass_t ncr_devclass; > > DRIVER_MODULE(ncr, pci, ncr_driver, ncr_devclass, 0, 0); > MODULE_PNP_INFO("W32:vendor/device;U16:#;D:#", pci, ncr, ncr_chip_table, > - sizeof(ncr_chip_table[0]), nitems(ncr_chip_table)); > + nitems(ncr_chip_table)); > MODULE_DEPEND(ncr, cam, 1, 1, 1); > MODULE_DEPEND(ncr, pci, 1, 1, 1); > > > Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c > ============================================================ > ================== > --- head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Sat Aug 18 23:24:53 2018 > (r338034) > +++ head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Sun Aug 19 00:22:21 2018 > (r338035) > @@ -3120,4 +3120,4 @@ DRIVER_MODULE(ntb_hw_intel, pci, ntb_intel_driver, > ntb > MODULE_DEPEND(ntb_hw_intel, ntb, 1, 1, 1); > MODULE_VERSION(ntb_hw_intel, 1); > MODULE_PNP_INFO("W32:vendor/device;D:#", pci, ntb_hw_intel, pci_ids, > - sizeof(pci_ids[0]), nitems(pci_ids)); > + nitems(pci_ids)); > > Modified: head/sys/dev/ofw/ofw_bus_subr.h > ============================================================ > ================== > --- head/sys/dev/ofw/ofw_bus_subr.h Sat Aug 18 23:24:53 2018 > (r338034) > +++ head/sys/dev/ofw/ofw_bus_subr.h Sun Aug 19 00:22:21 2018 > (r338035) > @@ -67,7 +67,7 @@ struct intr_map_data_fdt { > > #define SIMPLEBUS_PNP_DESCR "Z:compat;P:#;" > #define SIMPLEBUS_PNP_INFO(t) \ > - MODULE_PNP_INFO(SIMPLEBUS_PNP_DESCR, simplebus, t, t, > sizeof(t[0]), sizeof(t) / sizeof(t[0])); > + MODULE_PNP_INFO(SIMPLEBUS_PNP_DESCR, simplebus, t, t, sizeof(t) / > sizeof(t[0])); > > /* Generic implementation of ofw_bus_if.m methods and helper routines */ > int ofw_bus_gen_setup_devinfo(struct ofw_bus_devinfo *, phandle_t); > > Modified: head/sys/dev/pccard/pccardvar.h > ============================================================ > ================== > --- head/sys/dev/pccard/pccardvar.h Sat Aug 18 23:24:53 2018 > (r338034) > +++ head/sys/dev/pccard/pccardvar.h Sun Aug 19 00:22:21 2018 > (r338035) > @@ -102,7 +102,7 @@ struct pccard_product { > */ > #define PCCARD_PNP_DESCR "D:#;V32:manufacturer;V32:product;Z:cisvendor;Z: > cisproduct;" > #define PCCARD_PNP_INFO(t) \ > - MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), > nitems(t) - 1); \ > + MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, nitems(t) - 1) > > typedef int (*pccard_product_match_fn) (device_t dev, > const struct pccard_product *ent, int vpfmatch); > > Modified: head/sys/dev/pci/pcivar.h > ============================================================ > ================== > --- head/sys/dev/pci/pcivar.h Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/pci/pcivar.h Sun Aug 19 00:22:21 2018 (r338035) > @@ -311,7 +311,7 @@ struct pci_device_table { > "M16:mask;U16:vendor;U16:device;U16:subvendor;U16:subdevice;" \ > "U16:class;U16:subclass;U16:revid;" > #define PCI_PNP_INFO(table) \ > - MODULE_PNP_INFO(PCI_PNP_STR, pci, table, table, sizeof(table[0]), \ > + MODULE_PNP_INFO(PCI_PNP_STR, pci, table, table, \ > sizeof(table) / sizeof(table[0])) > > const struct pci_device_table *pci_match_device(device_t child, > > Modified: head/sys/dev/puc/puc_pci.c > ============================================================ > ================== > --- head/sys/dev/puc/puc_pci.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/puc/puc_pci.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -200,4 +200,4 @@ static driver_t puc_pci_driver = { > > DRIVER_MODULE(puc, pci, puc_pci_driver, puc_devclass, 0, 0); > MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#;D:#", pci, puc, > - puc_pci_devices, sizeof(puc_pci_devices[0]), nitems(puc_pci_devices) > - 1); > + puc_pci_devices, nitems(puc_pci_devices) - 1); > > Modified: head/sys/dev/spibus/spi.h > ============================================================ > ================== > --- head/sys/dev/spibus/spi.h Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/spibus/spi.h Sun Aug 19 00:22:21 2018 (r338035) > @@ -43,4 +43,4 @@ struct spi_command { > > #define SPIBUS_PNP_DESCR "Z:compat;P:#;" > #define SPIBUS_PNP_INFO(t) \ > - MODULE_PNP_INFO(SPIBUS_PNP_DESCR, spibus, t, t, sizeof(t[0]), > sizeof(t) / sizeof(t[0])); > + MODULE_PNP_INFO(SPIBUS_PNP_DESCR, spibus, t, t, sizeof(t) / > sizeof(t[0])); > > Modified: head/sys/dev/uart/uart_bus_pccard.c > ============================================================ > ================== > --- head/sys/dev/uart/uart_bus_pccard.c Sat Aug 18 23:24:53 2018 > (r338034) > +++ head/sys/dev/uart/uart_bus_pccard.c Sun Aug 19 00:22:21 2018 > (r338035) > @@ -103,4 +103,4 @@ uart_pccard_attach(device_t dev) > > DRIVER_MODULE(uart, pccard, uart_pccard_driver, uart_devclass, 0, 0); > MODULE_PNP_INFO("U32:function_type;", pccard, uart, > &uart_pccard_function, > - sizeof(uart_pccard_function), 1); > + 1); > > Modified: head/sys/dev/usb/usbdi.h > ============================================================ > ================== > --- head/sys/dev/usb/usbdi.h Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/usb/usbdi.h Sun Aug 19 00:22:21 2018 (r338035) > @@ -342,13 +342,13 @@ struct usb_device_id { > #define USB_STD_PNP_HOST_INFO USB_STD_PNP_INFO "T:mode=host;" > #define USB_STD_PNP_DEVICE_INFO USB_STD_PNP_INFO "T:mode=device;" > #define USB_PNP_HOST_INFO(table) \ > - MODULE_PNP_INFO(USB_STD_PNP_HOST_INFO, uhub, table, table, > sizeof(table[0]), \ > + MODULE_PNP_INFO(USB_STD_PNP_HOST_INFO, uhub, table, table, \ > sizeof(table) / sizeof(table[0])) > #define USB_PNP_DEVICE_INFO(table) \ > - MODULE_PNP_INFO(USB_STD_PNP_DEVICE_INFO, uhub, table, table, > sizeof(table[0]), \ > + MODULE_PNP_INFO(USB_STD_PNP_DEVICE_INFO, uhub, table, table, \ > sizeof(table) / sizeof(table[0])) > #define USB_PNP_DUAL_INFO(table) \ > - MODULE_PNP_INFO(USB_STD_PNP_INFO, uhub, table, table, > sizeof(table[0]), \ > + MODULE_PNP_INFO(USB_STD_PNP_INFO, uhub, table, table, \ > sizeof(table) / sizeof(table[0])) > > /* check that the size of the structure above is correct */ > > Modified: head/sys/dev/xl/if_xl.c > ============================================================ > ================== > --- head/sys/dev/xl/if_xl.c Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/dev/xl/if_xl.c Sun Aug 19 00:22:21 2018 (r338035) > @@ -334,7 +334,7 @@ static devclass_t xl_devclass; > DRIVER_MODULE_ORDERED(xl, pci, xl_driver, xl_devclass, NULL, NULL, > SI_ORDER_ANY); > DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, NULL, NULL); > -MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, xl, xl_devs, > sizeof(xl_devs[0]), > +MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, xl, xl_devs, > nitems(xl_devs) - 1); > > static void > > Modified: head/sys/isa/isavar.h > ============================================================ > ================== > --- head/sys/isa/isavar.h Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/isa/isavar.h Sun Aug 19 00:22:21 2018 (r338035) > @@ -142,7 +142,7 @@ enum isa_device_ivars { > > #define ISA_PNP_DESCR "E:pnpid;D:#" > #define ISA_PNP_INFO(t) \ > - MODULE_PNP_INFO(ISA_PNP_DESCR, isa, t, t, sizeof(t[0]), nitems(t) > - 1); \ > + MODULE_PNP_INFO(ISA_PNP_DESCR, isa, t, t, nitems(t) - 1); \ > > /* > * Simplified accessors for isa devices > > Modified: head/sys/net/iflib.h > ============================================================ > ================== > --- head/sys/net/iflib.h Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/net/iflib.h Sun Aug 19 00:22:21 2018 (r338035) > @@ -173,7 +173,7 @@ typedef struct pci_vendor_info { > #define IFLIB_PNP_DESCR "U32:vendor;U32:device;U32:subvendor;U32:subdevice;" > \ > "U32:revision;U32:class;D:#" > #define IFLIB_PNP_INFO(b, u, t) \ > - MODULE_PNP_INFO(IFLIB_PNP_DESCR, b, u, t, sizeof(t[0]), nitems(t) - > 1) > + MODULE_PNP_INFO(IFLIB_PNP_DESCR, b, u, t, nitems(t) - 1) > > typedef struct if_txrx { > int (*ift_txd_encap) (void *, if_pkt_info_t); > > Modified: head/sys/sys/module.h > ============================================================ > ================== > --- head/sys/sys/module.h Sat Aug 18 23:24:53 2018 (r338034) > +++ head/sys/sys/module.h Sun Aug 19 00:22:21 2018 (r338035) > @@ -178,12 +178,12 @@ struct mod_pnp_match_info > * to allow external tools to parse their internal device tables > * to make an informed guess about what driver(s) to load. > */ > -#define MODULE_PNP_INFO(d, b, unique, t, l, n) > \ > +#define MODULE_PNP_INFO(d, b, unique, t, n) > \ > static const struct mod_pnp_match_info _module_pnp_##b##_##unique > = { \ > .descr = d, \ > .bus = #b, \ > .table = t, \ > - .entry_len = l, \ > + .entry_len = sizeof((t)[0]), \ > .num_entry = n \ > }; \ > MODULE_METADATA(_md_##b##_pnpinfo_##unique, MDT_PNP_INFO, \ > > From owner-svn-src-head@freebsd.org Sun Aug 19 00:46:33 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 7C7C8107AF15; Sun, 19 Aug 2018 00:46:33 +0000 (UTC) (envelope-from cem@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 24BF07F2A5; Sun, 19 Aug 2018 00:46:33 +0000 (UTC) (envelope-from cem@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 0235F1F077; Sun, 19 Aug 2018 00:46:33 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7J0kWNJ032908; Sun, 19 Aug 2018 00:46:32 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7J0kNCM032860; Sun, 19 Aug 2018 00:46:23 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201808190046.w7J0kNCM032860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sun, 19 Aug 2018 00:46:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338037 - in head/sys: crypto/ccp dev/aac dev/aacraid dev/adlink dev/ae dev/age dev/ahci dev/alc dev/ale dev/amdsmn dev/amdtemp dev/amr dev/an dev/bce dev/bfe dev/bge dev/bwi dev/bwn de... X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: crypto/ccp dev/aac dev/aacraid dev/adlink dev/ae dev/age dev/ahci dev/alc dev/ale dev/amdsmn dev/amdtemp dev/amr dev/an dev/bce dev/bfe dev/bge dev/bwi dev/bwn dev/cas dev/ciss dev/dc dev... X-SVN-Commit-Revision: 338037 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, 19 Aug 2018 00:46:33 -0000 Author: cem Date: Sun Aug 19 00:46:22 2018 New Revision: 338037 URL: https://svnweb.freebsd.org/changeset/base/338037 Log: Back out r338035 until Warner is finished churning GSoC PNP patches I was not aware Warner was making or planning to make forward progress in this area and have since been informed of that. It's easy to apply/reapply when churn dies down. Modified: head/sys/crypto/ccp/ccp.c head/sys/dev/aac/aac_pci.c head/sys/dev/aacraid/aacraid_pci.c head/sys/dev/adlink/adlink.c head/sys/dev/ae/if_ae.c head/sys/dev/age/if_age.c head/sys/dev/ahci/ahci_pci.c head/sys/dev/alc/if_alc.c head/sys/dev/ale/if_ale.c head/sys/dev/amdsmn/amdsmn.c head/sys/dev/amdtemp/amdtemp.c head/sys/dev/amr/amr_pci.c head/sys/dev/an/if_an_pci.c head/sys/dev/bce/if_bce.c head/sys/dev/bfe/if_bfe.c head/sys/dev/bge/if_bge.c head/sys/dev/bwi/if_bwi_pci.c head/sys/dev/bwn/if_bwn_pci.c head/sys/dev/cas/if_cas.c head/sys/dev/ciss/ciss.c head/sys/dev/dc/if_dc.c head/sys/dev/drm2/i915/i915_drv.c head/sys/dev/drm2/radeon/radeon_drv.c head/sys/dev/ed/if_ed_pci.c head/sys/dev/ena/ena.c head/sys/dev/et/if_et.c head/sys/dev/fxp/if_fxp.c head/sys/dev/gem/if_gem_pci.c head/sys/dev/intpm/intpm.c head/sys/dev/ioat/ioat.c head/sys/dev/ipw/if_ipw.c head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ncr/ncr.c head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c head/sys/dev/ofw/ofw_bus_subr.h head/sys/dev/pccard/pccardvar.h head/sys/dev/pci/pcivar.h head/sys/dev/puc/puc_pci.c head/sys/dev/spibus/spi.h head/sys/dev/uart/uart_bus_pccard.c head/sys/dev/usb/usbdi.h head/sys/dev/xl/if_xl.c head/sys/isa/isavar.h head/sys/net/iflib.h head/sys/sys/module.h Modified: head/sys/crypto/ccp/ccp.c ============================================================================== --- head/sys/crypto/ccp/ccp.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/crypto/ccp/ccp.c Sun Aug 19 00:46:22 2018 (r338037) @@ -734,7 +734,7 @@ 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); -MODULE_PNP_INFO("W32:vendor/device", pci, ccp, ccp_ids, +MODULE_PNP_INFO("W32:vendor/device", pci, ccp, ccp_ids, sizeof(ccp_ids[0]), nitems(ccp_ids)); static int Modified: head/sys/dev/aac/aac_pci.c ============================================================================== --- head/sys/dev/aac/aac_pci.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/aac/aac_pci.c Sun Aug 19 00:46:22 2018 (r338037) @@ -494,7 +494,7 @@ static driver_t aacch_driver = { static devclass_t aacch_devclass; DRIVER_MODULE(aacch, pci, aacch_driver, aacch_devclass, NULL, NULL); MODULE_PNP_INFO("U16:vendor;U16:device;", pci, aac, - aac_identifiers, nitems(aac_identifiers) - 1); + aac_identifiers, sizeof(aac_identifiers[0]), nitems(aac_identifiers) - 1); static int aacch_probe(device_t dev) Modified: head/sys/dev/aacraid/aacraid_pci.c ============================================================================== --- head/sys/dev/aacraid/aacraid_pci.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/aacraid/aacraid_pci.c Sun Aug 19 00:46:22 2018 (r338037) @@ -106,7 +106,7 @@ struct aac_ident DRIVER_MODULE(aacraid, pci, aacraid_pci_driver, aacraid_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device", pci, aacraid, - aacraid_family_identifiers, + aacraid_family_identifiers, sizeof(aacraid_family_identifiers[0]), nitems(aacraid_family_identifiers) - 1); MODULE_DEPEND(aacraid, pci, 1, 1, 1); Modified: head/sys/dev/adlink/adlink.c ============================================================================== --- head/sys/dev/adlink/adlink.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/adlink/adlink.c Sun Aug 19 00:46:22 2018 (r338037) @@ -438,6 +438,6 @@ static driver_t adlink_driver = { }; DRIVER_MODULE(adlink, pci, adlink_driver, adlink_devclass, 0, 0); -MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, adlink, adlink_id, +MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, adlink, adlink_id, sizeof(adlink_id[0]), nitems(adlink_id)); #endif /* _KERNEL */ Modified: head/sys/dev/ae/if_ae.c ============================================================================== --- head/sys/dev/ae/if_ae.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/ae/if_ae.c Sun Aug 19 00:46:22 2018 (r338037) @@ -178,7 +178,7 @@ static devclass_t ae_devclass; DRIVER_MODULE(ae, pci, ae_driver, ae_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, ae, ae_devs, - nitems(ae_devs)); + sizeof(ae_devs[0]), nitems(ae_devs)); DRIVER_MODULE(miibus, ae, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(ae, pci, 1, 1, 1); MODULE_DEPEND(ae, ether, 1, 1, 1); Modified: head/sys/dev/age/if_age.c ============================================================================== --- head/sys/dev/age/if_age.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/age/if_age.c Sun Aug 19 00:46:22 2018 (r338037) @@ -184,7 +184,7 @@ static devclass_t age_devclass; DRIVER_MODULE(age, pci, age_driver, age_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, age, age_devs, - nitems(age_devs)); + sizeof(age_devs[0]), nitems(age_devs)); DRIVER_MODULE(miibus, age, miibus_driver, miibus_devclass, 0, 0); static struct resource_spec age_res_spec_mem[] = { Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/ahci/ahci_pci.c Sun Aug 19 00:46:22 2018 (r338037) @@ -667,7 +667,7 @@ static driver_t ahci_driver = { DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, NULL, NULL); /* Also matches class / subclass / progid XXX need to add when we have masking support */ MODULE_PNP_INFO("W32:vendor/device", pci, ahci, ahci_ids, - nitems(ahci_ids) - 1); + sizeof(ahci_ids[0]), nitems(ahci_ids) - 1); static device_method_t ahci_ata_methods[] = { DEVMETHOD(device_probe, ahci_ata_probe), DEVMETHOD(device_attach, ahci_pci_attach), Modified: head/sys/dev/alc/if_alc.c ============================================================================== --- head/sys/dev/alc/if_alc.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/alc/if_alc.c Sun Aug 19 00:46:22 2018 (r338037) @@ -244,7 +244,7 @@ static devclass_t alc_devclass; DRIVER_MODULE(alc, pci, alc_driver, alc_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device", pci, alc, alc_ident_table, - nitems(alc_ident_table) - 1); + sizeof(alc_ident_table[0]), nitems(alc_ident_table) - 1); DRIVER_MODULE(miibus, alc, miibus_driver, miibus_devclass, 0, 0); static struct resource_spec alc_res_spec_mem[] = { Modified: head/sys/dev/ale/if_ale.c ============================================================================== --- head/sys/dev/ale/if_ale.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/ale/if_ale.c Sun Aug 19 00:46:22 2018 (r338037) @@ -179,7 +179,7 @@ static devclass_t ale_devclass; DRIVER_MODULE(ale, pci, ale_driver, ale_devclass, NULL, NULL); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, ale, ale_devs, - nitems(ale_devs)); + sizeof(ale_devs[0]), nitems(ale_devs)); DRIVER_MODULE(miibus, ale, miibus_driver, miibus_devclass, NULL, NULL); static struct resource_spec ale_res_spec_mem[] = { Modified: head/sys/dev/amdsmn/amdsmn.c ============================================================================== --- head/sys/dev/amdsmn/amdsmn.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/amdsmn/amdsmn.c Sun Aug 19 00:46:22 2018 (r338037) @@ -90,7 +90,7 @@ static devclass_t amdsmn_devclass; DRIVER_MODULE(amdsmn, hostb, amdsmn_driver, amdsmn_devclass, NULL, NULL); MODULE_VERSION(amdsmn, 1); MODULE_PNP_INFO("W32:vendor/device", pci, amdsmn, amdsmn_ids, - nitems(amdsmn_ids)); + sizeof(amdsmn_ids[0]), nitems(amdsmn_ids)); static bool amdsmn_match(device_t parent) Modified: head/sys/dev/amdtemp/amdtemp.c ============================================================================== --- head/sys/dev/amdtemp/amdtemp.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/amdtemp/amdtemp.c Sun Aug 19 00:46:22 2018 (r338037) @@ -167,7 +167,7 @@ DRIVER_MODULE(amdtemp, hostb, amdtemp_driver, amdtemp_ MODULE_VERSION(amdtemp, 1); MODULE_DEPEND(amdtemp, amdsmn, 1, 1, 1); MODULE_PNP_INFO("U16:vendor;U16:device", pci, amdtemp, amdtemp_products, - nitems(amdtemp_products)); + sizeof(amdtemp_products[0]), nitems(amdtemp_products)); static int amdtemp_match(device_t dev) Modified: head/sys/dev/amr/amr_pci.c ============================================================================== --- head/sys/dev/amr/amr_pci.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/amr/amr_pci.c Sun Aug 19 00:46:22 2018 (r338037) @@ -142,7 +142,7 @@ static struct amr_ident static devclass_t amr_devclass; DRIVER_MODULE(amr, pci, amr_pci_driver, amr_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device", pci, amr, amr_device_ids, - nitems(amr_device_ids) - 1); + sizeof(amr_device_ids[0]), nitems(amr_device_ids) - 1); MODULE_DEPEND(amr, pci, 1, 1, 1); MODULE_DEPEND(amr, cam, 1, 1, 1); Modified: head/sys/dev/an/if_an_pci.c ============================================================================== --- head/sys/dev/an/if_an_pci.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/an/if_an_pci.c Sun Aug 19 00:46:22 2018 (r338037) @@ -274,6 +274,6 @@ static devclass_t an_devclass; DRIVER_MODULE(an, pci, an_pci_driver, an_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, an, - an_devs, nitems(an_devs) - 1); + an_devs, sizeof(an_devs[0]), nitems(an_devs) - 1); MODULE_DEPEND(an, pci, 1, 1, 1); MODULE_DEPEND(an, wlan, 1, 1, 1); Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/bce/if_bce.c Sun Aug 19 00:46:22 2018 (r338037) @@ -530,7 +530,7 @@ MODULE_DEPEND(bce, miibus, 1, 1, 1); DRIVER_MODULE(bce, pci, bce_driver, bce_devclass, NULL, NULL); DRIVER_MODULE(miibus, bce, miibus_driver, miibus_devclass, NULL, NULL); MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#;D:#", pci, bce, - bce_devs, nitems(bce_devs) - 1); + bce_devs, sizeof(bce_devs[0]), nitems(bce_devs) - 1); /****************************************************************************/ /* Tunable device values */ Modified: head/sys/dev/bfe/if_bfe.c ============================================================================== --- head/sys/dev/bfe/if_bfe.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/bfe/if_bfe.c Sun Aug 19 00:46:22 2018 (r338037) @@ -158,7 +158,7 @@ static devclass_t bfe_devclass; DRIVER_MODULE(bfe, pci, bfe_driver, bfe_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, bfe, bfe_devs, - nitems(bfe_devs) - 1); + sizeof(bfe_devs[0]), nitems(bfe_devs) - 1); DRIVER_MODULE(miibus, bfe, miibus_driver, miibus_devclass, 0, 0); /* Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/bge/if_bge.c Sun Aug 19 00:46:22 2018 (r338037) @@ -548,7 +548,7 @@ static devclass_t bge_devclass; DRIVER_MODULE(bge, pci, bge_driver, bge_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device", pci, bge, bge_devs, - nitems(bge_devs) - 1); + sizeof(bge_devs[0]), nitems(bge_devs) - 1); DRIVER_MODULE(miibus, bge, miibus_driver, miibus_devclass, 0, 0); static int bge_allow_asf = 1; Modified: head/sys/dev/bwi/if_bwi_pci.c ============================================================================== --- head/sys/dev/bwi/if_bwi_pci.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/bwi/if_bwi_pci.c Sun Aug 19 00:46:22 2018 (r338037) @@ -257,7 +257,7 @@ static driver_t bwi_driver = { static devclass_t bwi_devclass; DRIVER_MODULE(bwi, pci, bwi_driver, bwi_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, bwi, bwi_devices, - nitems(bwi_devices) - 1); + sizeof(bwi_devices[0]), nitems(bwi_devices) - 1); MODULE_DEPEND(bwi, wlan, 1, 1, 1); /* 802.11 media layer */ MODULE_DEPEND(bwi, firmware, 1, 1, 1); /* firmware support */ MODULE_DEPEND(bwi, wlan_amrr, 1, 1, 1); Modified: head/sys/dev/bwn/if_bwn_pci.c ============================================================================== --- head/sys/dev/bwn/if_bwn_pci.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/bwn/if_bwn_pci.c Sun Aug 19 00:46:22 2018 (r338037) @@ -296,9 +296,9 @@ DEFINE_CLASS_0(bwn_pci, bwn_pci_driver, bwn_pci_method DRIVER_MODULE_ORDERED(bwn_pci, pci, bwn_pci_driver, bwn_pci_devclass, NULL, NULL, SI_ORDER_ANY); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, bwn_siba, - siba_devices, nitems(siba_devices) - 1); + siba_devices, sizeof(siba_devices[0]), nitems(siba_devices) - 1); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, bwn_bcma, - bcma_devices, nitems(bcma_devices) - 1); + bcma_devices, sizeof(bcma_devices[0]), nitems(bcma_devices) - 1); DRIVER_MODULE(bhndb, bwn_pci, bhndb_pci_driver, bhndb_devclass, NULL, NULL); MODULE_DEPEND(bwn_pci, bwn, 1, 1, 1); Modified: head/sys/dev/cas/if_cas.c ============================================================================== --- head/sys/dev/cas/if_cas.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/cas/if_cas.c Sun Aug 19 00:46:22 2018 (r338037) @@ -2617,7 +2617,7 @@ static const struct cas_pci_dev { DRIVER_MODULE(cas, pci, cas_pci_driver, cas_devclass, 0, 0); MODULE_PNP_INFO("W32:vendor/device", pci, cas, cas_pci_devlist, - nitems(cas_pci_devlist) - 1); + sizeof(cas_pci_devlist[0]), nitems(cas_pci_devlist) - 1); DRIVER_MODULE(miibus, cas, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(cas, pci, 1, 1, 1); Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/ciss/ciss.c Sun Aug 19 00:46:22 2018 (r338037) @@ -365,7 +365,7 @@ static struct static devclass_t ciss_devclass; DRIVER_MODULE(ciss, pci, ciss_pci_driver, ciss_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;", pci, ciss, ciss_vendor_data, - nitems(ciss_vendor_data) - 1); + sizeof(ciss_vendor_data[0]), nitems(ciss_vendor_data) - 1); MODULE_DEPEND(ciss, cam, 1, 1, 1); MODULE_DEPEND(ciss, pci, 1, 1, 1); Modified: head/sys/dev/dc/if_dc.c ============================================================================== --- head/sys/dev/dc/if_dc.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/dc/if_dc.c Sun Aug 19 00:46:22 2018 (r338037) @@ -360,7 +360,7 @@ static devclass_t dc_devclass; DRIVER_MODULE_ORDERED(dc, pci, dc_driver, dc_devclass, NULL, NULL, SI_ORDER_ANY); MODULE_PNP_INFO("W32:vendor/device;U8:revision;D:#", pci, dc, dc_devs, - nitems(dc_devs) - 1); + sizeof(dc_devs[0]), nitems(dc_devs) - 1); DRIVER_MODULE(miibus, dc, miibus_driver, miibus_devclass, NULL, NULL); #define DC_SETBIT(sc, reg, x) \ Modified: head/sys/dev/drm2/i915/i915_drv.c ============================================================================== --- head/sys/dev/drm2/i915/i915_drv.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/drm2/i915/i915_drv.c Sun Aug 19 00:46:22 2018 (r338037) @@ -1237,7 +1237,7 @@ MODULE_DEPEND(i915kms, iicbus, 1, 1, 1); MODULE_DEPEND(i915kms, iic, 1, 1, 1); MODULE_DEPEND(i915kms, iicbb, 1, 1, 1); MODULE_PNP_INFO("U32:vendor;U32:device;P:#;D:#", vgapci, i915, pciidlist, - nitems(pciidlist) - 1); + sizeof(pciidlist[0]), nitems(pciidlist) - 1); /* We give fast paths for the really cool registers */ #define NEEDS_FORCE_WAKE(dev_priv, reg) \ Modified: head/sys/dev/drm2/radeon/radeon_drv.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_drv.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/drm2/radeon/radeon_drv.c Sun Aug 19 00:46:22 2018 (r338037) @@ -402,4 +402,4 @@ MODULE_DEPEND(radeonkms, iic, 1, 1, 1); MODULE_DEPEND(radeonkms, iicbb, 1, 1, 1); MODULE_DEPEND(radeonkms, firmware, 1, 1, 1); MODULE_PNP_INFO("U32:vendor;U32:device;P:#;D:#", vgapci, radeonkms, - pciidlist, nitems(pciidlist) - 1); + pciidlist, sizeof(pciidlist[0]), nitems(pciidlist) - 1); Modified: head/sys/dev/ed/if_ed_pci.c ============================================================================== --- head/sys/dev/ed/if_ed_pci.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/ed/if_ed_pci.c Sun Aug 19 00:46:22 2018 (r338037) @@ -145,5 +145,5 @@ static driver_t ed_pci_driver = { DRIVER_MODULE(ed, pci, ed_pci_driver, ed_devclass, 0, 0); MODULE_DEPEND(ed, pci, 1, 1, 1); MODULE_DEPEND(ed, ether, 1, 1, 1); -MODULE_PNP_INFO("W32:vendor/device;D:#", pci, ed, pci_ids, +MODULE_PNP_INFO("W32:vendor/device;D:#", pci, ed, pci_ids, sizeof(pci_ids[0]), nitems(pci_ids) - 1); Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/ena/ena.c Sun Aug 19 00:46:22 2018 (r338037) @@ -3948,7 +3948,7 @@ static driver_t ena_driver = { devclass_t ena_devclass; DRIVER_MODULE(ena, pci, ena_driver, ena_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device", pci, ena, ena_vendor_info_array, - nitems(ena_vendor_info_array) - 1); + sizeof(ena_vendor_info_array[0]), nitems(ena_vendor_info_array) - 1); MODULE_DEPEND(ena, pci, 1, 1, 1); MODULE_DEPEND(ena, ether, 1, 1, 1); Modified: head/sys/dev/et/if_et.c ============================================================================== --- head/sys/dev/et/if_et.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/et/if_et.c Sun Aug 19 00:46:22 2018 (r338037) @@ -189,7 +189,7 @@ static devclass_t et_devclass; DRIVER_MODULE(et, pci, et_driver, et_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, et, et_devices, - nitems(et_devices) - 1); + sizeof(et_devices[0]), nitems(et_devices) - 1); DRIVER_MODULE(miibus, et, miibus_driver, miibus_devclass, 0, 0); static int et_rx_intr_npkts = 32; Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/fxp/if_fxp.c Sun Aug 19 00:46:22 2018 (r338037) @@ -308,7 +308,7 @@ static devclass_t fxp_devclass; DRIVER_MODULE_ORDERED(fxp, pci, fxp_driver, fxp_devclass, NULL, NULL, SI_ORDER_ANY); MODULE_PNP_INFO("U16:vendor;U16:device", pci, fxp, fxp_ident_table, - nitems(fxp_ident_table) - 1); + sizeof(fxp_ident_table[0]), nitems(fxp_ident_table) - 1); DRIVER_MODULE(miibus, fxp, miibus_driver, miibus_devclass, NULL, NULL); static struct resource_spec fxp_res_spec_mem[] = { Modified: head/sys/dev/gem/if_gem_pci.c ============================================================================== --- head/sys/dev/gem/if_gem_pci.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/gem/if_gem_pci.c Sun Aug 19 00:46:22 2018 (r338037) @@ -116,7 +116,7 @@ static driver_t gem_pci_driver = { DRIVER_MODULE(gem, pci, gem_pci_driver, gem_devclass, 0, 0); MODULE_PNP_INFO("W32:vendor/device", pci, gem, gem_pci_devlist, - nitems(gem_pci_devlist) - 1); + sizeof(gem_pci_devlist[0]), nitems(gem_pci_devlist) - 1); MODULE_DEPEND(gem, pci, 1, 1, 1); MODULE_DEPEND(gem, ether, 1, 1, 1); Modified: head/sys/dev/intpm/intpm.c ============================================================================== --- head/sys/dev/intpm/intpm.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/intpm/intpm.c Sun Aug 19 00:46:22 2018 (r338037) @@ -896,4 +896,4 @@ DRIVER_MODULE(smbus, intsmb, smbus_driver, smbus_devcl MODULE_DEPEND(intsmb, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER); MODULE_VERSION(intsmb, 1); MODULE_PNP_INFO("W32:vendor/device;D:#", pci, intpm, intsmb_products, - nitems(intsmb_products)); + sizeof(intsmb_products[0]), nitems(intsmb_products)); Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/ioat/ioat.c Sun Aug 19 00:46:22 2018 (r338037) @@ -241,7 +241,7 @@ static struct _pcsid }; MODULE_PNP_INFO("W32:vendor/device;D:#", pci, ioat, pci_ids, - nitems(pci_ids)); + sizeof(pci_ids[0]), nitems(pci_ids)); /* * OS <-> Driver linkage functions Modified: head/sys/dev/ipw/if_ipw.c ============================================================================== --- head/sys/dev/ipw/if_ipw.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/ipw/if_ipw.c Sun Aug 19 00:46:22 2018 (r338037) @@ -203,7 +203,7 @@ static devclass_t ipw_devclass; DRIVER_MODULE(ipw, pci, ipw_driver, ipw_devclass, NULL, NULL); MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, ipw, ipw_ident_table, - nitems(ipw_ident_table) - 1); + sizeof(ipw_ident_table[0]), nitems(ipw_ident_table) - 1); MODULE_VERSION(ipw, 1); Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/ixgbe/if_ix.c Sun Aug 19 00:46:22 2018 (r338037) @@ -238,7 +238,7 @@ static driver_t ix_driver = { devclass_t ix_devclass; DRIVER_MODULE(ix, pci, ix_driver, ix_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device", pci, ix, ixgbe_vendor_info_array, - nitems(ixgbe_vendor_info_array) - 1); + sizeof(ixgbe_vendor_info_array[0]), nitems(ixgbe_vendor_info_array) - 1); MODULE_DEPEND(ix, pci, 1, 1, 1); MODULE_DEPEND(ix, ether, 1, 1, 1); Modified: head/sys/dev/ixgbe/if_ixv.c ============================================================================== --- head/sys/dev/ixgbe/if_ixv.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/ixgbe/if_ixv.c Sun Aug 19 00:46:22 2018 (r338037) @@ -144,7 +144,7 @@ static driver_t ixv_driver = { devclass_t ixv_devclass; DRIVER_MODULE(ixv, pci, ixv_driver, ixv_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device", pci, ixv, ixv_vendor_info_array, - nitems(ixv_vendor_info_array) - 1); + sizeof(ixv_vendor_info_array[0]), nitems(ixv_vendor_info_array) - 1); MODULE_DEPEND(ixv, pci, 1, 1, 1); MODULE_DEPEND(ixv, ether, 1, 1, 1); #ifdef DEV_NETMAP Modified: head/sys/dev/ncr/ncr.c ============================================================================== --- head/sys/dev/ncr/ncr.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/ncr/ncr.c Sun Aug 19 00:46:22 2018 (r338037) @@ -7109,7 +7109,7 @@ static devclass_t ncr_devclass; DRIVER_MODULE(ncr, pci, ncr_driver, ncr_devclass, 0, 0); MODULE_PNP_INFO("W32:vendor/device;U16:#;D:#", pci, ncr, ncr_chip_table, - nitems(ncr_chip_table)); + sizeof(ncr_chip_table[0]), nitems(ncr_chip_table)); MODULE_DEPEND(ncr, cam, 1, 1, 1); MODULE_DEPEND(ncr, pci, 1, 1, 1); Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Sun Aug 19 00:46:22 2018 (r338037) @@ -3120,4 +3120,4 @@ DRIVER_MODULE(ntb_hw_intel, pci, ntb_intel_driver, ntb MODULE_DEPEND(ntb_hw_intel, ntb, 1, 1, 1); MODULE_VERSION(ntb_hw_intel, 1); MODULE_PNP_INFO("W32:vendor/device;D:#", pci, ntb_hw_intel, pci_ids, - nitems(pci_ids)); + sizeof(pci_ids[0]), nitems(pci_ids)); Modified: head/sys/dev/ofw/ofw_bus_subr.h ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.h Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/ofw/ofw_bus_subr.h Sun Aug 19 00:46:22 2018 (r338037) @@ -67,7 +67,7 @@ struct intr_map_data_fdt { #define SIMPLEBUS_PNP_DESCR "Z:compat;P:#;" #define SIMPLEBUS_PNP_INFO(t) \ - MODULE_PNP_INFO(SIMPLEBUS_PNP_DESCR, simplebus, t, t, sizeof(t) / sizeof(t[0])); + MODULE_PNP_INFO(SIMPLEBUS_PNP_DESCR, simplebus, t, t, sizeof(t[0]), sizeof(t) / sizeof(t[0])); /* Generic implementation of ofw_bus_if.m methods and helper routines */ int ofw_bus_gen_setup_devinfo(struct ofw_bus_devinfo *, phandle_t); Modified: head/sys/dev/pccard/pccardvar.h ============================================================================== --- head/sys/dev/pccard/pccardvar.h Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/pccard/pccardvar.h Sun Aug 19 00:46:22 2018 (r338037) @@ -102,7 +102,7 @@ struct pccard_product { */ #define PCCARD_PNP_DESCR "D:#;V32:manufacturer;V32:product;Z:cisvendor;Z:cisproduct;" #define PCCARD_PNP_INFO(t) \ - MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, nitems(t) - 1) + MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), nitems(t) - 1); \ typedef int (*pccard_product_match_fn) (device_t dev, const struct pccard_product *ent, int vpfmatch); Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/pci/pcivar.h Sun Aug 19 00:46:22 2018 (r338037) @@ -311,7 +311,7 @@ struct pci_device_table { "M16:mask;U16:vendor;U16:device;U16:subvendor;U16:subdevice;" \ "U16:class;U16:subclass;U16:revid;" #define PCI_PNP_INFO(table) \ - MODULE_PNP_INFO(PCI_PNP_STR, pci, table, table, \ + MODULE_PNP_INFO(PCI_PNP_STR, pci, table, table, sizeof(table[0]), \ sizeof(table) / sizeof(table[0])) const struct pci_device_table *pci_match_device(device_t child, Modified: head/sys/dev/puc/puc_pci.c ============================================================================== --- head/sys/dev/puc/puc_pci.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/puc/puc_pci.c Sun Aug 19 00:46:22 2018 (r338037) @@ -200,4 +200,4 @@ static driver_t puc_pci_driver = { DRIVER_MODULE(puc, pci, puc_pci_driver, puc_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#;D:#", pci, puc, - puc_pci_devices, nitems(puc_pci_devices) - 1); + puc_pci_devices, sizeof(puc_pci_devices[0]), nitems(puc_pci_devices) - 1); Modified: head/sys/dev/spibus/spi.h ============================================================================== --- head/sys/dev/spibus/spi.h Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/spibus/spi.h Sun Aug 19 00:46:22 2018 (r338037) @@ -43,4 +43,4 @@ struct spi_command { #define SPIBUS_PNP_DESCR "Z:compat;P:#;" #define SPIBUS_PNP_INFO(t) \ - MODULE_PNP_INFO(SPIBUS_PNP_DESCR, spibus, t, t, sizeof(t) / sizeof(t[0])); + MODULE_PNP_INFO(SPIBUS_PNP_DESCR, spibus, t, t, sizeof(t[0]), sizeof(t) / sizeof(t[0])); Modified: head/sys/dev/uart/uart_bus_pccard.c ============================================================================== --- head/sys/dev/uart/uart_bus_pccard.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/uart/uart_bus_pccard.c Sun Aug 19 00:46:22 2018 (r338037) @@ -103,4 +103,4 @@ uart_pccard_attach(device_t dev) DRIVER_MODULE(uart, pccard, uart_pccard_driver, uart_devclass, 0, 0); MODULE_PNP_INFO("U32:function_type;", pccard, uart, &uart_pccard_function, - 1); + sizeof(uart_pccard_function), 1); Modified: head/sys/dev/usb/usbdi.h ============================================================================== --- head/sys/dev/usb/usbdi.h Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/usb/usbdi.h Sun Aug 19 00:46:22 2018 (r338037) @@ -342,13 +342,13 @@ struct usb_device_id { #define USB_STD_PNP_HOST_INFO USB_STD_PNP_INFO "T:mode=host;" #define USB_STD_PNP_DEVICE_INFO USB_STD_PNP_INFO "T:mode=device;" #define USB_PNP_HOST_INFO(table) \ - MODULE_PNP_INFO(USB_STD_PNP_HOST_INFO, uhub, table, table, \ + MODULE_PNP_INFO(USB_STD_PNP_HOST_INFO, uhub, table, table, sizeof(table[0]), \ sizeof(table) / sizeof(table[0])) #define USB_PNP_DEVICE_INFO(table) \ - MODULE_PNP_INFO(USB_STD_PNP_DEVICE_INFO, uhub, table, table, \ + MODULE_PNP_INFO(USB_STD_PNP_DEVICE_INFO, uhub, table, table, sizeof(table[0]), \ sizeof(table) / sizeof(table[0])) #define USB_PNP_DUAL_INFO(table) \ - MODULE_PNP_INFO(USB_STD_PNP_INFO, uhub, table, table, \ + MODULE_PNP_INFO(USB_STD_PNP_INFO, uhub, table, table, sizeof(table[0]), \ sizeof(table) / sizeof(table[0])) /* check that the size of the structure above is correct */ Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/dev/xl/if_xl.c Sun Aug 19 00:46:22 2018 (r338037) @@ -334,7 +334,7 @@ static devclass_t xl_devclass; DRIVER_MODULE_ORDERED(xl, pci, xl_driver, xl_devclass, NULL, NULL, SI_ORDER_ANY); DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, NULL, NULL); -MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, xl, xl_devs, +MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, xl, xl_devs, sizeof(xl_devs[0]), nitems(xl_devs) - 1); static void Modified: head/sys/isa/isavar.h ============================================================================== --- head/sys/isa/isavar.h Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/isa/isavar.h Sun Aug 19 00:46:22 2018 (r338037) @@ -142,7 +142,7 @@ enum isa_device_ivars { #define ISA_PNP_DESCR "E:pnpid;D:#" #define ISA_PNP_INFO(t) \ - MODULE_PNP_INFO(ISA_PNP_DESCR, isa, t, t, nitems(t) - 1); \ + MODULE_PNP_INFO(ISA_PNP_DESCR, isa, t, t, sizeof(t[0]), nitems(t) - 1); \ /* * Simplified accessors for isa devices Modified: head/sys/net/iflib.h ============================================================================== --- head/sys/net/iflib.h Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/net/iflib.h Sun Aug 19 00:46:22 2018 (r338037) @@ -173,7 +173,7 @@ typedef struct pci_vendor_info { #define IFLIB_PNP_DESCR "U32:vendor;U32:device;U32:subvendor;U32:subdevice;" \ "U32:revision;U32:class;D:#" #define IFLIB_PNP_INFO(b, u, t) \ - MODULE_PNP_INFO(IFLIB_PNP_DESCR, b, u, t, nitems(t) - 1) + MODULE_PNP_INFO(IFLIB_PNP_DESCR, b, u, t, sizeof(t[0]), nitems(t) - 1) typedef struct if_txrx { int (*ift_txd_encap) (void *, if_pkt_info_t); Modified: head/sys/sys/module.h ============================================================================== --- head/sys/sys/module.h Sun Aug 19 00:42:05 2018 (r338036) +++ head/sys/sys/module.h Sun Aug 19 00:46:22 2018 (r338037) @@ -178,12 +178,12 @@ struct mod_pnp_match_info * to allow external tools to parse their internal device tables * to make an informed guess about what driver(s) to load. */ -#define MODULE_PNP_INFO(d, b, unique, t, n) \ +#define MODULE_PNP_INFO(d, b, unique, t, l, n) \ static const struct mod_pnp_match_info _module_pnp_##b##_##unique = { \ .descr = d, \ .bus = #b, \ .table = t, \ - .entry_len = sizeof((t)[0]), \ + .entry_len = l, \ .num_entry = n \ }; \ MODULE_METADATA(_md_##b##_pnpinfo_##unique, MDT_PNP_INFO, \ From owner-svn-src-head@freebsd.org Sun Aug 19 00:58: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 D1D4D107B523 for ; Sun, 19 Aug 2018 00:58:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (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 651FD80195 for ; Sun, 19 Aug 2018 00:58:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x232.google.com with SMTP id j81-v6so16190630ite.0 for ; Sat, 18 Aug 2018 17:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ckAUNBR07nS09ZlRY/vGXAisOV+h58y5aG+NRI4XOLY=; b=Ate0oE0pCWcZy+/1r/sU4dbH+3KdFKsfgDSu+frWAJwnhQIR4pDiQn7bIKz87CeyMk BYXOFRxhwfLGWbkhLM0gWZIvoXln9gIGFEfPEIsqkLmwOgVaC1NlUlgZxi37VASwQ6Xg CSUJztLYlEdABK87vpb5n2YnOi5Hb6MX6lnmtkkr1g72DqEXFRQU1/Uxg+FDhCC7VZAE CNru0ckTNhNonBd23PqtZmBaCCdW33ClSlUnb/l8olHlIuMi9I3M6e5zC/lLu0FU3wlp oiAVhG8j2j9MDLjfYuTThyWZgTDfuBtxHWSvXEUeGShVUNpc+c1KI0H3eAaWII/Bfo9y 5A4g== 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=ckAUNBR07nS09ZlRY/vGXAisOV+h58y5aG+NRI4XOLY=; b=Omt8/QcRlrL4SPiKRgr6ibmxvqZvpZg4iFNo1zErenX12K6mdSa9qKYxk19ROX/OLG P/zDWkrewzAkovcVfOvBCvCN57PRKL30KU9qTiaM6cl6WPCbuLzgnR2UV33fp2wQg+EJ HZpbygjnG9Kc7kfcAEA7g1dcwz8Dte5UAQVbSgo5Vkdpq/SZUCXCNgSuySd+ea8H4glR chdTGNiphUwnOGfFiA0cZnZg5kH9M7bcAr0GZToM38OF1UA4ySVMp5SbDTQKInIPkLLB ONLLTWUcXTeBqq27n9K04Ew/UQH9GqmzzoITo233R/+dJDkLycjfw3zIWRFRW9nrhlTg ex/A== X-Gm-Message-State: AOUpUlHKhS4nXEyse97XZINoGOwi/NhSl3jWy2rxd0fYg8Ayt9qYFK3W jVCbCUILgftfOovh9DGNq5HtwA5SBvdtV1TH7oJ4Hg== X-Google-Smtp-Source: AA+uWPyD1TCmC78Ttqv45k6036hy2ziv2MjR8OGc8Ch7y80K375/9ZWJdkUre9TFpeuNuhIt+sPPX1K3nC8wI4209TE= X-Received: by 2002:a24:d2:: with SMTP id 201-v6mr8938122ita.60.1534640294760; Sat, 18 Aug 2018 17:58:14 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:2806:0:0:0:0:0 with HTTP; Sat, 18 Aug 2018 17:58:14 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <201808190046.w7J0kNCM032860@repo.freebsd.org> References: <201808190046.w7J0kNCM032860@repo.freebsd.org> From: Warner Losh Date: Sat, 18 Aug 2018 18:58:14 -0600 X-Google-Sender-Auth: w4IBqzohIDrzdl9MbJzx8DJ3pwg Message-ID: Subject: Re: svn commit: r338037 - in head/sys: crypto/ccp dev/aac dev/aacraid dev/adlink dev/ae dev/age dev/ahci dev/alc dev/ale dev/amdsmn dev/amdtemp dev/amr dev/an dev/bce dev/bfe dev/bge dev/bwi dev/bwn de... To: Conrad Meyer Cc: src-committers , 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: Sun, 19 Aug 2018 00:58:16 -0000 On Sat, Aug 18, 2018 at 6:46 PM, Conrad Meyer wrote: > I was not aware Warner was making or planning to make forward progress in > this area and have since been informed of that. > > It's easy to apply/reapply when churn dies down. > Thanks for your understanding Conrad. It's an interesting idea, and I'll look at applying after I get the GSoC branch landed, assuming there's no new wrinkles in that code base. Warner From owner-svn-src-head@freebsd.org Sun Aug 19 01: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 4BAEE107C031; Sun, 19 Aug 2018 01:14:47 +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 F187180E38; Sun, 19 Aug 2018 01:14:46 +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 D41F51F582; Sun, 19 Aug 2018 01:14:46 +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 w7J1EkS9048308; Sun, 19 Aug 2018 01:14:46 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7J1EkYa048307; Sun, 19 Aug 2018 01:14:46 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201808190114.w7J1EkYa048307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Sun, 19 Aug 2018 01:14:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338038 - head/sys/dev/sound/pci X-SVN-Group: head X-SVN-Commit-Author: avatar X-SVN-Commit-Paths: head/sys/dev/sound/pci X-SVN-Commit-Revision: 338038 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, 19 Aug 2018 01:14:47 -0000 Author: avatar Date: Sun Aug 19 01:14:46 2018 New Revision: 338038 URL: https://svnweb.freebsd.org/changeset/base/338038 Log: Extending the delay cycles to give the codec more time to pump ADC data across the AC-link. Without this patch, some CS4614 cards will need users to reload the driver manually or the hardware won't be initialised properly. Something like: # kldload snd_csa # kldunload snd_csa # kldload snd_csa Tested with: Terratec SiXPack 5.1+ Modified: head/sys/dev/sound/pci/csa.c Modified: head/sys/dev/sound/pci/csa.c ============================================================================== --- head/sys/dev/sound/pci/csa.c Sun Aug 19 00:46:22 2018 (r338037) +++ head/sys/dev/sound/pci/csa.c Sun Aug 19 01:14:46 2018 (r338038) @@ -710,7 +710,7 @@ csa_initialize(sc_p scp) * the codec is pumping ADC data across the AC-link. */ acisv = 0; - for (i = 0 ; i < 1000 ; i++) { + for (i = 0 ; i < 2000 ; i++) { /* * First, lets wait a short while to let things settle out a bit, * and to prevent retrying the read too quickly. From owner-svn-src-head@freebsd.org Sun Aug 19 03:57: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 EE566108172B; Sun, 19 Aug 2018 03:57:22 +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 9845285BEF; Sun, 19 Aug 2018 03:57:22 +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 5F33C210BB; Sun, 19 Aug 2018 03:57:22 +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 w7J3vMsb030378; Sun, 19 Aug 2018 03:57:22 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7J3vKHj030368; Sun, 19 Aug 2018 03:57:20 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808190357.w7J3vKHj030368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 19 Aug 2018 03:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338039 - in head/usr.bin/diff: . tests X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/usr.bin/diff: . tests X-SVN-Commit-Revision: 338039 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, 19 Aug 2018 03:57:25 -0000 Author: kevans Date: Sun Aug 19 03:57:20 2018 New Revision: 338039 URL: https://svnweb.freebsd.org/changeset/base/338039 Log: diff(1): Implement -B/--ignore-blank-lines As noted by cem in r338035, coccinelle invokes diff(1) with the -B flag. This was not previously implemented here, so one was forced to create a link for GNU diff to /usr/local/bin/diff Implement the -B flag and add some primitive tests for it. It is implemented in the same fashion that -I is implemented; each chunk's lines are scanned, and if a non-blank line is encountered then the chunk will be output. Otherwise, it's skipped. MFC after: 2 weeks Added: head/usr.bin/diff/tests/Bflag_C.out (contents, props changed) head/usr.bin/diff/tests/Bflag_D.out (contents, props changed) head/usr.bin/diff/tests/Bflag_F.out (contents, props changed) Modified: head/usr.bin/diff/TODO head/usr.bin/diff/diff.1 head/usr.bin/diff/diff.c head/usr.bin/diff/diff.h head/usr.bin/diff/diffreg.c head/usr.bin/diff/tests/Makefile head/usr.bin/diff/tests/diff_test.sh Modified: head/usr.bin/diff/TODO ============================================================================== --- head/usr.bin/diff/TODO Sun Aug 19 01:14:46 2018 (r338038) +++ head/usr.bin/diff/TODO Sun Aug 19 03:57:20 2018 (r338039) @@ -5,7 +5,6 @@ * make a libsdiff and use that directly to avoid duplicating the code to be implemented: ---ignore-blank-lines --horizon-lines --ignore-tab-expansion --line-format Modified: head/usr.bin/diff/diff.1 ============================================================================== --- head/usr.bin/diff/diff.1 Sun Aug 19 01:14:46 2018 (r338038) +++ head/usr.bin/diff/diff.1 Sun Aug 19 03:57:20 2018 (r338039) @@ -30,7 +30,7 @@ .\" @(#)diff.1 8.1 (Berkeley) 6/30/93 .\" $FreeBSD$ .\" -.Dd April 20, 2017 +.Dd August 18, 2018 .Dt DIFF 1 .Os .Sh NAME @@ -38,7 +38,7 @@ .Nd differential file and directory comparator .Sh SYNOPSIS .Nm diff -.Op Fl abdipTtw +.Op Fl aBbdipTtw .Oo .Fl c | e | f | .Fl n | q | u @@ -67,7 +67,7 @@ .Op Fl L Ar label | Fl -label Ar label .Ar file1 file2 .Nm diff -.Op Fl abdilpTtw +.Op Fl aBbdilpTtw .Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern .Op Fl L Ar label | Fl -label Ar label .Op Fl -brief @@ -93,7 +93,7 @@ .Fl C Ar number | -context Ar number .Ar file1 file2 .Nm diff -.Op Fl abdiltw +.Op Fl aBbdiltw .Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern .Op Fl -brief .Op Fl -changed-group-format Ar GFMT @@ -118,7 +118,7 @@ .Fl D Ar string | Fl -ifdef Ar string .Ar file1 file2 .Nm diff -.Op Fl abdilpTtw +.Op Fl aBbdilpTtw .Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern .Op Fl L Ar label | Fl -label Ar label .Op Fl -brief @@ -144,7 +144,7 @@ .Fl U Ar number | Fl -unified Ar number .Ar file1 file2 .Nm diff -.Op Fl abdilNPprsTtw +.Op Fl aBbdilNPprsTtw .Oo .Fl c | e | f | .Fl n | q | u @@ -300,6 +300,8 @@ if files contain binary characters. Use of this option forces .Nm to produce a diff. +.It Fl B Fl -ignore-blank-lines +Causes chunks that include only blank lines to be ignored. .It Fl b Causes trailing blanks (spaces and tabs) to be ignored, and other strings of blanks to compare equal. Modified: head/usr.bin/diff/diff.c ============================================================================== --- head/usr.bin/diff/diff.c Sun Aug 19 01:14:46 2018 (r338038) +++ head/usr.bin/diff/diff.c Sun Aug 19 03:57:20 2018 (r338039) @@ -66,6 +66,7 @@ static struct option longopts[] = { { "ed", no_argument, 0, 'e' }, { "forward-ed", no_argument, 0, 'f' }, { "speed-large-files", no_argument, NULL, 'H' }, + { "ignore-blank-lines", no_argument, 0, 'B' }, { "ignore-matching-lines", required_argument, 0, 'I' }, { "ignore-case", no_argument, 0, 'i' }, { "paginate", no_argument, NULL, 'l' }, @@ -164,6 +165,9 @@ main(int argc, char **argv) case 'h': /* silently ignore for backwards compatibility */ break; + case 'B': + dflags |= D_SKIPBLANKLINES; + break; case 'I': push_ignore_pats(optarg); break; @@ -447,18 +451,18 @@ void usage(void) { (void)fprintf(stderr, - "usage: diff [-abdilpTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]\n" + "usage: diff [-aBbdilpTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]\n" " [--no-ignore-case] [--normal] [--strip-trailing-cr] [--tabsize]\n" " [-I pattern] [-L label] file1 file2\n" - " diff [-abdilpTtw] [-I pattern] [-L label] [--ignore-case]\n" + " diff [-aBbdilpTtw] [-I pattern] [-L label] [--ignore-case]\n" " [--no-ignore-case] [--normal] [--strip-trailing-cr] [--tabsize]\n" " -C number file1 file2\n" - " diff [-abdiltw] [-I pattern] [--ignore-case] [--no-ignore-case]\n" + " diff [-aBbdiltw] [-I pattern] [--ignore-case] [--no-ignore-case]\n" " [--normal] [--strip-trailing-cr] [--tabsize] -D string file1 file2\n" - " diff [-abdilpTtw] [-I pattern] [-L label] [--ignore-case]\n" + " diff [-aBbdilpTtw] [-I pattern] [-L label] [--ignore-case]\n" " [--no-ignore-case] [--normal] [--tabsize] [--strip-trailing-cr]\n" " -U number file1 file2\n" - " diff [-abdilNPprsTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]\n" + " diff [-aBbdilNPprsTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]\n" " [--no-ignore-case] [--normal] [--tabsize] [-I pattern] [-L label]\n" " [-S name] [-X file] [-x pattern] dir1 dir2\n"); Modified: head/usr.bin/diff/diff.h ============================================================================== --- head/usr.bin/diff/diff.h Sun Aug 19 01:14:46 2018 (r338038) +++ head/usr.bin/diff/diff.h Sun Aug 19 03:57:20 2018 (r338039) @@ -67,6 +67,7 @@ #define D_EXPANDTABS 0x100 /* Expand tabs to spaces */ #define D_IGNOREBLANKS 0x200 /* Ignore white space changes */ #define D_STRIPCR 0x400 /* Strip trailing cr */ +#define D_SKIPBLANKLINES 0x800 /* Skip blank lines */ /* * Status values for print_status() and diffreg() return values Modified: head/usr.bin/diff/diffreg.c ============================================================================== --- head/usr.bin/diff/diffreg.c Sun Aug 19 01:14:46 2018 (r338038) +++ head/usr.bin/diff/diffreg.c Sun Aug 19 03:57:20 2018 (r338039) @@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -999,6 +1000,31 @@ restart: } } return; + } + if (*pflags & D_SKIPBLANKLINES) { + char *line; + /* + * All lines in the change, insert, or delete must not be + * empty for the change to be ignored. + */ + if (a <= b) { /* Changes and deletes. */ + for (i = a; i <= b; i++) { + line = preadline(fileno(f1), + ixold[i] - ixold[i - 1], ixold[i - 1]); + if (*line != '\0') + goto proceed; + } + } + if (a > b || c <= d) { /* Changes and inserts. */ + for (i = c; i <= d; i++) { + line = preadline(fileno(f2), + ixnew[i] - ixnew[i - 1], ixnew[i - 1]); + if (*line != '\0') + goto proceed; + } + } + return; + } proceed: if (*pflags & D_HEADER && diff_format != D_BRIEF) { Added: head/usr.bin/diff/tests/Bflag_C.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/diff/tests/Bflag_C.out Sun Aug 19 03:57:20 2018 (r338039) @@ -0,0 +1,2 @@ +1a2 +> Added: head/usr.bin/diff/tests/Bflag_D.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/diff/tests/Bflag_D.out Sun Aug 19 03:57:20 2018 (r338039) @@ -0,0 +1,2 @@ +1a2 +> C Added: head/usr.bin/diff/tests/Bflag_F.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/diff/tests/Bflag_F.out Sun Aug 19 03:57:20 2018 (r338039) @@ -0,0 +1,4 @@ +7c8 +< G +--- +> X Modified: head/usr.bin/diff/tests/Makefile ============================================================================== --- head/usr.bin/diff/tests/Makefile Sun Aug 19 01:14:46 2018 (r338038) +++ head/usr.bin/diff/tests/Makefile Sun Aug 19 03:57:20 2018 (r338039) @@ -5,6 +5,9 @@ PACKAGE= tests ATF_TESTS_SH= diff_test ${PACKAGE}FILES+= \ + Bflag_C.out \ + Bflag_D.out \ + Bflag_F.out \ input1.in \ input2.in \ input_c1.in \ Modified: head/usr.bin/diff/tests/diff_test.sh ============================================================================== --- head/usr.bin/diff/tests/diff_test.sh Sun Aug 19 01:14:46 2018 (r338038) +++ head/usr.bin/diff/tests/diff_test.sh Sun Aug 19 03:57:20 2018 (r338039) @@ -9,6 +9,7 @@ atf_test_case group_format atf_test_case side_by_side atf_test_case brief_format atf_test_case b230049 +atf_test_case Bflag simple_body() { @@ -150,6 +151,21 @@ brief_format_body() diff -Nrq A D } +Bflag_body() +{ + atf_check -x 'printf "A\nB\n" > A' + atf_check -x 'printf "A\n\nB\n" > B' + atf_check -x 'printf "A\n \nB\n" > C' + atf_check -x 'printf "A\nC\nB\n" > D' + atf_check -x 'printf "A\nB\nC\nD\nE\nF\nG\nH" > E' + atf_check -x 'printf "A\n\nB\nC\nD\nE\nF\nX\nH" > F' + + atf_check -s exit:0 -o inline:"" diff -B A B + atf_check -s exit:1 -o file:"$(atf_get_srcdir)/Bflag_C.out" diff -B A C + atf_check -s exit:1 -o file:"$(atf_get_srcdir)/Bflag_D.out" diff -B A D + atf_check -s exit:1 -o file:"$(atf_get_srcdir)/Bflag_F.out" diff -B E F +} + atf_init_test_cases() { atf_add_test_case simple @@ -161,4 +177,5 @@ atf_init_test_cases() atf_add_test_case side_by_side atf_add_test_case brief_format atf_add_test_case b230049 + atf_add_test_case Bflag } From owner-svn-src-head@freebsd.org Sun Aug 19 04:15: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 7B7671081E50; Sun, 19 Aug 2018 04:15:39 +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 2F21C863EC; Sun, 19 Aug 2018 04:15:39 +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 0F8BB213E0; Sun, 19 Aug 2018 04:15:39 +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 w7J4FcdA040204; Sun, 19 Aug 2018 04:15:38 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7J4Fc8s040203; Sun, 19 Aug 2018 04:15:38 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808190415.w7J4Fc8s040203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 19 Aug 2018 04:15:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338040 - head/usr.bin/diff X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/diff X-SVN-Commit-Revision: 338040 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, 19 Aug 2018 04:15:39 -0000 Author: kevans Date: Sun Aug 19 04:15:38 2018 New Revision: 338040 URL: https://svnweb.freebsd.org/changeset/base/338040 Log: diff(1): Refactor -B a little bit Instead of doing a second pass to skip empty lines if we've specified -I, go ahead and check both at once. Ignore critera has been split out into its own function to try and keep the logic cleaner. Modified: head/usr.bin/diff/diffreg.c Modified: head/usr.bin/diff/diffreg.c ============================================================================== --- head/usr.bin/diff/diffreg.c Sun Aug 19 03:57:20 2018 (r338039) +++ head/usr.bin/diff/diffreg.c Sun Aug 19 04:15:38 2018 (r338040) @@ -196,7 +196,8 @@ static void unsort(struct line *, int, int *); static void change(char *, FILE *, char *, FILE *, int, int, int, int, int *); static void sort(struct line *, int); static void print_header(const char *, const char *); -static int ignoreline(char *); +static bool ignoreline_pattern(char *); +static bool ignoreline(char *, bool); static int asciifile(FILE *); static int fetch(long *, int, int, FILE *, int, int, int); static int newcand(int, int, int); @@ -946,8 +947,8 @@ preadline(int fd, size_t rlen, off_t off) return (line); } -static int -ignoreline(char *line) +static bool +ignoreline_pattern(char *line) { int ret; @@ -956,6 +957,20 @@ ignoreline(char *line) return (ret == 0); /* if it matched, it should be ignored. */ } +static bool +ignoreline(char *line, bool skip_blanks) +{ + + if (ignore_pats != NULL && skip_blanks) + return (ignoreline_pattern(line) || *line == '\0'); + if (ignore_pats != NULL) + return (ignoreline_pattern(line)); + if (skip_blanks) + return (*line == '\0'); + /* No ignore criteria specified */ + return (false); +} + /* * Indicate that there is a difference between lines a and b of the from file * to get to lines c to d of the to file. If a is greater then b then there @@ -971,12 +986,14 @@ change(char *file1, FILE *f1, char *file2, FILE *f2, i long curpos; int i, nc, f; const char *walk; + bool skip_blanks; + skip_blanks = (*pflags & D_SKIPBLANKLINES); restart: if ((diff_format != D_IFDEF || diff_format == D_GFORMAT) && a > b && c > d) return; - if (ignore_pats != NULL) { + if (ignore_pats != NULL || skip_blanks) { char *line; /* * All lines in the change, insert, or delete must @@ -987,7 +1004,7 @@ restart: for (i = a; i <= b; i++) { line = preadline(fileno(f1), ixold[i] - ixold[i - 1], ixold[i - 1]); - if (!ignoreline(line)) + if (!ignoreline(line, skip_blanks)) goto proceed; } } @@ -995,36 +1012,11 @@ restart: for (i = c; i <= d; i++) { line = preadline(fileno(f2), ixnew[i] - ixnew[i - 1], ixnew[i - 1]); - if (!ignoreline(line)) + if (!ignoreline(line, skip_blanks)) goto proceed; } } return; - } - if (*pflags & D_SKIPBLANKLINES) { - char *line; - /* - * All lines in the change, insert, or delete must not be - * empty for the change to be ignored. - */ - if (a <= b) { /* Changes and deletes. */ - for (i = a; i <= b; i++) { - line = preadline(fileno(f1), - ixold[i] - ixold[i - 1], ixold[i - 1]); - if (*line != '\0') - goto proceed; - } - } - if (a > b || c <= d) { /* Changes and inserts. */ - for (i = c; i <= d; i++) { - line = preadline(fileno(f2), - ixnew[i] - ixnew[i - 1], ixnew[i - 1]); - if (*line != '\0') - goto proceed; - } - } - return; - } proceed: if (*pflags & D_HEADER && diff_format != D_BRIEF) { From owner-svn-src-head@freebsd.org Sun Aug 19 05:12: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 33AD810831D1; Sun, 19 Aug 2018 05:12:18 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f44.google.com (mail-it0-f44.google.com [209.85.214.44]) (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 9DAA588403; Sun, 19 Aug 2018 05:12:17 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f44.google.com with SMTP id d9-v6so16502422itf.2; Sat, 18 Aug 2018 22:12:17 -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:reply-to :from:date:message-id:subject:to:cc; bh=AsQ4mBX90M8RaxvYS3madnaCy9W2s6K3viPxQYQqJkc=; b=Z2o8LmXKFZ+vpfWpURSX2hLF1ysjLpR9i8BG6x3GKX4rYHcyUPAF8eVAietOeipgY7 q9qC6cYlCJ2AIJYRr2he8ME4aKYGhyVo8KqSdXqZxEoRpD5H4tqIB8JeuicstJs9HIA/ +9HL7vypj16bW4XoUu3BNaM9BLurBGZ05S3kc+fm7Uf5PwWhelEh5KT3bOam5nlC7Nax VjJ297SaBIk3r3+9jJsbOPQ4ZyM/wnQgIVQFnfmpswjWh46Xl/35fCIzgCDyD3DGVJFZ FjlIFM/SvTsduaAEmbQUCDGyWX/C/a33GTCvKJp2QoE0b+FF8gIMnJvB5/8kGe1nOnyJ i0og== X-Gm-Message-State: AOUpUlHYFKRcUawc/396kHIYtYyTbYy2nay4D+4jkoVv0hLhRkq2njVB 37TRZbahF7HcMN9+UzPlNngukyjB X-Google-Smtp-Source: AA+uWPwcsrMu9cmFCHNzcMkEe7Cnb+vSPgOfzrT72mJgeC0w2GjhJyjEIK9sg/Bs6ygGSejTLOaNrw== X-Received: by 2002:a24:8ec7:: with SMTP id h190-v6mr29072962ite.29.1534655530524; Sat, 18 Aug 2018 22:12:10 -0700 (PDT) Received: from mail-it0-f44.google.com (mail-it0-f44.google.com. [209.85.214.44]) by smtp.gmail.com with ESMTPSA id d12-v6sm3278202itf.25.2018.08.18.22.12.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Aug 2018 22:12:10 -0700 (PDT) Received: by mail-it0-f44.google.com with SMTP id e14-v6so16503747itf.1; Sat, 18 Aug 2018 22:12:09 -0700 (PDT) X-Received: by 2002:a02:4009:: with SMTP id n9-v6mr37321627jaa.19.1534655529714; Sat, 18 Aug 2018 22:12:09 -0700 (PDT) MIME-Version: 1.0 References: <201808190357.w7J3vKHj030368@repo.freebsd.org> In-Reply-To: <201808190357.w7J3vKHj030368@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sat, 18 Aug 2018 22:11:57 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r338039 - in head/usr.bin/diff: . tests To: Kyle Evans Cc: src-committers@freebsd.org, 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: Sun, 19 Aug 2018 05:12:18 -0000 Hey, That=E2=80=99s awesome! Thank you! Best, Conrad On Sat, Aug 18, 2018 at 8:57 PM Kyle Evans wrote: > Author: kevans > Date: Sun Aug 19 03:57:20 2018 > New Revision: 338039 > URL: https://svnweb.freebsd.org/changeset/base/338039 > > Log: > diff(1): Implement -B/--ignore-blank-lines > > As noted by cem in r338035, coccinelle invokes diff(1) with the -B flag= . > This was not previously implemented here, so one was forced to create a > link > for GNU diff to /usr/local/bin/diff > > Implement the -B flag and add some primitive tests for it. It is > implemented > in the same fashion that -I is implemented; each chunk's lines are > scanned, > and if a non-blank line is encountered then the chunk will be output. > Otherwise, it's skipped. > > MFC after: 2 weeks > > Added: > head/usr.bin/diff/tests/Bflag_C.out (contents, props changed) > head/usr.bin/diff/tests/Bflag_D.out (contents, props changed) > head/usr.bin/diff/tests/Bflag_F.out (contents, props changed) > Modified: > head/usr.bin/diff/TODO > head/usr.bin/diff/diff.1 > head/usr.bin/diff/diff.c > head/usr.bin/diff/diff.h > head/usr.bin/diff/diffreg.c > head/usr.bin/diff/tests/Makefile > head/usr.bin/diff/tests/diff_test.sh > > Modified: head/usr.bin/diff/TODO > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/usr.bin/diff/TODO Sun Aug 19 01:14:46 2018 (r338038) > +++ head/usr.bin/diff/TODO Sun Aug 19 03:57:20 2018 (r338039) > @@ -5,7 +5,6 @@ > * make a libsdiff and use that directly to avoid duplicating the code > > to be implemented: > ---ignore-blank-lines > --horizon-lines > --ignore-tab-expansion > --line-format > > Modified: head/usr.bin/diff/diff.1 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/usr.bin/diff/diff.1 Sun Aug 19 01:14:46 2018 (r338038) > +++ head/usr.bin/diff/diff.1 Sun Aug 19 03:57:20 2018 (r338039) > @@ -30,7 +30,7 @@ > .\" @(#)diff.1 8.1 (Berkeley) 6/30/93 > .\" $FreeBSD$ > .\" > -.Dd April 20, 2017 > +.Dd August 18, 2018 > .Dt DIFF 1 > .Os > .Sh NAME > @@ -38,7 +38,7 @@ > .Nd differential file and directory comparator > .Sh SYNOPSIS > .Nm diff > -.Op Fl abdipTtw > +.Op Fl aBbdipTtw > .Oo > .Fl c | e | f | > .Fl n | q | u > @@ -67,7 +67,7 @@ > .Op Fl L Ar label | Fl -label Ar label > .Ar file1 file2 > .Nm diff > -.Op Fl abdilpTtw > +.Op Fl aBbdilpTtw > .Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern > .Op Fl L Ar label | Fl -label Ar label > .Op Fl -brief > @@ -93,7 +93,7 @@ > .Fl C Ar number | -context Ar number > .Ar file1 file2 > .Nm diff > -.Op Fl abdiltw > +.Op Fl aBbdiltw > .Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern > .Op Fl -brief > .Op Fl -changed-group-format Ar GFMT > @@ -118,7 +118,7 @@ > .Fl D Ar string | Fl -ifdef Ar string > .Ar file1 file2 > .Nm diff > -.Op Fl abdilpTtw > +.Op Fl aBbdilpTtw > .Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern > .Op Fl L Ar label | Fl -label Ar label > .Op Fl -brief > @@ -144,7 +144,7 @@ > .Fl U Ar number | Fl -unified Ar number > .Ar file1 file2 > .Nm diff > -.Op Fl abdilNPprsTtw > +.Op Fl aBbdilNPprsTtw > .Oo > .Fl c | e | f | > .Fl n | q | u > @@ -300,6 +300,8 @@ if files contain binary characters. > Use of this option forces > .Nm > to produce a diff. > +.It Fl B Fl -ignore-blank-lines > +Causes chunks that include only blank lines to be ignored. > .It Fl b > Causes trailing blanks (spaces and tabs) to be ignored, and other > strings of blanks to compare equal. > > Modified: head/usr.bin/diff/diff.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/usr.bin/diff/diff.c Sun Aug 19 01:14:46 2018 (r338038) > +++ head/usr.bin/diff/diff.c Sun Aug 19 03:57:20 2018 (r338039) > @@ -66,6 +66,7 @@ static struct option longopts[] =3D { > { "ed", no_argument, 0, > 'e' }, > { "forward-ed", no_argument, 0, > 'f' }, > { "speed-large-files", no_argument, NULL, > 'H' }, > + { "ignore-blank-lines", no_argument, 0, > 'B' }, > { "ignore-matching-lines", required_argument, 0, > 'I' }, > { "ignore-case", no_argument, 0, > 'i' }, > { "paginate", no_argument, NULL, > 'l' }, > @@ -164,6 +165,9 @@ main(int argc, char **argv) > case 'h': > /* silently ignore for backwards compatibility */ > break; > + case 'B': > + dflags |=3D D_SKIPBLANKLINES; > + break; > case 'I': > push_ignore_pats(optarg); > break; > @@ -447,18 +451,18 @@ void > usage(void) > { > (void)fprintf(stderr, > - "usage: diff [-abdilpTtw] [-c | -e | -f | -n | -q | -u] > [--ignore-case]\n" > + "usage: diff [-aBbdilpTtw] [-c | -e | -f | -n | -q | -u] > [--ignore-case]\n" > " [--no-ignore-case] [--normal] > [--strip-trailing-cr] [--tabsize]\n" > " [-I pattern] [-L label] file1 file2\n" > - " diff [-abdilpTtw] [-I pattern] [-L label] > [--ignore-case]\n" > + " diff [-aBbdilpTtw] [-I pattern] [-L label] > [--ignore-case]\n" > " [--no-ignore-case] [--normal] > [--strip-trailing-cr] [--tabsize]\n" > " -C number file1 file2\n" > - " diff [-abdiltw] [-I pattern] [--ignore-case] > [--no-ignore-case]\n" > + " diff [-aBbdiltw] [-I pattern] [--ignore-case] > [--no-ignore-case]\n" > " [--normal] [--strip-trailing-cr] [--tabsize] -D > string file1 file2\n" > - " diff [-abdilpTtw] [-I pattern] [-L label] > [--ignore-case]\n" > + " diff [-aBbdilpTtw] [-I pattern] [-L label] > [--ignore-case]\n" > " [--no-ignore-case] [--normal] [--tabsize] > [--strip-trailing-cr]\n" > " -U number file1 file2\n" > - " diff [-abdilNPprsTtw] [-c | -e | -f | -n | -q | -u] > [--ignore-case]\n" > + " diff [-aBbdilNPprsTtw] [-c | -e | -f | -n | -q | -u] > [--ignore-case]\n" > " [--no-ignore-case] [--normal] [--tabsize] [-I > pattern] [-L label]\n" > " [-S name] [-X file] [-x pattern] dir1 dir2\n"); > > > Modified: head/usr.bin/diff/diff.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/usr.bin/diff/diff.h Sun Aug 19 01:14:46 2018 (r338038) > +++ head/usr.bin/diff/diff.h Sun Aug 19 03:57:20 2018 (r338039) > @@ -67,6 +67,7 @@ > #define D_EXPANDTABS 0x100 /* Expand tabs to spaces */ > #define D_IGNOREBLANKS 0x200 /* Ignore white space changes */ > #define D_STRIPCR 0x400 /* Strip trailing cr */ > +#define D_SKIPBLANKLINES 0x800 /* Skip blank lines */ > > /* > * Status values for print_status() and diffreg() return values > > Modified: head/usr.bin/diff/diffreg.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/usr.bin/diff/diffreg.c Sun Aug 19 01:14:46 2018 (r338038) > +++ head/usr.bin/diff/diffreg.c Sun Aug 19 03:57:20 2018 (r338039) > @@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -999,6 +1000,31 @@ restart: > } > } > return; > + } > + if (*pflags & D_SKIPBLANKLINES) { > + char *line; > + /* > + * All lines in the change, insert, or delete must not be > + * empty for the change to be ignored. > + */ > + if (a <=3D b) { /* Changes and deletes. */ > + for (i =3D a; i <=3D b; i++) { > + line =3D preadline(fileno(f1), > + ixold[i] - ixold[i - 1], ixold[i - 1]= ); > + if (*line !=3D '\0') > + goto proceed; > + } > + } > + if (a > b || c <=3D d) { /* Changes and inserts. */ > + for (i =3D c; i <=3D d; i++) { > + line =3D preadline(fileno(f2), > + ixnew[i] - ixnew[i - 1], ixnew[i - 1]= ); > + if (*line !=3D '\0') > + goto proceed; > + } > + } > + return; > + > } > proceed: > if (*pflags & D_HEADER && diff_format !=3D D_BRIEF) { > > Added: head/usr.bin/diff/tests/Bflag_C.out > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/diff/tests/Bflag_C.out Sun Aug 19 03:57:20 2018 > (r338039) > @@ -0,0 +1,2 @@ > +1a2 > +> > > Added: head/usr.bin/diff/tests/Bflag_D.out > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/diff/tests/Bflag_D.out Sun Aug 19 03:57:20 2018 > (r338039) > @@ -0,0 +1,2 @@ > +1a2 > +> C > > Added: head/usr.bin/diff/tests/Bflag_F.out > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/diff/tests/Bflag_F.out Sun Aug 19 03:57:20 2018 > (r338039) > @@ -0,0 +1,4 @@ > +7c8 > +< G > +--- > +> X > > Modified: head/usr.bin/diff/tests/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/usr.bin/diff/tests/Makefile Sun Aug 19 01:14:46 2018 > (r338038) > +++ head/usr.bin/diff/tests/Makefile Sun Aug 19 03:57:20 2018 > (r338039) > @@ -5,6 +5,9 @@ PACKAGE=3D tests > ATF_TESTS_SH=3D diff_test > > ${PACKAGE}FILES+=3D \ > + Bflag_C.out \ > + Bflag_D.out \ > + Bflag_F.out \ > input1.in \ > input2.in \ > input_c1.in \ > > Modified: head/usr.bin/diff/tests/diff_test.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/usr.bin/diff/tests/diff_test.sh Sun Aug 19 01:14:46 2018 > (r338038) > +++ head/usr.bin/diff/tests/diff_test.sh Sun Aug 19 03:57:20 2018 > (r338039) > @@ -9,6 +9,7 @@ atf_test_case group_format > atf_test_case side_by_side > atf_test_case brief_format > atf_test_case b230049 > +atf_test_case Bflag > > simple_body() > { > @@ -150,6 +151,21 @@ brief_format_body() > diff -Nrq A D > } > > +Bflag_body() > +{ > + atf_check -x 'printf "A\nB\n" > A' > + atf_check -x 'printf "A\n\nB\n" > B' > + atf_check -x 'printf "A\n \nB\n" > C' > + atf_check -x 'printf "A\nC\nB\n" > D' > + atf_check -x 'printf "A\nB\nC\nD\nE\nF\nG\nH" > E' > + atf_check -x 'printf "A\n\nB\nC\nD\nE\nF\nX\nH" > F' > + > + atf_check -s exit:0 -o inline:"" diff -B A B > + atf_check -s exit:1 -o file:"$(atf_get_srcdir)/Bflag_C.out" diff > -B A C > + atf_check -s exit:1 -o file:"$(atf_get_srcdir)/Bflag_D.out" diff > -B A D > + atf_check -s exit:1 -o file:"$(atf_get_srcdir)/Bflag_F.out" diff > -B E F > +} > + > atf_init_test_cases() > { > atf_add_test_case simple > @@ -161,4 +177,5 @@ atf_init_test_cases() > atf_add_test_case side_by_side > atf_add_test_case brief_format > atf_add_test_case b230049 > + atf_add_test_case Bflag > } > > From owner-svn-src-head@freebsd.org Sun Aug 19 07:05: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 B140710855B6; Sun, 19 Aug 2018 07:05:34 +0000 (UTC) (envelope-from eadler@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 5828D8AEA6; Sun, 19 Aug 2018 07:05:34 +0000 (UTC) (envelope-from eadler@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 35D1C22F90; Sun, 19 Aug 2018 07:05:34 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7J75XrO026667; Sun, 19 Aug 2018 07:05:33 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7J75XCq026666; Sun, 19 Aug 2018 07:05:33 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201808190705.w7J75XCq026666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Aug 2018 07:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338041 - head/targets/pseudo/userland X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/targets/pseudo/userland X-SVN-Commit-Revision: 338041 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, 19 Aug 2018 07:05:34 -0000 Author: eadler Date: Sun Aug 19 07:05:33 2018 New Revision: 338041 URL: https://svnweb.freebsd.org/changeset/base/338041 Log: build: remove reference to some dead utilities Modified: head/targets/pseudo/userland/Makefile.depend Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Sun Aug 19 04:15:38 2018 (r338040) +++ head/targets/pseudo/userland/Makefile.depend Sun Aug 19 07:05:33 2018 (r338041) @@ -286,9 +286,6 @@ DIRDEPS+= \ usr.bin/nice \ usr.bin/nl \ usr.bin/nohup \ - usr.bin/nslookup \ - usr.bin/nsupdate \ - usr.bin/numactl \ usr.bin/opieinfo \ usr.bin/opiekey \ usr.bin/opiepasswd \ @@ -761,7 +758,6 @@ DIRDEPS+= \ usr.sbin/zic/zic \ usr.sbin/zonectl \ ${DEP_RELDIR}/cddl \ - ${DEP_RELDIR}/games \ ${DEP_RELDIR}/gnu \ ${DEP_RELDIR}/include \ ${DEP_RELDIR}/kerberos5 \ From owner-svn-src-head@freebsd.org Sun Aug 19 07:12: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 DF77B10857D2; Sun, 19 Aug 2018 07:12:36 +0000 (UTC) (envelope-from eadler@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 91AF58B2CD; Sun, 19 Aug 2018 07:12:36 +0000 (UTC) (envelope-from eadler@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 72B6B23135; Sun, 19 Aug 2018 07:12:36 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7J7Ca5g031416; Sun, 19 Aug 2018 07:12:36 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7J7CZXA031413; Sun, 19 Aug 2018 07:12:35 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201808190712.w7J7CZXA031413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 19 Aug 2018 07:12:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338042 - in head: . targets/pseudo/userland usr.bin usr.bin/send-pr usr.sbin/crunch/examples X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in head: . targets/pseudo/userland usr.bin usr.bin/send-pr usr.sbin/crunch/examples X-SVN-Commit-Revision: 338042 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, 19 Aug 2018 07:12:37 -0000 Author: eadler Date: Sun Aug 19 07:12:35 2018 New Revision: 338042 URL: https://svnweb.freebsd.org/changeset/base/338042 Log: send-pr: wave goodbye Entering into the world of 12.x we no longer need even the placeholder for send-pr. It has not done anything for some time. With Hat: bugmeister Deleted: head/usr.bin/send-pr/Makefile head/usr.bin/send-pr/Makefile.depend head/usr.bin/send-pr/send-pr.sh Modified: head/ObsoleteFiles.inc head/targets/pseudo/userland/Makefile.depend head/usr.bin/Makefile head/usr.sbin/crunch/examples/really-big.conf Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Aug 19 07:05:33 2018 (r338041) +++ head/ObsoleteFiles.inc Sun Aug 19 07:12:35 2018 (r338042) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20180819: send-pr(1) placeholder removal +OLD_FILES+=usr/bin/send-pr # 20180725: Cleanup old libcasper.so.0 OLD_LIBS+=lib/libcasper.so.0 # 20180722: indent(1) option renamed, test files follow Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Sun Aug 19 07:05:33 2018 (r338041) +++ head/targets/pseudo/userland/Makefile.depend Sun Aug 19 07:12:35 2018 (r338042) @@ -320,7 +320,6 @@ DIRDEPS+= \ usr.bin/script \ usr.bin/sdiff \ usr.bin/sed \ - usr.bin/send-pr \ usr.bin/seq \ usr.bin/shar \ usr.bin/showmount \ Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sun Aug 19 07:05:33 2018 (r338041) +++ head/usr.bin/Makefile Sun Aug 19 07:12:35 2018 (r338042) @@ -135,7 +135,6 @@ SUBDIR= alias \ script \ sdiff \ sed \ - send-pr \ seq \ shar \ showmount \ Modified: head/usr.sbin/crunch/examples/really-big.conf ============================================================================== --- head/usr.sbin/crunch/examples/really-big.conf Sun Aug 19 07:05:33 2018 (r338041) +++ head/usr.sbin/crunch/examples/really-big.conf Sun Aug 19 07:12:35 2018 (r338042) @@ -110,7 +110,6 @@ progs ypbind ypwhich ypcat ypmatch ypset yppoll srcdirs /usr/src/gnu/usr.bin progs bc cpio diff diff3 gas gawk grep gzip sdiff sort tar -# shell scripts: send-pr srcdirs /usr/src/gnu/usr.bin/ld # ldd and ldconfig progs ld ldd ldconfig From owner-svn-src-head@freebsd.org Sun Aug 19 10:15: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 B72641088CEB; Sun, 19 Aug 2018 10:15:29 +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 6CF297006D; Sun, 19 Aug 2018 10:15:29 +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 4E23C24F0D; Sun, 19 Aug 2018 10:15:29 +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 w7JAFT0L023806; Sun, 19 Aug 2018 10:15:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JAFTJH023805; Sun, 19 Aug 2018 10:15:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201808191015.w7JAFTJH023805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 19 Aug 2018 10:15:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338043 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 338043 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, 19 Aug 2018 10:15:29 -0000 Author: imp Date: Sun Aug 19 10:15:28 2018 New Revision: 338043 URL: https://svnweb.freebsd.org/changeset/base/338043 Log: Document LOADER_DEFAULT_INTERP. This controls what interpreter the default boot loader in /boot/loader{,.efi} is, and which one we compile into userboot by default. Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Sun Aug 19 07:12:35 2018 (r338042) +++ head/share/man/man7/build.7 Sun Aug 19 10:15:28 2018 (r338043) @@ -652,6 +652,18 @@ using the option of .Xr make 1 : .Bl -tag -width ".Va -DNO_KERNELCONFIG" +.It Va LOADER_DEFAULT_INTERP +Defines what interpreter the default loader program will have. +Valid values include +.Dq 4th , +.Dq lua , +and +.Dq simp . +This creates the default link for +.Pa /boot/loader +to the loader with that interpreter. +It also determines what interpreter is compiled into +.Pa userboot . .It Va NO_CLEANDIR If set, the build targets that clean parts of the object tree use the equivalent of From owner-svn-src-head@freebsd.org Sun Aug 19 13: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 2BE3C108C8CF; Sun, 19 Aug 2018 13:23:47 +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 C4D0675606; Sun, 19 Aug 2018 13:23:46 +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 9FB9A26D57; Sun, 19 Aug 2018 13:23:46 +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 w7JDNkY2022302; Sun, 19 Aug 2018 13:23:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JDNkNS022301; Sun, 19 Aug 2018 13:23:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808191323.w7JDNkNS022301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 Aug 2018 13:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338044 - head/share/man/man3 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/share/man/man3 X-SVN-Commit-Revision: 338044 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, 19 Aug 2018 13:23:47 -0000 Author: kib Date: Sun Aug 19 13:23:46 2018 New Revision: 338044 URL: https://svnweb.freebsd.org/changeset/base/338044 Log: Fix typo. Noted by: Yuri Pankov MFC after: 12 days Modified: head/share/man/man3/pthread_set_name_np.3 Modified: head/share/man/man3/pthread_set_name_np.3 ============================================================================== --- head/share/man/man3/pthread_set_name_np.3 Sun Aug 19 10:15:28 2018 (r338043) +++ head/share/man/man3/pthread_set_name_np.3 Sun Aug 19 13:23:46 2018 (r338044) @@ -74,4 +74,4 @@ are non-standard extensions. This manual page was written by .An Alexey Zelkin Aq Mt phantom@FreeBSD.org and -An Yuri Pankov Aq Mt yuripv@yuripv.net . +.An Yuri Pankov Aq Mt yuripv@yuripv.net . From owner-svn-src-head@freebsd.org Sun Aug 19 13:44: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 EC3E61066206; Sun, 19 Aug 2018 13:44:56 +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 9FFE77639F; Sun, 19 Aug 2018 13:44:56 +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 81421270C6; Sun, 19 Aug 2018 13:44:56 +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 w7JDiu11033216; Sun, 19 Aug 2018 13:44:56 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JDiuhs033215; Sun, 19 Aug 2018 13:44:56 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201808191344.w7JDiuhs033215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 19 Aug 2018 13:44:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338045 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 338045 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, 19 Aug 2018 13:44:57 -0000 Author: cy Date: Sun Aug 19 13:44:56 2018 New Revision: 338045 URL: https://svnweb.freebsd.org/changeset/base/338045 Log: Expose np (nat_t - an entry in the nat table structure) in the DTrace probe when nat fails (label badnat). This is useful in diagnosing failed NAT issues and was used in PR/208566. PR: 208566 MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_nat.c Sun Aug 19 13:23:46 2018 (r338044) +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Sun Aug 19 13:44:56 2018 (r338045) @@ -3259,7 +3259,7 @@ ipf_nat_add(fin, np, natsave, flags, direction) goto done; badnat: - DT2(ns_badnatnew, fr_info_t *, fin, nat_t *, nat); + DT3(ns_badnatnew, fr_info_t *, fin, nat_t *, nat, ipnat_t *, np); NBUMPSIDE(fin->fin_out, ns_badnatnew); if ((hm = nat->nat_hm) != NULL) ipf_nat_hostmapdel(softc, &hm); From owner-svn-src-head@freebsd.org Sun Aug 19 13: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 5582B1066235; Sun, 19 Aug 2018 13:45:04 +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 C902776489; Sun, 19 Aug 2018 13:45:03 +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 7DF5F270CA; Sun, 19 Aug 2018 13:45:03 +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 w7JDj3qe033347; Sun, 19 Aug 2018 13:45:03 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JDj3Hs033346; Sun, 19 Aug 2018 13:45:03 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201808191345.w7JDj3Hs033346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 19 Aug 2018 13:45:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338047 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 338047 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, 19 Aug 2018 13:45:04 -0000 Author: cy Date: Sun Aug 19 13:45:03 2018 New Revision: 338047 URL: https://svnweb.freebsd.org/changeset/base/338047 Log: The bucket index is subtracted by one at lines 2304 and 2314. When 0 it becomes -1, except these are unsigned integers, so they become very large numbers. Thus are always larger than the maximum bucket; the hash table insertion fails causing NAT to fail. This commit ensures that if the index is already zero it is not reduced prior to insertion into the hash table. PR: 208566 Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_nat.c Sun Aug 19 13:44:59 2018 (r338046) +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Sun Aug 19 13:45:03 2018 (r338047) @@ -2304,14 +2304,16 @@ ipf_nat_delete(softc, nat, logtype) bkt = nat->nat_hv[0] % softn->ipf_nat_table_sz; nss = &softn->ipf_nat_stats.ns_side[0]; - nss->ns_bucketlen[bkt]--; + if (nss->ns_bucketlen[bkt] > 0) + nss->ns_bucketlen[bkt]--; if (nss->ns_bucketlen[bkt] == 0) { nss->ns_inuse--; } bkt = nat->nat_hv[1] % softn->ipf_nat_table_sz; nss = &softn->ipf_nat_stats.ns_side[1]; - nss->ns_bucketlen[bkt]--; + if (nss->ns_bucketlen[bkt] > 0) + nss->ns_bucketlen[bkt]--; if (nss->ns_bucketlen[bkt] == 0) { nss->ns_inuse--; } From owner-svn-src-head@freebsd.org Sun Aug 19 13:45: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 1E310106622D; Sun, 19 Aug 2018 13:45:03 +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 0FFC076403; Sun, 19 Aug 2018 13:45:00 +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 3635B270C8; Sun, 19 Aug 2018 13:45:00 +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 w7JDixVW033277; Sun, 19 Aug 2018 13:44:59 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JDix4H033276; Sun, 19 Aug 2018 13:44:59 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201808191344.w7JDix4H033276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 19 Aug 2018 13:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338046 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 338046 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, 19 Aug 2018 13:45:03 -0000 Author: cy Date: Sun Aug 19 13:44:59 2018 New Revision: 338046 URL: https://svnweb.freebsd.org/changeset/base/338046 Log: Add handy DTrace probes useful in diagnosing NAT issues. DTrace probes are situated next to error counters and/or in one instance prior to the -1 return from various functions. This was useful in diagnosis of PR/208566 and will be handy in the future diagnosing NAT failures. PR: 208566 MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_nat.c Sun Aug 19 13:44:56 2018 (r338045) +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Sun Aug 19 13:44:59 2018 (r338046) @@ -2676,6 +2676,7 @@ ipf_nat_newmap(fin, nat, ni) if ((np->in_nsrcmsk == 0xffffffff) && (np->in_spnext == 0)) { if (l > 0) { NBUMPSIDEX(1, ns_exhausted, ns_exhausted_1); + DT4(ns_exhausted_1, fr_info_t *, fin, nat_t *, nat, natinfo_t *, ni, ipnat_t *, np); return -1; } } @@ -2693,6 +2694,7 @@ ipf_nat_newmap(fin, nat, ni) if ((l >= np->in_ppip) || ((l > 0) && !(flags & IPN_TCPUDP))) { NBUMPSIDEX(1, ns_exhausted, ns_exhausted_2); + DT4(ns_exhausted_2, fr_info_t *, fin, nat_t *, nat, natinfo_t *, ni, ipnat_t *, np); return -1; } /* @@ -2728,6 +2730,7 @@ ipf_nat_newmap(fin, nat, ni) ipf_ifpaddr(softc, 4, FRI_NORMAL, fin->fin_ifp, &in6, NULL) == -1) { NBUMPSIDEX(1, ns_new_ifpaddr, ns_new_ifpaddr_1); + DT4(ns_new_ifpaddr_1, fr_info_t *, fin, nat_t *, nat, natinfo_t *, ni, ipnat_t *, np); return -1; } in.s_addr = ntohl(in6.in4.s_addr); @@ -2738,6 +2741,7 @@ ipf_nat_newmap(fin, nat, ni) */ if (l > 0) { NBUMPSIDEX(1, ns_exhausted, ns_exhausted_3); + DT4(ns_exhausted_3, fr_info_t *, fin, nat_t *, nat, natinfo_t *, ni, ipnat_t *, np); return -1; } in.s_addr = ntohl(fin->fin_saddr); @@ -2833,6 +2837,7 @@ ipf_nat_newmap(fin, nat, ni) (np->in_spnext != 0) && (st_port == np->in_spnext) && (np->in_snip != 0) && (st_ip == np->in_snip)) { NBUMPSIDED(1, ns_wrap); + DT4(ns_wrap, fr_info_t *, fin, nat_t *, nat, natinfo_t *, ni, ipnat_t *, np); return -1; } l++; @@ -2968,6 +2973,7 @@ ipf_nat_newrdr(fin, nat, ni) if (ipf_ifpaddr(softc, 4, FRI_NORMAL, fin->fin_ifp, &in6, NULL) == -1) { NBUMPSIDEX(0, ns_new_ifpaddr, ns_new_ifpaddr_2); + DT3(ns_new_ifpaddr_2, fr_info_t *, fin, nat_t *, nat, natinfo_t, ni); return -1; } in.s_addr = ntohl(in6.in4.s_addr); @@ -3114,6 +3120,7 @@ ipf_nat_add(fin, np, natsave, flags, direction) if (nsp->ns_active >= softn->ipf_nat_table_max) { NBUMPSIDED(fin->fin_out, ns_table_max); + DT2(ns_table_max, nat_stat_t *, nsp, ipf_nat_softc_t *, softn); return NULL; } @@ -3128,6 +3135,7 @@ ipf_nat_add(fin, np, natsave, flags, direction) /* Give me a new nat */ KMALLOC(nat, nat_t *); if (nat == NULL) { + DT(ns_memfail); NBUMPSIDED(fin->fin_out, ns_memfail); /* * Try to automatically tune the max # of entries in the @@ -3223,6 +3231,7 @@ ipf_nat_add(fin, np, natsave, flags, direction) if ((np->in_apr != NULL) && ((nat->nat_flags & NAT_SLAVE) == 0)) { if (ipf_proxy_new(fin, nat) == -1) { NBUMPSIDED(fin->fin_out, ns_appr_fail); + DT3(ns_appr_fail, fr_info_t *, fin, nat_t *, nat, ipnat_t *, np); goto badnat; } } @@ -3380,6 +3389,7 @@ ipf_nat_finalise(fin, nat) } NBUMPSIDED(fin->fin_out, ns_unfinalised); + DT2(ns_unfinalised, fr_info_t *, fin, nat_t *, nat); /* * nat_insert failed, so cleanup time... */ @@ -7065,6 +7075,7 @@ ipf_nat_newrewrite(fin, nat, nai) do { changed = -1; /* TRACE (l, src_search, dst_search, np) */ + DT4(ipf_nat_rewrite_1, int, l, int, src_search, int, dst_search, ipnat_t *, np); if ((src_search == 0) && (np->in_spnext == 0) && (dst_search == 0) && (np->in_dpnext == 0)) { @@ -7129,6 +7140,7 @@ ipf_nat_newrewrite(fin, nat, nai) * Find a new destination address */ /* TRACE (fin, np, l, frnat) */ + DT4(ipf_nat_rewrite_2, frinfo_t *, fin, ipnat_t *, np, int, l, frinfo_t *, &frnat); if (ipf_nat_nextaddr(fin, &np->in_ndst, &frnat.fin_daddr, &frnat.fin_daddr) == -1) @@ -7179,6 +7191,7 @@ ipf_nat_newrewrite(fin, nat, nai) } /* TRACE (frnat) */ + DT1(ipf_nat_rewrite_3, frinfo_t *, &frnat); /* * Here we do a lookup of the connection as seen from @@ -7218,6 +7231,7 @@ ipf_nat_newrewrite(fin, nat, nai) } /* TRACE natl, in_stepnext, l */ + DT3(ipf_nat_rewrite_2, nat_t *, natl, ipnat_t *, np , int, l); if ((natl != NULL) && (l > 8)) /* XXX 8 is arbitrary */ return -1; @@ -7310,6 +7324,7 @@ ipf_nat_newdivert(fin, nat, nai) if (natl != NULL) { NBUMPSIDED(fin->fin_out, ns_divert_exist); + DT3(ns_divert_exist, fr_info_t *, fin, nat_t *, nat, natinfo_t, nai); return -1; } @@ -7562,6 +7577,7 @@ ipf_nat_nextaddr(fin, na, old, dst) case FRI_PEERADDR : case FRI_NETWORK : default : + DT4(ns_na_atype, fr_info_t *, fin, nat_addr_t *, na, u_32_t *, old, u_32_t *, new); return -1; } @@ -7573,6 +7589,7 @@ ipf_nat_nextaddr(fin, na, old, dst) NULL); } else { NBUMPSIDE(fin->fin_out, ns_badnextaddr); + DT4(ns_badnextaddr_1, fr_info_t *, fin, nat_addr_t *, na, u_32_t *, old, u_32_t *, new); } } else if (na->na_atype == IPLT_NONE) { @@ -7591,6 +7608,7 @@ ipf_nat_nextaddr(fin, na, old, dst) if (ipf_ifpaddr(softc, 4, na->na_atype, fin->fin_ifp, &newip, NULL) == -1) { NBUMPSIDED(fin->fin_out, ns_ifpaddrfail); + DT4(ns_ifpaddrfail, fr_info_t *, fin, nat_addr_t *, na, u_32_t *, old, u_32_t *, new); return -1; } new = newip.in4.s_addr; @@ -7602,6 +7620,7 @@ ipf_nat_nextaddr(fin, na, old, dst) } else { NBUMPSIDE(fin->fin_out, ns_badnextaddr); + DT4(ns_badnextaddr_2, fr_info_t *, fin, nat_addr_t *, na, u_32_t *, old, u_32_t *, new); } return error; From owner-svn-src-head@freebsd.org Sun Aug 19 14:22: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 9E6561069DD0; Sun, 19 Aug 2018 14:22:46 +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 5170D78347; Sun, 19 Aug 2018 14:22:46 +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 33D3827753; Sun, 19 Aug 2018 14:22:46 +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 w7JEMk3T053756; Sun, 19 Aug 2018 14:22:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JEMkTb053755; Sun, 19 Aug 2018 14:22:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808191422.w7JEMkTb053755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 Aug 2018 14:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338048 - head/lib/libc/stdlib X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/stdlib X-SVN-Commit-Revision: 338048 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, 19 Aug 2018 14:22:46 -0000 Author: kib Date: Sun Aug 19 14:22:45 2018 New Revision: 338048 URL: https://svnweb.freebsd.org/changeset/base/338048 Log: Use tab for indent. Submitted by: Yuri Pankov MFC after: 3 days Modified: head/lib/libc/stdlib/Makefile.inc Modified: head/lib/libc/stdlib/Makefile.inc ============================================================================== --- head/lib/libc/stdlib/Makefile.inc Sun Aug 19 13:45:03 2018 (r338047) +++ head/lib/libc/stdlib/Makefile.inc Sun Aug 19 14:22:45 2018 (r338048) @@ -16,7 +16,7 @@ MISRCS+=C99_Exit.c a64l.c abort.c abs.c atexit.c atof. random.c reallocarray.c reallocf.c realpath.c remque.c \ set_constraint_handler_s.c strfmon.c strtoimax.c \ strtol.c strtold.c strtoll.c strtoq.c strtoul.c strtonum.c strtoull.c \ - strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c twalk.c + strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c twalk.c # Work around an issue on case-insensitive file systems. # libc has both _Exit.c and _exit.s and they both yield From owner-svn-src-head@freebsd.org Sun Aug 19 14:25: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 6E1B2106A016; Sun, 19 Aug 2018 14:25:29 +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 23A66785DC; Sun, 19 Aug 2018 14:25:29 +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 0018A27754; Sun, 19 Aug 2018 14:25:28 +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 w7JEPSF7053915; Sun, 19 Aug 2018 14:25:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JEPSBQ053914; Sun, 19 Aug 2018 14:25:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808191425.w7JEPSBQ053914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 Aug 2018 14:25:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338049 - head/lib/libc/string X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/string X-SVN-Commit-Revision: 338049 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, 19 Aug 2018 14:25:29 -0000 Author: kib Date: Sun Aug 19 14:25:28 2018 New Revision: 338049 URL: https://svnweb.freebsd.org/changeset/base/338049 Log: Clarify that memset_s(3) requires __STDC_WANT_LIB_EXT1__ for visibility. Fix typos and other nits. Submitted by: Yuri Pankov MFC after: 3 days Differential revision: https://reviews.freebsd.org/D16797 Modified: head/lib/libc/string/memset.3 Modified: head/lib/libc/string/memset.3 ============================================================================== --- head/lib/libc/string/memset.3 Sun Aug 19 14:22:45 2018 (r338048) +++ head/lib/libc/string/memset.3 Sun Aug 19 14:25:28 2018 (r338049) @@ -32,7 +32,7 @@ .\" @(#)memset.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd February 15, 2018 +.Dd August 19, 2018 .Dt MEMSET 3 .Os .Sh NAME @@ -44,6 +44,7 @@ .In string.h .Ft void * .Fn memset "void *dest" "int c" "size_t len" +.Fd #define __STDC_WANT_LIB_EXT1__ 1 .Ft errno_t .Fn memset_s "void *dest" "rsize_t destsz" "int c" "rsize_t len" .Sh DESCRIPTION @@ -82,7 +83,6 @@ or is greater than .Dv RSIZE_MAX , or -.Sp .Fa len is greater than .Fa destsz @@ -93,10 +93,10 @@ Like .Xr explicit_bzero 3 , .Fn memset_s is not removed through Dead Store Elimination (DSE), making it useful for -clearing sensitve data. +clearing sensitive data. In contrast .Fn memset -function +function may be optimized away if the object modified by the function is not accessed again. To clear memory that will not subsequently be accessed it is advised to use @@ -126,6 +126,6 @@ function conforms to .St -isoC . .Fn memset_s -conforms to: +conforms to .St -isoC-2011 K.3.7.4.1. From owner-svn-src-head@freebsd.org Sun Aug 19 14:26: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 2E202106A16F; Sun, 19 Aug 2018 14:26:34 +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 D8BF8788CB; Sun, 19 Aug 2018 14:26:33 +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 B9F5A27776; Sun, 19 Aug 2018 14:26:33 +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 w7JEQXir054124; Sun, 19 Aug 2018 14:26:33 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JEQXXr054123; Sun, 19 Aug 2018 14:26:33 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808191426.w7JEQXXr054123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 19 Aug 2018 14:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338050 - in head: . stand X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: . stand X-SVN-Commit-Revision: 338050 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, 19 Aug 2018 14:26:34 -0000 Author: kevans Date: Sun Aug 19 14:26:33 2018 New Revision: 338050 URL: https://svnweb.freebsd.org/changeset/base/338050 Log: stand: Flip the default interpreter to Lua After years in the making, lualoader is ready to make its debut. Both flavors of loader are still built by default, and may be installed as /boot/loader or /boot/loader.efi as appropriate either by manually creating hard links or using LOADER_DEFAULT_INTERP as documented in build(7). Discussed with: imp Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16795 Modified: head/UPDATING head/stand/defs.mk Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Aug 19 14:25:28 2018 (r338049) +++ head/UPDATING Sun Aug 19 14:26:33 2018 (r338050) @@ -31,6 +31,15 @@ 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".) +20180818: + The default interpreter has been switched from 4th to Lua. + LOADER_DEFAULT_INTERP, documented in build(7), will override the default + interpreter. If you have custom FORTH code you will need to set + LOADER_DEFAULT_INTERP=4th (valid values are 4th, lua or simp) in + src.conf for the build. This will create default hard links between + loader and loader_4th instead of loader and loader_lua, the new default. + If you are using UEFI it will create the proper hard link to loader.efi. + 20180815: ls(1) now respects the COLORTERM environment variable used in other systems and software to indicate that a colored terminal is both Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Sun Aug 19 14:25:28 2018 (r338049) +++ head/stand/defs.mk Sun Aug 19 14:26:33 2018 (r338050) @@ -154,10 +154,10 @@ CFLAGS+= -mlittle-endian # # Have a sensible default # -.if ${MK_FORTH} == "yes" -LOADER_DEFAULT_INTERP?=4th -.elif ${MK_LOADER_LUA} == "yes" +.if ${MK_LOADER_LUA} == "yes" LOADER_DEFAULT_INTERP?=lua +.elif ${MK_FORTH} == "yes" +LOADER_DEFAULT_INTERP?=4th .else LOADER_DEFAULT_INTERP?=simp .endif From owner-svn-src-head@freebsd.org Sun Aug 19 14:39:58 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 B627D106A920; Sun, 19 Aug 2018 14:39:58 +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 6BEA4796EF; Sun, 19 Aug 2018 14:39:58 +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 4D15B27914; Sun, 19 Aug 2018 14:39:58 +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 w7JEdwkO059402; Sun, 19 Aug 2018 14:39:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JEdvQd059399; Sun, 19 Aug 2018 14:39:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808191439.w7JEdvQd059399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 Aug 2018 14:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338051 - in head/lib/libc: stdlib string X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/lib/libc: stdlib string X-SVN-Commit-Revision: 338051 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, 19 Aug 2018 14:39:59 -0000 Author: kib Date: Sun Aug 19 14:39:57 2018 New Revision: 338051 URL: https://svnweb.freebsd.org/changeset/base/338051 Log: Provide set_constraint_handler_s(3) man page. Mention abort_handler_s(3) and ignore_handler_s(3), provide cross-reference from memset(3). Submitted by: Yuri Pankov MFC after: 3 days Differential revision: https://reviews.freebsd.org/D16797 Added: head/lib/libc/stdlib/set_constraint_handler_s.3 (contents, props changed) Modified: head/lib/libc/stdlib/Makefile.inc head/lib/libc/string/memset.3 Modified: head/lib/libc/stdlib/Makefile.inc ============================================================================== --- head/lib/libc/stdlib/Makefile.inc Sun Aug 19 14:26:33 2018 (r338050) +++ head/lib/libc/stdlib/Makefile.inc Sun Aug 19 14:39:57 2018 (r338051) @@ -36,8 +36,9 @@ MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 \ hcreate.3 imaxabs.3 imaxdiv.3 insque.3 labs.3 ldiv.3 llabs.3 lldiv.3 \ lsearch.3 memory.3 ptsname.3 qsort.3 \ quick_exit.3 \ - radixsort.3 rand.3 random.3 reallocarray.3 reallocf.3 \ - realpath.3 strfmon.3 strtod.3 strtol.3 strtonum.3 strtoul.3 system.3 \ + radixsort.3 rand.3 random.3 reallocarray.3 reallocf.3 realpath.3 \ + set_constraint_handler_s.3 \ + strfmon.3 strtod.3 strtol.3 strtonum.3 strtoul.3 system.3 \ tsearch.3 MLINKS+=a64l.3 l64a.3 a64l.3 l64a_r.3 @@ -55,6 +56,8 @@ MLINKS+=rand.3 rand_r.3 rand.3 srand.3 rand.3 sranddev MLINKS+=random.3 initstate.3 random.3 setstate.3 random.3 srandom.3 \ random.3 srandomdev.3 MLINKS+=radixsort.3 sradixsort.3 +MLINKS+=set_constraint_handler_s.3 abort_handler_s.3 +MLINKS+=set_constraint_handler_s.3 ignore_handler_s.3 MLINKS+=strfmon.3 strfmon_l.3 MLINKS+=strtod.3 strtof.3 strtod.3 strtold.3 MLINKS+=strtol.3 strtoll.3 strtol.3 strtoq.3 strtol.3 strtoimax.3 Added: head/lib/libc/stdlib/set_constraint_handler_s.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/stdlib/set_constraint_handler_s.3 Sun Aug 19 14:39:57 2018 (r338051) @@ -0,0 +1,149 @@ +.\" Copyright 2018 Yuri Pankov +.\" +.\" 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 18, 2018 +.Dt SET_CONSTRAINT_HANDLER_S 3 +.Os +.Sh NAME +.Nm set_constraint_handler_s , +.Nm abort_handler_s , +.Nm ignore_handler_s +.Nd runtime-constraint violation handling +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.Fd #define __STDC_WANT_LIB_EXT1__ 1 +.In stdlib.h +.Ft constraint_handler_t +.Fo set_constraint_handler_s +.Fa "constraint_handler_t handler" +.Fc +.Ss Handler Prototype +.Ft typedef void +.Fo (*constraint_handler_t) +.Fa "const char * restrict msg" +.Fa "void * restrict ptr" +.Fa "errno_t error" +.Fc +.Ss Predefined Handlers +.Ft void +.Fo abort_handler_s +.Fa "const char * restrict msg" +.Fa "void * restrict ptr" +.Fa "errno_t error" +.Fc +.Ft void +.Fo ignore_handler_s +.Fa "const char * restrict msg" +.Fa "void * restrict ptr" +.Fa "errno_t error" +.Fc +.Sh DESCRIPTION +The +.Fn set_constraint_handler_s +function sets the runtime-constraint violation handler to be +.Fa handler . +.Pp +The runtime-constraint handler is the callback function invoked when a library +function detects a runtime-constraint violation. +.Pp +The arguments are as follows: +.Bl -tag -width "error" +.It Fa msg +A pointer to a character string describing the runtime-constraint violation. +.It Fa ptr +A +.Dv NULL +pointer. +.It Fa error +If the function calling the handler has a return type declared as +.Vt errno_t , +the return value of the function is passed. +Otherwise, a positive value of type +.Vt errno_t +is passed. +.El +.Pp +Only the most recent handler registered with +.Fn set_constraint_handler_s +is called when a runtime-constraint violation occurs. +.Pp +The implementation has a default constraint handler that is used if no calls to +the +.Fn set_constraint_handler_s +function have been made. +If the +.Fa handler +argument to +.Fn set_constraint_handler_s +is a +.Dv NULL +pointer, the default handler becomes the current constraint handler. +.Pp +The +.Fn abort_handler_s +and +.Fn ignore_handler_s +are the standard-defined runtime-constraint handlers provided by the C library. +.Pp +The +.Fn abort_handler_s +function writes the error message including the +.Fa msg +to +.Dv stderr +and calls the +.Xr abort 3 +function. +The +.Fn abort_handler_s +is currently the default runtime-constraint handler. +.Pp +The +.Fn ignore_handler_s +simply returns to its caller. +.Sh RETURN VALUES +The +.Fn set_constraint_handler_s +function returns a pointer to the previously registered handler, or +.Dv NULL +if none was previously registered. +.Pp +The +.Fn abort_handler_s +function does not return to its caller. +.Pp +The +.Fn ignore_handler_s +function returns no value. +.Sh STANDARDS +The +.Fn set_constraint_handler_s +function conforms to +.St -isoC-2011 +K.3.6.1.1. +.Sh AUTHORS +This manual page was written by +.An Yuri Pankov Aq Mt yuripv@yuripv.net . Modified: head/lib/libc/string/memset.3 ============================================================================== --- head/lib/libc/string/memset.3 Sun Aug 19 14:26:33 2018 (r338050) +++ head/lib/libc/string/memset.3 Sun Aug 19 14:39:57 2018 (r338051) @@ -117,6 +117,7 @@ function returns zero on success, non-zero on error. .Sh SEE ALSO .Xr bzero 3 , .Xr explicit_bzero 3 , +.Xr set_constraint_handler_s 3 , .Xr swab 3 , .Xr wmemset 3 .Sh STANDARDS From owner-svn-src-head@freebsd.org Sun Aug 19 14:48:33 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 88D4E106B3CA; Sun, 19 Aug 2018 14:48:33 +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 598D579F9F; Sun, 19 Aug 2018 14:48:33 +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 36D1227AD3; Sun, 19 Aug 2018 14:48:33 +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 w7JEmXcr064462; Sun, 19 Aug 2018 14:48:33 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JEmXnH064461; Sun, 19 Aug 2018 14:48:33 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808191448.w7JEmXnH064461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 19 Aug 2018 14:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338052 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 338052 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, 19 Aug 2018 14:48:33 -0000 Author: kevans Date: Sun Aug 19 14:48:32 2018 New Revision: 338052 URL: https://svnweb.freebsd.org/changeset/base/338052 Log: libsa: Add lshrdi3.c for powerpc* and mips Modified: head/stand/libsa/Makefile Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Sun Aug 19 14:39:57 2018 (r338051) +++ head/stand/libsa/Makefile Sun Aug 19 14:48:32 2018 (r338052) @@ -73,13 +73,13 @@ SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S a .if ${MACHINE_CPUARCH} == "powerpc" .PATH: ${LIBC_SRC}/quad -SRCS+= ashldi3.c ashrdi3.c +SRCS+= ashldi3.c ashrdi3.c lshrdi3.c SRCS+= syncicache.c .endif .if ${MACHINE_CPUARCH} == "mips" .PATH: ${LIBC_SRC}/quad -SRCS+= ashldi3.c ashrdi3.c +SRCS+= ashldi3.c ashrdi3.c lshrdi3.c .endif # uuid functions from libc From owner-svn-src-head@freebsd.org Sun Aug 19 14:56: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 D9484106B835; Sun, 19 Aug 2018 14:56:11 +0000 (UTC) (envelope-from tuexen@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 82EEB7A440; Sun, 19 Aug 2018 14:56:11 +0000 (UTC) (envelope-from tuexen@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 5FED327C63; Sun, 19 Aug 2018 14:56:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7JEuBil069783; Sun, 19 Aug 2018 14:56:11 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JEuAZE069780; Sun, 19 Aug 2018 14:56:10 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201808191456.w7JEuAZE069780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 19 Aug 2018 14:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338053 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 338053 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, 19 Aug 2018 14:56:12 -0000 Author: tuexen Date: Sun Aug 19 14:56:10 2018 New Revision: 338053 URL: https://svnweb.freebsd.org/changeset/base/338053 Log: Don't expose the uptime via the TCP timestamps. The TCP client side or the TCP server side when not using SYN-cookies used the uptime as the TCP timestamp value. This patch uses in all cases an offset, which is the result of a keyed hash function taking the source and destination addresses and port numbers into account. The keyed hash function is the same a used for the initial TSN. Reviewed by: rrs@ MFC after: 1 month Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D16636 Modified: head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Sun Aug 19 14:48:32 2018 (r338052) +++ head/sys/netinet/tcp_subr.c Sun Aug 19 14:56:10 2018 (r338053) @@ -233,6 +233,9 @@ VNET_DEFINE(uma_zone_t, sack_hole_zone); VNET_DEFINE(struct hhook_head *, tcp_hhh[HHOOK_TCP_LAST+1]); #endif +VNET_DEFINE_STATIC(u_char, ts_offset_secret[32]); +#define V_ts_offset_secret VNET(ts_offset_secret) + static int tcp_default_fb_init(struct tcpcb *tp); static void tcp_default_fb_fini(struct tcpcb *tp, int tcb_is_purged); static int tcp_default_handoff_ok(struct tcpcb *tp); @@ -1092,6 +1095,7 @@ tcp_init(void) /* Initialize the TCP logging data. */ tcp_log_init(); #endif + read_random(&V_ts_offset_secret, sizeof(V_ts_offset_secret)); if (tcp_soreceive_stream) { #ifdef INET @@ -2603,7 +2607,41 @@ out: } #endif /* INET6 */ +static uint32_t +tcp_keyed_hash(struct in_conninfo *inc, u_char *key) +{ + MD5_CTX ctx; + uint32_t hash[4]; + MD5Init(&ctx); + MD5Update(&ctx, &inc->inc_fport, sizeof(uint16_t)); + MD5Update(&ctx, &inc->inc_lport, sizeof(uint16_t)); + switch (inc->inc_flags & INC_ISIPV6) { +#ifdef INET + case 0: + MD5Update(&ctx, &inc->inc_faddr, sizeof(struct in_addr)); + MD5Update(&ctx, &inc->inc_laddr, sizeof(struct in_addr)); + break; +#endif +#ifdef INET6 + case INC_ISIPV6: + MD5Update(&ctx, &inc->inc6_faddr, sizeof(struct in6_addr)); + MD5Update(&ctx, &inc->inc6_laddr, sizeof(struct in6_addr)); + break; +#endif + } + MD5Update(&ctx, key, 32); + MD5Final((unsigned char *)hash, &ctx); + + return (hash[0]); +} + +uint32_t +tcp_new_ts_offset(struct in_conninfo *inc) +{ + return (tcp_keyed_hash(inc, V_ts_offset_secret)); +} + /* * Following is where TCP initial sequence number generation occurs. * @@ -2644,7 +2682,7 @@ out: * as reseeding should not be necessary. * * Locking of the global variables isn_secret, isn_last_reseed, isn_offset, - * isn_offset_old, and isn_ctx is performed using the TCP pcbinfo lock. In + * isn_offset_old, and isn_ctx is performed using the ISN lock. In * general, this means holding an exclusive (write) lock. */ @@ -2665,15 +2703,11 @@ VNET_DEFINE_STATIC(u_int32_t, isn_offset_old); #define V_isn_offset_old VNET(isn_offset_old) tcp_seq -tcp_new_isn(struct tcpcb *tp) +tcp_new_isn(struct in_conninfo *inc) { - MD5_CTX isn_ctx; - u_int32_t md5_buffer[4]; tcp_seq new_isn; u_int32_t projected_offset; - INP_WLOCK_ASSERT(tp->t_inpcb); - ISN_LOCK(); /* Seed if this is the first use, reseed if requested. */ if ((V_isn_last_reseed == 0) || ((V_tcp_isn_reseed_interval > 0) && @@ -2684,26 +2718,7 @@ tcp_new_isn(struct tcpcb *tp) } /* Compute the md5 hash and return the ISN. */ - MD5Init(&isn_ctx); - MD5Update(&isn_ctx, (u_char *) &tp->t_inpcb->inp_fport, sizeof(u_short)); - MD5Update(&isn_ctx, (u_char *) &tp->t_inpcb->inp_lport, sizeof(u_short)); -#ifdef INET6 - if ((tp->t_inpcb->inp_vflag & INP_IPV6) != 0) { - MD5Update(&isn_ctx, (u_char *) &tp->t_inpcb->in6p_faddr, - sizeof(struct in6_addr)); - MD5Update(&isn_ctx, (u_char *) &tp->t_inpcb->in6p_laddr, - sizeof(struct in6_addr)); - } else -#endif - { - MD5Update(&isn_ctx, (u_char *) &tp->t_inpcb->inp_faddr, - sizeof(struct in_addr)); - MD5Update(&isn_ctx, (u_char *) &tp->t_inpcb->inp_laddr, - sizeof(struct in_addr)); - } - MD5Update(&isn_ctx, (u_char *) &V_isn_secret, sizeof(V_isn_secret)); - MD5Final((u_char *) &md5_buffer, &isn_ctx); - new_isn = (tcp_seq) md5_buffer[0]; + new_isn = (tcp_seq)tcp_keyed_hash(inc, V_isn_secret); V_isn_offset += ISN_STATIC_INCREMENT + (arc4random() & ISN_RANDOM_INCREMENT); if (ticks != V_isn_last) { Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Sun Aug 19 14:48:32 2018 (r338052) +++ head/sys/netinet/tcp_syncache.c Sun Aug 19 14:56:10 2018 (r338053) @@ -1497,6 +1497,7 @@ skip_alloc: if (to->to_flags & TOF_TS) { sc->sc_tsreflect = to->to_tsval; sc->sc_flags |= SCF_TIMESTAMP; + sc->sc_tsoff = tcp_new_ts_offset(inc); } if (to->to_flags & TOF_SCALE) { int wscale = 0; @@ -2035,11 +2036,6 @@ syncookie_generate(struct syncache_head *sch, struct s iss = hash & ~0xff; iss |= cookie.cookie ^ (hash >> 24); - /* Randomize the timestamp. */ - if (sc->sc_flags & SCF_TIMESTAMP) { - sc->sc_tsoff = arc4random() - tcp_ts_getticks(); - } - TCPSTAT_INC(tcps_sc_sendcookie); return (iss); } @@ -2126,7 +2122,7 @@ syncookie_lookup(struct in_conninfo *inc, struct synca if (to->to_flags & TOF_TS) { sc->sc_flags |= SCF_TIMESTAMP; sc->sc_tsreflect = to->to_tsval; - sc->sc_tsoff = to->to_tsecr - tcp_ts_getticks(); + sc->sc_tsoff = tcp_new_ts_offset(inc); } if (to->to_flags & TOF_SIGNATURE) Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Sun Aug 19 14:48:32 2018 (r338052) +++ head/sys/netinet/tcp_usrreq.c Sun Aug 19 14:56:10 2018 (r338053) @@ -1439,7 +1439,9 @@ tcp_connect(struct tcpcb *tp, struct sockaddr *nam, st soisconnecting(so); TCPSTAT_INC(tcps_connattempt); tcp_state_change(tp, TCPS_SYN_SENT); - tp->iss = tcp_new_isn(tp); + tp->iss = tcp_new_isn(&inp->inp_inc); + if (tp->t_flags & TF_REQ_TSTMP) + tp->ts_offset = tcp_new_ts_offset(&inp->inp_inc); tcp_sendseqinit(tp); return 0; @@ -1478,7 +1480,9 @@ tcp6_connect(struct tcpcb *tp, struct sockaddr *nam, s soisconnecting(inp->inp_socket); TCPSTAT_INC(tcps_connattempt); tcp_state_change(tp, TCPS_SYN_SENT); - tp->iss = tcp_new_isn(tp); + tp->iss = tcp_new_isn(&inp->inp_inc); + if (tp->t_flags & TF_REQ_TSTMP) + tp->ts_offset = tcp_new_ts_offset(&inp->inp_inc); tcp_sendseqinit(tp); return 0; Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Sun Aug 19 14:48:32 2018 (r338052) +++ head/sys/netinet/tcp_var.h Sun Aug 19 14:56:10 2018 (r338053) @@ -923,7 +923,9 @@ void tcp_hc_updatemtu(struct in_conninfo *, uint32_t) void tcp_hc_update(struct in_conninfo *, struct hc_metrics_lite *); extern struct pr_usrreqs tcp_usrreqs; -tcp_seq tcp_new_isn(struct tcpcb *); + +uint32_t tcp_new_ts_offset(struct in_conninfo *); +tcp_seq tcp_new_isn(struct in_conninfo *); int tcp_sack_doack(struct tcpcb *, struct tcpopt *, tcp_seq); void tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_laststart, tcp_seq rcv_lastend); From owner-svn-src-head@freebsd.org Sun Aug 19 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 58037106BE1C; Sun, 19 Aug 2018 15:07:40 +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 0E2837ABF7; Sun, 19 Aug 2018 15:07:40 +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 E353E27E32; Sun, 19 Aug 2018 15:07:39 +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 w7JF7dFd074771; Sun, 19 Aug 2018 15:07:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JF7dIm074770; Sun, 19 Aug 2018 15:07:39 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808191507.w7JF7dIm074770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 19 Aug 2018 15:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338054 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 338054 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, 19 Aug 2018 15:07:40 -0000 Author: kevans Date: Sun Aug 19 15:07:39 2018 New Revision: 338054 URL: https://svnweb.freebsd.org/changeset/base/338054 Log: Add config.lua(8) to the tree Reviewed by: 0mp, rpokala (earlier version) Differential Revision: https://reviews.freebsd.org/D14819 Added: head/stand/lua/config.lua.8 (contents, props changed) Added: head/stand/lua/config.lua.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/lua/config.lua.8 Sun Aug 19 15:07:39 2018 (r338054) @@ -0,0 +1,188 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2018 Kyle Evans +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 9, 2018 +.Dt CONFIG.LUA 8 +.Os +.Sh NAME +.Nm config.lua +.Nd FreeBSD config module +.Sh DESCRIPTION +.Nm +contains configuration and module loading functionality. +.Pp +Before hooking into or using the functionality provided by +.Nm , +it must be included with a statement such as the following: +.Pp +.Dl local config = require("config") +.Ss Exported functions +The following functions are exported from +.Nm : +.Bl -tag -width "config.setCarouselIndex(id, idx)" -offset indent +.It Fn config.getCarouselIndex id +Returns the currently chosen index in the carousel menu entry described by +.Ev id . +See the definition of +.Xr menu.lua 8 +for a more in-depth explanation of carousels. +.It Fn config.setCarouselIndex id idx +Set the chosen index for the carousel menu entry described by +.Ev id +to +.Ev idx . +A lookup will be done as needed to determine what value +.Ev idx +actually corresponds to. +.It Fn config.processFile name silent +Process and parse +.Ev name +as a configuration file. +Returns true if +.Ev name +exists and parses without error, false otherwise. +If +.Ev silent +is true, +.Fn config.processFile +will not consider a failure to read the file as a failure. +.It Fn config.parse text +Parse +.Ev text +as a configuration file. +This is used internally by +.Fn config.processFile +to parse the contents of a configuration file. +Returns true if parsing succeeds without error, false if an error occurred. +A message is also printed to the console if an error is encountered. +.It Fn config.loadKernel other_kernel +Attempts to load +.Ev other_kernel +as a kernel. +If +.Ev other_kernel +is unset +.Fn config.loadKernel +will attempt to load +.Dq kernel . +Otherwise, it will try to load +.Dq kernel +first from +.Pa /boot/{other_kernel} , +then from +.Pa {other_kernel} . +.Pp +The latter is tried in case an absolute path has been specified to the kernel +to use. +.Ev module_path +is amended to include the directory the kernel was found in if either of these +paths result in a loaded kernel. +.Pp +If no kernel was loaded from either of these paths, +.Fn config.loadKernel +will attempt to load a kernel named +.Dq {other_kernel} +from +.Ev module_path +instead of attempting to load a kernel named +.Dq kernel . +.Pp +Returns true if a kernel was loaded, false if no kernel was loaded. +.It Fn config.selectKernel kernel +Set +.Ev kernel +to the kernel that will be loaded when either +.Ic autoboot +or +.Ic boot +are invoked. +This is usually called by the menu system as the kernel selector carousel is +toggled through. +.It Fn config.load file reload +Loads +.Ev file +as a configuration file. +If +.Ev file +is not specified, +.Pa /boot/defaults/loader.conf +is used. +.Fn config.load +will then silently attempt to process any files specified in +.Ev loader_conf_files +after +.Ev file +has been processed. +.Xr nextboot 8 +configuration will also be checked as part of +.Fn config.load . +Before returning, all +.Dq config.loaded +hooks will be run if +.Ev reload +is not set to true. +.It Fn config.reload file +Reloads +.Ev file +as a configuration file. +.Fn config.reload +will restore the environment to how it existed before the last config was +loaded, then it will invoke +.Fn config.load file . +Before returning, all +.Dq config.reloaded +hooks will be run. +.It Fn config.loadelf +Loads all ELF objects, the selected kernel as well as any modules configured to +be preloaded in +.Xr loader.conf 5 . +This will be called by the Lua intercepted +.Ic autoboot +and +.Ic boot +commands. +.El +.Ss Defined Hooks +The following hooks are defined in +.Nm : +.Bl -tag -width "config.reloaded" -offset indent +.It config.loaded +.It config.reloaded +.El +.Sh SEE ALSO +.Xr loader.conf 5 , +.Xr loader 8 , +.Xr menu.lua 8 , +.Xr nextboot 8 +.Sh AUTHORS +The +.Nm +file was originally written by +.An Pedro Souza Aq Mt pedrosouza@FreeBSD.org . +Later work and this manual page was done by +.An Kyle Evans Aq Mt kevans@FreeBSD.org . From owner-svn-src-head@freebsd.org Sun Aug 19 15:31:45 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 A1B8E106CAD2; Sun, 19 Aug 2018 15:31:45 +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 064CB7B96F; Sun, 19 Aug 2018 15:31:44 +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 w7JFVZ5I070234; Sun, 19 Aug 2018 08:31:35 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w7JFVYoT070233; Sun, 19 Aug 2018 08:31:34 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808191531.w7JFVYoT070233@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r338050 - in head: . stand In-Reply-To: <201808191426.w7JEQXXr054123@repo.freebsd.org> To: Kyle Evans Date: Sun, 19 Aug 2018 08:31:34 -0700 (PDT) CC: 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, 19 Aug 2018 15:31:45 -0000 > Author: kevans > Date: Sun Aug 19 14:26:33 2018 > New Revision: 338050 > URL: https://svnweb.freebsd.org/changeset/base/338050 > > Log: > stand: Flip the default interpreter to Lua > > After years in the making, lualoader is ready to make its debut. Both > flavors of loader are still built by default, and may be installed as > /boot/loader or /boot/loader.efi as appropriate either by manually creating > hard links or using LOADER_DEFAULT_INTERP as documented in build(7). > > Discussed with: imp > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D16795 Kyle, Warner, Did we have a 12.0 release action item for this, I thought there was one but I cant seem to locate it. If not no worries, just wanted to mark off the PR: as done. Thanks, Rod > Modified: > head/UPDATING > head/stand/defs.mk > > Modified: head/UPDATING > ============================================================================== > --- head/UPDATING Sun Aug 19 14:25:28 2018 (r338049) > +++ head/UPDATING Sun Aug 19 14:26:33 2018 (r338050) > @@ -31,6 +31,15 @@ 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".) > > +20180818: > + The default interpreter has been switched from 4th to Lua. > + LOADER_DEFAULT_INTERP, documented in build(7), will override the default > + interpreter. If you have custom FORTH code you will need to set > + LOADER_DEFAULT_INTERP=4th (valid values are 4th, lua or simp) in > + src.conf for the build. This will create default hard links between > + loader and loader_4th instead of loader and loader_lua, the new default. > + If you are using UEFI it will create the proper hard link to loader.efi. > + > 20180815: > ls(1) now respects the COLORTERM environment variable used in other > systems and software to indicate that a colored terminal is both > > Modified: head/stand/defs.mk > ============================================================================== > --- head/stand/defs.mk Sun Aug 19 14:25:28 2018 (r338049) > +++ head/stand/defs.mk Sun Aug 19 14:26:33 2018 (r338050) > @@ -154,10 +154,10 @@ CFLAGS+= -mlittle-endian > # > # Have a sensible default > # > -.if ${MK_FORTH} == "yes" > -LOADER_DEFAULT_INTERP?=4th > -.elif ${MK_LOADER_LUA} == "yes" > +.if ${MK_LOADER_LUA} == "yes" > LOADER_DEFAULT_INTERP?=lua > +.elif ${MK_FORTH} == "yes" > +LOADER_DEFAULT_INTERP?=4th > .else > LOADER_DEFAULT_INTERP?=simp > .endif > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sun Aug 19 15:34: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 7221B106CC33; Sun, 19 Aug 2018 15:34:00 +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 F19AC7BC04; Sun, 19 Aug 2018 15:33:59 +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 w7JFXwmE070264; Sun, 19 Aug 2018 08:33:58 -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 w7JFXwSP070263; Sun, 19 Aug 2018 08:33:58 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201808191533.w7JFXwSP070263@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r338054 - head/stand/lua In-Reply-To: <201808191507.w7JF7dIm074770@repo.freebsd.org> To: Kyle Evans Date: Sun, 19 Aug 2018 08:33:58 -0700 (PDT) CC: 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, 19 Aug 2018 15:34:00 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: kevans > Date: Sun Aug 19 15:07:39 2018 > New Revision: 338054 > URL: https://svnweb.freebsd.org/changeset/base/338054 > > Log: > Add config.lua(8) to the tree > > Reviewed by: 0mp, rpokala (earlier version) > Differential Revision: https://reviews.freebsd.org/D14819 > > Added: > head/stand/lua/config.lua.8 (contents, props changed) > > Added: head/stand/lua/config.lua.8 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/stand/lua/config.lua.8 Sun Aug 19 15:07:39 2018 (r338054) > @@ -0,0 +1,188 @@ > +.\" > +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD > +.\" > +.\" Copyright (c) 2018 Kyle Evans ^^^ As an FYI you do not need to put that attempt at a Copyright Mark when you spell out the word Copyright. Thanks, Rod ... -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sun Aug 19 16:00: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 1C69C106DD7A; Sun, 19 Aug 2018 16:00:12 +0000 (UTC) (envelope-from kevans@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 BF7D57CBE9; Sun, 19 Aug 2018 16:00:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 5AE041A042; Sun, 19 Aug 2018 16:00:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f176.google.com with SMTP id u7-v6so9765191lji.3; Sun, 19 Aug 2018 09:00:11 -0700 (PDT) X-Gm-Message-State: AOUpUlHmAUqMOdGtimb0cqcSg4WtPzVCoTGkm5UIUdijwkL6DbMFmPiF 0Ft6sL5+mWHXOYrZBAihuP4sFOVgCpywfwdPVf4= X-Google-Smtp-Source: AA+uWPwU32P9o65NPWTkrZyKuymkvv4/+BGucwHt3V1s+gv8VuxYnU7F/obWE7y/Z6cux4fVHQx8RZ/iRXa+YBkR0o8= X-Received: by 2002:a2e:2e02:: with SMTP id u2-v6mr30452626lju.77.1534694409735; Sun, 19 Aug 2018 09:00:09 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Sun, 19 Aug 2018 08:59:49 -0700 (PDT) In-Reply-To: <201808191533.w7JFXwSP070263@pdx.rh.CN85.dnsmgr.net> References: <201808191507.w7JF7dIm074770@repo.freebsd.org> <201808191533.w7JFXwSP070263@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Sun, 19 Aug 2018 10:59:49 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r338054 - head/stand/lua To: "Rodney W. Grimes" 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: Sun, 19 Aug 2018 16:00:12 -0000 On Sun, Aug 19, 2018 at 10:33 AM, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> Author: kevans >> Date: Sun Aug 19 15:07:39 2018 >> New Revision: 338054 >> URL: https://svnweb.freebsd.org/changeset/base/338054 >> >> Log: >> Add config.lua(8) to the tree >> >> Reviewed by: 0mp, rpokala (earlier version) >> Differential Revision: https://reviews.freebsd.org/D14819 >> >> Added: >> head/stand/lua/config.lua.8 (contents, props changed) >> >> Added: head/stand/lua/config.lua.8 >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/stand/lua/config.lua.8 Sun Aug 19 15:07:39 2018 (r338054) >> @@ -0,0 +1,188 @@ >> +.\" >> +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD >> +.\" >> +.\" Copyright (c) 2018 Kyle Evans > ^^^ > As an FYI you do not need to put that attempt at a Copyright Mark > when you spell out the word Copyright. > Alright... I might make a pass later when I'm done adding these to remove the redundant (c), but for now I aim to be consistent with the header used. Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Sun Aug 19 16: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 0B1FB106DFC8; Sun, 19 Aug 2018 16:01:41 +0000 (UTC) (envelope-from kevans@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 B30B17CF4B; Sun, 19 Aug 2018 16:01:40 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 61F191A12F; Sun, 19 Aug 2018 16:01:40 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f54.google.com with SMTP id b22-v6so9134841lfa.3; Sun, 19 Aug 2018 09:01:40 -0700 (PDT) X-Gm-Message-State: AOUpUlHif0X33PpjxBW8rBCziMFspD2PEG/5xpSKxt04UmmBBheKLyKt QijyRHg99T/W5G7UWVgjvZhB+bJcPqOXTa4Ho88= X-Google-Smtp-Source: AA+uWPyeAHRGMVtym+tO/vC1vxCWpnq+c+RmIlgwFGS0vLmRuWirJmu8o7rtlqYuh9KPrfEujISUxYqVw126f4fMODo= X-Received: by 2002:a19:ea52:: with SMTP id i79-v6mr2401206lfh.75.1534694499072; Sun, 19 Aug 2018 09:01:39 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Sun, 19 Aug 2018 09:01:18 -0700 (PDT) In-Reply-To: <201808191531.w7JFVYoT070233@pdx.rh.CN85.dnsmgr.net> References: <201808191426.w7JEQXXr054123@repo.freebsd.org> <201808191531.w7JFVYoT070233@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Sun, 19 Aug 2018 11:01:18 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r338050 - in head: . stand To: "Rodney W. Grimes" Cc: Kyle Evans , 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: Sun, 19 Aug 2018 16:01:41 -0000 On Sun, Aug 19, 2018 at 10:31 AM, Rodney W. Grimes wrote: >> Author: kevans >> Date: Sun Aug 19 14:26:33 2018 >> New Revision: 338050 >> URL: https://svnweb.freebsd.org/changeset/base/338050 >> >> Log: >> stand: Flip the default interpreter to Lua >> >> After years in the making, lualoader is ready to make its debut. Both >> flavors of loader are still built by default, and may be installed as >> /boot/loader or /boot/loader.efi as appropriate either by manually creating >> hard links or using LOADER_DEFAULT_INTERP as documented in build(7). >> >> Discussed with: imp >> Relnotes: yes >> Differential Revision: https://reviews.freebsd.org/D16795 > > Kyle, Warner, > Did we have a 12.0 release action item for this, > I thought there was one but I cant seem to locate it. > If not no worries, just wanted to mark off the PR: as done. > > Thanks, > Rod > I had forgotten about this, but we seem to have https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228924 Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Sun Aug 19 16:15: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 9208A106E72F; Sun, 19 Aug 2018 16:15:00 +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 46FE47D8DD; Sun, 19 Aug 2018 16:15:00 +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 27896A17; Sun, 19 Aug 2018 16:15:00 +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 w7JGF0X0010213; Sun, 19 Aug 2018 16:15:00 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JGExkX010206; Sun, 19 Aug 2018 16:14:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201808191614.w7JGExkX010206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sun, 19 Aug 2018 16:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338055 - in head/sys: i386/include x86/include X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: i386/include x86/include X-SVN-Commit-Revision: 338055 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, 19 Aug 2018 16:15:00 -0000 Author: jhb Date: Sun Aug 19 16:14:59 2018 New Revision: 338055 URL: https://svnweb.freebsd.org/changeset/base/338055 Log: Remove some vestiges of IPI_LAZYPMAP on i386. The support for lazy pmap invalidations on i386 was removed in r281707. This removes the constant for the IPI and stops accounting for it when sizing the interrupt count arrays. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16801 Modified: head/sys/i386/include/intr_machdep.h head/sys/x86/include/apicvar.h Modified: head/sys/i386/include/intr_machdep.h ============================================================================== --- head/sys/i386/include/intr_machdep.h Sun Aug 19 15:07:39 2018 (r338054) +++ head/sys/i386/include/intr_machdep.h Sun Aug 19 16:14:59 2018 (r338055) @@ -75,10 +75,10 @@ * - 1 ??? dummy counter. * - 2 counters for each I/O interrupt. * - 1 counter for each CPU for lapic timer. - * - 9 counters for each CPU for IPI counters for SMP. + * - 8 counters for each CPU for IPI counters for SMP. */ #ifdef SMP -#define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + (1 + 9) * MAXCPU) +#define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + (1 + 8) * MAXCPU) #else #define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + 1) #endif Modified: head/sys/x86/include/apicvar.h ============================================================================== --- head/sys/x86/include/apicvar.h Sun Aug 19 15:07:39 2018 (r338054) +++ head/sys/x86/include/apicvar.h Sun Aug 19 16:14:59 2018 (r338055) @@ -129,12 +129,7 @@ #define IPI_STOP (APIC_IPI_INTS + 6) /* Stop CPU until restarted. */ #define IPI_SUSPEND (APIC_IPI_INTS + 7) /* Suspend CPU until restarted. */ -#ifdef __i386__ -#define IPI_LAZYPMAP (APIC_IPI_INTS + 8) /* Lazy pmap release. */ -#define IPI_DYN_FIRST (APIC_IPI_INTS + 9) -#else #define IPI_DYN_FIRST (APIC_IPI_INTS + 8) -#endif #define IPI_DYN_LAST (253) /* IPIs allocated at runtime */ /* From owner-svn-src-head@freebsd.org Sun Aug 19 16:35: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 E7D07106F239; Sun, 19 Aug 2018 16:35:58 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f44.google.com (mail-it0-f44.google.com [209.85.214.44]) (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 846647E722; Sun, 19 Aug 2018 16:35:58 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f44.google.com with SMTP id h20-v6so17590688itf.2; Sun, 19 Aug 2018 09:35:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=GDqXvpkDlROCF/MH0K8NVH7U02FZKuvmsWhNsXxPXaM=; b=kvlJJKXMR2IGkGStzLM7TQ2MzgUXsePftBRPQO2CsxKU0aXKnZNvq9Uy5D0xSPnYdN 0tnZxuoeE1VBWyB4tZDCAluBvlgBD9uoyjH6Zx02oEMvukJJANtuFMfSiGdF/F12spEc n+mGqvEHUWxvTh3NUwTcvJ7RERyn7KvzOwc2UdshYGMDOUKS7Pi7AscUkg5A0khI9pDM u9BypbqCWUGy4ueF/rsZ2kxP0mUdQJx4yoEPStCBXkiXgMFDFrfl7jrURygp1YkS85vv hwNegSD44YLqJBeUDWdb29cCaqBjcd1rqkf/moZVqlse0HmeTg4YPGF3SLVWEl3iNUo8 xrDA== X-Gm-Message-State: AOUpUlELOxQSAqgQYf67gIhjRtxHL3bsg/EF+keJH9mpYT0kZKUQDlFL NF73VnJxc7mauSFCKsKQCXIr0Hrt X-Google-Smtp-Source: AA+uWPxkjMFG8LXN+Q62DJSzLRjxOQThH+nF/1wYkJniZ20SnPsO0faUjxW1MBntkRCBJPxg0J26zQ== X-Received: by 2002:a02:7808:: with SMTP id p8-v6mr1736818jac.103.1534696557438; Sun, 19 Aug 2018 09:35:57 -0700 (PDT) Received: from mail-io0-f175.google.com (mail-io0-f175.google.com. [209.85.223.175]) by smtp.gmail.com with ESMTPSA id e135-v6sm4259047ita.28.2018.08.19.09.35.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Aug 2018 09:35:57 -0700 (PDT) Received: by mail-io0-f175.google.com with SMTP id y10-v6so10698485ioa.10; Sun, 19 Aug 2018 09:35:57 -0700 (PDT) X-Received: by 2002:a6b:be46:: with SMTP id o67-v6mr34975471iof.143.1534696557013; Sun, 19 Aug 2018 09:35:57 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:b472:0:0:0:0:0 with HTTP; Sun, 19 Aug 2018 09:35:56 -0700 (PDT) In-Reply-To: <201808191456.w7JEuAZE069780@repo.freebsd.org> References: <201808191456.w7JEuAZE069780@repo.freebsd.org> From: Conrad Meyer Date: Sun, 19 Aug 2018 09:35:56 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r338053 - head/sys/netinet To: Michael Tuexen 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-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, 19 Aug 2018 16:35:59 -0000 On Sun, Aug 19, 2018 at 7:56 AM, Michael Tuexen wrote: > Author: tuexen > Date: Sun Aug 19 14:56:10 2018 > New Revision: 338053 > URL: https://svnweb.freebsd.org/changeset/base/338053 > > Log: > =E2=80=A6 a keyed hash function taking > the source and destination addresses and port numbers into account. > The keyed hash function is the same a used for the initial TSN. > ... > Modified: head/sys/netinet/tcp_subr.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/netinet/tcp_subr.c Sun Aug 19 14:48:32 2018 (r338052) > +++ head/sys/netinet/tcp_subr.c Sun Aug 19 14:56:10 2018 (r338053) > @@ -233,6 +233,9 @@ VNET_DEFINE(uma_zone_t, sack_hole_zone); > ... > > +static uint32_t > +tcp_keyed_hash(struct in_conninfo *inc, u_char *key) > +{ > + MD5_CTX ctx; > + uint32_t hash[4]; > > + MD5Init(&ctx); > + MD5Update(&ctx, &inc->inc_fport, sizeof(uint16_t)); > + MD5Update(&ctx, &inc->inc_lport, sizeof(uint16_t)); > + switch (inc->inc_flags & INC_ISIPV6) { > +#ifdef INET > + case 0: > + MD5Update(&ctx, &inc->inc_faddr, sizeof(struct in_addr)); > + MD5Update(&ctx, &inc->inc_laddr, sizeof(struct in_addr)); > + break; > +#endif > +#ifdef INET6 > + case INC_ISIPV6: > + MD5Update(&ctx, &inc->inc6_faddr, sizeof(struct in6_addr)= ); > + MD5Update(&ctx, &inc->inc6_laddr, sizeof(struct in6_addr)= ); > + break; > +#endif > + } > + MD5Update(&ctx, key, 32); > + MD5Final((unsigned char *)hash, &ctx); > + > + return (hash[0]); Hi Michael, How was this particular keyed hash function construction chosen? (Yes, I see it is the same initial TSN, but how was that selected?) Thanks, Conrad From owner-svn-src-head@freebsd.org Sun Aug 19 16:56:44 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 E1856106FDC0; Sun, 19 Aug 2018 16:56:43 +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 8C5E57FA99; Sun, 19 Aug 2018 16:56:43 +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 6A5D910A6; Sun, 19 Aug 2018 16:56:43 +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 w7JGuhFX031147; Sun, 19 Aug 2018 16:56:43 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JGuhCQ031146; Sun, 19 Aug 2018 16:56:43 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201808191656.w7JGuhCQ031146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sun, 19 Aug 2018 16:56:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338056 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 338056 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, 19 Aug 2018 16:56:44 -0000 Author: mckusick Date: Sun Aug 19 16:56:42 2018 New Revision: 338056 URL: https://svnweb.freebsd.org/changeset/base/338056 Log: Add consolodation of TRIM / BIO_DELETE commands to the UFS/FFS filesystem. When deleting files on filesystems that are stored on flash-memory (solid-state) disk drives, the filesystem notifies the underlying disk of the blocks that it is no longer using. The notification allows the drive to avoid saving these blocks when it needs to flash (zero out) one of its flash pages. These notifications of no-longer-being-used blocks are referred to as TRIM notifications. In FreeBSD these TRIM notifications are sent from the filesystem to the drive using the BIO_DELETE command. Until now, the filesystem would send a separate message to the drive for each block of the file that was deleted. Each Gigabyte of file size resulted in over 3000 TRIM messages being sent to the drive. This burst of messages can overwhelm the drive's task queue causing multiple second delays for read and write requests. This implementation collects runs of contiguous blocks in the file and then consolodates them into a single BIO_DELETE command to the drive. The BIO_DELETE command describes the run of blocks as a single large block being deleted. Each Gigabyte of file size can result in as few as two BIO_DELETE commands and is typically less than ten. Though these larger BIO_DELETE commands take longer to run, they do not clog the drive task queue, so read and write commands can intersperse effectively with them. Though this new feature has been throughly reviewed and tested, it is being added disabled by default so as to minimize the possibility of disrupting the upcoming 12.0 release. It can be enabled by running ``sysctl vfs.ffs.dotrimcons=1''. Users are encouraged to test it. If no problems arise, we will consider requesting that it be enabled by default for 12.0. Reviewed by: kib Tested by: Peter Holm Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Sun Aug 19 16:14:59 2018 (r338055) +++ head/sys/ufs/ffs/ffs_alloc.c Sun Aug 19 16:56:42 2018 (r338056) @@ -484,6 +484,10 @@ static int doreallocblks = 1; SYSCTL_INT(_vfs_ffs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, "enable block reallocation"); +static int dotrimcons = 1; +SYSCTL_INT(_vfs_ffs, OID_AUTO, dotrimcons, CTLFLAG_RW, &dotrimcons, 0, +"enable BIO_DELETE / TRIM consolodation"); + static int maxclustersearch = 10; SYSCTL_INT(_vfs_ffs, OID_AUTO, maxclustersearch, CTLFLAG_RW, &maxclustersearch, 0, "max number of cylinder group to search for contigous blocks"); @@ -2301,51 +2305,193 @@ ffs_blkfree_cg(ump, fs, devvp, bno, size, inum, dephd) /* * Structures and routines associated with trim management. + * + * The following requests are passed to trim_lookup to indicate + * the actions that should be taken. */ +#define NEW 1 /* if found, error else allocate and hash it */ +#define OLD 2 /* if not found, error, else return it */ +#define REPLACE 3 /* if not found, error else unhash and reallocate it */ +#define DONE 4 /* if not found, error else unhash and return it */ +#define SINGLE 5 /* don't look up, just allocate it and don't hash it */ + MALLOC_DEFINE(M_TRIM, "ufs_trim", "UFS trim structures"); #define TRIMLIST_HASH(ump, key) \ (&(ump)->um_trimhash[(key) & (ump)->um_trimlisthashsize]) -static void ffs_blkfree_trim_completed(struct buf *); -static void ffs_blkfree_trim_task(void *ctx, int pending __unused); +/* + * These structures describe each of the block free requests aggregated + * together to make up a trim request. + */ +struct trim_blkreq { + TAILQ_ENTRY(trim_blkreq) blkreqlist; + ufs2_daddr_t bno; + long size; + struct workhead *pdephd; + struct workhead dephd; +}; +/* + * Description of a trim request. + */ struct ffs_blkfree_trim_params { + TAILQ_HEAD(, trim_blkreq) blklist; + LIST_ENTRY(ffs_blkfree_trim_params) hashlist; struct task task; struct ufsmount *ump; struct vnode *devvp; + ino_t inum; ufs2_daddr_t bno; long size; - ino_t inum; - struct workhead *pdephd; - struct workhead dephd; + long key; }; +static void ffs_blkfree_trim_completed(struct buf *); +static void ffs_blkfree_trim_task(void *ctx, int pending __unused); +static struct ffs_blkfree_trim_params *trim_lookup(struct ufsmount *, + struct vnode *, ufs2_daddr_t, long, ino_t, u_long, int); +static void ffs_blkfree_sendtrim(struct ffs_blkfree_trim_params *); + +/* + * Called on trim completion to start a task to free the associated block(s). + */ static void +ffs_blkfree_trim_completed(bp) + struct buf *bp; +{ + struct ffs_blkfree_trim_params *tp; + + tp = bp->b_fsprivate1; + free(bp, M_TRIM); + TASK_INIT(&tp->task, 0, ffs_blkfree_trim_task, tp); + taskqueue_enqueue(tp->ump->um_trim_tq, &tp->task); +} + +/* + * Trim completion task that free associated block(s). + */ +static void ffs_blkfree_trim_task(ctx, pending) void *ctx; int pending; { struct ffs_blkfree_trim_params *tp; + struct trim_blkreq *blkelm; + struct ufsmount *ump; tp = ctx; - ffs_blkfree_cg(tp->ump, tp->ump->um_fs, tp->devvp, tp->bno, tp->size, - tp->inum, tp->pdephd); - vn_finished_secondary_write(UFSTOVFS(tp->ump)); - atomic_add_int(&tp->ump->um_trim_inflight, -1); + ump = tp->ump; + while ((blkelm = TAILQ_FIRST(&tp->blklist)) != NULL) { + ffs_blkfree_cg(ump, ump->um_fs, tp->devvp, blkelm->bno, + blkelm->size, tp->inum, blkelm->pdephd); + TAILQ_REMOVE(&tp->blklist, blkelm, blkreqlist); + free(blkelm, M_TRIM); + } + vn_finished_secondary_write(UFSTOVFS(ump)); + UFS_LOCK(ump); + ump->um_trim_inflight -= 1; + ump->um_trim_inflight_blks -= numfrags(ump->um_fs, tp->size); + UFS_UNLOCK(ump); free(tp, M_TRIM); } -static void -ffs_blkfree_trim_completed(bp) - struct buf *bp; +/* + * Lookup a trim request by inode number. + * Allocate if requested (NEW, REPLACE, SINGLE). + */ +static struct ffs_blkfree_trim_params * +trim_lookup(ump, devvp, bno, size, inum, key, alloctype) + struct ufsmount *ump; + struct vnode *devvp; + ufs2_daddr_t bno; + long size; + ino_t inum; + u_long key; + int alloctype; { + struct trimlist_hashhead *tphashhead; + struct ffs_blkfree_trim_params *tp, *ntp; + + ntp = malloc(sizeof(struct ffs_blkfree_trim_params), M_TRIM, M_WAITOK); + if (alloctype != SINGLE) { + KASSERT(key >= FIRST_VALID_KEY, ("trim_lookup: invalid key")); + UFS_LOCK(ump); + tphashhead = TRIMLIST_HASH(ump, key); + LIST_FOREACH(tp, tphashhead, hashlist) + if (key == tp->key) + break; + } + switch (alloctype) { + case NEW: + KASSERT(tp == NULL, ("trim_lookup: found trim")); + break; + case OLD: + KASSERT(tp != NULL, + ("trim_lookup: missing call to ffs_blkrelease_start()")); + UFS_UNLOCK(ump); + free(ntp, M_TRIM); + return (tp); + case REPLACE: + KASSERT(tp != NULL, ("trim_lookup: missing REPLACE trim")); + LIST_REMOVE(tp, hashlist); + /* tp will be freed by caller */ + break; + case DONE: + KASSERT(tp != NULL, ("trim_lookup: missing DONE trim")); + LIST_REMOVE(tp, hashlist); + UFS_UNLOCK(ump); + free(ntp, M_TRIM); + return (tp); + } + TAILQ_INIT(&ntp->blklist); + ntp->ump = ump; + ntp->devvp = devvp; + ntp->bno = bno; + ntp->size = size; + ntp->inum = inum; + ntp->key = key; + if (alloctype != SINGLE) { + LIST_INSERT_HEAD(tphashhead, ntp, hashlist); + UFS_UNLOCK(ump); + } + return (ntp); +} + +/* + * Dispatch a trim request. + */ +static void +ffs_blkfree_sendtrim(tp) struct ffs_blkfree_trim_params *tp; +{ + struct ufsmount *ump; + struct mount *mp; + struct buf *bp; - tp = bp->b_fsprivate1; - free(bp, M_TRIM); - TASK_INIT(&tp->task, 0, ffs_blkfree_trim_task, tp); - taskqueue_enqueue(tp->ump->um_trim_tq, &tp->task); + /* + * Postpone the set of the free bit in the cg bitmap until the + * BIO_DELETE is completed. Otherwise, due to disk queue + * reordering, TRIM might be issued after we reuse the block + * and write some new data into it. + */ + ump = tp->ump; + bp = malloc(sizeof(*bp), M_TRIM, M_WAITOK | M_ZERO); + bp->b_iocmd = BIO_DELETE; + bp->b_iooffset = dbtob(fsbtodb(ump->um_fs, tp->bno)); + bp->b_iodone = ffs_blkfree_trim_completed; + bp->b_bcount = tp->size; + bp->b_fsprivate1 = tp; + UFS_LOCK(ump); + ump->um_trim_total += 1; + ump->um_trim_inflight += 1; + ump->um_trim_inflight_blks += numfrags(ump->um_fs, tp->size); + ump->um_trim_total_blks += numfrags(ump->um_fs, tp->size); + UFS_UNLOCK(ump); + + mp = UFSTOVFS(ump); + vn_start_secondary_write(NULL, &mp, 0); + g_vfs_strategy(ump->um_bo, bp); } /* @@ -2360,11 +2506,12 @@ ffs_blkrelease_start(ump, devvp, inum) static u_long masterkey; u_long key; - if ((ump->um_flags & UM_CANDELETE) == 0) + if (((ump->um_flags & UM_CANDELETE) == 0) || dotrimcons == 0) return (SINGLETON_KEY); do { key = atomic_fetchadd_long(&masterkey, 1); } while (key < FIRST_VALID_KEY); + (void) trim_lookup(ump, devvp, 0, 0, inum, key, NEW); return (key); } @@ -2376,10 +2523,32 @@ ffs_blkrelease_finish(ump, key) struct ufsmount *ump; u_long key; { + struct ffs_blkfree_trim_params *tp; - return; + if (((ump->um_flags & UM_CANDELETE) == 0) || dotrimcons == 0) + return; + /* + * We are done with sending blocks using this key. Look up the key + * using the DONE alloctype (in tp) to request that it be unhashed + * as we will not be adding to it. If the key has never been used, + * tp->size will be zero, so we can just free tp. Otherwise the call + * to ffs_blkfree_sendtrim(tp) causes the block range described by + * tp to be issued (and then tp to be freed). + */ + tp = trim_lookup(ump, NULL, 0, 0, 0, key, DONE); + if (tp->size == 0) + free(tp, M_TRIM); + else + ffs_blkfree_sendtrim(tp); } +/* + * Setup to free a block or fragment. + * + * Check for snapshots that might want to claim the block. + * If trims are requested, prepare a trim request. Attempt to + * aggregate consecutive blocks into a single trim request. + */ void ffs_blkfree(ump, fs, devvp, bno, size, inum, vtype, dephd, key) struct ufsmount *ump; @@ -2392,9 +2561,8 @@ ffs_blkfree(ump, fs, devvp, bno, size, inum, vtype, de struct workhead *dephd; u_long key; { - struct mount *mp; - struct buf *bp; - struct ffs_blkfree_trim_params *tp; + struct ffs_blkfree_trim_params *tp, *ntp; + struct trim_blkreq *blkelm; /* * Check to see if a snapshot wants to claim the block. @@ -2416,37 +2584,72 @@ ffs_blkfree(ump, fs, devvp, bno, size, inum, vtype, de ffs_blkfree_cg(ump, fs, devvp, bno, size, inum, dephd); return; } - + blkelm = malloc(sizeof(struct trim_blkreq), M_TRIM, M_WAITOK); + blkelm->bno = bno; + blkelm->size = size; + if (dephd == NULL) { + blkelm->pdephd = NULL; + } else { + LIST_INIT(&blkelm->dephd); + LIST_SWAP(dephd, &blkelm->dephd, worklist, wk_list); + blkelm->pdephd = &blkelm->dephd; + } + if (key == SINGLETON_KEY) { + /* + * Just a single non-contiguous piece. Use the SINGLE + * alloctype to return a trim request that will not be + * hashed for future lookup. + */ + tp = trim_lookup(ump, devvp, bno, size, inum, key, SINGLE); + TAILQ_INSERT_HEAD(&tp->blklist, blkelm, blkreqlist); + ffs_blkfree_sendtrim(tp); + return; + } /* - * Postpone the set of the free bit in the cg bitmap until the - * BIO_DELETE is completed. Otherwise, due to disk queue - * reordering, TRIM might be issued after we reuse the block - * and write some new data into it. + * The callers of this function are not tracking whether or not + * the blocks are contiguous. They are just saying that they + * are freeing a set of blocks. It is this code that determines + * the pieces of that range that are actually contiguous. + * + * Calling ffs_blkrelease_start() will have created an entry + * that we will use. */ - atomic_add_int(&ump->um_trim_inflight, 1); - tp = malloc(sizeof(struct ffs_blkfree_trim_params), M_TRIM, M_WAITOK); - tp->ump = ump; - tp->devvp = devvp; - tp->bno = bno; - tp->size = size; - tp->inum = inum; - if (dephd != NULL) { - LIST_INIT(&tp->dephd); - LIST_SWAP(dephd, &tp->dephd, worklist, wk_list); - tp->pdephd = &tp->dephd; - } else - tp->pdephd = NULL; - - bp = malloc(sizeof(*bp), M_TRIM, M_WAITOK | M_ZERO); - bp->b_iocmd = BIO_DELETE; - bp->b_iooffset = dbtob(fsbtodb(fs, bno)); - bp->b_iodone = ffs_blkfree_trim_completed; - bp->b_bcount = size; - bp->b_fsprivate1 = tp; - - mp = UFSTOVFS(ump); - vn_start_secondary_write(NULL, &mp, 0); - g_vfs_strategy(ump->um_bo, bp); + tp = trim_lookup(ump, devvp, bno, size, inum, key, OLD); + if (tp->size == 0) { + /* + * First block of a potential range, set block and size + * for the trim block. + */ + tp->bno = bno; + tp->size = size; + TAILQ_INSERT_HEAD(&tp->blklist, blkelm, blkreqlist); + return; + } + /* + * If this block is a continuation of the range (either + * follows at the end or preceeds in the front) then we + * add it to the front or back of the list and return. + * + * If it is not a continuation of the trim that we were + * building, using the REPLACE alloctype, we request that + * the old trim request (still in tp) be unhashed and a + * new range started (in ntp). The ffs_blkfree_sendtrim(tp) + * call causes the block range described by tp to be issued + * (and then tp to be freed). + */ + if (bno + numfrags(fs, size) == tp->bno) { + TAILQ_INSERT_HEAD(&tp->blklist, blkelm, blkreqlist); + tp->bno = bno; + tp->size += size; + return; + } else if (bno == tp->bno + numfrags(fs, tp->size)) { + TAILQ_INSERT_TAIL(&tp->blklist, blkelm, blkreqlist); + tp->size += size; + return; + } + ntp = trim_lookup(ump, devvp, bno, size, inum, key, REPLACE); + TAILQ_INSERT_HEAD(&ntp->blklist, blkelm, blkreqlist); + ffs_blkfree_sendtrim(tp); } #ifdef INVARIANTS From owner-svn-src-head@freebsd.org Sun Aug 19 17:08:30 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 8FD061070B57; Sun, 19 Aug 2018 17:08:30 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 67CAD807BC; Sun, 19 Aug 2018 17:08:29 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [192.168.1.6] (p57BB437A.dip0.t-ipconnect.de [87.187.67.122]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 180D0721E281A; Sun, 19 Aug 2018 19:08:25 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r338053 - head/sys/netinet From: Michael Tuexen In-Reply-To: Date: Sun, 19 Aug 2018 19:08:23 +0200 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <97661C9D-9C25-4DE0-89A8-FE1C40DAFB81@freebsd.org> References: <201808191456.w7JEuAZE069780@repo.freebsd.org> To: cem@freebsd.org X-Mailer: Apple Mail (2.3445.9.1) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.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: Sun, 19 Aug 2018 17:08:31 -0000 > On 19. Aug 2018, at 18:35, Conrad Meyer wrote: >=20 > On Sun, Aug 19, 2018 at 7:56 AM, Michael Tuexen = wrote: >> Author: tuexen >> Date: Sun Aug 19 14:56:10 2018 >> New Revision: 338053 >> URL: https://svnweb.freebsd.org/changeset/base/338053 >>=20 >> Log: >> =E2=80=A6 a keyed hash function taking >> the source and destination addresses and port numbers into account. >> The keyed hash function is the same a used for the initial TSN. >> ... >> Modified: head/sys/netinet/tcp_subr.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/netinet/tcp_subr.c Sun Aug 19 14:48:32 2018 = (r338052) >> +++ head/sys/netinet/tcp_subr.c Sun Aug 19 14:56:10 2018 = (r338053) >> @@ -233,6 +233,9 @@ VNET_DEFINE(uma_zone_t, sack_hole_zone); >> ... >>=20 >> +static uint32_t >> +tcp_keyed_hash(struct in_conninfo *inc, u_char *key) >> +{ >> + MD5_CTX ctx; >> + uint32_t hash[4]; >>=20 >> + MD5Init(&ctx); >> + MD5Update(&ctx, &inc->inc_fport, sizeof(uint16_t)); >> + MD5Update(&ctx, &inc->inc_lport, sizeof(uint16_t)); >> + switch (inc->inc_flags & INC_ISIPV6) { >> +#ifdef INET >> + case 0: >> + MD5Update(&ctx, &inc->inc_faddr, sizeof(struct = in_addr)); >> + MD5Update(&ctx, &inc->inc_laddr, sizeof(struct = in_addr)); >> + break; >> +#endif >> +#ifdef INET6 >> + case INC_ISIPV6: >> + MD5Update(&ctx, &inc->inc6_faddr, sizeof(struct = in6_addr)); >> + MD5Update(&ctx, &inc->inc6_laddr, sizeof(struct = in6_addr)); >> + break; >> +#endif >> + } >> + MD5Update(&ctx, key, 32); >> + MD5Final((unsigned char *)hash, &ctx); >> + >> + return (hash[0]); >=20 > Hi Michael, >=20 > How was this particular keyed hash function construction chosen? > (Yes, I see it is the same initial TSN, but how was that selected?) You mean: Why is FreeBSD using the MD5 with secret suffix as the keyed hash = function? I don't know, I have not implemented that. However, https://tools.ietf.org/html/rfc6528#section-3 suggests this, OpenBSD uses a similar computation, but uses SHA512 instead of MD5, = NetBSD seem to use the same computation as FreeBSD. I guess using MD5 was an acceptable choice at the time the choice was = made. When preparing this patch I was about to choose a different keyed hash = function, but decided to separate * Using a keyed has functions as the offset for the TCP time stamp. * Choose a good keyed hash function. That is why I isolated the keyed hash function. So it is simple to = replace it with a different one. I think it would be good to change this keyed hash function to SIP-HASH = (both for the initial sequence number and the time stamp). Opinions? Best regards Michael >=20 > Thanks, > Conrad From owner-svn-src-head@freebsd.org Sun Aug 19 17:19: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 1A4E0107127D; Sun, 19 Aug 2018 17:19:21 +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 B267081048; Sun, 19 Aug 2018 17:19:20 +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 72BE51442; Sun, 19 Aug 2018 17:19:20 +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 w7JHJKRI041994; Sun, 19 Aug 2018 17:19:20 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JHJKaN041993; Sun, 19 Aug 2018 17:19:20 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201808191719.w7JHJKaN041993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sun, 19 Aug 2018 17:19:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338057 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 338057 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, 19 Aug 2018 17:19:21 -0000 Author: mckusick Date: Sun Aug 19 17:19:20 2018 New Revision: 338057 URL: https://svnweb.freebsd.org/changeset/base/338057 Log: For traditional disks, the filesystem attempts to allocate the blocks of a file as contiguously as possible. Since the filesystem does not know how large a file will grow when it is first being written, it initially places the file in a set of blocks in which it currently fits. As it grows, it is relocated to areas with larger contiguous blocks. In this way it saves its large contiguous sets of blocks for the files that need them and thus avoids unnecessaily fragmenting its disk space. We used to skip reallocating the blocks of a file into a contiguous sequence if the underlying flash device requested BIO_DELETE notifications, because devices that benefit from BIO_DELETE also benefit from not moving the data. However, in the algorithm described above that reallocates the blocks, the destination for the data is usually moved before the data is written to the initially allocated location. So we rarely suffer the penalty of extra writes. With the addition of the consolodation of contiguous blocks into single BIO_DELETE operations, having fewer but larger contiguous blocks reduces the number of (slow and expensive) BIO_DELETE operations. So when doing BIO_DELETE consolodation, we do block reallocation. Reviewed by: kib Tested by: Peter Holm Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Sun Aug 19 16:56:42 2018 (r338056) +++ head/sys/ufs/ffs/ffs_alloc.c Sun Aug 19 17:19:20 2018 (r338057) @@ -506,14 +506,23 @@ ffs_reallocblks(ap) struct ufsmount *ump; /* - * If the underlying device can do deletes, then skip reallocating - * the blocks of this file into contiguous sequences. Devices that - * benefit from BIO_DELETE also benefit from not moving the data. - * These devices are flash and therefore work less well with this - * optimization. Also skip if reallocblks has been disabled globally. + * We used to skip reallocating the blocks of a file into a + * contiguous sequence if the underlying flash device requested + * BIO_DELETE notifications, because devices that benefit from + * BIO_DELETE also benefit from not moving the data. However, + * the destination for the data is usually moved before the data + * is written to the initially allocated location, so we rarely + * suffer the penalty of extra writes. With the addition of the + * consolodation of contiguous blocks into single BIO_DELETE + * operations, having fewer but larger contiguous blocks reduces + * the number of (slow and expensive) BIO_DELETE operations. So + * when doing BIO_DELETE consolodation, we do block reallocation. + * + * Skip if reallocblks has been disabled globally. */ ump = ap->a_vp->v_mount->mnt_data; - if (((ump->um_flags) & UM_CANDELETE) != 0 || doreallocblks == 0) + if ((((ump->um_flags) & UM_CANDELETE) != 0 && dotrimcons == 0) || + doreallocblks == 0) return (ENOSPC); /* From owner-svn-src-head@freebsd.org Sun Aug 19 17:36: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 71EB71071904; Sun, 19 Aug 2018 17:36:51 +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 28AE681A2F; Sun, 19 Aug 2018 17:36:51 +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 E5B3D178B; Sun, 19 Aug 2018 17:36:50 +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 w7JHaomv052023; Sun, 19 Aug 2018 17:36:50 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JHaoKf052022; Sun, 19 Aug 2018 17:36:50 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201808191736.w7JHaoKf052022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sun, 19 Aug 2018 17:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338058 - 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: 338058 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, 19 Aug 2018 17:36:51 -0000 Author: jhb Date: Sun Aug 19 17:36:50 2018 New Revision: 338058 URL: https://svnweb.freebsd.org/changeset/base/338058 Log: Fix the MPTable probe code after the 4:4 changes on i386. The MPTable probe code was using PMAP_MAP_LOW as the PA -> VA offset when searching for the table signature but still using KERNBASE once it had found the table. As a result, the mpfps table pointed into a random part of the kernel text instead of the actual MP Table. Rather than adding more #ifdef's, use BIOS_PADDRTOVADDR from which already uses PMAP_MAP_LOW on i386 and KERNBASE on amd64. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D16802 Modified: head/sys/x86/x86/mptable.c Modified: head/sys/x86/x86/mptable.c ============================================================================== --- head/sys/x86/x86/mptable.c Sun Aug 19 17:19:20 2018 (r338057) +++ head/sys/x86/x86/mptable.c Sun Aug 19 17:36:50 2018 (r338058) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef NEW_PCIB #include #endif @@ -223,11 +224,7 @@ search_for_sig(u_int32_t target, int count) int x; u_int32_t *addr; -#ifdef __amd64__ - addr = (u_int32_t *) (KERNBASE + target); -#else /* __i386__ */ - addr = (u_int32_t *) (PMAP_MAP_LOW + target); -#endif + addr = (u_int32_t *)BIOS_PADDRTOVADDR(target); for (x = 0; x < count; x += 4) if (addr[x] == MP_SIG) /* make array index a byte index */ @@ -258,13 +255,7 @@ mptable_probe(void) u_int32_t target; /* see if EBDA exists */ - if ((segment = (u_long) * (u_short *) ( -#ifdef __amd64__ - KERNBASE -#else /* __i386__ */ - PMAP_MAP_LOW -#endif - + 0x40e)) != 0) { + if ((segment = *(u_short *)BIOS_PADDRTOVADDR(0x40e)) != 0) { /* search first 1K of EBDA */ target = (u_int32_t) (segment << 4); if ((x = search_for_sig(target, 1024 / 4)) >= 0) @@ -285,7 +276,7 @@ mptable_probe(void) return (ENXIO); found: - mpfps = (mpfps_t)(KERNBASE + x); + mpfps = (mpfps_t)BIOS_PADDRTOVADDR(x); /* Map in the configuration table if it exists. */ if (mpfps->config_type != 0) { @@ -306,7 +297,7 @@ found: __func__); return (ENXIO); } - mpct = (mpcth_t)(KERNBASE + (uintptr_t)mpfps->pap); + mpct = (mpcth_t)BIOS_PADDRTOVADDR((uintptr_t)mpfps->pap); if (mpct->base_table_length + (uintptr_t)mpfps->pap >= 1024 * 1024) { printf("%s: Unable to map end of MP Config Table\n", From owner-svn-src-head@freebsd.org Sun Aug 19 17:40: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 499F51071CAF; Sun, 19 Aug 2018 17:40:54 +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 EF09781CD6; Sun, 19 Aug 2018 17:40:53 +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 CFFA017A8; Sun, 19 Aug 2018 17:40:53 +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 w7JHerck052275; Sun, 19 Aug 2018 17:40:53 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JHeoSj052259; Sun, 19 Aug 2018 17:40:50 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201808191740.w7JHeoSj052259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 19 Aug 2018 17:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338059 - in head: . contrib/ntp/lib/isc contrib/ntp/sntp/libevent crypto/heimdal/lib/roken crypto/openssh include lib/libc/gen lib/libc/include sys/crypto/chacha20 X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head: . contrib/ntp/lib/isc contrib/ntp/sntp/libevent crypto/heimdal/lib/roken crypto/openssh include lib/libc/gen lib/libc/include sys/crypto/chacha20 X-SVN-Commit-Revision: 338059 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, 19 Aug 2018 17:40:54 -0000 Author: delphij Date: Sun Aug 19 17:40:50 2018 New Revision: 338059 URL: https://svnweb.freebsd.org/changeset/base/338059 Log: Update userland arc4random() with OpenBSD's Chacha20 based arc4random(). ObsoleteFiles.inc: Remove manual pages for arc4random_addrandom(3) and arc4random_stir(3). contrib/ntp/lib/isc/random.c: contrib/ntp/sntp/libevent/evutil_rand.c: Eliminate in-tree usage of arc4random_addrandom(). crypto/heimdal/lib/roken/rand.c: crypto/openssh/config.h: Eliminate in-tree usage of arc4random_stir(). include/stdlib.h: Remove arc4random_stir() and arc4random_addrandom() prototypes, provide temporary shims for transistion period. lib/libc/gen/Makefile.inc: Hook arc4random-compat.c to build, add hint for Chacha20 source for kernel, and remove arc4random_addrandom(3) and arc4random_stir(3) links. lib/libc/gen/arc4random.c: Adopt OpenBSD arc4random.c,v 1.54 with bare minimum changes, use the sys/crypto/chacha20 implementation of keystream. lib/libc/gen/Symbol.map: Remove arc4random_stir and arc4random_addrandom interfaces. lib/libc/gen/arc4random.h: Adopt OpenBSD arc4random.h,v 1.4 but provide _ARC4_LOCK of our own. lib/libc/gen/arc4random.3: Adopt OpenBSD arc4random.3,v 1.35 but keep FreeBSD r114444 and r118247. lib/libc/gen/arc4random-compat.c: Compatibility shims for arc4random_stir and arc4random_addrandom functions to preserve ABI. Log once when called but do nothing otherwise. lib/libc/gen/getentropy.c: lib/libc/include/libc_private.h: Fold __arc4_sysctl into getentropy.c (renamed to arnd_sysctl). Remove from libc_private.h as a result. sys/crypto/chacha20/chacha.c: sys/crypto/chacha20/chacha.h: Make it possible to use the kernel implementation in libc. PR: 182610 Reviewed by: cem, markm Obtained from: OpenBSD Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16760 Added: head/lib/libc/gen/arc4random-compat.c (contents, props changed) head/lib/libc/gen/arc4random.h (contents, props changed) Modified: head/ObsoleteFiles.inc head/contrib/ntp/lib/isc/random.c head/contrib/ntp/sntp/libevent/evutil_rand.c head/crypto/heimdal/lib/roken/rand.c head/crypto/openssh/config.h head/include/stdlib.h head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libc/gen/arc4random.3 head/lib/libc/gen/arc4random.c (contents, props changed) head/lib/libc/gen/getentropy.c head/lib/libc/include/libc_private.h head/sys/crypto/chacha20/chacha.c head/sys/crypto/chacha20/chacha.h Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Aug 19 17:36:50 2018 (r338058) +++ head/ObsoleteFiles.inc Sun Aug 19 17:40:50 2018 (r338059) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20180819: Remove deprecated arc4random(3) stir/addrandom interfaces +OLD_FILES+=usr/share/man/man3/arc4random_addrandom.3.gz +OLD_FILES+=usr/share/man/man3/arc4random_stir.3.gz # 20180819: send-pr(1) placeholder removal OLD_FILES+=usr/bin/send-pr # 20180725: Cleanup old libcasper.so.0 Modified: head/contrib/ntp/lib/isc/random.c ============================================================================== --- head/contrib/ntp/lib/isc/random.c Sun Aug 19 17:36:50 2018 (r338058) +++ head/contrib/ntp/lib/isc/random.c Sun Aug 19 17:40:50 2018 (r338059) @@ -67,8 +67,6 @@ isc_random_seed(isc_uint32_t seed) #ifndef HAVE_ARC4RANDOM srand(seed); -#else - arc4random_addrandom((u_char *) &seed, sizeof(isc_uint32_t)); #endif } Modified: head/contrib/ntp/sntp/libevent/evutil_rand.c ============================================================================== --- head/contrib/ntp/sntp/libevent/evutil_rand.c Sun Aug 19 17:36:50 2018 (r338058) +++ head/contrib/ntp/sntp/libevent/evutil_rand.c Sun Aug 19 17:40:50 2018 (r338059) @@ -195,8 +195,6 @@ evutil_secure_rng_get_bytes(void *buf, size_t n) void evutil_secure_rng_add_bytes(const char *buf, size_t n) { - arc4random_addrandom((unsigned char*)buf, - n>(size_t)INT_MAX ? INT_MAX : (int)n); } void Modified: head/crypto/heimdal/lib/roken/rand.c ============================================================================== --- head/crypto/heimdal/lib/roken/rand.c Sun Aug 19 17:36:50 2018 (r338058) +++ head/crypto/heimdal/lib/roken/rand.c Sun Aug 19 17:40:50 2018 (r338059) @@ -37,7 +37,6 @@ void ROKEN_LIB_FUNCTION rk_random_init(void) { #if defined(HAVE_ARC4RANDOM) - arc4random_stir(); #elif defined(HAVE_SRANDOMDEV) srandomdev(); #elif defined(HAVE_RANDOM) Modified: head/crypto/openssh/config.h ============================================================================== --- head/crypto/openssh/config.h Sun Aug 19 17:36:50 2018 (r338058) +++ head/crypto/openssh/config.h Sun Aug 19 17:40:50 2018 (r338059) @@ -191,7 +191,7 @@ #define HAVE_ARC4RANDOM_BUF 1 /* Define to 1 if you have the `arc4random_stir' function. */ -#define HAVE_ARC4RANDOM_STIR 1 +/* #undef HAVE_ARC4RANDOM_STIR */ /* Define to 1 if you have the `arc4random_uniform' function. */ #define HAVE_ARC4RANDOM_UNIFORM 1 Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Sun Aug 19 17:36:50 2018 (r338058) +++ head/include/stdlib.h Sun Aug 19 17:40:50 2018 (r338059) @@ -250,11 +250,16 @@ extern void (*malloc_message)(void *, const char *); void abort2(const char *, int, void **) __dead2; __uint32_t arc4random(void); -void arc4random_addrandom(unsigned char *, int); void arc4random_buf(void *, size_t); -void arc4random_stir(void); __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/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Sun Aug 19 17:36:50 2018 (r338058) +++ head/lib/libc/gen/Makefile.inc Sun Aug 19 17:40:50 2018 (r338059) @@ -16,6 +16,7 @@ SRCS+= __getosreldate.c \ _thread_init.c \ alarm.c \ arc4random.c \ + arc4random-compat.c \ arc4random_uniform.c \ assert.c \ auxv.c \ @@ -166,6 +167,8 @@ SRCS+= devname-compat11.c \ unvis-compat.c .endif +CFLAGS.arc4random.c= -I${SRCTOP}/sys -I${SRCTOP}/sys/crypto/chacha20 + .PATH: ${SRCTOP}/contrib/libc-pwcache SRCS+= pwcache.c pwcache.h @@ -316,9 +319,7 @@ MAN+= alarm.3 \ vis.3 \ wordexp.3 -MLINKS+=arc4random.3 arc4random_addrandom.3 \ - arc4random.3 arc4random_stir.3 \ - arc4random.3 arc4random_buf.3 \ +MLINKS+=arc4random.3 arc4random_buf.3 \ arc4random.3 arc4random_uniform.3 MLINKS+=ctermid.3 ctermid_r.3 MLINKS+=devname.3 devname_r.3 Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Sun Aug 19 17:36:50 2018 (r338058) +++ head/lib/libc/gen/Symbol.map Sun Aug 19 17:40:50 2018 (r338059) @@ -65,8 +65,6 @@ FBSD_1.0 { pthread_testcancel; alarm; arc4random; - arc4random_addrandom; - arc4random_stir; __assert; check_utility_compat; clock; Added: head/lib/libc/gen/arc4random-compat.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/arc4random-compat.c Sun Aug 19 17:40:50 2018 (r338059) @@ -0,0 +1,72 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Google LLC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +/* + * The following functions were removed from OpenBSD for good reasons: + * + * - arc4random_stir() + * - arc4random_addrandom() + * + * On FreeBSD, for backward ABI compatibility, we provide two wrapper which + * logs this event and returns. + */ + +void __arc4random_stir_fbsd11(void); +void __arc4random_addrandom_fbsd11(u_char *, int); + +void +__arc4random_stir_fbsd11(void) +{ + static bool warned = false; + + if (!warned) + syslog(LOG_DEBUG, "Deprecated function arc4random_stir() called"); + warned = true; +} + +void +__arc4random_addrandom_fbsd11(u_char * dummy1 __unused, int dummy2 __unused) +{ + static bool warned = false; + + if (!warned) + syslog(LOG_DEBUG, "Deprecated function arc4random_addrandom() called"); + warned = true; +} + +__sym_compat(arc4random_stir, __arc4random_stir_fbsd11, FBSD_1.0); +__sym_compat(arc4random_addrandom, __arc4random_addrandom_fbsd11, FBSD_1.0); Modified: head/lib/libc/gen/arc4random.3 ============================================================================== --- head/lib/libc/gen/arc4random.3 Sun Aug 19 17:36:50 2018 (r338058) +++ head/lib/libc/gen/arc4random.3 Sun Aug 19 17:40:50 2018 (r338059) @@ -1,4 +1,5 @@ -.\" $OpenBSD: arc4random.3,v 1.2 1997/04/27 22:40:25 angelos Exp $ +.\" $OpenBSD: arc4random.3,v 1.35 2014/11/25 16:45:24 millert Exp $ +.\" .\" Copyright 1997 Niels Provos .\" All rights reserved. .\" @@ -30,16 +31,14 @@ .\" Manual page, using -mandoc macros .\" $FreeBSD$ .\" -.Dd April 15, 1997 +.Dd July 19, 2014 .Dt ARC4RANDOM 3 .Os .Sh NAME .Nm arc4random , .Nm arc4random_buf , -.Nm arc4random_uniform , -.Nm arc4random_stir , -.Nm arc4random_addrandom -.Nd arc4 random number generator +.Nm arc4random_uniform +.Nd random number generator .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -50,20 +49,36 @@ .Fn arc4random_buf "void *buf" "size_t nbytes" .Ft uint32_t .Fn arc4random_uniform "uint32_t upper_bound" -.Ft void -.Fn arc4random_stir "void" -.Ft void -.Fn arc4random_addrandom "unsigned char *dat" "int datlen" .Sh DESCRIPTION +This family of functions provides higher quality data than those +described in +.Xr rand 3 , +.Xr random 3 , +and +.Xr rand48 3 . +.Pp +Use of these functions is encouraged for almost all random number +consumption because the other interfaces are deficient in either +quality, portability, standardization, or availability. +These functions can be called in almost all coding environments, +including +.Xr pthreads 3 +and +.Xr chroot 2 . +.Pp +High quality 32-bit pseudo-random numbers are generated very quickly. +On each call, a cryptographic pseudo-random number generator is used +to generate a new result. +One data pool is used for all consumers in a process, so that consumption +under program flow can act as additional stirring. +The subsystem is re-seeded from the kernel random number subsystem using +.Xr getentropy 2 +on a regular basis, and also upon +.Xr fork 2 . +.Pp The .Fn arc4random -function uses the key stream generator employed by the -arc4 cipher, which uses 8*8 8 bit S-Boxes. -The S-Boxes -can be in about -.if t 2\u\s71700\s10\d -.if n (2**1700) -states. +function returns a single 32-bit value. The .Fn arc4random function returns pseudo-random numbers in the range of 0 to @@ -75,33 +90,24 @@ and .Xr random 3 . .Pp .Fn arc4random_buf -function fills the region +fills the region .Fa buf of length .Fa nbytes -with ARC4-derived random data. +with random data. .Pp .Fn arc4random_uniform -will return a uniformly distributed random number less than +will return a single 32-bit value, uniformly distributed but less than .Fa upper_bound . -.Fn arc4random_uniform -is recommended over constructions like +This is recommended over constructions like .Dq Li arc4random() % upper_bound as it avoids "modulo bias" when the upper bound is not a power of two. -.Pp -The -.Fn arc4random_stir -function reads data from -.Pa /dev/urandom -and uses it to permute the S-Boxes via -.Fn arc4random_addrandom . -.Pp -There is no need to call -.Fn arc4random_stir -before using -.Fn arc4random -functions family, since -they automatically initialize themselves. +In the worst case, this function may consume multiple iterations +to ensure uniformity; see the source code to understand the problem +and solution. +.Sh RETURN VALUES +These functions are always successful, and no return value is +reserved to indicate an error. .Sh EXAMPLES The following produces a drop-in replacement for the traditional .Fn rand @@ -113,15 +119,25 @@ functions using .Dl "#define foo4random() (arc4random() % ((unsigned)RAND_MAX + 1))" .Sh SEE ALSO .Xr rand 3 , -.Xr random 3 , -.Xr srandomdev 3 +.Xr rand48 3 , +.Xr random 3 .Sh HISTORY -.Pa RC4 -has been designed by RSA Data Security, Inc. -It was posted anonymously -to the USENET and was confirmed to be equivalent by several sources who -had access to the original cipher. -Since -.Pa RC4 -used to be a trade secret, the cipher is now referred to as -.Pa ARC4 . +These functions first appeared in +.Ox 2.1 . +.Pp +The original version of this random number generator used the +RC4 (also known as ARC4) algorithm. +In +.Ox 5.5 +it was replaced with the ChaCha20 cipher, and it may be replaced +again in the future as cryptographic techniques advance. +A good mnemonic is +.Dq A Replacement Call for Random . +.Pp +The +.Fn arc4random +random number generator was first introduced in +.Fx 2.2.6 . +The ChaCha20 based implementation was introduced in +.Fx 12.0 , +with obsolete stir and addrandom interfaces removed at the same time. Modified: head/lib/libc/gen/arc4random.c ============================================================================== --- head/lib/libc/gen/arc4random.c Sun Aug 19 17:36:50 2018 (r338058) +++ head/lib/libc/gen/arc4random.c Sun Aug 19 17:40:50 2018 (r338059) @@ -1,8 +1,10 @@ -/* $OpenBSD: arc4random.c,v 1.24 2013/06/11 16:59:50 deraadt Exp $ */ +/* $OpenBSD: arc4random.c,v 1.54 2015/09/13 08:31:47 guenther Exp $ */ /* * Copyright (c) 1996, David Mazieres * Copyright (c) 2008, Damien Miller + * Copyright (c) 2013, Markus Friedl + * Copyright (c) 2014, Theo de Raadt * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -18,15 +20,7 @@ */ /* - * Arc4 random number generator for OpenBSD. - * - * This code is derived from section 17.1 of Applied Cryptography, - * second edition, which describes a stream cipher allegedly - * compatible with RSA Labs "RC4" cipher (the actual description of - * which is a trade secret). The same algorithm is used as a stream - * cipher called "arcfour" in Tatu Ylonen's ssh package. - * - * RC4 is a registered trademark of RSA Laboratories. + * ChaCha based random number generator for OpenBSD. */ #include @@ -35,232 +29,176 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include +#include +#include +#include #include +#include #include -#include -#include +#include #include -#include - + #include "libc_private.h" #include "un-namespace.h" -#ifdef __GNUC__ +#define KEYSTREAM_ONLY +#include "chacha.c" + +#define minimum(a, b) ((a) < (b) ? (a) : (b)) + +#if defined(__GNUC__) || defined(_MSC_VER) #define inline __inline -#else /* !__GNUC__ */ +#else /* __GNUC__ || _MSC_VER */ #define inline -#endif /* !__GNUC__ */ +#endif /* !__GNUC__ && !_MSC_VER */ -struct arc4_stream { - u_int8_t i; - u_int8_t j; - u_int8_t s[256]; -}; +#define KEYSZ 32 +#define IVSZ 8 +#define BLOCKSZ 64 +#define RSBUFSZ (16*BLOCKSZ) -static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER; +/* Marked INHERIT_ZERO, so zero'd out in fork children. */ +static struct _rs { + size_t rs_have; /* valid bytes at end of rs_buf */ + size_t rs_count; /* bytes till reseed */ +} *rs; -#define KEYSIZE 128 -#define _ARC4_LOCK() \ - do { \ - if (__isthreaded) \ - _pthread_mutex_lock(&arc4random_mtx); \ - } while (0) +/* Maybe be preserved in fork children, if _rs_allocate() decides. */ +static struct _rsx { + chacha_ctx rs_chacha; /* chacha context for random keystream */ + u_char rs_buf[RSBUFSZ]; /* keystream blocks */ +} *rsx; -#define _ARC4_UNLOCK() \ - do { \ - if (__isthreaded) \ - _pthread_mutex_unlock(&arc4random_mtx); \ - } while (0) +static inline int _rs_allocate(struct _rs **, struct _rsx **); +static inline void _rs_forkdetect(void); +#include "arc4random.h" -static int rs_initialized; -static struct arc4_stream rs; -static pid_t arc4_stir_pid; -static int arc4_count; +static inline void _rs_rekey(u_char *dat, size_t datlen); -extern int __sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, - void *newp, size_t newlen); - -static inline u_int8_t arc4_getbyte(void); -static void arc4_stir(void); - static inline void -arc4_init(void) +_rs_init(u_char *buf, size_t n) { - int n; + if (n < KEYSZ + IVSZ) + return; - for (n = 0; n < 256; n++) - rs.s[n] = n; - rs.i = 0; - rs.j = 0; -} - -static inline void -arc4_addrandom(u_char *dat, int datlen) -{ - int n; - u_int8_t si; - - rs.i--; - for (n = 0; n < 256; n++) { - rs.i = (rs.i + 1); - si = rs.s[rs.i]; - rs.j = (rs.j + si + dat[n % datlen]); - rs.s[rs.i] = rs.s[rs.j]; - rs.s[rs.j] = si; + if (rs == NULL) { + if (_rs_allocate(&rs, &rsx) == -1) + abort(); } - rs.j = rs.i; + + chacha_keysetup(&rsx->rs_chacha, buf, KEYSZ * 8); + chacha_ivsetup(&rsx->rs_chacha, buf + KEYSZ, NULL); } -size_t -__arc4_sysctl(u_char *buf, size_t size) +static void +_rs_stir(void) { - int mib[2]; - size_t len, done; + u_char rnd[KEYSZ + IVSZ]; - mib[0] = CTL_KERN; - mib[1] = KERN_ARND; - done = 0; + if (getentropy(rnd, sizeof rnd) == -1) + _getentropy_fail(); - do { - len = size; - if (__sysctl(mib, 2, buf, &len, NULL, 0) == -1) - return (done); - done += len; - buf += len; - size -= len; - } while (size > 0); + if (!rs) + _rs_init(rnd, sizeof(rnd)); + else + _rs_rekey(rnd, sizeof(rnd)); + explicit_bzero(rnd, sizeof(rnd)); /* discard source seed */ - return (done); + /* invalidate rs_buf */ + rs->rs_have = 0; + memset(rsx->rs_buf, 0, sizeof(rsx->rs_buf)); + + rs->rs_count = 1600000; } -static void -arc4_stir(void) +static inline void +_rs_stir_if_needed(size_t len) { - u_char rdat[KEYSIZE]; - int i; - - if (!rs_initialized) { - arc4_init(); - rs_initialized = 1; - } - if (__arc4_sysctl(rdat, KEYSIZE) != KEYSIZE) { - /* - * The sysctl cannot fail. If it does fail on some FreeBSD - * derivative or after some future change, just abort so that - * the problem will be found and fixed. abort is not normally - * suitable for a library but makes sense here. - */ - abort(); - } - - arc4_addrandom(rdat, KEYSIZE); - - /* - * Discard early keystream, as per recommendations in: - * "(Not So) Random Shuffles of RC4" by Ilya Mironov. - */ - for (i = 0; i < 3072; i++) - (void)arc4_getbyte(); - arc4_count = 1600000; + _rs_forkdetect(); + if (!rs || rs->rs_count <= len) + _rs_stir(); + if (rs->rs_count <= len) + rs->rs_count = 0; + else + rs->rs_count -= len; } -static void -arc4_stir_if_needed(void) +static inline void +_rs_rekey(u_char *dat, size_t datlen) { - pid_t pid = getpid(); +#ifndef KEYSTREAM_ONLY + memset(rsx->rs_buf, 0, sizeof(rsx->rs_buf)); +#endif + /* fill rs_buf with the keystream */ + chacha_encrypt_bytes(&rsx->rs_chacha, rsx->rs_buf, + rsx->rs_buf, sizeof(rsx->rs_buf)); + /* mix in optional user provided data */ + if (dat) { + size_t i, m; - if (arc4_count <= 0 || !rs_initialized || arc4_stir_pid != pid) { - arc4_stir_pid = pid; - arc4_stir(); + m = minimum(datlen, KEYSZ + IVSZ); + for (i = 0; i < m; i++) + rsx->rs_buf[i] ^= dat[i]; } + /* immediately reinit for backtracking resistance */ + _rs_init(rsx->rs_buf, KEYSZ + IVSZ); + memset(rsx->rs_buf, 0, KEYSZ + IVSZ); + rs->rs_have = sizeof(rsx->rs_buf) - KEYSZ - IVSZ; } -static inline u_int8_t -arc4_getbyte(void) +static inline void +_rs_random_buf(void *_buf, size_t n) { - u_int8_t si, sj; + u_char *buf = (u_char *)_buf; + u_char *keystream; + size_t m; - rs.i = (rs.i + 1); - si = rs.s[rs.i]; - rs.j = (rs.j + si); - sj = rs.s[rs.j]; - rs.s[rs.i] = sj; - rs.s[rs.j] = si; - return (rs.s[(si + sj) & 0xff]); + _rs_stir_if_needed(n); + while (n > 0) { + if (rs->rs_have > 0) { + m = minimum(n, rs->rs_have); + keystream = rsx->rs_buf + sizeof(rsx->rs_buf) + - rs->rs_have; + memcpy(buf, keystream, m); + memset(keystream, 0, m); + buf += m; + n -= m; + rs->rs_have -= m; + } + if (rs->rs_have == 0) + _rs_rekey(NULL, 0); + } } -static inline u_int32_t -arc4_getword(void) +static inline void +_rs_random_u32(uint32_t *val) { - u_int32_t val; - val = arc4_getbyte() << 24; - val |= arc4_getbyte() << 16; - val |= arc4_getbyte() << 8; - val |= arc4_getbyte(); - return val; -} + u_char *keystream; -void -arc4random_stir(void) -{ - _ARC4_LOCK(); - arc4_stir(); - _ARC4_UNLOCK(); + _rs_stir_if_needed(sizeof(*val)); + if (rs->rs_have < sizeof(*val)) + _rs_rekey(NULL, 0); + keystream = rsx->rs_buf + sizeof(rsx->rs_buf) - rs->rs_have; + memcpy(val, keystream, sizeof(*val)); + memset(keystream, 0, sizeof(*val)); + rs->rs_have -= sizeof(*val); } -void -arc4random_addrandom(u_char *dat, int datlen) -{ - _ARC4_LOCK(); - if (!rs_initialized) - arc4_stir(); - arc4_addrandom(dat, datlen); - _ARC4_UNLOCK(); -} - -u_int32_t +uint32_t arc4random(void) { - u_int32_t val; + uint32_t val; + _ARC4_LOCK(); - arc4_count -= 4; - arc4_stir_if_needed(); - val = arc4_getword(); + _rs_random_u32(&val); _ARC4_UNLOCK(); return val; } void -arc4random_buf(void *_buf, size_t n) +arc4random_buf(void *buf, size_t n) { - u_char *buf = (u_char *)_buf; _ARC4_LOCK(); - arc4_stir_if_needed(); - while (n--) { - if (--arc4_count <= 0) - arc4_stir(); - buf[n] = arc4_getbyte(); - } + _rs_random_buf(buf, n); _ARC4_UNLOCK(); } - -#if 0 -/*-------- Test code for i386 --------*/ -#include -#include -int -main(int argc, char **argv) -{ - const int iter = 1000000; - int i; - pctrval v; - - v = rdtsc(); - for (i = 0; i < iter; i++) - arc4random(); - v = rdtsc() - v; - v /= iter; - - printf("%qd cycles\n", v); -} -#endif Added: head/lib/libc/gen/arc4random.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/arc4random.h Sun Aug 19 17:40:50 2018 (r338059) @@ -0,0 +1,74 @@ +/* $OpenBSD: arc4random.h,v 1.4 2015/01/15 06:57:18 deraadt Exp $ */ + +/* + * Copyright (c) 1996, David Mazieres + * Copyright (c) 2008, Damien Miller + * Copyright (c) 2013, Markus Friedl + * Copyright (c) 2014, Theo de Raadt + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ + +/* + * Stub functions for portability. + */ +#include + +#include + +static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER; +#define _ARC4_LOCK() \ + do { \ + if (__isthreaded) \ + _pthread_mutex_lock(&arc4random_mtx); \ + } while (0) + +#define _ARC4_UNLOCK() \ + do { \ + if (__isthreaded) \ + _pthread_mutex_unlock(&arc4random_mtx); \ + } while (0) + +static inline void +_getentropy_fail(void) +{ + raise(SIGKILL); +} + +static inline int +_rs_allocate(struct _rs **rsp, struct _rsx **rsxp) +{ + struct { + struct _rs rs; + struct _rsx rsx; + } *p; + + if ((p = mmap(NULL, sizeof(*p), PROT_READ|PROT_WRITE, + MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) + return (-1); + if (minherit(p, sizeof(*p), INHERIT_ZERO) == -1) { + munmap(p, sizeof(*p)); + return (-1); + } + + *rsp = &p->rs; + *rsxp = &p->rsx; + return (0); +} + +static inline void +_rs_forkdetect(void) +{ +} Modified: head/lib/libc/gen/getentropy.c ============================================================================== --- head/lib/libc/gen/getentropy.c Sun Aug 19 17:36:50 2018 (r338058) +++ head/lib/libc/gen/getentropy.c Sun Aug 19 17:40:50 2018 (r338059) @@ -31,12 +31,37 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include "libc_private.h" +extern int __sysctl(int *, u_int, void *, size_t *, void *, size_t); + +static size_t +arnd_sysctl(u_char *buf, size_t size) +{ + int mib[2]; + size_t len, done; + + mib[0] = CTL_KERN; + mib[1] = KERN_ARND; + done = 0; + + do { + len = size; + if (__sysctl(mib, 2, buf, &len, NULL, 0) == -1) + return (done); + done += len; + buf += len; + size -= len; + } while (size > 0); + + return (done); +} + /* * If a newer libc is accidentally installed on an older kernel, provide high * quality random data anyway. The sysctl interface is not as fast and does @@ -54,7 +79,7 @@ getentropy_fallback(void *buf, size_t buflen) errno = EFAULT; return (-1); } - if (__arc4_sysctl(buf, buflen) != buflen) { + if (arnd_sysctl(buf, buflen) != buflen) { if (errno == EFAULT) return (-1); /* Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Sun Aug 19 17:36:50 2018 (r338058) +++ head/lib/libc/include/libc_private.h Sun Aug 19 17:40:50 2018 (r338059) @@ -405,8 +405,6 @@ int __sys_futimens(int fd, const struct timespec *tim int __sys_utimensat(int fd, const char *path, const struct timespec *times, int flag) __hidden; -__size_t __arc4_sysctl(unsigned char *, __size_t); - /* execve() with PATH processing to implement posix_spawnp() */ int _execvpe(const char *, char * const *, char * const *); Modified: head/sys/crypto/chacha20/chacha.c ============================================================================== --- head/sys/crypto/chacha20/chacha.c Sun Aug 19 17:36:50 2018 (r338058) +++ head/sys/crypto/chacha20/chacha.c Sun Aug 19 17:40:50 2018 (r338059) @@ -14,7 +14,6 @@ __FBSDID("$FreeBSD$"); #include - typedef uint8_t u8; typedef uint32_t u32; @@ -57,7 +56,7 @@ typedef struct chacha_ctx chacha_ctx; static const char sigma[16] = "expand 32-byte k"; static const char tau[16] = "expand 16-byte k"; -void +LOCAL void chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits) { const char *constants; @@ -82,7 +81,7 @@ chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits) x->input[3] = U8TO32_LITTLE(constants + 12); } -void +LOCAL void chacha_ivsetup(chacha_ctx *x, const u8 *iv, const u8 *counter) { x->input[12] = counter == NULL ? 0 : U8TO32_LITTLE(counter + 0); @@ -91,7 +90,7 @@ chacha_ivsetup(chacha_ctx *x, const u8 *iv, const u8 * x->input[15] = U8TO32_LITTLE(iv + 4); } -void +LOCAL void chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes) { u32 x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15; @@ -169,6 +168,7 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u x14 = PLUS(x14,j14); x15 = PLUS(x15,j15); +#ifndef KEYSTREAM_ONLY x0 = XOR(x0,U8TO32_LITTLE(m + 0)); x1 = XOR(x1,U8TO32_LITTLE(m + 4)); x2 = XOR(x2,U8TO32_LITTLE(m + 8)); @@ -185,6 +185,7 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u x13 = XOR(x13,U8TO32_LITTLE(m + 52)); x14 = XOR(x14,U8TO32_LITTLE(m + 56)); x15 = XOR(x15,U8TO32_LITTLE(m + 60)); +#endif j12 = PLUSONE(j12); if (!j12) { @@ -219,6 +220,8 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u } bytes -= 64; c += 64; +#ifndef KEYSTREAM_ONLY m += 64; +#endif } } Modified: head/sys/crypto/chacha20/chacha.h ============================================================================== --- head/sys/crypto/chacha20/chacha.h Sun Aug 19 17:36:50 2018 (r338058) +++ head/sys/crypto/chacha20/chacha.h Sun Aug 19 17:40:50 2018 (r338059) @@ -23,9 +23,15 @@ struct chacha_ctx { #define CHACHA_STATELEN (CHACHA_NONCELEN+CHACHA_CTRLEN) #define CHACHA_BLOCKLEN 64 -void chacha_keysetup(struct chacha_ctx *x, const u_char *k, u_int kbits); -void chacha_ivsetup(struct chacha_ctx *x, const u_char *iv, const u_char *ctr); -void chacha_encrypt_bytes(struct chacha_ctx *x, const u_char *m, +#ifdef _KERNEL +#define LOCAL +#else +#define LOCAL static +#endif + +LOCAL void chacha_keysetup(struct chacha_ctx *x, const u_char *k, u_int kbits); +LOCAL void chacha_ivsetup(struct chacha_ctx *x, const u_char *iv, const u_char *ctr); +LOCAL void chacha_encrypt_bytes(struct chacha_ctx *x, const u_char *m, u_char *c, u_int bytes); #endif /* CHACHA_H */ From owner-svn-src-head@freebsd.org Sun Aug 19 17:42: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 502551071D62; Sun, 19 Aug 2018 17:42:52 +0000 (UTC) (envelope-from 0mp@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 0353B820BA; Sun, 19 Aug 2018 17:42:52 +0000 (UTC) (envelope-from 0mp@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 D8EE41939; Sun, 19 Aug 2018 17:42:51 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7JHgpAR057168; Sun, 19 Aug 2018 17:42:51 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JHgoDv057160; Sun, 19 Aug 2018 17:42:50 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201808191742.w7JHgoDv057160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sun, 19 Aug 2018 17:42:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338060 - in head: lib/libc/sys share/man/man3 share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: in head: lib/libc/sys share/man/man3 share/man/man4 X-SVN-Commit-Revision: 338060 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, 19 Aug 2018 17:42:52 -0000 Author: 0mp (ports committer) Date: Sun Aug 19 17:42:49 2018 New Revision: 338060 URL: https://svnweb.freebsd.org/changeset/base/338060 Log: Document socket control message routines for ancillary data access (CMSG_DATA). PR: 227777 Reviewed by: bcr, eadler Approved by: mat (mentor), manpages (bcr) Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D15215 Added: head/share/man/man3/CMSG_DATA.3 (contents, props changed) Modified: head/lib/libc/sys/recv.2 head/lib/libc/sys/send.2 head/lib/libc/sys/socket.2 head/share/man/man3/Makefile head/share/man/man4/ip.4 head/share/man/man4/ip6.4 head/share/man/man4/unix.4 Modified: head/lib/libc/sys/recv.2 ============================================================================== --- head/lib/libc/sys/recv.2 Sun Aug 19 17:40:50 2018 (r338059) +++ head/lib/libc/sys/recv.2 Sun Aug 19 17:42:49 2018 (r338060) @@ -28,7 +28,7 @@ .\" @(#)recv.2 8.3 (Berkeley) 2/21/94 .\" $FreeBSD$ .\" -.Dd May 20, 2018 +.Dd August 19, 2018 .Dt RECV 2 .Os .Sh NAME @@ -366,6 +366,7 @@ address space. .Xr read 2 , .Xr select 2 , .Xr socket 2 , +.Xr CMSG_DATA 3 , .Xr unix 4 .Sh HISTORY The Modified: head/lib/libc/sys/send.2 ============================================================================== --- head/lib/libc/sys/send.2 Sun Aug 19 17:40:50 2018 (r338059) +++ head/lib/libc/sys/send.2 Sun Aug 19 17:42:49 2018 (r338060) @@ -28,7 +28,7 @@ .\" From: @(#)send.2 8.2 (Berkeley) 2/21/94 .\" $FreeBSD$ .\" -.Dd August 18, 2016 +.Dd August 19, 2018 .Dt SEND 2 .Os .Sh NAME @@ -242,7 +242,8 @@ is not connected. .Xr recv 2 , .Xr select 2 , .Xr socket 2 , -.Xr write 2 +.Xr write 2 , +.Xr CMSG_DATA 3 .Sh HISTORY The .Fn send Modified: head/lib/libc/sys/socket.2 ============================================================================== --- head/lib/libc/sys/socket.2 Sun Aug 19 17:40:50 2018 (r338059) +++ head/lib/libc/sys/socket.2 Sun Aug 19 17:42:49 2018 (r338060) @@ -28,7 +28,7 @@ .\" From: @(#)socket.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 10, 2017 +.Dd August 19, 2018 .Dt SOCKET 2 .Os .Sh NAME @@ -299,6 +299,7 @@ The socket type is not supported by the protocol. .Xr shutdown 2 , .Xr socketpair 2 , .Xr write 2 , +.Xr CMSG_DATA 3 , .Xr getprotoent 3 , .Xr netgraph 4 , .Xr protocols 5 Added: head/share/man/man3/CMSG_DATA.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man3/CMSG_DATA.3 Sun Aug 19 17:42:49 2018 (r338060) @@ -0,0 +1,214 @@ +.\" Written by Jared Yanovich +.\" Public domain, July 3, 2005 +.\" +.\" $FreeBSD$ +.Dd August 19, 2018 +.Dt CMSG_DATA 3 +.Os +.Sh NAME +.Nm CMSG_DATA , +.Nm CMSG_FIRSTHDR , +.Nm CMSG_LEN , +.Nm CMSG_NXTHDR , +.Nm CMSG_SPACE +.Nd socket control message routines for ancillary data access +.Sh SYNOPSIS +.In sys/socket.h +.Ft unsigned char * +.Fn CMSG_DATA "struct cmsghdr *" +.Ft struct cmsghdr * +.Fn CMSG_FIRSTHDR "struct msghdr *" +.Ft size_t +.Fn CMSG_LEN "size_t" +.Ft struct cmsghdr * +.Fn CMSG_NXTHDR "struct msghdr *" "struct cmsghdr *" +.Ft size_t +.Fn CMSG_SPACE "size_t" +.Sh DESCRIPTION +The control message API is used to construct ancillary data objects for +use in control messages sent and received across sockets. +.Pp +Control messages are passed around by the +.Xr recvmsg 2 +and +.Xr sendmsg 2 +system calls. +The +.Vt cmsghdr +structure, described in +.Xr recvmsg 2 , +is used to specify a chain of control messages. +.Pp +These routines should be used instead of directly accessing the control +message header members and data buffers as they ensure that necessary +alignment constraints are met. +.Pp +The following routines are provided: +.Bl -tag -width Ds +.It Fn CMSG_DATA cmsg +This routine accesses the data portion of the control message header +.Fa cmsg . +It ensures proper alignment constraints on the beginning of ancillary +data are met. +.It Fn CMSG_FIRSTHDR mhdr +This routine accesses the first control message attached to the +message +.Fa msg . +If no control messages are attached to the message, this routine +returns +.Dv NULL . +.It Fn CMSG_LEN len +This routine determines the size in bytes of a control message, +which includes the control message header. +.Fa len +specifies the length of the data held by the control message. +This value is what is normally stored in the +.Fa cmsg_len +of each control message. +This routine accounts for any alignment constraints on the beginning of +ancillary data. +.It Fn CMSG_NXTHDR mhdr cmsg +This routine returns the location of the control message following +.Fa cmsg +in the message +.Fa mhdr . +If +.Fa cmsg +is the last control message in the chain, this routine returns +.Dv NULL . +.It Fn CMSG_SPACE len +This routine determines the size in bytes needed to hold a control +message and its contents of length +.Fa len , +which includes the control message header. +This value is what is normally stored in +.Fa msg_msgcontrollen . +This routine accounts for any alignment constraints on the beginning of +ancillary data as well as any needed to pad the next control message. +.El +.Sh EXAMPLES +The following example constructs a control message containing a file descriptor +in the parent process and passes it over a pre-shared socket over the child +process. +Then the child process sends a "hello" string to the parent process using the +received file descriptor. +.Bd -literal +#include + +#include +#include +#include +#include +#include + +#define HELLOLEN sizeof("hello") + +int +main() +{ + struct msghdr msg; + union { + struct cmsghdr hdr; + unsigned char buf[CMSG_SPACE(sizeof(int))]; + } cmsgbuf; + char buf[HELLOLEN]; + int hellofd[2]; + int presharedfd[2]; + struct cmsghdr *cmsg; + + if (socketpair(PF_LOCAL, SOCK_STREAM, 0, presharedfd) == -1) + err(EX_OSERR, "failed to create a pre-shared socket pair"); + + memset(&msg, 0, sizeof(msg)); + msg.msg_control = &cmsgbuf.buf; + msg.msg_controllen = sizeof(cmsgbuf.buf); + msg.msg_iov = NULL; + msg.msg_iovlen = 0; + + switch (fork()) { + case -1: + err(EX_OSERR, "fork"); + case 0: + close(presharedfd[0]); + strlcpy(buf, "hello", HELLOLEN); + + if (recvmsg(presharedfd[1], &msg, 0) == -1) + err(EX_IOERR, "failed to receive a message"); + if (msg.msg_flags & (MSG_CTRUNC | MSG_TRUNC)) + errx(EX_IOERR, "control message truncated"); + for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; + cmsg = CMSG_NXTHDR(&msg, cmsg)) { + if (cmsg->cmsg_len == CMSG_LEN(sizeof(int)) && + cmsg->cmsg_level == SOL_SOCKET && + cmsg->cmsg_type == SCM_RIGHTS) { + hellofd[1] = *(int *)CMSG_DATA(cmsg); + printf("child: sending '%s'\n", buf); + if (write(hellofd[1], buf, HELLOLEN) == -1) + err(EX_IOERR, "failed to send 'hello'"); + } + } + break; + default: + close(presharedfd[1]); + + if (socketpair(PF_LOCAL, SOCK_STREAM, 0, hellofd) == -1) + err(EX_OSERR, "failed to create a 'hello' socket pair"); + + cmsg = CMSG_FIRSTHDR(&msg); + cmsg->cmsg_len = CMSG_LEN(sizeof(int)); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + *(int *)CMSG_DATA(cmsg) = hellofd[1]; + + if (sendmsg(presharedfd[0], &msg, 0) == -1) + err(EX_IOERR, "sendmsg"); + close(hellofd[1]); + + if (read(hellofd[0], buf, HELLOLEN) == -1) + err(EX_IOERR, "faild to receive 'hello'"); + printf("parent: received '%s'\n", buf); + break; + } + + return (0); +} +.Ed +.Sh SEE ALSO +.Xr recvmsg 2 , +.Xr sendmsg 2 , +.Xr socket 2 , +.Xr ip 4 , +.Xr ip6 4 , +.Xr unix 4 +.Sh STANDARDS +.Bl -item +.It +.Rs +.%A W. Stevens +.%A M. Thomas +.%T "Advanced Sockets API for IPv6" +.%R RFC 2292 +.%D February 1998 +.Re +.It +.Rs +.%A W. Stevens +.%A M. Thomas +.%A E. Nordmark +.%A T. Jinmei +.%T "Advanced Sockets Application Program Interface (API) for IPv6" +.%R RFC 3542 +.%D May 2003 +.Re +.El +.Sh HISTORY +The control message API first appeared in +.Bx 4.2 . +This manual page was originally written by +.An Jared Yanovich Aq Mt jaredy@OpenBSD.org +for +.Ox 3.8 +and eventually brought to +.Fx 12.0 +by +.An Mateusz Piotrowski Aq Mt 0mp@FreeBSD.org . Modified: head/share/man/man3/Makefile ============================================================================== --- head/share/man/man3/Makefile Sun Aug 19 17:40:50 2018 (r338059) +++ head/share/man/man3/Makefile Sun Aug 19 17:42:49 2018 (r338060) @@ -8,6 +8,7 @@ PACKAGE=runtime-manuals MAN= assert.3 \ ATOMIC_VAR_INIT.3 \ bitstring.3 \ + CMSG_DATA.3 \ end.3 \ fpgetround.3 \ intro.3 \ @@ -57,6 +58,10 @@ MLINKS+= bitstring.3 bit_alloc.3 \ bitstring.3 bit_set.3 \ bitstring.3 bitstr_size.3 \ bitstring.3 bit_test.3 +MLINKS+= CMSG_DATA.3 CMSG_FIRSTHDR.3 \ + CMSG_DATA.3 CMSG_LEN.3 \ + CMSG_DATA.3 CMSG_NEXTHDR.3 \ + CMSG_DATA.3 CMSG_SPACE.3 MLINKS+= end.3 edata.3 \ end.3 etext.3 MLINKS+= fpgetround.3 fpgetmask.3 \ Modified: head/share/man/man4/ip.4 ============================================================================== --- head/share/man/man4/ip.4 Sun Aug 19 17:40:50 2018 (r338059) +++ head/share/man/man4/ip.4 Sun Aug 19 17:42:49 2018 (r338060) @@ -28,7 +28,7 @@ .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd September 1, 2014 +.Dd August 19, 2018 .Dt IP 4 .Os .Sh NAME @@ -888,6 +888,7 @@ field was not equal to the length of the datagram writ .Xr recv 2 , .Xr send 2 , .Xr byteorder 3 , +.Xr CMSG_DATA 3 , .Xr sourcefilter 3 , .Xr icmp 4 , .Xr igmp 4 , Modified: head/share/man/man4/ip6.4 ============================================================================== --- head/share/man/man4/ip6.4 Sun Aug 19 17:40:50 2018 (r338059) +++ head/share/man/man4/ip6.4 Sun Aug 19 17:42:49 2018 (r338060) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 13, 2011 +.Dd August 19, 2018 .Dt IP6 4 .Os .Sh NAME @@ -651,6 +651,7 @@ An ancillary data object was improperly formed. .Xr send 2 , .Xr setsockopt 2 , .Xr socket 2 , +.Xr CMSG_DATA 3 , .\" .Xr inet6_option_space 3 , .\" .Xr inet6_rthdr_space 3 , .Xr if_nametoindex 3 , Modified: head/share/man/man4/unix.4 ============================================================================== --- head/share/man/man4/unix.4 Sun Aug 19 17:40:50 2018 (r338059) +++ head/share/man/man4/unix.4 Sun Aug 19 17:42:49 2018 (r338060) @@ -28,7 +28,7 @@ .\" @(#)unix.4 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd February 3, 2017 +.Dd August 19, 2018 .Dt UNIX 4 .Os .Sh NAME @@ -350,6 +350,7 @@ socket option. .Xr sendto 2 , .Xr setsockopt 2 , .Xr socket 2 , +.Xr CMSG_DATA 3 , .Xr intro 4 .Rs .%T "An Introductory 4.3 BSD Interprocess Communication Tutorial" From owner-svn-src-head@freebsd.org Sun Aug 19 17:47: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 019B91071FA1; Sun, 19 Aug 2018 17:47:32 +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 9CA0C823F0; Sun, 19 Aug 2018 17:47:31 +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 78057198F; Sun, 19 Aug 2018 17:47:31 +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 w7JHlV3l057528; Sun, 19 Aug 2018 17:47:31 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JHlVBM057527; Sun, 19 Aug 2018 17:47:31 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201808191747.w7JHlVBM057527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 19 Aug 2018 17:47:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338061 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 338061 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, 19 Aug 2018 17:47:32 -0000 Author: delphij Date: Sun Aug 19 17:47:30 2018 New Revision: 338061 URL: https://svnweb.freebsd.org/changeset/base/338061 Log: Bump __FreeBSD_version after r338059 (Chacha20 based arc4random(3) and deprecation of arc4random_stir and arc4random_addrandom). Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Aug 19 17:42:49 2018 (r338060) +++ head/sys/sys/param.h Sun Aug 19 17:47:30 2018 (r338061) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200078 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200079 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Sun Aug 19 17:57: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 E0A581072470; Sun, 19 Aug 2018 17:57:51 +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 910DF829F3; Sun, 19 Aug 2018 17:57:51 +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 6EF091B38; Sun, 19 Aug 2018 17:57:51 +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 w7JHvpx8062648; Sun, 19 Aug 2018 17:57:51 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JHvp8J062647; Sun, 19 Aug 2018 17:57:51 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201808191757.w7JHvp8J062647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sun, 19 Aug 2018 17:57:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338062 - 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: 338062 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, 19 Aug 2018 17:57:52 -0000 Author: jhb Date: Sun Aug 19 17:57:51 2018 New Revision: 338062 URL: https://svnweb.freebsd.org/changeset/base/338062 Log: Fix a couple of comment nits. Modified: head/sys/x86/x86/local_apic.c Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Sun Aug 19 17:47:30 2018 (r338061) +++ head/sys/x86/x86/local_apic.c Sun Aug 19 17:57:51 2018 (r338062) @@ -1925,8 +1925,8 @@ apic_setup_io(void *dummy __unused) /* * Finish setting up the local APIC on the BSP once we know * how to properly program the LINT pins. In particular, this - * enables the EOI suppression mode, if LAPIC support it and - * user did not disabled the mode. + * enables the EOI suppression mode, if LAPIC supports it and + * user did not disable the mode. */ lapic_setup(1); if (bootverbose) From owner-svn-src-head@freebsd.org Sun Aug 19 18:12: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 0C6721072D64; Sun, 19 Aug 2018 18:12:12 +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 B745D83442; Sun, 19 Aug 2018 18:12:11 +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 997151E4B; Sun, 19 Aug 2018 18:12:11 +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 w7JICBWl071062; Sun, 19 Aug 2018 18:12:11 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JICBDd071061; Sun, 19 Aug 2018 18:12:11 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808191812.w7JICBDd071061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 19 Aug 2018 18:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338063 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 338063 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, 19 Aug 2018 18:12:12 -0000 Author: kevans Date: Sun Aug 19 18:12:11 2018 New Revision: 338063 URL: https://svnweb.freebsd.org/changeset/base/338063 Log: lualoader: Stop exporting drawer.draw drawer.draw is the back-end for drawlogo and drawbrand and should not be used directly. Modified: head/stand/lua/drawer.lua Modified: head/stand/lua/drawer.lua ============================================================================== --- head/stand/lua/drawer.lua Sun Aug 19 17:57:51 2018 (r338062) +++ head/stand/lua/drawer.lua Sun Aug 19 18:12:11 2018 (r338063) @@ -83,6 +83,13 @@ local function getLogodef(logo) return logodef end +local function draw(x, y, logo) + for i = 1, #logo do + screen.setcursor(x, y + i - 1) + printc(logo[i]) + end +end + fbsd_brand = { " ______ ____ _____ _____ ", " | ____| | _ \\ / ____| __ \\ ", @@ -320,13 +327,6 @@ function drawer.drawbox() printc(menu_header) end -function drawer.draw(x, y, logo) - for i = 1, #logo do - screen.setcursor(x, y + i - 1) - printc(logo[i]) - end -end - function drawer.drawbrand() local x = tonumber(loader.getenv("loader_brand_x")) or drawer.brand_position.x @@ -343,7 +343,7 @@ function drawer.drawbrand() x = x + drawer.shift.x y = y + drawer.shift.y - drawer.draw(x, y, graphic) + draw(x, y, graphic) end function drawer.drawlogo() @@ -381,7 +381,7 @@ function drawer.drawlogo() y = y + logodef.shift.y end - drawer.draw(x, y, logodef.graphic) + draw(x, y, logodef.graphic) end return drawer From owner-svn-src-head@freebsd.org Sun Aug 19 18:18: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 1265A107322C; Sun, 19 Aug 2018 18:18:21 +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 AFA09837A0; Sun, 19 Aug 2018 18:18:20 +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 8CA021E72; Sun, 19 Aug 2018 18:18:20 +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 w7JIIKCK073171; Sun, 19 Aug 2018 18:18:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JIIKUN073169; Sun, 19 Aug 2018 18:18:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201808191818.w7JIIKUN073169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 19 Aug 2018 18:18:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338064 - in head: . stand/userboot/userboot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . stand/userboot/userboot X-SVN-Commit-Revision: 338064 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, 19 Aug 2018 18:18:21 -0000 Author: imp Date: Sun Aug 19 18:18:19 2018 New Revision: 338064 URL: https://svnweb.freebsd.org/changeset/base/338064 Log: Turn back the clock just a little: make userboot.so always be 4th Turns out there was a hidden dependency we hasn't counted upon. The host load /boot/userboot.so to boot the VMs it runs. This means that the change to lua meant suddently that nobody could run their older VMs because LUA wasn't in 10.0, last month's HardenedBSD, 11.2 or whatever. Even more than for the /boot/loader* binaries, we need a good coexistance strategy for this. While that's being designed and implemented, drop back to always 4th for userboot.so. This will fail safe in all but the most extreme environments (but lua-only hacks to .lua files won't be processes in VMs until we fix it). Differential Review: https://reviews.freebsd.org/D16805 Modified: head/UPDATING head/stand/userboot/userboot/Makefile Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Aug 19 18:12:11 2018 (r338063) +++ head/UPDATING Sun Aug 19 18:18:19 2018 (r338064) @@ -40,6 +40,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: loader and loader_4th instead of loader and loader_lua, the new default. If you are using UEFI it will create the proper hard link to loader.efi. + bhyve uses userboot.so. It remains 4th-only until some issues are solved + regarding coexisting with multiple versions of FreeBSD are resolved. + 20180815: ls(1) now respects the COLORTERM environment variable used in other systems and software to indicate that a colored terminal is both Modified: head/stand/userboot/userboot/Makefile ============================================================================== --- head/stand/userboot/userboot/Makefile Sun Aug 19 18:12:11 2018 (r338063) +++ head/stand/userboot/userboot/Makefile Sun Aug 19 18:18:19 2018 (r338064) @@ -5,6 +5,7 @@ LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= no LOADER_EXT2FS_SUPPORT?= no PIC=yes +LOADER_INTERP=4th .include From owner-svn-src-head@freebsd.org Sun Aug 19 18:22: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 0F49E10735AD; Sun, 19 Aug 2018 18:22:02 +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 B96E283D17; Sun, 19 Aug 2018 18:22:01 +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 823D91FDB; Sun, 19 Aug 2018 18:22:01 +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 w7JIM1rc077281; Sun, 19 Aug 2018 18:22:01 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JIM1xi077280; Sun, 19 Aug 2018 18:22:01 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808191822.w7JIM1xi077280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 19 Aug 2018 18:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338065 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 338065 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, 19 Aug 2018 18:22:02 -0000 Author: kevans Date: Sun Aug 19 18:22:01 2018 New Revision: 338065 URL: https://svnweb.freebsd.org/changeset/base/338065 Log: lualoader: Hide most of the internal drawing functions Ideally, all of the functionality to revamp the loader screen has associated APIs that are flexible enough that third-party scripts wouldn't need to override these. Modified: head/stand/lua/drawer.lua Modified: head/stand/lua/drawer.lua ============================================================================== --- head/stand/lua/drawer.lua Sun Aug 19 18:18:19 2018 (r338064) +++ head/stand/lua/drawer.lua Sun Aug 19 18:22:01 2018 (r338065) @@ -90,131 +90,7 @@ local function draw(x, y, logo) end end -fbsd_brand = { -" ______ ____ _____ _____ ", -" | ____| | _ \\ / ____| __ \\ ", -" | |___ _ __ ___ ___ | |_) | (___ | | | |", -" | ___| '__/ _ \\/ _ \\| _ < \\___ \\| | | |", -" | | | | | __/ __/| |_) |____) | |__| |", -" | | | | | | || | | |", -" |_| |_| \\___|\\___||____/|_____/|_____/ " -} -none = {""} - --- Module exports -drawer.default_brand = 'fbsd' - -drawer.menu_name_handlers = { - -- Menu name handlers should take the menu being drawn and entry being - -- drawn as parameters, and return the name of the item. - -- This is designed so that everything, including menu separators, may - -- have their names derived differently. The default action for entry - -- types not specified here is to use entry.name directly. - [core.MENU_SEPARATOR] = function(_, entry) - if entry.name ~= nil then - if type(entry.name) == "function" then - return entry.name() - end - return entry.name - end - return "" - end, - [core.MENU_CAROUSEL_ENTRY] = function(_, entry) - local carid = entry.carousel_id - local caridx = config.getCarouselIndex(carid) - local choices = entry.items - if type(choices) == "function" then - choices = choices() - end - if #choices < caridx then - caridx = 1 - end - return entry.name(caridx, choices[caridx], choices) - end, -} - -drawer.brand_position = {x = 2, y = 1} -drawer.logo_position = {x = 46, y = 4} -drawer.menu_position = {x = 5, y = 10} -drawer.frame_size = {w = 42, h = 13} -drawer.default_shift = {x = 0, y = 0} -drawer.shift = drawer.default_shift - -drawer.branddefs = { - -- Indexed by valid values for loader_brand in loader.conf(5). Valid - -- keys are: graphic (table depicting graphic) - ["fbsd"] = { - graphic = fbsd_brand, - }, - ["none"] = { - graphic = none, - }, -} - -function drawer.addBrand(name, def) - drawer.branddefs[name] = def -end - -function drawer.addLogo(name, def) - drawer.logodefs[name] = def -end - -drawer.logodefs = { - -- Indexed by valid values for loader_logo in loader.conf(5). Valid keys - -- are: requires_color (boolean), graphic (table depicting graphic), and - -- shift (table containing x and y). - ["tribute"] = { - graphic = fbsd_brand, - }, - ["tributebw"] = { - graphic = fbsd_brand, - }, - ["none"] = { - graphic = none, - shift = {x = 17, y = 0}, - }, -} - -drawer.frame_styles = { - -- Indexed by valid values for loader_menu_frame in loader.conf(5). - -- All of the keys appearing below must be set for any menu frame style - -- added to drawer.frame_styles. - ["ascii"] = { - horizontal = "-", - vertical = "|", - top_left = "+", - bottom_left = "+", - top_right = "+", - bottom_right = "+", - }, - ["single"] = { - horizontal = "\xC4", - vertical = "\xB3", - top_left = "\xDA", - bottom_left = "\xC0", - top_right = "\xBF", - bottom_right = "\xD9", - }, - ["double"] = { - horizontal = "\xCD", - vertical = "\xBA", - top_left = "\xC9", - bottom_left = "\xC8", - top_right = "\xBB", - bottom_right = "\xBC", - }, -} - -function drawer.drawscreen(menu_opts) - -- drawlogo() must go first. - -- it determines the positions of other elements - drawer.drawlogo() - drawer.drawbrand() - drawer.drawbox() - return drawer.drawmenu(menu_opts) -end - -function drawer.drawmenu(menudef) +local function drawmenu(menudef) local x = drawer.menu_position.x local y = drawer.menu_position.y @@ -258,7 +134,7 @@ function drawer.drawmenu(menudef) return alias_table end -function drawer.drawbox() +local function drawbox() local x = drawer.menu_position.x - 3 local y = drawer.menu_position.y - 1 local w = drawer.frame_size.w @@ -327,7 +203,7 @@ function drawer.drawbox() printc(menu_header) end -function drawer.drawbrand() +local function drawbrand() local x = tonumber(loader.getenv("loader_brand_x")) or drawer.brand_position.x local y = tonumber(loader.getenv("loader_brand_y")) or @@ -346,7 +222,7 @@ function drawer.drawbrand() draw(x, y, graphic) end -function drawer.drawlogo() +local function drawlogo() local x = tonumber(loader.getenv("loader_logo_x")) or drawer.logo_position.x local y = tonumber(loader.getenv("loader_logo_y")) or @@ -382,6 +258,130 @@ function drawer.drawlogo() end draw(x, y, logodef.graphic) +end + +fbsd_brand = { +" ______ ____ _____ _____ ", +" | ____| | _ \\ / ____| __ \\ ", +" | |___ _ __ ___ ___ | |_) | (___ | | | |", +" | ___| '__/ _ \\/ _ \\| _ < \\___ \\| | | |", +" | | | | | __/ __/| |_) |____) | |__| |", +" | | | | | | || | | |", +" |_| |_| \\___|\\___||____/|_____/|_____/ " +} +none = {""} + +-- Module exports +drawer.default_brand = 'fbsd' + +drawer.menu_name_handlers = { + -- Menu name handlers should take the menu being drawn and entry being + -- drawn as parameters, and return the name of the item. + -- This is designed so that everything, including menu separators, may + -- have their names derived differently. The default action for entry + -- types not specified here is to use entry.name directly. + [core.MENU_SEPARATOR] = function(_, entry) + if entry.name ~= nil then + if type(entry.name) == "function" then + return entry.name() + end + return entry.name + end + return "" + end, + [core.MENU_CAROUSEL_ENTRY] = function(_, entry) + local carid = entry.carousel_id + local caridx = config.getCarouselIndex(carid) + local choices = entry.items + if type(choices) == "function" then + choices = choices() + end + if #choices < caridx then + caridx = 1 + end + return entry.name(caridx, choices[caridx], choices) + end, +} + +drawer.brand_position = {x = 2, y = 1} +drawer.logo_position = {x = 46, y = 4} +drawer.menu_position = {x = 5, y = 10} +drawer.frame_size = {w = 42, h = 13} +drawer.default_shift = {x = 0, y = 0} +drawer.shift = drawer.default_shift + +drawer.branddefs = { + -- Indexed by valid values for loader_brand in loader.conf(5). Valid + -- keys are: graphic (table depicting graphic) + ["fbsd"] = { + graphic = fbsd_brand, + }, + ["none"] = { + graphic = none, + }, +} + +function drawer.addBrand(name, def) + drawer.branddefs[name] = def +end + +function drawer.addLogo(name, def) + drawer.logodefs[name] = def +end + +drawer.logodefs = { + -- Indexed by valid values for loader_logo in loader.conf(5). Valid keys + -- are: requires_color (boolean), graphic (table depicting graphic), and + -- shift (table containing x and y). + ["tribute"] = { + graphic = fbsd_brand, + }, + ["tributebw"] = { + graphic = fbsd_brand, + }, + ["none"] = { + graphic = none, + shift = {x = 17, y = 0}, + }, +} + +drawer.frame_styles = { + -- Indexed by valid values for loader_menu_frame in loader.conf(5). + -- All of the keys appearing below must be set for any menu frame style + -- added to drawer.frame_styles. + ["ascii"] = { + horizontal = "-", + vertical = "|", + top_left = "+", + bottom_left = "+", + top_right = "+", + bottom_right = "+", + }, + ["single"] = { + horizontal = "\xC4", + vertical = "\xB3", + top_left = "\xDA", + bottom_left = "\xC0", + top_right = "\xBF", + bottom_right = "\xD9", + }, + ["double"] = { + horizontal = "\xCD", + vertical = "\xBA", + top_left = "\xC9", + bottom_left = "\xC8", + top_right = "\xBB", + bottom_right = "\xBC", + }, +} + +function drawer.drawscreen(menudef) + -- drawlogo() must go first. + -- it determines the positions of other elements + drawlogo() + drawbrand() + drawbox() + return drawmenu(menudef) end return drawer From owner-svn-src-head@freebsd.org Sun Aug 19 18:27: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 3B49A1073832 for ; Sun, 19 Aug 2018 18:27:07 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yb0-x244.google.com (mail-yb0-x244.google.com [IPv6:2607:f8b0:4002:c09::244]) (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 CA90C840C3 for ; Sun, 19 Aug 2018 18:27:06 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yb0-x244.google.com with SMTP id v13-v6so2319446ybq.12 for ; Sun, 19 Aug 2018 11:27:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=srM/BoGj29gQc5Cl48ZZGmy1T7udiJZJlpZtphsssQQ=; b=Bsu3A6uQMcX1slTef0+0CDSkuZf8FEZif/yw9+Q03oTgf4lPrijfnrL0bgXJ2hOriE iwWszeLmYZ0vidovwo1zdjI0whAuifag30WAY2hOjOSicMiiYH5tzTIdVbogz2lIQmvd hVWZ8zu8xGQgNHToD0TJGyqA8qDqE3p176j5F9TP2JEFfDMHMGUMZoXhL2uM5avCAzda Us+FPE5VfZJqlHYoJ4jMt0Px/msdXmyiJeX81bs0eN94P/K13Xk/BOXdFMlH5/AwWYsP OtTYfFGpJDuLJZeDBmzkjt3UQbaXaKBh/9l8sT4zFGYe4I59AX7TUnQUmg7geML6GGwC DrPw== 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=srM/BoGj29gQc5Cl48ZZGmy1T7udiJZJlpZtphsssQQ=; b=EibksNzfIkss9+M7LId353j24+Foi3FBqQbH1eznMa+Gyl560FqHP+u/pUIXlkguyI 3+BJYI6d3r8bksphbZ/pIsuBUYeb7c/Rh2IMRbzKRvr0Wqo9wJx8TClAvr4O2ogNEsyN wpCbQCXqtdE2L0VKiZ1OVEm04oLaBgGrfWijwA8T91tKeGEe5ELUJRM2qBrdGXaQ8qac Uv2l8412eoggpLqtUJBn+DxDD9fyB7gh0ElAMF+poTDuorhh+Eml+GJj+c24PevhdZ3o lyHxCx9LgCAy1t2w/GCz1IFXkkOoBNU8bOD6wpdwhP0QAl2NHauon4puwvv3HdgZzdeV VwIw== X-Gm-Message-State: AOUpUlGHov9jsfd9omaCnvaNnVJfT9o63Kb6X21fGF895N8hdmsz3DxN 7KdhtJLENs2eMZERsQTGzmRoIF0340wzERtG7nsazw== X-Google-Smtp-Source: AA+uWPxoj9SWaKjVQ6xGPQyG1LhPdZP44OILt4U6JgYLKAauWAOP5NzDu5vPcQl4pfvEPm8I1haIXYT4bJx5pL0QsQY= X-Received: by 2002:a5b:9ca:: with SMTP id y10-v6mr2959222ybq.389.1534703226039; Sun, 19 Aug 2018 11:27:06 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:f205:0:0:0:0:0 with HTTP; Sun, 19 Aug 2018 11:27:05 -0700 (PDT) In-Reply-To: <201808191740.w7JHeoSj052259@repo.freebsd.org> References: <201808191740.w7JHeoSj052259@repo.freebsd.org> From: Oliver Pinter Date: Sun, 19 Aug 2018 20:27:05 +0200 Message-ID: Subject: Re: svn commit: r338059 - in head: . contrib/ntp/lib/isc contrib/ntp/sntp/libevent crypto/heimdal/lib/roken crypto/openssh include lib/libc/gen lib/libc/include sys/crypto/chacha20 To: Xin LI Cc: 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: Sun, 19 Aug 2018 18:27:07 -0000 On 8/19/18, Xin LI wrote: > Author: delphij > Date: Sun Aug 19 17:40:50 2018 > New Revision: 338059 > URL: https://svnweb.freebsd.org/changeset/base/338059 > > Log: > Update userland arc4random() with OpenBSD's Chacha20 based arc4random(). > > ObsoleteFiles.inc: > > Remove manual pages for arc4random_addrandom(3) and > arc4random_stir(3). > > contrib/ntp/lib/isc/random.c: > contrib/ntp/sntp/libevent/evutil_rand.c: > > Eliminate in-tree usage of arc4random_addrandom(). > > crypto/heimdal/lib/roken/rand.c: > crypto/openssh/config.h: > > Eliminate in-tree usage of arc4random_stir(). > > include/stdlib.h: > > Remove arc4random_stir() and arc4random_addrandom() prototypes, > provide temporary shims for transistion period. > > lib/libc/gen/Makefile.inc: > > Hook arc4random-compat.c to build, add hint for Chacha20 source for > kernel, and remove arc4random_addrandom(3) and arc4random_stir(3) > links. > > lib/libc/gen/arc4random.c: > > Adopt OpenBSD arc4random.c,v 1.54 with bare minimum changes, use the > sys/crypto/chacha20 implementation of keystream. > > lib/libc/gen/Symbol.map: > > Remove arc4random_stir and arc4random_addrandom interfaces. > > lib/libc/gen/arc4random.h: > > Adopt OpenBSD arc4random.h,v 1.4 but provide _ARC4_LOCK of our own. > > lib/libc/gen/arc4random.3: > > Adopt OpenBSD arc4random.3,v 1.35 but keep FreeBSD r114444 and > r118247. > > lib/libc/gen/arc4random-compat.c: > > Compatibility shims for arc4random_stir and arc4random_addrandom > functions to preserve ABI. Log once when called but do nothing > otherwise. > > lib/libc/gen/getentropy.c: > lib/libc/include/libc_private.h: > > Fold __arc4_sysctl into getentropy.c (renamed to arnd_sysctl). > Remove from libc_private.h as a result. > > sys/crypto/chacha20/chacha.c: > sys/crypto/chacha20/chacha.h: > > Make it possible to use the kernel implementation in libc. > > PR: 182610 > Reviewed by: cem, markm > Obtained from: OpenBSD > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D16760 > > Added: > head/lib/libc/gen/arc4random-compat.c (contents, props changed) > head/lib/libc/gen/arc4random.h (contents, props changed) > Modified: > head/ObsoleteFiles.inc > head/contrib/ntp/lib/isc/random.c > head/contrib/ntp/sntp/libevent/evutil_rand.c > head/crypto/heimdal/lib/roken/rand.c > head/crypto/openssh/config.h > head/include/stdlib.h > head/lib/libc/gen/Makefile.inc > head/lib/libc/gen/Symbol.map > head/lib/libc/gen/arc4random.3 > head/lib/libc/gen/arc4random.c (contents, props changed) > head/lib/libc/gen/getentropy.c > head/lib/libc/include/libc_private.h > head/sys/crypto/chacha20/chacha.c > head/sys/crypto/chacha20/chacha.h > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Sun Aug 19 17:36:50 2018 (r338058) > +++ head/ObsoleteFiles.inc Sun Aug 19 17:40:50 2018 (r338059) > @@ -38,6 +38,9 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20180819: Remove deprecated arc4random(3) stir/addrandom interfaces > +OLD_FILES+=usr/share/man/man3/arc4random_addrandom.3.gz > +OLD_FILES+=usr/share/man/man3/arc4random_stir.3.gz > # 20180819: send-pr(1) placeholder removal > OLD_FILES+=usr/bin/send-pr > # 20180725: Cleanup old libcasper.so.0 > > Modified: head/contrib/ntp/lib/isc/random.c > ============================================================================== > --- head/contrib/ntp/lib/isc/random.c Sun Aug 19 17:36:50 2018 (r338058) > +++ head/contrib/ntp/lib/isc/random.c Sun Aug 19 17:40:50 2018 (r338059) > @@ -67,8 +67,6 @@ isc_random_seed(isc_uint32_t seed) > > #ifndef HAVE_ARC4RANDOM > srand(seed); > -#else > - arc4random_addrandom((u_char *) &seed, sizeof(isc_uint32_t)); > #endif > } > > > Modified: head/contrib/ntp/sntp/libevent/evutil_rand.c > ============================================================================== > --- head/contrib/ntp/sntp/libevent/evutil_rand.c Sun Aug 19 17:36:50 > 2018 (r338058) > +++ head/contrib/ntp/sntp/libevent/evutil_rand.c Sun Aug 19 17:40:50 > 2018 (r338059) > @@ -195,8 +195,6 @@ evutil_secure_rng_get_bytes(void *buf, size_t n) > void > evutil_secure_rng_add_bytes(const char *buf, size_t n) > { > - arc4random_addrandom((unsigned char*)buf, > - n>(size_t)INT_MAX ? INT_MAX : (int)n); > } > > void > > Modified: head/crypto/heimdal/lib/roken/rand.c > ============================================================================== > --- head/crypto/heimdal/lib/roken/rand.c Sun Aug 19 17:36:50 2018 (r338058) > +++ head/crypto/heimdal/lib/roken/rand.c Sun Aug 19 17:40:50 2018 (r338059) > @@ -37,7 +37,6 @@ void ROKEN_LIB_FUNCTION > rk_random_init(void) > { > #if defined(HAVE_ARC4RANDOM) > - arc4random_stir(); > #elif defined(HAVE_SRANDOMDEV) > srandomdev(); > #elif defined(HAVE_RANDOM) This hunk of the patch looks weird. Isn't it would better to undef HAVE_ARC4RANDOM without deleting the arc4random_stir()? Or delete the macro part of detection like #if defined(HAVE_SRANDOM... From owner-svn-src-head@freebsd.org Sun Aug 19 18:27: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 7A45F10738F3 for ; Sun, 19 Aug 2018 18:27:47 +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 08FFC841F8 for ; Sun, 19 Aug 2018 18:27:46 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 8ab81442-a3dd-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 8ab81442-a3dd-11e8-aff6-0b9b8210da61; Sun, 19 Aug 2018 18:27:35 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w7JIRYoD086063; Sun, 19 Aug 2018 12:27:34 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1534703254.27158.41.camel@freebsd.org> Subject: Re: svn commit: r338059 - in head: . contrib/ntp/lib/isc contrib/ntp/sntp/libevent crypto/heimdal/lib/roken crypto/openssh include lib/libc/gen lib/libc/include sys/crypto/chacha20 From: Ian Lepore To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 19 Aug 2018 12:27:34 -0600 In-Reply-To: <201808191740.w7JHeoSj052259@repo.freebsd.org> References: <201808191740.w7JHeoSj052259@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, 19 Aug 2018 18:27:47 -0000 On Sun, 2018-08-19 at 17:40 +0000, Xin LI wrote: > Author: delphij > Date: Sun Aug 19 17:40:50 2018 > New Revision: 338059 > URL: https://svnweb.freebsd.org/changeset/base/338059 > > Log: >   Update userland arc4random() with OpenBSD's Chacha20 based > arc4random(). >    >     ObsoleteFiles.inc: >    >       Remove manual pages for arc4random_addrandom(3) and >       arc4random_stir(3). >    >     contrib/ntp/lib/isc/random.c: >     contrib/ntp/sntp/libevent/evutil_rand.c: >    >       Eliminate in-tree usage of arc4random_addrandom(). >    If we don't feed changes for this back upstream, we're going to have to carry diffs from mainline ntpd forever now. The upstream project is receptive to taking diffs from us, but I guess we'd have to figure out how to write some autotools detection to create some new HAVE_xxxx variables for wrapping these calls. Also, does this imply that the ntpd port will fail to build now? I would imagine removing such fundamental routines would affect many ports. All in all, if it's just a matter of our implementation not needing these functions, wouldn't it be better to implement them as no-ops and document them as such existing only to aid porting existing code? -- Ian From owner-svn-src-head@freebsd.org Sun Aug 19 18:37: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 72D381073CDA; Sun, 19 Aug 2018 18:37:34 +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 17034848C1; Sun, 19 Aug 2018 18:37:34 +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 DD9B321B7; Sun, 19 Aug 2018 18:37:33 +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 w7JIbXFh083256; Sun, 19 Aug 2018 18:37:33 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JIbXPB083255; Sun, 19 Aug 2018 18:37:33 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808191837.w7JIbXPB083255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 19 Aug 2018 18:37:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338066 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 338066 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, 19 Aug 2018 18:37:34 -0000 Author: kevans Date: Sun Aug 19 18:37:33 2018 New Revision: 338066 URL: https://svnweb.freebsd.org/changeset/base/338066 Log: lualoader: Hide the rest of the private interfaces These are less controversial than the others, thus done in a separate commit. These are all used internally and ways to override are provided via soon-to-be-documented API or loader.conf(5) variables. Modified: head/stand/lua/drawer.lua Modified: head/stand/lua/drawer.lua ============================================================================== --- head/stand/lua/drawer.lua Sun Aug 19 18:22:01 2018 (r338065) +++ head/stand/lua/drawer.lua Sun Aug 19 18:37:33 2018 (r338066) @@ -39,8 +39,18 @@ local drawer = {} local fbsd_brand local none +local menu_name_handlers +local branddefs +local logodefs +local brand_position +local logo_position +local menu_position +local frame_size +local default_shift +local shift + local function menuEntryName(drawing_menu, entry) - local name_handler = drawer.menu_name_handlers[entry.entry_type] + local name_handler = menu_name_handlers[entry.entry_type] if name_handler ~= nil then return name_handler(drawing_menu, entry) @@ -56,12 +66,12 @@ local function getBranddef(brand) return nil end -- Look it up - local branddef = drawer.branddefs[brand] + local branddef = branddefs[brand] -- Try to pull it in if branddef == nil then try_include('brand-' .. brand) - branddef = drawer.branddefs[brand] + branddef = branddefs[brand] end return branddef @@ -72,12 +82,12 @@ local function getLogodef(logo) return nil end -- Look it up - local logodef = drawer.logodefs[logo] + local logodef = logodefs[logo] -- Try to pull it in if logodef == nil then try_include('logo-' .. logo) - logodef = drawer.logodefs[logo] + logodef = logodefs[logo] end return logodef @@ -91,11 +101,11 @@ local function draw(x, y, logo) end local function drawmenu(menudef) - local x = drawer.menu_position.x - local y = drawer.menu_position.y + local x = menu_position.x + local y = menu_position.y - x = x + drawer.shift.x - y = y + drawer.shift.y + x = x + shift.x + y = y + shift.y -- print the menu and build the alias table local alias_table = {} @@ -135,10 +145,10 @@ local function drawmenu(menudef) end local function drawbox() - local x = drawer.menu_position.x - 3 - local y = drawer.menu_position.y - 1 - local w = drawer.frame_size.w - local h = drawer.frame_size.h + local x = menu_position.x - 3 + local y = menu_position.y - 1 + local w = frame_size.w + local h = frame_size.h local framestyle = loader.getenv("loader_menu_frame") or "double" local framespec = drawer.frame_styles[framestyle] @@ -156,8 +166,8 @@ local function drawbox() local tr = framespec.top_right local br = framespec.bottom_right - x = x + drawer.shift.x - y = y + drawer.shift.y + x = x + shift.x + y = y + shift.y screen.setcursor(x, y); printc(tl) screen.setcursor(x, y + h); printc(bl) @@ -205,9 +215,9 @@ end local function drawbrand() local x = tonumber(loader.getenv("loader_brand_x")) or - drawer.brand_position.x + brand_position.x local y = tonumber(loader.getenv("loader_brand_y")) or - drawer.brand_position.y + brand_position.y local branddef = getBranddef(loader.getenv("loader_brand")) @@ -217,16 +227,16 @@ local function drawbrand() local graphic = branddef.graphic - x = x + drawer.shift.x - y = y + drawer.shift.y + x = x + shift.x + y = y + shift.y draw(x, y, graphic) end local function drawlogo() local x = tonumber(loader.getenv("loader_logo_x")) or - drawer.logo_position.x + logo_position.x local y = tonumber(loader.getenv("loader_logo_y")) or - drawer.logo_position.y + logo_position.y local logo = loader.getenv("loader_logo") local colored = color.isEnabled() @@ -244,13 +254,13 @@ local function drawlogo() end if logodef ~= nil and logodef.graphic == none then - drawer.shift = logodef.shift + shift = logodef.shift else - drawer.shift = drawer.default_shift + shift = default_shift end - x = x + drawer.shift.x - y = y + drawer.shift.y + x = x + shift.x + y = y + shift.y if logodef ~= nil and logodef.shift ~= nil then x = x + logodef.shift.x @@ -271,10 +281,7 @@ fbsd_brand = { } none = {""} --- Module exports -drawer.default_brand = 'fbsd' - -drawer.menu_name_handlers = { +menu_name_handlers = { -- Menu name handlers should take the menu being drawn and entry being -- drawn as parameters, and return the name of the item. -- This is designed so that everything, including menu separators, may @@ -303,14 +310,7 @@ drawer.menu_name_handlers = { end, } -drawer.brand_position = {x = 2, y = 1} -drawer.logo_position = {x = 46, y = 4} -drawer.menu_position = {x = 5, y = 10} -drawer.frame_size = {w = 42, h = 13} -drawer.default_shift = {x = 0, y = 0} -drawer.shift = drawer.default_shift - -drawer.branddefs = { +branddefs = { -- Indexed by valid values for loader_brand in loader.conf(5). Valid -- keys are: graphic (table depicting graphic) ["fbsd"] = { @@ -321,15 +321,7 @@ drawer.branddefs = { }, } -function drawer.addBrand(name, def) - drawer.branddefs[name] = def -end - -function drawer.addLogo(name, def) - drawer.logodefs[name] = def -end - -drawer.logodefs = { +logodefs = { -- Indexed by valid values for loader_logo in loader.conf(5). Valid keys -- are: requires_color (boolean), graphic (table depicting graphic), and -- shift (table containing x and y). @@ -344,6 +336,24 @@ drawer.logodefs = { shift = {x = 17, y = 0}, }, } + +brand_position = {x = 2, y = 1} +logo_position = {x = 46, y = 4} +menu_position = {x = 5, y = 10} +frame_size = {w = 42, h = 13} +default_shift = {x = 0, y = 0} +shift = default_shift + +-- Module exports +drawer.default_brand = 'fbsd' + +function drawer.addBrand(name, def) + branddefs[name] = def +end + +function drawer.addLogo(name, def) + logodefs[name] = def +end drawer.frame_styles = { -- Indexed by valid values for loader_menu_frame in loader.conf(5). From owner-svn-src-head@freebsd.org Sun Aug 19 18:40: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 328101073DD1; Sun, 19 Aug 2018 18:40:22 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C08F184A70; Sun, 19 Aug 2018 18:40:21 +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 8C80425D3860; Sun, 19 Aug 2018 18:40:13 +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 A2B34D1F83A; Sun, 19 Aug 2018 18:40:12 +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 FJcCpecpvRdu; Sun, 19 Aug 2018 18:40:11 +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 DBF66D1F833; Sun, 19 Aug 2018 18:40:10 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Michael Tuexen" Cc: cem@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338053 - head/sys/netinet Date: Sun, 19 Aug 2018 18:40:09 +0000 X-Mailer: MailMate (2.0BETAr6116) Message-ID: In-Reply-To: <97661C9D-9C25-4DE0-89A8-FE1C40DAFB81@freebsd.org> References: <201808191456.w7JEuAZE069780@repo.freebsd.org> <97661C9D-9C25-4DE0-89A8-FE1C40DAFB81@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed 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, 19 Aug 2018 18:40:22 -0000 On 19 Aug 2018, at 17:08, Michael Tuexen wrote: >> On 19. Aug 2018, at 18:35, Conrad Meyer wrote: >> >> On Sun, Aug 19, 2018 at 7:56 AM, Michael Tuexen >> wrote: >>> Author: tuexen >>> Date: Sun Aug 19 14:56:10 2018 >>> New Revision: 338053 >>> URL: https://svnweb.freebsd.org/changeset/base/338053 >>> >> How was this particular keyed hash function construction chosen? >> (Yes, I see it is the same initial TSN, but how was that selected?) > You mean: > > Why is FreeBSD using the MD5 with secret suffix as the keyed hash > function? > > I don't know, I have not implemented that. > > However, https://tools.ietf.org/html/rfc6528#section-3 suggests this, > OpenBSD uses a similar computation, but uses SHA512 instead of MD5, > NetBSD > seem to use the same computation as FreeBSD. > I guess using MD5 was an acceptable choice at the time the choice was > made. I am so happy we have a version control system where you could hopefully find out if the original committer left a decent commit message.. takes less than 60 seconds .. https://svnweb.freebsd.org/base?view=revision&revision=82122 /bz From owner-svn-src-head@freebsd.org Sun Aug 19 18:43: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 AA159107408E; Sun, 19 Aug 2018 18:43:11 +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 60D0F84EAB; Sun, 19 Aug 2018 18:43:11 +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 438B92346; Sun, 19 Aug 2018 18:43:11 +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 w7JIhBd8088195; Sun, 19 Aug 2018 18:43:11 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JIhBJh088194; Sun, 19 Aug 2018 18:43:11 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808191843.w7JIhBJh088194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 19 Aug 2018 18:43:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338067 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 338067 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, 19 Aug 2018 18:43:11 -0000 Author: kevans Date: Sun Aug 19 18:43:10 2018 New Revision: 338067 URL: https://svnweb.freebsd.org/changeset/base/338067 Log: lualoader: Add drawer-exported variables for default logodefs Uncovered while writing the documentation from this, we previously explicitly fell back to orb or orbbw if an invalid or incompatible logodef was selected -- in contrast to branddefs, which have an exported variable that one can whip up a quick local.lua to override in a safe manner that works regardless of whether or not loader.conf(5) successfully loads. Modified: head/stand/lua/drawer.lua Modified: head/stand/lua/drawer.lua ============================================================================== --- head/stand/lua/drawer.lua Sun Aug 19 18:37:33 2018 (r338066) +++ head/stand/lua/drawer.lua Sun Aug 19 18:43:10 2018 (r338067) @@ -247,9 +247,9 @@ local function drawlogo() (not colored and logodef.requires_color) then -- Choose a sensible default if colored then - logodef = getLogodef("orb") + logodef = getLogodef(drawer.default_color_logodef) else - logodef = getLogodef("orbbw") + logodef = getLogodef(drawer.default_bw_logodef) end end @@ -346,6 +346,8 @@ shift = default_shift -- Module exports drawer.default_brand = 'fbsd' +drawer.default_color_logodef = 'orb' +drawer.default_bw_logodef = 'orbbw' function drawer.addBrand(name, def) branddefs[name] = def From owner-svn-src-head@freebsd.org Sun Aug 19 18:47: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 DCCFD10742CA; Sun, 19 Aug 2018 18:47:18 +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 92C4285190; Sun, 19 Aug 2018 18:47:18 +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 73F4C2352; Sun, 19 Aug 2018 18:47:18 +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 w7JIlIJA088429; Sun, 19 Aug 2018 18:47:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JIlHof088422; Sun, 19 Aug 2018 18:47:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808191847.w7JIlHof088422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 Aug 2018 18:47:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338068 - in head/sys/amd64: amd64 include vmm/intel X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys/amd64: amd64 include vmm/intel X-SVN-Commit-Revision: 338068 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, 19 Aug 2018 18:47:19 -0000 Author: kib Date: Sun Aug 19 18:47:16 2018 New Revision: 338068 URL: https://svnweb.freebsd.org/changeset/base/338068 Log: Update L1TF workaround to sustain L1D pollution from NMI. Current mitigation for L1TF in bhyve flushes L1D either by an explicit WRMSR command, or by software reading enough uninteresting data to fully populate all lines of L1D. If NMI occurs after either of methods is completed, but before VM entry, L1D becomes polluted with the cache lines touched by NMI handlers. There is no interesting data which NMI accesses, but something sensitive might be co-located on the same cache line, and then L1TF exposes that to a rogue guest. Use VM entry MSR load list to ensure atomicity of L1D cache and VM entry if updated microcode was loaded. If only software flush method is available, try to help the bhyve sw flusher by also flushing L1D on NMI exit to kernel mode. Suggested by and discussed with: Andrew Cooper Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D16790 Modified: head/sys/amd64/amd64/exception.S head/sys/amd64/amd64/support.S head/sys/amd64/amd64/trap.c head/sys/amd64/include/md_var.h head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/intel/vmx_support.S Modified: head/sys/amd64/amd64/exception.S ============================================================================== --- head/sys/amd64/amd64/exception.S Sun Aug 19 18:43:10 2018 (r338067) +++ head/sys/amd64/amd64/exception.S Sun Aug 19 18:47:16 2018 (r338068) @@ -864,7 +864,10 @@ nocallchain: movl %edx,%eax shrq $32,%rdx wrmsr - movq %r13,%cr3 + cmpb $0, nmi_flush_l1d_sw(%rip) + je 2f + call flush_l1d_sw /* bhyve L1TF assist */ +2: movq %r13,%cr3 RESTORE_REGS addq $TF_RIP,%rsp jmp doreti_iret Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Sun Aug 19 18:43:10 2018 (r338067) +++ head/sys/amd64/amd64/support.S Sun Aug 19 18:47:16 2018 (r338068) @@ -1225,3 +1225,36 @@ ENTRY(handle_ibrs_exit_rs) END(handle_ibrs_exit_rs) .noaltmacro + +/* + * Flush L1D cache. Load enough of the data from the kernel text + * to flush existing L1D content. + * + * N.B. The function follows ABI calling conventions, but the vmm.ko + * caller expects that only %rax, %rcx, %r9, and %rflags registers + * are clobbered. + */ +ENTRY(flush_l1d_sw) +#define L1D_FLUSH_SIZE (64 * 1024) + movq $KERNBASE, %r9 + movq $-L1D_FLUSH_SIZE, %rcx + /* + * pass 1: Preload TLB. + * Kernel text is mapped using superpages. TLB preload is + * done for the benefit of older CPUs which split 2M page + * into 4k TLB entries. + */ +1: movb L1D_FLUSH_SIZE(%r9, %rcx), %al + addq $PAGE_SIZE, %rcx + jne 1b + xorl %eax, %eax + cpuid + movq $-L1D_FLUSH_SIZE, %rcx + /* pass 2: Read each cache line. */ +2: movb L1D_FLUSH_SIZE(%r9, %rcx), %al + addq $64, %rcx + jne 2b + lfence + ret +#undef L1D_FLUSH_SIZE +END(flush_l1d_sw) Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Sun Aug 19 18:43:10 2018 (r338067) +++ head/sys/amd64/amd64/trap.c Sun Aug 19 18:47:16 2018 (r338068) @@ -161,6 +161,20 @@ SYSCTL_INT(_machdep, OID_AUTO, uprintf_signal, CTLFLAG "Print debugging information on trap signal to ctty"); /* + * Control L1D flush on return from NMI. + * + * Tunable can be set to the following values: + * 0 - only enable flush on return from NMI if required by vmm.ko (default) + * >1 - always flush on return from NMI. + * + * Post-boot, the sysctl indicates if flushing is currently enabled. + */ +int nmi_flush_l1d_sw; +SYSCTL_INT(_machdep, OID_AUTO, nmi_flush_l1d_sw, CTLFLAG_RWTUN, + &nmi_flush_l1d_sw, 0, + "Flush L1 Data Cache on NMI exit, software bhyve L1TF mitigation assist"); + +/* * Exception, fault, and trap interface to the FreeBSD kernel. * This common code is called from assembly language IDT gate entry * routines that prepare a suitable stack frame, and restore this Modified: head/sys/amd64/include/md_var.h ============================================================================== --- head/sys/amd64/include/md_var.h Sun Aug 19 18:43:10 2018 (r338067) +++ head/sys/amd64/include/md_var.h Sun Aug 19 18:47:16 2018 (r338068) @@ -40,6 +40,7 @@ extern uint64_t *vm_page_dump; extern int hw_lower_amd64_sharedpage; extern int hw_ibrs_disable; extern int hw_ssb_disable; +extern int nmi_flush_l1d_sw; /* * The file "conf/ldscript.amd64" defines the symbol "kernphys". Its Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Sun Aug 19 18:43:10 2018 (r338067) +++ head/sys/amd64/vmm/intel/vmx.c Sun Aug 19 18:47:16 2018 (r338068) @@ -191,8 +191,11 @@ SYSCTL_UINT(_hw_vmm_vmx, OID_AUTO, vpid_alloc_failed, static int guest_l1d_flush; SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush, CTLFLAG_RD, &guest_l1d_flush, 0, NULL); +static int guest_l1d_flush_sw; +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush_sw, CTLFLAG_RD, + &guest_l1d_flush_sw, 0, NULL); -uint64_t vmx_msr_flush_cmd; +static struct msr_entry msr_load_list[1] __aligned(16); /* * The definitions of SDT probes for VMX. @@ -579,6 +582,9 @@ vmx_cleanup(void) vpid_unr = NULL; } + if (nmi_flush_l1d_sw == 1) + nmi_flush_l1d_sw = 0; + smp_rendezvous(NULL, vmx_disable, NULL, NULL); return (0); @@ -807,11 +813,30 @@ vmx_init(int ipinum) guest_l1d_flush = (cpu_ia32_arch_caps & IA32_ARCH_CAP_RDCL_NO) == 0; TUNABLE_INT_FETCH("hw.vmm.l1d_flush", &guest_l1d_flush); - if (guest_l1d_flush && - (cpu_stdext_feature3 & CPUID_STDEXT3_L1D_FLUSH) != 0) - vmx_msr_flush_cmd = IA32_FLUSH_CMD_L1D; /* + * L1D cache flush is enabled. Use IA32_FLUSH_CMD MSR when + * available. Otherwise fall back to the software flush + * method which loads enough data from the kernel text to + * flush existing L1D content, both on VMX entry and on NMI + * return. + */ + if (guest_l1d_flush) { + if ((cpu_stdext_feature3 & CPUID_STDEXT3_L1D_FLUSH) == 0) { + guest_l1d_flush_sw = 1; + TUNABLE_INT_FETCH("hw.vmm.l1d_flush_sw", + &guest_l1d_flush_sw); + } + if (guest_l1d_flush_sw) { + if (nmi_flush_l1d_sw <= 1) + nmi_flush_l1d_sw = 1; + } else { + msr_load_list[0].index = MSR_IA32_FLUSH_CMD; + msr_load_list[0].val = IA32_FLUSH_CMD_L1D; + } + } + + /* * Stash the cr0 and cr4 bits that must be fixed to 0 or 1 */ fixed0 = rdmsr(MSR_VMX_CR0_FIXED0); @@ -999,6 +1024,15 @@ vmx_vminit(struct vm *vm, pmap_t pmap) error += vmwrite(VMCS_ENTRY_CTLS, entry_ctls); error += vmwrite(VMCS_MSR_BITMAP, vtophys(vmx->msr_bitmap)); error += vmwrite(VMCS_VPID, vpid[i]); + + if (guest_l1d_flush && !guest_l1d_flush_sw) { + vmcs_write(VMCS_ENTRY_MSR_LOAD, pmap_kextract( + (vm_offset_t)&msr_load_list[0])); + vmcs_write(VMCS_ENTRY_MSR_LOAD_COUNT, + nitems(msr_load_list)); + vmcs_write(VMCS_EXIT_MSR_STORE, 0); + vmcs_write(VMCS_EXIT_MSR_STORE_COUNT, 0); + } /* exception bitmap */ if (vcpu_trace_exceptions(vm, i)) Modified: head/sys/amd64/vmm/intel/vmx_support.S ============================================================================== --- head/sys/amd64/vmm/intel/vmx_support.S Sun Aug 19 18:43:10 2018 (r338067) +++ head/sys/amd64/vmm/intel/vmx_support.S Sun Aug 19 18:47:16 2018 (r338068) @@ -176,44 +176,10 @@ ENTRY(vmx_enter_guest) jbe invept_error /* Check invept instruction error */ guest_restore: - - /* - * Flush L1D cache if requested. Use IA32_FLUSH_CMD MSR if available, - * otherwise load enough of the data from the zero_region to flush - * existing L1D content. - */ -#define L1D_FLUSH_SIZE (64 * 1024) movl %edx, %r8d - cmpb $0, guest_l1d_flush(%rip) + cmpb $0, guest_l1d_flush_sw(%rip) je after_l1d - movq vmx_msr_flush_cmd(%rip), %rax - testq %rax, %rax - jz 1f - movq %rax, %rdx - shrq $32, %rdx - movl $MSR_IA32_FLUSH_CMD, %ecx - wrmsr - jmp after_l1d -1: movq $KERNBASE, %r9 - movq $-L1D_FLUSH_SIZE, %rcx - /* - * pass 1: Preload TLB. - * Kernel text is mapped using superpages. TLB preload is - * done for the benefit of older CPUs which split 2M page - * into 4k TLB entries. - */ -2: movb L1D_FLUSH_SIZE(%r9, %rcx), %al - addq $PAGE_SIZE, %rcx - jne 2b - xorl %eax, %eax - cpuid - movq $-L1D_FLUSH_SIZE, %rcx - /* pass 2: Read each cache line */ -3: movb L1D_FLUSH_SIZE(%r9, %rcx), %al - addq $64, %rcx - jne 3b - lfence -#undef L1D_FLUSH_SIZE + call flush_l1d_sw after_l1d: cmpl $0, %r8d je do_launch From owner-svn-src-head@freebsd.org Sun Aug 19 18:54:44 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 1AD141074695; Sun, 19 Aug 2018 18:54:44 +0000 (UTC) (envelope-from jhibbits@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 C577C8584A; Sun, 19 Aug 2018 18:54:43 +0000 (UTC) (envelope-from jhibbits@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 A275924F4; Sun, 19 Aug 2018 18:54:43 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7JIsheY093508; Sun, 19 Aug 2018 18:54:43 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JIshSU093507; Sun, 19 Aug 2018 18:54:43 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201808191854.w7JIshSU093507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 19 Aug 2018 18:54:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338069 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 338069 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, 19 Aug 2018 18:54:44 -0000 Author: jhibbits Date: Sun Aug 19 18:54:43 2018 New Revision: 338069 URL: https://svnweb.freebsd.org/changeset/base/338069 Log: booke pmap: hide debug-ish printf behind bootverbose It's not necessary during normal operation to know the mapped region size and wasted space. Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Sun Aug 19 18:47:16 2018 (r338068) +++ head/sys/powerpc/booke/pmap.c Sun Aug 19 18:54:43 2018 (r338069) @@ -4177,8 +4177,9 @@ tlb1_mapin_region(vm_offset_t va, vm_paddr_t pa, vm_si } mapped = (va - base); - printf("mapped size 0x%"PRI0ptrX" (wasted space 0x%"PRIxPTR")\n", - mapped, mapped - size); + if (bootverbose) + printf("mapped size 0x%"PRIxPTR" (wasted space 0x%"PRIxPTR")\n", + mapped, mapped - size); return (mapped); } From owner-svn-src-head@freebsd.org Sun Aug 19 18:55: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 424AE107474A; Sun, 19 Aug 2018 18:55:35 +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 E7309859DB; Sun, 19 Aug 2018 18:55:34 +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 C842524F6; Sun, 19 Aug 2018 18:55:34 +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 w7JItYdi093617; Sun, 19 Aug 2018 18:55:34 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JItYqF093614; Sun, 19 Aug 2018 18:55:34 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201808191855.w7JItYqF093614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 19 Aug 2018 18:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338070 - in head/sys: arm/allwinner arm64/conf conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/allwinner arm64/conf conf X-SVN-Commit-Revision: 338070 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, 19 Aug 2018 18:55:35 -0000 Author: manu Date: Sun Aug 19 18:55:33 2018 New Revision: 338070 URL: https://svnweb.freebsd.org/changeset/base/338070 Log: arm64: allwinner: Add aw_syscon driver to GENERIC Recent DTS use the syscon for the emac controller. We support this but since U-Boot is still using old DTS it was never needed for us to add this support, but this is a problem when using upstream recent DTS and will be when U-Boot will catch up. While here add a new compatible to the aw_syscon driver as Linux changed it ... Modified: head/sys/arm/allwinner/aw_syscon.c head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 Modified: head/sys/arm/allwinner/aw_syscon.c ============================================================================== --- head/sys/arm/allwinner/aw_syscon.c Sun Aug 19 18:54:43 2018 (r338069) +++ head/sys/arm/allwinner/aw_syscon.c Sun Aug 19 18:55:33 2018 (r338070) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); static struct ofw_compat_data compat_data[] = { {"allwinner,sun50i-a64-system-controller", 1}, + {"allwinner,sun50i-a64-system-control", 1}, {"allwinner,sun8i-a83t-system-controller", 1}, {"allwinner,sun8i-h3-system-controller", 1}, {NULL, 0} Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Sun Aug 19 18:54:43 2018 (r338069) +++ head/sys/arm64/conf/GENERIC Sun Aug 19 18:55:33 2018 (r338070) @@ -256,6 +256,7 @@ device hwreset device nvmem device regulator device syscon +device aw_syscon # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Sun Aug 19 18:54:43 2018 (r338069) +++ head/sys/conf/files.arm64 Sun Aug 19 18:55:33 2018 (r338070) @@ -34,6 +34,7 @@ arm/allwinner/aw_rsb.c optional aw_rsb fdt arm/allwinner/aw_rtc.c optional aw_rtc fdt arm/allwinner/aw_sid.c optional aw_sid fdt arm/allwinner/aw_spi.c optional aw_spi fdt +arm/allwinner/aw_syscon.c optional aw_syscon ext_resources syscon fdt arm/allwinner/aw_thermal.c optional aw_thermal fdt arm/allwinner/aw_usbphy.c optional ehci aw_usbphy fdt arm/allwinner/aw_wdog.c optional aw_wdog fdt From owner-svn-src-head@freebsd.org Sun Aug 19 19:00:45 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 E6BE410749D7; Sun, 19 Aug 2018 19:00:44 +0000 (UTC) (envelope-from jhibbits@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 9CF0D85CD4; Sun, 19 Aug 2018 19:00:44 +0000 (UTC) (envelope-from jhibbits@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 7E2A82519; Sun, 19 Aug 2018 19:00:44 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7JJ0iYp093910; Sun, 19 Aug 2018 19:00:44 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JJ0iqv093909; Sun, 19 Aug 2018 19:00:44 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201808191900.w7JJ0iqv093909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 19 Aug 2018 19:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338071 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 338071 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, 19 Aug 2018 19:00:45 -0000 Author: jhibbits Date: Sun Aug 19 19:00:44 2018 New Revision: 338071 URL: https://svnweb.freebsd.org/changeset/base/338071 Log: powerpc64: Align frequently used/exclusive data on cacheline boundaries This is effectively a merge from amd64 of r312888, r323235, and r333486. I've been running this on my POWER9 Talos for some time now with no ill effects. Suggested by: mjg Modified: head/sys/conf/ldscript.powerpc64 Modified: head/sys/conf/ldscript.powerpc64 ============================================================================== --- head/sys/conf/ldscript.powerpc64 Sun Aug 19 18:55:33 2018 (r338070) +++ head/sys/conf/ldscript.powerpc64 Sun Aug 19 19:00:44 2018 (r338071) @@ -69,6 +69,20 @@ SECTIONS .sbss2 : { *(.sbss2) } /* Adjust the address for the data segment to the next page up. */ . = ALIGN(4096); + .data.read_frequently : + { + *(SORT_BY_ALIGNMENT(.data.read_frequently)) + } + .data.read_mostly : + { + *(.data.read_mostly) + } + . = ALIGN(128); + .data.exclusive_cache_line : + { + *(.data.exclusive_cache_line) + } + . = ALIGN(128); .data : { *(.data) From owner-svn-src-head@freebsd.org Sun Aug 19 19:03:44 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 637541074D71; Sun, 19 Aug 2018 19:03:44 +0000 (UTC) (envelope-from jhibbits@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 1322A861EE; Sun, 19 Aug 2018 19:03:44 +0000 (UTC) (envelope-from jhibbits@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 E790C26BA; Sun, 19 Aug 2018 19:03:43 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7JJ3hpR098662; Sun, 19 Aug 2018 19:03:43 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JJ3hGg098661; Sun, 19 Aug 2018 19:03:43 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201808191903.w7JJ3hGg098661@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 19 Aug 2018 19:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338072 - head/sys/powerpc/include X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/include X-SVN-Commit-Revision: 338072 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, 19 Aug 2018 19:03:44 -0000 Author: jhibbits Date: Sun Aug 19 19:03:43 2018 New Revision: 338072 URL: https://svnweb.freebsd.org/changeset/base/338072 Log: Sort SPR_SPEFSCR in the SPR list Also remove duplicate definition of SPR_IBAT0U. Modified: head/sys/powerpc/include/spr.h Modified: head/sys/powerpc/include/spr.h ============================================================================== --- head/sys/powerpc/include/spr.h Sun Aug 19 19:00:44 2018 (r338071) +++ head/sys/powerpc/include/spr.h Sun Aug 19 19:03:43 2018 (r338072) @@ -229,7 +229,6 @@ #define EPCR_DGTMI 0x00800000 #define EPCR_DMIUH 0x00400000 #define EPCR_PMGS 0x00200000 -#define SPR_SPEFSCR 0x200 /* ..8 Signal Processing Engine FSCR. */ #define SPR_HSRR0 0x13a #define SPR_HSRR1 0x13b @@ -245,7 +244,7 @@ #define SPR_LPID 0x13f /* Logical Partitioning Control */ #define SPR_PTCR 0x1d0 /* Partition Table Control Register */ -#define SPR_IBAT0U 0x210 /* .68 Instruction BAT Reg 0 Upper */ +#define SPR_SPEFSCR 0x200 /* ..8 Signal Processing Engine FSCR. */ #define SPR_IBAT0U 0x210 /* .6. Instruction BAT Reg 0 Upper */ #define SPR_IBAT0L 0x211 /* .6. Instruction BAT Reg 0 Lower */ #define SPR_IBAT1U 0x212 /* .6. Instruction BAT Reg 1 Upper */ From owner-svn-src-head@freebsd.org Sun Aug 19 19:04: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 86A3C1074DFC; Sun, 19 Aug 2018 19:04:28 +0000 (UTC) (envelope-from delphij@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 2439486346; Sun, 19 Aug 2018 19:04:28 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from odin.corp.delphij.net (unknown [IPv6:2601:646:8882:37a:d463:7d7:dec2:3842]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: delphij/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 3F3F71B371; Sun, 19 Aug 2018 19:04:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Subject: Re: svn commit: r338059 - in head: . contrib/ntp/lib/isc contrib/ntp/sntp/libevent crypto/heimdal/lib/roken crypto/openssh include lib/libc/gen lib/libc/include sys/crypto/chacha20 To: Oliver Pinter Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808191740.w7JHeoSj052259@repo.freebsd.org> From: Xin Li Openpgp: preference=signencrypt Autocrypt: addr=delphij@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFJNzwQBEACuPNSJjL/AD8oHFuG72vtx5P7Q6dpiEbFABgw/IohS65yDZDd3qFH9ssQv AsFafwB/ofsk6t7dx6zIC05dv5qjhGIOKSJxFC4U1HAot9+QpeUG+8boTKZiiycrMruItj2U JANlv+gN5h0mAsL5f9eNzhRM43kdjN8cQnBIujhO54Derjnrnqz6cQtoonV6SvvVJZUQGxHK 5R1XYJ6wiTuvoEuRYnNObJmPFWZyYOaGZz0qqD6Qe1BhkZuRzv2bZxwJc3Raap/GF6Pm9J/c hlYHUmm2QLaXvmoP8WNosNjla1fup0tgYQE+7MTtHFVxmVj9ZTihN3rEL5IkeEKjQAqcpe1n Db8X2o4K262LRpFl8WtVMW2TfN5Avpj+knZMl3tkYGvYK/nfadCr6Af4co9mkhX6QYgkerg2 mXEGaQzSD/omnsxHCfqMgdphaX3B3eoY2Fv36BMpjSdHmm0rmwqjqZaqlZn89vQ/I6ATvLyx JsdHwTbrj57audl/RKC+OpREOJPaVULp1L+9zdBXslILO8MJaT6YEw1T29bEj5jvLm03Y4rF u/YTruHcMPpsGbpJckDKiy6ISAbMtPvz7/KR91xPHS6KExGiIakIX9xpIXIDKgq+ecEWwkFK PogoKqO6K0/GYkTRoKdXGzsILvIurtbPqSFqWzbRIyNOa82jowARAQABzRZYaW4gTGkgPGRA ZGVscGhpai5uZXQ+wsF9BBMBCgAnBQJTQvBFAhsjBQkJZgGABQsJCAcDBRUKCQgLBRYCAwEA Ah4BAheAAAoJEJW2GBstM+nsha4P/2Roa/REjZLZlIG1TKOxEDqmwc3fynX4w2g7/FXA7f7Z YO5N4vnnnQdJbDZDt4TJtiP1NHHdheQ5+loJrrCXVlU31LuJv1ebM2Ajsuo/0l3tfulEf6Ki GoozmaNZAhwiGJkQVg9DSKsea5xIA31lPnFH4T0SKn8Q6F4HYienmJJtlKVTADvYXA+DRmv0 rNOyVe+V/AuTFuelKg3Ua5a+dY3oqtrQQvFS4n7iIrNjEMUBVx0XTrYLddnF+YjXDg5Phf0D pV/2yJOXiTGiZMK6i7vwHZkJvarACoTSrUrr6OBuZv5Gf87VgifZKLr2Fuf+FePiVCoZTQiL 0hPQyABMzeWa32P6BY2LBMMMFvFiyL5pN5k6nJ0nx4skl8UxZ5ay4yyVg2u3f4aI3+m0XlZ+ iixrjmCTGi1s+d/n6E3eFXdJUUbSOXLZaU4qrbXRzTYCZmZViryv7ibtOHXnG6oWy7BFEHuT rUW6OBvsQDTp5iQ6opENJ5/ZzSA3c5p1WS9Ezv4Bpdqcm7LTQX2j6kXikj8YqICtDF2rkKZ2 Ynjm9se9B0h/T1SOaSpbtRg05UKjsinDq2x8EeX21yFs3UyvwePLrGoNKL45EJM0xwxrnlfr M0ayKJNLoYysY78d54hg7XMmkQD/oZz9I+k4fN6CmZ2i5WGH2BgYs0313JMHxSg7zsFNBFJN zwQBEADPtS+nfTKM6PwgSWLDGVgUYQ/RLaKzCcpQAf4ryLBugXpx3s2BBT1bixX7CpsLXKQi +RRETgSFzDaBL9SEs2ZDV2YT+zGp08aijK/Yl9+RIeezAukI3c+XMHuo8ktUWJmo5/1DX07q G30ckG7uFuTnt31sFzwhh/ZeSuLFyel/fWF48KExLDIVa8DyEUJaYvE9Vfph4T/3LkKuzVTy +iwUBLiSLj5G5N70A+4usbL3eKyYrJqCSaLfrP99/nlgBhMAHVcKcv0uqSuiaH9OMqg1VjQs N8j6NDQug9QrbBTM6U7oZWF/AK+CdFoe+leq5MZfzwCevs0BQgxWm4SHMpXL2vtly67QSPMY dl96fOzw8YbKHv1o0ixhCvc37cI9oUVuSJLXKhEEAvWvLuusiuNeoz+6aPlELvD8h5txJqui tVOzctvJ7ktGZTNiz73tKYVdkKaQVyo8QJFLCNLnUulrQ5wXwteYPg6mrpBxu9VqgDrMp7eB T2kaZ4GRBoMWXXPYSIEe5PM5hhNCsSUfqrKj34UZPijPe+HiWoFJ4S5vIpzutiae11Ctki7u XzeLAhOJQB2raraIqDlFP9I9Zj9JOAZhmiKSEWKfOooCNxQYGiUdPrdYnAe+m7FXRomjF0OO gSepNIESt2gOEIbE5cMxQ0gAueNJc58eHCjWhsNJIwARAQABwsFlBBgBCgAPBQJSTc8EAhsM BQkJZgGAAAoJEJW2GBstM+nsh8EP/1sxZpkJelu+smmqaqdrGHlNrFVLOmeN5yr2IGHBUbmF htjr7fVoU8T0mUnlUU724aKPla4nWhMb4NMu+VxRRFGaT2TYpyR6VIxaStycyUdMGjdXV0Pz TGmxFXhNZXKEITXH9sIxuONBp1czl4AgwN7AAl1MKyV13AaLIyajs58mYmuXtyFn/O+4lxh5 nl2Fa3L9YkL9O7QU2p6WAnDky+L3PgUWp1AzJGfYlLZ8XXCi+KK+pnta+f9yKHt/Oqd/s7OC W4mXgFkBrfuSZZofa4eZckh5u0yBYW3OnEJhClgxRbuOhyYwqQr5oxPrQtjtbMiBzbrOkHhy NnrVCFd9EqlojREGDefHo3V+ZlUOc6OoN3CAYnNa2uLEOm5DCuqOE4z5atBCih5EyITPp7JP J2disEP6ddipcilqbnJdP+TyRQwSv5qRNy8cHahD1Cg9XJJHiC3qr+W3eOtqPkJxhU5biPEr 7dljaLS1Ij771brzqO/x5zW1L9py7muXzYBsW8+keKj8LOYs2242KgjI5Og9YhIJGBFBNddQ wxKBKQpytKQOiXwjhk4Nj77U796bsCd/jIS0r0ZUKBEptPyKso7ncfrm163aEmSaDUkiIjyp 9CEOVT87D+VAVh9PyLGP1niQzWEWFSK36tRGZlF0odP1ZB6wub9zq2DxFouSjHgH Organization: The FreeBSD Project Message-ID: Date: Sun, 19 Aug 2018 12:04:22 -0700 User-Agent: Thunderbird MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="eeiQhzNJ1EI3a3mnEDtJirIMMYRKnOj1m" 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, 19 Aug 2018 19:04:28 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --eeiQhzNJ1EI3a3mnEDtJirIMMYRKnOj1m Content-Type: multipart/mixed; boundary="F5ncgHEcc1s6LUxBlaulLdj6aIhmBfVjD"; protected-headers="v1" From: Xin Li To: Oliver Pinter Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r338059 - in head: . contrib/ntp/lib/isc contrib/ntp/sntp/libevent crypto/heimdal/lib/roken crypto/openssh include lib/libc/gen lib/libc/include sys/crypto/chacha20 References: <201808191740.w7JHeoSj052259@repo.freebsd.org> In-Reply-To: --F5ncgHEcc1s6LUxBlaulLdj6aIhmBfVjD Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 8/19/18 11:27, Oliver Pinter wrote: >> Modified: head/crypto/heimdal/lib/roken/rand.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/crypto/heimdal/lib/roken/rand.c Sun Aug 19 17:36:50 2018 (r33= 8058) >> +++ head/crypto/heimdal/lib/roken/rand.c Sun Aug 19 17:40:50 2018 (r33= 8059) >> @@ -37,7 +37,6 @@ void ROKEN_LIB_FUNCTION >> rk_random_init(void) >> { >> #if defined(HAVE_ARC4RANDOM) >> - arc4random_stir(); >> #elif defined(HAVE_SRANDOMDEV) >> srandomdev(); >> #elif defined(HAVE_RANDOM) >=20 > This hunk of the patch looks weird. >=20 > Isn't it would better to undef HAVE_ARC4RANDOM without deleting the > arc4random_stir()? > Or delete the macro part of detection like No that would be wrong. The intention is to explicitly say "If HAVE_ARC4RANDOM, do nothing for rk_random_init()". undef HAVE_ARC4RANDOM is not an option because that means the code would no longer use arc4random(). Cheers, --F5ncgHEcc1s6LUxBlaulLdj6aIhmBfVjD-- --eeiQhzNJ1EI3a3mnEDtJirIMMYRKnOj1m Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJbeb85AAoJEJW2GBstM+nsRcUP/1rTvZSzkN9N0gEpgcUse77l qgVvkQV9cTnmEBLCPEzLQMbpfkSn9YqWmphmwQNNP8E34EM/ywxrr0bqZF0P4ceU ZFZC1aURr6WW08YyyoTEfHrYfl5Ku/yA/qN82BNnpuV5mcCMLL7sVTcV4uqZBMUu U3cKFDPbxjzwU28whnejLh/HkZmDa6Gq7KmyqS3fKvjdBga8dylPcTxmb98UdHwZ 8A5EUpQY/ezEKKBcvsPl/oTxxrVfL2ICOjNvKSvhzOu6kmmVrDjdwxjTKyD8JGoE 3w0Yt26ctwJ58buKVB+mZdmenLPCS4S0InfzfqBzQWeimYTBKXdiyU3dP9rFolx2 GA/Yp7q86khhucBRnvkNtjCj/VCUYzNcPUOpI7v5tk/DJ6jSR06xSG1COBFJPDrF 8N06oRGbFYvTL4xGdrLcKC/4tUlGGLdfT0UdF6ZSMG7tct6iPWO/lca0zw5ZZWZv GRcB8RDDQ0giEy0Ao+773SnJW0uYn4ZxBN3y5Wzjwf4jjoYOFTl1wjE4WHhpY53J 3eywgfKPSeCsp4uvI0+vgZjptZcSMXNJB0rKci5vs+YPZRscdXq2LW4flRcbZJrh xsB8/W97Zv7cnEY3sSfyPSGwWaP8DEu7HsV0KVQEt4+2zl40zi4AOUxpAGYCQr+I F41fWcT2ltnLSG9raqhZ =uAhd -----END PGP SIGNATURE----- --eeiQhzNJ1EI3a3mnEDtJirIMMYRKnOj1m-- From owner-svn-src-head@freebsd.org Sun Aug 19 19:08: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 3CE041074F88; Sun, 19 Aug 2018 19:08:00 +0000 (UTC) (envelope-from jhibbits@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 D431B865A1; Sun, 19 Aug 2018 19:07:59 +0000 (UTC) (envelope-from jhibbits@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 AFDA326E2; Sun, 19 Aug 2018 19:07:59 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7JJ7xm1098888; Sun, 19 Aug 2018 19:07:59 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JJ7xEZ098886; Sun, 19 Aug 2018 19:07:59 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201808191907.w7JJ7xEZ098886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 19 Aug 2018 19:07:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338073 - head/sys/powerpc/conf X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/conf X-SVN-Commit-Revision: 338073 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, 19 Aug 2018 19:08:00 -0000 Author: jhibbits Date: Sun Aug 19 19:07:59 2018 New Revision: 338073 URL: https://svnweb.freebsd.org/changeset/base/338073 Log: powerpc conf: Add PRINTF_BUFR_SIZE option to Book-E configs Without this, printf is very hard to follow at times on multicore systems. Modified: head/sys/powerpc/conf/MPC85XX head/sys/powerpc/conf/MPC85XXSPE Modified: head/sys/powerpc/conf/MPC85XX ============================================================================== --- head/sys/powerpc/conf/MPC85XX Sun Aug 19 19:03:43 2018 (r338072) +++ head/sys/powerpc/conf/MPC85XX Sun Aug 19 19:07:59 2018 (r338073) @@ -47,6 +47,7 @@ options MSDOSFS options NFS_ROOT options NFSCL options NFSLOCKD +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options PROCFS options PSEUDOFS options SCHED_ULE Modified: head/sys/powerpc/conf/MPC85XXSPE ============================================================================== --- head/sys/powerpc/conf/MPC85XXSPE Sun Aug 19 19:03:43 2018 (r338072) +++ head/sys/powerpc/conf/MPC85XXSPE Sun Aug 19 19:07:59 2018 (r338073) @@ -47,6 +47,7 @@ options MSDOSFS options NFS_ROOT options NFSCL options NFSLOCKD +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options PROCFS options PSEUDOFS options SCHED_ULE From owner-svn-src-head@freebsd.org Sun Aug 19 19:12: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 4648010751DA; Sun, 19 Aug 2018 19:12:28 +0000 (UTC) (envelope-from delphij@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 D9364869B4; Sun, 19 Aug 2018 19:12:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from odin.corp.delphij.net (unknown [IPv6:2601:646:8882:37a:d463:7d7:dec2:3842]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: delphij/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 3AECB1B470; Sun, 19 Aug 2018 19:12:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808191740.w7JHeoSj052259@repo.freebsd.org> <1534703254.27158.41.camel@freebsd.org> From: Xin Li Openpgp: preference=signencrypt Autocrypt: addr=delphij@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFJNzwQBEACuPNSJjL/AD8oHFuG72vtx5P7Q6dpiEbFABgw/IohS65yDZDd3qFH9ssQv AsFafwB/ofsk6t7dx6zIC05dv5qjhGIOKSJxFC4U1HAot9+QpeUG+8boTKZiiycrMruItj2U JANlv+gN5h0mAsL5f9eNzhRM43kdjN8cQnBIujhO54Derjnrnqz6cQtoonV6SvvVJZUQGxHK 5R1XYJ6wiTuvoEuRYnNObJmPFWZyYOaGZz0qqD6Qe1BhkZuRzv2bZxwJc3Raap/GF6Pm9J/c hlYHUmm2QLaXvmoP8WNosNjla1fup0tgYQE+7MTtHFVxmVj9ZTihN3rEL5IkeEKjQAqcpe1n Db8X2o4K262LRpFl8WtVMW2TfN5Avpj+knZMl3tkYGvYK/nfadCr6Af4co9mkhX6QYgkerg2 mXEGaQzSD/omnsxHCfqMgdphaX3B3eoY2Fv36BMpjSdHmm0rmwqjqZaqlZn89vQ/I6ATvLyx JsdHwTbrj57audl/RKC+OpREOJPaVULp1L+9zdBXslILO8MJaT6YEw1T29bEj5jvLm03Y4rF u/YTruHcMPpsGbpJckDKiy6ISAbMtPvz7/KR91xPHS6KExGiIakIX9xpIXIDKgq+ecEWwkFK PogoKqO6K0/GYkTRoKdXGzsILvIurtbPqSFqWzbRIyNOa82jowARAQABzRZYaW4gTGkgPGRA ZGVscGhpai5uZXQ+wsF9BBMBCgAnBQJTQvBFAhsjBQkJZgGABQsJCAcDBRUKCQgLBRYCAwEA Ah4BAheAAAoJEJW2GBstM+nsha4P/2Roa/REjZLZlIG1TKOxEDqmwc3fynX4w2g7/FXA7f7Z YO5N4vnnnQdJbDZDt4TJtiP1NHHdheQ5+loJrrCXVlU31LuJv1ebM2Ajsuo/0l3tfulEf6Ki GoozmaNZAhwiGJkQVg9DSKsea5xIA31lPnFH4T0SKn8Q6F4HYienmJJtlKVTADvYXA+DRmv0 rNOyVe+V/AuTFuelKg3Ua5a+dY3oqtrQQvFS4n7iIrNjEMUBVx0XTrYLddnF+YjXDg5Phf0D pV/2yJOXiTGiZMK6i7vwHZkJvarACoTSrUrr6OBuZv5Gf87VgifZKLr2Fuf+FePiVCoZTQiL 0hPQyABMzeWa32P6BY2LBMMMFvFiyL5pN5k6nJ0nx4skl8UxZ5ay4yyVg2u3f4aI3+m0XlZ+ iixrjmCTGi1s+d/n6E3eFXdJUUbSOXLZaU4qrbXRzTYCZmZViryv7ibtOHXnG6oWy7BFEHuT rUW6OBvsQDTp5iQ6opENJ5/ZzSA3c5p1WS9Ezv4Bpdqcm7LTQX2j6kXikj8YqICtDF2rkKZ2 Ynjm9se9B0h/T1SOaSpbtRg05UKjsinDq2x8EeX21yFs3UyvwePLrGoNKL45EJM0xwxrnlfr M0ayKJNLoYysY78d54hg7XMmkQD/oZz9I+k4fN6CmZ2i5WGH2BgYs0313JMHxSg7zsFNBFJN zwQBEADPtS+nfTKM6PwgSWLDGVgUYQ/RLaKzCcpQAf4ryLBugXpx3s2BBT1bixX7CpsLXKQi +RRETgSFzDaBL9SEs2ZDV2YT+zGp08aijK/Yl9+RIeezAukI3c+XMHuo8ktUWJmo5/1DX07q G30ckG7uFuTnt31sFzwhh/ZeSuLFyel/fWF48KExLDIVa8DyEUJaYvE9Vfph4T/3LkKuzVTy +iwUBLiSLj5G5N70A+4usbL3eKyYrJqCSaLfrP99/nlgBhMAHVcKcv0uqSuiaH9OMqg1VjQs N8j6NDQug9QrbBTM6U7oZWF/AK+CdFoe+leq5MZfzwCevs0BQgxWm4SHMpXL2vtly67QSPMY dl96fOzw8YbKHv1o0ixhCvc37cI9oUVuSJLXKhEEAvWvLuusiuNeoz+6aPlELvD8h5txJqui tVOzctvJ7ktGZTNiz73tKYVdkKaQVyo8QJFLCNLnUulrQ5wXwteYPg6mrpBxu9VqgDrMp7eB T2kaZ4GRBoMWXXPYSIEe5PM5hhNCsSUfqrKj34UZPijPe+HiWoFJ4S5vIpzutiae11Ctki7u XzeLAhOJQB2raraIqDlFP9I9Zj9JOAZhmiKSEWKfOooCNxQYGiUdPrdYnAe+m7FXRomjF0OO gSepNIESt2gOEIbE5cMxQ0gAueNJc58eHCjWhsNJIwARAQABwsFlBBgBCgAPBQJSTc8EAhsM BQkJZgGAAAoJEJW2GBstM+nsh8EP/1sxZpkJelu+smmqaqdrGHlNrFVLOmeN5yr2IGHBUbmF htjr7fVoU8T0mUnlUU724aKPla4nWhMb4NMu+VxRRFGaT2TYpyR6VIxaStycyUdMGjdXV0Pz TGmxFXhNZXKEITXH9sIxuONBp1czl4AgwN7AAl1MKyV13AaLIyajs58mYmuXtyFn/O+4lxh5 nl2Fa3L9YkL9O7QU2p6WAnDky+L3PgUWp1AzJGfYlLZ8XXCi+KK+pnta+f9yKHt/Oqd/s7OC W4mXgFkBrfuSZZofa4eZckh5u0yBYW3OnEJhClgxRbuOhyYwqQr5oxPrQtjtbMiBzbrOkHhy NnrVCFd9EqlojREGDefHo3V+ZlUOc6OoN3CAYnNa2uLEOm5DCuqOE4z5atBCih5EyITPp7JP J2disEP6ddipcilqbnJdP+TyRQwSv5qRNy8cHahD1Cg9XJJHiC3qr+W3eOtqPkJxhU5biPEr 7dljaLS1Ij771brzqO/x5zW1L9py7muXzYBsW8+keKj8LOYs2242KgjI5Og9YhIJGBFBNddQ wxKBKQpytKQOiXwjhk4Nj77U796bsCd/jIS0r0ZUKBEptPyKso7ncfrm163aEmSaDUkiIjyp 9CEOVT87D+VAVh9PyLGP1niQzWEWFSK36tRGZlF0odP1ZB6wub9zq2DxFouSjHgH Organization: The FreeBSD Project Subject: Re: svn commit: r338059 - in head: . contrib/ntp/lib/isc contrib/ntp/sntp/libevent crypto/heimdal/lib/roken crypto/openssh include lib/libc/gen lib/libc/include sys/crypto/chacha20 Message-ID: <2012d319-ef2b-d734-5f1a-7b11d9511024@FreeBSD.org> Date: Sun, 19 Aug 2018 12:12:25 -0700 User-Agent: Thunderbird MIME-Version: 1.0 In-Reply-To: <1534703254.27158.41.camel@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HpnDT9IALga4s6AAzS10JJ8WFF6frutrF" 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, 19 Aug 2018 19:12:28 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HpnDT9IALga4s6AAzS10JJ8WFF6frutrF Content-Type: multipart/mixed; boundary="jScKxObTQ7OxANfKZokTRg4DqRAxvR03P"; protected-headers="v1" From: Xin Li To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <2012d319-ef2b-d734-5f1a-7b11d9511024@FreeBSD.org> Subject: Re: svn commit: r338059 - in head: . contrib/ntp/lib/isc contrib/ntp/sntp/libevent crypto/heimdal/lib/roken crypto/openssh include lib/libc/gen lib/libc/include sys/crypto/chacha20 References: <201808191740.w7JHeoSj052259@repo.freebsd.org> <1534703254.27158.41.camel@freebsd.org> In-Reply-To: <1534703254.27158.41.camel@freebsd.org> --jScKxObTQ7OxANfKZokTRg4DqRAxvR03P Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 8/19/18 11:27, Ian Lepore wrote: > On Sun, 2018-08-19 at 17:40 +0000, Xin LI wrote: >> Author: delphij >> Date: Sun Aug 19 17:40:50 2018 >> New Revision: 338059 >> URL: https://svnweb.freebsd.org/changeset/base/338059 >> >> Log: >> =C2=A0 Update userland arc4random() with OpenBSD's Chacha20 based >> arc4random(). >> =C2=A0=C2=A0 >> =C2=A0=C2=A0=C2=A0=C2=A0ObsoleteFiles.inc: >> =C2=A0=C2=A0 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Remove manual pages for arc4random= _addrandom(3) and >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0arc4random_stir(3). >> =C2=A0=C2=A0 >> =C2=A0=C2=A0=C2=A0=C2=A0contrib/ntp/lib/isc/random.c: >> =C2=A0=C2=A0=C2=A0=C2=A0contrib/ntp/sntp/libevent/evutil_rand.c: >> =C2=A0=C2=A0 >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Eliminate in-tree usage of arc4ran= dom_addrandom(). >> =C2=A0=C2=A0 >=20 > If we don't feed changes for this back upstream, we're going to have to= I'll send these to upstream. > carry diffs from mainline ntpd forever now. The upstream project is > receptive to taking diffs from us, but I guess we'd have to figure out > how to write some autotools detection to create some new HAVE_xxxx > variables for wrapping these calls. Calling arc4random_stir() is not required since ~2000. > Also, does this imply that the ntpd port will fail to build now? I > would imagine removing such fundamental routines would affect many > ports. Not right now (due to the existence of stdlib.h shims). > All in all, if it's just a matter of our implementation not needing > these functions, wouldn't it be better to implement them as no-ops and > document them as such existing only to aid porting existing code? They are implemented as ABI shims but my intention (bug 230756) is to remove the obsolete APIs (after a full exprun and have the callers fixed, of course). It's reasonable to provide ABI compatibility (they will remain) but we should fix ports if they are still doing something that is not needed ~18 years ago :) Cheers, --jScKxObTQ7OxANfKZokTRg4DqRAxvR03P-- --HpnDT9IALga4s6AAzS10JJ8WFF6frutrF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJbecEZAAoJEJW2GBstM+nsyIUP/1rIc+sHC3pKpqFzIPi1mVK9 QYCfhY/jZ+TSxFP5DyHCS6D2/3ixowrCN6Qw/lssriV3asmPcmuLnY+n+OKUENF/ gxdI/77gOWw0olVx+5kWOHn5KMfIXt6s39oWRU6X771iVOpaFrhdXIjnTXna3GVv exS8F29l4DwJyfgb8xDq1HEV19g1ZD38SgCQ/iBXHdAj23NEEKL+f/By2WDagi+R DSH/Y95SDVrQz9znzB4XKeJ+zMy5uyzP3h560tan2ybVuqJrNxHTUyQxCgw8Ga6b P5s7ztgjlweXf3cdzNSUnHcYUAUyeqLfU9PNVNSRabIc21aBoWZo4Fkum83sQ2bh okHupDpXm309vAPPcISv7y34gV4s70++BJ9e9MVLBXxW3pk0/0cXmHkVJxo+xrsY 9toR6uHjAXjA+MH0Sw097diKgAefIK2vXZJQ1+zyMsTtmGxVPUv7D7u86quUe03Z f6q1zTeb4D3aejgF1auPPLdwjJX257fSr8J3sTCbis2f/ktvFDPdvV+gD3YNhJmW BPJLgGKjeykjWdlmj1fZarxgtYQPDGyGSjV8JJSb8ykj/711/JvVSa7JQifoRaRe 7MAhT0GIb40EHBfZc63frB5b9Iv2VqUddKjTRYNORkrk/pwkKUPFvKh1/KgP8ij/ VTb56rUXVEQy7jDvwJ27 =uP73 -----END PGP SIGNATURE----- --HpnDT9IALga4s6AAzS10JJ8WFF6frutrF-- From owner-svn-src-head@freebsd.org Sun Aug 19 20:52:33 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 9CFB51077809 for ; Sun, 19 Aug 2018 20:52:33 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic314-14.consmr.mail.bf2.yahoo.com (sonic314-14.consmr.mail.bf2.yahoo.com [74.6.132.124]) (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 464878A5EF for ; Sun, 19 Aug 2018 20:52:33 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: FMTeHJ0VM1lVi5y.8LRPKPgGi7vtFbmV8rbvw1olvIriQPf1_E1YCAkv4X7ww4Z mwInDDwgtQEtdtIMdNTUkKYU7gDzjCBQKQ_I8RpwN_lXKsEylyNzGIbHbHDOpwnwevZ2UscyVFQJ _KiOFXnfGEmt_cajLgfzUFfT.s36EXJl.3pNeDOkmsnK9JMUv00BdqNglEIoiX3vLQ0dr3qlfQVl i9pXlsUQGqCtTZJfpdWbXUdZcK78IrIFpA.binaXwebD_jisRx.6fFE2S7A117KEFKS9SPSPKbSm .L8PNjfq_43itITtKCku3D6pK_uBZnSDU32J41jGhWTz2C535W.pfAijiZT1FH8JKXUiDin5mr_N aX9FsatryM1_IGzNRNgt4huqvmUE6SjSJ2wPOOOgHoyGj2pMjINkR7z9Auh9uL7pLxC5i0MPRY7c OI4omPBJMQnFnva8kE3bd6.2H.gdpdzgLOOJtO0Vs4gvApJFvosNSwF14sue._4V2pc5AzsIDFGA H.szIpzALJ_BF8psyo9KFUIXFCbIETx.h8zva.zRVQC7sYofrYOle1vruXkGgBi87U9B1tMc6.xX GUqWpLG0Vb_0SFZovGDtHk6Qp_VlaIvS2hnrn4MKWzTzsdz0ynwZm0YOLclWRV2_b76QecOfz_2n PFUnHi53LVN.VAHlygC8.vA9iIl31nfIJZZCMrU9aMh6thQCMhEXijNgarfenYGeFywNkW_1c7du X7JBe3maTuQFFBZWohodK1HoX.4eieOY3A.xblmE0GLpeuI.WgrKdLSzwSK0G9Vuojip1E9OouZ7 rU5fRPD9gB9c9n_8u3Oe1RF_hLLZ3TH7HqWkY3c9BKpTg8rqnm9MLZPVTNtkDW_wAI3FQsDmjAYx Xw6wAPB1INEe1m06SFIBJOAFLfIAkzAFYq0c8eXTu4esSZOpjRr0wOCbA20XIovOIJJ74mWnOrCr VWzwAy766YLlNs_XL1.i7vcr.3j59SNk9cbpCI3.TsnqzrdHX3shl0qRCWvk3uCfQE4X1XQ1sos. MwoI- Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.bf2.yahoo.com with HTTP; Sun, 19 Aug 2018 20:52:27 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp425.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 09afed3c8d9021db22478df7c621369f; Sun, 19 Aug 2018 20:52:24 +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: r338059 - in head: Seems to have lead to "Bad system call" in ci.freebsd.org's FreeBSD-head-amd64-testvm Message-Id: Date: Sun, 19 Aug 2018 13:52:22 -0700 To: delphij@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: Sun, 19 Aug 2018 20:52:33 -0000 -r338057 built fine for both then: https://ci.freebsd.org/job/FreeBSD-head-amd64-testvm/9265/console of -r338065 shows: (so after "deprecation of arc4random_stir and arc4random_addrandom") 19:38:13 + sudo chroot ufs env 'ASSUME_ALWAYS_YES=3Dyes' pkg update 19:38:13 Bad system call 19:38:13 Build step 'Execute shell' marked build as failure 19:38:13 FTP: Current build result is [FAILURE], not going to run. 19:38:13 [PostBuildScript] - Executing post build scripts. 19:38:13 [FreeBSD-head-amd64-testvm] $ /bin/sh -xe = /tmp/jenkins7995907498943424274.sh 19:38:13 + sh freebsd-ci/scripts/jail/clean.sh 19:38:13 clean jail FreeBSD-head-amd64-testvm 19:38:41 Finished: FAILURE instead of (from the prior successful one): 18:37:15 + sudo chroot ufs env 'ASSUME_ALWAYS_YES=3Dyes' pkg update 18:37:15 [FreeBSD-head-amd64-testvm.jail.ci.FreeBSD.org] Installing = pkg-1.10.5_1... 18:37:15 [FreeBSD-head-amd64-testvm.jail.ci.FreeBSD.org] Extracting = pkg-1.10.5_1: .......... done 18:37:15 Updating FreeBSD repository catalogue... 18:37:15 pkg: Repository FreeBSD load error: access repo = file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory 18:37:15 [FreeBSD-head-amd64-testvm.jail.ci.FreeBSD.org] Fetching = meta.txz: . done 18:37:15 [FreeBSD-head-amd64-testvm.jail.ci.FreeBSD.org] Fetching = packagesite.txz: .......... done 18:37:16 Processing entries: .......... done 18:37:25 FreeBSD repository update completed. 32107 packages processed. 18:37:25 All repositories are up to date. . . . =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 Sun Aug 19 21:10: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 0F5FB1078A0E; Sun, 19 Aug 2018 21:10:28 +0000 (UTC) (envelope-from mmacy@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 B7E268B798; Sun, 19 Aug 2018 21:10:27 +0000 (UTC) (envelope-from mmacy@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 94F533E77; Sun, 19 Aug 2018 21:10:27 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7JLAR7q062178; Sun, 19 Aug 2018 21:10:27 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JLALjH062150; Sun, 19 Aug 2018 21:10:21 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201808192110.w7JLALjH062150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 19 Aug 2018 21:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338074 - in head/sys: arm/nvidia dev/acpica dev/uart mips/atheros mips/atheros/ar531x mips/broadcom mips/cavium mips/ingenic mips/malta modules/uart powerpc/psim sparc64/pci X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: arm/nvidia dev/acpica dev/uart mips/atheros mips/atheros/ar531x mips/broadcom mips/cavium mips/ingenic mips/malta modules/uart powerpc/psim sparc64/pci X-SVN-Commit-Revision: 338074 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, 19 Aug 2018 21:10:28 -0000 Author: mmacy Date: Sun Aug 19 21:10:21 2018 New Revision: 338074 URL: https://svnweb.freebsd.org/changeset/base/338074 Log: add snps IP uart support / genaralize UART This is an amalgam of a patch by Doug Ambrisko to generalize uart_acpi_find_device, imp moving the ACPI table to uart_dev_ns8250.c and advice by jhb to work around a bug in the EPYC 3151 BIOS (the BIOS incorrectly marks the serial ports as disabled) Reviewed by: imp MFC after: 8 weeks Differential Revision: https://reviews.freebsd.org/D16432 Modified: head/sys/arm/nvidia/tegra_uart.c head/sys/dev/acpica/acpi.c head/sys/dev/uart/uart_bus.h head/sys/dev/uart/uart_bus_acpi.c head/sys/dev/uart/uart_bus_ebus.c head/sys/dev/uart/uart_bus_fdt.c head/sys/dev/uart/uart_bus_isa.c head/sys/dev/uart/uart_bus_pccard.c head/sys/dev/uart/uart_bus_pci.c head/sys/dev/uart/uart_bus_puc.c head/sys/dev/uart/uart_bus_scc.c head/sys/dev/uart/uart_core.c head/sys/dev/uart/uart_cpu_acpi.h head/sys/dev/uart/uart_cpu_arm64.c head/sys/dev/uart/uart_dev_ns8250.c head/sys/dev/uart/uart_dev_pl011.c head/sys/dev/uart/uart_dev_snps.c head/sys/mips/atheros/ar531x/uart_bus_ar5315.c head/sys/mips/atheros/uart_bus_ar71xx.c head/sys/mips/atheros/uart_bus_ar933x.c head/sys/mips/broadcom/uart_bus_chipc.c head/sys/mips/cavium/uart_bus_octeonusart.c head/sys/mips/ingenic/jz4780_uart.c head/sys/mips/malta/uart_bus_maltausart.c head/sys/modules/uart/Makefile head/sys/powerpc/psim/uart_iobus.c head/sys/sparc64/pci/sbbc.c Modified: head/sys/arm/nvidia/tegra_uart.c ============================================================================== --- head/sys/arm/nvidia/tegra_uart.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/arm/nvidia/tegra_uart.c Sun Aug 19 21:10:21 2018 (r338074) @@ -216,7 +216,7 @@ tegra_uart_probe(device_t dev) device_printf(dev, "Cannot enable UART clock: %d\n", rv); return (ENXIO); } - return (uart_bus_probe(dev, shift, 0, (int)freq, 0, 0)); + return (uart_bus_probe(dev, shift, 0, (int)freq, 0, 0, 0)); } static int Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/acpica/acpi.c Sun Aug 19 21:10:21 2018 (r338074) @@ -2221,6 +2221,15 @@ acpi_DeviceIsPresent(device_t dev) return (FALSE); status = acpi_GetInteger(h, "_STA", &s); + /* + * Onboard serial ports on certain AMD motherboards have an invalid _STA + * method that always returns 0. Force them to always be treated as present. + * + * This may solely be a quirk of a preproduction BIOS. + */ + if (acpi_MatchHid(h, "AMDI0020") || acpi_MatchHid(h, "AMDI0010")) + return (TRUE); + /* If no _STA method, must be present */ if (ACPI_FAILURE(status)) return (status == AE_NOT_FOUND ? TRUE : FALSE); Modified: head/sys/dev/uart/uart_bus.h ============================================================================== --- head/sys/dev/uart/uart_bus.h Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_bus.h Sun Aug 19 21:10:21 2018 (r338074) @@ -56,6 +56,9 @@ #define UART_IOCTL_OFLOW 3 #define UART_IOCTL_BAUD 4 +/* UART quirk flags */ +#define UART_F_BUSY_DETECT 0x1 + /* * UART class & instance (=softc) */ @@ -140,7 +143,7 @@ int uart_bus_detach(device_t dev); int uart_bus_resume(device_t dev); serdev_intr_t *uart_bus_ihand(device_t dev, int ipend); int uart_bus_ipend(device_t dev); -int uart_bus_probe(device_t dev, int regshft, int regiowidth, int rclk, int rid, int chan); +int uart_bus_probe(device_t dev, int regshft, int regiowidth, int rclk, int rid, int chan, int quirks); int uart_bus_sysdev(device_t dev); void uart_sched_softih(struct uart_softc *, uint32_t); Modified: head/sys/dev/uart/uart_bus_acpi.c ============================================================================== --- head/sys/dev/uart/uart_bus_acpi.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_bus_acpi.c Sun Aug 19 21:10:21 2018 (r338074) @@ -37,18 +37,14 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include #include - -#ifdef __aarch64__ #include #include #include -#endif + static int uart_acpi_probe(device_t dev); static device_method_t uart_acpi_methods[] = { @@ -66,59 +62,40 @@ static driver_t uart_acpi_driver = { sizeof(struct uart_softc), }; -#if defined(__i386__) || defined(__amd64__) -static struct isa_pnp_id acpi_ns8250_ids[] = { - {0x0005d041, "Standard PC COM port"}, /* PNP0500 */ - {0x0105d041, "16550A-compatible COM port"}, /* PNP0501 */ - {0x0205d041, "Multiport serial device (non-intelligent 16550)"}, /* PNP0502 */ - {0x1005d041, "Generic IRDA-compatible device"}, /* PNP0510 */ - {0x1105d041, "Generic IRDA-compatible device"}, /* PNP0511 */ - {0x04f0235c, "Wacom Tablet PC Screen"}, /* WACF004 */ - {0x0ef0235c, "Wacom Tablet PC Screen 00e"}, /* WACF00e */ - {0xe502aa1a, "Wacom Tablet at FuS Lifebook T"}, /* FUJ02E5 */ - {0} -}; -#endif - -#ifdef __aarch64__ -static struct uart_class * +static struct acpi_uart_compat_data * uart_acpi_find_device(device_t dev) { - struct acpi_uart_compat_data **cd; + struct acpi_uart_compat_data **cd, *cd_it; ACPI_HANDLE h; if ((h = acpi_get_handle(dev)) == NULL) return (NULL); SET_FOREACH(cd, uart_acpi_class_and_device_set) { - if (acpi_MatchHid(h, (*cd)->hid)) { - return ((*cd)->clas); + for (cd_it = *cd; cd_it->cd_hid != NULL; cd_it++) { + if (acpi_MatchHid(h, cd_it->cd_hid)) + return (cd_it); } } return (NULL); } -#endif static int uart_acpi_probe(device_t dev) { struct uart_softc *sc; + struct acpi_uart_compat_data *cd; sc = device_get_softc(dev); -#if defined(__i386__) || defined(__amd64__) - if (!ISA_PNP_PROBE(device_get_parent(dev), dev, acpi_ns8250_ids)) { - sc->sc_class = &uart_ns8250_class; - return (uart_bus_probe(dev, 0, 0, 0, 0, 0)); + if ((cd = uart_acpi_find_device(dev)) != NULL) { + sc->sc_class = cd->cd_class; + if (cd->cd_desc != NULL) + device_set_desc(dev, cd->cd_desc); + return (uart_bus_probe(dev, cd->cd_regshft, cd->cd_regiowidth, + cd->cd_rclk, 0, 0, cd->cd_quirks)); } - - /* Add checks for non-ns8250 IDs here. */ -#elif defined(__aarch64__) - if ((sc->sc_class = uart_acpi_find_device(dev)) != NULL) - return (uart_bus_probe(dev, 2, 0, 0, 0, 0)); -#endif - return (ENXIO); } Modified: head/sys/dev/uart/uart_bus_ebus.c ============================================================================== --- head/sys/dev/uart/uart_bus_ebus.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_bus_ebus.c Sun Aug 19 21:10:21 2018 (r338074) @@ -99,7 +99,7 @@ uart_ebus_probe(device_t dev) return (ENXIO); } sc->sc_class = &uart_ns8250_class; - return (uart_bus_probe(dev, 0, 0, 0, 0, 0)); + return (uart_bus_probe(dev, 0, 0, 0, 0, 0, 0)); } return (ENXIO); Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_bus_fdt.c Sun Aug 19 21:10:21 2018 (r338074) @@ -278,7 +278,7 @@ uart_fdt_probe(device_t dev) if (uart_fdt_get_io_width(node, &iowidth) != 0) iowidth = uart_getregiowidth(sc->sc_class); - return (uart_bus_probe(dev, (int)shift, (int)iowidth, (int)clock, 0, 0)); + return (uart_bus_probe(dev, (int)shift, (int)iowidth, (int)clock, 0, 0, 0)); } DRIVER_MODULE(uart, simplebus, uart_fdt_driver, uart_devclass, 0, 0); Modified: head/sys/dev/uart/uart_bus_isa.c ============================================================================== --- head/sys/dev/uart/uart_bus_isa.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_bus_isa.c Sun Aug 19 21:10:21 2018 (r338074) @@ -168,7 +168,7 @@ uart_isa_probe(device_t dev) /* Probe PnP _and_ non-PnP ns8250 here. */ sc->sc_class = &uart_ns8250_class; - return (uart_bus_probe(dev, 0, 0, 0, 0, 0)); + return (uart_bus_probe(dev, 0, 0, 0, 0, 0, 0)); } DRIVER_MODULE(uart, isa, uart_isa_driver, uart_devclass, 0, 0); Modified: head/sys/dev/uart/uart_bus_pccard.c ============================================================================== --- head/sys/dev/uart/uart_bus_pccard.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_bus_pccard.c Sun Aug 19 21:10:21 2018 (r338074) @@ -95,7 +95,7 @@ uart_pccard_attach(device_t dev) sc = device_get_softc(dev); sc->sc_class = &uart_ns8250_class; - error = uart_bus_probe(dev, 0, 0, 0, 0, 0); + error = uart_bus_probe(dev, 0, 0, 0, 0, 0, 0); if (error > 0) return (error); return (uart_bus_attach(dev)); Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_bus_pci.c Sun Aug 19 21:10:21 2018 (r338074) @@ -206,7 +206,7 @@ uart_pci_probe(device_t dev) return (ENXIO); match: - result = uart_bus_probe(dev, id->regshft, 0, id->rclk, id->rid, 0); + result = uart_bus_probe(dev, id->regshft, 0, id->rclk, id->rid, 0, 0); /* Bail out on error. */ if (result > 0) return (result); Modified: head/sys/dev/uart/uart_bus_puc.c ============================================================================== --- head/sys/dev/uart/uart_bus_puc.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_bus_puc.c Sun Aug 19 21:10:21 2018 (r338074) @@ -83,7 +83,7 @@ uart_puc_probe(device_t dev) if (BUS_READ_IVAR(parent, dev, PUC_IVAR_CLOCK, &rclk)) rclk = 0; - return (uart_bus_probe(dev, 0, 0, rclk, 0, 0)); + return (uart_bus_probe(dev, 0, 0, rclk, 0, 0, 0)); } DRIVER_MODULE(uart, puc, uart_puc_driver, uart_devclass, 0, 0); Modified: head/sys/dev/uart/uart_bus_scc.c ============================================================================== --- head/sys/dev/uart/uart_bus_scc.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_bus_scc.c Sun Aug 19 21:10:21 2018 (r338074) @@ -114,7 +114,7 @@ uart_scc_probe(device_t dev) BUS_READ_IVAR(parent, dev, SCC_IVAR_REGSHFT, &rs)) return (ENXIO); - return (uart_bus_probe(dev, rs, 0, cl, 0, ch)); + return (uart_bus_probe(dev, rs, 0, cl, 0, ch, 0)); } DRIVER_MODULE(uart, scc, uart_scc_driver, uart_devclass, 0, 0); Modified: head/sys/dev/uart/uart_core.c ============================================================================== --- head/sys/dev/uart/uart_core.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_core.c Sun Aug 19 21:10:21 2018 (r338074) @@ -493,7 +493,7 @@ uart_bus_sysdev(device_t dev) } int -uart_bus_probe(device_t dev, int regshft, int regiowidth, int rclk, int rid, int chan) +uart_bus_probe(device_t dev, int regshft, int regiowidth, int rclk, int rid, int chan, int quirks) { struct uart_softc *sc; struct uart_devinfo *sysdev; @@ -553,6 +553,7 @@ uart_bus_probe(device_t dev, int regshft, int regiowid sc->sc_bas.regshft = regshft; sc->sc_bas.regiowidth = regiowidth; sc->sc_bas.rclk = (rclk == 0) ? sc->sc_class->uc_rclk : rclk; + sc->sc_bas.busy_detect = !!(quirks & UART_F_BUSY_DETECT); SLIST_FOREACH(sysdev, &uart_sysdevs, next) { if (chan == sysdev->bas.chan && Modified: head/sys/dev/uart/uart_cpu_acpi.h ============================================================================== --- head/sys/dev/uart/uart_cpu_acpi.h Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_cpu_acpi.h Sun Aug 19 21:10:21 2018 (r338074) @@ -38,9 +38,15 @@ struct uart_class; struct acpi_uart_compat_data { - const char *hid; - struct uart_class *clas; - uint16_t port_subtype; + const char *cd_hid; + struct uart_class *cd_class; + + uint16_t cd_port_subtype; + int cd_regshft; + int cd_regiowidth; + int cd_rclk; + int cd_quirks; + const char *cd_desc; }; /* Modified: head/sys/dev/uart/uart_cpu_arm64.c ============================================================================== --- head/sys/dev/uart/uart_cpu_arm64.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_cpu_arm64.c Sun Aug 19 21:10:21 2018 (r338074) @@ -88,16 +88,16 @@ uart_cpu_acpi_scan(uint8_t interface_type) SET_FOREACH(cd, uart_acpi_class_and_device_set) { curcd = *cd; - for (i = 0; curcd[i].hid != NULL; i++) { - if (curcd[i].port_subtype == interface_type) + for (i = 0; curcd[i].cd_hid != NULL; i++) { + if (curcd[i].cd_port_subtype == interface_type) return (&curcd[i]); } } SET_FOREACH(cd, uart_acpi_class_set) { curcd = *cd; - for (i = 0; curcd[i].hid != NULL; i++) { - if (curcd[i].port_subtype == interface_type) + for (i = 0; curcd[i].cd_hid != NULL; i++) { + if (curcd[i].cd_port_subtype == interface_type) return (&curcd[i]); } } @@ -147,7 +147,7 @@ uart_cpu_acpi_probe(struct uart_class **classp, bus_sp if (err != 0) goto out; - *classp = cd->clas; + *classp = cd->cd_class; *rclk = 0; *shiftp = 2; *iowidthp = spcr->SerialPort.BitWidth / 8; Modified: head/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- head/sys/dev/uart/uart_dev_ns8250.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_dev_ns8250.c Sun Aug 19 21:10:21 2018 (r338074) @@ -26,6 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "opt_acpi.h" #include "opt_platform.h" #include "opt_uart.h" @@ -54,6 +55,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef DEV_ACPI +#include +#endif #include @@ -403,6 +407,26 @@ struct uart_class uart_ns8250_class = { .uc_rclk = DEFAULT_RCLK, .uc_rshift = 0 }; + +/* + * XXX -- refactor out ACPI and FDT ifdefs + */ +#ifdef DEV_ACPI +static struct acpi_uart_compat_data acpi_compat_data[] = { + {"AMD0020", &uart_ns8250_class, 0, 2, 0, 48000000, UART_F_BUSY_DETECT, "AMD / Synopsys Designware UART"}, + {"AMDI0020", &uart_ns8250_class, 0, 2, 0, 48000000, UART_F_BUSY_DETECT, "AMD / Synopsys Designware UART"}, + {"PNP0500", &uart_ns8250_class, 0, 0, 0, 0, 0, "Standard PC COM port"}, + {"PNP0501", &uart_ns8250_class, 0, 0, 0, 0, 0, "16550A-compatible COM port"}, + {"PNP0502", &uart_ns8250_class, 0, 0, 0, 0, 0, "Multiport serial device (non-intelligent 16550)"}, + {"PNP0510", &uart_ns8250_class, 0, 0, 0, 0, 0, "Generic IRDA-compatible device"}, + {"PNP0511", &uart_ns8250_class, 0, 0, 0, 0, 0, "Generic IRDA-compatible device"}, + {"WACF004", &uart_ns8250_class, 0, 0, 0, 0, 0, "Wacom Tablet PC Screen"}, + {"WACF00E", &uart_ns8250_class, 0, 0, 0, 0, 0, "Wacom Tablet PC Screen 00e"}, + {"FUJ02E5", &uart_ns8250_class, 0, 0, 0, 0, 0, "Wacom Tablet at FuS Lifebook T"}, + {NULL, NULL, 0, 0 , 0, 0, 0, NULL}, +}; +UART_ACPI_CLASS_AND_DEVICE(acpi_compat_data); +#endif #ifdef FDT static struct ofw_compat_data compat_data[] = { Modified: head/sys/dev/uart/uart_dev_pl011.c ============================================================================== --- head/sys/dev/uart/uart_dev_pl011.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_dev_pl011.c Sun Aug 19 21:10:21 2018 (r338074) @@ -342,9 +342,9 @@ UART_FDT_CLASS_AND_DEVICE(fdt_compat_data); #ifdef DEV_ACPI static struct acpi_uart_compat_data acpi_compat_data[] = { - {"ARMH0011", &uart_pl011_class, ACPI_DBG2_ARM_PL011}, - {"ARMH0011", &uart_pl011_class, ACPI_DBG2_ARM_SBSA_GENERIC}, - {NULL, NULL, 0}, + {"ARMH0011", &uart_pl011_class, ACPI_DBG2_ARM_PL011, 2, 0, 0, 0, "uart plo11"}, + {"ARMH0011", &uart_pl011_class, ACPI_DBG2_ARM_SBSA_GENERIC, 2, 0, 0, 0, "uart plo11"}, + {NULL, NULL, 0, 0, 0, 0, 0, NULL}, }; UART_ACPI_CLASS_AND_DEVICE(acpi_compat_data); #endif Modified: head/sys/dev/uart/uart_dev_snps.c ============================================================================== --- head/sys/dev/uart/uart_dev_snps.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/dev/uart/uart_dev_snps.c Sun Aug 19 21:10:21 2018 (r338074) @@ -99,22 +99,9 @@ early_putc_t *early_putc = uart_snps_early_putc; #endif /* EARLY_PRINTF */ #endif -static int -snps_uart_attach(struct uart_softc *uart_sc) -{ - struct snps_softc *sc; - - sc = (struct snps_softc *)uart_sc; - - /* UART requires to read USR reg when IIR_BUSY */ - uart_sc->sc_bas.busy_detect = 1; - - return (ns8250_bus_attach(uart_sc)); -} - static kobj_method_t snps_methods[] = { KOBJMETHOD(uart_probe, ns8250_bus_probe), - KOBJMETHOD(uart_attach, snps_uart_attach), + KOBJMETHOD(uart_attach, ns8250_bus_attach), KOBJMETHOD(uart_detach, ns8250_bus_detach), KOBJMETHOD(uart_flush, ns8250_bus_flush), KOBJMETHOD(uart_getsig, ns8250_bus_getsig), @@ -238,7 +225,7 @@ snps_probe(device_t dev) if (bootverbose && clock == 0) device_printf(dev, "could not determine frequency\n"); - error = uart_bus_probe(dev, (int)shift, (int)iowidth, (int)clock, 0, 0); + error = uart_bus_probe(dev, (int)shift, (int)iowidth, (int)clock, 0, 0, UART_F_BUSY_DETECT); if (error != 0) return (error); Modified: head/sys/mips/atheros/ar531x/uart_bus_ar5315.c ============================================================================== --- head/sys/mips/atheros/ar531x/uart_bus_ar5315.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/mips/atheros/ar531x/uart_bus_ar5315.c Sun Aug 19 21:10:21 2018 (r338074) @@ -83,7 +83,7 @@ uart_ar5315_probe(device_t dev) sc->sc_bas.bst = mips_bus_space_generic; sc->sc_bas.bsh = ar531x_uart_addr() + 3; - return (uart_bus_probe(dev, 2, 0, freq, 0, 0)); + return (uart_bus_probe(dev, 2, 0, freq, 0, 0, 0)); } DRIVER_MODULE(uart, apb, uart_ar5315_driver, uart_devclass, 0, 0); Modified: head/sys/mips/atheros/uart_bus_ar71xx.c ============================================================================== --- head/sys/mips/atheros/uart_bus_ar71xx.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/mips/atheros/uart_bus_ar71xx.c Sun Aug 19 21:10:21 2018 (r338074) @@ -85,7 +85,7 @@ uart_ar71xx_probe(device_t dev) sc->sc_bas.bst = mips_bus_space_generic; sc->sc_bas.bsh = MIPS_PHYS_TO_KSEG1(AR71XX_UART_ADDR) + 3; - return (uart_bus_probe(dev, 2, 0, freq, 0, 0)); + return (uart_bus_probe(dev, 2, 0, freq, 0, 0, 0)); } #ifdef EARLY_PRINTF Modified: head/sys/mips/atheros/uart_bus_ar933x.c ============================================================================== --- head/sys/mips/atheros/uart_bus_ar933x.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/mips/atheros/uart_bus_ar933x.c Sun Aug 19 21:10:21 2018 (r338074) @@ -90,7 +90,7 @@ uart_ar933x_probe(device_t dev) sc->sc_bas.bst = mips_bus_space_generic; sc->sc_bas.bsh = MIPS_PHYS_TO_KSEG1(AR71XX_UART_ADDR); - return (uart_bus_probe(dev, 2, 0, freq, 0, 0)); + return (uart_bus_probe(dev, 2, 0, freq, 0, 0, 0)); } /* Modified: head/sys/mips/broadcom/uart_bus_chipc.c ============================================================================== --- head/sys/mips/broadcom/uart_bus_chipc.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/mips/broadcom/uart_bus_chipc.c Sun Aug 19 21:10:21 2018 (r338074) @@ -61,7 +61,7 @@ uart_chipc_probe(device_t dev) sc->sc_class = &uart_ns8250_class; rclk = bcm_get_uart_rclk(bcm_get_platform()); - return (uart_bus_probe(dev, 0, 0, rclk, 0, 0)); + return (uart_bus_probe(dev, 0, 0, rclk, 0, 0, 0)); } static device_method_t uart_chipc_methods[] = { Modified: head/sys/mips/cavium/uart_bus_octeonusart.c ============================================================================== --- head/sys/mips/cavium/uart_bus_octeonusart.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/mips/cavium/uart_bus_octeonusart.c Sun Aug 19 21:10:21 2018 (r338074) @@ -107,7 +107,7 @@ uart_octeon_probe(device_t dev) if (bus_space_map(sc->sc_bas.bst, CVMX_MIO_UARTX_RBR(0), uart_getrange(sc->sc_class), 0, &sc->sc_bas.bsh) != 0) return (ENXIO); - return (uart_bus_probe(dev, sc->sc_bas.regshft, 0, 0, 0, unit)); + return (uart_bus_probe(dev, sc->sc_bas.regshft, 0, 0, 0, unit, 0)); } DRIVER_MODULE(uart, obio, uart_octeon_driver, uart_devclass, 0, 0); Modified: head/sys/mips/ingenic/jz4780_uart.c ============================================================================== --- head/sys/mips/ingenic/jz4780_uart.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/mips/ingenic/jz4780_uart.c Sun Aug 19 21:10:21 2018 (r338074) @@ -179,7 +179,7 @@ jz4780_uart_probe(device_t dev) device_printf(dev, "got UART clock: %lld\n", freq); sc->ns8250_base.base.sc_class = (struct uart_class *)cd->ocd_data; shift = jz4780_uart_get_shift(dev); - return (uart_bus_probe(dev, shift, 0, (int)freq, 0, 0)); + return (uart_bus_probe(dev, shift, 0, (int)freq, 0, 0, 0)); } static int Modified: head/sys/mips/malta/uart_bus_maltausart.c ============================================================================== --- head/sys/mips/malta/uart_bus_maltausart.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/mips/malta/uart_bus_maltausart.c Sun Aug 19 21:10:21 2018 (r338074) @@ -87,7 +87,7 @@ uart_malta_probe(device_t dev) sc->sc_sysdev->bas.bsh = MIPS_PHYS_TO_KSEG1(MALTA_UART0ADR); sc->sc_bas.bst = mips_bus_space_generic; sc->sc_bas.bsh = MIPS_PHYS_TO_KSEG1(MALTA_UART0ADR); - return(uart_bus_probe(dev, 0, 0, 0, 0, 0)); + return(uart_bus_probe(dev, 0, 0, 0, 0, 0, 0)); } DRIVER_MODULE(uart, obio, uart_malta_driver, uart_devclass, 0, 0); Modified: head/sys/modules/uart/Makefile ============================================================================== --- head/sys/modules/uart/Makefile Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/modules/uart/Makefile Sun Aug 19 21:10:21 2018 (r338074) @@ -2,6 +2,11 @@ .PATH: ${SRCTOP}/sys/dev/uart +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "i386" +uart_bus_acpi=uart_bus_acpi.c +.endif + .if ${MACHINE_CPUARCH} == "sparc64" uart_bus_ebus= uart_bus_ebus.c .endif @@ -27,7 +32,7 @@ uart_dev_mu=uart_dev_mu.c .endif KMOD= uart -SRCS= uart_bus_acpi.c ${uart_bus_ebus} uart_bus_isa.c uart_bus_pccard.c \ +SRCS= ${uart_bus_acpi} ${uart_bus_ebus} uart_bus_isa.c uart_bus_pccard.c \ uart_bus_pci.c uart_bus_puc.c uart_bus_scc.c \ uart_core.c ${uart_cpu_machine} uart_dbg.c \ ${uart_dev_mvebu} uart_dev_ns8250.c ${uart_dev_mu} \ @@ -37,6 +42,6 @@ SRCS= uart_bus_acpi.c ${uart_bus_ebus} uart_bus_isa.c SRCS+= acpi_if.h bus_if.h card_if.h device_if.h isa_if.h ${ofw_bus_if} \ pci_if.h \ power_if.h pccarddevs.h serdev_if.h -SRCS+= opt_platform.h opt_uart.h +SRCS+= opt_acpi.h opt_platform.h opt_uart.h .include Modified: head/sys/powerpc/psim/uart_iobus.c ============================================================================== --- head/sys/powerpc/psim/uart_iobus.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/powerpc/psim/uart_iobus.c Sun Aug 19 21:10:21 2018 (r338074) @@ -83,7 +83,7 @@ uart_iobus_probe(device_t dev) sc->sc_class = &uart_ns8250_class; device_set_desc(dev, "PSIM serial port"); - return (uart_bus_probe(dev, 0, 0, 0, 0, 0)); + return (uart_bus_probe(dev, 0, 0, 0, 0, 0, 0)); } DRIVER_MODULE(uart, iobus, uart_iobus_driver, uart_devclass, 0, 0); Modified: head/sys/sparc64/pci/sbbc.c ============================================================================== --- head/sys/sparc64/pci/sbbc.c Sun Aug 19 19:07:59 2018 (r338073) +++ head/sys/sparc64/pci/sbbc.c Sun Aug 19 21:10:21 2018 (r338074) @@ -620,7 +620,7 @@ sbbc_uart_sbbc_probe(device_t dev) sc = device_get_softc(dev); sc->sc_class = &uart_sbbc_class; device_set_desc(dev, "Serengeti console"); - return (uart_bus_probe(dev, 0, 0, 0, SBBC_PCI_BAR, 0)); + return (uart_bus_probe(dev, 0, 0, 0, SBBC_PCI_BAR, 0, 0)); } /* From owner-svn-src-head@freebsd.org Sun Aug 19 21:37: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 0B17C107915F; Sun, 19 Aug 2018 21:37:52 +0000 (UTC) (envelope-from jmg@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 A377E8C44F; Sun, 19 Aug 2018 21:37:51 +0000 (UTC) (envelope-from jmg@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 7E5EE439A; Sun, 19 Aug 2018 21:37:51 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7JLbpYA077329; Sun, 19 Aug 2018 21:37:51 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7JLbpt2077328; Sun, 19 Aug 2018 21:37:51 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201808192137.w7JLbpt2077328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Sun, 19 Aug 2018 21:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338075 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: jmg X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 338075 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, 19 Aug 2018 21:37:52 -0000 Author: jmg Date: Sun Aug 19 21:37:51 2018 New Revision: 338075 URL: https://svnweb.freebsd.org/changeset/base/338075 Log: use sbuf so that lines are printed together... As aarch64 often has SMP enabled, lines can get intermixed with other console output making these lines hard to read... Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D16689 Modified: head/sys/arm64/arm64/identcpu.c Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Sun Aug 19 21:10:21 2018 (r338074) +++ head/sys/arm64/arm64/identcpu.c Sun Aug 19 21:37:51 2018 (r338075) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -175,30 +176,34 @@ SYSINIT(idenrity_cpu, SI_SUB_SMP, SI_ORDER_ANY, identi void print_cpu_features(u_int cpu) { + struct sbuf *sb; int printed; - printf("CPU%3d: %s %s r%dp%d", cpu, cpu_desc[cpu].cpu_impl_name, - cpu_desc[cpu].cpu_part_name, cpu_desc[cpu].cpu_variant, - cpu_desc[cpu].cpu_revision); + sb = sbuf_new_auto(); + sbuf_printf(sb, "CPU%3d: %s %s r%dp%d", cpu, + cpu_desc[cpu].cpu_impl_name, cpu_desc[cpu].cpu_part_name, + cpu_desc[cpu].cpu_variant, cpu_desc[cpu].cpu_revision); - printf(" affinity:"); + sbuf_cat(sb, " affinity:"); switch(cpu_aff_levels) { default: case 4: - printf(" %2d", CPU_AFF3(cpu_desc[cpu].mpidr)); + sbuf_printf(sb, " %2d", CPU_AFF3(cpu_desc[cpu].mpidr)); /* FALLTHROUGH */ case 3: - printf(" %2d", CPU_AFF2(cpu_desc[cpu].mpidr)); + sbuf_printf(sb, " %2d", CPU_AFF2(cpu_desc[cpu].mpidr)); /* FALLTHROUGH */ case 2: - printf(" %2d", CPU_AFF1(cpu_desc[cpu].mpidr)); + sbuf_printf(sb, " %2d", CPU_AFF1(cpu_desc[cpu].mpidr)); /* FALLTHROUGH */ case 1: case 0: /* On UP this will be zero */ - printf(" %2d", CPU_AFF0(cpu_desc[cpu].mpidr)); + sbuf_printf(sb, " %2d", CPU_AFF0(cpu_desc[cpu].mpidr)); break; } - printf("\n"); + sbuf_finish(sb); + printf("%s\n", sbuf_data(sb)); + sbuf_clear(sb); /* * There is a hardware errata where, if one CPU is performing a TLB @@ -230,39 +235,39 @@ print_cpu_features(u_int cpu) /* AArch64 Instruction Set Attribute Register 0 */ if (cpu == 0 || (cpu_print_regs & PRINT_ID_AA64_ISAR0) != 0) { printed = 0; - printf(" Instruction Set Attributes 0 = <"); + sbuf_printf(sb, " Instruction Set Attributes 0 = <"); switch (ID_AA64ISAR0_RDM(cpu_desc[cpu].id_aa64isar0)) { case ID_AA64ISAR0_RDM_NONE: break; case ID_AA64ISAR0_RDM_IMPL: - printf("%sRDM", SEP_STR); + sbuf_printf(sb, "%sRDM", SEP_STR); break; default: - printf("%sUnknown RDM", SEP_STR); + sbuf_printf(sb, "%sUnknown RDM", SEP_STR); } switch (ID_AA64ISAR0_ATOMIC(cpu_desc[cpu].id_aa64isar0)) { case ID_AA64ISAR0_ATOMIC_NONE: break; case ID_AA64ISAR0_ATOMIC_IMPL: - printf("%sAtomic", SEP_STR); + sbuf_printf(sb, "%sAtomic", SEP_STR); break; default: - printf("%sUnknown Atomic", SEP_STR); + sbuf_printf(sb, "%sUnknown Atomic", SEP_STR); } switch (ID_AA64ISAR0_AES(cpu_desc[cpu].id_aa64isar0)) { case ID_AA64ISAR0_AES_NONE: break; case ID_AA64ISAR0_AES_BASE: - printf("%sAES", SEP_STR); + sbuf_printf(sb, "%sAES", SEP_STR); break; case ID_AA64ISAR0_AES_PMULL: - printf("%sAES+PMULL", SEP_STR); + sbuf_printf(sb, "%sAES+PMULL", SEP_STR); break; default: - printf("%sUnknown AES", SEP_STR); + sbuf_printf(sb, "%sUnknown AES", SEP_STR); break; } @@ -270,10 +275,10 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR0_SHA1_NONE: break; case ID_AA64ISAR0_SHA1_BASE: - printf("%sSHA1", SEP_STR); + sbuf_printf(sb, "%sSHA1", SEP_STR); break; default: - printf("%sUnknown SHA1", SEP_STR); + sbuf_printf(sb, "%sUnknown SHA1", SEP_STR); break; } @@ -281,13 +286,13 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR0_SHA2_NONE: break; case ID_AA64ISAR0_SHA2_BASE: - printf("%sSHA2", SEP_STR); + sbuf_printf(sb, "%sSHA2", SEP_STR); break; case ID_AA64ISAR0_SHA2_512: - printf("%sSHA2+SHA512", SEP_STR); + sbuf_printf(sb, "%sSHA2+SHA512", SEP_STR); break; default: - printf("%sUnknown SHA2", SEP_STR); + sbuf_printf(sb, "%sUnknown SHA2", SEP_STR); break; } @@ -295,10 +300,10 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR0_CRC32_NONE: break; case ID_AA64ISAR0_CRC32_BASE: - printf("%sCRC32", SEP_STR); + sbuf_printf(sb, "%sCRC32", SEP_STR); break; default: - printf("%sUnknown CRC32", SEP_STR); + sbuf_printf(sb, "%sUnknown CRC32", SEP_STR); break; } @@ -306,10 +311,10 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR0_SHA3_NONE: break; case ID_AA64ISAR0_SHA3_IMPL: - printf("%sSHA3", SEP_STR); + sbuf_printf(sb, "%sSHA3", SEP_STR); break; default: - printf("%sUnknown SHA3", SEP_STR); + sbuf_printf(sb, "%sUnknown SHA3", SEP_STR); break; } @@ -317,10 +322,10 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR0_SM3_NONE: break; case ID_AA64ISAR0_SM3_IMPL: - printf("%sSM3", SEP_STR); + sbuf_printf(sb, "%sSM3", SEP_STR); break; default: - printf("%sUnknown SM3", SEP_STR); + sbuf_printf(sb, "%sUnknown SM3", SEP_STR); break; } @@ -328,10 +333,10 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR0_SM4_NONE: break; case ID_AA64ISAR0_SM4_IMPL: - printf("%sSM4", SEP_STR); + sbuf_printf(sb, "%sSM4", SEP_STR); break; default: - printf("%sUnknown SM4", SEP_STR); + sbuf_printf(sb, "%sUnknown SM4", SEP_STR); break; } @@ -339,33 +344,35 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR0_DP_NONE: break; case ID_AA64ISAR0_DP_IMPL: - printf("%sDotProd", SEP_STR); + sbuf_printf(sb, "%sDotProd", SEP_STR); break; default: - printf("%sUnknown DP", SEP_STR); + sbuf_printf(sb, "%sUnknown DP", SEP_STR); break; } if ((cpu_desc[cpu].id_aa64isar0 & ~ID_AA64ISAR0_MASK) != 0) - printf("%s%#lx", SEP_STR, + sbuf_printf(sb, "%s%#lx", SEP_STR, cpu_desc[cpu].id_aa64isar0 & ~ID_AA64ISAR0_MASK); - printf(">\n"); + sbuf_finish(sb); + printf("%s>\n", sbuf_data(sb)); + sbuf_clear(sb); } /* AArch64 Instruction Set Attribute Register 1 */ if (cpu == 0 || (cpu_print_regs & PRINT_ID_AA64_ISAR1) != 0) { printed = 0; - printf(" Instruction Set Attributes 1 = <"); + sbuf_printf(sb, " Instruction Set Attributes 1 = <"); switch (ID_AA64ISAR1_GPI(cpu_desc[cpu].id_aa64isar1)) { case ID_AA64ISAR1_GPI_NONE: break; case ID_AA64ISAR1_GPI_IMPL: - printf("%sImpl GenericAuth", SEP_STR); + sbuf_printf(sb, "%sImpl GenericAuth", SEP_STR); break; default: - printf("%sUnknown GenericAuth", SEP_STR); + sbuf_printf(sb, "%sUnknown GenericAuth", SEP_STR); break; } @@ -373,10 +380,10 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR1_GPA_NONE: break; case ID_AA64ISAR1_GPA_IMPL: - printf("%sPrince GenericAuth", SEP_STR); + sbuf_printf(sb, "%sPrince GenericAuth", SEP_STR); break; default: - printf("%sUnknown GenericAuth", SEP_STR); + sbuf_printf(sb, "%sUnknown GenericAuth", SEP_STR); break; } @@ -384,10 +391,10 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR1_LRCPC_NONE: break; case ID_AA64ISAR1_LRCPC_IMPL: - printf("%sRCpc", SEP_STR); + sbuf_printf(sb, "%sRCpc", SEP_STR); break; default: - printf("%sUnknown RCpc", SEP_STR); + sbuf_printf(sb, "%sUnknown RCpc", SEP_STR); break; } @@ -395,10 +402,10 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR1_FCMA_NONE: break; case ID_AA64ISAR1_FCMA_IMPL: - printf("%sFCMA", SEP_STR); + sbuf_printf(sb, "%sFCMA", SEP_STR); break; default: - printf("%sUnknown FCMA", SEP_STR); + sbuf_printf(sb, "%sUnknown FCMA", SEP_STR); break; } @@ -406,10 +413,10 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR1_JSCVT_NONE: break; case ID_AA64ISAR1_JSCVT_IMPL: - printf("%sJS Conv", SEP_STR); + sbuf_printf(sb, "%sJS Conv", SEP_STR); break; default: - printf("%sUnknown JS Conv", SEP_STR); + sbuf_printf(sb, "%sUnknown JS Conv", SEP_STR); break; } @@ -417,10 +424,10 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR1_API_NONE: break; case ID_AA64ISAR1_API_IMPL: - printf("%sImpl AddrAuth", SEP_STR); + sbuf_printf(sb, "%sImpl AddrAuth", SEP_STR); break; default: - printf("%sUnknown Impl AddrAuth", SEP_STR); + sbuf_printf(sb, "%sUnknown Impl AddrAuth", SEP_STR); break; } @@ -428,10 +435,10 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR1_APA_NONE: break; case ID_AA64ISAR1_APA_IMPL: - printf("%sPrince AddrAuth", SEP_STR); + sbuf_printf(sb, "%sPrince AddrAuth", SEP_STR); break; default: - printf("%sUnknown Prince AddrAuth", SEP_STR); + sbuf_printf(sb, "%sUnknown Prince AddrAuth", SEP_STR); break; } @@ -439,32 +446,34 @@ print_cpu_features(u_int cpu) case ID_AA64ISAR1_DPB_NONE: break; case ID_AA64ISAR1_DPB_IMPL: - printf("%sDC CVAP", SEP_STR); + sbuf_printf(sb, "%sDC CVAP", SEP_STR); break; default: - printf("%sUnknown DC CVAP", SEP_STR); + sbuf_printf(sb, "%sUnknown DC CVAP", SEP_STR); break; } if ((cpu_desc[cpu].id_aa64isar1 & ~ID_AA64ISAR1_MASK) != 0) - printf("%s%#lx", SEP_STR, + sbuf_printf(sb, "%s%#lx", SEP_STR, cpu_desc[cpu].id_aa64isar1 & ~ID_AA64ISAR1_MASK); - printf(">\n"); + sbuf_finish(sb); + printf("%s>\n", sbuf_data(sb)); + sbuf_clear(sb); } /* AArch64 Processor Feature Register 0 */ if (cpu == 0 || (cpu_print_regs & PRINT_ID_AA64_PFR0) != 0) { printed = 0; - printf(" Processor Features 0 = <"); + sbuf_printf(sb, " Processor Features 0 = <"); switch (ID_AA64PFR0_SVE(cpu_desc[cpu].id_aa64pfr0)) { case ID_AA64PFR0_SVE_NONE: break; case ID_AA64PFR0_SVE_IMPL: - printf("%sSVE", SEP_STR); + sbuf_printf(sb, "%sSVE", SEP_STR); break; default: - printf("%sUnknown SVE", SEP_STR); + sbuf_printf(sb, "%sUnknown SVE", SEP_STR); break; } @@ -472,10 +481,10 @@ print_cpu_features(u_int cpu) case ID_AA64PFR0_RAS_NONE: break; case ID_AA64PFR0_RAS_V1: - printf("%sRASv1", SEP_STR); + sbuf_printf(sb, "%sRASv1", SEP_STR); break; default: - printf("%sUnknown RAS", SEP_STR); + sbuf_printf(sb, "%sUnknown RAS", SEP_STR); break; } @@ -483,10 +492,10 @@ print_cpu_features(u_int cpu) case ID_AA64PFR0_GIC_CPUIF_NONE: break; case ID_AA64PFR0_GIC_CPUIF_EN: - printf("%sGIC", SEP_STR); + sbuf_printf(sb, "%sGIC", SEP_STR); break; default: - printf("%sUnknown GIC interface", SEP_STR); + sbuf_printf(sb, "%sUnknown GIC interface", SEP_STR); break; } @@ -494,13 +503,13 @@ print_cpu_features(u_int cpu) case ID_AA64PFR0_ADV_SIMD_NONE: break; case ID_AA64PFR0_ADV_SIMD_IMPL: - printf("%sAdvSIMD", SEP_STR); + sbuf_printf(sb, "%sAdvSIMD", SEP_STR); break; case ID_AA64PFR0_ADV_SIMD_HP: - printf("%sAdvSIMD+HP", SEP_STR); + sbuf_printf(sb, "%sAdvSIMD+HP", SEP_STR); break; default: - printf("%sUnknown AdvSIMD", SEP_STR); + sbuf_printf(sb, "%sUnknown AdvSIMD", SEP_STR); break; } @@ -508,75 +517,77 @@ print_cpu_features(u_int cpu) case ID_AA64PFR0_FP_NONE: break; case ID_AA64PFR0_FP_IMPL: - printf("%sFloat", SEP_STR); + sbuf_printf(sb, "%sFloat", SEP_STR); break; case ID_AA64PFR0_FP_HP: - printf("%sFloat+HP", SEP_STR); + sbuf_printf(sb, "%sFloat+HP", SEP_STR); break; default: - printf("%sUnknown Float", SEP_STR); + sbuf_printf(sb, "%sUnknown Float", SEP_STR); break; } switch (ID_AA64PFR0_EL3(cpu_desc[cpu].id_aa64pfr0)) { case ID_AA64PFR0_EL3_NONE: - printf("%sNo EL3", SEP_STR); + sbuf_printf(sb, "%sNo EL3", SEP_STR); break; case ID_AA64PFR0_EL3_64: - printf("%sEL3", SEP_STR); + sbuf_printf(sb, "%sEL3", SEP_STR); break; case ID_AA64PFR0_EL3_64_32: - printf("%sEL3 32", SEP_STR); + sbuf_printf(sb, "%sEL3 32", SEP_STR); break; default: - printf("%sUnknown EL3", SEP_STR); + sbuf_printf(sb, "%sUnknown EL3", SEP_STR); break; } switch (ID_AA64PFR0_EL2(cpu_desc[cpu].id_aa64pfr0)) { case ID_AA64PFR0_EL2_NONE: - printf("%sNo EL2", SEP_STR); + sbuf_printf(sb, "%sNo EL2", SEP_STR); break; case ID_AA64PFR0_EL2_64: - printf("%sEL2", SEP_STR); + sbuf_printf(sb, "%sEL2", SEP_STR); break; case ID_AA64PFR0_EL2_64_32: - printf("%sEL2 32", SEP_STR); + sbuf_printf(sb, "%sEL2 32", SEP_STR); break; default: - printf("%sUnknown EL2", SEP_STR); + sbuf_printf(sb, "%sUnknown EL2", SEP_STR); break; } switch (ID_AA64PFR0_EL1(cpu_desc[cpu].id_aa64pfr0)) { case ID_AA64PFR0_EL1_64: - printf("%sEL1", SEP_STR); + sbuf_printf(sb, "%sEL1", SEP_STR); break; case ID_AA64PFR0_EL1_64_32: - printf("%sEL1 32", SEP_STR); + sbuf_printf(sb, "%sEL1 32", SEP_STR); break; default: - printf("%sUnknown EL1", SEP_STR); + sbuf_printf(sb, "%sUnknown EL1", SEP_STR); break; } switch (ID_AA64PFR0_EL0(cpu_desc[cpu].id_aa64pfr0)) { case ID_AA64PFR0_EL0_64: - printf("%sEL0", SEP_STR); + sbuf_printf(sb, "%sEL0", SEP_STR); break; case ID_AA64PFR0_EL0_64_32: - printf("%sEL0 32", SEP_STR); + sbuf_printf(sb, "%sEL0 32", SEP_STR); break; default: - printf("%sUnknown EL0", SEP_STR); + sbuf_printf(sb, "%sUnknown EL0", SEP_STR); break; } if ((cpu_desc[cpu].id_aa64pfr0 & ~ID_AA64PFR0_MASK) != 0) - printf("%s%#lx", SEP_STR, + sbuf_printf(sb, "%s%#lx", SEP_STR, cpu_desc[cpu].id_aa64pfr0 & ~ID_AA64PFR0_MASK); - printf(">\n"); + sbuf_finish(sb); + printf("%s>\n", sbuf_data(sb)); + sbuf_clear(sb); } /* AArch64 Processor Feature Register 1 */ @@ -588,15 +599,15 @@ print_cpu_features(u_int cpu) /* AArch64 Memory Model Feature Register 0 */ if (cpu == 0 || (cpu_print_regs & PRINT_ID_AA64_MMFR0) != 0) { printed = 0; - printf(" Memory Model Features 0 = <"); + sbuf_printf(sb, " Memory Model Features 0 = <"); switch (ID_AA64MMFR0_TGRAN4(cpu_desc[cpu].id_aa64mmfr0)) { case ID_AA64MMFR0_TGRAN4_NONE: break; case ID_AA64MMFR0_TGRAN4_IMPL: - printf("%s4k Granule", SEP_STR); + sbuf_printf(sb, "%s4k Granule", SEP_STR); break; default: - printf("%sUnknown 4k Granule", SEP_STR); + sbuf_printf(sb, "%sUnknown 4k Granule", SEP_STR); break; } @@ -604,10 +615,10 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR0_TGRAN16_NONE: break; case ID_AA64MMFR0_TGRAN16_IMPL: - printf("%s16k Granule", SEP_STR); + sbuf_printf(sb, "%s16k Granule", SEP_STR); break; default: - printf("%sUnknown 16k Granule", SEP_STR); + sbuf_printf(sb, "%sUnknown 16k Granule", SEP_STR); break; } @@ -615,10 +626,10 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR0_TGRAN64_NONE: break; case ID_AA64MMFR0_TGRAN64_IMPL: - printf("%s64k Granule", SEP_STR); + sbuf_printf(sb, "%s64k Granule", SEP_STR); break; default: - printf("%sUnknown 64k Granule", SEP_STR); + sbuf_printf(sb, "%sUnknown 64k Granule", SEP_STR); break; } @@ -626,10 +637,10 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR0_BIGEND_FIXED: break; case ID_AA64MMFR0_BIGEND_MIXED: - printf("%sMixedEndian", SEP_STR); + sbuf_printf(sb, "%sMixedEndian", SEP_STR); break; default: - printf("%sUnknown Endian switching", SEP_STR); + sbuf_printf(sb, "%sUnknown Endian switching", SEP_STR); break; } @@ -637,10 +648,10 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR0_BIGEND_EL0_FIXED: break; case ID_AA64MMFR0_BIGEND_EL0_MIXED: - printf("%sEL0 MixEndian", SEP_STR); + sbuf_printf(sb, "%sEL0 MixEndian", SEP_STR); break; default: - printf("%sUnknown EL0 Endian switching", SEP_STR); + sbuf_printf(sb, "%sUnknown EL0 Endian switching", SEP_STR); break; } @@ -648,71 +659,73 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR0_S_NS_MEM_NONE: break; case ID_AA64MMFR0_S_NS_MEM_DISTINCT: - printf("%sS/NS Mem", SEP_STR); + sbuf_printf(sb, "%sS/NS Mem", SEP_STR); break; default: - printf("%sUnknown S/NS Mem", SEP_STR); + sbuf_printf(sb, "%sUnknown S/NS Mem", SEP_STR); break; } switch (ID_AA64MMFR0_ASID_BITS(cpu_desc[cpu].id_aa64mmfr0)) { case ID_AA64MMFR0_ASID_BITS_8: - printf("%s8bit ASID", SEP_STR); + sbuf_printf(sb, "%s8bit ASID", SEP_STR); break; case ID_AA64MMFR0_ASID_BITS_16: - printf("%s16bit ASID", SEP_STR); + sbuf_printf(sb, "%s16bit ASID", SEP_STR); break; default: - printf("%sUnknown ASID", SEP_STR); + sbuf_printf(sb, "%sUnknown ASID", SEP_STR); break; } switch (ID_AA64MMFR0_PA_RANGE(cpu_desc[cpu].id_aa64mmfr0)) { case ID_AA64MMFR0_PA_RANGE_4G: - printf("%s4GB PA", SEP_STR); + sbuf_printf(sb, "%s4GB PA", SEP_STR); break; case ID_AA64MMFR0_PA_RANGE_64G: - printf("%s64GB PA", SEP_STR); + sbuf_printf(sb, "%s64GB PA", SEP_STR); break; case ID_AA64MMFR0_PA_RANGE_1T: - printf("%s1TB PA", SEP_STR); + sbuf_printf(sb, "%s1TB PA", SEP_STR); break; case ID_AA64MMFR0_PA_RANGE_4T: - printf("%s4TB PA", SEP_STR); + sbuf_printf(sb, "%s4TB PA", SEP_STR); break; case ID_AA64MMFR0_PA_RANGE_16T: - printf("%s16TB PA", SEP_STR); + sbuf_printf(sb, "%s16TB PA", SEP_STR); break; case ID_AA64MMFR0_PA_RANGE_256T: - printf("%s256TB PA", SEP_STR); + sbuf_printf(sb, "%s256TB PA", SEP_STR); break; case ID_AA64MMFR0_PA_RANGE_4P: - printf("%s4PB PA", SEP_STR); + sbuf_printf(sb, "%s4PB PA", SEP_STR); break; default: - printf("%sUnknown PA Range", SEP_STR); + sbuf_printf(sb, "%sUnknown PA Range", SEP_STR); break; } if ((cpu_desc[cpu].id_aa64mmfr0 & ~ID_AA64MMFR0_MASK) != 0) - printf("%s%#lx", SEP_STR, + sbuf_printf(sb, "%s%#lx", SEP_STR, cpu_desc[cpu].id_aa64mmfr0 & ~ID_AA64MMFR0_MASK); - printf(">\n"); + sbuf_finish(sb); + printf("%s>\n", sbuf_data(sb)); + sbuf_clear(sb); } /* AArch64 Memory Model Feature Register 1 */ if (cpu == 0 || (cpu_print_regs & PRINT_ID_AA64_MMFR1) != 0) { printed = 0; - printf(" Memory Model Features 1 = <"); + sbuf_printf(sb, " Memory Model Features 1 = <"); switch (ID_AA64MMFR1_XNX(cpu_desc[cpu].id_aa64mmfr1)) { case ID_AA64MMFR1_XNX_NONE: break; case ID_AA64MMFR1_XNX_IMPL: - printf("%sEL2 XN", SEP_STR); + sbuf_printf(sb, "%sEL2 XN", SEP_STR); break; default: - printf("%sUnknown XNX", SEP_STR); + sbuf_printf(sb, "%sUnknown XNX", SEP_STR); break; } @@ -720,10 +733,10 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR1_SPEC_SEI_NONE: break; case ID_AA64MMFR1_SPEC_SEI_IMPL: - printf("%sSpecSEI", SEP_STR); + sbuf_printf(sb, "%sSpecSEI", SEP_STR); break; default: - printf("%sUnknown SpecSEI", SEP_STR); + sbuf_printf(sb, "%sUnknown SpecSEI", SEP_STR); break; } @@ -731,13 +744,13 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR1_PAN_NONE: break; case ID_AA64MMFR1_PAN_IMPL: - printf("%sPAN", SEP_STR); + sbuf_printf(sb, "%sPAN", SEP_STR); break; case ID_AA64MMFR1_PAN_ATS1E1: - printf("%sPAN+AT", SEP_STR); + sbuf_printf(sb, "%sPAN+AT", SEP_STR); break; default: - printf("%sUnknown PAN", SEP_STR); + sbuf_printf(sb, "%sUnknown PAN", SEP_STR); break; } @@ -745,10 +758,10 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR1_LO_NONE: break; case ID_AA64MMFR1_LO_IMPL: - printf("%sLO", SEP_STR); + sbuf_printf(sb, "%sLO", SEP_STR); break; default: - printf("%sUnknown LO", SEP_STR); + sbuf_printf(sb, "%sUnknown LO", SEP_STR); break; } @@ -756,13 +769,13 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR1_HPDS_NONE: break; case ID_AA64MMFR1_HPDS_HPD: - printf("%sHPDS", SEP_STR); + sbuf_printf(sb, "%sHPDS", SEP_STR); break; case ID_AA64MMFR1_HPDS_TTPBHA: - printf("%sTTPBHA", SEP_STR); + sbuf_printf(sb, "%sTTPBHA", SEP_STR); break; default: - printf("%sUnknown HPDS", SEP_STR); + sbuf_printf(sb, "%sUnknown HPDS", SEP_STR); break; } @@ -770,10 +783,10 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR1_VH_NONE: break; case ID_AA64MMFR1_VH_IMPL: - printf("%sVHE", SEP_STR); + sbuf_printf(sb, "%sVHE", SEP_STR); break; default: - printf("%sUnknown VHE", SEP_STR); + sbuf_printf(sb, "%sUnknown VHE", SEP_STR); break; } @@ -781,10 +794,10 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR1_VMIDBITS_8: break; case ID_AA64MMFR1_VMIDBITS_16: - printf("%s16 VMID bits", SEP_STR); + sbuf_printf(sb, "%s16 VMID bits", SEP_STR); break; default: - printf("%sUnknown VMID bits", SEP_STR); + sbuf_printf(sb, "%sUnknown VMID bits", SEP_STR); break; } @@ -792,59 +805,61 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR1_HAFDBS_NONE: break; case ID_AA64MMFR1_HAFDBS_AF: - printf("%sAF", SEP_STR); + sbuf_printf(sb, "%sAF", SEP_STR); break; case ID_AA64MMFR1_HAFDBS_AF_DBS: - printf("%sAF+DBS", SEP_STR); + sbuf_printf(sb, "%sAF+DBS", SEP_STR); break; default: - printf("%sUnknown Hardware update AF/DBS", SEP_STR); + sbuf_printf(sb, "%sUnknown Hardware update AF/DBS", SEP_STR); break; } if ((cpu_desc[cpu].id_aa64mmfr1 & ~ID_AA64MMFR1_MASK) != 0) - printf("%s%#lx", SEP_STR, + sbuf_printf(sb, "%s%#lx", SEP_STR, cpu_desc[cpu].id_aa64mmfr1 & ~ID_AA64MMFR1_MASK); - printf(">\n"); + sbuf_finish(sb); + printf("%s>\n", sbuf_data(sb)); + sbuf_clear(sb); } /* AArch64 Memory Model Feature Register 2 */ if (cpu == 0 || (cpu_print_regs & PRINT_ID_AA64_MMFR2) != 0) { printed = 0; - printf(" Memory Model Features 2 = <"); + sbuf_printf(sb, " Memory Model Features 2 = <"); switch (ID_AA64MMFR2_NV(cpu_desc[cpu].id_aa64mmfr2)) { case ID_AA64MMFR2_NV_NONE: break; case ID_AA64MMFR2_NV_IMPL: - printf("%sNestedVirt", SEP_STR); + sbuf_printf(sb, "%sNestedVirt", SEP_STR); break; default: - printf("%sUnknown NestedVirt", SEP_STR); + sbuf_printf(sb, "%sUnknown NestedVirt", SEP_STR); break; } switch (ID_AA64MMFR2_CCIDX(cpu_desc[cpu].id_aa64mmfr2)) { case ID_AA64MMFR2_CCIDX_32: - printf("%s32b CCIDX", SEP_STR); + sbuf_printf(sb, "%s32b CCIDX", SEP_STR); break; case ID_AA64MMFR2_CCIDX_64: - printf("%s64b CCIDX", SEP_STR); + sbuf_printf(sb, "%s64b CCIDX", SEP_STR); break; default: - printf("%sUnknown CCIDX", SEP_STR); + sbuf_printf(sb, "%sUnknown CCIDX", SEP_STR); break; } switch (ID_AA64MMFR2_VA_RANGE(cpu_desc[cpu].id_aa64mmfr2)) { case ID_AA64MMFR2_VA_RANGE_48: - printf("%s48b VA", SEP_STR); + sbuf_printf(sb, "%s48b VA", SEP_STR); break; case ID_AA64MMFR2_VA_RANGE_52: - printf("%s52b VA", SEP_STR); + sbuf_printf(sb, "%s52b VA", SEP_STR); break; default: - printf("%sUnknown VA Range", SEP_STR); + sbuf_printf(sb, "%sUnknown VA Range", SEP_STR); break; } @@ -852,10 +867,10 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR2_IESB_NONE: break; case ID_AA64MMFR2_IESB_IMPL: - printf("%sIESB", SEP_STR); + sbuf_printf(sb, "%sIESB", SEP_STR); break; default: - printf("%sUnknown IESB", SEP_STR); + sbuf_printf(sb, "%sUnknown IESB", SEP_STR); break; } @@ -863,10 +878,10 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR2_LSM_NONE: break; case ID_AA64MMFR2_LSM_IMPL: - printf("%sLSM", SEP_STR); + sbuf_printf(sb, "%sLSM", SEP_STR); break; default: - printf("%sUnknown LSM", SEP_STR); + sbuf_printf(sb, "%sUnknown LSM", SEP_STR); break; } @@ -874,10 +889,10 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR2_UAO_NONE: break; case ID_AA64MMFR2_UAO_IMPL: - printf("%sUAO", SEP_STR); + sbuf_printf(sb, "%sUAO", SEP_STR); break; default: - printf("%sUnknown UAO", SEP_STR); + sbuf_printf(sb, "%sUnknown UAO", SEP_STR); break; } @@ -885,57 +900,59 @@ print_cpu_features(u_int cpu) case ID_AA64MMFR2_CNP_NONE: break; case ID_AA64MMFR2_CNP_IMPL: - printf("%sCnP", SEP_STR); + sbuf_printf(sb, "%sCnP", SEP_STR); break; default: - printf("%sUnknown CnP", SEP_STR); + sbuf_printf(sb, "%sUnknown CnP", SEP_STR); break; } if ((cpu_desc[cpu].id_aa64mmfr2 & ~ID_AA64MMFR2_MASK) != 0) - printf("%s%#lx", SEP_STR, + sbuf_printf(sb, "%s%#lx", SEP_STR, cpu_desc[cpu].id_aa64mmfr2 & ~ID_AA64MMFR2_MASK); - printf(">\n"); + sbuf_finish(sb); + printf("%s>\n", sbuf_data(sb)); + sbuf_clear(sb); } /* AArch64 Debug Feature Register 0 */ if (cpu == 0 || (cpu_print_regs & PRINT_ID_AA64_DFR0) != 0) { printed = 0; - printf(" Debug Features 0 = <"); + sbuf_printf(sb, " Debug Features 0 = <"); switch(ID_AA64DFR0_PMS_VER(cpu_desc[cpu].id_aa64dfr0)) { case ID_AA64DFR0_PMS_VER_NONE: break; case ID_AA64DFR0_PMS_VER_V1: - printf("%sSPE v1", SEP_STR); + sbuf_printf(sb, "%sSPE v1", SEP_STR); break; default: - printf("%sUnknown SPE", SEP_STR); + sbuf_printf(sb, "%sUnknown SPE", SEP_STR); break; } - printf("%s%lu CTX Breakpoints", SEP_STR, + sbuf_printf(sb, "%s%lu CTX Breakpoints", SEP_STR, ID_AA64DFR0_CTX_CMPS(cpu_desc[cpu].id_aa64dfr0)); - printf("%s%lu Watchpoints", SEP_STR, + sbuf_printf(sb, "%s%lu Watchpoints", SEP_STR, ID_AA64DFR0_WRPS(cpu_desc[cpu].id_aa64dfr0)); - printf("%s%lu Breakpoints", SEP_STR, + sbuf_printf(sb, "%s%lu Breakpoints", SEP_STR, ID_AA64DFR0_BRPS(cpu_desc[cpu].id_aa64dfr0)); switch (ID_AA64DFR0_PMU_VER(cpu_desc[cpu].id_aa64dfr0)) { case ID_AA64DFR0_PMU_VER_NONE: break; case ID_AA64DFR0_PMU_VER_3: - printf("%sPMUv3", SEP_STR); + sbuf_printf(sb, "%sPMUv3", SEP_STR); break; case ID_AA64DFR0_PMU_VER_3_1: - printf("%sPMUv3+16 bit evtCount", SEP_STR); + sbuf_printf(sb, "%sPMUv3+16 bit evtCount", SEP_STR); break; case ID_AA64DFR0_PMU_VER_IMPL: - printf("%sImplementation defined PMU", SEP_STR); + sbuf_printf(sb, "%sImplementation defined PMU", SEP_STR); break; default: - printf("%sUnknown PMU", SEP_STR); + sbuf_printf(sb, "%sUnknown PMU", SEP_STR); break; } @@ -943,32 +960,34 @@ print_cpu_features(u_int cpu) case ID_AA64DFR0_TRACE_VER_NONE: break; case ID_AA64DFR0_TRACE_VER_IMPL: - printf("%sTrace", SEP_STR); + sbuf_printf(sb, "%sTrace", SEP_STR); break; default: - printf("%sUnknown Trace", SEP_STR); + sbuf_printf(sb, "%sUnknown Trace", SEP_STR); break; } switch (ID_AA64DFR0_DEBUG_VER(cpu_desc[cpu].id_aa64dfr0)) { case ID_AA64DFR0_DEBUG_VER_8: - printf("%sDebug v8", SEP_STR); + sbuf_printf(sb, "%sDebug v8", SEP_STR); break; case ID_AA64DFR0_DEBUG_VER_8_VHE: - printf("%sDebug v8+VHE", SEP_STR); + sbuf_printf(sb, "%sDebug v8+VHE", SEP_STR); break; case ID_AA64DFR0_DEBUG_VER_8_2: - printf("%sDebug v8.2", SEP_STR); + sbuf_printf(sb, "%sDebug v8.2", SEP_STR); break; default: - printf("%sUnknown Debug", SEP_STR); + sbuf_printf(sb, "%sUnknown Debug", SEP_STR); break; } if (cpu_desc[cpu].id_aa64dfr0 & ~ID_AA64DFR0_MASK) - printf("%s%#lx", SEP_STR, + sbuf_printf(sb, "%s%#lx", SEP_STR, cpu_desc[cpu].id_aa64dfr0 & ~ID_AA64DFR0_MASK); - printf(">\n"); + sbuf_finish(sb); + printf("%s>\n", sbuf_data(sb)); + sbuf_clear(sb); } /* AArch64 Memory Model Feature Register 1 */ @@ -989,6 +1008,8 @@ print_cpu_features(u_int cpu) cpu_desc[cpu].id_aa64afr1); } + sbuf_delete(sb); + sb = NULL; #undef SEP_STR } From owner-svn-src-head@freebsd.org Mon Aug 20 01:09: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 D7DEA107E7AD for ; Mon, 20 Aug 2018 01:09:49 +0000 (UTC) (envelope-from delphij@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 5A0AE73783; Mon, 20 Aug 2018 01:09:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from odin.corp.delphij.net (unknown [IPv6:2601:646:8882:37a:c5a7:8a3e:32d:3341]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: delphij/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id B9E171D824; Mon, 20 Aug 2018 01:09:48 +0000 (UTC) (envelope-from delphij@FreeBSD.org) To: Mark Millard , svn-src-head@freebsd.org References: Cc: "jenkins-admin@freebsd.org" From: Xin Li Openpgp: preference=signencrypt Autocrypt: addr=delphij@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFJNzwQBEACuPNSJjL/AD8oHFuG72vtx5P7Q6dpiEbFABgw/IohS65yDZDd3qFH9ssQv AsFafwB/ofsk6t7dx6zIC05dv5qjhGIOKSJxFC4U1HAot9+QpeUG+8boTKZiiycrMruItj2U JANlv+gN5h0mAsL5f9eNzhRM43kdjN8cQnBIujhO54Derjnrnqz6cQtoonV6SvvVJZUQGxHK 5R1XYJ6wiTuvoEuRYnNObJmPFWZyYOaGZz0qqD6Qe1BhkZuRzv2bZxwJc3Raap/GF6Pm9J/c hlYHUmm2QLaXvmoP8WNosNjla1fup0tgYQE+7MTtHFVxmVj9ZTihN3rEL5IkeEKjQAqcpe1n Db8X2o4K262LRpFl8WtVMW2TfN5Avpj+knZMl3tkYGvYK/nfadCr6Af4co9mkhX6QYgkerg2 mXEGaQzSD/omnsxHCfqMgdphaX3B3eoY2Fv36BMpjSdHmm0rmwqjqZaqlZn89vQ/I6ATvLyx JsdHwTbrj57audl/RKC+OpREOJPaVULp1L+9zdBXslILO8MJaT6YEw1T29bEj5jvLm03Y4rF u/YTruHcMPpsGbpJckDKiy6ISAbMtPvz7/KR91xPHS6KExGiIakIX9xpIXIDKgq+ecEWwkFK PogoKqO6K0/GYkTRoKdXGzsILvIurtbPqSFqWzbRIyNOa82jowARAQABzRZYaW4gTGkgPGRA ZGVscGhpai5uZXQ+wsF9BBMBCgAnBQJTQvBFAhsjBQkJZgGABQsJCAcDBRUKCQgLBRYCAwEA Ah4BAheAAAoJEJW2GBstM+nsha4P/2Roa/REjZLZlIG1TKOxEDqmwc3fynX4w2g7/FXA7f7Z YO5N4vnnnQdJbDZDt4TJtiP1NHHdheQ5+loJrrCXVlU31LuJv1ebM2Ajsuo/0l3tfulEf6Ki GoozmaNZAhwiGJkQVg9DSKsea5xIA31lPnFH4T0SKn8Q6F4HYienmJJtlKVTADvYXA+DRmv0 rNOyVe+V/AuTFuelKg3Ua5a+dY3oqtrQQvFS4n7iIrNjEMUBVx0XTrYLddnF+YjXDg5Phf0D pV/2yJOXiTGiZMK6i7vwHZkJvarACoTSrUrr6OBuZv5Gf87VgifZKLr2Fuf+FePiVCoZTQiL 0hPQyABMzeWa32P6BY2LBMMMFvFiyL5pN5k6nJ0nx4skl8UxZ5ay4yyVg2u3f4aI3+m0XlZ+ iixrjmCTGi1s+d/n6E3eFXdJUUbSOXLZaU4qrbXRzTYCZmZViryv7ibtOHXnG6oWy7BFEHuT rUW6OBvsQDTp5iQ6opENJ5/ZzSA3c5p1WS9Ezv4Bpdqcm7LTQX2j6kXikj8YqICtDF2rkKZ2 Ynjm9se9B0h/T1SOaSpbtRg05UKjsinDq2x8EeX21yFs3UyvwePLrGoNKL45EJM0xwxrnlfr M0ayKJNLoYysY78d54hg7XMmkQD/oZz9I+k4fN6CmZ2i5WGH2BgYs0313JMHxSg7zsFNBFJN zwQBEADPtS+nfTKM6PwgSWLDGVgUYQ/RLaKzCcpQAf4ryLBugXpx3s2BBT1bixX7CpsLXKQi +RRETgSFzDaBL9SEs2ZDV2YT+zGp08aijK/Yl9+RIeezAukI3c+XMHuo8ktUWJmo5/1DX07q G30ckG7uFuTnt31sFzwhh/ZeSuLFyel/fWF48KExLDIVa8DyEUJaYvE9Vfph4T/3LkKuzVTy +iwUBLiSLj5G5N70A+4usbL3eKyYrJqCSaLfrP99/nlgBhMAHVcKcv0uqSuiaH9OMqg1VjQs N8j6NDQug9QrbBTM6U7oZWF/AK+CdFoe+leq5MZfzwCevs0BQgxWm4SHMpXL2vtly67QSPMY dl96fOzw8YbKHv1o0ixhCvc37cI9oUVuSJLXKhEEAvWvLuusiuNeoz+6aPlELvD8h5txJqui tVOzctvJ7ktGZTNiz73tKYVdkKaQVyo8QJFLCNLnUulrQ5wXwteYPg6mrpBxu9VqgDrMp7eB T2kaZ4GRBoMWXXPYSIEe5PM5hhNCsSUfqrKj34UZPijPe+HiWoFJ4S5vIpzutiae11Ctki7u XzeLAhOJQB2raraIqDlFP9I9Zj9JOAZhmiKSEWKfOooCNxQYGiUdPrdYnAe+m7FXRomjF0OO gSepNIESt2gOEIbE5cMxQ0gAueNJc58eHCjWhsNJIwARAQABwsFlBBgBCgAPBQJSTc8EAhsM BQkJZgGAAAoJEJW2GBstM+nsh8EP/1sxZpkJelu+smmqaqdrGHlNrFVLOmeN5yr2IGHBUbmF htjr7fVoU8T0mUnlUU724aKPla4nWhMb4NMu+VxRRFGaT2TYpyR6VIxaStycyUdMGjdXV0Pz TGmxFXhNZXKEITXH9sIxuONBp1czl4AgwN7AAl1MKyV13AaLIyajs58mYmuXtyFn/O+4lxh5 nl2Fa3L9YkL9O7QU2p6WAnDky+L3PgUWp1AzJGfYlLZ8XXCi+KK+pnta+f9yKHt/Oqd/s7OC W4mXgFkBrfuSZZofa4eZckh5u0yBYW3OnEJhClgxRbuOhyYwqQr5oxPrQtjtbMiBzbrOkHhy NnrVCFd9EqlojREGDefHo3V+ZlUOc6OoN3CAYnNa2uLEOm5DCuqOE4z5atBCih5EyITPp7JP J2disEP6ddipcilqbnJdP+TyRQwSv5qRNy8cHahD1Cg9XJJHiC3qr+W3eOtqPkJxhU5biPEr 7dljaLS1Ij771brzqO/x5zW1L9py7muXzYBsW8+keKj8LOYs2242KgjI5Og9YhIJGBFBNddQ wxKBKQpytKQOiXwjhk4Nj77U796bsCd/jIS0r0ZUKBEptPyKso7ncfrm163aEmSaDUkiIjyp 9CEOVT87D+VAVh9PyLGP1niQzWEWFSK36tRGZlF0odP1ZB6wub9zq2DxFouSjHgH Organization: The FreeBSD Project Subject: Re: svn commit: r338059 - in head: Seems to have lead to "Bad system call" in ci.freebsd.org's FreeBSD-head-amd64-testvm Message-ID: <1406b458-47d0-6027-f871-9c5923d1ffa7@FreeBSD.org> Date: Sun, 19 Aug 2018 18:09:43 -0700 User-Agent: Thunderbird MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tcBe8zd7SDFeoDHiQnYZmRDXcsZzSSiG4" 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, 20 Aug 2018 01:09:50 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tcBe8zd7SDFeoDHiQnYZmRDXcsZzSSiG4 Content-Type: multipart/mixed; boundary="UcsL5CcpTCjDKtfbycLUiRUwF8NmmK841"; protected-headers="v1" From: Xin Li To: Mark Millard , svn-src-head@freebsd.org Cc: "jenkins-admin@freebsd.org" Message-ID: <1406b458-47d0-6027-f871-9c5923d1ffa7@FreeBSD.org> Subject: Re: svn commit: r338059 - in head: Seems to have lead to "Bad system call" in ci.freebsd.org's FreeBSD-head-amd64-testvm References: In-Reply-To: --UcsL5CcpTCjDKtfbycLUiRUwF8NmmK841 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable It's a bug, nice catch! I've created https://bugs.freebsd.org/230762 to track this one. In the meantime are we seriously testing -CURRENT against a kernel before March 21? (That's 6 months ago!) On 8/19/18 13:52, Mark Millard wrote: > -r338057 built fine for both then: >=20 > https://ci.freebsd.org/job/FreeBSD-head-amd64-testvm/9265/console >=20 > of -r338065 shows: > (so after "deprecation of arc4random_stir and arc4random_addrandom") >=20 > 19:38:13 + sudo chroot ufs env 'ASSUME_ALWAYS_YES=3Dyes' pkg update > 19:38:13 Bad system call > 19:38:13 Build step 'Execute shell' marked build as failure > 19:38:13 FTP: Current build result is [FAILURE], not going to run. > 19:38:13 [PostBuildScript] - Executing post build scripts. > 19:38:13 [FreeBSD-head-amd64-testvm] $ /bin/sh -xe /tmp/jenkins79959074= 98943424274.sh > 19:38:13 + sh freebsd-ci/scripts/jail/clean.sh > 19:38:13 clean jail FreeBSD-head-amd64-testvm > 19:38:41 Finished: FAILURE >=20 > instead of (from the prior successful one): >=20 > 18:37:15 + sudo chroot ufs env 'ASSUME_ALWAYS_YES=3Dyes' pkg update > 18:37:15 [FreeBSD-head-amd64-testvm.jail.ci.FreeBSD.org] Installing pkg= -1.10.5_1... > 18:37:15 [FreeBSD-head-amd64-testvm.jail.ci.FreeBSD.org] Extracting pkg= -1.10.5_1: .......... done > 18:37:15 Updating FreeBSD repository catalogue... > 18:37:15 pkg: Repository FreeBSD load error: access repo file(/var/db/p= kg/repo-FreeBSD.sqlite) failed: No such file or directory > 18:37:15 [FreeBSD-head-amd64-testvm.jail.ci.FreeBSD.org] Fetching meta.= txz: . done > 18:37:15 [FreeBSD-head-amd64-testvm.jail.ci.FreeBSD.org] Fetching packa= gesite.txz: .......... done > 18:37:16 Processing entries: .......... done > 18:37:25 FreeBSD repository update completed. 32107 packages processed.= > 18:37:25 All repositories are up to date. > . . . >=20 > =3D=3D=3D > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) --UcsL5CcpTCjDKtfbycLUiRUwF8NmmK841-- --tcBe8zd7SDFeoDHiQnYZmRDXcsZzSSiG4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJbehTaAAoJEJW2GBstM+nshgUP/1y2WDvKEPWfxKEpfu0RO9ip QZ2dYXQvcWEyWB58fgpsYBro4OTlKJwcJ/J1JsDl4swx1O8ndK8DAqlVMgGXRlum iHhYHNM0Cxst1Cq/rO05ZqhEtgGj+GWeHtkytINQAOryz2KN9BsgIIYFySrGK04E w4E9y+qw3rogf6BRObszCbI6bWtYi5Rigy1zIrDj/GPpooC3BJpi4iig91cj9dhK doQUNEtbXwlSSIhHH4PUbsTnUNH6XLV//Ty5z8l5BhU72olENsMMHuyRIm2NM3Hz JvL2X9+VfMWyLoZEDXiKdfBcx5nJbtZ4f6GeMWRk4tGjnx+da4PGagWLrE6Q6whK eiBkWUPqY5yOipQbKcvdnQQcwK1XY7JH9kx7mjUVjf2VQlilCHMfkC7Is7V0ziFD NWdhQP2bpYWVsTuNahPSFYTov381Jvqa3O7JAkLdORagoaNlOi8fIgsHYGEDl/nV Ig/DHwouUFBc1S6aGs7bfzvYiNpRGgwyl5I0YNXlnXjw0TqWIPA0pK4IVeyo11lZ HwtuCcmMCmDDridfFjQhtCtB0VehkGaB8Zr0Tb91OBPfseWwPBJlV7YjG0o9yMaO b+3bwRVF8B5aJTI8yXcY7mnigpHwLXcD9a8DXgSQDkYM7dX655vU2npv0jL/fOZ8 6hxS6lWlMS4YjF1/Ugpz =QdPN -----END PGP SIGNATURE----- --tcBe8zd7SDFeoDHiQnYZmRDXcsZzSSiG4-- From owner-svn-src-head@freebsd.org Mon Aug 20 01:13: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 100A2107EAAD; Mon, 20 Aug 2018 01:13:52 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f175.google.com (mail-io0-f175.google.com [209.85.223.175]) (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 A344573ABE; Mon, 20 Aug 2018 01:13:51 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f175.google.com with SMTP id v14-v6so2203543iob.4; Sun, 19 Aug 2018 18:13:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=TytFPO0uEiBocEImIJ+gY/kQlw9whAP405s+P+GNNa8=; b=Ecp4nsv9adumvvCAwras/KFr1ZR98hcl7fWwc7NP8GnGvW2OM7N0ptF0cC/AEN9oW9 aW+mE5qTpdjJOxtWfxQ42norXNuMAS6uhfTCA/VJexkMy/BOoDnQTjBEMOZAtlJGd5Gs HQLCj43qB/E4tj4lyElkesrt7pbxKVqkm5m5Up86EPAKD68seNeNV81j6AqGtEp1YA9C AbSXKnz7lSDMaFMP4ga4EV1af2KYmGW5x5KbCsRwjWnM4rQ86hg+hvTvo+8kLuyJLJVt FHWgBSyEUg92aF8+LPOa5YA9SO50jlY+zJKF2DVU8GjWvgIt7mZ2j8iW1VcBDSBGcb9K g0EQ== X-Gm-Message-State: APzg51ChCKQQCdJ85ufupYj53hubHs0J+Hpui0vf9o/fvw5ZRl5HO/dF dlxWmwwrKYTZtoqer2tKNyZHSJC6 X-Google-Smtp-Source: ANB0Vdbdj6oqggzyJ6x+hUp3GL1/7/WRxzCQmsMPmdMJrbiYba8g1WnRvDXbYfbeiYLtGR/6ncDFog== X-Received: by 2002:a6b:554:: with SMTP id 81-v6mr2395736iof.202.1534727625431; Sun, 19 Aug 2018 18:13:45 -0700 (PDT) Received: from mail-io0-f173.google.com (mail-io0-f173.google.com. [209.85.223.173]) by smtp.gmail.com with ESMTPSA id y189-v6sm2950986itd.26.2018.08.19.18.13.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Aug 2018 18:13:45 -0700 (PDT) Received: by mail-io0-f173.google.com with SMTP id l14-v6so11271141iob.7; Sun, 19 Aug 2018 18:13:45 -0700 (PDT) X-Received: by 2002:a6b:be46:: with SMTP id o67-v6mr35817973iof.143.1534727625019; Sun, 19 Aug 2018 18:13:45 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:b472:0:0:0:0:0 with HTTP; Sun, 19 Aug 2018 18:13:44 -0700 (PDT) In-Reply-To: References: <201808191456.w7JEuAZE069780@repo.freebsd.org> <97661C9D-9C25-4DE0-89A8-FE1C40DAFB81@freebsd.org> From: Conrad Meyer Date: Sun, 19 Aug 2018 18:13:44 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r338053 - head/sys/netinet To: "Bjoern A. Zeeb" 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: Mon, 20 Aug 2018 01:13:52 -0000 On Sun, Aug 19, 2018 at 11:40 AM, Bjoern A. Zeeb wrote: > I am so happy we have a version control system where you could hopefully > find out if the original committer left a decent commit message.. takes less > than 60 seconds .. > https://svnweb.freebsd.org/base?view=revision&revision=82122 It is great we have such a system, but unfortunately the message doesn't really answer my question(s). I don't know that that means it isn't "decent," but it isn't really helpful. :-) Take care, Conrad From owner-svn-src-head@freebsd.org Mon Aug 20 01:41:33 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 C6E02107F4EB; Mon, 20 Aug 2018 01:41:32 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f178.google.com (mail-io0-f178.google.com [209.85.223.178]) (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 6C8BC747AD; Mon, 20 Aug 2018 01:41:32 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f178.google.com with SMTP id l7-v6so11299276iok.6; Sun, 19 Aug 2018 18:41:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=T/aw6vjC1ZUF8uE4bGrgu9IxAfQPLENRpabNglN64zA=; b=iWAHXSc4BtePyYRu2GtoSw1NFrXIDHprIZf2EE9kWWXpLXiIzH4fD+8PAEgV0BlrHV YUAyum7HoGiNmUxfXNQWm+ODC5SY60DFhLlTn4dw7GFVLGas44jV0vinHhbxQKyjsV/o gj121hae+UpFD+ykU6r7CX/+CLx3o9vCRazWxJo7NfWc3qqUScpPW2KLDmMlAersjotJ jVZnyQQEBCQnvzHIK0FwJoeXl3bvRgoh3t6oRsRnaylLhw2ChkE2kpv37/S3iBOLLn9A nzOkajC4H3ftz6n/u5FX3LADWkN8M2TT7jcxZtyFuPT7bwH6Ojc92w6kjl5WmFzM3bQv MFtw== X-Gm-Message-State: APzg51C4E0IpOhcf0INPSHMqSO/DOq6LUCVDSCryekZRUEjhG4Fhvwdb aImd62Ufl7pvTR+TEp864Q9L1MB6 X-Google-Smtp-Source: ANB0VdZr032RjghB7/3R8F0QJV1VmQtoeuis9MUd3D3SnpgdPg0zu2ZQ7P/I6i8cpR8A2oyCC3dYdw== X-Received: by 2002:a6b:b7c7:: with SMTP id h190-v6mr253865iof.164.1534727553311; Sun, 19 Aug 2018 18:12:33 -0700 (PDT) Received: from mail-it0-f50.google.com (mail-it0-f50.google.com. [209.85.214.50]) by smtp.gmail.com with ESMTPSA id u4-v6sm3054300iob.0.2018.08.19.18.12.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Aug 2018 18:12:33 -0700 (PDT) Received: by mail-it0-f50.google.com with SMTP id h20-v6so18480657itf.2; Sun, 19 Aug 2018 18:12:33 -0700 (PDT) X-Received: by 2002:a24:f945:: with SMTP id l66-v6mr8219653ith.6.1534727553008; Sun, 19 Aug 2018 18:12:33 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:b472:0:0:0:0:0 with HTTP; Sun, 19 Aug 2018 18:12:32 -0700 (PDT) In-Reply-To: <97661C9D-9C25-4DE0-89A8-FE1C40DAFB81@freebsd.org> References: <201808191456.w7JEuAZE069780@repo.freebsd.org> <97661C9D-9C25-4DE0-89A8-FE1C40DAFB81@freebsd.org> From: Conrad Meyer Date: Sun, 19 Aug 2018 18:12:32 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r338053 - head/sys/netinet To: Michael Tuexen 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: Mon, 20 Aug 2018 01:41:33 -0000 On Sun, Aug 19, 2018 at 10:08 AM, Michael Tuexen wrote: >> On 19. Aug 2018, at 18:35, Conrad Meyer wrote: >> Hi Michael, >> >> How was this particular keyed hash function construction chosen? >> (Yes, I see it is the same initial TSN, but how was that selected?) > You mean: > > Why is FreeBSD using the MD5 with secret suffix as the keyed hash function? Yes :-). > I don't know, I have not implemented that. > > However, https://tools.ietf.org/html/rfc6528#section-3 suggests this, > OpenBSD uses a similar computation, but uses SHA512 instead of MD5, NetBSD > seem to use the same computation as FreeBSD. > I guess using MD5 was an acceptable choice at the time the choice was made. I see. I don't know that MD5 is a poor fit, but the actual HMAC construction has somewhat nicer properties than this digest with a plain secret suffix construction. I don't know that those properties matter for this use, especially when the hash is then truncated to a 32-bit value anyway. > When preparing this patch I was about to choose a different keyed hash function, > but decided to separate > * Using a keyed has functions as the offset for the TCP time stamp. > * Choose a good keyed hash function. > > That is why I isolated the keyed hash function. So it is simple to replace > it with a different one. That seems very reasonable to me, thanks. > I think it would be good to change this keyed hash function to SIP-HASH (both > for the initial sequence number and the time stamp). Opinions? Well, sip-hash is no cryptographic hash, but it is unclear to me if that is needed or meaningful for this use. There may be good modern keyed cryptographic hashes with comparable performance to MD5 (i.e., according to https://www.cryptopp.com/benchmarks.html Blake2 may have comparable performance to MD5, although it is unclear how performance compares for very small "messages" like this use). But I admit I am unfamiliar with the requirements here and therefore am hesitant to make any recommendation. All the best, Conrad From owner-svn-src-head@freebsd.org Mon Aug 20 02:08: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 6CB6B107FE69; Mon, 20 Aug 2018 02:08:40 +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 1F7BC7532A; Mon, 20 Aug 2018 02:08:40 +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 004756F38; Mon, 20 Aug 2018 02:08:40 +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 w7K28dLm016281; Mon, 20 Aug 2018 02:08:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7K28d4p016280; Mon, 20 Aug 2018 02:08:39 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808200208.w7K28d4p016280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 20 Aug 2018 02:08:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338083 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 338083 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, 20 Aug 2018 02:08:40 -0000 Author: kevans Date: Mon Aug 20 02:08:39 2018 New Revision: 338083 URL: https://svnweb.freebsd.org/changeset/base/338083 Log: Add drawer.lua(8) Added: head/stand/lua/drawer.lua.8 (contents, props changed) Added: head/stand/lua/drawer.lua.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/lua/drawer.lua.8 Mon Aug 20 02:08:39 2018 (r338083) @@ -0,0 +1,179 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2018 Kyle Evans +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 19, 2018 +.Dt DRAWER.LUA 8 +.Os +.Sh NAME +.Nm drawer.lua +.Nd FreeBSD menu/screen drawer module +.Sh DESCRIPTION +.Nm +contains functionality for drawing and manipulating the menu, logo, and brand +to the screen. +.Pp +Before using the functionality provided by +.Nm , +it must be included with a statement such as the following: +.Pp +.Dl local drawer = require("drawer") +.Ss BRAND DEFINITIONS +Brand definitions describe a +.Dq brand , +traditionally drawn above the menu. +The exact position may be controlled by using the +.Xr loader.conf 5 +variables +.Va loader_brand_x +and +.Va loader_brand_y . +The following keys may be defined for a brand definition: +.Bl -tag -width ".Ic Graphic" -offset indent +.It Ic graphic +A table of strings containing rows of text to be drawn to the screen. +.El +.Ss LOGO DEFINITIONS +Logo definitions describe a +.Dq logo , +traditionally to the right of the menu. +The exact position may be controlled by using the +.Xr loader.conf 5 +variables +.Va loader_logo_x +and +.Va loader_logo_y . +The following keys may be defined for a logo definition: +.Bl -tag -width ".Ic requires_color" -offset indent +.It Ic requires_color +A boolean describing whether or not this logo definition requires color. +If it is chosen to be drawn and it requires color on a color-disabled boot, +.Nm +will elect to use the default +.Dq orbbw +logo rather than the chosen logo. +.It Ic graphic +A table of strings containing rows of text to be drawn to the screen. +.It Ic shift +A table describing the +.Va x +and +.Va y +shift that should be applied to all elements should this logo be selected. +This is typically used for shifting the menu and brand if an empty or minimal +logo are selected. +.El +.Ss CUSTOM BRANDS AND LOGOS +The brand and logo system is designed to allow brands and logos to be easily +plugged in. +When an unrecognized +.Ev loader_brand +or +.Ev loader_logo +are encountered, +.Nm +will attempt to include +.Pa brand-${loader_brand}.lua +or +.Pa logo-${loader_logo}.lua +respectively. +These files are expected to call either +.Fn drawer.addBrand +or +.Fn drawer.addLogo +to add the requested branddef or logodef. +.Nm +will attempt to do another lookup for the requested brand or logo before falling +back to one of the following: +.Bl -tag -width ".Ic drawer.default_color_logodef" -offset indent +.It Ic drawer.default_brand +The default brand to be used if the requested brand cannot be located. +.It Ic drawer.default_color_logodef +The default logodef to be used if an invalid logodef is requested and +.Xr loader 8 +has been configured to allow output of color. +.It Ic drawer.default_bw_logodef +The default logodef to be used if either an invalid logodef has been requested, +or a logodef has been requested that requires color and +.Xr loader 8 +has been configured to not output color. +.El +.Ss FRAME STYLES +.Nm +contains the definitions for the different frame styles that may be drawn around +the menu. +Frame styles define the characters drawn for horizontal lines, vertical aligns, +and each of the four corner styles. +The following keys may be defined for a frame style: +.Bl -bullet -width "" +.It +horizontal +.It +vertical +.It +top_left +.It +bottom_left +.It +top_right +.It +bottom_right +.El +Frame styles are currently defined in the table +.Ic drawer.frame_styles +indexed by the name used for +.Ev loader_menu_frame . +No API currently exists for manipulating this table indirectly. +.Ss Exported functions +The following functions are exported from +.Nm : +.Bl -tag -width hook.registerType -offset indent +.It Fn drawer.addBrand name def +Add the brand definition described by +.Fa def +to the table of known brand definitions, indexed by +.Fa name . +.It Fn drawer.addLogo name def +Add the logo definition described by +.Fa def +to the table of known logo definitions, indexed by +.Fa name . +.It Fn drawer.drawscreen menudef +Draws the logo, brand, menu frame, and the current menu as described in +.Fa menudef , +formatted as defined by +.Xr menu.lua 8 . +.El +.Sh SEE ALSO +.Xr menu.lua 8 +.Sh AUTHORS +The +.Nm +file was originally written by +.An Pedro Souza Aq Mt pedrosouza@FreeBSD.org . +Later work and this manual page was done by +.An Kyle Evans Aq Mt kevans@FreeBSD.org . From owner-svn-src-head@freebsd.org Mon Aug 20 02:17: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 A5F89108015C; Mon, 20 Aug 2018 02:17:56 +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 4CD40757B9; Mon, 20 Aug 2018 02:17:56 +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 29BF170CC; Mon, 20 Aug 2018 02:17:56 +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 w7K2Huha021339; Mon, 20 Aug 2018 02:17:56 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7K2Huem021338; Mon, 20 Aug 2018 02:17:56 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201808200217.w7K2Huem021338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 20 Aug 2018 02:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338084 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 338084 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, 20 Aug 2018 02:17:57 -0000 Author: delphij Date: Mon Aug 20 02:17:55 2018 New Revision: 338084 URL: https://svnweb.freebsd.org/changeset/base/338084 Log: In r331279 the code used ENOSYS to check the existence of getrandom(2). This will only work if the caller already handles SIGSYS, which is not always the case. Address this by checking osreldate instead. Note that because there was not __FreeBSD_version bump when the system call was added, use 1200061 (r332100) which is the first bump after the introduction of the system call. PR: 230762 Reported by: Jenkins via Mark Millard Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D16807 Modified: head/lib/libc/gen/getentropy.c Modified: head/lib/libc/gen/getentropy.c ============================================================================== --- head/lib/libc/gen/getentropy.c Mon Aug 20 02:08:39 2018 (r338083) +++ head/lib/libc/gen/getentropy.c Mon Aug 20 02:17:55 2018 (r338084) @@ -34,10 +34,14 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "libc_private.h" +/* First __FreeBSD_version bump after introduction of getrandom(2) (r331279) */ +#define GETRANDOM_FIRST 1200061 + extern int __sysctl(int *, u_int, void *, size_t *, void *, size_t); static size_t @@ -99,21 +103,38 @@ int getentropy(void *buf, size_t buflen) { ssize_t rd; + bool have_getrandom; if (buflen > 256) { errno = EIO; return (-1); } + have_getrandom = (__getosreldate() >= GETRANDOM_FIRST); + while (buflen > 0) { - rd = getrandom(buf, buflen, 0); - if (rd == -1) { - if (errno == EINTR) - continue; - else if (errno == ENOSYS || errno == ECAPMODE) - return (getentropy_fallback(buf, buflen)); - else - return (-1); + if (have_getrandom) { + rd = getrandom(buf, buflen, 0); + if (rd == -1) { + switch (errno) { + case ECAPMODE: + /* + * Kernel >= r331280 and < r337999 + * will return ECAPMODE when the + * caller is already in capability + * mode, fallback to traditional + * method in this case. + */ + have_getrandom = false; + continue; + case EINTR: + continue; + default: + return (-1); + } + } + } else { + return (getentropy_fallback(buf, buflen)); } /* This cannot happen. */ From owner-svn-src-head@freebsd.org Mon Aug 20 02:37:25 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 CC1BF10808D0; Mon, 20 Aug 2018 02:37:25 +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 790907604D; Mon, 20 Aug 2018 02:37:25 +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 51A537409; Mon, 20 Aug 2018 02:37:25 +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 w7K2bPLt031363; Mon, 20 Aug 2018 02:37:25 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7K2bO5U031360; Mon, 20 Aug 2018 02:37:24 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808200237.w7K2bO5U031360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 20 Aug 2018 02:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338085 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 338085 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, 20 Aug 2018 02:37:26 -0000 Author: kevans Date: Mon Aug 20 02:37:24 2018 New Revision: 338085 URL: https://svnweb.freebsd.org/changeset/base/338085 Log: Add color.lua(8), password.lua(8), and screen.lua(8) Added: head/stand/lua/color.lua.8 (contents, props changed) head/stand/lua/password.lua.8 (contents, props changed) head/stand/lua/screen.lua.8 (contents, props changed) Added: head/stand/lua/color.lua.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/lua/color.lua.8 Mon Aug 20 02:37:24 2018 (r338085) @@ -0,0 +1,132 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2018 Kyle Evans +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 19, 2018 +.Dt COLOR.LUA 8 +.Os +.Sh NAME +.Nm color.lua +.Nd FreeBSD color module +.Sh DESCRIPTION +.Nm +contains functionality for working with colors. +.Pp +Before using the functionality provided by +.Nm , +it must be included with a statement such as the following: +.Pp +.Dl local color = require("color") +.Pp +The following color constants are exported from +.Nm : +.Bl -tag -width "Ic color.MAGENTA" -offset indent +.It Ic color.BLACK +.It Ic color.RED +.It Ic color.GREEN +.It Ic color.YELLOW +.It Ic color.BLUE +.It Ic color.MAGENTA +.It Ic color.CYAN +.It Ic color.WHITE +.El +.Pp +The following attribute constants are exported from +.Nm : +.Bl -tag -width "Ic color.DEFAULT" -offset indent +.It Ic color.DEFAULT +.It Ic color.BRIGHT +.It Ic color.DIM +.El +.Pp +The following functions are exported from +.Nm : +.Bl -tag -width "Fn color.isEnabled" -offset indent +.It Fn color.isEnabled +Returns True if +.Xr loader 8 +has been configured to not allow color, False otherwise. +This checks the +.Ev loader_color +.Xr loader.conf 5 +variable, along with +.Fn core.isSerialBoot . +.It Fn color.escapefg color_value +Returns the escape sequence that encodes +.Fa color_value +as a foreground color. +.Fn color.escapefg +returns an empty string if color is disabled. +.It Fn color.resetfg +Returns the escape sequence for the default foreground color. +.Fn color.resetfg +returns an empty string if color is disabled. +.It Fn color.escapebg color_value +Returns the escape sequence that encodes +.Fa color_value +as a background color. +.Fn color.escapebg +returns an empty string if color is disabled. +.It Fn color.resetbg +Returns the escape sequence for the default background color. +.Fn color.resetbg +returns an empty string if color is disabled. +.It Fn color.escape fg_color bg_color attribute +Returns an escape sequence that encodes +.Fa fg_color +as the foreground color, +.Fa bg_color +as the background color, and +.Fa attribute +applied. +.Fn color.escape +returns an empty string if color is disabled. +.It Fn color.default +Returns the escape sequence for the default color scheme, white on black with +no attributes applied. +.Fn color.default +returns an empty string if color is disabled. +.It Fn color.highlight str +Returns +.Fa str +with the +.Ic color.BRIGHT +attribute applied before it and reset after it. +.Fn color.highlight +returns +.Fa str +if color is disabled. +.El +.Sh SEE ALSO +.Xr screen.lua 8 +.Sh AUTHORS +The +.Nm +file was originally written by +.An Pedro Souza Aq Mt pedrosouza@FreeBSD.org . +Later work and this manual page was done by +.An Kyle Evans Aq Mt kevans@FreeBSD.org . Added: head/stand/lua/password.lua.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/lua/password.lua.8 Mon Aug 20 02:37:24 2018 (r338085) @@ -0,0 +1,74 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2018 Kyle Evans +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 19, 2018 +.Dt PASSWORD.LUA 8 +.Os +.Sh NAME +.Nm password.lua +.Nd FreeBSD password module +.Sh DESCRIPTION +.Nm +contains functionality for prompting for and checking passwords. +.Pp +Before using the functionality provided by +.Nm , +it must be included with a statement such as the following: +.Pp +.Dl local password = require("password") +.Pp +The following functions are exported from +.Nm : +.Bl -tag -width "Fn password.read prompt_length" -offset indent +.It Fn password.read prompt_length +Read a password following a prompt. +.Fa prompt_length +is required so that the twiddle may be properly drawn as the user is typing. +.It Fn password.check +Drives the primary password checks done by the loader. +The +.Fn password.check +function will check +.Ev bootlock_password , +.Ev geom_eli_passphrase_prompt , +and +.Ev password +and prompt the user for passwords as-needed. +If +.Ev password +is set, the autoboot sequence will begin as the user is prompted for a password. +.El +.Sh SEE ALSO +.Xr screen.lua 8 +.Sh AUTHORS +The +.Nm +file was originally written by +.An Pedro Souza Aq Mt pedrosouza@FreeBSD.org . +Later work and this manual page was done by +.An Kyle Evans Aq Mt kevans@FreeBSD.org . Added: head/stand/lua/screen.lua.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/lua/screen.lua.8 Mon Aug 20 02:37:24 2018 (r338085) @@ -0,0 +1,102 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2018 Kyle Evans +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 19, 2018 +.Dt SCREEN.LUA 8 +.Os +.Sh NAME +.Nm screen.lua +.Nd FreeBSD screen manipulation module +.Sh DESCRIPTION +.Nm +contains functionality for manipulating the screen. +This includes functionality such as clearing the screen, moving the cursor, and +setting foreground/background colors using sequences provided by +.Xr color.lua 8 . +.Pp +Before using the functionality provided by +.Nm , +it must be included with a statement such as the following: +.Pp +.Dl local screen = require("screen") +.Pp +The following variables are exported from +.Nm : +.Bl -tag -width "Ic screen.default_x" -offset indent +.It Ic screen.default_x +The x component of the default cursor position. +.It Ic screen.default_y +The y component of the default cursor position. +.El +.Pp +The following functions are exported from +.Nm : +.Bl -tag -width "Fn screen.clear" -offset indent +.It Fn screen.clear +Clears the screen. +.Fn screen.clear +will do nothing if a serial boot is detected. +.It Fn screen.setcursor x y +Sets the cursor position to +.Fa x , +.Fa y . +.Fn screen.setcursor +will do nothing if a serial boot is detected. +.It Fn screen.setforeground color_value +Sets the foreground color to +.Fa color_value , +which should be a constant defined in +.Xr color.lua 8 . +.Fn screen.setforeground +will do nothing if color is disabled. +.It Fn screen.setbackground color_value +Sets the background color to +.Fa color_value , +which should be a constant defined in +.Xr color.lua 8 . +.Fn screen.setbackground +will do nothing if color is disabled. +.It Fn screen.defcolor +Sets the default color scheme, as defined by +.Fn color.default . +.Fn screen.defcolor +will do nothing if color is disabled. +.It Fn screen.defcursor +Sets the default cursor position to that defined by +.Ic screen.default_x , +.Ic screen.default_y . +.El +.Sh SEE ALSO +.Xr color.lua 8 +.Sh AUTHORS +The +.Nm +file was originally written by +.An Pedro Souza Aq Mt pedrosouza@FreeBSD.org . +Later work and this manual page was done by +.An Kyle Evans Aq Mt kevans@FreeBSD.org . From owner-svn-src-head@freebsd.org Mon Aug 20 02:38: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 65A5D1080986 for ; Mon, 20 Aug 2018 02:38:55 +0000 (UTC) (envelope-from delphij@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 D14A6761E0; Mon, 20 Aug 2018 02:38:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from odin.corp.delphij.net (unknown [IPv6:2601:646:8882:37a:c5a7:8a3e:32d:3341]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: delphij/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 896C71E130; Mon, 20 Aug 2018 02:38:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Subject: Re: svn commit: r338059 - in head: Seems to have lead to "Bad system call" in ci.freebsd.org's FreeBSD-head-amd64-testvm From: Xin Li To: Mark Millard , svn-src-head@freebsd.org Cc: "jenkins-admin@freebsd.org" References: <1406b458-47d0-6027-f871-9c5923d1ffa7@FreeBSD.org> Openpgp: preference=signencrypt Autocrypt: addr=delphij@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFJNzwQBEACuPNSJjL/AD8oHFuG72vtx5P7Q6dpiEbFABgw/IohS65yDZDd3qFH9ssQv AsFafwB/ofsk6t7dx6zIC05dv5qjhGIOKSJxFC4U1HAot9+QpeUG+8boTKZiiycrMruItj2U JANlv+gN5h0mAsL5f9eNzhRM43kdjN8cQnBIujhO54Derjnrnqz6cQtoonV6SvvVJZUQGxHK 5R1XYJ6wiTuvoEuRYnNObJmPFWZyYOaGZz0qqD6Qe1BhkZuRzv2bZxwJc3Raap/GF6Pm9J/c hlYHUmm2QLaXvmoP8WNosNjla1fup0tgYQE+7MTtHFVxmVj9ZTihN3rEL5IkeEKjQAqcpe1n Db8X2o4K262LRpFl8WtVMW2TfN5Avpj+knZMl3tkYGvYK/nfadCr6Af4co9mkhX6QYgkerg2 mXEGaQzSD/omnsxHCfqMgdphaX3B3eoY2Fv36BMpjSdHmm0rmwqjqZaqlZn89vQ/I6ATvLyx JsdHwTbrj57audl/RKC+OpREOJPaVULp1L+9zdBXslILO8MJaT6YEw1T29bEj5jvLm03Y4rF u/YTruHcMPpsGbpJckDKiy6ISAbMtPvz7/KR91xPHS6KExGiIakIX9xpIXIDKgq+ecEWwkFK PogoKqO6K0/GYkTRoKdXGzsILvIurtbPqSFqWzbRIyNOa82jowARAQABzRZYaW4gTGkgPGRA ZGVscGhpai5uZXQ+wsF9BBMBCgAnBQJTQvBFAhsjBQkJZgGABQsJCAcDBRUKCQgLBRYCAwEA Ah4BAheAAAoJEJW2GBstM+nsha4P/2Roa/REjZLZlIG1TKOxEDqmwc3fynX4w2g7/FXA7f7Z YO5N4vnnnQdJbDZDt4TJtiP1NHHdheQ5+loJrrCXVlU31LuJv1ebM2Ajsuo/0l3tfulEf6Ki GoozmaNZAhwiGJkQVg9DSKsea5xIA31lPnFH4T0SKn8Q6F4HYienmJJtlKVTADvYXA+DRmv0 rNOyVe+V/AuTFuelKg3Ua5a+dY3oqtrQQvFS4n7iIrNjEMUBVx0XTrYLddnF+YjXDg5Phf0D pV/2yJOXiTGiZMK6i7vwHZkJvarACoTSrUrr6OBuZv5Gf87VgifZKLr2Fuf+FePiVCoZTQiL 0hPQyABMzeWa32P6BY2LBMMMFvFiyL5pN5k6nJ0nx4skl8UxZ5ay4yyVg2u3f4aI3+m0XlZ+ iixrjmCTGi1s+d/n6E3eFXdJUUbSOXLZaU4qrbXRzTYCZmZViryv7ibtOHXnG6oWy7BFEHuT rUW6OBvsQDTp5iQ6opENJ5/ZzSA3c5p1WS9Ezv4Bpdqcm7LTQX2j6kXikj8YqICtDF2rkKZ2 Ynjm9se9B0h/T1SOaSpbtRg05UKjsinDq2x8EeX21yFs3UyvwePLrGoNKL45EJM0xwxrnlfr M0ayKJNLoYysY78d54hg7XMmkQD/oZz9I+k4fN6CmZ2i5WGH2BgYs0313JMHxSg7zsFNBFJN zwQBEADPtS+nfTKM6PwgSWLDGVgUYQ/RLaKzCcpQAf4ryLBugXpx3s2BBT1bixX7CpsLXKQi +RRETgSFzDaBL9SEs2ZDV2YT+zGp08aijK/Yl9+RIeezAukI3c+XMHuo8ktUWJmo5/1DX07q G30ckG7uFuTnt31sFzwhh/ZeSuLFyel/fWF48KExLDIVa8DyEUJaYvE9Vfph4T/3LkKuzVTy +iwUBLiSLj5G5N70A+4usbL3eKyYrJqCSaLfrP99/nlgBhMAHVcKcv0uqSuiaH9OMqg1VjQs N8j6NDQug9QrbBTM6U7oZWF/AK+CdFoe+leq5MZfzwCevs0BQgxWm4SHMpXL2vtly67QSPMY dl96fOzw8YbKHv1o0ixhCvc37cI9oUVuSJLXKhEEAvWvLuusiuNeoz+6aPlELvD8h5txJqui tVOzctvJ7ktGZTNiz73tKYVdkKaQVyo8QJFLCNLnUulrQ5wXwteYPg6mrpBxu9VqgDrMp7eB T2kaZ4GRBoMWXXPYSIEe5PM5hhNCsSUfqrKj34UZPijPe+HiWoFJ4S5vIpzutiae11Ctki7u XzeLAhOJQB2raraIqDlFP9I9Zj9JOAZhmiKSEWKfOooCNxQYGiUdPrdYnAe+m7FXRomjF0OO gSepNIESt2gOEIbE5cMxQ0gAueNJc58eHCjWhsNJIwARAQABwsFlBBgBCgAPBQJSTc8EAhsM BQkJZgGAAAoJEJW2GBstM+nsh8EP/1sxZpkJelu+smmqaqdrGHlNrFVLOmeN5yr2IGHBUbmF htjr7fVoU8T0mUnlUU724aKPla4nWhMb4NMu+VxRRFGaT2TYpyR6VIxaStycyUdMGjdXV0Pz TGmxFXhNZXKEITXH9sIxuONBp1czl4AgwN7AAl1MKyV13AaLIyajs58mYmuXtyFn/O+4lxh5 nl2Fa3L9YkL9O7QU2p6WAnDky+L3PgUWp1AzJGfYlLZ8XXCi+KK+pnta+f9yKHt/Oqd/s7OC W4mXgFkBrfuSZZofa4eZckh5u0yBYW3OnEJhClgxRbuOhyYwqQr5oxPrQtjtbMiBzbrOkHhy NnrVCFd9EqlojREGDefHo3V+ZlUOc6OoN3CAYnNa2uLEOm5DCuqOE4z5atBCih5EyITPp7JP J2disEP6ddipcilqbnJdP+TyRQwSv5qRNy8cHahD1Cg9XJJHiC3qr+W3eOtqPkJxhU5biPEr 7dljaLS1Ij771brzqO/x5zW1L9py7muXzYBsW8+keKj8LOYs2242KgjI5Og9YhIJGBFBNddQ wxKBKQpytKQOiXwjhk4Nj77U796bsCd/jIS0r0ZUKBEptPyKso7ncfrm163aEmSaDUkiIjyp 9CEOVT87D+VAVh9PyLGP1niQzWEWFSK36tRGZlF0odP1ZB6wub9zq2DxFouSjHgH Organization: The FreeBSD Project Message-ID: Date: Sun, 19 Aug 2018 19:38:46 -0700 User-Agent: Thunderbird MIME-Version: 1.0 In-Reply-To: <1406b458-47d0-6027-f871-9c5923d1ffa7@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ysZztFbSpKkTRfGIWu2wAfZzK30NVbaaA" 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, 20 Aug 2018 02:38:55 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ysZztFbSpKkTRfGIWu2wAfZzK30NVbaaA Content-Type: multipart/mixed; boundary="h0uesFAJrZeC3zvHIkAexlGJTZW9CXJ8H"; protected-headers="v1" From: Xin Li To: Mark Millard , svn-src-head@freebsd.org Cc: "jenkins-admin@freebsd.org" Message-ID: Subject: Re: svn commit: r338059 - in head: Seems to have lead to "Bad system call" in ci.freebsd.org's FreeBSD-head-amd64-testvm References: <1406b458-47d0-6027-f871-9c5923d1ffa7@FreeBSD.org> In-Reply-To: <1406b458-47d0-6027-f871-9c5923d1ffa7@FreeBSD.org> --h0uesFAJrZeC3zvHIkAexlGJTZW9CXJ8H Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 8/19/18 18:09, Xin Li wrote: > It's a bug, nice catch! I've created https://bugs.freebsd.org/230762 t= o > track this one. >=20 > In the meantime are we seriously testing -CURRENT against a kernel > before March 21? (That's 6 months ago!) Fix committed as r338084. > On 8/19/18 13:52, Mark Millard wrote: >> -r338057 built fine for both then: >> >> https://ci.freebsd.org/job/FreeBSD-head-amd64-testvm/9265/console >> >> of -r338065 shows: >> (so after "deprecation of arc4random_stir and arc4random_addrandom") >> >> 19:38:13 + sudo chroot ufs env 'ASSUME_ALWAYS_YES=3Dyes' pkg update >> 19:38:13 Bad system call >> 19:38:13 Build step 'Execute shell' marked build as failure >> 19:38:13 FTP: Current build result is [FAILURE], not going to run. >> 19:38:13 [PostBuildScript] - Executing post build scripts. >> 19:38:13 [FreeBSD-head-amd64-testvm] $ /bin/sh -xe /tmp/jenkins7995907= 498943424274.sh >> 19:38:13 + sh freebsd-ci/scripts/jail/clean.sh >> 19:38:13 clean jail FreeBSD-head-amd64-testvm >> 19:38:41 Finished: FAILURE >> >> instead of (from the prior successful one): >> >> 18:37:15 + sudo chroot ufs env 'ASSUME_ALWAYS_YES=3Dyes' pkg update >> 18:37:15 [FreeBSD-head-amd64-testvm.jail.ci.FreeBSD.org] Installing pk= g-1.10.5_1... >> 18:37:15 [FreeBSD-head-amd64-testvm.jail.ci.FreeBSD.org] Extracting pk= g-1.10.5_1: .......... done >> 18:37:15 Updating FreeBSD repository catalogue... >> 18:37:15 pkg: Repository FreeBSD load error: access repo file(/var/db/= pkg/repo-FreeBSD.sqlite) failed: No such file or directory >> 18:37:15 [FreeBSD-head-amd64-testvm.jail.ci.FreeBSD.org] Fetching meta= =2Etxz: . done >> 18:37:15 [FreeBSD-head-amd64-testvm.jail.ci.FreeBSD.org] Fetching pack= agesite.txz: .......... done >> 18:37:16 Processing entries: .......... done >> 18:37:25 FreeBSD repository update completed. 32107 packages processed= =2E >> 18:37:25 All repositories are up to date. >> . . . >> >> =3D=3D=3D >> Mark Millard >> marklmi at yahoo.com >> ( dsl-only.net went >> away in early 2018-Mar) >=20 >=20 --h0uesFAJrZeC3zvHIkAexlGJTZW9CXJ8H-- --ysZztFbSpKkTRfGIWu2wAfZzK30NVbaaA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJbeim5AAoJEJW2GBstM+nsSdUP/ibfAME2Re2vWcfB8b9VauS8 6V/7WLhmV9wUnHK9Eht9HLvy8b5iNt4JsKDJHLQKEhbW5dBFiGTdkIrPLmzB5KCn 1XboaPJy0Li/dsWOa+I9ay3D/YrGHZvAbekCwoq1HWpEvT3NX0gl/J2wCbLhszxK gXz9n5ImaFY1H6Sjf/1Mvw2yHOs9lPFvQX1njV3/yx3XQOiOdpt6+4u/x4GZBPS0 RdlJquIE1LguVphO1TRG9LLPRGHW0ajvmxh5aZ/9ZPSIDvtOKldUaHY7GdCEtTjI EFqbHZLDmbKjzY1GPrDRC1cDqJbLsDfBWEKdLXTmS97axm5bu4Kr4JwKkXU296Rx s4Js3Ry7bT3+w85hwZJgRb/uSCgFBRbAwaxay/x52WlXYiAh34NlSpzgFOTaEgZX KTQPW6uKKTXyI+dwDZDs/GCDngdbQBrIM3hvFveq6/xceduYWcnlYXxFlG/FxrV+ r6AKKQYDIOq+FjWWDffL5h4qjFYIpcHv82Q7P75rH6wX3rZF1a6uk+h9eiZEpTBG DHQ7Yx3NgRbnPvR9e5WoDAsjzm1w5upMlfIZ1rmDGJvsq1zt/RfffW7mMRfGCgIs 849Ru90Jwn03s4STMaaR9I+R0+s1HrrZ8N9NLm9XkttaG6qjsplfcXKt8zvjRUQ2 e60l+j3uSRRAfY7pHPcG =RRCK -----END PGP SIGNATURE----- --ysZztFbSpKkTRfGIWu2wAfZzK30NVbaaA-- From owner-svn-src-head@freebsd.org Mon Aug 20 02:40: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 0EDB11080A01; Mon, 20 Aug 2018 02:40:11 +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 ADFD576228; Mon, 20 Aug 2018 02:40:10 +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 8C8B47410; Mon, 20 Aug 2018 02:40:10 +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 w7K2eAA9031543; Mon, 20 Aug 2018 02:40:10 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7K2eAoR031542; Mon, 20 Aug 2018 02:40:10 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808200240.w7K2eAoR031542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 20 Aug 2018 02:40:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338086 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 338086 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, 20 Aug 2018 02:40:11 -0000 Author: kevans Date: Mon Aug 20 02:40:10 2018 New Revision: 338086 URL: https://svnweb.freebsd.org/changeset/base/338086 Log: lualoader: Install all manpages Now that a complete set is written, save for one describing loader.lua, install all of them. This was not previously done as they were written to hopefully avoid confusion as bits and pieces of the overall system were undocumented. Modified: head/stand/lua/Makefile Modified: head/stand/lua/Makefile ============================================================================== --- head/stand/lua/Makefile Mon Aug 20 02:37:24 2018 (r338085) +++ head/stand/lua/Makefile Mon Aug 20 02:40:10 2018 (r338086) @@ -2,6 +2,16 @@ .include +MAN= cli.lua.8 \ + color.lua.8 \ + config.lua.8 \ + core.lua.8 \ + drawer.lua.8 \ + hook.lua.8 \ + menu.lua.8 \ + password.lua.8 \ + screen.lua.8 + FILESDIR= /boot/lua FILES= cli.lua \ color.lua \ From owner-svn-src-head@freebsd.org Mon Aug 20 04:44: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 F32861082F20; Mon, 20 Aug 2018 04:44:30 +0000 (UTC) (envelope-from araujo@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 A4DA979E67; Mon, 20 Aug 2018 04:44:30 +0000 (UTC) (envelope-from araujo@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 7ABD71096B; Mon, 20 Aug 2018 04:44:30 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7K4iUru098911; Mon, 20 Aug 2018 04:44:30 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7K4iUhf098910; Mon, 20 Aug 2018 04:44:30 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201808200444.w7K4iUhf098910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 20 Aug 2018 04:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338087 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 338087 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, 20 Aug 2018 04:44:31 -0000 Author: araujo Date: Mon Aug 20 04:44:29 2018 New Revision: 338087 URL: https://svnweb.freebsd.org/changeset/base/338087 Log: Fix double mutex lock. Reported by: Coverity CID: 1394833 Discussed with: Leon Dang Sponsored by: iXsystems Inc. Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Aug 20 02:40:10 2018 (r338086) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Aug 20 04:44:29 2018 (r338087) @@ -358,7 +358,7 @@ pci_nvme_init_nsdata(struct pci_nvme_softc *sc) } static void -pci_nvme_reset(struct pci_nvme_softc *sc) +pci_nvme_reset_locked(struct pci_nvme_softc *sc) { DPRINTF(("%s\r\n", __func__)); @@ -374,7 +374,6 @@ pci_nvme_reset(struct pci_nvme_softc *sc) sc->regs.csts = 0; if (sc->submit_queues != NULL) { - pthread_mutex_lock(&sc->mtx); sc->num_cqueues = sc->num_squeues = sc->max_queues; for (int i = 0; i <= sc->max_queues; i++) { @@ -398,8 +397,6 @@ pci_nvme_reset(struct pci_nvme_softc *sc) sc->compl_queues[i].tail = 0; sc->compl_queues[i].head = 0; } - - pthread_mutex_unlock(&sc->mtx); } else sc->submit_queues = calloc(sc->max_queues + 1, sizeof(struct nvme_submission_queue)); @@ -414,6 +411,14 @@ pci_nvme_reset(struct pci_nvme_softc *sc) } static void +pci_nvme_reset(struct pci_nvme_softc *sc) +{ + pthread_mutex_lock(&sc->mtx); + pci_nvme_reset_locked(sc); + pthread_mutex_unlock(&sc->mtx); +} + +static void pci_nvme_init_controller(struct vmctx *ctx, struct pci_nvme_softc *sc) { uint16_t acqs, asqs; @@ -1537,7 +1542,7 @@ pci_nvme_write_bar_0(struct vmctx *ctx, struct pci_nvm if (NVME_CC_GET_EN(ccreg) != NVME_CC_GET_EN(sc->regs.cc)) { if (NVME_CC_GET_EN(ccreg) == 0) /* transition 1-> causes controller reset */ - pci_nvme_reset(sc); + pci_nvme_reset_locked(sc); else pci_nvme_init_controller(ctx, sc); } From owner-svn-src-head@freebsd.org Mon Aug 20 04:50: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 6126B1083013; Mon, 20 Aug 2018 04:50:12 +0000 (UTC) (envelope-from araujo@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 16C187A00D; Mon, 20 Aug 2018 04:50:12 +0000 (UTC) (envelope-from araujo@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 E769410971; Mon, 20 Aug 2018 04:50:11 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7K4oBpT099208; Mon, 20 Aug 2018 04:50:11 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7K4oBbN099207; Mon, 20 Aug 2018 04:50:11 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201808200450.w7K4oBbN099207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 20 Aug 2018 04:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338088 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 338088 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, 20 Aug 2018 04:50:12 -0000 Author: araujo Date: Mon Aug 20 04:50:11 2018 New Revision: 338088 URL: https://svnweb.freebsd.org/changeset/base/338088 Log: Users must set the number of queues from 1 to maximum 16 queues. Sponsored by: iXsystems Inc. Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Aug 20 04:44:29 2018 (r338087) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Aug 20 04:50:11 2018 (r338088) @@ -373,9 +373,8 @@ pci_nvme_reset_locked(struct pci_nvme_softc *sc) sc->regs.cc = 0; sc->regs.csts = 0; + sc->num_cqueues = sc->num_squeues = sc->max_queues; if (sc->submit_queues != NULL) { - sc->num_cqueues = sc->num_squeues = sc->max_queues; - for (int i = 0; i <= sc->max_queues; i++) { /* * The Admin Submission Queue is at index 0. @@ -1765,10 +1764,9 @@ pci_nvme_parse_opts(struct pci_nvme_softc *sc, char *o (1 << sc->nvstore.sectsz_bits) < sc->nvstore.sectsz; sc->nvstore.sectsz_bits++); - if (sc->max_queues == 0) { - fprintf(stderr, "Invalid maxq option\n"); - return (-1); - } + if (sc->max_queues <= 0 || sc->max_queues > NVME_QUEUES) + sc->max_queues = NVME_QUEUES; + if (sc->max_qentries <= 0) { fprintf(stderr, "Invalid qsz option\n"); return (-1); From owner-svn-src-head@freebsd.org Mon Aug 20 04:56: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 754F610832EA; Mon, 20 Aug 2018 04:56:38 +0000 (UTC) (envelope-from araujo@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 207517A4B2; Mon, 20 Aug 2018 04:56:38 +0000 (UTC) (envelope-from araujo@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 E86AC10AFB; Mon, 20 Aug 2018 04:56:37 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7K4ub1a004361; Mon, 20 Aug 2018 04:56:37 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7K4ubkR004360; Mon, 20 Aug 2018 04:56:37 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201808200456.w7K4ubkR004360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 20 Aug 2018 04:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338089 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 338089 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, 20 Aug 2018 04:56:38 -0000 Author: araujo Date: Mon Aug 20 04:56:37 2018 New Revision: 338089 URL: https://svnweb.freebsd.org/changeset/base/338089 Log: NVMe spec version 1.3c says that "serial number" field must be 7-bit ASCII, with unused bytes padded by space characters. Same for firmware number and namespace number. Discussed with: imp@ Sponsored by: iXsystems Inc. Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Aug 20 04:50:11 2018 (r338088) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Aug 20 04:56:37 2018 (r338089) @@ -254,6 +254,14 @@ static void pci_nvme_io_partial(struct blockif_req *br (NVME_STATUS_SC_MASK << NVME_STATUS_SC_SHIFT)) static __inline void +cpywithpad(char *dst, int dst_size, const char *src, char pad) +{ + int len = strnlen(src, dst_size); + memcpy(dst, src, len); + memset(dst + len, pad, dst_size - len); +} + +static __inline void pci_nvme_status_tc(uint16_t *status, uint16_t type, uint16_t code) { @@ -287,21 +295,9 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) cd->vid = 0xFB5D; cd->ssvid = 0x0000; - cd->mn[0] = 'b'; - cd->mn[1] = 'h'; - cd->mn[2] = 'y'; - cd->mn[3] = 'v'; - cd->mn[4] = 'e'; - cd->mn[5] = '-'; - cd->mn[6] = 'N'; - cd->mn[7] = 'V'; - cd->mn[8] = 'M'; - cd->mn[9] = 'e'; + cpywithpad((char *)cd->mn, sizeof(cd->mn), "bhyve-NVMe", ' '); + cpywithpad((char *)cd->fr, sizeof(cd->fr), "1.0", ' '); - cd->fr[0] = '1'; - cd->fr[1] = '.'; - cd->fr[2] = '0'; - /* Num of submission commands that we can handle at a time (2^rab) */ cd->rab = 4; @@ -1715,12 +1711,11 @@ pci_nvme_parse_opts(struct pci_nvme_softc *sc, char *o } else if (!strcmp("ser", xopts)) { /* * This field indicates the Product Serial Number in - * 8-bit ASCII, unused bytes should be NULL characters. - * Ref: NVM Express Management Interface 1.0a. + * 7-bit ASCII, unused bytes should be space characters. + * Ref: NVMe v1.3c. */ - memset(sc->ctrldata.sn, 0, sizeof(sc->ctrldata.sn)); - strncpy(sc->ctrldata.sn, config, - sizeof(sc->ctrldata.sn)); + cpywithpad((char *)sc->ctrldata.sn, + sizeof(sc->ctrldata.sn), config, ' '); } else if (!strcmp("ram", xopts)) { uint64_t sz = strtoull(&xopts[4], NULL, 10); From owner-svn-src-head@freebsd.org Mon Aug 20 07:33: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 53C1610877BD; Mon, 20 Aug 2018 07:33:02 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D0D3C7FCB1; Mon, 20 Aug 2018 07:33:01 +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 B233125D386D; Mon, 20 Aug 2018 07:32:59 +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 8B0ACD1F834; Mon, 20 Aug 2018 07:32:58 +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 Cz6LLdsfwjZE; Mon, 20 Aug 2018 07:32:57 +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 05C71D1F81A; Mon, 20 Aug 2018 07:32:56 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Conrad Meyer" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338053 - head/sys/netinet Date: Mon, 20 Aug 2018 07:33:00 +0000 X-Mailer: MailMate (2.0BETAr6116) Message-ID: In-Reply-To: References: <201808191456.w7JEuAZE069780@repo.freebsd.org> <97661C9D-9C25-4DE0-89A8-FE1C40DAFB81@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed 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, 20 Aug 2018 07:33:02 -0000 On 20 Aug 2018, at 1:13, Conrad Meyer wrote: > On Sun, Aug 19, 2018 at 11:40 AM, Bjoern A. Zeeb > wrote: >> I am so happy we have a version control system where you could >> hopefully >> find out if the original committer left a decent commit message.. >> takes less >> than 60 seconds .. >> https://svnweb.freebsd.org/base?view=revision&revision=82122 > > It is great we have such a system, but unfortunately the message > doesn't really answer my question(s). I don't know that that means it > isn't "decent," but it isn't really helpful. :-) Well it tells you all you need to know. If you open the RFC cited it’ll tell you why the 4-tuple is used and why MD5, which seemed to be the questions you two were guessing about. /bz From owner-svn-src-head@freebsd.org Mon Aug 20 09:29: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 6235D1089FAD; Mon, 20 Aug 2018 09:29: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 158D78365A; Mon, 20 Aug 2018 09:29:22 +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 EA94E136D4; Mon, 20 Aug 2018 09:29: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 w7K9TLv0042496; Mon, 20 Aug 2018 09:29:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7K9TLuD042495; Mon, 20 Aug 2018 09:29:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201808200929.w7K9TLuD042495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 20 Aug 2018 09:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338094 - head/usr.bin/vmstat X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/usr.bin/vmstat X-SVN-Commit-Revision: 338094 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, 20 Aug 2018 09:29:22 -0000 Author: jhb Date: Mon Aug 20 09:29:21 2018 New Revision: 338094 URL: https://svnweb.freebsd.org/changeset/base/338094 Log: Fully retire the unimplemented -t option from vmstat(8). It was #ifdef'd out in the 4.4BSD import and hasn't been re-enabled since then. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16804 Modified: head/usr.bin/vmstat/vmstat.c Modified: head/usr.bin/vmstat/vmstat.c ============================================================================== --- head/usr.bin/vmstat/vmstat.c Mon Aug 20 06:09:09 2018 (r338093) +++ head/usr.bin/vmstat/vmstat.c Mon Aug 20 09:29:21 2018 (r338094) @@ -86,7 +86,7 @@ __FBSDID("$FreeBSD$"); static char da[] = "da"; enum x_stats { X_SUM, X_HZ, X_STATHZ, X_NCHSTATS, X_INTRNAMES, X_SINTRNAMES, - X_INTRCNT, X_SINTRCNT, X_DEFICIT, X_REC, X_PGIN, X_XSTATS }; + X_INTRCNT, X_SINTRCNT }; static struct nlist namelist[] = { [X_SUM] = { .n_name = "_vm_cnt", }, @@ -97,12 +97,6 @@ static struct nlist namelist[] = { [X_SINTRNAMES] = { .n_name = "_sintrnames", }, [X_INTRCNT] = { .n_name = "_intrcnt", }, [X_SINTRCNT] = { .n_name = "_sintrcnt", }, -#ifdef notyet - [X_DEFICIT] = { .n_name = "_deficit", }, - [X_REC] = { .n_name = "_rectime", }, - [X_PGIN] = { .n_name = "_pgintime", }, - [X_XSTATS] = { .n_name = "_xstats", }, -#endif { .n_name = NULL, }, }; @@ -232,7 +226,7 @@ main(int argc, char *argv[]) if (argc < 0) return (argc); - while ((c = getopt(argc, argv, "ac:fhHiM:mN:n:oPp:stw:z")) != -1) { + while ((c = getopt(argc, argv, "ac:fhHiM:mN:n:oPp:sw:z")) != -1) { switch (c) { case 'a': aflag++; @@ -282,14 +276,6 @@ main(int argc, char *argv[]) case 's': todo |= SUMSTAT; break; - case 't': -#ifdef notyet - todo |= TIMESTAT; -#else - xo_errx(EX_USAGE, - "sorry, -t is not (re)implemented yet"); -#endif - break; case 'w': /* Convert to milliseconds. */ f = atof(optarg); @@ -394,10 +380,6 @@ retry_nlist: dosum(); if (todo & OBJSTAT) doobjstat(); -#ifdef notyet - if (todo & TIMESTAT) - dotimes(); -#endif if (todo & INTRSTAT) dointr(interval, reps); if (todo & VMSTAT) @@ -966,29 +948,6 @@ doresize(void) */ wresized = 0; } - -#ifdef notyet -static void -dotimes(void) -{ - unsigned int pgintime, rectime; - - kread(X_REC, &rectime, sizeof(rectime)); - kread(X_PGIN, &pgintime, sizeof(pgintime)); - kread(X_SUM, &sum, sizeof(sum)); - xo_emit("{:page-reclaims/%u} {N:reclaims}, " - "{:reclaim-time/%u} {N:total time (usec)}\n", - sum.v_pgrec, rectime); - xo_emit("{L:average}: {:reclaim-average/%u} {N:usec \\/ reclaim}\n", - rectime / sum.v_pgrec); - xo_emit("\n"); - xo_emit("{:page-ins/%u} {N:page ins}, " - "{:page-in-time/%u} {N:total time (msec)}\n", - sum.v_pgin, pgintime / 10); - xo_emit("{L:average}: {:average/%8.1f} {N:msec \\/ page in}\n", - pgintime / (sum.v_pgin * 10.0)); -} -#endif static long pct(long top, long bot) From owner-svn-src-head@freebsd.org Mon Aug 20 10:39: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 E812C108BDBC; Mon, 20 Aug 2018 10:39:38 +0000 (UTC) (envelope-from arichardson@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 8FF42862B4; Mon, 20 Aug 2018 10:39:38 +0000 (UTC) (envelope-from arichardson@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 6B6F61422D; Mon, 20 Aug 2018 10:39:38 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KAdc8x079397; Mon, 20 Aug 2018 10:39:38 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KAdchX079396; Mon, 20 Aug 2018 10:39:38 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201808201039.w7KAdchX079396@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 20 Aug 2018 10:39:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338095 - head/lib/libsysdecode X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/lib/libsysdecode X-SVN-Commit-Revision: 338095 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, 20 Aug 2018 10:39:39 -0000 Author: arichardson Date: Mon Aug 20 10:39:37 2018 New Revision: 338095 URL: https://svnweb.freebsd.org/changeset/base/338095 Log: Make mkioctls script work on Linux and MacOS Using find -s will not work with the Linux or MacOS find command. We pipe to sort instead since the only real requirement here is that the order stays the same. While I am touching this file I also fixed a `==` construct which is not supported by POSIX sh but appears to work on FreeBSD. Reviewed By: imp Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D14246 Modified: head/lib/libsysdecode/mkioctls Modified: head/lib/libsysdecode/mkioctls ============================================================================== --- head/lib/libsysdecode/mkioctls Mon Aug 20 09:29:21 2018 (r338094) +++ head/lib/libsysdecode/mkioctls Mon Aug 20 10:39:37 2018 (r338095) @@ -17,18 +17,29 @@ LC_ALL=C; export LC_ALL # XXX should we use an ANSI cpp? ioctl_includes=$( cd $includedir + set -e + # if /bin/sh is bash this will avoid further errors due to missing commands + if set -o | grep -q pipefail; then + set -o pipefail + fi filter='tee' - if [ "${MK_PF}" == "no" ]; then + if [ "${MK_PF}" = "no" ]; then filter='egrep -v (net/pfvar|net/if_pfsync)\.h' fi - - find -H -s * -name '*.h' | \ + # find -s would avoid the need to invoke sort but it is non-portable + find -L ./* -type f -name '*.h' | \ + LC_ALL=C sort | \ $filter | \ xargs egrep -l \ '^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | awk '{printf("#include <%s>\\n", $1)}' ) + +if [ -z "$ioctl_includes" ]; then + echo "Failed to build list of ioctl headers" + exit 1 +fi awk -v x="$ioctl_includes" 'BEGIN {print x}' | $CPP -nostdinc -I$includedir -dM -DCOMPAT_43TTY - | From owner-svn-src-head@freebsd.org Mon Aug 20 10:39:45 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 7EF81108BDDD; Mon, 20 Aug 2018 10:39:45 +0000 (UTC) (envelope-from arichardson@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 CE85786346; Mon, 20 Aug 2018 10:39:44 +0000 (UTC) (envelope-from arichardson@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 857F71422E; Mon, 20 Aug 2018 10:39:43 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KAdhUZ079451; Mon, 20 Aug 2018 10:39:43 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KAdhfX079450; Mon, 20 Aug 2018 10:39:43 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201808201039.w7KAdhfX079450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 20 Aug 2018 10:39:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338096 - head/tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/tools/build/mk X-SVN-Commit-Revision: 338096 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, 20 Aug 2018 10:39:45 -0000 Author: arichardson Date: Mon Aug 20 10:39:42 2018 New Revision: 338096 URL: https://svnweb.freebsd.org/changeset/base/338096 Log: Avoid depending on system headers from the source tree during bootstrap This can cause surprising errors if the build tools is built against headers that don't match the host system. It is also required in order to allow building on non-FreeBSD systems where the headers in /usr/include/sys are usually completely incompatible with those in the source tree. I added an error to Makefile.boot if this is done and found this was only the case in libnv. With this error in the Makefile ABI breakages such as r336019 should no longer be possible. Reviewed By: bdrewery, kevans Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D16186 Modified: head/tools/build/mk/Makefile.boot Modified: head/tools/build/mk/Makefile.boot ============================================================================== --- head/tools/build/mk/Makefile.boot Mon Aug 20 10:39:37 2018 (r338095) +++ head/tools/build/mk/Makefile.boot Mon Aug 20 10:39:42 2018 (r338096) @@ -7,3 +7,20 @@ LDFLAGS+= -L${WORLDTMP}/legacy/usr/lib # we do not want to capture dependencies referring to the above UPDATE_DEPENDFILE= no + +# When building host tools we should never pull in headers from the source sys +# directory to avoid any ABI issues that might cause the built binary to crash. +# The only exceptions to this are sys/cddl/compat for dtrace bootstrap tools and +# sys/crypto for libmd bootstrap. +.if !empty(CFLAGS:M*${SRCTOP}/sys*:N*${SRCTOP}/sys/cddl/compat*:N*${SRCTOP}/sys/crypto*) +.error Do not include $${SRCTOP}/sys when building bootstrap tools. \ + Copy the header to $${WORLDTMP}/legacy in tools/build/Makefile instead. \ + Error was caused by Makefile in ${.CURDIR} +.endif + +# ${SRCTOP}/include should also never be used to avoid ABI issues +.if !empty(CFLAGS:M*${SRCTOP}/include*) +.error Do not include $${SRCTOP}/include when building bootstrap tools. \ + Copy the header to $${WORLDTMP}/legacy in tools/build/Makefile instead. \ + Error was caused by Makefile in ${.CURDIR} +.endif From owner-svn-src-head@freebsd.org Mon Aug 20 10:39: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 072E6108BDFC; Mon, 20 Aug 2018 10:39:49 +0000 (UTC) (envelope-from arichardson@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 A7585863B8; Mon, 20 Aug 2018 10:39:48 +0000 (UTC) (envelope-from arichardson@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 8670F1422F; Mon, 20 Aug 2018 10:39:48 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KAdms9079505; Mon, 20 Aug 2018 10:39:48 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KAdm86079504; Mon, 20 Aug 2018 10:39:48 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201808201039.w7KAdm86079504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 20 Aug 2018 10:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338097 - head/lib/libmd X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/lib/libmd X-SVN-Commit-Revision: 338097 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, 20 Aug 2018 10:39:49 -0000 Author: arichardson Date: Mon Aug 20 10:39:48 2018 New Revision: 338097 URL: https://svnweb.freebsd.org/changeset/base/338097 Log: Allow bootstrapping libmd on MacOS The assembly files use directives that only work for ELF targets so skip them when bootstrapping on MacOS. Reviewed By: imp Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D14247 Modified: head/lib/libmd/Makefile Modified: head/lib/libmd/Makefile ============================================================================== --- head/lib/libmd/Makefile Mon Aug 20 10:39:42 2018 (r338096) +++ head/lib/libmd/Makefile Mon Aug 20 10:39:48 2018 (r338097) @@ -98,6 +98,13 @@ CFLAGS+= -DSKEIN_LOOP=995 .PATH: ${.CURDIR}/${MACHINE_ARCH} ${SRCTOP}/sys/crypto/sha2 .PATH: ${SRCTOP}/sys/crypto/skein ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH} +USE_ASM_SOURCES?=1 +.if defined(BOOTSTRAPPING) +# Don't build ASM sources when bootstrapping to avoid toolchain dependencies +USE_ASM_SOURCES:=0 +.endif + +.if ${USE_ASM_SOURCES} != 0 .if exists(${MACHINE_ARCH}/sha.S) SRCS+= sha.S CFLAGS+= -DSHA1_ASM @@ -116,6 +123,7 @@ CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of bl .if exists(${MACHINE_ARCH}/sha.S) || exists(${MACHINE_ARCH}/rmd160.S) || exists(${MACHINE_ARCH}/skein_block_asm.s) ACFLAGS+= -DELF -Wa,--noexecstack .endif +.endif # ${USE_ASM_SOURCES} != 0 md4hl.c: mdXhl.c (echo '#define LENGTH 16'; \ From owner-svn-src-head@freebsd.org Mon Aug 20 10:39: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 3EBBC108BE1D; Mon, 20 Aug 2018 10:39:54 +0000 (UTC) (envelope-from arichardson@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 D948186496; Mon, 20 Aug 2018 10:39:53 +0000 (UTC) (envelope-from arichardson@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 B6C4E14230; Mon, 20 Aug 2018 10:39:53 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KAdrwO079557; Mon, 20 Aug 2018 10:39:53 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KAdrMM079556; Mon, 20 Aug 2018 10:39:53 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201808201039.w7KAdrMM079556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 20 Aug 2018 10:39:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338098 - in head: . tools/build X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head: . tools/build X-SVN-Commit-Revision: 338098 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, 20 Aug 2018 10:39:54 -0000 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-FreeBSD) + 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-tools +# and cross-tools stages. We do this here using mkdir since mtree may not exist +# 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/casper + mkdir -p "${DESTDIR}/${_dir}" +.endfor + +.for _group in ${INCSGROUPS:NINCS} + mkdir -p "${DESTDIR}/${${_group}DIR}" +.endfor + .include From owner-svn-src-head@freebsd.org Mon Aug 20 10:59: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 ADA70108C885; Mon, 20 Aug 2018 10:59:50 +0000 (UTC) (envelope-from arichardson@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 62D18872A9; Mon, 20 Aug 2018 10:59:50 +0000 (UTC) (envelope-from arichardson@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 4404014581; Mon, 20 Aug 2018 10:59:50 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KAxoXw089729; Mon, 20 Aug 2018 10:59:50 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KAxoIt089728; Mon, 20 Aug 2018 10:59:50 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201808201059.w7KAxoIt089728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 20 Aug 2018 10:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338099 - head/lib/libsysdecode X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/lib/libsysdecode X-SVN-Commit-Revision: 338099 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, 20 Aug 2018 10:59:50 -0000 Author: arichardson Date: Mon Aug 20 10:59:49 2018 New Revision: 338099 URL: https://svnweb.freebsd.org/changeset/base/338099 Log: Don't rebuild ioctl.c and relink libsysdecode if there are no changes Instead generate a temporary file and only overwrite ioctl.c if the files are actually different. Approved By: jhb (mentor) Modified: head/lib/libsysdecode/Makefile Modified: head/lib/libsysdecode/Makefile ============================================================================== --- head/lib/libsysdecode/Makefile Mon Aug 20 10:39:53 2018 (r338098) +++ head/lib/libsysdecode/Makefile Mon Aug 20 10:59:49 2018 (r338099) @@ -129,11 +129,16 @@ tables.h: mktables # mkioctls runs find(1) for headers so needs to rebuild every time. This used # to be a hack only done in buildworld. .if !defined(_SKIP_BUILD) -ioctl.c: .PHONY +ioctl.c.tmp: .PHONY .endif -ioctl.c: mkioctls .META +ioctl.c.tmp: mkioctls .META env CPP="${CPP}" MK_PF="${MK_PF}" \ /bin/sh ${.CURDIR}/mkioctls ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} > ${.TARGET} + +ioctl.c: ioctl.c.tmp + if [ ! -e ${.TARGET} ] || ! cmp -s ${.TARGET} ${.TARGET}.tmp; then \ + mv -f ${.TARGET}.tmp ${.TARGET}; \ + fi beforedepend: ioctl.c tables.h From owner-svn-src-head@freebsd.org Mon Aug 20 11:05: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 606A4108CBC6; Mon, 20 Aug 2018 11:05:37 +0000 (UTC) (envelope-from 0mp@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 13DFB8817C; Mon, 20 Aug 2018 11:05:37 +0000 (UTC) (envelope-from 0mp@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 E64501470E; Mon, 20 Aug 2018 11:05:36 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KB5aL7094647; Mon, 20 Aug 2018 11:05:36 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KB5aQk094646; Mon, 20 Aug 2018 11:05:36 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201808201105.w7KB5aQk094646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Mon, 20 Aug 2018 11:05:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338100 - head/share/man/man8 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man8 X-SVN-Commit-Revision: 338100 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, 20 Aug 2018 11:05:37 -0000 Author: 0mp (ports committer) Date: Mon Aug 20 11:05:36 2018 New Revision: 338100 URL: https://svnweb.freebsd.org/changeset/base/338100 Log: Create a manual page for beinstall.sh. Reviewed by: bcr, brd, will Approved by: krion (mentor) Differential Revision: https://reviews.freebsd.org/D16742 Added: head/share/man/man8/beinstall.8 (contents, props changed) Modified: head/share/man/man8/Makefile Modified: head/share/man/man8/Makefile ============================================================================== --- head/share/man/man8/Makefile Mon Aug 20 10:59:49 2018 (r338099) +++ head/share/man/man8/Makefile Mon Aug 20 11:05:36 2018 (r338100) @@ -5,7 +5,9 @@ PACKAGE=runtime-manuals -MAN= crash.8 \ +MAN= \ + beinstall.8 \ + crash.8 \ diskless.8 \ intro.8 \ nanobsd.8 \ @@ -17,6 +19,7 @@ MAN= crash.8 \ ${_uefi.8} \ MLINKS= \ + beinstall.8 beinstall.sh.8 \ nanobsd.8 nanobsd.sh.8 \ rc.8 rc.d.8 \ rc.8 rc.firewall.8 \ Added: head/share/man/man8/beinstall.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man8/beinstall.8 Mon Aug 20 11:05:36 2018 (r338100) @@ -0,0 +1,134 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2018 Mateusz Piotrowski <0mp@FreeBSD.org> +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.Dd August 20, 2018 +.Dt BEINSTALL.SH 1 +.Os +.Sh NAME +.Nm beinstall.sh +.Nd "install a boot environment using the current FreeBSD source tree" +.Sh SYNOPSIS +.Nm +.Op Ar options Ar ... +.Sh DESCRIPTION +.Nm +installs a boot environment using the current +.Fx +source tree. +.Nm +also automatically performs +.Pa /etc +updates +(using either +.Xr etcupdate 8 +or +.Xr mergemaster 8 ) +and +package updates using +.Xr pkg-upgrade 8 +automatically in the new boot environment sandbox. +.Pp +Upon successful completion, the system will be ready to boot into the new boot +environment. +Upon failure, the target boot environment will be destroyed. +In all cases, the running system is left untouched +and a reboot into a partially updated system +(due to install or hardware failure) cannot happen. +Additionally, the full installation process requires +only one reboot as it is performed +in a new boot environment. +.Pp +.Nm +requires a fully built world and kernel. +It also requires +.Xr beadm 1 +and +.Xr pkg 8 , +which are not present in the base system and have to be installed manually. +.Pp +The +.Ar options +provided to +.Nm +are world and kernel flags like +.Ev KERNCONF +as described in +.Xr build 7 . +.Sh ENVIRONMENT +User modifiable variables. +Set these in the environment if desired: +.Bl -tag -width indent +.It Ev CONFIG_UPDATER Pq default: Dq Li "etcupdate" +Config updater: +.Xr etcupdate 8 +and +.Xr mergemaster 8 +are supported. +Set to an empty string to skip. +.It Ev ETCUPDATE_FLAGS Pq default: Dq Li "-F" +Flags for +.Xr etcupdate 8 +if used. +.It Ev MERGEMASTER_FLAGS Pq default: Dq Li "-iFU" +Flags for +.Xr mergemaster 8 +if used. +.It Ev NO_PKG_UPGRADE Pq default: Dq Li "" +If not empty, +.Dq Li pkg upgrade +will be skipped. +.El +.Sh FILES +.Bl -tag -width indent +.It Sy src/ Ns Pa tools/build/beinstall.sh +Place where +.Nm +lives in the src tree. +.El +.Sh SEE ALSO +.Xr beadm 1 , +.Xr build 7 , +.Xr development 7 , +.Xr etcupdate 8 , +.Xr mergemaster 8 , +.Xr pkg 8 +.Sh HISTORY +.Nm +is inspired by and similar in function to +Solaris/illumos-style upgrades. +.Pp +The +.Nm +manual page first appeared in +.Fx 12.0 . +.Sh AUTHORS +The +.Nm +script was implemented by +.An Will Andrews Aq Mt will@FreeBSD.org . +This manual page was written by +.An Mateusz Piotrowski Aq Mt 0mp@FreeBSD.org . From owner-svn-src-head@freebsd.org Mon Aug 20 12:08: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 9723C106B391; Mon, 20 Aug 2018 12:08:26 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FD788A3F4; Mon, 20 Aug 2018 12:08:25 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from [IPv6:2a02:c6a0:3061:5015:dc0a:fb41:b969:9586] (unknown [IPv6:2a02:c6a0:3061:5015:dc0a:fb41:b969:9586]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id E9123721E280C; Mon, 20 Aug 2018 14:08:16 +0200 (CEST) From: Michael Tuexen Message-Id: <8287A66D-2117-44D3-9D4D-BF713117B857@fh-muenster.de> Content-Type: multipart/signed; boundary="Apple-Mail=_A9CCF558-420E-4AF3-BCAF-8A52737B349C"; protocol="application/pkcs7-signature"; micalg=sha1 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r338053 - head/sys/netinet Date: Mon, 20 Aug 2018 14:08:15 +0200 In-Reply-To: Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: "Bjoern A. Zeeb" References: <201808191456.w7JEuAZE069780@repo.freebsd.org> <97661C9D-9C25-4DE0-89A8-FE1C40DAFB81@freebsd.org> X-Mailer: Apple Mail (2.3445.9.1) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.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: Mon, 20 Aug 2018 12:08:26 -0000 --Apple-Mail=_A9CCF558-420E-4AF3-BCAF-8A52737B349C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 20. Aug 2018, at 09:33, Bjoern A. Zeeb = wrote: >=20 > On 20 Aug 2018, at 1:13, Conrad Meyer wrote: >=20 >> On Sun, Aug 19, 2018 at 11:40 AM, Bjoern A. Zeeb >> wrote: >>> I am so happy we have a version control system where you could = hopefully >>> find out if the original committer left a decent commit message.. = takes less >>> than 60 seconds .. >>> https://svnweb.freebsd.org/base?view=3Drevision&revision=3D82122 >>=20 >> It is great we have such a system, but unfortunately the message >> doesn't really answer my question(s). I don't know that that means = it >> isn't "decent," but it isn't really helpful. :-) >=20 > Well it tells you all you need to know. > If you open the RFC cited it=E2=80=99ll tell you why the 4-tuple is = used and why MD5, which seemed to be the questions you two were guessing = about. At the time the RFC was written, the choice was good. The question I have is if we should change the function to SIP-HASH... Best regards Michael >=20 > /bz >=20 --Apple-Mail=_A9CCF558-420E-4AF3-BCAF-8A52737B349C Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIQkDCCBNUw ggO9oAMCAQICCFBOxvU9EbRkMA0GCSqGSIb3DQEBCwUAMHExCzAJBgNVBAYTAkRFMRwwGgYDVQQK ExNEZXV0c2NoZSBUZWxla29tIEFHMR8wHQYDVQQLExZULVRlbGVTZWMgVHJ1c3QgQ2VudGVyMSMw IQYDVQQDExpEZXV0c2NoZSBUZWxla29tIFJvb3QgQ0EgMjAeFw0xNDA3MjIxMjA4MjZaFw0xOTA3 MDkyMzU5MDBaMFoxCzAJBgNVBAYTAkRFMRMwEQYDVQQKEwpERk4tVmVyZWluMRAwDgYDVQQLEwdE Rk4tUEtJMSQwIgYDVQQDExtERk4tVmVyZWluIFBDQSBHbG9iYWwgLSBHMDEwggEiMA0GCSqGSIb3 DQEBAQUAA4IBDwAwggEKAoIBAQDpm8NnhfkNrvWNVMOWUDU9YuluTO2U1wBblSJ01CDrNI/W7MAx BAuZgeKmFNJSoCgjhIt0iQReW+DieMF4yxbLKDU5ey2QRdDtoAB6fL9KDhsAw4bpXCsxEXsM84Ik Q4wcOItqaACa7txPeKvSxhObdq3u3ibo7wGvdA/BCaL2a869080UME/15eOkyGKbghoDJzANAmVg Te3RCSMqljVYJ9N2xnG2kB3E7f81hn1vM7PbD8URwoqDoZRdQWvY0hD1TP3KUazZve+Sg7va64sW VlZDz+HVEz2mHycwzUlU28kTNJpxdcVs6qcLmPkhnSevPqM5OUhqjK3JmfvDEvK9AgMBAAGjggGG MIIBgjAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFEm3xs/oPR9/6kR7Eyn38QpwPt5kMB8GA1Ud IwQYMBaAFDHDeRu69VPXF+CJei0XbAqzK50zMBIGA1UdEwEB/wQIMAYBAf8CAQIwYgYDVR0gBFsw WTARBg8rBgEEAYGtIYIsAQEEAgIwEQYPKwYBBAGBrSGCLAEBBAMAMBEGDysGAQQBga0hgiwBAQQD ATAPBg0rBgEEAYGtIYIsAQEEMA0GCysGAQQBga0hgiweMD4GA1UdHwQ3MDUwM6AxoC+GLWh0dHA6 Ly9wa2kwMzM2LnRlbGVzZWMuZGUvcmwvRFRfUk9PVF9DQV8yLmNybDB4BggrBgEFBQcBAQRsMGow LAYIKwYBBQUHMAGGIGh0dHA6Ly9vY3NwMDMzNi50ZWxlc2VjLmRlL29jc3ByMDoGCCsGAQUFBzAC hi5odHRwOi8vcGtpMDMzNi50ZWxlc2VjLmRlL2NydC9EVF9ST09UX0NBXzIuY2VyMA0GCSqGSIb3 DQEBCwUAA4IBAQBjICj9nCGGcr45Rlk5MiW8qQGbDczKfUGchm0KbiyzE1l1sTOSG2EnFv/DstU1 gvuEKgFJvWa7Zi+ywgZdbj9u4wFaW8pDY1yVtuExpx/VB19N5mWCTjL5w3x6S81NXHTuIfJ1AuxS PtLJatOQI25JZzW+f01WpOzML8+3oZeocj7JvEDWWqQIPda8gsO3tzKOsSyOam23NQIZz/U5RFhj pyQAELC7/E6vbi84u6VXST/YblBvLJeW3B1GmmWJz67M8uXZn1OzPqEvkqnYC8aEHwTG6x7on321 e6UC8STFJGMRNMxakyAqeYg6JUKQqWU7fIbTEhUjKfws2sw5W1QXMIIFojCCBIqgAwIBAgIHF6Qk oQlIMzANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJERTETMBEGA1UEChMKREZOLVZlcmVpbjEQ MA4GA1UECxMHREZOLVBLSTEkMCIGA1UEAxMbREZOLVZlcmVpbiBQQ0EgR2xvYmFsIC0gRzAxMB4X DTE0MDUyNzE0NTQwOVoXDTE5MDcwOTIzNTkwMFowgcYxCzAJBgNVBAYTAkRFMRwwGgYDVQQIExNO b3JkcmhlaW4tV2VzdGZhbGVuMREwDwYDVQQHEwhNdWVuc3RlcjEgMB4GA1UEChMXRmFjaGhvY2hz Y2h1bGUgTXVlbnN0ZXIxIzAhBgNVBAsTGkRhdGVudmVyYXJiZWl0dW5nc3plbnRyYWxlMR0wGwYD VQQDExRGSCBNdWVuc3RlciBDQSAtIEcwMTEgMB4GCSqGSIb3DQEJARYRY2FAZmgtbXVlbnN0ZXIu ZGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4eWyu8GzsIv0iowf2v/9BT0SmCFNX /eyQe5BncOk1j6XIlY5bnNu1S5uBe3uVgekgTh3gJyVNlaoIfCgAjqCrNJIaNQq5fr/S6L8uFeaU O8IF/C4RH5P7f9Hn2GUueEjmJhg9CI3LBAhrfAmEEtNmuVfDycN2MjngwDNxUNRfuXbWxuhkgDqJ 0ztJeayHGhFDrGx88eyStx40xy+0c0OFWdWxzBFQlBRHnl+zRftj3c9qy6BY+/fGaA2vV1oKr3h5 X6eyU1T8YlpP1NDe4bylqAteX01sM2Qciu8UAPnNc7Sb93TQjhCFRVDIS3CdN6AOpwz5YWEld6ey CdmFZ7pvAgMBAAGjggH+MIIB+jASBgNVHRMBAf8ECDAGAQH/AgEBMA4GA1UdDwEB/wQEAwIBBjAR BgNVHSAECjAIMAYGBFUdIAAwHQYDVR0OBBYEFArzW7zkMYDWNUKJptPDzzfe0d/XMB8GA1UdIwQY MBaAFEm3xs/oPR9/6kR7Eyn38QpwPt5kMBwGA1UdEQQVMBOBEWNhQGZoLW11ZW5zdGVyLmRlMIGI BgNVHR8EgYAwfjA9oDugOYY3aHR0cDovL2NkcDEucGNhLmRmbi5kZS9nbG9iYWwtcm9vdC1jYS9w dWIvY3JsL2NhY3JsLmNybDA9oDugOYY3aHR0cDovL2NkcDIucGNhLmRmbi5kZS9nbG9iYWwtcm9v dC1jYS9wdWIvY3JsL2NhY3JsLmNybDCB1wYIKwYBBQUHAQEEgcowgccwMwYIKwYBBQUHMAGGJ2h0 dHA6Ly9vY3NwLnBjYS5kZm4uZGUvT0NTUC1TZXJ2ZXIvT0NTUDBHBggrBgEFBQcwAoY7aHR0cDov L2NkcDEucGNhLmRmbi5kZS9nbG9iYWwtcm9vdC1jYS9wdWIvY2FjZXJ0L2NhY2VydC5jcnQwRwYI KwYBBQUHMAKGO2h0dHA6Ly9jZHAyLnBjYS5kZm4uZGUvZ2xvYmFsLXJvb3QtY2EvcHViL2NhY2Vy dC9jYWNlcnQuY3J0MA0GCSqGSIb3DQEBCwUAA4IBAQDeRwM11kpvuRIPuzWXLapr/ZBtB76V3cuF l45x/Kx0u03yjB4GaBPcxihn4P1z5KhRYkDBMo8HXkOgbL59aF6VdOlCurEgZvghKvUkKOCyWeYx S9rTGPBkbGiNn2ATVuLXzF8rDf50ynAIu3otstOOv+3Ifqi1pzCva1nO64khQA5Gd5/BNyu+YHbW f8ERAf9leu5a7yVI7cv1gCZAHpWJpkUKmfawyY4sAJ2hbGZRBvdACOxrfbuMdSOzPneT2rlmvH+D 7M6DmzVabLYk6UtAxQhldd/T/qsHkWvaWXHt0Eb9STs2Fl03Ls7M3NyLQLhaeR3ysNURYcaEfaB+ lxN+MIIGDTCCBPWgAwIBAgIHG5mIdDexozANBgkqhkiG9w0BAQsFADCBxjELMAkGA1UEBhMCREUx HDAaBgNVBAgTE05vcmRyaGVpbi1XZXN0ZmFsZW4xETAPBgNVBAcTCE11ZW5zdGVyMSAwHgYDVQQK ExdGYWNoaG9jaHNjaHVsZSBNdWVuc3RlcjEjMCEGA1UECxMaRGF0ZW52ZXJhcmJlaXR1bmdzemVu dHJhbGUxHTAbBgNVBAMTFEZIIE11ZW5zdGVyIENBIC0gRzAxMSAwHgYJKoZIhvcNAQkBFhFjYUBm aC1tdWVuc3Rlci5kZTAeFw0xNjA3MDQwNzA2MTNaFw0xOTA3MDQwNzA2MTNaMHwxCzAJBgNVBAYT AkRFMSAwHgYDVQQKDBdGYWNoaG9jaHNjaHVsZSBNdWVuc3RlcjEyMDAGA1UECwwpRmFjaGJlcmVp Y2ggRWxla3Ryb3RlY2huaWsgdW5kIEluZm9ybWF0aWsxFzAVBgNVBAMMDk1pY2hhZWwgVHVleGVu MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzJoaUG3Zm24XxA/zNg2sbFcL56w8xqMg +X6G7UsYec3YEncnlkw3jgE5nDefos7UVoCA7wPjFTj8AQt5xfpXElnbM45IPy5Ng7g6dS7biGSM VRACPXe1PrjgApRAwwGmCPvALnZXkmKP6Zlf+3VLfz9YWIIaeKu3jFM2Lk6Y3gr5U1l8bjHSawOo WMlfvSsXXLT38zKW7Uz9jS278j0OqHANBPgsE6/LJoCWFInwlvybxhO3nGU7OteUGaPikqzvjLsL YgpHDi0WjMZfVx/UtUSzZ4EJvmJTBeuVwyKnCbrawnfwYPTQQ6VE1OkAzmsMByBbEwJ996RtG//T XCG06QIDAQABo4ICRzCCAkMwQAYDVR0gBDkwNzARBg8rBgEEAYGtIYIsAQEEAwUwEQYPKwYBBAGB rSGCLAIBBAMBMA8GDSsGAQQBga0hgiwBAQQwCQYDVR0TBAIwADAOBgNVHQ8BAf8EBAMCBeAwHQYD VR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMEMB0GA1UdDgQWBBTQHa9qhKgSZgCCAPThZkXaEaJ/ dTAfBgNVHSMEGDAWgBQK81u85DGA1jVCiabTw8833tHf1zAgBgNVHREEGTAXgRV0dWV4ZW5AZmgt bXVlbnN0ZXIuZGUwgYgGA1UdHwSBgDB+MD2gO6A5hjdodHRwOi8vY2RwMS5wY2EuZGZuLmRlL2Zo LW11ZW5zdGVyLWNhL3B1Yi9jcmwvY2FjcmwuY3JsMD2gO6A5hjdodHRwOi8vY2RwMi5wY2EuZGZu LmRlL2ZoLW11ZW5zdGVyLWNhL3B1Yi9jcmwvY2FjcmwuY3JsMIHXBggrBgEFBQcBAQSByjCBxzAz BggrBgEFBQcwAYYnaHR0cDovL29jc3AucGNhLmRmbi5kZS9PQ1NQLVNlcnZlci9PQ1NQMEcGCCsG AQUFBzAChjtodHRwOi8vY2RwMS5wY2EuZGZuLmRlL2ZoLW11ZW5zdGVyLWNhL3B1Yi9jYWNlcnQv Y2FjZXJ0LmNydDBHBggrBgEFBQcwAoY7aHR0cDovL2NkcDIucGNhLmRmbi5kZS9maC1tdWVuc3Rl ci1jYS9wdWIvY2FjZXJ0L2NhY2VydC5jcnQwDQYJKoZIhvcNAQELBQADggEBAEj2/6x4kzoCVIiu aaminPrOHxACyoYsmSRjYPQpgW5xRj/FlolO1nG+ZZ11sqTb3TdCGD69ko5/zs8eGKnv/i0VLCHF g1JLfpaxElN5RrR/cqRJrbzKshF9aUkBODF8vlf9BCeimMK3fifjbbWRyxHssfEECffujD7/Yvta NYMO46Roz39lIK2s37IVFq3V5RWzUeTuwpP9t8lOxirOi9eK2OYI/dh0HjR2S5Dr9nMR1dNulrhz jlFxGc+opefGScrRR9Ec0eqTXlbt1Q9UzNIYVS+OGZY8/bBbprwXVTmwSp8dygEULkIaMbLsaTaW 6TehuL8ousPJkL52SOENgSkxggQpMIIEJQIBATCB0jCBxjELMAkGA1UEBhMCREUxHDAaBgNVBAgT E05vcmRyaGVpbi1XZXN0ZmFsZW4xETAPBgNVBAcTCE11ZW5zdGVyMSAwHgYDVQQKExdGYWNoaG9j aHNjaHVsZSBNdWVuc3RlcjEjMCEGA1UECxMaRGF0ZW52ZXJhcmJlaXR1bmdzemVudHJhbGUxHTAb BgNVBAMTFEZIIE11ZW5zdGVyIENBIC0gRzAxMSAwHgYJKoZIhvcNAQkBFhFjYUBmaC1tdWVuc3Rl ci5kZQIHG5mIdDexozAJBgUrDgMCGgUAoIICKzAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwG CSqGSIb3DQEJBTEPFw0xODA4MjAxMjA4MTZaMCMGCSqGSIb3DQEJBDEWBBQigbjCbx1Uq0TByrSr 4nA4VRY0bjCB4wYJKwYBBAGCNxAEMYHVMIHSMIHGMQswCQYDVQQGEwJERTEcMBoGA1UECBMTTm9y ZHJoZWluLVdlc3RmYWxlbjERMA8GA1UEBxMITXVlbnN0ZXIxIDAeBgNVBAoTF0ZhY2hob2Noc2No dWxlIE11ZW5zdGVyMSMwIQYDVQQLExpEYXRlbnZlcmFyYmVpdHVuZ3N6ZW50cmFsZTEdMBsGA1UE AxMURkggTXVlbnN0ZXIgQ0EgLSBHMDExIDAeBgkqhkiG9w0BCQEWEWNhQGZoLW11ZW5zdGVyLmRl AgcbmYh0N7GjMIHlBgsqhkiG9w0BCRACCzGB1aCB0jCBxjELMAkGA1UEBhMCREUxHDAaBgNVBAgT E05vcmRyaGVpbi1XZXN0ZmFsZW4xETAPBgNVBAcTCE11ZW5zdGVyMSAwHgYDVQQKExdGYWNoaG9j aHNjaHVsZSBNdWVuc3RlcjEjMCEGA1UECxMaRGF0ZW52ZXJhcmJlaXR1bmdzemVudHJhbGUxHTAb BgNVBAMTFEZIIE11ZW5zdGVyIENBIC0gRzAxMSAwHgYJKoZIhvcNAQkBFhFjYUBmaC1tdWVuc3Rl ci5kZQIHG5mIdDexozANBgkqhkiG9w0BAQEFAASCAQBMjRshID5NpPj7sMjoUgdYIsmGiDSbaZr4 R6jzwxOX9blT0RnTUIkRbIogYVk9Ji2TowHPiajl0PiNsy86oUYuTD2b4Q06u6DZkKL4Y2tu1GFY DhtBzUWKTkNqCJtW+Y275dQ8mnjAlmyMyi2qnlnvtGo56Y89TWXkoGemmOwGKBeEsYfZ2WALAL1G vR2MUtxg6ukswqZZrckPt4Ev/glKGrZ0rjZr+5TIjQ11TCV7zbTH+Ohcf9wp3+N63hDbwyOVNyO5 GxG3wCj7t0TrUFNQURb9LnxP1Iv6hG7HIGETStWZx2/UVZrAldJTHT2bBqbrX2hWoCtvc9XGdt9T raKtAAAAAAAA --Apple-Mail=_A9CCF558-420E-4AF3-BCAF-8A52737B349C-- From owner-svn-src-head@freebsd.org Mon Aug 20 12:31: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 782D7106C008; Mon, 20 Aug 2018 12:31:40 +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 277068B093; Mon, 20 Aug 2018 12:31:40 +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 E3B6E1548F; Mon, 20 Aug 2018 12:31:39 +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 w7KCVd25039642; Mon, 20 Aug 2018 12:31:39 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KCVdQp039638; Mon, 20 Aug 2018 12:31:39 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201808201231.w7KCVdQp039638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 20 Aug 2018 12:31:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338101 - in head/sys: amd64/include i386/include x86/include X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: amd64/include i386/include x86/include X-SVN-Commit-Revision: 338101 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, 20 Aug 2018 12:31:40 -0000 Author: jhb Date: Mon Aug 20 12:31:39 2018 New Revision: 338101 URL: https://svnweb.freebsd.org/changeset/base/338101 Log: Merge amd64 and i386 headers. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16803 Added: head/sys/x86/include/intr_machdep.h (contents, props changed) - copied, changed from r338055, head/sys/amd64/include/intr_machdep.h Modified: head/sys/amd64/include/intr_machdep.h head/sys/i386/include/intr_machdep.h Modified: head/sys/amd64/include/intr_machdep.h ============================================================================== --- head/sys/amd64/include/intr_machdep.h Mon Aug 20 11:05:36 2018 (r338100) +++ head/sys/amd64/include/intr_machdep.h Mon Aug 20 12:31:39 2018 (r338101) @@ -31,114 +31,9 @@ #ifndef __MACHINE_INTR_MACHDEP_H__ #define __MACHINE_INTR_MACHDEP_H__ -#ifdef _KERNEL +#include /* - * 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. - * - * 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. - */ -#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) - -/* - * 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); - -#define IDTVEC(name) __CONCAT(X,name) - -struct intsrc; - -/* - * Methods that a PIC provides to mask/unmask a given interrupt source, - * "turn on" the interrupt on the CPU side by setting up an IDT entry, and - * return the vector associated with this source. - */ -struct pic { - void (*pic_enable_source)(struct intsrc *); - void (*pic_disable_source)(struct intsrc *, int); - void (*pic_eoi_source)(struct intsrc *); - void (*pic_enable_intr)(struct intsrc *); - void (*pic_disable_intr)(struct intsrc *); - int (*pic_vector)(struct intsrc *); - int (*pic_source_pending)(struct intsrc *); - void (*pic_suspend)(struct pic *); - void (*pic_resume)(struct pic *, bool suspend_cancelled); - int (*pic_config_intr)(struct intsrc *, enum intr_trigger, - enum intr_polarity); - int (*pic_assign_cpu)(struct intsrc *, u_int apic_id); - void (*pic_reprogram_pin)(struct intsrc *); - TAILQ_ENTRY(pic) pics; -}; - -/* Flags for pic_disable_source() */ -enum { - PIC_EOI, - PIC_NO_EOI, -}; - -/* - * An interrupt source. The upper-layer code uses the PIC methods to - * control a given source. The lower-layer PIC drivers can store additional - * private data in a given interrupt source such as an interrupt pin number - * or an I/O APIC pointer. - */ -struct intsrc { - struct pic *is_pic; - struct intr_event *is_event; - u_long *is_count; - u_long *is_straycount; - u_int is_index; - u_int is_handlers; - u_int is_domain; - u_int is_cpu; -}; - -struct trapframe; - -/* * The following data structure holds per-cpu data, and is placed just * above the top of the space used for the NMI and MC# stacks. */ @@ -147,53 +42,4 @@ struct nmi_pcpu { register_t __padding; /* pad to 16 bytes */ }; -#ifdef SMP -extern cpuset_t intr_cpus; -#endif -extern struct mtx icu_lock; -extern int elcr_found; -#ifdef SMP -extern int msix_disable_migration; -#endif - -#ifndef DEV_ATPIC -void atpic_reset(void); -#endif -/* XXX: The elcr_* prototypes probably belong somewhere else. */ -int elcr_probe(void); -enum intr_trigger elcr_read_trigger(u_int irq); -void elcr_resume(void); -void elcr_write_trigger(u_int irq, enum intr_trigger trigger); -#ifdef SMP -void intr_add_cpu(u_int cpu); -#endif -int intr_add_handler(const char *name, int vector, driver_filter_t filter, - driver_intr_t handler, void *arg, enum intr_type flags, - void **cookiep, int domain); -#ifdef SMP -int intr_bind(u_int vector, u_char cpu); -#endif -int intr_config_intr(int vector, enum intr_trigger trig, - enum intr_polarity pol); -int intr_describe(u_int vector, void *ih, const char *descr); -void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); -u_int intr_next_cpu(int domain); -struct intsrc *intr_lookup_source(int vector); -int intr_register_pic(struct pic *pic); -int intr_register_source(struct intsrc *isrc); -int intr_remove_handler(void *cookie); -void intr_resume(bool suspend_cancelled); -void intr_suspend(void); -void intr_reprogram(void); -void intrcnt_add(const char *name, u_long **countp); -void nexus_add_irq(u_long irq); -int msi_alloc(device_t dev, int count, int maxcount, int *irqs); -void msi_init(void); -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); - -#endif /* !LOCORE */ -#endif /* _KERNEL */ #endif /* !__MACHINE_INTR_MACHDEP_H__ */ Modified: head/sys/i386/include/intr_machdep.h ============================================================================== --- head/sys/i386/include/intr_machdep.h Mon Aug 20 11:05:36 2018 (r338100) +++ head/sys/i386/include/intr_machdep.h Mon Aug 20 12:31:39 2018 (r338101) @@ -1,190 +1,6 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2003 John Baldwin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef __MACHINE_INTR_MACHDEP_H__ -#define __MACHINE_INTR_MACHDEP_H__ - -#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. - * - * 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. - */ -#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 /* !XENHVM */ -#define NUM_EVTCHN_INTS 0 -#endif -#define NUM_IO_INTS (FIRST_MSI_INT + NUM_MSI_INTS + NUM_EVTCHN_INTS) - -/* - * 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); - -#define IDTVEC(name) __CONCAT(X,name) - -struct intsrc; - -/* - * Methods that a PIC provides to mask/unmask a given interrupt source, - * "turn on" the interrupt on the CPU side by setting up an IDT entry, and - * return the vector associated with this source. - */ -struct pic { - void (*pic_enable_source)(struct intsrc *); - void (*pic_disable_source)(struct intsrc *, int); - void (*pic_eoi_source)(struct intsrc *); - void (*pic_enable_intr)(struct intsrc *); - void (*pic_disable_intr)(struct intsrc *); - int (*pic_vector)(struct intsrc *); - int (*pic_source_pending)(struct intsrc *); - void (*pic_suspend)(struct pic *); - void (*pic_resume)(struct pic *, bool suspend_cancelled); - int (*pic_config_intr)(struct intsrc *, enum intr_trigger, - enum intr_polarity); - int (*pic_assign_cpu)(struct intsrc *, u_int apic_id); - void (*pic_reprogram_pin)(struct intsrc *); - TAILQ_ENTRY(pic) pics; -}; - -/* Flags for pic_disable_source() */ -enum { - PIC_EOI, - PIC_NO_EOI, -}; - -/* - * An interrupt source. The upper-layer code uses the PIC methods to - * control a given source. The lower-layer PIC drivers can store additional - * private data in a given interrupt source such as an interrupt pin number - * or an I/O APIC pointer. - */ -struct intsrc { - struct pic *is_pic; - struct intr_event *is_event; - u_long *is_count; - u_long *is_straycount; - u_int is_index; - u_int is_handlers; - u_int is_domain; - u_int is_cpu; -}; - -struct trapframe; - -#ifdef SMP -extern cpuset_t intr_cpus; -#endif -extern struct mtx icu_lock; -extern int elcr_found; -#ifdef SMP -extern int msix_disable_migration; -#endif - -#ifndef DEV_ATPIC -void atpic_reset(void); -#endif -/* XXX: The elcr_* prototypes probably belong somewhere else. */ -int elcr_probe(void); -enum intr_trigger elcr_read_trigger(u_int irq); -void elcr_resume(void); -void elcr_write_trigger(u_int irq, enum intr_trigger trigger); -#ifdef SMP -void intr_add_cpu(u_int cpu); -#endif -int intr_add_handler(const char *name, int vector, driver_filter_t filter, - driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep, - int domain); -#ifdef SMP -int intr_bind(u_int vector, u_char cpu); -#endif -int intr_config_intr(int vector, enum intr_trigger trig, - enum intr_polarity pol); -int intr_describe(u_int vector, void *ih, const char *descr); -void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); -u_int intr_next_cpu(int domain); -struct intsrc *intr_lookup_source(int vector); -int intr_register_pic(struct pic *pic); -int intr_register_source(struct intsrc *isrc); -int intr_remove_handler(void *cookie); -void intr_resume(bool suspend_cancelled); -void intr_suspend(void); -void intr_reprogram(void); -void intrcnt_add(const char *name, u_long **countp); -void nexus_add_irq(u_long irq); -int msi_alloc(device_t dev, int count, int maxcount, int *irqs); -void msi_init(void); -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); - -#endif /* !LOCORE */ -#endif /* _KERNEL */ -#endif /* !__MACHINE_INTR_MACHDEP_H__ */ +#include Copied and modified: head/sys/x86/include/intr_machdep.h (from r338055, head/sys/amd64/include/intr_machdep.h) ============================================================================== --- head/sys/amd64/include/intr_machdep.h Sun Aug 19 16:14:59 2018 (r338055, copy source) +++ head/sys/x86/include/intr_machdep.h Mon Aug 20 12:31:39 2018 (r338101) @@ -28,8 +28,8 @@ * $FreeBSD$ */ -#ifndef __MACHINE_INTR_MACHDEP_H__ -#define __MACHINE_INTR_MACHDEP_H__ +#ifndef __X86_INTR_MACHDEP_H__ +#define __X86_INTR_MACHDEP_H__ #ifdef _KERNEL @@ -138,15 +138,6 @@ struct intsrc { struct trapframe; -/* - * The following data structure holds per-cpu data, and is placed just - * above the top of the space used for the NMI and MC# stacks. - */ -struct nmi_pcpu { - register_t np_pcpu; - register_t __padding; /* pad to 16 bytes */ -}; - #ifdef SMP extern cpuset_t intr_cpus; #endif @@ -167,9 +158,9 @@ void elcr_write_trigger(u_int irq, enum intr_trigger t #ifdef SMP void intr_add_cpu(u_int cpu); #endif -int intr_add_handler(const char *name, int vector, driver_filter_t filter, - driver_intr_t handler, void *arg, enum intr_type flags, - void **cookiep, int domain); +int intr_add_handler(const char *name, int vector, driver_filter_t filter, + driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep, + int domain); #ifdef SMP int intr_bind(u_int vector, u_char cpu); #endif @@ -196,4 +187,4 @@ int msix_release(int irq); #endif /* !LOCORE */ #endif /* _KERNEL */ -#endif /* !__MACHINE_INTR_MACHDEP_H__ */ +#endif /* !__X86_INTR_MACHDEP_H__ */ From owner-svn-src-head@freebsd.org Mon Aug 20 12:43: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 6102E106C414; Mon, 20 Aug 2018 12:43:19 +0000 (UTC) (envelope-from rrs@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 0FF268B604; Mon, 20 Aug 2018 12:43:19 +0000 (UTC) (envelope-from rrs@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 CBA3215775; Mon, 20 Aug 2018 12:43:18 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KChIIk045878; Mon, 20 Aug 2018 12:43:18 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KChIRD045873; Mon, 20 Aug 2018 12:43:18 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201808201243.w7KChIRD045873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Mon, 20 Aug 2018 12:43:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338102 - in head/sys/netinet: . tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: in head/sys/netinet: . tcp_stacks X-SVN-Commit-Revision: 338102 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, 20 Aug 2018 12:43:19 -0000 Author: rrs Date: Mon Aug 20 12:43:18 2018 New Revision: 338102 URL: https://svnweb.freebsd.org/changeset/base/338102 Log: This change represents a substantial restructure of the way we reassembly inbound tcp segments. The old algorithm just blindly dropped in segments without coalescing. This meant that every segment could take up greater and greater room on the linked list of segments. This of course is now subject to a tighter limit (100) of segments which in a high BDP situation will cause us to be a lot more in-efficent as we drop segments beyond 100 entries that we receive. What this restructure does is cause the reassembly buffer to coalesce segments putting an emphasis on the two common cases (which avoid walking the list of segments) i.e. where we add to the back of the queue of segments and where we add to the front. We also have the reassembly buffer supporting a couple of debug options (black box logging as well as counters for code coverage). These are compiled out by default but can be added by uncommenting the defines. Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D16626 Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_log_buf.h head/sys/netinet/tcp_reass.c head/sys/netinet/tcp_stacks/rack.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Aug 20 12:31:39 2018 (r338101) +++ head/sys/netinet/tcp_input.c Mon Aug 20 12:43:18 2018 (r338102) @@ -1734,7 +1734,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru tp->snd_nxt == tp->snd_max && tiwin && tiwin == tp->snd_wnd && ((tp->t_flags & (TF_NEEDSYN|TF_NEEDFIN)) == 0) && - LIST_EMPTY(&tp->t_segq) && + SEGQ_EMPTY(tp) && ((to.to_flags & TOF_TS) == 0 || TSTMP_GEQ(to.to_tsval, tp->ts_recent)) ) { @@ -2440,7 +2440,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru * later; if not, do so now to pass queued data to user. */ if (tlen == 0 && (thflags & TH_FIN) == 0) - (void) tcp_reass(tp, (struct tcphdr *)0, 0, + (void) tcp_reass(tp, (struct tcphdr *)0, NULL, 0, (struct mbuf *)0); tp->snd_wl1 = th->th_seq - 1; /* FALLTHROUGH */ @@ -3017,7 +3017,7 @@ dodata: /* XXX */ * fast retransmit can work). */ if (th->th_seq == tp->rcv_nxt && - LIST_EMPTY(&tp->t_segq) && + SEGQ_EMPTY(tp) && (TCPS_HAVEESTABLISHED(tp->t_state) || tfo_syn)) { if (DELAY_ACK(tp, tlen) || tfo_syn) @@ -3042,7 +3042,7 @@ dodata: /* XXX */ * m_adj() doesn't actually frees any mbufs * when trimming from the head. */ - thflags = tcp_reass(tp, th, &tlen, m); + thflags = tcp_reass(tp, th, &save_start, &tlen, m); tp->t_flags |= TF_ACKNOW; } if (tlen > 0 && (tp->t_flags & TF_SACK_PERMIT)) Modified: head/sys/netinet/tcp_log_buf.h ============================================================================== --- head/sys/netinet/tcp_log_buf.h Mon Aug 20 12:31:39 2018 (r338101) +++ head/sys/netinet/tcp_log_buf.h Mon Aug 20 12:43:18 2018 (r338102) @@ -217,7 +217,9 @@ enum tcp_log_events { BBR_LOG_REDUCE, /* old bbr log reduce for 4.1 and earlier 46*/ TCP_LOG_RTT, /* A rtt (in useconds) is being sampled and applied to the srtt algo 47 */ BBR_LOG_SETTINGS_CHG, /* Settings changed for loss response 48 */ - TCP_LOG_END /* End (keep at end) 49 */ + BBR_LOG_SRTT_GAIN_EVENT, /* SRTT gaining 49 */ + TCP_LOG_REASS, /* Reassembly buffer logging 50 */ + TCP_LOG_END /* End (keep at end) 51 */ }; enum tcp_log_states { Modified: head/sys/netinet/tcp_reass.c ============================================================================== --- head/sys/netinet/tcp_reass.c Mon Aug 20 12:31:39 2018 (r338101) +++ head/sys/netinet/tcp_reass.c Mon Aug 20 12:43:18 2018 (r338102) @@ -72,15 +72,37 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #ifdef TCPDEBUG #include #endif /* TCPDEBUG */ +#define TCP_R_LOG_ADD 1 +#define TCP_R_LOG_LIMIT_REACHED 2 +#define TCP_R_LOG_APPEND 3 +#define TCP_R_LOG_PREPEND 4 +#define TCP_R_LOG_REPLACE 5 +#define TCP_R_LOG_MERGE_INTO 6 +#define TCP_R_LOG_NEW_ENTRY 7 +#define TCP_R_LOG_READ 8 +#define TCP_R_LOG_ZERO 9 +#define TCP_R_LOG_DUMP 10 +#define TCP_R_LOG_TRIM 11 + +/* For debugging we want counters and BB logging */ +/* #define TCP_REASS_COUNTERS 1 */ +/* #define TCP_REASS_LOGGING 1 */ + static SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0, "TCP Segment Reassembly Queue"); +static SYSCTL_NODE(_net_inet_tcp_reass, OID_AUTO, stats, CTLFLAG_RW, 0, + "TCP Segment Reassembly stats"); + + static int tcp_reass_maxseg = 0; SYSCTL_INT(_net_inet_tcp_reass, OID_AUTO, maxsegments, CTLFLAG_RDTUN, &tcp_reass_maxseg, 0, @@ -96,6 +118,72 @@ SYSCTL_UINT(_net_inet_tcp_reass, OID_AUTO, maxqueuelen &tcp_reass_maxqueuelen, 0, "Maximum number of TCP Segments per Reassembly Queue"); +static int tcp_new_limits = 0; +SYSCTL_INT(_net_inet_tcp_reass, OID_AUTO, new_limit, CTLFLAG_RWTUN, + &tcp_new_limits, 0, + "Do we use the new limit method we are discussing?"); + +static u_int tcp_reass_queue_guard = 16; +SYSCTL_UINT(_net_inet_tcp_reass, OID_AUTO, queueguard, CTLFLAG_RWTUN, + &tcp_reass_queue_guard, 16, + "Number of TCP Segments in Reassembly Queue where we flip over to guard mode"); + +#ifdef TCP_REASS_COUNTERS + +counter_u64_t reass_entry; +SYSCTL_COUNTER_U64(_net_inet_tcp_reass_stats, OID_AUTO, entry, CTLFLAG_RD, + &reass_entry, "A segment entered reassembly "); + +counter_u64_t reass_path1; +SYSCTL_COUNTER_U64(_net_inet_tcp_reass_stats, OID_AUTO, path1, CTLFLAG_RD, + &reass_path1, "Took path 1"); + +counter_u64_t reass_path2; +SYSCTL_COUNTER_U64(_net_inet_tcp_reass_stats, OID_AUTO, path2, CTLFLAG_RD, + &reass_path2, "Took path 2"); + +counter_u64_t reass_path3; +SYSCTL_COUNTER_U64(_net_inet_tcp_reass_stats, OID_AUTO, path3, CTLFLAG_RD, + &reass_path3, "Took path 3"); + +counter_u64_t reass_path4; +SYSCTL_COUNTER_U64(_net_inet_tcp_reass_stats, OID_AUTO, path4, CTLFLAG_RD, + &reass_path4, "Took path 4"); + +counter_u64_t reass_path5; +SYSCTL_COUNTER_U64(_net_inet_tcp_reass_stats, OID_AUTO, path5, CTLFLAG_RD, + &reass_path5, "Took path 5"); + +counter_u64_t reass_path6; +SYSCTL_COUNTER_U64(_net_inet_tcp_reass_stats, OID_AUTO, path6, CTLFLAG_RD, + &reass_path6, "Took path 6"); + +counter_u64_t reass_path7; +SYSCTL_COUNTER_U64(_net_inet_tcp_reass_stats, OID_AUTO, path7, CTLFLAG_RD, + &reass_path7, "Took path 7"); + +counter_u64_t reass_fullwalk; +SYSCTL_COUNTER_U64(_net_inet_tcp_reass_stats, OID_AUTO, fullwalk, CTLFLAG_RD, + &reass_fullwalk, "Took a full walk "); + +counter_u64_t reass_nospace; +SYSCTL_COUNTER_U64(_net_inet_tcp_reass_stats, OID_AUTO, nospace, CTLFLAG_RD, + &reass_nospace, "Had no mbuf capacity "); + +counter_u64_t merge_fwd; +SYSCTL_COUNTER_U64(_net_inet_tcp_reass_stats, OID_AUTO, merge_fwd, CTLFLAG_RD, + &merge_fwd, "Ran merge fwd"); + +counter_u64_t merge_into; +SYSCTL_COUNTER_U64(_net_inet_tcp_reass_stats, OID_AUTO, merge_into, CTLFLAG_RD, + &merge_into, "Ran merge into"); + +counter_u64_t tcp_zero_input; +SYSCTL_COUNTER_U64(_net_inet_tcp_reass_stats, OID_AUTO, zero_input, CTLFLAG_RD, + &tcp_zero_input, "The reassembly buffer saw a zero len segment etc"); + +#endif + /* Initialize TCP reassembly queue */ static void tcp_reass_zone_change(void *tag) @@ -107,6 +195,77 @@ tcp_reass_zone_change(void *tag) tcp_reass_maxseg); } +#ifdef TCP_REASS_LOGGING + +static void +tcp_log_reassm(struct tcpcb *tp, struct tseg_qent *q, struct tseg_qent *p, + tcp_seq seq, int len, uint8_t action, int instance) +{ + uint32_t cts; + struct timeval tv; + + if (tp->t_logstate != TCP_LOG_STATE_OFF) { + union tcp_log_stackspecific log; + + memset(&log, 0, sizeof(log)); + cts = tcp_get_usecs(&tv); + log.u_bbr.flex1 = seq; + log.u_bbr.cur_del_rate = (uint64_t)q; + log.u_bbr.delRate = (uint64_t)p; + if (q != NULL) { + log.u_bbr.flex2 = q->tqe_start; + log.u_bbr.flex3 = q->tqe_len; + log.u_bbr.flex4 = q->tqe_mbuf_cnt; + log.u_bbr.hptsi_gain = q->tqe_flags; + } + if (p != NULL) { + log.u_bbr.flex5 = p->tqe_start; + log.u_bbr.pkts_out = p->tqe_len; + log.u_bbr.epoch = p->tqe_mbuf_cnt; + log.u_bbr.cwnd_gain = p->tqe_flags; + } + log.u_bbr.flex6 = tp->t_segqmbuflen; + log.u_bbr.flex7 = instance; + log.u_bbr.flex8 = action; + log.u_bbr.timeStamp = cts; + TCP_LOG_EVENTP(tp, NULL, + &tp->t_inpcb->inp_socket->so_rcv, + &tp->t_inpcb->inp_socket->so_snd, + TCP_LOG_REASS, 0, + len, &log, false, &tv); + } +} + +static void +tcp_reass_log_dump(struct tcpcb *tp) +{ + struct tseg_qent *q; + + if (tp->t_logstate != TCP_LOG_STATE_OFF) { + TAILQ_FOREACH(q, &tp->t_segq, tqe_q) { + tcp_log_reassm(tp, q, NULL, q->tqe_start, q->tqe_len, TCP_R_LOG_DUMP, 0); + } + }; +} + +static void +tcp_reass_log_new_in(struct tcpcb *tp, tcp_seq seq, int len, struct mbuf *m, + int logval, struct tseg_qent *q) +{ + int cnt; + struct mbuf *t; + + cnt = 0; + t = m; + while (t) { + cnt += t->m_len; + t = t->m_next; + } + tcp_log_reassm(tp, q, NULL, seq, len, logval, cnt); +} + +#endif + void tcp_reass_global_init(void) { @@ -119,8 +278,24 @@ tcp_reass_global_init(void) /* Set the zone limit and read back the effective value. */ tcp_reass_maxseg = uma_zone_set_max(tcp_reass_zone, tcp_reass_maxseg); +#ifdef TCP_REASS_COUNTERS + reass_path1 = counter_u64_alloc(M_WAITOK); + reass_path2 = counter_u64_alloc(M_WAITOK); + reass_path3 = counter_u64_alloc(M_WAITOK); + reass_path4 = counter_u64_alloc(M_WAITOK); + reass_path5 = counter_u64_alloc(M_WAITOK); + reass_path6 = counter_u64_alloc(M_WAITOK); + reass_path7 = counter_u64_alloc(M_WAITOK); + reass_fullwalk = counter_u64_alloc(M_WAITOK); + reass_nospace = counter_u64_alloc(M_WAITOK); + reass_entry = counter_u64_alloc(M_WAITOK); + merge_fwd = counter_u64_alloc(M_WAITOK); + merge_into = counter_u64_alloc(M_WAITOK); + tcp_zero_input = counter_u64_alloc(M_WAITOK); +#endif EVENTHANDLER_REGISTER(nmbclusters_change, tcp_reass_zone_change, NULL, EVENTHANDLER_PRI_ANY); + } void @@ -130,32 +305,237 @@ tcp_reass_flush(struct tcpcb *tp) INP_WLOCK_ASSERT(tp->t_inpcb); - while ((qe = LIST_FIRST(&tp->t_segq)) != NULL) { - LIST_REMOVE(qe, tqe_q); + while ((qe = TAILQ_FIRST(&tp->t_segq)) != NULL) { + TAILQ_REMOVE(&tp->t_segq, qe, tqe_q); m_freem(qe->tqe_m); uma_zfree(tcp_reass_zone, qe); tp->t_segqlen--; } - + tp->t_segqmbuflen = 0; KASSERT((tp->t_segqlen == 0), ("TCP reass queue %p segment count is %d instead of 0 after flush.", tp, tp->t_segqlen)); } +static void +tcp_reass_append(struct tcpcb *tp, struct tseg_qent *last, + struct mbuf *m, struct tcphdr *th, int tlen, + struct mbuf *mlast, int lenofoh) +{ + +#ifdef TCP_REASS_LOGGING + tcp_log_reassm(tp, last, NULL, th->th_seq, tlen, TCP_R_LOG_APPEND, 0); +#endif + last->tqe_len += tlen; + last->tqe_m->m_pkthdr.len += tlen; + /* Preserve the FIN bit if its there */ + last->tqe_flags |= (th->th_flags & TH_FIN); + last->tqe_last->m_next = m; + last->tqe_last = mlast; + last->tqe_mbuf_cnt += lenofoh; + tp->t_rcvoopack++; + TCPSTAT_INC(tcps_rcvoopack); + TCPSTAT_ADD(tcps_rcvoobyte, tlen); +#ifdef TCP_REASS_LOGGING + tcp_reass_log_new_in(tp, last->tqe_start, lenofoh, last->tqe_m, + TCP_R_LOG_APPEND, + last); +#endif +} + +static void +tcp_reass_prepend(struct tcpcb *tp, struct tseg_qent *first, struct mbuf *m, struct tcphdr *th, + int tlen, struct mbuf *mlast, int lenofoh) +{ + int i; + +#ifdef TCP_REASS_LOGGING + tcp_log_reassm(tp, first, NULL, th->th_seq, tlen, TCP_R_LOG_PREPEND, 0); +#endif + if (SEQ_GT((th->th_seq + tlen), first->tqe_start)) { + /* The new data overlaps into the old */ + i = (th->th_seq + tlen) - first->tqe_start; +#ifdef TCP_REASS_LOGGING + tcp_log_reassm(tp, first, NULL, 0, i, TCP_R_LOG_TRIM, 1); +#endif + m_adj(first->tqe_m, i); + first->tqe_len -= i; + first->tqe_start += i; + } + /* Ok now setup our chain to point to the old first */ + mlast->m_next = first->tqe_m; + first->tqe_m = m; + first->tqe_len += tlen; + first->tqe_start = th->th_seq; + first->tqe_m->m_pkthdr.len = first->tqe_len; + first->tqe_mbuf_cnt += lenofoh; + tp->t_rcvoopack++; + TCPSTAT_INC(tcps_rcvoopack); + TCPSTAT_ADD(tcps_rcvoobyte, tlen); +#ifdef TCP_REASS_LOGGING + tcp_reass_log_new_in(tp, first->tqe_start, lenofoh, first->tqe_m, + TCP_R_LOG_PREPEND, + first); +#endif +} + +static void +tcp_reass_replace(struct tcpcb *tp, struct tseg_qent *q, struct mbuf *m, + tcp_seq seq, int len, struct mbuf *mlast, int mbufoh, uint8_t flags) +{ + /* + * Free the data in q, and replace + * it with the new segment. + */ + int len_dif; + +#ifdef TCP_REASS_LOGGING + tcp_log_reassm(tp, q, NULL, seq, len, TCP_R_LOG_REPLACE, 0); +#endif + m_freem(q->tqe_m); + KASSERT(tp->t_segqmbuflen >= q->tqe_mbuf_cnt, + ("Tp:%p seg queue goes negative", tp)); + tp->t_segqmbuflen -= q->tqe_mbuf_cnt; + q->tqe_mbuf_cnt = mbufoh; + q->tqe_m = m; + q->tqe_last = mlast; + q->tqe_start = seq; + if (len > q->tqe_len) + len_dif = len - q->tqe_len; + else + len_dif = 0; + tp->t_rcvoopack++; + TCPSTAT_INC(tcps_rcvoopack); + TCPSTAT_ADD(tcps_rcvoobyte, len_dif); + q->tqe_len = len; + q->tqe_flags = (flags & TH_FIN); + q->tqe_m->m_pkthdr.len = q->tqe_len; + tp->t_segqmbuflen += mbufoh; + +} + +static void +tcp_reass_merge_into(struct tcpcb *tp, struct tseg_qent *ent, + struct tseg_qent *q) +{ + /* + * Merge q into ent and free q from the list. + */ +#ifdef TCP_REASS_LOGGING + tcp_log_reassm(tp, q, ent, 0, 0, TCP_R_LOG_MERGE_INTO, 0); +#endif +#ifdef TCP_REASS_COUNTERS + counter_u64_add(merge_into, 1); +#endif + ent->tqe_last->m_next = q->tqe_m; + ent->tqe_last = q->tqe_last; + ent->tqe_len += q->tqe_len; + ent->tqe_mbuf_cnt += q->tqe_mbuf_cnt; + ent->tqe_m->m_pkthdr.len += q->tqe_len; + ent->tqe_flags |= (q->tqe_flags & TH_FIN); + TAILQ_REMOVE(&tp->t_segq, q, tqe_q); + uma_zfree(tcp_reass_zone, q); + tp->t_segqlen--; + +} + +static void +tcp_reass_merge_forward(struct tcpcb *tp, struct tseg_qent *ent) +{ + struct tseg_qent *q, *qtmp; + int i; + tcp_seq max; + /* + * Given an entry merge forward anyplace + * that ent overlaps forward. + */ + + max = ent->tqe_start + ent->tqe_len; + q = TAILQ_NEXT(ent, tqe_q); + if (q == NULL) { + /* Nothing left */ + return; + } + TAILQ_FOREACH_FROM_SAFE(q, &tp->t_segq, tqe_q, qtmp) { + if (SEQ_GT(q->tqe_start, max)) { + /* Beyond q */ + break; + } + /* We have some or all that are overlapping */ + if (SEQ_GEQ(max, (q->tqe_start + q->tqe_len))) { + /* It consumes it all */ + tp->t_segqmbuflen -= q->tqe_mbuf_cnt; + m_freem(q->tqe_m); + TAILQ_REMOVE(&tp->t_segq, q, tqe_q); + uma_zfree(tcp_reass_zone, q); + tp->t_segqlen--; + continue; + } + /* + * Trim the q entry to dovetail to this one + * and then merge q into ent updating max + * in the process. + */ + i = max - q->tqe_start; +#ifdef TCP_REASS_LOGGING + tcp_log_reassm(tp, q, NULL, 0, i, TCP_R_LOG_TRIM, 2); +#endif + m_adj(q->tqe_m, i); + q->tqe_len -= i; + q->tqe_start += i; + tcp_reass_merge_into(tp, ent, q); + max = ent->tqe_start + ent->tqe_len; + } +#ifdef TCP_REASS_COUNTERS + counter_u64_add(merge_fwd, 1); +#endif +} + +static int +tcp_reass_overhead_of_chain(struct mbuf *m, struct mbuf **mlast) +{ + int len = MSIZE; + + if (m->m_flags & M_EXT) + len += m->m_ext.ext_size; + while (m->m_next != NULL) { + m = m->m_next; + len += MSIZE; + if (m->m_flags & M_EXT) + len += m->m_ext.ext_size; + } + *mlast = m; + return (len); +} + + +/* + * NOTE!!! the new tcp-reassembly code *must not* use + * m_adj() with a negative index. That alters the chain + * of mbufs (by possibly chopping trailing mbufs). At + * the front of tcp_reass we count the mbuf overhead + * and setup the tail pointer. If we use m_adj(m, -5) + * we could corrupt the tail pointer. Currently the + * code only uses m_adj(m, postive-num). If this + * changes appropriate changes to update mlast would + * be needed. + */ int -tcp_reass(struct tcpcb *tp, struct tcphdr *th, int *tlenp, struct mbuf *m) +tcp_reass(struct tcpcb *tp, struct tcphdr *th, tcp_seq *seq_start, + int *tlenp, struct mbuf *m) { - struct tseg_qent *q; + struct tseg_qent *q, *last, *first; struct tseg_qent *p = NULL; - struct tseg_qent *nq; + struct tseg_qent *nq = NULL; struct tseg_qent *te = NULL; + struct tseg_qent tqs; + struct mbuf *mlast = NULL; + struct sockbuf *sb; struct socket *so = tp->t_inpcb->inp_socket; char *s = NULL; - int flags; - struct tseg_qent tqs; + int flags, i, lenofoh; INP_WLOCK_ASSERT(tp->t_inpcb); - /* * XXX: tcp_reass() is rather inefficient with its data structures * and should be rewritten (see NetBSD for optimizations). @@ -167,154 +547,475 @@ tcp_reass(struct tcpcb *tp, struct tcphdr *th, int *tl */ if (th == NULL) goto present; - + KASSERT(SEQ_GEQ(th->th_seq, tp->rcv_nxt), + ("Attempt to add old entry to reassembly queue (th=%p, tp=%p)", + th, tp)); +#ifdef TCP_REASS_LOGGING + tcp_reass_log_new_in(tp, th->th_seq, *tlenp, m, TCP_R_LOG_ADD, NULL); +#endif +#ifdef TCP_REASS_COUNTERS + counter_u64_add(reass_entry, 1); +#endif /* - * Limit the number of segments that can be queued to reduce the - * potential for mbuf exhaustion. For best performance, we want to be - * able to queue a full window's worth of segments. The size of the - * socket receive buffer determines our advertised window and grows - * automatically when socket buffer autotuning is enabled. Use it as the - * basis for our queue limit. - * - * However, allow the user to specify a ceiling for the number of - * segments in each queue. - * - * Always let the missing segment through which caused this queue. - * NB: Access to the socket buffer is left intentionally unlocked as we - * can tolerate stale information here. - * - * XXXLAS: Using sbspace(so->so_rcv) instead of so->so_rcv.sb_hiwat - * should work but causes packets to be dropped when they shouldn't. - * Investigate why and re-evaluate the below limit after the behaviour - * is understood. + * Check for zero length data. */ - if ((th->th_seq != tp->rcv_nxt || !TCPS_HAVEESTABLISHED(tp->t_state)) && - tp->t_segqlen >= min((so->so_rcv.sb_hiwat / tp->t_maxseg) + 1, - tcp_reass_maxqueuelen)) { + if ((*tlenp == 0) && ((th->th_flags & TH_FIN) == 0)) { + /* + * A zero length segment does no + * one any good. We could check + * the rcv_nxt <-> rcv_wnd but thats + * already done for us by the caller. + */ +#ifdef TCP_REASS_COUNTERS + counter_u64_add(tcp_zero_input, 1); +#endif + m_freem(m); +#ifdef TCP_REASS_LOGGING + tcp_reass_log_dump(tp); +#endif + return (0); + } + /* + * Will it fit? + */ + lenofoh = tcp_reass_overhead_of_chain(m, &mlast); + sb = &tp->t_inpcb->inp_socket->so_rcv; + if ((sb->sb_mbcnt + tp->t_segqmbuflen + lenofoh) > sb->sb_mbmax) { + /* No room */ TCPSTAT_INC(tcps_rcvreassfull); - *tlenp = 0; - if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: queue limit reached, " - "segment dropped\n", s, __func__); - free(s, M_TCPLOG); - } +#ifdef TCP_REASS_COUNTERS + counter_u64_add(reass_nospace, 1); +#endif +#ifdef TCP_REASS_LOGGING + tcp_log_reassm(tp, NULL, NULL, th->th_seq, lenofoh, TCP_R_LOG_LIMIT_REACHED, 0); +#endif m_freem(m); + *tlenp = 0; +#ifdef TCP_REASS_LOGGING + tcp_reass_log_dump(tp); +#endif return (0); } - /* - * Allocate a new queue entry. If we can't, or hit the zone limit - * just drop the pkt. - * - * Use a temporary structure on the stack for the missing segment - * when the zone is exhausted. Otherwise we may get stuck. + * First lets deal with two common cases, the + * segment appends to the back of our collected + * segments. Or the segment is the next in line. */ - te = uma_zalloc(tcp_reass_zone, M_NOWAIT); - if (te == NULL) { - if (th->th_seq != tp->rcv_nxt || !TCPS_HAVEESTABLISHED(tp->t_state)) { - TCPSTAT_INC(tcps_rcvmemdrop); - m_freem(m); + last = TAILQ_LAST_FAST(&tp->t_segq, tseg_qent, tqe_q); + if (last != NULL) { + if ((th->th_flags & TH_FIN) && + SEQ_LT((th->th_seq + *tlenp), (last->tqe_start + last->tqe_len))) { + /* + * Someone is trying to game us, dump + * the segment. + */ *tlenp = 0; - if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, - NULL))) { - log(LOG_DEBUG, "%s; %s: global zone limit " - "reached, segment dropped\n", s, __func__); - free(s, M_TCPLOG); + m_freem(m); + return (0); + } + if ((SEQ_GEQ(th->th_seq, last->tqe_start)) && + (SEQ_GEQ((last->tqe_start + last->tqe_len), th->th_seq))) { + /* Common case, trailing segment is added */ + /** + * +--last + * v + * reassembly buffer |---| |---| |---| + * new segment |---| + */ +#ifdef TCP_REASS_COUNTERS + counter_u64_add(reass_path1, 1); +#endif + if (SEQ_GT((last->tqe_start + last->tqe_len), th->th_seq)) { + i = (last->tqe_start + last->tqe_len) - th->th_seq; + if (i < *tlenp) { +#ifdef TCP_REASS_LOGGING + tcp_log_reassm(tp, last, NULL, 0, i, TCP_R_LOG_TRIM, 3); + th->th_seq += i; +#endif + m_adj(m, i); + *tlenp -= i; + } else { + /* Complete overlap */ + TCPSTAT_INC(tcps_rcvduppack); + TCPSTAT_ADD(tcps_rcvdupbyte, *tlenp); + m_freem(m); + *tlenp = last->tqe_len; + *seq_start = last->tqe_start; + return (0); + } } + if (last->tqe_flags & TH_FIN) { + /* + * We have data after the FIN on the last? + */ + *tlenp = 0; + m_freem(m); + return(0); + } + tcp_reass_append(tp, last, m, th, *tlenp, mlast, lenofoh); + tp->t_segqmbuflen += lenofoh; + *seq_start = last->tqe_start; + *tlenp = last->tqe_len; return (0); - } else { - bzero(&tqs, sizeof(struct tseg_qent)); - te = &tqs; - if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, - NULL))) { - log(LOG_DEBUG, - "%s; %s: global zone limit reached, using " - "stack for missing segment\n", s, __func__); - free(s, M_TCPLOG); + } else if (SEQ_GT(th->th_seq, (last->tqe_start + last->tqe_len))) { + /* + * Second common case, we missed + * another one and have something more + * for the end. + */ + /** + * +--last + * v + * reassembly buffer |---| |---| |---| + * new segment |---| + */ + if (last->tqe_flags & TH_FIN) { + /* + * We have data after the FIN on the last? + */ + *tlenp = 0; + m_freem(m); + return(0); } +#ifdef TCP_REASS_COUNTERS + counter_u64_add(reass_path2, 1); +#endif + p = last; + goto new_entry; } + } else { + /* First segment (it's NULL). */ + goto new_entry; } - tp->t_segqlen++; + first = TAILQ_FIRST(&tp->t_segq); + if (SEQ_LT(th->th_seq, first->tqe_start) && + SEQ_GEQ((th->th_seq + *tlenp),first->tqe_start) && + SEQ_LT((th->th_seq + *tlenp), (first->tqe_start + first->tqe_len))) { + /* + * The head of the queue is prepended by this and + * it may be the one I want most. + */ + /** + * first-------+ + * v + * rea: |---| |---| |---| + * new: |---| + * Note the case we do not deal with here is: + * rea= |---| |---| |---| + * new= |----| + * Due to the fact that it could be + * new |--------------------| + * And we might need to merge forward. + */ +#ifdef INVARIANTS + struct mbuf *firstmbuf; +#endif +#ifdef TCP_REASS_COUNTERS + counter_u64_add(reass_path3, 1); +#endif + if (SEQ_LT(th->th_seq, tp->rcv_nxt)) { + /* + * The resend was even before + * what we have. We need to trim it. + * Note TSNH (it should be trimmed + * before the call to tcp_reass()). + */ +#ifdef INVARIANTS + panic("th->th_seq:%u rcv_nxt:%u tp:%p not pre-trimmed", + th->th_seq, tp->rcv_nxt, tp); +#else + i = tp->rcv_nxt - th->th_seq; +#ifdef TCP_REASS_LOGGING + tcp_log_reassm(tp, first, NULL, 0, i, TCP_R_LOG_TRIM, 4); +#endif + m_adj(m, i); + th->th_seq += i; + *tlenp -= i; +#endif + } +#ifdef INVARIANTS + firstmbuf = first->tqe_m; +#endif + tcp_reass_prepend(tp, first, m, th, *tlenp, mlast, lenofoh); +#ifdef INVARIANTS + if (firstmbuf == first->tqe_m) { + panic("First stayed same m:%p foobar:%p first->tqe_m:%p tp:%p first:%p", + m, firstmbuf, first->tqe_m, tp, first); + } else if (first->tqe_m != m) { + panic("First did not change to m:%p foobar:%p first->tqe_m:%p tp:%p first:%p", + m, firstmbuf, first->tqe_m, tp, first); + } +#endif + tp->t_segqmbuflen += lenofoh; + *seq_start = first->tqe_start; + *tlenp = first->tqe_len; + goto present; + } else if (SEQ_LT((th->th_seq + *tlenp), first->tqe_start)) { + /* New segment is before our earliest segment. */ + /** + * first---->+ + * v + * rea= |---| .... + * new" |---| + * + */ + goto new_entry; + } /* * Find a segment which begins after this one does. */ - LIST_FOREACH(q, &tp->t_segq, tqe_q) { - if (SEQ_GT(q->tqe_th->th_seq, th->th_seq)) +#ifdef TCP_REASS_COUNTERS + counter_u64_add(reass_fullwalk, 1); +#endif + TAILQ_FOREACH(q, &tp->t_segq, tqe_q) { + if (SEQ_GT(q->tqe_start, th->th_seq)) break; - p = q; } - - /* - * If there is a preceding segment, it may provide some of - * our data already. If so, drop the data from the incoming - * segment. If it provides all of our data, drop us. + p = TAILQ_PREV(q, tsegqe_head, tqe_q); + /** + * Now is this fit just in-between only? + * i.e.: + * p---+ +----q + * v v + * res= |--| |--| |--| + * nee |-| */ - if (p != NULL) { - int i; + if (SEQ_LT((th->th_seq + *tlenp), q->tqe_start) && + ((p == NULL) || (SEQ_GT(th->th_seq, (p->tqe_start + p->tqe_len))))) { + /* Yep no overlap */ + goto new_entry; + } + /** + * If we reach here we have some (possibly all) overlap + * such as: + * res= |--| |--| |--| + * new= |----| + * or new= |-----------------| + * or new= |--------| + * or new= |---| + * or new= |-----------| + */ + if ((p != NULL) && + (SEQ_LEQ(th->th_seq, (p->tqe_start + p->tqe_len)))) { /* conversion to int (in i) handles seq wraparound */ - i = p->tqe_th->th_seq + p->tqe_len - th->th_seq; - if (i > 0) { + +#ifdef TCP_REASS_COUNTERS + counter_u64_add(reass_path4, 1); +#endif + i = p->tqe_start + p->tqe_len - th->th_seq; + if (i >= 0) { if (i >= *tlenp) { + /** + * prev seg---->+ + * v + * reassembly buffer |---| + * new segment |-| + */ TCPSTAT_INC(tcps_rcvduppack); TCPSTAT_ADD(tcps_rcvdupbyte, *tlenp); + *tlenp = p->tqe_len; + *seq_start = p->tqe_start; m_freem(m); - if (te != &tqs) - uma_zfree(tcp_reass_zone, te); - tp->t_segqlen--; /* * Try to present any queued data * at the left window edge to the user. * This is needed after the 3-WHS - * completes. + * completes. Note this probably + * will not work and we will return. */ - goto present; /* ??? */ + return (0); } - m_adj(m, i); - *tlenp -= i; - th->th_seq += i; + if (i > 0) { + /** + * prev seg---->+ + * v + * reassembly buffer |---| + * new segment |-----| + */ +#ifdef TCP_REASS_COUNTERS + counter_u64_add(reass_path5, 1); +#endif +#ifdef TCP_REASS_LOGGING + tcp_log_reassm(tp, p, NULL, 0, i, TCP_R_LOG_TRIM, 5); +#endif + m_adj(m, i); + *tlenp -= i; + th->th_seq += i; + } } + if (th->th_seq == (p->tqe_start + p->tqe_len)) { + /* + * If dovetails in with this one + * append it. + */ + /** + * prev seg---->+ + * v + * reassembly buffer |--| |---| + * new segment |--| + * (note: it was trimmed above if it overlapped) + */ + tcp_reass_append(tp, p, m, th, *tlenp, mlast, lenofoh); + tp->t_segqmbuflen += lenofoh; + } else { +#ifdef INVARIANTS + panic("Impossible cut th_seq:%u p->seq:%u(%d) p:%p tp:%p", + th->th_seq, p->tqe_start, p->tqe_len, + p, tp); +#endif + *tlenp = 0; + m_freem(m); + return (0); + } + q = p; + } else { + /* + * The new data runs over the + * top of previously sack'd data (in q). + * It may be partially overlapping, or + * it may overlap the entire segment. + */ +#ifdef TCP_REASS_COUNTERS + counter_u64_add(reass_path6, 1); +#endif + if (SEQ_GEQ((th->th_seq + *tlenp), (q->tqe_start + q->tqe_len))) { + /* It consumes it all */ + /** + * next seg---->+ + * v + * reassembly buffer |--| |---| + * new segment |----------| + */ +#ifdef TCP_REASS_COUNTERS + counter_u64_add(reass_path7, 1); +#endif + tcp_reass_replace(tp, q, m, th->th_seq, *tlenp, mlast, lenofoh, th->th_flags); + } else { + /* + * We just need to prepend the data + * to this. It does not overrun + * the end. + */ + /** + * next seg---->+ + * v + * reassembly buffer |--| |---| + * new segment |----------| + */ + tcp_reass_prepend(tp, q, m, th, *tlenp, mlast, lenofoh); + tp->t_segqmbuflen += lenofoh; + } } - tp->t_rcvoopack++; - TCPSTAT_INC(tcps_rcvoopack); - TCPSTAT_ADD(tcps_rcvoobyte, *tlenp); + /* Now does it go further than that? */ + tcp_reass_merge_forward(tp, q); + *seq_start = q->tqe_start; + *tlenp = q->tqe_len; + goto present; - /* - * While we overlap succeeding segments trim them or, - * if they are completely covered, dequeue them. + /* + * When we reach here we can't combine it + * with any existing segment. + * + * Limit the number of segments that can be queued to reduce the + * potential for mbuf exhaustion. For best performance, we want to be + * able to queue a full window's worth of segments. The size of the + * socket receive buffer determines our advertised window and grows + * automatically when socket buffer autotuning is enabled. Use it as the + * basis for our queue limit. + * + * However, allow the user to specify a ceiling for the number of + * segments in each queue. + * + * Always let the missing segment through which caused this queue. + * NB: Access to the socket buffer is left intentionally unlocked as we + * can tolerate stale information here. + * + * XXXLAS: Using sbspace(so->so_rcv) instead of so->so_rcv.sb_hiwat + * should work but causes packets to be dropped when they shouldn't. + * Investigate why and re-evaluate the below limit after the behaviour + * is understood. */ - while (q) { - int i = (th->th_seq + *tlenp) - q->tqe_th->th_seq; - if (i <= 0) - break; - if (i < q->tqe_len) { - q->tqe_th->th_seq += i; - q->tqe_len -= i; - m_adj(q->tqe_m, i); - break; +new_entry: + if (tcp_new_limits) { + if ((tp->t_segqlen > tcp_reass_queue_guard) && + (*tlenp < MSIZE)) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Aug 20 13:42: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 2F06F106E35F; Mon, 20 Aug 2018 13:42:26 +0000 (UTC) (envelope-from will@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 368798D912; Mon, 20 Aug 2018 13:42:24 +0000 (UTC) (envelope-from will@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 3E55A16183; Mon, 20 Aug 2018 13:42:23 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KDgMSE079227; Mon, 20 Aug 2018 13:42:22 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KDgMs6079226; Mon, 20 Aug 2018 13:42:22 GMT (envelope-from will@FreeBSD.org) Message-Id: <201808201342.w7KDgMs6079226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Mon, 20 Aug 2018 13:42:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338103 - head/usr.sbin/iostat X-SVN-Group: head X-SVN-Commit-Author: will X-SVN-Commit-Paths: head/usr.sbin/iostat X-SVN-Commit-Revision: 338103 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, 20 Aug 2018 13:42:26 -0000 Author: will Date: Mon Aug 20 13:42:22 2018 New Revision: 338103 URL: https://svnweb.freebsd.org/changeset/base/338103 Log: iostat: update man page for r277566 The original commit added granularity to the transaction latency display in the extended device stats mode, but didn't update the man page. Reported by: Miroslav Lachman <000.fbsd@quip.cz> via jmg MFC after: 1 day Modified: head/usr.sbin/iostat/iostat.8 Modified: head/usr.sbin/iostat/iostat.8 ============================================================================== --- head/usr.sbin/iostat/iostat.8 Mon Aug 20 12:43:18 2018 (r338102) +++ head/usr.sbin/iostat/iostat.8 Mon Aug 20 13:42:22 2018 (r338103) @@ -360,8 +360,14 @@ kilobytes read per second kilobytes write per second .It qlen transactions queue length -.It svc_t -average duration of transactions, in milliseconds +.It ms/r +average duration of read transactions, in milliseconds +.It ms/w +average duration of write transactions, in milliseconds +.It ms/o +average duration of all other transactions, in milliseconds +.It ms/t +average duration of all transactions, in milliseconds .It %b % of time the device had one or more outstanding transactions .El From owner-svn-src-head@freebsd.org Mon Aug 20 14:35: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 50B6A1070278; Mon, 20 Aug 2018 14:35:55 +0000 (UTC) (envelope-from mav@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 03DED70042; Mon, 20 Aug 2018 14:35:55 +0000 (UTC) (envelope-from mav@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 D556D1699C; Mon, 20 Aug 2018 14:35:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KEZsGr011416; Mon, 20 Aug 2018 14:35:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KEZsss011415; Mon, 20 Aug 2018 14:35:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201808201435.w7KEZsss011415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Aug 2018 14:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338105 - head/sys/netgraph X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/netgraph X-SVN-Commit-Revision: 338105 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, 20 Aug 2018 14:35:55 -0000 Author: mav Date: Mon Aug 20 14:35:54 2018 New Revision: 338105 URL: https://svnweb.freebsd.org/changeset/base/338105 Log: Remove extra M_ZERO from NG_MKRESPONSE() argument. NG_MKRESPONSE() sets M_ZERO by itself. Submitted by: Dmitry Luhtionov MFC after: 1 week Modified: head/sys/netgraph/ng_base.c Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Mon Aug 20 14:27:37 2018 (r338104) +++ head/sys/netgraph/ng_base.c Mon Aug 20 14:35:54 2018 (r338105) @@ -2665,7 +2665,7 @@ ng_generic_msg(node_p here, item_p item, hook_p lastho IDHASH_RLOCK(); /* Get response struct. */ NG_MKRESPONSE(resp, msg, sizeof(*nl) + - (V_ng_nodes * sizeof(struct nodeinfo)), M_NOWAIT | M_ZERO); + (V_ng_nodes * sizeof(struct nodeinfo)), M_NOWAIT); if (resp == NULL) { IDHASH_RUNLOCK(); error = ENOMEM; From owner-svn-src-head@freebsd.org Mon Aug 20 15:57:33 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 1004110732B2; Mon, 20 Aug 2018 15:57:33 +0000 (UTC) (envelope-from alc@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 B6FC173A10; Mon, 20 Aug 2018 15:57:32 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 80F8B176D0; Mon, 20 Aug 2018 15:57:32 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KFvWoD060417; Mon, 20 Aug 2018 15:57:32 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KFvRw7060382; Mon, 20 Aug 2018 15:57:27 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201808201557.w7KFvRw7060382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 20 Aug 2018 15:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338107 - in head/sys: arm/allwinner arm/arm arm/freescale/imx arm/nvidia arm/nvidia/drm2 arm/samsung/exynos arm64/arm64 compat/linuxkpi/common/include/linux compat/linuxkpi/common/src ... X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in head/sys: arm/allwinner arm/arm arm/freescale/imx arm/nvidia arm/nvidia/drm2 arm/samsung/exynos arm64/arm64 compat/linuxkpi/common/include/linux compat/linuxkpi/common/src compat/ndis dev/agp dev/l... X-SVN-Commit-Revision: 338107 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, 20 Aug 2018 15:57:33 -0000 Author: alc Date: Mon Aug 20 15:57:27 2018 New Revision: 338107 URL: https://svnweb.freebsd.org/changeset/base/338107 Log: Eliminate kmem_alloc_contig()'s unused arena parameter. Reviewed by: hselasky, kib, markj Discussed with: jeff Differential Revision: https://reviews.freebsd.org/D16799 Modified: head/sys/arm/allwinner/a10_fb.c head/sys/arm/arm/busdma_machdep-v4.c head/sys/arm/arm/busdma_machdep-v6.c head/sys/arm/arm/pmap-v6.c head/sys/arm/freescale/imx/imx6_sdma.c head/sys/arm/nvidia/drm2/tegra_dc.c head/sys/arm/nvidia/tegra_pcie.c head/sys/arm/nvidia/tegra_xhci.c head/sys/arm/samsung/exynos/exynos5_fimd.c head/sys/arm64/arm64/busdma_bounce.c head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h head/sys/compat/linuxkpi/common/src/linux_page.c head/sys/compat/ndis/subr_ntoskrnl.c head/sys/dev/agp/agp.c head/sys/dev/agp/agp_i810.c head/sys/dev/liquidio/lio_network.h head/sys/dev/xdma/controller/pl330.c head/sys/kern/kern_malloc.c head/sys/mips/ingenic/jz4780_lcd.c head/sys/mips/mips/busdma_machdep.c head/sys/powerpc/powerpc/busdma_machdep.c head/sys/vm/vm_extern.h head/sys/vm/vm_kern.c head/sys/x86/iommu/intel_intrmap.c head/sys/x86/iommu/intel_qi.c Modified: head/sys/arm/allwinner/a10_fb.c ============================================================================== --- head/sys/arm/allwinner/a10_fb.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/arm/allwinner/a10_fb.c Mon Aug 20 15:57:27 2018 (r338107) @@ -178,8 +178,8 @@ static struct resource_spec a10fb_spec[] = { static int a10fb_allocfb(struct a10fb_softc *sc) { - sc->vaddr = kmem_alloc_contig(kernel_arena, sc->fbsize, - M_NOWAIT | M_ZERO, 0, ~0, FB_ALIGN, 0, VM_MEMATTR_WRITE_COMBINING); + sc->vaddr = kmem_alloc_contig(sc->fbsize, M_NOWAIT | M_ZERO, 0, ~0, + FB_ALIGN, 0, VM_MEMATTR_WRITE_COMBINING); if (sc->vaddr == 0) { device_printf(sc->dev, "failed to allocate FB memory\n"); return (ENOMEM); Modified: head/sys/arm/arm/busdma_machdep-v4.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v4.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/arm/arm/busdma_machdep-v4.c Mon Aug 20 15:57:27 2018 (r338107) @@ -750,9 +750,8 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int *vaddr = (void *)kmem_alloc_attr(dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { - *vaddr = (void *)kmem_alloc_contig(kernel_arena, dmat->maxsize, - mflags, 0, dmat->lowaddr, dmat->alignment, dmat->boundary, - memattr); + *vaddr = (void *)kmem_alloc_contig(dmat->maxsize, mflags, 0, + dmat->lowaddr, dmat->alignment, dmat->boundary, memattr); } if (*vaddr == NULL) { CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/arm/arm/busdma_machdep-v6.c Mon Aug 20 15:57:27 2018 (r338107) @@ -815,9 +815,8 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int *vaddr = (void *)kmem_alloc_attr(dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { - *vaddr = (void *)kmem_alloc_contig(kernel_arena, dmat->maxsize, - mflags, 0, dmat->lowaddr, dmat->alignment, dmat->boundary, - memattr); + *vaddr = (void *)kmem_alloc_contig(dmat->maxsize, mflags, 0, + dmat->lowaddr, dmat->alignment, dmat->boundary, memattr); } if (*vaddr == NULL) { CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/arm/arm/pmap-v6.c Mon Aug 20 15:57:27 2018 (r338107) @@ -2219,9 +2219,8 @@ pmap_pinit(pmap_t pmap) */ if (pmap->pm_pt1 == NULL) { - pmap->pm_pt1 = (pt1_entry_t *)kmem_alloc_contig(kernel_arena, - NB_IN_PT1, M_NOWAIT | M_ZERO, 0, -1UL, NB_IN_PT1, 0, - pt_memattr); + pmap->pm_pt1 = (pt1_entry_t *)kmem_alloc_contig(NB_IN_PT1, + M_NOWAIT | M_ZERO, 0, -1UL, NB_IN_PT1, 0, pt_memattr); if (pmap->pm_pt1 == NULL) return (0); } Modified: head/sys/arm/freescale/imx/imx6_sdma.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_sdma.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/arm/freescale/imx/imx6_sdma.c Mon Aug 20 15:57:27 2018 (r338107) @@ -179,9 +179,8 @@ sdma_alloc(void) chn = i; /* Allocate area for buffer descriptors */ - channel->bd = (void *)kmem_alloc_contig(kernel_arena, - PAGE_SIZE, M_ZERO, 0, ~0, PAGE_SIZE, 0, - VM_MEMATTR_UNCACHEABLE); + channel->bd = (void *)kmem_alloc_contig(PAGE_SIZE, M_ZERO, 0, ~0, + PAGE_SIZE, 0, VM_MEMATTR_UNCACHEABLE); return (chn); } @@ -392,8 +391,8 @@ boot_firmware(struct sdma_softc *sc) sz = SDMA_N_CHANNELS * sizeof(struct sdma_channel_control) + \ sizeof(struct sdma_context_data); - sc->ccb = (void *)kmem_alloc_contig(kernel_arena, - sz, M_ZERO, 0, ~0, PAGE_SIZE, 0, VM_MEMATTR_UNCACHEABLE); + sc->ccb = (void *)kmem_alloc_contig(sz, M_ZERO, 0, ~0, PAGE_SIZE, 0, + VM_MEMATTR_UNCACHEABLE); sc->ccb_phys = vtophys(sc->ccb); sc->context = (void *)((char *)sc->ccb + \ @@ -411,9 +410,8 @@ boot_firmware(struct sdma_softc *sc) /* Channel 0 is used for booting firmware */ chn = 0; - sc->bd0 = (void *)kmem_alloc_contig(kernel_arena, - PAGE_SIZE, M_ZERO, 0, ~0, PAGE_SIZE, 0, - VM_MEMATTR_UNCACHEABLE); + sc->bd0 = (void *)kmem_alloc_contig(PAGE_SIZE, M_ZERO, 0, ~0, PAGE_SIZE, + 0, VM_MEMATTR_UNCACHEABLE); bd0 = sc->bd0; sc->ccb[chn].base_bd_ptr = vtophys(bd0); sc->ccb[chn].current_bd_ptr = vtophys(bd0); Modified: head/sys/arm/nvidia/drm2/tegra_dc.c ============================================================================== --- head/sys/arm/nvidia/drm2/tegra_dc.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/arm/nvidia/drm2/tegra_dc.c Mon Aug 20 15:57:27 2018 (r338107) @@ -1234,9 +1234,9 @@ dc_init_client(device_t dev, device_t host1x, struct t } /* allocate memory for cursor cache */ - sc->tegra_crtc.cursor_vbase = kmem_alloc_contig(kernel_arena, - 256 * 256 * 4, M_WAITOK | M_ZERO, - 0, -1UL, PAGE_SIZE, 0, VM_MEMATTR_WRITE_COMBINING); + sc->tegra_crtc.cursor_vbase = kmem_alloc_contig(256 * 256 * 4, + M_WAITOK | M_ZERO, 0, -1UL, PAGE_SIZE, 0, + VM_MEMATTR_WRITE_COMBINING); sc->tegra_crtc.cursor_pbase = vtophys(sc->tegra_crtc.cursor_vbase); return (0); } Modified: head/sys/arm/nvidia/tegra_pcie.c ============================================================================== --- head/sys/arm/nvidia/tegra_pcie.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/arm/nvidia/tegra_pcie.c Mon Aug 20 15:57:27 2018 (r338107) @@ -1395,8 +1395,8 @@ tegra_pcib_attach_msi(device_t dev) sc = device_get_softc(dev); - sc->msi_page = kmem_alloc_contig(kernel_arena, PAGE_SIZE, M_WAITOK, - 0, BUS_SPACE_MAXADDR, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + sc->msi_page = kmem_alloc_contig(PAGE_SIZE, M_WAITOK, 0, + BUS_SPACE_MAXADDR, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); /* MSI BAR */ tegra_pcib_set_bar(sc, 9, vtophys(sc->msi_page), vtophys(sc->msi_page), Modified: head/sys/arm/nvidia/tegra_xhci.c ============================================================================== --- head/sys/arm/nvidia/tegra_xhci.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/arm/nvidia/tegra_xhci.c Mon Aug 20 15:57:27 2018 (r338107) @@ -808,8 +808,8 @@ load_fw(struct tegra_xhci_softc *sc) fw_hdr = (const struct tegra_xusb_fw_hdr *)fw->data; fw_size = fw_hdr->fwimg_len; - fw_vaddr = kmem_alloc_contig(kernel_arena, fw_size, - M_WAITOK, 0, -1UL, PAGE_SIZE, 0, VM_MEMATTR_UNCACHEABLE); + fw_vaddr = kmem_alloc_contig(fw_size, M_WAITOK, 0, -1UL, PAGE_SIZE, 0, + VM_MEMATTR_UNCACHEABLE); fw_paddr = vtophys(fw_vaddr); fw_hdr = (const struct tegra_xusb_fw_hdr *)fw_vaddr; memcpy((void *)fw_vaddr, fw->data, fw_size); Modified: head/sys/arm/samsung/exynos/exynos5_fimd.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_fimd.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/arm/samsung/exynos/exynos5_fimd.c Mon Aug 20 15:57:27 2018 (r338107) @@ -356,8 +356,8 @@ fimd_attach(device_t dev) sc->sc_info.fb_stride = sc->sc_info.fb_width * 2; sc->sc_info.fb_bpp = sc->sc_info.fb_depth = 16; sc->sc_info.fb_size = sc->sc_info.fb_height * sc->sc_info.fb_stride; - sc->sc_info.fb_vbase = (intptr_t)kmem_alloc_contig(kernel_arena, - sc->sc_info.fb_size, M_ZERO, 0, ~0, PAGE_SIZE, 0, VM_MEMATTR_UNCACHEABLE); + sc->sc_info.fb_vbase = (intptr_t)kmem_alloc_contig(sc->sc_info.fb_size, + M_ZERO, 0, ~0, PAGE_SIZE, 0, VM_MEMATTR_UNCACHEABLE); sc->sc_info.fb_pbase = (intptr_t)vtophys(sc->sc_info.fb_vbase); #if 0 Modified: head/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- head/sys/arm64/arm64/busdma_bounce.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/arm64/arm64/busdma_bounce.c Mon Aug 20 15:57:27 2018 (r338107) @@ -495,10 +495,9 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vad 0ul, dmat->common.lowaddr, attr); dmat->bounce_flags |= BF_KMEM_ALLOC; } else { - *vaddr = (void *)kmem_alloc_contig(kernel_arena, - dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr, - dmat->common.alignment != 0 ? dmat->common.alignment : 1ul, - dmat->common.boundary, attr); + *vaddr = (void *)kmem_alloc_contig(dmat->common.maxsize, mflags, + 0ul, dmat->common.lowaddr, dmat->common.alignment != 0 ? + dmat->common.alignment : 1ul, dmat->common.boundary, attr); dmat->bounce_flags |= BF_KMEM_ALLOC; } if (*vaddr == NULL) { Modified: head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Mon Aug 20 15:57:27 2018 (r338107) @@ -134,8 +134,8 @@ dma_alloc_coherent(struct device *dev, size_t size, dm else high = BUS_SPACE_MAXADDR; align = PAGE_SIZE << get_order(size); - mem = (void *)kmem_alloc_contig(kmem_arena, size, flag, 0, high, align, - 0, VM_MEMATTR_DEFAULT); + mem = (void *)kmem_alloc_contig(size, flag, 0, high, align, 0, + VM_MEMATTR_DEFAULT); if (mem) *dma_handle = vtophys(mem); else Modified: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_page.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Mon Aug 20 15:57:27 2018 (r338107) @@ -167,9 +167,8 @@ linux_alloc_kmem(gfp_t flags, unsigned int order) if ((flags & GFP_DMA32) == 0) { addr = kmem_malloc(kmem_arena, size, flags & GFP_NATIVE_MASK); } else { - addr = kmem_alloc_contig(kmem_arena, size, - flags & GFP_NATIVE_MASK, 0, BUS_SPACE_MAXADDR_32BIT, - PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + addr = kmem_alloc_contig(size, flags & GFP_NATIVE_MASK, 0, + BUS_SPACE_MAXADDR_32BIT, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); } return (addr); } Modified: head/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- head/sys/compat/ndis/subr_ntoskrnl.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/compat/ndis/subr_ntoskrnl.c Mon Aug 20 15:57:27 2018 (r338107) @@ -2491,8 +2491,8 @@ MmAllocateContiguousMemorySpecifyCache(size, lowest, h break; } - ret = (void *)kmem_alloc_contig(kernel_arena, size, M_ZERO | M_NOWAIT, - lowest, highest, PAGE_SIZE, boundary, memattr); + ret = (void *)kmem_alloc_contig(size, M_ZERO | M_NOWAIT, lowest, + highest, PAGE_SIZE, boundary, memattr); if (ret != NULL) malloc_type_allocated(M_DEVBUF, round_page(size)); return (ret); Modified: head/sys/dev/agp/agp.c ============================================================================== --- head/sys/dev/agp/agp.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/dev/agp/agp.c Mon Aug 20 15:57:27 2018 (r338107) @@ -154,9 +154,9 @@ agp_alloc_gatt(device_t dev) return 0; gatt->ag_entries = entries; - gatt->ag_virtual = (void *)kmem_alloc_contig(kernel_arena, - entries * sizeof(u_int32_t), M_NOWAIT | M_ZERO, 0, ~0, PAGE_SIZE, - 0, VM_MEMATTR_WRITE_COMBINING); + gatt->ag_virtual = (void *)kmem_alloc_contig(entries * + sizeof(u_int32_t), M_NOWAIT | M_ZERO, 0, ~0, PAGE_SIZE, 0, + VM_MEMATTR_WRITE_COMBINING); if (!gatt->ag_virtual) { if (bootverbose) device_printf(dev, "contiguous allocation failed\n"); Modified: head/sys/dev/agp/agp_i810.c ============================================================================== --- head/sys/dev/agp/agp_i810.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/dev/agp/agp_i810.c Mon Aug 20 15:57:27 2018 (r338107) @@ -1189,9 +1189,8 @@ agp_i810_install_gatt(device_t dev) sc->dcache_size = 0; /* According to the specs the gatt on the i810 must be 64k. */ - sc->gatt->ag_virtual = (void *)kmem_alloc_contig(kernel_arena, - 64 * 1024, M_NOWAIT | M_ZERO, 0, ~0, PAGE_SIZE, - 0, VM_MEMATTR_WRITE_COMBINING); + sc->gatt->ag_virtual = (void *)kmem_alloc_contig(64 * 1024, M_NOWAIT | + M_ZERO, 0, ~0, PAGE_SIZE, 0, VM_MEMATTR_WRITE_COMBINING); if (sc->gatt->ag_virtual == NULL) { if (bootverbose) device_printf(dev, "contiguous allocation failed\n"); Modified: head/sys/dev/liquidio/lio_network.h ============================================================================== --- head/sys/dev/liquidio/lio_network.h Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/dev/liquidio/lio_network.h Mon Aug 20 15:57:27 2018 (r338107) @@ -198,8 +198,8 @@ lio_dma_alloc(size_t size, vm_paddr_t *dma_handle) void *mem; align = PAGE_SIZE << lio_get_order(size); - mem = (void *)kmem_alloc_contig(kmem_arena, size, M_WAITOK, 0, ~0ul, - align, 0, VM_MEMATTR_DEFAULT); + mem = (void *)kmem_alloc_contig(size, M_WAITOK, 0, ~0ul, align, 0, + VM_MEMATTR_DEFAULT); if (mem != NULL) *dma_handle = vtophys(mem); else Modified: head/sys/dev/xdma/controller/pl330.c ============================================================================== --- head/sys/dev/xdma/controller/pl330.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/dev/xdma/controller/pl330.c Mon Aug 20 15:57:27 2018 (r338107) @@ -392,8 +392,8 @@ pl330_channel_alloc(device_t dev, struct xdma_channel chan->sc = sc; chan->used = 1; - chan->ibuf = (void *)kmem_alloc_contig(kernel_arena, - PAGE_SIZE*8, M_ZERO, 0, ~0, PAGE_SIZE, 0, + chan->ibuf = (void *)kmem_alloc_contig(PAGE_SIZE * 8, + M_ZERO, 0, ~0, PAGE_SIZE, 0, VM_MEMATTR_UNCACHEABLE); chan->ibuf_phys = vtophys(chan->ibuf); Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/kern/kern_malloc.c Mon Aug 20 15:57:27 2018 (r338107) @@ -443,8 +443,8 @@ contigmalloc(unsigned long size, struct malloc_type *t { void *ret; - ret = (void *)kmem_alloc_contig(kernel_arena, size, flags, low, high, - alignment, boundary, VM_MEMATTR_DEFAULT); + ret = (void *)kmem_alloc_contig(size, flags, low, high, alignment, + boundary, VM_MEMATTR_DEFAULT); if (ret != NULL) malloc_type_allocated(type, round_page(size)); return (ret); Modified: head/sys/mips/ingenic/jz4780_lcd.c ============================================================================== --- head/sys/mips/ingenic/jz4780_lcd.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/mips/ingenic/jz4780_lcd.c Mon Aug 20 15:57:27 2018 (r338107) @@ -115,8 +115,8 @@ static struct resource_spec jzlcd_spec[] = { static int jzlcd_allocfb(struct jzlcd_softc *sc) { - sc->vaddr = kmem_alloc_contig(kernel_arena, sc->fbsize, - M_NOWAIT | M_ZERO, 0, ~0, FB_ALIGN, 0, VM_MEMATTR_WRITE_COMBINING); + sc->vaddr = kmem_alloc_contig(sc->fbsize, M_NOWAIT | M_ZERO, 0, ~0, + FB_ALIGN, 0, VM_MEMATTR_WRITE_COMBINING); if (sc->vaddr == 0) { device_printf(sc->dev, "failed to allocate FB memory\n"); return (ENOMEM); Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/mips/mips/busdma_machdep.c Mon Aug 20 15:57:27 2018 (r338107) @@ -717,9 +717,8 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddrp, in vaddr = (void *)kmem_alloc_attr(dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { - vaddr = (void *)kmem_alloc_contig(kernel_arena, dmat->maxsize, - mflags, 0, dmat->lowaddr, dmat->alignment, dmat->boundary, - memattr); + vaddr = (void *)kmem_alloc_contig(dmat->maxsize, mflags, 0, + dmat->lowaddr, dmat->alignment, dmat->boundary, memattr); } if (vaddr == NULL) { _busdma_free_dmamap(newmap); Modified: head/sys/powerpc/powerpc/busdma_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/busdma_machdep.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/powerpc/powerpc/busdma_machdep.c Mon Aug 20 15:57:27 2018 (r338107) @@ -542,9 +542,9 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int * multi-seg allocations yet though. * XXX Certain AGP hardware does. */ - *vaddr = (void *)kmem_alloc_contig(kmem_arena, dmat->maxsize, - mflags, 0ul, dmat->lowaddr, dmat->alignment ? - dmat->alignment : 1ul, dmat->boundary, attr); + *vaddr = (void *)kmem_alloc_contig(dmat->maxsize, mflags, 0ul, + dmat->lowaddr, dmat->alignment ? dmat->alignment : 1ul, + dmat->boundary, attr); (*mapp)->contigalloc = 1; } if (*vaddr == NULL) { Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/vm/vm_extern.h Mon Aug 20 15:57:27 2018 (r338107) @@ -58,7 +58,7 @@ vm_offset_t kmem_alloc_attr(vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr); vm_offset_t kmem_alloc_attr_domain(int domain, vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr); -vm_offset_t kmem_alloc_contig(struct vmem *, vm_size_t size, int flags, +vm_offset_t kmem_alloc_contig(vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, vm_memattr_t memattr); vm_offset_t kmem_alloc_contig_domain(int domain, vm_size_t size, int flags, Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/vm/vm_kern.c Mon Aug 20 15:57:27 2018 (r338107) @@ -304,16 +304,12 @@ retry: } vm_offset_t -kmem_alloc_contig(struct vmem *vmem, vm_size_t size, int flags, vm_paddr_t low, - vm_paddr_t high, u_long alignment, vm_paddr_t boundary, - vm_memattr_t memattr) +kmem_alloc_contig(vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, + u_long alignment, vm_paddr_t boundary, vm_memattr_t memattr) { struct vm_domainset_iter di; vm_offset_t addr; int domain; - - KASSERT(vmem == kernel_arena, - ("kmem_alloc_contig: Only kernel_arena is supported.")); vm_domainset_iter_malloc_init(&di, kernel_object, &domain, &flags); do { Modified: head/sys/x86/iommu/intel_intrmap.c ============================================================================== --- head/sys/x86/iommu/intel_intrmap.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/x86/iommu/intel_intrmap.c Mon Aug 20 15:57:27 2018 (r338107) @@ -338,7 +338,7 @@ dmar_init_irt(struct dmar_unit *unit) return (0); } unit->irte_cnt = clp2(NUM_IO_INTS); - unit->irt = (dmar_irte_t *)(uintptr_t)kmem_alloc_contig(kernel_arena, + 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) ? VM_MEMATTR_DEFAULT : VM_MEMATTR_UNCACHEABLE); Modified: head/sys/x86/iommu/intel_qi.c ============================================================================== --- head/sys/x86/iommu/intel_qi.c Mon Aug 20 15:43:08 2018 (r338106) +++ head/sys/x86/iommu/intel_qi.c Mon Aug 20 15:57:27 2018 (r338107) @@ -398,8 +398,8 @@ dmar_init_qi(struct dmar_unit *unit) unit->inv_queue_avail = unit->inv_queue_size - DMAR_IQ_DESCR_SZ; /* The invalidation queue reads by DMARs are always coherent. */ - unit->inv_queue = kmem_alloc_contig(kernel_arena, unit->inv_queue_size, - M_WAITOK | M_ZERO, 0, dmar_high, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + unit->inv_queue = kmem_alloc_contig(unit->inv_queue_size, M_WAITOK | + M_ZERO, 0, dmar_high, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); unit->inv_waitd_seq_hw_phys = pmap_kextract( (vm_offset_t)&unit->inv_waitd_seq_hw); From owner-svn-src-head@freebsd.org Mon Aug 20 16:00: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 84F3210734D7; Mon, 20 Aug 2018 16:00:24 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (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 ECCFD73D86; Mon, 20 Aug 2018 16:00:23 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id o18-v6so49024wmc.0; Mon, 20 Aug 2018 09:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:subject:to:references:openpgp:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3IAWiMEvPmbBFhA5N/3mKSf3uANnW6WuGH//hNv9uQE=; b=tsd8W7b5u7Jg4WqZFyIySlBFBJqw1xSdQZMWtiOZ+rKmPY3NrnducMV7W0v6cPUF0A yNnM8zubviZUpI3NWf2kH9fV6DONnop6odrQjfuNJifNtikBZahCHKe3CkbMb83KH4Wu WWvgGL+jcqJm3Dt0gFNKXq7xC+vRmFEa5rA6OcaPzPzDQVsg5wSxNChXEu33fpSayFJk dMlRdV6xE/pQpZ2SNjjpQHE7PLWOLYEgV2XbMIOaABPosq1oJJqttiUjh4XlJDAoTbQM nTDDRJv11qGZkye7ao+oK32eJrkER/oMrvXl8spKhCx7KjTUl/1zD/XYUFdG1OdiclIo Ns0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:subject:to:references:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=3IAWiMEvPmbBFhA5N/3mKSf3uANnW6WuGH//hNv9uQE=; b=RhzU0ngCPmC2MBTF24qSLVtksLrrf5iuc/glWQOR62tsKq/x9jGQX2fF4mwgfZxPq4 zgapAF9TPiCHY85ACq1Bw1pBuYidR7ELWJ7olP+vbVePZsG82baOuGSBAEIwNpiwf+Eg rm2gEC84EfZlUFDGZyc7aWf0597uHiFRajPJQc9b+Css2q8kTLIzmKT02pAyVSsxEFbT MbsBywQuHA6bcz3O7B98gBVFxbIGPqSe4BFFGrBQsU4+qltwhjBGsRlssNV3eI73ue5B CfbABkw4ftQ4dZ1EvzsKcgh1KanaVVecwt5JDFeFm1eBKg7d3ClJxljNfQ1ybc4mCnBF Aepg== X-Gm-Message-State: AOUpUlH2E1HLKYBnGiM2+3xFYE9gJc5JN6QVZEx0Mwwjr2W85yQT6C7A BjYrnh5YIe2gBr1w8ezI1/+f90lqMuI= X-Google-Smtp-Source: AA+uWPyP6lT6Kc15D5z5YUAhON7swO/uUwkv6v+ZLv7GuMkVhUlxLbRCHyj3ENiQGjaAFONmaE8gww== X-Received: by 2002:a1c:c3c6:: with SMTP id t189-v6mr24521743wmf.59.1534780822710; Mon, 20 Aug 2018 09:00:22 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id y17-v6sm460527wrm.61.2018.08.20.09.00.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Aug 2018 09:00:21 -0700 (PDT) From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: svn commit: r337978 - in head/libexec/rtld-elf: . aarch64 arm mips powerpc powerpc64 riscv To: Brooks Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808171619.w7HGJlZe015255@repo.freebsd.org> Openpgp: preference=signencrypt Autocrypt: addr=mmel@freebsd.org; prefer-encrypt=mutual; keydata= xsBNBFYuVRkBCADZiwLCCne3wG9b9k+R2Neo5zVo2bLaZRfNNY/v9kg283i0sb1Da4EdEiNT 15El5UyozhphUIbIR/zrVpxF1TvvFdoCyzx6a68bNY2d9dBrDcNDZC+XnyDdHQoobN87DWT1 mRVkmbg9LHZ/SVUOkGYuWyE+8UYeDAcUizuXwSK5zFWmeTyIoWNa68ifrWLfQe0p4x5jC/AI VURCi17p360vU4fhgwoMvEEhrRBWCr4DYHToFjIt2WdBy3GR1qoO0+Xkd6G+OoBULo+XDfgu L2WdPvh0K69F9/LgHkMmG5Il7SCe62QGpG2vaCgRV7BQhLX+kxlvM+WrdRatWRml4Y/3ABEB AAHNIE1pY2hhbCBNZWxvdW4gPG1tZWxAZnJlZWJzZC5vcmc+wsCABBMBCgAqAhsDBQsJCAcD BRUKCQgLBRYDAgEAAh4BAheAAhkBBQJZjBHDBQkHICOqAAoJEGkesmtexaqqIKMIAJ9xTp1w ge86ns2ZYOac5++mAgpFatohSlxYUR3gwud3Y3Ej0eumavpv/C26N6dsLnspwRenKdLbIPKe 0N8lI7CcDBIJGiFyY3c4H79QjIkYpRgbWFyCM85zEyVJpB+U7BhsgXE2uwVjE9RNhEP0KBoj sp357uqq1B1+VUO4GJ+RjdmYSOcNrjR8tTfy02456qovGjJ4JcJBlhyK6GzBKvnZSoA0s+QP OMn3gd8gdomMLEJdS3kTsfhLh2rQPZa9EmzafIyjXrirWq4+4fVFgd8SiMZyyTM+Kz30ZSUe 6SmfaQTQ/WLRIl5jku2uYQWlrRIKT9xaQzRWtZO9UgtXFRHOwE0EVi5VGQEIALqgRkfS21D/ OqWE9mXfh2bIjrp9uC8T0MCuimbsrAdLKNNorGu2nE+rebgX8n5nYM377HOnalPGyOuXvCbQ 8MFVRdWOHxenJjXJialNdBsOf2wLva3vSSVsdoPzibWDIcJqhBOQ3EuhsILyWSPvYYKEiy95 mfhrDtuTTOAYVR9aNQBOENztB2TDJyMx/qZmtGroGV3N0Hqde/znHPtQO8RG5/FQGMfHMI5G FMuycr1ceHnLo/ovrqAl4TYV+UHSHJ+FDE9dt9wXHclWbWbC0yNugchZq6rho5Jjfv4a2v7P pyn3HoDinh1lWP7hYA0ZNExGHekLnXWVqO/lzGS6bMEAEQEAAcLAZQQYAQoADwIbDAUCWYwR wwUJByAjqgAKCRBpHrJrXsWqqrsrB/4g4ESK5TLxUxi8pLWcLPyvwtN4Fmf7VsCVefkhakaG rDPmfvfnG+OFwN60Xqoni7GBeakl01xwT4RINfvVfShDy6cHpLS7QL/M8pzfulVX38MkVkOD yGZhwjE+jyT/kZNA1Olaw3N3IefHq3brskQ7G4d9oPep2DDbw7C4Q76uOBjxy34JVB0WOsB6 NyMQB9h6LGljQtdEddyUqwnRZzzHiGvp0hPtdYQHQZlqbj4FV9lTRK7a8Ega+y7MgmeMiztG zeXyjNP02r3PRHCPagwa57bPxH2aAh4Q7UzBBZ0GTMm7DLKNtCP58WDxblrrhZ+7kHqGK8Fs bdeUpDdEYLVd Message-ID: <29d939de-108e-c7c4-b4b6-4a7772dca2eb@freebsd.org> Date: Mon, 20 Aug 2018 18:00:21 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <201808171619.w7HGJlZe015255@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 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, 20 Aug 2018 16:00:24 -0000 On 17.08.2018 18:19, 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. > > Submitted by: James Clarke > Reviewed by: kbowling > Testing byL kbowling (powerpc64), br (riscv), kevans (armv7) > Obtained from: CheriBSD > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D16510 > > Modified: > head/libexec/rtld-elf/aarch64/rtld_machdep.h > head/libexec/rtld-elf/arm/rtld_machdep.h > head/libexec/rtld-elf/mips/rtld_machdep.h > head/libexec/rtld-elf/powerpc/rtld_machdep.h > head/libexec/rtld-elf/powerpc64/rtld_machdep.h > head/libexec/rtld-elf/riscv/rtld_machdep.h > head/libexec/rtld-elf/rtld.c > This commit breaks TLS handling for (at least) armv7. Can you please revert it until I will be able to identify where is problem? In my case, the libc _ThreadRuneLocale symbol is not zero on program start. Thanks, Michal > Modified: head/libexec/rtld-elf/aarch64/rtld_machdep.h > ============================================================================== > --- head/libexec/rtld-elf/aarch64/rtld_machdep.h Fri Aug 17 16:07:06 2018 (r337977) > +++ head/libexec/rtld-elf/aarch64/rtld_machdep.h Fri Aug 17 16:19:47 2018 (r337978) > @@ -69,6 +69,8 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr targe > #define calculate_tls_offset(prev_offset, prev_size, size, align) \ > round(prev_offset + prev_size, align) > #define calculate_tls_end(off, size) ((off) + (size)) > +#define calculate_tls_post_size(align) \ > + round(TLS_TCB_SIZE, align) - TLS_TCB_SIZE > > #define TLS_TCB_SIZE 16 > typedef struct { > > Modified: head/libexec/rtld-elf/arm/rtld_machdep.h > ============================================================================== > --- head/libexec/rtld-elf/arm/rtld_machdep.h Fri Aug 17 16:07:06 2018 (r337977) > +++ head/libexec/rtld-elf/arm/rtld_machdep.h Fri Aug 17 16:19:47 2018 (r337978) > @@ -69,6 +69,8 @@ typedef struct { > #define calculate_tls_offset(prev_offset, prev_size, size, align) \ > round(prev_offset + prev_size, align) > #define calculate_tls_end(off, size) ((off) + (size)) > +#define calculate_tls_post_size(align) \ > + round(TLS_TCB_SIZE, align) - TLS_TCB_SIZE > > extern void *__tls_get_addr(tls_index *ti); > > > Modified: head/libexec/rtld-elf/mips/rtld_machdep.h > ============================================================================== > --- head/libexec/rtld-elf/mips/rtld_machdep.h Fri Aug 17 16:07:06 2018 (r337977) > +++ head/libexec/rtld-elf/mips/rtld_machdep.h Fri Aug 17 16:19:47 2018 (r337978) > @@ -64,10 +64,11 @@ typedef struct { > #define round(size, align) \ > (((size) + (align) - 1) & ~((align) - 1)) > #define calculate_first_tls_offset(size, align) \ > - round(TLS_TCB_SIZE, align) > + TLS_TCB_SIZE > #define calculate_tls_offset(prev_offset, prev_size, size, align) \ > round(prev_offset + prev_size, align) > #define calculate_tls_end(off, size) ((off) + (size)) > +#define calculate_tls_post_size(align) 0 > > extern void *__tls_get_addr(tls_index *ti); > > > Modified: head/libexec/rtld-elf/powerpc/rtld_machdep.h > ============================================================================== > --- head/libexec/rtld-elf/powerpc/rtld_machdep.h Fri Aug 17 16:07:06 2018 (r337977) > +++ head/libexec/rtld-elf/powerpc/rtld_machdep.h Fri Aug 17 16:19:47 2018 (r337978) > @@ -74,10 +74,11 @@ void _rtld_powerpc_pltcall(void); > #define round(size, align) \ > (((size) + (align) - 1) & ~((align) - 1)) > #define calculate_first_tls_offset(size, align) \ > - round(8, align) > + TLS_TCB_SIZE > #define calculate_tls_offset(prev_offset, prev_size, size, align) \ > round(prev_offset + prev_size, align) > #define calculate_tls_end(off, size) ((off) + (size)) > +#define calculate_tls_post_size(align) 0 > > typedef struct { > unsigned long ti_module; > > Modified: head/libexec/rtld-elf/powerpc64/rtld_machdep.h > ============================================================================== > --- head/libexec/rtld-elf/powerpc64/rtld_machdep.h Fri Aug 17 16:07:06 2018 (r337977) > +++ head/libexec/rtld-elf/powerpc64/rtld_machdep.h Fri Aug 17 16:19:47 2018 (r337978) > @@ -66,10 +66,11 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr targe > #define round(size, align) \ > (((size) + (align) - 1) & ~((align) - 1)) > #define calculate_first_tls_offset(size, align) \ > - round(16, align) > + TLS_TCB_SIZE > #define calculate_tls_offset(prev_offset, prev_size, size, align) \ > round(prev_offset + prev_size, align) > #define calculate_tls_end(off, size) ((off) + (size)) > +#define calculate_tls_post_size(align) 0 > > typedef struct { > unsigned long ti_module; > > Modified: head/libexec/rtld-elf/riscv/rtld_machdep.h > ============================================================================== > --- head/libexec/rtld-elf/riscv/rtld_machdep.h Fri Aug 17 16:07:06 2018 (r337977) > +++ head/libexec/rtld-elf/riscv/rtld_machdep.h Fri Aug 17 16:19:47 2018 (r337978) > @@ -89,10 +89,11 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr targe > #define round(size, align) \ > (((size) + (align) - 1) & ~((align) - 1)) > #define calculate_first_tls_offset(size, align) \ > - round(16, align) > + TLS_TCB_SIZE > #define calculate_tls_offset(prev_offset, prev_size, size, align) \ > round(prev_offset + prev_size, align) > #define calculate_tls_end(off, size) ((off) + (size)) > +#define calculate_tls_post_size(align) 0 > > typedef struct { > unsigned long ti_module; > > Modified: head/libexec/rtld-elf/rtld.c > ============================================================================== > --- head/libexec/rtld-elf/rtld.c Fri Aug 17 16:07:06 2018 (r337977) > +++ head/libexec/rtld-elf/rtld.c Fri Aug 17 16:19:47 2018 (r337978) > @@ -4693,47 +4693,87 @@ tls_get_addr_common(Elf_Addr **dtvp, int index, size_t > defined(__powerpc__) || defined(__riscv) > > /* > + * Return pointer to allocated TLS block > + */ > +static void * > +get_tls_block_ptr(void *tcb, size_t tcbsize) > +{ > + size_t extra_size, post_size, pre_size, tls_block_size; > + size_t tls_init_align; > + > + tls_init_align = MAX(obj_main->tlsalign, 1); > + > + /* Compute fragments sizes. */ > + extra_size = tcbsize - TLS_TCB_SIZE; > + post_size = calculate_tls_post_size(tls_init_align); > + tls_block_size = tcbsize + post_size; > + pre_size = roundup2(tls_block_size, tls_init_align) - tls_block_size; > + > + return ((char *)tcb - pre_size - extra_size); > +} > + > +/* > * Allocate Static TLS using the Variant I method. > + * > + * For details on the layout, see lib/libc/gen/tls.c. > + * > + * NB: rtld's tls_static_space variable includes TLS_TCB_SIZE and post_size as > + * it is based on tls_last_offset, and TLS offsets here are really TCB > + * offsets, whereas libc's tls_static_space is just the executable's static > + * TLS segment. > */ > void * > allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) > { > Obj_Entry *obj; > - char *tcb; > - Elf_Addr **tls; > - Elf_Addr *dtv; > + char *tls_block; > + Elf_Addr *dtv, **tcb; > Elf_Addr addr; > int i; > + size_t extra_size, maxalign, post_size, pre_size, tls_block_size; > + size_t tls_init_align; > > if (oldtcb != NULL && tcbsize == TLS_TCB_SIZE) > return (oldtcb); > > assert(tcbsize >= TLS_TCB_SIZE); > - tcb = xcalloc(1, tls_static_space - TLS_TCB_SIZE + tcbsize); > - tls = (Elf_Addr **)(tcb + tcbsize - TLS_TCB_SIZE); > + maxalign = MAX(tcbalign, tls_static_max_align); > + tls_init_align = MAX(obj_main->tlsalign, 1); > > + /* Compute fragmets sizes. */ > + extra_size = tcbsize - TLS_TCB_SIZE; > + post_size = calculate_tls_post_size(tls_init_align); > + tls_block_size = tcbsize + post_size; > + pre_size = roundup2(tls_block_size, tls_init_align) - tls_block_size; > + tls_block_size += pre_size + tls_static_space - TLS_TCB_SIZE - post_size; > + > + /* Allocate whole TLS block */ > + tls_block = malloc_aligned(tls_block_size, maxalign); > + tcb = (Elf_Addr **)(tls_block + pre_size + extra_size); > + > if (oldtcb != NULL) { > - memcpy(tls, oldtcb, tls_static_space); > - free(oldtcb); > + memcpy(tls_block, get_tls_block_ptr(oldtcb, tcbsize), > + tls_static_space); > + free_aligned(get_tls_block_ptr(oldtcb, tcbsize)); > > /* Adjust the DTV. */ > - dtv = tls[0]; > + dtv = tcb[0]; > for (i = 0; i < dtv[1]; i++) { > if (dtv[i+2] >= (Elf_Addr)oldtcb && > dtv[i+2] < (Elf_Addr)oldtcb + tls_static_space) { > - dtv[i+2] = dtv[i+2] - (Elf_Addr)oldtcb + (Elf_Addr)tls; > + dtv[i+2] = dtv[i+2] - (Elf_Addr)oldtcb + (Elf_Addr)tcb; > } > } > } else { > dtv = xcalloc(tls_max_index + 2, sizeof(Elf_Addr)); > - tls[0] = dtv; > + tcb[0] = dtv; > dtv[0] = tls_dtv_generation; > dtv[1] = tls_max_index; > > for (obj = globallist_curr(objs); obj != NULL; > obj = globallist_next(obj)) { > if (obj->tlsoffset > 0) { > - addr = (Elf_Addr)tls + obj->tlsoffset; > + addr = (Elf_Addr)tcb + obj->tlsoffset; > if (obj->tlsinitsize > 0) > memcpy((void*) addr, obj->tlsinit, obj->tlsinitsize); > if (obj->tlssize > obj->tlsinitsize) > @@ -4752,14 +4792,19 @@ free_tls(void *tcb, size_t tcbsize, size_t tcbalign) > { > Elf_Addr *dtv; > Elf_Addr tlsstart, tlsend; > - int dtvsize, i; > + size_t post_size; > + size_t dtvsize, i, tls_init_align; > > assert(tcbsize >= TLS_TCB_SIZE); > + tls_init_align = MAX(obj_main->tlsalign, 1); > > - tlsstart = (Elf_Addr)tcb + tcbsize - TLS_TCB_SIZE; > - tlsend = tlsstart + tls_static_space; > + /* Compute fragments sizes. */ > + post_size = calculate_tls_post_size(tls_init_align); > > - dtv = *(Elf_Addr **)tlsstart; > + tlsstart = (Elf_Addr)tcb + TLS_TCB_SIZE + post_size; > + tlsend = (Elf_Addr)tcb + tls_static_space; > + > + dtv = *(Elf_Addr **)tcb; > dtvsize = dtv[1]; > for (i = 0; i < dtvsize; i++) { > if (dtv[i+2] && (dtv[i+2] < tlsstart || dtv[i+2] >= tlsend)) { > @@ -4767,7 +4812,7 @@ free_tls(void *tcb, size_t tcbsize, size_t tcbalign) > } > } > free(dtv); > - free(tcb); > + free_aligned(get_tls_block_ptr(tcb, tcbsize)); > } > > #endif > From owner-svn-src-head@freebsd.org Mon Aug 20 16:02: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 DB4031073896; Mon, 20 Aug 2018 16:02:22 +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 8F81F74255; Mon, 20 Aug 2018 16:02:22 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.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)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 3B25023331; Mon, 20 Aug 2018 16:02:22 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf1-f43.google.com with SMTP id f135-v6so11288003lfg.10; Mon, 20 Aug 2018 09:02:22 -0700 (PDT) X-Gm-Message-State: AOUpUlE0OHe3vAG4sP8PVGt566k51wdggKG39QSYCfHPPrjy7Oe4s6Np 6xsVpcg9rHlrjDN5VTltqI3qDL/MeUDArf/EgA8= X-Google-Smtp-Source: AA+uWPyb4RWJE8QBd9h4HRWp3w+m8DK/NOs+J5kRXP89h/uCtyZkAotVEKsgQOEmiAq+5alJgTQjWYdrWkqlCZk93S4= X-Received: by 2002:a19:ded7:: with SMTP id i84-v6mr14080900lfl.146.1534780941013; Mon, 20 Aug 2018 09:02:21 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Mon, 20 Aug 2018 09:02:00 -0700 (PDT) In-Reply-To: <29d939de-108e-c7c4-b4b6-4a7772dca2eb@freebsd.org> References: <201808171619.w7HGJlZe015255@repo.freebsd.org> <29d939de-108e-c7c4-b4b6-4a7772dca2eb@freebsd.org> From: Kyle Evans Date: Mon, 20 Aug 2018 11:02:00 -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: Michal Meloun Cc: Brooks Davis , 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: Mon, 20 Aug 2018 16:02:23 -0000 On Mon, Aug 20, 2018 at 11:00 AM, Michal Meloun wrote: > > > On 17.08.2018 18:19, 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. >> >> Submitted by: James Clarke >> Reviewed by: kbowling >> Testing byL kbowling (powerpc64), br (riscv), kevans (armv7) >> Obtained from: CheriBSD >> Sponsored by: DARPA, AFRL >> Differential Revision: https://reviews.freebsd.org/D16510 >> >> Modified: >> head/libexec/rtld-elf/aarch64/rtld_machdep.h >> head/libexec/rtld-elf/arm/rtld_machdep.h >> head/libexec/rtld-elf/mips/rtld_machdep.h >> head/libexec/rtld-elf/powerpc/rtld_machdep.h >> head/libexec/rtld-elf/powerpc64/rtld_machdep.h >> head/libexec/rtld-elf/riscv/rtld_machdep.h >> head/libexec/rtld-elf/rtld.c >> > This commit breaks TLS handling for (at least) armv7. Can you please > revert it until I will be able to identify where is problem? > In my case, the libc _ThreadRuneLocale symbol is not zero on program start. > Interesting that I didn't hit this on my armv7 test Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Mon Aug 20 16:44: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 E99C710755D0; Mon, 20 Aug 2018 16:44:10 +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 9488276B2A; Mon, 20 Aug 2018 16:44:10 +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 746B317EC7; Mon, 20 Aug 2018 16:44:10 +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 w7KGiAto090969; Mon, 20 Aug 2018 16:44:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KGiAwR090966; Mon, 20 Aug 2018 16:44:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201808201644.w7KGiAwR090966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 20 Aug 2018 16:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338108 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 338108 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, 20 Aug 2018 16:44:11 -0000 Author: imp Date: Mon Aug 20 16:44:09 2018 New Revision: 338108 URL: https://svnweb.freebsd.org/changeset/base/338108 Log: Serial console menus for lua. Remove a bunch of special cases for UEFI and serial consoles. We do want to do curses and menu things here. This makes us match what we do in FORTH, with the possible exception of boxes around menus. Differential Revision: https://reviews.freebsd.org/D16816 Modified: head/stand/lua/core.lua head/stand/lua/screen.lua Modified: head/stand/lua/core.lua ============================================================================== --- head/stand/lua/core.lua Mon Aug 20 15:57:27 2018 (r338107) +++ head/stand/lua/core.lua Mon Aug 20 16:44:09 2018 (r338108) @@ -310,14 +310,6 @@ function core.isZFSBoot() end function core.isSerialBoot() - local c = loader.getenv("console") - - if c ~= nil then - if c:find("comconsole") ~= nil then - return true - end - end - local s = loader.getenv("boot_serial") if s ~= nil then return true @@ -336,14 +328,6 @@ end -- Is the menu skipped in the environment in which we've booted? function core.isMenuSkipped() - if core.isSerialBoot() then - return true - end - local c = string.lower(loader.getenv("console") or "") - if c:match("^efi[ ;]") ~= nil or c:match("[ ;]efi[ ;]") ~= nil then - return true - end - c = string.lower(loader.getenv("beastie_disable") or "") return c == "yes" end Modified: head/stand/lua/screen.lua ============================================================================== --- head/stand/lua/screen.lua Mon Aug 20 15:57:27 2018 (r338107) +++ head/stand/lua/screen.lua Mon Aug 20 16:44:09 2018 (r338108) @@ -38,17 +38,10 @@ screen.default_x = 0 screen.default_y = 25 function screen.clear() - if core.isSerialBoot() then - return - end printc(core.KEYSTR_CSI .. "H" .. core.KEYSTR_CSI .. "J") end function screen.setcursor(x, y) - if core.isSerialBoot() then - return - end - printc(core.KEYSTR_CSI .. y .. ";" .. x .. "H") end @@ -71,9 +64,6 @@ function screen.defcolor() end function screen.defcursor() - if core.isSerialBoot() then - return - end screen.setcursor(screen.default_x, screen.default_y) end From owner-svn-src-head@freebsd.org Mon Aug 20 18:08: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 04C401077D3A; Mon, 20 Aug 2018 18:08:04 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 4675E7A29F; Mon, 20 Aug 2018 18:08:03 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wr1-x434.google.com with SMTP id n2-v6so3242491wrw.7; Mon, 20 Aug 2018 11:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:subject:to:cc:references:openpgp:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YewQkajCbSMk3lagi+HyIFzrU/a9BwNtSzlpKyis5q0=; b=vSi0dHxv+zj3e8dUOAucHbcziqKndyg9Jo0/eiEOg2sCWRztNhsHQDwR/sCd6pGqi6 G4WYX6IXuVJu6i1tgX2+ND/R9JE+0wK+4QfMJ8C92dnJEsxM1T/2z/M4NDbb62tFvGNa fh2sUBWpXToRTwpp4NKzYZhDPRTtxqPQWOSzyJs3i8HWxhsUNMnqQl7ZYe/xlUvYXeZO DRk29i0pytEHXBWCQgKvu0tHcvYwUAE1lmLKJUHYlJdmBbIZHP7lfx2f+YH7SS6PxK+Y FddMgKz0IXk5DM0dFjZNaR8FGo9ebRJWupteznbmVss4Km8GpOmz1cfKSF6zs/vJdnG/ Kw9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:subject:to:cc:references:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=YewQkajCbSMk3lagi+HyIFzrU/a9BwNtSzlpKyis5q0=; b=mAsJn0qMP6h0P4ynvKaOusFVZUndhitPmqybLzbZJ0MSyIiIolJBXgeRSJgUClVaRV HUfbMTX3eKz8Ud/923oOHfHgor1EYMS3VKHUlSi4dYWTYnFmQEABic3HSPZLKRKzqJCM +uzrhUSa25DxfF0XtgYo/E0NxK9ZvfdDQjwqJMYl/II13Ia7l/mNJc2WJ6UBu5fxntfE HUVCUl20Y+uI2YZd/yiIHxzINZOwaD7dIHaSTP1xAlE6h/2oDr0LaD3mpipgAkinH9Oo 2wbOPkNWJ5bN6QDaYhYY5rrtL2aduBYfQ93GiG3It9PYPbXQBprSUn/frhgmK6yEMdEM cHuA== X-Gm-Message-State: APzg51At23Hs72i0oy2Zd5YkXe+FKqHDnEEhVRzm4QRGcRX913awgn9F RQfqHP9Q+qIwpu6H6mDnLrIgIshigIU= X-Google-Smtp-Source: ANB0Vdb0GpJr+SExuKLPrWZhDGr/9T37YdJwE8eWIZZ82OcDmYJf1vFo74l3agGfiX/QQZ9d6o0Tjw== X-Received: by 2002:a5d:69d1:: with SMTP id s17-v6mr5973298wrw.77.1534788481903; Mon, 20 Aug 2018 11:08:01 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id e133-v6sm320736wma.33.2018.08.20.11.08.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Aug 2018 11:08:00 -0700 (PDT) From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: svn commit: r337978 - in head/libexec/rtld-elf: . aarch64 arm mips powerpc powerpc64 riscv To: Kyle Evans Cc: Brooks Davis , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808171619.w7HGJlZe015255@repo.freebsd.org> <29d939de-108e-c7c4-b4b6-4a7772dca2eb@freebsd.org> Openpgp: preference=signencrypt Autocrypt: addr=mmel@freebsd.org; prefer-encrypt=mutual; keydata= xsBNBFYuVRkBCADZiwLCCne3wG9b9k+R2Neo5zVo2bLaZRfNNY/v9kg283i0sb1Da4EdEiNT 15El5UyozhphUIbIR/zrVpxF1TvvFdoCyzx6a68bNY2d9dBrDcNDZC+XnyDdHQoobN87DWT1 mRVkmbg9LHZ/SVUOkGYuWyE+8UYeDAcUizuXwSK5zFWmeTyIoWNa68ifrWLfQe0p4x5jC/AI VURCi17p360vU4fhgwoMvEEhrRBWCr4DYHToFjIt2WdBy3GR1qoO0+Xkd6G+OoBULo+XDfgu L2WdPvh0K69F9/LgHkMmG5Il7SCe62QGpG2vaCgRV7BQhLX+kxlvM+WrdRatWRml4Y/3ABEB AAHNIE1pY2hhbCBNZWxvdW4gPG1tZWxAZnJlZWJzZC5vcmc+wsCABBMBCgAqAhsDBQsJCAcD BRUKCQgLBRYDAgEAAh4BAheAAhkBBQJZjBHDBQkHICOqAAoJEGkesmtexaqqIKMIAJ9xTp1w ge86ns2ZYOac5++mAgpFatohSlxYUR3gwud3Y3Ej0eumavpv/C26N6dsLnspwRenKdLbIPKe 0N8lI7CcDBIJGiFyY3c4H79QjIkYpRgbWFyCM85zEyVJpB+U7BhsgXE2uwVjE9RNhEP0KBoj sp357uqq1B1+VUO4GJ+RjdmYSOcNrjR8tTfy02456qovGjJ4JcJBlhyK6GzBKvnZSoA0s+QP OMn3gd8gdomMLEJdS3kTsfhLh2rQPZa9EmzafIyjXrirWq4+4fVFgd8SiMZyyTM+Kz30ZSUe 6SmfaQTQ/WLRIl5jku2uYQWlrRIKT9xaQzRWtZO9UgtXFRHOwE0EVi5VGQEIALqgRkfS21D/ OqWE9mXfh2bIjrp9uC8T0MCuimbsrAdLKNNorGu2nE+rebgX8n5nYM377HOnalPGyOuXvCbQ 8MFVRdWOHxenJjXJialNdBsOf2wLva3vSSVsdoPzibWDIcJqhBOQ3EuhsILyWSPvYYKEiy95 mfhrDtuTTOAYVR9aNQBOENztB2TDJyMx/qZmtGroGV3N0Hqde/znHPtQO8RG5/FQGMfHMI5G FMuycr1ceHnLo/ovrqAl4TYV+UHSHJ+FDE9dt9wXHclWbWbC0yNugchZq6rho5Jjfv4a2v7P pyn3HoDinh1lWP7hYA0ZNExGHekLnXWVqO/lzGS6bMEAEQEAAcLAZQQYAQoADwIbDAUCWYwR wwUJByAjqgAKCRBpHrJrXsWqqrsrB/4g4ESK5TLxUxi8pLWcLPyvwtN4Fmf7VsCVefkhakaG rDPmfvfnG+OFwN60Xqoni7GBeakl01xwT4RINfvVfShDy6cHpLS7QL/M8pzfulVX38MkVkOD yGZhwjE+jyT/kZNA1Olaw3N3IefHq3brskQ7G4d9oPep2DDbw7C4Q76uOBjxy34JVB0WOsB6 NyMQB9h6LGljQtdEddyUqwnRZzzHiGvp0hPtdYQHQZlqbj4FV9lTRK7a8Ega+y7MgmeMiztG zeXyjNP02r3PRHCPagwa57bPxH2aAh4Q7UzBBZ0GTMm7DLKNtCP58WDxblrrhZ+7kHqGK8Fs bdeUpDdEYLVd Message-ID: Date: Mon, 20 Aug 2018 20:08:01 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 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, 20 Aug 2018 18:08:04 -0000 On 20.08.2018 18:02, Kyle Evans wrote: > On Mon, Aug 20, 2018 at 11:00 AM, Michal Meloun wrote: >> >> >> On 17.08.2018 18:19, 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. >>> >>> Submitted by: James Clarke >>> Reviewed by: kbowling >>> Testing byL kbowling (powerpc64), br (riscv), kevans (armv7) >>> Obtained from: CheriBSD >>> Sponsored by: DARPA, AFRL >>> Differential Revision: https://reviews.freebsd.org/D16510 >>> >>> Modified: >>> head/libexec/rtld-elf/aarch64/rtld_machdep.h >>> head/libexec/rtld-elf/arm/rtld_machdep.h >>> head/libexec/rtld-elf/mips/rtld_machdep.h >>> head/libexec/rtld-elf/powerpc/rtld_machdep.h >>> head/libexec/rtld-elf/powerpc64/rtld_machdep.h >>> head/libexec/rtld-elf/riscv/rtld_machdep.h >>> head/libexec/rtld-elf/rtld.c >>> >> This commit breaks TLS handling for (at least) armv7. Can you please >> revert it until I will be able to identify where is problem? >> In my case, the libc _ThreadRuneLocale symbol is not zero on program start. >> > > Interesting that I didn't hit this on my armv7 test > No idea yet. For me, it breaks all ctype (isspace()..) related function. Originally, I found that bash port gets broken. Its funny if shell takes 'a' as non-alphanumeric character, 'x' as whitespace, ... Anyway, give me a while - I need to write testcase because bas is too complex for effective debugging. This commit isn't fundamentally bad, it works for jemalloc thread local variables so I think that only some edge case (tbss handling is my candidate) is affected. Michal From owner-svn-src-head@freebsd.org Mon Aug 20 18:17: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 388451077FE1; Mon, 20 Aug 2018 18:17:51 +0000 (UTC) (envelope-from bhd@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 D8F637A778; Mon, 20 Aug 2018 18:17:50 +0000 (UTC) (envelope-from bhd@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 B787718D17; Mon, 20 Aug 2018 18:17:50 +0000 (UTC) (envelope-from bhd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KIHob2038987; Mon, 20 Aug 2018 18:17:50 GMT (envelope-from bhd@FreeBSD.org) Received: (from bhd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KIHoC5038986; Mon, 20 Aug 2018 18:17:50 GMT (envelope-from bhd@FreeBSD.org) Message-Id: <201808201817.w7KIHoC5038986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bhd set sender to bhd@FreeBSD.org using -f From: Bjoern Heidotting Date: Mon, 20 Aug 2018 18:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338110 - head/usr.sbin/jail X-SVN-Group: head X-SVN-Commit-Author: bhd X-SVN-Commit-Paths: head/usr.sbin/jail X-SVN-Commit-Revision: 338110 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, 20 Aug 2018 18:17:51 -0000 Author: bhd (doc committer) Date: Mon Aug 20 18:17:50 2018 New Revision: 338110 URL: https://svnweb.freebsd.org/changeset/base/338110 Log: In r324732 sysinstall was replaced by bsdinstall. However, for post-install configuration, bsdinstall is not of much use. Point the user to bsdconfig instead. Reviewed by: 0mp, bcr Approved by: 0mp, bcr Differential Revision: https://reviews.freebsd.org/D16751 Modified: head/usr.sbin/jail/jail.8 Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Mon Aug 20 17:27:30 2018 (r338109) +++ head/usr.sbin/jail/jail.8 Mon Aug 20 18:17:50 2018 (r338110) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 30, 2018 +.Dd August 20, 2018 .Dt JAIL 8 .Os .Sh NAME @@ -1033,7 +1033,7 @@ jail -c path=/data/jail/testjail mount.devfs \\ .Pp Assuming no errors, you will end up with a shell prompt within the jail. You can now run -.Pa /usr/sbin/bsdinstall +.Xr bsdconfig 8 and do the post-install configuration to set various configuration options, or perform these actions manually by editing .Pa /etc/rc.conf , @@ -1312,6 +1312,7 @@ environment of the first jail. .Xr procfs 5 , .Xr rc.conf 5 , .Xr sysctl.conf 5 , +.Xr bsdconfig 8 , .Xr chroot 8 , .Xr devfs 8 , .Xr halt 8 , From owner-svn-src-head@freebsd.org Mon Aug 20 18:36: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 66B6710787F2; Mon, 20 Aug 2018 18:36:49 +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 D5EBA7B5F9; Mon, 20 Aug 2018 18:36:48 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([2.245.37.209]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MhAVV-1fVdUE3CXx-00MLg1; Mon, 20 Aug 2018 20:36:39 +0200 Date: Mon, 20 Aug 2018 20:36:06 +0200 From: "O. Hartmann" To: Alan Cox Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338018 - head/sys/vm Message-ID: <20180820203633.1bd75a2e@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201808181833.w7IIXodt040289@repo.freebsd.org> References: <201808181833.w7IIXodt040289@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:RPKMbezJRE+jb2OMm+nVyK6pUZSwhSDUDxuKxOVt2IY+7xMwjMm 6+kqp53snOFi4G7zGtMRd/nPYk64etdCy7vhNg2x+N1gBviXDzk+vyJ5xU75ErQ7pXY0qo1 xsZrfwUL14UxKEOxuGRuyQcgf2TCg5nYngXjJegYX0TKXdJIjsmb7p3AD5FUDcS4/JgRAen PlQiPBMsHIz5Ykrj94lCw== X-UI-Out-Filterresults: notjunk:1;V01:K0:D443fDNn2xk=:LEBXbQ4yn/CxWnWbRDHOAT fSniw6Y/HZf+0YC0JYPdt79/sHFd5FuqfnX7ro1XQXqVMz5SVosQOvmW+TuGwjL54yzLSx4DQ fTavG6jQeTP41INa3t5xH/epSLufRuo/7AxYH+ja02ZNMzD4X6REr9Jg+rN41YIXvc3aNX/me 1OnpoWCC+/jVQvl44Oo36rQVyY+xfKxdp+y320fE8xFTKBv4EvIT9R2HDt3f+p+yyw3fBoSlA 0lTv7WAH93lIEkeCLyYstbr/sh9RjUsQY977+GwYnaPETrvZYFJUXHbffOkWaKvZ73wfV+30s UFpN3vcyBFKhmy+mKtvVN/LUMlcy7qq35bYRfuxamzaeKQh3irXDFMPvLoOI0Avl3Es5OvToW BxAkxGeN6l9ts27UtO+0o1I8bGLEZtODgqUNol/x7qCYRjuz/0N3UGv3YDeeEh05McSDFslkj 423NQ+CT60GvsaHXXcITAlafoLEik9frnePTnYdNudzOKHXwuVvi2RG5/SRNqRjQ/A8IQ9WTz dOuvIceGStYdQuVQ/D8Q3GdAYX9Scx9bvd6EOZYRrXSF1Uybd17Eo07ZpGPxDcAV8ZcA4O7hc BsUA1Y2XiYUTYQx77Xqt0paT2qE9P9Nx2w7glSy49KLggQQRqcDR9PiLrbGPZPB0jWJYukiRY YzDTkOos+q6yW6uNsOLqgkbzk0hfMPI13oSLtw9drqm+0m2qn7TjaXyboNglT9e3X0e06brYZ f2kJuVz/K6fUMG9/OXHOjJEdfS+eWOBKcOo17ZBR4ZgJYO0K9g7qqsIotw8Tfg2MsfHhhC9+2 9uj8Pos 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, 20 Aug 2018 18:36:49 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBNTEyDQoNCkFtIFNh dCwgMTggQXVnIDIwMTggMTg6MzM6NTAgKzAwMDAgKFVUQykNCkFsYW4gQ294IDxhbGNARnJlZUJT RC5vcmc+IHNjaHJpZWI6DQoNCj4gQXV0aG9yOiBhbGMNCj4gRGF0ZTogU2F0IEF1ZyAxOCAxODoz Mzo1MCAyMDE4DQo+IE5ldyBSZXZpc2lvbjogMzM4MDE4DQo+IFVSTDogaHR0cHM6Ly9zdm53ZWIu ZnJlZWJzZC5vcmcvY2hhbmdlc2V0L2Jhc2UvMzM4MDE4DQo+IA0KPiBMb2c6DQo+ICAgRWxpbWlu YXRlIHRoZSBhcmVuYSBwYXJhbWV0ZXIgdG8ga21lbV9tYWxsb2NfZG9tYWluKCkuICBJdCBpcyBy ZWR1bmRhbnQuDQo+ICAgVGhlIGRvbWFpbiBhbmQgZmxhZ3MgcGFyYW1ldGVycyBzdWZmaWNlLiAg SW4gZmFjdCwgdGhlIHJlbGF0ZWQgZnVuY3Rpb25zDQo+ICAga21lbV9hbGxvY197YXR0cixjb250 aWd9X2RvbWFpbigpIGRvbid0IGhhdmUgYW4gYXJlbmEgcGFyYW1ldGVyLg0KPiAgIA0KPiAgIFJl dmlld2VkIGJ5OglraWIsIG1hcmtqDQo+ICAgRGlmZmVyZW50aWFsIFJldmlzaW9uOglodHRwczov L3Jldmlld3MuZnJlZWJzZC5vcmcvRDE2NzEzDQo+IA0KPiBNb2RpZmllZDoNCj4gICBoZWFkL3N5 cy92bS91bWFfY29yZS5jDQo+ICAgaGVhZC9zeXMvdm0vdm1fZXh0ZXJuLmgNCj4gICBoZWFkL3N5 cy92bS92bV9rZXJuLmMNCj4gDQo+IE1vZGlmaWVkOiBoZWFkL3N5cy92bS91bWFfY29yZS5jDQo+ ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PQ0KPiAtLS0gaGVhZC9zeXMvdm0vdW1hX2NvcmUuYwlTYXQg QXVnIDE4IDE2OjAzOjE1IDIwMTgJKHIzMzgwMTcpDQo+ICsrKyBoZWFkL3N5cy92bS91bWFfY29y ZS5jCVNhdCBBdWcgMTggMTg6MzM6NTAgMjAxOAkocjMzODAxOCkNCj4gQEAgLTExNjksNyArMTE2 OSw3IEBAIHBhZ2VfYWxsb2ModW1hX3pvbmVfdCB6b25lLCB2bV9zaXplX3QgYnl0ZXMsIGludCBk b21haQ0KPiAgCXZvaWQgKnA7CS8qIFJldHVybmVkIHBhZ2UgKi8NCj4gIA0KPiAgCSpwZmxhZyA9 IFVNQV9TTEFCX0tFUk5FTDsNCj4gLQlwID0gKHZvaWQgKikga21lbV9tYWxsb2NfZG9tYWluKGtl cm5lbF9hcmVuYSwgZG9tYWluLCBieXRlcywgd2FpdCk7DQo+ICsJcCA9ICh2b2lkICopIGttZW1f bWFsbG9jX2RvbWFpbihkb21haW4sIGJ5dGVzLCB3YWl0KTsNCj4gIA0KPiAgCXJldHVybiAocCk7 DQo+ICB9DQo+IEBAIC0zNjgwLDMyICszNjgwLDIyIEBAIHVtYV96b25lX2V4aGF1c3RlZF9ub2xv Y2sodW1hX3pvbmVfdCB6b25lKQ0KPiAgdm9pZCAqDQo+ICB1bWFfbGFyZ2VfbWFsbG9jX2RvbWFp bih2bV9zaXplX3Qgc2l6ZSwgaW50IGRvbWFpbiwgaW50IHdhaXQpDQo+ICB7DQo+IC0Jc3RydWN0 IHZtZW0gKmFyZW5hOw0KPiAgCXZtX29mZnNldF90IGFkZHI7DQo+ICAJdW1hX3NsYWJfdCBzbGFi Ow0KPiAgDQo+IC0jaWYgVk1fTlJFU0VSVkxFVkVMID4gMA0KPiAtCWlmIChfX3ByZWRpY3RfdHJ1 ZSgod2FpdCAmIE1fRVhFQykgPT0gMCkpDQo+IC0JCWFyZW5hID0ga2VybmVsX2FyZW5hOw0KPiAt CWVsc2UNCj4gLQkJYXJlbmEgPSBrZXJuZWxfcnd4X2FyZW5hOw0KPiAtI2Vsc2UNCj4gLQlhcmVu YSA9IGtlcm5lbF9hcmVuYTsNCj4gLSNlbmRpZg0KPiAtDQo+ICAJc2xhYiA9IHpvbmVfYWxsb2Nf aXRlbShzbGFiem9uZSwgTlVMTCwgZG9tYWluLCB3YWl0KTsNCj4gIAlpZiAoc2xhYiA9PSBOVUxM KQ0KPiAgCQlyZXR1cm4gKE5VTEwpOw0KPiAgCWlmIChkb21haW4gPT0gVU1BX0FOWURPTUFJTikN Cj4gLQkJYWRkciA9IGttZW1fbWFsbG9jKGFyZW5hLCBzaXplLCB3YWl0KTsNCj4gKwkJYWRkciA9 IGttZW1fbWFsbG9jKE5VTEwsIHNpemUsIHdhaXQpOw0KPiAgCWVsc2UNCj4gLQkJYWRkciA9IGtt ZW1fbWFsbG9jX2RvbWFpbihhcmVuYSwgZG9tYWluLCBzaXplLCB3YWl0KTsNCj4gKwkJYWRkciA9 IGttZW1fbWFsbG9jX2RvbWFpbihkb21haW4sIHNpemUsIHdhaXQpOw0KPiAgCWlmIChhZGRyICE9 IDApIHsNCj4gIAkJdnNldHNsYWIoYWRkciwgc2xhYik7DQo+ICAJCXNsYWItPnVzX2RhdGEgPSAo dm9pZCAqKWFkZHI7DQo+ICAJCXNsYWItPnVzX2ZsYWdzID0gVU1BX1NMQUJfS0VSTkVMIHwgVU1B X1NMQUJfTUFMTE9DOw0KPiAgI2lmIFZNX05SRVNFUlZMRVZFTCA+IDANCj4gLQkJaWYgKF9fcHJl ZGljdF9mYWxzZShhcmVuYSA9PSBrZXJuZWxfcnd4X2FyZW5hKSkNCj4gKwkJaWYgKF9fcHJlZGlj dF9mYWxzZSgod2FpdCAmIE1fRVhFQykgIT0gMCkpDQo+ICAJCQlzbGFiLT51c19mbGFncyB8PSBV TUFfU0xBQl9LUldYOw0KPiAgI2VuZGlmDQo+ICAJCXNsYWItPnVzX3NpemUgPSBzaXplOw0KPiAN Cj4gTW9kaWZpZWQ6IGhlYWQvc3lzL3ZtL3ZtX2V4dGVybi5oDQo+ID09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PQ0KPiAtLS0gaGVhZC9zeXMvdm0vdm1fZXh0ZXJuLmgJU2F0IEF1ZyAxOCAxNjowMzoxNSAy MDE4CShyMzM4MDE3KQ0KPiArKysgaGVhZC9zeXMvdm0vdm1fZXh0ZXJuLmgJU2F0IEF1ZyAxOCAx ODozMzo1MCAyMDE4CShyMzM4MDE4KQ0KPiBAQCAtNjUsOCArNjUsNyBAQCB2bV9vZmZzZXRfdCBr bWVtX2FsbG9jX2NvbnRpZ19kb21haW4oaW50IGRvbWFpbiwgdm1fc2kNCj4gICAgICB2bV9wYWRk cl90IGxvdywgdm1fcGFkZHJfdCBoaWdoLCB1X2xvbmcgYWxpZ25tZW50LCB2bV9wYWRkcl90IGJv dW5kYXJ5LA0KPiAgICAgIHZtX21lbWF0dHJfdCBtZW1hdHRyKTsNCj4gIHZtX29mZnNldF90IGtt ZW1fbWFsbG9jKHN0cnVjdCB2bWVtICosIHZtX3NpemVfdCBzaXplLCBpbnQgZmxhZ3MpOw0KPiAt dm1fb2Zmc2V0X3Qga21lbV9tYWxsb2NfZG9tYWluKHN0cnVjdCB2bWVtICosIGludCBkb21haW4s IHZtX3NpemVfdCBzaXplLA0KPiAtICAgIGludCBmbGFncyk7DQo+ICt2bV9vZmZzZXRfdCBrbWVt X21hbGxvY19kb21haW4oaW50IGRvbWFpbiwgdm1fc2l6ZV90IHNpemUsIGludCBmbGFncyk7DQo+ ICB2b2lkIGttZW1fZnJlZShzdHJ1Y3Qgdm1lbSAqLCB2bV9vZmZzZXRfdCwgdm1fc2l6ZV90KTsN Cj4gIA0KPiAgLyogVGhpcyBwcm92aWRlcyBtZW1vcnkgZm9yIHByZXZpb3VzbHkgYWxsb2NhdGVk IGFkZHJlc3Mgc3BhY2UuICovDQo+IA0KPiBNb2RpZmllZDogaGVhZC9zeXMvdm0vdm1fa2Vybi5j DQo+ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PQ0KPiAtLS0gaGVhZC9zeXMvdm0vdm1fa2Vybi5jCVNh dCBBdWcgMTggMTY6MDM6MTUgMjAxOAkocjMzODAxNykNCj4gKysrIGhlYWQvc3lzL3ZtL3ZtX2tl cm4uYwlTYXQgQXVnIDE4IDE4OjMzOjUwIDIwMTgJKHIzMzgwMTgpDQo+IEBAIC0zNzIsMjMgKzM3 MiwxOCBAQCBrbWVtX3N1YmFsbG9jKHZtX21hcF90IHBhcmVudCwgdm1fb2Zmc2V0X3QgKm1pbiwg dm1fb2YNCj4gICAqCUFsbG9jYXRlIHdpcmVkLWRvd24gcGFnZXMgaW4gdGhlIGtlcm5lbCdzIGFk ZHJlc3Mgc3BhY2UuDQo+ICAgKi8NCj4gIHZtX29mZnNldF90DQo+IC1rbWVtX21hbGxvY19kb21h aW4oc3RydWN0IHZtZW0gKnZtZW0sIGludCBkb21haW4sIHZtX3NpemVfdCBzaXplLCBpbnQgZmxh Z3MpDQo+ICtrbWVtX21hbGxvY19kb21haW4oaW50IGRvbWFpbiwgdm1fc2l6ZV90IHNpemUsIGlu dCBmbGFncykNCj4gIHsNCj4gIAl2bWVtX3QgKmFyZW5hOw0KPiAgCXZtX29mZnNldF90IGFkZHI7 DQo+ICAJaW50IHJ2Ow0KPiAgDQo+ICAjaWYgVk1fTlJFU0VSVkxFVkVMID4gMA0KPiAtCUtBU1NF UlQodm1lbSA9PSBrZXJuZWxfYXJlbmEgfHwgdm1lbSA9PSBrZXJuZWxfcnd4X2FyZW5hLA0KPiAt CSAgICAoImttZW1fbWFsbG9jX2RvbWFpbjogT25seSBrZXJuZWxfYXJlbmEgb3Iga2VybmVsX3J3 eF9hcmVuYSAiDQo+IC0JICAgICJhcmUgc3VwcG9ydGVkLiIpKTsNCj4gLQlpZiAoX19wcmVkaWN0 X3RydWUodm1lbSA9PSBrZXJuZWxfYXJlbmEpKQ0KPiArCWlmIChfX3ByZWRpY3RfdHJ1ZSgoZmxh Z3MgJiBNX0VYRUMpID09IDApKQ0KPiAgCQlhcmVuYSA9IHZtX2RvbVtkb21haW5dLnZtZF9rZXJu ZWxfYXJlbmE7DQo+ICAJZWxzZQ0KPiAgCQlhcmVuYSA9IHZtX2RvbVtkb21haW5dLnZtZF9rZXJu ZWxfcnd4X2FyZW5hOw0KPiAgI2Vsc2UNCj4gLQlLQVNTRVJUKHZtZW0gPT0ga2VybmVsX2FyZW5h LA0KPiAtCSAgICAoImttZW1fbWFsbG9jX2RvbWFpbjogT25seSBrZXJuZWxfYXJlbmEgaXMgc3Vw cG9ydGVkLiIpKTsNCj4gIAlhcmVuYSA9IHZtX2RvbVtkb21haW5dLnZtZF9rZXJuZWxfYXJlbmE7 DQo+ICAjZW5kaWYNCj4gIAlzaXplID0gcm91bmRfcGFnZShzaXplKTsNCj4gQEAgLTQwNCw3ICsz OTksNyBAQCBrbWVtX21hbGxvY19kb21haW4oc3RydWN0IHZtZW0gKnZtZW0sIGludCBkb21haW4s IHZtX3MNCj4gIH0NCj4gIA0KPiAgdm1fb2Zmc2V0X3QNCj4gLWttZW1fbWFsbG9jKHN0cnVjdCB2 bWVtICp2bWVtLCB2bV9zaXplX3Qgc2l6ZSwgaW50IGZsYWdzKQ0KPiAra21lbV9tYWxsb2Moc3Ry dWN0IHZtZW0gKnZtZW0gX191bnVzZWQsIHZtX3NpemVfdCBzaXplLCBpbnQgZmxhZ3MpDQo+ICB7 DQo+ICAJc3RydWN0IHZtX2RvbWFpbnNldF9pdGVyIGRpOw0KPiAgCXZtX29mZnNldF90IGFkZHI7 DQo+IEBAIC00MTIsNyArNDA3LDcgQEAga21lbV9tYWxsb2Moc3RydWN0IHZtZW0gKnZtZW0sIHZt X3NpemVfdCBzaXplLCBpbnQgZmxhDQo+ICANCj4gIAl2bV9kb21haW5zZXRfaXRlcl9tYWxsb2Nf aW5pdCgmZGksIGtlcm5lbF9vYmplY3QsICZkb21haW4sICZmbGFncyk7DQo+ICAJZG8gew0KPiAt CQlhZGRyID0ga21lbV9tYWxsb2NfZG9tYWluKHZtZW0sIGRvbWFpbiwgc2l6ZSwgZmxhZ3MpOw0K PiArCQlhZGRyID0ga21lbV9tYWxsb2NfZG9tYWluKGRvbWFpbiwgc2l6ZSwgZmxhZ3MpOw0KPiAg CQlpZiAoYWRkciAhPSAwKQ0KPiAgCQkJYnJlYWs7DQo+ICAJfSB3aGlsZSAodm1fZG9tYWluc2V0 X2l0ZXJfbWFsbG9jKCZkaSwgJmRvbWFpbiwgJmZsYWdzKSA9PSAwKTsNCj4gX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18NCj4gc3ZuLXNyYy1oZWFkQGZyZWVi c2Qub3JnIG1haWxpbmcgbGlzdA0KPiBodHRwczovL2xpc3RzLmZyZWVic2Qub3JnL21haWxtYW4v bGlzdGluZm8vc3ZuLXNyYy1oZWFkDQo+IFRvIHVuc3Vic2NyaWJlLCBzZW5kIGFueSBtYWlsIHRv ICJzdm4tc3JjLWhlYWQtdW5zdWJzY3JpYmVAZnJlZWJzZC5vcmciDQoNClRoaXMgY2hhbmdlIGhh cyBpbXBsaWNhdGlvbnMgYXQgbGVhc3QgZm9yIHBvcnQNCg0KeDExL252aWRpYS1kcml2ZXIgKDM5 MC43NykNCg0Kd2hpY2ggbm93IGZhaWxzIGluIG52aWRpYV9zdWJyLmM6MTEzMTo0MSANCmFuZA0K bnZpZGlhX3N1YnIuYzoxMjY5OjQ1Og0KDQp0byBjb21waWxlLg0KDQpTZWUgUFIgMjMwNzgwDQoN Cmh0dHBzOi8vYnVncy5mcmVlYnNkLm9yZy9idWd6aWxsYS9zaG93X2J1Zy5jZ2k/aWQ9MjMwNzgw DQoNCg0KDQotIC0tIA0KTy4gSGFydG1hbm4NCg0KSWNoIHdpZGVyc3ByZWNoZSBkZXIgTnV0enVu ZyBvZGVyIMOcYmVybWl0dGx1bmcgbWVpbmVyIERhdGVuIGbDvHINCldlcmJlendlY2tlIG9kZXIg ZsO8ciBkaWUgTWFya3QtIG9kZXIgTWVpbnVuZ3Nmb3JzY2h1bmcgKMKnIDI4IEFicy4gNCBCRFNH KS4NCi0tLS0tQkVHSU4gUEdQIFNJR05BVFVSRS0tLS0tDQoNCmlMVUVBUk1LQUIwV0lRUVpWWk16 QXR3QzJULzg2VHJTNTI4ZnlGaFlsQVVDVzNzS01RQUtDUkRTNTI4ZnlGaFkNCmxGY3JBZjl1bEZC aElXS0ZZL05WbDNiUHpGSE9Wd1VBNlBEN1hvK2xvWFdPdWpUVHhDYzByaVl3YktnVmxwNVINCllE RWpoS1o0YWgwK2xzK2xwTy93TktZbWJWTDlBZjlXOHZibE5YektLaDN3UUpJRmJaQUtCNEtqV29G U0tkTEINCnFlVnBNY0Z1aDhGZTBNbzczWXQ4YTN5WTBteDJWNjYyeGZ6OWswUURMaGMzQy9TcExM MkgNCj1nN254DQotLS0tLUVORCBQR1AgU0lHTkFUVVJFLS0tLS0NCg== From owner-svn-src-head@freebsd.org Mon Aug 20 18:45: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 B4B3D1078CB2; Mon, 20 Aug 2018 18:45:59 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mx0a-0010f301.pphosted.com (mx0a-0010f301.pphosted.com [148.163.149.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "thawte SHA256 SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 22E737BCE8; Mon, 20 Aug 2018 18:45:58 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pps.filterd (m0102856.ppops.net [127.0.0.1]) by mx0b-0010f301.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7KIjNo1020035; Mon, 20 Aug 2018 18:45:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rice.edu; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=ricemail; bh=XiOXINijtpqiVnbl0t3TiokEzlRa8+1iEVcolgMhslU=; b=crIL0qf94vr2d05r0MVx6BZjMImKJU/6oFaSo8r8KMuhSSEUOP2a3Hd+lP83m7aJ6b6U 8COUUI1hFcLhCM8braR5NP5dnVN8yQWtUnzYq7t1G+2E77+6iHnQlO8MvWFCR3eo9yJl VSnbeBDCptp9xbBEwDEDmHvMaSzoWNZKZu+WvYYDC9hmjSwdMqbhw+a6q9vVlZrVkKRf d+iJ7iVNw/Czyyrd8PzSy53qJBpxL0n9ywlPDG0UxoZMUv3MYiiCrIAvJzf+Bgrkbmmv 3CyyQtKyhjWDpPmLTezP22kN+TwD5B7ineKSFBchLkGl5LwhMGAZRdNWEp2mbqhWZbKs 6w== Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by mx0b-0010f301.pphosted.com with ESMTP id 2kxc6e2kbh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Aug 2018 18:45:51 +0000 Received-X: from mh1.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh1.mail.rice.edu (Postfix) with ESMTP id 0B9EF460DF5; Mon, 20 Aug 2018 13:45:51 -0500 (CDT) Received-X: from mh1.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh1.mail.rice.edu (Postfix) with ESMTP id 0A252460DF2; Mon, 20 Aug 2018 13:45:51 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel Received-X: from mh1.mail.rice.edu ([127.0.0.1]) by mh1.mail.rice.edu (mh1.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id k64awsaqctqx; Mon, 20 Aug 2018 13:45:50 -0500 (CDT) Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id 67A5A460D17; Mon, 20 Aug 2018 13:45:50 -0500 (CDT) Subject: Re: svn commit: r338018 - head/sys/vm To: "O. Hartmann" , Alan Cox Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808181833.w7IIXodt040289@repo.freebsd.org> <20180820203633.1bd75a2e@thor.intern.walstatt.dynvpn.de> From: Alan Cox Openpgp: preference=signencrypt Autocrypt: addr=alc@rice.edu; prefer-encrypt=mutual; keydata= xsBNBFG8q4IBCADBE55F7sX+cKhEadxhNkXrbtVSJhw3TQDPvc3nBWxsfdMAhPWozhpLczV/ hr8mDJV5tirit0qhw4ANPwtsn7i/xlcSdC9p8Jvkcpp/AfiA5B78Y08AsC6K6tbNHZ06qPq3 eCXDNbPzsUXyvyt25A+ZnQj4HbW4FpA6C5ITG1eeJPGO8WV9vhBQ4X/BWI61RXaJw68Jxtwo c9eovzdxbWTd5po/oGHL2ganYoBMu1OGpGFWvTDwy2ARCV7i+fSkfKXUPaQm17AuVVbZu8OU Ig6caCEA5MlZVsMpwuJQp7xdEQzPaDML3drkl32l3Rb09g5vKjjLHb+LXx/7PyeEWsG1ABEB AAHNGkFsYW4gQ294IDxhbGNARnJlZUJTRC5vcmc+wsB4BBMBAgAiBQJRvK14AhsDBgsJCAcD AgYVCAIJCgsEFgIDAQIeAQIXgAAKCRCFEwQ8M+KJO7tKB/462f5Zzygqera1acLTIrIfdDXp cfyq3+OhFzbBh91b2Jw+CVKvH+hVpCUSW86Sgfv4sSvgsqdS9nMwN82MZDchNROfkkoY1Nkl 0EgayOmOoYroRp1bM65OZAMrw7qK/iG8FeJ1s6ex4wSSfeRETmFNhK0KMfTeLiKlIjW+KhIQ h+trVIWt9ZlvHI3xw6RUuEQ1CFvzETcwj/+YxLd8aha0Mr6qW/4VDw0G9g+YnqR8jnm1dOsO x8s+vJt2QmRuWGSsj5nk9Dc+Tpzytbvrv3rOCsEwuadWZU53/wL576XnqliWwkte3njN+BwI LoDuKBoqxIvdqI7lqTzYdww5BPd3zsBNBFG8q4IBCAC0hrybH/nTPvIeQm5qa5ZzwThdjb6y otBFjl/5LnMNfa2yhhJp0tQkr/WsJ/RiaYEmp7bGKnowbKR+6X7MF6qcRHwEPpibN8fpxKFg JlvhQhQWmU7nuBWqt8I1/y8aVLci7BPLRk6IKaMQJWWk18Wetijnao5gGEFu/iF9CzbYmJ/U ijVMJj08WlhQCiPnKFkirV8XjAOER5F2ecfLtfPLL/bZ+/Wm6xM+eo1ipc30oRf1Z7Rkcg94 RjiRpVacSnBQEFMXukD33w6WaKYT18B4rwN27tJfzTmGKRKggWEc3EWeQgzi3rD7x35owBJ7 x+G6lIjdSG4o9ytB3qTVazo3ABEBAAHCwF8EGAECAAkFAlG8q4ICGwwACgkQhRMEPDPiiTuH kAgAo3MUNRzGplyvgPezfnLgnwtlDYMF1HWp+67IIvY3WwcC51FQNHWmGis+H7Bor+aeSAfo KREw9l4U0Tu2YC9uiWKZzA4zer2WMhsB4VGMQ8GPuE2R2sFob5n293FsLWDSWM4Midory9zN EAYQ+Ijpv8WaATS217YYygA+iFlfMmQSKDS1G6HBnUjzQe23sX/06JAAxAvwmOI7OjwLlOCU Q5FaHPz6s8UjdHpZ/OUTElc7URPTr/KramlLhwuTRC2p8XyBrzYqz3Kfl42jEcOuxeHy07DG dm1Euqa5/CKTNBhMWjcujz11TUeI9+f5J2xUSlbj7nGJsnL5P34+SvtsKg== Message-ID: Date: Mon, 20 Aug 2018 13:45:49 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20180820203633.1bd75a2e@thor.intern.walstatt.dynvpn.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-08-20_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=35 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808200194 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, 20 Aug 2018 18:46:00 -0000 On 08/20/2018 13:36, O. Hartmann wrote: > Am Sat, 18 Aug 2018 18:33:50 +0000 (UTC) > Alan Cox schrieb: > > > Author: alc > > Date: Sat Aug 18 18:33:50 2018 > > New Revision: 338018 > > URL: https://svnweb.freebsd.org/changeset/base/338018 > > > Log: > > Eliminate the arena parameter to kmem_malloc_domain(). It is > redundant. > > The domain and flags parameters suffice. In fact, the related > functions > > kmem_alloc_{attr,contig}_domain() don't have an arena parameter. > > > Reviewed by: kib, markj > > Differential Revision: https://reviews.freebsd.org/D16713 > > > Modified: > > head/sys/vm/uma_core.c > > head/sys/vm/vm_extern.h > > head/sys/vm/vm_kern.c > > > Modified: head/sys/vm/uma_core.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/vm/uma_core.c Sat Aug 18 16:03:15 2018 (r338017) > > +++ head/sys/vm/uma_core.c Sat Aug 18 18:33:50 2018 (r338018) > > @@ -1169,7 +1169,7 @@ page_alloc(uma_zone_t zone, vm_size_t bytes, > int domai > > void *p; /* Returned page */ > > > *pflag =3D UMA_SLAB_KERNEL; > > - p =3D (void *) kmem_malloc_domain(kernel_arena, domain, bytes, w= ait); > > + p =3D (void *) kmem_malloc_domain(domain, bytes, wait); > > > return (p); > > } > > @@ -3680,32 +3680,22 @@ uma_zone_exhausted_nolock(uma_zone_t zone) > > void * > > uma_large_malloc_domain(vm_size_t size, int domain, int wait) > > { > > - struct vmem *arena; > > vm_offset_t addr; > > uma_slab_t slab; > > > -#if VM_NRESERVLEVEL > 0 > > - if (__predict_true((wait & M_EXEC) =3D=3D 0)) > > - arena =3D kernel_arena; > > - else > > - arena =3D kernel_rwx_arena; > > -#else > > - arena =3D kernel_arena; > > -#endif > > - > > slab =3D zone_alloc_item(slabzone, NULL, domain, wait); > > if (slab =3D=3D NULL) > > return (NULL); > > if (domain =3D=3D UMA_ANYDOMAIN) > > - addr =3D kmem_malloc(arena, size, wait); > > + addr =3D kmem_malloc(NULL, size, wait); > > else > > - addr =3D kmem_malloc_domain(arena, domain, size, wait); > > + addr =3D kmem_malloc_domain(domain, size, wait); > > if (addr !=3D 0) { > > vsetslab(addr, slab); > > slab->us_data =3D (void *)addr; > > slab->us_flags =3D UMA_SLAB_KERNEL | UMA_SLAB_MALLOC; > > #if VM_NRESERVLEVEL > 0 > > - if (__predict_false(arena =3D=3D kernel_rwx_arena)) > > + if (__predict_false((wait & M_EXEC) !=3D 0)) > > slab->us_flags |=3D UMA_SLAB_KRWX; > > #endif > > slab->us_size =3D size; > > > Modified: head/sys/vm/vm_extern.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/vm/vm_extern.h Sat Aug 18 16:03:15 2018 (r338017) > > +++ head/sys/vm/vm_extern.h Sat Aug 18 18:33:50 2018 (r338018) > > @@ -65,8 +65,7 @@ vm_offset_t kmem_alloc_contig_domain(int domain, vm= _si > > vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t > boundary, > > vm_memattr_t memattr); > > vm_offset_t kmem_malloc(struct vmem *, vm_size_t size, int flags); > > -vm_offset_t kmem_malloc_domain(struct vmem *, int domain, vm_size_t > size, > > - int flags); > > +vm_offset_t kmem_malloc_domain(int domain, vm_size_t size, int flags= ); > > void kmem_free(struct vmem *, vm_offset_t, vm_size_t); > > > /* This provides memory for previously allocated address space. */ > > > Modified: head/sys/vm/vm_kern.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/vm/vm_kern.c Sat Aug 18 16:03:15 2018 (r338017) > > +++ head/sys/vm/vm_kern.c Sat Aug 18 18:33:50 2018 (r338018) > > @@ -372,23 +372,18 @@ kmem_suballoc(vm_map_t parent, vm_offset_t > *min, vm_of > > * Allocate wired-down pages in the kernel's address space. > > */ > > vm_offset_t > > -kmem_malloc_domain(struct vmem *vmem, int domain, vm_size_t size, > int flags) > > +kmem_malloc_domain(int domain, vm_size_t size, int flags) > > { > > vmem_t *arena; > > vm_offset_t addr; > > int rv; > > > #if VM_NRESERVLEVEL > 0 > > - KASSERT(vmem =3D=3D kernel_arena || vmem =3D=3D kernel_rwx_arena= , > > - ("kmem_malloc_domain: Only kernel_arena or kernel_rwx_arena = " > > - "are supported.")); > > - if (__predict_true(vmem =3D=3D kernel_arena)) > > + if (__predict_true((flags & M_EXEC) =3D=3D 0)) > > arena =3D vm_dom[domain].vmd_kernel_arena; > > else > > arena =3D vm_dom[domain].vmd_kernel_rwx_arena; > > #else > > - KASSERT(vmem =3D=3D kernel_arena, > > - ("kmem_malloc_domain: Only kernel_arena is supported.")); > > arena =3D vm_dom[domain].vmd_kernel_arena; > > #endif > > size =3D round_page(size); > > @@ -404,7 +399,7 @@ kmem_malloc_domain(struct vmem *vmem, int > domain, vm_s > > } > > > vm_offset_t > > -kmem_malloc(struct vmem *vmem, vm_size_t size, int flags) > > +kmem_malloc(struct vmem *vmem __unused, vm_size_t size, int flags) > > { > > struct vm_domainset_iter di; > > vm_offset_t addr; > > @@ -412,7 +407,7 @@ kmem_malloc(struct vmem *vmem, vm_size_t size, > int fla > > > vm_domainset_iter_malloc_init(&di, kernel_object, &domain, &flag= s); > > do { > > - addr =3D kmem_malloc_domain(vmem, domain, size, flags); > > + addr =3D kmem_malloc_domain(domain, size, flags); > > if (addr !=3D 0) > > break; > > } while (vm_domainset_iter_malloc(&di, &domain, &flags) =3D=3D 0= ); > > _______________________________________________ > > 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.or= g" > > This change has implications at least for port > > x11/nvidia-driver (390.77) > > which now fails in nvidia_subr.c:1131:41 > and > nvidia_subr.c:1269:45: > > to compile. > > See PR 230780 > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230780 > > > Thank you. I have posted instructions to the PR on how to address this. From owner-svn-src-head@freebsd.org Mon Aug 20 18:50: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 7F55B1078EE1; Mon, 20 Aug 2018 18:50:57 +0000 (UTC) (envelope-from gonzo@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 34F187C04A; Mon, 20 Aug 2018 18:50:57 +0000 (UTC) (envelope-from gonzo@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 163361922A; Mon, 20 Aug 2018 18:50:57 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KIou8f054948; Mon, 20 Aug 2018 18:50:56 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KIoueE054946; Mon, 20 Aug 2018 18:50:56 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201808201850.w7KIoueE054946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 20 Aug 2018 18:50:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338111 - head/sys/dev/ichiic X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/dev/ichiic X-SVN-Commit-Revision: 338111 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, 20 Aug 2018 18:50:57 -0000 Author: gonzo Date: Mon Aug 20 18:50:56 2018 New Revision: 338111 URL: https://svnweb.freebsd.org/changeset/base/338111 Log: [ig4] add ACPI Device HID for AMD platforms Added ACPI Device HID AMDI0010 for the designware I2C controllers in future AMD platforms. Also, when verifying component version check for minimal value instead of exact match. PR: 230641 Submitted by: Rajesh Reviewed by: cem, gonzo MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16670 Modified: head/sys/dev/ichiic/ig4_acpi.c head/sys/dev/ichiic/ig4_iic.c head/sys/dev/ichiic/ig4_reg.h Modified: head/sys/dev/ichiic/ig4_acpi.c ============================================================================== --- head/sys/dev/ichiic/ig4_acpi.c Mon Aug 20 18:17:50 2018 (r338110) +++ head/sys/dev/ichiic/ig4_acpi.c Mon Aug 20 18:50:56 2018 (r338111) @@ -60,6 +60,7 @@ static char *ig4iic_ids[] = { "80860F41", "808622C1", "AMDI0510", + "AMDI0010", "APMC0D0F", NULL }; Modified: head/sys/dev/ichiic/ig4_iic.c ============================================================================== --- head/sys/dev/ichiic/ig4_iic.c Mon Aug 20 18:17:50 2018 (r338110) +++ head/sys/dev/ichiic/ig4_iic.c Mon Aug 20 18:50:56 2018 (r338111) @@ -563,7 +563,7 @@ ig4iic_attach(ig4iic_softc_t *sc) if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM) { v = reg_read(sc, IG4_REG_COMP_VER); - if (v != IG4_COMP_VER) { + if (v < IG4_COMP_MIN_VER) { error = ENXIO; goto done; } Modified: head/sys/dev/ichiic/ig4_reg.h ============================================================================== --- head/sys/dev/ichiic/ig4_reg.h Mon Aug 20 18:17:50 2018 (r338110) +++ head/sys/dev/ichiic/ig4_reg.h Mon Aug 20 18:50:56 2018 (r338111) @@ -73,7 +73,6 @@ * SDA_HOLD 0x00000001 * SDA_SETUP 0x00000064 * COMP_PARAM1 0x00FFFF6E - * COMP_VER 0x3131352A */ #define IG4_REG_CTL 0x0000 /* RW Control Register */ @@ -552,11 +551,10 @@ /* * COMP_VER - (RO) Component Version Register 22.2.36 - * Default Value 0x3131352A * * Contains the chip version number. All 32 bits. */ -#define IG4_COMP_VER 0x3131352A +#define IG4_COMP_MIN_VER 0x3131352A /* * COMP_TYPE - (RO) (linux) Endian and bus width probe From owner-svn-src-head@freebsd.org Mon Aug 20 19:07:58 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 A465C1079740; Mon, 20 Aug 2018 19:07:58 +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 5B08F7CA7F; Mon, 20 Aug 2018 19:07:58 +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 37FF819529; Mon, 20 Aug 2018 19:07:58 +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 w7KJ7wOP064995; Mon, 20 Aug 2018 19:07:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KJ7wOV064994; Mon, 20 Aug 2018 19:07:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808201907.w7KJ7wOV064994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 20 Aug 2018 19:07:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338112 - 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: 338112 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, 20 Aug 2018 19:07:58 -0000 Author: kib Date: Mon Aug 20 19:07:57 2018 New Revision: 338112 URL: https://svnweb.freebsd.org/changeset/base/338112 Log: Always initialize PCPU kcr3 for vmspace0 pmap. If an exception or NMI occurs before CPU switched to a pmap different from vmspace0, PCPU kcr3 is left zero for pti config, which causes triple-fault in the handler. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Aug 20 18:50:56 2018 (r338111) +++ head/sys/amd64/amd64/pmap.c Mon Aug 20 19:07:57 2018 (r338112) @@ -2661,10 +2661,6 @@ pmap_pinit0(pmap_t pmap) CPU_FOREACH(i) { pmap->pm_pcids[i].pm_pcid = PMAP_PCID_KERN + 1; pmap->pm_pcids[i].pm_gen = 1; - if (!pti) { - __pcpu[i].pc_kcr3 = PMAP_NO_CR3; - __pcpu[i].pc_ucr3 = PMAP_NO_CR3; - } } pmap_activate_boot(pmap); } @@ -7571,6 +7567,7 @@ pmap_activate(struct thread *td) void pmap_activate_boot(pmap_t pmap) { + uint64_t kcr3; u_int cpuid; /* @@ -7586,6 +7583,11 @@ pmap_activate_boot(pmap_t pmap) CPU_SET(cpuid, &pmap->pm_active); #endif PCPU_SET(curpmap, pmap); + kcr3 = pmap->pm_cr3; + if (pmap_pcid_enabled) + kcr3 |= pmap->pm_pcids[cpuid].pm_pcid | CR3_PCID_SAVE; + PCPU_SET(kcr3, kcr3); + PCPU_SET(ucr3, PMAP_NO_CR3); } void From owner-svn-src-head@freebsd.org Mon Aug 20 19:09: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 D1882107984B; Mon, 20 Aug 2018 19:09: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 879D97CC4D; Mon, 20 Aug 2018 19:09: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 658BE1952A; Mon, 20 Aug 2018 19:09: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 w7KJ9e5D065108; Mon, 20 Aug 2018 19:09:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KJ9e9O065107; Mon, 20 Aug 2018 19:09:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808201909.w7KJ9e9O065107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 20 Aug 2018 19:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338113 - 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: 338113 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, 20 Aug 2018 19:09:41 -0000 Author: kib Date: Mon Aug 20 19:09:39 2018 New Revision: 338113 URL: https://svnweb.freebsd.org/changeset/base/338113 Log: Update comment about ABI of flush_l1s_sw to match the reality. CPUID instruction clobbers %rbx and %rdx. Sponsored by: The FreeBSD Foundation MFC after: 13 days Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Mon Aug 20 19:07:57 2018 (r338112) +++ head/sys/amd64/amd64/support.S Mon Aug 20 19:09:39 2018 (r338113) @@ -1230,9 +1230,9 @@ END(handle_ibrs_exit_rs) * Flush L1D cache. Load enough of the data from the kernel text * to flush existing L1D content. * - * N.B. The function follows ABI calling conventions, but the vmm.ko - * caller expects that only %rax, %rcx, %r9, and %rflags registers - * are clobbered. + * N.B. The function does not follow ABI calling conventions, it corrupts %rbx. + * The vmm.ko caller expects that only %rax, %rdx, %rbx, %rcx, %r9, and %rflags + * registers are clobbered. The NMI handler caller only needs %r13 preserved. */ ENTRY(flush_l1d_sw) #define L1D_FLUSH_SIZE (64 * 1024) From owner-svn-src-head@freebsd.org Mon Aug 20 19:39: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 4DE27107A956; Mon, 20 Aug 2018 19:39:50 +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 F12B67E1E2; Mon, 20 Aug 2018 19:39:49 +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 D107B19A32; Mon, 20 Aug 2018 19:39:49 +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 w7KJdnEf080493; Mon, 20 Aug 2018 19:39:49 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KJdngc080492; Mon, 20 Aug 2018 19:39:49 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201808201939.w7KJdngc080492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 20 Aug 2018 19:39:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338114 - head/usr.sbin/mergemaster X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/mergemaster X-SVN-Commit-Revision: 338114 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, 20 Aug 2018 19:39:50 -0000 Author: imp Date: Mon Aug 20 19:39:49 2018 New Revision: 338114 URL: https://svnweb.freebsd.org/changeset/base/338114 Log: mergemaster: better defaults for SOURCEDIR If we can't find a Makefile.inc1 in the specified / default SOURCEDIR, and there's a Makefile.inc1 in the current directory, offer the user the choice of using . for SOURCEDIR. Differential Revsion: https://reviews.freebsd.org/D16709 Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Mon Aug 20 19:09:39 2018 (r338113) +++ head/usr.sbin/mergemaster/mergemaster.sh Mon Aug 20 19:39:49 2018 (r338114) @@ -483,6 +483,27 @@ if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a \ sleep 3 SOURCEDIR=${SOURCEDIR}/.. fi +if [ ! -f ${SOURCEDIR}/Makefile.inc1 ]; then + echo "*** ${SOURCEDIR} was not found." + if [ -f ./Makefile.inc1 ]; then + echo " Found Makefile.inc1 in the current directory." + echo -n " Would you like to set SOURCEDIR to $(pwd)? [no and exit] " + read SRCDOT + case "${SRCDOT}" in + [yY]*) + echo " *** Setting SOURCEDIR to $(pwd)" + SOURCEDIR=$(pwd) + ;; + *) + echo " **** No suitable ${SOURCEDIR} found, exiting" + exit 1 + ;; + esac + else + echo " **** No suitable ${SOURCEDIR} found, exiting" + exit 1 + fi +fi SOURCEDIR=$(realpath "$SOURCEDIR") # Setup make to use system files from SOURCEDIR From owner-svn-src-head@freebsd.org Mon Aug 20 19:46: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 CA708107AB99; Mon, 20 Aug 2018 19:46:11 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (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 4771E7E684; Mon, 20 Aug 2018 19:46:10 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([2.245.37.209]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lpbqo-1gNJJy0LPq-00fOqa; Mon, 20 Aug 2018 21:46:04 +0200 Date: Mon, 20 Aug 2018 21:45:30 +0200 From: "O. Hartmann" To: Alex Richardson Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338096 - head/tools/build/mk Message-ID: <20180820214557.1f8ef5bd@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201808201039.w7KAdhfX079450@repo.freebsd.org> References: <201808201039.w7KAdhfX079450@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:1rxleALrgq9R/9Zte+uX6ZHXrV/rfabFgyDVjPKN1Z860uf6CFd l8V1eGJwyUZwJ+SDgb5an7+Usx/UfU2UyFfy5PmUY6BVsQhjy6+nIrNwUeSsCjyJSk/GvIo BXjWy3CYv7cYPyi7DE4RKLJFEInX+Z2JkcRtKa3TWrjp4FUNypJibPR5RnerReTTJu5oz+P nAmT7oAu++dU3m/veUkNA== X-UI-Out-Filterresults: notjunk:1;V01:K0:6igGw24wn7E=:IfUDQ7XSZ2SPEgcyYwRn9B abodzfqag3bTDYRUb3rLRjZ19T06B0Ogi5XMNp2bHe8nNWO7RU9xUV61vCcA9Q9gLbir0enfy SB6/TxqLFvLc1ajSaQJ5fDXw/TR+505RVq9LhvhXXqYCJRmtWlLWbyfgfqC9r37r8CQ2t9I2x h+lkAO79xlDRy2QoyPXhprIbGdFP3QrWhhf4ZFtg0plyvdhlAV8Z7NdHhJ1mU/8kQvPrxuH7L FQcnlHQ8MYSfkFCwXN7k6IvBFXfF26XIqWF8CzmlB4QP5ivbMfSfgl8zf+OVVS4VO0R/ZLEqt J40A4ZIEHm3jGhWKth1pqV64K7u/omGgTYtp8/qJCyoEEK9uQs5RlJj89j22w6JuFCB4v7rDB T8uahizhBJTDN5NBdc9dCpZhDwo0BdmI+HX+TTFdQ2BuoMgvfpMucoL3di65yKxsBgKKVDRC+ L40E5wnGS1ltZG03yUtOwXY/MDPljwqsYaCw0iV+197qmiPqBanrx9zzXwS66G8Bw+m+7KNJE i3vUEU9KkdP9XLwknZkTBePSbMllwsHhkxVs4QNT8S3G0wmkqZ9k0rEuRiDeG5/JnJaE/R/Ep 0EAoHGPxq5VxPkgJ/YPVIL1b9o6g84N0V4AnQPzXWsdeXd8HE7ucQBz8Iw2MualmE2ortU16K 3OewfUohbbrRoQJjbUm3To6FVuPikdZzaBB78aVh95FP2C6MBbAGkFPz2ypuF97OZsm6SgMVI pUzHibxncNmDsPGa+OwrA8WWcvH9hVtd+TJN2nzICg2iVCuAaA8StsCicyNROzkYy2iVvjHNM Yvus5OR 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, 20 Aug 2018 19:46:12 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBNTEyDQoNCkFtIE1v biwgMjAgQXVnIDIwMTggMTA6Mzk6NDMgKzAwMDAgKFVUQykNCkFsZXggUmljaGFyZHNvbiA8YXJp Y2hhcmRzb25ARnJlZUJTRC5vcmc+IHNjaHJpZWI6DQoNCj4gQXV0aG9yOiBhcmljaGFyZHNvbg0K PiBEYXRlOiBNb24gQXVnIDIwIDEwOjM5OjQyIDIwMTgNCj4gTmV3IFJldmlzaW9uOiAzMzgwOTYN Cj4gVVJMOiBodHRwczovL3N2bndlYi5mcmVlYnNkLm9yZy9jaGFuZ2VzZXQvYmFzZS8zMzgwOTYN Cj4gDQo+IExvZzoNCj4gICBBdm9pZCBkZXBlbmRpbmcgb24gc3lzdGVtIGhlYWRlcnMgZnJvbSB0 aGUgc291cmNlIHRyZWUgZHVyaW5nIGJvb3RzdHJhcA0KPiAgIA0KPiAgIFRoaXMgY2FuIGNhdXNl IHN1cnByaXNpbmcgZXJyb3JzIGlmIHRoZSBidWlsZCB0b29scyBpcyBidWlsdCBhZ2FpbnN0DQo+ ICAgaGVhZGVycyB0aGF0IGRvbid0IG1hdGNoIHRoZSBob3N0IHN5c3RlbS4gSXQgaXMgYWxzbyBy ZXF1aXJlZCBpbiBvcmRlcg0KPiAgIHRvIGFsbG93IGJ1aWxkaW5nIG9uIG5vbi1GcmVlQlNEIHN5 c3RlbXMgd2hlcmUgdGhlIGhlYWRlcnMgaW4NCj4gICAvdXNyL2luY2x1ZGUvc3lzIGFyZSB1c3Vh bGx5IGNvbXBsZXRlbHkgaW5jb21wYXRpYmxlIHdpdGggdGhvc2UgaW4gdGhlDQo+ICAgc291cmNl IHRyZWUuDQo+ICAgDQo+ICAgSSBhZGRlZCBhbiBlcnJvciB0byBNYWtlZmlsZS5ib290IGlmIHRo aXMgaXMgZG9uZSBhbmQgZm91bmQgdGhpcyB3YXMNCj4gICBvbmx5IHRoZSBjYXNlIGluIGxpYm52 LiBXaXRoIHRoaXMgZXJyb3IgaW4gdGhlIE1ha2VmaWxlIEFCSSBicmVha2FnZXMNCj4gICBzdWNo IGFzIHIzMzYwMTkgc2hvdWxkIG5vIGxvbmdlciBiZSBwb3NzaWJsZS4NCj4gICANCj4gICBSZXZp ZXdlZCBCeToJYmRyZXdlcnksIGtldmFucw0KPiAgIEFwcHJvdmVkIEJ5OglqaGIgKG1lbnRvcikN Cj4gICBEaWZmZXJlbnRpYWwgUmV2aXNpb246IGh0dHBzOi8vcmV2aWV3cy5mcmVlYnNkLm9yZy9E MTYxODYNCj4gDQo+IE1vZGlmaWVkOg0KPiAgIGhlYWQvdG9vbHMvYnVpbGQvbWsvTWFrZWZpbGUu Ym9vdA0KPiANCj4gTW9kaWZpZWQ6IGhlYWQvdG9vbHMvYnVpbGQvbWsvTWFrZWZpbGUuYm9vdA0K PiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT0NCj4gLS0tIGhlYWQvdG9vbHMvYnVpbGQvbWsvTWFrZWZp bGUuYm9vdAlNb24gQXVnIDIwIDEwOjM5OjM3IDIwMTgJKHIzMzgwOTUpDQo+ICsrKyBoZWFkL3Rv b2xzL2J1aWxkL21rL01ha2VmaWxlLmJvb3QJTW9uIEF1ZyAyMCAxMDozOTo0MiAyMDE4CShyMzM4 MDk2KQ0KPiBAQCAtNywzICs3LDIwIEBAIExERkxBR1MrPQktTCR7V09STERUTVB9L2xlZ2FjeS91 c3IvbGliDQo+ICANCj4gICMgd2UgZG8gbm90IHdhbnQgdG8gY2FwdHVyZSBkZXBlbmRlbmNpZXMg cmVmZXJyaW5nIHRvIHRoZSBhYm92ZQ0KPiAgVVBEQVRFX0RFUEVOREZJTEU9IG5vDQo+ICsNCj4g KyMgV2hlbiBidWlsZGluZyBob3N0IHRvb2xzIHdlIHNob3VsZCBuZXZlciBwdWxsIGluIGhlYWRl cnMgZnJvbSB0aGUgc291cmNlIHN5cw0KPiArIyBkaXJlY3RvcnkgdG8gYXZvaWQgYW55IEFCSSBp c3N1ZXMgdGhhdCBtaWdodCBjYXVzZSB0aGUgYnVpbHQgYmluYXJ5IHRvIGNyYXNoLg0KPiArIyBU aGUgb25seSBleGNlcHRpb25zIHRvIHRoaXMgYXJlIHN5cy9jZGRsL2NvbXBhdCBmb3IgZHRyYWNl IGJvb3RzdHJhcCB0b29scyBhbmQNCj4gKyMgc3lzL2NyeXB0byBmb3IgbGlibWQgYm9vdHN0cmFw Lg0KPiArLmlmICFlbXB0eShDRkxBR1M6TSoke1NSQ1RPUH0vc3lzKjpOKiR7U1JDVE9QfS9zeXMv Y2RkbC9jb21wYXQqOk4qJHtTUkNUT1B9L3N5cy9jcnlwdG8qKQ0KPiArLmVycm9yIERvIG5vdCBp bmNsdWRlICQke1NSQ1RPUH0vc3lzIHdoZW4gYnVpbGRpbmcgYm9vdHN0cmFwIHRvb2xzLiBcDQo+ ICsgICAgQ29weSB0aGUgaGVhZGVyIHRvICQke1dPUkxEVE1QfS9sZWdhY3kgaW4gdG9vbHMvYnVp bGQvTWFrZWZpbGUgaW5zdGVhZC4gXA0KPiArICAgIEVycm9yIHdhcyBjYXVzZWQgYnkgTWFrZWZp bGUgaW4gJHsuQ1VSRElSfQ0KPiArLmVuZGlmDQo+ICsNCj4gKyMgJHtTUkNUT1B9L2luY2x1ZGUg c2hvdWxkIGFsc28gbmV2ZXIgYmUgdXNlZCB0byBhdm9pZCBBQkkgaXNzdWVzDQo+ICsuaWYgIWVt cHR5KENGTEFHUzpNKiR7U1JDVE9QfS9pbmNsdWRlKikNCj4gKy5lcnJvciBEbyBub3QgaW5jbHVk ZSAkJHtTUkNUT1B9L2luY2x1ZGUgd2hlbiBidWlsZGluZyBib290c3RyYXAgdG9vbHMuIFwNCj4g KyAgICBDb3B5IHRoZSBoZWFkZXIgdG8gJCR7V09STERUTVB9L2xlZ2FjeSBpbiB0b29scy9idWls ZC9NYWtlZmlsZSBpbnN0ZWFkLiBcDQo+ICsgICAgRXJyb3Igd2FzIGNhdXNlZCBieSBNYWtlZmls ZSBpbiAkey5DVVJESVJ9DQo+ICsuZW5kaWYNCj4gX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX18NCj4gc3ZuLXNyYy1oZWFkQGZyZWVic2Qub3JnIG1haWxpbmcg bGlzdA0KPiBodHRwczovL2xpc3RzLmZyZWVic2Qub3JnL21haWxtYW4vbGlzdGluZm8vc3ZuLXNy Yy1oZWFkDQo+IFRvIHVuc3Vic2NyaWJlLCBzZW5kIGFueSBtYWlsIHRvICJzdm4tc3JjLWhlYWQt dW5zdWJzY3JpYmVAZnJlZWJzZC5vcmciDQoNCg0KVGhpcyBjb21taXQgc2VlbXMgdG8gYnJlYWsg TmFub0JTRCBidWlsZHMhDQoNCldoaWxlIHIzMzgwOTUgc3RpbGwgYnVpbGQgbXkgTmFub0JTRCBv YmogdHJlZSwgPj0gcjMzODA5NiBmYWlscyB3aXRoOg0KDQpbLi4uXSANCi0gLS0tIG9ial9jcnVu Y2hkaXJfZ2JkZSAtLS0NCmNkIC9wb29sL3NvdXJjZXMvQ1VSUkVOVC9zcmMvcmVzY3VlL3Jlc2N1 ZS8uLi8uLi9zYmluL2diZGUgJiYgIE1LX1RFU1RTPW5vDQpVUERBVEVfREVQRU5ERklMRT1ubyAg X1JFQ1VSU0lOR19DUlVOQ0g9MQ0KTUFLRU9CSkRJUlBSRUZJWD0vcG9vbC9uYW5vYnNkL2FtZDY0 L0FMRVJJQ0hfYW1kNjQvcG9vbC9zb3VyY2VzL0NVUlJFTlQvc3JjL2FtZDY0LmFtZDY0L3Jlc2N1 ZS9yZXNjdWUNCm1ha2UgIE1LX0FVVE9fT0JKPW5vICBESVJQUkZYPXJlc2N1ZS9yZXNjdWUvZ2Jk ZS8gLURSRVNDVUUgQ1JVTkNIX0NGTEFHUz0tRFJFU0NVRQ0KTUtfQVVUT19PQko9bm8gICBvYmog bWFrZVs1XTogIi9wb29sL3NvdXJjZXMvQ1VSUkVOVC9zcmMvdG9vbHMvYnVpbGQvbWsvTWFrZWZp bGUuYm9vdCINCmxpbmUgMTg6IERvIG5vdCBpbmNsdWRlICR7U1JDVE9QfS9zeXMgd2hlbiBidWls ZGluZyBib290c3RyYXAgdG9vbHMuICBDb3B5IHRoZSBoZWFkZXIgdG8NCiR7V09STERUTVB9L2xl Z2FjeSBpbiB0b29scy9idWlsZC9NYWtlZmlsZSBpbnN0ZWFkLiAgRXJyb3Igd2FzIGNhdXNlZCBi eSBNYWtlZmlsZQ0KaW4gL3Bvb2wvc291cmNlcy9DVVJSRU5UL3NyYy9zYmluL2diZGUgKioqIFtv YmpfY3J1bmNoZGlyX2diZGVdIEVycm9yIGNvZGUgMQ0KDQoNCg0KDQotIC0tIA0KTy4gSGFydG1h bm4NCg0KSWNoIHdpZGVyc3ByZWNoZSBkZXIgTnV0enVuZyBvZGVyIMOcYmVybWl0dGx1bmcgbWVp bmVyIERhdGVuIGbDvHINCldlcmJlendlY2tlIG9kZXIgZsO8ciBkaWUgTWFya3QtIG9kZXIgTWVp bnVuZ3Nmb3JzY2h1bmcgKMKnIDI4IEFicy4gNCBCRFNHKS4NCi0tLS0tQkVHSU4gUEdQIFNJR05B VFVSRS0tLS0tDQoNCmlMVUVBUk1LQUIwV0lRUVpWWk16QXR3QzJULzg2VHJTNTI4ZnlGaFlsQVVD VzNzYWRRQUtDUkRTNTI4ZnlGaFkNCmxQTTdBZjRpUVh2UEFMb0R4bFFObkpYdVdzcWkrbnRKLzhS b1NIY3o5cmg3b1ZCT0lxQW0vTzhJUTQ2R3hLU1ANCmoxV2hVL21RMjZjTkNMZUUwUVI3dXVlRGhQ VkFBZjQyUVU1ejlpTzltWi9xMW1nZzB0RGhEa2taa2NQa3JiRm0NCm1qL2RXb3BQeWdGZ3B0eE9Z aVA3OEp6cDFJSGYyUUpqSENSbXYxM2ZiRThJcklPMEJuYkoNCj1GUzhKDQotLS0tLUVORCBQR1Ag U0lHTkFUVVJFLS0tLS0NCg== From owner-svn-src-head@freebsd.org Mon Aug 20 19:48: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 C607A107ACA5 for ; Mon, 20 Aug 2018 19:48:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (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 5620D7E8C8 for ; Mon, 20 Aug 2018 19:48:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x231.google.com with SMTP id v71-v6so1025080itb.3 for ; Mon, 20 Aug 2018 12:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=8tvmYva83WQ+/VoPCVyZcR02mTLbrUBuCNFyJQhp5Zs=; b=Y4ISaB/A+AUTrjrmaSp+o7lPy6vMr4cBK9dKNYs9e/7dJ7GtA1OQr92/C0+GGMUoge R4MmIhW8lSj4/MjNl+kVHhPKXjUPNgPEVt7iIFej1nFvI2F8GMY7emp1NFAFiWWgStQD ZVR1MlOn4gCgfpBX/qihnjZNoifbaDlvD+aGoLV6pPqQqg63OmFpuxDcfHBtDU/u1pWk rlL48w8afshWv63750WkHb8JTxxN7qdKkPb3NwGYc9sLOe9ft85ZisOUGbukiqHkKlwo 8bpk1JN7zJtSek4bZzpDD/WY9Nrtbyg9q6DuyjYvXnM4tS3FeAwIXI7cd9vhHoHtgh8s K2/g== 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=8tvmYva83WQ+/VoPCVyZcR02mTLbrUBuCNFyJQhp5Zs=; b=MwNPGpG73z0kuJT61zfLc96iEg329Hp+pUdfAS0Pn1bP38WMG7L7qmMUm+ObMBxNst RKTC45t3mZNBND5jzaAGnLncNdttdSV7fsZL5AINq0eQdQJ5/2AsekXBCCFl5+LuXrCK UcdEzrIBfe7353AjnL7cpNW1e1xmqNxVcmtEMWATCRtk3l6XO/a5WA4MHAdS4mb6OiK2 sw56QxLusfhN7ORuaYeI1b/sPPG/ThuY+EZU2GzvvyvoPCiOSU/j2cSUcQ+vub3hXXWA JUn6GELcMZ4ZlEUXnHigwSOFxsEoN0O8QZ9CW2oS8t7+oMZQdy2uDD6hCH8n4fFObD9T yGOA== X-Gm-Message-State: AOUpUlHoyIMR6Pgxx83v+bd9047fQHiAfS0Txbjdo80Bb6bFnCLFvlDB Wp1zQ6bfNz+Ppdl9NWdTazfBU9HFCN30XmKsuPYR4fagzQ8= X-Google-Smtp-Source: AA+uWPznutyOgrfpCEWYzLLPLGYCkxwsyEkFa/zcObTvlfuefR3VRAOzmKBOHe6+f8CBFjn9MTTXioKJJ75Kcw6NuMc= X-Received: by 2002:a24:83c6:: with SMTP id d189-v6mr14292025ite.75.1534794526539; Mon, 20 Aug 2018 12:48:46 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:2806:0:0:0:0:0 with HTTP; Mon, 20 Aug 2018 12:48:45 -0700 (PDT) X-Originating-IP: [50.227.106.226] In-Reply-To: <20180820214557.1f8ef5bd@thor.intern.walstatt.dynvpn.de> References: <201808201039.w7KAdhfX079450@repo.freebsd.org> <20180820214557.1f8ef5bd@thor.intern.walstatt.dynvpn.de> From: Warner Losh Date: Mon, 20 Aug 2018 13:48:45 -0600 X-Google-Sender-Auth: 7fkC9eL5-gjyxH7fruNlZD_FjWU Message-ID: Subject: Re: svn commit: r338096 - head/tools/build/mk To: "O. Hartmann" Cc: Alex Richardson , 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: Mon, 20 Aug 2018 19:48:48 -0000 On Mon, Aug 20, 2018 at 1:45 PM, O. Hartmann wrote= : > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Am Mon, 20 Aug 2018 10:39:43 +0000 (UTC) > Alex Richardson schrieb: > > > Author: arichardson > > Date: Mon Aug 20 10:39:42 2018 > > New Revision: 338096 > > URL: https://svnweb.freebsd.org/changeset/base/338096 > > > > Log: > > Avoid depending on system headers from the source tree during bootstr= ap > > > > This can cause surprising errors if the build tools is built against > > headers that don't match the host system. It is also required in orde= r > > to allow building on non-FreeBSD systems where the headers in > > /usr/include/sys are usually completely incompatible with those in th= e > > source tree. > > > > I added an error to Makefile.boot if this is done and found this was > > only the case in libnv. With this error in the Makefile ABI breakages > > such as r336019 should no longer be possible. > > > > Reviewed By: bdrewery, kevans > > Approved By: jhb (mentor) > > Differential Revision: https://reviews.freebsd.org/D16186 > > > > Modified: > > head/tools/build/mk/Makefile.boot > > > > Modified: head/tools/build/mk/Makefile.boot > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/tools/build/mk/Makefile.boot Mon Aug 20 10:39:37 2018 > (r338095) > > +++ head/tools/build/mk/Makefile.boot Mon Aug 20 10:39:42 2018 > (r338096) > > @@ -7,3 +7,20 @@ LDFLAGS+=3D -L${WORLDTMP}/legacy/usr/lib > > > > # we do not want to capture dependencies referring to the above > > UPDATE_DEPENDFILE=3D no > > + > > +# When building host tools we should never pull in headers from the > source sys > > +# directory to avoid any ABI issues that might cause the built binary > to crash. > > +# The only exceptions to this are sys/cddl/compat for dtrace bootstrap > tools and > > +# sys/crypto for libmd bootstrap. > > +.if !empty(CFLAGS:M*${SRCTOP}/sys*:N*${SRCTOP}/sys/cddl/compat*: > N*${SRCTOP}/sys/crypto*) > > +.error Do not include $${SRCTOP}/sys when building bootstrap tools. \ > > + Copy the header to $${WORLDTMP}/legacy in tools/build/Makefile > instead. \ > > + Error was caused by Makefile in ${.CURDIR} > > +.endif > > + > > +# ${SRCTOP}/include should also never be used to avoid ABI issues > > +.if !empty(CFLAGS:M*${SRCTOP}/include*) > > +.error Do not include $${SRCTOP}/include when building bootstrap tools= . > \ > > + Copy the header to $${WORLDTMP}/legacy in tools/build/Makefile > instead. \ > > + Error was caused by Makefile in ${.CURDIR} > > +.endif > > _______________________________________________ > > 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 seems to break NanoBSD builds! > > While r338095 still build my NanoBSD obj tree, >=3D r338096 fails with: > > [...] > - --- obj_crunchdir_gbde --- > cd /pool/sources/CURRENT/src/rescue/rescue/../../sbin/gbde && MK_TESTS= =3Dno > UPDATE_DEPENDFILE=3Dno _RECURSING_CRUNCH=3D1 > MAKEOBJDIRPREFIX=3D/pool/nanobsd/amd64/ALERICH_amd64/ > pool/sources/CURRENT/src/amd64.amd64/rescue/rescue > make MK_AUTO_OBJ=3Dno DIRPRFX=3Drescue/rescue/gbde/ -DRESCUE > CRUNCH_CFLAGS=3D-DRESCUE > MK_AUTO_OBJ=3Dno obj make[5]: "/pool/sources/CURRENT/src/ > tools/build/mk/Makefile.boot" > line 18: Do not include ${SRCTOP}/sys when building bootstrap tools. Cop= y > the header to > ${WORLDTMP}/legacy in tools/build/Makefile instead. Error was caused by > Makefile > in /pool/sources/CURRENT/src/sbin/gbde *** [obj_crunchdir_gbde] Error > code 1 > NanoBSD just does a buildworld with a few env vars, but nothing exotic.... And in the case of 'obj' target, who cares about the includes... Warner > - -- > O. Hartmann > > Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr > Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Ab= s. 4 BDSG). > -----BEGIN PGP SIGNATURE----- > > iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCW3sadQAKCRDS528fyFhY > lPM7Af4iQXvPALoDxlQNnJXuWsqi+ntJ/8RoSHcz9rh7oVBOIqAm/O8IQ46GxKSP > j1WhU/mQ26cNCLeE0QR7uueDhPVAAf42QU5z9iO9mZ/q1mgg0tDhDkkZkcPkrbFm > mj/dWopPygFgptxOYiP78Jzp1IHf2QJjHCRmv13fbE8IrIO0BnbJ > =3DFS8J > -----END PGP SIGNATURE----- > From owner-svn-src-head@freebsd.org Mon Aug 20 20:00:44 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 63A35107B0E4; Mon, 20 Aug 2018 20:00:44 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (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 D3F677F527; Mon, 20 Aug 2018 20:00:43 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([2.245.37.209]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lqm3a-1gMDIJ0Vnu-00eMs7; Mon, 20 Aug 2018 22:00:33 +0200 Date: Mon, 20 Aug 2018 21:59:58 +0200 From: "O. Hartmann" To: Warner Losh Cc: "O. Hartmann" , Alex Richardson , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338096 - head/tools/build/mk Message-ID: <20180820220025.6a3d141f@thor.intern.walstatt.dynvpn.de> In-Reply-To: References: <201808201039.w7KAdhfX079450@repo.freebsd.org> <20180820214557.1f8ef5bd@thor.intern.walstatt.dynvpn.de> 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:i2oSXE7vJ53+C2sIMK2KebrqMxXOaKFejZUBikaIa9G7041CbJw lbgScpFbJZUk76p2Mt/g8oj/uNK/U8gzlzdeZdsCJgwp9P6MTZayTOGFb9pklkkkrSwuVxD Y+7vAwZvGmY4qk3NX9Z1HYt/TXOYnSlE5GwO50+hJKoysBB/gCVMnrr6qpyYAAK3uSOoklV +OeNdSGFEXJv6Mr0fIZdw== X-UI-Out-Filterresults: notjunk:1;V01:K0:W7/9ph1OPX0=:s7AObCpt4oGtGCFeJESJ4H ndNDrTBAF+CAGp/9qkNqONrfahsIeE+GUekiYpgvQ0BMEa5ZM+uBqr4r5ibNH98wCkX3jrEZH x7a5qcx//t4uu4Ep+3nwq+/hPxfhpmgsZVY7yC5fTJEfQ2Qs7fCUS7xaq7WGDMI+XYCk0HzHx NWmWP075sNewMdV2mlLfluZqrpQQRfkE/bg5eUKgHK3oezKHJ55+2oxy4iXfByOS6HXr+MV/y EJd9SiYImXwQUCzAjwbPMmkj/J8Pe3his6deXyZLUzZqV21Si+lqEClRddnjTPbY9KjYIZUKu 6AWgoErX9oZvDwyeJVUuLLnp3xYlLivt8VmuZb2jkxGyqF35Cs9My/HVQG0WFTkvjk9aGiZuq gkuNmbuJPSluG9UYGBXyaLv3ESnTEwTh79hCxhEgB53Gii84DhyV2VBDLXBS8vuilmNomCdjA 6fLNqo87/e9n7FvKfjdcRwXGttXQ5BF0UThKPjFE++WkYD630N26yHyk8Z5VpPOXAj7xZ0aem 9G7SD2wBiEjuYWzrxHk3Sw1BW2xAuoPGqMmkJP662Aypmv9vqfDNJzbgxniokRvXNM1xAa5RD vArPABXEo4DaXfVb+EXZRe9NcqJNqZpRDSVR3640el3tuf74CA4W+DVLXFtlgWuahsHK2wFGq xiQpNAQluvsJu8RY+We7AmRoLRIBjxWBXAt/175nKEcieRyjgcJY0YKCXnTJX6KQW6BEcV85g ofIObyhV0vjg0EDgqCr6cPH4HtXrwpsqyKG9sVfIP9kdKqlU6Ax5M/EBVwS+JeTEhfE35VDLb jhXPOBhHNtNySy2ZZMA/DGDT4xlRnMICoxGGFMxmilETDrf+N3qtSOWvyRZKf8iOBmPRKbW6q RQsDrd3vk9d3A976+FzhQrkn1oGN/Q2rKMkt0oH+6limh4ytLuzZ1UWmUeH+3zz8z6hXaC80m 9Es+Arj5qKCHpqX78SV/ARHs71/vv620= 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, 20 Aug 2018 20:00:44 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBNTEyDQoNCkFtIE1v biwgMjAgQXVnIDIwMTggMTM6NDg6NDUgLTA2MDANCldhcm5lciBMb3NoIDxpbXBAYnNkaW1wLmNv bT4gc2NocmllYjoNCg0KPiBPbiBNb24sIEF1ZyAyMCwgMjAxOCBhdCAxOjQ1IFBNLCBPLiBIYXJ0 bWFubiA8b2hhcnRtYW5uQHdhbHN0YXR0Lm9yZz4gd3JvdGU6DQo+IA0KPiA+IC0tLS0tQkVHSU4g UEdQIFNJR05FRCBNRVNTQUdFLS0tLS0NCj4gPiBIYXNoOiBTSEE1MTINCj4gPg0KPiA+IEFtIE1v biwgMjAgQXVnIDIwMTggMTA6Mzk6NDMgKzAwMDAgKFVUQykNCj4gPiBBbGV4IFJpY2hhcmRzb24g PGFyaWNoYXJkc29uQEZyZWVCU0Qub3JnPiBzY2hyaWViOg0KPiA+ICANCj4gPiA+IEF1dGhvcjog YXJpY2hhcmRzb24NCj4gPiA+IERhdGU6IE1vbiBBdWcgMjAgMTA6Mzk6NDIgMjAxOA0KPiA+ID4g TmV3IFJldmlzaW9uOiAzMzgwOTYNCj4gPiA+IFVSTDogaHR0cHM6Ly9zdm53ZWIuZnJlZWJzZC5v cmcvY2hhbmdlc2V0L2Jhc2UvMzM4MDk2DQo+ID4gPg0KPiA+ID4gTG9nOg0KPiA+ID4gICBBdm9p ZCBkZXBlbmRpbmcgb24gc3lzdGVtIGhlYWRlcnMgZnJvbSB0aGUgc291cmNlIHRyZWUgZHVyaW5n IGJvb3RzdHJhcA0KPiA+ID4NCj4gPiA+ICAgVGhpcyBjYW4gY2F1c2Ugc3VycHJpc2luZyBlcnJv cnMgaWYgdGhlIGJ1aWxkIHRvb2xzIGlzIGJ1aWx0IGFnYWluc3QNCj4gPiA+ICAgaGVhZGVycyB0 aGF0IGRvbid0IG1hdGNoIHRoZSBob3N0IHN5c3RlbS4gSXQgaXMgYWxzbyByZXF1aXJlZCBpbiBv cmRlcg0KPiA+ID4gICB0byBhbGxvdyBidWlsZGluZyBvbiBub24tRnJlZUJTRCBzeXN0ZW1zIHdo ZXJlIHRoZSBoZWFkZXJzIGluDQo+ID4gPiAgIC91c3IvaW5jbHVkZS9zeXMgYXJlIHVzdWFsbHkg Y29tcGxldGVseSBpbmNvbXBhdGlibGUgd2l0aCB0aG9zZSBpbiB0aGUNCj4gPiA+ICAgc291cmNl IHRyZWUuDQo+ID4gPg0KPiA+ID4gICBJIGFkZGVkIGFuIGVycm9yIHRvIE1ha2VmaWxlLmJvb3Qg aWYgdGhpcyBpcyBkb25lIGFuZCBmb3VuZCB0aGlzIHdhcw0KPiA+ID4gICBvbmx5IHRoZSBjYXNl IGluIGxpYm52LiBXaXRoIHRoaXMgZXJyb3IgaW4gdGhlIE1ha2VmaWxlIEFCSSBicmVha2FnZXMN Cj4gPiA+ICAgc3VjaCBhcyByMzM2MDE5IHNob3VsZCBubyBsb25nZXIgYmUgcG9zc2libGUuDQo+ ID4gPg0KPiA+ID4gICBSZXZpZXdlZCBCeTogICAgICAgIGJkcmV3ZXJ5LCBrZXZhbnMNCj4gPiA+ ICAgQXBwcm92ZWQgQnk6ICAgICAgICBqaGIgKG1lbnRvcikNCj4gPiA+ICAgRGlmZmVyZW50aWFs IFJldmlzaW9uOiBodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDE2MTg2DQo+ID4gPg0KPiA+ ID4gTW9kaWZpZWQ6DQo+ID4gPiAgIGhlYWQvdG9vbHMvYnVpbGQvbWsvTWFrZWZpbGUuYm9vdA0K PiA+ID4NCj4gPiA+IE1vZGlmaWVkOiBoZWFkL3Rvb2xzL2J1aWxkL21rL01ha2VmaWxlLmJvb3QN Cj4gPiA+ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PSAgDQo+ID4gPT09PT09PT09PT09PT09PT09ICANCj4gPiA+IC0tLSBoZWFkL3Rv b2xzL2J1aWxkL21rL01ha2VmaWxlLmJvb3QgTW9uIEF1ZyAyMCAxMDozOTozNyAyMDE4ICANCj4g PiAocjMzODA5NSkgIA0KPiA+ID4gKysrIGhlYWQvdG9vbHMvYnVpbGQvbWsvTWFrZWZpbGUuYm9v dCBNb24gQXVnIDIwIDEwOjM5OjQyIDIwMTggIA0KPiA+IChyMzM4MDk2KSAgDQo+ID4gPiBAQCAt NywzICs3LDIwIEBAIExERkxBR1MrPSAgICAtTCR7V09STERUTVB9L2xlZ2FjeS91c3IvbGliDQo+ ID4gPg0KPiA+ID4gICMgd2UgZG8gbm90IHdhbnQgdG8gY2FwdHVyZSBkZXBlbmRlbmNpZXMgcmVm ZXJyaW5nIHRvIHRoZSBhYm92ZQ0KPiA+ID4gIFVQREFURV9ERVBFTkRGSUxFPSBubw0KPiA+ID4g Kw0KPiA+ID4gKyMgV2hlbiBidWlsZGluZyBob3N0IHRvb2xzIHdlIHNob3VsZCBuZXZlciBwdWxs IGluIGhlYWRlcnMgZnJvbSB0aGUgIA0KPiA+IHNvdXJjZSBzeXMgIA0KPiA+ID4gKyMgZGlyZWN0 b3J5IHRvIGF2b2lkIGFueSBBQkkgaXNzdWVzIHRoYXQgbWlnaHQgY2F1c2UgdGhlIGJ1aWx0IGJp bmFyeSAgDQo+ID4gdG8gY3Jhc2guICANCj4gPiA+ICsjIFRoZSBvbmx5IGV4Y2VwdGlvbnMgdG8g dGhpcyBhcmUgc3lzL2NkZGwvY29tcGF0IGZvciBkdHJhY2UgYm9vdHN0cmFwICANCj4gPiB0b29s cyBhbmQgIA0KPiA+ID4gKyMgc3lzL2NyeXB0byBmb3IgbGlibWQgYm9vdHN0cmFwLg0KPiA+ID4g Ky5pZiAhZW1wdHkoQ0ZMQUdTOk0qJHtTUkNUT1B9L3N5cyo6Tioke1NSQ1RPUH0vc3lzL2NkZGwv Y29tcGF0KjogIA0KPiA+IE4qJHtTUkNUT1B9L3N5cy9jcnlwdG8qKSAgDQo+ID4gPiArLmVycm9y IERvIG5vdCBpbmNsdWRlICQke1NSQ1RPUH0vc3lzIHdoZW4gYnVpbGRpbmcgYm9vdHN0cmFwIHRv b2xzLiBcDQo+ID4gPiArICAgIENvcHkgdGhlIGhlYWRlciB0byAkJHtXT1JMRFRNUH0vbGVnYWN5 IGluIHRvb2xzL2J1aWxkL01ha2VmaWxlICANCj4gPiBpbnN0ZWFkLiBcICANCj4gPiA+ICsgICAg RXJyb3Igd2FzIGNhdXNlZCBieSBNYWtlZmlsZSBpbiAkey5DVVJESVJ9DQo+ID4gPiArLmVuZGlm DQo+ID4gPiArDQo+ID4gPiArIyAke1NSQ1RPUH0vaW5jbHVkZSBzaG91bGQgYWxzbyBuZXZlciBi ZSB1c2VkIHRvIGF2b2lkIEFCSSBpc3N1ZXMNCj4gPiA+ICsuaWYgIWVtcHR5KENGTEFHUzpNKiR7 U1JDVE9QfS9pbmNsdWRlKikNCj4gPiA+ICsuZXJyb3IgRG8gbm90IGluY2x1ZGUgJCR7U1JDVE9Q fS9pbmNsdWRlIHdoZW4gYnVpbGRpbmcgYm9vdHN0cmFwIHRvb2xzLiAgDQo+ID4gXCAgDQo+ID4g PiArICAgIENvcHkgdGhlIGhlYWRlciB0byAkJHtXT1JMRFRNUH0vbGVnYWN5IGluIHRvb2xzL2J1 aWxkL01ha2VmaWxlICANCj4gPiBpbnN0ZWFkLiBcICANCj4gPiA+ICsgICAgRXJyb3Igd2FzIGNh dXNlZCBieSBNYWtlZmlsZSBpbiAkey5DVVJESVJ9DQo+ID4gPiArLmVuZGlmDQo+ID4gPiBfX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXw0KPiA+ID4gc3ZuLXNy Yy1oZWFkQGZyZWVic2Qub3JnIG1haWxpbmcgbGlzdA0KPiA+ID4gaHR0cHM6Ly9saXN0cy5mcmVl YnNkLm9yZy9tYWlsbWFuL2xpc3RpbmZvL3N2bi1zcmMtaGVhZA0KPiA+ID4gVG8gdW5zdWJzY3Jp YmUsIHNlbmQgYW55IG1haWwgdG8gInN2bi1zcmMtaGVhZC11bnN1YnNjcmliZUBmcmVlYnNkLm9y ZyIgIA0KPiA+DQo+ID4NCj4gPiBUaGlzIGNvbW1pdCBzZWVtcyB0byBicmVhayBOYW5vQlNEIGJ1 aWxkcyENCj4gPg0KPiA+IFdoaWxlIHIzMzgwOTUgc3RpbGwgYnVpbGQgbXkgTmFub0JTRCBvYmog dHJlZSwgPj0gcjMzODA5NiBmYWlscyB3aXRoOg0KPiA+DQo+ID4gWy4uLl0NCj4gPiAtIC0tLSBv YmpfY3J1bmNoZGlyX2diZGUgLS0tDQo+ID4gY2QgL3Bvb2wvc291cmNlcy9DVVJSRU5UL3NyYy9y ZXNjdWUvcmVzY3VlLy4uLy4uL3NiaW4vZ2JkZSAmJiAgTUtfVEVTVFM9bm8NCj4gPiBVUERBVEVf REVQRU5ERklMRT1ubyAgX1JFQ1VSU0lOR19DUlVOQ0g9MQ0KPiA+IE1BS0VPQkpESVJQUkVGSVg9 L3Bvb2wvbmFub2JzZC9hbWQ2NC9BTEVSSUNIX2FtZDY0Lw0KPiA+IHBvb2wvc291cmNlcy9DVVJS RU5UL3NyYy9hbWQ2NC5hbWQ2NC9yZXNjdWUvcmVzY3VlDQo+ID4gbWFrZSAgTUtfQVVUT19PQko9 bm8gIERJUlBSRlg9cmVzY3VlL3Jlc2N1ZS9nYmRlLyAtRFJFU0NVRQ0KPiA+IENSVU5DSF9DRkxB R1M9LURSRVNDVUUNCj4gPiBNS19BVVRPX09CSj1ubyAgIG9iaiBtYWtlWzVdOiAiL3Bvb2wvc291 cmNlcy9DVVJSRU5UL3NyYy8NCj4gPiB0b29scy9idWlsZC9tay9NYWtlZmlsZS5ib290Ig0KPiA+ IGxpbmUgMTg6IERvIG5vdCBpbmNsdWRlICR7U1JDVE9QfS9zeXMgd2hlbiBidWlsZGluZyBib290 c3RyYXAgdG9vbHMuICBDb3B5DQo+ID4gdGhlIGhlYWRlciB0bw0KPiA+ICR7V09STERUTVB9L2xl Z2FjeSBpbiB0b29scy9idWlsZC9NYWtlZmlsZSBpbnN0ZWFkLiAgRXJyb3Igd2FzIGNhdXNlZCBi eQ0KPiA+IE1ha2VmaWxlDQo+ID4gaW4gL3Bvb2wvc291cmNlcy9DVVJSRU5UL3NyYy9zYmluL2di ZGUgKioqIFtvYmpfY3J1bmNoZGlyX2diZGVdIEVycm9yDQo+ID4gY29kZSAxDQo+ID4gIA0KPiAN Cj4gDQo+IE5hbm9CU0QganVzdCBkb2VzIGEgYnVpbGR3b3JsZCB3aXRoIGEgZmV3IGVudiB2YXJz LCBidXQgbm90aGluZyBleG90aWMuLi4uDQo+IA0KPiBBbmQgaW4gdGhlIGNhc2Ugb2YgJ29iaicg dGFyZ2V0LCB3aG8gY2FyZXMgYWJvdXQgdGhlIGluY2x1ZGVzLi4uDQo+IA0KPiBXYXJuZXINCg0K U28sIGhvdyB0byBleHBsYWluIHIzMzgwOTUgd29ya3MsIHIzMzgwOTYgZG9lc24ndD8NCg0KLSAt LSANCk8uIEhhcnRtYW5uDQoNCkljaCB3aWRlcnNwcmVjaGUgZGVyIE51dHp1bmcgb2RlciDDnGJl cm1pdHRsdW5nIG1laW5lciBEYXRlbiBmw7xyDQpXZXJiZXp3ZWNrZSBvZGVyIGbDvHIgZGllIE1h cmt0LSBvZGVyIE1laW51bmdzZm9yc2NodW5nICjCpyAyOCBBYnMuIDQgQkRTRykuDQotLS0tLUJF R0lOIFBHUCBTSUdOQVRVUkUtLS0tLQ0KDQppTFVFQVJNS0FCMFdJUVFaVlpNekF0d0MyVC84NlRy UzUyOGZ5RmhZbEFVQ1czc2QyUUFLQ1JEUzUyOGZ5RmhZDQpsRnZlQWY5U3d2cDRkdURkN25oOU1X Z1gzbkVkcy9oRkNPNnZpQUpMR0xacVJ6SkNBOHJJYlpLSVJBaCszMU9EDQpacUovWlprOXZFUFF1 MitmMG8xWWRiV3pTUVlaQWY5eDlDYmppYm1INVpRK08rQlgwRjNtQVBkRWhDc1p1L2ZhDQptcDRU V1YvRXF3SmVGUnJrMVQxQ3Fmd1M4K3ZNUGsrUzkrY3JXNk9ESU5sLzJvQTVERm9LDQo9eWphUA0K LS0tLS1FTkQgUEdQIFNJR05BVFVSRS0tLS0tDQo= From owner-svn-src-head@freebsd.org Mon Aug 20 20:06: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 0548D107B2F3; Mon, 20 Aug 2018 20:06:37 +0000 (UTC) (envelope-from bz@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 AB8ED7F81B; Mon, 20 Aug 2018 20:06:36 +0000 (UTC) (envelope-from bz@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 856D019F07; Mon, 20 Aug 2018 20:06:36 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KK6afa095478; Mon, 20 Aug 2018 20:06:36 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KK6aO1095477; Mon, 20 Aug 2018 20:06:36 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201808202006.w7KK6aO1095477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 20 Aug 2018 20:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338115 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 338115 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, 20 Aug 2018 20:06:37 -0000 Author: bz Date: Mon Aug 20 20:06:36 2018 New Revision: 338115 URL: https://svnweb.freebsd.org/changeset/base/338115 Log: GC inc_isipv6; it was added for "temp" compatibility in 2001, r86764 and does not seem to be used. Modified: head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Mon Aug 20 19:39:49 2018 (r338114) +++ head/sys/netinet/in_pcb.h Mon Aug 20 20:06:36 2018 (r338115) @@ -123,7 +123,6 @@ struct in_conninfo { */ #define INC_ISIPV6 0x01 -#define inc_isipv6 inc_flags /* temp compatibility */ #define inc_fport inc_ie.ie_fport #define inc_lport inc_ie.ie_lport #define inc_faddr inc_ie.ie_faddr From owner-svn-src-head@freebsd.org Mon Aug 20 20:12: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 305BD107B9F7 for ; Mon, 20 Aug 2018 20:12:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::22c]) (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 B39027FE78 for ; Mon, 20 Aug 2018 20:12:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22c.google.com with SMTP id 72-v6so1130274itw.3 for ; Mon, 20 Aug 2018 13:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=pipuywTftiphXnHXXE47dsiRXPr0OQlKm7PLKVDVD3I=; b=XqIQ1m5HojcatFx6iIJ7SL/vEjaxGTRL+aZp/49XSDrT+GYcGCHWx/DvggS7uDhPGs Q4NgyiwSMVRD8jYmGWuMK7agyj4pyOU3vpueiwO2gWzJmNB7vvBNC+6vG2XfV4WbzCgw VsekT03fEeOGC6nRsdynhgEo3vMzXQ9CBL0dlRULLbPbdNhCZMDrkR5xpWkyHlLT72jT F+y2s8zQvryQav2CFryrQxRvXkbOxgxtZwMhdM0U2uRSMcNuz5YqzXyBwh30jw2RuE6o zUPQx/yCImKG9Oi2T94jrcm4lFC/xLZ17ShrFmX0L6nTU90H3/pRG9pSp9dIi7qcTWSI SCZA== 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=pipuywTftiphXnHXXE47dsiRXPr0OQlKm7PLKVDVD3I=; b=KX0SLcwy+ZCn7vPB5muzxxaIeEF37zkJXpFwDstTySWQTQtT9PN5IcrFSLaSmfZMkz W8QPjsxMGGZtMIxHlV2pjE78jj0sI0DvCnCKhO63+IUzRNER/xIjLB0FtxW50mkvy5Jh sPEkLnmuzKUvm4LPO+L26T2z/JV6QQhGYUZZiScRp2xEWF6c9TTZTEH1VDi+7F/N3+4d CDl85Hb/6fehvBHCZOkQTkoUbngrJSwFzR6MDp9wZptAr0TtF5CeqW7v/B9rmykaZRsM 7CrXPmM4u+pZmUZR7ySUPd7Jl+c0/sTWlTapckp59sP6L6Wg0LMyyyMavHmrmRKXlSHh QJDA== X-Gm-Message-State: AOUpUlF1Drm5vSJEObNC+GloOJ54PS1J79p5EF4mUkAV7UCons/4kzCz cZ0zrB4D/x/ErFs1aTYcWCMFGZapvUMi6xfKVOqIe5EP1Q4= X-Google-Smtp-Source: AA+uWPwskMSly0vTMI68oQHnYjA9btw+rCDDndz9BS0DI2dGbz9pIT16yA7rRog0XpcEH/n7ZL29wlDdvPVRp29/Txk= X-Received: by 2002:a24:9197:: with SMTP id i145-v6mr13484674ite.39.1534795929859; Mon, 20 Aug 2018 13:12:09 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:2806:0:0:0:0:0 with HTTP; Mon, 20 Aug 2018 13:12:09 -0700 (PDT) X-Originating-IP: [50.227.106.226] In-Reply-To: <20180820220025.6a3d141f@thor.intern.walstatt.dynvpn.de> References: <201808201039.w7KAdhfX079450@repo.freebsd.org> <20180820214557.1f8ef5bd@thor.intern.walstatt.dynvpn.de> <20180820220025.6a3d141f@thor.intern.walstatt.dynvpn.de> From: Warner Losh Date: Mon, 20 Aug 2018 14:12:09 -0600 X-Google-Sender-Auth: auufSqG-KYyVB-31adl9jY7PxEY Message-ID: Subject: Re: svn commit: r338096 - head/tools/build/mk To: "O. Hartmann" Cc: "O. Hartmann" , Alex Richardson , src-committers , 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: Mon, 20 Aug 2018 20:12:11 -0000 On Mon, Aug 20, 2018 at 1:59 PM, O. Hartmann wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Am Mon, 20 Aug 2018 13:48:45 -0600 > Warner Losh schrieb: > > > On Mon, Aug 20, 2018 at 1:45 PM, O. Hartmann > wrote: > > > > > -----BEGIN PGP SIGNED MESSAGE----- > > > Hash: SHA512 > > > > > > Am Mon, 20 Aug 2018 10:39:43 +0000 (UTC) > > > Alex Richardson schrieb: > > > > > > > Author: arichardson > > > > Date: Mon Aug 20 10:39:42 2018 > > > > New Revision: 338096 > > > > URL: https://svnweb.freebsd.org/changeset/base/338096 > > > > > > > > Log: > > > > Avoid depending on system headers from the source tree during > bootstrap > > > > > > > > This can cause surprising errors if the build tools is built > against > > > > headers that don't match the host system. It is also required in > order > > > > to allow building on non-FreeBSD systems where the headers in > > > > /usr/include/sys are usually completely incompatible with those in > the > > > > source tree. > > > > > > > > I added an error to Makefile.boot if this is done and found this > was > > > > only the case in libnv. With this error in the Makefile ABI > breakages > > > > such as r336019 should no longer be possible. > > > > > > > > Reviewed By: bdrewery, kevans > > > > Approved By: jhb (mentor) > > > > Differential Revision: https://reviews.freebsd.org/D16186 > > > > > > > > Modified: > > > > head/tools/build/mk/Makefile.boot > > > > > > > > Modified: head/tools/build/mk/Makefile.boot > > > > ============================================================ > > > ================== > > > > --- head/tools/build/mk/Makefile.boot Mon Aug 20 10:39:37 2018 > > > (r338095) > > > > +++ head/tools/build/mk/Makefile.boot Mon Aug 20 10:39:42 2018 > > > (r338096) > > > > @@ -7,3 +7,20 @@ LDFLAGS+= -L${WORLDTMP}/legacy/usr/lib > > > > > > > > # we do not want to capture dependencies referring to the above > > > > UPDATE_DEPENDFILE= no > > > > + > > > > +# When building host tools we should never pull in headers from > the > > > source sys > > > > +# directory to avoid any ABI issues that might cause the built > binary > > > to crash. > > > > +# The only exceptions to this are sys/cddl/compat for dtrace > bootstrap > > > tools and > > > > +# sys/crypto for libmd bootstrap. > > > > +.if !empty(CFLAGS:M*${SRCTOP}/sys*:N*${SRCTOP}/sys/cddl/compat*: > > > N*${SRCTOP}/sys/crypto*) > > > > +.error Do not include $${SRCTOP}/sys when building bootstrap tools. > \ > > > > + Copy the header to $${WORLDTMP}/legacy in tools/build/Makefile > > > instead. \ > > > > + Error was caused by Makefile in ${.CURDIR} > > > > +.endif > > > > + > > > > +# ${SRCTOP}/include should also never be used to avoid ABI issues > > > > +.if !empty(CFLAGS:M*${SRCTOP}/include*) > > > > +.error Do not include $${SRCTOP}/include when building bootstrap > tools. > > > \ > > > > + Copy the header to $${WORLDTMP}/legacy in tools/build/Makefile > > > instead. \ > > > > + Error was caused by Makefile in ${.CURDIR} > > > > +.endif > > > > _______________________________________________ > > > > 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 seems to break NanoBSD builds! > > > > > > While r338095 still build my NanoBSD obj tree, >= r338096 fails with: > > > > > > [...] > > > - --- obj_crunchdir_gbde --- > > > cd /pool/sources/CURRENT/src/rescue/rescue/../../sbin/gbde && > MK_TESTS=no > > > UPDATE_DEPENDFILE=no _RECURSING_CRUNCH=1 > > > MAKEOBJDIRPREFIX=/pool/nanobsd/amd64/ALERICH_amd64/ > > > pool/sources/CURRENT/src/amd64.amd64/rescue/rescue > > > make MK_AUTO_OBJ=no DIRPRFX=rescue/rescue/gbde/ -DRESCUE > > > CRUNCH_CFLAGS=-DRESCUE > > > MK_AUTO_OBJ=no obj make[5]: "/pool/sources/CURRENT/src/ > > > tools/build/mk/Makefile.boot" > > > line 18: Do not include ${SRCTOP}/sys when building bootstrap tools. > Copy > > > the header to > > > ${WORLDTMP}/legacy in tools/build/Makefile instead. Error was caused > by > > > Makefile > > > in /pool/sources/CURRENT/src/sbin/gbde *** [obj_crunchdir_gbde] Error > > > code 1 > > > > > > > > > NanoBSD just does a buildworld with a few env vars, but nothing > exotic.... > > > > And in the case of 'obj' target, who cares about the includes... > > > > Warner > > So, how to explain r338095 works, r338096 doesn't? > I'm unsure. I've not had a chance to look closely... Warner From owner-svn-src-head@freebsd.org Mon Aug 20 20:31:58 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 B226D107BF4A; Mon, 20 Aug 2018 20:31:58 +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 686DC80710; Mon, 20 Aug 2018 20:31: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 499261A369; Mon, 20 Aug 2018 20:31:58 +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 w7KKVwnv010697; Mon, 20 Aug 2018 20:31:58 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KKVrbj008238; Mon, 20 Aug 2018 20:31:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201808202031.w7KKVrbj008238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 20 Aug 2018 20:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338116 - in head/sys/arm: conf nvidia/tegra124 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/arm: conf nvidia/tegra124 X-SVN-Commit-Revision: 338116 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, 20 Aug 2018 20:31:58 -0000 Author: imp Date: Mon Aug 20 20:31:53 2018 New Revision: 338116 URL: https://svnweb.freebsd.org/changeset/base/338116 Log: Move options INTRNG into std.armv6 and std.armv7 INTRNG is required on all armv6 and armv7 systems, so make it standard. Modified: head/sys/arm/conf/ALPINE head/sys/arm/conf/ARMADA38X head/sys/arm/conf/ARMADAXP head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/EXYNOS5.common head/sys/arm/conf/GENERIC head/sys/arm/conf/IMX53 head/sys/arm/conf/IMX6 head/sys/arm/conf/ODROIDC1 head/sys/arm/conf/PANDABOARD head/sys/arm/conf/RK3188 head/sys/arm/conf/RPI-B head/sys/arm/conf/RPI2 head/sys/arm/conf/SOCFPGA head/sys/arm/conf/VERSATILEPB head/sys/arm/conf/VSATV102 head/sys/arm/conf/VYBRID head/sys/arm/conf/ZEDBOARD head/sys/arm/conf/std.armv6 head/sys/arm/conf/std.armv7 head/sys/arm/nvidia/tegra124/std.tegra124 Modified: head/sys/arm/conf/ALPINE ============================================================================== --- head/sys/arm/conf/ALPINE Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/ALPINE Mon Aug 20 20:31:53 2018 (r338116) @@ -31,7 +31,6 @@ options PLATFORM # Interrupt controller device gic -options INTRNG # Annapurna Alpine drivers device al_ccu # Alpine Cache Coherency Unit Modified: head/sys/arm/conf/ARMADA38X ============================================================================== --- head/sys/arm/conf/ARMADA38X Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/ARMADA38X Mon Aug 20 20:31:53 2018 (r338116) @@ -50,7 +50,6 @@ device pci # Interrupt controllers device gic -options INTRNG # Timers device mpcore_timer Modified: head/sys/arm/conf/ARMADAXP ============================================================================== --- head/sys/arm/conf/ARMADAXP Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/ARMADAXP Mon Aug 20 20:31:53 2018 (r338116) @@ -18,7 +18,6 @@ # # $FreeBSD$ -# TODO: Port to INTRNG #NO_UNIVERSE ident MV-88F78XX0 @@ -88,7 +87,5 @@ device pci options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=db78460.dts - -options INTRNG options PLATFORM Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/BEAGLEBONE Mon Aug 20 20:31:53 2018 (r338116) @@ -28,8 +28,6 @@ include "../ti/am335x/std.am335x" makeoptions MODULES_EXTRA="dtb/am335x am335x_dmtpps" -options INTRNG - options SCHED_4BSD # 4BSD scheduler options PLATFORM Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/EFIKA_MX Mon Aug 20 20:31:53 2018 (r338116) @@ -131,5 +131,3 @@ options SC_DFLT_FONT # compile font in makeoptions SC_DFLT_FONT=cp437 device ukbd # Allow keyboard like HIDs to control console device ums - -options INTRNG Modified: head/sys/arm/conf/EXYNOS5.common ============================================================================== --- head/sys/arm/conf/EXYNOS5.common Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/EXYNOS5.common Mon Aug 20 20:31:53 2018 (r338116) @@ -73,7 +73,6 @@ device dwmmc # Interrupt controller device gic -options INTRNG # ARM Generic Timer device generic_timer Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/GENERIC Mon Aug 20 20:31:53 2018 (r338116) @@ -80,7 +80,6 @@ device syscon device cpufreq # Interrupt controller -options INTRNG device gic # PMU support (for CCNT). Modified: head/sys/arm/conf/IMX53 ============================================================================== --- head/sys/arm/conf/IMX53 Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/IMX53 Mon Aug 20 20:31:53 2018 (r338116) @@ -119,5 +119,3 @@ device wlan_amrr # AMRR transmit rate control algori options FDT # Configure using FDT/DTB data makeoptions MODULES_EXTRA="dtb/imx5 imx" device fdt_pinctrl # FDT pinmux driver - -options INTRNG Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/IMX6 Mon Aug 20 20:31:53 2018 (r338116) @@ -22,8 +22,6 @@ ident IMX6 include "std.armv7" include "../freescale/imx/std.imx6" -options INTRNG - options SOC_IMX6 options SCHED_ULE # ULE scheduler Modified: head/sys/arm/conf/ODROIDC1 ============================================================================== --- head/sys/arm/conf/ODROIDC1 Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/ODROIDC1 Mon Aug 20 20:31:53 2018 (r338116) @@ -26,7 +26,6 @@ options SMP # Enable multiple cores # Interrupt controller device gic -options INTRNG options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=odroidc1.dts Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/PANDABOARD Mon Aug 20 20:31:53 2018 (r338116) @@ -46,7 +46,6 @@ options SMP # Enable multiple cores device fdt_pinctrl # Interrupt controller device gic -options INTRNG # ARM MPCore timer device mpcore_timer Modified: head/sys/arm/conf/RK3188 ============================================================================== --- head/sys/arm/conf/RK3188 Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/RK3188 Mon Aug 20 20:31:53 2018 (r338116) @@ -36,7 +36,6 @@ options ROOTDEVNAME=\"ufs:/dev/mmcsd0\" # Interrupt controller device gic -options INTRNG # ARM MPCore timer device mpcore_timer Modified: head/sys/arm/conf/RPI-B ============================================================================== --- head/sys/arm/conf/RPI-B Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/RPI-B Mon Aug 20 20:31:53 2018 (r338116) @@ -24,8 +24,6 @@ include "std.armv6" include "../broadcom/bcm2835/std.rpi" include "../broadcom/bcm2835/std.bcm2835" -options INTRNG - options SCHED_4BSD # 4BSD scheduler options PLATFORM Modified: head/sys/arm/conf/RPI2 ============================================================================== --- head/sys/arm/conf/RPI2 Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/RPI2 Mon Aug 20 20:31:53 2018 (r338116) @@ -26,8 +26,6 @@ include "std.armv7" include "../broadcom/bcm2835/std.rpi" include "../broadcom/bcm2835/std.bcm2836" -options INTRNG - options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM Modified: head/sys/arm/conf/SOCFPGA ============================================================================== --- head/sys/arm/conf/SOCFPGA Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/SOCFPGA Mon Aug 20 20:31:53 2018 (r338116) @@ -42,7 +42,6 @@ options SOC_ALTERA_CYCLONE5 # Interrupt controller device gic -options INTRNG # ARM MPCore timer device mpcore_timer Modified: head/sys/arm/conf/VERSATILEPB ============================================================================== --- head/sys/arm/conf/VERSATILEPB Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/VERSATILEPB Mon Aug 20 20:31:53 2018 (r338116) @@ -68,7 +68,6 @@ makeoptions SC_DFLT_FONT=cp437 device md device random # Entropy device -options INTRNG options PLATFORM # Flattened Device Tree Modified: head/sys/arm/conf/VSATV102 ============================================================================== --- head/sys/arm/conf/VSATV102 Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/VSATV102 Mon Aug 20 20:31:53 2018 (r338116) @@ -26,7 +26,6 @@ options SMP # Enable multiple cores # Interrupt controller device gic -options INTRNG options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=vsatv102-m6.dts Modified: head/sys/arm/conf/VYBRID ============================================================================== --- head/sys/arm/conf/VYBRID Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/VYBRID Mon Aug 20 20:31:53 2018 (r338116) @@ -47,7 +47,6 @@ options NO_SWAPPING # Interrupt controller device gic -options INTRNG # ARM MPCore timer device mpcore_timer Modified: head/sys/arm/conf/ZEDBOARD ============================================================================== --- head/sys/arm/conf/ZEDBOARD Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/ZEDBOARD Mon Aug 20 20:31:53 2018 (r338116) @@ -41,7 +41,6 @@ options ROOTDEVNAME=\"ufs:mmcsd0s2a\" # Interrupt controller device gic -options INTRNG # Cache controller device pl310 # PL310 L2 cache controller Modified: head/sys/arm/conf/std.armv6 ============================================================================== --- head/sys/arm/conf/std.armv6 Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/std.armv6 Mon Aug 20 20:31:53 2018 (r338116) @@ -4,6 +4,7 @@ options HZ=1000 options ARM_L2_PIPT # Only L2 PIPT is supported +options INTRNG # All arm systems use INTRNG these days options PREEMPTION # Enable kernel thread preemption options VIMAGE # Subsystem virtualization, e.g. VNET options INET # InterNETworking Modified: head/sys/arm/conf/std.armv7 ============================================================================== --- head/sys/arm/conf/std.armv7 Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/conf/std.armv7 Mon Aug 20 20:31:53 2018 (r338116) @@ -4,6 +4,7 @@ options HZ=1000 options ARM_L2_PIPT # Only L2 PIPT is supported +options INTRNG # All arm systems use INTRNG these days options PREEMPTION # Enable kernel thread preemption options VIMAGE # Subsystem virtualization, e.g. VNET options INET # InterNETworking @@ -79,4 +80,3 @@ options USB_DEBUG # Enable usb debug support code #options USB_REQ_DEBUG #options USB_VERBOSE #options VERBOSE_SYSINIT # Enable verbose sysinit messages - Modified: head/sys/arm/nvidia/tegra124/std.tegra124 ============================================================================== --- head/sys/arm/nvidia/tegra124/std.tegra124 Mon Aug 20 20:06:36 2018 (r338115) +++ head/sys/arm/nvidia/tegra124/std.tegra124 Mon Aug 20 20:31:53 2018 (r338116) @@ -3,6 +3,4 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -options INTRNG - files "../nvidia/tegra124/files.tegra124" From owner-svn-src-head@freebsd.org Mon Aug 20 20:44: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 6E64B107C323; Mon, 20 Aug 2018 20:44:12 +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 24C2580F1C; Mon, 20 Aug 2018 20:44:12 +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 05DBE1A61C; Mon, 20 Aug 2018 20:44:12 +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 w7KKiBqO016429; Mon, 20 Aug 2018 20:44:11 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KKiBv6016428; Mon, 20 Aug 2018 20:44:11 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201808202044.w7KKiBv6016428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 20 Aug 2018 20:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338117 - head/tools/diag/prtblknos X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/tools/diag/prtblknos X-SVN-Commit-Revision: 338117 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, 20 Aug 2018 20:44:12 -0000 Author: mckusick Date: Mon Aug 20 20:44:11 2018 New Revision: 338117 URL: https://svnweb.freebsd.org/changeset/base/338117 Log: Fix incorrect output when printing block lists for files small enough to fit in only direct blocks whose size is exactly a multiple of the filesystem block size. Reported by: Peter Holm Tested by: Peter Holm Sponsored by: Netflix Modified: head/tools/diag/prtblknos/prtblknos.c Modified: head/tools/diag/prtblknos/prtblknos.c ============================================================================== --- head/tools/diag/prtblknos/prtblknos.c Mon Aug 20 20:31:53 2018 (r338116) +++ head/tools/diag/prtblknos/prtblknos.c Mon Aug 20 20:44:11 2018 (r338117) @@ -121,7 +121,7 @@ prtblknos(disk, dp) if (i < lastlbn - 1) frags = fs->fs_frag; else - frags = howmany(size % fs->fs_bsize, + frags = howmany(size - (lastlbn - 1) * fs->fs_bsize, fs->fs_fsize); if (fs->fs_magic == FS_UFS1_MAGIC) blkno = dp->dp1.di_db[i]; From owner-svn-src-head@freebsd.org Mon Aug 20 21:19: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 D9827107D004; Mon, 20 Aug 2018 21:19:22 +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 8317F821DB; Mon, 20 Aug 2018 21:19:22 +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 5F6D51AB16; Mon, 20 Aug 2018 21:19:22 +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 w7KLJM7n031914; Mon, 20 Aug 2018 21:19:22 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KLJM7Y031913; Mon, 20 Aug 2018 21:19:22 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201808202119.w7KLJM7Y031913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 20 Aug 2018 21:19:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338118 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 338118 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, 20 Aug 2018 21:19:23 -0000 Author: mckusick Date: Mon Aug 20 21:19:21 2018 New Revision: 338118 URL: https://svnweb.freebsd.org/changeset/base/338118 Log: TRIM consolodation is supposed to be off by default Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Mon Aug 20 20:44:11 2018 (r338117) +++ head/sys/ufs/ffs/ffs_alloc.c Mon Aug 20 21:19:21 2018 (r338118) @@ -484,7 +484,7 @@ static int doreallocblks = 1; SYSCTL_INT(_vfs_ffs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, "enable block reallocation"); -static int dotrimcons = 1; +static int dotrimcons = 0; SYSCTL_INT(_vfs_ffs, OID_AUTO, dotrimcons, CTLFLAG_RW, &dotrimcons, 0, "enable BIO_DELETE / TRIM consolodation"); From owner-svn-src-head@freebsd.org Mon Aug 20 21:40: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 88A1C107DD66; Mon, 20 Aug 2018 21:40:15 +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 2F46A82F68; Mon, 20 Aug 2018 21:40:15 +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 0AB1B1AE88; Mon, 20 Aug 2018 21:40:15 +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 w7KLeExK042302; Mon, 20 Aug 2018 21:40:14 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KLeE84042301; Mon, 20 Aug 2018 21:40:14 GMT (envelope-from np@FreeBSD.org) Message-Id: <201808202140.w7KLeE84042301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 20 Aug 2018 21:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338119 - 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: 338119 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, 20 Aug 2018 21:40:15 -0000 Author: np Date: Mon Aug 20 21:40:14 2018 New Revision: 338119 URL: https://svnweb.freebsd.org/changeset/base/338119 Log: cxgbe/tom: Provide the hardware tid in tcp_info. Submitted by: marius@ Modified: head/sys/dev/cxgbe/tom/t4_tom.c Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Mon Aug 20 21:19:21 2018 (r338118) +++ head/sys/dev/cxgbe/tom/t4_tom.c Mon Aug 20 21:40:14 2018 (r338119) @@ -438,6 +438,8 @@ t4_tcp_info(struct toedev *tod, struct tcpcb *tp, stru INP_WLOCK_ASSERT(tp->t_inpcb); MPASS(ti != NULL); + ti->tcpi_toe_tid = toep->tid; + addr = t4_read_reg(sc, A_TP_CMM_TCB_BASE) + toep->tid * TCB_SIZE; rc = read_via_memwin(sc, 2, addr, &buf[0], TCB_SIZE); if (rc != 0) From owner-svn-src-head@freebsd.org Mon Aug 20 22:08: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 17144107E5EF; Mon, 20 Aug 2018 22:08:04 +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 B39A883EA8; Mon, 20 Aug 2018 22:08:03 +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 8D0FE1B358; Mon, 20 Aug 2018 22:08:03 +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 w7KM83jt057678; Mon, 20 Aug 2018 22:08:03 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KM83d2057677; Mon, 20 Aug 2018 22:08:03 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808202208.w7KM83d2057677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 20 Aug 2018 22:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338120 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 338120 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, 20 Aug 2018 22:08:04 -0000 Author: kevans Date: Mon Aug 20 22:08:03 2018 New Revision: 338120 URL: https://svnweb.freebsd.org/changeset/base/338120 Log: config(8): Allow escape-quoted empty strings For use with things like BOOT_TAG=\"\" -- there are valid reasons to allow empty strings, especially as these are usually being passed through as options. The same argument could perhaps be made for the unquoted variant in things like MODULES_OVERRIDE="", but it's not immediately clear that this is an issue so I've left it untouched. MFC after: 3 days Modified: head/usr.sbin/config/lang.l Modified: head/usr.sbin/config/lang.l ============================================================================== --- head/usr.sbin/config/lang.l Mon Aug 20 21:40:14 2018 (r338119) +++ head/usr.sbin/config/lang.l Mon Aug 20 22:08:03 2018 (r338120) @@ -127,7 +127,7 @@ PATH [./][-/.%^A-Za-z_0-9]+ BEGIN ENVC; return i; } -\\\"[^"]+\\\" { +\\\"[^"]*\\\" { BEGIN 0; yytext[yyleng-2] = '"'; yytext[yyleng-1] = '\0'; From owner-svn-src-head@freebsd.org Mon Aug 20 22:16: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 7601D107E9E0; Mon, 20 Aug 2018 22:16:16 +0000 (UTC) (envelope-from 0mp@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 2C39A84B27; Mon, 20 Aug 2018 22:16:16 +0000 (UTC) (envelope-from 0mp@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 0D54B1B4F4; Mon, 20 Aug 2018 22:16:16 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KMGFnZ063815; Mon, 20 Aug 2018 22:16:15 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KMGFk7063814; Mon, 20 Aug 2018 22:16:15 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201808202216.w7KMGFk7063814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Mon, 20 Aug 2018 22:16:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338121 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 338121 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, 20 Aug 2018 22:16:16 -0000 Author: 0mp (ports committer) Date: Mon Aug 20 22:16:15 2018 New Revision: 338121 URL: https://svnweb.freebsd.org/changeset/base/338121 Log: efidev.4: Improve formatting. - Move some information out of the SYNOPSIS section because it is formated in a broken way by mandoc(1) otherwise. - Improve the formatting of the list of provided ioctls. - Use "Fa" for struct fields. - Pet mandoc and igor. - Fix typos. Reviewed by: kevans Approved by: mat (mentor) Differential Revision: https://reviews.freebsd.org/D16765 Modified: head/share/man/man4/efidev.4 Modified: head/share/man/man4/efidev.4 ============================================================================== --- head/share/man/man4/efidev.4 Mon Aug 20 22:08:03 2018 (r338120) +++ head/share/man/man4/efidev.4 Mon Aug 20 22:16:15 2018 (r338121) @@ -47,15 +47,12 @@ line in efirt_load="YES" .Ed .Pp -.Nm -may be disabled by setting the +The driver may be disabled by setting the .Xr loader 8 tunable .Va efi.rt.disabled -to 1. -.Pp -.Nm -is currently only available on amd64 and arm64. +to +.Dq Li 1 . .Sh DESCRIPTION The .Nm @@ -72,10 +69,10 @@ provides the following ioctls defined in .In sys/efiio.h with supplemental structures and constants defined in .In sys/efi.h : -.Bl -tag -width ".Dv EFIIOC_GET_TABLE" +.Bl -tag -width indent .It Dv EFIIOC_GET_TABLE Pq Vt "struct efi_get_table_ioc" Get a table by uuid from the UEFI system table. -.Bd -literal +.Bd -literal -offset indent struct efi_get_table_ioc { struct uuid uuid; void *ptr; @@ -86,7 +83,7 @@ Get the time from the RTC, if the RTC is available. The .Vt struct efi_tm passed is populated with the current time, unless an error occurs. -.Bd -literal +.Bd -literal -offset indent struct efi_tm { uint16_t tm_year; uint8_t tm_mon @@ -106,9 +103,13 @@ Sets the time stored by the RTC, if the RTC is availab .It Dv EFIIOC_VAR_GET Pq Vt "struct efi_var_ioc" Gets data from the variable described by the vendor and name fields of the .Vt struct efi_var_ioc -into the aata field. +into the +.Fa data +field. .Dv EFIIOC_VAR_GET Pq Vt "struct efi_var_ioc" -will also populate the attrib field. +will also populate the +.Fa attrib +field. .Bd -literal struct efi_var_ioc { efi_char *name; @@ -134,10 +135,13 @@ the .It Pa /dev/efi .El .Sh SEE ALSO -.Xr efivar 3 +.Xr efivar 3 , .Xr efirt 9 .Sh HISTORY A .Nm device first appeared in .Fx 11.1 . +.Sh BUGS +.Nm +is currently only available on amd64 and arm64. From owner-svn-src-head@freebsd.org Mon Aug 20 22:24: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 68D3B107ED4D; Mon, 20 Aug 2018 22:24:00 +0000 (UTC) (envelope-from 0mp@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 1EF1A8513B; Mon, 20 Aug 2018 22:24:00 +0000 (UTC) (envelope-from 0mp@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 F3C211B6A3; Mon, 20 Aug 2018 22:23:59 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KMNxjh068923; Mon, 20 Aug 2018 22:23:59 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KMNxOG068922; Mon, 20 Aug 2018 22:23:59 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201808202223.w7KMNxOG068922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Mon, 20 Aug 2018 22:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338122 - head/usr.bin/grep X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.bin/grep X-SVN-Commit-Revision: 338122 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, 20 Aug 2018 22:24:00 -0000 Author: 0mp (ports committer) Date: Mon Aug 20 22:23:59 2018 New Revision: 338122 URL: https://svnweb.freebsd.org/changeset/base/338122 Log: Adjust formatting of grep and zgrep manual pages. grep(1) changes: - Pet mandoc & igor. - Stylize the text more with macros when appropriate. - Stylize equal signs in long options (e.g., "--color=auto") with the "Cm" macro as suggested by mdoc(7). - Add missing arguments to --exlude, --exclude-dir, --include and --include-dir. - Remove a duplicate entry for the --context flag. - Use a list in the EXAMPLES sections to make it easier to tell which paragraphs belong to which example. - Cross reference zgrep(1). zgrep(1) changes: - Fix Nd. - Split synopsis into paragraphs for readability. - Cross reference bzip(1), grep(1) and xz(1). Reviewed by: bcr Approved by: mat (mentor) Differential Revision: https://reviews.freebsd.org/D16779 Modified: head/usr.bin/grep/grep.1 head/usr.bin/grep/zgrep.1 Modified: head/usr.bin/grep/grep.1 ============================================================================== --- head/usr.bin/grep/grep.1 Mon Aug 20 22:16:15 2018 (r338121) +++ head/usr.bin/grep/grep.1 Mon Aug 20 22:23:59 2018 (r338122) @@ -30,11 +30,14 @@ .\" .\" @(#)grep.1 8.3 (Berkeley) 4/18/94 .\" -.Dd May 7, 2018 +.Dd August 21, 2018 .Dt GREP 1 .Os .Sh NAME -.Nm grep , egrep , fgrep , rgrep , +.Nm grep , +.Nm egrep , +.Nm fgrep , +.Nm rgrep .Nd file pattern searcher .Sh SYNOPSIS .Nm grep @@ -45,10 +48,10 @@ .Op Fl C Ns Op Ar num .Op Fl e Ar pattern .Op Fl f Ar file -.Op Fl Fl binary-files Ns = Ns Ar value -.Op Fl Fl color Ns Op = Ns Ar when -.Op Fl Fl colour Ns Op = Ns Ar when -.Op Fl Fl context Ns Op = Ns Ar num +.Op Fl Fl binary-files= Ns Ar value +.Op Fl Fl color Ns Op Cm = Ns Ar when +.Op Fl Fl colour Ns Op Cm = Ns Ar when +.Op Fl Fl context Ns Op Cm = Ns Ar num .Op Fl Fl label .Op Fl Fl line-buffered .Op Fl Fl null @@ -83,13 +86,13 @@ is quicker than both and .Nm egrep , but can only handle fixed patterns -(i.e. it does not interpret regular expressions). +(i.e., it does not interpret regular expressions). Patterns may consist of one or more lines, allowing any of the pattern lines to match a portion of the input. .Pp The following options are available: .Bl -tag -width indent -.It Fl A Ar num , Fl Fl after-context Ns = Ns Ar num +.It Fl A Ar num , Fl Fl after-context= Ns Ar num Print .Ar num lines of trailing context after each match. @@ -108,7 +111,7 @@ if files contain binary characters. Use of this option forces .Nm to output lines matching the specified pattern. -.It Fl B Ar num , Fl Fl before-context Ns = Ns Ar num +.It Fl B Ar num , Fl Fl before-context= Ns Ar num Print .Ar num lines of leading context before each match. @@ -120,36 +123,58 @@ options. .It Fl b , Fl Fl byte-offset The offset in bytes of a matched pattern is displayed in front of the respective matched line. -.It Fl C Ns Op Ar num , Fl Fl context Ns = Ns Ar num +.It Fl C Ns Oo Ar num Oc , Fl Fl context Ns Oo = Ns Ar num Oc Print .Ar num lines of leading and trailing context surrounding each match. -The default is 2 and is equivalent to -.Fl A -.Ar 2 -.Fl B -.Ar 2 . +The default value of +.Ar num +is +.Dq 2 +and is equivalent to +.Dq Fl A Ar 2 Fl B Ar 2 . Note: no whitespace may be given between the option and its argument. .It Fl c , Fl Fl count Only a count of selected lines is written to standard output. -.It Fl Fl colour Ns = Ns Op Ar when , Fl Fl color Ns = Ns Op Ar when -Mark up the matching text with the expression stored in +.It Fl Fl colour= Ns Oo Ar when Oc , Fl Fl color= Ns Oo Ar when Oc +Mark up the matching text with the expression stored in the .Ev GREP_COLOR environment variable. -The possible values of when can be `never', `always' or `auto'. -.It Fl D Ar action , Fl Fl devices Ns = Ns Ar action -Specify the demanded action for devices, FIFOs and sockets. -The default action is `read', which means, that they are read -as if they were normal files. -If the action is set to `skip', devices will be silently skipped. -.It Fl d Ar action , Fl Fl directories Ns = Ns Ar action -Specify the demanded action for directories. -It is `read' by default, which means that the directories +The possible values of +.Ar when +are +.Dq Cm never , +.Dq Cm always +and +.Dq Cm auto . +.It Fl D Ar action , Fl Fl devices= Ns Ar action +Specify the demanded +.Ar action +for devices, FIFOs and sockets. +The default +.Ar action +is +.Dq Cm read , +which means, that they are read as if they were normal files. +If the +.Ar action +is set to +.Dq Cm skip , +devices are silently skipped. +.It Fl d Ar action , Fl Fl directories= Ns Ar action +Specify the demanded +.Ar action +for directories. +It is +.Dq Cm read +by default, which means that the directories are read in the same manner as normal files. -Other possible values are `skip' to silently ignore the -directories, and `recurse' to read them recursively, which -has the same effect as the +Other possible values are +.Dq Cm skip +to silently ignore the directories, and +.Dq Cm recurse +to read them recursively, which has the same effect as the .Fl R and .Fl r @@ -158,21 +183,27 @@ option. Interpret .Ar pattern as an extended regular expression -(i.e. force +(i.e., force .Nm grep to behave as .Nm egrep ) . -.It Fl e Ar pattern , Fl Fl regexp Ns = Ns Ar pattern -Specify a pattern used during the search of the input: +.It Fl e Ar pattern , Fl Fl regexp= Ns Ar pattern +Specify a +.Ar pattern +used during the search of the input: an input line is selected if it matches any of the specified patterns. This option is most useful when multiple .Fl e options are used to specify multiple patterns, -or when a pattern begins with a dash +or when a +.Ar pattern +begins with a dash .Pq Sq - . -.It Fl Fl exclude +.It Fl Fl exclude Ar pattern If specified, it excludes files matching the given -filename pattern from the search. +filename +.Ar pattern +from the search. Note that .Fl Fl exclude and @@ -185,11 +216,13 @@ pattern is specified, all files are searched that are not excluded. Patterns are matched to the full path specified, not only to the filename component. -.It Fl Fl exclude-dir +.It Fl Fl exclude-dir Ar pattern If .Fl R is specified, it excludes directories matching the -given filename pattern from the search. +given filename +.Ar pattern +from the search. Note that .Fl Fl exclude-dir and @@ -204,11 +237,11 @@ not excluded. Interpret .Ar pattern as a set of fixed strings -(i.e. force +(i.e., force .Nm grep to behave as .Nm fgrep ) . -.It Fl f Ar file , Fl Fl file Ns = Ns Ar file +.It Fl f Ar file , Fl Fl file= Ns Ar file Read one or more newline separated patterns from .Ar file . Empty pattern lines match every input line. @@ -220,7 +253,7 @@ is empty, nothing is matched. Interpret .Ar pattern as a basic regular expression -(i.e. force +(i.e., force .Nm grep to behave as traditional .Nm grep ) . @@ -228,23 +261,24 @@ to behave as traditional Always print filename headers with output lines. .It Fl h , Fl Fl no-filename Never print filename headers -.Pq i.e. filenames +.Pq i.e., filenames with output lines. .It Fl Fl help Print a brief help message. .It Fl I Ignore binary files. -This option is equivalent to -.Fl Fl binary-file Ns = Ns Ar without-match +This option is equivalent to the +.Dq Fl Fl binary-file= Ns Cm without-match option. .It Fl i , Fl Fl ignore-case Perform case insensitive matching. By default, .Nm grep is case sensitive. -.It Fl Fl include -If specified, only files matching the -given filename pattern are searched. +.It Fl Fl include Ar pattern +If specified, only files matching the given filename +.Ar pattern +are searched. Note that .Fl Fl include and @@ -253,11 +287,12 @@ patterns are processed in the order given. If a name patches multiple patterns, the latest matching rule wins. Patterns are matched to the full path specified, not only to the filename component. -.It Fl Fl include-dir +.It Fl Fl include-dir Ar pattern If .Fl R -is specified, only directories matching the -given filename pattern are searched. +is specified, only directories matching the given filename +.Ar pattern +are searched. Note that .Fl Fl include-dir and @@ -301,7 +336,7 @@ instead of .Xr read 2 to read input, which can result in better performance under some circumstances but can cause undefined behaviour. -.It Fl m Ar num, Fl Fl max-count Ns = Ns Ar num +.It Fl m Ar num , Fl Fl max-count= Ns Ar num Stop reading the file after .Ar num matches. @@ -325,7 +360,7 @@ If is specified, follow symbolic links only if they were explicitly listed on the command line. The default is not to follow symbolic links. -.It Fl o, Fl Fl only-matching +.It Fl o , Fl Fl only-matching Prints only the matching part of the lines. .It Fl p If @@ -340,7 +375,7 @@ will only search a file until a match has been found, making searches potentially less expensive. .It Fl R , Fl r , Fl Fl recursive Recursively search subdirectories listed. -(i.e. force +(i.e., force .Nm grep to behave as .Nm rgrep ) . @@ -352,7 +387,7 @@ The default is not to follow symbolic links. .It Fl s , Fl Fl no-messages Silent mode. Nonexistent and unreadable files are ignored -(i.e. their error messages are suppressed). +(i.e., their error messages are suppressed). .It Fl U , Fl Fl binary Search binary files, but do not attempt to print them. .It Fl u @@ -380,23 +415,17 @@ Obsoleted. .It Fl z , Fl Fl null-data Treat input and output data as sequences of lines terminated by a zero-byte instead of a newline. -.It Fl Fl binary-files Ns = Ns Ar value +.It Fl Fl binary-files= Ns Ar value Controls searching and printing of binary files. -Options are -.Ar binary , -the default: search binary files but do not print them; -.Ar without-match : -do not search binary files; -and -.Ar text : -treat all files as text. -.Sm off -.It Fl Fl context Op = Ar num -.Sm on -Print -.Ar num -lines of leading and trailing context. -The default is 2. +Options are: +.Bl -tag -compact -width "binary (default)" +.It Cm binary No (default) +Search binary files but do not print them. +.It Cm without-match +Do not search binary files. +.It Cm text +Treat all files as text. +.El .It Fl Fl line-buffered Force output to be line buffered. By default, output is line buffered when standard output is a terminal @@ -405,7 +434,7 @@ and block buffered otherwise. .Pp If no file arguments are specified, the standard input is used. Additionally, -.Dq - +.Dq Cm - may be used in place of a file name, anywhere that a file name is accepted, to read from standard input. This includes both @@ -425,12 +454,14 @@ No lines were selected. An error occurred. .El .Sh EXAMPLES +.Bl -dash +.It To find all occurrences of the word .Sq patricia in a file: .Pp .Dl $ grep 'patricia' myfile -.Pp +.It To find all occurrences of the pattern .Ql .Pp at the beginning of a line: @@ -448,14 +479,14 @@ and the escapes the .Ql \&. , which would otherwise match any character. -.Pp +.It To find all lines in a file which do not contain the words .Sq foo or .Sq bar : .Pp .Dl $ grep -v -e 'foo' -e 'bar' myfile -.Pp +.It A simple example of an extended regular expression: .Pp .Dl $ egrep '19|20|25' calendar @@ -463,10 +494,12 @@ A simple example of an extended regular expression: Peruses the file .Sq calendar looking for either 19, 20, or 25. +.El .Sh SEE ALSO .Xr ed 1 , .Xr ex 1 , .Xr sed 1 , +.Xr zgrep 1 , .Xr re_format 7 .Sh STANDARDS The Modified: head/usr.bin/grep/zgrep.1 ============================================================================== --- head/usr.bin/grep/zgrep.1 Mon Aug 20 22:16:15 2018 (r338121) +++ head/usr.bin/grep/zgrep.1 Mon Aug 20 22:23:59 2018 (r338122) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 25, 2018 +.Dd August 21, 2018 .Dt ZGREP 1 .Os .Sh NAME @@ -43,9 +43,7 @@ .Nm zstdgrep , .Nm zstdegrep , .Nm zstdfgrep -.Nd -.Xr grep 1 -compressed files +.Nd grep compressed files .Sh SYNOPSIS .Nm .Oo Ar flags Oc Ar files @@ -53,24 +51,28 @@ compressed files .Oo Ar flags Oc Ar files .Nm zfgrep .Oo Ar flags Oc Ar files +.Pp .Nm bzgrep .Oo Ar flags Oc Ar files .Nm bzegrep .Oo Ar flags Oc Ar files .Nm bzfgrep .Oo Ar flags Oc Ar files +.Pp .Nm lzgrep .Oo Ar flags Oc Ar files .Nm lzegrep .Oo Ar flags Oc Ar files .Nm lzfgrep .Oo Ar flags Oc Ar files +.Pp .Nm xzgrep .Oo Ar flags Oc Ar files .Nm xzegrep .Oo Ar flags Oc Ar files .Nm xzfgrep .Oo Ar flags Oc Ar files +.Pp .Nm zstdgrep .Oo Ar flags Oc Ar files .Nm zstdegrep @@ -80,9 +82,11 @@ compressed files .Sh DESCRIPTION Allow .Xr grep 1 -to read compressed files +to read compressed files. .Sh SEE ALSO -.Xr grep 1 +.Xr bzip2 1 , +.Xr grep 1 , +.Xr xz 1 .Sh AUTHORS This version of the .Nm From owner-svn-src-head@freebsd.org Tue Aug 21 01:33: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 5E89510843B1; Tue, 21 Aug 2018 01:33:26 +0000 (UTC) (envelope-from pfg@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 136338C93A; Tue, 21 Aug 2018 01:33:26 +0000 (UTC) (envelope-from pfg@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 E88D71D58F; Tue, 21 Aug 2018 01:33:25 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7L1XPLI067119; Tue, 21 Aug 2018 01:33:25 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7L1XPWJ067118; Tue, 21 Aug 2018 01:33:25 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201808210133.w7L1XPWJ067118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 21 Aug 2018 01:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338125 - head/lib/libthr/thread X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/lib/libthr/thread X-SVN-Commit-Revision: 338125 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, 21 Aug 2018 01:33:26 -0000 Author: pfg Date: Tue Aug 21 01:33:25 2018 New Revision: 338125 URL: https://svnweb.freebsd.org/changeset/base/338125 Log: libthr: minor spacing cleanup. No functional change. X-MFC with: r337992 Modified: head/lib/libthr/thread/thr_attr.c Modified: head/lib/libthr/thread/thr_attr.c ============================================================================== --- head/lib/libthr/thread/thr_attr.c Tue Aug 21 01:17:28 2018 (r338124) +++ head/lib/libthr/thread/thr_attr.c Tue Aug 21 01:33:25 2018 (r338125) @@ -199,8 +199,8 @@ _pthread_attr_getdetachstate(const pthread_attr_t *att __weak_reference(_pthread_attr_getguardsize, pthread_attr_getguardsize); int -_pthread_attr_getguardsize(const pthread_attr_t *__restrict attr, - size_t *__restrict guardsize) +_pthread_attr_getguardsize(const pthread_attr_t * __restrict attr, + size_t * __restrict guardsize) { int ret; From owner-svn-src-head@freebsd.org Tue Aug 21 02:38: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 7A1B51085FFD; Tue, 21 Aug 2018 02:38:11 +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 218EE8E534; Tue, 21 Aug 2018 02:38:11 +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 011E81DFB9; Tue, 21 Aug 2018 02:38:11 +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 w7L2cAx2097966; Tue, 21 Aug 2018 02:38:10 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7L2c78e097953; Tue, 21 Aug 2018 02:38:07 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201808210238.w7L2c78e097953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 21 Aug 2018 02:38:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338126 - in head: contrib/ntp contrib/ntp/html contrib/ntp/include contrib/ntp/libntp contrib/ntp/ntpd contrib/ntp/ntpdate contrib/ntp/ntpdc contrib/ntp/ntpq contrib/ntp/ntpsnmpd contr... X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head: contrib/ntp contrib/ntp/html contrib/ntp/include contrib/ntp/libntp contrib/ntp/ntpd contrib/ntp/ntpdate contrib/ntp/ntpdc contrib/ntp/ntpq contrib/ntp/ntpsnmpd contrib/ntp/scripts contrib/nt... X-SVN-Commit-Revision: 338126 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, 21 Aug 2018 02:38:12 -0000 Author: delphij Date: Tue Aug 21 02:38:07 2018 New Revision: 338126 URL: https://svnweb.freebsd.org/changeset/base/338126 Log: MFV r338092: ntp 4.2.8p12. Relnotes: yes Modified: head/contrib/ntp/ChangeLog head/contrib/ntp/NEWS head/contrib/ntp/config.h.in head/contrib/ntp/configure head/contrib/ntp/configure.ac head/contrib/ntp/html/authentic.html head/contrib/ntp/html/authopt.html head/contrib/ntp/html/confopt.html head/contrib/ntp/html/keygen.html head/contrib/ntp/html/ntpdate.html head/contrib/ntp/include/ntp.h head/contrib/ntp/include/ntp_md5.h head/contrib/ntp/libntp/a_md5encrypt.c head/contrib/ntp/libntp/ntp_calendar.c head/contrib/ntp/libntp/prettydate.c head/contrib/ntp/libntp/ssl_init.c head/contrib/ntp/libntp/syssignal.c head/contrib/ntp/libntp/work_fork.c head/contrib/ntp/libntp/work_thread.c head/contrib/ntp/ntpd/complete.conf.in head/contrib/ntp/ntpd/invoke-ntp.conf.texi head/contrib/ntp/ntpd/invoke-ntp.keys.texi head/contrib/ntp/ntpd/invoke-ntpd.texi head/contrib/ntp/ntpd/ntp.conf.5man head/contrib/ntp/ntpd/ntp.conf.5mdoc head/contrib/ntp/ntpd/ntp.conf.def head/contrib/ntp/ntpd/ntp.conf.html head/contrib/ntp/ntpd/ntp.conf.man.in head/contrib/ntp/ntpd/ntp.conf.mdoc.in head/contrib/ntp/ntpd/ntp.keys.5man head/contrib/ntp/ntpd/ntp.keys.5mdoc head/contrib/ntp/ntpd/ntp.keys.def head/contrib/ntp/ntpd/ntp.keys.html head/contrib/ntp/ntpd/ntp.keys.man.in head/contrib/ntp/ntpd/ntp.keys.mdoc.in head/contrib/ntp/ntpd/ntp_config.c head/contrib/ntp/ntpd/ntp_control.c head/contrib/ntp/ntpd/ntp_io.c head/contrib/ntp/ntpd/ntp_loopfilter.c head/contrib/ntp/ntpd/ntp_parser.c head/contrib/ntp/ntpd/ntp_parser.h head/contrib/ntp/ntpd/ntp_proto.c head/contrib/ntp/ntpd/ntp_refclock.c head/contrib/ntp/ntpd/ntp_request.c head/contrib/ntp/ntpd/ntpd-opts.c head/contrib/ntp/ntpd/ntpd-opts.h head/contrib/ntp/ntpd/ntpd.1ntpdman head/contrib/ntp/ntpd/ntpd.1ntpdmdoc head/contrib/ntp/ntpd/ntpd.c head/contrib/ntp/ntpd/ntpd.html head/contrib/ntp/ntpd/ntpd.man.in head/contrib/ntp/ntpd/ntpd.mdoc.in head/contrib/ntp/ntpd/rc_cmdlength.c head/contrib/ntp/ntpd/refclock_datum.c head/contrib/ntp/ntpd/refclock_gpsdjson.c head/contrib/ntp/ntpd/refclock_jupiter.c head/contrib/ntp/ntpd/refclock_shm.c head/contrib/ntp/ntpd/refclock_true.c head/contrib/ntp/ntpdate/ntpdate.c head/contrib/ntp/ntpdc/invoke-ntpdc.texi head/contrib/ntp/ntpdc/ntpdc-opts.c head/contrib/ntp/ntpdc/ntpdc-opts.h head/contrib/ntp/ntpdc/ntpdc.1ntpdcman head/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc head/contrib/ntp/ntpdc/ntpdc.c head/contrib/ntp/ntpdc/ntpdc.html head/contrib/ntp/ntpdc/ntpdc.man.in head/contrib/ntp/ntpdc/ntpdc.mdoc.in head/contrib/ntp/ntpq/invoke-ntpq.texi head/contrib/ntp/ntpq/ntpq-opts.c head/contrib/ntp/ntpq/ntpq-opts.h head/contrib/ntp/ntpq/ntpq-subs.c head/contrib/ntp/ntpq/ntpq.1ntpqman head/contrib/ntp/ntpq/ntpq.1ntpqmdoc head/contrib/ntp/ntpq/ntpq.c head/contrib/ntp/ntpq/ntpq.html head/contrib/ntp/ntpq/ntpq.man.in head/contrib/ntp/ntpq/ntpq.mdoc.in head/contrib/ntp/ntpq/ntpq.texi head/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc head/contrib/ntp/ntpsnmpd/ntpsnmpd.html head/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in head/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in head/contrib/ntp/packageinfo.sh head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in head/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi head/contrib/ntp/scripts/invoke-plot_summary.texi head/contrib/ntp/scripts/invoke-summary.texi head/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi head/contrib/ntp/scripts/ntp-wait/ntp-wait-opts head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc head/contrib/ntp/scripts/ntp-wait/ntp-wait.html head/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in head/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in head/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi head/contrib/ntp/scripts/ntpsweep/ntpsweep-opts head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc head/contrib/ntp/scripts/ntpsweep/ntpsweep.html head/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in head/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in head/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi head/contrib/ntp/scripts/ntptrace/ntptrace-opts head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc head/contrib/ntp/scripts/ntptrace/ntptrace.html head/contrib/ntp/scripts/ntptrace/ntptrace.man.in head/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in head/contrib/ntp/scripts/plot_summary-opts head/contrib/ntp/scripts/plot_summary.1plot_summaryman head/contrib/ntp/scripts/plot_summary.1plot_summarymdoc head/contrib/ntp/scripts/plot_summary.html head/contrib/ntp/scripts/plot_summary.man.in head/contrib/ntp/scripts/plot_summary.mdoc.in head/contrib/ntp/scripts/summary-opts head/contrib/ntp/scripts/summary.1summaryman head/contrib/ntp/scripts/summary.1summarymdoc head/contrib/ntp/scripts/summary.html head/contrib/ntp/scripts/summary.man.in head/contrib/ntp/scripts/summary.mdoc.in head/contrib/ntp/scripts/update-leap/invoke-update-leap.texi head/contrib/ntp/scripts/update-leap/update-leap-opts head/contrib/ntp/scripts/update-leap/update-leap.1update-leapman head/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc head/contrib/ntp/scripts/update-leap/update-leap.html head/contrib/ntp/scripts/update-leap/update-leap.man.in head/contrib/ntp/scripts/update-leap/update-leap.mdoc.in head/contrib/ntp/sntp/config.h.in head/contrib/ntp/sntp/configure head/contrib/ntp/sntp/crypto.c head/contrib/ntp/sntp/include/version.def head/contrib/ntp/sntp/include/version.texi head/contrib/ntp/sntp/invoke-sntp.texi head/contrib/ntp/sntp/m4/ntp_libntp.m4 head/contrib/ntp/sntp/m4/ntp_openssl.m4 head/contrib/ntp/sntp/m4/version.m4 head/contrib/ntp/sntp/main.c head/contrib/ntp/sntp/sntp-opts.c head/contrib/ntp/sntp/sntp-opts.h head/contrib/ntp/sntp/sntp.1sntpman head/contrib/ntp/sntp/sntp.1sntpmdoc head/contrib/ntp/sntp/sntp.html head/contrib/ntp/sntp/sntp.man.in head/contrib/ntp/sntp/sntp.mdoc.in head/contrib/ntp/sntp/tests/crypto.c head/contrib/ntp/sntp/tests/packetProcessing.c head/contrib/ntp/sntp/version.c head/contrib/ntp/util/invoke-ntp-keygen.texi head/contrib/ntp/util/ntp-keygen-opts.c head/contrib/ntp/util/ntp-keygen-opts.def head/contrib/ntp/util/ntp-keygen-opts.h head/contrib/ntp/util/ntp-keygen.1ntp-keygenman head/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc head/contrib/ntp/util/ntp-keygen.html head/contrib/ntp/util/ntp-keygen.man.in head/contrib/ntp/util/ntp-keygen.mdoc.in head/contrib/ntp/util/ntp-keygen.texi head/contrib/ntp/util/sht.c head/usr.sbin/ntp/config.h head/usr.sbin/ntp/doc/ntp-keygen.8 head/usr.sbin/ntp/doc/ntp.conf.5 head/usr.sbin/ntp/doc/ntp.keys.5 head/usr.sbin/ntp/doc/ntpd.8 head/usr.sbin/ntp/doc/ntpdc.8 head/usr.sbin/ntp/doc/ntpq.8 head/usr.sbin/ntp/doc/sntp.8 head/usr.sbin/ntp/scripts/mkver Directory Properties: head/contrib/ntp/ (props changed) Modified: head/contrib/ntp/ChangeLog ============================================================================== --- head/contrib/ntp/ChangeLog Tue Aug 21 01:33:25 2018 (r338125) +++ head/contrib/ntp/ChangeLog Tue Aug 21 02:38:07 2018 (r338126) @@ -1,5 +1,69 @@ --- +(4.2.8p12) 2018/08/14 Released by Harlan Stenn +* [Sec 3505] CVE-2018-12327 - Arbitrary Code Execution Vulnerability + - fixed stack buffer overflow in the openhost() command-line call + of NTPQ/NTPDC +* [Sec 3012] noepeer tweaks. +* [Bug 3521] Fix a logic bug in the INVALIDNAK checks. +* [Bug 3509] Add support for running as non-root on FreeBSD, Darwin, + other TrustedBSD platforms + - applied patch by Ian Lepore +* [Bug 3506] Service Control Manager interacts poorly with NTPD + - changed interaction with SCM to signal pending startup +* [Bug 3486] Buffer overflow in ntpq/ntpq.c:tstflags() + - applied patch by Gerry Garvey +* [Bug 3485] Undefined sockaddr used in error messages in ntp_config.c + - applied patch by Gerry Garvey +* [Bug 3484] ntpq response from ntpd is incorrect when REFID is null + - rework of ntpq 'nextvar()' key/value parsing +* [Bug 3482] Fixes for compilation warnings (ntp_io.c & ntpq-subs.c) + - applied patch by Gerry Garvey (with mods) +* [Bug 3480] Refclock sample filter not cleared on clock STEP + - applied patch by Gerry Garvey +* [Bug 3479] ctl_putrefid() allows unsafe characters through to ntpq + - applied patch by Gerry Garvey (with mods) +* [Bug 3476]ctl_putstr() sends empty unquoted string [...] + - applied patch by Gerry Garvey (with mods); not sure if that's bug or feature, though +* [Bug 3475] modify prettydate() to suppress output of zero time + - applied patch by Gerry Garvey +* [Bug 3474] Missing pmode in mode7 peer info response + - applied patch by Gerry Garvey +* [Bug 3471] Check for openssl/[ch]mac.h. HStenn. + - add #define ENABLE_CMAC support in configure. HStenn. +* [Bug 3470] ntpd4.2.8p11 fails to compile without OpenSSL +* [Bug 3469] Incomplete string compare [...] in is_refclk_addr + - patch by Stephen Friedl +* [Bug 3467] Potential memory fault in ntpq [...] + - fixed IO redirection and CTRL-C handling in ntq and ntpdc +* [Bug 3465] Default TTL values cannot be used +* [Bug 3461] refclock_shm.c: clear error status on clock recovery + - initial patch by Hal Murray; also fixed refclock_report() trouble +* [Bug 3460] Fix typo in ntpq.texi, reported by Kenyon Ralph. +* [Bug 3456] Use uintptr_t rather than size_t to store an integer in a pointer + - According to Brooks Davis, there was only one location +* [Bug 3449] ntpq - display "loop" instead of refid [...] + - applied patch by Gerry Garvey +* [Bug 3445] Symmetric peer won't sync on startup + - applied patch by Gerry Garvey +* [Bug 3442] Fixes for ntpdate as suggested by Gerry Garvey, + with modifications + New macro REFID_ISTEXT() which is also used in ntpd/ntp_control.c. +* [Bug 3434] ntpd clears STA_UNSYNC on start + - applied patch by Miroslav Lichvar +* [Bug 3426] ntpdate.html -t default is 2 seconds. Leonid Evdokimov. +* [Bug 3121] Drop root privileges for the forked DNS worker + - integrated patch by Reinhard Max +* [Bug 2821] minor build issues + - applied patches by Christos Zoulas, including real bug fixes +* html/authopt.html: cleanup, from +* ntpd/ntpd.c: DROPROOT cleanup. +* Symmetric key range is 1-65535. Update docs. +* html/authentic.html: cleanup, from + +--- +(4.2.8p11) 2018/02/27 Released by Harlan Stenn + * [Sec 3454] Unauthenticated packet can reset authenticated interleave associations. HStenn. * [Sec 3453] Interleaved symmetric mode cannot recover from bad state. HStenn. @@ -14,16 +78,16 @@ - applied patch by Sean Haugh * [Bug 3452] PARSE driver prints uninitialized memory. * [Bug 3450] Dubious error messages from plausibility checks in get_systime() - - removed error log caused by rounding/slew, ensured postcondition + - removed error log caused by rounding/slew, ensured postcondition * [Bug 3447] AES-128-CMAC (fixes) - refactoring the MAC code, too * [Bug 3441] Validate the assumption that AF_UNSPEC is 0. stenn@ntp.org * [Bug 3439] When running multiple commands / hosts in ntpq... - - applied patch by ggarvey + - applied patch by ggarvey * [Bug 3438] Negative values and values > 999 days in... - - applied patch by ggarvey (with minor mods) + - applied patch by ggarvey (with minor mods) * [Bug 3437] ntpd tries to open socket with AF_UNSPEC domain - - applied patch (with mods) by Miroslav Lichvar + - applied patch (with mods) by Miroslav Lichvar * [Bug 3435] anchor NTP era alignment * [Bug 3433] sntp crashes when run with -a. * [Bug 3430] ntpq dumps core (SIGSEGV) for "keytype md2" Modified: head/contrib/ntp/NEWS ============================================================================== --- head/contrib/ntp/NEWS Tue Aug 21 01:33:25 2018 (r338125) +++ head/contrib/ntp/NEWS Tue Aug 21 02:38:07 2018 (r338126) @@ -1,7 +1,78 @@ -- -NTP 4.2.8p11 (Harlan Stenn , 2018/02/27) +NTP 4.2.8p12 (Harlan Stenn , 2018/14/09) NOTE: this NEWS file will be undergoing more revisions. + +Focus: Security, Bug fixes, enhancements. + +Severity: MEDIUM + +This release fixes a "hole" in the noepeer capability introduced to ntpd +in ntp-4.2.8p11, and a buffer overflow in the openhost() function used by +ntpq and ntpdc. It also provides 26 other bugfixes, and 4 other improvements: + +* [Sec 3505] Buffer overflow in the openhost() call of ntpq and ntpdc. + +* [Sec 3012] Fix a hole in the new "noepeer" processing. + +* Bug Fixes: + [Bug 3521] Fix a logic bug in the INVALIDNAK checks. + [Bug 3509] Add support for running as non-root on FreeBSD, Darwin, + other TrustedBSD platforms + - applied patch by Ian Lepore + [Bug 3506] Service Control Manager interacts poorly with NTPD + - changed interaction with SCM to signal pending startup + [Bug 3486] Buffer overflow in ntpq/ntpq.c:tstflags() + - applied patch by Gerry Garvey + [Bug 3485] Undefined sockaddr used in error messages in ntp_config.c + - applied patch by Gerry Garvey + [Bug 3484] ntpq response from ntpd is incorrect when REFID is null + - rework of ntpq 'nextvar()' key/value parsing + [Bug 3482] Fixes for compilation warnings (ntp_io.c & ntpq-subs.c) + - applied patch by Gerry Garvey (with mods) + [Bug 3480] Refclock sample filter not cleared on clock STEP + - applied patch by Gerry Garvey + [Bug 3479] ctl_putrefid() allows unsafe characters through to ntpq + - applied patch by Gerry Garvey (with mods) + [Bug 3476]ctl_putstr() sends empty unquoted string [...] + - applied patch by Gerry Garvey (with mods); not sure if that's bug or feature, though + [Bug 3475] modify prettydate() to suppress output of zero time + - applied patch by Gerry Garvey + [Bug 3474] Missing pmode in mode7 peer info response + - applied patch by Gerry Garvey + [Bug 3471] Check for openssl/[ch]mac.h. HStenn. + - add #define ENABLE_CMAC support in configure. HStenn. + [Bug 3470] ntpd4.2.8p11 fails to compile without OpenSSL + [Bug 3469] Incomplete string compare [...] in is_refclk_addr + - patch by Stephen Friedl + [Bug 3467] Potential memory fault in ntpq [...] + - fixed IO redirection and CTRL-C handling in ntq and ntpdc + [Bug 3465] Default TTL values cannot be used + [Bug 3461] refclock_shm.c: clear error status on clock recovery + - initial patch by Hal Murray; also fixed refclock_report() trouble + [Bug 3460] Fix typo in ntpq.texi, reported by Kenyon Ralph. + [Bug 3456] Use uintptr_t rather than size_t to store an integer in a pointer + - According to Brooks Davis, there was only one location + [Bug 3449] ntpq - display "loop" instead of refid [...] + - applied patch by Gerry Garvey + [Bug 3445] Symmetric peer won't sync on startup + - applied patch by Gerry Garvey + [Bug 3442] Fixes for ntpdate as suggested by Gerry Garvey, + with modifications + New macro REFID_ISTEXT() which is also used in ntpd/ntp_control.c. + [Bug 3434] ntpd clears STA_UNSYNC on start + - applied patch by Miroslav Lichvar + [Bug 3426] ntpdate.html -t default is 2 seconds. Leonid Evdokimov. + [Bug 3121] Drop root privileges for the forked DNS worker + - integrated patch by Reinhard Max + [Bug 2821] minor build issues + - applied patches by Christos Zoulas, including real bug fixes + html/authopt.html: cleanup, from + ntpd/ntpd.c: DROPROOT cleanup. + Symmetric key range is 1-65535. Update docs. + +-- +NTP 4.2.8p11 (Harlan Stenn , 2018/02/27) Focus: Security, Bug fixes, enhancements. Modified: head/contrib/ntp/config.h.in ============================================================================== --- head/contrib/ntp/config.h.in Tue Aug 21 01:33:25 2018 (r338125) +++ head/contrib/ntp/config.h.in Tue Aug 21 02:38:07 2018 (r338126) @@ -311,6 +311,9 @@ /* Provide the explicit 127.0.0.0/8 martian filter? */ #undef ENABLE_BUG3020_FIX +/* Enable CMAC support? */ +#undef ENABLE_CMAC + /* nls support in libopts */ #undef ENABLE_NLS @@ -372,6 +375,14 @@ /* Define to 1 if you have the `daemon' function. */ #undef HAVE_DAEMON +/* Define to 1 if you have the declaration of `siglongjmp', and to 0 if you + don't. */ +#undef HAVE_DECL_SIGLONGJMP + +/* Define to 1 if you have the declaration of `sigsetjmp', and to 0 if you + don't. */ +#undef HAVE_DECL_SIGSETJMP + /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #undef HAVE_DECL_STRERROR_R @@ -653,6 +664,12 @@ /* if you have NT Threads */ #undef HAVE_NT_THREADS +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_CMAC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_HMAC_H + /* Define to 1 if the system has the type `pid_t'. */ #undef HAVE_PID_T @@ -957,6 +974,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_LOCK_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MAC_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H @@ -1116,6 +1136,9 @@ /* Do we have the TIO serial stuff? */ #undef HAVE_TIO_SERIAL_STUFF + +/* Are TrustedBSD MAC policy privileges available? */ +#undef HAVE_TRUSTEDBSD_MAC /* Define to 1 if the system has the type `uint16_t'. */ #undef HAVE_UINT16_T Modified: head/contrib/ntp/configure ============================================================================== --- head/contrib/ntp/configure Tue Aug 21 01:33:25 2018 (r338125) +++ head/contrib/ntp/configure Tue Aug 21 02:38:07 2018 (r338126) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ntp 4.2.8p11. +# Generated by GNU Autoconf 2.69 for ntp 4.2.8p12. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ntp' PACKAGE_TARNAME='ntp' -PACKAGE_VERSION='4.2.8p11' -PACKAGE_STRING='ntp 4.2.8p11' +PACKAGE_VERSION='4.2.8p12' +PACKAGE_STRING='ntp 4.2.8p12' PACKAGE_BUGREPORT='http://bugs.ntp.org./' PACKAGE_URL='http://www.ntp.org./' @@ -968,6 +968,7 @@ enable_c99_snprintf enable_clockctl enable_linuxcaps enable_solarisprivs +enable_trustedbsd_mac with_arlib with_net_snmp_config enable_libseccomp @@ -1614,7 +1615,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ntp 4.2.8p11 to adapt to many kinds of systems. +\`configure' configures ntp 4.2.8p12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1684,7 +1685,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ntp 4.2.8p11:";; + short | recursive ) echo "Configuration of ntp 4.2.8p12:";; esac cat <<\_ACEOF @@ -1731,6 +1732,8 @@ Optional Features and Packages: --enable-clockctl s Use /dev/clockctl for non-root clock control --enable-linuxcaps + Use Linux capabilities for non-root clock control --enable-solarisprivs + Use Solaris privileges for non-root clock control + --enable-trustedbsd-mac s Use TrustedBSD MAC policy for non-root clock + control --with-arlib - deprecated, arlib not distributed --with-net-snmp-config + =net-snmp-config --enable-libseccomp EXPERIMENTAL: enable support for libseccomp @@ -1923,7 +1926,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ntp configure 4.2.8p11 +ntp configure 4.2.8p12 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2632,7 +2635,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ntp $as_me 4.2.8p11, which was +It was created by ntp $as_me 4.2.8p12, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3633,7 +3636,7 @@ fi # Define the identity of the package. PACKAGE='ntp' - VERSION='4.2.8p11' + VERSION='4.2.8p12' cat >>confdefs.h <<_ACEOF @@ -24026,7 +24029,40 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5 $as_echo "$ntp_have_solarisprivs" >&6; } -case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs" in +for ac_header in sys/mac.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/mac.h" "ac_cv_header_sys_mac_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mac_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_MAC_H 1 +_ACEOF + +fi + +done + + +# Check whether --enable-trustedbsd_mac was given. +if test "${enable_trustedbsd_mac+set}" = set; then : + enableval=$enable_trustedbsd_mac; ntp_use_trustedbsd_mac=$enableval + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use TrustedBSD MAC privileges" >&5 +$as_echo_n "checking if we should use TrustedBSD MAC privileges... " >&6; } + +case "$ntp_use_trustedbsd_mac$ac_cv_header_sys_mac_h" in + yesyes) + +$as_echo "#define HAVE_TRUSTEDBSD_MAC 1" >>confdefs.h + +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_trustedbsd_mac" >&5 +$as_echo "$ntp_use_trustedbsd_mac" >&6; } + +case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs$ntp_use_trustedbsd_mac" in *yes*) $as_echo "#define HAVE_DROPROOT 1" >>confdefs.h @@ -30311,7 +30347,20 @@ $as_echo "$ntp_openssl" >&6; } case "$ntp_openssl" in yes) + for ac_header in openssl/cmac.h openssl/hmac.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi + +done + + $as_echo "#define OPENSSL /**/" >>confdefs.h case "$VER_SUFFIX" in @@ -30534,9 +30583,24 @@ LIBS="$NTPO_SAVED_LIBS" { ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to enable CMAC support" >&5 +$as_echo_n "checking if we want to enable CMAC support... " >&6; } +case "$ac_cv_header_openssl_cmac_h" in + yes) +$as_echo "#define ENABLE_CMAC 1" >>confdefs.h + ans="yes" + ;; + *) ans="no" + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5 +$as_echo "$ans" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use OpenSSL's crypto random (if available)" >&5 $as_echo_n "checking if we want to use OpenSSL's crypto random (if available)... " >&6; } # Check whether --enable-openssl-random was given. @@ -33223,7 +33287,33 @@ fi ### +ac_fn_c_check_decl "$LINENO" "sigsetjmp" "ac_cv_have_decl_sigsetjmp" "#include +" +if test "x$ac_cv_have_decl_sigsetjmp" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SIGSETJMP $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "siglongjmp" "ac_cv_have_decl_siglongjmp" "#include +" +if test "x$ac_cv_have_decl_siglongjmp" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SIGLONGJMP $ac_have_decl +_ACEOF + + +### + + prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix @@ -33964,7 +34054,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ntp $as_me 4.2.8p11, which was +This file was extended by ntp $as_me 4.2.8p12, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -34031,7 +34121,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ntp config.status 4.2.8p11 +ntp config.status 4.2.8p12 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/ntp/configure.ac ============================================================================== --- head/contrib/ntp/configure.ac Tue Aug 21 01:33:25 2018 (r338125) +++ head/contrib/ntp/configure.ac Tue Aug 21 02:38:07 2018 (r338126) @@ -3014,6 +3014,17 @@ AC_MSG_RESULT([$ans]) NTP_OPENSSL +AC_MSG_CHECKING([if we want to enable CMAC support]) +case "$ac_cv_header_openssl_cmac_h" in + yes) + AC_DEFINE([ENABLE_CMAC], [1], [Enable CMAC support?]) + ans="yes" + ;; + *) ans="no" + ;; +esac +AC_MSG_RESULT([$ans]) + NTP_CRYPTO_RAND # if we are using OpenSSL (--with-crypto), by default Autokey is enabled @@ -4377,6 +4388,10 @@ dnl can't be conditionalized. NTP_GOOGLETEST NTP_PROBLEM_TESTS + +### + +AC_CHECK_DECLS([sigsetjmp,siglongjmp], [], [], [[#include ]]) ### Modified: head/contrib/ntp/html/authentic.html ============================================================================== --- head/contrib/ntp/html/authentic.html Tue Aug 21 01:33:25 2018 (r338125) +++ head/contrib/ntp/html/authentic.html Tue Aug 21 02:38:07 2018 (r338126) @@ -1,91 +1,223 @@ - - - -Authentication Support - - - - -

Authentication Support

-giffrom Alice's Adventures in Wonderland, Lewis Carroll -

Our resident cryptographer; now you see him, now you don't.

-

Last update: - 5-Feb-2016 09:13 - UTC

-
-

Related Links

- - -

Table of Contents

- -
-

Introduction

-

This page describes the various cryptographic authentication provisions in NTPv4. Authentication support allows the NTP client to verify that servers are in fact known and trusted and not intruders intending accidentally or intentionally to masquerade as a legitimate server. A detailed discussion of the NTP multi-layer security model and vulnerability analysis is in the white paper NTP Security Analysis.

-

The NTPv3 specification (RFC-1305) defined an authentication scheme properly described as symmetric key cryptography. It used the Data Encryption Standard (DES) algorithm operating in cipher-block chaining (CBC) mode. Subsequently, this algorithm was replaced by the RSA Message Digest 5 (MD5) algorithm commonly called keyed-MD5. Either algorithm computes a message digest or one-way hash which can be used to verify the client has the same message digest as the server. The MD5 message digest algorithm is included in the distribution, so without further cryptographic support, the distribution can be freely exported.

-

If the OpenSSL cryptographic library is installed prior to building the distribution, all message digest algorithms included in the library may be used, including SHA and SHA1. However, if conformance to FIPS 140-2 is required, only a limited subset of these algorithms can be used. This library is available from http://www.openssl.org and can be installed using the procedures outlined in the Building and Installing the Distribution page. Once installed, the configure and build process automatically detects the library and links the library routines -required.

-

In addition to the symmetric key algorithms, this distribution includes support for the Autokey public key algorithms and protocol specified in RFC-5906 "Network Time Protocol Version 4: Autokey Specification". This support is available only if the OpenSSL library has been installed and the --enable-autokey option is used when the distribution is built.

-

Public key cryptography is generally considered more secure than symmetric key cryptography, since the security is based on private and public values which are generated by each participant and where the private value is never revealed. Autokey uses X.509 public certificates, which can be produced by commercial services, the OpenSSL application program, or the ntp-keygen utility program in the NTP software distribution.

-

Note that according to US law, NTP binaries including OpenSSL library components, including the OpenSSL library itself, cannot be exported outside the US without license from the US Department of Commerce. Builders outside the US are advised to obtain the OpenSSL library directly from OpenSSL, which is outside the US, and build outside the US.

-

Authentication is configured separately for each association using the key or autokey option of the server configuration command, as described in the Server Options page. The ntp-keygen page describes the files required for the various authentication schemes. Further details are in the briefings, papers and reports at the NTP project page linked from www.ntp.org.

-

By default, the client sends non-authenticated packets and the server responds with non-authenticated packets. If the client sends authenticated packets, the server responds with authenticated packets if correct, or a crypto-NAK packet if not. In the case of unsolicited packets which might consume significant resources, such as broadcast or symmetric mode packets, authentication is required, unless overridden by a disable auth command. In the current climate of targeted broadcast or "letterbomb" attacks, defeating this requirement would be decidedly dangerous. In any case, the notrust flag, described on the Access Control Options page, can be used to disable access to all but correctly authenticated clients.

-

Symmetric Key Cryptography

-

The original NTPv3 specification (RFC-1305), as well as the current NTPv4 specification (RFC-5905), allows any one of possibly 65,534 message digest keys (excluding zero), each distinguished by a 32-bit key ID, to authenticate an association. The servers and clients involved must agree on the key ID, key type and key to authenticate NTP packets.

-

The message digest is a cryptographic hash computed by an algorithm such as MD5, SHA, or AES-128 CMAC. When authentication is specified, a message authentication code (MAC) is appended to the NTP packet header. The MAC consists of a 32-bit key identifier (key ID) followed by a 128- or 160-bit message digest. The algorithm computes the digest as the hash of a 128- or 160- bit message digest key concatenated with the NTP packet header fields with the exception of the MAC. On transmit, the message digest is computed and inserted in the MAC. On receive, the message digest is computed and compared with the MAC. The packet is accepted only if the two MACs are identical. If a discrepancy is found by the client, the client ignores the packet, but raises an alarm. If this happens at the server, the server returns a special message called a crypto-NAK. Since the crypto-NAK is protected by the loopback test, an intruder cannot disrupt the protocol by sending a bogus crypto -NAK.

-

Keys and related information are specified in a keys file, which must be distributed and stored using secure means beyond the scope of the NTP protocol itself. Besides the keys used for ordinary NTP associations, additional keys can be used as passwords for the ntpq and ntpdc utility programs. Ordinarily, the ntp.keys file is generated by the ntp-keygen program, but it can be constructed and edited using an ordinary text editor.

-

Each line of the keys file consists of three or four fields: a key ID in the range 1 to 65,534, inclusive, a key type, a message digest key consisting of a printable ASCII string less than 40 characters or a 40-character hex digit string, and an optional comma-separated list of IPs that are allowed to serve time. If the OpenSSL library is installed, the key type can be any message digest algorithm supported by the library. If the OpenSSL library is not installed, the only permitted key type is MD5.

- - -
- Figure 1. Typical Symmetric Key File -
-
-# ntpkey_MD5key_bk.ntp.org.3595864945
-# Thu Dec 12 19:22:25 2013
+  
+    
+    
+    Authentication Support
+    
+    
+    
+  
+  
+    

Authentication Support

+ giffrom Alice's Adventures in Wonderland, Lewis Carroll +

Our resident cryptographer; now you see him, now you don't.

+

Last update: + 24-Jul-2018 09:12 + UTC

+
+

Related Links

+ + +

Table of Contents

+ +
+

Introduction

+

This page describes the various cryptographic authentication + provisions in NTPv4. Authentication support allows the NTP client to + verify that servers are in fact known and trusted and not intruders + intending accidentally or intentionally to masquerade as a legitimate + server. A detailed discussion of the NTP multi-layer security model + and vulnerability analysis is in the white + paper NTP + Security Analysis.

+

The NTPv3 specification (RFC-1305) defined an authentication scheme + properly described as symmetric key cryptography. It used + the Data Encryption Standard (DES) algorithm operating in cipher-block + chaining (CBC) mode. Subsequently, this algorithm was replaced by the + RSA Message Digest 5 (MD5) algorithm commonly called keyed-MD5. + Either algorithm computes a message digest or one-way hash which can + be used to verify the client has the same message digest as the + server. The MD5 message digest algorithm is included in the + distribution, so without further cryptographic support, the + distribution can be freely exported.

+

If the OpenSSL cryptographic library is installed prior to building + the distribution, all message digest algorithms included in the + library may be used, including SHA and SHA1. However, if conformance + to FIPS 140-2 is required, only a limited subset of these algorithms + can be used. This library is available + from http://www.openssl.org and + can be installed using the procedures outlined in + the Building and Installing the Distribution + page. Once installed, the configure and build process automatically + detects the library and links the library routines required.

+

In addition to the symmetric key algorithms, this distribution + includes support for the Autokey public key algorithms and protocol + specified in RFC-5906 "Network Time Protocol Version 4: Autokey + Specification". This support is available only if the OpenSSL + library has been installed and the --enable-autokey option is + used when the distribution is built.

+

Public key cryptography is generally considered more secure than + symmetric key cryptography, since the security is based on private and + public values which are generated by each participant and where the + private value is never revealed. Autokey uses X.509 public + certificates, which can be produced by commercial services, the + OpenSSL application program, or + the ntp-keygen utility program in + the NTP software distribution.

+

Note that according to US law, NTP binaries including OpenSSL library + components, including the OpenSSL library itself, cannot be exported + outside the US without license from the US Department of Commerce. + Builders outside the US are advised to obtain the OpenSSL library + directly from OpenSSL, which is outside the US, and build outside the + US.

+

Authentication is configured separately for each association using + the key or autokey option of the server + configuration command, as described in + the Server Options page. + The ntp-keygen page describes the files + required for the various authentication schemes. Further details are + in the briefings, papers and reports at the NTP project page linked + from www.ntp.org.

+

By default, the client sends non-authenticated packets and the server + responds with non-authenticated packets. If the client sends + authenticated packets, the server responds with authenticated packets + if correct, or a crypto-NAK packet if not. In the case of unsolicited + packets which might consume significant resources, such as broadcast + or symmetric mode packets, authentication is required, unless + overridden by a disable auth command. In the current climate + of targeted broadcast or "letterbomb" attacks, defeating + this requirement would be decidedly dangerous. In any case, + the notrust flag, described on + the Access Control Options page, can be + used to disable access to all but correctly authenticated clients.

+

Symmetric Key Cryptography

+

The original NTPv3 specification (RFC-1305), as well as the current + NTPv4 specification (RFC-5905), allows any one of possibly 65,535 + message digest keys (excluding zero), each distinguished by a 32-bit + key ID, to authenticate an association. The servers and clients + involved must agree on the key ID, key type and key to authenticate + NTP packets.

+

The message digest is a cryptographic hash computed by an algorithm + such as MD5, SHA, or AES-128 CMAC. When authentication is specified, + a message authentication code (MAC) is appended to the NTP packet + header. The MAC consists of a 32-bit key identifier (key ID) followed + by a 128- or 160-bit message digest. The algorithm computes the + digest as the hash of a 128- or 160- bit message digest key + concatenated with the NTP packet header fields with the exception of + the MAC. On transmit, the message digest is computed and inserted in + the MAC. On receive, the message digest is computed and compared with + the MAC. The packet is accepted only if the two MACs are identical. + If a discrepancy is found by the client, the client ignores the + packet, but raises an alarm. If this happens at the server, the + server returns a special message called a crypto-NAK. Since + the crypto-NAK is protected by the loopback test, an intruder cannot + disrupt the protocol by sending a bogus crypto-NAK.

+

Keys and related information are specified in a keys file, which must + be distributed and stored using secure means beyond the scope of the + NTP protocol itself. Besides the keys used for ordinary NTP + associations, additional keys can be used as passwords for + the ntpq + and ntpdc utility programs. + Ordinarily, the ntp.keys file is generated by + the ntp-keygen program, but it can + be constructed and edited using an ordinary text editor.

+

Each line of the keys file consists of three or four fields: a key + ID in the range 1 to 65,535, inclusive, a key type, a message digest + key consisting of a printable ASCII string less than 40 characters or + a 40-character hex digit string, and an optional comma-separated list + of IPs that are allowed to serve time. If the OpenSSL library is + installed, the key type can be any message digest algorithm supported + by the library. If the OpenSSL library is not installed, the only + permitted key type is MD5.

+ + +
+ Figure 1. Typical Symmetric Key File +
+
+	    # ntpkey_MD5key_bk.ntp.org.3595864945
+	    # Thu Dec 12 19:22:25 2013
 
-1  MD5 L";Nw<`.I<f4U0)247"i  # MD5 key
-2  MD5 &>l0%XXK9O'51VwV<xq~  # MD5 key
-3  MD5 lb4zLW~d^!K:]RsD'qb6  # MD5 key
-4  MD5 Yue:tL[+vR)M`n~bY,'?  # MD5 key
-5  MD5 B;fxlKgr/&4ZTbL6=RxA  # MD5 key
-6  MD5 4eYwa`o}3i@@V@..R9!l  # MD5 key
-7  MD5 `A.([h+;wTQ|xfi%Sn_!  # MD5 key
-8  MD5 45:V,r4]l6y^JH6"Sh?F  # MD5 key
-9  MD5 3-5vcn*6l29DS?Xdsg)*  # MD5 key
-10 MD5 2late4Me              # MD5 key
-11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c  # SHA1 key
-12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74  # SHA1 key
-13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9  # SHA1 key
-14 SHA  a5332809c8878dd3a5b918819108a111509aeceb  # SHA  key
-15 MD2  2fe16c88c760ff2f16d4267e36c1aa6c926e6964  # MD2  key
-16 MD4  b2691811dc19cfc0e2f9bcacd74213f29812183d  # MD4  key
-17 MD5  e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c  # MD5  key
-18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc  # MDC2 key
-19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2  # RIPEMD160 key
-20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878  # AES128CMAC key
-  
-

Figure 1 shows a typical keys file used by the reference implementation when the OpenSSL library is installed. In this figure, for key IDs in he range 1-10, the key is interpreted as a printable ASCII string. For key IDs in the range 11-20, the key is a 40-character hex digit string. The key is truncated or zero-filled internally to either 128 or 160 bits, depending on the key type. The line can be edited later or new lines can be added to change any field. The key can be changed to a password, such as 2late4Me for key ID 10. Note that two or more keys files can be combined in any order as long as the key IDs are distinct.

-

When ntpd is started, it reads the keys file specified by the keys command and installs the keys in the key cache. However, individual keys must be activated with the trustedkey configuration command before use. This allows, for instance, the installation of possibly several batches of keys and then activating a key remotely using ntpq or ntpdc. The requestkey command selects the key ID used as the password for the ntpdc utility, while the controlkey command selects the key ID used as the password for the ntpq utility.

-

Microsoft Windows Authentication

-

In addition to the above means, ntpd now supports Microsoft Windows MS-SNTP authentication using Active Directory services. This support was contributed by the Samba Team and is still in development. It is enabled using the mssntp flag of the restrict command described on the Access Control Options page. Note: Potential users should be aware that these services involve a TCP connection to another process that could potentially block, denying services to other users. Therefore, this flag should be used only for a dedicated server with no clients other than MS-SNTP.

-

Public Key Cryptography

-

See the Autokey Public-Key Authentication page.

-
- - + 1 MD5 L";Nw<`.I<f4U0)247"i # MD5 key + 2 MD5 &>l0%XXK9O'51VwV<xq~ # MD5 key + 3 MD5 lb4zLW~d^!K:]RsD'qb6 # MD5 key + 4 MD5 Yue:tL[+vR)M`n~bY,'? # MD5 key + 5 MD5 B;fxlKgr/&4ZTbL6=RxA # MD5 key + 6 MD5 4eYwa`o}3i@@V@..R9!l # MD5 key + 7 MD5 `A.([h+;wTQ|xfi%Sn_! # MD5 key + 8 MD5 45:V,r4]l6y^JH6"Sh?F # MD5 key + 9 MD5 3-5vcn*6l29DS?Xdsg)* # MD5 key + 10 MD5 2late4Me # MD5 key + 11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c # SHA1 key + 12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74 # SHA1 key + 13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9 # SHA1 key + 14 SHA a5332809c8878dd3a5b918819108a111509aeceb # SHA key + 15 MD2 2fe16c88c760ff2f16d4267e36c1aa6c926e6964 # MD2 key + 16 MD4 b2691811dc19cfc0e2f9bcacd74213f29812183d # MD4 key + 17 MD5 e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c # MD5 key + 18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc # MDC2 key + 19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2 # RIPEMD160 key + 20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878 # AES128CMAC key + 21 MD5 sampo 10.1.2.3/24 +
+

Figure 1 shows a typical symmetric keys file used by the reference + implementation when the OpenSSL library is installed. Each line of + the file contains three or four fields. The first field is an integer + between 1 and 65535, inclusive, representing the key identifier. The + second field is the digest algorithm, which in the absence of the + OpenSSL library must be MD5, which designates the MD5 message + digest algorithm. The third field is the key. The optional fourth + field is one or more comma-separated IPs. An IP may end with an + optional /subnetbits suffix, which limits the acceptance of + the key identifier to packets claiming to be from the described IP + space. In this example, for the key IDs in the range 1-10 the key is + interpreted as a printable ASCII string. For the key IDs in the range + 11-20, the key is a 40-character hex digit string. In either case, + the key is truncated or zero-filled internally to either 128 or 160 + bits, depending on the key type. The line can be edited later or new + lines can be added to change any field. The key can be changed to a + password, such as 2late4Me for key ID 10. Note that two or + more keys files can be combined in any order as long as the key IDs + are distinct.

+

When ntpd is started, it reads the keys file specified by + the keys command and installs the keys in the key cache. + However, individual keys must be activated with + the trustedkey configuration command before use. This + allows, for instance, the installation of possibly several batches of + keys and then activating a key remotely using ntpq + or ntpdc. The requestkey command selects the key ID + used as the password for the ntpdc utility, while + the controlkey command selects the key ID used as the + password for the ntpq utility.

+

Microsoft Windows Authentication

+

In addition to the above means, ntpd now supports Microsoft + Windows MS-SNTP authentication using Active Directory services. This + support was contributed by the Samba Team and is still in development. + It is enabled using the mssntp flag of the restrict + command described on the Access Control + Options page. Note: Potential users should + be aware that these services involve a TCP connection to another + process that could potentially block, denying services to other users. + Therefore, this flag should be used only for a dedicated server with + no clients other than MS-SNTP.

+

Public Key Cryptography

+

See the Autokey Public-Key Authentication + page.

+
+ + Modified: head/contrib/ntp/html/authopt.html ============================================================================== --- head/contrib/ntp/html/authopt.html Tue Aug 21 01:33:25 2018 (r338125) +++ head/contrib/ntp/html/authopt.html Tue Aug 21 02:38:07 2018 (r338126) @@ -4,6 +4,7 @@ Authentication Commands and Options +