From owner-svn-src-all@freebsd.org Sun Mar 11 00:08:10 2018 Return-Path: Delivered-To: svn-src-all@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 7C0B3F43388; Sun, 11 Mar 2018 00:08:10 +0000 (UTC) (envelope-from allanjude@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 2EAB36D382; Sun, 11 Mar 2018 00:08:10 +0000 (UTC) (envelope-from allanjude@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 299B014E78; Sun, 11 Mar 2018 00:08:10 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2B089bp058369; Sun, 11 Mar 2018 00:08:09 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2B089uc058367; Sun, 11 Mar 2018 00:08:09 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201803110008.w2B089uc058367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sun, 11 Mar 2018 00:08:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r330752 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 330752 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 00:08:10 -0000 Author: allanjude Date: Sun Mar 11 00:08:09 2018 New Revision: 330752 URL: https://svnweb.freebsd.org/changeset/base/330752 Log: Grant Brad Davis (brd) a src bit Brad will be working on pkg base Mentors: allanjude bapt Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Sun Mar 11 00:07:14 2018 (r330751) +++ svnadmin/conf/access Sun Mar 11 00:08:09 2018 (r330752) @@ -42,6 +42,7 @@ bdrewery benno bms br +brd brooks brueffer bryanv Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Sun Mar 11 00:07:14 2018 (r330751) +++ svnadmin/conf/mentors Sun Mar 11 00:08:09 2018 (r330752) @@ -13,6 +13,7 @@ achim scottl Co-mentor: emaste anish neel Co-mentor: grehan arichardson jhb Co-mentor: brooks +brd allanjude Co-mentor: bapt def pjd eri ae Co-mentor: thompsa eugene avg Co-mentor: mav From owner-svn-src-all@freebsd.org Sun Mar 11 00:38:09 2018 Return-Path: Delivered-To: svn-src-all@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 B4686F45367; Sun, 11 Mar 2018 00:38:09 +0000 (UTC) (envelope-from avos@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 668FB6E2DD; Sun, 11 Mar 2018 00:38:09 +0000 (UTC) (envelope-from avos@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 477C015334; Sun, 11 Mar 2018 00:38:09 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2B0c99q073387; Sun, 11 Mar 2018 00:38:09 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2B0c9vC073386; Sun, 11 Mar 2018 00:38:09 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201803110038.w2B0c9vC073386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 11 Mar 2018 00:38:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330753 - head/sys/dev/otus X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/dev/otus X-SVN-Commit-Revision: 330753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 00:38:09 -0000 Author: avos Date: Sun Mar 11 00:38:08 2018 New Revision: 330753 URL: https://svnweb.freebsd.org/changeset/base/330753 Log: otus(4): check mcast / mgt / ucast rates during Tx descriptor setup These parameters may be changed via ifconfig(8); by default, mgt / mcast rates are lowest possible and ucast rate is not set (matches previous configuration). While here, store some variables locally for better readability. Modified: head/sys/dev/otus/if_otus.c Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Sun Mar 11 00:08:09 2018 (r330752) +++ head/sys/dev/otus/if_otus.c Sun Mar 11 00:38:08 2018 (r330753) @@ -2182,6 +2182,7 @@ static int otus_tx(struct otus_softc *sc, struct ieee80211_node *ni, struct mbuf *m, struct otus_data *data, const struct ieee80211_bpf_params *params) { + const struct ieee80211_txparam *tp = ni->ni_txparms; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_frame *wh; @@ -2190,7 +2191,7 @@ otus_tx(struct otus_softc *sc, struct ieee80211_node * uint32_t phyctl; uint16_t macctl, qos; uint8_t qid, rate; - int hasqos, xferlen; + int hasqos, xferlen, type, ismcast; wh = mtod(m, struct ieee80211_frame *); if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { @@ -2228,17 +2229,19 @@ otus_tx(struct otus_softc *sc, struct ieee80211_node * qid = WME_AC_BE; } + type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; + ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); + /* Pickup a rate index. */ - if (params != NULL) { + if (params != NULL) rate = otus_rate_to_hw_rate(sc, params->ibp_rate0); - } else if (m->m_flags & M_EAPOL) { - /* Get lowest rate */ - rate = otus_rate_to_hw_rate(sc, 0); - } else if (IEEE80211_IS_MULTICAST(wh->i_addr1) || - (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) != IEEE80211_FC0_TYPE_DATA) { - /* Get lowest rate */ - rate = otus_rate_to_hw_rate(sc, 0); - } else { + else if (!!(m->m_flags & M_EAPOL) || type != IEEE80211_FC0_TYPE_DATA) + rate = otus_rate_to_hw_rate(sc, tp->mgmtrate); + else if (ismcast) + rate = otus_rate_to_hw_rate(sc, tp->mcastrate); + else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) + rate = otus_rate_to_hw_rate(sc, tp->ucastrate); + else { (void) ieee80211_ratectl_rate(ni, NULL, 0); rate = otus_rate_to_hw_rate(sc, ni->ni_txrate); } @@ -2249,12 +2252,12 @@ otus_tx(struct otus_softc *sc, struct ieee80211_node * /* * XXX TODO: params for NOACK, ACK, RTS, CTS, etc */ - if (IEEE80211_IS_MULTICAST(wh->i_addr1) || + if (ismcast || (hasqos && ((qos & IEEE80211_QOS_ACKPOLICY) == IEEE80211_QOS_ACKPOLICY_NOACK))) macctl |= AR_TX_MAC_NOACK; - if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { + if (!ismcast) { if (m->m_pkthdr.len + IEEE80211_CRC_LEN >= vap->iv_rtsthreshold) macctl |= AR_TX_MAC_RTS; else if (ic->ic_flags & IEEE80211_F_USEPROT) { From owner-svn-src-all@freebsd.org Sun Mar 11 01:09:32 2018 Return-Path: Delivered-To: svn-src-all@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 636BAF479A9; Sun, 11 Mar 2018 01:09:32 +0000 (UTC) (envelope-from nwhitehorn@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 17BA36F7AE; Sun, 11 Mar 2018 01:09:32 +0000 (UTC) (envelope-from nwhitehorn@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 11DBF1580A; Sun, 11 Mar 2018 01:09:32 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2B19VaE088241; Sun, 11 Mar 2018 01:09:31 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2B19V9c088240; Sun, 11 Mar 2018 01:09:31 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201803110109.w2B19V9c088240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 11 Mar 2018 01:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330754 - head/sys/powerpc/ofw X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/ofw X-SVN-Commit-Revision: 330754 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 01:09:32 -0000 Author: nwhitehorn Date: Sun Mar 11 01:09:31 2018 New Revision: 330754 URL: https://svnweb.freebsd.org/changeset/base/330754 Log: Make FDT-using parts of ofw_machdep.c condition on options FDT. This fixes the kernel build when options FDT is absent. Modified: head/sys/powerpc/ofw/ofw_machdep.c Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Sun Mar 11 00:38:08 2018 (r330753) +++ head/sys/powerpc/ofw/ofw_machdep.c Sun Mar 11 01:09:31 2018 (r330754) @@ -223,6 +223,7 @@ parse_ofw_memory(phandle_t node, const char *prop, str return (sz); } +#ifdef FDT static int excise_fdt_reserved(struct mem_region *avail, int asz) { @@ -310,6 +311,7 @@ excise_fdt_reserved(struct mem_region *avail, int asz) return (asz); } +#endif /* * This is called during powerpc_init, before the system is really initialized. @@ -348,9 +350,11 @@ ofw_mem_regions(struct mem_region *memp, int *memsz, asz += res/sizeof(struct mem_region); } +#ifdef FDT phandle = OF_finddevice("/chosen"); if (OF_hasprop(phandle, "fdtmemreserv")) asz = excise_fdt_reserved(availp, asz); +#endif *memsz = msz; *availsz = asz; @@ -409,6 +413,7 @@ OF_bootstrap() } else #endif if (fdt != NULL) { +#ifdef FDT #ifdef AIM bus_space_tag_t fdt_bt; vm_offset_t tmp_fdt_ptr; @@ -445,6 +450,7 @@ OF_bootstrap() err = OF_init((void *)fdt_va); #else err = OF_init(fdt); +#endif #endif } From owner-svn-src-all@freebsd.org Sun Mar 11 04:37:06 2018 Return-Path: Delivered-To: svn-src-all@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 0A657F2B810; Sun, 11 Mar 2018 04:37:06 +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 A42EC7744B; Sun, 11 Mar 2018 04:37:05 +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 82E2A1876F; Sun, 11 Mar 2018 04:37:05 +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 w2B4b58I093113; Sun, 11 Mar 2018 04:37:05 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2B4b5Es093111; Sun, 11 Mar 2018 04:37:05 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201803110437.w2B4b5Es093111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 11 Mar 2018 04:37:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330758 - head/sys/dev/extres/regulator X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/extres/regulator X-SVN-Commit-Revision: 330758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 04:37:06 -0000 Author: manu Date: Sun Mar 11 04:37:05 2018 New Revision: 330758 URL: https://svnweb.freebsd.org/changeset/base/330758 Log: extres/regulators: Add sysctls for regulators For each regulators create an hw.regulator.. : uvolt: Current value always_on: 1 If the reg is always on boot_on: 1 If the reg is set at boot time enable_cnt: Number of consumer(s) enable_delay: Delay before enabling the regulator ramp_delay: The Ramp delay max_uamp: The maximum value of the regulator in uAmps min_uamp: The minimal value of the regulator in uAmps max_uvolt: The maximum value of the regulator in uVolts min_uvolt: The minimal value of the regulator in uVolts Reviewed by: ian Differential Revision: https://reviews.freebsd.org/D14578 Modified: head/sys/dev/extres/regulator/regulator.c head/sys/dev/extres/regulator/regulator.h Modified: head/sys/dev/extres/regulator/regulator.c ============================================================================== --- head/sys/dev/extres/regulator/regulator.c Sun Mar 11 04:10:18 2018 (r330757) +++ head/sys/dev/extres/regulator/regulator.c Sun Mar 11 04:37:05 2018 (r330758) @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); #include "regdev_if.h" +SYSCTL_NODE(_hw, OID_AUTO, regulator, CTLFLAG_RD, NULL, "Regulators"); + MALLOC_DEFINE(M_REGULATOR, "regulator", "Regulator framework"); #define DIV_ROUND_UP(n,d) howmany(n, d) @@ -112,6 +114,8 @@ struct regnode { int enable_cnt; /* Enabled counter */ struct regnode_std_param std_param; /* Standard parameters */ + + struct sysctl_ctx_list sysctl_ctx; }; /* @@ -147,6 +151,29 @@ SX_SYSINIT(regulator_topology, ®node_topo_lock, "Re #define REGNODE_XLOCK(_sc) sx_xlock(&((_sc)->lock)) #define REGNODE_UNLOCK(_sc) sx_unlock(&((_sc)->lock)) +/* + * sysctl handler + */ +static int +regnode_uvolt_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct regnode *regnode = arg1; + int rv, uvolt; + + if (regnode->std_param.min_uvolt == regnode->std_param.max_uvolt) { + uvolt = regnode->std_param.min_uvolt; + } else { + REG_TOPO_SLOCK(); + if ((rv = regnode_get_voltage(regnode, &uvolt)) != 0) { + REG_TOPO_UNLOCK(); + return (rv); + } + REG_TOPO_UNLOCK(); + } + + return sysctl_handle_int(oidp, &uvolt, sizeof(uvolt), req); +} + /* ---------------------------------------------------------------------------- * * Default regulator methods for base class. @@ -233,6 +260,7 @@ regnode_create(device_t pdev, regnode_class_t regnode_ struct regnode_init_def *def) { struct regnode *regnode; + struct sysctl_oid *regnode_oid; KASSERT(def->name != NULL, ("regulator name is NULL")); KASSERT(def->name[0] != '\0', ("regulator name is empty")); @@ -276,6 +304,66 @@ regnode_create(device_t pdev, regnode_class_t regnode_ #ifdef FDT regnode->ofw_node = def->ofw_node; #endif + + sysctl_ctx_init(®node->sysctl_ctx); + regnode_oid = SYSCTL_ADD_NODE(®node->sysctl_ctx, + SYSCTL_STATIC_CHILDREN(_hw_regulator), + OID_AUTO, regnode->name, + CTLFLAG_RD, 0, "A regulator node"); + + SYSCTL_ADD_INT(®node->sysctl_ctx, + SYSCTL_CHILDREN(regnode_oid), + OID_AUTO, "min_uvolt", + CTLFLAG_RD, ®node->std_param.min_uvolt, 0, + "Minimal voltage (in uV)"); + SYSCTL_ADD_INT(®node->sysctl_ctx, + SYSCTL_CHILDREN(regnode_oid), + OID_AUTO, "max_uvolt", + CTLFLAG_RD, ®node->std_param.max_uvolt, 0, + "Maximal voltage (in uV)"); + SYSCTL_ADD_INT(®node->sysctl_ctx, + SYSCTL_CHILDREN(regnode_oid), + OID_AUTO, "min_uamp", + CTLFLAG_RD, ®node->std_param.min_uamp, 0, + "Minimal amperage (in uA)"); + SYSCTL_ADD_INT(®node->sysctl_ctx, + SYSCTL_CHILDREN(regnode_oid), + OID_AUTO, "max_uamp", + CTLFLAG_RD, ®node->std_param.max_uamp, 0, + "Maximal amperage (in uA)"); + SYSCTL_ADD_INT(®node->sysctl_ctx, + SYSCTL_CHILDREN(regnode_oid), + OID_AUTO, "ramp_delay", + CTLFLAG_RD, ®node->std_param.ramp_delay, 0, + "Ramp delay (in uV/us)"); + SYSCTL_ADD_INT(®node->sysctl_ctx, + SYSCTL_CHILDREN(regnode_oid), + OID_AUTO, "enable_delay", + CTLFLAG_RD, ®node->std_param.enable_delay, 0, + "Enable delay (in us)"); + SYSCTL_ADD_INT(®node->sysctl_ctx, + SYSCTL_CHILDREN(regnode_oid), + OID_AUTO, "enable_cnt", + CTLFLAG_RD, ®node->enable_cnt, 0, + "The regulator enable counter"); + SYSCTL_ADD_INT(®node->sysctl_ctx, + SYSCTL_CHILDREN(regnode_oid), + OID_AUTO, "boot_on", + CTLFLAG_RD, (int *) ®node->std_param.boot_on, 0, + "Is enabled on boot"); + SYSCTL_ADD_INT(®node->sysctl_ctx, + SYSCTL_CHILDREN(regnode_oid), + OID_AUTO, "always_on", + CTLFLAG_RD, (int *)®node->std_param.always_on, 0, + "Is always enabled"); + + SYSCTL_ADD_PROC(®node->sysctl_ctx, + SYSCTL_CHILDREN(regnode_oid), + OID_AUTO, "uvolt", + CTLTYPE_INT | CTLFLAG_RD, + regnode, 0, regnode_uvolt_sysctl, + "I", + "Current voltage (in uV)"); return (regnode); } Modified: head/sys/dev/extres/regulator/regulator.h ============================================================================== --- head/sys/dev/extres/regulator/regulator.h Sun Mar 11 04:10:18 2018 (r330757) +++ head/sys/dev/extres/regulator/regulator.h Sun Mar 11 04:37:05 2018 (r330758) @@ -31,10 +31,13 @@ #include "opt_platform.h" #include +#include #ifdef FDT #include #endif #include "regnode_if.h" + +SYSCTL_DECL(_hw_regulator); #define REGULATOR_FLAGS_STATIC 0x00000001 /* Static strings */ #define REGULATOR_FLAGS_NOT_DISABLE 0x00000002 /* Cannot be disabled */ From owner-svn-src-all@freebsd.org Sun Mar 11 04:01:24 2018 Return-Path: Delivered-To: svn-src-all@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 6DA07F29D93; Sun, 11 Mar 2018 04:01:24 +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 2114F75BF1; Sun, 11 Mar 2018 04:01:24 +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 1C069176E0; Sun, 11 Mar 2018 04:01:24 +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 w2B41Nir075866; Sun, 11 Mar 2018 04:01:23 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2B41Neq075865; Sun, 11 Mar 2018 04:01:23 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201803110401.w2B41Neq075865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 11 Mar 2018 04:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330756 - head/sys/arm/allwinner/clkng X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner/clkng X-SVN-Commit-Revision: 330756 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 04:01:24 -0000 Author: manu Date: Sun Mar 11 04:01:23 2018 New Revision: 330756 URL: https://svnweb.freebsd.org/changeset/base/330756 Log: allwinner: Add IR clock to sun8i Add ir clock definition to sun8i-r-ccu. No idea if it's working but aw_cir seems happy now and the frequency is set to 3Mhz as it should. Modified: head/sys/arm/allwinner/clkng/ccu_sun8i_r.c Modified: head/sys/arm/allwinner/clkng/ccu_sun8i_r.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_sun8i_r.c Sun Mar 11 02:45:52 2018 (r330755) +++ head/sys/arm/allwinner/clkng/ccu_sun8i_r.c Sun Mar 11 04:01:23 2018 (r330756) @@ -108,6 +108,17 @@ DIV_CLK(apb0_clk, 0, 2, /* shift, width */ 0, NULL); /* flags, div table */ +static const char *ir_parents[] = {"osc32k", "osc24M"}; +NM_CLK(ir_clk, + CLK_IR, /* id */ + "ir", ir_parents, /* names, parents */ + 0x54, /* offset */ + 0, 4, 0, 0, /* N factor */ + 16, 2, 0, 0, /* M flags */ + 24, 2, /* mux */ + 31, /* gate */ + AW_CLK_HAS_MUX | AW_CLK_REPARENT); /* flags */ + static struct aw_clk_prediv_mux_def *r_ccu_prediv_mux_clks[] = { &ar100_clk, }; @@ -124,6 +135,10 @@ static struct clk_fixed_def *fixed_factor_clks[] = { &ahb0_clk, }; +static struct aw_clk_nm_def *nm_clks[] = { + &ir_clk, +}; + void ccu_sun8i_r_register_clocks(struct aw_ccung_softc *sc) { @@ -147,4 +162,6 @@ ccu_sun8i_r_register_clocks(struct aw_ccung_softc *sc) clknode_div_register(sc->clkdom, div_clks[i]); for (i = 0; i < nitems(fixed_factor_clks); i++) clknode_fixed_register(sc->clkdom, fixed_factor_clks[i]); + for (i = 0; i < nitems(nm_clks); i++) + aw_clk_nm_register(sc->clkdom, nm_clks[i]); } From owner-svn-src-all@freebsd.org Sun Mar 11 04:10:19 2018 Return-Path: Delivered-To: svn-src-all@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 E79A9F2A5D9; Sun, 11 Mar 2018 04:10:18 +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 983407677C; Sun, 11 Mar 2018 04:10:18 +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 92FAF18294; Sun, 11 Mar 2018 04:10:18 +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 w2B4AI5e078590; Sun, 11 Mar 2018 04:10:18 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2B4AIXH078589; Sun, 11 Mar 2018 04:10:18 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803110410.w2B4AIXH078589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 11 Mar 2018 04:10:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330757 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 330757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 04:10:19 -0000 Author: kevans Date: Sun Mar 11 04:10:18 2018 New Revision: 330757 URL: https://svnweb.freebsd.org/changeset/base/330757 Log: stand/interp_lua: correct errorr => error Modified: head/stand/common/interp_lua.c Modified: head/stand/common/interp_lua.c ============================================================================== --- head/stand/common/interp_lua.c Sun Mar 11 04:01:23 2018 (r330756) +++ head/stand/common/interp_lua.c Sun Mar 11 04:10:18 2018 (r330757) @@ -123,7 +123,7 @@ interp_init(void) if (interp_include(filename) != 0) { const char *errstr = lua_tostring(luap, -1); errstr = errstr == NULL ? "unknown" : errstr; - printf("Startup errorr in %s:\nLUA ERROR: %s.\n", filename, errstr); + printf("Startup error in %s:\nLUA ERROR: %s.\n", filename, errstr); lua_pop(luap, 1); } } From owner-svn-src-all@freebsd.org Sun Mar 11 06:18:27 2018 Return-Path: Delivered-To: svn-src-all@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 02ED9F303EC; Sun, 11 Mar 2018 06:18:27 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f177.google.com (mail-io0-f177.google.com [209.85.223.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61DC17A97C; Sun, 11 Mar 2018 06:18:26 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f177.google.com with SMTP id k21so3949756ioc.2; Sat, 10 Mar 2018 22:18:26 -0800 (PST) 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=XCaK6nEbZrHKh1hc14yiY+9yEjK/Z7K6dxLlaBlFwp4=; b=kdOm9tDGI8ZYqx2kd/3p1Ov3cORVQdSsiXu2hQ7hAPtMMHwILl4CXsp6h36s91CJb1 uOHei7MsAQlB27Kh/hbYHSEwMAzy8StYAqgontVhfDF9sFqVTKSLIDe+ngdg+OW9B8yk Lso5N7W/Y43IydYu8lNVZXVhXnV19ObYp7QhH2miQoZwozzcJqX0JVTMcoOaPi7ejlfL R/n6eRgVTJTDCgZioircRgmaXriwfOlM+b/uNhMjP94UmZuLTU2VbWbOqBoVO2pIS0T0 qg01d/UWrdsw2fPqnuE8DdIKo8qu+t3Yt5VXLMbt22B5BxcY50/7jqtTHCiSRYD1h0bq myRQ== X-Gm-Message-State: AElRT7GCUQWeSiPMm12Mir85utAxw1t91rGGP0FBCrzTa6eWB1IYQ8Mu 2fy/y40SEPn/ItEa7zAEcEo6sZCe X-Google-Smtp-Source: AG47ELtPc9QliGMExcdL4TXMlsPuL+7cRuwJqeHv+BBSMnZ4dFPLs5gO6qsWPaEgJHhvR1AckLNzsg== X-Received: by 10.107.141.194 with SMTP id p185mr4411453iod.204.1520748753073; Sat, 10 Mar 2018 22:12:33 -0800 (PST) Received: from mail-io0-f172.google.com (mail-io0-f172.google.com. [209.85.223.172]) by smtp.gmail.com with ESMTPSA id p142sm1553761itb.24.2018.03.10.22.12.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Mar 2018 22:12:32 -0800 (PST) Received: by mail-io0-f172.google.com with SMTP id l12so7878482ioc.10; Sat, 10 Mar 2018 22:12:32 -0800 (PST) X-Received: by 10.107.34.80 with SMTP id i77mr4281667ioi.220.1520748752014; Sat, 10 Mar 2018 22:12:32 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.153.132 with HTTP; Sat, 10 Mar 2018 22:12:31 -0800 (PST) In-Reply-To: <201803110509.w2B5928t008519@repo.freebsd.org> References: <201803110509.w2B5928t008519@repo.freebsd.org> From: Conrad Meyer Date: Sat, 10 Mar 2018 22:12:31 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r330759 - in head: sbin/nvmecontrol sys/dev/nvme To: Alexander Motin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 06:18:27 -0000 On Sat, Mar 10, 2018 at 9:09 PM, Alexander Motin wrote: > Author: mav > Date: Sun Mar 11 05:09:02 2018 > New Revision: 330759 > URL: https://svnweb.freebsd.org/changeset/base/330759 > > Log: > Add new identify data structures fields from NVMe 1.3a. > > ... > Modified: head/sbin/nvmecontrol/identify.c > ============================================================================== > --- head/sbin/nvmecontrol/identify.c Sun Mar 11 04:37:05 2018 (r330758) > +++ head/sbin/nvmecontrol/identify.c Sun Mar 11 05:09:02 2018 (r330759) > @@ -95,25 +95,35 @@ print_controller(struct nvme_controller_data *cdata) > ... > + ((cdata->mic >> NVME_CTRLR_DATA_MIC_SRIOVVF_SHIFT) & > + NVME_CTRLR_DATA_MIC_SRIOVVF_MASK) ? "SR-IOV VF, " : "", > + ((cdata->mic >> NVME_CTRLR_DATA_MIC_MCTRLRS_SHIFT) & > + NVME_CTRLR_DATA_MIC_MCTRLRS_MASK) ? "Multiple controllers, " : "", > + ((cdata->mic >> NVME_CTRLR_DATA_MIC_MPORTS_SHIFT) & > + NVME_CTRLR_DATA_MIC_MPORTS_MASK) ? "Multiple ports" : ""); > ... > Modified: head/sys/dev/nvme/nvme.h > ============================================================================== > --- head/sys/dev/nvme/nvme.h Sun Mar 11 04:37:05 2018 (r330758) > +++ head/sys/dev/nvme/nvme.h Sun Mar 11 05:09:02 2018 (r330759) > @@ -153,6 +153,17 @@ > #define NVME_PWR_ST_APS_SHIFT (6) > #define NVME_PWR_ST_APS_MASK (0x3) > > +/** Controller Multi-path I/O and Namespace Sharing Capabilities */ > +/* More then one port */ > +#define NVME_CTRLR_DATA_MIC_MPORTS_SHIFT (0) > +#define NVME_CTRLR_DATA_MIC_MPORTS_MASK (0x1) > +/* More then one controller */ > +#define NVME_CTRLR_DATA_MIC_MCTRLRS_SHIFT (1) > +#define NVME_CTRLR_DATA_MIC_MCTRLRS_MASK (0x1) > +/* SR-IOV Virtual Function */ > +#define NVME_CTRLR_DATA_MIC_SRIOVVF_SHIFT (2) > +#define NVME_CTRLR_DATA_MIC_SRIOVVF_MASK (0x1) > + > /** OACS - optional admin command support */ > /* supports security send/receive commands */ > #define NVME_CTRLR_DATA_OACS_SECURITY_SHIFT (0) > @@ -166,6 +177,21 @@ > /* supports namespace management commands */ > #define NVME_CTRLR_DATA_OACS_NSMGMT_SHIFT (3) > #define NVME_CTRLR_DATA_OACS_NSMGMT_MASK (0x1) > +/* supports Device Self-test command */ > +#define NVME_CTRLR_DATA_OACS_SELFTEST_SHIFT (4) > +#define NVME_CTRLR_DATA_OACS_SELFTEST_MASK (0x1) > +/* supports Directives */ > +#define NVME_CTRLR_DATA_OACS_DIRECTIVES_SHIFT (5) > +#define NVME_CTRLR_DATA_OACS_DIRECTIVES_MASK (0x1) > +/* supports NVMe-MI Send/Receive */ > +#define NVME_CTRLR_DATA_OACS_NVMEMI_SHIFT (6) > +#define NVME_CTRLR_DATA_OACS_NVMEMI_MASK (0x1) > +/* supports Virtualization Management */ > +#define NVME_CTRLR_DATA_OACS_VM_SHIFT (7) > +#define NVME_CTRLR_DATA_OACS_VM_MASK (0x1) > +/* supports Doorbell Buffer Config */ > +#define NVME_CTRLR_DATA_OACS_DBBUFFER_SHIFT (8) > +#define NVME_CTRLR_DATA_OACS_DBBUFFER_MASK (0x1) This seems like a suboptimal way to represent and check single flag bits. Is there a reason the conventional (1< Delivered-To: svn-src-all@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 1597BF2CF21; Sun, 11 Mar 2018 05:09:03 +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 B27F2784F7; Sun, 11 Mar 2018 05:09:02 +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 AA25918C6C; Sun, 11 Mar 2018 05:09:02 +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 w2B592Hs008521; Sun, 11 Mar 2018 05:09:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2B5928t008519; Sun, 11 Mar 2018 05:09:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201803110509.w2B5928t008519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 11 Mar 2018 05:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330759 - in head: sbin/nvmecontrol sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head: sbin/nvmecontrol sys/dev/nvme X-SVN-Commit-Revision: 330759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 05:09:03 -0000 Author: mav Date: Sun Mar 11 05:09:02 2018 New Revision: 330759 URL: https://svnweb.freebsd.org/changeset/base/330759 Log: Add new identify data structures fields from NVMe 1.3a. Some of them are already supported by existing hardware, so reporting them `nvmecontrol identify` can be useful. Modified: head/sbin/nvmecontrol/identify.c head/sys/dev/nvme/nvme.h Modified: head/sbin/nvmecontrol/identify.c ============================================================================== --- head/sbin/nvmecontrol/identify.c Sun Mar 11 04:37:05 2018 (r330758) +++ head/sbin/nvmecontrol/identify.c Sun Mar 11 05:09:02 2018 (r330759) @@ -95,25 +95,35 @@ print_controller(struct nvme_controller_data *cdata) printf("Controller Capabilities/Features\n"); printf("================================\n"); - printf("Vendor ID: %04x\n", cdata->vid); - printf("Subsystem Vendor ID: %04x\n", cdata->ssvid); + printf("Vendor ID: %04x\n", cdata->vid); + printf("Subsystem Vendor ID: %04x\n", cdata->ssvid); nvme_strvis(str, cdata->sn, sizeof(str), NVME_SERIAL_NUMBER_LENGTH); - printf("Serial Number: %s\n", str); + printf("Serial Number: %s\n", str); nvme_strvis(str, cdata->mn, sizeof(str), NVME_MODEL_NUMBER_LENGTH); - printf("Model Number: %s\n", str); + printf("Model Number: %s\n", str); nvme_strvis(str, cdata->fr, sizeof(str), NVME_FIRMWARE_REVISION_LENGTH); - printf("Firmware Version: %s\n", str); - printf("Recommended Arb Burst: %d\n", cdata->rab); - printf("IEEE OUI Identifier: %02x %02x %02x\n", + printf("Firmware Version: %s\n", str); + printf("Recommended Arb Burst: %d\n", cdata->rab); + printf("IEEE OUI Identifier: %02x %02x %02x\n", cdata->ieee[0], cdata->ieee[1], cdata->ieee[2]); - printf("Multi-Interface Cap: %02x\n", cdata->mic); + printf("Multi-Path I/O Capabilities: %s%s%s%s\n", + (cdata->mic == 0) ? "Not Supported" : "", + ((cdata->mic >> NVME_CTRLR_DATA_MIC_SRIOVVF_SHIFT) & + NVME_CTRLR_DATA_MIC_SRIOVVF_MASK) ? "SR-IOV VF, " : "", + ((cdata->mic >> NVME_CTRLR_DATA_MIC_MCTRLRS_SHIFT) & + NVME_CTRLR_DATA_MIC_MCTRLRS_MASK) ? "Multiple controllers, " : "", + ((cdata->mic >> NVME_CTRLR_DATA_MIC_MPORTS_SHIFT) & + NVME_CTRLR_DATA_MIC_MPORTS_MASK) ? "Multiple ports" : ""); /* TODO: Use CAP.MPSMIN to determine true memory page size. */ - printf("Max Data Transfer Size: "); + printf("Max Data Transfer Size: "); if (cdata->mdts == 0) printf("Unlimited\n"); else printf("%d\n", PAGE_SIZE * (1 << cdata->mdts)); - printf("Controller ID: 0x%02x\n", cdata->ctrlr_id); + printf("Controller ID: 0x%02x\n", cdata->ctrlr_id); + printf("Version: %d.%d.%d\n", + (cdata->ver >> 16) & 0xffff, (cdata->ver >> 8) & 0xff, + cdata->ver & 0xff); printf("\n"); printf("Admin Command Set Attributes\n"); @@ -126,6 +136,21 @@ print_controller(struct nvme_controller_data *cdata) fw ? "Supported" : "Not Supported"); printf("Namespace Managment: %s\n", nsmgmt ? "Supported" : "Not Supported"); + printf("Device Self-test: %sSupported\n", + ((oacs >> NVME_CTRLR_DATA_OACS_SELFTEST_SHIFT) & + NVME_CTRLR_DATA_OACS_SELFTEST_MASK) ? "" : "Not "); + printf("Directives: %sSupported\n", + ((oacs >> NVME_CTRLR_DATA_OACS_DIRECTIVES_SHIFT) & + NVME_CTRLR_DATA_OACS_DIRECTIVES_MASK) ? "" : "Not "); + printf("NVMe-MI Send/Receive: %sSupported\n", + ((oacs >> NVME_CTRLR_DATA_OACS_NVMEMI_SHIFT) & + NVME_CTRLR_DATA_OACS_NVMEMI_MASK) ? "" : "Not "); + printf("Virtualization Management: %sSupported\n", + ((oacs >> NVME_CTRLR_DATA_OACS_VM_SHIFT) & + NVME_CTRLR_DATA_OACS_VM_MASK) ? "" : "Not "); + printf("Doorbell Buffer Config %sSupported\n", + ((oacs >> NVME_CTRLR_DATA_OACS_DBBUFFER_SHIFT) & + NVME_CTRLR_DATA_OACS_DBBUFFER_MASK) ? "" : "Not "); printf("Abort Command Limit: %d\n", cdata->acl+1); printf("Async Event Request Limit: %d\n", cdata->aerl+1); printf("Number of Firmware Slots: "); @@ -159,6 +184,18 @@ print_controller(struct nvme_controller_data *cdata) write_unc ? "Supported" : "Not Supported"); printf("Dataset Management Command: %s\n", dsm ? "Supported" : "Not Supported"); + printf("Write Zeroes Command: %sSupported\n", + ((oncs >> NVME_CTRLR_DATA_ONCS_WRZERO_SHIFT) & + NVME_CTRLR_DATA_ONCS_WRZERO_MASK) ? "" : "Not "); + printf("Save Features: %sSupported\n", + ((oncs >> NVME_CTRLR_DATA_ONCS_SAVEFEAT_SHIFT) & + NVME_CTRLR_DATA_ONCS_SAVEFEAT_MASK) ? "" : "Not "); + printf("Reservations: %sSupported\n", + ((oncs >> NVME_CTRLR_DATA_ONCS_RESERV_SHIFT) & + NVME_CTRLR_DATA_ONCS_RESERV_MASK) ? "" : "Not "); + printf("Timestamp feature: %sSupported\n", + ((oncs >> NVME_CTRLR_DATA_ONCS_TIMESTAMP_SHIFT) & + NVME_CTRLR_DATA_ONCS_TIMESTAMP_MASK) ? "" : "Not "); printf("Volatile Write Cache: %s\n", vwc_present ? "Present" : "Not Present"); @@ -177,8 +214,8 @@ static void print_namespace(struct nvme_namespace_data *nsdata) { uint32_t i; - uint32_t lbaf, lbads, ms; - uint8_t thin_prov; + uint32_t lbaf, lbads, ms, rp; + uint8_t thin_prov, ptype; uint8_t flbas_fmt; thin_prov = (nsdata->nsfeat >> NVME_NS_DATA_NSFEAT_THIN_PROV_SHIFT) & @@ -200,14 +237,79 @@ print_namespace(struct nvme_namespace_data *nsdata) thin_prov ? "Supported" : "Not Supported"); printf("Number of LBA Formats: %d\n", nsdata->nlbaf+1); printf("Current LBA Format: LBA Format #%02d\n", flbas_fmt); + printf("Data Protection Caps: %s%s%s%s%s%s\n", + (nsdata->dpc == 0) ? "Not Supported" : "", + ((nsdata->dpc >> NVME_NS_DATA_DPC_MD_END_SHIFT) & + NVME_NS_DATA_DPC_MD_END_MASK) ? "Last Bytes, " : "", + ((nsdata->dpc >> NVME_NS_DATA_DPC_MD_START_SHIFT) & + NVME_NS_DATA_DPC_MD_START_MASK) ? "First Bytes, " : "", + ((nsdata->dpc >> NVME_NS_DATA_DPC_PIT3_SHIFT) & + NVME_NS_DATA_DPC_PIT3_MASK) ? "Type 3, " : "", + ((nsdata->dpc >> NVME_NS_DATA_DPC_PIT2_SHIFT) & + NVME_NS_DATA_DPC_PIT2_MASK) ? "Type 2, " : "", + ((nsdata->dpc >> NVME_NS_DATA_DPC_PIT2_MASK) & + NVME_NS_DATA_DPC_PIT1_MASK) ? "Type 1" : ""); + printf("Data Protection Settings: "); + ptype = (nsdata->dps >> NVME_NS_DATA_DPS_PIT_SHIFT) & + NVME_NS_DATA_DPS_PIT_MASK; + if (ptype) { + printf("Type %d, %s Bytes\n", ptype, + ((nsdata->dps >> NVME_NS_DATA_DPS_MD_START_SHIFT) & + NVME_NS_DATA_DPS_MD_START_MASK) ? "First" : "Last"); + } else { + printf("Not Enabled\n"); + } + printf("Multi-Path I/O Capabilities: %s%s\n", + (nsdata->nmic == 0) ? "Not Supported" : "", + ((nsdata->nmic >> NVME_NS_DATA_NMIC_MAY_BE_SHARED_SHIFT) & + NVME_NS_DATA_NMIC_MAY_BE_SHARED_MASK) ? "May be shared" : ""); + printf("Reservation Capabilities: %s%s%s%s%s%s%s%s%s\n", + (nsdata->rescap == 0) ? "Not Supported" : "", + ((nsdata->rescap >> NVME_NS_DATA_RESCAP_IEKEY13_SHIFT) & + NVME_NS_DATA_RESCAP_IEKEY13_MASK) ? "IEKEY13, " : "", + ((nsdata->rescap >> NVME_NS_DATA_RESCAP_EX_AC_AR_SHIFT) & + NVME_NS_DATA_RESCAP_EX_AC_AR_MASK) ? "EX_AC_AR, " : "", + ((nsdata->rescap >> NVME_NS_DATA_RESCAP_WR_EX_AR_SHIFT) & + NVME_NS_DATA_RESCAP_WR_EX_AR_MASK) ? "WR_EX_AR, " : "", + ((nsdata->rescap >> NVME_NS_DATA_RESCAP_EX_AC_RO_SHIFT) & + NVME_NS_DATA_RESCAP_EX_AC_RO_MASK) ? "EX_AC_RO, " : "", + ((nsdata->rescap >> NVME_NS_DATA_RESCAP_WR_EX_RO_SHIFT) & + NVME_NS_DATA_RESCAP_WR_EX_RO_MASK) ? "WR_EX_RO, " : "", + ((nsdata->rescap >> NVME_NS_DATA_RESCAP_EX_AC_SHIFT) & + NVME_NS_DATA_RESCAP_EX_AC_MASK) ? "EX_AC, " : "", + ((nsdata->rescap >> NVME_NS_DATA_RESCAP_WR_EX_SHIFT) & + NVME_NS_DATA_RESCAP_WR_EX_MASK) ? "WR_EX, " : "", + ((nsdata->rescap >> NVME_NS_DATA_RESCAP_PTPL_SHIFT) & + NVME_NS_DATA_RESCAP_PTPL_MASK) ? "PTPL" : ""); + printf("Format Progress Indicator: "); + if ((nsdata->fpi >> NVME_NS_DATA_FPI_SUPP_SHIFT) & + NVME_NS_DATA_FPI_SUPP_MASK) { + printf("%u%% remains\n", + (nsdata->fpi >> NVME_NS_DATA_FPI_PERC_SHIFT) & + NVME_NS_DATA_FPI_PERC_MASK); + } else + printf("Not Supported\n"); + printf("Optimal I/O Boundary (LBAs): %u\n", nsdata->noiob); + printf("Globally Unique Identifier: "); + for (i = 0; i < sizeof(nsdata->nguid); i++) + printf("%02x", nsdata->nguid[i]); + printf("\n"); + printf("IEEE EUI64: "); + for (i = 0; i < sizeof(nsdata->eui64); i++) + printf("%02x", nsdata->eui64[i]); + printf("\n"); for (i = 0; i <= nsdata->nlbaf; i++) { lbaf = nsdata->lbaf[i]; lbads = (lbaf >> NVME_NS_DATA_LBAF_LBADS_SHIFT) & NVME_NS_DATA_LBAF_LBADS_MASK; ms = (lbaf >> NVME_NS_DATA_LBAF_MS_SHIFT) & NVME_NS_DATA_LBAF_MS_MASK; - printf("LBA Format #%02d: Data Size: %5d Metadata Size: %5d\n", - i, 1 << lbads, ms); + rp = (lbaf >> NVME_NS_DATA_LBAF_RP_SHIFT) & + NVME_NS_DATA_LBAF_RP_MASK; + printf("LBA Format #%02d: Data Size: %5d Metadata Size: %5d" + " Performance: %s\n", + i, 1 << lbads, ms, (rp == 0) ? "Best" : + (rp == 1) ? "Better" : (rp == 2) ? "Good" : "Degraded"); } } @@ -252,7 +354,7 @@ identify_ctrlr(int argc, char *argv[]) hexlength = sizeof(struct nvme_controller_data); else hexlength = offsetof(struct nvme_controller_data, - reserved5); + reserved8); print_hex(&cdata, hexlength); exit(0); } Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Sun Mar 11 04:37:05 2018 (r330758) +++ head/sys/dev/nvme/nvme.h Sun Mar 11 05:09:02 2018 (r330759) @@ -153,6 +153,17 @@ #define NVME_PWR_ST_APS_SHIFT (6) #define NVME_PWR_ST_APS_MASK (0x3) +/** Controller Multi-path I/O and Namespace Sharing Capabilities */ +/* More then one port */ +#define NVME_CTRLR_DATA_MIC_MPORTS_SHIFT (0) +#define NVME_CTRLR_DATA_MIC_MPORTS_MASK (0x1) +/* More then one controller */ +#define NVME_CTRLR_DATA_MIC_MCTRLRS_SHIFT (1) +#define NVME_CTRLR_DATA_MIC_MCTRLRS_MASK (0x1) +/* SR-IOV Virtual Function */ +#define NVME_CTRLR_DATA_MIC_SRIOVVF_SHIFT (2) +#define NVME_CTRLR_DATA_MIC_SRIOVVF_MASK (0x1) + /** OACS - optional admin command support */ /* supports security send/receive commands */ #define NVME_CTRLR_DATA_OACS_SECURITY_SHIFT (0) @@ -166,6 +177,21 @@ /* supports namespace management commands */ #define NVME_CTRLR_DATA_OACS_NSMGMT_SHIFT (3) #define NVME_CTRLR_DATA_OACS_NSMGMT_MASK (0x1) +/* supports Device Self-test command */ +#define NVME_CTRLR_DATA_OACS_SELFTEST_SHIFT (4) +#define NVME_CTRLR_DATA_OACS_SELFTEST_MASK (0x1) +/* supports Directives */ +#define NVME_CTRLR_DATA_OACS_DIRECTIVES_SHIFT (5) +#define NVME_CTRLR_DATA_OACS_DIRECTIVES_MASK (0x1) +/* supports NVMe-MI Send/Receive */ +#define NVME_CTRLR_DATA_OACS_NVMEMI_SHIFT (6) +#define NVME_CTRLR_DATA_OACS_NVMEMI_MASK (0x1) +/* supports Virtualization Management */ +#define NVME_CTRLR_DATA_OACS_VM_SHIFT (7) +#define NVME_CTRLR_DATA_OACS_VM_MASK (0x1) +/* supports Doorbell Buffer Config */ +#define NVME_CTRLR_DATA_OACS_DBBUFFER_SHIFT (8) +#define NVME_CTRLR_DATA_OACS_DBBUFFER_MASK (0x1) /** firmware updates */ /* first slot is read-only */ @@ -209,6 +235,14 @@ #define NVME_CTRLR_DATA_ONCS_WRITE_UNC_MASK (0x1) #define NVME_CTRLR_DATA_ONCS_DSM_SHIFT (2) #define NVME_CTRLR_DATA_ONCS_DSM_MASK (0x1) +#define NVME_CTRLR_DATA_ONCS_WRZERO_SHIFT (3) +#define NVME_CTRLR_DATA_ONCS_WRZERO_MASK (0x1) +#define NVME_CTRLR_DATA_ONCS_SAVEFEAT_SHIFT (4) +#define NVME_CTRLR_DATA_ONCS_SAVEFEAT_MASK (0x1) +#define NVME_CTRLR_DATA_ONCS_RESERV_SHIFT (5) +#define NVME_CTRLR_DATA_ONCS_RESERV_MASK (0x1) +#define NVME_CTRLR_DATA_ONCS_TIMESTAMP_SHIFT (6) +#define NVME_CTRLR_DATA_ONCS_TIMESTAMP_MASK (0x1) /** volatile write cache */ #define NVME_CTRLR_DATA_VWC_PRESENT_SHIFT (0) @@ -218,6 +252,15 @@ /* thin provisioning */ #define NVME_NS_DATA_NSFEAT_THIN_PROV_SHIFT (0) #define NVME_NS_DATA_NSFEAT_THIN_PROV_MASK (0x1) +/* NAWUN, NAWUPF, and NACWU fields are valid */ +#define NVME_NS_DATA_NSFEAT_NA_FIELDS_SHIFT (1) +#define NVME_NS_DATA_NSFEAT_NA_FIELDS_MASK (0x1) +/* Deallocated or Unwritten Logical Block errors supported */ +#define NVME_NS_DATA_NSFEAT_DEALLOC_SHIFT (2) +#define NVME_NS_DATA_NSFEAT_DEALLOC_MASK (0x1) +/* NGUID and EUI64 fields are not reusable */ +#define NVME_NS_DATA_NSFEAT_NO_ID_REUSE_SHIFT (3) +#define NVME_NS_DATA_NSFEAT_NO_ID_REUSE_MASK (0x1) /** formatted lba size */ #define NVME_NS_DATA_FLBAS_FORMAT_SHIFT (0) @@ -259,6 +302,45 @@ #define NVME_NS_DATA_DPS_MD_START_SHIFT (3) #define NVME_NS_DATA_DPS_MD_START_MASK (0x1) +/** Namespace Multi-path I/O and Namespace Sharing Capabilities */ +/* the namespace may be attached to two or more controllers */ +#define NVME_NS_DATA_NMIC_MAY_BE_SHARED_SHIFT (0) +#define NVME_NS_DATA_NMIC_MAY_BE_SHARED_MASK (0x1) + +/** Reservation Capabilities */ +/* Persist Through Power Loss */ +#define NVME_NS_DATA_RESCAP_PTPL_SHIFT (0) +#define NVME_NS_DATA_RESCAP_PTPL_MASK (0x1) +/* supports the Write Exclusive */ +#define NVME_NS_DATA_RESCAP_WR_EX_SHIFT (1) +#define NVME_NS_DATA_RESCAP_WR_EX_MASK (0x1) +/* supports the Exclusive Access */ +#define NVME_NS_DATA_RESCAP_EX_AC_SHIFT (2) +#define NVME_NS_DATA_RESCAP_EX_AC_MASK (0x1) +/* supports the Write Exclusive – Registrants Only */ +#define NVME_NS_DATA_RESCAP_WR_EX_RO_SHIFT (3) +#define NVME_NS_DATA_RESCAP_WR_EX_RO_MASK (0x1) +/* supports the Exclusive Access - Registrants Only */ +#define NVME_NS_DATA_RESCAP_EX_AC_RO_SHIFT (4) +#define NVME_NS_DATA_RESCAP_EX_AC_RO_MASK (0x1) +/* supports the Write Exclusive – All Registrants */ +#define NVME_NS_DATA_RESCAP_WR_EX_AR_SHIFT (5) +#define NVME_NS_DATA_RESCAP_WR_EX_AR_MASK (0x1) +/* supports the Exclusive Access - All Registrants */ +#define NVME_NS_DATA_RESCAP_EX_AC_AR_SHIFT (6) +#define NVME_NS_DATA_RESCAP_EX_AC_AR_MASK (0x1) +/* Ignore Existing Key is used as defined in revision 1.3 or later */ +#define NVME_NS_DATA_RESCAP_IEKEY13_SHIFT (7) +#define NVME_NS_DATA_RESCAP_IEKEY13_MASK (0x1) + +/** Format Progress Indicator */ +/* percentage of the Format NVM command that remains to be completed */ +#define NVME_NS_DATA_FPI_PERC_SHIFT (0) +#define NVME_NS_DATA_FPI_PERC_MASK (0x7f) +/* namespace supports the Format Progress Indicator */ +#define NVME_NS_DATA_FPI_SUPP_SHIFT (7) +#define NVME_NS_DATA_FPI_SUPP_MASK (0x1) + /** lba format support */ /* metadata size */ #define NVME_NS_DATA_LBAF_MS_SHIFT (0) @@ -719,12 +801,35 @@ struct nvme_controller_data { /** volatile write cache */ uint8_t vwc; - /* TODO: flesh out remaining nvm command set attributes */ - uint8_t reserved5[178]; + /** Atomic Write Unit Normal */ + uint16_t awun; - /* bytes 704-2047: i/o command set attributes */ - uint8_t reserved6[1344]; + /** Atomic Write Unit Power Fail */ + uint16_t awupf; + /** NVM Vendor Specific Command Configuration */ + uint8_t nvscc; + uint8_t reserved5; + + /** Atomic Compare & Write Unit */ + uint16_t acwu; + uint16_t reserved6; + + /** SGL Support */ + uint32_t sgls; + + /* bytes 540-767: Reserved */ + uint8_t reserved7[228]; + + /** NVM Subsystem NVMe Qualified Name */ + uint8_t subnqn[256]; + + /* bytes 1024-1791: Reserved */ + uint8_t reserved8[768]; + + /* bytes 1792-2047: NVMe over Fabrics specification */ + uint8_t reserved9[256]; + /* bytes 2048-3071: power state descriptors */ struct nvme_power_state power_state[32]; @@ -763,8 +868,51 @@ struct nvme_namespace_data { /** end-to-end data protection type settings */ uint8_t dps; - uint8_t reserved5[98]; + /** Namespace Multi-path I/O and Namespace Sharing Capabilities */ + uint8_t nmic; + /** Reservation Capabilities */ + uint8_t rescap; + + /** Format Progress Indicator */ + uint8_t fpi; + + /** Deallocate Logical Block Features */ + uint8_t dlfeat; + + /** Namespace Atomic Write Unit Normal */ + uint16_t nawun; + + /** Namespace Atomic Write Unit Power Fail */ + uint16_t nawupf; + + /** Namespace Atomic Compare & Write Unit */ + uint16_t nacwu; + + /** Namespace Atomic Boundary Size Normal */ + uint16_t nabsn; + + /** Namespace Atomic Boundary Offset */ + uint16_t nabo; + + /** Namespace Atomic Boundary Size Power Fail */ + uint16_t nabspf; + + /** Namespace Optimal IO Boundary */ + uint16_t noiob; + + /** NVM Capacity */ + uint8_t nvmcap[16]; + + /* bytes 64-103: Reserved */ + uint8_t reserved5[40]; + + /** Namespace Globally Unique Identifier */ + uint8_t nguid[16]; + + /** IEEE Extended Unique Identifier */ + uint8_t eui64[8]; + /** lba format support */ uint32_t lbaf[16]; @@ -1154,6 +1302,10 @@ void nvme_controller_data_swapbytes(struct nvme_contro s->nn = le32toh(s->nn); s->oncs = le16toh(s->oncs); s->fuses = le16toh(s->fuses); + s->awun = le16toh(s->awun); + s->awupf = le16toh(s->awupf); + s->acwu = le16toh(s->acwu); + s->sgls = le32toh(s->sgls); for (i = 0; i < 32; i++) nvme_power_state_swapbytes(&s->power_state[i]); } @@ -1166,6 +1318,13 @@ void nvme_namespace_data_swapbytes(struct nvme_namespa s->nsze = le64toh(s->nsze); s->ncap = le64toh(s->ncap); s->nuse = le64toh(s->nuse); + s->nawun = le16toh(s->nawun); + s->nawupf = le16toh(s->nawupf); + s->nacwu = le16toh(s->nacwu); + s->nabsn = le16toh(s->nabsn); + s->nabo = le16toh(s->nabo); + s->nabspf = le16toh(s->nabspf); + s->noiob = le16toh(s->noiob); for (i = 0; i < 16; i++) s->lbaf[i] = le32toh(s->lbaf[i]); } From owner-svn-src-all@freebsd.org Sun Mar 11 07:33:50 2018 Return-Path: Delivered-To: svn-src-all@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 EFD29F353AC; Sun, 11 Mar 2018 07:33:49 +0000 (UTC) (envelope-from joneum@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 94A717DB93; Sun, 11 Mar 2018 07:33:49 +0000 (UTC) (envelope-from joneum@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 89ECA1A4D2; Sun, 11 Mar 2018 07:33:49 +0000 (UTC) (envelope-from joneum@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2B7Xnbe082655; Sun, 11 Mar 2018 07:33:49 GMT (envelope-from joneum@FreeBSD.org) Received: (from joneum@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2B7XnCO082654; Sun, 11 Mar 2018 07:33:49 GMT (envelope-from joneum@FreeBSD.org) Message-Id: <201803110733.w2B7XnCO082654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: joneum set sender to joneum@FreeBSD.org using -f From: Jochen Neumeister Date: Sun, 11 Mar 2018 07:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330761 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: joneum X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 330761 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 07:33:50 -0000 Author: joneum (ports committer) Date: Sun Mar 11 07:33:49 2018 New Revision: 330761 URL: https://svnweb.freebsd.org/changeset/base/330761 Log: Add myself to committers-ports.dot Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Sun Mar 11 06:30:09 2018 (r330760) +++ head/share/misc/committers-ports.dot Sun Mar 11 07:33:49 2018 (r330761) @@ -131,6 +131,7 @@ jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2007/09/12 jlaffaye [label="Julien Laffaye\njlaffaye@FreeBSD.org\n2011/06/06"] jmd [label="Johannes M. Dieterich\njmd@FreeBSD.org\n2017/01/09"] jmelo [label="Jean Milanez Melo\njmelo@FreeBSD.org\n2006/03/31"] +joneum [label="Jochen Neumeister\joneum@FreeBSD.org\n2017/05/11" joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1994/08/22"] johans [label="Johan Selst\njohans@FreeBSD.org\n2006/04/01"] josef [label="Josef El-Rayes\njosef@FreeBSD.org\n2004/12/20"] @@ -530,6 +531,7 @@ miwi -> dhn miwi -> farrokhi miwi -> fluffy miwi -> gahr +miwi -> joneum miwi -> kmoore miwi -> lme miwi -> makc @@ -597,6 +599,7 @@ rene -> cmt rene -> crees rene -> jgh rene -> jmd +rene -> joneum rene -> ler rene -> olivierd @@ -658,6 +661,7 @@ tabthorpe -> zi tabthorpe -> gblach tcberner -> adridg +tcberner -> joneum tcberner -> yuri thierry -> jadawin @@ -665,6 +669,8 @@ thierry -> riggs tmclaugh -> itetcu tmclaugh -> xride + +tz -> joneum vsevolod -> eugen From owner-svn-src-all@freebsd.org Sun Mar 11 08:07:41 2018 Return-Path: Delivered-To: svn-src-all@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 09B8DF37CAF; Sun, 11 Mar 2018 08:07:41 +0000 (UTC) (envelope-from joneum@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 AFBE47F1B0; Sun, 11 Mar 2018 08:07:40 +0000 (UTC) (envelope-from joneum@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 AABEE1A9B9; Sun, 11 Mar 2018 08:07:40 +0000 (UTC) (envelope-from joneum@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2B87epn097707; Sun, 11 Mar 2018 08:07:40 GMT (envelope-from joneum@FreeBSD.org) Received: (from joneum@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2B87eqq097706; Sun, 11 Mar 2018 08:07:40 GMT (envelope-from joneum@FreeBSD.org) Message-Id: <201803110807.w2B87eqq097706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: joneum set sender to joneum@FreeBSD.org using -f From: Jochen Neumeister Date: Sun, 11 Mar 2018 08:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330763 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: joneum X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 330763 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 08:07:41 -0000 Author: joneum (ports committer) Date: Sun Mar 11 08:07:40 2018 New Revision: 330763 URL: https://svnweb.freebsd.org/changeset/base/330763 Log: sorry for that. Fix next typo Pointy hat to: joneum Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Sun Mar 11 08:02:14 2018 (r330762) +++ head/share/misc/committers-ports.dot Sun Mar 11 08:07:40 2018 (r330763) @@ -131,7 +131,7 @@ jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2007/09/12 jlaffaye [label="Julien Laffaye\njlaffaye@FreeBSD.org\n2011/06/06"] jmd [label="Johannes M. Dieterich\njmd@FreeBSD.org\n2017/01/09"] jmelo [label="Jean Milanez Melo\njmelo@FreeBSD.org\n2006/03/31"] -joneum [label="Jochen Neumeister\joneum@FreeBSD.org\n2017/05/11"] +joneum [label="Jochen Neumeister\njoneum@FreeBSD.org\n2017/05/11"] joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1994/08/22"] johans [label="Johan Selst\njohans@FreeBSD.org\n2006/04/01"] josef [label="Josef El-Rayes\njosef@FreeBSD.org\n2004/12/20"] From owner-svn-src-all@freebsd.org Sun Mar 11 06:30:09 2018 Return-Path: Delivered-To: svn-src-all@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 C0DA4F30DD1; Sun, 11 Mar 2018 06:30:09 +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 6D2B57B054; Sun, 11 Mar 2018 06:30:09 +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 6809019990; Sun, 11 Mar 2018 06:30:09 +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 w2B6U9q2048107; Sun, 11 Mar 2018 06:30:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2B6U9tn048105; Sun, 11 Mar 2018 06:30:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201803110630.w2B6U9tn048105@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 11 Mar 2018 06:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330760 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 330760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 06:30:10 -0000 Author: mav Date: Sun Mar 11 06:30:09 2018 New Revision: 330760 URL: https://svnweb.freebsd.org/changeset/base/330760 Log: Add new opcodes and statuses from NVMe 1.3a. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/dev/nvme/nvme.h head/sys/dev/nvme/nvme_qpair.c Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Sun Mar 11 05:09:02 2018 (r330759) +++ head/sys/dev/nvme/nvme.h Sun Mar 11 06:30:09 2018 (r330760) @@ -498,10 +498,31 @@ enum nvme_generic_command_status_code { NVME_SC_ABORTED_MISSING_FUSED = 0x0a, NVME_SC_INVALID_NAMESPACE_OR_FORMAT = 0x0b, NVME_SC_COMMAND_SEQUENCE_ERROR = 0x0c, + NVME_SC_INVALID_SGL_SEGMENT_DESCR = 0x0d, + NVME_SC_INVALID_NUMBER_OF_SGL_DESCR = 0x0e, + NVME_SC_DATA_SGL_LENGTH_INVALID = 0x0f, + NVME_SC_METADATA_SGL_LENGTH_INVALID = 0x10, + NVME_SC_SGL_DESCRIPTOR_TYPE_INVALID = 0x11, + NVME_SC_INVALID_USE_OF_CMB = 0x12, + NVME_SC_PRP_OFFET_INVALID = 0x13, + NVME_SC_ATOMIC_WRITE_UNIT_EXCEEDED = 0x14, + NVME_SC_OPERATION_DENIED = 0x15, + NVME_SC_SGL_OFFSET_INVALID = 0x16, + /* 0x17 - reserved */ + NVME_SC_HOST_ID_INCONSISTENT_FORMAT = 0x18, + NVME_SC_KEEP_ALIVE_TIMEOUT_EXPIRED = 0x19, + NVME_SC_KEEP_ALIVE_TIMEOUT_INVALID = 0x1a, + NVME_SC_ABORTED_DUE_TO_PREEMPT = 0x1b, + NVME_SC_SANITIZE_FAILED = 0x1c, + NVME_SC_SANITIZE_IN_PROGRESS = 0x1d, + NVME_SC_SGL_DATA_BLOCK_GRAN_INVALID = 0x1e, + NVME_SC_NOT_SUPPORTED_IN_CMB = 0x1f, NVME_SC_LBA_OUT_OF_RANGE = 0x80, NVME_SC_CAPACITY_EXCEEDED = 0x81, NVME_SC_NAMESPACE_NOT_READY = 0x82, + NVME_SC_RESERVATION_CONFLICT = 0x83, + NVME_SC_FORMAT_IN_PROGRESS = 0x84, }; /* command specific status codes */ @@ -518,6 +539,29 @@ enum nvme_command_specific_status_code { NVME_SC_INVALID_LOG_PAGE = 0x09, NVME_SC_INVALID_FORMAT = 0x0a, NVME_SC_FIRMWARE_REQUIRES_RESET = 0x0b, + NVME_SC_INVALID_QUEUE_DELETION = 0x0c, + NVME_SC_FEATURE_NOT_SAVEABLE = 0x0d, + NVME_SC_FEATURE_NOT_CHANGEABLE = 0x0e, + NVME_SC_FEATURE_NOT_NS_SPECIFIC = 0x0f, + NVME_SC_FW_ACT_REQUIRES_NVMS_RESET = 0x10, + NVME_SC_FW_ACT_REQUIRES_RESET = 0x11, + NVME_SC_FW_ACT_REQUIRES_TIME = 0x12, + NVME_SC_FW_ACT_PROHIBITED = 0x13, + NVME_SC_OVERLAPPING_RANGE = 0x14, + NVME_SC_NS_INSUFFICIENT_CAPACITY = 0x15, + NVME_SC_NS_ID_UNAVAILABLE = 0x16, + /* 0x17 - reserved */ + NVME_SC_NS_ALREADY_ATTACHED = 0x18, + NVME_SC_NS_IS_PRIVATE = 0x19, + NVME_SC_NS_NOT_ATTACHED = 0x1a, + NVME_SC_THIN_PROV_NOT_SUPPORTED = 0x1b, + NVME_SC_CTRLR_LIST_INVALID = 0x1c, + NVME_SC_SELT_TEST_IN_PROGRESS = 0x1d, + NVME_SC_BOOT_PART_WRITE_PROHIB = 0x1e, + NVME_SC_INVALID_CTRLR_ID = 0x1f, + NVME_SC_INVALID_SEC_CTRLR_STATE = 0x20, + NVME_SC_INVALID_NUM_OF_CTRLR_RESRC = 0x21, + NVME_SC_INVALID_RESOURCE_ID = 0x22, NVME_SC_CONFLICTING_ATTRIBUTES = 0x80, NVME_SC_INVALID_PROTECTION_INFO = 0x81, @@ -533,6 +577,7 @@ enum nvme_media_error_status_code { NVME_SC_REFERENCE_TAG_CHECK_ERROR = 0x84, NVME_SC_COMPARE_FAILURE = 0x85, NVME_SC_ACCESS_DENIED = 0x86, + NVME_SC_DEALLOCATED_OR_UNWRITTEN = 0x87, }; /* admin opcodes */ @@ -554,11 +599,20 @@ enum nvme_admin_opcode { /* 0x0e-0x0f - reserved */ NVME_OPC_FIRMWARE_ACTIVATE = 0x10, NVME_OPC_FIRMWARE_IMAGE_DOWNLOAD = 0x11, + NVME_OPC_DEVICE_SELF_TEST = 0x14, NVME_OPC_NAMESPACE_ATTACHMENT = 0x15, + NVME_OPC_KEEP_ALIVE = 0x18, + NVME_OPC_DIRECTIVE_SEND = 0x19, + NVME_OPC_DIRECTIVE_RECEIVE = 0x1a, + NVME_OPC_VIRTUALIZATION_MANAGEMENT = 0x1c, + NVME_OPC_NVME_MI_SEND = 0x1d, + NVME_OPC_NVME_MI_RECEIVE = 0x1e, + NVME_OPC_DOORBELL_BUFFER_CONFIG = 0x7c, NVME_OPC_FORMAT_NVM = 0x80, NVME_OPC_SECURITY_SEND = 0x81, NVME_OPC_SECURITY_RECEIVE = 0x82, + NVME_OPC_SANITIZE = 0x84, }; /* nvme nvm opcodes */ @@ -569,8 +623,17 @@ enum nvme_nvm_opcode { /* 0x03 - reserved */ NVME_OPC_WRITE_UNCORRECTABLE = 0x04, NVME_OPC_COMPARE = 0x05, - /* 0x06-0x07 - reserved */ + /* 0x06 - reserved */ + NVME_OPC_WRITE_ZEROES = 0x08, + /* 0x07 - reserved */ NVME_OPC_DATASET_MANAGEMENT = 0x09, + /* 0x0a-0x0c - reserved */ + NVME_OPC_RESERVATION_REGISTER = 0x0d, + NVME_OPC_RESERVATION_REPORT = 0x0e, + /* 0x0f-0x10 - reserved */ + NVME_OPC_RESERVATION_ACQUIRE = 0x11, + /* 0x12-0x14 - reserved */ + NVME_OPC_RESERVATION_RELEASE = 0x15, }; enum nvme_feature { Modified: head/sys/dev/nvme/nvme_qpair.c ============================================================================== --- head/sys/dev/nvme/nvme_qpair.c Sun Mar 11 05:09:02 2018 (r330759) +++ head/sys/dev/nvme/nvme_qpair.c Sun Mar 11 06:30:09 2018 (r330760) @@ -59,9 +59,19 @@ static struct nvme_opcode_string admin_opcode[] = { { NVME_OPC_ASYNC_EVENT_REQUEST, "ASYNC EVENT REQUEST" }, { NVME_OPC_FIRMWARE_ACTIVATE, "FIRMWARE ACTIVATE" }, { NVME_OPC_FIRMWARE_IMAGE_DOWNLOAD, "FIRMWARE IMAGE DOWNLOAD" }, + { NVME_OPC_DEVICE_SELF_TEST, "DEVICE SELF-TEST" }, + { NVME_OPC_NAMESPACE_ATTACHMENT, "NAMESPACE ATTACHMENT" }, + { NVME_OPC_KEEP_ALIVE, "KEEP ALIVE" }, + { NVME_OPC_DIRECTIVE_SEND, "DIRECTIVE SEND" }, + { NVME_OPC_DIRECTIVE_RECEIVE, "DIRECTIVE RECEIVE" }, + { NVME_OPC_VIRTUALIZATION_MANAGEMENT, "VIRTUALIZATION MANAGEMENT" }, + { NVME_OPC_NVME_MI_SEND, "NVME-MI SEND" }, + { NVME_OPC_NVME_MI_RECEIVE, "NVME-MI RECEIVE" }, + { NVME_OPC_DOORBELL_BUFFER_CONFIG, "DOORBELL BUFFER CONFIG" }, { NVME_OPC_FORMAT_NVM, "FORMAT NVM" }, { NVME_OPC_SECURITY_SEND, "SECURITY SEND" }, { NVME_OPC_SECURITY_RECEIVE, "SECURITY RECEIVE" }, + { NVME_OPC_SANITIZE, "SANITIZE" }, { 0xFFFF, "ADMIN COMMAND" } }; @@ -71,7 +81,12 @@ static struct nvme_opcode_string io_opcode[] = { { NVME_OPC_READ, "READ" }, { NVME_OPC_WRITE_UNCORRECTABLE, "WRITE UNCORRECTABLE" }, { NVME_OPC_COMPARE, "COMPARE" }, + { NVME_OPC_WRITE_ZEROES, "WRITE ZEROES" }, { NVME_OPC_DATASET_MANAGEMENT, "DATASET MANAGEMENT" }, + { NVME_OPC_RESERVATION_REGISTER, "RESERVATION REGISTER" }, + { NVME_OPC_RESERVATION_REPORT, "RESERVATION REPORT" }, + { NVME_OPC_RESERVATION_ACQUIRE, "RESERVATION ACQUIRE" }, + { NVME_OPC_RESERVATION_RELEASE, "RESERVATION RELEASE" }, { 0xFFFF, "IO COMMAND" } }; @@ -131,6 +146,7 @@ nvme_io_qpair_print_command(struct nvme_qpair *qpair, case NVME_OPC_READ: case NVME_OPC_WRITE_UNCORRECTABLE: case NVME_OPC_COMPARE: + case NVME_OPC_WRITE_ZEROES: nvme_printf(qpair->ctrlr, "%s sqid:%d cid:%d nsid:%d " "lba:%llu len:%d\n", get_io_opcode_string(opc), qpair->id, cmd->cid, le32toh(cmd->nsid), @@ -139,6 +155,10 @@ nvme_io_qpair_print_command(struct nvme_qpair *qpair, break; case NVME_OPC_FLUSH: case NVME_OPC_DATASET_MANAGEMENT: + case NVME_OPC_RESERVATION_REGISTER: + case NVME_OPC_RESERVATION_REPORT: + case NVME_OPC_RESERVATION_ACQUIRE: + case NVME_OPC_RESERVATION_RELEASE: nvme_printf(qpair->ctrlr, "%s sqid:%d cid:%d nsid:%d\n", get_io_opcode_string(opc), qpair->id, cmd->cid, le32toh(cmd->nsid)); break; @@ -179,9 +199,30 @@ static struct nvme_status_string generic_status[] = { { NVME_SC_ABORTED_MISSING_FUSED, "ABORTED - MISSING FUSED" }, { NVME_SC_INVALID_NAMESPACE_OR_FORMAT, "INVALID NAMESPACE OR FORMAT" }, { NVME_SC_COMMAND_SEQUENCE_ERROR, "COMMAND SEQUENCE ERROR" }, + { NVME_SC_INVALID_SGL_SEGMENT_DESCR, "INVALID SGL SEGMENT DESCRIPTOR" }, + { NVME_SC_INVALID_NUMBER_OF_SGL_DESCR, "INVALID NUMBER OF SGL DESCRIPTORS" }, + { NVME_SC_DATA_SGL_LENGTH_INVALID, "DATA SGL LENGTH INVALID" }, + { NVME_SC_METADATA_SGL_LENGTH_INVALID, "METADATA SGL LENGTH INVALID" }, + { NVME_SC_SGL_DESCRIPTOR_TYPE_INVALID, "SGL DESCRIPTOR TYPE INVALID" }, + { NVME_SC_INVALID_USE_OF_CMB, "INVALID USE OF CONTROLLER MEMORY BUFFER" }, + { NVME_SC_PRP_OFFET_INVALID, "PRP OFFET INVALID" }, + { NVME_SC_ATOMIC_WRITE_UNIT_EXCEEDED, "ATOMIC WRITE UNIT EXCEEDED" }, + { NVME_SC_OPERATION_DENIED, "OPERATION DENIED" }, + { NVME_SC_SGL_OFFSET_INVALID, "SGL OFFSET INVALID" }, + { NVME_SC_HOST_ID_INCONSISTENT_FORMAT, "HOST IDENTIFIER INCONSISTENT FORMAT" }, + { NVME_SC_KEEP_ALIVE_TIMEOUT_EXPIRED, "KEEP ALIVE TIMEOUT EXPIRED" }, + { NVME_SC_KEEP_ALIVE_TIMEOUT_INVALID, "KEEP ALIVE TIMEOUT INVALID" }, + { NVME_SC_ABORTED_DUE_TO_PREEMPT, "COMMAND ABORTED DUE TO PREEMPT AND ABORT" }, + { NVME_SC_SANITIZE_FAILED, "SANITIZE FAILED" }, + { NVME_SC_SANITIZE_IN_PROGRESS, "SANITIZE IN PROGRESS" }, + { NVME_SC_SGL_DATA_BLOCK_GRAN_INVALID, "SGL_DATA_BLOCK_GRANULARITY_INVALID" }, + { NVME_SC_NOT_SUPPORTED_IN_CMB, "COMMAND NOT SUPPORTED FOR QUEUE IN CMB" }, + { NVME_SC_LBA_OUT_OF_RANGE, "LBA OUT OF RANGE" }, { NVME_SC_CAPACITY_EXCEEDED, "CAPACITY EXCEEDED" }, { NVME_SC_NAMESPACE_NOT_READY, "NAMESPACE NOT READY" }, + { NVME_SC_RESERVATION_CONFLICT, "RESERVATION CONFLICT" }, + { NVME_SC_FORMAT_IN_PROGRESS, "FORMAT IN PROGRESS" }, { 0xFFFF, "GENERIC" } }; @@ -197,6 +238,29 @@ static struct nvme_status_string command_specific_stat { NVME_SC_INVALID_LOG_PAGE, "INVALID LOG PAGE" }, { NVME_SC_INVALID_FORMAT, "INVALID FORMAT" }, { NVME_SC_FIRMWARE_REQUIRES_RESET, "FIRMWARE REQUIRES RESET" }, + { NVME_SC_INVALID_QUEUE_DELETION, "INVALID QUEUE DELETION" }, + { NVME_SC_FEATURE_NOT_SAVEABLE, "FEATURE IDENTIFIER NOT SAVEABLE" }, + { NVME_SC_FEATURE_NOT_CHANGEABLE, "FEATURE NOT CHANGEABLE" }, + { NVME_SC_FEATURE_NOT_NS_SPECIFIC, "FEATURE NOT NAMESPACE SPECIFIC" }, + { NVME_SC_FW_ACT_REQUIRES_NVMS_RESET, "FIRMWARE ACTIVATION REQUIRES NVM SUBSYSTEM RESET" }, + { NVME_SC_FW_ACT_REQUIRES_RESET, "FIRMWARE ACTIVATION REQUIRES RESET" }, + { NVME_SC_FW_ACT_REQUIRES_TIME, "FIRMWARE ACTIVATION REQUIRES MAXIMUM TIME VIOLATION" }, + { NVME_SC_FW_ACT_PROHIBITED, "FIRMWARE ACTIVATION PROHIBITED" }, + { NVME_SC_OVERLAPPING_RANGE, "OVERLAPPING RANGE" }, + { NVME_SC_NS_INSUFFICIENT_CAPACITY, "NAMESPACE INSUFFICIENT CAPACITY" }, + { NVME_SC_NS_ID_UNAVAILABLE, "NAMESPACE IDENTIFIER UNAVAILABLE" }, + { NVME_SC_NS_ALREADY_ATTACHED, "NAMESPACE ALREADY ATTACHED" }, + { NVME_SC_NS_IS_PRIVATE, "NAMESPACE IS PRIVATE" }, + { NVME_SC_NS_NOT_ATTACHED, "NS NOT ATTACHED" }, + { NVME_SC_THIN_PROV_NOT_SUPPORTED, "THIN PROVISIONING NOT SUPPORTED" }, + { NVME_SC_CTRLR_LIST_INVALID, "CONTROLLER LIST INVALID" }, + { NVME_SC_SELT_TEST_IN_PROGRESS, "DEVICE SELT-TEST IN PROGRESS" }, + { NVME_SC_BOOT_PART_WRITE_PROHIB, "BOOT PARTITION WRITE PROHIBITED" }, + { NVME_SC_INVALID_CTRLR_ID, "INVALID CONTROLLER IDENTIFIER" }, + { NVME_SC_INVALID_SEC_CTRLR_STATE, "INVALID SECONDARY CONTROLLER STATE" }, + { NVME_SC_INVALID_NUM_OF_CTRLR_RESRC, "INVALID NUMBER OF CONTROLLER RESOURCES" }, + { NVME_SC_INVALID_RESOURCE_ID, "INVALID RESOURCE IDENTIFIER" }, + { NVME_SC_CONFLICTING_ATTRIBUTES, "CONFLICTING ATTRIBUTES" }, { NVME_SC_INVALID_PROTECTION_INFO, "INVALID PROTECTION INFO" }, { NVME_SC_ATTEMPTED_WRITE_TO_RO_PAGE, "WRITE TO RO PAGE" }, @@ -211,6 +275,7 @@ static struct nvme_status_string media_error_status[] { NVME_SC_REFERENCE_TAG_CHECK_ERROR, "REFERENCE TAG CHECK ERROR" }, { NVME_SC_COMPARE_FAILURE, "COMPARE FAILURE" }, { NVME_SC_ACCESS_DENIED, "ACCESS DENIED" }, + { NVME_SC_DEALLOCATED_OR_UNWRITTEN, "DEALLOCATED OR UNWRITTEN LOGICAL BLOCK" }, { 0xFFFF, "MEDIA ERROR" } }; From owner-svn-src-all@freebsd.org Sun Mar 11 06:32:32 2018 Return-Path: Delivered-To: svn-src-all@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 B3683F310DC; Sun, 11 Mar 2018 06:32:32 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48CD37B40D; Sun, 11 Mar 2018 06:32:32 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-it0-x22d.google.com with SMTP id u5-v6so7618239itc.1; Sat, 10 Mar 2018 22:32:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=G/5XKTqq9DMbm6Jl3Ybnm1j0ZZDnEZAO1ToEH6Txodc=; b=hwknC9hQNF5TEMIqHyr28jHgcTgLC8jzRAg0ZR2JbGECvJnnV4mUtJ60ddX053g4/t 2fhUj0MtKy4M+JhT/3oX7gJ0qzzbx8zFjbF4PyJpEGDRSousiPPmNTsvAfzHVPsj7wGl ONGQRPrAu4g+IaC+lE1UxuoFnOYvFEky7IjpS1ag2rUnNBXn4dIOHUlgAuC84z/GyHXw 5MoY2LOp39TMZnf+3gwNLlURbu7OuExti8piQEy+lW4R9aj3nRzKo7lo7HcAkV7y/QIZ hjzuX42UmmzmKBYslDyxnutIhzkHDe9iQQDLXqsMAoy6jURSkshWqfdNRPiUxXuIhorL 2Siw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=G/5XKTqq9DMbm6Jl3Ybnm1j0ZZDnEZAO1ToEH6Txodc=; b=HvzlzaXNXoL/u75wVFfpqvV0H9T5GlYSb8srK1nrMmUH5iarCwoS4MUIG8Qm8wcyYB 511izzEivqSW8Ddr4unnKyUTt0bS0n6LSWJ8ceWXzgjhxWt3bls11gKeX5QrGiNiKJCU AL0i76uKB4fz8VKZgMrTMEoekzrlJH/xB7EyMe5m8/0ZsPy1xpO4aEcblfiE4pkYXJOJ NEuQqevIugtgU40VqsEMyiuxZqx0OnzjL+8rMxuwUtJq+RmymeGdpmgX6ubNgfxyi/Ea MEg2o4B6G+q9f3WPxFHT04N/Hv44UPoHT2NBIfAXekJa3qZ5BXtgit8Q+1tkzDyzm98o ftKw== X-Gm-Message-State: AElRT7F5LxcQBNikkQg0i6pL7TydRaoYmDGtnykBEac7WcOUQSXool91 qY5ilnqZR4Z/EVn00BIAltleVoOw X-Google-Smtp-Source: AG47ELsI486uUfScjxEYYdtnzDCWYgZ5EY4hwl7cVt0l+vS+TYxdkSrVV7GXEAaQmGAOP7UjMhTcmA== X-Received: by 10.36.249.203 with SMTP id l194mr4121312ith.81.1520749951342; Sat, 10 Mar 2018 22:32:31 -0800 (PST) Received: from spectre.mavhome.dp.ua ([2600:1700:3580:3560:228:f8ff:fe04:d12]) by smtp.gmail.com with ESMTPSA id n123sm1570212itb.31.2018.03.10.22.32.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Mar 2018 22:32:30 -0800 (PST) Sender: Alexander Motin Subject: Re: svn commit: r330759 - in head: sbin/nvmecontrol sys/dev/nvme To: cem@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803110509.w2B5928t008519@repo.freebsd.org> From: Alexander Motin Message-ID: <76181c29-2b3b-b89b-0186-22863273891c@FreeBSD.org> Date: Sun, 11 Mar 2018 01:32:29 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 06:32:33 -0000 On 11.03.2018 01:12, Conrad Meyer wrote: > On Sat, Mar 10, 2018 at 9:09 PM, Alexander Motin wrote: >> Author: mav >> Date: Sun Mar 11 05:09:02 2018 >> New Revision: 330759 >> URL: https://svnweb.freebsd.org/changeset/base/330759 >> >> Log: >> Add new identify data structures fields from NVMe 1.3a. >> >> ... >> Modified: head/sbin/nvmecontrol/identify.c >> ============================================================================== >> --- head/sbin/nvmecontrol/identify.c Sun Mar 11 04:37:05 2018 (r330758) >> +++ head/sbin/nvmecontrol/identify.c Sun Mar 11 05:09:02 2018 (r330759) >> @@ -95,25 +95,35 @@ print_controller(struct nvme_controller_data *cdata) >> ... >> + ((cdata->mic >> NVME_CTRLR_DATA_MIC_SRIOVVF_SHIFT) & >> + NVME_CTRLR_DATA_MIC_SRIOVVF_MASK) ? "SR-IOV VF, " : "", >> + ((cdata->mic >> NVME_CTRLR_DATA_MIC_MCTRLRS_SHIFT) & >> + NVME_CTRLR_DATA_MIC_MCTRLRS_MASK) ? "Multiple controllers, " : "", >> + ((cdata->mic >> NVME_CTRLR_DATA_MIC_MPORTS_SHIFT) & >> + NVME_CTRLR_DATA_MIC_MPORTS_MASK) ? "Multiple ports" : ""); >> ... >> Modified: head/sys/dev/nvme/nvme.h >> ============================================================================== >> --- head/sys/dev/nvme/nvme.h Sun Mar 11 04:37:05 2018 (r330758) >> +++ head/sys/dev/nvme/nvme.h Sun Mar 11 05:09:02 2018 (r330759) >> @@ -153,6 +153,17 @@ >> #define NVME_PWR_ST_APS_SHIFT (6) >> #define NVME_PWR_ST_APS_MASK (0x3) >> >> +/** Controller Multi-path I/O and Namespace Sharing Capabilities */ >> +/* More then one port */ >> +#define NVME_CTRLR_DATA_MIC_MPORTS_SHIFT (0) >> +#define NVME_CTRLR_DATA_MIC_MPORTS_MASK (0x1) >> +/* More then one controller */ >> +#define NVME_CTRLR_DATA_MIC_MCTRLRS_SHIFT (1) >> +#define NVME_CTRLR_DATA_MIC_MCTRLRS_MASK (0x1) >> +/* SR-IOV Virtual Function */ >> +#define NVME_CTRLR_DATA_MIC_SRIOVVF_SHIFT (2) >> +#define NVME_CTRLR_DATA_MIC_SRIOVVF_MASK (0x1) >> + >> /** OACS - optional admin command support */ >> /* supports security send/receive commands */ >> #define NVME_CTRLR_DATA_OACS_SECURITY_SHIFT (0) >> @@ -166,6 +177,21 @@ >> /* supports namespace management commands */ >> #define NVME_CTRLR_DATA_OACS_NSMGMT_SHIFT (3) >> #define NVME_CTRLR_DATA_OACS_NSMGMT_MASK (0x1) >> +/* supports Device Self-test command */ >> +#define NVME_CTRLR_DATA_OACS_SELFTEST_SHIFT (4) >> +#define NVME_CTRLR_DATA_OACS_SELFTEST_MASK (0x1) >> +/* supports Directives */ >> +#define NVME_CTRLR_DATA_OACS_DIRECTIVES_SHIFT (5) >> +#define NVME_CTRLR_DATA_OACS_DIRECTIVES_MASK (0x1) >> +/* supports NVMe-MI Send/Receive */ >> +#define NVME_CTRLR_DATA_OACS_NVMEMI_SHIFT (6) >> +#define NVME_CTRLR_DATA_OACS_NVMEMI_MASK (0x1) >> +/* supports Virtualization Management */ >> +#define NVME_CTRLR_DATA_OACS_VM_SHIFT (7) >> +#define NVME_CTRLR_DATA_OACS_VM_MASK (0x1) >> +/* supports Doorbell Buffer Config */ >> +#define NVME_CTRLR_DATA_OACS_DBBUFFER_SHIFT (8) >> +#define NVME_CTRLR_DATA_OACS_DBBUFFER_MASK (0x1) > > This seems like a suboptimal way to represent and check single flag > bits. Is there a reason the conventional (1< Delivered-To: svn-src-all@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 F4060F373C7; Sun, 11 Mar 2018 08:02:14 +0000 (UTC) (envelope-from joneum@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 A6F677EE4C; Sun, 11 Mar 2018 08:02:14 +0000 (UTC) (envelope-from joneum@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 A1D861A88D; Sun, 11 Mar 2018 08:02:14 +0000 (UTC) (envelope-from joneum@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2B82EbE097492; Sun, 11 Mar 2018 08:02:14 GMT (envelope-from joneum@FreeBSD.org) Received: (from joneum@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2B82ER3097491; Sun, 11 Mar 2018 08:02:14 GMT (envelope-from joneum@FreeBSD.org) Message-Id: <201803110802.w2B82ER3097491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: joneum set sender to joneum@FreeBSD.org using -f From: Jochen Neumeister Date: Sun, 11 Mar 2018 08:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330762 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: joneum X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 330762 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 08:02:15 -0000 Author: joneum (ports committer) Date: Sun Mar 11 08:02:14 2018 New Revision: 330762 URL: https://svnweb.freebsd.org/changeset/base/330762 Log: Fix typo Reported by: tcberner Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Sun Mar 11 07:33:49 2018 (r330761) +++ head/share/misc/committers-ports.dot Sun Mar 11 08:02:14 2018 (r330762) @@ -131,7 +131,7 @@ jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2007/09/12 jlaffaye [label="Julien Laffaye\njlaffaye@FreeBSD.org\n2011/06/06"] jmd [label="Johannes M. Dieterich\njmd@FreeBSD.org\n2017/01/09"] jmelo [label="Jean Milanez Melo\njmelo@FreeBSD.org\n2006/03/31"] -joneum [label="Jochen Neumeister\joneum@FreeBSD.org\n2017/05/11" +joneum [label="Jochen Neumeister\joneum@FreeBSD.org\n2017/05/11"] joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1994/08/22"] johans [label="Johan Selst\njohans@FreeBSD.org\n2006/04/01"] josef [label="Josef El-Rayes\njosef@FreeBSD.org\n2004/12/20"] From owner-svn-src-all@freebsd.org Sun Mar 11 08:54:50 2018 Return-Path: Delivered-To: svn-src-all@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 95E3FF3B1A0; Sun, 11 Mar 2018 08:54:50 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 67F4681205; Sun, 11 Mar 2018 08:54:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 6FB1C1A58E4; Sun, 11 Mar 2018 19:54:38 +1100 (AEDT) Date: Sun, 11 Mar 2018 19:54:37 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ian Lepore cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330745 - head/sys/kern In-Reply-To: <201803102207.w2AM7vKk093818@repo.freebsd.org> Message-ID: <20180311180535.E1452@besplex.bde.org> References: <201803102207.w2AM7vKk093818@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cIaQihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=sHrrFP9dtV93zn__-SYA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 08:54:51 -0000 On Sat, 10 Mar 2018, Ian Lepore wrote: > Author: ian > ... > Log: > Make root mount timeout logic work for filesystems other than ufs. > ... > These changes are based on the patch attached to the PR, but it's rewritten > enough that all mistakes belong to me. > > PR: 208882 > X-MFC after: sufficient testing, and hopefully in time for 11.1 This clones overflow bug, and I just noticed that the existing delays are misplaced too. > Modified: head/sys/kern/vfs_mountroot.c > ============================================================================== > --- head/sys/kern/vfs_mountroot.c Sat Mar 10 20:46:36 2018 (r330744) > +++ head/sys/kern/vfs_mountroot.c Sat Mar 10 22:07:57 2018 (r330745) > @@ -755,15 +755,31 @@ parse_mount(char **conf) > if (error != 0) > goto out; > > - ma = NULL; > - ma = mount_arg(ma, "fstype", fs, -1); > - ma = mount_arg(ma, "fspath", "/", -1); > - ma = mount_arg(ma, "from", dev, -1); > - ma = mount_arg(ma, "errmsg", errmsg, ERRMSGL); > - ma = mount_arg(ma, "ro", NULL, 0); > - ma = parse_mountroot_options(ma, opts); > - error = kernel_mount(ma, MNT_ROOTFS); > + delay = hz / 10; > + timeout = root_mount_timeout * hz; Old bugs cloned from vfs_mountroot_wait_if_necessary(): - when hz < 10, delay is 0 which means infinity for pause(), and also for the loop - when hz >= 10 but is not a multiple of 10, there is a minor inaccuracy - when hz is "infinity" or just large, root_mount_timeout * hz overflows. These bugs can be fixed using sbt_pause(). > > + for (;;) { > + ma = NULL; > + ma = mount_arg(ma, "fstype", fs, -1); > + ma = mount_arg(ma, "fspath", "/", -1); > + ma = mount_arg(ma, "from", dev, -1); > + ma = mount_arg(ma, "errmsg", errmsg, ERRMSGL); > + ma = mount_arg(ma, "ro", NULL, 0); > + ma = parse_mountroot_options(ma, opts); > + > + error = kernel_mount(ma, MNT_ROOTFS); > + if (error == 0 || timeout <= 0) > + break; > + > + if (root_mount_timeout * hz == timeout || > + (bootverbose && timeout % hz == 0)) { > + printf("Mounting from %s:%s failed with error %d; " > + "retrying for %d more second%s\n", fs, dev, error, > + timeout / hz, (timeout / hz > 1) ? "s" : ""); > + } > + pause("rmretry", delay); > + timeout -= delay; > + } > out: > if (error) { > printf("Mounting from %s:%s failed with error %d", Misplaced delays: the order is to try each device in vfs.root.mountfrom in the outer loop with delays in the inner loop, but should be to try each device in the inner loop with delays in the outer loop. I use a generic vfs.root.mountfrom with entries for many different FreeBSD versions and target systems. Renaming and renumbering devices causes problems, but it can usually be arranged that the preferred device either exists initially or never exists. Retrying for never-existing devices in the inner loop wastes many seconds. Retrying in the outer loop would waste at most * 0.1 seconds. Only the error reporting for the correct is complicated. Currently, failure is reported once for devices probed but not found, so later devices in my list are not probed and not reported. The above gives a new bug: double error reporting for the first retry and the final failure for devices early on the list that never exist. I want to see exactly 1 report for all nonexistent devices early in the list. In the usual case, there is 1 failure and no retries for devices early in the list; then mount succeeds on the first try for some device and the probe completes (it is too difficult to probe the list after 1 success). Bruce From owner-svn-src-all@freebsd.org Sun Mar 11 08:27:12 2018 Return-Path: Delivered-To: svn-src-all@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 8CF62F39465; Sun, 11 Mar 2018 08:27:12 +0000 (UTC) (envelope-from grehan@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 282637FE3C; Sun, 11 Mar 2018 08:27:12 +0000 (UTC) (envelope-from grehan@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 1D9541AD0E; Sun, 11 Mar 2018 08:27:12 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2B8RBfC007301; Sun, 11 Mar 2018 08:27:11 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2B8RBgp007300; Sun, 11 Mar 2018 08:27:11 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201803110827.w2B8RBgp007300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Sun, 11 Mar 2018 08:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330764 - head/usr.sbin/bhyvectl X-SVN-Group: head X-SVN-Commit-Author: grehan X-SVN-Commit-Paths: head/usr.sbin/bhyvectl X-SVN-Commit-Revision: 330764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 08:27:12 -0000 Author: grehan Date: Sun Mar 11 08:27:11 2018 New Revision: 330764 URL: https://svnweb.freebsd.org/changeset/base/330764 Log: Add CR2 get/set support. Reported/Tested by: Fabian Freyer Reviewed by: araujo Differential Revision: https://reviews.freebsd.org/D14648 MFC after: 3 weeks Modified: head/usr.sbin/bhyvectl/bhyvectl.c Modified: head/usr.sbin/bhyvectl/bhyvectl.c ============================================================================== --- head/usr.sbin/bhyvectl/bhyvectl.c Sun Mar 11 08:07:40 2018 (r330763) +++ head/usr.sbin/bhyvectl/bhyvectl.c Sun Mar 11 08:27:11 2018 (r330764) @@ -109,6 +109,8 @@ usage(bool cpu_intel) " [--desc-access=]\n" " [--set-cr0=]\n" " [--get-cr0]\n" + " [--set-cr2=]\n" + " [--get-cr2]\n" " [--set-cr3=]\n" " [--get-cr3]\n" " [--set-cr4=]\n" @@ -254,7 +256,8 @@ static int create, destroy, get_memmap, get_memseg; static int get_intinfo; static int get_active_cpus, get_suspended_cpus; static uint64_t memsize; -static int set_cr0, get_cr0, set_cr3, get_cr3, set_cr4, get_cr4; +static int set_cr0, get_cr0, set_cr2, get_cr2, set_cr3, get_cr3; +static int set_cr4, get_cr4; static int set_efer, get_efer; static int set_dr0, get_dr0; static int set_dr1, get_dr1; @@ -551,6 +554,7 @@ enum { SET_MEM, SET_EFER, SET_CR0, + SET_CR2, SET_CR3, SET_CR4, SET_DR0, @@ -662,7 +666,7 @@ cpu_vendor_intel(void) static int get_all_registers(struct vmctx *ctx, int vcpu) { - uint64_t cr0, cr3, cr4, dr0, dr1, dr2, dr3, dr6, dr7; + uint64_t cr0, cr2, cr3, cr4, dr0, dr1, dr2, dr3, dr6, dr7; uint64_t rsp, rip, rflags, efer; uint64_t rax, rbx, rcx, rdx, rsi, rdi, rbp; uint64_t r8, r9, r10, r11, r12, r13, r14, r15; @@ -680,6 +684,12 @@ get_all_registers(struct vmctx *ctx, int vcpu) printf("cr0[%d]\t\t0x%016lx\n", vcpu, cr0); } + if (!error && (get_cr2 || get_all)) { + error = vm_get_register(ctx, vcpu, VM_REG_GUEST_CR2, &cr2); + if (error == 0) + printf("cr2[%d]\t\t0x%016lx\n", vcpu, cr2); + } + if (!error && (get_cr3 || get_all)) { error = vm_get_register(ctx, vcpu, VM_REG_GUEST_CR3, &cr3); if (error == 0) @@ -1322,6 +1332,7 @@ setup_options(bool cpu_intel) { "set-mem", REQ_ARG, 0, SET_MEM }, { "set-efer", REQ_ARG, 0, SET_EFER }, { "set-cr0", REQ_ARG, 0, SET_CR0 }, + { "set-cr2", REQ_ARG, 0, SET_CR2 }, { "set-cr3", REQ_ARG, 0, SET_CR3 }, { "set-cr4", REQ_ARG, 0, SET_CR4 }, { "set-dr0", REQ_ARG, 0, SET_DR0 }, @@ -1384,6 +1395,7 @@ setup_options(bool cpu_intel) { "get-memseg", NO_ARG, &get_memseg, 1 }, { "get-efer", NO_ARG, &get_efer, 1 }, { "get-cr0", NO_ARG, &get_cr0, 1 }, + { "get-cr2", NO_ARG, &get_cr2, 1 }, { "get-cr3", NO_ARG, &get_cr3, 1 }, { "get-cr4", NO_ARG, &get_cr4, 1 }, { "get-dr0", NO_ARG, &get_dr0, 1 }, @@ -1668,7 +1680,7 @@ main(int argc, char *argv[]) int error, ch, vcpu, ptenum; vm_paddr_t gpa_pmap; struct vm_exit vmexit; - uint64_t rax, cr0, cr3, cr4, dr0, dr1, dr2, dr3, dr6, dr7; + uint64_t rax, cr0, cr2, cr3, cr4, dr0, dr1, dr2, dr3, dr6, dr7; uint64_t rsp, rip, rflags, efer, pat; uint64_t eptp, bm, addr, u64, pteval[4], *pte, info[2]; struct vmctx *ctx; @@ -1708,6 +1720,10 @@ main(int argc, char *argv[]) cr0 = strtoul(optarg, NULL, 0); set_cr0 = 1; break; + case SET_CR2: + cr2 = strtoul(optarg, NULL, 0); + set_cr2 = 1; + break; case SET_CR3: cr3 = strtoul(optarg, NULL, 0); set_cr3 = 1; @@ -1870,6 +1886,9 @@ main(int argc, char *argv[]) if (!error && set_cr0) error = vm_set_register(ctx, vcpu, VM_REG_GUEST_CR0, cr0); + + if (!error && set_cr2) + error = vm_set_register(ctx, vcpu, VM_REG_GUEST_CR2, cr2); if (!error && set_cr3) error = vm_set_register(ctx, vcpu, VM_REG_GUEST_CR3, cr3); From owner-svn-src-all@freebsd.org Sun Mar 11 10:47:41 2018 Return-Path: Delivered-To: svn-src-all@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 5152CF434CA; Sun, 11 Mar 2018 10:47:41 +0000 (UTC) (envelope-from fernape@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 0558E86345; Sun, 11 Mar 2018 10:47:41 +0000 (UTC) (envelope-from fernape@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 004451C483; Sun, 11 Mar 2018 10:47:41 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BAleMC078170; Sun, 11 Mar 2018 10:47:40 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BAleVb078169; Sun, 11 Mar 2018 10:47:40 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <201803111047.w2BAleVb078169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Sun, 11 Mar 2018 10:47:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330765 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 330765 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 10:47:41 -0000 Author: fernape (ports committer) Date: Sun Mar 11 10:47:40 2018 New Revision: 330765 URL: https://svnweb.freebsd.org/changeset/base/330765 Log: Add myself (fernape) to commiters-port.dot Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D14639 Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Sun Mar 11 08:27:11 2018 (r330764) +++ head/share/misc/committers-ports.dot Sun Mar 11 10:47:40 2018 (r330765) @@ -103,6 +103,7 @@ erwin [label="Erwin Lansing\nerwin@FreeBSD.org\n2003/0 eugen [label="Eugene Grosbein\neugen@FreeBSD.org\n2017/03/04"] farrokhi [label="Babak Farrokhi\nfarrokhi@FreeBSD.org\n2006/11/07"] feld [label="Mark Felder\nfeld@FreeBSD.org\n2013/06/25"] +fernape [label="Fernando Apesteguia\nfernape@FreeBSD.org\n2018/03/03"] fjoe [label="Max Khon\nfjoe@FreeBSD.org\n2001/08/06"] flo [label="Florian Smeets\nflo@FreeBSD.org\n2010/12/07"] fluffy [label="Dima Panov\nfluffy@FreeBSD.org\n2009/08/10"] @@ -663,6 +664,7 @@ tabthorpe -> gblach tcberner -> adridg tcberner -> joneum tcberner -> yuri +tcberner -> fernape thierry -> jadawin thierry -> riggs @@ -671,6 +673,7 @@ tmclaugh -> itetcu tmclaugh -> xride tz -> joneum +tz -> fernape vsevolod -> eugen From owner-svn-src-all@freebsd.org Sun Mar 11 16:17:54 2018 Return-Path: Delivered-To: svn-src-all@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 523DAF3695C; Sun, 11 Mar 2018 16:17:54 +0000 (UTC) (envelope-from brooks@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 07E607298C; Sun, 11 Mar 2018 16:17:54 +0000 (UTC) (envelope-from brooks@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 D89CC1F8B4; Sun, 11 Mar 2018 16:17:53 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BGHrrC044202; Sun, 11 Mar 2018 16:17:53 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BGHrRh044201; Sun, 11 Mar 2018 16:17:53 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803111617.w2BGHrRh044201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Sun, 11 Mar 2018 16:17:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330766 - head/sys/i386/include X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/i386/include X-SVN-Commit-Revision: 330766 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 16:17:54 -0000 Author: brooks Date: Sun Mar 11 16:17:53 2018 New Revision: 330766 URL: https://svnweb.freebsd.org/changeset/base/330766 Log: Remove obsolete pcaudioio.h. Nothing uses the #define's values or the types. (Some NTP code does use an audio_info_t, but it is in #ifdef'd support for Solaris and is not this audio_info_t). Sponsored by: DARPA, AFRL Deleted: head/sys/i386/include/pcaudioio.h From owner-svn-src-all@freebsd.org Sun Mar 11 16:57:15 2018 Return-Path: Delivered-To: svn-src-all@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 9F56CF3A704; Sun, 11 Mar 2018 16:57:15 +0000 (UTC) (envelope-from ian@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 39D6F73C83; Sun, 11 Mar 2018 16:57:15 +0000 (UTC) (envelope-from ian@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 347591FF10; Sun, 11 Mar 2018 16:57:15 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BGvFQa063836; Sun, 11 Mar 2018 16:57:15 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BGvFZ9063835; Sun, 11 Mar 2018 16:57:15 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803111657.w2BGvFZ9063835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Mar 2018 16:57:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330767 - head/sys/x86/isa X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/x86/isa X-SVN-Commit-Revision: 330767 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 16:57:15 -0000 Author: ian Date: Sun Mar 11 16:57:14 2018 New Revision: 330767 URL: https://svnweb.freebsd.org/changeset/base/330767 Log: Convert atrtc the new style rtc debugging output. Remove the db show command handler which provided much the same information. Removing the possibility of accessing the hardware regs from the debugger context paves the way for simplifying the locking code in the driver. Modified: head/sys/x86/isa/atrtc.c Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Sun Mar 11 16:17:53 2018 (r330766) +++ head/sys/x86/isa/atrtc.c Sun Mar 11 16:57:14 2018 (r330767) @@ -318,6 +318,7 @@ atrtc_settime(device_t dev __unused, struct timespec * struct bcd_clocktime bct; clock_ts_to_bcd(ts, &bct, false); + clock_dbgprint_bcd(dev, CLOCK_DBG_WRITE, &bct); mtx_lock(&atrtc_time_lock); RTC_LOCK; @@ -385,6 +386,7 @@ atrtc_gettime(device_t dev, struct timespec *ts) /* dow is unused in timespec conversion and we have no nsec info. */ bct.dow = 0; bct.nsec = 0; + clock_dbgprint_bcd(dev, CLOCK_DBG_READ, &bct); return (clock_bcd_to_ts(&bct, ts, false)); } @@ -416,16 +418,3 @@ static devclass_t atrtc_devclass; DRIVER_MODULE(atrtc, isa, atrtc_driver, atrtc_devclass, 0, 0); DRIVER_MODULE(atrtc, acpi, atrtc_driver, atrtc_devclass, 0, 0); ISA_PNP_INFO(atrtc_ids); - -#include "opt_ddb.h" -#ifdef DDB -#include - -DB_SHOW_COMMAND(rtc, rtc) -{ - printf("%02x/%02x/%02x %02x:%02x:%02x, A = %02x, B = %02x, C = %02x\n", - rtcin(RTC_YEAR), rtcin(RTC_MONTH), rtcin(RTC_DAY), - rtcin(RTC_HRS), rtcin(RTC_MIN), rtcin(RTC_SEC), - rtcin(RTC_STATUSA), rtcin(RTC_STATUSB), rtcin(RTC_INTR)); -} -#endif /* DDB */ From owner-svn-src-all@freebsd.org Sun Mar 11 17:17:47 2018 Return-Path: Delivered-To: svn-src-all@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 DA348F3D6CC for ; Sun, 11 Mar 2018 17:17:46 +0000 (UTC) (envelope-from oliver.pinter@balabit.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE632749D6 for ; Sun, 11 Mar 2018 17:17:45 +0000 (UTC) (envelope-from oliver.pinter@balabit.com) Received: by mail-io0-x242.google.com with SMTP id p78so8728536iod.13 for ; Sun, 11 Mar 2018 10:17:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=balabit-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CWxCqlodFyER1I8sjS+607lkn84e30o6GJKsTws1QP4=; b=eU3a1yiazeAfbwO1sywQXaesxvlNIlB06K5QMR0WjfZ19hdzWyZEX+CGUJ9Cb/b/Df vG8eb5alOOIHUUSMPX92RDE+knrrhA6X/LtD3z1Td1ffTI302/v4E1X82CUiZPBqNgNe o3UBirB+JwO1Er5yACsQt+WN+7ZVAYN5A3RDOE5A0Ox+XYmsYBZzUIPzQfpn/QfhkSv/ TnVCZz8ynrqKiz2mXwX2d07aq12x/INDQ+E891i9DXOqNbnqA2fDkqCWd89Bv7iDpRlf yrhSlAtxd8m3yIgX9+GRWaa+kUZrQEgPkr05/TplMByrAa0VS5RboEnoCQyjrJDJffuV xq9w== 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=CWxCqlodFyER1I8sjS+607lkn84e30o6GJKsTws1QP4=; b=fU4Ff2RydE3V0FY1OBa4oce5CTD2jSyLI9b6kj6sERajBydSVDay3uvotQVqe5xJ0B p5RqJTwpP3yUqMloI1Mxxpkz2kryfbquYBo2SHH2bG4s1EdCG4pN7Vsu9n10mINB0OS8 wxBy3hi/NuMPh1A2brdQKn2luvpI4MPvQcPB5Ml48/NkTj8zTGXtKVcN5YFFUDZKV6Lr 7AUoHAy3JJ23FNicpT46ggS+wVHZEmVdhf2a2uBeorNQlpAjhFbAU4FPicz75OHQjeaX OQedS+FoNjGUkeAh5RVfsUCPod6FNQQ2zWW2AMEdXV2SAMceP4Nlpp0wCMHTm8K7H7Gc D88g== X-Gm-Message-State: AElRT7F/Y/10v3hmToY5ZVXL3m7woxMlJQPRdDPONN3+V2a4ymfIiX8r vE7H2NCxtajxxzmKyU+HKIthRaxB7XtX20HA1SSqt9i3 X-Google-Smtp-Source: AG47ELvRMkMiLYwIkMWq+JlkvQAClJpZdp3lwFhfddKisnLYXpgU+q07lNgR2mAs//I+TIQQXYxUNve3VUb44WuWEhE= X-Received: by 10.107.112.21 with SMTP id l21mr6241534ioc.80.1520788665260; Sun, 11 Mar 2018 10:17:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.192.225.141 with HTTP; Sun, 11 Mar 2018 10:17:44 -0700 (PDT) In-Reply-To: References: <201803072318.w27NIrI6056501@pdx.rh.CN85.dnsmgr.net> From: =?UTF-8?B?UGludMOpciwgT2xpdsOpcg==?= Date: Sun, 11 Mar 2018 18:17:44 +0100 Message-ID: Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: rgrimes@freebsd.org Cc: Eitan Adler , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org, John Baldwin Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 17:17:47 -0000 On Thu, Mar 8, 2018 at 12:51 PM, Pint=C3=A9r, Oliv=C3=A9r wrote: > > > On Thu, Mar 8, 2018 at 12:18 AM, Rodney W. Grimes < > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > >> > On 7 March 2018 at 09:37, John Baldwin wrote: >> > > On Tuesday, March 06, 2018 06:46:37 PM Eitan Adler wrote: >> > >> On 6 March 2018 at 08:26, John Baldwin wrote: >> > >> > On Monday, March 05, 2018 07:13:59 PM Eitan Adler wrote: >> > >> >> On 5 March 2018 at 10:08, John Baldwin wrote: >> > >> >> > On Monday, March 05, 2018 07:54:58 AM Eitan Adler wrote: >> > >> >> >> Author: eadler >> > >> >> >> Date: Mon Mar 5 07:54:57 2018 >> > >> >> >> New Revision: 330451 >> > >> >> >> URL: https://svnweb.freebsd.org/changeset/base/330451 >> > >> >> >> >> > >> >> >> Log: >> > >> >> >> MFC r306837: >> > >> >> >> >> > >> >> >> [net80211] extend the ieee80211_rx_stats struct to include >> more information. >> > >> >> > >> > >> >> > Have you thought about the KBI implications of this change and >> some of the >> > >> >> > other changes you've merged? >> > >> >> >> > >> >> I do have a copy of the modules from 11.1 and have loaded them a= t >> > >> >> various points in time after merging. That said, I am not perfec= t. >> > >> >> Unfortunately, my -STABLE box did not have fully functioning >> drivers >> > >> >> before these changes so its difficult to test anything beyond >> "loads >> > >> >> and does not panic.". I havn't done so today yet, but that will >> happen >> > >> >> soon. >> > >> >> >> > >> >> Ensuring these things work through code inspection is certainly >> > >> >> possible and I've skipped over several changes as a result. >> > >> > >> > >> > Loading a module doesn't alone doesn't actually test for breakage= . >> > >> >> > >> I'm aware. In this case I should likely just revert this change sin= ce >> > >> its a pretty blatant break. >> > > >> > > I suspect many of these changes for iwm, etc. are all intertwined so >> I'm not >> > > sure if you can leave out individual ones. >> > >> > Possibly. I do have iwm working on my laptop though. I also know of >> > one open PR assigned to me w.r.t. a model I don't own. I'll be >> > addressing it some time this week. >> >> I believe I also have a tester of stable/11 iwm patches avaliable, >> he has an 8265? >> > > At weekend I will test them. > Sorry, -ENOTIME for 8265 this weekend, but it working fine (and much more stable) with 7260. > > >> >> -- >> Rod Grimes >> rgrimes@freebsd.org >> _______________________________________________ >> svn-src-stable-11@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11 >> To unsubscribe, send any mail to "svn-src-stable-11-unsubscribe >> @freebsd.org" >> > > From owner-svn-src-all@freebsd.org Sun Mar 11 17:21:48 2018 Return-Path: Delivered-To: svn-src-all@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 CFD96F3DCC3; Sun, 11 Mar 2018 17:21:48 +0000 (UTC) (envelope-from fernape@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 7EEBA74C80; Sun, 11 Mar 2018 17:21:48 +0000 (UTC) (envelope-from fernape@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 79D09203AD; Sun, 11 Mar 2018 17:21:48 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BHLmJC076946; Sun, 11 Mar 2018 17:21:48 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BHLmhl076945; Sun, 11 Mar 2018 17:21:48 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <201803111721.w2BHLmhl076945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Sun, 11 Mar 2018 17:21:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330768 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 330768 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 17:21:49 -0000 Author: fernape (ports committer) Date: Sun Mar 11 17:21:48 2018 New Revision: 330768 URL: https://svnweb.freebsd.org/changeset/base/330768 Log: Add myself (fernape) to calendar.freebsd As indicated in Committers guide Chapter 6, point 9 "Optional: Update Ports with Personal Information" Approved by: tcberner Differential Revision: https://reviews.freebsd.org/D14653 Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Sun Mar 11 16:57:14 2018 (r330767) +++ head/usr.bin/calendar/calendars/calendar.freebsd Sun Mar 11 17:21:48 2018 (r330768) @@ -266,6 +266,7 @@ 07/10 David Schultz born in Oakland, California, United States, 1982 07/10 Ben Woods born in Perth, Western Australia, Australia, 1984 07/11 Jesus R. Camou born in Hermosillo, Sonora, Mexico, 1983 +07/14 Fernando Apesteguia born in Madrid, Spain, 1981 07/15 Gary Jennejohn born in Rochester, New York, United States, 1950 07/16 Suleiman Souhlal born in Roma, Italy, 1983 07/16 Davide Italiano born in Milazzo, Italy, 1989 From owner-svn-src-all@freebsd.org Sun Mar 11 17:40:03 2018 Return-Path: Delivered-To: svn-src-all@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 8E49CF403DF; Sun, 11 Mar 2018 17:40:03 +0000 (UTC) (envelope-from emaste@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 3DF4B75A78; Sun, 11 Mar 2018 17:40:03 +0000 (UTC) (envelope-from emaste@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 38A212058B; Sun, 11 Mar 2018 17:40:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BHe3m8086787; Sun, 11 Mar 2018 17:40:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BHe2hT086781; Sun, 11 Mar 2018 17:40:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803111740.w2BHe2hT086781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 11 Mar 2018 17:40:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330769 - in stable/11: tools/build/mk usr.bin usr.bin/ruptime usr.bin/rwho usr.sbin usr.sbin/rwhod X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/11: tools/build/mk usr.bin usr.bin/ruptime usr.bin/rwho usr.sbin usr.sbin/rwhod X-SVN-Commit-Revision: 330769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 17:40:03 -0000 Author: emaste Date: Sun Mar 11 17:40:02 2018 New Revision: 330769 URL: https://svnweb.freebsd.org/changeset/base/330769 Log: MFC r322277 by jlh: rwho/ruptime/rwhod shouldn't be gated by RCMDS. As peter@ points out in pr/220953: "rwho, rwhod and ruptime are not part of the remote login suite (rsh, rlogin etc). They should *not* be in the rcmds package which is disabled by default. We rely on rwho/rwhod/ruptime in the freebsd.org cluster." This commit is a re-commit of r322029 and r322031 with a better commit log, as pointed out by ngie@. This also includes the necesary changes to OptionalObsoleteFiles.inc, as requested by jhb@. PR: 220953 Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc stable/11/usr.bin/Makefile stable/11/usr.bin/ruptime/ruptime.1 stable/11/usr.bin/rwho/rwho.1 stable/11/usr.sbin/Makefile stable/11/usr.sbin/rwhod/rwhod.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Sun Mar 11 17:21:48 2018 (r330768) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Sun Mar 11 17:40:02 2018 (r330769) @@ -7147,24 +7147,16 @@ OLD_FILES+=usr/share/man/man8/rbootd.8.gz .if ${MK_RCMDS} == no OLD_FILES+=bin/rcp -OLD_FILES+=etc/rc.d/rwho -OLD_FILES+=etc/periodic/daily/140.clean-rwho OLD_FILES+=rescue/rcp OLD_FILES+=usr/bin/rlogin OLD_FILES+=usr/bin/rsh -OLD_FILES+=usr/bin/ruptime -OLD_FILES+=usr/bin/rwho OLD_FILES+=usr/libexec/rlogind OLD_FILES+=usr/libexec/rshd -OLD_FILES+=usr/sbin/rwhod OLD_FILES+=usr/share/man/man1/rcp.1.gz OLD_FILES+=usr/share/man/man1/rlogin.1.gz OLD_FILES+=usr/share/man/man1/rsh.1.gz -OLD_FILES+=usr/share/man/man1/ruptime.1.gz -OLD_FILES+=usr/share/man/man1/rwho.1.gz OLD_FILES+=usr/share/man/man8/rlogind.8.gz OLD_FILES+=usr/share/man/man8/rshd.8.gz -OLD_FILES+=usr/share/man/man8/rwhod.8.gz .endif .if ${MK_RCS} == no Modified: stable/11/usr.bin/Makefile ============================================================================== --- stable/11/usr.bin/Makefile Sun Mar 11 17:21:48 2018 (r330768) +++ stable/11/usr.bin/Makefile Sun Mar 11 17:40:02 2018 (r330769) @@ -133,8 +133,10 @@ SUBDIR= alias \ rpcinfo \ rs \ rup \ + ruptime \ rusers \ rwall \ + rwho \ script \ sdiff \ sed \ @@ -255,8 +257,6 @@ SUBDIR.${MK_OPENSSL}+= newkey SUBDIR.${MK_QUOTAS}+= quota SUBDIR.${MK_RCMDS}+= rlogin SUBDIR.${MK_RCMDS}+= rsh -SUBDIR.${MK_RCMDS}+= ruptime -SUBDIR.${MK_RCMDS}+= rwho SUBDIR.${MK_SENDMAIL}+= vacation SUBDIR.${MK_TALK}+= talk SUBDIR.${MK_TELNET}+= telnet Modified: stable/11/usr.bin/ruptime/ruptime.1 ============================================================================== --- stable/11/usr.bin/ruptime/ruptime.1 Sun Mar 11 17:21:48 2018 (r330768) +++ stable/11/usr.bin/ruptime/ruptime.1 Sun Mar 11 17:40:02 2018 (r330769) @@ -38,15 +38,6 @@ .Nm .Op Fl alrtu .Op Ar host ... -.Sh DEPRECATION NOTICE -.Nm -is deprecated and will be removed from future versions of the -.Fx -base system. -If -.Nm -is still required, it can be installed from ports or packages -(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: stable/11/usr.bin/rwho/rwho.1 ============================================================================== --- stable/11/usr.bin/rwho/rwho.1 Sun Mar 11 17:21:48 2018 (r330768) +++ stable/11/usr.bin/rwho/rwho.1 Sun Mar 11 17:40:02 2018 (r330769) @@ -37,15 +37,6 @@ .Sh SYNOPSIS .Nm .Op Fl a -.Sh DEPRECATION NOTICE -.Nm -is deprecated and will be removed from future versions of the -.Fx -base system. -If -.Nm -is still required, it can be installed from ports or packages -(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: stable/11/usr.sbin/Makefile ============================================================================== --- stable/11/usr.sbin/Makefile Sun Mar 11 17:21:48 2018 (r330768) +++ stable/11/usr.sbin/Makefile Sun Mar 11 17:40:02 2018 (r330769) @@ -73,6 +73,7 @@ SUBDIR= adduser \ rpc.statd \ rpc.umntall \ rtprio \ + rwhod \ service \ services_mkdb \ sesutil \ @@ -190,7 +191,6 @@ SUBDIR.${MK_PPP}+= ppp SUBDIR.${MK_QUOTAS}+= edquota SUBDIR.${MK_QUOTAS}+= quotaon SUBDIR.${MK_QUOTAS}+= repquota -SUBDIR.${MK_RCMDS}+= rwhod SUBDIR.${MK_SENDMAIL}+= editmap SUBDIR.${MK_SENDMAIL}+= mailstats SUBDIR.${MK_SENDMAIL}+= makemap Modified: stable/11/usr.sbin/rwhod/rwhod.8 ============================================================================== --- stable/11/usr.sbin/rwhod/rwhod.8 Sun Mar 11 17:21:48 2018 (r330768) +++ stable/11/usr.sbin/rwhod/rwhod.8 Sun Mar 11 17:40:02 2018 (r330769) @@ -40,15 +40,6 @@ .Op Fl p .Op Fl l .Op Fl m Op Ar ttl -.Sh DEPRECATION NOTICE -.Nm -is deprecated and will be removed from future versions of the -.Fx -base system. -If -.Nm -is still required, it can be installed from ports or packages -(net/bsdrcmds). .Sh DESCRIPTION The .Nm From owner-svn-src-all@freebsd.org Sun Mar 11 17:43:05 2018 Return-Path: Delivered-To: svn-src-all@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 A413BF4097B; Sun, 11 Mar 2018 17:43:05 +0000 (UTC) (envelope-from emaste@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 568A375EA1; Sun, 11 Mar 2018 17:43:05 +0000 (UTC) (envelope-from emaste@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 5066B2070E; Sun, 11 Mar 2018 17:43:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BHh5Vn091697; Sun, 11 Mar 2018 17:43:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BHh5rI091694; Sun, 11 Mar 2018 17:43:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803111743.w2BHh5rI091694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 11 Mar 2018 17:43:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330770 - in stable/11/etc: periodic/daily rc.d X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/11/etc: periodic/daily rc.d X-SVN-Commit-Revision: 330770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 17:43:05 -0000 Author: emaste Date: Sun Mar 11 17:43:04 2018 New Revision: 330770 URL: https://svnweb.freebsd.org/changeset/base/330770 Log: MFC r322552 by jhb: Unconditionally install rwhod support scripts. r322277 moved rwho* and ruptime out of the MK_RCMDS conditional including updating the obsolete files entries to not remove these scripts due to WITHOUT_RCMDS=yes. However, the initial installation was still conditional on MK_RCMDS, so new installs did not include these scripts and upgrades via mergemaster or etcupdate removed them. PR: 220953 Modified: stable/11/etc/periodic/daily/Makefile stable/11/etc/rc.d/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/periodic/daily/Makefile ============================================================================== --- stable/11/etc/periodic/daily/Makefile Sun Mar 11 17:40:02 2018 (r330769) +++ stable/11/etc/periodic/daily/Makefile Sun Mar 11 17:43:04 2018 (r330770) @@ -7,6 +7,7 @@ FILESGROUPS=FILES FILES= 100.clean-disks \ 110.clean-tmps \ 120.clean-preserve \ + 140.clean-rwho \ 200.backup-passwd \ 210.backup-aliases \ 330.news \ @@ -45,14 +46,6 @@ FILES+= 130.clean-msgs FILES+= 480.status-ntpd \ 480.leapfile-ntpd .endif - -.if ${MK_RCMDS} != "no" -FILESGROUPS+= RCMDS -RCMDS+= 140.clean-rwho -.endif -RCMDSDIR= /etc/periodic/daily -RCMDSMODE= ${BINMODE} -RCMDSPACKAGE= rcmds .if ${MK_SENDMAIL} != "no" FILES+= 150.clean-hoststat \ Modified: stable/11/etc/rc.d/Makefile ============================================================================== --- stable/11/etc/rc.d/Makefile Sun Mar 11 17:40:02 2018 (r330769) +++ stable/11/etc/rc.d/Makefile Sun Mar 11 17:43:04 2018 (r330770) @@ -100,6 +100,7 @@ FILES= DAEMON \ rpcbind \ rtadvd \ rtsold \ + rwho \ savecore \ securelevel \ serial \ @@ -277,12 +278,6 @@ SSHPACKAGE= ssh .if ${MK_PF} != "no" FILES+= ftp-proxy -.endif - -.if ${MK_RCMDS} != "no" -FILESGROUPS+= RCMDS -RCMDS+= rwho -RCMDSPACKAGE= rcmds .endif .if ${MK_ROUTED} != "no" From owner-svn-src-all@freebsd.org Sun Mar 11 17:53:48 2018 Return-Path: Delivered-To: svn-src-all@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 89186F41690; Sun, 11 Mar 2018 17:53:48 +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 EF3CE76520; Sun, 11 Mar 2018 17:53:47 +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 w2BHrkpS074878; Sun, 11 Mar 2018 10:53:46 -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 w2BHrk7R074877; Sun, 11 Mar 2018 10:53:46 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803111753.w2BHrk7R074877@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 In-Reply-To: To: =?UTF-8?Q?Pint=C3=A9r=2C_Oliv=C3=A9r?= Date: Sun, 11 Mar 2018 10:53:46 -0700 (PDT) CC: rgrimes@freebsd.org, Eitan Adler , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org, John Baldwin 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 17:53:48 -0000 > On Thu, Mar 8, 2018 at 12:51 PM, Pint?r, Oliv?r > wrote: > > > > > > > On Thu, Mar 8, 2018 at 12:18 AM, Rodney W. Grimes < > > freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > > >> > On 7 March 2018 at 09:37, John Baldwin wrote: > >> > > On Tuesday, March 06, 2018 06:46:37 PM Eitan Adler wrote: > >> > >> On 6 March 2018 at 08:26, John Baldwin wrote: > >> > >> > On Monday, March 05, 2018 07:13:59 PM Eitan Adler wrote: > >> > >> >> On 5 March 2018 at 10:08, John Baldwin wrote: > >> > >> >> > On Monday, March 05, 2018 07:54:58 AM Eitan Adler wrote: > >> > >> >> >> Author: eadler > >> > >> >> >> Date: Mon Mar 5 07:54:57 2018 > >> > >> >> >> New Revision: 330451 > >> > >> >> >> URL: https://svnweb.freebsd.org/changeset/base/330451 > >> > >> >> >> > >> > >> >> >> Log: > >> > >> >> >> MFC r306837: > >> > >> >> >> > >> > >> >> >> [net80211] extend the ieee80211_rx_stats struct to include > >> more information. > >> > >> >> > > >> > >> >> > Have you thought about the KBI implications of this change and > >> some of the > >> > >> >> > other changes you've merged? > >> > >> >> > >> > >> >> I do have a copy of the modules from 11.1 and have loaded them at > >> > >> >> various points in time after merging. That said, I am not perfect. > >> > >> >> Unfortunately, my -STABLE box did not have fully functioning > >> drivers > >> > >> >> before these changes so its difficult to test anything beyond > >> "loads > >> > >> >> and does not panic.". I havn't done so today yet, but that will > >> happen > >> > >> >> soon. > >> > >> >> > >> > >> >> Ensuring these things work through code inspection is certainly > >> > >> >> possible and I've skipped over several changes as a result. > >> > >> > > >> > >> > Loading a module doesn't alone doesn't actually test for breakage. > >> > >> > >> > >> I'm aware. In this case I should likely just revert this change since > >> > >> its a pretty blatant break. > >> > > > >> > > I suspect many of these changes for iwm, etc. are all intertwined so > >> I'm not > >> > > sure if you can leave out individual ones. > >> > > >> > Possibly. I do have iwm working on my laptop though. I also know of > >> > one open PR assigned to me w.r.t. a model I don't own. I'll be > >> > addressing it some time this week. > >> > >> I believe I also have a tester of stable/11 iwm patches avaliable, > >> he has an 8265? ^^^^ Its an 8565, my mistake. > >> > > > > At weekend I will test them. > > > > Sorry, -ENOTIME for 8265 this weekend, but it working fine (and much more > stable) with 7260. Thanks for keeping us informed. I am uncertain as to the state of iwm in stable/11, should the Intel 8565ac work, or not? I have exchanged an additional round of email with the volunteer tester, he says he is running an unmodified stable/11, now trying to find out if he is updating that regular or not. Hopefully we can have some test results soon. Thanks, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Sun Mar 11 18:03:56 2018 Return-Path: Delivered-To: svn-src-all@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 8533CF42360; Sun, 11 Mar 2018 18:03:56 +0000 (UTC) (envelope-from ae@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 32C6976D83; Sun, 11 Mar 2018 18:03:56 +0000 (UTC) (envelope-from ae@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 2B8EA20A3C; Sun, 11 Mar 2018 18:03:56 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BI3u1N002047; Sun, 11 Mar 2018 18:03:56 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BI3tJ0002045; Sun, 11 Mar 2018 18:03:55 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201803111803.w2BI3tJ0002045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 11 Mar 2018 18:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330771 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 330771 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 18:03:56 -0000 Author: ae Date: Sun Mar 11 18:03:55 2018 New Revision: 330771 URL: https://svnweb.freebsd.org/changeset/base/330771 Log: Remove obsoleted and unused key_sendup() function. Also remove declaration for nonexistend key_usrreq() function. MFC after: 2 weeks Modified: head/sys/netipsec/keysock.c head/sys/netipsec/keysock.h Modified: head/sys/netipsec/keysock.c ============================================================================== --- head/sys/netipsec/keysock.c Sun Mar 11 17:43:04 2018 (r330770) +++ head/sys/netipsec/keysock.c Sun Mar 11 18:03:55 2018 (r330771) @@ -172,90 +172,6 @@ key_sendup0(struct rawcb *rp, struct mbuf *m, int prom return error; } -/* XXX this interface should be obsoleted. */ -int -key_sendup(struct socket *so, struct sadb_msg *msg, u_int len, int target) -{ - struct mbuf *m, *n, *mprev; - int tlen; - - /* sanity check */ - if (so == NULL || msg == NULL) - panic("%s: NULL pointer was passed.\n", __func__); - - KEYDBG(KEY_DUMP, - printf("%s: \n", __func__); - kdebug_sadb(msg)); - - /* - * we increment statistics here, just in case we have ENOBUFS - * in this function. - */ - PFKEYSTAT_INC(in_total); - PFKEYSTAT_ADD(in_bytes, len); - PFKEYSTAT_INC(in_msgtype[msg->sadb_msg_type]); - - /* - * Get mbuf chain whenever possible (not clusters), - * to save socket buffer. We'll be generating many SADB_ACQUIRE - * messages to listening key sockets. If we simply allocate clusters, - * sbappendaddr() will raise ENOBUFS due to too little sbspace(). - * sbspace() computes # of actual data bytes AND mbuf region. - * - * TODO: SADB_ACQUIRE filters should be implemented. - */ - tlen = len; - m = mprev = NULL; - while (tlen > 0) { - if (tlen == len) { - MGETHDR(n, M_NOWAIT, MT_DATA); - if (n == NULL) { - PFKEYSTAT_INC(in_nomem); - return ENOBUFS; - } - n->m_len = MHLEN; - } else { - MGET(n, M_NOWAIT, MT_DATA); - if (n == NULL) { - PFKEYSTAT_INC(in_nomem); - return ENOBUFS; - } - n->m_len = MLEN; - } - if (tlen >= MCLBYTES) { /*XXX better threshold? */ - if (!(MCLGET(n, M_NOWAIT))) { - m_free(n); - m_freem(m); - PFKEYSTAT_INC(in_nomem); - return ENOBUFS; - } - n->m_len = MCLBYTES; - } - - if (tlen < n->m_len) - n->m_len = tlen; - n->m_next = NULL; - if (m == NULL) - m = mprev = n; - else { - mprev->m_next = n; - mprev = n; - } - tlen -= n->m_len; - n = NULL; - } - m->m_pkthdr.len = len; - m->m_pkthdr.rcvif = NULL; - m_copyback(m, 0, len, (caddr_t)msg); - - /* avoid duplicated statistics */ - PFKEYSTAT_ADD(in_total, -1); - PFKEYSTAT_ADD(in_bytes, -len); - PFKEYSTAT_ADD(in_msgtype[msg->sadb_msg_type], -1); - - return key_sendup_mbuf(so, m, target); -} - /* so can be NULL if target != KEY_SENDUP_ONE */ int key_sendup_mbuf(struct socket *so, struct mbuf *m, int target) Modified: head/sys/netipsec/keysock.h ============================================================================== --- head/sys/netipsec/keysock.h Sun Mar 11 17:43:04 2018 (r330770) +++ head/sys/netipsec/keysock.h Sun Mar 11 18:03:55 2018 (r330771) @@ -78,12 +78,8 @@ VNET_PCPUSTAT_DECLARE(struct pfkeystat, pfkeystat); VNET_PCPUSTAT_ADD(struct pfkeystat, pfkeystat, name, (val)) #define PFKEYSTAT_INC(name) PFKEYSTAT_ADD(name, 1) -extern int key_output(struct mbuf *m, struct socket *so, ...); -extern int key_usrreq(struct socket *, int, struct mbuf *, - struct mbuf *, struct mbuf *); - -extern int key_sendup(struct socket *, struct sadb_msg *, u_int, int); -extern int key_sendup_mbuf(struct socket *, struct mbuf *, int); +int key_output(struct mbuf *m, struct socket *so, ...); +int key_sendup_mbuf(struct socket *, struct mbuf *, int); #endif /* _KERNEL */ #endif /*_NETIPSEC_KEYSOCK_H_*/ From owner-svn-src-all@freebsd.org Sun Mar 11 18:10:59 2018 Return-Path: Delivered-To: svn-src-all@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 B8659F42BEC; Sun, 11 Mar 2018 18:10:59 +0000 (UTC) (envelope-from ae@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 63BE3770B3; Sun, 11 Mar 2018 18:10:59 +0000 (UTC) (envelope-from ae@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 5EA6A20A65; Sun, 11 Mar 2018 18:10:59 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BIAxQS002375; Sun, 11 Mar 2018 18:10:59 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BIAxTw002374; Sun, 11 Mar 2018 18:10:59 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201803111810.w2BIAxTw002374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 11 Mar 2018 18:10:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330772 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 330772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 18:10:59 -0000 Author: ae Date: Sun Mar 11 18:10:59 2018 New Revision: 330772 URL: https://svnweb.freebsd.org/changeset/base/330772 Log: Check that we have PF_KEY sockets before iterating over all RAW sockets. MFC after: 2 weeks Modified: head/sys/netipsec/keysock.c Modified: head/sys/netipsec/keysock.c ============================================================================== --- head/sys/netipsec/keysock.c Sun Mar 11 18:03:55 2018 (r330771) +++ head/sys/netipsec/keysock.c Sun Mar 11 18:10:59 2018 (r330772) @@ -202,6 +202,11 @@ key_sendup_mbuf(struct socket *so, struct mbuf *m, int PFKEYSTAT_INC(in_msgtype[msg->sadb_msg_type]); } mtx_lock(&rawcb_mtx); + if (V_key_cb.any_count == 0) { + mtx_unlock(&rawcb_mtx); + m_freem(m); + return (0); + } LIST_FOREACH(rp, &V_rawcb_list, list) { if (rp->rcb_proto.sp_family != PF_KEY) From owner-svn-src-all@freebsd.org Sun Mar 11 18:20:51 2018 Return-Path: Delivered-To: svn-src-all@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 1E5ABF43710; Sun, 11 Mar 2018 18:20:51 +0000 (UTC) (envelope-from ian@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 928C677791; Sun, 11 Mar 2018 18:20:50 +0000 (UTC) (envelope-from ian@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 8DA1120BE2; Sun, 11 Mar 2018 18:20:50 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BIKogr008441; Sun, 11 Mar 2018 18:20:50 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BIKood008438; Sun, 11 Mar 2018 18:20:50 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803111820.w2BIKood008438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Mar 2018 18:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330773 - in head/sys: isa x86/isa X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: isa x86/isa X-SVN-Commit-Revision: 330773 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 18:20:51 -0000 Author: ian Date: Sun Mar 11 18:20:49 2018 New Revision: 330773 URL: https://svnweb.freebsd.org/changeset/base/330773 Log: Use separate mutexes for atrtc and i8254 locking. Change all the strange un-function-like RTC_LOCK/UNLOCK macro usage into normal function calls. Since there is no longer any need to handle register access from a debugger context, those function calls can just be regular mutex lock/unlock calls. Requested by: bde Modified: head/sys/isa/rtc.h head/sys/x86/isa/atrtc.c head/sys/x86/isa/clock.c Modified: head/sys/isa/rtc.h ============================================================================== --- head/sys/isa/rtc.h Sun Mar 11 18:10:59 2018 (r330772) +++ head/sys/isa/rtc.h Sun Mar 11 18:20:49 2018 (r330773) @@ -114,7 +114,6 @@ #define RTC_CENTURY 0x32 /* current century */ #ifdef _KERNEL -extern struct mtx clock_lock; extern struct mtx atrtc_time_lock; extern int atrtcclock_disable; int rtcin(int reg); Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Sun Mar 11 18:10:59 2018 (r330772) +++ head/sys/x86/isa/atrtc.c Sun Mar 11 18:20:49 2018 (r330773) @@ -56,15 +56,15 @@ __FBSDID("$FreeBSD$"); #include "clock_if.h" /* - * clock_lock protects low-level access to individual hardware registers. + * atrtc_lock protects low-level access to individual hardware registers. * atrtc_time_lock protects the entire sequence of accessing multiple registers * to read or write the date and time. */ -#define RTC_LOCK do { if (!kdb_active) mtx_lock_spin(&clock_lock); } while (0) -#define RTC_UNLOCK do { if (!kdb_active) mtx_unlock_spin(&clock_lock); } while (0) +static struct mtx atrtc_lock; +MTX_SYSINIT(atrtc_lock_init, &atrtc_lock, "atrtc", MTX_SPIN | MTX_NOPROFILE); struct mtx atrtc_time_lock; -MTX_SYSINIT(atrtc_lock_init, &atrtc_time_lock, "atrtc", MTX_DEF); +MTX_SYSINIT(atrtc_time_lock_init, &atrtc_time_lock, "atrtc", MTX_DEF); int atrtcclock_disable = 0; @@ -108,9 +108,9 @@ rtcin(int reg) { u_char val; - RTC_LOCK; + mtx_lock_spin(&atrtc_lock); val = rtcin_locked(reg); - RTC_UNLOCK; + mtx_unlock_spin(&atrtc_lock); return (val); } @@ -118,9 +118,9 @@ void writertc(int reg, u_char val) { - RTC_LOCK; + mtx_lock_spin(&atrtc_lock); rtcout_locked(reg, val); - RTC_UNLOCK; + mtx_unlock_spin(&atrtc_lock); } static void @@ -321,7 +321,7 @@ atrtc_settime(device_t dev __unused, struct timespec * clock_dbgprint_bcd(dev, CLOCK_DBG_WRITE, &bct); mtx_lock(&atrtc_time_lock); - RTC_LOCK; + mtx_lock_spin(&atrtc_lock); /* Disable RTC updates and interrupts. */ rtcout_locked(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR); @@ -344,7 +344,7 @@ atrtc_settime(device_t dev __unused, struct timespec * rtcout_locked(RTC_STATUSB, rtc_statusb); rtcin_locked(RTC_INTR); - RTC_UNLOCK; + mtx_unlock_spin(&atrtc_lock); mtx_unlock(&atrtc_time_lock); return (0); @@ -371,7 +371,7 @@ atrtc_gettime(device_t dev, struct timespec *ts) mtx_lock(&atrtc_time_lock); while (rtcin(RTC_STATUSA) & RTCSA_TUP) continue; - RTC_LOCK; + mtx_lock_spin(&atrtc_lock); bct.sec = rtcin_locked(RTC_SEC); bct.min = rtcin_locked(RTC_MIN); bct.hour = rtcin_locked(RTC_HRS); @@ -381,7 +381,7 @@ atrtc_gettime(device_t dev, struct timespec *ts) #ifdef USE_RTC_CENTURY bct.year |= rtcin_locked(RTC_CENTURY) << 8; #endif - RTC_UNLOCK; + mtx_unlock_spin(&atrtc_lock); mtx_unlock(&atrtc_time_lock); /* dow is unused in timespec conversion and we have no nsec info. */ bct.dow = 0; Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Sun Mar 11 18:10:59 2018 (r330772) +++ head/sys/x86/isa/clock.c Sun Mar 11 18:20:49 2018 (r330773) @@ -83,7 +83,7 @@ TUNABLE_INT("hw.i8254.freq", &i8254_freq); int i8254_max_count; static int i8254_timecounter = 1; -struct mtx clock_lock; +static struct mtx clock_lock; static struct intsrc *i8254_intsrc; static uint16_t i8254_lastcount; static uint16_t i8254_offset; From owner-svn-src-all@freebsd.org Sun Mar 11 18:37:55 2018 Return-Path: Delivered-To: svn-src-all@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 BB6DEF449C3; Sun, 11 Mar 2018 18:37:55 +0000 (UTC) (envelope-from ae@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 6AFD778337; Sun, 11 Mar 2018 18:37:55 +0000 (UTC) (envelope-from ae@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 6619320F0B; Sun, 11 Mar 2018 18:37:55 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BIbtiK018105; Sun, 11 Mar 2018 18:37:55 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BIbt0M018104; Sun, 11 Mar 2018 18:37:55 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201803111837.w2BIbt0M018104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 11 Mar 2018 18:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330775 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 330775 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 18:37:55 -0000 Author: ae Date: Sun Mar 11 18:37:55 2018 New Revision: 330775 URL: https://svnweb.freebsd.org/changeset/base/330775 Log: Replace panic() with KASSERTs. MFC after: 2 weeks Modified: head/sys/netipsec/keysock.c Modified: head/sys/netipsec/keysock.c ============================================================================== --- head/sys/netipsec/keysock.c Sun Mar 11 18:31:21 2018 (r330774) +++ head/sys/netipsec/keysock.c Sun Mar 11 18:37:55 2018 (r330775) @@ -182,10 +182,9 @@ key_sendup_mbuf(struct socket *so, struct mbuf *m, int struct rawcb *rp; int error = 0; - if (m == NULL) - panic("key_sendup_mbuf: NULL pointer was passed.\n"); - if (so == NULL && target == KEY_SENDUP_ONE) - panic("%s: NULL pointer was passed.\n", __func__); + KASSERT(m != NULL, ("NULL mbuf pointer was passed.")); + KASSERT(so != NULL || target != KEY_SENDUP_ONE, + ("NULL socket pointer was passed.")); PFKEYSTAT_INC(in_total); PFKEYSTAT_ADD(in_bytes, m->m_pkthdr.len); From owner-svn-src-all@freebsd.org Sun Mar 11 18:46:41 2018 Return-Path: Delivered-To: svn-src-all@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 16916F453B0; Sun, 11 Mar 2018 18:46:41 +0000 (UTC) (envelope-from ae@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 B6BCC78969; Sun, 11 Mar 2018 18:46:40 +0000 (UTC) (envelope-from ae@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 A91E321092; Sun, 11 Mar 2018 18:46:40 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BIkebr023051; Sun, 11 Mar 2018 18:46:40 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BIkem5023050; Sun, 11 Mar 2018 18:46:40 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201803111846.w2BIkem5023050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 11 Mar 2018 18:46:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330777 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 330777 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 18:46:41 -0000 Author: ae Date: Sun Mar 11 18:46:40 2018 New Revision: 330777 URL: https://svnweb.freebsd.org/changeset/base/330777 Log: Add KASSERT to check that proper targed was used. MFC after: 2 weeks Modified: head/sys/netipsec/keysock.c Modified: head/sys/netipsec/keysock.c ============================================================================== --- head/sys/netipsec/keysock.c Sun Mar 11 18:43:36 2018 (r330776) +++ head/sys/netipsec/keysock.c Sun Mar 11 18:46:40 2018 (r330777) @@ -185,6 +185,8 @@ key_sendup_mbuf(struct socket *so, struct mbuf *m, int KASSERT(m != NULL, ("NULL mbuf pointer was passed.")); KASSERT(so != NULL || target != KEY_SENDUP_ONE, ("NULL socket pointer was passed.")); + KASSERT(target == KEY_SENDUP_ONE || target == KEY_SENDUP_ALL || + target == KEY_SENDUP_REGISTERED, ("Wrong target %d", target)); PFKEYSTAT_INC(in_total); PFKEYSTAT_ADD(in_bytes, m->m_pkthdr.len); From owner-svn-src-all@freebsd.org Sun Mar 11 18:54:46 2018 Return-Path: Delivered-To: svn-src-all@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 F3325F45CE9; Sun, 11 Mar 2018 18:54:45 +0000 (UTC) (envelope-from ian@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 925AC78FD3; Sun, 11 Mar 2018 18:54:45 +0000 (UTC) (envelope-from ian@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 891082121A; Sun, 11 Mar 2018 18:54:45 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BIsjvI028230; Sun, 11 Mar 2018 18:54:45 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BIsjsj028229; Sun, 11 Mar 2018 18:54:45 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803111854.w2BIsjsj028229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Mar 2018 18:54:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330778 - head/sys/x86/isa X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/x86/isa X-SVN-Commit-Revision: 330778 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 18:54:46 -0000 Author: ian Date: Sun Mar 11 18:54:45 2018 New Revision: 330778 URL: https://svnweb.freebsd.org/changeset/base/330778 Log: Everywhere that multiple registers are accessed in sequence, lock/unlock just once around the whole group of accesses. Modified: head/sys/x86/isa/atrtc.c Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Sun Mar 11 18:46:40 2018 (r330777) +++ head/sys/x86/isa/atrtc.c Sun Mar 11 18:54:45 2018 (r330778) @@ -127,8 +127,10 @@ static void atrtc_start(void) { - writertc(RTC_STATUSA, rtc_statusa); - writertc(RTC_STATUSB, RTCSB_24HR); + mtx_lock_spin(&atrtc_lock); + rtcout_locked(RTC_STATUSA, rtc_statusa); + rtcout_locked(RTC_STATUSB, RTCSB_24HR); + mtx_unlock_spin(&atrtc_lock); } static void @@ -144,8 +146,10 @@ atrtc_enable_intr(void) { rtc_statusb |= RTCSB_PINTR; - writertc(RTC_STATUSB, rtc_statusb); - rtcin(RTC_INTR); + mtx_lock_spin(&atrtc_lock); + rtcout_locked(RTC_STATUSB, rtc_statusb); + rtcin_locked(RTC_INTR); + mtx_unlock_spin(&atrtc_lock); } static void @@ -153,8 +157,10 @@ atrtc_disable_intr(void) { rtc_statusb &= ~RTCSB_PINTR; - writertc(RTC_STATUSB, rtc_statusb); - rtcin(RTC_INTR); + mtx_lock_spin(&atrtc_lock); + rtcout_locked(RTC_STATUSB, rtc_statusb); + rtcin_locked(RTC_INTR); + mtx_unlock_spin(&atrtc_lock); } void @@ -162,11 +168,13 @@ atrtc_restore(void) { /* Restore all of the RTC's "status" (actually, control) registers. */ - rtcin(RTC_STATUSA); /* dummy to get rtc_reg set */ - writertc(RTC_STATUSB, RTCSB_24HR); - writertc(RTC_STATUSA, rtc_statusa); - writertc(RTC_STATUSB, rtc_statusb); - rtcin(RTC_INTR); + mtx_lock_spin(&atrtc_lock); + rtcin_locked(RTC_STATUSA); /* dummy to get rtc_reg set */ + rtcout_locked(RTC_STATUSB, RTCSB_24HR); + rtcout_locked(RTC_STATUSA, rtc_statusa); + rtcout_locked(RTC_STATUSB, rtc_statusb); + rtcin_locked(RTC_INTR); + mtx_unlock_spin(&atrtc_lock); } /********************************************************************** From owner-svn-src-all@freebsd.org Sun Mar 11 19:14:01 2018 Return-Path: Delivered-To: svn-src-all@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 CB99EF4745E; Sun, 11 Mar 2018 19:14:01 +0000 (UTC) (envelope-from ae@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 8236979CA1; Sun, 11 Mar 2018 19:14:01 +0000 (UTC) (envelope-from ae@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 7D12021550; Sun, 11 Mar 2018 19:14:01 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BJE1TP037752; Sun, 11 Mar 2018 19:14:01 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BJE1XA037751; Sun, 11 Mar 2018 19:14:01 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201803111914.w2BJE1XA037751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 11 Mar 2018 19:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330779 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 330779 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 19:14:02 -0000 Author: ae Date: Sun Mar 11 19:14:01 2018 New Revision: 330779 URL: https://svnweb.freebsd.org/changeset/base/330779 Log: Rework key_sendup_mbuf() a bit: o count in_nomem counter when we have failed to allocate mbuf for promisc socket; o count in_msgtarget counter when we have secussfully sent data to socket; o Since we are sending messages in a loop, returning error on first fail interrupts the loop, and all remaining sockets will not receive this message. So, do not return error when we have failed to send data to ALL or REGISTERED target. Return error only for KEY_SENDUP_ONE case. Now, when some socket has overfilled its receive buffer, this will not break other sockets. MFC after: 2 weeks Modified: head/sys/netipsec/keysock.c Modified: head/sys/netipsec/keysock.c ============================================================================== --- head/sys/netipsec/keysock.c Sun Mar 11 18:54:45 2018 (r330778) +++ head/sys/netipsec/keysock.c Sun Mar 11 19:14:01 2018 (r330779) @@ -178,7 +178,6 @@ key_sendup_mbuf(struct socket *so, struct mbuf *m, int { struct mbuf *n; struct keycb *kp; - int sendup; struct rawcb *rp; int error = 0; @@ -217,69 +216,50 @@ key_sendup_mbuf(struct socket *so, struct mbuf *m, int continue; } - kp = (struct keycb *)rp; - /* * If you are in promiscuous mode, and when you get broadcasted * reply, you'll get two PF_KEY messages. * (based on pf_key@inner.net message on 14 Oct 1998) */ - if (((struct keycb *)rp)->kp_promisc) { - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) != NULL) { - (void)key_sendup0(rp, n, 1); - n = NULL; - } + kp = (struct keycb *)rp; + if (kp->kp_promisc) { + n = m_copym(m, 0, M_COPYALL, M_NOWAIT); + if (n != NULL) + key_sendup0(rp, n, 1); + else + PFKEYSTAT_INC(in_nomem); } /* the exact target will be processed later */ if (so && sotorawcb(so) == rp) continue; - sendup = 0; - switch (target) { - case KEY_SENDUP_ONE: - /* the statement has no effect */ - if (so && sotorawcb(so) == rp) - sendup++; - break; - case KEY_SENDUP_ALL: - sendup++; - break; - case KEY_SENDUP_REGISTERED: - if (kp->kp_registered) - sendup++; - break; - } - PFKEYSTAT_INC(in_msgtarget[target]); - - if (!sendup) + if (target == KEY_SENDUP_ONE || ( + target == KEY_SENDUP_REGISTERED && kp->kp_registered == 0)) continue; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { - m_freem(m); + /* KEY_SENDUP_ALL + KEY_SENDUP_REGISTERED */ + n = m_copym(m, 0, M_COPYALL, M_NOWAIT); + if (n == NULL) { PFKEYSTAT_INC(in_nomem); - mtx_unlock(&rawcb_mtx); - return ENOBUFS; + /* Try send to another socket */ + continue; } - if ((error = key_sendup0(rp, n, 0)) != 0) { - m_freem(m); - mtx_unlock(&rawcb_mtx); - return error; - } - - n = NULL; + if (key_sendup0(rp, n, 0) == 0) + PFKEYSTAT_INC(in_msgtarget[target]); } - if (so) { + if (so) { /* KEY_SENDUP_ONE */ error = key_sendup0(sotorawcb(so), m, 0); - m = NULL; + if (error == 0) + PFKEYSTAT_INC(in_msgtarget[KEY_SENDUP_ONE]); } else { error = 0; m_freem(m); } mtx_unlock(&rawcb_mtx); - return error; + return (error); } /* From owner-svn-src-all@freebsd.org Sun Mar 11 19:22:59 2018 Return-Path: Delivered-To: svn-src-all@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 817D8F47F61; Sun, 11 Mar 2018 19:22:59 +0000 (UTC) (envelope-from ian@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 54B387A2D4; Sun, 11 Mar 2018 19:22:59 +0000 (UTC) (envelope-from ian@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 4FB2F216D5; Sun, 11 Mar 2018 19:22:59 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BJMxaC043087; Sun, 11 Mar 2018 19:22:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BJMwr8043084; Sun, 11 Mar 2018 19:22:58 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803111922.w2BJMwr8043084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Mar 2018 19:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330780 - in head/sys: amd64/include isa x86/isa X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: amd64/include isa x86/isa X-SVN-Commit-Revision: 330780 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 19:23:00 -0000 Author: ian Date: Sun Mar 11 19:22:58 2018 New Revision: 330780 URL: https://svnweb.freebsd.org/changeset/base/330780 Log: Eliminate atrtc_time_lock, and use atrtc_lock for efirtc locking. Modified: head/sys/amd64/include/efi.h head/sys/isa/rtc.h head/sys/x86/isa/atrtc.c Modified: head/sys/amd64/include/efi.h ============================================================================== --- head/sys/amd64/include/efi.h Sun Mar 11 19:14:01 2018 (r330779) +++ head/sys/amd64/include/efi.h Sun Mar 11 19:22:58 2018 (r330780) @@ -48,9 +48,9 @@ #ifdef _KERNEL #include -#define EFI_TIME_LOCK() mtx_lock(&atrtc_time_lock); -#define EFI_TIME_UNLOCK() mtx_unlock(&atrtc_time_lock); -#define EFI_TIME_OWNED() mtx_assert(&atrtc_time_lock, MA_OWNED); +#define EFI_TIME_LOCK() mtx_lock_spin(&atrtc_lock); +#define EFI_TIME_UNLOCK() mtx_unlock_spin(&atrtc_lock); +#define EFI_TIME_OWNED() mtx_assert(&atrtc_lock, MA_OWNED); #endif #endif /* __AMD64_INCLUDE_EFI_H_ */ Modified: head/sys/isa/rtc.h ============================================================================== --- head/sys/isa/rtc.h Sun Mar 11 19:14:01 2018 (r330779) +++ head/sys/isa/rtc.h Sun Mar 11 19:22:58 2018 (r330780) @@ -114,7 +114,7 @@ #define RTC_CENTURY 0x32 /* current century */ #ifdef _KERNEL -extern struct mtx atrtc_time_lock; +extern struct mtx atrtc_lock; extern int atrtcclock_disable; int rtcin(int reg); void atrtc_restore(void); Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Sun Mar 11 19:14:01 2018 (r330779) +++ head/sys/x86/isa/atrtc.c Sun Mar 11 19:22:58 2018 (r330780) @@ -56,16 +56,15 @@ __FBSDID("$FreeBSD$"); #include "clock_if.h" /* - * atrtc_lock protects low-level access to individual hardware registers. - * atrtc_time_lock protects the entire sequence of accessing multiple registers - * to read or write the date and time. + * atrtc_lock protects access to the RTC ioports, which are accessed by this + * driver, the nvram(4) driver (via rtcin()/writertc() calls), and the rtc code + * in efi runtime services. The efirt wrapper code directly locks atrtc lock + * using the EFI_TIME_LOCK/UNLOCK() macros which are defined to use this mutex + * on x86 platforms. */ -static struct mtx atrtc_lock; +struct mtx atrtc_lock; MTX_SYSINIT(atrtc_lock_init, &atrtc_lock, "atrtc", MTX_SPIN | MTX_NOPROFILE); -struct mtx atrtc_time_lock; -MTX_SYSINIT(atrtc_time_lock_init, &atrtc_time_lock, "atrtc", MTX_DEF); - int atrtcclock_disable = 0; static int rtc_reg = -1; @@ -328,7 +327,6 @@ atrtc_settime(device_t dev __unused, struct timespec * clock_ts_to_bcd(ts, &bct, false); clock_dbgprint_bcd(dev, CLOCK_DBG_WRITE, &bct); - mtx_lock(&atrtc_time_lock); mtx_lock_spin(&atrtc_lock); /* Disable RTC updates and interrupts. */ @@ -353,7 +351,6 @@ atrtc_settime(device_t dev __unused, struct timespec * rtcin_locked(RTC_INTR); mtx_unlock_spin(&atrtc_lock); - mtx_unlock(&atrtc_time_lock); return (0); } @@ -376,7 +373,6 @@ atrtc_gettime(device_t dev, struct timespec *ts) * to make sure that no more than 240us pass after we start reading, * and try again if so. */ - mtx_lock(&atrtc_time_lock); while (rtcin(RTC_STATUSA) & RTCSA_TUP) continue; mtx_lock_spin(&atrtc_lock); @@ -390,7 +386,6 @@ atrtc_gettime(device_t dev, struct timespec *ts) bct.year |= rtcin_locked(RTC_CENTURY) << 8; #endif mtx_unlock_spin(&atrtc_lock); - mtx_unlock(&atrtc_time_lock); /* dow is unused in timespec conversion and we have no nsec info. */ bct.dow = 0; bct.nsec = 0; From owner-svn-src-all@freebsd.org Sun Mar 11 19:26:35 2018 Return-Path: Delivered-To: svn-src-all@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 AFC10F483FC; Sun, 11 Mar 2018 19:26:35 +0000 (UTC) (envelope-from ae@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 609827A51D; Sun, 11 Mar 2018 19:26:35 +0000 (UTC) (envelope-from ae@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 40D22216D8; Sun, 11 Mar 2018 19:26:35 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BJQZnk043245; Sun, 11 Mar 2018 19:26:35 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BJQZ0g043244; Sun, 11 Mar 2018 19:26:35 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201803111926.w2BJQZ0g043244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sun, 11 Mar 2018 19:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330781 - head/lib/libipsec X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/lib/libipsec X-SVN-Commit-Revision: 330781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 19:26:35 -0000 Author: ae Date: Sun Mar 11 19:26:34 2018 New Revision: 330781 URL: https://svnweb.freebsd.org/changeset/base/330781 Log: Update pfkey_open() function to set socket's write buffer size to 128k and receive buffer size to 2MB. In case if system has bigger default values, do not lower them. This should partially solve the problem, when setkey(8) returns EAGAIN error on systems with many SAs or SPs. PR: 88336 Obtained from: NetBSD/ipsec-tools MFC after: 2 weeks Modified: head/lib/libipsec/pfkey.c Modified: head/lib/libipsec/pfkey.c ============================================================================== --- head/lib/libipsec/pfkey.c Sun Mar 11 19:22:58 2018 (r330780) +++ head/lib/libipsec/pfkey.c Sun Mar 11 19:26:34 2018 (r330781) @@ -1595,10 +1595,12 @@ pfkey_send_x5(so, type, spid) * others : success and return value of socket. */ int -pfkey_open() +pfkey_open(void) { int so; - const int bufsiz = 128 * 1024; /*is 128K enough?*/ + int bufsiz_current, bufsiz_wanted; + int ret; + socklen_t len; if ((so = socket(PF_KEY, SOCK_RAW, PF_KEY_V2)) < 0) { __ipsec_set_strerror(strerror(errno)); @@ -1609,8 +1611,28 @@ pfkey_open() * This is a temporary workaround for KAME PR 154. * Don't really care even if it fails. */ - (void)setsockopt(so, SOL_SOCKET, SO_SNDBUF, &bufsiz, sizeof(bufsiz)); - (void)setsockopt(so, SOL_SOCKET, SO_RCVBUF, &bufsiz, sizeof(bufsiz)); + /* Try to have 128k. If we have more, do not lower it. */ + bufsiz_wanted = 128 * 1024; + len = sizeof(bufsiz_current); + ret = getsockopt(so, SOL_SOCKET, SO_SNDBUF, + &bufsiz_current, &len); + if ((ret < 0) || (bufsiz_current < bufsiz_wanted)) + (void)setsockopt(so, SOL_SOCKET, SO_SNDBUF, + &bufsiz_wanted, sizeof(bufsiz_wanted)); + + /* Try to have have at least 2MB. If we have more, do not lower it. */ + bufsiz_wanted = 2 * 1024 * 1024; + len = sizeof(bufsiz_current); + ret = getsockopt(so, SOL_SOCKET, SO_RCVBUF, + &bufsiz_current, &len); + if (ret < 0) + bufsiz_current = 128 * 1024; + + for (; bufsiz_wanted > bufsiz_current; bufsiz_wanted /= 2) { + if (setsockopt(so, SOL_SOCKET, SO_RCVBUF, + &bufsiz_wanted, sizeof(bufsiz_wanted)) == 0) + break; + } __ipsec_errcode = EIPSEC_NO_ERROR; return so; From owner-svn-src-all@freebsd.org Sun Mar 11 19:30:03 2018 Return-Path: Delivered-To: svn-src-all@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 E0FC2F4888A for ; Sun, 11 Mar 2018 19:30:02 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FB9D7A7A3 for ; Sun, 11 Mar 2018 19:30:02 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x22c.google.com with SMTP id x17so56730ywj.1 for ; Sun, 11 Mar 2018 12:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=aTJ4C+XyjfbBgkNzuXOJQj9yIXVVaRnxww2dId0D6/U=; b=YY3mhFt1VqE2uKABArN6GbxxFMAuPTre96EOrzVONis0PkgO4AaHGI3A8YlQyA/Oxu UNIjZ1AXoitX6FAB8/ZJkKoCTXQsz3lWkDPqOEaqMPE1DnSgt45sByAm4SmDIZh6cR4D M1GKEx44AvBwMUFnG1o3UFghVUgv9Xf0qRbp0= 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=aTJ4C+XyjfbBgkNzuXOJQj9yIXVVaRnxww2dId0D6/U=; b=DXLkSMfHeAjUYOvIVN5wP37QDtvlahvy4Ljlyeu+nyTCuUVTWxEUCVKDLEDS58RMo3 X40C4jyYAvIj6TnzOzhhm/EZ8YDvSOA8NnSMRIgS3owufqy0yxI5QgEmiEyHYsgdCBcM U19SxNWy4bX0o9nnXSkm0djYNaXNhSDlKLzjyAIopnYq2GVc1oyw34V5dnX+InN7iHQ4 1ZRr6Z0iD61Dk3G/TmCt8IHKxnQU4A0l3kWCPRCdskFwQQ0pDl6JGUjCmpuMLWDJimMW Fgh1271LJA5ubpP69/MiJEeKa4UtS51SNW0OUEjG31OXJ4Ak5hgD4Bb32MfhuMZTsIRp 2MoQ== X-Gm-Message-State: AElRT7GDNongvkgBkKY19cGv0DkRHg+liwGkvY+tFo6cbfNTaSgISbAq wf8BHSArj7naReE28sY8n/3XHa/OnAZPkYJTUGAX0Q== X-Google-Smtp-Source: AG47ELt/7rGieyc/Fnfd5WlAKhpSJ0oh9m4sy3UVeZjFR/xRxK9MnP6X/p15gSUvhElKCCphmKMP6EB1Hj6LYP8pzBU= X-Received: by 10.129.159.132 with SMTP id w126mr11752ywg.141.1520796601499; Sun, 11 Mar 2018 12:30:01 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Sun, 11 Mar 2018 12:29:31 -0700 (PDT) In-Reply-To: <201803111753.w2BHrk7R074877@pdx.rh.CN85.dnsmgr.net> References: <201803111753.w2BHrk7R074877@pdx.rh.CN85.dnsmgr.net> From: Eitan Adler Date: Sun, 11 Mar 2018 12:29:31 -0700 X-Google-Sender-Auth: _k74tZGtUm6BzWc-OGlkUioHFDI Message-ID: Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: rgrimes@freebsd.org Cc: =?UTF-8?B?UGludMOpciwgT2xpdsOpcg==?= , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org, John Baldwin Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 19:30:03 -0000 On 11 March 2018 at 10:53, Rodney W. Grimes wrote: >> Sorry, -ENOTIME for 8265 this weekend, but it working fine (and much more >> stable) with 7260. > > Thanks for keeping us informed. > > I am uncertain as to the state of iwm in stable/11, should the > Intel 8565ac work, or not? I have exchanged an additional > round of email with the volunteer tester, he says he is > running an unmodified stable/11, now trying to find out if he > is updating that regular or not. Hopefully we can have some > test results soon. There has been a lot of discussion on this thread and I did not have time to digest it all. That being said - stable works for my hardware - there is one known issue that I have not yet resolved. I originally committed to resolving it this past week, but held off due to the long discussion here - I will take full responsibility for ensuring that anything working before my changes continues to work on stable - however, I will need reports of people who are able to help bisect to the broken changes -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@freebsd.org Sun Mar 11 19:46:42 2018 Return-Path: Delivered-To: svn-src-all@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 7602DF49B93; Sun, 11 Mar 2018 19:46:41 +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 0FADD7B51D; Sun, 11 Mar 2018 19:46:39 +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 w2BJkaUX075427; Sun, 11 Mar 2018 12:46:36 -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 w2BJkZBr075426; Sun, 11 Mar 2018 12:46:36 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803111946.w2BJkZBr075426@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 In-Reply-To: To: Eitan Adler Date: Sun, 11 Mar 2018 12:46:35 -0700 (PDT) CC: rgrimes@freebsd.org, =?UTF-8?Q?Pint=C3=A9r=2C_Oliv=C3=A9r?= , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org, John Baldwin 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 19:46:42 -0000 > On 11 March 2018 at 10:53, Rodney W. Grimes > wrote: > > >> Sorry, -ENOTIME for 8265 this weekend, but it working fine (and much more > >> stable) with 7260. > > > > Thanks for keeping us informed. > > > > I am uncertain as to the state of iwm in stable/11, should the > > Intel 8565ac work, or not? I have exchanged an additional > > round of email with the volunteer tester, he says he is > > running an unmodified stable/11, now trying to find out if he > > is updating that regular or not. Hopefully we can have some > > test results soon. > > There has been a lot of discussion on this thread and I did not have > time to digest it all. > > That being said > > - stable works for my hardware > - there is one known issue that I have not yet resolved. I originally > committed to resolving it this past week, but held off due to the long > discussion here > - I will take full responsibility for ensuring that anything working > before my changes continues to work on stable > - however, I will need reports of people who are able to help bisect > to the broken changes Simple question you could answer before I have this guy do a bunch of work, *should* the Intel 8565AC work in stable/11 now? There is a specific PR and commit to ^/head that adds this functionality, did that get merged and stay, or ? Thanks, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Sun Mar 11 19:52:45 2018 Return-Path: Delivered-To: svn-src-all@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 5165FF4A339; Sun, 11 Mar 2018 19:52: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 8DEFD7BBD8; Sun, 11 Mar 2018 19:52: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 w2BJqgiA075491; Sun, 11 Mar 2018 12:52:42 -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 w2BJqgqO075490; Sun, 11 Mar 2018 12:52:42 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803111952.w2BJqgqO075490@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 In-Reply-To: <201803111946.w2BJkZBr075426@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org Date: Sun, 11 Mar 2018 12:52:42 -0700 (PDT) CC: Eitan Adler , =?UTF-8?Q?Pint=C3=A9r=2C_Oliv=C3=A9r?= , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers , svn-src-stable-11@freebsd.org, John Baldwin 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 19:52:45 -0000 > > On 11 March 2018 at 10:53, Rodney W. Grimes > > wrote: > > > > >> Sorry, -ENOTIME for 8265 this weekend, but it working fine (and much more > > >> stable) with 7260. > > > > > > Thanks for keeping us informed. > > > > > > I am uncertain as to the state of iwm in stable/11, should the > > > Intel 8565ac work, or not? I have exchanged an additional > > > round of email with the volunteer tester, he says he is > > > running an unmodified stable/11, now trying to find out if he > > > is updating that regular or not. Hopefully we can have some > > > test results soon. > > > > There has been a lot of discussion on this thread and I did not have > > time to digest it all. > > > > That being said > > > > - stable works for my hardware > > - there is one known issue that I have not yet resolved. I originally > > committed to resolving it this past week, but held off due to the long > > discussion here > > - I will take full responsibility for ensuring that anything working > > before my changes continues to work on stable > > - however, I will need reports of people who are able to help bisect > > to the broken changes > > Simple question you could answer before I have this guy do a bunch > of work, *should* the Intel 8565AC work in stable/11 now? There > is a specific PR and commit to ^/head that adds this functionality, > did that get merged and stay, or ? Specifically: from bug 220229 and commit r324434 -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Sun Mar 11 19:56:08 2018 Return-Path: Delivered-To: svn-src-all@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 9C7E5F4A61D; Sun, 11 Mar 2018 19:56:08 +0000 (UTC) (envelope-from ian@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 4FC3C7BD88; Sun, 11 Mar 2018 19:56:08 +0000 (UTC) (envelope-from ian@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 4AB2621B9E; Sun, 11 Mar 2018 19:56:08 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BJu8is058397; Sun, 11 Mar 2018 19:56:08 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BJu8vt058396; Sun, 11 Mar 2018 19:56:08 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803111956.w2BJu8vt058396@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Mar 2018 19:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330782 - head/sys/x86/isa X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/x86/isa X-SVN-Commit-Revision: 330782 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 19:56:08 -0000 Author: ian Date: Sun Mar 11 19:56:07 2018 New Revision: 330782 URL: https://svnweb.freebsd.org/changeset/base/330782 Log: Remove MTX_NOPROFILE from atrtc_lock, it was inappropriately copy/pasted from the i8254 driver when I created separate mutexes for each. The i8254 driver could be the active timecounter, leading to recursion during mutex profiling, but the atrtc driver cannot be a timecounter, so it isn't needed. Modified: head/sys/x86/isa/atrtc.c Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Sun Mar 11 19:26:34 2018 (r330781) +++ head/sys/x86/isa/atrtc.c Sun Mar 11 19:56:07 2018 (r330782) @@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$"); * on x86 platforms. */ struct mtx atrtc_lock; -MTX_SYSINIT(atrtc_lock_init, &atrtc_lock, "atrtc", MTX_SPIN | MTX_NOPROFILE); +MTX_SYSINIT(atrtc_lock_init, &atrtc_lock, "atrtc", MTX_SPIN); int atrtcclock_disable = 0; From owner-svn-src-all@freebsd.org Sun Mar 11 19:58:12 2018 Return-Path: Delivered-To: svn-src-all@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 A5E9FF4A868; Sun, 11 Mar 2018 19:58:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13EF77BF80; Sun, 11 Mar 2018 19:58:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w2BJw0Rl066292 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 11 Mar 2018 21:58:04 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w2BJw0Rl066292 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w2BJw00A066291; Sun, 11 Mar 2018 21:58:00 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 11 Mar 2018 21:58:00 +0200 From: Konstantin Belousov To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330780 - in head/sys: amd64/include isa x86/isa Message-ID: <20180311195800.GC76926@kib.kiev.ua> References: <201803111922.w2BJMwr8043084@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201803111922.w2BJMwr8043084@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 19:58:12 -0000 On Sun, Mar 11, 2018 at 07:22:58PM +0000, Ian Lepore wrote: > Author: ian > Date: Sun Mar 11 19:22:58 2018 > New Revision: 330780 > URL: https://svnweb.freebsd.org/changeset/base/330780 > > Log: > Eliminate atrtc_time_lock, and use atrtc_lock for efirtc locking. > > Modified: > head/sys/amd64/include/efi.h > head/sys/isa/rtc.h > head/sys/x86/isa/atrtc.c > > Modified: head/sys/amd64/include/efi.h > ============================================================================== > --- head/sys/amd64/include/efi.h Sun Mar 11 19:14:01 2018 (r330779) > +++ head/sys/amd64/include/efi.h Sun Mar 11 19:22:58 2018 (r330780) > @@ -48,9 +48,9 @@ > #ifdef _KERNEL > #include > > -#define EFI_TIME_LOCK() mtx_lock(&atrtc_time_lock); > -#define EFI_TIME_UNLOCK() mtx_unlock(&atrtc_time_lock); > -#define EFI_TIME_OWNED() mtx_assert(&atrtc_time_lock, MA_OWNED); > +#define EFI_TIME_LOCK() mtx_lock_spin(&atrtc_lock); > +#define EFI_TIME_UNLOCK() mtx_unlock_spin(&atrtc_lock); > +#define EFI_TIME_OWNED() mtx_assert(&atrtc_lock, MA_OWNED); I do not understand how this can work. You changed EFI_TIME_LOCK() to spinlock. As result, the spinlock is taken before efi_enter() is called. efi_enter() locks the pmap and efi_lock, both of which are sleepable mutexes. Also, arch efirt code is allowed to take arch-specific sleepable mutexes and perhaps some spinlocks (but currently does not). The first context switch when either of the listed sleepable mutexes are contested and the thread is taken off CPU would panic. I suspect that some invariants check might fire earlier. From owner-svn-src-all@freebsd.org Sun Mar 11 19:58:50 2018 Return-Path: Delivered-To: svn-src-all@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 E7558F4A936 for ; Sun, 11 Mar 2018 19:58:49 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65C667C0DB for ; Sun, 11 Mar 2018 19:58:49 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 551ef653-2566-11e8-b951-f99fef315fd9 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 551ef653-2566-11e8-b951-f99fef315fd9; Sun, 11 Mar 2018 19:56:48 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w2BJvcQZ014192; Sun, 11 Mar 2018 13:57:38 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1520798258.84937.147.camel@freebsd.org> Subject: Re: svn commit: r330782 - head/sys/x86/isa From: Ian Lepore To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 11 Mar 2018 13:57:38 -0600 In-Reply-To: <201803111956.w2BJu8vt058396@repo.freebsd.org> References: <201803111956.w2BJu8vt058396@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 19:58:50 -0000 On Sun, 2018-03-11 at 19:56 +0000, Ian Lepore wrote: > Author: ian > Date: Sun Mar 11 19:56:07 2018 > New Revision: 330782 > URL: https://svnweb.freebsd.org/changeset/base/330782 > > Log: >   Remove MTX_NOPROFILE from atrtc_lock, it was inappropriately copy/pasted >   from the i8254 driver when I created separate mutexes for each.  The i8254 >   driver could be the active timecounter, leading to recursion during mutex >   profiling, but the atrtc driver cannot be a timecounter, so it isn't needed. > > Modified: >   head/sys/x86/isa/atrtc.c Oops, should have included: Pointed out by: bde. -- Ian From owner-svn-src-all@freebsd.org Sun Mar 11 20:13:16 2018 Return-Path: Delivered-To: svn-src-all@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 BFB4FF4B8A3; Sun, 11 Mar 2018 20:13:16 +0000 (UTC) (envelope-from ian@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 61D2C7CBD4; Sun, 11 Mar 2018 20:13:16 +0000 (UTC) (envelope-from ian@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 592F721EB3; Sun, 11 Mar 2018 20:13:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2BKDGNr068441; Sun, 11 Mar 2018 20:13:16 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BKDGJW068438; Sun, 11 Mar 2018 20:13:16 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803112013.w2BKDGJW068438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Mar 2018 20:13:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330783 - in head/sys: amd64/include isa x86/isa X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: amd64/include isa x86/isa X-SVN-Commit-Revision: 330783 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 20:13:17 -0000 Author: ian Date: Sun Mar 11 20:13:15 2018 New Revision: 330783 URL: https://svnweb.freebsd.org/changeset/base/330783 Log: Revert r330780, it was improperly tested and results in taking a spin mutex before acquiring sleep mutexes. Reported by: kib@ Modified: head/sys/amd64/include/efi.h head/sys/isa/rtc.h head/sys/x86/isa/atrtc.c Modified: head/sys/amd64/include/efi.h ============================================================================== --- head/sys/amd64/include/efi.h Sun Mar 11 19:56:07 2018 (r330782) +++ head/sys/amd64/include/efi.h Sun Mar 11 20:13:15 2018 (r330783) @@ -48,9 +48,9 @@ #ifdef _KERNEL #include -#define EFI_TIME_LOCK() mtx_lock_spin(&atrtc_lock); -#define EFI_TIME_UNLOCK() mtx_unlock_spin(&atrtc_lock); -#define EFI_TIME_OWNED() mtx_assert(&atrtc_lock, MA_OWNED); +#define EFI_TIME_LOCK() mtx_lock(&atrtc_time_lock); +#define EFI_TIME_UNLOCK() mtx_unlock(&atrtc_time_lock); +#define EFI_TIME_OWNED() mtx_assert(&atrtc_time_lock, MA_OWNED); #endif #endif /* __AMD64_INCLUDE_EFI_H_ */ Modified: head/sys/isa/rtc.h ============================================================================== --- head/sys/isa/rtc.h Sun Mar 11 19:56:07 2018 (r330782) +++ head/sys/isa/rtc.h Sun Mar 11 20:13:15 2018 (r330783) @@ -114,7 +114,7 @@ #define RTC_CENTURY 0x32 /* current century */ #ifdef _KERNEL -extern struct mtx atrtc_lock; +extern struct mtx atrtc_time_lock; extern int atrtcclock_disable; int rtcin(int reg); void atrtc_restore(void); Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Sun Mar 11 19:56:07 2018 (r330782) +++ head/sys/x86/isa/atrtc.c Sun Mar 11 20:13:15 2018 (r330783) @@ -56,15 +56,16 @@ __FBSDID("$FreeBSD$"); #include "clock_if.h" /* - * atrtc_lock protects access to the RTC ioports, which are accessed by this - * driver, the nvram(4) driver (via rtcin()/writertc() calls), and the rtc code - * in efi runtime services. The efirt wrapper code directly locks atrtc lock - * using the EFI_TIME_LOCK/UNLOCK() macros which are defined to use this mutex - * on x86 platforms. + * atrtc_lock protects low-level access to individual hardware registers. + * atrtc_time_lock protects the entire sequence of accessing multiple registers + * to read or write the date and time. */ -struct mtx atrtc_lock; +static struct mtx atrtc_lock; MTX_SYSINIT(atrtc_lock_init, &atrtc_lock, "atrtc", MTX_SPIN); +struct mtx atrtc_time_lock; +MTX_SYSINIT(atrtc_time_lock_init, &atrtc_time_lock, "atrtc", MTX_DEF); + int atrtcclock_disable = 0; static int rtc_reg = -1; @@ -327,6 +328,7 @@ atrtc_settime(device_t dev __unused, struct timespec * clock_ts_to_bcd(ts, &bct, false); clock_dbgprint_bcd(dev, CLOCK_DBG_WRITE, &bct); + mtx_lock(&atrtc_time_lock); mtx_lock_spin(&atrtc_lock); /* Disable RTC updates and interrupts. */ @@ -351,6 +353,7 @@ atrtc_settime(device_t dev __unused, struct timespec * rtcin_locked(RTC_INTR); mtx_unlock_spin(&atrtc_lock); + mtx_unlock(&atrtc_time_lock); return (0); } @@ -373,6 +376,7 @@ atrtc_gettime(device_t dev, struct timespec *ts) * to make sure that no more than 240us pass after we start reading, * and try again if so. */ + mtx_lock(&atrtc_time_lock); while (rtcin(RTC_STATUSA) & RTCSA_TUP) continue; mtx_lock_spin(&atrtc_lock); @@ -386,6 +390,7 @@ atrtc_gettime(device_t dev, struct timespec *ts) bct.year |= rtcin_locked(RTC_CENTURY) << 8; #endif mtx_unlock_spin(&atrtc_lock); + mtx_unlock(&atrtc_time_lock); /* dow is unused in timespec conversion and we have no nsec info. */ bct.dow = 0; bct.nsec = 0; From owner-svn-src-all@freebsd.org Sun Mar 11 20:20:44 2018 Return-Path: Delivered-To: svn-src-all@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 08623F4BE6C for ; Sun, 11 Mar 2018 20:20:44 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 835D27CE9C for ; Sun, 11 Mar 2018 20:20:43 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 8c7d885f-2569-11e8-b951-f99fef315fd9 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 8c7d885f-2569-11e8-b951-f99fef315fd9; Sun, 11 Mar 2018 20:19:49 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w2BKKd4A014277; Sun, 11 Mar 2018 14:20:40 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1520799639.84937.154.camel@freebsd.org> Subject: Re: svn commit: r330780 - in head/sys: amd64/include isa x86/isa From: Ian Lepore To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 11 Mar 2018 14:20:39 -0600 In-Reply-To: <20180311195800.GC76926@kib.kiev.ua> References: <201803111922.w2BJMwr8043084@repo.freebsd.org> <20180311195800.GC76926@kib.kiev.ua> 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 20:20:44 -0000 On Sun, 2018-03-11 at 21:58 +0200, Konstantin Belousov wrote: > On Sun, Mar 11, 2018 at 07:22:58PM +0000, Ian Lepore wrote: > > > > Author: ian > > Date: Sun Mar 11 19:22:58 2018 > > New Revision: 330780 > > URL: https://svnweb.freebsd.org/changeset/base/330780 > > > > Log: > >   Eliminate atrtc_time_lock, and use atrtc_lock for efirtc locking. > > > > Modified: > >   head/sys/amd64/include/efi.h > >   head/sys/isa/rtc.h > >   head/sys/x86/isa/atrtc.c > > > > Modified: head/sys/amd64/include/efi.h > > ============================================================================== > > --- head/sys/amd64/include/efi.h Sun Mar 11 19:14:01 2018 (r330779) > > +++ head/sys/amd64/include/efi.h Sun Mar 11 19:22:58 2018 (r330780) > > @@ -48,9 +48,9 @@ > >  #ifdef _KERNEL > >  #include > >   > > -#define EFI_TIME_LOCK() mtx_lock(&atrtc_time_lock); > > -#define EFI_TIME_UNLOCK() mtx_unlock(&atrtc_time_lock); > > -#define EFI_TIME_OWNED() mtx_assert(&atrtc_time_lock, MA_OWNED); > > +#define EFI_TIME_LOCK() mtx_lock_spin(&atrtc_lock); > > +#define EFI_TIME_UNLOCK() mtx_unlock_spin(&atrtc_lock); > > +#define EFI_TIME_OWNED() mtx_assert(&atrtc_lock, MA_OWNED); > I do not understand how this can work. You changed EFI_TIME_LOCK() to > spinlock.  As result, the spinlock is taken before efi_enter() is called. > efi_enter() locks the pmap and efi_lock, both of which are sleepable > mutexes.  Also, arch efirt code is allowed to take arch-specific > sleepable mutexes and perhaps some spinlocks (but currently does not). > > The first context switch when either of the listed sleepable mutexes > are contested and the thread is taken off CPU would panic.  I suspect > that some invariants check might fire earlier. > Oops, sure enough; I reverted it. I think I knew that about efi_enter() at one time, but I had completely forgotten it did any locking.  I just realized my only efi-capable machine that I tested this on has virtually all debugging and witness disabled, so I didn't really give it much of a test after all. Unfortunately, this reverts one type of wrong locking back to another.  The need is to prevent access to the atrtc hardware if efi is accessing it, and the locking I just reverted to that uses a sleepable mutex only protects against inittodr()/resettodr() access, but not against nvram(4) or if the atrtc is being used as an eventtimer (of course nobody uses it for that, but the driver supports it). I have some pending changes that cause the atrtc driver to just not attach at all if the efirtc driver attached, but they're stacked up behind some other changes in phab.  And that still doesn't fix the nvram(4) part of it. -- Ian From owner-svn-src-all@freebsd.org Sun Mar 11 21:25:51 2018 Return-Path: Delivered-To: svn-src-all@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 7A418F50A1E; Sun, 11 Mar 2018 21:25:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0126D804D7; Sun, 11 Mar 2018 21:25:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w2BLPd8g086177 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 11 Mar 2018 23:25:43 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w2BLPd8g086177 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w2BLPdrF086175; Sun, 11 Mar 2018 23:25:39 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 11 Mar 2018 23:25:39 +0200 From: Konstantin Belousov To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330780 - in head/sys: amd64/include isa x86/isa Message-ID: <20180311212539.GD76926@kib.kiev.ua> References: <201803111922.w2BJMwr8043084@repo.freebsd.org> <20180311195800.GC76926@kib.kiev.ua> <1520799639.84937.154.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1520799639.84937.154.camel@freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 21:25:51 -0000 On Sun, Mar 11, 2018 at 02:20:39PM -0600, Ian Lepore wrote: > On Sun, 2018-03-11 at 21:58 +0200, Konstantin Belousov wrote: > > On Sun, Mar 11, 2018 at 07:22:58PM +0000, Ian Lepore wrote: > > > > > > Author: ian > > > Date: Sun Mar 11 19:22:58 2018 > > > New Revision: 330780 > > > URL: https://svnweb.freebsd.org/changeset/base/330780 > > > > > > Log: > > > š Eliminate atrtc_time_lock, and use atrtc_lock for efirtc locking. > > > > > > Modified: > > > š head/sys/amd64/include/efi.h > > > š head/sys/isa/rtc.h > > > š head/sys/x86/isa/atrtc.c > > > > > > Modified: head/sys/amd64/include/efi.h > > > ============================================================================== > > > --- head/sys/amd64/include/efi.h Sun Mar 11 19:14:01 2018 (r330779) > > > +++ head/sys/amd64/include/efi.h Sun Mar 11 19:22:58 2018 (r330780) > > > @@ -48,9 +48,9 @@ > > > š#ifdef _KERNEL > > > š#include > > > š > > > -#define EFI_TIME_LOCK() mtx_lock(&atrtc_time_lock); > > > -#define EFI_TIME_UNLOCK() mtx_unlock(&atrtc_time_lock); > > > -#define EFI_TIME_OWNED() mtx_assert(&atrtc_time_lock, MA_OWNED); > > > +#define EFI_TIME_LOCK() mtx_lock_spin(&atrtc_lock); > > > +#define EFI_TIME_UNLOCK() mtx_unlock_spin(&atrtc_lock); > > > +#define EFI_TIME_OWNED() mtx_assert(&atrtc_lock, MA_OWNED); > > I do not understand how this can work. You changed EFI_TIME_LOCK() to > > spinlock.ššAs result, the spinlock is taken before efi_enter() is called. > > efi_enter() locks the pmap and efi_lock, both of which are sleepable > > mutexes.ššAlso, arch efirt code is allowed to take arch-specific > > sleepable mutexes and perhaps some spinlocks (but currently does not). > > > > The first context switch when either of the listed sleepable mutexes > > are contested and the thread is taken off CPU would panic.ššI suspect > > that some invariants check might fire earlier. > > > > Oops, sure enough; I reverted it. > > I think I knew that about efi_enter() at one time, but I had completely > forgotten it did any locking. šI just realized my only efi-capable > machine that I tested this on has virtually all debugging and witness > disabled, so I didn't really give it much of a test after all. > > Unfortunately, this reverts one type of wrong locking back to another. > šThe need is to prevent access to the atrtc hardware if efi is > accessing it, and the locking I just reverted to that uses a sleepable > mutex only protects against inittodr()/resettodr() access, but not > against nvram(4) or if the atrtc is being used as an eventtimer (of > course nobody uses it for that, but the driver supports it). > > I have some pending changes that cause the atrtc driver to just not > attach at all if the efirtc driver attached, but they're stacked up > behind some other changes in phab. šAnd that still doesn't fix the > nvram(4) part of it. Not attaching atrtc if efirtc is attached sounds reasonable. But then you should also disable efirt attach if atrtc is on. One possible issue is that efirt is typicall loadable, while atrtc is compiled into the kernel, which means that efirt would become virtually unusable. For nvram(4), you can take the atrtc_time_lock around accesses in addition to the atrtc_lock, instead of providing exclusivity on the level of drivers attach. From owner-svn-src-all@freebsd.org Sun Mar 11 22:49:47 2018 Return-Path: Delivered-To: svn-src-all@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 7D187F2D1C0; Sun, 11 Mar 2018 22:49:47 +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 2680E83593; Sun, 11 Mar 2018 22:49:47 +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 1AF14236A2; Sun, 11 Mar 2018 22:49:47 +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 w2BMnk2I044356; Sun, 11 Mar 2018 22:49:46 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BMnkwJ044355; Sun, 11 Mar 2018 22:49:46 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803112249.w2BMnkwJ044355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 11 Mar 2018 22:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330784 - stable/11/sys/dev/iwm X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/iwm X-SVN-Commit-Revision: 330784 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 22:49:47 -0000 Author: eadler Date: Sun Mar 11 22:49:46 2018 New Revision: 330784 URL: https://svnweb.freebsd.org/changeset/base/330784 Log: Revert r324434 Some users are reporting that it is causing issues for their hardware. In the interest of not breaking stable, revert while we investigate. Modified: stable/11/sys/dev/iwm/if_iwm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iwm/if_iwm.c ============================================================================== --- stable/11/sys/dev/iwm/if_iwm.c Sun Mar 11 20:13:15 2018 (r330783) +++ stable/11/sys/dev/iwm/if_iwm.c Sun Mar 11 22:49:46 2018 (r330784) @@ -547,14 +547,12 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode { struct iwm_fw_info *fw = &sc->sc_fw; const struct iwm_tlv_ucode_header *uhdr; - const struct iwm_ucode_tlv *tlv; + struct iwm_ucode_tlv tlv; struct iwm_ucode_capabilities *capa = &sc->ucode_capa; enum iwm_ucode_tlv_type tlv_type; const struct firmware *fwp; const uint8_t *data; - uint32_t tlv_len; uint32_t usniffer_img; - const uint8_t *tlv_data; uint32_t paging_mem_size; int num_of_cpus; int error = 0; @@ -607,21 +605,25 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode goto out; } - snprintf(sc->sc_fwver, sizeof(sc->sc_fwver), "%u.%u (API ver %u)", + snprintf(sc->sc_fwver, sizeof(sc->sc_fwver), "%d.%d (API ver %d)", IWM_UCODE_MAJOR(le32toh(uhdr->ver)), IWM_UCODE_MINOR(le32toh(uhdr->ver)), IWM_UCODE_API(le32toh(uhdr->ver))); data = uhdr->data; len = fw->fw_fp->datasize - sizeof(*uhdr); - while (len >= sizeof(*tlv)) { - len -= sizeof(*tlv); - tlv = (const void *)data; + while (len >= sizeof(tlv)) { + size_t tlv_len; + const void *tlv_data; - tlv_len = le32toh(tlv->length); - tlv_type = le32toh(tlv->type); - tlv_data = tlv->data; + memcpy(&tlv, data, sizeof(tlv)); + tlv_len = le32toh(tlv.length); + tlv_type = le32toh(tlv.type); + len -= sizeof(tlv); + data += sizeof(tlv); + tlv_data = data; + if (len < tlv_len) { device_printf(sc->sc_dev, "firmware too short: %zu bytes\n", @@ -629,21 +631,19 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode error = EINVAL; goto parse_out; } - len -= roundup2(tlv_len, 4); - data += sizeof(tlv) + roundup2(tlv_len, 4); switch ((int)tlv_type) { case IWM_UCODE_TLV_PROBE_MAX_LEN: - if (tlv_len != sizeof(uint32_t)) { + if (tlv_len < sizeof(uint32_t)) { device_printf(sc->sc_dev, - "%s: PROBE_MAX_LEN (%d) != sizeof(uint32_t)\n", + "%s: PROBE_MAX_LEN (%d) < sizeof(uint32_t)\n", __func__, (int) tlv_len); error = EINVAL; goto parse_out; } capa->max_probe_length = - le32_to_cpup((const uint32_t *)tlv_data); + le32toh(*(const uint32_t *)tlv_data); /* limit it to something sensible */ if (capa->max_probe_length > IWM_SCAN_OFFLOAD_PROBE_REQ_SIZE) { @@ -674,14 +674,6 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode error = EINVAL; goto parse_out; } - if (tlv_len % sizeof(uint32_t)) { - device_printf(sc->sc_dev, - "%s: IWM_UCODE_TLV_FLAGS: tlv_len (%d) %% sizeof(uint32_t)\n", - __func__, - (int) tlv_len); - error = EINVAL; - goto parse_out; - } /* * Apparently there can be many flags, but Linux driver * parses only the first one, and so do we. @@ -693,7 +685,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode * 2) TLV_FLAGS contains TLV_FLAGS_PAN * ==> this resets TLV_PAN to itself... hnnnk */ - capa->flags = le32_to_cpup((const uint32_t *)tlv_data); + capa->flags = le32toh(*(const uint32_t *)tlv_data); break; case IWM_UCODE_TLV_CSCHEME: if ((error = iwm_store_cscheme(sc, @@ -714,7 +706,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode error = EINVAL; goto parse_out; } - num_of_cpus = le32_to_cpup((const uint32_t *)tlv_data); + num_of_cpus = le32toh(*(const uint32_t *)tlv_data); if (num_of_cpus == 2) { fw->fw_sects[IWM_UCODE_REGULAR].is_dual_cpus = TRUE; @@ -788,7 +780,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode goto parse_out; } sc->sc_fw.phy_config = - le32_to_cpup((const uint32_t *)tlv_data); + le32toh(*(const uint32_t *)tlv_data); sc->sc_fw.valid_tx_ant = (sc->sc_fw.phy_config & IWM_FW_PHY_CFG_TX_CHAIN) >> IWM_FW_PHY_CFG_TX_CHAIN_POS; @@ -839,7 +831,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode error = EINVAL; goto parse_out; } - paging_mem_size = le32_to_cpup((const uint32_t *)tlv_data); + paging_mem_size = le32toh(*(const uint32_t *)tlv_data); IWM_DPRINTF(sc, IWM_DEBUG_FIRMWARE_TLV, "%s: Paging: paging enabled (size = %u bytes)\n", @@ -872,7 +864,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode goto parse_out; } capa->n_scan_channels = - le32_to_cpup((const uint32_t *)tlv_data); + le32toh(*(const uint32_t *)tlv_data); break; case IWM_UCODE_TLV_FW_VERSION: @@ -897,6 +889,9 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode error = EINVAL; goto parse_out; } + + len -= roundup(tlv_len, 4); + data += roundup(tlv_len, 4); } KASSERT(error == 0, ("unhandled error")); From owner-svn-src-all@freebsd.org Sun Mar 11 22:51:02 2018 Return-Path: Delivered-To: svn-src-all@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 B3420F2D39C for ; Sun, 11 Mar 2018 22:51:02 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 474EA8374C for ; Sun, 11 Mar 2018 22:51:02 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x22c.google.com with SMTP id q184so4263404ywh.13 for ; Sun, 11 Mar 2018 15:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=pxp+atD63/vE8Bb8uWfqtOfzvwOJJX2LPGeYVJZ6F/c=; b=uHxqywhx24NUZYOe4PVjMbmvQId4/vJOWWGBVC3C78recKlxJBWLIGkr0G6UyRLkfo WX62vz9DYKEr1zpYUxiaD+m5q4sJWPmjRoesar22/GHVs30R2IpFf1LcPnIFWkddw7WX KTOhRdJtorJX8q3MktwmoMpA5rJgVbV0A59YI= 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:content-transfer-encoding; bh=pxp+atD63/vE8Bb8uWfqtOfzvwOJJX2LPGeYVJZ6F/c=; b=i8ArVyNqIenngoWDpqOZKfCs/6LJ+gGe+HgLYEcaYls2uDbSIu3Uvt1Bia/F40DOPt mG94JcqWrMNnY6GAvO4M2tpHZs+HWl8yfvTckUgFtVQ1sUKTNAboOT6Wj1XQ5F+ofqcx VagcYQWRAobLV7tEND4lGC3RuFMds0KnszmqWjGLZsR5nGONJeA+obH30R1xH6Rd54yk sDtbCr79NUnNF4rNoIsGZVN0aXngPeyqMb9HN/aJ7I+uQP4CQ3tTyEq0KNB4eZmS5cYU bN8lXD1xysoPGaixdI+3Zc2td2FPEMOkzT1mj9ExhKidUfIifu7ORd29pIK9Ly5u9DzO 1fGQ== X-Gm-Message-State: AElRT7H7QzUuRGSaxRExjY+NqpYtPjXiDhPyhETxYqfdoM5Qn6aDsaNg BMDkhKCopGOmcrHga0HSs4njU23TAblVQzfnw2C7bw== X-Google-Smtp-Source: AG47ELvAhcMvW1WClGawopfR67fPcQIYtxOnhIoBu+1iW1kachjobKg67xL3+4x70yt8AhqC0XRlgZH9iBmglovskZ4= X-Received: by 10.129.110.86 with SMTP id j83mr3555997ywc.19.1520808661456; Sun, 11 Mar 2018 15:51:01 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Sun, 11 Mar 2018 15:50:30 -0700 (PDT) In-Reply-To: <201803112104.w2BL4uAE042123@nuc.oldach.net> References: <201803112104.w2BL4uAE042123@nuc.oldach.net> From: Eitan Adler Date: Sun, 11 Mar 2018 15:50:30 -0700 X-Google-Sender-Auth: AyCQZolx1hawYSyAtmTdGQUiows Message-ID: Subject: Re: svn commit: r330451 - in stable/11/sys: dev/iwm dev/otus dev/usb/wlan net80211 To: Helge Oldach Cc: =?UTF-8?B?UGludMOpciwgT2xpdsOpcg==?= , rgrimes@freebsd.org, src-committers , John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 22:51:02 -0000 On 11 March 2018 at 14:04, Helge Oldach wrote: > Pint=C3=A9r, Oliv=C3=A9r wrote on Sun, 11 Mar 2018 18:17:44 +0100 (CET): >> On Thu, Mar 8, 2018 at 12:51 PM, Pint=C3=A9r, Oliv=C3=A9r > Reverting r330206 (only, but keeping the succeeding commits) fixed it for= me, as described in the PR. r330206 has been reverted. --=20 Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@freebsd.org Sun Mar 11 23:14:51 2018 Return-Path: Delivered-To: svn-src-all@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 A09A5F2EEBC; Sun, 11 Mar 2018 23:14:51 +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 43EAA84409; Sun, 11 Mar 2018 23:14:51 +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 163C823B30; Sun, 11 Mar 2018 23:14:51 +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 w2BNEo7t059054; Sun, 11 Mar 2018 23:14:50 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2BNEoOX059053; Sun, 11 Mar 2018 23:14:50 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201803112314.w2BNEoOX059053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 11 Mar 2018 23:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330785 - head/sys/arm/conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/conf X-SVN-Commit-Revision: 330785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 23:14:51 -0000 Author: manu Date: Sun Mar 11 23:14:50 2018 New Revision: 330785 URL: https://svnweb.freebsd.org/changeset/base/330785 Log: arm: Remove SoC Specific -MMCCAM kernelconfig One should use the GENERIC-MMCCAM for this. Deleted: head/sys/arm/conf/BEAGLEBONE-MMCCAM head/sys/arm/conf/IMX6-MMCCAM From owner-svn-src-all@freebsd.org Mon Mar 12 01:41:17 2018 Return-Path: Delivered-To: svn-src-all@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 1F46CF3AC20; Mon, 12 Mar 2018 01:41:17 +0000 (UTC) (envelope-from gad@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 C27E288E48; Mon, 12 Mar 2018 01:41:16 +0000 (UTC) (envelope-from gad@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 BD64525135; Mon, 12 Mar 2018 01:41:16 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2C1fGP9029646; Mon, 12 Mar 2018 01:41:16 GMT (envelope-from gad@FreeBSD.org) Received: (from gad@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2C1fGrU029645; Mon, 12 Mar 2018 01:41:16 GMT (envelope-from gad@FreeBSD.org) Message-Id: <201803120141.w2C1fGrU029645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gad set sender to gad@FreeBSD.org using -f From: Garance A Drosehn Date: Mon, 12 Mar 2018 01:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330787 - head/usr.sbin/lpr/common_source X-SVN-Group: head X-SVN-Commit-Author: gad X-SVN-Commit-Paths: head/usr.sbin/lpr/common_source X-SVN-Commit-Revision: 330787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 01:41:17 -0000 Author: gad Date: Mon Mar 12 01:41:16 2018 New Revision: 330787 URL: https://svnweb.freebsd.org/changeset/base/330787 Log: Fix the resource leak of a 'FILE *' which could happen in routine ctl_readcf() if a call to malloc failed. PR: 204955 Reported by: David Binderman Modified: head/usr.sbin/lpr/common_source/ctlinfo.c Modified: head/usr.sbin/lpr/common_source/ctlinfo.c ============================================================================== --- head/usr.sbin/lpr/common_source/ctlinfo.c Mon Mar 12 00:33:01 2018 (r330786) +++ head/usr.sbin/lpr/common_source/ctlinfo.c Mon Mar 12 01:41:16 2018 (r330787) @@ -292,8 +292,10 @@ ctl_readcf(const char *ptrname, const char *cfname) msize = sroom2 + CTI_LINEMAX; msize = roundup(msize, 8); cstart = malloc(msize); - if (cstart == NULL) + if (cstart == NULL) { + fclose(cfile); return NULL; + } memset(cstart, 0, msize); cpriv = (struct cjprivate *)cstart; cpriv->pub.cji_priv = cpriv; From owner-svn-src-all@freebsd.org Mon Mar 12 03:17:05 2018 Return-Path: Delivered-To: svn-src-all@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 8AED3F4353E; Mon, 12 Mar 2018 03:17:05 +0000 (UTC) (envelope-from dexuan.bsd@gmail.com) Received: from mail-lf0-x242.google.com (mail-lf0-x242.google.com [IPv6:2a00:1450:4010:c07::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED3568C0B6; Mon, 12 Mar 2018 03:17:04 +0000 (UTC) (envelope-from dexuan.bsd@gmail.com) Received: by mail-lf0-x242.google.com with SMTP id l191-v6so20965872lfe.1; Sun, 11 Mar 2018 20:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=m0BriEnHIwwJO/s4ChZE2/2xCTAZBxX8RGTJsQkG95c=; b=or6/gWqB4Q66nGp73qdkVaOWCAqxu7Wwltn2aek66yTht6cwIU4sT/Nc2CSz8ViUKz a7veL0JVAv3CN6svfJpiBninzTXpGTOUAbup2cUYKIqtIV9lPJ/WB8aCELanDX3jMwPM MMOcN9f2sF2KSTTRhgf2pSKyNTLA+lqhY56+Nd3hqyIyZnHvd5ewTeeGvXax7LnJObzL Z9FIEeFWgVSJhsrwL3r2NUqAzjZPmKyIGYtKyYVNGbtZd9b6HilYiYFfgkRHtulARSxx Mf9RdqX/w7HuDqaBNdFLPrAI0edmC7aPVyToCkh+rieiErS7emdku5ALs0mpscQY/vAe g5JA== 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=m0BriEnHIwwJO/s4ChZE2/2xCTAZBxX8RGTJsQkG95c=; b=dY1Nfcop+9Vl5LG6LHNGSbYNLZsEKhGMj+4kehk6+J9VyVsO5Hd5QP0qXqrOfSL+O7 Q+dS3dV7z2bRvaqfYLQ4Ss7/amNtroULsh6kVgDZqJjm1ScB3a81GUO4evCev4ewPtTy +fVuuxwIcVcy5FmfvAaTOKvfgnzaDxzYjFzRB2pSULTOHlRfVMVi51Id+LOOrdhXSJWw I/2Hz+HfWITvbcRzB+PXKm5pSaI7nyBcob3Jlrsy+Y5xt+iERt3vFB+qHQcEkbYVFP6b NDC+j9ezC8B+oZlZzMFztte5e5+lXi+ds3MnJrFpeE9Ubuj2W585WvXqMnY0cRoLVm45 vaTg== X-Gm-Message-State: AElRT7FWi0bPjZ01ubfQrxdRZg8HGFFfpPHSrfCzHRM3SZoq23kkX0Ht dPji3nCxEYxIJ/9h1Hln1VHZEZGDvn4EuPAo8p8= X-Google-Smtp-Source: AG47ELuor/GJ1i4vGj+7YcyAwuvfCwGm4AV7M6BXkzGIfqydizIsB+eSiE1Vdc/Hn/+SzxG9GA9a0cU3Bp47bmkw9jk= X-Received: by 10.46.89.213 with SMTP id g82mr4153059ljf.105.1520824622575; Sun, 11 Mar 2018 20:17:02 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:d8e8:0:0:0:0:0 with HTTP; Sun, 11 Mar 2018 20:17:02 -0700 (PDT) In-Reply-To: <201801291807.w0TI7EVD092154@repo.freebsd.org> References: <201801291807.w0TI7EVD092154@repo.freebsd.org> From: Dexuan-BSD Cui Date: Sun, 11 Mar 2018 20:17:02 -0700 Message-ID: Subject: Re: svn commit: r328554 - head/sys/cam/scsi To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Dexuan Cui Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 03:17:05 -0000 Hi imp and all, I think this patch is very important, because it can fix a panic I noticed recently when I try to hot-remove a SCSI disk from a VM running on Azure/Hyper-V. The panic is almost 100% reproducible with stable/11, but not in the latest CURRENT code, so finally I identified this fix in the CURRENT branch. Can you please MFC this patch to 11 and 10? It looks there is a major difference in the CAM code between 11/10 and the CURRENT code, and we may have to MFC more related patches. If this is difficult, I hope at least we can provide a minimal re-written version of the patch to 11 and 10? Looking forward to your insight! Thanks, -- Dexuan On Mon, Jan 29, 2018 at 10:07 AM, Warner Losh wrote: > Author: imp > Date: Mon Jan 29 18:07:14 2018 > New Revision: 328554 > URL: https://svnweb.freebsd.org/changeset/base/328554 > > Log: > Do the book-keeping on release before we release the reference. The > periph was going away on final release, and then returning and we > started dancing in free memory. > > Sponsored by: Netflix > > Modified: > head/sys/cam/scsi/scsi_da.c > > Modified: head/sys/cam/scsi/scsi_da.c > ============================================================================== > --- head/sys/cam/scsi/scsi_da.c Mon Jan 29 17:32:30 2018 (r328553) > +++ head/sys/cam/scsi/scsi_da.c Mon Jan 29 18:07:14 2018 (r328554) > @@ -1549,12 +1549,12 @@ da_periph_unhold(struct cam_periph *periph, da_ref_tok > struct da_softc *softc = periph->softc; > > token_sanity(token); > - cam_periph_unhold(periph); > DA_PERIPH_PRINT(periph, "Unholding device %s (%d)\n", > da_ref_text[token], token); > cnt = atomic_fetchadd_int(&softc->ref_flags[token], -1); > if (cnt != 1) > panic("Unholding %d with cnt = %d", token, cnt); > + cam_periph_unhold(periph); > } > > static inline int > @@ -1583,12 +1583,12 @@ da_periph_release(struct cam_periph *periph, da_ref_to > struct da_softc *softc = periph->softc; > > token_sanity(token); > - cam_periph_release(periph); > DA_PERIPH_PRINT(periph, "releasing device %s (%d)\n", > da_ref_text[token], token); > cnt = atomic_fetchadd_int(&softc->ref_flags[token], -1); > if (cnt != 1) > panic("Releasing %d with cnt = %d", token, cnt); > + cam_periph_release(periph); > } > > static inline void > @@ -1598,12 +1598,12 @@ da_periph_release_locked(struct cam_periph *periph, da > struct da_softc *softc = periph->softc; > > token_sanity(token); > - cam_periph_release_locked(periph); > DA_PERIPH_PRINT(periph, "releasing device (locked) %s (%d)\n", > da_ref_text[token], token); > cnt = atomic_fetchadd_int(&softc->ref_flags[token], -1); > if (cnt != 1) > panic("Unholding %d with cnt = %d", token, cnt); > + cam_periph_release_locked(periph); > } > > #define cam_periph_hold POISON > From owner-svn-src-all@freebsd.org Mon Mar 12 03:54:40 2018 Return-Path: Delivered-To: svn-src-all@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 C51F4F45DEE; Mon, 12 Mar 2018 03:54: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 786578D912; Mon, 12 Mar 2018 03:54: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 5A8CF26754; Mon, 12 Mar 2018 03:54: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 w2C3sdaK097655; Mon, 12 Mar 2018 03:54:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2C3scFa097651; Mon, 12 Mar 2018 03:54:38 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803120354.w2C3scFa097651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 12 Mar 2018 03:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330788 - in head/stand/mips/beri: boot2 common loader X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/stand/mips/beri: boot2 common loader X-SVN-Commit-Revision: 330788 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 03:54:40 -0000 Author: kevans Date: Mon Mar 12 03:54:38 2018 New Revision: 330788 URL: https://svnweb.freebsd.org/changeset/base/330788 Log: beri loader: Replace getc/putc with beri_ prefixed versions This matches a convention that we use, at least in ubldr, to prefix getc/putc with a loader-specific prefix to avoid collisions. This was encountered while trying to build the beri loader with MK_LOADER_LUA=yes. No objection from: brooks Reported by: emaste Modified: head/stand/mips/beri/boot2/boot2.c head/stand/mips/beri/common/altera_jtag_uart.c head/stand/mips/beri/common/cons.h head/stand/mips/beri/loader/beri_console.c Modified: head/stand/mips/beri/boot2/boot2.c ============================================================================== --- head/stand/mips/beri/boot2/boot2.c Mon Mar 12 01:41:16 2018 (r330787) +++ head/stand/mips/beri/boot2/boot2.c Mon Mar 12 03:54:38 2018 (r330788) @@ -627,7 +627,7 @@ static int xputc(int c) { if (ioctrl & IO_KEYBOARD) - putc(c); + beri_putc(c); #if 0 if (ioctrl & IO_SERIAL) sio_putc(c); @@ -642,7 +642,7 @@ xgetc(int fn) return 0; for (;;) { if (ioctrl & IO_KEYBOARD && keyhit(0)) - return fn ? 1 : getc(); + return fn ? 1 : beri_getc(); #if 0 if (ioctrl & IO_SERIAL && sio_ischar()) return fn ? 1 : sio_getc(); Modified: head/stand/mips/beri/common/altera_jtag_uart.c ============================================================================== --- head/stand/mips/beri/common/altera_jtag_uart.c Mon Mar 12 01:41:16 2018 (r330787) +++ head/stand/mips/beri/common/altera_jtag_uart.c Mon Mar 12 03:54:38 2018 (r330788) @@ -159,7 +159,7 @@ keyhit(int seconds) } int -getc(void) +beri_getc(void) { while (!(uart_readable())); @@ -168,7 +168,7 @@ getc(void) } void -putc(int ch) +beri_putc(int ch) { uart_data_write(ch); Modified: head/stand/mips/beri/common/cons.h ============================================================================== --- head/stand/mips/beri/common/cons.h Mon Mar 12 01:41:16 2018 (r330787) +++ head/stand/mips/beri/common/cons.h Mon Mar 12 03:54:38 2018 (r330788) @@ -33,8 +33,8 @@ #ifndef _CONS_H_ #define _CONS_H_ -int getc(void); +int beri_getc(void); int keyhit(int); -void putc(int); +void beri_putc(int); #endif Modified: head/stand/mips/beri/loader/beri_console.c ============================================================================== --- head/stand/mips/beri/loader/beri_console.c Mon Mar 12 01:41:16 2018 (r330787) +++ head/stand/mips/beri/loader/beri_console.c Mon Mar 12 03:54:38 2018 (r330788) @@ -72,14 +72,14 @@ static void c_out(int c) { - putc(c); + beri_putc(c); } static int c_in(void) { - return (getc()); + return (beri_getc()); } static int From owner-svn-src-all@freebsd.org Mon Mar 12 05:02:23 2018 Return-Path: Delivered-To: svn-src-all@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 F1C50F49E7A; Mon, 12 Mar 2018 05:02:22 +0000 (UTC) (envelope-from scottl@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 A86648F935; Mon, 12 Mar 2018 05:02:22 +0000 (UTC) (envelope-from scottl@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 A35582721F; Mon, 12 Mar 2018 05:02:22 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2C52M3m032165; Mon, 12 Mar 2018 05:02:22 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2C52MUv032163; Mon, 12 Mar 2018 05:02:22 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201803120502.w2C52MUv032163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 12 Mar 2018 05:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330789 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 330789 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 05:02:23 -0000 Author: scottl Date: Mon Mar 12 05:02:22 2018 New Revision: 330789 URL: https://svnweb.freebsd.org/changeset/base/330789 Log: Implement a sysctl to dump in-flight I/O state for debugging. The tool to parse it will be committed in a separate action. Sponsored by: Netflix Modified: head/sys/dev/mpr/mpr.c head/sys/dev/mps/mps.c Modified: head/sys/dev/mpr/mpr.c ============================================================================== --- head/sys/dev/mpr/mpr.c Mon Mar 12 03:54:38 2018 (r330788) +++ head/sys/dev/mpr/mpr.c Mon Mar 12 05:02:22 2018 (r330789) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -107,6 +108,7 @@ static void mpr_enqueue_request(struct mpr_softc *sc, static int mpr_get_iocfacts(struct mpr_softc *sc, MPI2_IOC_FACTS_REPLY *facts); static int mpr_wait_db_ack(struct mpr_softc *sc, int timeout, int sleep_flag); static int mpr_debug_sysctl(SYSCTL_HANDLER_ARGS); +static int mpr_dump_reqs(SYSCTL_HANDLER_ARGS); static void mpr_parse_debug(struct mpr_softc *sc, char *list); SYSCTL_NODE(_hw, OID_AUTO, mpr, CTLFLAG_RD, 0, "MPR Driver Parameters"); @@ -1910,6 +1912,10 @@ mpr_setup_sysctl(struct mpr_softc *sc) &sc->spinup_wait_time, DEFAULT_SPINUP_WAIT, "seconds to wait for " "spinup after SATA ID error"); + SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "dump_reqs", CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_SKIP, sc, 0, + mpr_dump_reqs, "I", "Dump Active Requests"); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "use_phy_num", CTLFLAG_RD, &sc->use_phynum, 0, "Use the phy number for enumeration"); @@ -2051,6 +2057,70 @@ mpr_parse_debug(struct mpr_softc *sc, char *list) break; } return; +} + +struct mpr_dumpreq_hdr { + uint32_t smid; + uint32_t state; + uint32_t numframes; + uint32_t deschi; + uint32_t desclo; +}; + +static int +mpr_dump_reqs(SYSCTL_HANDLER_ARGS) +{ + struct mpr_softc *sc; + struct mpr_chain *chain, *chain1; + struct mpr_command *cm; + struct mpr_dumpreq_hdr hdr; + struct sbuf *sb; + uint32_t smid, state; + int i, numreqs, error = 0; + + sc = (struct mpr_softc *)arg1; + + if ((error = priv_check(curthread, PRIV_DRIVER)) != 0) { + printf("priv check error %d\n", error); + return (error); + } + + state = MPR_CM_STATE_INQUEUE; + smid = 1; + numreqs = sc->num_reqs; + + if (req->newptr != NULL) + return (EINVAL); + + if (smid == 0 || smid > sc->num_reqs) + return (EINVAL); + if (numreqs <= 0 || (numreqs + smid > sc->num_reqs)) + numreqs = sc->num_reqs; + sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); + + /* Best effort, no locking */ + for (i = smid; i < numreqs; i++) { + cm = &sc->commands[i]; + if (cm->cm_state != state) + continue; + hdr.smid = i; + hdr.state = cm->cm_state; + hdr.numframes = 1; + hdr.deschi = cm->cm_desc.Words.High; + hdr.desclo = cm->cm_desc.Words.Low; + TAILQ_FOREACH_SAFE(chain, &cm->cm_chain_list, chain_link, + chain1) + hdr.numframes++; + sbuf_bcat(sb, &hdr, sizeof(hdr)); + sbuf_bcat(sb, cm->cm_req, 128); + TAILQ_FOREACH_SAFE(chain, &cm->cm_chain_list, chain_link, + chain1) + sbuf_bcat(sb, chain->chain, 128); + } + + error = sbuf_finish(sb); + sbuf_delete(sb); + return (error); } int Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Mon Mar 12 03:54:38 2018 (r330788) +++ head/sys/dev/mps/mps.c Mon Mar 12 05:02:22 2018 (r330789) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -106,6 +107,7 @@ static void mps_enqueue_request(struct mps_softc *sc, static int mps_get_iocfacts(struct mps_softc *sc, MPI2_IOC_FACTS_REPLY *facts); static int mps_wait_db_ack(struct mps_softc *sc, int timeout, int sleep_flag); static int mps_debug_sysctl(SYSCTL_HANDLER_ARGS); +static int mps_dump_reqs(SYSCTL_HANDLER_ARGS); static void mps_parse_debug(struct mps_softc *sc, char *list); SYSCTL_NODE(_hw, OID_AUTO, mps, CTLFLAG_RD, 0, "MPS Driver Parameters"); @@ -1793,6 +1795,10 @@ mps_setup_sysctl(struct mps_softc *sc) OID_AUTO, "encl_table_dump", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, mps_mapping_encl_dump, "A", "Enclosure Table Dump"); + SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, "dump_reqs", CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_SKIP, sc, 0, + mps_dump_reqs, "I", "Dump Active Requests"); + SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "use_phy_num", CTLFLAG_RD, &sc->use_phynum, 0, "Use the phy number for enumeration"); @@ -1923,6 +1929,70 @@ mps_parse_debug(struct mps_softc *sc, char *list) } return; +} + +struct mps_dumpreq_hdr { + uint32_t smid; + uint32_t state; + uint32_t numframes; + uint32_t deschi; + uint32_t desclo; +}; + +static int +mps_dump_reqs(SYSCTL_HANDLER_ARGS) +{ + struct mps_softc *sc; + struct mps_chain *chain, *chain1; + struct mps_command *cm; + struct mps_dumpreq_hdr hdr; + struct sbuf *sb; + uint32_t smid, state; + int i, numreqs, error = 0; + + sc = (struct mps_softc *)arg1; + + if ((error = priv_check(curthread, PRIV_DRIVER)) != 0) { + printf("priv check error %d\n", error); + return (error); + } + + state = MPS_CM_STATE_INQUEUE; + smid = 1; + numreqs = sc->num_reqs; + + if (req->newptr != NULL) + return (EINVAL); + + if (smid == 0 || smid > sc->num_reqs) + return (EINVAL); + if (numreqs <= 0 || (numreqs + smid > sc->num_reqs)) + numreqs = sc->num_reqs; + sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); + + /* Best effort, no locking */ + for (i = smid; i < numreqs; i++) { + cm = &sc->commands[i]; + if (cm->cm_state != state) + continue; + hdr.smid = i; + hdr.state = cm->cm_state; + hdr.numframes = 1; + hdr.deschi = cm->cm_desc.Words.High; + hdr.desclo = cm->cm_desc.Words.Low; + TAILQ_FOREACH_SAFE(chain, &cm->cm_chain_list, chain_link, + chain1) + hdr.numframes++; + sbuf_bcat(sb, &hdr, sizeof(hdr)); + sbuf_bcat(sb, cm->cm_req, 128); + TAILQ_FOREACH_SAFE(chain, &cm->cm_chain_list, chain_link, + chain1) + sbuf_bcat(sb, chain->chain, 128); + } + + error = sbuf_finish(sb); + sbuf_delete(sb); + return (error); } int From owner-svn-src-all@freebsd.org Mon Mar 12 05:03:34 2018 Return-Path: Delivered-To: svn-src-all@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 DD2A6F4A024; Mon, 12 Mar 2018 05:03:33 +0000 (UTC) (envelope-from scottl@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 8B8278FAFB; Mon, 12 Mar 2018 05:03:33 +0000 (UTC) (envelope-from scottl@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 865BB27234; Mon, 12 Mar 2018 05:03:33 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2C53Xm9032256; Mon, 12 Mar 2018 05:03:33 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2C53XeO032250; Mon, 12 Mar 2018 05:03:33 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201803120503.w2C53XeO032250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 12 Mar 2018 05:03:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330790 - head/usr.sbin/mpsutil X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/usr.sbin/mpsutil X-SVN-Commit-Revision: 330790 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 05:03:34 -0000 Author: scottl Date: Mon Mar 12 05:03:32 2018 New Revision: 330790 URL: https://svnweb.freebsd.org/changeset/base/330790 Log: Add a new 'debug' command tree and 'dump_reqs' command to grab and parse command and chain frames of in-flight I/O from the driver. Sponsored by: Netflix Added: head/usr.sbin/mpsutil/mps_debug.c (contents, props changed) Modified: head/usr.sbin/mpsutil/Makefile head/usr.sbin/mpsutil/mps_show.c head/usr.sbin/mpsutil/mpsutil.c head/usr.sbin/mpsutil/mpsutil.h Modified: head/usr.sbin/mpsutil/Makefile ============================================================================== --- head/usr.sbin/mpsutil/Makefile Mon Mar 12 05:02:22 2018 (r330789) +++ head/usr.sbin/mpsutil/Makefile Mon Mar 12 05:03:32 2018 (r330790) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= mpsutil -SRCS= mps_cmd.c mps_flash.c mps_show.c mpsutil.c +SRCS= mps_cmd.c mps_debug.c mps_flash.c mps_show.c mpsutil.c MAN= mpsutil.8 WARNS?= 3 Added: head/usr.sbin/mpsutil/mps_debug.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/mpsutil/mps_debug.c Mon Mar 12 05:03:32 2018 (r330790) @@ -0,0 +1,190 @@ +/*- + * Copyright (c) 2018 Netflix, Inc. + * All rights reserved. + * Written by: Scott Long + * + * 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. + * 3. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__RCSID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "mpsutil.h" + +MPS_TABLE(top, debug); + +struct mps_dumpreq_hdr { + uint32_t smid; + uint32_t state; + uint32_t numframes; + uint32_t deschi; + uint32_t desclo; +}; + +static int find_sgl(char *); +static void print_sgl(char *, int, int); + +#define MPS_FRAME_LEN 128 + +static int +debug_dumpreqs(int ac, char **av) +{ + struct mps_dumpreq_hdr *hdr; + char *buf, sysctlbuf[128]; + size_t len; + int numframes, error, offset; + + len = 0; + buf = NULL; + snprintf(sysctlbuf, sizeof(sysctlbuf), "dev.%s.%d.dump_reqs", + is_mps ? "mps" : "mpr", mps_unit); + + error = sysctlbyname(sysctlbuf, NULL, &len, NULL, 0); + if (error) + return (error); + + if (len == 0) + return (0); + + buf = malloc(len); + if (buf == NULL) + return (ENOMEM); + + error = sysctlbyname(sysctlbuf, buf, &len, NULL, 0); + if (error) { + printf("len= %zd, error= %d errno= %d\n", len, error, errno); + return (error); + } + + while (len >= MPS_FRAME_LEN) { + hdr = (struct mps_dumpreq_hdr *)buf; + numframes = hdr->numframes; + + printf("SMID= %d state= %#x numframes= %d desc.hi= %#08x " + "desc.lo= %#08x\n", hdr->smid, hdr->state, + hdr->numframes, hdr->deschi, hdr->desclo); + + buf += sizeof(struct mps_dumpreq_hdr); + len -= sizeof(struct mps_dumpreq_hdr); + + if ((offset = find_sgl(buf)) != -1) + print_sgl(buf, offset, numframes); + + buf += MPS_FRAME_LEN * numframes; + len -= MPS_FRAME_LEN * numframes; + } + + return (error); +} + +static int +find_sgl(char *buf) +{ + MPI2_REQUEST_HEADER *req; + MPI2_SCSI_IO_REQUEST *scsi; + int offset = 0; + + req = (MPI2_REQUEST_HEADER *)buf; + + switch (req->Function) { + case MPI2_FUNCTION_SCSI_IO_REQUEST: + scsi = (MPI2_SCSI_IO_REQUEST *)buf; + offset = scsi->SGLOffset0; + break; + default: + offset = -1; + } + + return (offset); +} + +#define SGL_FLAGS "\10LastElement\7EndOfBuffer\4Local\3Host2IOC\2Addr64\1EndOfList" + +static void +print_sgl(char *buf, int offset, int numframes) +{ + MPI2_SGE_SIMPLE64 *sge; + MPI2_SGE_CHAIN_UNION *sgc; + MPI2_REQUEST_HEADER *req; + u_int i = 0, flags; + char *frame, tmpbuf[128]; + + req = (MPI2_REQUEST_HEADER *)buf; + frame = (char *)buf; + sge = (MPI2_SGE_SIMPLE64 *)&frame[offset * 4]; + printf("SGL for command\n"); + + hexdump(frame, MPS_FRAME_LEN, NULL, 0); + while (frame != NULL) { + flags = sge->FlagsLength >> MPI2_SGE_FLAGS_SHIFT; + bzero(tmpbuf, sizeof(tmpbuf)); + mps_parse_flags(flags, SGL_FLAGS, tmpbuf, sizeof(tmpbuf)); + printf("seg%d flags=%x %s len= 0x%06x addr=0x%016jx\n", i, + flags, tmpbuf, sge->FlagsLength & 0xffffff, + mps_to_u64(&sge->Address)); + if (flags & (MPI2_SGE_FLAGS_END_OF_LIST | + MPI2_SGE_FLAGS_END_OF_BUFFER)) + break; + sge++; + i++; + if (flags & MPI2_SGE_FLAGS_LAST_ELEMENT) { + sgc = (MPI2_SGE_CHAIN_UNION *)sge; + if ((sgc->Flags & MPI2_SGE_FLAGS_CHAIN_ELEMENT) == 0) { + printf("Invalid chain element\n"); + break; + } + bzero(tmpbuf, sizeof(tmpbuf)); + mps_parse_flags(sgc->Flags, SGL_FLAGS, tmpbuf, + sizeof(tmpbuf)); + if (sgc->Flags & MPI2_SGE_FLAGS_64_BIT_ADDRESSING) + printf("chain64 flags=0x%x %s len=0x%x " + "Offset=0x%x addr=0x%016jx\n", sgc->Flags, + tmpbuf, sgc->Length, sgc->NextChainOffset, + mps_to_u64(&sgc->u.Address64)); + else + printf("chain32 flags=0x%x %s len=0x%x " + "Offset=0x%x addr=0x%08x\n", sgc->Flags, + tmpbuf, sgc->Length, sgc->NextChainOffset, + sgc->u.Address32); + if (--numframes <= 0) + break; + frame += MPS_FRAME_LEN; + sge = (MPI2_SGE_SIMPLE64 *)frame; + hexdump(frame, MPS_FRAME_LEN, NULL, 0); + } + } +} + +MPS_COMMAND(debug, dumpreqs, debug_dumpreqs, "", "Dump the active request queue") Modified: head/usr.sbin/mpsutil/mps_show.c ============================================================================== --- head/usr.sbin/mpsutil/mps_show.c Mon Mar 12 05:02:22 2018 (r330789) +++ head/usr.sbin/mpsutil/mps_show.c Mon Mar 12 05:03:32 2018 (r330790) @@ -202,6 +202,7 @@ static int show_iocfacts(int ac, char **av) { MPI2_IOC_FACTS_REPLY *facts; + char tmpbuf[128]; int error, fd; fd = mps_open(mps_unit); @@ -217,6 +218,14 @@ show_iocfacts(int ac, char **av) return (errno); } +#define IOCCAP "\3ScsiTaskFull" "\4DiagTrace" "\5SnapBuf" "\6ExtBuf" \ + "\7EEDP" "\10BiDirTarg" "\11Multicast" "\14TransRetry" "\15IR" \ + "\16EventReplay" "\17RaidAccel" "\20MSIXIndex" "\21HostDisc" \ + "\22FastPath" "\23RDPQArray" "\24AtomicReqDesc" "\25PCIeSRIOV" + + bzero(tmpbuf, sizeof(tmpbuf)); + mps_parse_flags(facts->IOCCapabilities, IOCCAP, tmpbuf, sizeof(tmpbuf)); + printf(" MsgVersion: %02d.%02d\n", facts->MsgVersion >> 8, facts->MsgVersion & 0xff); printf(" MsgLength: %d\n", facts->MsgLength); @@ -236,14 +245,19 @@ show_iocfacts(int ac, char **av) printf(" MaxMSIxVectors: %d\n", facts->MaxMSIxVectors); printf(" RequestCredit: %d\n", facts->RequestCredit); printf(" ProductID: 0x%x\n", facts->ProductID); - printf(" IOCCapabilities: 0x%x\n", facts->IOCCapabilities); + printf(" IOCCapabilities: 0x%x %s\n", facts->IOCCapabilities, + tmpbuf); printf(" FWVersion: 0x%08x\n", facts->FWVersion.Word); printf(" IOCRequestFrameSize: %d\n", facts->IOCRequestFrameSize); printf(" MaxInitiators: %d\n", facts->MaxInitiators); printf(" MaxTargets: %d\n", facts->MaxTargets); printf(" MaxSasExpanders: %d\n", facts->MaxSasExpanders); printf(" MaxEnclosures: %d\n", facts->MaxEnclosures); - printf(" ProtocolFlags: 0x%x\n", facts->ProtocolFlags); + + bzero(tmpbuf, sizeof(tmpbuf)); + mps_parse_flags(facts->ProtocolFlags, + "\4NvmeDevices\2ScsiTarget\1ScsiInitiator", tmpbuf, sizeof(tmpbuf)); + printf(" ProtocolFlags: 0x%x %s\n", facts->ProtocolFlags, tmpbuf); printf(" HighPriorityCredit: %d\n", facts->HighPriorityCredit); printf("MaxRepDescPostQDepth: %d\n", facts->MaxReplyDescriptorPostQueueDepth); Modified: head/usr.sbin/mpsutil/mpsutil.c ============================================================================== --- head/usr.sbin/mpsutil/mpsutil.c Mon Mar 12 05:02:22 2018 (r330789) +++ head/usr.sbin/mpsutil/mpsutil.c Mon Mar 12 05:03:32 2018 (r330790) @@ -205,3 +205,32 @@ hexdump(const void *ptr, int length, const char *hdr, printf("\n"); } } + +#define PCHAR(c) { if (retval < tmpsz) { *outbuf++ = (c); retval++; } } + +int +mps_parse_flags(uintmax_t num, const char *q, char *outbuf, int tmpsz) +{ + int n, tmp, retval = 0; + + if (num == 0) + return (retval); + + /* %b conversion flag format. */ + tmp = retval; + while (*q) { + n = *q++; + if (num & (1 << (n - 1))) { + PCHAR(retval != tmp ? ',' : '<'); + for (; (n = *q) > ' '; ++q) + PCHAR(n); + } else + for (; *q > ' '; ++q) + continue; + } + if (retval != tmp) + PCHAR('>'); + + return (retval); +} + Modified: head/usr.sbin/mpsutil/mpsutil.h ============================================================================== --- head/usr.sbin/mpsutil/mpsutil.h Mon Mar 12 05:02:22 2018 (r330789) +++ head/usr.sbin/mpsutil/mpsutil.h Mon Mar 12 05:03:32 2018 (r330790) @@ -42,6 +42,8 @@ #include #include #include +#include +#include #define MPSUTIL_VERSION "1.0.0" @@ -102,6 +104,7 @@ void hexdump(const void *ptr, int length, const char * #define HD_OMIT_HEX (1 << 17) #define HD_OMIT_CHARS (1 << 18) #define HD_REVERSED (1 << 19) +int mps_parse_flags(uintmax_t, const char *, char *, int); int mps_open(int unit); int mps_table_handler(struct mpsutil_command **start, @@ -140,6 +143,13 @@ mps_read_ioc_page(int fd, U8 PageNumber, U16 *IOCStatu return (mps_read_config_page(fd, MPI2_CONFIG_PAGETYPE_IOC, PageNumber, 0, IOCStatus)); +} + +static __inline uint64_t +mps_to_u64(U64 *data) +{ + + return (((uint64_t)(data->High) << 32 ) | data->Low); } MPI2_IOC_FACTS_REPLY * mps_get_iocfacts(int fd); From owner-svn-src-all@freebsd.org Mon Mar 12 05:41:28 2018 Return-Path: Delivered-To: svn-src-all@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 462C9F4C5D7; Mon, 12 Mar 2018 05:41:28 +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 EFA2A68C9E; Mon, 12 Mar 2018 05:41:27 +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 EA99727827; Mon, 12 Mar 2018 05:41:27 +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 w2C5fRGS050338; Mon, 12 Mar 2018 05:41:27 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2C5fRs3050337; Mon, 12 Mar 2018 05:41:27 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803120541.w2C5fRs3050337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 12 Mar 2018 05:41:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330791 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 330791 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 05:41:28 -0000 Author: cem Date: Mon Mar 12 05:41:27 2018 New Revision: 330791 URL: https://svnweb.freebsd.org/changeset/base/330791 Log: Implement NO_WCAST_QUAL for gcc4.2 architectures Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Mon Mar 12 05:03:32 2018 (r330790) +++ head/sys/conf/kern.mk Mon Mar 12 05:41:27 2018 (r330791) @@ -68,6 +68,9 @@ CWARNEXTRA+= -Wno-error=misleading-indentation \ .else # For gcc 4.2, eliminate the too-often-wrong warnings about uninitialized vars. CWARNEXTRA?= -Wno-uninitialized +# GCC 4.2 doesn't have -Wno-error=cast-qual, so just disable the warning for +# the few files that are already known to generate cast-qual warnings. +NO_WCAST_QUAL= -Wno-cast-qual .endif .endif From owner-svn-src-all@freebsd.org Mon Mar 12 07:52:31 2018 Return-Path: Delivered-To: svn-src-all@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 3E58FF51D89; Mon, 12 Mar 2018 07:52:31 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC7316D67B; Mon, 12 Mar 2018 07:52:30 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f52.google.com with SMTP id m69-v6so21677108lfe.8; Mon, 12 Mar 2018 00:52:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7of32cH8T5wV8VHhWnZwiudGCTnmDRWymdmdnxklSAc=; b=PvkWKksUB6oRMtxX3PtXnpc4em4Zc6lwBvSvOUEqBA+RhKeAFHYRtLQTSfhUA04Zij cuDfXpi2xMCe+ETwzXkxDQZz82OAw6yxwYcgibKdgeyie5kPJB+Hb42kFp4By5rxHx4e CLxRbjji1kR7mkhQwz2o2oHmjo/yUlbmaFdJrIaQmH/HXSZ1/cq1i5boKG8PS+ELXi5E RXGCxjNo3ES3igWVO8aueKjDbJOJOFlkF4DFfnxHFySBU+AjiIBbBkCsFpzw5QdJZvNo 78+EBLfjAPh6bz+eXGZbUEAG4O+KUg05dbBAXajdKDwiy/drnIoF0RbcaCR+ZXKTh9CS ATfg== X-Gm-Message-State: AElRT7FwTI5QyHpKNWliC8NghCAbRVxsq9ARU0pzJLWClGKzytL3dw3i kg/sB9PtYzmmpqvwiYtGkk7oRcYT X-Google-Smtp-Source: AG47ELvGiIyW8mY4nhspcvRpR4hJ9ht6IZzcyNSoDUZ/yKK+haAdFPGmUyiUywAG703UZt8pqwIzHw== X-Received: by 10.46.54.1 with SMTP id d1mr4669749lja.84.1520841142809; Mon, 12 Mar 2018 00:52:22 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id r13sm1538279ljd.60.2018.03.12.00.52.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Mar 2018 00:52:22 -0700 (PDT) Subject: Re: svn commit: r330338 - head/sys/amd64/amd64 To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803031510.w23FAbeC065867@repo.freebsd.org> <2557369.6nFzd3kAUm@ralph.baldwin.cx> From: Andriy Gapon Message-ID: Date: Mon, 12 Mar 2018 09:52:21 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <2557369.6nFzd3kAUm@ralph.baldwin.cx> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 07:52:31 -0000 On 09/03/2018 21:22, John Baldwin wrote: > On Saturday, March 03, 2018 03:10:37 PM Andriy Gapon wrote: >> Author: avg >> Date: Sat Mar 3 15:10:37 2018 >> New Revision: 330338 >> URL: https://svnweb.freebsd.org/changeset/base/330338 >> >> Log: >> db_nextframe/amd64: catch up with r328083 to recognize fast_syscall_common >> >> Since that change the system call stack traces look like this: >> ... >> sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe0028e13ac0 >> amd64_syscall() at amd64_syscall+0x79b/frame 0xfffffe0028e13bf0 >> fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe0028e13bf0 >> So, db_nextframe() stopped recognizing the system call frame. >> This commit should fix that. >> >> Reviewed by: kib >> MFC after: 4 days >> >> Modified: >> head/sys/amd64/amd64/db_trace.c >> >> Modified: head/sys/amd64/amd64/db_trace.c >> ============================================================================== >> --- head/sys/amd64/amd64/db_trace.c Sat Mar 3 13:20:44 2018 (r330337) >> +++ head/sys/amd64/amd64/db_trace.c Sat Mar 3 15:10:37 2018 (r330338) >> @@ -212,7 +212,9 @@ db_nextframe(struct amd64_frame **fp, db_addr_t *ip, s >> strcmp(name, "Xcpususpend") == 0 || >> strcmp(name, "Xrendezvous") == 0) >> frame_type = INTERRUPT; >> - else if (strcmp(name, "Xfast_syscall") == 0) >> + else if (strcmp(name, "Xfast_syscall") == 0 || >> + strcmp(name, "Xfast_syscall_pti") == 0 || >> + strcmp(name, "fast_syscall_common") == 0) >> frame_type = SYSCALL; > > I think you actually just want to replace Xfast_syscall with > fast_syscall_common. Neither Xfast_syscall nor Xfast_syscall_pti call any > functions before jumping to the common label, so when unwinding from a system > call you should always get the common label. (That is, I think we should > remove Xfast_syscall and Xfast_syscall_pti here. Any stack trace that > happens to find those symbols during unwinding won't have a valid SYSCALL > frame to unwind.) > I kept / added those to, sort of, decouple db_nextframe from the current implementation details. I hope that the extra code does not create too much overhead. -- Andriy Gapon From owner-svn-src-all@freebsd.org Mon Mar 12 08:52:36 2018 Return-Path: Delivered-To: svn-src-all@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 C16D6F2C888 for ; Mon, 12 Mar 2018 08:52:35 +0000 (UTC) (envelope-from oliver.pinter@balabit.com) Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 095B0700A4 for ; Mon, 12 Mar 2018 08:52:34 +0000 (UTC) (envelope-from oliver.pinter@balabit.com) Received: by mail-io0-x243.google.com with SMTP id u84so10492153iod.9 for ; Mon, 12 Mar 2018 01:52:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=balabit-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=embZVTQmaUUgc8ErBXF0L0lBrlfVLy6qYpa785Oo35c=; b=fjr9ChRAuJz5NRn1P9qjmbKJzw0j26DeTSQJTpLkKrfC3AE9isaeQTAHwg65xHH450 /4jZtNWli0P9A9JKfj/PDiwWDJn8tI9RaUOr3JgTdDgCmMjhth/USiyTyBwhqacqJB+i e2kf1C330DRu86s4cfKRicwaQEVmCqQWOTij6eN//y2JM72QVr3b10+Vw7eczCamB9Cf FVh9u7GCYlIsIYXnWf/IofYks6THQSY/2Dq4MVbIL1BIHH82UbC/WHVt97dREO8gjeg5 L3/+ihSG12ol96F4C9HqbPHJqyc2deepMc7TWeVb/NgLzf3bcijEc/JZZib2fEIf7OB/ LTpQ== 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=embZVTQmaUUgc8ErBXF0L0lBrlfVLy6qYpa785Oo35c=; b=jleUjmvX1xWc6Vd42gKiEudV2UN2XKzON4ezO9lV1aXj7sr05eUngCOqeWDMmSSxjq LAVxQuAkBf/WkRqsoyrHo2pJPMEj0VFvXlrbxREYsVbaXUXY0rd4deFXgxb4oWjWllj9 qBxG9T49xR7J548baMGU5LywLWzdvBaCULNYPulpI1TkocYusWFgLfXEOYosKq13iTxr gz3o+Dq6wtWqD1cyo3Yy9+CHcowg+Z/ySfZNt/qSUpSvZW4WmyOdL074MZ2zDlSlRQyk iEVqC9yPhbkXpDY0TtcST/GADzTiYC+BJJxX8daBj3u1p6cXFSkhwhEtgr871hBqbmOc okbw== X-Gm-Message-State: AElRT7G2JdgMT6WP4C94Gz4lYIbzRsv9UdNIOn2jFqJrChE3yZYawGbn eDpig5P2VzTp+A2QhqvJBLnUyLHYtl4O+qFzq42unryR9+U= X-Google-Smtp-Source: AG47ELvaKs/WH1JyJtap9Oiw+s9aQM6ixnXKqWUz70Jg2FWBBQnARyVC4PVS4QJ7kXVjKbnikCREoC3tIIxdYvqg2YQ= X-Received: by 10.107.48.3 with SMTP id w3mr7807269iow.84.1520844754324; Mon, 12 Mar 2018 01:52:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.192.225.141 with HTTP; Mon, 12 Mar 2018 01:52:33 -0700 (PDT) In-Reply-To: <201803112249.w2BMnkwJ044355@repo.freebsd.org> References: <201803112249.w2BMnkwJ044355@repo.freebsd.org> From: =?UTF-8?B?UGludMOpciwgT2xpdsOpcg==?= Date: Mon, 12 Mar 2018 09:52:33 +0100 Message-ID: Subject: Re: svn commit: r330784 - stable/11/sys/dev/iwm To: Eitan Adler Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 08:52:36 -0000 On Sun, Mar 11, 2018 at 11:49 PM, Eitan Adler wrote: > Author: eadler > Date: Sun Mar 11 22:49:46 2018 > New Revision: 330784 > URL: https://svnweb.freebsd.org/changeset/base/330784 > > Log: > Revert r324434 > Wrong revision here^ based on this: https://svnweb.freebsd.org/base?view=revision&revision=324434 > > Some users are reporting that it is causing issues for their hardware. > In the interest of not breaking stable, revert while we investigate. > > Modified: > stable/11/sys/dev/iwm/if_iwm.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/sys/dev/iwm/if_iwm.c > ============================================================ > ================== > --- stable/11/sys/dev/iwm/if_iwm.c Sun Mar 11 20:13:15 2018 > (r330783) > +++ stable/11/sys/dev/iwm/if_iwm.c Sun Mar 11 22:49:46 2018 > (r330784) > @@ -547,14 +547,12 @@ iwm_read_firmware(struct iwm_softc *sc, enum > iwm_ucode > { > struct iwm_fw_info *fw = &sc->sc_fw; > const struct iwm_tlv_ucode_header *uhdr; > - const struct iwm_ucode_tlv *tlv; > + struct iwm_ucode_tlv tlv; > struct iwm_ucode_capabilities *capa = &sc->ucode_capa; > enum iwm_ucode_tlv_type tlv_type; > const struct firmware *fwp; > const uint8_t *data; > - uint32_t tlv_len; > uint32_t usniffer_img; > - const uint8_t *tlv_data; > uint32_t paging_mem_size; > int num_of_cpus; > int error = 0; > @@ -607,21 +605,25 @@ iwm_read_firmware(struct iwm_softc *sc, enum > iwm_ucode > goto out; > } > > - snprintf(sc->sc_fwver, sizeof(sc->sc_fwver), "%u.%u (API ver %u)", > + snprintf(sc->sc_fwver, sizeof(sc->sc_fwver), "%d.%d (API ver %d)", > IWM_UCODE_MAJOR(le32toh(uhdr->ver)), > IWM_UCODE_MINOR(le32toh(uhdr->ver)), > IWM_UCODE_API(le32toh(uhdr->ver))); > data = uhdr->data; > len = fw->fw_fp->datasize - sizeof(*uhdr); > > - while (len >= sizeof(*tlv)) { > - len -= sizeof(*tlv); > - tlv = (const void *)data; > + while (len >= sizeof(tlv)) { > + size_t tlv_len; > + const void *tlv_data; > > - tlv_len = le32toh(tlv->length); > - tlv_type = le32toh(tlv->type); > - tlv_data = tlv->data; > + memcpy(&tlv, data, sizeof(tlv)); > + tlv_len = le32toh(tlv.length); > + tlv_type = le32toh(tlv.type); > > + len -= sizeof(tlv); > + data += sizeof(tlv); > + tlv_data = data; > + > if (len < tlv_len) { > device_printf(sc->sc_dev, > "firmware too short: %zu bytes\n", > @@ -629,21 +631,19 @@ iwm_read_firmware(struct iwm_softc *sc, enum > iwm_ucode > error = EINVAL; > goto parse_out; > } > - len -= roundup2(tlv_len, 4); > - data += sizeof(tlv) + roundup2(tlv_len, 4); > > switch ((int)tlv_type) { > case IWM_UCODE_TLV_PROBE_MAX_LEN: > - if (tlv_len != sizeof(uint32_t)) { > + if (tlv_len < sizeof(uint32_t)) { > device_printf(sc->sc_dev, > - "%s: PROBE_MAX_LEN (%d) != > sizeof(uint32_t)\n", > + "%s: PROBE_MAX_LEN (%d) < > sizeof(uint32_t)\n", > __func__, > (int) tlv_len); > error = EINVAL; > goto parse_out; > } > capa->max_probe_length = > - le32_to_cpup((const uint32_t *)tlv_data); > + le32toh(*(const uint32_t *)tlv_data); > /* limit it to something sensible */ > if (capa->max_probe_length > > IWM_SCAN_OFFLOAD_PROBE_REQ_SIZE) { > @@ -674,14 +674,6 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode > error = EINVAL; > goto parse_out; > } > - if (tlv_len % sizeof(uint32_t)) { > - device_printf(sc->sc_dev, > - "%s: IWM_UCODE_TLV_FLAGS: tlv_len (%d) > %% sizeof(uint32_t)\n", > - __func__, > - (int) tlv_len); > - error = EINVAL; > - goto parse_out; > - } > /* > * Apparently there can be many flags, but Linux > driver > * parses only the first one, and so do we. > @@ -693,7 +685,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode > * 2) TLV_FLAGS contains TLV_FLAGS_PAN > * ==> this resets TLV_PAN to itself... hnnnk > */ > - capa->flags = le32_to_cpup((const uint32_t > *)tlv_data); > + capa->flags = le32toh(*(const uint32_t *)tlv_data); > break; > case IWM_UCODE_TLV_CSCHEME: > if ((error = iwm_store_cscheme(sc, > @@ -714,7 +706,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode > error = EINVAL; > goto parse_out; > } > - num_of_cpus = le32_to_cpup((const uint32_t > *)tlv_data); > + num_of_cpus = le32toh(*(const uint32_t *)tlv_data); > if (num_of_cpus == 2) { > fw->fw_sects[IWM_UCODE_REGULAR].is_dual_cpus > = > TRUE; > @@ -788,7 +780,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode > goto parse_out; > } > sc->sc_fw.phy_config = > - le32_to_cpup((const uint32_t *)tlv_data); > + le32toh(*(const uint32_t *)tlv_data); > sc->sc_fw.valid_tx_ant = (sc->sc_fw.phy_config & > IWM_FW_PHY_CFG_TX_CHAIN) > >> > > IWM_FW_PHY_CFG_TX_CHAIN_POS; > @@ -839,7 +831,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode > error = EINVAL; > goto parse_out; > } > - paging_mem_size = le32_to_cpup((const uint32_t > *)tlv_data); > + paging_mem_size = le32toh(*(const uint32_t > *)tlv_data); > > IWM_DPRINTF(sc, IWM_DEBUG_FIRMWARE_TLV, > "%s: Paging: paging enabled (size = %u > bytes)\n", > @@ -872,7 +864,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode > goto parse_out; > } > capa->n_scan_channels = > - le32_to_cpup((const uint32_t *)tlv_data); > + le32toh(*(const uint32_t *)tlv_data); > break; > > case IWM_UCODE_TLV_FW_VERSION: > @@ -897,6 +889,9 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode > error = EINVAL; > goto parse_out; > } > + > + len -= roundup(tlv_len, 4); > + data += roundup(tlv_len, 4); > } > > KASSERT(error == 0, ("unhandled error")); > _______________________________________________ > svn-src-stable-11@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11 > To unsubscribe, send any mail to "svn-src-stable-11- > unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Mon Mar 12 09:40:47 2018 Return-Path: Delivered-To: svn-src-all@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 19EBBF300BC; Mon, 12 Mar 2018 09:40:47 +0000 (UTC) (envelope-from ae@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 C45FA71AF3; Mon, 12 Mar 2018 09:40:46 +0000 (UTC) (envelope-from ae@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 BF20A1D26; Mon, 12 Mar 2018 09:40:46 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2C9ekSU070291; Mon, 12 Mar 2018 09:40:46 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2C9ekns070289; Mon, 12 Mar 2018 09:40:46 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201803120940.w2C9ekns070289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 12 Mar 2018 09:40:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330792 - in head: sbin/ipfw sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in head: sbin/ipfw sys/netpfil/ipfw X-SVN-Commit-Revision: 330792 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 09:40:47 -0000 Author: ae Date: Mon Mar 12 09:40:46 2018 New Revision: 330792 URL: https://svnweb.freebsd.org/changeset/base/330792 Log: Do not try to reassemble IPv6 fragments in "reass" rule. ip_reass() expects IPv4 packet and will just corrupt any IPv6 packets that it gets. Until proper IPv6 fragments handling function will be implemented, pass IPv6 packets to next rule. PR: 170604 MFC after: 1 week Modified: head/sbin/ipfw/ipfw.8 head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Mon Mar 12 05:41:27 2018 (r330791) +++ head/sbin/ipfw/ipfw.8 Mon Mar 12 09:40:46 2018 (r330792) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 26, 2017 +.Dd March 12, 2018 .Dt IPFW 8 .Os .Sh NAME @@ -1135,7 +1135,7 @@ Regardless of matched a packet or not by the .Cm tcp-setmss rule, the search continues with the next rule. .It Cm reass -Queue and reassemble IP fragments. +Queue and reassemble IPv4 fragments. If the packet is not fragmented, counters are updated and processing continues with the next rule. If the packet is the last logical fragment, the packet is reassembled and, if Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Mon Mar 12 05:41:27 2018 (r330791) +++ head/sys/netpfil/ipfw/ip_fw2.c Mon Mar 12 09:40:46 2018 (r330792) @@ -3018,8 +3018,10 @@ do { \ case O_REASS: { int ip_off; - IPFW_INC_RULE_COUNTER(f, pktlen); l = 0; /* in any case exit inner loop */ + if (is_ipv6) /* IPv6 is not supported yet */ + break; + IPFW_INC_RULE_COUNTER(f, pktlen); ip_off = ntohs(ip->ip_off); /* if not fragmented, go to next rule */ From owner-svn-src-all@freebsd.org Mon Mar 12 11:28:10 2018 Return-Path: Delivered-To: svn-src-all@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 77D54F39BB3; Mon, 12 Mar 2018 11:28:10 +0000 (UTC) (envelope-from avg@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 2255F76184; Mon, 12 Mar 2018 11:28:10 +0000 (UTC) (envelope-from avg@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 1577D2F11; Mon, 12 Mar 2018 11:28:10 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CBS9oS023511; Mon, 12 Mar 2018 11:28:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CBS9O4023510; Mon, 12 Mar 2018 11:28:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803121128.w2CBS9O4023510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 12 Mar 2018 11:28:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330793 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 330793 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 11:28:10 -0000 Author: avg Date: Mon Mar 12 11:28:09 2018 New Revision: 330793 URL: https://svnweb.freebsd.org/changeset/base/330793 Log: fix r297857, do not modify CPU extension bits under virtual machines r297857 was meant for real hardware only. PR: 213155 Submitted by: mainland@apeiron.net MFC after: 1 week Modified: head/sys/x86/x86/identcpu.c Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Mon Mar 12 09:40:46 2018 (r330792) +++ head/sys/x86/x86/identcpu.c Mon Mar 12 11:28:09 2018 (r330793) @@ -1395,7 +1395,8 @@ fix_cpuid(void) * See BIOS and Kernel Developer’s Guide (BKDG) for AMD Family 15h * Models 60h-6Fh Processors, Publication # 50742. */ - if (cpu_vendor_id == CPU_VENDOR_AMD && CPUID_TO_FAMILY(cpu_id) == 0x15) { + if (vm_guest == VM_GUEST_NO && cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x15) { msr = rdmsr(MSR_EXTFEATURES); if ((msr & ((uint64_t)1 << 54)) == 0) { msr |= (uint64_t)1 << 54; From owner-svn-src-all@freebsd.org Mon Mar 12 13:29:58 2018 Return-Path: Delivered-To: svn-src-all@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 94220F4643C; Mon, 12 Mar 2018 13:29:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (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 346C07B695; Mon, 12 Mar 2018 13:29:57 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 6F71A260370; Mon, 12 Mar 2018 14:29:56 +0100 (CET) Subject: Re: svn commit: r330783 - in head/sys: amd64/include isa x86/isa To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803112013.w2BKDGJW068438@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <28322248-a2e4-3770-d6d1-54b9fdd2ad94@selasky.org> Date: Mon, 12 Mar 2018 14:29:52 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <201803112013.w2BKDGJW068438@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 13:29:58 -0000 On 03/11/18 21:13, Ian Lepore wrote: > -struct mtx atrtc_lock; > +static struct mtx atrtc_lock; > MTX_SYSINIT(atrtc_lock_init, &atrtc_lock, "atrtc", MTX_SPIN); > > +struct mtx atrtc_time_lock; > +MTX_SYSINIT(atrtc_time_lock_init, &atrtc_time_lock, "atrtc", MTX_DEF); One of my boxes panics now because there are two locks with same name! I have: debug.witness.skipspin=0 In /boot/loader.conf. --HPS From owner-svn-src-all@freebsd.org Mon Mar 12 13:32:52 2018 Return-Path: Delivered-To: svn-src-all@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 15898F468A9; Mon, 12 Mar 2018 13:32:52 +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 BF2617BB19; Mon, 12 Mar 2018 13:32:51 +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 BA05A47CC; Mon, 12 Mar 2018 13:32:51 +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 w2CDWpLc087774; Mon, 12 Mar 2018 13:32:51 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CDWprd087773; Mon, 12 Mar 2018 13:32:51 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201803121332.w2CDWprd087773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 12 Mar 2018 13:32:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330795 - head/lib/libsysdecode X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/lib/libsysdecode X-SVN-Commit-Revision: 330795 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 13:32:52 -0000 Author: bz Date: Mon Mar 12 13:32:51 2018 New Revision: 330795 URL: https://svnweb.freebsd.org/changeset/base/330795 Log: The vmresult table was missing most of the values apart from two due to extra "_" in the names we grep for. Add the "_" to the pattern. Reviewed by: jhb MFC after: 3 days Sponsored by: iXsystems, Inc. Modified: head/lib/libsysdecode/mktables Modified: head/lib/libsysdecode/mktables ============================================================================== --- head/lib/libsysdecode/mktables Mon Mar 12 12:21:19 2018 (r330794) +++ head/lib/libsysdecode/mktables Mon Mar 12 13:32:51 2018 (r330795) @@ -146,7 +146,7 @@ gen_table "socktype" "SOCK_[A-Z]+[[:space:]]+[1 gen_table "thrcreateflags" "THR_[A-Z]+[[:space:]]+0x[0-9]+" "sys/thr.h" gen_table "umtxop" "UMTX_OP_[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/umtx.h" gen_table "vmprot" "VM_PROT_[A-Z]+[[:space:]]+\(\(vm_prot_t\)[[:space:]]+0x[0-9]+\)" "vm/vm.h" -gen_table "vmresult" "KERN_[A-Z]+[[:space:]]+[0-9]+" "vm/vm_param.h" +gen_table "vmresult" "KERN_[A-Z_]+[[:space:]]+[0-9]+" "vm/vm_param.h" gen_table "wait6opt" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h" gen_table "seekwhence" "SEEK_[A-Z]+[[:space:]]+[0-9]+" "sys/unistd.h" gen_table "fcntlcmd" "F_[A-Z0-9_]+[[:space:]]+[0-9]+[[:space:]]+" "sys/fcntl.h" "F_CANCEL|F_..LCK" From owner-svn-src-all@freebsd.org Mon Mar 12 15:17:17 2018 Return-Path: Delivered-To: svn-src-all@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 DF352F4E25A; Mon, 12 Mar 2018 15:17:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D114804FD; Mon, 12 Mar 2018 15:17:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86331575F; Mon, 12 Mar 2018 15:17:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CFHGVB037812; Mon, 12 Mar 2018 15:17:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CFHG4I037811; Mon, 12 Mar 2018 15:17:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803121517.w2CFHG4I037811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Mar 2018 15:17:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330796 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 330796 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 15:17:17 -0000 Author: imp Date: Mon Mar 12 15:17:16 2018 New Revision: 330796 URL: https://svnweb.freebsd.org/changeset/base/330796 Log: Tighten up periph lock to avoid some races Make sure the periph lock is held around rmw access to softc data, espeically flags, including work flags in iosched. Add asserts for the periph lock where it should be held. PR: 226510 Sponsored by: Netflix Differential Review: https://reviews.freebsd.org/D14456 Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Mon Mar 12 13:32:51 2018 (r330795) +++ head/sys/cam/scsi/scsi_da.c Mon Mar 12 15:17:16 2018 (r330796) @@ -1909,6 +1909,7 @@ daoninvalidate(struct cam_periph *periph) { struct da_softc *softc; + cam_periph_assert(periph, MA_OWNED); softc = (struct da_softc *)periph->softc; /* @@ -2038,6 +2039,7 @@ daasync(void *callback_arg, u_int32_t code, * Handle all UNIT ATTENTIONs except our own, * as they will be handled by daerror(). */ + cam_periph_lock(periph); if (xpt_path_periph(ccb->ccb_h.path) != periph && scsi_extract_sense_ccb(ccb, &error_code, &sense_key, &asc, &ascq)) { @@ -2056,16 +2058,19 @@ daasync(void *callback_arg, u_int32_t code, dareprobe(periph); } } + cam_periph_unlock(periph); break; } case AC_SCSI_AEN: softc = (struct da_softc *)periph->softc; + cam_periph_lock(periph); if (!cam_iosched_has_work_flags(softc->cam_iosched, DA_WORK_TUR)) { if (da_periph_acquire(periph, DA_REF_TUR) == 0) { cam_iosched_set_work_flags(softc->cam_iosched, DA_WORK_TUR); daschedule(periph); } } + cam_periph_unlock(periph); /* FALLTHROUGH */ case AC_SENT_BDR: case AC_BUS_RESET: @@ -2077,15 +2082,19 @@ daasync(void *callback_arg, u_int32_t code, * Don't fail on the expected unit attention * that will occur. */ + cam_periph_lock(periph); softc->flags |= DA_FLAG_RETRY_UA; LIST_FOREACH(ccbh, &softc->pending_ccbs, periph_links.le) ccbh->ccb_state |= DA_CCB_RETRY_UA; + cam_periph_unlock(periph); break; } case AC_INQ_CHANGED: + cam_periph_lock(periph); softc = (struct da_softc *)periph->softc; softc->flags &= ~DA_FLAG_PROBED; dareprobe(periph); + cam_periph_unlock(periph); break; default: break; @@ -2115,7 +2124,9 @@ dasysctlinit(void *context, int pending) snprintf(tmpstr2, sizeof(tmpstr2), "%d", periph->unit_number); sysctl_ctx_init(&softc->sysctl_ctx); + cam_periph_lock(periph); softc->flags |= DA_FLAG_SCTX_INIT; + cam_periph_unlock(periph); softc->sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&softc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_kern_cam_da), OID_AUTO, tmpstr2, CTLFLAG_RD, 0, tmpstr, "device_index"); @@ -2647,7 +2658,7 @@ daregister(struct cam_periph *periph, void *arg) callout_init_mtx(&softc->sendordered_c, cam_periph_mtx(periph), 0); callout_reset(&softc->sendordered_c, (da_default_timeout * hz) / DA_ORDEREDTAG_INTERVAL, - dasendorderedtag, softc); + dasendorderedtag, periph); cam_periph_unlock(periph); /* @@ -3075,6 +3086,7 @@ dastart(struct cam_periph *periph, union ccb *start_cc { struct da_softc *softc; + cam_periph_assert(periph, MA_OWNED); softc = (struct da_softc *)periph->softc; CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("dastart\n")); @@ -4625,7 +4637,9 @@ dadone(struct cam_periph *periph, union ccb *done_ccb) ((have_sense) && (error_code == SSD_CURRENT_ERROR) && (sense_key == SSD_KEY_ILLEGAL_REQUEST)))) { + cam_periph_lock(periph); softc->flags &= ~DA_FLAG_CAN_RC16; + cam_periph_unlock(periph); free(rdcap, M_SCSIDA); xpt_release_ccb(done_ccb); softc->state = DA_STATE_PROBE_RC; @@ -5012,6 +5026,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb) "GEOM::rotation_rate", M_NOWAIT); } + cam_periph_assert(periph, MA_OWNED); if (ata_params->capabilities1 & ATA_SUPPORT_DMA) softc->flags |= DA_FLAG_CAN_ATA_DMA; @@ -5110,6 +5125,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb) { int error; + cam_periph_lock(periph); if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { error = 0; softc->valid_logdir_len = 0; @@ -5163,6 +5179,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb) } } } + cam_periph_unlock(periph); free(csio->data_ptr, M_SCSIDA); @@ -5180,6 +5197,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb) { int error; + cam_periph_lock(periph); if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { off_t entries_offset, max_entries; error = 0; @@ -5250,6 +5268,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb) } } } + cam_periph_unlock(periph); free(csio->data_ptr, M_SCSIDA); @@ -5341,7 +5360,9 @@ dadone(struct cam_periph *periph, union ccb *done_ccb) * Supported Capabilities page, clear the * flag... */ + cam_periph_lock(periph); softc->flags &= ~DA_FLAG_CAN_ATA_SUPCAP; + cam_periph_unlock(periph); /* * And clear zone capabilities. */ @@ -5438,8 +5459,10 @@ dadone(struct cam_periph *periph, union ccb *done_ccb) if (error == ERESTART) return; else if (error != 0) { + cam_periph_lock(periph); softc->flags &= ~DA_FLAG_CAN_ATA_ZONE; softc->flags &= ~DA_ZONE_FLAG_SET_MASK; + cam_periph_unlock(periph); if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { @@ -5588,6 +5611,8 @@ daerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t periph = xpt_path_periph(ccb->ccb_h.path); softc = (struct da_softc *)periph->softc; + cam_periph_assert(periph, MA_OWNED); + /* * Automatically detect devices that do not support * READ(6)/WRITE(6) and upgrade to using 10 byte cdbs. @@ -5682,6 +5707,7 @@ daprevent(struct cam_periph *periph, int action) union ccb *ccb; int error; + cam_periph_assert(periph, MA_OWNED); softc = (struct da_softc *)periph->softc; if (((action == PR_ALLOW) @@ -5837,8 +5863,10 @@ dasetgeom(struct cam_periph *periph, uint32_t block_le static void dasendorderedtag(void *arg) { - struct da_softc *softc = arg; + struct cam_periph *periph = arg; + struct da_softc *softc = periph->softc; + cam_periph_assert(periph, MA_OWNED); if (da_send_ordered) { if (!LIST_EMPTY(&softc->pending_ccbs)) { if ((softc->flags & DA_FLAG_WAS_OTAG) == 0) @@ -5846,10 +5874,11 @@ dasendorderedtag(void *arg) softc->flags &= ~DA_FLAG_WAS_OTAG; } } + /* Queue us up again */ callout_reset(&softc->sendordered_c, (da_default_timeout * hz) / DA_ORDEREDTAG_INTERVAL, - dasendorderedtag, softc); + dasendorderedtag, periph); } /* From owner-svn-src-all@freebsd.org Mon Mar 12 15:26:12 2018 Return-Path: Delivered-To: svn-src-all@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 EB9C6F4EF8D; Mon, 12 Mar 2018 15:26:11 +0000 (UTC) (envelope-from ian@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 9A43E80D0E; Mon, 12 Mar 2018 15:26:11 +0000 (UTC) (envelope-from ian@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 952075929; Mon, 12 Mar 2018 15:26:11 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CFQBxf042984; Mon, 12 Mar 2018 15:26:11 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CFQBKv042983; Mon, 12 Mar 2018 15:26:11 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803121526.w2CFQBKv042983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 12 Mar 2018 15:26:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330797 - head/sys/x86/isa X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/x86/isa X-SVN-Commit-Revision: 330797 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 15:26:12 -0000 Author: ian Date: Mon Mar 12 15:26:11 2018 New Revision: 330797 URL: https://svnweb.freebsd.org/changeset/base/330797 Log: Give the atrtc_time_lock a unique name. Reported by: hps@ Modified: head/sys/x86/isa/atrtc.c Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Mon Mar 12 15:17:16 2018 (r330796) +++ head/sys/x86/isa/atrtc.c Mon Mar 12 15:26:11 2018 (r330797) @@ -64,7 +64,7 @@ static struct mtx atrtc_lock; MTX_SYSINIT(atrtc_lock_init, &atrtc_lock, "atrtc", MTX_SPIN); struct mtx atrtc_time_lock; -MTX_SYSINIT(atrtc_time_lock_init, &atrtc_time_lock, "atrtc", MTX_DEF); +MTX_SYSINIT(atrtc_time_lock_init, &atrtc_time_lock, "atrtc_time", MTX_DEF); int atrtcclock_disable = 0; From owner-svn-src-all@freebsd.org Mon Mar 12 15:34:55 2018 Return-Path: Delivered-To: svn-src-all@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 9EAC4F4F88E for ; Mon, 12 Mar 2018 15:34:55 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 256648133E for ; Mon, 12 Mar 2018 15:34:54 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: d6b70d63-260a-11e8-bb8e-b35b57339d60 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.ore.mailhop.org (Halon) with ESMTPSA id d6b70d63-260a-11e8-bb8e-b35b57339d60; Mon, 12 Mar 2018 15:34:23 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w2CFYpRP016438; Mon, 12 Mar 2018 09:34:51 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1520868891.84937.177.camel@freebsd.org> Subject: Re: svn commit: r330780 - in head/sys: amd64/include isa x86/isa From: Ian Lepore To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 12 Mar 2018 09:34:51 -0600 In-Reply-To: <20180311212539.GD76926@kib.kiev.ua> References: <201803111922.w2BJMwr8043084@repo.freebsd.org> <20180311195800.GC76926@kib.kiev.ua> <1520799639.84937.154.camel@freebsd.org> <20180311212539.GD76926@kib.kiev.ua> 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 15:34:55 -0000 On Sun, 2018-03-11 at 23:25 +0200, Konstantin Belousov wrote: > On Sun, Mar 11, 2018 at 02:20:39PM -0600, Ian Lepore wrote: > > > > On Sun, 2018-03-11 at 21:58 +0200, Konstantin Belousov wrote: > > > > > > On Sun, Mar 11, 2018 at 07:22:58PM +0000, Ian Lepore wrote: > > > > > > > > > > > > [...] > > > > Unfortunately, this reverts one type of wrong locking back to another. > >  The need is to prevent access to the atrtc hardware if efi is > > accessing it, and the locking I just reverted to that uses a sleepable > > mutex only protects against inittodr()/resettodr() access, but not > > against nvram(4) or if the atrtc is being used as an eventtimer (of > > course nobody uses it for that, but the driver supports it). > > > > I have some pending changes that cause the atrtc driver to just not > > attach at all if the efirtc driver attached, but they're stacked up > > behind some other changes in phab.  And that still doesn't fix the > > nvram(4) part of it. > Not attaching atrtc if efirtc is attached sounds reasonable. But then > you should also disable efirt attach if atrtc is on. One possible issue > is that efirt is typicall loadable, while atrtc is compiled into the > kernel, which means that efirt would become virtually unusable. > Even if efirt is loaded (in loader(8)) the efirtc driver will still attach instead of atrtc, because it's a direct child of nexus and gets the first opportunity to probe and attach.  But you raise a good point, I should make it handle the case where it gets kldload'd when atrtc is already attached. > For nvram(4), you can take the atrtc_time_lock around accesses in addition > to the atrtc_lock, instead of providing exclusivity on the level of drivers > attach. It occurs to me that an even better fix for all of this would be to remove support for atrtc being an eventtimer.  That allows removing the interrupt filter handler, and then there's no need for a spinlock at all, a sleepable mutex works fine for all accesses. Does anybody really need an eventtimer that runs only at a fixed periodic rate of 32khz in 2018? -- Ian From owner-svn-src-all@freebsd.org Mon Mar 12 15:35:26 2018 Return-Path: Delivered-To: svn-src-all@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 3EE8FF4F90E; Mon, 12 Mar 2018 15:35:26 +0000 (UTC) (envelope-from emaste@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 D4A228145E; Mon, 12 Mar 2018 15:35:25 +0000 (UTC) (envelope-from emaste@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 CB8555AB3; Mon, 12 Mar 2018 15:35:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CFZPlF047900; Mon, 12 Mar 2018 15:35:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CFZP83047893; Mon, 12 Mar 2018 15:35:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803121535.w2CFZP83047893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Mar 2018 15:35:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330798 - in head/sys: compat/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: compat/linux i386/linux X-SVN-Commit-Revision: 330798 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 15:35:26 -0000 Author: emaste Date: Mon Mar 12 15:35:24 2018 New Revision: 330798 URL: https://svnweb.freebsd.org/changeset/base/330798 Log: Linuxulator: apply style(9) to return Sponsored by: Turing Robotic Industries Inc. Modified: head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_signal.c head/sys/compat/linux/linux_stats.c head/sys/compat/linux/linux_util.c head/sys/i386/linux/imgact_linux.c head/sys/i386/linux/linux_machdep.c Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Mon Mar 12 15:26:11 2018 (r330797) +++ head/sys/compat/linux/linux_ioctl.c Mon Mar 12 15:35:24 2018 (r330798) @@ -385,7 +385,7 @@ linux_to_bsd_speed(int code, struct speedtab *table) for ( ; table->sp_code != -1; table++) if (table->sp_code == code) return (table->sp_speed); - return -1; + return (-1); } static int @@ -394,7 +394,7 @@ bsd_to_linux_speed(int speed, struct speedtab *table) for ( ; table->sp_speed != -1; table++) if (table->sp_speed == speed) return (table->sp_code); - return -1; + return (-1); } static void @@ -2668,7 +2668,7 @@ static int linux_ioctl_drm(struct thread *td, struct linux_ioctl_args *args) { args->cmd = SETDIR(args->cmd); - return sys_ioctl(td, (struct ioctl_args *)args); + return (sys_ioctl(td, (struct ioctl_args *)args)); } #ifdef COMPAT_LINUX32 @@ -3275,9 +3275,9 @@ linux_to_bsd_v4l2_format(struct l_v4l2_format *lvf, st * XXX TODO - needs 32 -> 64 bit conversion: * (unused by webcams?) */ - return EINVAL; + return (EINVAL); memcpy(&vf->fmt, &lvf->fmt, sizeof(vf->fmt)); - return 0; + return (0); } static int @@ -3293,9 +3293,9 @@ bsd_to_linux_v4l2_format(struct v4l2_format *vf, struc * XXX TODO - needs 32 -> 64 bit conversion: * (unused by webcams?) */ - return EINVAL; + return (EINVAL); memcpy(&lvf->fmt, &vf->fmt, sizeof(vf->fmt)); - return 0; + return (0); } static int linux_ioctl_v4l2(struct thread *td, struct linux_ioctl_args *args) @@ -3315,7 +3315,7 @@ linux_ioctl_v4l2(struct thread *td, struct linux_ioctl case LINUX_VIDIOC_RESERVED: case LINUX_VIDIOC_LOG_STATUS: if ((args->cmd & IOC_DIRMASK) != LINUX_IOC_VOID) - return ENOIOCTL; + return (ENOIOCTL); args->cmd = (args->cmd & 0xffff) | IOC_VOID; break; Modified: head/sys/compat/linux/linux_signal.c ============================================================================== --- head/sys/compat/linux/linux_signal.c Mon Mar 12 15:26:11 2018 (r330797) +++ head/sys/compat/linux/linux_signal.c Mon Mar 12 15:35:24 2018 (r330798) @@ -279,7 +279,7 @@ linux_rt_sigprocmask(struct thread *td, struct linux_r #endif if (args->sigsetsize != sizeof(l_sigset_t)) - return EINVAL; + return (EINVAL); if (args->mask != NULL) { error = copyin(args->mask, &set, sizeof(l_sigset_t)); @@ -377,7 +377,7 @@ linux_rt_sigpending(struct thread *td, struct linux_rt l_sigset_t lset; if (args->sigsetsize > sizeof(lset)) - return EINVAL; + return (EINVAL); /* NOT REACHED */ #ifdef DEBUG Modified: head/sys/compat/linux/linux_stats.c ============================================================================== --- head/sys/compat/linux/linux_stats.c Mon Mar 12 15:26:11 2018 (r330797) +++ head/sys/compat/linux/linux_stats.c Mon Mar 12 15:35:24 2018 (r330798) @@ -436,7 +436,7 @@ linux_statfs64(struct thread *td, struct linux_statfs6 int error; if (args->bufsize != sizeof(struct l_statfs64)) - return EINVAL; + return (EINVAL); LCONVPATHEXIST(td, args->path, &path); Modified: head/sys/compat/linux/linux_util.c ============================================================================== --- head/sys/compat/linux/linux_util.c Mon Mar 12 15:26:11 2018 (r330797) +++ head/sys/compat/linux/linux_util.c Mon Mar 12 15:35:24 2018 (r330798) @@ -116,7 +116,7 @@ linux_driver_get_name_dev(device_t dev) const char *device_name = device_get_name(dev); if (device_name == NULL) - return NULL; + return (NULL); TAILQ_FOREACH(de, &devices, list) { if (strcmp(device_name, de->entry.bsd_driver_name) == 0) return (de->entry.linux_driver_name); @@ -133,7 +133,7 @@ linux_driver_get_major_minor(const char *node, int *ma size_t sz; if (node == NULL || major == NULL || minor == NULL) - return 1; + return (1); sz = sizeof("pts/") - 1; if (strncmp(node, "pts/", sz) == 0 && node[sz] != '\0') { Modified: head/sys/i386/linux/imgact_linux.c ============================================================================== --- head/sys/i386/linux/imgact_linux.c Mon Mar 12 15:26:11 2018 (r330797) +++ head/sys/i386/linux/imgact_linux.c Mon Mar 12 15:35:24 2018 (r330798) @@ -69,7 +69,7 @@ exec_linux_imgact(struct image_params *imgp) int error; if (((a_out->a_magic >> 16) & 0xff) != 0x64) - return -1; + return (-1); /* * Set file/virtual offset based on a.out variant. Modified: head/sys/i386/linux/linux_machdep.c ============================================================================== --- head/sys/i386/linux/linux_machdep.c Mon Mar 12 15:26:11 2018 (r330797) +++ head/sys/i386/linux/linux_machdep.c Mon Mar 12 15:35:24 2018 (r330798) @@ -775,7 +775,7 @@ int linux_mq_open(struct thread *td, struct linux_mq_open_args *args) { #ifdef P1003_1B_MQUEUE - return sys_kmq_open(td, (struct kmq_open_args *) args); + return (sys_kmq_open(td, (struct kmq_open_args *)args)); #else return (ENOSYS); #endif @@ -785,7 +785,7 @@ int linux_mq_unlink(struct thread *td, struct linux_mq_unlink_args *args) { #ifdef P1003_1B_MQUEUE - return sys_kmq_unlink(td, (struct kmq_unlink_args *) args); + return (sys_kmq_unlink(td, (struct kmq_unlink_args *)args)); #else return (ENOSYS); #endif @@ -795,7 +795,7 @@ int linux_mq_timedsend(struct thread *td, struct linux_mq_timedsend_args *args) { #ifdef P1003_1B_MQUEUE - return sys_kmq_timedsend(td, (struct kmq_timedsend_args *) args); + return (sys_kmq_timedsend(td, (struct kmq_timedsend_args *)args)); #else return (ENOSYS); #endif @@ -805,7 +805,7 @@ int linux_mq_timedreceive(struct thread *td, struct linux_mq_timedreceive_args *args) { #ifdef P1003_1B_MQUEUE - return sys_kmq_timedreceive(td, (struct kmq_timedreceive_args *) args); + return (sys_kmq_timedreceive(td, (struct kmq_timedreceive_args *)args)); #else return (ENOSYS); #endif @@ -815,7 +815,7 @@ int linux_mq_notify(struct thread *td, struct linux_mq_notify_args *args) { #ifdef P1003_1B_MQUEUE - return sys_kmq_notify(td, (struct kmq_notify_args *) args); + return (sys_kmq_notify(td, (struct kmq_notify_args *)args)); #else return (ENOSYS); #endif @@ -825,7 +825,7 @@ int linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args) { #ifdef P1003_1B_MQUEUE - return sys_kmq_setattr(td, (struct kmq_setattr_args *) args); + return (sys_kmq_setattr(td, (struct kmq_setattr_args *)args)); #else return (ENOSYS); #endif From owner-svn-src-all@freebsd.org Mon Mar 12 15:45:51 2018 Return-Path: Delivered-To: svn-src-all@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 CEF97F5035B; Mon, 12 Mar 2018 15:45:51 +0000 (UTC) (envelope-from emaste@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 7D50B81C9E; Mon, 12 Mar 2018 15:45:51 +0000 (UTC) (envelope-from emaste@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 7703A5C31; Mon, 12 Mar 2018 15:45:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CFjpFK052668; Mon, 12 Mar 2018 15:45:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CFjpxf052666; Mon, 12 Mar 2018 15:45:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803121545.w2CFjpxf052666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Mar 2018 15:45:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330799 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330799 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 15:45:52 -0000 Author: emaste Date: Mon Mar 12 15:45:50 2018 New Revision: 330799 URL: https://svnweb.freebsd.org/changeset/base/330799 Log: ANSIfy sys/kern/imgact_* Modified: head/sys/kern/imgact_elf.c head/sys/kern/imgact_gzip.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Mon Mar 12 15:35:24 2018 (r330798) +++ head/sys/kern/imgact_elf.c Mon Mar 12 15:45:50 2018 (r330799) @@ -1467,9 +1467,7 @@ done: * program header entry. */ static void -cb_put_phdr(entry, closure) - vm_map_entry_t entry; - void *closure; +cb_put_phdr(vm_map_entry_t entry, void *closure) { struct phdr_closure *phc = (struct phdr_closure *)closure; Elf_Phdr *phdr = phc->phdr; Modified: head/sys/kern/imgact_gzip.c ============================================================================== --- head/sys/kern/imgact_gzip.c Mon Mar 12 15:35:24 2018 (r330798) +++ head/sys/kern/imgact_gzip.c Mon Mar 12 15:45:50 2018 (r330799) @@ -69,8 +69,7 @@ static int do_aout_hdr(struct imgact_gzip *); static int Flush(void *vp, u_char *, u_long siz); static int -exec_gzip_imgact(imgp) - struct image_params *imgp; +exec_gzip_imgact(struct image_params *imgp) { int error; const u_char *p = (const u_char *) imgp->image_header; From owner-svn-src-all@freebsd.org Mon Mar 12 15:56:29 2018 Return-Path: Delivered-To: svn-src-all@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 7D6E3F50D91; Mon, 12 Mar 2018 15:56:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0776582626; Mon, 12 Mar 2018 15:56:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w2CFuIqj034698 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 12 Mar 2018 17:56:21 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w2CFuIqj034698 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w2CFuHAB034697; Mon, 12 Mar 2018 17:56:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 12 Mar 2018 17:56:17 +0200 From: Konstantin Belousov To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330780 - in head/sys: amd64/include isa x86/isa Message-ID: <20180312155617.GF76926@kib.kiev.ua> References: <201803111922.w2BJMwr8043084@repo.freebsd.org> <20180311195800.GC76926@kib.kiev.ua> <1520799639.84937.154.camel@freebsd.org> <20180311212539.GD76926@kib.kiev.ua> <1520868891.84937.177.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1520868891.84937.177.camel@freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 15:56:29 -0000 On Mon, Mar 12, 2018 at 09:34:51AM -0600, Ian Lepore wrote: > On Sun, 2018-03-11 at 23:25 +0200, Konstantin Belousov wrote: > > On Sun, Mar 11, 2018 at 02:20:39PM -0600, Ian Lepore wrote: > > > > > > On Sun, 2018-03-11 at 21:58 +0200, Konstantin Belousov wrote: > > > > > > > > On Sun, Mar 11, 2018 at 07:22:58PM +0000, Ian Lepore wrote: > > > > > > > > > > > > > > > [...] > > > > > > Unfortunately, this reverts one type of wrong locking back to another. > > > šThe need is to prevent access to the atrtc hardware if efi is > > > accessing it, and the locking I just reverted to that uses a sleepable > > > mutex only protects against inittodr()/resettodr() access, but not > > > against nvram(4) or if the atrtc is being used as an eventtimer (of > > > course nobody uses it for that, but the driver supports it). > > > > > > I have some pending changes that cause the atrtc driver to just not > > > attach at all if the efirtc driver attached, but they're stacked up > > > behind some other changes in phab. šAnd that still doesn't fix the > > > nvram(4) part of it. > > Not attaching atrtc if efirtc is attached sounds reasonable. But then > > you should also disable efirt attach if atrtc is on. One possible issue > > is that efirt is typicall loadable, while atrtc is compiled into the > > kernel, which means that efirt would become virtually unusable. > > > > Even if efirt is loaded (in loader(8)) the efirtc driver will still > attach instead of atrtc, because it's a direct child of nexus and gets > the first opportunity to probe and attach. šBut you raise a good point, > I should make it handle the case where it gets kldload'd when atrtc is > already attached. > > > For nvram(4), you can take the atrtc_time_lock around accesses in addition > > to the atrtc_lock, instead of providing exclusivity on the level of drivers > > attach. > > It occurs to me that an even better fix for all of this would be to > remove support for atrtc being an eventtimer. šThat allows removing the > interrupt filter handler, and then there's no need for a spinlock at > all, a sleepable mutex works fine for all accesses. > > Does anybody really need an eventtimer that runs only at a fixed > periodic rate of 32khz in 2018? Problem is that atrtc is what old machines use. If we have HPET or better LAPIC timers, then we do not need atrtc at all, of course. But e.g. 486 do not have them. I am not even sure about early amd64 machines. Definitely any machine that needs EFIRT has both HPET and LAPIC, I like the idea of not providing eventtimer backed by atrtc if feasible. Might be, make this a compile or runtime option, unless this over-complicates the code. From owner-svn-src-all@freebsd.org Mon Mar 12 15:57:56 2018 Return-Path: Delivered-To: svn-src-all@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 8E795F50F22; Mon, 12 Mar 2018 15:57:56 +0000 (UTC) (envelope-from brooks@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 3FCC9827EB; Mon, 12 Mar 2018 15:57:56 +0000 (UTC) (envelope-from brooks@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 360B05DDF; Mon, 12 Mar 2018 15:57:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CFvuut057957; Mon, 12 Mar 2018 15:57:56 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CFvtYF057954; Mon, 12 Mar 2018 15:57:55 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803121557.w2CFvtYF057954@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 12 Mar 2018 15:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330800 - stable/11/lib/libc/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/11/lib/libc/sys X-SVN-Commit-Revision: 330800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 15:57:56 -0000 Author: brooks Date: Mon Mar 12 15:57:55 2018 New Revision: 330800 URL: https://svnweb.freebsd.org/changeset/base/330800 Log: MFC r330409: Refer to SysV IPC permissions as numeric constants. POSIX defines no macros for these permissions. Also remove unneeded headers from synopsis. PR: 225905 Reviewed by: wblock Differential Revision: https://reviews.freebsd.org/D14461 Modified: stable/11/lib/libc/sys/msgget.2 stable/11/lib/libc/sys/semget.2 stable/11/lib/libc/sys/shmget.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/msgget.2 ============================================================================== --- stable/11/lib/libc/sys/msgget.2 Mon Mar 12 15:45:50 2018 (r330799) +++ stable/11/lib/libc/sys/msgget.2 Mon Mar 12 15:57:55 2018 (r330800) @@ -31,7 +31,7 @@ .\" $FreeBSD$ .\" .\"/ -.Dd July 9, 2009 +.Dd March 4, 2018 .Dt MSGGET 2 .Os .Sh NAME @@ -40,8 +40,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In sys/ipc.h .In sys/msg.h .Ft int .Fn msgget "key_t key" "int msgflg" @@ -83,7 +81,22 @@ are set to the effective gid of the calling process. .It .Va msg_perm.mode is set to the lower 9 bits of -.Fa msgflg . +.Fa msgflg +which are set by ORing these constants: +.Bl -tag -width 0000 +.It Dv 0400 +Read access for user. +.It Dv 0200 +Write access for user. +.It Dv 0040 +Read access for group. +.It Dv 0020 +Write access for group. +.It Dv 0004 +Read access for other. +.It Dv 0002 +Write access for other. +.El .It .Va msg_cbytes , .Va msg_qnum , Modified: stable/11/lib/libc/sys/semget.2 ============================================================================== --- stable/11/lib/libc/sys/semget.2 Mon Mar 12 15:45:50 2018 (r330799) +++ stable/11/lib/libc/sys/semget.2 Mon Mar 12 15:57:55 2018 (r330800) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2016 +.Dd March 4, 2018 .Dt SEMGET 2 .Os .Sh NAME @@ -34,8 +34,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In sys/ipc.h .In sys/sem.h .Ft int .Fn semget "key_t key" "int nsems" "int flag" @@ -77,23 +75,22 @@ may be used to generate a key from a pathname. .\" Likewise for this section, except SHM_* becomes SEM_*. .\" .Pp -The mode of a newly created IPC object is determined by -.Em OR Ns 'ing -the following constants into the +The mode of a newly created IPC object is determined by ORing these constants +into the .Fa flag argument: -.Bl -tag -width XSEM_WXX6XXX -.It Dv SEM_R +.Bl -tag -width 0000 +.It Dv 0400 Read access for user. -.It Dv SEM_A +.It Dv 0200 Alter access for user. -.It Dv ( SEM_R>>3 ) +.It Dv 0040 Read access for group. -.It Dv ( SEM_A>>3 ) +.It Dv 0020 Alter access for group. -.It Dv ( SEM_R>>6 ) +.It Dv 0004 Read access for other. -.It Dv ( SEM_A>>6 ) +.It Dv 0002 Alter access for other. .El .Pp Modified: stable/11/lib/libc/sys/shmget.2 ============================================================================== --- stable/11/lib/libc/sys/shmget.2 Mon Mar 12 15:45:50 2018 (r330799) +++ stable/11/lib/libc/sys/shmget.2 Mon Mar 12 15:57:55 2018 (r330800) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 17, 2010 +.Dd March 4, 2018 .Dt SHMGET 2 .Os .Sh NAME @@ -34,8 +34,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In sys/ipc.h .In sys/shm.h .Ft int .Fn shmget "key_t key" "size_t size" "int flag" @@ -74,22 +72,21 @@ may be used to generate a key from a pathname. .El .Pp The mode of a newly created IPC object is determined by -.Em OR Ns 'ing -the following constants into the +which are set by ORing these constants into the .Fa flag argument: -.Bl -tag -width XSHM_WXX6XXX -.It Dv S_IRUSR +.Bl -tag -width 0000 +.It Dv 0400 Read access for owner. -.It Dv S_IWUSR +.It Dv 0200 Write access for owner. -.It Dv S_IRGRP +.It Dv 0040 Read access for group. -.It Dv S_IWGRP +.It Dv 0020 Write access for group. -.It Dv S_IROTH +.It Dv 0004 Read access for other. -.It Dv S_IWOTH +.It Dv 0002 Write access for other. .El .\" @@ -142,5 +139,4 @@ already exists. .Xr shmat 2 , .Xr shmctl 2 , .Xr shmdt 2 , -.Xr stat 2 , .Xr ftok 3 From owner-svn-src-all@freebsd.org Mon Mar 12 16:04:11 2018 Return-Path: Delivered-To: svn-src-all@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 AE849F51686; Mon, 12 Mar 2018 16:04:11 +0000 (UTC) (envelope-from brooks@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 5CF1A82EA4; Mon, 12 Mar 2018 16:04:11 +0000 (UTC) (envelope-from brooks@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 533A25F60; Mon, 12 Mar 2018 16:04:11 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CG4BPk063014; Mon, 12 Mar 2018 16:04:11 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CG4Ac2063011; Mon, 12 Mar 2018 16:04:10 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803121604.w2CG4Ac2063011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 12 Mar 2018 16:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330801 - stable/10/lib/libc/sys X-SVN-Group: stable-10 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/10/lib/libc/sys X-SVN-Commit-Revision: 330801 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 16:04:11 -0000 Author: brooks Date: Mon Mar 12 16:04:10 2018 New Revision: 330801 URL: https://svnweb.freebsd.org/changeset/base/330801 Log: MFC r330409: Refer to SysV IPC permissions as numeric constants. POSIX defines no macros for these permissions. Also remove unneeded headers from synopsis. PR: 225905 Reviewed by: wblock Differential Revision: https://reviews.freebsd.org/D14461 Modified: stable/10/lib/libc/sys/msgget.2 stable/10/lib/libc/sys/semget.2 stable/10/lib/libc/sys/shmget.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/msgget.2 ============================================================================== --- stable/10/lib/libc/sys/msgget.2 Mon Mar 12 15:57:55 2018 (r330800) +++ stable/10/lib/libc/sys/msgget.2 Mon Mar 12 16:04:10 2018 (r330801) @@ -31,7 +31,7 @@ .\" $FreeBSD$ .\" .\"/ -.Dd July 9, 2009 +.Dd March 4, 2018 .Dt MSGGET 2 .Os .Sh NAME @@ -40,8 +40,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In sys/ipc.h .In sys/msg.h .Ft int .Fn msgget "key_t key" "int msgflg" @@ -83,7 +81,22 @@ are set to the effective gid of the calling process. .It .Va msg_perm.mode is set to the lower 9 bits of -.Fa msgflg . +.Fa msgflg +which are set by ORing these constants: +.Bl -tag -width 0000 +.It Dv 0400 +Read access for user. +.It Dv 0200 +Write access for user. +.It Dv 0040 +Read access for group. +.It Dv 0020 +Write access for group. +.It Dv 0004 +Read access for other. +.It Dv 0002 +Write access for other. +.El .It .Va msg_cbytes , .Va msg_qnum , Modified: stable/10/lib/libc/sys/semget.2 ============================================================================== --- stable/10/lib/libc/sys/semget.2 Mon Mar 12 15:57:55 2018 (r330800) +++ stable/10/lib/libc/sys/semget.2 Mon Mar 12 16:04:10 2018 (r330801) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2016 +.Dd March 4, 2018 .Dt SEMGET 2 .Os .Sh NAME @@ -34,8 +34,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In sys/ipc.h .In sys/sem.h .Ft int .Fn semget "key_t key" "int nsems" "int flag" @@ -77,23 +75,22 @@ may be used to generate a key from a pathname. .\" Likewise for this section, except SHM_* becomes SEM_*. .\" .Pp -The mode of a newly created IPC object is determined by -.Em OR Ns 'ing -the following constants into the +The mode of a newly created IPC object is determined by ORing these constants +into the .Fa flag argument: -.Bl -tag -width XSEM_WXX6XXX -.It Dv SEM_R +.Bl -tag -width 0000 +.It Dv 0400 Read access for user. -.It Dv SEM_A +.It Dv 0200 Alter access for user. -.It Dv ( SEM_R>>3 ) +.It Dv 0040 Read access for group. -.It Dv ( SEM_A>>3 ) +.It Dv 0020 Alter access for group. -.It Dv ( SEM_R>>6 ) +.It Dv 0004 Read access for other. -.It Dv ( SEM_A>>6 ) +.It Dv 0002 Alter access for other. .El .Pp Modified: stable/10/lib/libc/sys/shmget.2 ============================================================================== --- stable/10/lib/libc/sys/shmget.2 Mon Mar 12 15:57:55 2018 (r330800) +++ stable/10/lib/libc/sys/shmget.2 Mon Mar 12 16:04:10 2018 (r330801) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 17, 2010 +.Dd March 4, 2018 .Dt SHMGET 2 .Os .Sh NAME @@ -34,8 +34,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In sys/ipc.h .In sys/shm.h .Ft int .Fn shmget "key_t key" "size_t size" "int flag" @@ -74,22 +72,21 @@ may be used to generate a key from a pathname. .El .Pp The mode of a newly created IPC object is determined by -.Em OR Ns 'ing -the following constants into the +which are set by ORing these constants into the .Fa flag argument: -.Bl -tag -width XSHM_WXX6XXX -.It Dv S_IRUSR +.Bl -tag -width 0000 +.It Dv 0400 Read access for owner. -.It Dv S_IWUSR +.It Dv 0200 Write access for owner. -.It Dv S_IRGRP +.It Dv 0040 Read access for group. -.It Dv S_IWGRP +.It Dv 0020 Write access for group. -.It Dv S_IROTH +.It Dv 0004 Read access for other. -.It Dv S_IWOTH +.It Dv 0002 Write access for other. .El .\" @@ -142,5 +139,4 @@ already exists. .Xr shmat 2 , .Xr shmctl 2 , .Xr shmdt 2 , -.Xr stat 2 , .Xr ftok 3 From owner-svn-src-all@freebsd.org Mon Mar 12 16:31:26 2018 Return-Path: Delivered-To: svn-src-all@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 AEC3DF534B6; Mon, 12 Mar 2018 16:31:26 +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 635B18416B; Mon, 12 Mar 2018 16:31:26 +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 5E29162A9; Mon, 12 Mar 2018 16:31:26 +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 w2CGVQx6072745; Mon, 12 Mar 2018 16:31:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CGVQxA072743; Mon, 12 Mar 2018 16:31:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201803121631.w2CGVQxA072743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 12 Mar 2018 16:31:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330802 - in head: sbin/nvmecontrol sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head: sbin/nvmecontrol sys/dev/nvme X-SVN-Commit-Revision: 330802 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 16:31:26 -0000 Author: mav Date: Mon Mar 12 16:31:25 2018 New Revision: 330802 URL: https://svnweb.freebsd.org/changeset/base/330802 Log: Print fuses and fna fields in identify data. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sbin/nvmecontrol/identify.c head/sys/dev/nvme/nvme.h Modified: head/sbin/nvmecontrol/identify.c ============================================================================== --- head/sbin/nvmecontrol/identify.c Mon Mar 12 16:04:10 2018 (r330801) +++ head/sbin/nvmecontrol/identify.c Mon Mar 12 16:31:25 2018 (r330802) @@ -196,6 +196,17 @@ print_controller(struct nvme_controller_data *cdata) printf("Timestamp feature: %sSupported\n", ((oncs >> NVME_CTRLR_DATA_ONCS_TIMESTAMP_SHIFT) & NVME_CTRLR_DATA_ONCS_TIMESTAMP_MASK) ? "" : "Not "); + printf("Fused Operation Support: %s%s\n", + (cdata->fuses == 0) ? "Not Supported" : "", + ((cdata->fuses >> NVME_CTRLR_DATA_FUSES_CNW_SHIFT) & + NVME_CTRLR_DATA_FUSES_CNW_MASK) ? "Compare and Write" : ""); + printf("Format NVM Attributes: %s%s Erase, %s Format\n", + ((cdata->fna >> NVME_CTRLR_DATA_FNA_CRYPTO_ERASE_SHIFT) & + NVME_CTRLR_DATA_FNA_CRYPTO_ERASE_MASK) ? "Crypto Erase, " : "", + ((cdata->fna >> NVME_CTRLR_DATA_FNA_ERASE_ALL_SHIFT) & + NVME_CTRLR_DATA_FNA_ERASE_ALL_MASK) ? "All-NVM" : "Per-NS", + ((cdata->fna >> NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT) & + NVME_CTRLR_DATA_FNA_FORMAT_ALL_MASK) ? "All-NVM" : "Per-NS"); printf("Volatile Write Cache: %s\n", vwc_present ? "Present" : "Not Present"); Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Mon Mar 12 16:04:10 2018 (r330801) +++ head/sys/dev/nvme/nvme.h Mon Mar 12 16:31:25 2018 (r330802) @@ -244,6 +244,18 @@ #define NVME_CTRLR_DATA_ONCS_TIMESTAMP_SHIFT (6) #define NVME_CTRLR_DATA_ONCS_TIMESTAMP_MASK (0x1) +/** Fused Operation Support */ +#define NVME_CTRLR_DATA_FUSES_CNW_SHIFT (0) +#define NVME_CTRLR_DATA_FUSES_CNW_MASK (0x1) + +/** Format NVM Attributes */ +#define NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT (0) +#define NVME_CTRLR_DATA_FNA_FORMAT_ALL_MASK (0x1) +#define NVME_CTRLR_DATA_FNA_ERASE_ALL_SHIFT (1) +#define NVME_CTRLR_DATA_FNA_ERASE_ALL_MASK (0x1) +#define NVME_CTRLR_DATA_FNA_CRYPTO_ERASE_SHIFT (2) +#define NVME_CTRLR_DATA_FNA_CRYPTO_ERASE_MASK (0x1) + /** volatile write cache */ #define NVME_CTRLR_DATA_VWC_PRESENT_SHIFT (0) #define NVME_CTRLR_DATA_VWC_PRESENT_MASK (0x1) From owner-svn-src-all@freebsd.org Mon Mar 12 16:44:47 2018 Return-Path: Delivered-To: svn-src-all@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 ED404F2A598 for ; Mon, 12 Mar 2018 16:44:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E00284E2E for ; Mon, 12 Mar 2018 16:44:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x230.google.com with SMTP id p78so12167586iod.13 for ; Mon, 12 Mar 2018 09:44:46 -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=2M8kfs6Tm7DmbyzHLgnC2NF7gw/2jo9LhR0j5ZcrncQ=; b=JR5DDFJrGnG14QG1O3wk4jINJgpWMc+uOzjstcNTtp1zDR6gBXNsvFF4/rouDIua1A V+v5AgZUsNPsOBMOyIDSAI4qgHvKtUIFKJ/8Ia5EoHxQSPmgqR0NiN8U8AL8Lv+0gtVg uJBSmr1Ie4W4CJZ52luIcmVqZPIbsYSghxAguObyuLVMC4/GwpS7BNCoAwNGvneIfIyJ bi/h7UVUwGg4IZ2A06ZejKIHheuUXlmySgGitF0Mo7w/dEoOSvEEP5UWGkHVs/4xaJ1j QI7WMv+mTtQp0nX4qCYpQWwj+3tkcWuW78i+xP7NV7UGTRQZmyGis5i0EdcXp2kCNUQ8 /Gew== 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=2M8kfs6Tm7DmbyzHLgnC2NF7gw/2jo9LhR0j5ZcrncQ=; b=umAk1PvxrdL4wQQGShdvRwPop7/WTuebRYC/R9SPsugvpKcJyK8WSrYibcPqTYmvFh UGW7Ef8Z7PB514pXjzbnz0vn+EK+4/MZeFeeb6lzIQrNXTDp7h4asDn/flrE4uEtkMsO 13wwinIM1qQKFzTyhUNysRoCim0h+WVmVNGfbuZXYA2MA30CO+5C7m7Yh1nKEv7i1wPl QmsCl4ZnlyPhRL9KjzH5RvlLbAbmiqYRgjquObVe8PtMW3owxwy0CTajwl91evnO0Z61 f6q2SEXROyxtfceWY5H4anQvRfAMKRdCSSqZ/c6o7M0zAuAO2f3z/gGiJi6yjob71m53 2JTA== X-Gm-Message-State: AElRT7EVOhvPy0sAaTXABEQdqNYXIoj3PcUg1aTkdD7z1U8LIt6L40aQ 7JDbGs0LJuyHtB8z66aUyWcGjyn1N2J+UGKNO+Cvjg== X-Google-Smtp-Source: AG47ELuM7QVveg66mAiI0RJFmu+F7xrbxvu+ol7XZ9yafB3UfKRvicSG0OeaYAVa2FcxqWWo7LMj4MLh/OwygrIrG50= X-Received: by 10.107.180.83 with SMTP id d80mr9319650iof.168.1520873085568; Mon, 12 Mar 2018 09:44:45 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Mon, 12 Mar 2018 09:44:44 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201801291807.w0TI7EVD092154@repo.freebsd.org> From: Warner Losh Date: Mon, 12 Mar 2018 10:44:44 -0600 X-Google-Sender-Auth: AjwHSHmz-e7MEFJN_AQrTux88zE Message-ID: Subject: Re: svn commit: r328554 - head/sys/cam/scsi To: Dexuan-BSD Cui Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Dexuan Cui Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 16:44:47 -0000 I think this is a good idea to MFC. We've had no reports of it causing issues. There's more extensive locking changes / tweaks needed for da that just went in that likely should also be MFC'd. Warner On Sun, Mar 11, 2018 at 9:17 PM, Dexuan-BSD Cui wrote: > Hi imp and all, > I think this patch is very important, because it can fix a panic I > noticed recently when I try to hot-remove a SCSI disk from a VM > running on Azure/Hyper-V. > > The panic is almost 100% reproducible with stable/11, but not in the > latest CURRENT code, so finally I identified this fix in the CURRENT > branch. > > Can you please MFC this patch to 11 and 10? > It looks there is a major difference in the CAM code between 11/10 > and the CURRENT code, and we may have to MFC more related patches. If > this is difficult, I hope at least we can provide a minimal re-written > version of the patch to 11 and 10? > > Looking forward to your insight! > > Thanks, > -- Dexuan > > > On Mon, Jan 29, 2018 at 10:07 AM, Warner Losh wrote: > > Author: imp > > Date: Mon Jan 29 18:07:14 2018 > > New Revision: 328554 > > URL: https://svnweb.freebsd.org/changeset/base/328554 > > > > Log: > > Do the book-keeping on release before we release the reference. The > > periph was going away on final release, and then returning and we > > started dancing in free memory. > > > > Sponsored by: Netflix > > > > Modified: > > head/sys/cam/scsi/scsi_da.c > > > > Modified: head/sys/cam/scsi/scsi_da.c > > ============================================================ > ================== > > --- head/sys/cam/scsi/scsi_da.c Mon Jan 29 17:32:30 2018 (r328553) > > +++ head/sys/cam/scsi/scsi_da.c Mon Jan 29 18:07:14 2018 (r328554) > > @@ -1549,12 +1549,12 @@ da_periph_unhold(struct cam_periph *periph, > da_ref_tok > > struct da_softc *softc = periph->softc; > > > > token_sanity(token); > > - cam_periph_unhold(periph); > > DA_PERIPH_PRINT(periph, "Unholding device %s (%d)\n", > > da_ref_text[token], token); > > cnt = atomic_fetchadd_int(&softc->ref_flags[token], -1); > > if (cnt != 1) > > panic("Unholding %d with cnt = %d", token, cnt); > > + cam_periph_unhold(periph); > > } > > > > static inline int > > @@ -1583,12 +1583,12 @@ da_periph_release(struct cam_periph *periph, > da_ref_to > > struct da_softc *softc = periph->softc; > > > > token_sanity(token); > > - cam_periph_release(periph); > > DA_PERIPH_PRINT(periph, "releasing device %s (%d)\n", > > da_ref_text[token], token); > > cnt = atomic_fetchadd_int(&softc->ref_flags[token], -1); > > if (cnt != 1) > > panic("Releasing %d with cnt = %d", token, cnt); > > + cam_periph_release(periph); > > } > > > > static inline void > > @@ -1598,12 +1598,12 @@ da_periph_release_locked(struct cam_periph > *periph, da > > struct da_softc *softc = periph->softc; > > > > token_sanity(token); > > - cam_periph_release_locked(periph); > > DA_PERIPH_PRINT(periph, "releasing device (locked) %s (%d)\n", > > da_ref_text[token], token); > > cnt = atomic_fetchadd_int(&softc->ref_flags[token], -1); > > if (cnt != 1) > > panic("Unholding %d with cnt = %d", token, cnt); > > + cam_periph_release_locked(periph); > > } > > > > #define cam_periph_hold POISON > > > From owner-svn-src-all@freebsd.org Mon Mar 12 16:58:57 2018 Return-Path: Delivered-To: svn-src-all@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 469C9F2B873; Mon, 12 Mar 2018 16:58:57 +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 964A485C81; Mon, 12 Mar 2018 16:58:56 +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 w2CGws7m079444; Mon, 12 Mar 2018 09:58:54 -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 w2CGwsmx079443; Mon, 12 Mar 2018 09:58:54 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803121658.w2CGwsmx079443@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330792 - in head: sbin/ipfw sys/netpfil/ipfw In-Reply-To: <201803120940.w2C9ekns070289@repo.freebsd.org> To: "Andrey V. Elsukov" Date: Mon, 12 Mar 2018 09:58:54 -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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 16:58:57 -0000 > Author: ae > Date: Mon Mar 12 09:40:46 2018 > New Revision: 330792 > URL: https://svnweb.freebsd.org/changeset/base/330792 > > Log: > Do not try to reassemble IPv6 fragments in "reass" rule. > > ip_reass() expects IPv4 packet and will just corrupt any IPv6 packets > that it gets. Until proper IPv6 fragments handling function will be > implemented, pass IPv6 packets to next rule. Thank you! This should simplify some discussion occuring about /etc/rc.firewall in workstation mode and the fact it does not handly fragmentation correctly, part of fixing that invovled be sure to only pass ipv4 to a reass rule, with this fix that shall no longer be necessary. https://reviews.freebsd.org/D9920 > PR: 170604 > MFC after: 1 week > > Modified: > head/sbin/ipfw/ipfw.8 > head/sys/netpfil/ipfw/ip_fw2.c > > Modified: head/sbin/ipfw/ipfw.8 > ============================================================================== > --- head/sbin/ipfw/ipfw.8 Mon Mar 12 05:41:27 2018 (r330791) > +++ head/sbin/ipfw/ipfw.8 Mon Mar 12 09:40:46 2018 (r330792) > @@ -1,7 +1,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd November 26, 2017 > +.Dd March 12, 2018 > .Dt IPFW 8 > .Os > .Sh NAME > @@ -1135,7 +1135,7 @@ Regardless of matched a packet or not by the > .Cm tcp-setmss > rule, the search continues with the next rule. > .It Cm reass > -Queue and reassemble IP fragments. > +Queue and reassemble IPv4 fragments. > If the packet is not fragmented, counters are updated and > processing continues with the next rule. > If the packet is the last logical fragment, the packet is reassembled and, if > > Modified: head/sys/netpfil/ipfw/ip_fw2.c > ============================================================================== > --- head/sys/netpfil/ipfw/ip_fw2.c Mon Mar 12 05:41:27 2018 (r330791) > +++ head/sys/netpfil/ipfw/ip_fw2.c Mon Mar 12 09:40:46 2018 (r330792) > @@ -3018,8 +3018,10 @@ do { \ > case O_REASS: { > int ip_off; > > - IPFW_INC_RULE_COUNTER(f, pktlen); > l = 0; /* in any case exit inner loop */ > + if (is_ipv6) /* IPv6 is not supported yet */ > + break; > + IPFW_INC_RULE_COUNTER(f, pktlen); > ip_off = ntohs(ip->ip_off); > > /* if not fragmented, go to next rule */ > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Mar 12 17:05:55 2018 Return-Path: Delivered-To: svn-src-all@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 D968DF2C20B; Mon, 12 Mar 2018 17:05:54 +0000 (UTC) (envelope-from tsoome@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 82946864ED; Mon, 12 Mar 2018 17:05:54 +0000 (UTC) (envelope-from tsoome@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 796D46884; Mon, 12 Mar 2018 17:05:54 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CH5sZq093240; Mon, 12 Mar 2018 17:05:54 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CH5r0v093236; Mon, 12 Mar 2018 17:05:53 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201803121705.w2CH5r0v093236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 12 Mar 2018 17:05:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330803 - head/sys/dev/e1000 X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/dev/e1000 X-SVN-Commit-Revision: 330803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 17:05:55 -0000 Author: tsoome Date: Mon Mar 12 17:05:53 2018 New Revision: 330803 URL: https://svnweb.freebsd.org/changeset/base/330803 Log: e1000g: this statement may fall through The gcc 7 does check for switch statement fall through cases, and if legit, such complaint can besilenced by /* FALLTHROUGH */ comment. Unfortunately such comment is quite limited, but will still notify the reader. This patch is backport from illumos, see https://www.illumos.org/rb/r/941/ Reviewed by: eadler Differential Revision: https://reviews.freebsd.org/D14663 Modified: head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_mbx.c head/sys/dev/e1000/e1000_phy.c head/sys/dev/e1000/e1000_vf.c Modified: head/sys/dev/e1000/e1000_82575.c ============================================================================== --- head/sys/dev/e1000/e1000_82575.c Mon Mar 12 16:31:25 2018 (r330802) +++ head/sys/dev/e1000/e1000_82575.c Mon Mar 12 17:05:53 2018 (r330803) @@ -1679,7 +1679,7 @@ static s32 e1000_setup_serdes_link_82575(struct e1000_ case E1000_CTRL_EXT_LINK_MODE_1000BASE_KX: /* disable PCS autoneg and support parallel detect only */ pcs_autoneg = FALSE; - /* fall through to default case */ + /* FALLTHROUGH */ default: if (hw->mac.type == e1000_82575 || hw->mac.type == e1000_82576) { @@ -1806,6 +1806,7 @@ static s32 e1000_get_media_type_82575(struct e1000_hw break; } /* fall through for I2C based SGMII */ + /* FALLTHROUGH */ case E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES: /* read media type from SFP EEPROM */ ret_val = e1000_set_sfp_media_type_82575(hw); Modified: head/sys/dev/e1000/e1000_mbx.c ============================================================================== --- head/sys/dev/e1000/e1000_mbx.c Mon Mar 12 16:31:25 2018 (r330802) +++ head/sys/dev/e1000/e1000_mbx.c Mon Mar 12 17:05:53 2018 (r330803) @@ -779,6 +779,7 @@ s32 e1000_init_mbx_params_pf(struct e1000_hw *hw) mbx->stats.reqs = 0; mbx->stats.acks = 0; mbx->stats.rsts = 0; + /* FALLTHROUGH */ default: return E1000_SUCCESS; } Modified: head/sys/dev/e1000/e1000_phy.c ============================================================================== --- head/sys/dev/e1000/e1000_phy.c Mon Mar 12 16:31:25 2018 (r330802) +++ head/sys/dev/e1000/e1000_phy.c Mon Mar 12 17:05:53 2018 (r330803) @@ -1298,6 +1298,7 @@ s32 e1000_copper_link_setup_m88_gen2(struct e1000_hw * phy_data |= M88E1000_PSCR_AUTO_X_1000T; break; } + /* FALLTHROUGH */ case 0: default: phy_data |= M88E1000_PSCR_AUTO_X_MODE; Modified: head/sys/dev/e1000/e1000_vf.c ============================================================================== --- head/sys/dev/e1000/e1000_vf.c Mon Mar 12 16:31:25 2018 (r330802) +++ head/sys/dev/e1000/e1000_vf.c Mon Mar 12 17:05:53 2018 (r330803) @@ -488,8 +488,10 @@ s32 e1000_promisc_set_vf(struct e1000_hw *hw, enum e10 break; case e1000_promisc_enabled: msgbuf |= E1000_VF_SET_PROMISC_MULTICAST; + /* FALLTHROUGH */ case e1000_promisc_unicast: msgbuf |= E1000_VF_SET_PROMISC_UNICAST; + /* FALLTHROUGH */ case e1000_promisc_disabled: break; default: From owner-svn-src-all@freebsd.org Mon Mar 12 17:36:38 2018 Return-Path: Delivered-To: svn-src-all@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 72F41F2EDE8; Mon, 12 Mar 2018 17:36:38 +0000 (UTC) (envelope-from eugen@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 227A587A48; Mon, 12 Mar 2018 17:36:38 +0000 (UTC) (envelope-from eugen@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 18D026D25; Mon, 12 Mar 2018 17:36:38 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CHabCq008106; Mon, 12 Mar 2018 17:36:37 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CHabOT008099; Mon, 12 Mar 2018 17:36:37 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201803121736.w2CHabOT008099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 12 Mar 2018 17:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330804 - stable/11/usr.sbin/ppp X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/usr.sbin/ppp X-SVN-Commit-Revision: 330804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 17:36:38 -0000 Author: eugen Date: Mon Mar 12 17:36:37 2018 New Revision: 330804 URL: https://svnweb.freebsd.org/changeset/base/330804 Log: MFC r329105: ppp(8): fix code producing debugging logs ppp(8): fix code producing debugging logs Fix several cases when long buffer is copied to shorter one using snprintf that results in contents truncation and clobbering unsaved errno value and creation of misleading logs. PR: 218517 Approved by: mav (mentor) Modified: stable/11/usr.sbin/ppp/defs.h stable/11/usr.sbin/ppp/iface.c stable/11/usr.sbin/ppp/ip.c stable/11/usr.sbin/ppp/ipv6cp.c stable/11/usr.sbin/ppp/ncpaddr.c stable/11/usr.sbin/ppp/route.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ppp/defs.h ============================================================================== --- stable/11/usr.sbin/ppp/defs.h Mon Mar 12 17:05:53 2018 (r330803) +++ stable/11/usr.sbin/ppp/defs.h Mon Mar 12 17:36:37 2018 (r330804) @@ -119,6 +119,8 @@ #define ROUNDUP(x) ((x) ? (1 + (((x) - 1) | (sizeof(long) - 1))) : sizeof(long)) +#define NCP_ASCIIBUFFERSIZE 52 + #ifdef __NetBSD__ extern void randinit(void); #else Modified: stable/11/usr.sbin/ppp/iface.c ============================================================================== --- stable/11/usr.sbin/ppp/iface.c Mon Mar 12 17:05:53 2018 (r330803) +++ stable/11/usr.sbin/ppp/iface.c Mon Mar 12 17:36:37 2018 (r330804) @@ -208,7 +208,7 @@ iface_addr_Zap(const char *name, struct iface_addr *ad #endif struct sockaddr_in *me4, *msk4, *peer4; struct sockaddr_storage ssme, sspeer, ssmsk; - int res; + int res, saved_errno; ncprange_getsa(&addr->ifa, &ssme, &ssmsk); ncpaddr_getsa(&addr->peer, &sspeer); @@ -234,8 +234,9 @@ iface_addr_Zap(const char *name, struct iface_addr *ad memcpy(peer4, &sspeer, sizeof *peer4); res = ID0ioctl(s, SIOCDIFADDR, &ifra); + saved_errno = errno; if (log_IsKept(LogDEBUG)) { - char buf[100]; + char buf[NCP_ASCIIBUFFERSIZE]; snprintf(buf, sizeof buf, "%s", ncprange_ntoa(&addr->ifa)); log_Printf(LogWARN, "%s: DIFADDR %s -> %s returns %d\n", @@ -259,12 +260,13 @@ iface_addr_Zap(const char *name, struct iface_addr *ad ifra6.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; res = ID0ioctl(s, SIOCDIFADDR_IN6, &ifra6); + saved_errno = errno; break; #endif } if (res == -1) { - char dst[40]; + char dst[NCP_ASCIIBUFFERSIZE]; const char *end = #ifndef NOINET6 ncprange_family(&addr->ifa) == AF_INET6 ? "_IN6" : @@ -273,11 +275,11 @@ iface_addr_Zap(const char *name, struct iface_addr *ad if (ncpaddr_family(&addr->peer) == AF_UNSPEC) log_Printf(LogWARN, "iface rm: ioctl(SIOCDIFADDR%s, %s): %s\n", - end, ncprange_ntoa(&addr->ifa), strerror(errno)); + end, ncprange_ntoa(&addr->ifa), strerror(saved_errno)); else { snprintf(dst, sizeof dst, "%s", ncpaddr_ntoa(&addr->peer)); log_Printf(LogWARN, "iface rm: ioctl(SIOCDIFADDR%s, %s -> %s): %s\n", - end, ncprange_ntoa(&addr->ifa), dst, strerror(errno)); + end, ncprange_ntoa(&addr->ifa), dst, strerror(saved_errno)); } } @@ -293,7 +295,7 @@ iface_addr_Add(const char *name, struct iface_addr *ad #endif struct sockaddr_in *me4, *msk4, *peer4; struct sockaddr_storage ssme, sspeer, ssmsk; - int res; + int res, saved_errno; ncprange_getsa(&addr->ifa, &ssme, &ssmsk); ncpaddr_getsa(&addr->peer, &sspeer); @@ -319,8 +321,9 @@ iface_addr_Add(const char *name, struct iface_addr *ad memcpy(peer4, &sspeer, sizeof *peer4); res = ID0ioctl(s, SIOCAIFADDR, &ifra); + saved_errno = errno; if (log_IsKept(LogDEBUG)) { - char buf[100]; + char buf[NCP_ASCIIBUFFERSIZE]; snprintf(buf, sizeof buf, "%s", ncprange_ntoa(&addr->ifa)); log_Printf(LogWARN, "%s: AIFADDR %s -> %s returns %d\n", @@ -344,12 +347,13 @@ iface_addr_Add(const char *name, struct iface_addr *ad ifra6.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; res = ID0ioctl(s, SIOCAIFADDR_IN6, &ifra6); + saved_errno = errno; break; #endif } if (res == -1) { - char dst[40]; + char dst[NCP_ASCIIBUFFERSIZE]; const char *end = #ifndef NOINET6 ncprange_family(&addr->ifa) == AF_INET6 ? "_IN6" : @@ -358,11 +362,11 @@ iface_addr_Add(const char *name, struct iface_addr *ad if (ncpaddr_family(&addr->peer) == AF_UNSPEC) log_Printf(LogWARN, "iface add: ioctl(SIOCAIFADDR%s, %s): %s\n", - end, ncprange_ntoa(&addr->ifa), strerror(errno)); + end, ncprange_ntoa(&addr->ifa), strerror(saved_errno)); else { snprintf(dst, sizeof dst, "%s", ncpaddr_ntoa(&addr->peer)); log_Printf(LogWARN, "iface add: ioctl(SIOCAIFADDR%s, %s -> %s): %s\n", - end, ncprange_ntoa(&addr->ifa), dst, strerror(errno)); + end, ncprange_ntoa(&addr->ifa), dst, strerror(saved_errno)); } } Modified: stable/11/usr.sbin/ppp/ip.c ============================================================================== --- stable/11/usr.sbin/ppp/ip.c Mon Mar 12 17:05:53 2018 (r330803) +++ stable/11/usr.sbin/ppp/ip.c Mon Mar 12 17:36:37 2018 (r330804) @@ -226,7 +226,7 @@ FilterCheck(const unsigned char *packet, int match; /* true if condition matched */ int mindata; /* minimum data size or zero */ const struct filterent *fp = filter->rule; - char dbuff[100], dstip[16]; + char dbuff[100], dstip[NCP_ASCIIBUFFERSIZE]; struct ncpaddr srcaddr, dstaddr; const char *payload; /* IP payload */ int datalen; /* IP datagram length */ Modified: stable/11/usr.sbin/ppp/ipv6cp.c ============================================================================== --- stable/11/usr.sbin/ppp/ipv6cp.c Mon Mar 12 17:05:53 2018 (r330803) +++ stable/11/usr.sbin/ppp/ipv6cp.c Mon Mar 12 17:36:37 2018 (r330804) @@ -467,7 +467,7 @@ ipv6cp_LayerUp(struct fsm *fp) { /* We're now up */ struct ipv6cp *ipv6cp = fsm2ipv6cp(fp); - char tbuff[40]; + char tbuff[NCP_ASCIIBUFFERSIZE]; log_Printf(LogIPV6CP, "%s: LayerUp.\n", fp->link->name); if (!ipv6cp_InterfaceUp(ipv6cp)) @@ -524,7 +524,7 @@ ipv6cp_LayerDown(struct fsm *fp) /* About to come down */ struct ipv6cp *ipv6cp = fsm2ipv6cp(fp); static int recursing; - char addr[40]; + char addr[NCP_ASCIIBUFFERSIZE]; if (!recursing++) { snprintf(addr, sizeof addr, "%s", ncpaddr_ntoa(&ipv6cp->myaddr)); Modified: stable/11/usr.sbin/ppp/ncpaddr.c ============================================================================== --- stable/11/usr.sbin/ppp/ncpaddr.c Mon Mar 12 17:05:53 2018 (r330803) +++ stable/11/usr.sbin/ppp/ncpaddr.c Mon Mar 12 17:36:37 2018 (r330804) @@ -78,8 +78,6 @@ #define ncpaddr_ip6addr u.ip6addr #endif -#define NCP_ASCIIBUFFERSIZE 52 - static struct in_addr bits2mask4(int bits) { Modified: stable/11/usr.sbin/ppp/route.c ============================================================================== --- stable/11/usr.sbin/ppp/route.c Mon Mar 12 17:05:53 2018 (r330803) +++ stable/11/usr.sbin/ppp/route.c Mon Mar 12 17:36:37 2018 (r330804) @@ -437,7 +437,7 @@ route_IfDelete(struct bundle *bundle, int all) ) && (all || (rtm->rtm_flags & RTF_GATEWAY))) { if (log_IsKept(LogDEBUG)) { - char gwstr[41]; + char gwstr[NCP_ASCIIBUFFERSIZE]; struct ncpaddr gw; ncprange_setsa(&range, sa[RTAX_DST], sa[RTAX_NETMASK]); ncpaddr_setsa(&gw, sa[RTAX_GATEWAY]); @@ -843,7 +843,7 @@ failed: } if (log_IsKept(LogDEBUG)) { - char gwstr[40]; + char gwstr[NCP_ASCIIBUFFERSIZE]; if (gw) snprintf(gwstr, sizeof gwstr, "%s", ncpaddr_ntoa(gw)); From owner-svn-src-all@freebsd.org Mon Mar 12 17:37:39 2018 Return-Path: Delivered-To: svn-src-all@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 551B2F2EFCE; Mon, 12 Mar 2018 17:37:39 +0000 (UTC) (envelope-from eugen@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 0A37387C21; Mon, 12 Mar 2018 17:37:39 +0000 (UTC) (envelope-from eugen@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 053FD6D2A; Mon, 12 Mar 2018 17:37:39 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CHbclB008204; Mon, 12 Mar 2018 17:37:38 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CHbcWX008197; Mon, 12 Mar 2018 17:37:38 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201803121737.w2CHbcWX008197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 12 Mar 2018 17:37:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330805 - stable/10/usr.sbin/ppp X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/10/usr.sbin/ppp X-SVN-Commit-Revision: 330805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 17:37:39 -0000 Author: eugen Date: Mon Mar 12 17:37:38 2018 New Revision: 330805 URL: https://svnweb.freebsd.org/changeset/base/330805 Log: MFC r329105: ppp(8): fix code producing debugging logs ppp(8): fix code producing debugging logs Fix several cases when long buffer is copied to shorter one using snprintf that results in contents truncation and clobbering unsaved errno value and creation of misleading logs. PR: 218517 Approved by: mav (mentor) Modified: stable/10/usr.sbin/ppp/defs.h stable/10/usr.sbin/ppp/iface.c stable/10/usr.sbin/ppp/ip.c stable/10/usr.sbin/ppp/ipv6cp.c stable/10/usr.sbin/ppp/ncpaddr.c stable/10/usr.sbin/ppp/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ppp/defs.h ============================================================================== --- stable/10/usr.sbin/ppp/defs.h Mon Mar 12 17:36:37 2018 (r330804) +++ stable/10/usr.sbin/ppp/defs.h Mon Mar 12 17:37:38 2018 (r330805) @@ -117,6 +117,8 @@ #define ROUNDUP(x) ((x) ? (1 + (((x) - 1) | (sizeof(long) - 1))) : sizeof(long)) +#define NCP_ASCIIBUFFERSIZE 52 + #ifdef __NetBSD__ extern void randinit(void); #else Modified: stable/10/usr.sbin/ppp/iface.c ============================================================================== --- stable/10/usr.sbin/ppp/iface.c Mon Mar 12 17:36:37 2018 (r330804) +++ stable/10/usr.sbin/ppp/iface.c Mon Mar 12 17:37:38 2018 (r330805) @@ -209,7 +209,7 @@ iface_addr_Zap(const char *name, struct iface_addr *ad #endif struct sockaddr_in *me4, *msk4, *peer4; struct sockaddr_storage ssme, sspeer, ssmsk; - int res; + int res, saved_errno; ncprange_getsa(&addr->ifa, &ssme, &ssmsk); ncpaddr_getsa(&addr->peer, &sspeer); @@ -235,8 +235,9 @@ iface_addr_Zap(const char *name, struct iface_addr *ad memcpy(peer4, &sspeer, sizeof *peer4); res = ID0ioctl(s, SIOCDIFADDR, &ifra); + saved_errno = errno; if (log_IsKept(LogDEBUG)) { - char buf[100]; + char buf[NCP_ASCIIBUFFERSIZE]; snprintf(buf, sizeof buf, "%s", ncprange_ntoa(&addr->ifa)); log_Printf(LogWARN, "%s: DIFADDR %s -> %s returns %d\n", @@ -260,12 +261,13 @@ iface_addr_Zap(const char *name, struct iface_addr *ad ifra6.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; res = ID0ioctl(s, SIOCDIFADDR_IN6, &ifra6); + saved_errno = errno; break; #endif } if (res == -1) { - char dst[40]; + char dst[NCP_ASCIIBUFFERSIZE]; const char *end = #ifndef NOINET6 ncprange_family(&addr->ifa) == AF_INET6 ? "_IN6" : @@ -274,11 +276,11 @@ iface_addr_Zap(const char *name, struct iface_addr *ad if (ncpaddr_family(&addr->peer) == AF_UNSPEC) log_Printf(LogWARN, "iface rm: ioctl(SIOCDIFADDR%s, %s): %s\n", - end, ncprange_ntoa(&addr->ifa), strerror(errno)); + end, ncprange_ntoa(&addr->ifa), strerror(saved_errno)); else { snprintf(dst, sizeof dst, "%s", ncpaddr_ntoa(&addr->peer)); log_Printf(LogWARN, "iface rm: ioctl(SIOCDIFADDR%s, %s -> %s): %s\n", - end, ncprange_ntoa(&addr->ifa), dst, strerror(errno)); + end, ncprange_ntoa(&addr->ifa), dst, strerror(saved_errno)); } } @@ -294,7 +296,7 @@ iface_addr_Add(const char *name, struct iface_addr *ad #endif struct sockaddr_in *me4, *msk4, *peer4; struct sockaddr_storage ssme, sspeer, ssmsk; - int res; + int res, saved_errno; ncprange_getsa(&addr->ifa, &ssme, &ssmsk); ncpaddr_getsa(&addr->peer, &sspeer); @@ -320,8 +322,9 @@ iface_addr_Add(const char *name, struct iface_addr *ad memcpy(peer4, &sspeer, sizeof *peer4); res = ID0ioctl(s, SIOCAIFADDR, &ifra); + saved_errno = errno; if (log_IsKept(LogDEBUG)) { - char buf[100]; + char buf[NCP_ASCIIBUFFERSIZE]; snprintf(buf, sizeof buf, "%s", ncprange_ntoa(&addr->ifa)); log_Printf(LogWARN, "%s: AIFADDR %s -> %s returns %d\n", @@ -345,12 +348,13 @@ iface_addr_Add(const char *name, struct iface_addr *ad ifra6.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; res = ID0ioctl(s, SIOCAIFADDR_IN6, &ifra6); + saved_errno = errno; break; #endif } if (res == -1) { - char dst[40]; + char dst[NCP_ASCIIBUFFERSIZE]; const char *end = #ifndef NOINET6 ncprange_family(&addr->ifa) == AF_INET6 ? "_IN6" : @@ -359,11 +363,11 @@ iface_addr_Add(const char *name, struct iface_addr *ad if (ncpaddr_family(&addr->peer) == AF_UNSPEC) log_Printf(LogWARN, "iface add: ioctl(SIOCAIFADDR%s, %s): %s\n", - end, ncprange_ntoa(&addr->ifa), strerror(errno)); + end, ncprange_ntoa(&addr->ifa), strerror(saved_errno)); else { snprintf(dst, sizeof dst, "%s", ncpaddr_ntoa(&addr->peer)); log_Printf(LogWARN, "iface add: ioctl(SIOCAIFADDR%s, %s -> %s): %s\n", - end, ncprange_ntoa(&addr->ifa), dst, strerror(errno)); + end, ncprange_ntoa(&addr->ifa), dst, strerror(saved_errno)); } } Modified: stable/10/usr.sbin/ppp/ip.c ============================================================================== --- stable/10/usr.sbin/ppp/ip.c Mon Mar 12 17:36:37 2018 (r330804) +++ stable/10/usr.sbin/ppp/ip.c Mon Mar 12 17:37:38 2018 (r330805) @@ -224,7 +224,7 @@ FilterCheck(const unsigned char *packet, int match; /* true if condition matched */ int mindata; /* minimum data size or zero */ const struct filterent *fp = filter->rule; - char dbuff[100], dstip[16]; + char dbuff[100], dstip[NCP_ASCIIBUFFERSIZE]; struct ncpaddr srcaddr, dstaddr; const char *payload; /* IP payload */ int datalen; /* IP datagram length */ Modified: stable/10/usr.sbin/ppp/ipv6cp.c ============================================================================== --- stable/10/usr.sbin/ppp/ipv6cp.c Mon Mar 12 17:36:37 2018 (r330804) +++ stable/10/usr.sbin/ppp/ipv6cp.c Mon Mar 12 17:37:38 2018 (r330805) @@ -465,7 +465,7 @@ ipv6cp_LayerUp(struct fsm *fp) { /* We're now up */ struct ipv6cp *ipv6cp = fsm2ipv6cp(fp); - char tbuff[40]; + char tbuff[NCP_ASCIIBUFFERSIZE]; log_Printf(LogIPV6CP, "%s: LayerUp.\n", fp->link->name); if (!ipv6cp_InterfaceUp(ipv6cp)) @@ -522,7 +522,7 @@ ipv6cp_LayerDown(struct fsm *fp) /* About to come down */ struct ipv6cp *ipv6cp = fsm2ipv6cp(fp); static int recursing; - char addr[40]; + char addr[NCP_ASCIIBUFFERSIZE]; if (!recursing++) { snprintf(addr, sizeof addr, "%s", ncpaddr_ntoa(&ipv6cp->myaddr)); Modified: stable/10/usr.sbin/ppp/ncpaddr.c ============================================================================== --- stable/10/usr.sbin/ppp/ncpaddr.c Mon Mar 12 17:36:37 2018 (r330804) +++ stable/10/usr.sbin/ppp/ncpaddr.c Mon Mar 12 17:37:38 2018 (r330805) @@ -76,8 +76,6 @@ #define ncpaddr_ip6addr u.ip6addr #endif -#define NCP_ASCIIBUFFERSIZE 52 - static struct in_addr bits2mask4(int bits) { Modified: stable/10/usr.sbin/ppp/route.c ============================================================================== --- stable/10/usr.sbin/ppp/route.c Mon Mar 12 17:36:37 2018 (r330804) +++ stable/10/usr.sbin/ppp/route.c Mon Mar 12 17:37:38 2018 (r330805) @@ -435,7 +435,7 @@ route_IfDelete(struct bundle *bundle, int all) ) && (all || (rtm->rtm_flags & RTF_GATEWAY))) { if (log_IsKept(LogDEBUG)) { - char gwstr[41]; + char gwstr[NCP_ASCIIBUFFERSIZE]; struct ncpaddr gw; ncprange_setsa(&range, sa[RTAX_DST], sa[RTAX_NETMASK]); ncpaddr_setsa(&gw, sa[RTAX_GATEWAY]); @@ -840,7 +840,7 @@ failed: } if (log_IsKept(LogDEBUG)) { - char gwstr[40]; + char gwstr[NCP_ASCIIBUFFERSIZE]; if (gw) snprintf(gwstr, sizeof gwstr, "%s", ncpaddr_ntoa(gw)); From owner-svn-src-all@freebsd.org Mon Mar 12 17:51:34 2018 Return-Path: Delivered-To: svn-src-all@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 61DF3F308F0; Mon, 12 Mar 2018 17:51:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 087A368A23; Mon, 12 Mar 2018 17:51:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 723D910A87D; Mon, 12 Mar 2018 13:51:32 -0400 (EDT) From: John Baldwin To: Eugene Grosbein Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330711 - head/sbin/sysctl Date: Mon, 12 Mar 2018 09:27:07 -0700 Message-ID: <2456392.O6IgoD01Hy@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <5AA3552D.5080203@grosbein.net> References: <201803092337.w29NbJSX093826@repo.freebsd.org> <5AA3552D.5080203@grosbein.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 12 Mar 2018 13:51:32 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 17:51:34 -0000 On Saturday, March 10, 2018 10:46:53 AM Eugene Grosbein wrote: > 10.03.2018 6:37, John Baldwin wrote: > > > Author: jhb > > Date: Fri Mar 9 23:37:19 2018 > > New Revision: 330711 > > URL: https://svnweb.freebsd.org/changeset/base/330711 > > > > Log: > > Permit sysctl(8) to set an array of numeric values for a single node. > > > > Most sysctl nodes only return a single value, but some nodes return an > > array of values (e.g. kern.cp_time). sysctl(8) understand how to display > > the values of a node that returns multiple values (it prints out each > > numeric value separated by spaces). However, until now sysctl(8) has > > only been able to set sysctl nodes to a single value. This change > > allows sysctl to accept a new value for a numeric sysctl node that contains > > multiple values separated by either spaces or commas. sysctl(8) parses > > this list into an array of values and passes the array as the "new" value > > to sysctl(2). > > Note well: we already have some examples of complex sysctl comma-separated "list" values such as: > > security.mac.portacl.rules=uid:53:tcp:53,uid:53:udp:53 Yes, but those are stored as strings (CTLTYPE_STRING) and require string parsing in the kernel. This permits nodes that just need a flat array of integers to be set without requiring string parsing in the kernel. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Mar 12 19:03:02 2018 Return-Path: Delivered-To: svn-src-all@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 109E2F36C41; Mon, 12 Mar 2018 19:03:02 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 53DA56BEB9; Mon, 12 Mar 2018 19:03:00 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id C98BE1A21DD; Tue, 13 Mar 2018 06:02:56 +1100 (AEDT) Date: Tue, 13 Mar 2018 06:02:56 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330780 - in head/sys: amd64/include isa x86/isa In-Reply-To: <20180312155617.GF76926@kib.kiev.ua> Message-ID: <20180313045728.A3796@besplex.bde.org> References: <201803111922.w2BJMwr8043084@repo.freebsd.org> <20180311195800.GC76926@kib.kiev.ua> <1520799639.84937.154.camel@freebsd.org> <20180311212539.GD76926@kib.kiev.ua> <1520868891.84937.177.camel@freebsd.org> <20180312155617.GF76926@kib.kiev.ua> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=VJytp5HX c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=nlC_4_pT8q9DhB4Ho9EA:9 a=c6azyYfdoJQ0Fgpok8kA:9 a=45ClL6m2LaAA:10 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 19:03:02 -0000 On Mon, 12 Mar 2018, Konstantin Belousov wrote: > On Mon, Mar 12, 2018 at 09:34:51AM -0600, Ian Lepore wrote: >> On Sun, 2018-03-11 at 23:25 +0200, Konstantin Belousov wrote: >>> On Sun, Mar 11, 2018 at 02:20:39PM -0600, Ian Lepore wrote: >>>> >>>> On Sun, 2018-03-11 at 21:58 +0200, Konstantin Belousov wrote: >>>>> >>>>> On Sun, Mar 11, 2018 at 07:22:58PM +0000, Ian Lepore wrote: >>>>>> >>>>>> >>>>>> [...] >>>> >>>> Unfortunately, this reverts one type of wrong locking back to another. >>>> =9AThe need is to prevent access to the atrtc hardware if efi is >>>> accessing it, and the locking I just reverted to that uses a sleepable >>>> mutex only protects against inittodr()/resettodr() access, but not >>>> against nvram(4) or if the atrtc is being used as an eventtimer (of >>>> course nobody uses it for that, but the driver supports it). >>>> >>>> I have some pending changes that cause the atrtc driver to just not >>>> attach at all if the efirtc driver attached, but they're stacked up >>>> behind some other changes in phab. =9AAnd that still doesn't fix the >>>> nvram(4) part of it. >>> Not attaching atrtc if efirtc is attached sounds reasonable. But then >>> you should also disable efirt attach if atrtc is on. One possible issue >>> is that efirt is typicall loadable, while atrtc is compiled into the >>> kernel, which means that efirt would become virtually unusable. >> >> Even if efirt is loaded (in loader(8)) the efirtc driver will still >> attach instead of atrtc, because it's a direct child of nexus and gets >> the first opportunity to probe and attach. =9ABut you raise a good point= , >> I should make it handle the case where it gets kldload'd when atrtc is >> already attached. >> >>> For nvram(4), you can take the atrtc_time_lock around accesses in addit= ion >>> to the atrtc_lock, instead of providing exclusivity on the level of dri= vers >>> attach. >> >> It occurs to me that an even better fix for all of this would be to >> remove support for atrtc being an eventtimer. =9AThat allows removing th= e >> interrupt filter handler, and then there's no need for a spinlock at >> all, a sleepable mutex works fine for all accesses. Sleep mutexes never work fine for real time clocks. They give unbounded time for clock accesses. >> Does anybody really need an eventtimer that runs only at a fixed >> periodic rate of 32khz in 2018? > > Problem is that atrtc is what old machines use. If we have HPET or > better LAPIC timers, then we do not need atrtc at all, of course. > But e.g. 486 do not have them. I am not even sure about early amd64 > machines. The early AMD development board "Solo 2" has LAPIC. It even has HPET for a timecounter but not for an event timer. My 2006 laptop doesn't have HPET. My version of FreeBSD-5 uses the 1 Hz RTC update interrupt for fixing up the timecounter after stopping in ddb. This should also be used for fixing up the timecounter after suspension. This doesn't need full event timer support, but it needs full interrupt support including spin mutexes. > Definitely any machine that needs EFIRT has both HPET and LAPIC, I like > the idea of not providing eventtimer backed by atrtc if feasible. Might > be, make this a compile or runtime option, unless this over-complicates > the code. It's just more complicated to make it optional. The top-level event timer code supports using "any" timer in the system with very little driver support, at least for drivers/hardware that only support periodic interrupt= s. Everyone with a 486 needs an atrtc that runs at 128 Hz like it used to. 32 kHz wastes a lot of CPU even on newer systems. Just reading 1 status register in rtc_intr() takes at least 1 usec. That is about 3% of the CPU at 32 kHz. rtcin() used to read 4 ISA registers (2 intentional delays which are FUD mainly for 20-30 year old systems). That is about 12% for the CPU at 32 kHz. Probably more like 20%. I optimized rtcin() especially for this case (where the index register is almost constant). SCHED_4BSD only needs 16 Hz, and only profiling needs more than 128 Hz. I used hz =3D stathz =3D lapic_timer_hz =3D 100 (all periodic) for some tim= e before event timers existed. This doesn't support fine-grained timeouts, but I don't want them. It gives much too synchronization between hardclock and statclock interrupts. but not much more than with the the old default lapic_timer_hz of 2000. Bruce From owner-svn-src-all@freebsd.org Mon Mar 12 19:03:32 2018 Return-Path: Delivered-To: svn-src-all@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 EAD7BF36CEC for ; Mon, 12 Mar 2018 19:03:31 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 704B46C003 for ; Mon, 12 Mar 2018 19:03:31 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: ed7ad2f1-2627-11e8-b951-f99fef315fd9 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id ed7ad2f1-2627-11e8-b951-f99fef315fd9; Mon, 12 Mar 2018 19:02:37 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w2CJ3SfN016997; Mon, 12 Mar 2018 13:03:28 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1520881408.84937.232.camel@freebsd.org> Subject: Re: svn commit: r330780 - in head/sys: amd64/include isa x86/isa From: Ian Lepore To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 12 Mar 2018 13:03:28 -0600 In-Reply-To: <20180312155617.GF76926@kib.kiev.ua> References: <201803111922.w2BJMwr8043084@repo.freebsd.org> <20180311195800.GC76926@kib.kiev.ua> <1520799639.84937.154.camel@freebsd.org> <20180311212539.GD76926@kib.kiev.ua> <1520868891.84937.177.camel@freebsd.org> <20180312155617.GF76926@kib.kiev.ua> 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 19:03:32 -0000 On Mon, 2018-03-12 at 17:56 +0200, Konstantin Belousov wrote: > On Mon, Mar 12, 2018 at 09:34:51AM -0600, Ian Lepore wrote: > > > > On Sun, 2018-03-11 at 23:25 +0200, Konstantin Belousov wrote: > > > > > > On Sun, Mar 11, 2018 at 02:20:39PM -0600, Ian Lepore wrote: > > > > > > > > > > > > On Sun, 2018-03-11 at 21:58 +0200, Konstantin Belousov wrote: > > > > > > > > > > > > > > > On Sun, Mar 11, 2018 at 07:22:58PM +0000, Ian Lepore wrote: > > > > > > > > > > > > > > > > > > > > > > > > [...] > > > > Unfortunately, this reverts one type of wrong locking back to another. > > > >  The need is to prevent access to the atrtc hardware if efi is > > > > accessing it, and the locking I just reverted to that uses a sleepable > > > > mutex only protects against inittodr()/resettodr() access, but not > > > > against nvram(4) or if the atrtc is being used as an eventtimer (of > > > > course nobody uses it for that, but the driver supports it). > > > > > > > > I have some pending changes that cause the atrtc driver to just not > > > > attach at all if the efirtc driver attached, but they're stacked up > > > > behind some other changes in phab.  And that still doesn't fix the > > > > nvram(4) part of it. > > > Not attaching atrtc if efirtc is attached sounds reasonable. But then > > > you should also disable efirt attach if atrtc is on. One possible issue > > > is that efirt is typicall loadable, while atrtc is compiled into the > > > kernel, which means that efirt would become virtually unusable. > > > > > Even if efirt is loaded (in loader(8)) the efirtc driver will still > > attach instead of atrtc, because it's a direct child of nexus and gets > > the first opportunity to probe and attach.  But you raise a good point, > > I should make it handle the case where it gets kldload'd when atrtc is > > already attached. > > > > > > > > For nvram(4), you can take the atrtc_time_lock around accesses in addition > > > to the atrtc_lock, instead of providing exclusivity on the level of drivers > > > attach. > > It occurs to me that an even better fix for all of this would be to > > remove support for atrtc being an eventtimer.  That allows removing the > > interrupt filter handler, and then there's no need for a spinlock at > > all, a sleepable mutex works fine for all accesses. > > > > Does anybody really need an eventtimer that runs only at a fixed > > periodic rate of 32khz in 2018? > Problem is that atrtc is what old machines use. If we have HPET or > better LAPIC timers, then we do not need atrtc at all, of course. > But e.g. 486 do not have them. I am not even sure about early amd64 > machines. I think not unless someone has manually configured it that way.  The i8254 timer should be used as both timecounter and eventtimer if there is no lapic or hpet.  i8254 has an ET priority of 100 compared to atrtc's 0.  That's by code inspection...  I might still have some industrial SBCs around here old enough to not have hpet or lapic, I'll see if I can get one running. -- Ian From owner-svn-src-all@freebsd.org Mon Mar 12 21:17:31 2018 Return-Path: Delivered-To: svn-src-all@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 4FEEEF4B84A for ; Mon, 12 Mar 2018 21:17:31 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C41873691 for ; Mon, 12 Mar 2018 21:17:21 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 9d3d7712-263a-11e8-b951-f99fef315fd9 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 9d3d7712-263a-11e8-b951-f99fef315fd9; Mon, 12 Mar 2018 21:16:22 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w2CLHELc017309; Mon, 12 Mar 2018 15:17:14 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1520889433.84937.255.camel@freebsd.org> Subject: Re: svn commit: r330780 - in head/sys: amd64/include isa x86/isa From: Ian Lepore To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 12 Mar 2018 15:17:13 -0600 In-Reply-To: <1520881408.84937.232.camel@freebsd.org> References: <201803111922.w2BJMwr8043084@repo.freebsd.org> <20180311195800.GC76926@kib.kiev.ua> <1520799639.84937.154.camel@freebsd.org> <20180311212539.GD76926@kib.kiev.ua> <1520868891.84937.177.camel@freebsd.org> <20180312155617.GF76926@kib.kiev.ua> <1520881408.84937.232.camel@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 21:17:31 -0000 On Mon, 2018-03-12 at 13:03 -0600, Ian Lepore wrote: > On Mon, 2018-03-12 at 17:56 +0200, Konstantin Belousov wrote: > > > > On Mon, Mar 12, 2018 at 09:34:51AM -0600, Ian Lepore wrote: > > > > > > [...] > > > > > > Does anybody really need an eventtimer that runs only at a fixed > > > periodic rate of 32khz in 2018? > > Problem is that atrtc is what old machines use. If we have HPET or > > better LAPIC timers, then we do not need atrtc at all, of course. > > But e.g. 486 do not have them. I am not even sure about early amd64 > > machines. > I think not unless someone has manually configured it that way.  The > i8254 timer should be used as both timecounter and eventtimer if there > is no lapic or hpet.  i8254 has an ET priority of 100 compared to > atrtc's 0.  That's by code inspection...  I might still have some > industrial SBCs around here old enough to not have hpet or lapic, I'll > see if I can get one running. > I found a nice old (2001 vintage) SBC based on a 586-class cyrix chip that has no lapic or hpet timers.  It had a copy of freebsd 11-current from Nov 2015 already installed and it booted right up.  It was using the i8254 hardware as both timecounter and eventtimer.  I rebooted it from a drive that had a copy of 12-current from yesterday and it behaved the same. Then I rebooted and set hint.attimer.0.clock=0 to prevent the i8254 driver from attaching an eventtimer.  That left only the atrtc eventimer, and the result of that was that the system just becomes comatose after saying "Timecounters tick every 0.967 msec".  So I booted the old 11-current image with i8254 disabled, and that behaved just the same. So, the eventtimer code in the atrtc driver doesn't even work, and has been broken (and unreported) since at least Nov 2015.  That sounds to me like even more evidence that we should just remove eventtimer stuff from the atrtc driver. -- Ian From owner-svn-src-all@freebsd.org Mon Mar 12 21:39:28 2018 Return-Path: Delivered-To: svn-src-all@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 B5549F4D18E; Mon, 12 Mar 2018 21:39:28 +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 5C5F674C87; Mon, 12 Mar 2018 21:39:28 +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 509AE11249; Mon, 12 Mar 2018 21:39:28 +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 w2CLdSJM038138; Mon, 12 Mar 2018 21:39:28 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CLdRva038132; Mon, 12 Mar 2018 21:39:27 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803122139.w2CLdRva038132@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Mar 2018 21:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330806 - in head/stand: common i386/libi386 libsa ofw/libofw uboot/lib zfs X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: common i386/libi386 libsa ofw/libofw uboot/lib zfs X-SVN-Commit-Revision: 330806 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 21:39:28 -0000 Author: imp Date: Mon Mar 12 21:39:27 2018 New Revision: 330806 URL: https://svnweb.freebsd.org/changeset/base/330806 Log: Minor cosmetic changes. Make sure { on the same line as struct for all struct *devdesc. Move some type definitions to next to the dv_type define, since that's what sets the d_type. Modified: head/stand/common/disk.h head/stand/i386/libi386/libi386.h head/stand/libsa/stand.h head/stand/ofw/libofw/libofw.h head/stand/uboot/lib/libuboot.h head/stand/zfs/libzfs.h Modified: head/stand/common/disk.h ============================================================================== --- head/stand/common/disk.h Mon Mar 12 17:37:38 2018 (r330805) +++ head/stand/common/disk.h Mon Mar 12 21:39:27 2018 (r330806) @@ -81,8 +81,8 @@ #ifndef _DISK_H #define _DISK_H -struct disk_devdesc -{ +/* Note: Must match the 'struct devdesc' in stand.h */ +struct disk_devdesc { struct devsw *d_dev; int d_type; int d_unit; Modified: head/stand/i386/libi386/libi386.h ============================================================================== --- head/stand/i386/libi386/libi386.h Mon Mar 12 17:37:38 2018 (r330805) +++ head/stand/i386/libi386/libi386.h Mon Mar 12 21:39:27 2018 (r330806) @@ -29,12 +29,10 @@ /* * i386 fully-qualified device descriptor. - * Note, this must match the 'struct devdesc' declaration - * in bootstrap.h and also with struct zfs_devdesc for zfs - * support. + * Note, this must match struct zfs_devdesc for zfs support. */ -struct i386_devdesc -{ +/* Note: Must match the 'struct devdesc' in stand.h */ +struct i386_devdesc { struct devsw *d_dev; int d_type; int d_unit; Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Mon Mar 12 17:37:38 2018 (r330805) +++ head/stand/libsa/stand.h Mon Mar 12 21:39:27 2018 (r330806) @@ -138,6 +138,12 @@ extern struct fs_ops pkgfs_fsops; struct devsw { const char dv_name[8]; int dv_type; /* opaque type constant, arch-dependant */ +#define DEVT_NONE 0 +#define DEVT_DISK 1 +#define DEVT_NET 2 +#define DEVT_CD 3 +#define DEVT_ZFS 4 +#define DEVT_FD 5 int (*dv_init)(void); /* early probe call */ int (*dv_strategy)(void *devdata, int rw, daddr_t blk, size_t size, char *buf, size_t *rsize); @@ -160,16 +166,9 @@ extern int errno; * versions may be larger, but should be allowed to * overlap. */ -struct devdesc -{ +struct devdesc { struct devsw *d_dev; int d_type; -#define DEVT_NONE 0 -#define DEVT_DISK 1 -#define DEVT_NET 2 -#define DEVT_CD 3 -#define DEVT_ZFS 4 -#define DEVT_FD 5 int d_unit; void *d_opendata; }; Modified: head/stand/ofw/libofw/libofw.h ============================================================================== --- head/stand/ofw/libofw/libofw.h Mon Mar 12 17:37:38 2018 (r330805) +++ head/stand/ofw/libofw/libofw.h Mon Mar 12 21:39:27 2018 (r330806) @@ -27,7 +27,7 @@ #include "openfirm.h" -/* Note: Must match the 'struct devdesc' in bootstrap.h */ +/* Note: Must match the 'struct devdesc' in stand.h */ struct ofw_devdesc { struct devsw *d_dev; int d_type; Modified: head/stand/uboot/lib/libuboot.h ============================================================================== --- head/stand/uboot/lib/libuboot.h Mon Mar 12 17:37:38 2018 (r330805) +++ head/stand/uboot/lib/libuboot.h Mon Mar 12 21:39:27 2018 (r330806) @@ -27,8 +27,8 @@ * $FreeBSD$ */ -struct uboot_devdesc -{ +/* Note: Must match the 'struct devdesc' in stand.h */ +struct uboot_devdesc { struct devsw *d_dev; int d_type; int d_unit; Modified: head/stand/zfs/libzfs.h ============================================================================== --- head/stand/zfs/libzfs.h Mon Mar 12 17:37:38 2018 (r330805) +++ head/stand/zfs/libzfs.h Mon Mar 12 21:39:27 2018 (r330806) @@ -33,12 +33,11 @@ /* * ZFS fully-qualified device descriptor. - * Note, this must match the 'struct devdesc' declaration in bootstrap.h. * Arch-specific device descriptors should be binary compatible with this * structure if they are to support ZFS. */ -struct zfs_devdesc -{ +/* Note: Must match the 'struct devdesc' in stand.h */ +struct zfs_devdesc { struct devsw *d_dev; int d_type; int d_unit; From owner-svn-src-all@freebsd.org Mon Mar 12 21:39:39 2018 Return-Path: Delivered-To: svn-src-all@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 CD76EF4D1D3; Mon, 12 Mar 2018 21:39:38 +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 6ED7D74D75; Mon, 12 Mar 2018 21:39:38 +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 69E0A1124A; Mon, 12 Mar 2018 21:39:38 +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 w2CLdcH6038197; Mon, 12 Mar 2018 21:39:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CLdcCV038195; Mon, 12 Mar 2018 21:39:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803122139.w2CLdcCV038195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Mar 2018 21:39:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330807 - in head/stand/efi: libefi loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand/efi: libefi loader X-SVN-Commit-Revision: 330807 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 21:39:39 -0000 Author: imp Date: Mon Mar 12 21:39:38 2018 New Revision: 330807 URL: https://svnweb.freebsd.org/changeset/base/330807 Log: We can't use d_opendata for blkio storage. open_disk uses d_opendata for it's own purpse. We can't store blkio there. Fortunately, blkio is stored elsewhere and we never actually retrieve blkio from d_opendata. Eliminate it as a source of confusion. Eliminate all stores of d_opendata in efi since this layer doesn't own that field. Modified: head/stand/efi/libefi/efipart.c head/stand/efi/loader/main.c Modified: head/stand/efi/libefi/efipart.c ============================================================================== --- head/stand/efi/libefi/efipart.c Mon Mar 12 21:39:27 2018 (r330806) +++ head/stand/efi/libefi/efipart.c Mon Mar 12 21:39:38 2018 (r330807) @@ -748,7 +748,6 @@ efipart_print_common(struct devsw *dev, pdinfo_list_t pd_dev.d_unit = pd->pd_unit; pd_dev.d_slice = -1; pd_dev.d_partition = -1; - pd_dev.d_opendata = blkio; ret = disk_open(&pd_dev, blkio->Media->BlockSize * (blkio->Media->LastBlock + 1), blkio->Media->BlockSize); Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Mon Mar 12 21:39:27 2018 (r330806) +++ head/stand/efi/loader/main.c Mon Mar 12 21:39:38 2018 (r330807) @@ -177,7 +177,6 @@ set_devdesc_currdev(struct devsw *dev, int unit) currdev.d_dev = dev; currdev.d_type = currdev.d_dev->dv_type; currdev.d_unit = unit; - currdev.d_opendata = NULL; devname = efi_fmtdev(&currdev); env_setenv("currdev", EV_VOLATILE, devname, efi_setcurrdev, @@ -205,7 +204,6 @@ find_currdev(EFI_LOADED_IMAGE *img) currdev.d_dev = &zfs_dev; currdev.d_unit = 0; currdev.d_type = currdev.d_dev->dv_type; - currdev.d_opendata = NULL; currdev.pool_guid = pool_guid; currdev.root_guid = 0; devname = efi_fmtdev(&currdev); @@ -227,7 +225,6 @@ find_currdev(EFI_LOADED_IMAGE *img) currdev.d_dev = &efipart_hddev; currdev.d_type = currdev.d_dev->dv_type; currdev.d_unit = dp->pd_unit; - currdev.d_opendata = NULL; currdev.d_slice = -1; currdev.d_partition = -1; From owner-svn-src-all@freebsd.org Mon Mar 12 21:39:45 2018 Return-Path: Delivered-To: svn-src-all@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 26902F4D20B; Mon, 12 Mar 2018 21:39:45 +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 B322274DED; Mon, 12 Mar 2018 21:39:43 +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 E0EA31124B; Mon, 12 Mar 2018 21:39:42 +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 w2CLdgph038250; Mon, 12 Mar 2018 21:39:42 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CLdgPV038249; Mon, 12 Mar 2018 21:39:42 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803122139.w2CLdgPV038249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Mar 2018 21:39:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330808 - head/stand/i386/libi386 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/i386/libi386 X-SVN-Commit-Revision: 330808 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 21:39:45 -0000 Author: imp Date: Mon Mar 12 21:39:42 2018 New Revision: 330808 URL: https://svnweb.freebsd.org/changeset/base/330808 Log: Make struct libi386_devdesc match the struct devdesc better Move data to top and call it d_opendata. Modified: head/stand/i386/libi386/libi386.h Modified: head/stand/i386/libi386/libi386.h ============================================================================== --- head/stand/i386/libi386/libi386.h Mon Mar 12 21:39:38 2018 (r330807) +++ head/stand/i386/libi386/libi386.h Mon Mar 12 21:39:42 2018 (r330808) @@ -36,22 +36,17 @@ struct i386_devdesc { struct devsw *d_dev; int d_type; int d_unit; + void *d_opendata; union { struct { - void *data; int slice; int partition; off_t offset; } biosdisk; struct { - void *data; - } bioscd; - struct - { - void *data; uint64_t pool_guid; uint64_t root_guid; } zfs; From owner-svn-src-all@freebsd.org Mon Mar 12 21:39:55 2018 Return-Path: Delivered-To: svn-src-all@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 4D395F4D245; Mon, 12 Mar 2018 21:39:54 +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 5C43E74F05; Mon, 12 Mar 2018 21:39:52 +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 508DE1124C; Mon, 12 Mar 2018 21:39:52 +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 w2CLdqHS038332; Mon, 12 Mar 2018 21:39:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CLdn7d038304; Mon, 12 Mar 2018 21:39:49 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803122139.w2CLdn7d038304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Mar 2018 21:39:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330809 - in head/stand: common efi/libefi efi/loader i386/libi386 i386/loader mips/beri/loader ofw/libofw sparc64/loader uboot/common uboot/lib userboot/userboot zfs X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: common efi/libefi efi/loader i386/libi386 i386/loader mips/beri/loader ofw/libofw sparc64/loader uboot/common uboot/lib userboot/userboot zfs X-SVN-Commit-Revision: 330809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 21:39:55 -0000 Author: imp Date: Mon Mar 12 21:39:49 2018 New Revision: 330809 URL: https://svnweb.freebsd.org/changeset/base/330809 Log: Use the actual struct devdesc at the start of all *_devdesc structs The current system is fragile and requires very careful layout of all *_devdesc structures. It also makes it hard to change the base devdesc. Take a page from CAM and put the 'header' in all the derived classes and adjust the code to match. For OFW, move the iHandle h_handle out of a slot conflicting with d_opendata. Due to quirks in the alignment rules, this worked. However changing the code to use d_opendata storage now that it's a pointer is hard, so just have a separate field for it. All other cleanups were to make the *_devdesc structures match where they'd taken some liberties that were none-the-less compatible enough to work. Modified: head/stand/common/disk.c head/stand/common/disk.h head/stand/efi/libefi/efipart.c head/stand/efi/libefi/efizfs.c head/stand/efi/loader/main.c head/stand/i386/libi386/bioscd.c head/stand/i386/libi386/biosdisk.c head/stand/i386/libi386/bootinfo32.c head/stand/i386/libi386/devicename.c head/stand/i386/libi386/libi386.h head/stand/i386/loader/chain.c head/stand/i386/loader/main.c head/stand/mips/beri/loader/beri_disk_cfi.c head/stand/mips/beri/loader/beri_disk_sdcard.c head/stand/mips/beri/loader/devicename.c head/stand/ofw/libofw/devicename.c head/stand/ofw/libofw/libofw.h head/stand/sparc64/loader/main.c head/stand/uboot/common/main.c head/stand/uboot/lib/devicename.c head/stand/uboot/lib/disk.c head/stand/uboot/lib/libuboot.h head/stand/userboot/userboot/devicename.c head/stand/userboot/userboot/main.c head/stand/userboot/userboot/userboot_disk.c head/stand/zfs/libzfs.h head/stand/zfs/zfs.c Modified: head/stand/common/disk.c ============================================================================== --- head/stand/common/disk.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/common/disk.c Mon Mar 12 21:39:49 2018 (r330809) @@ -86,7 +86,7 @@ ptblread(void *d, void *buf, size_t blocks, uint64_t o struct open_disk *od; dev = (struct disk_devdesc *)d; - od = (struct open_disk *)dev->d_opendata; + od = (struct open_disk *)dev->dd.d_opendata; /* * The strategy function assumes the offset is in units of 512 byte @@ -98,7 +98,7 @@ ptblread(void *d, void *buf, size_t blocks, uint64_t o * As the GPT backup partition is located at the end of the disk, * to avoid reading past disk end, flag bcache not to use RA. */ - return (dev->d_dev->dv_strategy(dev, F_READ | F_NORA, offset, + return (dev->dd.d_dev->dv_strategy(dev, F_READ | F_NORA, offset, blocks * od->sectorsize, (char *)buf, NULL)); } @@ -114,7 +114,7 @@ ptable_print(void *arg, const char *pname, const struc int res; pa = (struct print_args *)arg; - od = (struct open_disk *)pa->dev->d_opendata; + od = (struct open_disk *)pa->dev->dd.d_opendata; sprintf(line, " %s%s: %s", pa->prefix, pname, parttype2str(part->type)); if (pa->verbose) @@ -127,8 +127,8 @@ ptable_print(void *arg, const char *pname, const struc res = 0; if (part->type == PART_FREEBSD) { /* Open slice with BSD label */ - dev.d_dev = pa->dev->d_dev; - dev.d_unit = pa->dev->d_unit; + dev.dd.d_dev = pa->dev->dd.d_dev; + dev.dd.d_unit = pa->dev->dd.d_unit; dev.d_slice = part->index; dev.d_partition = -1; if (disk_open(&dev, part->end - part->start + 1, @@ -158,7 +158,7 @@ disk_print(struct disk_devdesc *dev, char *prefix, int struct print_args pa; /* Disk should be opened */ - od = (struct open_disk *)dev->d_opendata; + od = (struct open_disk *)dev->dd.d_opendata; pa.dev = dev; pa.prefix = prefix; pa.verbose = verbose; @@ -171,8 +171,8 @@ disk_read(struct disk_devdesc *dev, void *buf, uint64_ struct open_disk *od; int ret; - od = (struct open_disk *)dev->d_opendata; - ret = dev->d_dev->dv_strategy(dev, F_READ, dev->d_offset + offset, + od = (struct open_disk *)dev->dd.d_opendata; + ret = dev->dd.d_dev->dv_strategy(dev, F_READ, dev->d_offset + offset, blocks * od->sectorsize, buf, NULL); return (ret); @@ -184,8 +184,8 @@ disk_write(struct disk_devdesc *dev, void *buf, uint64 struct open_disk *od; int ret; - od = (struct open_disk *)dev->d_opendata; - ret = dev->d_dev->dv_strategy(dev, F_WRITE, dev->d_offset + offset, + od = (struct open_disk *)dev->dd.d_opendata; + ret = dev->dd.d_dev->dv_strategy(dev, F_WRITE, dev->d_offset + offset, blocks * od->sectorsize, buf, NULL); return (ret); @@ -194,7 +194,7 @@ disk_write(struct disk_devdesc *dev, void *buf, uint64 int disk_ioctl(struct disk_devdesc *dev, u_long cmd, void *data) { - struct open_disk *od = dev->d_opendata; + struct open_disk *od = dev->dd.d_opendata; if (od == NULL) return (ENOTTY); @@ -238,7 +238,7 @@ disk_open(struct disk_devdesc *dev, uint64_t mediasize DEBUG("no memory"); return (ENOMEM); } - dev->d_opendata = od; + dev->dd.d_opendata = od; od->entrysize = 0; od->mediasize = mediasize; od->sectorsize = sectorsize; @@ -348,7 +348,7 @@ disk_close(struct disk_devdesc *dev) { struct open_disk *od; - od = (struct open_disk *)dev->d_opendata; + od = (struct open_disk *)dev->dd.d_opendata; DEBUG("%s closed => %p", disk_fmtdev(dev), od); ptable_close(od->table); free(od); @@ -361,7 +361,7 @@ disk_fmtdev(struct disk_devdesc *dev) static char buf[128]; char *cp; - cp = buf + sprintf(buf, "%s%d", dev->d_dev->dv_name, dev->d_unit); + cp = buf + sprintf(buf, "%s%d", dev->dd.d_dev->dv_name, dev->dd.d_unit); if (dev->d_slice >= 0) { #ifdef LOADER_GPT_SUPPORT if (dev->d_partition == 255) { @@ -423,7 +423,7 @@ disk_parsedev(struct disk_devdesc *dev, const char *de if (*cp != '\0' && *cp != ':') return (EINVAL); - dev->d_unit = unit; + dev->dd.d_unit = unit; dev->d_slice = slice; dev->d_partition = partition; if (path != NULL) Modified: head/stand/common/disk.h ============================================================================== --- head/stand/common/disk.h Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/common/disk.h Mon Mar 12 21:39:49 2018 (r330809) @@ -83,10 +83,7 @@ /* Note: Must match the 'struct devdesc' in stand.h */ struct disk_devdesc { - struct devsw *d_dev; - int d_type; - int d_unit; - void *d_opendata; + struct devdesc dd; int d_slice; int d_partition; uint64_t d_offset; Modified: head/stand/efi/libefi/efipart.c ============================================================================== --- head/stand/efi/libefi/efipart.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/efi/libefi/efipart.c Mon Mar 12 21:39:49 2018 (r330809) @@ -744,8 +744,8 @@ efipart_print_common(struct devsw *dev, pdinfo_list_t continue; pd->pd_blkio = blkio; - pd_dev.d_dev = dev; - pd_dev.d_unit = pd->pd_unit; + pd_dev.dd.d_dev = dev; + pd_dev.dd.d_unit = pd->pd_unit; pd_dev.d_slice = -1; pd_dev.d_partition = -1; ret = disk_open(&pd_dev, blkio->Media->BlockSize * @@ -820,7 +820,7 @@ efipart_open(struct open_file *f, ...) if (pd->pd_bcache == NULL) pd->pd_bcache = bcache_allocate(); - if (dev->d_dev->dv_type == DEVT_DISK) { + if (dev->dd.d_dev->dv_type == DEVT_DISK) { int rc; rc = disk_open(dev, @@ -859,7 +859,7 @@ efipart_close(struct open_file *f) bcache_free(pd->pd_bcache); pd->pd_bcache = NULL; } - if (dev->d_dev->dv_type == DEVT_DISK) + if (dev->dd.d_dev->dv_type == DEVT_DISK) return (disk_close(dev)); return (0); } @@ -879,7 +879,7 @@ efipart_ioctl(struct open_file *f, u_long cmd, void *d if (pd == NULL) return (EINVAL); - if (dev->d_dev->dv_type == DEVT_DISK) { + if (dev->dd.d_dev->dv_type == DEVT_DISK) { rc = disk_ioctl(dev, cmd, data); if (rc != ENOTTY) return (rc); @@ -966,7 +966,7 @@ efipart_strategy(void *devdata, int rw, daddr_t blk, s bcd.dv_devdata = devdata; bcd.dv_cache = pd->pd_bcache; - if (dev->d_dev->dv_type == DEVT_DISK) { + if (dev->dd.d_dev->dv_type == DEVT_DISK) { daddr_t offset; offset = dev->d_offset * pd->pd_blkio->Media->BlockSize; @@ -1010,7 +1010,7 @@ efipart_realstrategy(void *devdata, int rw, daddr_t bl * partition. */ disk_blocks = 0; - if (dev->d_dev->dv_type == DEVT_DISK) { + if (dev->dd.d_dev->dv_type == DEVT_DISK) { if (disk_ioctl(dev, DIOCGMEDIASIZE, &disk_blocks) == 0) { /* DIOCGMEDIASIZE does return bytes. */ disk_blocks /= blkio->Media->BlockSize; Modified: head/stand/efi/libefi/efizfs.c ============================================================================== --- head/stand/efi/libefi/efizfs.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/efi/libefi/efizfs.c Mon Mar 12 21:39:49 2018 (r330809) @@ -29,8 +29,7 @@ __FBSDID("$FreeBSD$"); #include -#include -#include +#include #ifdef EFI_ZFS_BOOT #include Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/efi/loader/main.c Mon Mar 12 21:39:49 2018 (r330809) @@ -201,9 +201,9 @@ find_currdev(EFI_LOADED_IMAGE *img) if (pool_guid != 0) { struct zfs_devdesc currdev; - currdev.d_dev = &zfs_dev; - currdev.d_unit = 0; - currdev.d_type = currdev.d_dev->dv_type; + currdev.dd.d_dev = &zfs_dev; + currdev.dd.d_unit = 0; + currdev.dd.d_type = currdev.dd.d_dev->dv_type; currdev.pool_guid = pool_guid; currdev.root_guid = 0; devname = efi_fmtdev(&currdev); @@ -222,9 +222,9 @@ find_currdev(EFI_LOADED_IMAGE *img) STAILQ_FOREACH(dp, pdi_list, pd_link) { struct disk_devdesc currdev; - currdev.d_dev = &efipart_hddev; - currdev.d_type = currdev.d_dev->dv_type; - currdev.d_unit = dp->pd_unit; + currdev.dd.d_dev = &efipart_hddev; + currdev.dd.d_type = currdev.dd.d_dev->dv_type; + currdev.dd.d_unit = dp->pd_unit; currdev.d_slice = -1; currdev.d_partition = -1; Modified: head/stand/i386/libi386/bioscd.c ============================================================================== --- head/stand/i386/libi386/bioscd.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/i386/libi386/bioscd.c Mon Mar 12 21:39:49 2018 (r330809) @@ -90,7 +90,7 @@ static struct bcinfo { } bcinfo [MAXBCDEV]; static int nbcinfo = 0; -#define BC(dev) (bcinfo[(dev)->d_unit]) +#define BC(dev) (bcinfo[(dev)->dd.d_unit]) static int bc_read(int unit, daddr_t dblk, int blks, caddr_t dest); static int bc_init(void); @@ -211,7 +211,7 @@ bc_open(struct open_file *f, ...) va_start(ap, f); dev = va_arg(ap, struct i386_devdesc *); va_end(ap); - if (dev->d_unit >= nbcinfo) { + if (dev->dd.d_unit >= nbcinfo) { DEBUG("attempt to open nonexistent disk"); return(ENXIO); } @@ -271,7 +271,7 @@ bc_realstrategy(void *devdata, int rw, daddr_t dblk, s if ((rw & F_MASK) != F_READ) return(EROFS); dev = (struct i386_devdesc *)devdata; - unit = dev->d_unit; + unit = dev->dd.d_unit; blks = size / BIOSCD_SECSIZE; if (dblk % (BIOSCD_SECSIZE / DEV_BSIZE) != 0) return (EINVAL); @@ -427,7 +427,7 @@ bc_getdev(struct i386_devdesc *dev) int major; int rootdev; - unit = dev->d_unit; + unit = dev->dd.d_unit; biosdev = bc_unit2bios(unit); DEBUG("unit %d BIOS device %d", unit, biosdev); if (biosdev == -1) /* not a BIOS device */ Modified: head/stand/i386/libi386/biosdisk.c ============================================================================== --- head/stand/i386/libi386/biosdisk.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/i386/libi386/biosdisk.c Mon Mar 12 21:39:49 2018 (r330809) @@ -120,7 +120,7 @@ static struct bdinfo } bdinfo [MAXBDDEV]; static int nbdinfo = 0; -#define BD(dev) (bdinfo[(dev)->d_unit]) +#define BD(dev) (bdinfo[(dev)->dd.d_unit]) static int bd_read(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest); @@ -349,8 +349,8 @@ bd_print(int verbose) bdinfo[i].bd_sectorsize); if ((ret = pager_output(line)) != 0) break; - dev.d_dev = &biosdisk; - dev.d_unit = i; + dev.dd.d_dev = &biosdisk; + dev.dd.d_unit = i; dev.d_slice = -1; dev.d_partition = -1; if (disk_open(&dev, @@ -389,7 +389,7 @@ bd_open(struct open_file *f, ...) dev = va_arg(ap, struct disk_devdesc *); va_end(ap); - if (dev->d_unit < 0 || dev->d_unit >= nbdinfo) + if (dev->dd.d_unit < 0 || dev->dd.d_unit >= nbdinfo) return (EIO); BD(dev).bd_open++; if (BD(dev).bd_bcache == NULL) @@ -402,10 +402,10 @@ bd_open(struct open_file *f, ...) * During bd_probe() we tested if the mulitplication of bd_sectors * would overflow so it should be safe to perform here. */ - disk.d_dev = dev->d_dev; - disk.d_type = dev->d_type; - disk.d_unit = dev->d_unit; - disk.d_opendata = NULL; + disk.dd.d_dev = dev->dd.d_dev; + disk.dd.d_type = dev->dd.d_type; + disk.dd.d_unit = dev->dd.d_unit; + disk.dd.d_opendata = NULL; disk.d_slice = -1; disk.d_partition = -1; disk.d_offset = 0; @@ -431,7 +431,7 @@ bd_open(struct open_file *f, ...) return (err); /* if we already know there is no GELI, skip the rest */ - if (geli_status[dev->d_unit][dev->d_slice] != ISGELI_UNKNOWN) + if (geli_status[dev->dd.d_unit][dev->d_slice] != ISGELI_UNKNOWN) return (err); struct dsk dskp; @@ -440,9 +440,9 @@ bd_open(struct open_file *f, ...) struct pentry *entry; int geli_part = 0; - dskp.drive = bd_unit2bios(dev->d_unit); - dskp.type = dev->d_type; - dskp.unit = dev->d_unit; + dskp.drive = bd_unit2bios(dev->dd.d_unit); + dskp.type = dev->dd.d_type; + dskp.unit = dev->dd.d_unit; dskp.slice = dev->d_slice; dskp.part = dev->d_partition; dskp.start = dev->d_offset; @@ -466,13 +466,13 @@ bd_open(struct open_file *f, ...) dskp.slice = entry->part.index; dskp.start = entry->part.start; if (is_geli(&dskp) == 0) { - geli_status[dev->d_unit][dskp.slice] = ISGELI_YES; + geli_status[dev->dd.d_unit][dskp.slice] = ISGELI_YES; return (0); } if (geli_taste(bios_read, &dskp, entry->part.end - entry->part.start) == 0) { if (geli_havekey(&dskp) == 0) { - geli_status[dev->d_unit][dskp.slice] = ISGELI_YES; + geli_status[dev->dd.d_unit][dskp.slice] = ISGELI_YES; geli_part++; continue; } @@ -486,18 +486,18 @@ bd_open(struct open_file *f, ...) &dskp) == 0) { setenv("kern.geom.eli.passphrase", gelipw, 1); bzero(gelipw, sizeof(gelipw)); - geli_status[dev->d_unit][dskp.slice] = ISGELI_YES; + geli_status[dev->dd.d_unit][dskp.slice] = ISGELI_YES; geli_part++; continue; } } else - geli_status[dev->d_unit][dskp.slice] = ISGELI_NO; + geli_status[dev->dd.d_unit][dskp.slice] = ISGELI_NO; } /* none of the partitions on this disk have GELI */ if (geli_part == 0) { /* found no GELI */ - geli_status[dev->d_unit][dev->d_slice] = ISGELI_NO; + geli_status[dev->dd.d_unit][dev->d_slice] = ISGELI_NO; } #endif /* LOADER_GELI_SUPPORT */ @@ -834,10 +834,10 @@ bd_read(struct disk_devdesc *dev, daddr_t dblk, int bl char *tmpbuf; /* if we already know there is no GELI, skip the rest */ - if (geli_status[dev->d_unit][dev->d_slice] != ISGELI_YES) + if (geli_status[dev->dd.d_unit][dev->d_slice] != ISGELI_YES) return (bd_io(dev, dblk, blks, dest, 0)); - if (geli_status[dev->d_unit][dev->d_slice] == ISGELI_YES) { + if (geli_status[dev->dd.d_unit][dev->d_slice] == ISGELI_YES) { /* * Align reads to DEV_GELIBOOT_BSIZE bytes because partial * sectors cannot be decrypted. Round the requested LBA down to @@ -871,9 +871,9 @@ bd_read(struct disk_devdesc *dev, daddr_t dblk, int bl if (err) return (err); - dskp.drive = bd_unit2bios(dev->d_unit); - dskp.type = dev->d_type; - dskp.unit = dev->d_unit; + dskp.drive = bd_unit2bios(dev->dd.d_unit); + dskp.type = dev->dd.d_type; + dskp.unit = dev->dd.d_unit; dskp.slice = dev->d_slice; dskp.part = dev->d_partition; dskp.start = dev->d_offset; @@ -950,8 +950,8 @@ bd_getdev(struct i386_devdesc *d) int i, unit; dev = (struct disk_devdesc *)d; - biosdev = bd_unit2bios(dev->d_unit); - DEBUG("unit %d BIOS device %d", dev->d_unit, biosdev); + biosdev = bd_unit2bios(dev->dd.d_unit); + DEBUG("unit %d BIOS device %d", dev->dd.d_unit, biosdev); if (biosdev == -1) /* not a BIOS device */ return(-1); if (disk_open(dev, BD(dev).bd_sectors * BD(dev).bd_sectorsize, @@ -962,7 +962,7 @@ bd_getdev(struct i386_devdesc *d) if (biosdev < 0x80) { /* floppy (or emulated floppy) or ATAPI device */ - if (bdinfo[dev->d_unit].bd_type == DT_ATAPI) { + if (bdinfo[dev->dd.d_unit].bd_type == DT_ATAPI) { /* is an ATAPI disk */ major = WFDMAJOR; } else { @@ -996,9 +996,9 @@ bios_read(void *vdev __unused, void *xpriv, off_t off, struct disk_devdesc dev; struct dsk *priv = xpriv; - dev.d_dev = &biosdisk; - dev.d_type = priv->type; - dev.d_unit = priv->unit; + dev.dd.d_dev = &biosdisk; + dev.dd.d_type = priv->type; + dev.dd.d_unit = priv->unit; dev.d_slice = priv->slice; dev.d_partition = priv->part; dev.d_offset = priv->start; Modified: head/stand/i386/libi386/bootinfo32.c ============================================================================== --- head/stand/i386/libi386/bootinfo32.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/i386/libi386/bootinfo32.c Mon Mar 12 21:39:49 2018 (r330809) @@ -181,16 +181,16 @@ bi_load32(char *args, int *howtop, int *bootdevp, vm_o /* XXX - use a default bootdev of 0. Is this ok??? */ bootdevnr = 0; - switch(rootdev->d_type) { + switch(rootdev->dd.d_type) { case DEVT_CD: /* Pass in BIOS device number. */ - bi.bi_bios_dev = bc_unit2bios(rootdev->d_unit); + bi.bi_bios_dev = bc_unit2bios(rootdev->dd.d_unit); bootdevnr = bc_getdev(rootdev); break; case DEVT_DISK: /* pass in the BIOS device number of the current disk */ - bi.bi_bios_dev = bd_unit2bios(rootdev->d_unit); + bi.bi_bios_dev = bd_unit2bios(rootdev->dd.d_unit); bootdevnr = bd_getdev(rootdev); break; @@ -199,7 +199,7 @@ bi_load32(char *args, int *howtop, int *bootdevp, vm_o break; default: - printf("WARNING - don't know how to boot from device type %d\n", rootdev->d_type); + printf("WARNING - don't know how to boot from device type %d\n", rootdev->dd.d_type); } if (bootdevnr == -1) { printf("root device %s invalid\n", i386_fmtdev(rootdev)); Modified: head/stand/i386/libi386/devicename.c ============================================================================== --- head/stand/i386/libi386/devicename.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/i386/libi386/devicename.c Mon Mar 12 21:39:49 2018 (r330809) @@ -135,7 +135,7 @@ i386_parsedev(struct i386_devdesc **dev, const char *d goto fail; } - idev->d_unit = unit; + idev->dd.d_unit = unit; if (path != NULL) *path = (*cp == 0) ? cp : cp + 1; break; @@ -148,8 +148,8 @@ i386_parsedev(struct i386_devdesc **dev, const char *d err = EINVAL; goto fail; } - idev->d_dev = dv; - idev->d_type = dv->dv_type; + idev->dd.d_dev = dv; + idev->dd.d_type = dv->dv_type; if (dev == NULL) { free(idev); } else { @@ -169,14 +169,14 @@ i386_fmtdev(void *vdev) struct i386_devdesc *dev = (struct i386_devdesc *)vdev; static char buf[128]; /* XXX device length constant? */ - switch(dev->d_type) { + switch(dev->dd.d_type) { case DEVT_NONE: strcpy(buf, "(no device)"); break; case DEVT_CD: case DEVT_NET: - sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); + sprintf(buf, "%s%d:", dev->dd.d_dev->dv_name, dev->dd.d_unit); break; case DEVT_DISK: Modified: head/stand/i386/libi386/libi386.h ============================================================================== --- head/stand/i386/libi386/libi386.h Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/i386/libi386/libi386.h Mon Mar 12 21:39:49 2018 (r330809) @@ -33,10 +33,7 @@ */ /* Note: Must match the 'struct devdesc' in stand.h */ struct i386_devdesc { - struct devsw *d_dev; - int d_type; - int d_unit; - void *d_opendata; + struct devdesc dd; union { struct Modified: head/stand/i386/loader/chain.c ============================================================================== --- head/stand/i386/loader/chain.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/i386/loader/chain.c Mon Mar 12 21:39:49 2018 (r330809) @@ -111,7 +111,7 @@ command_chain(int argc, char *argv[]) relocater_data[0].dest = 0x7C00; relocater_data[0].size = SECTOR_SIZE; - relocator_edx = bd_unit2bios(rootdev->d_unit); + relocator_edx = bd_unit2bios(rootdev->dd.d_unit); relocator_esi = relocater_size; relocator_ds = 0; relocator_es = 0; Modified: head/stand/i386/loader/main.c ============================================================================== --- head/stand/i386/loader/main.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/i386/loader/main.c Mon Mar 12 21:39:49 2018 (r330809) @@ -254,18 +254,18 @@ extract_currdev(void) int biosdev = -1; /* Assume we are booting from a BIOS disk by default */ - new_currdev.d_dev = &biosdisk; + new_currdev.dd.d_dev = &biosdisk; /* new-style boot loaders such as pxeldr and cdldr */ if (kargs->bootinfo == 0) { if ((kargs->bootflags & KARGS_FLAGS_CD) != 0) { /* we are booting from a CD with cdboot */ - new_currdev.d_dev = &bioscd; - new_currdev.d_unit = bc_bios2unit(initial_bootdev); + new_currdev.dd.d_dev = &bioscd; + new_currdev.dd.d_unit = bc_bios2unit(initial_bootdev); } else if ((kargs->bootflags & KARGS_FLAGS_PXE) != 0) { /* we are booting from pxeldr */ - new_currdev.d_dev = &pxedisk; - new_currdev.d_unit = 0; + new_currdev.dd.d_dev = &pxedisk; + new_currdev.dd.d_unit = 0; } else { /* we don't know what our boot device is */ new_currdev.d_kind.biosdisk.slice = -1; @@ -295,7 +295,7 @@ extract_currdev(void) new_currdev.d_kind.zfs.pool_guid = kargs->zfspool; new_currdev.d_kind.zfs.root_guid = 0; } - new_currdev.d_dev = &zfs_dev; + new_currdev.dd.d_dev = &zfs_dev; #endif } else if ((initial_bootdev & B_MAGICMASK) != B_DEVMAGIC) { /* The passed-in boot device is bad */ @@ -316,21 +316,21 @@ extract_currdev(void) if ((biosdev == 0) && (B_TYPE(initial_bootdev) != 2)) /* biosdev doesn't match major */ biosdev = 0x80 + B_UNIT(initial_bootdev); /* assume harddisk */ } - new_currdev.d_type = new_currdev.d_dev->dv_type; + new_currdev.dd.d_type = new_currdev.dd.d_dev->dv_type; /* * If we are booting off of a BIOS disk and we didn't succeed in determining * which one we booted off of, just use disk0: as a reasonable default. */ - if ((new_currdev.d_type == biosdisk.dv_type) && - ((new_currdev.d_unit = bd_bios2unit(biosdev)) == -1)) { + if ((new_currdev.dd.d_type == biosdisk.dv_type) && + ((new_currdev.dd.d_unit = bd_bios2unit(biosdev)) == -1)) { printf("Can't work out which disk we are booting from.\n" "Guessed BIOS device 0x%x not found by probes, defaulting to disk0:\n", biosdev); - new_currdev.d_unit = 0; + new_currdev.dd.d_unit = 0; } #ifdef LOADER_ZFS_SUPPORT - if (new_currdev.d_type == DEVT_ZFS) + if (new_currdev.dd.d_type == DEVT_ZFS) init_zfs_bootenv(zfs_fmtdev(&new_currdev)); #endif Modified: head/stand/mips/beri/loader/beri_disk_cfi.c ============================================================================== --- head/stand/mips/beri/loader/beri_disk_cfi.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/mips/beri/loader/beri_disk_cfi.c Mon Mar 12 21:39:49 2018 (r330809) @@ -98,7 +98,7 @@ beri_cfi_disk_open(struct open_file *f, ...) dev = va_arg(ap, struct disk_devdesc *); va_end(ap); - if (dev->d_unit != 0) + if (dev->dd.d_unit != 0) return (EIO); return (disk_open(dev, cfi_get_mediasize(), cfi_get_sectorsize())); } @@ -127,8 +127,8 @@ beri_cfi_disk_print(int verbose) ret = pager_output(line); if (ret != 0) return (ret); - dev.d_dev = &beri_cfi_disk; - dev.d_unit = 0; + dev.dd.d_dev = &beri_cfi_disk; + dev.dd.d_unit = 0; dev.d_slice = -1; dev.d_partition = -1; if (disk_open(&dev, cfi_get_mediasize(), cfi_get_sectorsize()) == 0) { Modified: head/stand/mips/beri/loader/beri_disk_sdcard.c ============================================================================== --- head/stand/mips/beri/loader/beri_disk_sdcard.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/mips/beri/loader/beri_disk_sdcard.c Mon Mar 12 21:39:49 2018 (r330809) @@ -103,7 +103,7 @@ beri_sdcard_disk_open(struct open_file *f, ...) return (ENXIO); } - if (dev->d_unit != 0) + if (dev->dd.d_unit != 0) return (EIO); return (disk_open(dev, altera_sdcard_get_mediasize(), altera_sdcard_get_sectorsize())); @@ -133,8 +133,8 @@ beri_sdcard_disk_print(int verbose) ret = pager_output(line); if (ret != 0) return (ret); - dev.d_dev = &beri_sdcard_disk; - dev.d_unit = 0; + dev.dd.d_dev = &beri_sdcard_disk; + dev.dd.d_unit = 0; dev.d_slice = -1; dev.d_partition = -1; if (disk_open(&dev, altera_sdcard_get_mediasize(), Modified: head/stand/mips/beri/loader/devicename.c ============================================================================== --- head/stand/mips/beri/loader/devicename.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/mips/beri/loader/devicename.c Mon Mar 12 21:39:49 2018 (r330809) @@ -139,7 +139,7 @@ beri_arch_parsedev(struct disk_devdesc **dev, const ch goto fail; } - idev->d_unit = unit; + idev->dd.d_unit = unit; if (path != NULL) *path = (*cp == 0) ? cp : cp + 1; break; @@ -148,8 +148,8 @@ beri_arch_parsedev(struct disk_devdesc **dev, const ch err = EINVAL; goto fail; } - idev->d_dev = dv; - idev->d_type = dv->dv_type; + idev->dd.d_dev = dv; + idev->dd.d_type = dv->dv_type; if (dev == NULL) { free(idev); } else { @@ -175,7 +175,7 @@ beri_arch_fmtdev(void *vdev) break; case DEVT_CD: - sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); + sprintf(buf, "%s%d:", dev->dd.d_dev->dv_name, dev->dd.d_unit); break; case DEVT_DISK: @@ -183,7 +183,7 @@ beri_arch_fmtdev(void *vdev) case DEVT_NET: case DEVT_ZFS: - sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); + sprintf(buf, "%s%d:", dev->dd.d_dev->dv_name, dev->dd.d_unit); break; } return(buf); Modified: head/stand/ofw/libofw/devicename.c ============================================================================== --- head/stand/ofw/libofw/devicename.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/ofw/libofw/devicename.c Mon Mar 12 21:39:49 2018 (r330809) @@ -113,9 +113,9 @@ found: return ENOMEM; } strcpy(idev->d_path, name); - idev->d_dev = dv; - idev->d_type = dv->dv_type; - if (idev->d_type == DEVT_ZFS) { + idev->dd.d_dev = dv; + idev->dd.d_type = dv->dv_type; + if (idev->dd.d_type == DEVT_ZFS) { p = devspec + strlen(dv->dv_name); err = zfs_parsedev((struct zfs_devdesc *)idev, p, path); if (err != 0) { Modified: head/stand/ofw/libofw/libofw.h ============================================================================== --- head/stand/ofw/libofw/libofw.h Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/ofw/libofw/libofw.h Mon Mar 12 21:39:49 2018 (r330809) @@ -27,14 +27,13 @@ #include "openfirm.h" -/* Note: Must match the 'struct devdesc' in stand.h */ struct ofw_devdesc { - struct devsw *d_dev; - int d_type; - int d_unit; - ihandle_t d_handle; + struct devdesc dd; union { - char d_path[256]; + struct { + ihandle_t d_handle; + char d_path[256]; + }; struct { uint64_t pool_guid; uint64_t root_guid; Modified: head/stand/sparc64/loader/main.c ============================================================================== --- head/stand/sparc64/loader/main.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/sparc64/loader/main.c Mon Mar 12 21:39:49 2018 (r330809) @@ -806,8 +806,8 @@ sparc64_zfs_probe(void) if (guid != 0) { zfs_currdev.pool_guid = guid; zfs_currdev.root_guid = 0; - zfs_currdev.d_dev = &zfs_dev; - zfs_currdev.d_type = zfs_currdev.d_dev->dv_type; + zfs_currdev.dd.d_dev = &zfs_dev; + zfs_currdev.dd.d_type = zfs_currdev.dd.d_dev->dv_type; } } #endif /* LOADER_ZFS_SUPPORT */ Modified: head/stand/uboot/common/main.c ============================================================================== --- head/stand/uboot/common/main.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/uboot/common/main.c Mon Mar 12 21:39:49 2018 (r330809) @@ -318,7 +318,7 @@ print_disk_probe_info() strcpy(partition, ""); printf(" Checking unit=%d slice=%s partition=%s...", - currdev.d_unit, slice, partition); + currdev.dd.d_unit, slice, partition); } @@ -338,8 +338,8 @@ probe_disks(int devidx, int load_type, int load_unit, if (load_type == -1) { printf(" Probing all disk devices...\n"); /* Try each disk in succession until one works. */ - for (currdev.d_unit = 0; currdev.d_unit < UB_MAX_DEV; - currdev.d_unit++) { + for (currdev.dd.d_unit = 0; currdev.dd.d_unit < UB_MAX_DEV; + currdev.dd.d_unit++) { print_disk_probe_info(); open_result = devsw[devidx]->dv_open(&f, &currdev); if (open_result == 0) { @@ -355,8 +355,8 @@ probe_disks(int devidx, int load_type, int load_unit, printf(" Probing all %s devices...\n", device_typename(load_type)); /* Try each disk of given type in succession until one works. */ for (unit = 0; unit < UB_MAX_DEV; unit++) { - currdev.d_unit = uboot_diskgetunit(load_type, unit); - if (currdev.d_unit == -1) + currdev.dd.d_unit = uboot_diskgetunit(load_type, unit); + if (currdev.dd.d_unit == -1) break; print_disk_probe_info(); open_result = devsw[devidx]->dv_open(&f, &currdev); @@ -369,7 +369,7 @@ probe_disks(int devidx, int load_type, int load_unit, return (-1); } - if ((currdev.d_unit = uboot_diskgetunit(load_type, load_unit)) != -1) { + if ((currdev.dd.d_unit = uboot_diskgetunit(load_type, load_unit)) != -1) { print_disk_probe_info(); open_result = devsw[devidx]->dv_open(&f,&currdev); if (open_result == 0) { @@ -459,9 +459,9 @@ main(int argc, char **argv) printf("Found U-Boot device: %s\n", devsw[i]->dv_name); - currdev.d_dev = devsw[i]; - currdev.d_type = currdev.d_dev->dv_type; - currdev.d_unit = 0; + currdev.dd.d_dev = devsw[i]; + currdev.dd.d_type = currdev.dd.d_dev->dv_type; + currdev.dd.d_unit = 0; if ((load_type == -1 || (load_type & DEV_TYP_STOR)) && strcmp(devsw[i]->dv_name, "disk") == 0) { Modified: head/stand/uboot/lib/devicename.c ============================================================================== --- head/stand/uboot/lib/devicename.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/uboot/lib/devicename.c Mon Mar 12 21:39:49 2018 (r330809) @@ -136,7 +136,7 @@ uboot_parsedev(struct uboot_devdesc **dev, const char err = EINVAL; goto fail; } - idev->d_unit = unit; + idev->dd.d_unit = unit; if (path != NULL) *path = (*cp == 0) ? cp : cp + 1; @@ -146,8 +146,8 @@ uboot_parsedev(struct uboot_devdesc **dev, const char err = EINVAL; goto fail; } - idev->d_dev = dv; - idev->d_type = dv->dv_type; + idev->dd.d_dev = dv; + idev->dd.d_type = dv->dv_type; if (dev == NULL) { free(idev); } else { @@ -167,7 +167,7 @@ uboot_fmtdev(void *vdev) struct uboot_devdesc *dev = (struct uboot_devdesc *)vdev; static char buf[128]; - switch(dev->d_type) { + switch(dev->dd.d_type) { case DEVT_NONE: strcpy(buf, "(no device)"); break; @@ -178,7 +178,7 @@ uboot_fmtdev(void *vdev) #endif case DEVT_NET: - sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); + sprintf(buf, "%s%d:", dev->dd.d_dev->dv_name, dev->dd.d_unit); break; } return(buf); Modified: head/stand/uboot/lib/disk.c ============================================================================== --- head/stand/uboot/lib/disk.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/uboot/lib/disk.c Mon Mar 12 21:39:49 2018 (r330809) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include "libuboot.h" #define stor_printf(fmt, args...) do { \ - printf("%s%d: ", dev->d_dev->dv_name, dev->d_unit); \ + printf("%s%d: ", dev->dd.d_dev->dv_name, dev->dd.d_unit); \ printf(fmt, ##args); \ } while (0) @@ -65,7 +65,7 @@ static struct { u_int bsize; /* block size */ } stor_info[UB_MAX_DEV]; -#define SI(dev) (stor_info[(dev)->d_unit]) +#define SI(dev) (stor_info[(dev)->dd.d_unit]) static int stor_info_no = 0; static int stor_opendev(struct disk_devdesc *); @@ -190,7 +190,7 @@ stor_opendev(struct disk_devdesc *dev) { int err; - if (dev->d_unit < 0 || dev->d_unit >= stor_info_no) + if (dev->dd.d_unit < 0 || dev->dd.d_unit >= stor_info_no) return (EIO); if (SI(dev).opened == 0) { @@ -252,8 +252,8 @@ stor_print(int verbose) return (ret); for (i = 0; i < stor_info_no; i++) { - dev.d_dev = &uboot_storage; - dev.d_unit = i; + dev.dd.d_dev = &uboot_storage; + dev.dd.d_unit = i; dev.d_slice = -1; dev.d_partition = -1; snprintf(line, sizeof(line), "\tdisk%d (%s)\n", i, Modified: head/stand/uboot/lib/libuboot.h ============================================================================== --- head/stand/uboot/lib/libuboot.h Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/uboot/lib/libuboot.h Mon Mar 12 21:39:49 2018 (r330809) @@ -29,10 +29,7 @@ /* Note: Must match the 'struct devdesc' in stand.h */ struct uboot_devdesc { - struct devsw *d_dev; - int d_type; - int d_unit; - void *d_opendata; + struct devdesc dd; union { struct { int slice; Modified: head/stand/userboot/userboot/devicename.c ============================================================================== --- head/stand/userboot/userboot/devicename.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/userboot/userboot/devicename.c Mon Mar 12 21:39:49 2018 (r330809) @@ -139,7 +139,7 @@ userboot_parsedev(struct disk_devdesc **dev, const cha goto fail; } - idev->d_unit = unit; + idev->dd.d_unit = unit; if (path != NULL) *path = (*cp == 0) ? cp : cp + 1; break; @@ -158,8 +158,8 @@ userboot_parsedev(struct disk_devdesc **dev, const cha err = EINVAL; goto fail; } - idev->d_dev = dv; - idev->d_type = dv->dv_type; + idev->dd.d_dev = dv; + idev->dd.d_type = dv->dv_type; if (dev == NULL) { free(idev); } else { @@ -179,27 +179,27 @@ userboot_fmtdev(void *vdev) struct disk_devdesc *dev = (struct disk_devdesc *)vdev; static char buf[128]; /* XXX device length constant? */ - switch(dev->d_type) { + switch(dev->dd.d_type) { case DEVT_NONE: strcpy(buf, "(no device)"); break; case DEVT_CD: - sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); + sprintf(buf, "%s%d:", dev->dd.d_dev->dv_name, dev->dd.d_unit); break; case DEVT_DISK: return (disk_fmtdev(vdev)); case DEVT_NET: - sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); + sprintf(buf, "%s%d:", dev->dd.d_dev->dv_name, dev->dd.d_unit); break; case DEVT_ZFS: #if defined(USERBOOT_ZFS_SUPPORT) return (zfs_fmtdev(vdev)); #else - sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); + sprintf(buf, "%s%d:", dev->dd.d_dev->dv_name, dev->dd.d_unit); #endif break; } Modified: head/stand/userboot/userboot/main.c ============================================================================== --- head/stand/userboot/userboot/main.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/userboot/userboot/main.c Mon Mar 12 21:39:49 2018 (r330809) @@ -159,13 +159,14 @@ extract_currdev(void) //bzero(&dev, sizeof(dev)); #if defined(USERBOOT_ZFS_SUPPORT) + CT_ASSERT(sizeof(struct disk_devdesc) >= sizeof(struct zfs_devdesc)); if (userboot_zfs_found) { struct zfs_devdesc zdev; /* Leave the pool/root guid's unassigned */ bzero(&zdev, sizeof(zdev)); - zdev.d_dev = &zfs_dev; - zdev.d_type = zdev.d_dev->dv_type; + zdev.dd.d_dev = &zfs_dev; + zdev.dd.d_type = zdev.dd.d_dev->dv_type; dev = *(struct disk_devdesc *)&zdev; init_zfs_bootenv(zfs_fmtdev(&dev)); @@ -173,23 +174,23 @@ extract_currdev(void) #endif if (userboot_disk_maxunit > 0) { - dev.d_dev = &userboot_disk; - dev.d_type = dev.d_dev->dv_type; - dev.d_unit = 0; + dev.dd.d_dev = &userboot_disk; + dev.dd.d_type = dev.dd.d_dev->dv_type; + dev.dd.d_unit = 0; dev.d_slice = 0; dev.d_partition = 0; /* * If we cannot auto-detect the partition type then * access the disk as a raw device. */ - if (dev.d_dev->dv_open(NULL, &dev)) { + if (dev.dd.d_dev->dv_open(NULL, &dev)) { dev.d_slice = -1; dev.d_partition = -1; } } else { - dev.d_dev = &host_dev; - dev.d_type = dev.d_dev->dv_type; - dev.d_unit = 0; + dev.dd.d_dev = &host_dev; + dev.dd.d_type = dev.dd.d_dev->dv_type; + dev.dd.d_unit = 0; } env_setenv("currdev", EV_VOLATILE, userboot_fmtdev(&dev), Modified: head/stand/userboot/userboot/userboot_disk.c ============================================================================== --- head/stand/userboot/userboot/userboot_disk.c Mon Mar 12 21:39:42 2018 (r330808) +++ head/stand/userboot/userboot/userboot_disk.c Mon Mar 12 21:39:49 2018 (r330809) @@ -135,8 +135,8 @@ userdisk_print(int verbose) ret = pager_output(line); if (ret != 0) break; - dev.d_dev = &userboot_disk; - dev.d_unit = i; + dev.dd.d_dev = &userboot_disk; + dev.dd.d_unit = i; dev.d_slice = -1; dev.d_partition = -1; if (disk_open(&dev, ud_info[i].mediasize, @@ -164,13 +164,13 @@ userdisk_open(struct open_file *f, ...) dev = va_arg(ap, struct disk_devdesc *); va_end(ap); - if (dev->d_unit < 0 || dev->d_unit >= userdisk_maxunit) + if (dev->dd.d_unit < 0 || dev->dd.d_unit >= userdisk_maxunit) return (EIO); - ud_info[dev->d_unit].ud_open++; - if (ud_info[dev->d_unit].ud_bcache == NULL) - ud_info[dev->d_unit].ud_bcache = bcache_allocate(); - return (disk_open(dev, ud_info[dev->d_unit].mediasize, - ud_info[dev->d_unit].sectorsize)); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Mar 12 21:40:04 2018 Return-Path: Delivered-To: svn-src-all@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 F2EA7F4D29F; Mon, 12 Mar 2018 21:40:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A107F75064; Mon, 12 Mar 2018 21:40:01 +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 BBC2311250; Mon, 12 Mar 2018 21:40:00 +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 w2CLe0X1038432; Mon, 12 Mar 2018 21:40:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CLdxKX038384; Mon, 12 Mar 2018 21:39:59 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803122139.w2CLdxKX038384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Mar 2018 21:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330810 - in head/stand: efi/libefi efi/loader i386/libi386 i386/loader libsa mips/beri/loader ofw/libofw sparc64/loader uboot/common uboot/lib userboot/userboot zfs X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: efi/libefi efi/loader i386/libi386 i386/loader libsa mips/beri/loader ofw/libofw sparc64/loader uboot/common uboot/lib userboot/userboot zfs X-SVN-Commit-Revision: 330810 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 21:40:04 -0000 Author: imp Date: Mon Mar 12 21:39:59 2018 New Revision: 330810 URL: https://svnweb.freebsd.org/changeset/base/330810 Log: Remove d_type from devdesc. It's not needed as we can fetch it from d_dev->dv_type when we need it. Modified: head/stand/efi/libefi/devicename.c head/stand/efi/loader/main.c head/stand/i386/libi386/biosdisk.c head/stand/i386/libi386/bootinfo32.c head/stand/i386/libi386/devicename.c head/stand/i386/loader/main.c head/stand/libsa/stand.h head/stand/mips/beri/loader/devicename.c head/stand/ofw/libofw/devicename.c head/stand/sparc64/loader/main.c head/stand/uboot/common/main.c head/stand/uboot/lib/devicename.c head/stand/userboot/userboot/devicename.c head/stand/userboot/userboot/main.c head/stand/zfs/zfs.c Modified: head/stand/efi/libefi/devicename.c ============================================================================== --- head/stand/efi/libefi/devicename.c Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/efi/libefi/devicename.c Mon Mar 12 21:39:59 2018 (r330810) @@ -161,7 +161,6 @@ efi_parsedev(struct devdesc **dev, const char *devspec } idev->d_dev = dv; - idev->d_type = dv->dv_type; if (dev != NULL) *dev = idev; @@ -180,7 +179,7 @@ efi_fmtdev(void *vdev) struct devdesc *dev = (struct devdesc *)vdev; static char buf[SPECNAMELEN + 1]; - switch(dev->d_type) { + switch(dev->d_dev->dv_type) { case DEVT_NONE: strcpy(buf, "(no device)"); break; Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/efi/loader/main.c Mon Mar 12 21:39:59 2018 (r330810) @@ -175,7 +175,6 @@ set_devdesc_currdev(struct devsw *dev, int unit) char *devname; currdev.d_dev = dev; - currdev.d_type = currdev.d_dev->dv_type; currdev.d_unit = unit; devname = efi_fmtdev(&currdev); @@ -203,7 +202,6 @@ find_currdev(EFI_LOADED_IMAGE *img) currdev.dd.d_dev = &zfs_dev; currdev.dd.d_unit = 0; - currdev.dd.d_type = currdev.dd.d_dev->dv_type; currdev.pool_guid = pool_guid; currdev.root_guid = 0; devname = efi_fmtdev(&currdev); @@ -223,7 +221,6 @@ find_currdev(EFI_LOADED_IMAGE *img) struct disk_devdesc currdev; currdev.dd.d_dev = &efipart_hddev; - currdev.dd.d_type = currdev.dd.d_dev->dv_type; currdev.dd.d_unit = dp->pd_unit; currdev.d_slice = -1; currdev.d_partition = -1; @@ -845,7 +842,7 @@ command_chain(int argc, char *argv[]) struct disk_devdesc *d_dev; pdinfo_t *hd, *pd; - switch (dev->d_type) { + switch (dev->d_dev->dv_type) { #ifdef EFI_ZFS_BOOT case DEVT_ZFS: z_dev = (struct zfs_devdesc *)dev; Modified: head/stand/i386/libi386/biosdisk.c ============================================================================== --- head/stand/i386/libi386/biosdisk.c Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/i386/libi386/biosdisk.c Mon Mar 12 21:39:59 2018 (r330810) @@ -403,7 +403,6 @@ bd_open(struct open_file *f, ...) * would overflow so it should be safe to perform here. */ disk.dd.d_dev = dev->dd.d_dev; - disk.dd.d_type = dev->dd.d_type; disk.dd.d_unit = dev->dd.d_unit; disk.dd.d_opendata = NULL; disk.d_slice = -1; @@ -441,7 +440,7 @@ bd_open(struct open_file *f, ...) int geli_part = 0; dskp.drive = bd_unit2bios(dev->dd.d_unit); - dskp.type = dev->dd.d_type; + dskp.type = dev->dd.d_dev->dv_type; dskp.unit = dev->dd.d_unit; dskp.slice = dev->d_slice; dskp.part = dev->d_partition; @@ -872,7 +871,7 @@ bd_read(struct disk_devdesc *dev, daddr_t dblk, int bl return (err); dskp.drive = bd_unit2bios(dev->dd.d_unit); - dskp.type = dev->dd.d_type; + dskp.type = dev->dd.d_dev->dv_type; dskp.unit = dev->dd.d_unit; dskp.slice = dev->d_slice; dskp.part = dev->d_partition; @@ -997,7 +996,6 @@ bios_read(void *vdev __unused, void *xpriv, off_t off, struct dsk *priv = xpriv; dev.dd.d_dev = &biosdisk; - dev.dd.d_type = priv->type; dev.dd.d_unit = priv->unit; dev.d_slice = priv->slice; dev.d_partition = priv->part; Modified: head/stand/i386/libi386/bootinfo32.c ============================================================================== --- head/stand/i386/libi386/bootinfo32.c Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/i386/libi386/bootinfo32.c Mon Mar 12 21:39:59 2018 (r330810) @@ -181,7 +181,7 @@ bi_load32(char *args, int *howtop, int *bootdevp, vm_o /* XXX - use a default bootdev of 0. Is this ok??? */ bootdevnr = 0; - switch(rootdev->dd.d_type) { + switch(rootdev->dd.d_dev->dv_type) { case DEVT_CD: /* Pass in BIOS device number. */ bi.bi_bios_dev = bc_unit2bios(rootdev->dd.d_unit); @@ -199,7 +199,8 @@ bi_load32(char *args, int *howtop, int *bootdevp, vm_o break; default: - printf("WARNING - don't know how to boot from device type %d\n", rootdev->dd.d_type); + printf("WARNING - don't know how to boot from device type %d\n", + rootdev->dd.d_dev->dv_type); } if (bootdevnr == -1) { printf("root device %s invalid\n", i386_fmtdev(rootdev)); Modified: head/stand/i386/libi386/devicename.c ============================================================================== --- head/stand/i386/libi386/devicename.c Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/i386/libi386/devicename.c Mon Mar 12 21:39:59 2018 (r330810) @@ -149,7 +149,6 @@ i386_parsedev(struct i386_devdesc **dev, const char *d goto fail; } idev->dd.d_dev = dv; - idev->dd.d_type = dv->dv_type; if (dev == NULL) { free(idev); } else { @@ -169,7 +168,7 @@ i386_fmtdev(void *vdev) struct i386_devdesc *dev = (struct i386_devdesc *)vdev; static char buf[128]; /* XXX device length constant? */ - switch(dev->dd.d_type) { + switch(dev->dd.d_dev->dv_type) { case DEVT_NONE: strcpy(buf, "(no device)"); break; Modified: head/stand/i386/loader/main.c ============================================================================== --- head/stand/i386/loader/main.c Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/i386/loader/main.c Mon Mar 12 21:39:59 2018 (r330810) @@ -316,13 +316,12 @@ extract_currdev(void) if ((biosdev == 0) && (B_TYPE(initial_bootdev) != 2)) /* biosdev doesn't match major */ biosdev = 0x80 + B_UNIT(initial_bootdev); /* assume harddisk */ } - new_currdev.dd.d_type = new_currdev.dd.d_dev->dv_type; /* * If we are booting off of a BIOS disk and we didn't succeed in determining * which one we booted off of, just use disk0: as a reasonable default. */ - if ((new_currdev.dd.d_type == biosdisk.dv_type) && + if ((new_currdev.dd.d_dev->dv_type == biosdisk.dv_type) && ((new_currdev.dd.d_unit = bd_bios2unit(biosdev)) == -1)) { printf("Can't work out which disk we are booting from.\n" "Guessed BIOS device 0x%x not found by probes, defaulting to disk0:\n", biosdev); @@ -330,7 +329,7 @@ extract_currdev(void) } #ifdef LOADER_ZFS_SUPPORT - if (new_currdev.dd.d_type == DEVT_ZFS) + if (new_currdev.dd.d_dev->dv_type == DEVT_ZFS) init_zfs_bootenv(zfs_fmtdev(&new_currdev)); #endif Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/libsa/stand.h Mon Mar 12 21:39:59 2018 (r330810) @@ -168,7 +168,6 @@ extern int errno; */ struct devdesc { struct devsw *d_dev; - int d_type; int d_unit; void *d_opendata; }; Modified: head/stand/mips/beri/loader/devicename.c ============================================================================== --- head/stand/mips/beri/loader/devicename.c Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/mips/beri/loader/devicename.c Mon Mar 12 21:39:59 2018 (r330810) @@ -149,7 +149,6 @@ beri_arch_parsedev(struct disk_devdesc **dev, const ch goto fail; } idev->dd.d_dev = dv; - idev->dd.d_type = dv->dv_type; if (dev == NULL) { free(idev); } else { @@ -169,7 +168,7 @@ beri_arch_fmtdev(void *vdev) struct disk_devdesc *dev = (struct disk_devdesc *)vdev; static char buf[128]; /* XXX device length constant? */ - switch(dev->d_type) { + switch(dev->dd.d_dev->dv_type) { case DEVT_NONE: strcpy(buf, "(no device)"); break; Modified: head/stand/ofw/libofw/devicename.c ============================================================================== --- head/stand/ofw/libofw/devicename.c Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/ofw/libofw/devicename.c Mon Mar 12 21:39:59 2018 (r330810) @@ -114,8 +114,7 @@ found: } strcpy(idev->d_path, name); idev->dd.d_dev = dv; - idev->dd.d_type = dv->dv_type; - if (idev->dd.d_type == DEVT_ZFS) { + if (dv->dv_type == DEVT_ZFS) { p = devspec + strlen(dv->dv_name); err = zfs_parsedev((struct zfs_devdesc *)idev, p, path); if (err != 0) { Modified: head/stand/sparc64/loader/main.c ============================================================================== --- head/stand/sparc64/loader/main.c Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/sparc64/loader/main.c Mon Mar 12 21:39:59 2018 (r330810) @@ -807,7 +807,6 @@ sparc64_zfs_probe(void) zfs_currdev.pool_guid = guid; zfs_currdev.root_guid = 0; zfs_currdev.dd.d_dev = &zfs_dev; - zfs_currdev.dd.d_type = zfs_currdev.dd.d_dev->dv_type; } } #endif /* LOADER_ZFS_SUPPORT */ Modified: head/stand/uboot/common/main.c ============================================================================== --- head/stand/uboot/common/main.c Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/uboot/common/main.c Mon Mar 12 21:39:59 2018 (r330810) @@ -460,7 +460,6 @@ main(int argc, char **argv) printf("Found U-Boot device: %s\n", devsw[i]->dv_name); currdev.dd.d_dev = devsw[i]; - currdev.dd.d_type = currdev.dd.d_dev->dv_type; currdev.dd.d_unit = 0; if ((load_type == -1 || (load_type & DEV_TYP_STOR)) && Modified: head/stand/uboot/lib/devicename.c ============================================================================== --- head/stand/uboot/lib/devicename.c Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/uboot/lib/devicename.c Mon Mar 12 21:39:59 2018 (r330810) @@ -147,7 +147,6 @@ uboot_parsedev(struct uboot_devdesc **dev, const char goto fail; } idev->dd.d_dev = dv; - idev->dd.d_type = dv->dv_type; if (dev == NULL) { free(idev); } else { @@ -167,7 +166,7 @@ uboot_fmtdev(void *vdev) struct uboot_devdesc *dev = (struct uboot_devdesc *)vdev; static char buf[128]; - switch(dev->dd.d_type) { + switch(dev->dd.d_dev->dv_type) { case DEVT_NONE: strcpy(buf, "(no device)"); break; Modified: head/stand/userboot/userboot/devicename.c ============================================================================== --- head/stand/userboot/userboot/devicename.c Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/userboot/userboot/devicename.c Mon Mar 12 21:39:59 2018 (r330810) @@ -159,7 +159,6 @@ userboot_parsedev(struct disk_devdesc **dev, const cha goto fail; } idev->dd.d_dev = dv; - idev->dd.d_type = dv->dv_type; if (dev == NULL) { free(idev); } else { @@ -179,7 +178,7 @@ userboot_fmtdev(void *vdev) struct disk_devdesc *dev = (struct disk_devdesc *)vdev; static char buf[128]; /* XXX device length constant? */ - switch(dev->dd.d_type) { + switch(dev->dd.d_dev->dv_type) { case DEVT_NONE: strcpy(buf, "(no device)"); break; Modified: head/stand/userboot/userboot/main.c ============================================================================== --- head/stand/userboot/userboot/main.c Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/userboot/userboot/main.c Mon Mar 12 21:39:59 2018 (r330810) @@ -166,7 +166,6 @@ extract_currdev(void) /* Leave the pool/root guid's unassigned */ bzero(&zdev, sizeof(zdev)); zdev.dd.d_dev = &zfs_dev; - zdev.dd.d_type = zdev.dd.d_dev->dv_type; dev = *(struct disk_devdesc *)&zdev; init_zfs_bootenv(zfs_fmtdev(&dev)); @@ -175,7 +174,6 @@ extract_currdev(void) if (userboot_disk_maxunit > 0) { dev.dd.d_dev = &userboot_disk; - dev.dd.d_type = dev.dd.d_dev->dv_type; dev.dd.d_unit = 0; dev.d_slice = 0; dev.d_partition = 0; @@ -189,7 +187,6 @@ extract_currdev(void) } } else { dev.dd.d_dev = &host_dev; - dev.dd.d_type = dev.dd.d_dev->dv_type; dev.dd.d_unit = 0; } Modified: head/stand/zfs/zfs.c ============================================================================== --- head/stand/zfs/zfs.c Mon Mar 12 21:39:49 2018 (r330809) +++ head/stand/zfs/zfs.c Mon Mar 12 21:39:59 2018 (r330810) @@ -688,7 +688,6 @@ zfs_parsedev(struct zfs_devdesc *dev, const char *devs if (path != NULL) *path = (*end == '\0') ? end : end + 1; dev->dd.d_dev = &zfs_dev; - dev->dd.d_type = zfs_dev.dv_type; return (0); } @@ -701,7 +700,7 @@ zfs_fmtdev(void *vdev) spa_t *spa; buf[0] = '\0'; - if (dev->dd.d_type != DEVT_ZFS) + if (dev->dd.d_dev->dv_type != DEVT_ZFS) return (buf); if (dev->pool_guid == 0) { From owner-svn-src-all@freebsd.org Mon Mar 12 21:40:08 2018 Return-Path: Delivered-To: svn-src-all@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 BAD92F4D2BD; Mon, 12 Mar 2018 21:40:06 +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 A8EB775086; Mon, 12 Mar 2018 21:40:05 +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 A3E0111251; Mon, 12 Mar 2018 21:40:05 +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 w2CLe5kp038485; Mon, 12 Mar 2018 21:40:05 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CLe5pS038484; Mon, 12 Mar 2018 21:40:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803122140.w2CLe5pS038484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Mar 2018 21:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330811 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 330811 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 21:40:08 -0000 Author: imp Date: Mon Mar 12 21:40:05 2018 New Revision: 330811 URL: https://svnweb.freebsd.org/changeset/base/330811 Log: GC unused routines. Sponsored by: Netflix Modified: head/stand/efi/libefi/env.c Modified: head/stand/efi/libefi/env.c ============================================================================== --- head/stand/efi/libefi/env.c Mon Mar 12 21:39:59 2018 (r330810) +++ head/stand/efi/libefi/env.c Mon Mar 12 21:40:05 2018 (r330811) @@ -35,35 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include "bootstrap.h" -/* - * Simple wrappers to the underlying UEFI functions. - * See http://wiki.phoenix.com/wiki/index.php/EFI_RUNTIME_SERVICES - * for details. - */ -EFI_STATUS -efi_get_next_variable_name(UINTN *variable_name_size, CHAR16 *variable_name, - EFI_GUID *vendor_guid) -{ - return (RS->GetNextVariableName(variable_name_size, variable_name, - vendor_guid)); -} - -EFI_STATUS -efi_get_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid, - UINT32 *attributes, UINTN *data_size, void *data) -{ - return (RS->GetVariable(variable_name, vendor_guid, attributes, - data_size, data)); -} - -EFI_STATUS -efi_set_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid, - UINT32 attributes, UINTN data_size, void *data) -{ - return (RS->SetVariable(variable_name, vendor_guid, attributes, - data_size, data)); -} - void efi_init_environment(void) { From owner-svn-src-all@freebsd.org Mon Mar 12 21:40:14 2018 Return-Path: Delivered-To: svn-src-all@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 1AB55F4D31A; Mon, 12 Mar 2018 21:40:13 +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 889357517D; Mon, 12 Mar 2018 21:40: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 2616811252; Mon, 12 Mar 2018 21:40: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 w2CLe9FE038540; Mon, 12 Mar 2018 21:40:09 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CLe9kP038539; Mon, 12 Mar 2018 21:40:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803122140.w2CLe9kP038539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Mar 2018 21:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330812 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 330812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 21:40:15 -0000 Author: imp Date: Mon Mar 12 21:40:09 2018 New Revision: 330812 URL: https://svnweb.freebsd.org/changeset/base/330812 Log: Use the one-line-per-file pattern here, and sort the file names. Sponsored by: Netflix Modified: head/stand/efi/libefi/Makefile Modified: head/stand/efi/libefi/Makefile ============================================================================== --- head/stand/efi/libefi/Makefile Mon Mar 12 21:40:05 2018 (r330811) +++ head/stand/efi/libefi/Makefile Mon Mar 12 21:40:09 2018 (r330812) @@ -5,8 +5,20 @@ LIB= efi WARNS?= 2 -SRCS= delay.c devpath.c efi_console.c efichar.c efinet.c efipart.c env.c errno.c \ - handles.c wchar.c libefi.c efi_driver_utils.c efizfs.c devicename.c +SRCS= delay.c \ + devicename.c \ + devpath.c \ + efi_console.c \ + efi_driver_utils.c \ + efichar.c \ + efinet.c \ + efipart.c \ + efizfs.c \ + env.c \ + errno.c \ + handles.c \ + libefi.c \ + wchar.c .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SRCS+= time.c From owner-svn-src-all@freebsd.org Mon Mar 12 21:40:15 2018 Return-Path: Delivered-To: svn-src-all@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 829ECF4D329; Mon, 12 Mar 2018 21:40:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BFE1751AC; Mon, 12 Mar 2018 21:40:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w2CLdxR6011647 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 12 Mar 2018 23:40:02 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w2CLdxR6011647 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w2CLdxFW011646; Mon, 12 Mar 2018 23:39:59 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 12 Mar 2018 23:39:59 +0200 From: Konstantin Belousov To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330780 - in head/sys: amd64/include isa x86/isa Message-ID: <20180312213959.GJ76926@kib.kiev.ua> References: <201803111922.w2BJMwr8043084@repo.freebsd.org> <20180311195800.GC76926@kib.kiev.ua> <1520799639.84937.154.camel@freebsd.org> <20180311212539.GD76926@kib.kiev.ua> <1520868891.84937.177.camel@freebsd.org> <20180312155617.GF76926@kib.kiev.ua> <1520881408.84937.232.camel@freebsd.org> <1520889433.84937.255.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1520889433.84937.255.camel@freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 21:40:15 -0000 On Mon, Mar 12, 2018 at 03:17:13PM -0600, Ian Lepore wrote: > So, the eventtimer code in the atrtc driver doesn't even work, and has > been broken (and unreported) since at least Nov 2015. šThat sounds to > me like even more evidence that we should just remove eventtimer stuff > from the atrtc driver. Ok. From owner-svn-src-all@freebsd.org Mon Mar 12 21:40:22 2018 Return-Path: Delivered-To: svn-src-all@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 0197CF4D38D; Mon, 12 Mar 2018 21:40:22 +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 B5DC275276; Mon, 12 Mar 2018 21:40:19 +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 B0C8611254; Mon, 12 Mar 2018 21:40:19 +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 w2CLeJpV038650; Mon, 12 Mar 2018 21:40:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CLeJev038649; Mon, 12 Mar 2018 21:40:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803122140.w2CLeJev038649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Mar 2018 21:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330814 - head/stand/efi/boot1 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/boot1 X-SVN-Commit-Revision: 330814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 21:40:22 -0000 Author: imp Date: Mon Mar 12 21:40:19 2018 New Revision: 330814 URL: https://svnweb.freebsd.org/changeset/base/330814 Log: Star BootCurrent entry when booting. Sponsored by: Netflix Modified: head/stand/efi/boot1/boot1.c Modified: head/stand/efi/boot1/boot1.c ============================================================================== --- head/stand/efi/boot1/boot1.c Mon Mar 12 21:40:14 2018 (r330813) +++ head/stand/efi/boot1/boot1.c Mon Mar 12 21:40:19 2018 (r330814) @@ -474,7 +474,8 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) efi_global_getenv("BootOrder", &boot_order, &sz); printf(" BootOrder:"); for (i = 0; i < sz / sizeof(boot_order[0]); i++) - printf(" %04x", boot_order[i]); + printf(" %04x%s", boot_order[i], + boot_order[i] == boot_current ? "[*]" : ""); printf("\n"); #ifdef TEST_FAILURE From owner-svn-src-all@freebsd.org Mon Mar 12 21:40:21 2018 Return-Path: Delivered-To: svn-src-all@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 48CDAF4D37F; Mon, 12 Mar 2018 21:40: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 6BA7D7525F; Mon, 12 Mar 2018 21:40:15 +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 20CEB11253; Mon, 12 Mar 2018 21:40:15 +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 w2CLeEra038596; Mon, 12 Mar 2018 21:40:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CLeEOw038592; Mon, 12 Mar 2018 21:40:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803122140.w2CLeEOw038592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Mar 2018 21:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330813 - in head/stand/efi: boot1 include libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand/efi: boot1 include libefi X-SVN-Commit-Revision: 330813 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 21:40:21 -0000 Author: imp Date: Mon Mar 12 21:40:14 2018 New Revision: 330813 URL: https://svnweb.freebsd.org/changeset/base/330813 Log: Move the env convenience routines out of boot1.c. These routines are more generally useful. Even though boot1 is on its way out, it's better to make these common during the transition than copy them. Added: head/stand/efi/libefi/efienv.c (contents, props changed) Modified: head/stand/efi/boot1/boot1.c head/stand/efi/include/efilib.h head/stand/efi/libefi/Makefile Modified: head/stand/efi/boot1/boot1.c ============================================================================== --- head/stand/efi/boot1/boot1.c Mon Mar 12 21:40:09 2018 (r330812) +++ head/stand/efi/boot1/boot1.c Mon Mar 12 21:40:14 2018 (r330813) @@ -54,8 +54,6 @@ static EFI_GUID BlockIoProtocolGUID = BLOCK_IO_PROTOCO static EFI_GUID DevicePathGUID = DEVICE_PATH_PROTOCOL; static EFI_GUID LoadedImageGUID = LOADED_IMAGE_PROTOCOL; static EFI_GUID ConsoleControlGUID = EFI_CONSOLE_CONTROL_PROTOCOL_GUID; -static EFI_GUID FreeBSDBootVarGUID = FREEBSD_BOOT_VAR_GUID; -static EFI_GUID GlobalBootVarGUID = UEFI_BOOT_VAR_GUID; /* * Provide Malloc / Free backed by EFIs AllocatePool / FreePool which ensures @@ -80,42 +78,6 @@ Free(void *buf, const char *file __unused, int line __ (void)BS->FreePool(buf); } -static EFI_STATUS -efi_getenv(EFI_GUID *g, const char *v, void *data, size_t *len) -{ - size_t ul; - CHAR16 *uv; - UINT32 attr; - UINTN dl; - EFI_STATUS rv; - - uv = NULL; - if (utf8_to_ucs2(v, &uv, &ul) != 0) - return (EFI_OUT_OF_RESOURCES); - dl = *len; - rv = RS->GetVariable(uv, g, &attr, &dl, data); - if (rv == EFI_SUCCESS) - *len = dl; - free(uv); - return (rv); -} - -static EFI_STATUS -efi_setenv_freebsd_wcs(const char *varname, CHAR16 *valstr) -{ - CHAR16 *var = NULL; - size_t len; - EFI_STATUS rv; - - if (utf8_to_ucs2(varname, &var, &len) != 0) - return (EFI_OUT_OF_RESOURCES); - rv = RS->SetVariable(var, &FreeBSDBootVarGUID, - EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, - (ucs2len(valstr) + 1) * sizeof(efi_char), valstr); - free(var); - return (rv); -} - /* * nodes_match returns TRUE if the imgpath isn't NULL and the nodes match, * FALSE otherwise. @@ -505,11 +467,11 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) boot_current = 0; sz = sizeof(boot_current); - efi_getenv(&GlobalBootVarGUID, "BootCurrent", &boot_current, &sz); + efi_global_getenv("BootCurrent", &boot_current, &sz); printf(" BootCurrent: %04x\n", boot_current); sz = sizeof(boot_order); - efi_getenv(&GlobalBootVarGUID, "BootOrder", &boot_order, &sz); + efi_global_getenv("BootOrder", &boot_order, &sz); printf(" BootOrder:"); for (i = 0; i < sz / sizeof(boot_order[0]); i++) printf(" %04x", boot_order[i]); Modified: head/stand/efi/include/efilib.h ============================================================================== --- head/stand/efi/include/efilib.h Mon Mar 12 21:40:09 2018 (r330812) +++ head/stand/efi/include/efilib.h Mon Mar 12 21:40:14 2018 (r330813) @@ -106,6 +106,17 @@ int wcscmp(CHAR16 *, CHAR16 *); void cpy8to16(const char *, CHAR16 *, size_t); void cpy16to8(const CHAR16 *, char *, size_t); +/* + * Routines for interacting with EFI's env vars in a more unix-like + * way than the standard APIs. In addition, convenience routines for + * the loader setting / getting FreeBSD specific variables. + */ + +EFI_STATUS efi_freebsd_getenv(const char *v, void *data, __size_t *len); +EFI_STATUS efi_getenv(EFI_GUID *g, const char *v, void *data, __size_t *len); +EFI_STATUS efi_global_getenv(const char *v, void *data, __size_t *len); +EFI_STATUS efi_setenv_freebsd_wcs(const char *varname, CHAR16 *valstr); + /* efipart.c */ int efipart_inithandles(void); Modified: head/stand/efi/libefi/Makefile ============================================================================== --- head/stand/efi/libefi/Makefile Mon Mar 12 21:40:09 2018 (r330812) +++ head/stand/efi/libefi/Makefile Mon Mar 12 21:40:14 2018 (r330813) @@ -11,6 +11,7 @@ SRCS= delay.c \ efi_console.c \ efi_driver_utils.c \ efichar.c \ + efienv.c \ efinet.c \ efipart.c \ efizfs.c \ Added: head/stand/efi/libefi/efienv.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/efi/libefi/efienv.c Mon Mar 12 21:40:14 2018 (r330813) @@ -0,0 +1,87 @@ +/*- + * Copyright (c) 2018 Netflix, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +static EFI_GUID FreeBSDBootVarGUID = FREEBSD_BOOT_VAR_GUID; +static EFI_GUID GlobalBootVarGUID = UEFI_BOOT_VAR_GUID; + +EFI_STATUS +efi_getenv(EFI_GUID *g, const char *v, void *data, size_t *len) +{ + size_t ul; + CHAR16 *uv; + UINT32 attr; + UINTN dl; + EFI_STATUS rv; + + uv = NULL; + if (utf8_to_ucs2(v, &uv, &ul) != 0) + return (EFI_OUT_OF_RESOURCES); + dl = *len; + rv = RS->GetVariable(uv, g, &attr, &dl, data); + if (rv == EFI_SUCCESS) + *len = dl; + free(uv); + return (rv); +} + +EFI_STATUS +efi_global_getenv(const char *v, void *data, size_t *len) +{ + + return (efi_getenv(&GlobalBootVarGUID, v, data, len)); +} + +EFI_STATUS +efi_freebsd_getenv(const char *v, void *data, size_t *len) +{ + + return (efi_getenv(&FreeBSDBootVarGUID, v, data, len)); +} + +EFI_STATUS +efi_setenv_freebsd_wcs(const char *varname, CHAR16 *valstr) +{ + CHAR16 *var = NULL; + size_t len; + EFI_STATUS rv; + + if (utf8_to_ucs2(varname, &var, &len) != 0) + return (EFI_OUT_OF_RESOURCES); + rv = RS->SetVariable(var, &FreeBSDBootVarGUID, + EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, + (ucs2len(valstr) + 1) * sizeof(efi_char), valstr); + free(var); + return (rv); +} + From owner-svn-src-all@freebsd.org Mon Mar 12 21:40:28 2018 Return-Path: Delivered-To: svn-src-all@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 6BD99F4D3E0; Mon, 12 Mar 2018 21:40:28 +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 A876A7537A; Mon, 12 Mar 2018 21:40:24 +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 8BC4E11255; Mon, 12 Mar 2018 21:40:24 +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 w2CLeO1e038702; Mon, 12 Mar 2018 21:40:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CLeOee038701; Mon, 12 Mar 2018 21:40:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803122140.w2CLeOee038701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 12 Mar 2018 21:40:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330815 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 330815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 21:40:28 -0000 Author: imp Date: Mon Mar 12 21:40:24 2018 New Revision: 330815 URL: https://svnweb.freebsd.org/changeset/base/330815 Log: Print the load and device path as well as BootCurrent and BootOrder Sponsored by: Netflix Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Mon Mar 12 21:40:19 2018 (r330814) +++ head/stand/efi/loader/main.c Mon Mar 12 21:40:24 2018 (r330815) @@ -312,6 +312,12 @@ main(int argc, CHAR16 *argv[]) int i, j, vargood, howto; UINTN k; int has_kbd; + CHAR16 *text; + UINT16 boot_current; + size_t sz; + UINT16 boot_order[100]; + EFI_DEVICE_PATH *imgpath; + EFI_STATUS status; #if !defined(__arm__) char buf[40]; #endif @@ -472,6 +478,36 @@ main(int argc, CHAR16 *argv[]) ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0xffff); printf("\n%s", bootprog_info); + + text = efi_devpath_name(img->FilePath); + if (text != NULL) { + printf(" Load Path: %S\n", text); + efi_setenv_freebsd_wcs("LoaderPath", text); + efi_free_devpath_name(text); + } + + status = BS->HandleProtocol(img->DeviceHandle, &devid, (void **)&imgpath); + if (status == EFI_SUCCESS) { + text = efi_devpath_name(imgpath); + if (text != NULL) { + printf(" Load Device: %S\n", text); + efi_setenv_freebsd_wcs("LoaderDev", text); + efi_free_devpath_name(text); + } + } + + boot_current = 0; + sz = sizeof(boot_current); + efi_global_getenv("BootCurrent", &boot_current, &sz); + printf(" BootCurrent: %04x\n", boot_current); + + sz = sizeof(boot_order); + efi_global_getenv("BootOrder", &boot_order, &sz); + printf(" BootOrder:"); + for (i = 0; i < sz / sizeof(boot_order[0]); i++) + printf(" %04x%s", boot_order[i], + boot_order[i] == boot_current ? "[*]" : ""); + printf("\n"); /* * Disable the watchdog timer. By default the boot manager sets From owner-svn-src-all@freebsd.org Mon Mar 12 22:10:07 2018 Return-Path: Delivered-To: svn-src-all@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 B39A1F4F5D5; Mon, 12 Mar 2018 22:10:07 +0000 (UTC) (envelope-from brooks@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 6964376C49; Mon, 12 Mar 2018 22:10:07 +0000 (UTC) (envelope-from brooks@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 5F54B116FD; Mon, 12 Mar 2018 22:10:07 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CMA7jS053709; Mon, 12 Mar 2018 22:10:07 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CMA7lf053706; Mon, 12 Mar 2018 22:10:07 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803122210.w2CMA7lf053706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 12 Mar 2018 22:10:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330817 - in head/sys: kern mips/include mips/mips X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/sys: kern mips/include mips/mips X-SVN-Commit-Revision: 330817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 22:10:07 -0000 Author: brooks Date: Mon Mar 12 22:10:06 2018 New Revision: 330817 URL: https://svnweb.freebsd.org/changeset/base/330817 Log: MIPS: Implement fue*word* and casueword* in assembly. Remove NO_FUEWORD so the 'e' variants are wrapped by the non-'e' variants. This is more correct and leaves sparc64 as the outlier. Reviewed by: jmallett, kib Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14603 Modified: head/sys/kern/subr_uio.c head/sys/mips/include/param.h head/sys/mips/mips/support.S Modified: head/sys/kern/subr_uio.c ============================================================================== --- head/sys/kern/subr_uio.c Mon Mar 12 21:49:59 2018 (r330816) +++ head/sys/kern/subr_uio.c Mon Mar 12 22:10:06 2018 (r330817) @@ -505,8 +505,8 @@ copyout_unmap(struct thread *td, vm_offset_t addr, siz /* * XXXKIB The temporal implementation of fue*() functions which do not * handle usermode -1 properly, mixing it with the fault code. Keep - * this until MD code is written. Currently sparc64 and mips do not - * have proper implementation. + * this until MD code is written. Currently sparc64 does not have a + * proper implementation. */ int Modified: head/sys/mips/include/param.h ============================================================================== --- head/sys/mips/include/param.h Mon Mar 12 21:49:59 2018 (r330816) +++ head/sys/mips/include/param.h Mon Mar 12 22:10:06 2018 (r330817) @@ -185,8 +185,4 @@ #define pgtok(x) ((x) * (PAGE_SIZE / 1024)) -#ifdef _KERNEL -#define NO_FUEWORD 1 -#endif - #endif /* !_MIPS_INCLUDE_PARAM_H_ */ Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Mon Mar 12 21:49:59 2018 (r330816) +++ head/sys/mips/mips/support.S Mon Mar 12 22:10:06 2018 (r330817) @@ -285,8 +285,8 @@ END(copyerr) * user-space. */ #ifdef __mips_n64 -LEAF(fuword64) -XLEAF(fuword) +LEAF(fueword64) +XLEAF(fueword) PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space nop @@ -294,14 +294,16 @@ XLEAF(fuword) PTR_L v1, PC_CURPCB(v1) PTR_S v0, U_PCB_ONFAULT(v1) ld v0, 0(a0) # fetch word - j ra PTR_S zero, U_PCB_ONFAULT(v1) -END(fuword64) + sd v0, 0(a1) # store word + j ra + li v0, 0 +END(fueword64) #endif -LEAF(fuword32) +LEAF(fueword32) #ifndef __mips_n64 -XLEAF(fuword) +XLEAF(fueword) #endif PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space @@ -310,11 +312,13 @@ XLEAF(fuword) PTR_L v1, PC_CURPCB(v1) PTR_S v0, U_PCB_ONFAULT(v1) lw v0, 0(a0) # fetch word - j ra PTR_S zero, U_PCB_ONFAULT(v1) -END(fuword32) + sw v0, 0(a1) # store word + j ra + li v0, 0 +END(fueword32) -LEAF(fusword) +LEAF(fuesword) PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space nop @@ -322,9 +326,11 @@ LEAF(fusword) PTR_L v1, PC_CURPCB(v1) PTR_S v0, U_PCB_ONFAULT(v1) lhu v0, 0(a0) # fetch short - j ra PTR_S zero, U_PCB_ONFAULT(v1) -END(fusword) + sh v0, 0(a1) # store short + j ra + li v0, 0 +END(fuesword) LEAF(fubyte) PTR_LA v0, fswberr @@ -371,17 +377,18 @@ END(suword64) #endif /* - * casuword(9) - * u_long casuword(u_long *p, u_long oldval, u_long newval) + * casueword(9) + * u_long casueword(u_long *p, u_long oldval, u_long *oldval_p, + * u_long newval) */ /* - * casuword32(9) - * uint32_t casuword(uint32_t *p, uint32_t oldval, - * uint32_t newval) + * casueword32(9) + * uint32_t casueword(uint32_t *p, uint32_t oldval, + * uint32_t newval) */ -LEAF(casuword32) +LEAF(casueword32) #ifndef __mips_n64 -XLEAF(casuword) +XLEAF(casueword) #endif PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space @@ -390,26 +397,26 @@ XLEAF(casuword) PTR_L v1, PC_CURPCB(v1) PTR_S v0, U_PCB_ONFAULT(v1) 1: - move t0, a2 - ll v0, 0(a0) - bne a1, v0, 2f + move t0, a3 + ll t1, 0(a0) + bne a1, t1, 2f nop sc t0, 0(a0) # store word beqz t0, 1b nop j 3f - nop + li v0, 0 2: li v0, -1 3: PTR_S zero, U_PCB_ONFAULT(v1) jr ra - nop -END(casuword32) + sw t1, 0(a2) # unconditionally store old word +END(casueword32) #ifdef __mips_n64 -LEAF(casuword64) -XLEAF(casuword) +LEAF(casueword64) +XLEAF(casueword) PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space nop @@ -417,22 +424,22 @@ XLEAF(casuword) PTR_L v1, PC_CURPCB(v1) PTR_S v0, U_PCB_ONFAULT(v1) 1: - move t0, a2 - lld v0, 0(a0) - bne a1, v0, 2f + move t0, a3 + lld t1, 0(a0) + bne a1, t1, 2f nop scd t0, 0(a0) # store double word beqz t0, 1b nop j 3f - nop + li v0, 0 2: li v0, -1 3: PTR_S zero, U_PCB_ONFAULT(v1) jr ra - nop -END(casuword64) + sd t1, 0(a2) # unconditionally store old word +END(casueword64) #endif /* From owner-svn-src-all@freebsd.org Mon Mar 12 22:58:08 2018 Return-Path: Delivered-To: svn-src-all@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 14731F52A16; Mon, 12 Mar 2018 22:58:08 +0000 (UTC) (envelope-from brooks@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 B978B79150; Mon, 12 Mar 2018 22:58:07 +0000 (UTC) (envelope-from brooks@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 A57A311E8E; Mon, 12 Mar 2018 22:58:07 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CMw7LH078833; Mon, 12 Mar 2018 22:58:07 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CMw7qb078832; Mon, 12 Mar 2018 22:58:07 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803122258.w2CMw7qb078832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 12 Mar 2018 22:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330819 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 330819 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 22:58:08 -0000 Author: brooks Date: Mon Mar 12 22:58:07 2018 New Revision: 330819 URL: https://svnweb.freebsd.org/changeset/base/330819 Log: Reject CAMIOGET and CAMIOQUEUE ioctl's on pass(4) in 32-bit compat mode. These take a union ccb argument which is full of kernel pointers. Substantial translation efforts would be required to make this work. By rejecting the request we avoid processing or returning entierly wrong data. Reviewed by: imp, ken, markj, cem Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14654 Modified: head/sys/cam/scsi/scsi_pass.c Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Mon Mar 12 22:17:14 2018 (r330818) +++ head/sys/cam/scsi/scsi_pass.c Mon Mar 12 22:58:07 2018 (r330819) @@ -30,6 +30,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" + #include #include #include @@ -45,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1859,6 +1862,12 @@ passdoioctl(struct cdev *dev, u_long cmd, caddr_t addr union ccb **user_ccb, *ccb; xpt_opcode fc; +#ifdef COMPAT_FREEBSD32 + if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) { + error = ENOTTY; + goto bailout; + } +#endif if ((softc->flags & PASS_FLAG_ZONE_VALID) == 0) { error = passcreatezone(periph); if (error != 0) @@ -2033,6 +2042,12 @@ camioqueue_error: struct pass_io_req *io_req; int old_error; +#ifdef COMPAT_FREEBSD32 + if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) { + error = ENOTTY; + goto bailout; + } +#endif user_ccb = (union ccb **)addr; old_error = 0; From owner-svn-src-all@freebsd.org Mon Mar 12 23:02:02 2018 Return-Path: Delivered-To: svn-src-all@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 89C6AF53085; Mon, 12 Mar 2018 23:02:02 +0000 (UTC) (envelope-from brooks@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 3D2987959A; Mon, 12 Mar 2018 23:02:02 +0000 (UTC) (envelope-from brooks@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 366B111EF9; Mon, 12 Mar 2018 23:02:02 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CN22AI081218; Mon, 12 Mar 2018 23:02:02 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CN220A081217; Mon, 12 Mar 2018 23:02:02 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803122302.w2CN220A081217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 12 Mar 2018 23:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330820 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 330820 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 23:02:02 -0000 Author: brooks Date: Mon Mar 12 23:02:01 2018 New Revision: 330820 URL: https://svnweb.freebsd.org/changeset/base/330820 Log: Reject ioctls to SCSI enclosures from 32-bit compat processes. The ioctl objects contain pointers and require translation and some refactoring of the infrastructure to work. For now prevent opertion on garbage values. This is very slightly overbroad in that ENCIOC_INIT is safe. Reviewed by: imp, kib Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14671 Modified: head/sys/cam/scsi/scsi_enc.c Modified: head/sys/cam/scsi/scsi_enc.c ============================================================================== --- head/sys/cam/scsi/scsi_enc.c Mon Mar 12 22:58:07 2018 (r330819) +++ head/sys/cam/scsi/scsi_enc.c Mon Mar 12 23:02:01 2018 (r330820) @@ -29,6 +29,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" + #include #include @@ -39,9 +41,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include #include #include @@ -354,6 +358,10 @@ enc_ioctl(struct cdev *dev, u_long cmd, caddr_t arg_ad void *addr; int error, i; +#ifdef COMPAT_FREEBSD32 + if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) + return (ENOTTY); +#endif if (arg_addr) addr = *((caddr_t *) arg_addr); From owner-svn-src-all@freebsd.org Mon Mar 12 23:04:42 2018 Return-Path: Delivered-To: svn-src-all@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 D4052F53377; Mon, 12 Mar 2018 23:04:42 +0000 (UTC) (envelope-from brooks@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 84A50797EB; Mon, 12 Mar 2018 23:04:42 +0000 (UTC) (envelope-from brooks@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 799B512031; Mon, 12 Mar 2018 23:04:42 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CN4gQV083719; Mon, 12 Mar 2018 23:04:42 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CN4g6w083718; Mon, 12 Mar 2018 23:04:42 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803122304.w2CN4g6w083718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 12 Mar 2018 23:04:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330821 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 23:04:43 -0000 Author: brooks Date: Mon Mar 12 23:04:42 2018 New Revision: 330821 URL: https://svnweb.freebsd.org/changeset/base/330821 Log: Use the stack for temporary storage in OTIOCCONS. The old code used the thread's pcb via the uap->data pointer. Reviewed by: ed Approved by: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14674 Modified: head/sys/kern/tty_compat.c Modified: head/sys/kern/tty_compat.c ============================================================================== --- head/sys/kern/tty_compat.c Mon Mar 12 23:02:01 2018 (r330820) +++ head/sys/kern/tty_compat.c Mon Mar 12 23:04:42 2018 (r330821) @@ -262,9 +262,11 @@ tty_ioctl_compat(struct tty *tp, u_long com, caddr_t d fflag, td)); } - case OTIOCCONS: - *(int *)data = 1; - return (tty_ioctl(tp, TIOCCONS, data, fflag, td)); + case OTIOCCONS: { + int one = 1; + + return (tty_ioctl(tp, TIOCCONS, (caddr_t)&one, fflag, td)); + } default: return (ENOIOCTL); From owner-svn-src-all@freebsd.org Mon Mar 12 23:28:26 2018 Return-Path: Delivered-To: svn-src-all@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 41C65F5475A; Mon, 12 Mar 2018 23:28:26 +0000 (UTC) (envelope-from emaste@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 E3AB97A3C5; Mon, 12 Mar 2018 23:28:25 +0000 (UTC) (envelope-from emaste@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 D613612326; Mon, 12 Mar 2018 23:28:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2CNSPi0093836; Mon, 12 Mar 2018 23:28:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2CNSPTQ093835; Mon, 12 Mar 2018 23:28:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803122328.w2CNSPTQ093835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Mar 2018 23:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330822 - head/sys/i386/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/i386/linux X-SVN-Commit-Revision: 330822 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 23:28:26 -0000 Author: emaste Date: Mon Mar 12 23:28:25 2018 New Revision: 330822 URL: https://svnweb.freebsd.org/changeset/base/330822 Log: imgact_linux.c: use standard indentation Sponsored by: Turing Robotic Industries Inc. Modified: head/sys/i386/linux/imgact_linux.c Modified: head/sys/i386/linux/imgact_linux.c ============================================================================== --- head/sys/i386/linux/imgact_linux.c Mon Mar 12 23:04:42 2018 (r330821) +++ head/sys/i386/linux/imgact_linux.c Mon Mar 12 23:28:25 2018 (r330822) @@ -60,176 +60,166 @@ static int exec_linux_imgact(struct image_params *ipar static int exec_linux_imgact(struct image_params *imgp) { - const struct exec *a_out = (const struct exec *) imgp->image_header; - struct vmspace *vmspace; - vm_offset_t vmaddr; - unsigned long virtual_offset, file_offset; - unsigned long bss_size; - ssize_t aresid; - int error; + const struct exec *a_out = (const struct exec *) imgp->image_header; + struct vmspace *vmspace; + vm_offset_t vmaddr; + unsigned long virtual_offset, file_offset; + unsigned long bss_size; + ssize_t aresid; + int error; - if (((a_out->a_magic >> 16) & 0xff) != 0x64) - return (-1); + if (((a_out->a_magic >> 16) & 0xff) != 0x64) + return (-1); - /* - * Set file/virtual offset based on a.out variant. - */ - switch ((int)(a_out->a_magic & 0xffff)) { - case 0413: - virtual_offset = 0; - file_offset = 1024; - break; - case 0314: - virtual_offset = 4096; - file_offset = 0; - break; - default: - return (-1); - } - bss_size = round_page(a_out->a_bss); + /* + * Set file/virtual offset based on a.out variant. + */ + switch ((int)(a_out->a_magic & 0xffff)) { + case 0413: + virtual_offset = 0; + file_offset = 1024; + break; + case 0314: + virtual_offset = 4096; + file_offset = 0; + break; + default: + return (-1); + } + bss_size = round_page(a_out->a_bss); #ifdef DEBUG - printf("imgact: text: %08lx, data: %08lx, bss: %08lx\n", - (u_long)a_out->a_text, (u_long)a_out->a_data, bss_size); + printf("imgact: text: %08lx, data: %08lx, bss: %08lx\n", + (u_long)a_out->a_text, (u_long)a_out->a_data, bss_size); #endif - /* - * Check various fields in header for validity/bounds. - */ - if (a_out->a_entry < virtual_offset || - a_out->a_entry >= virtual_offset + a_out->a_text || - a_out->a_text & PAGE_MASK || a_out->a_data & PAGE_MASK) - return (-1); + /* + * Check various fields in header for validity/bounds. + */ + if (a_out->a_entry < virtual_offset || + a_out->a_entry >= virtual_offset + a_out->a_text || + a_out->a_text & PAGE_MASK || a_out->a_data & PAGE_MASK) + return (-1); - /* text + data can't exceed file size */ - if (a_out->a_data + a_out->a_text > imgp->attr->va_size) - return (EFAULT); - /* - * text/data/bss must not exceed limits - */ - PROC_LOCK(imgp->proc); - if (a_out->a_text > maxtsiz || - a_out->a_data + bss_size > lim_cur_proc(imgp->proc, RLIMIT_DATA) || - racct_set(imgp->proc, RACCT_DATA, a_out->a_data + bss_size) != 0) { + /* text + data can't exceed file size */ + if (a_out->a_data + a_out->a_text > imgp->attr->va_size) + return (EFAULT); + /* + * text/data/bss must not exceed limits + */ + PROC_LOCK(imgp->proc); + if (a_out->a_text > maxtsiz || + a_out->a_data + bss_size > lim_cur_proc(imgp->proc, RLIMIT_DATA) || + racct_set(imgp->proc, RACCT_DATA, a_out->a_data + bss_size) != 0) { + PROC_UNLOCK(imgp->proc); + return (ENOMEM); + } PROC_UNLOCK(imgp->proc); - return (ENOMEM); - } - PROC_UNLOCK(imgp->proc); - VOP_UNLOCK(imgp->vp, 0); + VOP_UNLOCK(imgp->vp, 0); - /* - * Destroy old process VM and create a new one (with a new stack) - */ - error = exec_new_vmspace(imgp, &linux_sysvec); - if (error) - goto fail; - vmspace = imgp->proc->p_vmspace; - - /* - * Check if file_offset page aligned,. - * Currently we cannot handle misaligned file offsets, - * and so we read in the entire image (what a waste). - */ - if (file_offset & PAGE_MASK) { -#ifdef DEBUG - printf("imgact: Non page aligned binary %lu\n", file_offset); -#endif /* - * Map text+data+bss read/write/execute + * Destroy old process VM and create a new one (with a new stack) */ - vmaddr = virtual_offset; - error = vm_map_find(&vmspace->vm_map, NULL, 0, &vmaddr, - a_out->a_text + a_out->a_data + bss_size, 0, VMFS_NO_SPACE, - VM_PROT_ALL, VM_PROT_ALL, 0); + error = exec_new_vmspace(imgp, &linux_sysvec); if (error) - goto fail; - - error = vn_rdwr(UIO_READ, imgp->vp, (void *)vmaddr, file_offset, - a_out->a_text + a_out->a_data, UIO_USERSPACE, 0, - curthread->td_ucred, NOCRED, &aresid, curthread); - if (error != 0) goto fail; - if (aresid != 0) { - error = ENOEXEC; - goto fail; - } + vmspace = imgp->proc->p_vmspace; /* - * remove write enable on the 'text' part + * Check if file_offset page aligned,. + * Currently we cannot handle misaligned file offsets, + * and so we read in the entire image (what a waste). */ - error = vm_map_protect(&vmspace->vm_map, - vmaddr, - vmaddr + a_out->a_text, - VM_PROT_EXECUTE|VM_PROT_READ, - TRUE); - if (error) - goto fail; - } - else { + if (file_offset & PAGE_MASK) { #ifdef DEBUG - printf("imgact: Page aligned binary %lu\n", file_offset); + printf("imgact: Non page aligned binary %lu\n", file_offset); #endif - /* - * Map text+data read/execute - */ - vmaddr = virtual_offset; - error = vm_mmap(&vmspace->vm_map, &vmaddr, - a_out->a_text + a_out->a_data, - VM_PROT_READ | VM_PROT_EXECUTE, - VM_PROT_ALL, - MAP_PRIVATE | MAP_FIXED, - OBJT_VNODE, - imgp->vp, file_offset); - if (error) - goto fail; + /* + * Map text+data+bss read/write/execute + */ + vmaddr = virtual_offset; + error = vm_map_find(&vmspace->vm_map, NULL, 0, &vmaddr, + a_out->a_text + a_out->a_data + bss_size, 0, VMFS_NO_SPACE, + VM_PROT_ALL, VM_PROT_ALL, 0); + if (error) + goto fail; + error = vn_rdwr(UIO_READ, imgp->vp, (void *)vmaddr, file_offset, + a_out->a_text + a_out->a_data, UIO_USERSPACE, 0, + curthread->td_ucred, NOCRED, &aresid, curthread); + if (error != 0) + goto fail; + if (aresid != 0) { + error = ENOEXEC; + goto fail; + } + + /* + * remove write enable on the 'text' part + */ + error = vm_map_protect(&vmspace->vm_map, vmaddr, + vmaddr + a_out->a_text, VM_PROT_EXECUTE|VM_PROT_READ, TRUE); + if (error) + goto fail; + } else { #ifdef DEBUG - printf("imgact: startaddr=%08lx, length=%08lx\n", - (u_long)vmaddr, (u_long)a_out->a_text + (u_long)a_out->a_data); + printf("imgact: Page aligned binary %lu\n", file_offset); #endif - /* - * allow read/write of data - */ - error = vm_map_protect(&vmspace->vm_map, - vmaddr + a_out->a_text, - vmaddr + a_out->a_text + a_out->a_data, - VM_PROT_ALL, - FALSE); - if (error) - goto fail; + /* + * Map text+data read/execute + */ + vmaddr = virtual_offset; + error = vm_mmap(&vmspace->vm_map, &vmaddr, + a_out->a_text + a_out->a_data, + VM_PROT_READ | VM_PROT_EXECUTE, VM_PROT_ALL, + MAP_PRIVATE | MAP_FIXED, OBJT_VNODE, imgp->vp, file_offset); + if (error) + goto fail; - /* - * Allocate anon demand-zeroed area for uninitialized data - */ - if (bss_size != 0) { - vmaddr = virtual_offset + a_out->a_text + a_out->a_data; - error = vm_map_find(&vmspace->vm_map, NULL, 0, &vmaddr, - bss_size, 0, VMFS_NO_SPACE, VM_PROT_ALL, VM_PROT_ALL, 0); - if (error) - goto fail; #ifdef DEBUG - printf("imgact: bssaddr=%08lx, length=%08lx\n", - (u_long)vmaddr, bss_size); + printf("imgact: startaddr=%08lx, length=%08lx\n", + (u_long)vmaddr, + (u_long)a_out->a_text + (u_long)a_out->a_data); #endif + /* + * allow read/write of data + */ + error = vm_map_protect(&vmspace->vm_map, vmaddr + a_out->a_text, + vmaddr + a_out->a_text + a_out->a_data, VM_PROT_ALL, FALSE); + if (error) + goto fail; + /* + * Allocate anon demand-zeroed area for uninitialized data + */ + if (bss_size != 0) { + vmaddr = virtual_offset + a_out->a_text + a_out->a_data; + error = vm_map_find(&vmspace->vm_map, NULL, 0, &vmaddr, + bss_size, 0, VMFS_NO_SPACE, VM_PROT_ALL, VM_PROT_ALL, 0); + if (error) + goto fail; +#ifdef DEBUG + printf("imgact: bssaddr=%08lx, length=%08lx\n", (u_long)vmaddr, + bss_size); +#endif + } } - } - /* Fill in process VM information */ - vmspace->vm_tsize = round_page(a_out->a_text) >> PAGE_SHIFT; - vmspace->vm_dsize = round_page(a_out->a_data + bss_size) >> PAGE_SHIFT; - vmspace->vm_taddr = (caddr_t)(void *)(uintptr_t)virtual_offset; - vmspace->vm_daddr = (caddr_t)(void *)(uintptr_t) - (virtual_offset + a_out->a_text); + /* Fill in process VM information */ + vmspace->vm_tsize = round_page(a_out->a_text) >> PAGE_SHIFT; + vmspace->vm_dsize = round_page(a_out->a_data + bss_size) >> PAGE_SHIFT; + vmspace->vm_taddr = (caddr_t)(void *)(uintptr_t)virtual_offset; + vmspace->vm_daddr = + (caddr_t)(void *)(uintptr_t)(virtual_offset + a_out->a_text); - /* Fill in image_params */ - imgp->interpreted = 0; - imgp->entry_addr = a_out->a_entry; + /* Fill in image_params */ + imgp->interpreted = 0; + imgp->entry_addr = a_out->a_entry; - imgp->proc->p_sysent = &linux_sysvec; + imgp->proc->p_sysent = &linux_sysvec; fail: - vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); - return (error); + vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); + return (error); } /* From owner-svn-src-all@freebsd.org Tue Mar 13 00:40:06 2018 Return-Path: Delivered-To: svn-src-all@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 0BC18A7C15B; Tue, 13 Mar 2018 00:40:06 +0000 (UTC) (envelope-from emaste@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 B1B007C5F1; Tue, 13 Mar 2018 00:40:05 +0000 (UTC) (envelope-from emaste@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 A7BDF12DB0; Tue, 13 Mar 2018 00:40:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2D0e5KH028657; Tue, 13 Mar 2018 00:40:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D0e5iB028654; Tue, 13 Mar 2018 00:40:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803130040.w2D0e5iB028654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 13 Mar 2018 00:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330823 - in head/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Commit-Revision: 330823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 00:40:06 -0000 Author: emaste Date: Tue Mar 13 00:40:05 2018 New Revision: 330823 URL: https://svnweb.freebsd.org/changeset/base/330823 Log: Apply some style(9) to Linuxulator linux_sysvec.c comments Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/i386/linux/linux_sysvec.c Modified: head/sys/amd64/linux/linux_sysvec.c ============================================================================== --- head/sys/amd64/linux/linux_sysvec.c Mon Mar 12 23:28:25 2018 (r330822) +++ head/sys/amd64/linux/linux_sysvec.c Tue Mar 13 00:40:05 2018 (r330823) @@ -101,10 +101,9 @@ SYSCTL_PROC(_compat_linux, OID_AUTO, debug, #endif /* - * Allow the this functions to use the ldebug() facility - * even though they are not syscalls themselves. Map them - * to syscall 0. This is slightly less bogus than using - * ldebug(sigreturn). + * Allow the sendsig functions to use the ldebug() facility even though they + * are not syscalls themselves. Map them to syscall 0. This is slightly less + * bogus than using ldebug(sigreturn). */ #define LINUX_SYS_linux_rt_sendsig 0 @@ -253,8 +252,7 @@ linux_set_syscall_retval(struct thread *td, int error) /* * On Linux only %rcx and %r11 values are not preserved across - * the syscall. - * So, do not clobber %rdx and %r10 + * the syscall. So, do not clobber %rdx and %r10. */ td->td_retval[1] = frame->tf_rdx; frame->tf_r10 = frame->tf_rcx; @@ -335,9 +333,7 @@ linux_copyout_strings(struct image_params *imgp) size_t execpath_len; struct proc *p; - /* - * Calculate string base and vector table pointers. - */ + /* Calculate string base and vector table pointers. */ if (imgp->execpath != NULL && imgp->auxargs != NULL) execpath_len = strlen(imgp->execpath) + 1; else @@ -345,7 +341,7 @@ linux_copyout_strings(struct image_params *imgp) p = imgp->proc; arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings; - destp = (caddr_t)arginfo - SPARE_USRSPACE - + destp = (caddr_t)arginfo - SPARE_USRSPACE - roundup(sizeof(canary), sizeof(char *)) - roundup(execpath_len, sizeof(char *)) - roundup(ARG_MAX - imgp->args->stringspace, sizeof(char *)); @@ -355,19 +351,14 @@ linux_copyout_strings(struct image_params *imgp) copyout(imgp->execpath, (void *)imgp->execpathp, execpath_len); } - /* - * Prepare the canary for SSP. - */ + /* Prepare the canary for SSP. */ arc4rand(canary, sizeof(canary), 0); imgp->canary = (uintptr_t)arginfo - roundup(execpath_len, sizeof(char *)) - roundup(sizeof(canary), sizeof(char *)); copyout(canary, (void *)imgp->canary, sizeof(canary)); - /* - * If we have a valid auxargs ptr, prepare some room - * on the stack. - */ + /* If we have a valid auxargs ptr, prepare some room on the stack. */ if (imgp->auxargs) { /* * 'AT_COUNT*2' is size for the ELF Auxargs data. This is for @@ -393,29 +384,21 @@ linux_copyout_strings(struct image_params *imgp) imgp->args->envc + 2) * sizeof(char *)); } - /* - * vectp also becomes our initial stack base - */ + /* vectp also becomes our initial stack base. */ stack_base = (register_t *)vectp; stringp = imgp->args->begin_argv; argc = imgp->args->argc; envc = imgp->args->envc; - /* - * Copy out strings - arguments and environment. - */ + /* Copy out strings - arguments and environment. */ copyout(stringp, destp, ARG_MAX - imgp->args->stringspace); - /* - * Fill in "ps_strings" struct for ps, w, etc. - */ + /* Fill in "ps_strings" struct for ps, w, etc. */ suword(&arginfo->ps_argvstr, (long)(intptr_t)vectp); suword(&arginfo->ps_nargvstr, argc); - /* - * Fill in argument portion of vector table. - */ + /* Fill in argument portion of vector table. */ for (; argc > 0; --argc) { suword(vectp++, (long)(intptr_t)destp); while (*stringp++ != 0) @@ -423,15 +406,13 @@ linux_copyout_strings(struct image_params *imgp) destp++; } - /* a null vector table pointer separates the argp's from the envp's */ + /* A null vector table pointer separates the argp's from the envp's. */ suword(vectp++, 0); suword(&arginfo->ps_envstr, (long)(intptr_t)vectp); suword(&arginfo->ps_nenvstr, envc); - /* - * Fill in environment portion of vector table. - */ + /* Fill in environment portion of vector table. */ for (; envc > 0; --envc) { suword(vectp++, (long)(intptr_t)destp); while (*stringp++ != 0) @@ -439,7 +420,7 @@ linux_copyout_strings(struct image_params *imgp) destp++; } - /* end of vector table is a null pointer */ + /* The end of the vector table is a null pointer. */ suword(vectp, 0); return (stack_base); } @@ -681,12 +662,10 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse regs->tf_rdx = (register_t)&sfp->sf_sc; /* arg 3 in %rdx */ sf.sf_handler = catcher; - /* Fill in POSIX parts */ + /* Fill in POSIX parts. */ ksiginfo_to_lsiginfo(ksi, &sf.sf_si, sig); - /* - * Copy the sigframe out to the user's stack. - */ + /* Copy the sigframe out to the user's stack. */ if (copyout(&sf, sfp, sizeof(*sfp)) != 0) { #ifdef DEBUG printf("process %ld has trashed its stack\n", (long)p->p_pid); @@ -762,7 +741,7 @@ linux_vsyscall(struct thread *td) frame = td->td_frame; - /* Check %rip for vsyscall area */ + /* Check %rip for vsyscall area. */ if (__predict_true(frame->tf_rip < LINUX_VSYSCALL_START)) return (EINVAL); if ((frame->tf_rip & (LINUX_VSYSCALL_SZ - 1)) != 0) @@ -773,7 +752,7 @@ linux_vsyscall(struct thread *td) /* * vsyscall called as callq *(%rax), so we must - * use return address from %rsp and also fixup %rsp + * use return address from %rsp and also fixup %rsp. */ error = copyin((void *)frame->tf_rsp, &retqaddr, sizeof(retqaddr)); if (error) Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Mon Mar 12 23:28:25 2018 (r330822) +++ head/sys/amd64/linux32/linux32_sysvec.c Tue Mar 13 00:40:05 2018 (r330823) @@ -102,10 +102,9 @@ MODULE_VERSION(linux, 1); #endif /* - * Allow the sendsig functions to use the ldebug() facility - * even though they are not syscalls themselves. Map them - * to syscall 0. This is slightly less bogus than using - * ldebug(sigreturn). + * Allow the sendsig functions to use the ldebug() facility even though they + * are not syscalls themselves. Map them to syscall 0. This is slightly less + * bogus than using ldebug(sigreturn). */ #define LINUX32_SYS_linux_rt_sendsig 0 #define LINUX32_SYS_linux_sendsig 0 @@ -312,9 +311,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse printf(ARGS(rt_sendsig, "%p, %d, %p, %u"), catcher, sig, (void*)mask, code); #endif - /* - * Allocate space for the signal handler context. - */ + /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { fp = (struct l_rt_sigframe *)((uintptr_t)td->td_sigstk.ss_sp + @@ -323,9 +320,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse fp = (struct l_rt_sigframe *)regs->tf_rsp - 1; mtx_unlock(&psp->ps_mtx); - /* - * Build the argument list for the signal handler. - */ + /* Build the argument list for the signal handler. */ sig = bsd_to_linux_signal(sig); bzero(&frame, sizeof(frame)); @@ -335,12 +330,11 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse frame.sf_siginfo = PTROUT(&fp->sf_si); frame.sf_ucontext = PTROUT(&fp->sf_sc); - /* Fill in POSIX parts */ + /* Fill in POSIX parts. */ ksiginfo_to_lsiginfo(ksi, &frame.sf_si, sig); /* - * Build the signal context to be used by sigreturn - * and libgcc unwind. + * Build the signal context to be used by sigreturn and libgcc unwind. */ frame.sf_sc.uc_flags = 0; /* XXX ??? */ frame.sf_sc.uc_link = 0; /* XXX ??? */ @@ -396,9 +390,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse sigexit(td, SIGILL); } - /* - * Build context to run handler in. - */ + /* Build context to run handler in. */ regs->tf_rsp = PTROUT(fp); regs->tf_rip = linux32_rt_sigcode; regs->tf_rflags &= ~(PSL_T | PSL_D); @@ -457,9 +449,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t catcher, sig, (void*)mask, code); #endif - /* - * Allocate space for the signal handler context. - */ + /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { fp = (struct l_sigframe *)((uintptr_t)td->td_sigstk.ss_sp + @@ -469,9 +459,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); - /* - * Build the argument list for the signal handler. - */ + /* Build the argument list for the signal handler. */ sig = bsd_to_linux_signal(sig); bzero(&frame, sizeof(frame)); @@ -481,9 +469,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t bsd_to_linux_sigset(mask, &lmask); - /* - * Build the signal context to be used by sigreturn. - */ + /* Build the signal context to be used by sigreturn. */ frame.sf_sc.sc_mask = lmask.__mask; frame.sf_sc.sc_gs = regs->tf_gs; frame.sf_sc.sc_fs = regs->tf_fs; @@ -517,9 +503,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t sigexit(td, SIGILL); } - /* - * Build context to run handler in. - */ + /* Build context to run handler in. */ regs->tf_rsp = PTROUT(fp); regs->tf_rip = linux32_sigcode; regs->tf_rflags &= ~(PSL_T | PSL_D); @@ -569,9 +553,7 @@ linux_sigreturn(struct thread *td, struct linux_sigret if (copyin(args->sfp, &frame, sizeof(frame)) != 0) return (EFAULT); - /* - * Check for security violations. - */ + /* Check for security violations. */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = frame.sf_sc.sc_eflags; if (!EFLAGS_SECURE(eflags, regs->tf_rflags)) @@ -598,9 +580,7 @@ linux_sigreturn(struct thread *td, struct linux_sigret linux_to_bsd_sigset(&lmask, &bmask); kern_sigprocmask(td, SIG_SETMASK, &bmask, NULL, 0); - /* - * Restore signal context. - */ + /* Restore signal context. */ regs->tf_rdi = frame.sf_sc.sc_edi; regs->tf_rsi = frame.sf_sc.sc_esi; regs->tf_rbp = frame.sf_sc.sc_ebp; @@ -660,9 +640,7 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_ context = &uc.uc_mcontext; - /* - * Check for security violations. - */ + /* Check for security violations. */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = context->sc_eflags; if (!EFLAGS_SECURE(eflags, regs->tf_rflags)) @@ -850,9 +828,7 @@ linux_copyout_strings(struct image_params *imgp) char canary[LINUX_AT_RANDOM_LEN]; size_t execpath_len; - /* - * Calculate string base and vector table pointers. - */ + /* Calculate string base and vector table pointers. */ if (imgp->execpath != NULL && imgp->auxargs != NULL) execpath_len = strlen(imgp->execpath) + 1; else @@ -869,19 +845,14 @@ linux_copyout_strings(struct image_params *imgp) copyout(imgp->execpath, (void *)imgp->execpathp, execpath_len); } - /* - * Prepare the canary for SSP. - */ + /* Prepare the canary for SSP. */ arc4rand(canary, sizeof(canary), 0); imgp->canary = (uintptr_t)arginfo - roundup(execpath_len, sizeof(char *)) - roundup(sizeof(canary), sizeof(char *)); copyout(canary, (void *)imgp->canary, sizeof(canary)); - /* - * If we have a valid auxargs ptr, prepare some room - * on the stack. - */ + /* If we have a valid auxargs ptr, prepare some room on the stack. */ if (imgp->auxargs) { /* * 'AT_COUNT*2' is size for the ELF Auxargs data. This is for @@ -906,28 +877,20 @@ linux_copyout_strings(struct image_params *imgp) vectp = (u_int32_t *)(destp - (imgp->args->argc + imgp->args->envc + 2) * sizeof(u_int32_t)); - /* - * vectp also becomes our initial stack base - */ + /* vectp also becomes our initial stack base. */ stack_base = vectp; stringp = imgp->args->begin_argv; argc = imgp->args->argc; envc = imgp->args->envc; - /* - * Copy out strings - arguments and environment. - */ + /* Copy out strings - arguments and environment. */ copyout(stringp, destp, ARG_MAX - imgp->args->stringspace); - /* - * Fill in "ps_strings" struct for ps, w, etc. - */ + /* Fill in "ps_strings" struct for ps, w, etc. */ suword32(&arginfo->ps_argvstr, (uint32_t)(intptr_t)vectp); suword32(&arginfo->ps_nargvstr, argc); - /* - * Fill in argument portion of vector table. - */ + /* Fill in argument portion of vector table. */ for (; argc > 0; --argc) { suword32(vectp++, (uint32_t)(intptr_t)destp); while (*stringp++ != 0) @@ -935,15 +898,13 @@ linux_copyout_strings(struct image_params *imgp) destp++; } - /* a null vector table pointer separates the argp's from the envp's */ + /* A null vector table pointer separates the argp's from the envp's. */ suword32(vectp++, 0); suword32(&arginfo->ps_envstr, (uint32_t)(intptr_t)vectp); suword32(&arginfo->ps_nenvstr, envc); - /* - * Fill in environment portion of vector table. - */ + /* Fill in environment portion of vector table. */ for (; envc > 0; --envc) { suword32(vectp++, (uint32_t)(intptr_t)destp); while (*stringp++ != 0) @@ -951,7 +912,7 @@ linux_copyout_strings(struct image_params *imgp) destp++; } - /* end of vector table is a null pointer */ + /* The end of the vector table is a null pointer. */ suword32(vectp, 0); return ((register_t *)stack_base); Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Mon Mar 12 23:28:25 2018 (r330822) +++ head/sys/i386/linux/linux_sysvec.c Tue Mar 13 00:40:05 2018 (r330823) @@ -88,10 +88,9 @@ SYSCTL_PROC(_compat_linux, OID_AUTO, debug, CTLTYPE_ST #endif /* - * Allow the sendsig functions to use the ldebug() facility - * even though they are not syscalls themselves. Map them - * to syscall 0. This is slightly less bogus than using - * ldebug(sigreturn). + * Allow the sendsig functions to use the ldebug() facility even though they + * are not syscalls themselves. Map them to syscall 0. This is slightly less + * bogus than using ldebug(sigreturn). */ #define LINUX_SYS_linux_rt_sendsig 0 #define LINUX_SYS_linux_sendsig 0 @@ -306,9 +305,7 @@ linux_copyout_strings(struct image_params *imgp) size_t execpath_len; struct proc *p; - /* - * Calculate string base and vector table pointers. - */ + /* Calculate string base and vector table pointers. */ p = imgp->proc; if (imgp->execpath != NULL && imgp->auxargs != NULL) execpath_len = strlen(imgp->execpath) + 1; @@ -320,9 +317,7 @@ linux_copyout_strings(struct image_params *imgp) roundup(execpath_len, sizeof(char *)) - roundup(ARG_MAX - imgp->args->stringspace, sizeof(char *)); - /* - * install LINUX_PLATFORM - */ + /* Install LINUX_PLATFORM. */ copyout(linux_kplatform, ((caddr_t)arginfo - linux_szplatform), linux_szplatform); @@ -332,19 +327,14 @@ linux_copyout_strings(struct image_params *imgp) copyout(imgp->execpath, (void *)imgp->execpathp, execpath_len); } - /* - * Prepare the canary for SSP. - */ + /* Prepare the canary for SSP. */ arc4rand(canary, sizeof(canary), 0); imgp->canary = (uintptr_t)arginfo - linux_szplatform - roundup(execpath_len, sizeof(char *)) - roundup(sizeof(canary), sizeof(char *)); copyout(canary, (void *)imgp->canary, sizeof(canary)); - /* - * If we have a valid auxargs ptr, prepare some room - * on the stack. - */ + /* If we have a valid auxargs ptr, prepare some room on the stack. */ if (imgp->auxargs) { /* * 'AT_COUNT*2' is size for the ELF Auxargs data. This is for @@ -368,29 +358,21 @@ linux_copyout_strings(struct image_params *imgp) sizeof(char *)); } - /* - * vectp also becomes our initial stack base - */ + /* vectp also becomes our initial stack base. */ stack_base = (register_t *)vectp; stringp = imgp->args->begin_argv; argc = imgp->args->argc; envc = imgp->args->envc; - /* - * Copy out strings - arguments and environment. - */ + /* Copy out strings - arguments and environment. */ copyout(stringp, destp, ARG_MAX - imgp->args->stringspace); - /* - * Fill in "ps_strings" struct for ps, w, etc. - */ + /* Fill in "ps_strings" struct for ps, w, etc. */ suword(&arginfo->ps_argvstr, (long)(intptr_t)vectp); suword(&arginfo->ps_nargvstr, argc); - /* - * Fill in argument portion of vector table. - */ + /* Fill in argument portion of vector table. */ for (; argc > 0; --argc) { suword(vectp++, (long)(intptr_t)destp); while (*stringp++ != 0) @@ -398,15 +380,13 @@ linux_copyout_strings(struct image_params *imgp) destp++; } - /* a null vector table pointer separates the argp's from the envp's */ + /* A null vector table pointer separates the argp's from the envp's. */ suword(vectp++, 0); suword(&arginfo->ps_envstr, (long)(intptr_t)vectp); suword(&arginfo->ps_nenvstr, envc); - /* - * Fill in environment portion of vector table. - */ + /* Fill in environment portion of vector table. */ for (; envc > 0; --envc) { suword(vectp++, (long)(intptr_t)destp); while (*stringp++ != 0) @@ -414,7 +394,7 @@ linux_copyout_strings(struct image_params *imgp) destp++; } - /* end of vector table is a null pointer */ + /* The end of the vector table is a null pointer. */ suword(vectp, 0); return (stack_base); @@ -444,9 +424,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse printf(ARGS(rt_sendsig, "%p, %d, %p, %u"), catcher, sig, (void*)mask, code); #endif - /* - * Allocate space for the signal handler context. - */ + /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { fp = (struct l_rt_sigframe *)((uintptr_t)td->td_sigstk.ss_sp + @@ -455,9 +433,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse fp = (struct l_rt_sigframe *)regs->tf_esp - 1; mtx_unlock(&psp->ps_mtx); - /* - * Build the argument list for the signal handler. - */ + /* Build the argument list for the signal handler. */ sig = bsd_to_linux_signal(sig); bzero(&frame, sizeof(frame)); @@ -467,12 +443,10 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse frame.sf_siginfo = &fp->sf_si; frame.sf_ucontext = &fp->sf_sc; - /* Fill in POSIX parts */ + /* Fill in POSIX parts. */ ksiginfo_to_lsiginfo(ksi, &frame.sf_si, sig); - /* - * Build the signal context to be used by sigreturn. - */ + /* Build the signal context to be used by sigreturn. */ frame.sf_sc.uc_flags = 0; /* XXX ??? */ frame.sf_sc.uc_link = NULL; /* XXX ??? */ @@ -527,9 +501,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse sigexit(td, SIGILL); } - /* - * Build context to run handler in. - */ + /* Build context to run handler in. */ regs->tf_esp = (int)fp; regs->tf_eip = linux_rt_sigcode; regs->tf_eflags &= ~(PSL_T | PSL_VM | PSL_D); @@ -584,9 +556,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t catcher, sig, (void*)mask, code); #endif - /* - * Allocate space for the signal handler context. - */ + /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { fp = (struct l_sigframe *)((uintptr_t)td->td_sigstk.ss_sp + @@ -596,9 +566,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); - /* - * Build the argument list for the signal handler. - */ + /* Build the argument list for the signal handler. */ sig = bsd_to_linux_signal(sig); bzero(&frame, sizeof(frame)); @@ -608,9 +576,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t bsd_to_linux_sigset(mask, &lmask); - /* - * Build the signal context to be used by sigreturn. - */ + /* Build the signal context to be used by sigreturn. */ frame.sf_sc.sc_mask = lmask.__mask; frame.sf_sc.sc_gs = rgs(); frame.sf_sc.sc_fs = regs->tf_fs; @@ -644,9 +610,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t sigexit(td, SIGILL); } - /* - * Build context to run handler in. - */ + /* Build context to run handler in. */ regs->tf_esp = (int)fp; regs->tf_eip = linux_sigcode; regs->tf_eflags &= ~(PSL_T | PSL_VM | PSL_D); @@ -693,9 +657,7 @@ linux_sigreturn(struct thread *td, struct linux_sigret if (copyin(args->sfp, &frame, sizeof(frame)) != 0) return (EFAULT); - /* - * Check for security violations. - */ + /* Check for security violations. */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = frame.sf_sc.sc_eflags; if (!EFLAGS_SECURE(eflags, regs->tf_eflags)) @@ -721,9 +683,7 @@ linux_sigreturn(struct thread *td, struct linux_sigret linux_to_bsd_sigset(&lmask, &bmask); kern_sigprocmask(td, SIG_SETMASK, &bmask, NULL, 0); - /* - * Restore signal context. - */ + /* Restore signal context. */ /* %gs was restored by the trampoline. */ regs->tf_fs = frame.sf_sc.sc_fs; regs->tf_es = frame.sf_sc.sc_es; @@ -782,9 +742,7 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_ context = &uc.uc_mcontext; - /* - * Check for security violations. - */ + /* Check for security violations. */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = context->sc_eflags; if (!EFLAGS_SECURE(eflags, regs->tf_eflags)) @@ -809,9 +767,7 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_ linux_to_bsd_sigset(&uc.uc_sigmask, &bmask); kern_sigprocmask(td, SIG_SETMASK, &bmask, NULL, 0); - /* - * Restore signal context - */ + /* Restore signal context. */ /* %gs was restored by the trampoline. */ regs->tf_fs = context->sc_fs; regs->tf_es = context->sc_es; @@ -829,9 +785,7 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_ regs->tf_esp = context->sc_esp_at_signal; regs->tf_ss = context->sc_ss; - /* - * call sigaltstack & ignore results.. - */ + /* Call sigaltstack & ignore results. */ lss = &uc.uc_stack; ss.ss_sp = lss->ss_sp; ss.ss_size = lss->ss_size; @@ -928,7 +882,7 @@ exec_linux_setregs(struct thread *td, struct image_par exec_setregs(td, imgp, stack); - /* Linux sets %gs to 0, we default to _udatasel */ + /* Linux sets %gs to 0, we default to _udatasel. */ pcb->pcb_gs = 0; load_gs(0); From owner-svn-src-all@freebsd.org Tue Mar 13 01:19:08 2018 Return-Path: Delivered-To: svn-src-all@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 1EB0AA7EEFB; Tue, 13 Mar 2018 01:19:08 +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 C42FB7E2A1; Tue, 13 Mar 2018 01:19:07 +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 BEEEF133E8; Tue, 13 Mar 2018 01:19:07 +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 w2D1J7QV048778; Tue, 13 Mar 2018 01:19:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D1J7sn048777; Tue, 13 Mar 2018 01:19:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201803130119.w2D1J7sn048777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 13 Mar 2018 01:19:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330824 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 01:19:08 -0000 Author: mav Date: Tue Mar 13 01:19:07 2018 New Revision: 330824 URL: https://svnweb.freebsd.org/changeset/base/330824 Log: MFC r330048: Add sysctls/tunables for dbuf cache size. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Mar 13 00:40:05 2018 (r330823) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Mar 13 01:19:07 2018 (r330824) @@ -133,6 +133,16 @@ int dbuf_cache_max_shift = 5; uint_t dbuf_cache_hiwater_pct = 10; uint_t dbuf_cache_lowater_pct = 10; +SYSCTL_DECL(_vfs_zfs); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, dbuf_cache_max_bytes, CTLFLAG_RWTUN, + &dbuf_cache_max_bytes, 0, "dbuf cache size in bytes"); +SYSCTL_INT(_vfs_zfs, OID_AUTO, dbuf_cache_max_shift, CTLFLAG_RDTUN, + &dbuf_cache_max_shift, 0, "dbuf size as log2 fraction of ARC"); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, dbuf_cache_hiwater_pct, CTLFLAG_RWTUN, + &dbuf_cache_hiwater_pct, 0, "max percents above the dbuf cache size"); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, dbuf_cache_lowater_pct, CTLFLAG_RWTUN, + &dbuf_cache_lowater_pct, 0, "max percents below the dbuf cache size"); + /* ARGSUSED */ static int dbuf_cons(void *vdb, void *unused, int kmflag) From owner-svn-src-all@freebsd.org Tue Mar 13 02:59:14 2018 Return-Path: Delivered-To: svn-src-all@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 3CC49B2A58E; Tue, 13 Mar 2018 02:59:14 +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 E755F83A8E; Tue, 13 Mar 2018 02:59:13 +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 E22BE14575; Tue, 13 Mar 2018 02:59:13 +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 w2D2xDT0098716; Tue, 13 Mar 2018 02:59:13 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D2xDwQ098715; Tue, 13 Mar 2018 02:59:13 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803130259.w2D2xDwQ098715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 13 Mar 2018 02:59:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330825 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 330825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 02:59:14 -0000 Author: kevans Date: Tue Mar 13 02:59:13 2018 New Revision: 330825 URL: https://svnweb.freebsd.org/changeset/base/330825 Log: lualoader: Sprinkle some verbose_loading salt Our module loading messages should be hidden without verbose_loading -- go ahead and do that as a first step. Modified: head/stand/lua/config.lua Modified: head/stand/lua/config.lua ============================================================================== --- head/stand/lua/config.lua Tue Mar 13 01:19:07 2018 (r330824) +++ head/stand/lua/config.lua Tue Mar 13 02:59:13 2018 (r330825) @@ -197,6 +197,7 @@ end config.env_changed = {} -- Values to restore env to (nil to unset) config.env_restore = {} +config.verbose = false -- The first item in every carousel is always the default item. function config.getCarouselIndex(id) @@ -490,6 +491,11 @@ function config.load(file) -- Cache the provided module_path at load time for later use config.module_path = loader.getenv("module_path") + local verbose = loader.getenv("verbose_loading") + if verbose == nil then + verbose = "no" + end + config.verbose = verbose:lower() == "yes" end -- Reload configuration @@ -512,7 +518,7 @@ function config.loadelf() end print(MSG_MODLOADING) - if not config.loadmod(modules) then + if not config.loadmod(modules, not config.verbose) then print(MSG_MODLOADFAIL) end end From owner-svn-src-all@freebsd.org Tue Mar 13 03:00:19 2018 Return-Path: Delivered-To: svn-src-all@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 03E69B2A796; Tue, 13 Mar 2018 03:00:19 +0000 (UTC) (envelope-from decui@microsoft.com) Received: from APC01-PU1-obe.outbound.protection.outlook.com (mail-pu1apc01on0137.outbound.protection.outlook.com [104.47.126.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9768C83C0A; Tue, 13 Mar 2018 03:00:16 +0000 (UTC) (envelope-from decui@microsoft.com) Received: from KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM (10.170.167.17) by KL1P15301MB0005.APCP153.PROD.OUTLOOK.COM (10.170.167.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.8; Tue, 13 Mar 2018 03:00:09 +0000 Received: from KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM ([10.170.167.17]) by KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM ([10.170.167.17]) with mapi id 15.20.0588.008; Tue, 13 Mar 2018 03:00:09 +0000 From: Dexuan Cui To: Warner Losh , Dexuan-BSD Cui CC: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: RE: svn commit: r328554 - head/sys/cam/scsi Thread-Topic: svn commit: r328554 - head/sys/cam/scsi Thread-Index: AQHTuiFyz8qBuyVRskydPzgJf0IYXaPNd2TA Date: Tue, 13 Mar 2018 03:00:08 +0000 Message-ID: References: <201801291807.w0TI7EVD092154@repo.freebsd.org> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=decui@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2018-03-13T02:59:18.4586269Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General x-originating-ip: [2601:600:a27f:df20:740e:7c66:ca1a:8f87] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; KL1P15301MB0005; 7:LqBqHEGhUjV0khkQDs7uHNQGIhiJCeFo9lvU7S+ZtFknDPQ/FMxAZHh0QM3045KFgZaLNaDshWGggsEZeOofGhvvoFXQdGX2Wp3NxUHYsH45GSmrot3HGSEx2AcadFe/XqvtFIZEFhQFLHoOZNTwP2NiCqoLpQkbU5xzvejUrny/S07pcp/rdGWUxhTTQjM59kPje4eg/2e7kG4bsaweq3m+Yv6wGCaAq69/ufoUtdP4Q64ieK04abj0ZzwdglBx; 20:rei/n9XEnL/9cnduZoXoV4jMg9B3B9V1iryuJ7o7g3rDOz+0NP9H4WJ41vT881CLMfkem6S93dr2fAEqXhJhWP8oNJM5LEmend2rmTA3qsm2ym2IX044WUGVRqr+Pak2QLa3pOYV8p068cg0HHgBTbG5mks5J5V3XiXDobSE3VI= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 82ee900e-db20-45ff-6c30-08d5888e8811 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:KL1P15301MB0005; x-ms-traffictypediagnostic: KL1P15301MB0005: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(56005881305849)(20558992708506)(89211679590171)(189930954265078)(85827821059158)(219752817060721)(155532106045638)(21748063052155)(265313219721884); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3231221)(944501244)(52105095)(3002001)(6055026)(61426038)(61427038)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(6072148)(201708071742011); SRVR:KL1P15301MB0005; BCL:0; PCL:0; RULEID:; SRVR:KL1P15301MB0005; x-forefront-prvs: 0610D16BBE x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(396003)(346002)(366004)(39380400002)(39860400002)(13624006)(199004)(189003)(8990500004)(106356001)(39060400002)(86612001)(4326008)(6116002)(2950100002)(6246003)(25786009)(110136005)(790700001)(10090500001)(54906003)(86362001)(53366004)(99286004)(3280700002)(316002)(105586002)(229853002)(2906002)(53376002)(8936002)(46003)(10290500003)(7696005)(186003)(77096007)(22452003)(53936002)(6506007)(55016002)(102836004)(6436002)(68736007)(3660700001)(7736002)(81166006)(81156014)(59450400001)(53546011)(8676002)(54896002)(478600001)(9326002)(9686003)(97736004)(76176011)(7066003)(236005)(6306002)(74316002)(33656002)(606006)(2900100001)(966005)(53946003)(5660300001)(14454004)(579004)(10090945008); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1P15301MB0005; H:KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 3Fm6zKUgA2lHNOVrtI+83ZYdHEOpePbp5xYMxfEI1PCPiLNdU2nLG8tySMbNgEHolhqjrUFSjcSXsWQpKqQHuotxqAKCG+Gs9lmadTcK80LzjO6MJUedEVKo10F1PybNzM7DdaT+7QUSc988l6MArkdjwD9fVUthoaVTPrGG3PtWsjeryRrDHS2Heg/c6ALOZRckLeb6jRvnM5A9aFpr3ZQCpL7xOE3nHAWlayqrgsMEWvOs1nnEMMgPRzUB559a8idZnlP7eS9SnkcoLaAgkrrj/i43nZxbCysuIcgSL8AY2jzruYz7iIYrheCWTl9iOnO93MIbmv3OStLowiHelw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82ee900e-db20-45ff-6c30-08d5888e8811 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2018 03:00:08.8456 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1P15301MB0005 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 03:00:19 -0000 SGkgV2FybmVyLA0KU29ycnksIEkgbmVlZCB0byBtYWtlIGEgY29ycmVjdGlvbjogYWN1dGFsbHkg aXQgbG9va3MgdGhlIHBhbmljIGNhbiBOT1QgcmVwcm9kdWNlIHdpdGggc3RhYmxlLzExIG9yIHRo ZSBsYXRlc3QgbWFzdGVyIGJyYW5jaC4gVGhpcyBpcyBncmVhdCEgOi0pDQoNCkFjdHVhbGx5IEkg d2FzIHVzaW5nIGFuIG9sZCB2ZXJzaW9uIG9mIHRoZSBtYXN0ZXIgYnJhbmNoIHRoYXQgZG9lc27i gJl0IGhhdmUgcjMyODU1NCB5ZXQsIGFuZCBJIGNvdWxkIDEwMCUgcmVwcm9kdWNlIHRoZSBpc3N1 ZS4gSWYgSSBtYW51YWxseSBhcHBseSByMzI4NTU0LCBvciBJIHVzZSB0aGUgbGF0ZXN0IG1hc3Rl ciBicmFuY2gsIHRoZSBwYW5pYyBjYW7igJl0IGhhcHBlbiBhbnkgbW9yZS4NCg0KU28sIGl0IGxv b2tzIGhlcmUgd2UgZG9u4oCZdCBuZWVkIHRvIE1GQyBhbnkgcGF0Y2ggdG8gc3RhYmxlLzExLg0K DQpUaGFua3MsDQotLSBEZXh1YW4NCg0KRnJvbTogd2xvc2hAYnNkaW1wLmNvbSA8d2xvc2hAYnNk aW1wLmNvbT4gT24gQmVoYWxmIE9mIFdhcm5lciBMb3NoDQpTZW50OiBNb25kYXksIE1hcmNoIDEy LCAyMDE4IDA5OjQ1DQpUbzogRGV4dWFuLUJTRCBDdWkgPGRleHVhbi5ic2RAZ21haWwuY29tPg0K Q2M6IFdhcm5lciBMb3NoIDxpbXBAZnJlZWJzZC5vcmc+OyBzcmMtY29tbWl0dGVycyA8c3JjLWNv bW1pdHRlcnNAZnJlZWJzZC5vcmc+OyBzdm4tc3JjLWFsbEBmcmVlYnNkLm9yZzsgc3ZuLXNyYy1o ZWFkQGZyZWVic2Qub3JnOyBEZXh1YW4gQ3VpIDxkZWN1aUBtaWNyb3NvZnQuY29tPg0KU3ViamVj dDogUmU6IHN2biBjb21taXQ6IHIzMjg1NTQgLSBoZWFkL3N5cy9jYW0vc2NzaQ0KDQoNClRoaXMg c2VuZGVyIGZhaWxlZCBvdXIgZnJhdWQgZGV0ZWN0aW9uIGNoZWNrcyBhbmQgbWF5IG5vdCBiZSB3 aG8gdGhleSBhcHBlYXIgdG8gYmUuIExlYXJuIGFib3V0IHNwb29maW5nPGh0dHA6Ly9ha2EubXMv TGVhcm5BYm91dFNwb29maW5nPg0KDQpGZWVkYmFjazxodHRwOi8vYWthLm1zL1NhZmV0eVRpcHNG ZWVkYmFjaz4NCg0KSSB0aGluayB0aGlzIGlzIGEgZ29vZCBpZGVhIHRvIE1GQy4gV2UndmUgaGFk IG5vIHJlcG9ydHMgb2YgaXQgY2F1c2luZyBpc3N1ZXMuDQoNClRoZXJlJ3MgbW9yZSBleHRlbnNp dmUgbG9ja2luZyBjaGFuZ2VzIC8gdHdlYWtzIG5lZWRlZCBmb3IgZGEgdGhhdCBqdXN0IHdlbnQg aW4gdGhhdCBsaWtlbHkgc2hvdWxkIGFsc28gYmUgTUZDJ2QuDQoNCldhcm5lcg0KDQpPbiBTdW4s IE1hciAxMSwgMjAxOCBhdCA5OjE3IFBNLCBEZXh1YW4tQlNEIEN1aSA8ZGV4dWFuLmJzZEBnbWFp bC5jb208bWFpbHRvOmRleHVhbi5ic2RAZ21haWwuY29tPj4gd3JvdGU6DQpIaSBpbXAgYW5kIGFs bCwNCkkgdGhpbmsgdGhpcyBwYXRjaCBpcyB2ZXJ5IGltcG9ydGFudCwgYmVjYXVzZSBpdCBjYW4g Zml4IGEgcGFuaWMgSQ0Kbm90aWNlZCByZWNlbnRseSB3aGVuIEkgdHJ5IHRvIGhvdC1yZW1vdmUg YSBTQ1NJIGRpc2sgZnJvbSBhIFZNDQpydW5uaW5nIG9uIEF6dXJlL0h5cGVyLVYuDQoNClRoZSBw YW5pYyBpcyBhbG1vc3QgMTAwJSByZXByb2R1Y2libGUgd2l0aCBzdGFibGUvMTEsIGJ1dCBub3Qg aW4gdGhlDQpsYXRlc3QgQ1VSUkVOVCBjb2RlLCBzbyBmaW5hbGx5IEkgaWRlbnRpZmllZCB0aGlz IGZpeCBpbiB0aGUgQ1VSUkVOVA0KYnJhbmNoLg0KDQpDYW4geW91IHBsZWFzZSBNRkMgdGhpcyBw YXRjaCB0byAxMSBhbmQgMTA/DQpJdCBsb29rcyB0aGVyZSBpcyBhIG1ham9yIGRpZmZlcmVuY2Ug aW4gdGhlIENBTSBjb2RlIGJldHdlZW4gMTEvMTANCmFuZCB0aGUgQ1VSUkVOVCBjb2RlLCBhbmQg d2UgbWF5IGhhdmUgdG8gTUZDIG1vcmUgcmVsYXRlZCBwYXRjaGVzLiBJZg0KdGhpcyBpcyBkaWZm aWN1bHQsIEkgaG9wZSBhdCBsZWFzdCB3ZSBjYW4gcHJvdmlkZSBhIG1pbmltYWwgcmUtd3JpdHRl bg0KdmVyc2lvbiBvZiB0aGUgcGF0Y2ggdG8gMTEgYW5kIDEwPw0KDQpMb29raW5nIGZvcndhcmQg dG8geW91ciBpbnNpZ2h0IQ0KDQpUaGFua3MsDQotLSBEZXh1YW4NCg0KDQpPbiBNb24sIEphbiAy OSwgMjAxOCBhdCAxMDowNyBBTSwgV2FybmVyIExvc2ggPGltcEBmcmVlYnNkLm9yZzxtYWlsdG86 aW1wQGZyZWVic2Qub3JnPj4gd3JvdGU6DQo+IEF1dGhvcjogaW1wDQo+IERhdGU6IE1vbiBKYW4g MjkgMTg6MDc6MTQgMjAxOA0KPiBOZXcgUmV2aXNpb246IDMyODU1NA0KPiBVUkw6IGh0dHBzOi8v c3Zud2ViLmZyZWVic2Qub3JnL2NoYW5nZXNldC9iYXNlLzMyODU1NDxodHRwczovL25hMDEuc2Fm ZWxpbmtzLnByb3RlY3Rpb24ub3V0bG9vay5jb20vP3VybD1odHRwcyUzQSUyRiUyRnN2bndlYi5m cmVlYnNkLm9yZyUyRmNoYW5nZXNldCUyRmJhc2UlMkYzMjg1NTQmZGF0YT0wNCU3QzAxJTdDZGVj dWklNDBtaWNyb3NvZnQuY29tJTdDZTRkOGUzODAyYzhjNDhiZjk2OTgwOGQ1ODgzODkwNGYlN0M3 MmY5ODhiZjg2ZjE0MWFmOTFhYjJkN2NkMDExZGI0NyU3QzElN0MwJTdDNjM2NTY0Njk4OTA4NzUw MDU4JTdDVW5rbm93biU3Q1RXRnBiR1pzYjNkOGV5SldJam9pTUM0d0xqQXdNREFpTENKUUlqb2lW Mmx1TXpJaUxDSkJUaUk2SWsxaGFXd2lmUSUzRCUzRCU3QzEwMCZzZGF0YT1TdUt0aE5BNXU5Nlla WWZHbUZUS1RrQ0hJJTJGNW5JamU5dVdkcGhhcEFObFklM0QmcmVzZXJ2ZWQ9MD4NCj4NCj4gTG9n Og0KPiAgIERvIHRoZSBib29rLWtlZXBpbmcgb24gcmVsZWFzZSBiZWZvcmUgd2UgcmVsZWFzZSB0 aGUgcmVmZXJlbmNlLiBUaGUNCj4gICBwZXJpcGggd2FzIGdvaW5nIGF3YXkgb24gZmluYWwgcmVs ZWFzZSwgYW5kIHRoZW4gcmV0dXJuaW5nIGFuZCB3ZQ0KPiAgIHN0YXJ0ZWQgZGFuY2luZyBpbiBm cmVlIG1lbW9yeS4NCj4NCj4gICBTcG9uc29yZWQgYnk6IE5ldGZsaXgNCj4NCj4gTW9kaWZpZWQ6 DQo+ICAgaGVhZC9zeXMvY2FtL3Njc2kvc2NzaV9kYS5jDQo+DQo+IE1vZGlmaWVkOiBoZWFkL3N5 cy9jYW0vc2NzaS9zY3NpX2RhLmMNCj4gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQo+IC0tLSBoZWFk L3N5cy9jYW0vc2NzaS9zY3NpX2RhLmMgTW9uIEphbiAyOSAxNzozMjozMCAyMDE4ICAgICAgICAo cjMyODU1MykNCj4gKysrIGhlYWQvc3lzL2NhbS9zY3NpL3Njc2lfZGEuYyBNb24gSmFuIDI5IDE4 OjA3OjE0IDIwMTggICAgICAgIChyMzI4NTU0KQ0KPiBAQCAtMTU0OSwxMiArMTU0OSwxMiBAQCBk YV9wZXJpcGhfdW5ob2xkKHN0cnVjdCBjYW1fcGVyaXBoICpwZXJpcGgsIGRhX3JlZl90b2sNCj4g ICAgICAgICBzdHJ1Y3QgZGFfc29mdGMgKnNvZnRjID0gcGVyaXBoLT5zb2Z0YzsNCj4NCj4gICAg ICAgICB0b2tlbl9zYW5pdHkodG9rZW4pOw0KPiAtICAgICAgIGNhbV9wZXJpcGhfdW5ob2xkKHBl cmlwaCk7DQo+ICAgICAgICAgREFfUEVSSVBIX1BSSU5UKHBlcmlwaCwgIlVuaG9sZGluZyBkZXZp Y2UgJXMgKCVkKVxuIiwNCj4gICAgICAgICAgICAgZGFfcmVmX3RleHRbdG9rZW5dLCB0b2tlbik7 DQo+ICAgICAgICAgY250ID0gYXRvbWljX2ZldGNoYWRkX2ludCgmc29mdGMtPnJlZl9mbGFnc1t0 b2tlbl0sIC0xKTsNCj4gICAgICAgICBpZiAoY250ICE9IDEpDQo+ICAgICAgICAgICAgICAgICBw YW5pYygiVW5ob2xkaW5nICVkIHdpdGggY250ID0gJWQiLCB0b2tlbiwgY250KTsNCj4gKyAgICAg ICBjYW1fcGVyaXBoX3VuaG9sZChwZXJpcGgpOw0KPiAgfQ0KPg0KPiAgc3RhdGljIGlubGluZSBp bnQNCj4gQEAgLTE1ODMsMTIgKzE1ODMsMTIgQEAgZGFfcGVyaXBoX3JlbGVhc2Uoc3RydWN0IGNh bV9wZXJpcGggKnBlcmlwaCwgZGFfcmVmX3RvDQo+ICAgICAgICAgc3RydWN0IGRhX3NvZnRjICpz b2Z0YyA9IHBlcmlwaC0+c29mdGM7DQo+DQo+ICAgICAgICAgdG9rZW5fc2FuaXR5KHRva2VuKTsN Cj4gLSAgICAgICBjYW1fcGVyaXBoX3JlbGVhc2UocGVyaXBoKTsNCj4gICAgICAgICBEQV9QRVJJ UEhfUFJJTlQocGVyaXBoLCAicmVsZWFzaW5nIGRldmljZSAlcyAoJWQpXG4iLA0KPiAgICAgICAg ICAgICBkYV9yZWZfdGV4dFt0b2tlbl0sIHRva2VuKTsNCj4gICAgICAgICBjbnQgPSBhdG9taWNf ZmV0Y2hhZGRfaW50KCZzb2Z0Yy0+cmVmX2ZsYWdzW3Rva2VuXSwgLTEpOw0KPiAgICAgICAgIGlm IChjbnQgIT0gMSkNCj4gICAgICAgICAgICAgICAgIHBhbmljKCJSZWxlYXNpbmcgJWQgd2l0aCBj bnQgPSAlZCIsIHRva2VuLCBjbnQpOw0KPiArICAgICAgIGNhbV9wZXJpcGhfcmVsZWFzZShwZXJp cGgpOw0KPiAgfQ0KPg0KPiAgc3RhdGljIGlubGluZSB2b2lkDQo+IEBAIC0xNTk4LDEyICsxNTk4 LDEyIEBAIGRhX3BlcmlwaF9yZWxlYXNlX2xvY2tlZChzdHJ1Y3QgY2FtX3BlcmlwaCAqcGVyaXBo LCBkYQ0KPiAgICAgICAgIHN0cnVjdCBkYV9zb2Z0YyAqc29mdGMgPSBwZXJpcGgtPnNvZnRjOw0K Pg0KPiAgICAgICAgIHRva2VuX3Nhbml0eSh0b2tlbik7DQo+IC0gICAgICAgY2FtX3BlcmlwaF9y ZWxlYXNlX2xvY2tlZChwZXJpcGgpOw0KPiAgICAgICAgIERBX1BFUklQSF9QUklOVChwZXJpcGgs ICJyZWxlYXNpbmcgZGV2aWNlIChsb2NrZWQpICVzICglZClcbiIsDQo+ICAgICAgICAgICAgIGRh X3JlZl90ZXh0W3Rva2VuXSwgdG9rZW4pOw0KPiAgICAgICAgIGNudCA9IGF0b21pY19mZXRjaGFk ZF9pbnQoJnNvZnRjLT5yZWZfZmxhZ3NbdG9rZW5dLCAtMSk7DQo+ICAgICAgICAgaWYgKGNudCAh PSAxKQ0KPiAgICAgICAgICAgICAgICAgcGFuaWMoIlVuaG9sZGluZyAlZCB3aXRoIGNudCA9ICVk IiwgdG9rZW4sIGNudCk7DQo+ICsgICAgICAgY2FtX3BlcmlwaF9yZWxlYXNlX2xvY2tlZChwZXJp cGgpOw0KPiAgfQ0KPg0KPiAgI2RlZmluZSBjYW1fcGVyaXBoX2hvbGQgUE9JU09ODQo+DQoNCg== From owner-svn-src-all@freebsd.org Tue Mar 13 03:02:10 2018 Return-Path: Delivered-To: svn-src-all@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 660E5B2AB99; Tue, 13 Mar 2018 03:02:10 +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 14915843B7; Tue, 13 Mar 2018 03:02:10 +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 0F7C71475B; Tue, 13 Mar 2018 03:02:10 +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 w2D329sm001574; Tue, 13 Mar 2018 03:02:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D329pE001567; Tue, 13 Mar 2018 03:02:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201803130302.w2D329pE001567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 13 Mar 2018 03:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330826 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 330826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 03:02:10 -0000 Author: mav Date: Tue Mar 13 03:02:09 2018 New Revision: 330826 URL: https://svnweb.freebsd.org/changeset/base/330826 Log: Add `nvmecontrol format` subcommand. It allows to change namespace parameters, such as block size, metadata, protection information, etc. and/or erase the data. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Added: head/sbin/nvmecontrol/format.c (contents, props changed) Modified: head/sbin/nvmecontrol/Makefile head/sbin/nvmecontrol/identify.c head/sbin/nvmecontrol/logpage.c head/sbin/nvmecontrol/nvmecontrol.8 head/sbin/nvmecontrol/nvmecontrol.c head/sbin/nvmecontrol/nvmecontrol.h Modified: head/sbin/nvmecontrol/Makefile ============================================================================== --- head/sbin/nvmecontrol/Makefile Tue Mar 13 02:59:13 2018 (r330825) +++ head/sbin/nvmecontrol/Makefile Tue Mar 13 03:02:09 2018 (r330826) @@ -2,7 +2,7 @@ PACKAGE=runtime PROG= nvmecontrol -SRCS= nvmecontrol.c devlist.c firmware.c identify.c logpage.c \ +SRCS= nvmecontrol.c devlist.c firmware.c format.c identify.c logpage.c \ perftest.c reset.c nvme_util.c power.c util.c wdc.c MAN= nvmecontrol.8 Added: head/sbin/nvmecontrol/format.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/nvmecontrol/format.c Tue Mar 13 03:02:09 2018 (r330826) @@ -0,0 +1,175 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 2018 Alexander Motin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "nvmecontrol.h" + +static void +format_usage(void) +{ + fprintf(stderr, "usage:\n"); + fprintf(stderr, FORMAT_USAGE); + exit(1); +} + +void +format(int argc, char *argv[]) +{ + struct nvme_controller_data cd; + struct nvme_namespace_data nsd; + struct nvme_pt_command pt; + char path[64]; + char *target; + uint32_t nsid; + int ch, fd; + int lbaf = -1, mset = -1, pi = -1, pil = -1, ses = 0; + + if (argc < 2) + format_usage(); + + while ((ch = getopt(argc, argv, "f:m:p:l:EC")) != -1) { + switch ((char)ch) { + case 'f': + lbaf = strtol(optarg, NULL, 0); + break; + case 'm': + mset = strtol(optarg, NULL, 0); + break; + case 'p': + pi = strtol(optarg, NULL, 0); + break; + case 'l': + pil = strtol(optarg, NULL, 0); + break; + case 'E': + ses = 1; + break; + case 'C': + ses = 2; + break; + default: + format_usage(); + } + } + + /* Check that a controller or namespace was specified. */ + if (optind >= argc) + format_usage(); + target = argv[optind]; + + /* + * Check if the specified device node exists before continuing. + * This is a cleaner check for cases where the correct controller + * is specified, but an invalid namespace on that controller. + */ + open_dev(target, &fd, 1, 1); + + /* + * If device node contains "ns", we consider it a namespace, + * otherwise, consider it a controller. + */ + if (strstr(target, NVME_NS_PREFIX) == NULL) { + nsid = NVME_GLOBAL_NAMESPACE_TAG; + + /* We have no previous parameters, so use defaults. */ + if (lbaf < 0) + lbaf = 0; + if (mset < 0) + mset = 0; + if (pi < 0) + pi = 0; + if (pil < 0) + pil = 0; + } else { + parse_ns_str(target, path, &nsid); + + /* + * We send FORMAT commands to the controller, not the namespace, + * since it is an admin cmd. The namespace ID will be specified + * in the command itself. So parse the namespace's device node + * string to get the controller substring and namespace ID. + */ + close(fd); + open_dev(path, &fd, 1, 1); + + /* Check that controller can execute this command. */ + read_controller_data(fd, &cd); + if (((cd.fna >> NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT) + & NVME_CTRLR_DATA_FNA_FORMAT_ALL_MASK) && ses == 0) { + fprintf(stderr, "H/w doesn't support per-NS format\n"); + exit(1); + } else if (((cd.fna >> NVME_CTRLR_DATA_FNA_ERASE_ALL_SHIFT) + & NVME_CTRLR_DATA_FNA_ERASE_ALL_MASK) && ses != 0) { + fprintf(stderr, "H/w doesn't support per-NS erase\n"); + exit(1); + } + + /* Try to keep previous namespace parameters. */ + read_namespace_data(fd, nsid, &nsd); + if (lbaf < 0) + lbaf = (nsd.flbas >> NVME_NS_DATA_FLBAS_FORMAT_SHIFT) + & NVME_NS_DATA_FLBAS_FORMAT_MASK; + if (mset < 0) + mset = (nsd.flbas >> NVME_NS_DATA_FLBAS_EXTENDED_SHIFT) + & NVME_NS_DATA_FLBAS_EXTENDED_MASK; + if (pi < 0) + pi = (nsd.dps >> NVME_NS_DATA_DPS_MD_START_SHIFT) + & NVME_NS_DATA_DPS_MD_START_MASK; + if (pil < 0) + pil = (nsd.dps >> NVME_NS_DATA_DPS_PIT_SHIFT) + & NVME_NS_DATA_DPS_PIT_MASK; + } + + memset(&pt, 0, sizeof(pt)); + pt.cmd.opc_fuse = NVME_CMD_SET_OPC(NVME_OPC_FORMAT_NVM); + pt.cmd.nsid = htole32(nsid); + pt.cmd.cdw10 = htole32((ses << 9) + (pil << 8) + (pi << 5) + + (mset << 4) + lbaf); + + if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) + err(1, "format request failed"); + + if (nvme_completion_is_error(&pt.cpl)) + errx(1, "format request returned error"); + close(fd); + exit(0); +} Modified: head/sbin/nvmecontrol/identify.c ============================================================================== --- head/sbin/nvmecontrol/identify.c Tue Mar 13 02:59:13 2018 (r330825) +++ head/sbin/nvmecontrol/identify.c Tue Mar 13 03:02:09 2018 (r330826) @@ -384,8 +384,9 @@ identify_ns(int argc, char *argv[]) { struct nvme_namespace_data nsdata; char path[64]; - int ch, fd, hexflag = 0, hexlength, nsid; + int ch, fd, hexflag = 0, hexlength; int verboseflag = 0; + uint32_t nsid; while ((ch = getopt(argc, argv, "vx")) != -1) { switch ((char)ch) { Modified: head/sbin/nvmecontrol/logpage.c ============================================================================== --- head/sbin/nvmecontrol/logpage.c Tue Mar 13 02:59:13 2018 (r330825) +++ head/sbin/nvmecontrol/logpage.c Tue Mar 13 03:02:09 2018 (r330826) @@ -99,7 +99,7 @@ get_log_buffer(uint32_t size) } void -read_logpage(int fd, uint8_t log_page, int nsid, void *payload, +read_logpage(int fd, uint8_t log_page, uint32_t nsid, void *payload, uint32_t payload_size) { struct nvme_pt_command pt; @@ -909,13 +909,13 @@ logpage_help(void) void logpage(int argc, char *argv[]) { - int fd, nsid; + int fd; int log_page = 0, pageflag = false; int binflag = false, hexflag = false, ns_specified; int opt; char *p; char cname[64]; - uint32_t size; + uint32_t nsid, size; void *buf; const char *vendor = NULL; struct logpage_function *f; Modified: head/sbin/nvmecontrol/nvmecontrol.8 ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.8 Tue Mar 13 02:59:13 2018 (r330825) +++ head/sbin/nvmecontrol/nvmecontrol.8 Tue Mar 13 03:02:09 2018 (r330826) @@ -1,4 +1,5 @@ .\" +.\" Copyright (c) 2018 Alexander Motin .\" Copyright (c) 2012 Intel Corporation .\" All rights reserved. .\" @@ -33,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 24, 2017 +.Dd March 12, 2018 .Dt NVMECONTROL 8 .Os .Sh NAME @@ -47,6 +48,7 @@ .Op Fl v .Op Fl x .Aq device id +.Aq namespace id .Nm .Ic perftest .Aq Fl n Ar num_threads @@ -73,6 +75,16 @@ .Op Fl a .Aq device id .Nm +.Ic format +.Op Fl f Ar fmt +.Op Fl m Ar mset +.Op Fl o Ar pi +.Op Fl l Ar pil +.Op Fl E +.Op Fl C +.Aq device id +.Aq namespace id +.Nm .Ic power .Op Fl l .Op Fl p power_state @@ -117,6 +129,27 @@ will list all valid vendors and pages. will print the page as hex. .Fl b will print the binary data for the page. +.Ss format +Format either specified namespace, or all namespaces of specified controller, +using specified parameters: +.Ar fmt +LBA Format, +.Ar mset +Metadata Settings, +.Ar pi +Protection Information, +.Ar pil +Protection Information Location. +When formatting specific namespace, existing values are used as defaults. +When formatting all namespaces, all parameters should be specified. +Some controllers may not support formatting or erasing specific or all +namespaces. +Option +.Fl E +enables User Data Erase during format. +Option +.Fl C +enables Cryptographic Erase during format. .Ss wdc The various wdc command retrieve log data from the wdc/hgst drives. The Modified: head/sbin/nvmecontrol/nvmecontrol.c ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.c Tue Mar 13 02:59:13 2018 (r330825) +++ head/sbin/nvmecontrol/nvmecontrol.c Tue Mar 13 03:02:09 2018 (r330826) @@ -55,6 +55,7 @@ static struct nvme_function funcs[] = { {"reset", reset, RESET_USAGE}, {"logpage", logpage, LOGPAGE_USAGE}, {"firmware", firmware, FIRMWARE_USAGE}, + {"format", format, FORMAT_USAGE}, {"power", power, POWER_USAGE}, {"wdc", wdc, WDC_USAGE}, {NULL, NULL, NULL}, @@ -163,7 +164,7 @@ read_controller_data(int fd, struct nvme_controller_da } void -read_namespace_data(int fd, int nsid, struct nvme_namespace_data *nsdata) +read_namespace_data(int fd, uint32_t nsid, struct nvme_namespace_data *nsdata) { struct nvme_pt_command pt; @@ -214,7 +215,7 @@ open_dev(const char *str, int *fd, int show_error, int } void -parse_ns_str(const char *ns_str, char *ctrlr_str, int *nsid) +parse_ns_str(const char *ns_str, char *ctrlr_str, uint32_t *nsid) { char *nsloc; Modified: head/sbin/nvmecontrol/nvmecontrol.h ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.h Tue Mar 13 02:59:13 2018 (r330825) +++ head/sbin/nvmecontrol/nvmecontrol.h Tue Mar 13 03:02:09 2018 (r330826) @@ -65,6 +65,9 @@ struct nvme_function { #define FIRMWARE_USAGE \ " nvmecontrol firmware [-s slot] [-f path_to_firmware] [-a] \n" +#define FORMAT_USAGE \ +" nvmecontrol format [-f fmt] [-m mset] [-p pi] [-l pil] [-E] [-C] \n" + #define POWER_USAGE \ " nvmecontrol power [-l] [-p new-state [-w workload-hint]] \n" @@ -77,15 +80,16 @@ void perftest(int argc, char *argv[]); void reset(int argc, char *argv[]); void logpage(int argc, char *argv[]); void firmware(int argc, char *argv[]); +void format(int argc, char *argv[]); void power(int argc, char *argv[]); void wdc(int argc, char *argv[]); int open_dev(const char *str, int *fd, int show_error, int exit_on_error); -void parse_ns_str(const char *ns_str, char *ctrlr_str, int *nsid); +void parse_ns_str(const char *ns_str, char *ctrlr_str, uint32_t *nsid); void read_controller_data(int fd, struct nvme_controller_data *cdata); -void read_namespace_data(int fd, int nsid, struct nvme_namespace_data *nsdata); +void read_namespace_data(int fd, uint32_t nsid, struct nvme_namespace_data *nsdata); void print_hex(void *data, uint32_t length); -void read_logpage(int fd, uint8_t log_page, int nsid, void *payload, +void read_logpage(int fd, uint8_t log_page, uint32_t nsid, void *payload, uint32_t payload_size); void gen_usage(struct nvme_function *); void dispatch(int argc, char *argv[], struct nvme_function *f); From owner-svn-src-all@freebsd.org Tue Mar 13 08:45:07 2018 Return-Path: Delivered-To: svn-src-all@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 9422AF2D5F2; Tue, 13 Mar 2018 08:45:07 +0000 (UTC) (envelope-from ae@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 3F9A570C28; Tue, 13 Mar 2018 08:45:07 +0000 (UTC) (envelope-from ae@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 3A92C17BAC; Tue, 13 Mar 2018 08:45:07 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2D8j7EH073635; Tue, 13 Mar 2018 08:45:07 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D8j7Ep073634; Tue, 13 Mar 2018 08:45:07 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201803130845.w2D8j7Ep073634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 13 Mar 2018 08:45:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330829 - stable/11/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/net X-SVN-Commit-Revision: 330829 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 08:45:07 -0000 Author: ae Date: Tue Mar 13 08:45:06 2018 New Revision: 330829 URL: https://svnweb.freebsd.org/changeset/base/330829 Log: MFC r330536: Define ethernet type 0x88A8 as ETHERTYPE_QINQ. Reviewed by: kp Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D14593 Modified: stable/11/sys/net/ethernet.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/ethernet.h ============================================================================== --- stable/11/sys/net/ethernet.h Tue Mar 13 03:54:41 2018 (r330828) +++ stable/11/sys/net/ethernet.h Tue Mar 13 08:45:06 2018 (r330829) @@ -341,6 +341,7 @@ struct ether_vlan_header { #define ETHERTYPE_PPPOE 0x8864 /* PPP Over Ethernet Session Stage */ #define ETHERTYPE_LANPROBE 0x8888 /* HP LanProbe test? */ #define ETHERTYPE_PAE 0x888e /* EAPOL PAE/802.1x */ +#define ETHERTYPE_QINQ 0x88A8 /* 802.1ad VLAN stacking */ #define ETHERTYPE_LOOPBACK 0x9000 /* Loopback: used to test interfaces */ #define ETHERTYPE_LBACK ETHERTYPE_LOOPBACK /* DEC MOP loopback */ #define ETHERTYPE_XNSSM 0x9001 /* 3Com (Formerly Bridge Communications), XNS Systems Management */ From owner-svn-src-all@freebsd.org Tue Mar 13 08:46:48 2018 Return-Path: Delivered-To: svn-src-all@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 A4D29F2D85E; Tue, 13 Mar 2018 08:46:48 +0000 (UTC) (envelope-from ae@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 4602970DDD; Tue, 13 Mar 2018 08:46:48 +0000 (UTC) (envelope-from ae@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 40E4817BB0; Tue, 13 Mar 2018 08:46:48 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2D8kmsV073749; Tue, 13 Mar 2018 08:46:48 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D8klPu073747; Tue, 13 Mar 2018 08:46:47 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201803130846.w2D8klPu073747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 13 Mar 2018 08:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330830 - in stable/11/sys: compat/linuxkpi/common/include/linux dev/mlx4/mlx4_core X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/11/sys: compat/linuxkpi/common/include/linux dev/mlx4/mlx4_core X-SVN-Commit-Revision: 330830 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 08:46:48 -0000 Author: ae Date: Tue Mar 13 08:46:47 2018 New Revision: 330830 URL: https://svnweb.freebsd.org/changeset/base/330830 Log: MFC r330537: Add mapping for several ethernet types used by Linux to FreeBSD ethernet types. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D14594 Modified: stable/11/sys/compat/linuxkpi/common/include/linux/if_ether.h stable/11/sys/dev/mlx4/mlx4_core/mlx4.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/if_ether.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/if_ether.h Tue Mar 13 08:45:06 2018 (r330829) +++ stable/11/sys/compat/linuxkpi/common/include/linux/if_ether.h Tue Mar 13 08:46:47 2018 (r330830) @@ -35,8 +35,6 @@ #include -#define ETH_P_8021Q ETHERTYPE_VLAN - #define ETH_HLEN ETHER_HDR_LEN /* Total octets in header. */ #ifndef ETH_ALEN #define ETH_ALEN ETHER_ADDR_LEN @@ -47,6 +45,11 @@ /* * defined Ethernet Protocol ID's. */ -#define ETH_P_IP 0x0800 /* Internet Protocol packet */ +#define ETH_P_IP ETHERTYPE_IP +#define ETH_P_IPV6 ETHERTYPE_IPV6 +#define ETH_P_MPLS_UC ETHERTYPE_MPLS +#define ETH_P_MPLS_MC ETHERTYPE_MPLS_MCAST +#define ETH_P_8021Q ETHERTYPE_VLAN +#define ETH_P_8021AD ETHERTYPE_QINQ #endif /* _LINUX_IF_ETHER_H_ */ Modified: stable/11/sys/dev/mlx4/mlx4_core/mlx4.h ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_core/mlx4.h Tue Mar 13 08:45:06 2018 (r330829) +++ stable/11/sys/dev/mlx4/mlx4_core/mlx4.h Tue Mar 13 08:46:47 2018 (r330830) @@ -66,8 +66,6 @@ #define MLX4_QUERY_IF_STAT_RESET BIT(31) -#define ETH_P_8021AD 0x88A8 - enum { MLX4_HCR_BASE = 0x80680, MLX4_HCR_SIZE = 0x0001c, From owner-svn-src-all@freebsd.org Tue Mar 13 09:18:05 2018 Return-Path: Delivered-To: svn-src-all@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 241BFF311F1; Tue, 13 Mar 2018 09:18:05 +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 CDE2072085; Tue, 13 Mar 2018 09:18:04 +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 C43A818046; Tue, 13 Mar 2018 09:18:04 +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 w2D9I4Q8088606; Tue, 13 Mar 2018 09:18:04 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D9I4PG088605; Tue, 13 Mar 2018 09:18:04 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803130918.w2D9I4PG088605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 13 Mar 2018 09:18:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330831 - stable/11/sys/dev/syscons/fonts X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons/fonts X-SVN-Commit-Revision: 330831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 09:18:05 -0000 Author: eadler Date: Tue Mar 13 09:18:04 2018 New Revision: 330831 URL: https://svnweb.freebsd.org/changeset/base/330831 Log: MFC r320805: Add files to help manage the (vga) syscons mouse cursor. To mostly fix distortion of mouse cursors by non-square pixels, I needed 8 variants of the same cursor shape for large fonts and another 7 variants for small fonts. Some variants are shared, leaving only 13 variants in 26 glyphs altogether. Keep these in the BDF source file cursor.bdf. cursor.bdf has another 5 unused experimental cursors in 10 glyphs. cursor.awk is a simple awk script for converting this and similar bdf files into C declarations for copying into scvgarndr.c. syscons doesn't use any of this yet. Added: stable/11/sys/dev/syscons/fonts/ - copied from r320805, head/sys/dev/syscons/fonts/ Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-all@freebsd.org Tue Mar 13 09:21:08 2018 Return-Path: Delivered-To: svn-src-all@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 9AE40F31567; Tue, 13 Mar 2018 09:21:08 +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 4E807722DC; Tue, 13 Mar 2018 09:21:08 +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 498541816C; Tue, 13 Mar 2018 09:21:08 +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 w2D9L8p4091824; Tue, 13 Mar 2018 09:21:08 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D9L86q091822; Tue, 13 Mar 2018 09:21:08 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803130921.w2D9L86q091822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 13 Mar 2018 09:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330832 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 09:21:08 -0000 Author: eadler Date: Tue Mar 13 09:21:07 2018 New Revision: 330832 URL: https://svnweb.freebsd.org/changeset/base/330832 Log: MFC r304153: Quick fix for locking fixes in r172250. The lock added there was per- virtual-device, but needs to be per-physical-device so that it protects shared data. Usually, scp->sc->write_in_progress got corrupted first and further corruption was limited when this variable was left at nonzero with no write in progress. Attempt to fix missing lock destruction in r162285. Put it with the lock destruction for r172250 after moving the latter. Both might be unreachable. To demonstrate the bug, find a buggy syscall or sysctl that calls printf(9) and run this often. Run hd /dev/zero >/dev/ttyvN for any N != 0. The console spam goes to ttyv0 and the non-console spam goes to ttyvN, so the lock provided no protection (but it helped for N == 0). Modified: stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Tue Mar 13 09:18:04 2018 (r330831) +++ stable/11/sys/dev/syscons/syscons.c Tue Mar 13 09:21:07 2018 (r330832) @@ -2688,13 +2688,13 @@ sc_puts(scr_stat *scp, u_char *buf, int len, int kerne #endif if (scp->tsw) { - if (!kdb_active && !mtx_owned(&scp->scr_lock)) { + if (!kdb_active && !mtx_owned(&scp->sc->scr_lock)) { need_unlock = 1; - mtx_lock_spin(&scp->scr_lock); + mtx_lock_spin(&scp->sc->scr_lock); } (*scp->tsw->te_puts)(scp, buf, len, kernel); if (need_unlock) - mtx_unlock_spin(&scp->scr_lock); + mtx_unlock_spin(&scp->sc->scr_lock); } if (scp->sc->delayed_next_scr) @@ -2859,8 +2859,10 @@ scinit(int unit, int flags) * disappeared... */ sc = sc_get_softc(unit, flags & SC_KERNEL_CONSOLE); - if ((sc->flags & SC_INIT_DONE) == 0) + if ((sc->flags & SC_INIT_DONE) == 0) { + mtx_init(&sc->scr_lock, "scrlock", NULL, MTX_SPIN); SC_VIDEO_LOCKINIT(sc); + } adp = NULL; if (sc->adapter >= 0) { @@ -3077,7 +3079,8 @@ scterm(int unit, int flags) (*scp->tsw->te_term)(scp, &scp->ts); if (scp->ts != NULL) free(scp->ts, M_DEVBUF); - mtx_destroy(&scp->scr_lock); + mtx_destroy(&sc->scr_lock); + mtx_destroy(&sc->video_mtx); /* clear the structure */ if (!(flags & SC_KERNEL_CONSOLE)) { @@ -3302,8 +3305,6 @@ init_scp(sc_softc_t *sc, int vty, scr_stat *scp) scp->history = NULL; scp->history_pos = 0; scp->history_size = 0; - - mtx_init(&scp->scr_lock, "scrlock", NULL, MTX_SPIN); } int Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Tue Mar 13 09:18:04 2018 (r330831) +++ stable/11/sys/dev/syscons/syscons.h Tue Mar 13 09:21:07 2018 (r330832) @@ -230,6 +230,7 @@ typedef struct sc_softc { char switch_in_progress; char write_in_progress; char blink_in_progress; + struct mtx scr_lock; /* mutex for sc_puts() */ struct mtx video_mtx; long scrn_time_stamp; @@ -344,7 +345,6 @@ typedef struct scr_stat { int splash_save_mode; /* saved mode for splash screen */ int splash_save_status; /* saved status for splash screen */ - struct mtx scr_lock; /* mutex for sc_puts() */ #ifdef _SCR_MD_STAT_DECLARED_ scr_md_stat_t md; /* machine dependent vars */ #endif From owner-svn-src-all@freebsd.org Tue Mar 13 09:29:57 2018 Return-Path: Delivered-To: svn-src-all@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 881DAF3232D; Tue, 13 Mar 2018 09:29:57 +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 377AA72B9B; Tue, 13 Mar 2018 09:29:57 +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 307B9181C7; Tue, 13 Mar 2018 09:29:57 +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 w2D9TvTs093883; Tue, 13 Mar 2018 09:29:57 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D9Tvxf093882; Tue, 13 Mar 2018 09:29:57 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803130929.w2D9Tvxf093882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 13 Mar 2018 09:29:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330833 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330833 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 09:29:57 -0000 Author: eadler Date: Tue Mar 13 09:29:56 2018 New Revision: 330833 URL: https://svnweb.freebsd.org/changeset/base/330833 Log: MFC r304161: Change all uses of 'debugger' to kdb_active and remove this variable. This restores avoidance of doing dangerous things like calling wakeup() and callouts while in ddb. Initialization of 'debugger' was broken by removing the cndbctl() console method that was used mainly in this driver to initialize 'debugger' and switch to the console screen on entry to ddb. The screen switch was restored using the cngrab() method, but cngrab() is more general so it should not initialize 'debugger' and never did. 'debugger' was just an over-engineered alias for kdb_active anyway. It existed because kdb_active (when it was named ddb_active) was considered as a private kdb variable, and there are ordering problems initializing the variables atomically with the state that they represent, but an extra variable and method to set it increased these problems. The bug caused LORs, but WITNESS is normally misconfigured with WITNESS_SKIPSIN so it doesn't check the spinlocks used by wakeup() and callouts. Modified: stable/11/sys/dev/syscons/syscons.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Tue Mar 13 09:21:07 2018 (r330832) +++ stable/11/sys/dev/syscons/syscons.c Tue Mar 13 09:29:56 2018 (r330833) @@ -172,8 +172,6 @@ SYSCTL_INT(_machdep, OID_AUTO, enable_panic_key, CTLFL #define VTY_WCHAN(sc, vty) (&SC_DEV(sc, vty)) -static int debugger; - /* prototypes */ static int sc_allocate_keyboard(sc_softc_t *sc, int unit); static int scvidprobe(int unit, int flags, int cons); @@ -1815,7 +1813,7 @@ sccnupdate(scr_stat *scp) if (suspend_in_progress || scp->sc->font_loading_in_progress) return; - if (debugger > 0 || panicstr || shutdown_in_progress) { + if (kdb_active || panicstr || shutdown_in_progress) { sc_touch_scrn_saver(); } else if (scp != scp->sc->cur_scp) { return; @@ -1884,7 +1882,7 @@ scrn_timer(void *arg) #endif /* PC98 */ /* should we stop the screen saver? */ - if (debugger > 0 || panicstr || shutdown_in_progress) + if (kdb_active || panicstr || shutdown_in_progress) sc_touch_scrn_saver(); if (run_scrn_saver) { if (time_uptime > sc->scrn_time_stamp + scrn_blank_time) @@ -2279,7 +2277,7 @@ stop_scrn_saver(sc_softc_t *sc, void (*saver)(sc_softc mark_all(sc->cur_scp); if (sc->delayed_next_scr) sc_switch_scr(sc, sc->delayed_next_scr - 1); - if (debugger == 0) + if (!kdb_active) wakeup(&scrn_blanked); } @@ -2474,7 +2472,7 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr) DPRINTF(5, ("error 2, requested vty isn't open!\n")); return EINVAL; } - if ((debugger > 0) && (SC_STAT(tp)->smode.mode == VT_PROCESS)) { + if (kdb_active && SC_STAT(tp)->smode.mode == VT_PROCESS) { splx(s); DPRINTF(5, ("error 3, requested vty is in the VT_PROCESS mode\n")); return EINVAL; @@ -2495,7 +2493,7 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr) * is supposed to be locked by splhigh(), but the debugger may * be invoked at splhigh(). */ - if (debugger == 0) + if (!kdb_active) wakeup(VTY_WCHAN(sc,next_scr)); splx(s); DPRINTF(5, ("switch done (new == old)\n")); @@ -2518,7 +2516,7 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr) s = spltty(); /* wake up processes waiting for this vty */ - if (debugger == 0) + if (!kdb_active) wakeup(VTY_WCHAN(sc,next_scr)); /* wait for the controlling process to acknowledge, if necessary */ From owner-svn-src-all@freebsd.org Tue Mar 13 09:38:54 2018 Return-Path: Delivered-To: svn-src-all@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 A77DFF32F6D; Tue, 13 Mar 2018 09:38:54 +0000 (UTC) (envelope-from royger@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 4C1F07324C; Tue, 13 Mar 2018 09:38:54 +0000 (UTC) (envelope-from royger@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 471F71837C; Tue, 13 Mar 2018 09:38:54 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2D9csv5099300; Tue, 13 Mar 2018 09:38:54 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D9csB4099299; Tue, 13 Mar 2018 09:38:54 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201803130938.w2D9csB4099299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Tue, 13 Mar 2018 09:38:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330834 - head/sys/dev/vt/hw/vga X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/dev/vt/hw/vga X-SVN-Commit-Revision: 330834 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 09:38:54 -0000 Author: royger Date: Tue Mar 13 09:38:53 2018 New Revision: 330834 URL: https://svnweb.freebsd.org/changeset/base/330834 Log: vt_vga: check if VGA is available from ACPI FADT table On x86 the IA-PC Boot Flags in the FADT can signal whether VGA is available or not. Sponsored by: Citrix systems R&D Reviewed by: marcel Differential revision: https://reviews.freebsd.org/D14397 Modified: head/sys/dev/vt/hw/vga/vt_vga.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Tue Mar 13 09:29:56 2018 (r330833) +++ head/sys/dev/vt/hw/vga/vt_vga.c Tue Mar 13 09:38:53 2018 (r330834) @@ -30,6 +30,8 @@ * SUCH DAMAGE. */ +#include "opt_acpi.h" + #include __FBSDID("$FreeBSD$"); @@ -46,6 +48,10 @@ __FBSDID("$FreeBSD$"); #include +#if ((defined(__amd64__) || defined(__i386__)) && defined(DEV_ACPI)) +#include +#endif + struct vga_softc { bus_space_tag_t vga_fb_tag; bus_space_handle_t vga_fb_handle; @@ -1196,11 +1202,39 @@ vga_initialize(struct vt_device *vd, int textmode) return (0); } +static bool +vga_acpi_disabled(void) +{ +#if ((defined(__amd64__) || defined(__i386__)) && defined(DEV_ACPI)) + ACPI_TABLE_FADT *fadt; + vm_paddr_t physaddr; + uint16_t flags; + + physaddr = acpi_find_table(ACPI_SIG_FADT); + if (physaddr == 0) + return (false); + + fadt = acpi_map_table(physaddr, ACPI_SIG_FADT); + if (fadt == NULL) { + printf("vt_vga: unable to map FADT ACPI table\n"); + return (false); + } + + flags = fadt->BootFlags; + acpi_unmap_table(fadt); + + if (flags & ACPI_FADT_NO_VGA) + return (true); +#endif + + return (false); +} + static int vga_probe(struct vt_device *vd) { - return (CN_INTERNAL); + return (vga_acpi_disabled() ? CN_DEAD : CN_INTERNAL); } static int From owner-svn-src-all@freebsd.org Tue Mar 13 09:42:34 2018 Return-Path: Delivered-To: svn-src-all@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 6531CF334FD; Tue, 13 Mar 2018 09:42:34 +0000 (UTC) (envelope-from royger@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 17673736DF; Tue, 13 Mar 2018 09:42:34 +0000 (UTC) (envelope-from royger@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 12383184FF; Tue, 13 Mar 2018 09:42:34 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2D9gXXY003965; Tue, 13 Mar 2018 09:42:33 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D9gXhn003963; Tue, 13 Mar 2018 09:42:33 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201803130942.w2D9gXhn003963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Tue, 13 Mar 2018 09:42:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330835 - in head: share/man/man4 sys/x86/isa X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: in head: share/man/man4 sys/x86/isa X-SVN-Commit-Revision: 330835 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 09:42:34 -0000 Author: royger Date: Tue Mar 13 09:42:33 2018 New Revision: 330835 URL: https://svnweb.freebsd.org/changeset/base/330835 Log: at_rtc: check in ACPI FADT boot flags if the RTC is present Or else disable the device. Note that the detection can be bypassed by setting the hw.atrtc.enable option in the loader configuration file. More information can be found on atrtc(4). Sponsored by: Citrix Systems R&D Reviewed by: ian Differential revision: https://reviews.freebsd.org/D14399 Modified: head/share/man/man4/atrtc.4 head/sys/x86/isa/atrtc.c Modified: head/share/man/man4/atrtc.4 ============================================================================== --- head/share/man/man4/atrtc.4 Tue Mar 13 09:38:53 2018 (r330834) +++ head/share/man/man4/atrtc.4 Tue Mar 13 09:42:33 2018 (r330835) @@ -33,13 +33,18 @@ .Sh SYNOPSIS This driver is a mandatory part of i386/amd64 kernels. .Pp -The following tunable is settable from the +The following tunables are settable from the .Xr loader 8 : .Bl -ohang .It Va hint.atrtc. Ns Ar X Ns Va .clock controls event timers functionality support. Setting to 0, disables it. Default value is 1. +.It Va hw.atrtc.enable +Forces enabling or disabling of the device(s). +Setting to 0 disables it, setting to 1 enables it, bypassing any platform +configuration hints. +Default value is -1 (autodetect). .El .Sh DESCRIPTION This driver uses RTC hardware to supply kernel with time-of-day clock Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Tue Mar 13 09:38:53 2018 (r330834) +++ head/sys/x86/isa/atrtc.c Tue Mar 13 09:42:33 2018 (r330835) @@ -32,6 +32,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_acpi.h" #include "opt_isa.h" #include @@ -55,6 +56,10 @@ __FBSDID("$FreeBSD$"); #include #include "clock_if.h" +#ifdef DEV_ACPI +#include +#endif + /* * atrtc_lock protects low-level access to individual hardware registers. * atrtc_time_lock protects the entire sequence of accessing multiple registers @@ -63,6 +68,10 @@ __FBSDID("$FreeBSD$"); static struct mtx atrtc_lock; MTX_SYSINIT(atrtc_lock_init, &atrtc_lock, "atrtc", MTX_SPIN); +/* Force RTC enabled/disabled. */ +static int atrtc_enabled = -1; +TUNABLE_INT("hw.atrtc.enabled", &atrtc_enabled); + struct mtx atrtc_time_lock; MTX_SYSINIT(atrtc_time_lock_init, &atrtc_time_lock, "atrtc_time", MTX_DEF); @@ -249,11 +258,43 @@ static struct isa_pnp_id atrtc_ids[] = { { 0 } }; +static bool +atrtc_acpi_disabled(void) +{ +#ifdef DEV_ACPI + ACPI_TABLE_FADT *fadt; + vm_paddr_t physaddr; + uint16_t flags; + + physaddr = acpi_find_table(ACPI_SIG_FADT); + if (physaddr == 0) + return (false); + + fadt = acpi_map_table(physaddr, ACPI_SIG_FADT); + if (fadt == NULL) { + printf("at_rtc: unable to map FADT ACPI table\n"); + return (false); + } + + flags = fadt->BootFlags; + acpi_unmap_table(fadt); + + if (flags & ACPI_FADT_NO_CMOS_RTC) + return (true); +#endif + + return (false); +} + static int atrtc_probe(device_t dev) { int result; - + + if ((atrtc_enabled == -1 && atrtc_acpi_disabled()) || + (atrtc_enabled == 0)) + return (ENXIO); + result = ISA_PNP_PROBE(device_get_parent(dev), dev, atrtc_ids); /* ENOENT means no PnP-ID, device is hinted. */ if (result == ENOENT) { From owner-svn-src-all@freebsd.org Tue Mar 13 09:46:09 2018 Return-Path: Delivered-To: svn-src-all@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 DDA06F33951; Tue, 13 Mar 2018 09:46:09 +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 8FEE373956; Tue, 13 Mar 2018 09:46:09 +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 8A60718518; Tue, 13 Mar 2018 09:46:09 +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 w2D9k9pe004154; Tue, 13 Mar 2018 09:46:09 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D9k9sN004152; Tue, 13 Mar 2018 09:46:09 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803130946.w2D9k9sN004152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 13 Mar 2018 09:46:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330836 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 09:46:10 -0000 Author: eadler Date: Tue Mar 13 09:46:09 2018 New Revision: 330836 URL: https://svnweb.freebsd.org/changeset/base/330836 Log: MFC r304165,r304166: Like scr_lock, the grab count needs to be per-physical-device to work. This bug corrupted the grab count on both vtys if the ungrabbed vty is different from the console, and failed to restore the keyboard state on the ungrabbed vty, but not restoring the latter usually left the keyboard mode part of it uncorrupted at 1 (K_XLATE), while after this fix the keyboard mode part is usually corrupted to 0 (K_RAW). While here, rename the grab count from 'grabbed' to grab_level. Modified: stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Tue Mar 13 09:42:33 2018 (r330835) +++ stable/11/sys/dev/syscons/syscons.c Tue Mar 13 09:46:09 2018 (r330836) @@ -1661,7 +1661,7 @@ sc_cngrab(struct consdev *cp) if (scp->sc->kbd == NULL) return; - if (scp->grabbed++ > 0) + if (scp->sc->grab_level++ > 0) return; /* @@ -1687,7 +1687,7 @@ sc_cnungrab(struct consdev *cp) if (scp->sc->kbd == NULL) return; - if (--scp->grabbed > 0) + if (--scp->sc->grab_level > 0) return; kbdd_poll(scp->sc->kbd, FALSE); Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Tue Mar 13 09:42:33 2018 (r330835) +++ stable/11/sys/dev/syscons/syscons.h Tue Mar 13 09:46:09 2018 (r330836) @@ -230,6 +230,7 @@ typedef struct sc_softc { char switch_in_progress; char write_in_progress; char blink_in_progress; + int grab_level; struct mtx scr_lock; /* mutex for sc_puts() */ struct mtx video_mtx; @@ -304,7 +305,6 @@ typedef struct scr_stat { void *ts; int status; /* status (bitfield) */ - int grabbed; int kbd_mode; /* keyboard I/O mode */ int kbd_prev_mode; /* keyboard I/O mode */ From owner-svn-src-all@freebsd.org Tue Mar 13 09:58:29 2018 Return-Path: Delivered-To: svn-src-all@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 D9835F34A25; Tue, 13 Mar 2018 09:58:29 +0000 (UTC) (envelope-from tsoome@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 8D50074201; Tue, 13 Mar 2018 09:58:29 +0000 (UTC) (envelope-from tsoome@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 83FC31869A; Tue, 13 Mar 2018 09:58:29 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2D9wTL9009066; Tue, 13 Mar 2018 09:58:29 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2D9wTor009065; Tue, 13 Mar 2018 09:58:29 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201803130958.w2D9wTor009065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 13 Mar 2018 09:58:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330837 - head/stand/i386/libi386 X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/i386/libi386 X-SVN-Commit-Revision: 330837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 09:58:30 -0000 Author: tsoome Date: Tue Mar 13 09:58:29 2018 New Revision: 330837 URL: https://svnweb.freebsd.org/changeset/base/330837 Log: biosdisk.c should not set d_opendata. Same as 330807, d_opendata is owned by open_disk and we should not set it. M stand/i386/libi386/biosdisk.c Modified: head/stand/i386/libi386/biosdisk.c Modified: head/stand/i386/libi386/biosdisk.c ============================================================================== --- head/stand/i386/libi386/biosdisk.c Tue Mar 13 09:46:09 2018 (r330836) +++ head/stand/i386/libi386/biosdisk.c Tue Mar 13 09:58:29 2018 (r330837) @@ -404,7 +404,6 @@ bd_open(struct open_file *f, ...) */ disk.dd.d_dev = dev->dd.d_dev; disk.dd.d_unit = dev->dd.d_unit; - disk.dd.d_opendata = NULL; disk.d_slice = -1; disk.d_partition = -1; disk.d_offset = 0; From owner-svn-src-all@freebsd.org Tue Mar 13 10:00:15 2018 Return-Path: Delivered-To: svn-src-all@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 DCE1EF34CA3; Tue, 13 Mar 2018 10:00:14 +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 901C3743C7; Tue, 13 Mar 2018 10:00:14 +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 70D70186A1; Tue, 13 Mar 2018 10:00:14 +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 w2DA0EQI009217; Tue, 13 Mar 2018 10:00:14 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DA0Ebi009216; Tue, 13 Mar 2018 10:00:14 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803131000.w2DA0Ebi009216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 13 Mar 2018 10:00:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330838 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 10:00:15 -0000 Author: eadler Date: Tue Mar 13 10:00:14 2018 New Revision: 330838 URL: https://svnweb.freebsd.org/changeset/base/330838 Log: MFC r304164: Disable some more unsafe things in (low level) console mode: - never call up to the tty layer to restart output for keyboard input in console mode. This was already disallowed in kdb mode. Other cases are rarely reached. - disable the reboot, halt and powerdown keys in console mode. The suspend, standby and panic keys are still allowed, and aren't even conditonal on excessive configuration options. Some of these actions are still available in ddb mode as ddb commands which are equally unsafe. Some are useful at input prompts and should be restored when the locking is fixed. - disallow bells in kdb mode (should be in console mode, but the flag for that is not available). Visual bell gives very alarming behaviour by trying to use callouts which don't work in kdb mode. Audio bell uses timeouts and hardware resources with mutexes that can deadlock in reasonable use of ddb. Screen switches in kdb mode are not very safe, but they are important functionality and there is a lot of code to make them sort of work. Modified: stable/11/sys/dev/syscons/syscons.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Tue Mar 13 09:58:29 2018 (r330837) +++ stable/11/sys/dev/syscons/syscons.c Tue Mar 13 10:00:14 2018 (r330838) @@ -3505,8 +3505,9 @@ next_code: scp->status |= CURSOR_ENABLED; sc_draw_cursor_image(scp); } + /* Only safe in Giant-locked context. */ tp = SC_DEV(sc, scp->index); - if (!kdb_active && tty_opened_ns(tp)) + if (!(flags & SCGETC_CN) && tty_opened_ns(tp)) sctty_outwakeup(tp); #endif } @@ -3557,21 +3558,21 @@ next_code: case RBT: #ifndef SC_DISABLE_REBOOT - if (enable_reboot) + if (enable_reboot && !(flags & SCGETC_CN)) shutdown_nice(0); #endif break; case HALT: #ifndef SC_DISABLE_REBOOT - if (enable_reboot) + if (enable_reboot && !(flags & SCGETC_CN)) shutdown_nice(RB_HALT); #endif break; case PDWN: #ifndef SC_DISABLE_REBOOT - if (enable_reboot) + if (enable_reboot && !(flags & SCGETC_CN)) shutdown_nice(RB_HALT|RB_POWEROFF); #endif break; @@ -3842,7 +3843,7 @@ sc_respond(scr_stat *scp, const u_char *p, int count, void sc_bell(scr_stat *scp, int pitch, int duration) { - if (cold || shutdown_in_progress || !enable_bell) + if (cold || kdb_active || shutdown_in_progress || !enable_bell) return; if (scp != scp->sc->cur_scp && (scp->sc->flags & SC_QUIET_BELL)) From owner-svn-src-all@freebsd.org Tue Mar 13 13:09:12 2018 Return-Path: Delivered-To: svn-src-all@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 14E3FF4C739; Tue, 13 Mar 2018 13:09:12 +0000 (UTC) (envelope-from emaste@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 B79547C120; Tue, 13 Mar 2018 13:09:11 +0000 (UTC) (envelope-from emaste@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 B24E31A3CA; Tue, 13 Mar 2018 13:09:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DD9BnF003965; Tue, 13 Mar 2018 13:09:11 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DD9BAD003960; Tue, 13 Mar 2018 13:09:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803131309.w2DD9BAD003960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 13 Mar 2018 13:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330842 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 13:09:12 -0000 Author: emaste Date: Tue Mar 13 13:09:10 2018 New Revision: 330842 URL: https://svnweb.freebsd.org/changeset/base/330842 Log: Use C99 designated initializers for struct execsw It it makes use slightly more clear and facilitates grepping. Modified: head/sys/kern/imgact_aout.c head/sys/kern/imgact_binmisc.c head/sys/kern/imgact_elf.c head/sys/kern/imgact_gzip.c head/sys/kern/imgact_shell.c Modified: head/sys/kern/imgact_aout.c ============================================================================== --- head/sys/kern/imgact_aout.c Tue Mar 13 12:38:26 2018 (r330841) +++ head/sys/kern/imgact_aout.c Tue Mar 13 13:09:10 2018 (r330842) @@ -337,5 +337,8 @@ exec_aout_imgact(struct image_params *imgp) /* * Tell kern_execve.c about it, with a little help from the linker. */ -static struct execsw aout_execsw = { exec_aout_imgact, "a.out" }; +static struct execsw aout_execsw = { + .ex_imgact = exec_aout_imgact, + .ex_name = "a.out" +}; EXEC_SET(aout, aout_execsw); Modified: head/sys/kern/imgact_binmisc.c ============================================================================== --- head/sys/kern/imgact_binmisc.c Tue Mar 13 12:38:26 2018 (r330841) +++ head/sys/kern/imgact_binmisc.c Tue Mar 13 13:09:10 2018 (r330842) @@ -753,5 +753,8 @@ SYSUNINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE /* * Tell kern_execve.c about it, with a little help from the linker. */ -static struct execsw imgact_binmisc_execsw = { imgact_binmisc_exec, KMOD_NAME }; +static struct execsw imgact_binmisc_execsw = { + .ex_imgact = imgact_binmisc_exec, + .ex_name = KMOD_NAME +}; EXEC_SET(imgact_binmisc, imgact_binmisc_execsw); Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Tue Mar 13 12:38:26 2018 (r330841) +++ head/sys/kern/imgact_elf.c Tue Mar 13 13:09:10 2018 (r330842) @@ -2426,8 +2426,8 @@ __elfN(check_note)(struct image_params *imgp, Elf_Bran * Tell kern_execve.c about it, with a little help from the linker. */ static struct execsw __elfN(execsw) = { - __CONCAT(exec_, __elfN(imgact)), - __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) + .ex_imgact = __CONCAT(exec_, __elfN(imgact)), + .ex_name = __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) }; EXEC_SET(__CONCAT(elf, __ELF_WORD_SIZE), __elfN(execsw)); Modified: head/sys/kern/imgact_gzip.c ============================================================================== --- head/sys/kern/imgact_gzip.c Tue Mar 13 12:38:26 2018 (r330841) +++ head/sys/kern/imgact_gzip.c Tue Mar 13 13:09:10 2018 (r330842) @@ -387,5 +387,8 @@ Flush(void *vp, u_char * ptr, u_long siz) /* * Tell kern_execve.c about it, with a little help from the linker. */ -static struct execsw gzip_execsw = {exec_gzip_imgact, "gzip"}; +static struct execsw gzip_execsw = { + .ex_imgact = exec_gzip_imgact, + .ex_name = "gzip" +}; EXEC_SET(execgzip, gzip_execsw); Modified: head/sys/kern/imgact_shell.c ============================================================================== --- head/sys/kern/imgact_shell.c Tue Mar 13 12:38:26 2018 (r330841) +++ head/sys/kern/imgact_shell.c Tue Mar 13 13:09:10 2018 (r330842) @@ -255,5 +255,8 @@ exec_shell_imgact(struct image_params *imgp) /* * Tell kern_execve.c about it, with a little help from the linker. */ -static struct execsw shell_execsw = { exec_shell_imgact, "#!" }; +static struct execsw shell_execsw = { + .ex_imgact = exec_shell_imgact, + .ex_name = "#!" +}; EXEC_SET(shell, shell_execsw); From owner-svn-src-all@freebsd.org Tue Mar 13 15:01:24 2018 Return-Path: Delivered-To: svn-src-all@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 65943F54095; Tue, 13 Mar 2018 15:01:24 +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 1410881758; Tue, 13 Mar 2018 15:01:24 +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 0F17B1B500; Tue, 13 Mar 2018 15:01:24 +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 w2DF1Not064111; Tue, 13 Mar 2018 15:01:23 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DF1NUN064110; Tue, 13 Mar 2018 15:01:23 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803131501.w2DF1NUN064110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 13 Mar 2018 15:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330843 - head/sys/dev/efidev X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/dev/efidev X-SVN-Commit-Revision: 330843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 15:01:24 -0000 Author: kevans Date: Tue Mar 13 15:01:23 2018 New Revision: 330843 URL: https://svnweb.freebsd.org/changeset/base/330843 Log: efirtc: Pass a dummy tmcap pointer to efi_get_time_locked As noted in the comment, UEFI spec claims the capabilities pointer is optional, but some implementations will choke and attempt to dereference it without checking. This specific problem was found on a Lenovo Thinkpad X220 that would panic in efirtc_identify. Modified: head/sys/dev/efidev/efirt.c Modified: head/sys/dev/efidev/efirt.c ============================================================================== --- head/sys/dev/efidev/efirt.c Tue Mar 13 13:09:10 2018 (r330842) +++ head/sys/dev/efidev/efirt.c Tue Mar 13 15:01:23 2018 (r330843) @@ -259,12 +259,19 @@ efi_get_time_locked(struct efi_tm *tm, struct efi_tmca int efi_get_time(struct efi_tm *tm) { + struct efi_tmcap dummy; int error; if (efi_runtime == NULL) return (ENXIO); EFI_TIME_LOCK() - error = efi_get_time_locked(tm, NULL); + /* + * UEFI spec states that the Capabilities argument to GetTime is + * optional, but some UEFI implementations choke when passed a NULL + * pointer. Pass a dummy efi_dmcap, even though we won't use it, + * to workaround such implementations. + */ + error = efi_get_time_locked(tm, &dummy); EFI_TIME_UNLOCK() return (error); } From owner-svn-src-all@freebsd.org Tue Mar 13 15:02:47 2018 Return-Path: Delivered-To: svn-src-all@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 6AA53F54233; Tue, 13 Mar 2018 15:02:47 +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 0BF0C819C5; Tue, 13 Mar 2018 15:02:47 +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 06F4D1B63E; Tue, 13 Mar 2018 15:02:47 +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 w2DF2knR064892; Tue, 13 Mar 2018 15:02:46 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DF2kRd064891; Tue, 13 Mar 2018 15:02:46 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803131502.w2DF2kRd064891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 13 Mar 2018 15:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330844 - head/sys/dev/efidev X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/dev/efidev X-SVN-Commit-Revision: 330844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 15:02:47 -0000 Author: kevans Date: Tue Mar 13 15:02:46 2018 New Revision: 330844 URL: https://svnweb.freebsd.org/changeset/base/330844 Log: Correct minor typo in comment, efi_dmcap -> efi_tmcap Modified: head/sys/dev/efidev/efirt.c Modified: head/sys/dev/efidev/efirt.c ============================================================================== --- head/sys/dev/efidev/efirt.c Tue Mar 13 15:01:23 2018 (r330843) +++ head/sys/dev/efidev/efirt.c Tue Mar 13 15:02:46 2018 (r330844) @@ -268,7 +268,7 @@ efi_get_time(struct efi_tm *tm) /* * UEFI spec states that the Capabilities argument to GetTime is * optional, but some UEFI implementations choke when passed a NULL - * pointer. Pass a dummy efi_dmcap, even though we won't use it, + * pointer. Pass a dummy efi_tmcap, even though we won't use it, * to workaround such implementations. */ error = efi_get_time_locked(tm, &dummy); From owner-svn-src-all@freebsd.org Tue Mar 13 15:04:00 2018 Return-Path: Delivered-To: svn-src-all@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 B8FC7F543CF; Tue, 13 Mar 2018 15:03:59 +0000 (UTC) (envelope-from nwhitehorn@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 67E1681BA1; Tue, 13 Mar 2018 15:03:59 +0000 (UTC) (envelope-from nwhitehorn@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 485881B647; Tue, 13 Mar 2018 15:03:59 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DF3xDu064991; Tue, 13 Mar 2018 15:03:59 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DF3wLJ064986; Tue, 13 Mar 2018 15:03:58 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201803131503.w2DF3wLJ064986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 13 Mar 2018 15:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330845 - in head/sys/powerpc: aim ofw powerpc X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: in head/sys/powerpc: aim ofw powerpc X-SVN-Commit-Revision: 330845 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 15:04:00 -0000 Author: nwhitehorn Date: Tue Mar 13 15:03:58 2018 New Revision: 330845 URL: https://svnweb.freebsd.org/changeset/base/330845 Log: Execute PowerPC64/AIM kernel from direct map region when possible. When the kernel can be in real mode in early boot, we can execute from high addresses aliased to the kernel's physical memory. If that high address has the first two bits set to 1 (0xc...), those addresses will automatically become part of the direct map. This reduces page table pressure from the kernel and it sets up the kernel to be used with radix translation, for which it has to be up here. This is accomplished by exploiting the fact that all PowerPC kernels are built as position-independent executables and relocate themselves on start. Before this patch, the kernel runs at 1:1 VA:PA, but that VA/PA is random and set by the bootloader. Very early, it processes its ELF relocations to operate wherever it happens to find itself. This patch uses that mechanism to re-enter and re-relocate the kernel a second time witha new base address set up in the early parts of powerpc_init(). Reviewed by: jhibbits Differential Revision: D14647 Modified: head/sys/powerpc/aim/aim_machdep.c head/sys/powerpc/aim/locore64.S head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/ofw/ofwcall64.S head/sys/powerpc/powerpc/machdep.c Modified: head/sys/powerpc/aim/aim_machdep.c ============================================================================== --- head/sys/powerpc/aim/aim_machdep.c Tue Mar 13 15:02:46 2018 (r330844) +++ head/sys/powerpc/aim/aim_machdep.c Tue Mar 13 15:03:58 2018 (r330845) @@ -160,15 +160,72 @@ extern void *dlmisstrap, *dlmisssize; extern void *dsmisstrap, *dsmisssize; extern void *ap_pcpu; +extern void __restartkernel(vm_offset_t, vm_offset_t, vm_offset_t, void *, uint32_t, register_t offset, register_t msr); +void aim_early_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, + void *mdp, uint32_t mdp_cookie); void aim_cpu_init(vm_offset_t toc); void +aim_early_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, void *mdp, + uint32_t mdp_cookie) +{ + register_t scratch; + + /* + * If running from an FDT, make sure we are in real mode to avoid + * tromping on firmware page tables. Everything in the kernel assumes + * 1:1 mappings out of firmware, so this won't break anything not + * already broken. This doesn't work if there is live OF, since OF + * may internally use non-1:1 mappings. + */ + if (ofentry == 0) + mtmsr(mfmsr() & ~(PSL_IR | PSL_DR)); + +#ifdef __powerpc64__ + /* + * If in real mode, relocate to high memory so that the kernel + * can execute from the direct map. + */ + if (!(mfmsr() & PSL_DR) && + (vm_offset_t)&aim_early_init < DMAP_BASE_ADDRESS) + __restartkernel(fdt, 0, ofentry, mdp, mdp_cookie, + DMAP_BASE_ADDRESS, mfmsr()); +#endif + + /* Various very early CPU fix ups */ + switch (mfpvr() >> 16) { + /* + * PowerPC 970 CPUs have a misfeature requested by Apple that + * makes them pretend they have a 32-byte cacheline. Turn this + * off before we measure the cacheline size. + */ + case IBM970: + case IBM970FX: + case IBM970MP: + case IBM970GX: + scratch = mfspr(SPR_HID5); + scratch &= ~HID5_970_DCBZ_SIZE_HI; + mtspr(SPR_HID5, scratch); + break; + #ifdef __powerpc64__ + case IBMPOWER7: + case IBMPOWER7PLUS: + case IBMPOWER8: + case IBMPOWER8E: + /* XXX: get from ibm,slb-size in device tree */ + n_slbs = 32; + break; + #endif + } +} + +void aim_cpu_init(vm_offset_t toc) { size_t trap_offset, trapsize; vm_offset_t trap; - register_t msr, scratch; + register_t msr; uint8_t *cache_check; int cacheline_warn; #ifndef __powerpc64__ @@ -198,32 +255,6 @@ aim_cpu_init(vm_offset_t toc) * Bits 1-4, 10-15 (ppc32), 33-36, 42-47 (ppc64) */ psl_userstatic &= ~0x783f0000UL; - - /* Various very early CPU fix ups */ - switch (mfpvr() >> 16) { - /* - * PowerPC 970 CPUs have a misfeature requested by Apple that - * makes them pretend they have a 32-byte cacheline. Turn this - * off before we measure the cacheline size. - */ - case IBM970: - case IBM970FX: - case IBM970MP: - case IBM970GX: - scratch = mfspr(SPR_HID5); - scratch &= ~HID5_970_DCBZ_SIZE_HI; - mtspr(SPR_HID5, scratch); - break; - #ifdef __powerpc64__ - case IBMPOWER7: - case IBMPOWER7PLUS: - case IBMPOWER8: - case IBMPOWER8E: - /* XXX: get from ibm,slb-size in device tree */ - n_slbs = 32; - break; - #endif - } /* * Initialize the interrupt tables and figure out our cache line Modified: head/sys/powerpc/aim/locore64.S ============================================================================== --- head/sys/powerpc/aim/locore64.S Tue Mar 13 15:02:46 2018 (r330844) +++ head/sys/powerpc/aim/locore64.S Tue Mar 13 15:03:58 2018 (r330845) @@ -105,7 +105,6 @@ ap_kexec_start: /* At 0x60 past start, copied to 0x60 mtsrr1 %r1 ba EXC_RST - /* * Now start the real text section */ @@ -149,9 +148,12 @@ ASENTRY_NOPROF(__start) subf %r31,%r31,%r2 /* Subtract from real TOC base to get base */ /* Set up the stack pointer */ - ld %r1,TOC_REF(tmpstk)(%r2) - addi %r1,%r1,TMPSTKSZ-96 - add %r1,%r1,%r31 + bl 1f + .llong tmpstk + TMPSTKSZ - 96 - . +1: mflr %r30 + ld %r1,0(%r30) + add %r1,%r1,%r30 + nop /* Relocate kernel */ std %r3,48(%r1) @@ -188,5 +190,21 @@ ASENTRY_NOPROF(__start) /* Unreachable */ b . + +ASENTRY_NOPROF(__restartkernel) + /* + * r3-r7: arguments to go to __start + * r8: offset from current kernel address to apply + * r9: MSR to set when (atomically) jumping to __start + r8 + */ + mtsrr1 %r9 + bl 1f +1: mflr %r25 + add %r25,%r8,%r25 + addi %r25,%r25,2f-1b + mtsrr0 %r25 + rfid +2: bl __start + nop #include Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Tue Mar 13 15:02:46 2018 (r330844) +++ head/sys/powerpc/aim/mmu_oea64.c Tue Mar 13 15:03:58 2018 (r330845) @@ -701,6 +701,7 @@ moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernels { int i, j; vm_size_t physsz, hwphyssz; + vm_paddr_t kernelphysstart, kernelphysend; #ifndef __powerpc64__ /* We don't have a direct map since there is no BAT */ @@ -727,6 +728,9 @@ moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernels __syncicache((void *)EXC_ISE, 0x80); #endif + kernelphysstart = kernelstart & ~DMAP_BASE_ADDRESS; + kernelphysend = kernelend & ~DMAP_BASE_ADDRESS; + /* Get physical memory regions from firmware */ mem_regions(&pregions, &pregions_sz, ®ions, ®ions_sz); CTR0(KTR_PMAP, "moea64_bootstrap: physical memory"); @@ -764,29 +768,30 @@ moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernels if (phys_avail[j] < EXC_LAST) phys_avail[j] += EXC_LAST; - if (kernelstart >= phys_avail[j] && - kernelstart < phys_avail[j+1]) { - if (kernelend < phys_avail[j+1]) { + if (kernelphysstart >= phys_avail[j] && + kernelphysstart < phys_avail[j+1]) { + if (kernelphysend < phys_avail[j+1]) { phys_avail[2*phys_avail_count] = - (kernelend & ~PAGE_MASK) + PAGE_SIZE; + (kernelphysend & ~PAGE_MASK) + PAGE_SIZE; phys_avail[2*phys_avail_count + 1] = phys_avail[j+1]; phys_avail_count++; } - phys_avail[j+1] = kernelstart & ~PAGE_MASK; + phys_avail[j+1] = kernelphysstart & ~PAGE_MASK; } - if (kernelend >= phys_avail[j] && - kernelend < phys_avail[j+1]) { - if (kernelstart > phys_avail[j]) { + if (kernelphysend >= phys_avail[j] && + kernelphysend < phys_avail[j+1]) { + if (kernelphysstart > phys_avail[j]) { phys_avail[2*phys_avail_count] = phys_avail[j]; phys_avail[2*phys_avail_count + 1] = - kernelstart & ~PAGE_MASK; + kernelphysstart & ~PAGE_MASK; phys_avail_count++; } - phys_avail[j] = (kernelend & ~PAGE_MASK) + PAGE_SIZE; + phys_avail[j] = (kernelphysend & ~PAGE_MASK) + + PAGE_SIZE; } } Modified: head/sys/powerpc/ofw/ofwcall64.S ============================================================================== --- head/sys/powerpc/ofw/ofwcall64.S Tue Mar 13 15:02:46 2018 (r330844) +++ head/sys/powerpc/ofw/ofwcall64.S Tue Mar 13 15:03:58 2018 (r330845) @@ -42,7 +42,7 @@ ofwstk: .space OFWSTKSZ rtas_regsave: - .space 24 /* 3 * sizeof(register_t) */ + .space 32 /* 4 * sizeof(register_t) */ GLOBAL(ofmsr) .llong 0, 0, 0, 0, 0 /* msr/sprg0-3 used in Open Firmware */ GLOBAL(rtasmsr) @@ -64,8 +64,8 @@ TOC_ENTRY(rtas_regsave) */ ASENTRY_NOPROF(ofwcall) - mflr %r0 - std %r0,16(%r1) + mflr %r8 + std %r8,16(%r1) stdu %r1,-208(%r1) /* @@ -106,7 +106,7 @@ ASENTRY_NOPROF(ofwcall) /* Get OF stack pointer */ ld %r7,TOC_REF(ofwstk)(%r2) - addi %r7,%r7,OFWSTKSZ-32 + addi %r7,%r7,OFWSTKSZ-40 /* * Set the MSR to the OF value. This has the side effect of disabling @@ -129,6 +129,8 @@ ASENTRY_NOPROF(ofwcall) std %r5,8(%r1) /* Save real stack pointer */ std %r2,16(%r1) /* Save old TOC */ std %r6,24(%r1) /* Save old MSR */ + std %r8,32(%r1) /* Save high 32-bits of the kernel's PC */ + li %r5,0 stw %r5,4(%r1) stw %r5,0(%r1) @@ -137,15 +139,23 @@ ASENTRY_NOPROF(ofwcall) mtctr %r4 bctrl - /* Reload stack pointer and MSR from the OFW stack */ + /* Reload stack pointer, MSR, and reference PC from the OFW stack */ + ld %r7,32(%r1) ld %r6,24(%r1) ld %r2,16(%r1) ld %r1,8(%r1) - /* Now set the real MSR */ - mtmsrd %r6 - isync + /* Get back to the MSR/PC we want, using the cached high bits of PC */ + mtsrr1 %r6 + clrrdi %r7,%r7,32 + bl 1f +1: mflr %r8 + or %r8,%r8,%r7 + addi %r8,%r8,2f-1b + mtsrr0 %r8 + rfid /* Turn on MMU, exceptions, and 64-bit mode */ +2: /* Sign-extend the return value from OF */ extsw %r3,%r3 @@ -186,8 +196,8 @@ ASENTRY_NOPROF(ofwcall) */ ASENTRY_NOPROF(rtascall) - mflr %r0 - std %r0,16(%r1) + mflr %r9 + std %r9,16(%r1) stdu %r1,-208(%r1) /* @@ -248,24 +258,41 @@ ASENTRY_NOPROF(rtascall) std %r7,0(%r1) /* Save 64-bit stack pointer */ std %r2,8(%r1) /* Save TOC */ std %r6,16(%r1) /* Save MSR */ + std %r9,24(%r1) /* Save reference PC for high 32 bits */ /* Finally, branch to RTAS */ mtctr %r5 bctrl /* - * Reload stack pointer and MSR from the reg save area in r1. We are - * running in 32-bit mode at this point, so it doesn't matter if r1 + * Reload stack pointer, MSR, reg PC from the reg save area in r1. We + * are running in 32-bit mode at this point, so it doesn't matter if r1 * has become sign-extended. */ + ld %r7,24(%r1) ld %r6,16(%r1) ld %r2,8(%r1) ld %r1,0(%r1) - /* Now set the real MSR */ - mtmsrd %r6 - isync + /* + * Get back to the right PC. We need to atomically re-enable + * exceptions, 64-bit mode, and the MMU. One thing that has likely + * happened is that, if we were running in the high-memory direct + * map, we no longer are as a result of LR truncation in RTAS. + * Fix this by copying the high-order bits of the LR at function + * entry onto the current PC and then jumping there while flipping + * all the MSR bits. + */ + mtsrr1 %r6 + clrrdi %r7,%r7,32 + bl 1f +1: mflr %r8 + or %r8,%r8,%r7 + addi %r8,%r8,2f-1b + mtsrr0 %r8 + rfid /* Turn on MMU, exceptions, and 64-bit mode */ +2: /* Sign-extend the return value from RTAS */ extsw %r3,%r3 Modified: head/sys/powerpc/powerpc/machdep.c ============================================================================== --- head/sys/powerpc/powerpc/machdep.c Tue Mar 13 15:02:46 2018 (r330844) +++ head/sys/powerpc/powerpc/machdep.c Tue Mar 13 15:03:58 2018 (r330845) @@ -237,6 +237,8 @@ extern unsigned char __sbss_start[]; extern unsigned char __sbss_end[]; extern unsigned char _end[]; +void aim_early_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, + void *mdp, uint32_t mdp_cookie); void aim_cpu_init(vm_offset_t toc); void booke_cpu_init(void); @@ -247,7 +249,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offs struct pcpu *pc; struct cpuref bsp; vm_offset_t startkernel, endkernel; - void *kmdp; char *env; bool ofw_bootargs = false; #ifdef DDB @@ -255,8 +256,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offs vm_offset_t ksym_end; #endif - kmdp = NULL; - /* First guess at start/end kernel positions */ startkernel = __startkernel; endkernel = __endkernel; @@ -278,15 +277,7 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offs #endif #ifdef AIM - /* - * If running from an FDT, make sure we are in real mode to avoid - * tromping on firmware page tables. Everything in the kernel assumes - * 1:1 mappings out of firmware, so this won't break anything not - * already broken. This doesn't work if there is live OF, since OF - * may internally use non-1:1 mappings. - */ - if (ofentry == 0) - mtmsr(mfmsr() & ~(PSL_IR | PSL_DR)); + aim_early_init(fdt, toc, ofentry, mdp, mdp_cookie); #endif /* @@ -295,14 +286,33 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offs * boothowto. */ if (mdp != NULL) { + void *kmdp = NULL; + char *envp = NULL; + uintptr_t md_offset = 0; + vm_paddr_t kernelendphys; + +#ifdef AIM + if ((uintptr_t)&powerpc_init > DMAP_BASE_ADDRESS) + md_offset = DMAP_BASE_ADDRESS; +#endif + preload_metadata = mdp; + if (md_offset > 0) { + preload_metadata += md_offset; + preload_bootstrap_relocate(md_offset); + } kmdp = preload_search_by_type("elf kernel"); if (kmdp != NULL) { boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int); - init_static_kenv(MD_FETCH(kmdp, MODINFOMD_ENVP, char *), - 0); - endkernel = ulmax(endkernel, MD_FETCH(kmdp, - MODINFOMD_KERNEND, vm_offset_t)); + envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *); + if (envp != NULL) + envp += md_offset; + init_static_kenv(envp, 0); + kernelendphys = MD_FETCH(kmdp, MODINFOMD_KERNEND, + vm_offset_t); + if (kernelendphys != 0) + kernelendphys += md_offset; + endkernel = ulmax(endkernel, kernelendphys); #ifdef DDB ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t); ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); From owner-svn-src-all@freebsd.org Tue Mar 13 15:29:14 2018 Return-Path: Delivered-To: svn-src-all@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 DB147F55DCA; Tue, 13 Mar 2018 15:29:13 +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 90631830E5; Tue, 13 Mar 2018 15:29:13 +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 869221B994; Tue, 13 Mar 2018 15:29:13 +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 w2DFTDLh075107; Tue, 13 Mar 2018 15:29:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DFTD7b075106; Tue, 13 Mar 2018 15:29:13 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201803131529.w2DFTD7b075106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 13 Mar 2018 15:29:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330846 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 330846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 15:29:14 -0000 Author: mav Date: Tue Mar 13 15:29:13 2018 New Revision: 330846 URL: https://svnweb.freebsd.org/changeset/base/330846 Log: Add some argument checks to be more user-friendly. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sbin/nvmecontrol/format.c Modified: head/sbin/nvmecontrol/format.c ============================================================================== --- head/sbin/nvmecontrol/format.c Tue Mar 13 15:03:58 2018 (r330845) +++ head/sbin/nvmecontrol/format.c Tue Mar 13 15:29:13 2018 (r330846) @@ -81,9 +81,13 @@ format(int argc, char *argv[]) pil = strtol(optarg, NULL, 0); break; case 'E': + if (ses == 2) + errx(1, "-E and -C are mutually exclusive"); ses = 1; break; case 'C': + if (ses == 1) + errx(1, "-E and -C are mutually exclusive"); ses = 2; break; default: @@ -109,19 +113,7 @@ format(int argc, char *argv[]) */ if (strstr(target, NVME_NS_PREFIX) == NULL) { nsid = NVME_GLOBAL_NAMESPACE_TAG; - - /* We have no previous parameters, so use defaults. */ - if (lbaf < 0) - lbaf = 0; - if (mset < 0) - mset = 0; - if (pi < 0) - pi = 0; - if (pil < 0) - pil = 0; } else { - parse_ns_str(target, path, &nsid); - /* * We send FORMAT commands to the controller, not the namespace, * since it is an admin cmd. The namespace ID will be specified @@ -129,25 +121,34 @@ format(int argc, char *argv[]) * string to get the controller substring and namespace ID. */ close(fd); + parse_ns_str(target, path, &nsid); open_dev(path, &fd, 1, 1); + } - /* Check that controller can execute this command. */ - read_controller_data(fd, &cd); - if (((cd.fna >> NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT) - & NVME_CTRLR_DATA_FNA_FORMAT_ALL_MASK) && ses == 0) { - fprintf(stderr, "H/w doesn't support per-NS format\n"); - exit(1); - } else if (((cd.fna >> NVME_CTRLR_DATA_FNA_ERASE_ALL_SHIFT) - & NVME_CTRLR_DATA_FNA_ERASE_ALL_MASK) && ses != 0) { - fprintf(stderr, "H/w doesn't support per-NS erase\n"); - exit(1); - } + /* Check that controller can execute this command. */ + read_controller_data(fd, &cd); + if (((cd.oacs >> NVME_CTRLR_DATA_OACS_FORMAT_SHIFT) & + NVME_CTRLR_DATA_OACS_FORMAT_MASK) == 0) + errx(1, "controller does not support format"); + if (((cd.fna >> NVME_CTRLR_DATA_FNA_CRYPTO_ERASE_SHIFT) & + NVME_CTRLR_DATA_FNA_CRYPTO_ERASE_MASK) == 0 && ses == 2) + errx(1, "controller does not support cryptographic erase"); + if (nsid != NVME_GLOBAL_NAMESPACE_TAG) { + if (((cd.fna >> NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT) & + NVME_CTRLR_DATA_FNA_FORMAT_ALL_MASK) && ses == 0) + errx(1, "controller does not support per-NS format"); + if (((cd.fna >> NVME_CTRLR_DATA_FNA_ERASE_ALL_SHIFT) & + NVME_CTRLR_DATA_FNA_ERASE_ALL_MASK) && ses != 0) + errx(1, "controller does not support per-NS erase"); + /* Try to keep previous namespace parameters. */ read_namespace_data(fd, nsid, &nsd); if (lbaf < 0) lbaf = (nsd.flbas >> NVME_NS_DATA_FLBAS_FORMAT_SHIFT) & NVME_NS_DATA_FLBAS_FORMAT_MASK; + if (lbaf > nsd.nlbaf) + errx(1, "LBA format is out of range"); if (mset < 0) mset = (nsd.flbas >> NVME_NS_DATA_FLBAS_EXTENDED_SHIFT) & NVME_NS_DATA_FLBAS_EXTENDED_MASK; @@ -157,6 +158,17 @@ format(int argc, char *argv[]) if (pil < 0) pil = (nsd.dps >> NVME_NS_DATA_DPS_PIT_SHIFT) & NVME_NS_DATA_DPS_PIT_MASK; + } else { + + /* We have no previous parameters, so default to zeroes. */ + if (lbaf < 0) + lbaf = 0; + if (mset < 0) + mset = 0; + if (pi < 0) + pi = 0; + if (pil < 0) + pil = 0; } memset(&pt, 0, sizeof(pt)); From owner-svn-src-all@freebsd.org Tue Mar 13 16:07:38 2018 Return-Path: Delivered-To: svn-src-all@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 D1AD2F2BFFC; Tue, 13 Mar 2018 16:07:38 +0000 (UTC) (envelope-from hselasky@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 86FF884DBA; Tue, 13 Mar 2018 16:07:38 +0000 (UTC) (envelope-from hselasky@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 7D8491BFAE; Tue, 13 Mar 2018 16:07:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DG7cV2094653; Tue, 13 Mar 2018 16:07:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DG7cgl094652; Tue, 13 Mar 2018 16:07:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131607.w2DG7cgl094652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330847 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:07:39 -0000 Author: hselasky Date: Tue Mar 13 16:07:38 2018 New Revision: 330847 URL: https://svnweb.freebsd.org/changeset/base/330847 Log: MFC r330272: Implement wait_on_bit() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Tue Mar 13 15:29:13 2018 (r330846) +++ stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Tue Mar 13 16:07:38 2018 (r330847) @@ -249,6 +249,8 @@ void linux_wake_up_atomic_t(atomic_t *); int linux_wait_on_atomic_t(atomic_t *, unsigned int); #define wake_up_bit(word, bit) linux_wake_up_bit(word, bit) +#define wait_on_bit(word, bit, state) \ + linux_wait_on_bit_timeout(word, bit, state, MAX_SCHEDULE_TIMEOUT) #define wait_on_bit_timeout(word, bit, state, timeout) \ linux_wait_on_bit_timeout(word, bit, state, timeout) #define wake_up_atomic_t(a) linux_wake_up_atomic_t(a) From owner-svn-src-all@freebsd.org Tue Mar 13 16:09:05 2018 Return-Path: Delivered-To: svn-src-all@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 7AE8BF2C309; Tue, 13 Mar 2018 16:09:05 +0000 (UTC) (envelope-from hselasky@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 1EDE984FE9; Tue, 13 Mar 2018 16:09:05 +0000 (UTC) (envelope-from hselasky@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 19D7B1BFB0; Tue, 13 Mar 2018 16:09:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DG94Ef094757; Tue, 13 Mar 2018 16:09:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DG94bF094756; Tue, 13 Mar 2018 16:09:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131609.w2DG94bF094756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330848 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:09:05 -0000 Author: hselasky Date: Tue Mar 13 16:09:04 2018 New Revision: 330848 URL: https://svnweb.freebsd.org/changeset/base/330848 Log: MFC r330273: Implement ktime_get_raw() function in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Tue Mar 13 16:07:38 2018 (r330847) +++ stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Tue Mar 13 16:09:04 2018 (r330848) @@ -189,6 +189,15 @@ ktime_get_real_seconds(void) return (ts.tv_sec); } +static inline ktime_t +ktime_get_raw(void) +{ + struct timespec ts; + + nanotime(&ts); + return (timespec_to_ktime(ts)); +} + static inline u64 ktime_get_raw_ns(void) { From owner-svn-src-all@freebsd.org Tue Mar 13 16:10:12 2018 Return-Path: Delivered-To: svn-src-all@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 F3E62F2C4D1; Tue, 13 Mar 2018 16:10:11 +0000 (UTC) (envelope-from hselasky@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 A6F7185182; Tue, 13 Mar 2018 16:10:11 +0000 (UTC) (envelope-from hselasky@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 A1DFC1BFB4; Tue, 13 Mar 2018 16:10:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGABhC094884; Tue, 13 Mar 2018 16:10:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGABPP094883; Tue, 13 Mar 2018 16:10:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131610.w2DGABPP094883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330849 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:10:12 -0000 Author: hselasky Date: Tue Mar 13 16:10:11 2018 New Revision: 330849 URL: https://svnweb.freebsd.org/changeset/base/330849 Log: MFC r330274: Implement more lockdep stubs in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/lockdep.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/lockdep.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/lockdep.h Tue Mar 13 16:09:04 2018 (r330848) +++ stable/11/sys/compat/linuxkpi/common/include/linux/lockdep.h Tue Mar 13 16:10:11 2018 (r330849) @@ -36,8 +36,9 @@ struct lock_class_key { }; #define lockdep_set_class(lock, key) - #define lockdep_set_class_and_name(lock, key, name) +#define lockdep_set_current_reclaim_state(g) do { } while (0) +#define lockdep_clear_current_reclaim_state() do { } while (0) #define lockdep_assert_held(m) \ sx_assert(&(m)->sx, SA_XLOCKED) From owner-svn-src-all@freebsd.org Tue Mar 13 16:14:54 2018 Return-Path: Delivered-To: svn-src-all@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 DBCCCF2CB7B; Tue, 13 Mar 2018 16:14:53 +0000 (UTC) (envelope-from hselasky@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 89792857E5; Tue, 13 Mar 2018 16:14:53 +0000 (UTC) (envelope-from hselasky@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 844FB1C12C; Tue, 13 Mar 2018 16:14:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGErsA099866; Tue, 13 Mar 2018 16:14:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGErSi099861; Tue, 13 Mar 2018 16:14:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131614.w2DGErSi099861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:14:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330850 - in stable/11: share/man/man9 sys/kern sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11: share/man/man9 sys/kern sys/sys X-SVN-Commit-Revision: 330850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:14:54 -0000 Author: hselasky Date: Tue Mar 13 16:14:52 2018 New Revision: 330850 URL: https://svnweb.freebsd.org/changeset/base/330850 Log: MFC r330349 and r330362: Allow pause_sbt() to catch signals during sleep by passing C_CATCH flag. Define pause_sig() function macro helper similarly to other kernel functions which catch signals. Update outdated function description. Document pause_sig(9) and update prototypes for existing pause(9) and pause_sbt(9) functions. Discussed with: kib@ Suggested by: cem@ Sponsored by: Mellanox Technologies Modified: stable/11/share/man/man9/Makefile stable/11/share/man/man9/sleep.9 stable/11/sys/kern/kern_synch.c stable/11/sys/sys/callout.h stable/11/sys/sys/systm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/Makefile ============================================================================== --- stable/11/share/man/man9/Makefile Tue Mar 13 16:10:11 2018 (r330849) +++ stable/11/share/man/man9/Makefile Tue Mar 13 16:14:52 2018 (r330850) @@ -1597,6 +1597,7 @@ MLINKS+=sleep.9 msleep.9 \ sleep.9 msleep_spin.9 \ sleep.9 msleep_spin_sbt.9 \ sleep.9 pause.9 \ + sleep.9 pause_sig.9 \ sleep.9 pause_sbt.9 \ sleep.9 tsleep.9 \ sleep.9 tsleep_sbt.9 \ Modified: stable/11/share/man/man9/sleep.9 ============================================================================== --- stable/11/share/man/man9/sleep.9 Tue Mar 13 16:10:11 2018 (r330849) +++ stable/11/share/man/man9/sleep.9 Tue Mar 13 16:14:52 2018 (r330850) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 24, 2015 +.Dd March 4, 2018 .Dt SLEEP 9 .Os .Sh NAME @@ -34,6 +34,7 @@ .Nm msleep_spin , .Nm msleep_spin_sbt , .Nm pause , +.Nm pause_sig , .Nm pause_sbt , .Nm tsleep , .Nm tsleep_sbt , @@ -53,9 +54,11 @@ .Ft int .Fn msleep_spin_sbt "void *chan" "struct mtx *mtx" "const char *wmesg" \ "sbintime_t sbt" "sbintime_t pr" "int flags" -.Ft void +.Ft int .Fn pause "const char *wmesg" "int timo" -.Ft void +.Ft int +.Fn pause_sig "const char *wmesg" "int timo" +.Ft int .Fn pause_sbt "const char *wmesg" "sbintime_t sbt" "sbintime_t pr" \ "int flags" .Ft int @@ -73,6 +76,8 @@ The functions .Fn msleep , .Fn msleep_spin , .Fn pause , +.Fn pause_sig , +.Fn pause_sbt , .Fn wakeup , and .Fn wakeup_one @@ -82,8 +87,10 @@ external event, it is put to sleep by .Fn tsleep , .Fn msleep , .Fn msleep_spin , +.Fn pause , +.Fn pause_sig , or -.Fn pause . +.Fn pause_sbt . Threads may also wait using one of the locking primitive sleep routines .Xr mtx_sleep 9 , .Xr rw_sleep 9 , @@ -248,6 +255,11 @@ The thread can not be awakened early by signals or cal .Fn wakeup or .Fn wakeup_one . +The +.Fn pause_sig +function is a variant of +.Fn pause +which can be awakened early by signals. .Pp The .Fn wakeup_one @@ -385,6 +397,10 @@ The .Fn pause function appeared in .Fx 7.0 . +The +.Fn pause_sig +function appeared in +.Fx 12.0 . .Sh AUTHORS .An -nosplit This manual page was written by Modified: stable/11/sys/kern/kern_synch.c ============================================================================== --- stable/11/sys/kern/kern_synch.c Tue Mar 13 16:10:11 2018 (r330849) +++ stable/11/sys/kern/kern_synch.c Tue Mar 13 16:14:52 2018 (r330850) @@ -299,16 +299,16 @@ msleep_spin_sbt(void *ident, struct mtx *mtx, const ch } /* - * pause() delays the calling thread by the given number of system ticks. - * During cold bootup, pause() uses the DELAY() function instead of - * the tsleep() function to do the waiting. The "timo" argument must be - * greater than or equal to zero. A "timo" value of zero is equivalent - * to a "timo" value of one. + * pause_sbt() delays the calling thread by the given signed binary + * time. During cold bootup, pause_sbt() uses the DELAY() function + * instead of the _sleep() function to do the waiting. The "sbt" + * argument must be greater than or equal to zero. A "sbt" value of + * zero is equivalent to a "sbt" value of one tick. */ int pause_sbt(const char *wmesg, sbintime_t sbt, sbintime_t pr, int flags) { - KASSERT(sbt >= 0, ("pause: timeout must be >= 0")); + KASSERT(sbt >= 0, ("pause_sbt: timeout must be >= 0")); /* silently convert invalid timeouts */ if (sbt == 0) @@ -330,7 +330,8 @@ pause_sbt(const char *wmesg, sbintime_t sbt, sbintime_ DELAY(sbt); return (0); } - return (_sleep(&pause_wchan[curcpu], NULL, 0, wmesg, sbt, pr, flags)); + return (_sleep(&pause_wchan[curcpu], NULL, + (flags & C_CATCH) ? PCATCH : 0, wmesg, sbt, pr, flags)); } /* Modified: stable/11/sys/sys/callout.h ============================================================================== --- stable/11/sys/sys/callout.h Tue Mar 13 16:10:11 2018 (r330849) +++ stable/11/sys/sys/callout.h Tue Mar 13 16:14:52 2018 (r330850) @@ -58,6 +58,7 @@ #define C_HARDCLOCK 0x0100 /* align to hardclock() calls */ #define C_ABSOLUTE 0x0200 /* event time is absolute. */ #define C_PRECALC 0x0400 /* event time is pre-calculated. */ +#define C_CATCH 0x0800 /* catch signals, used by pause_sbt(9) */ struct callout_handle { struct callout *callout; Modified: stable/11/sys/sys/systm.h ============================================================================== --- stable/11/sys/sys/systm.h Tue Mar 13 16:10:11 2018 (r330849) +++ stable/11/sys/sys/systm.h Tue Mar 13 16:14:52 2018 (r330850) @@ -407,6 +407,8 @@ int pause_sbt(const char *wmesg, sbintime_t sbt, sbint int flags); #define pause(wmesg, timo) \ pause_sbt((wmesg), tick_sbt * (timo), 0, C_HARDCLOCK) +#define pause_sig(wmesg, timo) \ + pause_sbt((wmesg), tick_sbt * (timo), 0, C_HARDCLOCK | C_CATCH) #define tsleep(chan, pri, wmesg, timo) \ _sleep((chan), NULL, (pri), (wmesg), tick_sbt * (timo), \ 0, C_HARDCLOCK) From owner-svn-src-all@freebsd.org Tue Mar 13 16:17:37 2018 Return-Path: Delivered-To: svn-src-all@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 8C8BAF2CF86; Tue, 13 Mar 2018 16:17:37 +0000 (UTC) (envelope-from hselasky@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 3F1B185A53; Tue, 13 Mar 2018 16:17:37 +0000 (UTC) (envelope-from hselasky@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 1BC4B1C13B; Tue, 13 Mar 2018 16:17:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGHaUc000122; Tue, 13 Mar 2018 16:17:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGHafB000120; Tue, 13 Mar 2018 16:17:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131617.w2DGHafB000120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330851 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 330851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:17:37 -0000 Author: hselasky Date: Tue Mar 13 16:17:36 2018 New Revision: 330851 URL: https://svnweb.freebsd.org/changeset/base/330851 Log: MFC r330352 and r330353: Implement msleep_interruptible() in the LinuxKPI. While at it use pause_sbt() instead of pause() in the msleep() function to avoid rounding errors when converting delay values forth and back. Add a guard for a delay value of zero milliseconds which is undefined. Suggested by: ian@ Requested by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/delay.h stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/delay.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/delay.h Tue Mar 13 16:14:52 2018 (r330850) +++ stable/11/sys/compat/linuxkpi/common/include/linux/delay.h Tue Mar 13 16:17:36 2018 (r330851) @@ -36,14 +36,20 @@ #include static inline void -linux_msleep(int ms) +linux_msleep(unsigned int ms) { - pause("lnxsleep", msecs_to_jiffies(ms)); + /* guard against invalid values */ + if (ms == 0) + ms = 1; + pause_sbt("lnxsleep", mstosbt(ms), 0, C_HARDCLOCK); } #undef msleep -#define msleep linux_msleep +#define msleep(ms) linux_msleep(ms) +#undef msleep_interruptible +#define msleep_interruptible(ms) linux_msleep_interruptible(ms) + #define udelay(t) DELAY(t) static inline void @@ -64,5 +70,7 @@ usleep_range(unsigned long min, unsigned long max) { DELAY(min); } + +extern unsigned int linux_msleep_interruptible(unsigned int ms); #endif /* _LINUX_DELAY_H_ */ Modified: stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Tue Mar 13 16:14:52 2018 (r330850) +++ stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Tue Mar 13 16:17:36 2018 (r330851) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -72,6 +73,25 @@ linux_add_to_sleepqueue(void *wchan, struct task_struc ret = -ERESTARTSYS; } return (ret); +} + +unsigned int +linux_msleep_interruptible(unsigned int ms) +{ + int ret; + + /* guard against invalid values */ + if (ms == 0) + ms = 1; + ret = -pause_sbt("lnxsleep", mstosbt(ms), 0, C_HARDCLOCK | C_CATCH); + + switch (ret) { + case -EWOULDBLOCK: + return (0); + default: + linux_schedule_save_interrupt_value(current, ret); + return (ms); + } } static int From owner-svn-src-all@freebsd.org Tue Mar 13 16:18:39 2018 Return-Path: Delivered-To: svn-src-all@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 E614FF2D155; Tue, 13 Mar 2018 16:18:38 +0000 (UTC) (envelope-from hselasky@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 91C3685BDB; Tue, 13 Mar 2018 16:18:38 +0000 (UTC) (envelope-from hselasky@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 8C21D1C13C; Tue, 13 Mar 2018 16:18:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGIcB1000219; Tue, 13 Mar 2018 16:18:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGIc8X000218; Tue, 13 Mar 2018 16:18:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131618.w2DGIc8X000218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:18:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330852 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 330852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:18:39 -0000 Author: hselasky Date: Tue Mar 13 16:18:38 2018 New Revision: 330852 URL: https://svnweb.freebsd.org/changeset/base/330852 Log: MFC r330344: Correct the return code from pause() during cold startup from zero to EWOULDBLOCK. This also matches the description in pause(9). Discussed with: kib@ Sponsored by: Mellanox Technologies Modified: stable/11/sys/kern/kern_synch.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_synch.c ============================================================================== --- stable/11/sys/kern/kern_synch.c Tue Mar 13 16:17:36 2018 (r330851) +++ stable/11/sys/kern/kern_synch.c Tue Mar 13 16:18:38 2018 (r330852) @@ -328,7 +328,7 @@ pause_sbt(const char *wmesg, sbintime_t sbt, sbintime_ sbt = howmany(sbt, SBT_1US); if (sbt > 0) DELAY(sbt); - return (0); + return (EWOULDBLOCK); } return (_sleep(&pause_wchan[curcpu], NULL, (flags & C_CATCH) ? PCATCH : 0, wmesg, sbt, pr, flags)); From owner-svn-src-all@freebsd.org Tue Mar 13 16:21:00 2018 Return-Path: Delivered-To: svn-src-all@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 5F4BDF2D4F3; Tue, 13 Mar 2018 16:21:00 +0000 (UTC) (envelope-from hselasky@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 0CB2E85F70; Tue, 13 Mar 2018 16:21:00 +0000 (UTC) (envelope-from hselasky@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 DDBEF1C162; Tue, 13 Mar 2018 16:20:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGKxDl001323; Tue, 13 Mar 2018 16:20:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGKxkD001106; Tue, 13 Mar 2018 16:20:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131620.w2DGKxkD001106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:20:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330853 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 330853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:21:00 -0000 Author: hselasky Date: Tue Mar 13 16:20:59 2018 New Revision: 330853 URL: https://svnweb.freebsd.org/changeset/base/330853 Log: MFC r330387 and r330396: Rename the SLAB_DESTROY_BY_RCU flag into SLAB_TYPESAFE_BY_RCU in the LinuxKPI to be compatible with Linux. Keep the old SLAB_DESTROY_BY_RCU macro definition around in the LinuxKPI to avoid compilation breakage in external kernel modules. Requested by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/slab.h stable/11/sys/compat/linuxkpi/common/src/linux_slab.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/slab.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/slab.h Tue Mar 13 16:18:38 2018 (r330852) +++ stable/11/sys/compat/linuxkpi/common/include/linux/slab.h Tue Mar 13 16:20:59 2018 (r330853) @@ -79,9 +79,12 @@ struct linux_kmem_cache { }; #define SLAB_HWCACHE_ALIGN (1 << 0) -#define SLAB_DESTROY_BY_RCU (1 << 1) +#define SLAB_TYPESAFE_BY_RCU (1 << 1) #define SLAB_RECLAIM_ACCOUNT (1 << 2) +#define SLAB_DESTROY_BY_RCU \ + SLAB_TYPESAFE_BY_RCU + static inline gfp_t linux_check_m_flags(gfp_t flags) { @@ -162,7 +165,7 @@ extern void linux_kmem_cache_free_rcu(struct linux_kme static inline void linux_kmem_cache_free(struct linux_kmem_cache *c, void *m) { - if (unlikely(c->cache_flags & SLAB_DESTROY_BY_RCU)) + if (unlikely(c->cache_flags & SLAB_TYPESAFE_BY_RCU)) linux_kmem_cache_free_rcu(c, m); else uma_zfree(c->cache_zone, m); Modified: stable/11/sys/compat/linuxkpi/common/src/linux_slab.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_slab.c Tue Mar 13 16:18:38 2018 (r330852) +++ stable/11/sys/compat/linuxkpi/common/src/linux_slab.c Tue Mar 13 16:20:59 2018 (r330853) @@ -49,7 +49,7 @@ linux_kmem_ctor(void *mem, int size, void *arg, int fl { struct linux_kmem_cache *c = arg; - if (unlikely(c->cache_flags & SLAB_DESTROY_BY_RCU)) { + if (unlikely(c->cache_flags & SLAB_TYPESAFE_BY_RCU)) { struct linux_kmem_rcu *rcu = LINUX_KMEM_TO_RCU(c, mem); /* duplicate cache pointer */ @@ -85,7 +85,7 @@ linux_kmem_cache_create(const char *name, size_t size, else if (align != 0) align--; - if (flags & SLAB_DESTROY_BY_RCU) { + if (flags & SLAB_TYPESAFE_BY_RCU) { /* make room for RCU structure */ size = ALIGN(size, sizeof(void *)); size += sizeof(struct linux_kmem_rcu); @@ -118,7 +118,7 @@ linux_kmem_cache_free_rcu(struct linux_kmem_cache *c, void linux_kmem_cache_destroy(struct linux_kmem_cache *c) { - if (unlikely(c->cache_flags & SLAB_DESTROY_BY_RCU)) { + if (unlikely(c->cache_flags & SLAB_TYPESAFE_BY_RCU)) { /* make sure all free callbacks have been called */ rcu_barrier(); } From owner-svn-src-all@freebsd.org Tue Mar 13 16:22:33 2018 Return-Path: Delivered-To: svn-src-all@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 86EC0F2D8E0; Tue, 13 Mar 2018 16:22:33 +0000 (UTC) (envelope-from hselasky@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 37A3786340; Tue, 13 Mar 2018 16:22:33 +0000 (UTC) (envelope-from hselasky@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 32AAC1C2CD; Tue, 13 Mar 2018 16:22:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGMXD0004998; Tue, 13 Mar 2018 16:22:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGMXLD004997; Tue, 13 Mar 2018 16:22:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131622.w2DGMXLD004997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:22:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330854 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:22:33 -0000 Author: hselasky Date: Tue Mar 13 16:22:32 2018 New Revision: 330854 URL: https://svnweb.freebsd.org/changeset/base/330854 Log: MFC r330388: Implement GENMASK_ULL() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Tue Mar 13 16:20:59 2018 (r330853) +++ stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Tue Mar 13 16:22:32 2018 (r330854) @@ -45,12 +45,15 @@ #define BITS_PER_LONG 32 #endif +#define BITS_PER_LONG_LONG 64 + #define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) % BITS_PER_LONG)) #define BITMAP_LAST_WORD_MASK(n) (~0UL >> (BITS_PER_LONG - (n))) #define BITS_TO_LONGS(n) howmany((n), BITS_PER_LONG) #define BIT_MASK(nr) (1UL << ((nr) & (BITS_PER_LONG - 1))) #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) #define GENMASK(h, l) (((~0UL) >> (BITS_PER_LONG - (h) - 1)) & ((~0UL) << (l))) +#define GENMASK_ULL(h, l) (((~0ULL) >> (BITS_PER_LONG_LONG - (h) - 1)) & ((~0ULL) << (l))) #define BITS_PER_BYTE 8 #define hweight8(x) bitcount((uint8_t)(x)) From owner-svn-src-all@freebsd.org Tue Mar 13 16:23:34 2018 Return-Path: Delivered-To: svn-src-all@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 4EF1CF2DA94; Tue, 13 Mar 2018 16:23:34 +0000 (UTC) (envelope-from hselasky@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 EB214864E2; Tue, 13 Mar 2018 16:23:33 +0000 (UTC) (envelope-from hselasky@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 E610C1C2D0; Tue, 13 Mar 2018 16:23:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGNXd0005095; Tue, 13 Mar 2018 16:23:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGNX3L005094; Tue, 13 Mar 2018 16:23:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131623.w2DGNX3L005094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:23:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330855 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:23:34 -0000 Author: hselasky Date: Tue Mar 13 16:23:33 2018 New Revision: 330855 URL: https://svnweb.freebsd.org/changeset/base/330855 Log: MFC r330389: Implement for_each_clear_bit() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Tue Mar 13 16:22:32 2018 (r330854) +++ stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Tue Mar 13 16:23:33 2018 (r330855) @@ -390,6 +390,10 @@ done: (bit) < (size); \ (bit) = find_next_bit((addr), (size), (bit) + 1)) +#define for_each_clear_bit(bit, addr, size) \ + for ((bit) = find_first_zero_bit((addr), (size)); \ + (bit) < (size); \ + (bit) = find_next_zero_bit((addr), (size), (bit) + 1)) static inline uint64_t sign_extend64(uint64_t value, int index) From owner-svn-src-all@freebsd.org Tue Mar 13 16:24:29 2018 Return-Path: Delivered-To: svn-src-all@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 13AF0F2DC09; Tue, 13 Mar 2018 16:24:29 +0000 (UTC) (envelope-from hselasky@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 B3E7D8665D; Tue, 13 Mar 2018 16:24:28 +0000 (UTC) (envelope-from hselasky@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 AEFA81C2D3; Tue, 13 Mar 2018 16:24:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGOSYf005184; Tue, 13 Mar 2018 16:24:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGOSX5005183; Tue, 13 Mar 2018 16:24:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131624.w2DGOSX5005183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330856 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:24:29 -0000 Author: hselasky Date: Tue Mar 13 16:24:28 2018 New Revision: 330856 URL: https://svnweb.freebsd.org/changeset/base/330856 Log: MFC r330390: Define noinline and __maybe_unused macros in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h Tue Mar 13 16:23:33 2018 (r330855) +++ stable/11/sys/compat/linuxkpi/common/include/linux/compiler.h Tue Mar 13 16:24:28 2018 (r330856) @@ -64,6 +64,7 @@ #define __attribute_const__ __attribute__((__const__)) #undef __always_inline #define __always_inline inline +#define noinline __noinline #define ____cacheline_aligned __aligned(CACHE_LINE_SIZE) #define likely(x) __builtin_expect(!!(x), 1) @@ -71,6 +72,7 @@ #define typeof(x) __typeof(x) #define uninitialized_var(x) x = x +#define __maybe_unused __unused #define __always_unused __unused #define __must_check __result_use_check From owner-svn-src-all@freebsd.org Tue Mar 13 16:25:28 2018 Return-Path: Delivered-To: svn-src-all@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 BA62BF2DD51; Tue, 13 Mar 2018 16:25:28 +0000 (UTC) (envelope-from hselasky@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 679BF86812; Tue, 13 Mar 2018 16:25:28 +0000 (UTC) (envelope-from hselasky@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 629061C2D4; Tue, 13 Mar 2018 16:25:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGPSFs005294; Tue, 13 Mar 2018 16:25:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGPSTf005293; Tue, 13 Mar 2018 16:25:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131625.w2DGPSTf005293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:25:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330857 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:25:28 -0000 Author: hselasky Date: Tue Mar 13 16:25:28 2018 New Revision: 330857 URL: https://svnweb.freebsd.org/changeset/base/330857 Log: MFC r330391: Implement writel_relaxed() in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/io.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/io.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/io.h Tue Mar 13 16:24:28 2018 (r330856) +++ stable/11/sys/compat/linuxkpi/common/include/linux/io.h Tue Mar 13 16:25:28 2018 (r330857) @@ -74,6 +74,13 @@ writel(uint32_t b, void *addr) *(volatile uint32_t *)addr = b; } +#undef writel_relaxed +static inline void +writel_relaxed(uint32_t b, void *addr) +{ + *(volatile uint32_t *)addr = b; +} + #undef writeq static inline void writeq(uint64_t b, void *addr) From owner-svn-src-all@freebsd.org Tue Mar 13 16:26:58 2018 Return-Path: Delivered-To: svn-src-all@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 287E6F2F032; Tue, 13 Mar 2018 16:26:58 +0000 (UTC) (envelope-from hselasky@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 CEB4986A68; Tue, 13 Mar 2018 16:26:57 +0000 (UTC) (envelope-from hselasky@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 C9B111C2D6; Tue, 13 Mar 2018 16:26:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGQvfG005405; Tue, 13 Mar 2018 16:26:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGQvwJ005404; Tue, 13 Mar 2018 16:26:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131626.w2DGQvwJ005404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330858 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:26:58 -0000 Author: hselasky Date: Tue Mar 13 16:26:57 2018 New Revision: 330858 URL: https://svnweb.freebsd.org/changeset/base/330858 Log: MFC r330392 and r330408: Implement BUILD_BUG() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h Tue Mar 13 16:25:28 2018 (r330857) +++ stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h Tue Mar 13 16:26:57 2018 (r330858) @@ -86,6 +86,7 @@ #define S64_C(x) x ## LL #define U64_C(x) x ## ULL +#define BUILD_BUG() do { CTASSERT(0); } while (0) #define BUILD_BUG_ON(x) CTASSERT(!(x)) #define BUILD_BUG_ON_MSG(x, msg) BUILD_BUG_ON(x) #define BUILD_BUG_ON_NOT_POWER_OF_2(x) BUILD_BUG_ON(!powerof2(x)) From owner-svn-src-all@freebsd.org Tue Mar 13 16:28:05 2018 Return-Path: Delivered-To: svn-src-all@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 3A136F2F241; Tue, 13 Mar 2018 16:28:05 +0000 (UTC) (envelope-from hselasky@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 DE89D86C18; Tue, 13 Mar 2018 16:28:04 +0000 (UTC) (envelope-from hselasky@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 D94671C2E4; Tue, 13 Mar 2018 16:28:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGS4Aw005504; Tue, 13 Mar 2018 16:28:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGS46k005503; Tue, 13 Mar 2018 16:28:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131628.w2DGS46k005503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:28:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330859 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:28:05 -0000 Author: hselasky Date: Tue Mar 13 16:28:04 2018 New Revision: 330859 URL: https://svnweb.freebsd.org/changeset/base/330859 Log: MFC r330393: Implement __MODULE_STRING() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/module.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/module.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/module.h Tue Mar 13 16:26:57 2018 (r330858) +++ stable/11/sys/compat/linuxkpi/common/include/linux/module.h Tue Mar 13 16:28:04 2018 (r330859) @@ -53,6 +53,7 @@ #define EXPORT_SYMBOL(name) #define EXPORT_SYMBOL_GPL(name) +#define __MODULE_STRING(x) __stringify(x) /* OFED pre-module initialization */ #define SI_SUB_OFED_PREINIT (SI_SUB_ROOT_CONF - 2) From owner-svn-src-all@freebsd.org Tue Mar 13 16:29:03 2018 Return-Path: Delivered-To: svn-src-all@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 1746EF2F3E5; Tue, 13 Mar 2018 16:29:03 +0000 (UTC) (envelope-from hselasky@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 BA1C386DBE; Tue, 13 Mar 2018 16:29:02 +0000 (UTC) (envelope-from hselasky@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 B52F71C2E8; Tue, 13 Mar 2018 16:29:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGT24F005595; Tue, 13 Mar 2018 16:29:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGT2bY005594; Tue, 13 Mar 2018 16:29:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131629.w2DGT2bY005594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330860 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:29:03 -0000 Author: hselasky Date: Tue Mar 13 16:29:02 2018 New Revision: 330860 URL: https://svnweb.freebsd.org/changeset/base/330860 Log: MFC r330394: Implement pr_err_ratelimited() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/printk.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/printk.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/printk.h Tue Mar 13 16:28:04 2018 (r330859) +++ stable/11/sys/compat/linuxkpi/common/include/linux/printk.h Tue Mar 13 16:29:02 2018 (r330860) @@ -118,4 +118,7 @@ print_hex_dump_bytes(const char *prefix_str, const int __retval; \ }) +#define pr_err_ratelimited(fmt, ...) \ + printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) + #endif /* _LINUX_PRINTK_H_ */ From owner-svn-src-all@freebsd.org Tue Mar 13 16:30:02 2018 Return-Path: Delivered-To: svn-src-all@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 ED66EF2F548; Tue, 13 Mar 2018 16:30:01 +0000 (UTC) (envelope-from hselasky@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 9A66F86F44; Tue, 13 Mar 2018 16:30:01 +0000 (UTC) (envelope-from hselasky@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 955AD1C2F4; Tue, 13 Mar 2018 16:30:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGU1Wl005715; Tue, 13 Mar 2018 16:30:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGU1Rn005713; Tue, 13 Mar 2018 16:30:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131630.w2DGU1Rn005713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330861 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 330861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:30:02 -0000 Author: hselasky Date: Tue Mar 13 16:30:01 2018 New Revision: 330861 URL: https://svnweb.freebsd.org/changeset/base/330861 Log: MFC r330395: Implement DEFINE_WAIT_FUNC() function macro and default_wake_function() in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Tue Mar 13 16:29:02 2018 (r330860) +++ stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Tue Mar 13 16:30:01 2018 (r330861) @@ -76,13 +76,17 @@ struct wait_queue_head { * renamed and furthermore must be the default wait queue callback. */ extern wait_queue_func_t autoremove_wake_function; +extern wait_queue_func_t default_wake_function; -#define DEFINE_WAIT(name) \ +#define DEFINE_WAIT_FUNC(name, function) \ wait_queue_t name = { \ .private = current, \ - .func = autoremove_wake_function, \ + .func = function, \ .task_list = LINUX_LIST_HEAD_INIT(name.task_list) \ } + +#define DEFINE_WAIT(name) \ + DEFINE_WAIT_FUNC(name, autoremove_wake_function) #define DECLARE_WAITQUEUE(name, task) \ wait_queue_t name = { \ Modified: stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Tue Mar 13 16:29:02 2018 (r330860) +++ stable/11/sys/compat/linuxkpi/common/src/linux_schedule.c Tue Mar 13 16:30:01 2018 (r330861) @@ -176,6 +176,13 @@ autoremove_wake_function(wait_queue_t *wq, unsigned in return (ret); } +int +default_wake_function(wait_queue_t *wq, unsigned int state, int flags, + void *key __unused) +{ + return (wake_up_task(wq->private, state)); +} + void linux_wake_up(wait_queue_head_t *wqh, unsigned int state, int nr, bool locked) { From owner-svn-src-all@freebsd.org Tue Mar 13 16:30:52 2018 Return-Path: Delivered-To: svn-src-all@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 E7A21F2F799; Tue, 13 Mar 2018 16:30:51 +0000 (UTC) (envelope-from hselasky@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 9C955870E1; Tue, 13 Mar 2018 16:30:51 +0000 (UTC) (envelope-from hselasky@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 978591C311; Tue, 13 Mar 2018 16:30:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGUpf2009560; Tue, 13 Mar 2018 16:30:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGUpSP009559; Tue, 13 Mar 2018 16:30:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131630.w2DGUpSP009559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330862 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:30:52 -0000 Author: hselasky Date: Tue Mar 13 16:30:51 2018 New Revision: 330862 URL: https://svnweb.freebsd.org/changeset/base/330862 Log: MFC r330398: Implement wait_event_lock_irq() macro function in the LinuxKPI. Requested by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Tue Mar 13 16:30:01 2018 (r330861) +++ stable/11/sys/compat/linuxkpi/common/include/linux/wait.h Tue Mar 13 16:30:51 2018 (r330862) @@ -194,11 +194,19 @@ int linux_wait_event_common(wait_queue_head_t *, wait_ }) /* - * Hold the (locked) spinlock when testing the cond. + * The passed spinlock is held when testing the condition. */ #define wait_event_interruptible_lock_irq(wqh, cond, lock) ({ \ __wait_event_common(wqh, cond, MAX_SCHEDULE_TIMEOUT, \ TASK_INTERRUPTIBLE, &(lock)); \ +}) + +/* + * The passed spinlock is held when testing the condition. + */ +#define wait_event_lock_irq(wqh, cond, lock) ({ \ + __wait_event_common(wqh, cond, MAX_SCHEDULE_TIMEOUT, \ + TASK_UNINTERRUPTIBLE, &(lock)); \ }) static inline void From owner-svn-src-all@freebsd.org Tue Mar 13 16:31:55 2018 Return-Path: Delivered-To: svn-src-all@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 40580F2F96B; Tue, 13 Mar 2018 16:31:55 +0000 (UTC) (envelope-from hselasky@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 E5B4987315; Tue, 13 Mar 2018 16:31:54 +0000 (UTC) (envelope-from hselasky@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 E0AEE1C444; Tue, 13 Mar 2018 16:31:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGVs86009651; Tue, 13 Mar 2018 16:31:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGVssv009650; Tue, 13 Mar 2018 16:31:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131631.w2DGVssv009650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330863 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:31:55 -0000 Author: hselasky Date: Tue Mar 13 16:31:54 2018 New Revision: 330863 URL: https://svnweb.freebsd.org/changeset/base/330863 Log: MFC r330399: Stub kernel_param_lock() and kernel_param_unlock() in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/moduleparam.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/moduleparam.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/moduleparam.h Tue Mar 13 16:30:51 2018 (r330862) +++ stable/11/sys/compat/linuxkpi/common/include/linux/moduleparam.h Tue Mar 13 16:31:54 2018 (r330863) @@ -125,6 +125,9 @@ #define MODULE_PARM_DESC(name, desc) \ const char LINUXKPI_PARAM_DESC(name)[] = { desc } +#define kernel_param_lock(...) do {} while (0) +#define kernel_param_unlock(...) do {} while (0) + SYSCTL_DECL(_compat_linuxkpi); #endif /* _LINUX_MODULEPARAM_H_ */ From owner-svn-src-all@freebsd.org Tue Mar 13 16:33:04 2018 Return-Path: Delivered-To: svn-src-all@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 8A293F2FBCE; Tue, 13 Mar 2018 16:33:04 +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 31ABC87641; Tue, 13 Mar 2018 16:33:04 +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 13DD91C46B; Tue, 13 Mar 2018 16:33:04 +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 w2DGX4YZ010481; Tue, 13 Mar 2018 16:33:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGX0Ro010446; Tue, 13 Mar 2018 16:33:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803131633.w2DGX0Ro010446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 13 Mar 2018 16:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330864 - in head/stand: common efi/boot1 efi/loader/arch/arm ficl/aarch64 ficl/amd64 ficl/arm ficl/i386 ficl/mips ficl/mips64 ficl/powerpc ficl/riscv ficl/sparc64 i386/btx/lib i386/lib... X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand: common efi/boot1 efi/loader/arch/arm ficl/aarch64 ficl/amd64 ficl/arm ficl/i386 ficl/mips ficl/mips64 ficl/powerpc ficl/riscv ficl/sparc64 i386/btx/lib i386/libi386 i386/loader libsa of... X-SVN-Commit-Revision: 330864 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:33:05 -0000 Author: imp Date: Tue Mar 13 16:33:00 2018 New Revision: 330864 URL: https://svnweb.freebsd.org/changeset/base/330864 Log: Prefer uintXX_t to u_intXX_t A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. With consistency a great soul has simply nothing to do. -- Ralph Waldo Emerson Modified: head/stand/common/bootstrap.h head/stand/common/isapnp.c head/stand/common/load_elf.c head/stand/common/load_elf_obj.c head/stand/common/metadata.c head/stand/common/misc.c head/stand/common/pnp.c head/stand/efi/boot1/ufs_module.c head/stand/efi/loader/arch/arm/exec.c head/stand/ficl/aarch64/sysdep.c head/stand/ficl/amd64/sysdep.c head/stand/ficl/arm/sysdep.c head/stand/ficl/i386/sysdep.c head/stand/ficl/mips/sysdep.c head/stand/ficl/mips64/sysdep.c head/stand/ficl/powerpc/sysdep.c head/stand/ficl/riscv/sysdep.c head/stand/ficl/sparc64/sysdep.c head/stand/i386/btx/lib/btxv86.h head/stand/i386/libi386/biosacpi.c head/stand/i386/libi386/biosdisk.c head/stand/i386/libi386/biospnp.c head/stand/i386/libi386/bootinfo32.c head/stand/i386/libi386/bootinfo64.c head/stand/i386/libi386/elf64_freebsd.c head/stand/i386/libi386/multiboot.c head/stand/i386/libi386/pxe.c head/stand/i386/loader/main.c head/stand/libsa/arp.c head/stand/libsa/bootp.c head/stand/libsa/bootparam.c head/stand/libsa/dosfs.h head/stand/libsa/ext2fs.c head/stand/libsa/net.h head/stand/libsa/rpc.c head/stand/ofw/libofw/openfirm.c head/stand/powerpc/boot1.chrp/boot1.c head/stand/powerpc/kboot/ppc64_elf_freebsd.c head/stand/powerpc/ofw/elf_freebsd.c head/stand/powerpc/ofw/main.c head/stand/powerpc/ofw/ppc64_elf_freebsd.c head/stand/sparc64/boot1/boot1.c head/stand/sparc64/loader/main.c head/stand/uboot/lib/elf_freebsd.c head/stand/userboot/userboot/bootinfo32.c head/stand/userboot/userboot/bootinfo64.c head/stand/userboot/userboot/elf64_freebsd.c Modified: head/stand/common/bootstrap.h ============================================================================== --- head/stand/common/bootstrap.h Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/common/bootstrap.h Tue Mar 13 16:33:00 2018 (r330864) @@ -150,7 +150,7 @@ void pnp_addident(struct pnpinfo *pi, char *ident); struct pnpinfo *pnp_allocinfo(void); void pnp_freeinfo(struct pnpinfo *pi); void pnp_addinfo(struct pnpinfo *pi); -char *pnp_eisaformat(u_int8_t *data); +char *pnp_eisaformat(uint8_t *data); /* * < 0 - No ISA in system @@ -168,7 +168,7 @@ extern int isapnp_readport; struct file_metadata { size_t md_size; - u_int16_t md_type; + uint16_t md_type; struct file_metadata *md_next; char md_data[1]; /* data are immediately appended */ }; @@ -210,7 +210,7 @@ struct preloaded_file struct file_format { /* Load function must return EFTYPE if it can't handle the module supplied */ - int (* l_load)(char *filename, u_int64_t dest, struct preloaded_file **result); + int (* l_load)(char *filename, uint64_t dest, struct preloaded_file **result); /* Only a loader that will load a kernel (first module) should have an exec handler */ int (* l_exec)(struct preloaded_file *mp); }; @@ -239,20 +239,20 @@ void file_removemetadata(struct preloaded_file *fp); #define ELF_RELOC_RELA 2 /* Relocation offset for some architectures */ -extern u_int64_t __elfN(relocation_offset); +extern uint64_t __elfN(relocation_offset); struct elf_file; typedef Elf_Addr (symaddr_fn)(struct elf_file *ef, Elf_Size symidx); -int __elfN(loadfile)(char *filename, u_int64_t dest, struct preloaded_file **result); -int __elfN(obj_loadfile)(char *filename, u_int64_t dest, +int __elfN(loadfile)(char *filename, uint64_t dest, struct preloaded_file **result); +int __elfN(obj_loadfile)(char *filename, uint64_t dest, struct preloaded_file **result); int __elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr, const void *reldata, int reltype, Elf_Addr relbase, Elf_Addr dataaddr, void *data, size_t len); -int __elfN(loadfile_raw)(char *filename, u_int64_t dest, +int __elfN(loadfile_raw)(char *filename, uint64_t dest, struct preloaded_file **result, int multiboot); -int __elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest); +int __elfN(load_modmetadata)(struct preloaded_file *fp, uint64_t dest); #endif /* Modified: head/stand/common/isapnp.c ============================================================================== --- head/stand/common/isapnp.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/common/isapnp.c Tue Mar 13 16:33:00 2018 (r330864) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); static void isapnp_write(int d, int r); static void isapnp_send_Initiation_LFSR(void); -static int isapnp_get_serial(u_int8_t *p); +static int isapnp_get_serial(uint8_t *p); static int isapnp_isolation_protocol(void); static void isapnp_enumerate(void); @@ -90,7 +90,7 @@ isapnp_send_Initiation_LFSR(void) * Get the device's serial number. Returns 1 if the serial is valid. */ static int -isapnp_get_serial(u_int8_t *data) +isapnp_get_serial(uint8_t *data) { int i, bit, valid = 0, sum = 0x6a; @@ -123,7 +123,7 @@ isapnp_get_serial(u_int8_t *data) * Returns nonzero if the device fails to report */ static int -isapnp_get_resource_info(u_int8_t *buffer, int len) +isapnp_get_resource_info(uint8_t *buffer, int len) { int i, j; u_char temp; @@ -229,7 +229,7 @@ isapnp_isolation_protocol(void) { int csn; struct pnpinfo *pi; - u_int8_t cardid[_PNP_ID_LEN]; + uint8_t cardid[_PNP_ID_LEN]; int ndevs; isapnp_send_Initiation_LFSR(); Modified: head/stand/common/load_elf.c ============================================================================== --- head/stand/common/load_elf.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/common/load_elf.c Tue Mar 13 16:33:00 2018 (r330864) @@ -70,11 +70,11 @@ typedef struct elf_file { caddr_t firstpage; size_t firstlen; int kernel; - u_int64_t off; + uint64_t off; } *elf_file_t; static int __elfN(loadimage)(struct preloaded_file *mp, elf_file_t ef, - u_int64_t loadaddr); + uint64_t loadaddr); static int __elfN(lookup_symbol)(struct preloaded_file *mp, elf_file_t ef, const char* name, Elf_Sym* sym); static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, @@ -87,7 +87,7 @@ static char *fake_modname(const char *name); const char *__elfN(kerneltype) = "elf kernel"; const char *__elfN(moduletype) = "elf module"; -u_int64_t __elfN(relocation_offset) = 0; +uint64_t __elfN(relocation_offset) = 0; extern void elf_wrong_field_size(void); #define CONVERT_FIELD(b, f, e) \ @@ -265,13 +265,13 @@ error: * will be saved in (result). */ int -__elfN(loadfile)(char *filename, u_int64_t dest, struct preloaded_file **result) +__elfN(loadfile)(char *filename, uint64_t dest, struct preloaded_file **result) { return (__elfN(loadfile_raw)(filename, dest, result, 0)); } int -__elfN(loadfile_raw)(char *filename, u_int64_t dest, +__elfN(loadfile_raw)(char *filename, uint64_t dest, struct preloaded_file **result, int multiboot) { struct preloaded_file *fp, *kfp; @@ -419,7 +419,7 @@ out: * the Elf header, load the image at (off) */ static int -__elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off) +__elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, uint64_t off) { int i; u_int j; @@ -883,21 +883,21 @@ fake_modname(const char *name) struct mod_metadata64 { int md_version; /* structure version MDTV_* */ int md_type; /* type of entry MDT_* */ - u_int64_t md_data; /* specific data */ - u_int64_t md_cval; /* common string label */ + uint64_t md_data; /* specific data */ + uint64_t md_cval; /* common string label */ }; #endif #if defined(__amd64__) && __ELF_WORD_SIZE == 32 struct mod_metadata32 { int md_version; /* structure version MDTV_* */ int md_type; /* type of entry MDT_* */ - u_int32_t md_data; /* specific data */ - u_int32_t md_cval; /* common string label */ + uint32_t md_data; /* specific data */ + uint32_t md_cval; /* common string label */ }; #endif int -__elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest) +__elfN(load_modmetadata)(struct preloaded_file *fp, uint64_t dest) { struct elf_file ef; int err, i, j; Modified: head/stand/common/load_elf_obj.c ============================================================================== --- head/stand/common/load_elf_obj.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/common/load_elf_obj.c Tue Mar 13 16:33:00 2018 (r330864) @@ -63,7 +63,7 @@ typedef struct elf_file { } *elf_file_t; static int __elfN(obj_loadimage)(struct preloaded_file *mp, elf_file_t ef, - u_int64_t loadaddr); + uint64_t loadaddr); static int __elfN(obj_lookup_set)(struct preloaded_file *mp, elf_file_t ef, const char *name, Elf_Addr *startp, Elf_Addr *stopp, int *countp); static int __elfN(obj_reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, @@ -81,7 +81,7 @@ const char *__elfN(obj_moduletype) = "elf obj module"; * will be saved in (result). */ int -__elfN(obj_loadfile)(char *filename, u_int64_t dest, +__elfN(obj_loadfile)(char *filename, uint64_t dest, struct preloaded_file **result) { struct preloaded_file *fp, *kfp; @@ -186,7 +186,7 @@ out: * the Elf header, load the image at (off) */ static int -__elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off) +__elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t ef, uint64_t off) { Elf_Ehdr *hdr; Elf_Shdr *shdr, *cshdr, *lshdr; @@ -349,8 +349,8 @@ out: struct mod_metadata64 { int md_version; /* structure version MDTV_* */ int md_type; /* type of entry MDT_* */ - u_int64_t md_data; /* specific data */ - u_int64_t md_cval; /* common string label */ + uint64_t md_data; /* specific data */ + uint64_t md_cval; /* common string label */ }; #endif Modified: head/stand/common/metadata.c ============================================================================== --- head/stand/common/metadata.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/common/metadata.c Tue Mar 13 16:33:00 2018 (r330864) @@ -217,7 +217,7 @@ md_copyenv(vm_offset_t addr) static int align; #define COPY32(v, a, c) { \ - u_int32_t x = (v); \ + uint32_t x = (v); \ if (c) \ archsw.arch_copyin(&x, a, sizeof(x)); \ a += sizeof(x); \ Modified: head/stand/common/misc.c ============================================================================== --- head/stand/common/misc.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/common/misc.c Tue Mar 13 16:33:00 2018 (r330864) @@ -185,7 +185,7 @@ hexdump(caddr_t region, size_t len) for (x = 0; x < 16; x++) { if ((line + x) < (region + len)) { - emit("%02x ", *(u_int8_t *)(line + x)); + emit("%02x ", *(uint8_t *)(line + x)); } else { emit("-- "); } @@ -195,7 +195,7 @@ hexdump(caddr_t region, size_t len) emit(" |"); for (x = 0; x < 16; x++) { if ((line + x) < (region + len)) { - c = *(u_int8_t *)(line + x); + c = *(uint8_t *)(line + x); if ((c < ' ') || (c > '~')) /* !isprint(c) */ c = '.'; emit("%c", c); Modified: head/stand/common/pnp.c ============================================================================== --- head/stand/common/pnp.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/common/pnp.c Tue Mar 13 16:33:00 2018 (r330864) @@ -169,7 +169,7 @@ pnp_addinfo(struct pnpinfo *pi) * where 'AAA' is the EISA vendor ID, II is the product ID and RR the revision ID. */ char * -pnp_eisaformat(u_int8_t *data) +pnp_eisaformat(uint8_t *data) { static char idbuf[8]; const char hextoascii[] = "0123456789abcdef"; Modified: head/stand/efi/boot1/ufs_module.c ============================================================================== --- head/stand/efi/boot1/ufs_module.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/efi/boot1/ufs_module.c Tue Mar 13 16:33:00 2018 (r330864) @@ -44,7 +44,7 @@ static dev_info_t *devinfo; static dev_info_t *devices; static int -dskread(void *buf, u_int64_t lba, int nblk) +dskread(void *buf, uint64_t lba, int nblk) { int size; EFI_STATUS status; Modified: head/stand/efi/loader/arch/arm/exec.c ============================================================================== --- head/stand/efi/loader/arch/arm/exec.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/efi/loader/arch/arm/exec.c Tue Mar 13 16:33:00 2018 (r330864) @@ -47,7 +47,7 @@ extern vm_offset_t md_load(char *, vm_offset_t *); extern int bi_load(char *, vm_offset_t *, vm_offset_t *); static int -__elfN(arm_load)(char *filename, u_int64_t dest, +__elfN(arm_load)(char *filename, uint64_t dest, struct preloaded_file **result) { int r; Modified: head/stand/ficl/aarch64/sysdep.c ============================================================================== --- head/stand/ficl/aarch64/sysdep.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/ficl/aarch64/sysdep.c Tue Mar 13 16:33:00 2018 (r330864) @@ -25,12 +25,12 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) { DPUNS q; - u_int64_t qx; + uint64_t qx; - qx = (u_int64_t)x * (u_int64_t) y; + qx = (uint64_t)x * (uint64_t) y; - q.hi = (u_int32_t)( qx >> 32 ); - q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); + q.hi = (uint32_t)( qx >> 32 ); + q.lo = (uint32_t)( qx & 0xFFFFFFFFL); return q; } @@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) { UNSQR result; - u_int64_t qx, qh; + uint64_t qx, qh; qh = q.hi; qx = (qh << 32) | q.lo; Modified: head/stand/ficl/amd64/sysdep.c ============================================================================== --- head/stand/ficl/amd64/sysdep.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/ficl/amd64/sysdep.c Tue Mar 13 16:33:00 2018 (r330864) @@ -25,12 +25,12 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) { DPUNS q; - u_int64_t qx; + uint64_t qx; - qx = (u_int64_t)x * (u_int64_t) y; + qx = (uint64_t)x * (uint64_t) y; - q.hi = (u_int32_t)( qx >> 32 ); - q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); + q.hi = (uint32_t)( qx >> 32 ); + q.lo = (uint32_t)( qx & 0xFFFFFFFFL); return q; } @@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) { UNSQR result; - u_int64_t qx, qh; + uint64_t qx, qh; qh = q.hi; qx = (qh << 32) | q.lo; Modified: head/stand/ficl/arm/sysdep.c ============================================================================== --- head/stand/ficl/arm/sysdep.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/ficl/arm/sysdep.c Tue Mar 13 16:33:00 2018 (r330864) @@ -25,12 +25,12 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) { DPUNS q; - u_int64_t qx; + uint64_t qx; - qx = (u_int64_t)x * (u_int64_t) y; + qx = (uint64_t)x * (uint64_t) y; - q.hi = (u_int32_t)( qx >> 32 ); - q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); + q.hi = (uint32_t)( qx >> 32 ); + q.lo = (uint32_t)( qx & 0xFFFFFFFFL); return q; } @@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) { UNSQR result; - u_int64_t qx, qh; + uint64_t qx, qh; qh = q.hi; qx = (qh << 32) | q.lo; Modified: head/stand/ficl/i386/sysdep.c ============================================================================== --- head/stand/ficl/i386/sysdep.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/ficl/i386/sysdep.c Tue Mar 13 16:33:00 2018 (r330864) @@ -28,12 +28,12 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) { DPUNS q; - u_int64_t qx; + uint64_t qx; - qx = (u_int64_t)x * (u_int64_t) y; + qx = (uint64_t)x * (uint64_t) y; - q.hi = (u_int32_t)( qx >> 32 ); - q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); + q.hi = (uint32_t)( qx >> 32 ); + q.lo = (uint32_t)( qx & 0xFFFFFFFFL); return q; } @@ -41,7 +41,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) { UNSQR result; - u_int64_t qx, qh; + uint64_t qx, qh; qh = q.hi; qx = (qh << 32) | q.lo; @@ -89,7 +89,7 @@ void ficlOutb(FICL_VM *pVM) { u_char c; - u_int32_t port; + uint32_t port; port=stackPopUNS(pVM->pStack); c=(u_char)stackPopINT(pVM->pStack); @@ -104,7 +104,7 @@ void ficlInb(FICL_VM *pVM) { u_char c; - u_int32_t port; + uint32_t port; port=stackPopUNS(pVM->pStack); c=inb(port); Modified: head/stand/ficl/mips/sysdep.c ============================================================================== --- head/stand/ficl/mips/sysdep.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/ficl/mips/sysdep.c Tue Mar 13 16:33:00 2018 (r330864) @@ -25,12 +25,12 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) { DPUNS q; - u_int64_t qx; + uint64_t qx; - qx = (u_int64_t)x * (u_int64_t) y; + qx = (uint64_t)x * (uint64_t) y; - q.hi = (u_int32_t)( qx >> 32 ); - q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); + q.hi = (uint32_t)( qx >> 32 ); + q.lo = (uint32_t)( qx & 0xFFFFFFFFL); return q; } @@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) { UNSQR result; - u_int64_t qx, qh; + uint64_t qx, qh; qh = q.hi; qx = (qh << 32) | q.lo; Modified: head/stand/ficl/mips64/sysdep.c ============================================================================== --- head/stand/ficl/mips64/sysdep.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/ficl/mips64/sysdep.c Tue Mar 13 16:33:00 2018 (r330864) @@ -25,12 +25,12 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) { DPUNS q; - u_int64_t qx; + uint64_t qx; - qx = (u_int64_t)x * (u_int64_t) y; + qx = (uint64_t)x * (uint64_t) y; - q.hi = (u_int32_t)( qx >> 32 ); - q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); + q.hi = (uint32_t)( qx >> 32 ); + q.lo = (uint32_t)( qx & 0xFFFFFFFFL); return q; } @@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) { UNSQR result; - u_int64_t qx, qh; + uint64_t qx, qh; qh = q.hi; qx = (qh << 32) | q.lo; Modified: head/stand/ficl/powerpc/sysdep.c ============================================================================== --- head/stand/ficl/powerpc/sysdep.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/ficl/powerpc/sysdep.c Tue Mar 13 16:33:00 2018 (r330864) @@ -25,12 +25,12 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) { DPUNS q; - u_int64_t qx; + uint64_t qx; - qx = (u_int64_t)x * (u_int64_t) y; + qx = (uint64_t)x * (uint64_t) y; - q.hi = (u_int32_t)( qx >> 32 ); - q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); + q.hi = (uint32_t)( qx >> 32 ); + q.lo = (uint32_t)( qx & 0xFFFFFFFFL); return q; } @@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) { UNSQR result; - u_int64_t qx, qh; + uint64_t qx, qh; qh = q.hi; qx = (qh << 32) | q.lo; Modified: head/stand/ficl/riscv/sysdep.c ============================================================================== --- head/stand/ficl/riscv/sysdep.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/ficl/riscv/sysdep.c Tue Mar 13 16:33:00 2018 (r330864) @@ -25,12 +25,12 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) { DPUNS q; - u_int64_t qx; + uint64_t qx; - qx = (u_int64_t)x * (u_int64_t) y; + qx = (uint64_t)x * (uint64_t) y; - q.hi = (u_int32_t)( qx >> 32 ); - q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); + q.hi = (uint32_t)( qx >> 32 ); + q.lo = (uint32_t)( qx & 0xFFFFFFFFL); return q; } @@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) { UNSQR result; - u_int64_t qx, qh; + uint64_t qx, qh; qh = q.hi; qx = (qh << 32) | q.lo; Modified: head/stand/ficl/sparc64/sysdep.c ============================================================================== --- head/stand/ficl/sparc64/sysdep.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/ficl/sparc64/sysdep.c Tue Mar 13 16:33:00 2018 (r330864) @@ -25,12 +25,12 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) { DPUNS q; - u_int64_t qx; + uint64_t qx; - qx = (u_int64_t)x * (u_int64_t) y; + qx = (uint64_t)x * (uint64_t) y; - q.hi = (u_int32_t)( qx >> 32 ); - q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); + q.hi = (uint32_t)( qx >> 32 ); + q.lo = (uint32_t)( qx & 0xFFFFFFFFL); return q; } @@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) { UNSQR result; - u_int64_t qx, qh; + uint64_t qx, qh; qh = q.hi; qx = (qh << 32) | q.lo; Modified: head/stand/i386/btx/lib/btxv86.h ============================================================================== --- head/stand/i386/btx/lib/btxv86.h Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/i386/btx/lib/btxv86.h Tue Mar 13 16:33:00 2018 (r330864) @@ -58,13 +58,13 @@ void __v86int(void); #define v86 __v86 #define v86int __v86int -extern u_int32_t __base; -extern u_int32_t __args; +extern uint32_t __base; +extern uint32_t __args; #define PTOV(pa) ((caddr_t)(pa) - __base) #define VTOP(va) ((vm_offset_t)(va) + __base) -#define VTOPSEG(va) (u_int16_t)(VTOP((caddr_t)va) >> 4) -#define VTOPOFF(va) (u_int16_t)(VTOP((caddr_t)va) & 0xf) +#define VTOPSEG(va) (uint16_t)(VTOP((caddr_t)va) >> 4) +#define VTOPOFF(va) (uint16_t)(VTOP((caddr_t)va) & 0xf) #define V86_CY(x) ((x) & PSL_C) #define V86_ZR(x) ((x) & PSL_Z) Modified: head/stand/i386/libi386/biosacpi.c ============================================================================== --- head/stand/i386/libi386/biosacpi.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/i386/libi386/biosacpi.c Tue Mar 13 16:33:00 2018 (r330864) @@ -122,7 +122,7 @@ static ACPI_TABLE_RSDP * biosacpi_search_rsdp(char *base, int length) { ACPI_TABLE_RSDP *rsdp; - u_int8_t *cp, sum; + uint8_t *cp, sum; int ofs, idx; /* search on 16-byte boundaries */ @@ -131,7 +131,7 @@ biosacpi_search_rsdp(char *base, int length) /* compare signature, validate checksum */ if (!strncmp(rsdp->Signature, ACPI_SIG_RSDP, strlen(ACPI_SIG_RSDP))) { - cp = (u_int8_t *)rsdp; + cp = (uint8_t *)rsdp; sum = 0; for (idx = 0; idx < RSDP_CHECKSUM_LENGTH; idx++) sum += *(cp + idx); Modified: head/stand/i386/libi386/biosdisk.c ============================================================================== --- head/stand/i386/libi386/biosdisk.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/i386/libi386/biosdisk.c Tue Mar 13 16:33:00 2018 (r330864) @@ -916,7 +916,7 @@ bd_write(struct disk_devdesc *dev, daddr_t dblk, int b * disk. And, incidentally, what is returned is not the geometry as * such but the highest valid cylinder, head, and sector numbers. */ -u_int32_t +uint32_t bd_getbigeom(int bunit) { Modified: head/stand/i386/libi386/biospnp.c ============================================================================== --- head/stand/i386/libi386/biospnp.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/i386/libi386/biospnp.c Tue Mar 13 16:33:00 2018 (r330864) @@ -49,49 +49,49 @@ struct pnphandler biospnphandler = struct pnp_ICstructure { - u_int8_t pnp_signature[4]; - u_int8_t pnp_version; - u_int8_t pnp_length; - u_int16_t pnp_BIOScontrol; - u_int8_t pnp_checksum; - u_int32_t pnp_eventflag; - u_int16_t pnp_rmip; - u_int16_t pnp_rmcs; - u_int16_t pnp_pmip; - u_int32_t pnp_pmcs; - u_int8_t pnp_OEMdev[4]; - u_int16_t pnp_rmds; - u_int32_t pnp_pmds; + uint8_t pnp_signature[4]; + uint8_t pnp_version; + uint8_t pnp_length; + uint16_t pnp_BIOScontrol; + uint8_t pnp_checksum; + uint32_t pnp_eventflag; + uint16_t pnp_rmip; + uint16_t pnp_rmcs; + uint16_t pnp_pmip; + uint32_t pnp_pmcs; + uint8_t pnp_OEMdev[4]; + uint16_t pnp_rmds; + uint32_t pnp_pmds; } __packed; struct pnp_devNode { - u_int16_t dn_size; - u_int8_t dn_handle; - u_int8_t dn_id[4]; - u_int8_t dn_type[3]; - u_int16_t dn_attrib; - u_int8_t dn_data[1]; + uint16_t dn_size; + uint8_t dn_handle; + uint8_t dn_id[4]; + uint8_t dn_type[3]; + uint16_t dn_attrib; + uint8_t dn_data[1]; } __packed; struct pnp_isaConfiguration { - u_int8_t ic_revision; - u_int8_t ic_nCSN; - u_int16_t ic_rdport; - u_int16_t ic_reserved; + uint8_t ic_revision; + uint8_t ic_nCSN; + uint16_t ic_rdport; + uint16_t ic_reserved; } __packed; static struct pnp_ICstructure *pnp_Icheck = NULL; -static u_int16_t pnp_NumNodes; -static u_int16_t pnp_NodeSize; +static uint16_t pnp_NumNodes; +static uint16_t pnp_NodeSize; static void biospnp_scanresdata(struct pnpinfo *pi, struct pnp_devNode *dn); static int biospnp_call(int func, const char *fmt, ...); -#define vsegofs(vptr) (((u_int32_t)VTOPSEG(vptr) << 16) + VTOPOFF(vptr)) +#define vsegofs(vptr) (((uint32_t)VTOPSEG(vptr) << 16) + VTOPOFF(vptr)) -typedef void v86bios_t(u_int32_t, u_int32_t, u_int32_t, u_int32_t); +typedef void v86bios_t(uint32_t, uint32_t, uint32_t, uint32_t); v86bios_t *v86bios = (v86bios_t *)v86int; #define biospnp_f00(NumNodes, NodeSize) biospnp_call(0x00, "ll", NumNodes, NodeSize) @@ -155,7 +155,7 @@ biospnp_init(void) static void biospnp_enumerate(void) { - u_int8_t Node; + uint8_t Node; struct pnp_devNode *devNodeBuffer; int result; struct pnpinfo *pi; @@ -189,11 +189,11 @@ static void biospnp_scanresdata(struct pnpinfo *pi, struct pnp_devNode *dn) { u_int tag, i, rlen, dlen; - u_int8_t *p; + uint8_t *p; char *str; p = dn->dn_data; /* point to resource data */ - dlen = dn->dn_size - (p - (u_int8_t *)dn); /* length of resource data */ + dlen = dn->dn_size - (p - (uint8_t *)dn); /* length of resource data */ for (i = 0; i < dlen; i+= rlen) { tag = p[i]; @@ -213,8 +213,8 @@ biospnp_scanresdata(struct pnpinfo *pi, struct pnp_dev } } else { /* large resource */ - rlen = *(u_int16_t *)(p + i); - i += sizeof(u_int16_t); + rlen = *(uint16_t *)(p + i); + i += sizeof(uint16_t); switch(PNP_LRES_NUM(tag)) { @@ -249,14 +249,14 @@ biospnp_call(int func, const char *fmt, ...) { va_list ap; const char *p; - u_int8_t *argp; - u_int32_t args[4]; - u_int32_t i; + uint8_t *argp; + uint32_t args[4]; + uint32_t i; /* function number first */ - argp = (u_int8_t *)args; - *(u_int16_t *)argp = func; - argp += sizeof(u_int16_t); + argp = (uint8_t *)args; + *(uint16_t *)argp = func; + argp += sizeof(uint16_t); /* take args according to format */ va_start(ap, fmt); @@ -265,26 +265,26 @@ biospnp_call(int func, const char *fmt, ...) case 'w': i = va_arg(ap, u_int); - *(u_int16_t *)argp = i; - argp += sizeof(u_int16_t); + *(uint16_t *)argp = i; + argp += sizeof(uint16_t); break; case 'l': - i = va_arg(ap, u_int32_t); - *(u_int32_t *)argp = i; - argp += sizeof(u_int32_t); + i = va_arg(ap, uint32_t); + *(uint32_t *)argp = i; + argp += sizeof(uint32_t); break; } } va_end(ap); /* BIOS segment last */ - *(u_int16_t *)argp = pnp_Icheck->pnp_rmds; - argp += sizeof(u_int16_t); + *(uint16_t *)argp = pnp_Icheck->pnp_rmds; + argp += sizeof(uint16_t); /* prepare for call */ v86.ctl = V86_ADDR | V86_CALLF; - v86.addr = ((u_int32_t)pnp_Icheck->pnp_rmcs << 16) + pnp_Icheck->pnp_rmip; + v86.addr = ((uint32_t)pnp_Icheck->pnp_rmcs << 16) + pnp_Icheck->pnp_rmip; /* call with packed stack and return */ v86bios(args[0], args[1], args[2], args[3]); Modified: head/stand/i386/libi386/bootinfo32.c ============================================================================== --- head/stand/i386/libi386/bootinfo32.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/i386/libi386/bootinfo32.c Tue Mar 13 16:33:00 2018 (r330864) @@ -63,7 +63,7 @@ static struct bootinfo bi; * MOD_METADATA (variable) type-specific metadata */ #define COPY32(v, a, c) { \ - u_int32_t x = (v); \ + uint32_t x = (v); \ if (c) \ i386_copyin(&x, a, sizeof(x)); \ a += sizeof(x); \ Modified: head/stand/i386/libi386/bootinfo64.c ============================================================================== --- head/stand/i386/libi386/bootinfo64.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/i386/libi386/bootinfo64.c Tue Mar 13 16:33:00 2018 (r330864) @@ -64,7 +64,7 @@ static const size_t keybuf_size = sizeof(struct keybuf * MOD_METADATA (variable) type-specific metadata */ #define COPY32(v, a, c) { \ - u_int32_t x = (v); \ + uint32_t x = (v); \ if (c) \ i386_copyin(&x, a, sizeof(x)); \ a += sizeof(x); \ @@ -75,7 +75,7 @@ static const size_t keybuf_size = sizeof(struct keybuf COPY32(strlen(s) + 1, a, c); \ if (c) \ i386_copyin(s, a, strlen(s) + 1); \ - a += roundup(strlen(s) + 1, sizeof(u_int64_t));\ + a += roundup(strlen(s) + 1, sizeof(uint64_t));\ } #define MOD_NAME(a, s, c) MOD_STR(MODINFO_NAME, a, s, c) @@ -87,7 +87,7 @@ static const size_t keybuf_size = sizeof(struct keybuf COPY32(sizeof(s), a, c); \ if (c) \ i386_copyin(&s, a, sizeof(s)); \ - a += roundup(sizeof(s), sizeof(u_int64_t)); \ + a += roundup(sizeof(s), sizeof(uint64_t)); \ } #define MOD_ADDR(a, s, c) MOD_VAR(MODINFO_ADDR, a, s, c) @@ -98,7 +98,7 @@ static const size_t keybuf_size = sizeof(struct keybuf COPY32(mm->md_size, a, c); \ if (c) \ i386_copyin(mm->md_data, a, mm->md_size); \ - a += roundup(mm->md_size, sizeof(u_int64_t));\ + a += roundup(mm->md_size, sizeof(uint64_t));\ } #define MOD_END(a, c) { \ @@ -112,7 +112,7 @@ bi_copymodules64(vm_offset_t addr) struct preloaded_file *fp; struct file_metadata *md; int c; - u_int64_t v; + uint64_t v; c = addr != 0; /* start with the first module on the list, should be the kernel */ @@ -190,9 +190,9 @@ bi_load64(char *args, vm_offset_t addr, vm_offset_t *m struct preloaded_file *xp, *kfp; struct i386_devdesc *rootdev; struct file_metadata *md; - u_int64_t kernend; - u_int64_t envp; - u_int64_t module; + uint64_t kernend; + uint64_t envp; + uint64_t module; vm_offset_t size; char *rootdevname; int howto; Modified: head/stand/i386/libi386/elf64_freebsd.c ============================================================================== --- head/stand/i386/libi386/elf64_freebsd.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/i386/libi386/elf64_freebsd.c Tue Mar 13 16:33:00 2018 (r330864) @@ -51,15 +51,15 @@ struct file_format amd64_elf_obj = { elf64_obj_loadfil #define PG_U 0x004 #define PG_PS 0x080 -typedef u_int64_t p4_entry_t; -typedef u_int64_t p3_entry_t; -typedef u_int64_t p2_entry_t; +typedef uint64_t p4_entry_t; +typedef uint64_t p3_entry_t; +typedef uint64_t p2_entry_t; extern p4_entry_t PT4[]; extern p3_entry_t PT3[]; extern p2_entry_t PT2[]; -u_int32_t entry_hi; -u_int32_t entry_lo; +uint32_t entry_hi; +uint32_t entry_lo; extern void amd64_tramp(); Modified: head/stand/i386/libi386/multiboot.c ============================================================================== --- head/stand/i386/libi386/multiboot.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/i386/libi386/multiboot.c Tue Mar 13 16:33:00 2018 (r330864) @@ -61,16 +61,16 @@ __FBSDID("$FreeBSD$"); #define METADATA_RESV_SIZE(mod_num) \ roundup(METADATA_FIXED_SIZE + METADATA_MODULE_SIZE * mod_num, PAGE_SIZE) -extern int elf32_loadfile_raw(char *filename, u_int64_t dest, +extern int elf32_loadfile_raw(char *filename, uint64_t dest, struct preloaded_file **result, int multiboot); -extern int elf64_load_modmetadata(struct preloaded_file *fp, u_int64_t dest); -extern int elf64_obj_loadfile(char *filename, u_int64_t dest, +extern int elf64_load_modmetadata(struct preloaded_file *fp, uint64_t dest); +extern int elf64_obj_loadfile(char *filename, uint64_t dest, struct preloaded_file **result); -static int multiboot_loadfile(char *, u_int64_t, struct preloaded_file **); +static int multiboot_loadfile(char *, uint64_t, struct preloaded_file **); static int multiboot_exec(struct preloaded_file *); -static int multiboot_obj_loadfile(char *, u_int64_t, struct preloaded_file **); +static int multiboot_obj_loadfile(char *, uint64_t, struct preloaded_file **); static int multiboot_obj_exec(struct preloaded_file *fp); struct file_format multiboot = { multiboot_loadfile, multiboot_exec }; @@ -108,7 +108,7 @@ max_addr(void) } static int -multiboot_loadfile(char *filename, u_int64_t dest, +multiboot_loadfile(char *filename, uint64_t dest, struct preloaded_file **result) { uint32_t *magic; @@ -394,7 +394,7 @@ error: } static int -multiboot_obj_loadfile(char *filename, u_int64_t dest, +multiboot_obj_loadfile(char *filename, uint64_t dest, struct preloaded_file **result) { struct preloaded_file *mfp, *kfp, *rfp; Modified: head/stand/i386/libi386/pxe.c ============================================================================== --- head/stand/i386/libi386/pxe.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/i386/libi386/pxe.c Tue Mar 13 16:33:00 2018 (r330864) @@ -85,11 +85,11 @@ static ssize_t pxe_netif_put(struct iodesc *desc, void static void pxe_netif_end(struct netif *nif); extern struct netif_stats pxe_st[]; -extern u_int16_t __bangpxeseg; -extern u_int16_t __bangpxeoff; +extern uint16_t __bangpxeseg; +extern uint16_t __bangpxeoff; extern void __bangpxeentry(void); -extern u_int16_t __pxenvseg; -extern u_int16_t __pxenvoff; +extern uint16_t __pxenvseg; +extern uint16_t __pxenvoff; extern void __pxenventry(void); struct netif_dif pxe_ifs[] = { Modified: head/stand/i386/loader/main.c ============================================================================== --- head/stand/i386/loader/main.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/i386/loader/main.c Tue Mar 13 16:33:00 2018 (r330864) @@ -60,8 +60,8 @@ CTASSERT(offsetof(struct bootinfo, bi_size) == BI_SIZE /* Arguments passed in from the boot1/boot2 loader */ static struct bootargs *kargs; -static u_int32_t initial_howto; -static u_int32_t initial_bootdev; +static uint32_t initial_howto; +static uint32_t initial_bootdev; static struct bootinfo *initial_bootinfo; struct arch_switch archsw; /* MI/MD interface boundary */ Modified: head/stand/libsa/arp.c ============================================================================== --- head/stand/libsa/arp.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/libsa/arp.c Tue Mar 13 16:33:00 2018 (r330864) @@ -164,7 +164,7 @@ arprecv(struct iodesc *d, void **pkt, void **payload, { ssize_t n; struct ether_arp *ah; - u_int16_t etype; /* host order */ + uint16_t etype; /* host order */ void *ptr; #ifdef ARP_DEBUG Modified: head/stand/libsa/bootp.c ============================================================================== --- head/stand/libsa/bootp.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/libsa/bootp.c Tue Mar 13 16:33:00 2018 (r330864) @@ -190,7 +190,7 @@ bootp(int sock) #ifdef SUPPORT_DHCP if(dhcp_ok) { - u_int32_t leasetime; + uint32_t leasetime; bp->bp_vend[6] = DHCPREQUEST; bp->bp_vend[7] = TAG_REQ_ADDR; bp->bp_vend[8] = 4; Modified: head/stand/libsa/bootparam.c ============================================================================== --- head/stand/libsa/bootparam.c Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/libsa/bootparam.c Tue Mar 13 16:33:00 2018 (r330864) @@ -77,7 +77,7 @@ n_short bp_server_port; /* net order */ * (Note, really four ints, NOT chars. Blech.) */ struct xdr_inaddr { - u_int32_t atype; + uint32_t atype; int32_t addr[4]; }; @@ -108,16 +108,16 @@ bp_whoami(int sockfd) { /* RPC structures for PMAPPROC_CALLIT */ struct args { - u_int32_t prog; - u_int32_t vers; - u_int32_t proc; - u_int32_t arglen; + uint32_t prog; + uint32_t vers; + uint32_t proc; + uint32_t arglen; struct xdr_inaddr xina; } *args; struct repl { - u_int16_t _pad; - u_int16_t port; - u_int32_t encap_len; + uint16_t _pad; + uint16_t port; + uint32_t encap_len; /* encapsulated data here */ n_long capsule[64]; } *repl; Modified: head/stand/libsa/dosfs.h ============================================================================== --- head/stand/libsa/dosfs.h Tue Mar 13 16:31:54 2018 (r330863) +++ head/stand/libsa/dosfs.h Tue Mar 13 16:33:00 2018 (r330864) @@ -47,12 +47,12 @@ * Macros to convert DOS-format 16-bit and 32-bit quantities */ -#define cv2(p) ((u_int16_t)(p)[0] | \ - ((u_int16_t)(p)[1] << 010)) -#define cv4(p) ((u_int32_t)(p)[0] | \ - ((u_int32_t)(p)[1] << 010) | \ - ((u_int32_t)(p)[2] << 020) | \ - ((u_int32_t)(p)[3] << 030)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Mar 13 16:33:42 2018 Return-Path: Delivered-To: svn-src-all@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 192A7F2FCD3; Tue, 13 Mar 2018 16:33:42 +0000 (UTC) (envelope-from hselasky@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 BF98B87878; Tue, 13 Mar 2018 16:33:41 +0000 (UTC) (envelope-from hselasky@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 BA8E21C46C; Tue, 13 Mar 2018 16:33:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGXfW3010573; Tue, 13 Mar 2018 16:33:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGXfA5010572; Tue, 13 Mar 2018 16:33:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131633.w2DGXfA5010572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 16:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330865 - stable/11/sys/compat/linuxkpi/common/src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 330865 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:33:42 -0000 Author: hselasky Date: Tue Mar 13 16:33:41 2018 New Revision: 330865 URL: https://svnweb.freebsd.org/changeset/base/330865 Log: MFC r330689: Implement proper support for complete_all() in the LinuxKPI. When complete_all() is called there might be multiple waiters. The current implementation could only handle one waiter. Make sure the completion is sticky when complete_all() is called to be compatible with Linux. Found by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Tue Mar 13 16:33:00 2018 (r330864) +++ stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Tue Mar 13 16:33:41 2018 (r330865) @@ -1779,11 +1779,14 @@ linux_complete_common(struct completion *c, int all) int wakeup_swapper; sleepq_lock(c); - c->done++; - if (all) + if (all) { + c->done = UINT_MAX; wakeup_swapper = sleepq_broadcast(c, SLEEPQ_SLEEP, 0, 0); - else + } else { + if (c->done != UINT_MAX) + c->done++; wakeup_swapper = sleepq_signal(c, SLEEPQ_SLEEP, 0, 0); + } sleepq_release(c); if (wakeup_swapper) kick_proc0(); @@ -1825,7 +1828,8 @@ linux_wait_for_common(struct completion *c, int flags) } else sleepq_wait(c, 0); } - c->done--; + if (c->done != UINT_MAX) + c->done--; sleepq_release(c); intr: @@ -1878,7 +1882,8 @@ linux_wait_for_timeout_common(struct completion *c, in goto done; } } - c->done--; + if (c->done != UINT_MAX) + c->done--; sleepq_release(c); /* return how many jiffies are left */ @@ -1894,12 +1899,10 @@ linux_try_wait_for_completion(struct completion *c) { int isdone; - isdone = 1; sleepq_lock(c); - if (c->done) + isdone = (c->done != 0); + if (c->done != 0 && c->done != UINT_MAX) c->done--; - else - isdone = 0; sleepq_release(c); return (isdone); } @@ -1909,10 +1912,8 @@ linux_completion_done(struct completion *c) { int isdone; - isdone = 1; sleepq_lock(c); - if (c->done == 0) - isdone = 0; + isdone = (c->done != 0); sleepq_release(c); return (isdone); } From owner-svn-src-all@freebsd.org Tue Mar 13 16:40:30 2018 Return-Path: Delivered-To: svn-src-all@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 6FE52F30630; Tue, 13 Mar 2018 16:40:30 +0000 (UTC) (envelope-from emaste@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 2219587D0C; Tue, 13 Mar 2018 16:40:30 +0000 (UTC) (envelope-from emaste@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 191581C476; Tue, 13 Mar 2018 16:40:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DGeTRA010864; Tue, 13 Mar 2018 16:40:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DGeTiC010859; Tue, 13 Mar 2018 16:40:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803131640.w2DGeTiC010859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 13 Mar 2018 16:40:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330866 - in head/sys: amd64/linux amd64/linux32 i386/linux kern sys X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 i386/linux kern sys X-SVN-Commit-Revision: 330866 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 16:40:30 -0000 Author: emaste Date: Tue Mar 13 16:40:29 2018 New Revision: 330866 URL: https://svnweb.freebsd.org/changeset/base/330866 Log: Use C99 boolean type for translate_osrel Migrate to modern types before creating MD Linuxolator bits for new architectures. Reviewed by: cem Sponsored by: Turing Robotic Industries Inc. Differential Revision: https://reviews.freebsd.org/D14676 Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/i386/linux/linux_sysvec.c head/sys/kern/imgact_elf.c head/sys/sys/imgact_elf.h Modified: head/sys/amd64/linux/linux_sysvec.c ============================================================================== --- head/sys/amd64/linux/linux_sysvec.c Tue Mar 13 16:33:41 2018 (r330865) +++ head/sys/amd64/linux/linux_sysvec.c Tue Mar 13 16:40:29 2018 (r330866) @@ -121,7 +121,7 @@ SET_DECLARE(linux_ioctl_handler_set, struct linux_ioct static register_t * linux_copyout_strings(struct image_params *imgp); static int elf_linux_fixup(register_t **stack_base, struct image_params *iparams); -static boolean_t linux_trans_osrel(const Elf_Note *note, int32_t *osrel); +static bool linux_trans_osrel(const Elf_Note *note, int32_t *osrel); static void linux_vdso_install(void *param); static void linux_vdso_deinstall(void *param); static void linux_set_syscall_retval(struct thread *td, int error); @@ -846,7 +846,7 @@ SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER static char GNULINUX_ABI_VENDOR[] = "GNU"; static int GNULINUX_ABI_DESC = 0; -static boolean_t +static bool linux_trans_osrel(const Elf_Note *note, int32_t *osrel) { const Elf32_Word *desc; @@ -857,7 +857,7 @@ linux_trans_osrel(const Elf_Note *note, int32_t *osrel desc = (const Elf32_Word *)p; if (desc[0] != GNULINUX_ABI_DESC) - return (FALSE); + return (false); /* * For Linux we encode osrel as follows (see linux_mib.c): @@ -865,7 +865,7 @@ linux_trans_osrel(const Elf_Note *note, int32_t *osrel */ *osrel = desc[1] * 1000000 + desc[2] * 1000 + desc[3]; - return (TRUE); + return (true); } static Elf_Brandnote linux64_brandnote = { Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Tue Mar 13 16:33:41 2018 (r330865) +++ head/sys/amd64/linux32/linux32_sysvec.c Tue Mar 13 16:40:29 2018 (r330866) @@ -127,7 +127,7 @@ static void linux_sendsig(sig_t catcher, ksiginfo_ static void exec_linux_setregs(struct thread *td, struct image_params *imgp, u_long stack); static void linux32_fixlimit(struct rlimit *rl, int which); -static boolean_t linux32_trans_osrel(const Elf_Note *note, int32_t *osrel); +static bool linux32_trans_osrel(const Elf_Note *note, int32_t *osrel); static void linux_vdso_install(void *param); static void linux_vdso_deinstall(void *param); @@ -1043,7 +1043,7 @@ SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER static char GNU_ABI_VENDOR[] = "GNU"; static int GNULINUX_ABI_DESC = 0; -static boolean_t +static bool linux32_trans_osrel(const Elf_Note *note, int32_t *osrel) { const Elf32_Word *desc; @@ -1054,7 +1054,7 @@ linux32_trans_osrel(const Elf_Note *note, int32_t *osr desc = (const Elf32_Word *)p; if (desc[0] != GNULINUX_ABI_DESC) - return (FALSE); + return (false); /* * For Linux we encode osrel as follows (see linux_mib.c): @@ -1062,7 +1062,7 @@ linux32_trans_osrel(const Elf_Note *note, int32_t *osr */ *osrel = desc[1] * 1000000 + desc[2] * 1000 + desc[3]; - return (TRUE); + return (true); } static Elf_Brandnote linux32_brandnote = { Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Tue Mar 13 16:33:41 2018 (r330865) +++ head/sys/i386/linux/linux_sysvec.c Tue Mar 13 16:40:29 2018 (r330866) @@ -115,7 +115,7 @@ static void linux_sendsig(sig_t catcher, ksiginfo_ static void exec_linux_setregs(struct thread *td, struct image_params *imgp, u_long stack); static register_t *linux_copyout_strings(struct image_params *imgp); -static boolean_t linux_trans_osrel(const Elf_Note *note, int32_t *osrel); +static bool linux_trans_osrel(const Elf_Note *note, int32_t *osrel); static void linux_vdso_install(void *param); static void linux_vdso_deinstall(void *param); @@ -1017,7 +1017,7 @@ SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER static char GNU_ABI_VENDOR[] = "GNU"; static int GNULINUX_ABI_DESC = 0; -static boolean_t +static bool linux_trans_osrel(const Elf_Note *note, int32_t *osrel) { const Elf32_Word *desc; @@ -1028,7 +1028,7 @@ linux_trans_osrel(const Elf_Note *note, int32_t *osrel desc = (const Elf32_Word *)p; if (desc[0] != GNULINUX_ABI_DESC) - return (FALSE); + return (false); /* * For Linux we encode osrel as follows (see linux_mib.c): @@ -1036,7 +1036,7 @@ linux_trans_osrel(const Elf_Note *note, int32_t *osrel */ *osrel = desc[1] * 1000000 + desc[2] * 1000 + desc[3]; - return (TRUE); + return (true); } static Elf_Brandnote linux_brandnote = { Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Tue Mar 13 16:33:41 2018 (r330865) +++ head/sys/kern/imgact_elf.c Tue Mar 13 16:40:29 2018 (r330866) @@ -96,9 +96,9 @@ static int __elfN(load_section)(struct image_params *i caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot, size_t pagesize); static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp); -static boolean_t __elfN(freebsd_trans_osrel)(const Elf_Note *note, +static bool __elfN(freebsd_trans_osrel)(const Elf_Note *note, int32_t *osrel); -static boolean_t kfreebsd_trans_osrel(const Elf_Note *note, int32_t *osrel); +static bool kfreebsd_trans_osrel(const Elf_Note *note, int32_t *osrel); static boolean_t __elfN(check_note)(struct image_params *imgp, Elf_Brandnote *checknote, int32_t *osrel); static vm_prot_t __elfN(trans_prot)(Elf_Word); @@ -155,7 +155,7 @@ Elf_Brandnote __elfN(freebsd_brandnote) = { .trans_osrel = __elfN(freebsd_trans_osrel) }; -static boolean_t +static bool __elfN(freebsd_trans_osrel)(const Elf_Note *note, int32_t *osrel) { uintptr_t p; @@ -164,7 +164,7 @@ __elfN(freebsd_trans_osrel)(const Elf_Note *note, int3 p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE); *osrel = *(const int32_t *)(p); - return (TRUE); + return (true); } static const char GNU_ABI_VENDOR[] = "GNU"; @@ -179,7 +179,7 @@ Elf_Brandnote __elfN(kfreebsd_brandnote) = { .trans_osrel = kfreebsd_trans_osrel }; -static boolean_t +static bool kfreebsd_trans_osrel(const Elf_Note *note, int32_t *osrel) { const Elf32_Word *desc; @@ -190,7 +190,7 @@ kfreebsd_trans_osrel(const Elf_Note *note, int32_t *os desc = (const Elf32_Word *)p; if (desc[0] != GNU_KFREEBSD_ABI_DESC) - return (FALSE); + return (false); /* * Debian GNU/kFreeBSD embed the earliest compatible kernel version @@ -198,7 +198,7 @@ kfreebsd_trans_osrel(const Elf_Note *note, int32_t *os */ *osrel = desc[1] * 100000 + desc[2] * 1000 + desc[3]; - return (TRUE); + return (true); } int Modified: head/sys/sys/imgact_elf.h ============================================================================== --- head/sys/sys/imgact_elf.h Tue Mar 13 16:33:41 2018 (r330865) +++ head/sys/sys/imgact_elf.h Tue Mar 13 16:40:29 2018 (r330866) @@ -63,7 +63,7 @@ typedef struct { Elf_Note hdr; const char * vendor; int flags; - boolean_t (*trans_osrel)(const Elf_Note *, int32_t *); + bool (*trans_osrel)(const Elf_Note *, int32_t *); #define BN_CAN_FETCH_OSREL 0x0001 /* Deprecated. */ #define BN_TRANSLATE_OSREL 0x0002 /* Use trans_osrel to fetch osrel */ /* after checking the image ABI specification, if needed. */ From owner-svn-src-all@freebsd.org Tue Mar 13 17:04:15 2018 Return-Path: Delivered-To: svn-src-all@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 70A08F32FD9; Tue, 13 Mar 2018 17:04:15 +0000 (UTC) (envelope-from hselasky@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 1B3A469682; Tue, 13 Mar 2018 17:04:15 +0000 (UTC) (envelope-from hselasky@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 15F1E1C8FC; Tue, 13 Mar 2018 17:04:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DH4EtF025827; Tue, 13 Mar 2018 17:04:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DH4E2w025825; Tue, 13 Mar 2018 17:04:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803131704.w2DH4E2w025825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Mar 2018 17:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330867 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 330867 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 17:04:15 -0000 Author: hselasky Date: Tue Mar 13 17:04:14 2018 New Revision: 330867 URL: https://svnweb.freebsd.org/changeset/base/330867 Log: MFC r330271: Rename callout member in struct timer_list to match the one in struct delayed_work in the LinuxKPI. This allows the timer_pending() function macro to be used with delayed work structures. No functional nor structural change. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks Modified: stable/11/sys/compat/linuxkpi/common/include/linux/timer.h stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/timer.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/timer.h Tue Mar 13 16:40:29 2018 (r330866) +++ stable/11/sys/compat/linuxkpi/common/include/linux/timer.h Tue Mar 13 17:04:14 2018 (r330867) @@ -38,7 +38,7 @@ #include struct timer_list { - struct callout timer_callout; + struct callout callout; void (*function) (unsigned long); unsigned long data; int expires; @@ -51,7 +51,7 @@ extern unsigned long linux_timer_hz_mask; #define setup_timer(timer, func, dat) do { \ (timer)->function = (func); \ (timer)->data = (dat); \ - callout_init(&(timer)->timer_callout, 1); \ + callout_init(&(timer)->callout, 1); \ } while (0) #define __setup_timer(timer, func, dat, flags) do { \ @@ -62,16 +62,16 @@ extern unsigned long linux_timer_hz_mask; #define init_timer(timer) do { \ (timer)->function = NULL; \ (timer)->data = 0; \ - callout_init(&(timer)->timer_callout, 1); \ + callout_init(&(timer)->callout, 1); \ } while (0) extern void mod_timer(struct timer_list *, int); extern void add_timer(struct timer_list *); extern void add_timer_on(struct timer_list *, int cpu); -#define del_timer(timer) (void)callout_stop(&(timer)->timer_callout) -#define del_timer_sync(timer) (void)callout_drain(&(timer)->timer_callout) -#define timer_pending(timer) callout_pending(&(timer)->timer_callout) +#define del_timer(timer) (void)callout_stop(&(timer)->callout) +#define del_timer_sync(timer) (void)callout_drain(&(timer)->callout) +#define timer_pending(timer) callout_pending(&(timer)->callout) #define round_jiffies(j) \ ((int)(((j) + linux_timer_hz_mask) & ~linux_timer_hz_mask)) #define round_jiffies_relative(j) round_jiffies(j) Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Tue Mar 13 16:40:29 2018 (r330866) +++ stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Tue Mar 13 17:04:14 2018 (r330867) @@ -1734,7 +1734,7 @@ mod_timer(struct timer_list *timer, int expires) { timer->expires = expires; - callout_reset(&timer->timer_callout, + callout_reset(&timer->callout, linux_timer_jiffies_until(expires), &linux_timer_callback_wrapper, timer); } @@ -1743,7 +1743,7 @@ void add_timer(struct timer_list *timer) { - callout_reset(&timer->timer_callout, + callout_reset(&timer->callout, linux_timer_jiffies_until(timer->expires), &linux_timer_callback_wrapper, timer); } @@ -1752,7 +1752,7 @@ void add_timer_on(struct timer_list *timer, int cpu) { - callout_reset_on(&timer->timer_callout, + callout_reset_on(&timer->callout, linux_timer_jiffies_until(timer->expires), &linux_timer_callback_wrapper, timer, cpu); } From owner-svn-src-all@freebsd.org Tue Mar 13 17:10:53 2018 Return-Path: Delivered-To: svn-src-all@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 49D4EF337F8; Tue, 13 Mar 2018 17:10:53 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8A5169B72; Tue, 13 Mar 2018 17:10:52 +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 E39CE1C915; Tue, 13 Mar 2018 17:10:52 +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 w2DHAqcS026328; Tue, 13 Mar 2018 17:10:52 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DHAq4s026325; Tue, 13 Mar 2018 17:10:52 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803131710.w2DHAq4s026325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 13 Mar 2018 17:10:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330868 - in head: stand/efi/loader sys/amd64/amd64 sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: stand/efi/loader sys/amd64/amd64 sys/arm64/arm64 X-SVN-Commit-Revision: 330868 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 17:10:53 -0000 Author: kevans Date: Tue Mar 13 17:10:52 2018 New Revision: 330868 URL: https://svnweb.freebsd.org/changeset/base/330868 Log: EFIRT: SetVirtualAddressMap with 1:1 mapping after exiting boot services This fixes a problem encountered on the Lenovo Thinkpad X220/Yoga 11e where runtime services would try to inexplicably jump to other parts of memory where it shouldn't be when attempting to enumerate EFI vars, causing a panic. The virtual mapping is enabled by default and can be disabled by setting efi_disable_vmap in loader.conf(5). Reviewed by: kib (earlier version) MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D14677 Modified: head/stand/efi/loader/bootinfo.c head/sys/amd64/amd64/efirt_machdep.c head/sys/arm64/arm64/efirt_machdep.c Modified: head/stand/efi/loader/bootinfo.c ============================================================================== --- head/stand/efi/loader/bootinfo.c Tue Mar 13 17:04:14 2018 (r330867) +++ head/stand/efi/loader/bootinfo.c Tue Mar 13 17:10:52 2018 (r330868) @@ -236,17 +236,48 @@ bi_copymodules(vm_offset_t addr) return(addr); } +static EFI_STATUS +efi_do_vmap(EFI_MEMORY_DESCRIPTOR *mm, UINTN sz, UINTN mmsz, UINT32 mmver) +{ + EFI_MEMORY_DESCRIPTOR *desc, *viter, *vmap; + EFI_STATUS ret; + int curr, ndesc, nset; + + nset = 0; + desc = mm; + ndesc = sz / mmsz; + vmap = malloc(sz); + if (vmap == NULL) + /* This isn't really an EFI error case, but pretend it is */ + return (EFI_OUT_OF_RESOURCES); + viter = vmap; + for (curr = 0; curr < ndesc; + curr++, desc = NextMemoryDescriptor(desc, mmsz)) { + if ((desc->Attribute & EFI_MEMORY_RUNTIME) != 0) { + ++nset; + desc->VirtualStart = desc->PhysicalStart; + *viter = *desc; + viter = NextMemoryDescriptor(viter, mmsz); + } + } + ret = RS->SetVirtualAddressMap(nset * mmsz, mmsz, mmver, vmap); + free(vmap); + return (ret); +} + static int bi_load_efi_data(struct preloaded_file *kfp) { EFI_MEMORY_DESCRIPTOR *mm; EFI_PHYSICAL_ADDRESS addr; EFI_STATUS status; + const char *efi_novmap; size_t efisz; UINTN efi_mapkey; UINTN mmsz, pages, retry, sz; UINT32 mmver; struct efi_map_header *efihdr; + bool do_vmap; #if defined(__amd64__) || defined(__aarch64__) struct efi_fb efifb; @@ -266,6 +297,11 @@ bi_load_efi_data(struct preloaded_file *kfp) } #endif + do_vmap = true; + efi_novmap = getenv("efi_disable_vmap"); + if (efi_novmap != NULL) + do_vmap = strcasecmp(efi_novmap, "YES") != 0; + efisz = (sizeof(struct efi_map_header) + 0xf) & ~0xf; /* @@ -321,6 +357,13 @@ bi_load_efi_data(struct preloaded_file *kfp) } status = BS->ExitBootServices(IH, efi_mapkey); if (EFI_ERROR(status) == 0) { + /* + * This may be disabled by setting efi_disable_vmap in + * loader.conf(5). By default we will setup the virtual + * map entries. + */ + if (do_vmap) + efi_do_vmap(mm, sz, mmsz, mmver); efihdr->memory_size = sz; efihdr->descriptor_size = mmsz; efihdr->descriptor_version = mmver; Modified: head/sys/amd64/amd64/efirt_machdep.c ============================================================================== --- head/sys/amd64/amd64/efirt_machdep.c Tue Mar 13 17:04:14 2018 (r330867) +++ head/sys/amd64/amd64/efirt_machdep.c Tue Mar 13 17:10:52 2018 (r330868) @@ -165,7 +165,7 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz)) { if ((p->md_attr & EFI_MD_ATTR_RT) == 0) continue; - if (p->md_virt != NULL) { + if (p->md_virt != NULL && (uint64_t)p->md_virt != p->md_phys) { if (bootverbose) printf("EFI Runtime entry %d is mapped\n", i); goto fail; Modified: head/sys/arm64/arm64/efirt_machdep.c ============================================================================== --- head/sys/arm64/arm64/efirt_machdep.c Tue Mar 13 17:04:14 2018 (r330867) +++ head/sys/arm64/arm64/efirt_machdep.c Tue Mar 13 17:10:52 2018 (r330868) @@ -169,7 +169,7 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz)) { if ((p->md_attr & EFI_MD_ATTR_RT) == 0) continue; - if (p->md_virt != NULL) { + if (p->md_virt != NULL && (uint64_t)p->md_virt != p->md_phys) { if (bootverbose) printf("EFI Runtime entry %d is mapped\n", i); goto fail; From owner-svn-src-all@freebsd.org Tue Mar 13 18:14:49 2018 Return-Path: Delivered-To: svn-src-all@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 09731F3D33A; Tue, 13 Mar 2018 18:14:49 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-lf0-x241.google.com (mail-lf0-x241.google.com [IPv6:2a00:1450:4010:c07::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70C986CE18; Tue, 13 Mar 2018 18:14:48 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-lf0-x241.google.com with SMTP id h127-v6so782432lfg.12; Tue, 13 Mar 2018 11:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=PD8VmU2ZCXijd5lFeUz1daQ3FR/UF1CRBXqF91NInKM=; b=nLp9zGQnUxByZXDqGiaxOSWgyXaO9/ROB55ryrf4QrrlR8x/riQqmKEJ9Eg9SaT0FU wWxEf6g/KKj74+SD0pRnLr+gdQ+nUYLv4d7J8WHuW0OhxFIy5Qy5wKkWEASZ8MnHIOzE lnKkZEQJ5UuLvU4COdl4NYPg/ARQmXUw7vKTVbqH5AUxIyntaji1OwQkGiJvK/x53LIj 6yCDqtYhu/XH/AlvFZVRTT8ezEaihIQ6Zhqek+Ozyuryw+Huv4UqTX8YKRKULN/XdUga iGCVtfqNATRpNMOu2S5rCSawYk04Qg3OgsmjhWDGrjDZesUSrhqyAr631Rdsq3Ie04/U 6vyQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alumni-cwru-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=PD8VmU2ZCXijd5lFeUz1daQ3FR/UF1CRBXqF91NInKM=; b=hk3opffCQPbul+em68j5Z9+zSankSlWCkJmwb5LWxONcopqYGcVDlNnt6/NZYZ4M6U JXbjpxatOnR+J16Ap5tA9oeE2qKKKFBvYffNPj5pZUr76Txq9AregOt44e5siI3shEnh onSRKR5GBId94bTI6/EgP8wU7AFH1cWZDzIzzO6IfkwxzyIY9v8NGs6Ne1NgZqegfH1u FcSndnXCWm/x5c007l5Nh+5+0dAiXVtSDZD9DN+uVC9GvY+2V+btJYhrDeq2yRjSxhxl nGhTNdT3y6kKH5E1dIUbizIOjeBAtjB1zie/dQ5upe3QkIl1HeLzPPxs2OwOLOGwzb+U t4zA== 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=PD8VmU2ZCXijd5lFeUz1daQ3FR/UF1CRBXqF91NInKM=; b=ESCOyF68RuM1tOf4F7OEXfcux6MvTF28uBQOb+T3sdOCrzAI5iU6Xctg5SltE03+je 5NFGbf21TDZVx4uFJzJzI6JTrtygoITtupvkbcdpo3A8EtB0ofkoF/FO5Hc1pJfUNQ+r go4Iz9na7wEQjj8EDZmkZV269s5TP3+HydNMV0WzyyrW4DULzKC9PPA9N+n5DHvzhxI7 /Bi0zQh2iiKUdm0DBdXq0/I1yrJJmIG219mCodh4kS2nub0+Az0c1HrnxbSM9rvtGbIK AnWYgWqjqYqrQOi4BuHrWzXBF5Tzg1uBv/S2wPthcOhI3B/iK857QhWtjR0C+II2YIL1 sa9A== X-Gm-Message-State: AElRT7HJxE/drmmqVqskMMDSIt7bU3Wc78dvQUxanjv9EX35E8SiCiI+ kkvGWWpRKFhkgL/S9OnjdIj76sahJA+7uF8j/Bk= X-Google-Smtp-Source: AG47ELtm+Xq4/MET5x3HiqOmQhHu4yRs+yVYwT8Dcm/3FJlG9/ZeV48WjVNwzDngxI1RE4+qmGjqUAnoj9qckJX4Djo= X-Received: by 2002:a19:114f:: with SMTP id g76-v6mr1287157lfi.0.1520964886720; Tue, 13 Mar 2018 11:14:46 -0700 (PDT) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.46.85.26 with HTTP; Tue, 13 Mar 2018 11:14:46 -0700 (PDT) In-Reply-To: <201803131503.w2DF3wLJ064986@repo.freebsd.org> References: <201803131503.w2DF3wLJ064986@repo.freebsd.org> From: Justin Hibbits Date: Tue, 13 Mar 2018 13:14:46 -0500 X-Google-Sender-Auth: UfgJL8f4Ze_y_i3_SbQ014EETA0 Message-ID: Subject: Re: svn commit: r330845 - in head/sys/powerpc: aim ofw powerpc To: Nathan Whitehorn Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 18:14:49 -0000 This broke the powerpc (32-bit) build. On Tue, Mar 13, 2018 at 10:03 AM, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Tue Mar 13 15:03:58 2018 > New Revision: 330845 > URL: https://svnweb.freebsd.org/changeset/base/330845 > > Log: > Execute PowerPC64/AIM kernel from direct map region when possible. > > When the kernel can be in real mode in early boot, we can execute from > high addresses aliased to the kernel's physical memory. If that high > address has the first two bits set to 1 (0xc...), those addresses will > automatically become part of the direct map. This reduces page table > pressure from the kernel and it sets up the kernel to be used with > radix translation, for which it has to be up here. > > This is accomplished by exploiting the fact that all PowerPC kernels are > built as position-independent executables and relocate themselves > on start. Before this patch, the kernel runs at 1:1 VA:PA, but that > VA/PA is random and set by the bootloader. Very early, it processes > its ELF relocations to operate wherever it happens to find itself. > This patch uses that mechanism to re-enter and re-relocate the kernel > a second time witha new base address set up in the early parts of > powerpc_init(). > > Reviewed by: jhibbits > Differential Revision: D14647 > > Modified: > head/sys/powerpc/aim/aim_machdep.c > head/sys/powerpc/aim/locore64.S > head/sys/powerpc/aim/mmu_oea64.c > head/sys/powerpc/ofw/ofwcall64.S > head/sys/powerpc/powerpc/machdep.c > > Modified: head/sys/powerpc/aim/aim_machdep.c > ============================================================================== > --- head/sys/powerpc/aim/aim_machdep.c Tue Mar 13 15:02:46 2018 (r330844) > +++ head/sys/powerpc/aim/aim_machdep.c Tue Mar 13 15:03:58 2018 (r330845) > @@ -160,15 +160,72 @@ extern void *dlmisstrap, *dlmisssize; > extern void *dsmisstrap, *dsmisssize; > > extern void *ap_pcpu; > +extern void __restartkernel(vm_offset_t, vm_offset_t, vm_offset_t, void *, uint32_t, register_t offset, register_t msr); > > +void aim_early_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, > + void *mdp, uint32_t mdp_cookie); > void aim_cpu_init(vm_offset_t toc); > > void > +aim_early_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, void *mdp, > + uint32_t mdp_cookie) > +{ > + register_t scratch; > + > + /* > + * If running from an FDT, make sure we are in real mode to avoid > + * tromping on firmware page tables. Everything in the kernel assumes > + * 1:1 mappings out of firmware, so this won't break anything not > + * already broken. This doesn't work if there is live OF, since OF > + * may internally use non-1:1 mappings. > + */ > + if (ofentry == 0) > + mtmsr(mfmsr() & ~(PSL_IR | PSL_DR)); > + > +#ifdef __powerpc64__ > + /* > + * If in real mode, relocate to high memory so that the kernel > + * can execute from the direct map. > + */ > + if (!(mfmsr() & PSL_DR) && > + (vm_offset_t)&aim_early_init < DMAP_BASE_ADDRESS) > + __restartkernel(fdt, 0, ofentry, mdp, mdp_cookie, > + DMAP_BASE_ADDRESS, mfmsr()); > +#endif > + > + /* Various very early CPU fix ups */ > + switch (mfpvr() >> 16) { > + /* > + * PowerPC 970 CPUs have a misfeature requested by Apple that > + * makes them pretend they have a 32-byte cacheline. Turn this > + * off before we measure the cacheline size. > + */ > + case IBM970: > + case IBM970FX: > + case IBM970MP: > + case IBM970GX: > + scratch = mfspr(SPR_HID5); > + scratch &= ~HID5_970_DCBZ_SIZE_HI; > + mtspr(SPR_HID5, scratch); > + break; > + #ifdef __powerpc64__ > + case IBMPOWER7: > + case IBMPOWER7PLUS: > + case IBMPOWER8: > + case IBMPOWER8E: > + /* XXX: get from ibm,slb-size in device tree */ > + n_slbs = 32; > + break; > + #endif > + } > +} > + > +void > aim_cpu_init(vm_offset_t toc) > { > size_t trap_offset, trapsize; > vm_offset_t trap; > - register_t msr, scratch; > + register_t msr; scratch is used in powerpc, but not powerpc64. From owner-svn-src-all@freebsd.org Tue Mar 13 18:24:22 2018 Return-Path: Delivered-To: svn-src-all@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 51A9CF3F3D0; Tue, 13 Mar 2018 18:24:22 +0000 (UTC) (envelope-from nwhitehorn@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 F38226D621; Tue, 13 Mar 2018 18:24:21 +0000 (UTC) (envelope-from nwhitehorn@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 E70941D5C9; Tue, 13 Mar 2018 18:24:21 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DIOLSR066233; Tue, 13 Mar 2018 18:24:21 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DIOLTb066232; Tue, 13 Mar 2018 18:24:21 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201803131824.w2DIOLTb066232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 13 Mar 2018 18:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330870 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 330870 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 18:24:22 -0000 Author: nwhitehorn Date: Tue Mar 13 18:24:21 2018 New Revision: 330870 URL: https://svnweb.freebsd.org/changeset/base/330870 Log: Restore missing temporary variable, deleted by accident in r330845. This unbreaks the ppc32 AIM build. Reported by: jhibbits Modified: head/sys/powerpc/aim/aim_machdep.c Modified: head/sys/powerpc/aim/aim_machdep.c ============================================================================== --- head/sys/powerpc/aim/aim_machdep.c Tue Mar 13 17:57:53 2018 (r330869) +++ head/sys/powerpc/aim/aim_machdep.c Tue Mar 13 18:24:21 2018 (r330870) @@ -228,9 +228,10 @@ aim_cpu_init(vm_offset_t toc) register_t msr; uint8_t *cache_check; int cacheline_warn; - #ifndef __powerpc64__ +#ifndef __powerpc64__ + register_t scratch; int ppc64; - #endif +#endif trap_offset = 0; cacheline_warn = 0; From owner-svn-src-all@freebsd.org Tue Mar 13 18:27:25 2018 Return-Path: Delivered-To: svn-src-all@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 B3AD2F3F7B3; Tue, 13 Mar 2018 18:27:24 +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 3C8E76D86B; Tue, 13 Mar 2018 18:27:24 +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 376C41D5D1; Tue, 13 Mar 2018 18:27:24 +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 w2DIROD2066383; Tue, 13 Mar 2018 18:27:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DIROIN066382; Tue, 13 Mar 2018 18:27:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201803131827.w2DIROIN066382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 13 Mar 2018 18:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330871 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 330871 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 18:27:25 -0000 Author: kib Date: Tue Mar 13 18:27:23 2018 New Revision: 330871 URL: https://svnweb.freebsd.org/changeset/base/330871 Log: Revert the chunk from r330410 in vm_page_reclaim_run(). There, the pages freed might be managed but the page's lock is not owned. For KPI correctness, the page lock is requried around the call to vm_page_free_prep(), which is asserted. Reclaim loop already did the work which could be done by vm_page_free_prep(), so the lock is not needed and the only consequence of not owning it is the assert trigger. Instead of adding the locking to satisfy the assert, revert to the code that calls vm_page_free_phys() directly. Reported by: pho Discussed with: jeff Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Mar 13 18:24:21 2018 (r330870) +++ head/sys/vm/vm_page.c Tue Mar 13 18:27:23 2018 (r330871) @@ -2538,7 +2538,17 @@ unlock: } if (m_mtx != NULL) mtx_unlock(m_mtx); - vm_page_free_pages_toq(&free, false); + if ((m = SLIST_FIRST(&free)) != NULL) { + vmd = VM_DOMAIN(domain); + vm_domain_free_lock(vmd); + do { + MPASS(vm_phys_domain(m) == domain); + SLIST_REMOVE_HEAD(&free, plinks.s.ss); + vm_page_free_phys(vmd, m); + } while ((m = SLIST_FIRST(&free)) != NULL); + vm_domain_free_wakeup(vmd); + vm_domain_free_unlock(vmd); + } return (error); } From owner-svn-src-all@freebsd.org Tue Mar 13 18:30:27 2018 Return-Path: Delivered-To: svn-src-all@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 20D75F3FBA6; Tue, 13 Mar 2018 18:30:27 +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 CB4FB6DB38; Tue, 13 Mar 2018 18:30:26 +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 AC2771D5D9; Tue, 13 Mar 2018 18:30:26 +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 w2DIUQSX066557; Tue, 13 Mar 2018 18:30:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DIUQLH066553; Tue, 13 Mar 2018 18:30:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201803131830.w2DIUQLH066553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 13 Mar 2018 18:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330872 - head/bin/ps X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/bin/ps X-SVN-Commit-Revision: 330872 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 18:30:27 -0000 Author: jhb Date: Tue Mar 13 18:30:26 2018 New Revision: 330872 URL: https://svnweb.freebsd.org/changeset/base/330872 Log: Add a "jail" keyword to list the name of a jail rather than its ID. Inspired by: mwlucas Reviewed by: jamie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14683 Modified: head/bin/ps/extern.h head/bin/ps/keyword.c head/bin/ps/print.c head/bin/ps/ps.1 Modified: head/bin/ps/extern.h ============================================================================== --- head/bin/ps/extern.h Tue Mar 13 18:27:23 2018 (r330871) +++ head/bin/ps/extern.h Tue Mar 13 18:30:26 2018 (r330872) @@ -55,6 +55,7 @@ char *emulname(KINFO *, VARENT *); VARENT *find_varentry(VAR *); const char *fmt_argv(char **, char *, char *, size_t); double getpcpu(const KINFO *); +char *jailname(KINFO *, VARENT *); char *kvar(KINFO *, VARENT *); char *label(KINFO *, VARENT *); char *loginclass(KINFO *, VARENT *); Modified: head/bin/ps/keyword.c ============================================================================== --- head/bin/ps/keyword.c Tue Mar 13 18:27:23 2018 (r330871) +++ head/bin/ps/keyword.c Tue Mar 13 18:30:26 2018 (r330872) @@ -108,6 +108,7 @@ static VAR var[] = { {"inblk", "INBLK", NULL, "read-blocks", USER, rvar, ROFF(ru_inblock), LONG, "ld", 0}, {"inblock", "", "inblk", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"jail", "JAIL", NULL, "jail-name", LJUST, jailname, 0, CHAR, NULL, 0}, {"jid", "JID", NULL, "jail-id", 0, kvar, KOFF(ki_jid), INT, "d", 0}, {"jobc", "JOBC", NULL, "job-control-count", 0, kvar, KOFF(ki_jobc), SHORT, "d", 0}, Modified: head/bin/ps/print.c ============================================================================== --- head/bin/ps/print.c Tue Mar 13 18:27:23 2018 (r330871) +++ head/bin/ps/print.c Tue Mar 13 18:30:26 2018 (r330872) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -839,4 +840,17 @@ loginclass(KINFO *k, VARENT *ve __unused) return (strdup("-")); } return (strdup(k->ki_p->ki_loginclass)); +} + +char * +jailname(KINFO *k, VARENT *ve __unused) +{ + char *name; + + if (k->ki_p->ki_jid == 0) + return (strdup("-")); + name = jail_getname(k->ki_p->ki_jid); + if (name == NULL) + return (strdup("-")); + return (name); } Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Tue Mar 13 18:27:23 2018 (r330871) +++ head/bin/ps/ps.1 Tue Mar 13 18:30:26 2018 (r330872) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd January 23, 2018 +.Dd March 13, 2018 .Dt PS 1 .Os .Sh NAME @@ -576,6 +576,8 @@ group name (from egid) (alias .It Cm inblk total blocks read (alias .Cm inblock ) +.It Cm jail +jail name .It Cm jid jail ID .It Cm jobc From owner-svn-src-all@freebsd.org Tue Mar 13 19:49:07 2018 Return-Path: Delivered-To: svn-src-all@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 130A7F4AB17; Tue, 13 Mar 2018 19:49:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2EFE70ECB; Tue, 13 Mar 2018 19:49:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE0D71E289; Tue, 13 Mar 2018 19:49:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DJn62m006280; Tue, 13 Mar 2018 19:49:06 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DJn641006278; Tue, 13 Mar 2018 19:49:06 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201803131949.w2DJn641006278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 13 Mar 2018 19:49:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330875 - head/usr.sbin/usbconfig X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/usr.sbin/usbconfig X-SVN-Commit-Revision: 330875 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 19:49:07 -0000 Author: trasz Date: Tue Mar 13 19:49:06 2018 New Revision: 330875 URL: https://svnweb.freebsd.org/changeset/base/330875 Log: Add "usbconfig dump_all_desc", a subcommand to dump all device and config descriptors. Reviewed by: hselasky@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/usbconfig/usbconfig.8 head/usr.sbin/usbconfig/usbconfig.c Modified: head/usr.sbin/usbconfig/usbconfig.8 ============================================================================== --- head/usr.sbin/usbconfig/usbconfig.8 Tue Mar 13 19:28:03 2018 (r330874) +++ head/usr.sbin/usbconfig/usbconfig.8 Tue Mar 13 19:49:06 2018 (r330875) @@ -97,6 +97,8 @@ Remove a quirk. Add quirk for the currently selected USB device. .It Cm remove_quirk Ar quirk_name Remove a quirk for the currently selected USB device. +.It Cm dump_all_desc +Display the device and configuration descriptors. .It Cm dump_quirk_names Display the list of supported quirk names. .It Cm dump_device_quirks Modified: head/usr.sbin/usbconfig/usbconfig.c ============================================================================== --- head/usr.sbin/usbconfig/usbconfig.c Tue Mar 13 19:28:03 2018 (r330874) +++ head/usr.sbin/usbconfig/usbconfig.c Tue Mar 13 19:49:06 2018 (r330875) @@ -77,6 +77,7 @@ struct options { uint8_t got_power_on:1; uint8_t got_dump_device_quirks:1; uint8_t got_dump_quirk_names:1; + uint8_t got_dump_all_desc:1; uint8_t got_dump_device_desc:1; uint8_t got_dump_curr_config:1; uint8_t got_dump_all_config:1; @@ -112,6 +113,7 @@ enum { T_SHOW_IFACE_DRIVER, T_DUMP_QUIRK_NAMES, T_DUMP_DEVICE_QUIRKS, + T_DUMP_ALL_DESC, T_DUMP_DEVICE_DESC, T_DUMP_CURR_CONFIG_DESC, T_DUMP_ALL_CONFIG_DESC, @@ -144,6 +146,7 @@ static const struct token token[] = { {"remove_quirk", T_REMOVE_QUIRK, 1}, {"dump_quirk_names", T_DUMP_QUIRK_NAMES, 0}, {"dump_device_quirks", T_DUMP_DEVICE_QUIRKS, 0}, + {"dump_all_desc", T_DUMP_ALL_DESC, 0}, {"dump_device_desc", T_DUMP_DEVICE_DESC, 0}, {"dump_curr_config_desc", T_DUMP_CURR_CONFIG_DESC, 0}, {"dump_all_config_desc", T_DUMP_ALL_CONFIG_DESC, 0}, @@ -283,6 +286,7 @@ usage(void) " remove_quirk " "\n" " dump_quirk_names" "\n" " dump_device_quirks" "\n" + " dump_all_desc" "\n" " dump_device_desc" "\n" " dump_curr_config_desc" "\n" " dump_all_config_desc" "\n" @@ -489,7 +493,8 @@ flush_command(struct libusb20_backend *pbe, struct opt } } dump_any = - (opt->got_dump_device_desc || + (opt->got_dump_all_desc || + opt->got_dump_device_desc || opt->got_dump_curr_config || opt->got_dump_all_config || opt->got_dump_info); @@ -508,6 +513,10 @@ flush_command(struct libusb20_backend *pbe, struct opt } else if (opt->got_dump_curr_config) { printf("\n"); dump_config(pdev, 0); + } else if (opt->got_dump_all_desc) { + printf("\n"); + dump_device_desc(pdev); + dump_config(pdev, 1); } if (dump_any) { printf("\n"); @@ -694,6 +703,12 @@ main(int argc, char **argv) if (opt->got_get_template) duplicate_option(argv[n]); opt->got_get_template = 1; + opt->got_any++; + break; + case T_DUMP_ALL_DESC: + if (opt->got_dump_all_desc) + duplicate_option(argv[n]); + opt->got_dump_all_desc = 1; opt->got_any++; break; case T_DUMP_DEVICE_DESC: From owner-svn-src-all@freebsd.org Tue Mar 13 19:56:11 2018 Return-Path: Delivered-To: svn-src-all@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 7A1C8F4B3A8; Tue, 13 Mar 2018 19:56:11 +0000 (UTC) (envelope-from brooks@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 231DF7143E; Tue, 13 Mar 2018 19:56:11 +0000 (UTC) (envelope-from brooks@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 1DF301E403; Tue, 13 Mar 2018 19:56:11 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DJuAG0011166; Tue, 13 Mar 2018 19:56:10 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DJuAwP011165; Tue, 13 Mar 2018 19:56:10 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803131956.w2DJuAwP011165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 13 Mar 2018 19:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330876 - head/sys/dev/isp X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/dev/isp X-SVN-Commit-Revision: 330876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 19:56:11 -0000 Author: brooks Date: Tue Mar 13 19:56:10 2018 New Revision: 330876 URL: https://svnweb.freebsd.org/changeset/base/330876 Log: Fix ISP_FC_LIP and ISP_RESCAN on big-endian 64-bit systems. For _IO() ioctls, addr is a pointer to uap->data which is a caddr_t. When the caddr_t stores an int, dereferencing addr as an (int *) results in truncation on little-endian 64-bit systems and corruption (owing to extracting top bits) on big-endian 64-bit systems. In practice the value of chan was probably always zero on systems of the latter type as all such FreeBSD platforms use a register-based calling convention. Reviewed by: mav Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14673 Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Tue Mar 13 19:49:06 2018 (r330875) +++ head/sys/dev/isp/isp_freebsd.c Tue Mar 13 19:56:10 2018 (r330876) @@ -444,7 +444,7 @@ ispioctl(struct cdev *dev, u_long c, caddr_t addr, int case ISP_RESCAN: if (IS_FC(isp)) { - chan = *(int *)addr; + chan = *(intptr_t *)addr; if (chan < 0 || chan >= isp->isp_nchan) { retval = -ENXIO; break; @@ -461,7 +461,7 @@ ispioctl(struct cdev *dev, u_long c, caddr_t addr, int case ISP_FC_LIP: if (IS_FC(isp)) { - chan = *(int *)addr; + chan = *(intptr_t *)addr; if (chan < 0 || chan >= isp->isp_nchan) { retval = -ENXIO; break; From owner-svn-src-all@freebsd.org Tue Mar 13 20:31:09 2018 Return-Path: Delivered-To: svn-src-all@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 68011F4DAB4; Tue, 13 Mar 2018 20:31:09 +0000 (UTC) (envelope-from dteske@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 5F146732BF; Tue, 13 Mar 2018 20:31:08 +0000 (UTC) (envelope-from dteske@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 09B6B1E9DB; Tue, 13 Mar 2018 20:31:08 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DKV7Mj030469; Tue, 13 Mar 2018 20:31:07 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DKV7Ig030468; Tue, 13 Mar 2018 20:31:07 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201803132031.w2DKV7Ig030468@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Mar 2018 20:31:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330878 - head/lib/libdpv X-SVN-Group: head X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: head/lib/libdpv X-SVN-Commit-Revision: 330878 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 20:31:09 -0000 Author: dteske Date: Tue Mar 13 20:31:07 2018 New Revision: 330878 URL: https://svnweb.freebsd.org/changeset/base/330878 Log: Fix typo and lint/igor warnings Modified: head/lib/libdpv/dpv.3 Modified: head/lib/libdpv/dpv.3 ============================================================================== --- head/lib/libdpv/dpv.3 Tue Mar 13 20:16:07 2018 (r330877) +++ head/lib/libdpv/dpv.3 Tue Mar 13 20:31:07 2018 (r330878) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jan 26, 2016 +.Dd Mar 13, 2018 .Dt DPV 3 .Os .Sh NAME @@ -36,7 +36,8 @@ .In dpv.h .Ft int .Fo dpv -.Fa "struct dpv_config *config, struct dpv_file_node *file_list" +.Fa "struct dpv_config *config" +.Fa "struct dpv_file_node *file_list" .Fc .Ft void .Fo dpv_free @@ -60,8 +61,7 @@ or The .Fn dpv .Fa config -argument contains the following properties for configuring global display -features: +argument properties for configuring global display features: .Bd -literal -offset indent struct dpv_config { uint8_t keep_tite; /* Cleaner exit for scripts */ @@ -113,11 +113,12 @@ member of the .Fn dpv .Fa config argument is a mask of bit fields indicating various processing options. -Possible flags are as follows: +Possible flags are: .Bl -tag -width DPV_NO_OVERRUN .It Dv DPV_TEST_MODE Enable test mode. -In test mode, the +In test mode, +the .Fn action callback of the .Fa config @@ -126,18 +127,21 @@ Appends .Dq [TEST MODE] to the status line .Po -to override, set the +to override, +set the .Va status_format member of the .Fn dpv .Fa config argument; -e.g., to +for example, +to .Dv DPV_STATUS_DEFAULT .Pc . .It Dv DPV_WIDE_MODE Enable wide mode. -In wide mode, the length of the +In wide mode, +the length of the .Va aprompt and .Va pprompt @@ -169,7 +173,8 @@ does not support color environment variable is ignored .Pc . .It Dv DPV_NO_OVERRUN -When enabled, callbacks for the current +When enabled, +callbacks for the current .Vt dpv_file_node are terminated when .Fn action @@ -189,7 +194,7 @@ argument to .Fn dpv is a pointer to a .Dq linked-list , -described as follows in +described in .In dpv.h : .Bd -literal -offset indent struct dpv_file_node { @@ -206,7 +211,8 @@ struct dpv_file_node { For each of the items in the .Fa file_list .Dq linked-list -argument, the +argument, +the .Fn action callback member of the .Fn dpv @@ -214,7 +220,7 @@ callback member of the argument is called. The .Fn action -function should perform a +function performs a .Dq nominal action on the file and return. The return value of @@ -231,7 +237,7 @@ provides a reference to the current .Vt dpv_file_node being processed. .Fa out -provides a file descriptor where the data should go. +provides a file descriptor where the data goes. .Pp If the .Va output @@ -244,7 +250,7 @@ the .Fa out file descriptor of .Fn action -will be zero and should be ignored. +will be zero and can be ignored. If .Fa output was set to DPV_OUTPUT_FILE, @@ -257,14 +263,16 @@ was set to DPV_OUTPUT_SHELL, will be an open file descriptor to a pipe for a spawned shell program. When .Fa out -is greater than zero, you should write any data you have read back to +is greater than zero, +write data that has been read back to .Fa out . .Pp To abort .Fn dpv , either from the .Fn action -callback or asynchronously from a signal handler, two globals are provided via +callback or asynchronously from a signal handler, +two globals are provided via .In dpv.h : .Bd -literal -offset indent extern int dpv_interrupt; /* Set to TRUE in interrupt handler */ @@ -272,11 +280,12 @@ extern int dpv_abort; /* Set to true in callback t .Ed .Pp These globals are not automatically reset and must be manually maintained. -Don't forget to reset these globals before subsequent invocations of +Do not forget to reset these globals before subsequent invocations of .Fn dpv when making multiple calls from the same program. .Pp -In addition, the +In addition, +the .Va status member of the .Fn action @@ -284,7 +293,7 @@ member of the argument can be used to control callbacks for the current file. The .Va status -member can be set to any of the following from +member can be set to any of the below from .In dpv.h : .Bd -literal -offset indent enum dpv_status { @@ -296,13 +305,17 @@ enum dpv_status { .Pp The default .Fa status -is zero, DPV_STATUS_RUNING, which keeps the callbacks coming for the current +is zero, +DPV_STATUS_RUNNING, +which keeps the callbacks coming for the current .Fn file . Setting .Ql file->status to anything other than DPV_STATUS_RUNNING will cause .Fn dpv -to loop to the next file, effecting the next callback, if any. +to loop to the next file, +effecting the next callback, +if any. .Pp The .Fn action @@ -318,7 +331,7 @@ Percentages are reported through the return value of the .Fn action callback. -Throughput statistics are calculated from the following global +Throughput statistics are calculated from the below global .Vt int in .In dpv.h : @@ -326,7 +339,7 @@ in extern int dpv_overall_read; .Ed .Pp -This should be set to the number of bytes that have been read for all files. +Set this to the number of bytes that have been read for all files. Throughput information is displayed in the status line .Pq only available when using Xr dialog 3 at the bottom of the screen. @@ -335,18 +348,20 @@ See DPV_DISPLAY_LIBDIALOG above. Note that .Va dpv_overall_read does not have to represent bytes. -For example, you can change the +For example, +the .Va status_format -to display something other than +can be changed to display something other than .Dq Li bytes and increment .Va dpv_overall_read accordingly -.Pq e.g., counting lines . +.Pq for example, counting lines . .Pp When .Fn dpv -is processing the current file, the +is processing the current file, +the .Va length and .Va read @@ -355,7 +370,8 @@ members of the .Fa file argument are used for calculating the display of mini progress bars .Po -if enabled; see +if enabled; +see .Va pbar_size above .Pc . @@ -381,7 +397,7 @@ function performs on private global variables initialized by .Fn dpv . .Sh ENVIRONMENT -The following environment variables are referenced by +The below environment variables are referenced by .Nm : .Bl -tag -width ".Ev USE_COLOR" .It Ev DIALOG @@ -398,17 +414,20 @@ or .Ql Xdialog .Pq for Dv DPV_DISPLAY_XDIALOG . .It Ev DIALOGRC -If set and non-NULL, path to +If set and non-NULL, +path to .Ql .dialogrc file. .It Ev HOME If .Ql Ev $DIALOGRC -is either not set or NULL, used as a prefix to +is either not set or NULL, +used as a prefix to .Ql .dialogrc -.Pq i.e., Ql $HOME/.dialogrc . +.Pq that is, Ql $HOME/.dialogrc . .It Ev USE_COLOR -If set and NULL, disables the use of color when using +If set and NULL, +disables the use of color when using .Xr dialog 1 .Pq does not apply to Xr Xdialog 1 . .It Ev msg_done Ev msg_fail Ev msg_pending @@ -418,7 +437,8 @@ Internationalization strings for overriding the defaul and .Ql Pending respectively. -To prevent their usage, explicitly set the +To prevent their usage, +explicitly set the .Va msg_done , .Va msg_fail , and @@ -471,11 +491,11 @@ This is a known issue with the .Ql --gauge widget in .Xr Xdialog 1 . -Embed escaped newlines within prompt text(s) to force line breaks. +Embed escaped newlines within prompt text to force line breaks. .Pp .Xr dialog 1 does not display the first character after a series of escaped escape-sequences -(e.g., ``\\\\n'' produces ``\\'' instead of ``\\n''). +(for example, ``\\\\n'' produces ``\\'' instead of ``\\n''). This is a known issue with .Xr dialog 1 and does not affect @@ -483,10 +503,10 @@ and does not affect or .Xr Xdialog 1 . .Pp -If your application ignores +If an application ignores .Ev USE_COLOR when set and NULL before calling -.Xr dpv 3 +.Fn dpv with color escape sequences anyway, .Xr dialog 3 and From owner-svn-src-all@freebsd.org Tue Mar 13 20:35:33 2018 Return-Path: Delivered-To: svn-src-all@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 94774F4E536; Tue, 13 Mar 2018 20:35:33 +0000 (UTC) (envelope-from dteske@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 40778745C1; Tue, 13 Mar 2018 20:35:33 +0000 (UTC) (envelope-from dteske@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 3B5A41EA5B; Tue, 13 Mar 2018 20:35:33 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DKZXMR034706; Tue, 13 Mar 2018 20:35:33 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DKZXoP034705; Tue, 13 Mar 2018 20:35:33 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201803132035.w2DKZXoP034705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Mar 2018 20:35:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330879 - head/lib/libfigpar X-SVN-Group: head X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: head/lib/libfigpar X-SVN-Commit-Revision: 330879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 20:35:33 -0000 Author: dteske Date: Tue Mar 13 20:35:32 2018 New Revision: 330879 URL: https://svnweb.freebsd.org/changeset/base/330879 Log: Fix lint/igor warnings Modified: head/lib/libfigpar/figpar.3 Modified: head/lib/libfigpar/figpar.3 ============================================================================== --- head/lib/libfigpar/figpar.3 Tue Mar 13 20:31:07 2018 (r330878) +++ head/lib/libfigpar/figpar.3 Tue Mar 13 20:35:32 2018 (r330879) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Nov 2, 2015 +.Dd Mar 13, 2018 .Dt FIGPAR 3 .Os .Sh NAME @@ -38,22 +38,30 @@ .In figpar.h .Ft int .Fo parse_config -.Fa "struct figpar_config options[], const char *path" -.Fa "int \*[lp]*unknown\*[rp]\*[lp]struct figpar_config *option, uint32_t line" -.Fa "char *directive, char *value\*[rp], uint8_t processing_options" +.Fa "struct figpar_config options[]" +.Fa "const char *path" +.Fa "int \*[lp]*unknown\*[rp]\*[lp]struct figpar_config *option" +.Fa "uint32_t line" +.Fa "char *directive" +.Fa "char *value\*[rp]" +.Fa "uint8_t processing_options" .Fc .Ft "struct figpar_config *" .Fo get_config_option -.Fa "struct figpar_config options[], const char *directive" +.Fa "struct figpar_config options[]" +.Fa "const char *directive" .Fc .In string_m.h .Ft int .Fo replaceall -.Fa "char *source, const char *find, const char *replace" +.Fa "char *source" +.Fa "const char *find" +.Fa "const char *replace" .Fc .Ft unsigned int .Fo strcount -.Fa "const char *source, const char *find" +.Fa "const char *source" +.Fa "const char *find" .Fc .Ft void .Fo strexpand @@ -70,7 +78,8 @@ .Sh DESCRIPTION The .Nm -library provides a light-weight, portable framework for parsing configuration +library provides a light-weight, +portable framework for parsing configuration files. The library uses .Xr open 2 , @@ -87,8 +96,9 @@ provides raw data to a set of callback functions. These callback functions can in-turn initiate abort through their return value, allowing custom syntax validation during parsing. .Pp -Configuration directives, types, and callback functions are provided through -data structures defined in +Configuration directives, +types, +and callback functions are provided through data structures defined in .In figpar.h : .Bd -literal -offset indent struct figpar_config { @@ -132,7 +142,7 @@ argument to .Fn parse_config is a mask of bit fields which indicate various processing options. -The possible flags are as follows: +The possible flags are: .Bl -tag -width FIGPAR_BREAK_ON_SEMICOLON .It Dv FIGPAR_BREAK_ON_EQUALS An equals sign @@ -151,7 +161,8 @@ Normally directives are matched case insensitively usi .Xr fnmatch 3 . This flag enables directive matching to be case sensitive. .It Dv FIGPAR_REQUIRE_EQUALS -If a directive is not followed by an equals, processing is aborted. +If a directive is not followed by an equals, +processing is aborted. .It Dv FIGPAR_STRICT_EQUALS Equals must be part of the directive to be considered a delimiter between directive and value. @@ -159,7 +170,7 @@ directive and value. .Pp The .Fa options -struct array pointer can be NULL and every directive will invoke the +struct array pointer can be NULL and every directive will run the .Fn unknown function argument. .Pp @@ -168,13 +179,16 @@ The directive for each figpar_config item in the options argument is matched against each parsed directive using .Xr fnmatch 3 until a match is found. -If a match is found, the +If a match is found, +the .Fn action -function for that figpar_config directive is invoked with the line number, -directive, and value. -Otherwise if no match, the +function for that figpar_config directive is run with the line number, +directive, +and value. +Otherwise if no match, +the .Fn unknown -function is invoked +function is run .Pq with the same arguments . .Pp If either @@ -197,19 +211,20 @@ is entirely optional as-is the use of .Fa "enum figpar_cfgtype" or .Fa "union figpar_cfgvalue" . -For example, you could choose to pass a NULL pointer to +For example, +a NULL pointer can be passed to .Fn parse_config -for the first argument and then provide a simple +for the first argument while providing a simple .Fa unknown function based on .Xr queue 3 -that populates a singly-linked list of your own struct containing the +that populates a singly-linked list of a struct containing the .Fa directive and .Fa value . .Pp -In addition, the following miscellaneous string manipulation routines are -provided by +In addition, +miscellaneous string manipulation routines are provided by .In string_m.h : .Bl -tag -width strexpandnl() .It Fn replaceall @@ -224,8 +239,7 @@ Count the number of occurrences of one string that app .Fa source string. Return value is the total count. -An example use would be if you need to know how large a block of memory needs -to be for a +An example use would be to show how large a block of memory needs to be for a .Fn replaceall series. .It Fn strexpand From owner-svn-src-all@freebsd.org Tue Mar 13 20:39:07 2018 Return-Path: Delivered-To: svn-src-all@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 6E24DF4E9D2; Tue, 13 Mar 2018 20:39:07 +0000 (UTC) (envelope-from brooks@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 0FF7374842; Tue, 13 Mar 2018 20:39:07 +0000 (UTC) (envelope-from brooks@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 0859F1EA63; Tue, 13 Mar 2018 20:39:07 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DKd62j034861; Tue, 13 Mar 2018 20:39:06 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DKd6r2034860; Tue, 13 Mar 2018 20:39:06 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803132039.w2DKd6r2034860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 13 Mar 2018 20:39:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330880 - head/sys/dev/md X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/dev/md X-SVN-Commit-Revision: 330880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 20:39:07 -0000 Author: brooks Date: Tue Mar 13 20:39:06 2018 New Revision: 330880 URL: https://svnweb.freebsd.org/changeset/base/330880 Log: Don't overflow the kernel struct mdio in the MDIOCLIST ioctl. Always terminate the list with -1 and document the ioctl behavior. This preserves existing behavior as seen from userspace with the addition of the unconditional termination which will not be seen by working consumers of MDIOCLIST. Because this ioctl can only be performed by root (in default configurations) and is not used in the base system this bug is not deemed to warrant either a security advisory or an eratta notice. Reviewed by: kib Obtained from: CheriBSD Discussed with: security-officer (gordon) MFC after: 3 days Security: kernel heap buffer overflow Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14685 Modified: head/sys/dev/md/md.c Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Tue Mar 13 20:35:32 2018 (r330879) +++ head/sys/dev/md/md.c Tue Mar 13 20:39:06 2018 (r330880) @@ -1750,13 +1750,24 @@ err_after_new: strlen(sc->file) + 1); return (error); case MDIOCLIST: + /* + * Write the number of md devices to mdio->md_pad[0]. + * Write the unit number of the first (MDNPAD - 2) units + * to mdio->md_pad[1::(MDNPAD - 2)] and terminate the + * list with -1. + * + * XXX: There is currently no mechanism to retrieve unit + * numbers for more than (MDNPAD - 2) units. + * + * XXX: Due to the use of LIST_INSERT_HEAD in mdnew(), the + * list of visible unit numbers not stable. + */ i = 1; LIST_FOREACH(sc, &md_softc_list, list) { - if (i == MDNPAD - 1) - mdio->md_pad[i] = -1; - else + if (i < MDNPAD - 1) mdio->md_pad[i++] = sc->unit; } + mdio->md_pad[MIN(i, MDNPAD - 1)] = -1; mdio->md_pad[0] = i - 1; return (0); default: From owner-svn-src-all@freebsd.org Tue Mar 13 20:54:18 2018 Return-Path: Delivered-To: svn-src-all@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 A69A3F4FA93; Tue, 13 Mar 2018 20:54:18 +0000 (UTC) (envelope-from brooks@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 5722D75448; Tue, 13 Mar 2018 20:54:18 +0000 (UTC) (envelope-from brooks@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 51EB11ED90; Tue, 13 Mar 2018 20:54:18 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DKsIlY044893; Tue, 13 Mar 2018 20:54:18 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DKsIv8044892; Tue, 13 Mar 2018 20:54:18 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803132054.w2DKsIv8044892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 13 Mar 2018 20:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330881 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 330881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 20:54:18 -0000 Author: brooks Date: Tue Mar 13 20:54:18 2018 New Revision: 330881 URL: https://svnweb.freebsd.org/changeset/base/330881 Log: md_pad is used by MDIOCLIST and not available for future use. MFC after: 1 week Modified: head/sys/sys/mdioctl.h Modified: head/sys/sys/mdioctl.h ============================================================================== --- head/sys/sys/mdioctl.h Tue Mar 13 20:39:06 2018 (r330880) +++ head/sys/sys/mdioctl.h Tue Mar 13 20:54:18 2018 (r330881) @@ -64,7 +64,7 @@ struct md_ioctl { int md_fwheads; /* firmware heads */ int md_fwsectors; /* firmware sectors */ char *md_label; /* label of the device */ - int md_pad[MDNPAD]; /* padding for future ideas */ + int md_pad[MDNPAD]; /* storage for MDIOCLIST */ }; #define MD_NAME "md" From owner-svn-src-all@freebsd.org Tue Mar 13 21:42:39 2018 Return-Path: Delivered-To: svn-src-all@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 02213F530A8; Tue, 13 Mar 2018 21:42:39 +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 C9D077796F; Tue, 13 Mar 2018 21:42:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A85551F55E; Tue, 13 Mar 2018 21:42:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DLgcJQ070080; Tue, 13 Mar 2018 21:42:38 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DLgc2F070077; Tue, 13 Mar 2018 21:42:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201803132142.w2DLgc2F070077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 13 Mar 2018 21:42:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330882 - head/sys/dev/cxgbe/tom X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 330882 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 21:42:39 -0000 Author: jhb Date: Tue Mar 13 21:42:38 2018 New Revision: 330882 URL: https://svnweb.freebsd.org/changeset/base/330882 Log: Simplify error handling in t4_tom.ko module loading. - Change t4_ddp_mod_load() to return void instead of always returning success. This avoids having to pretend to have proper support for unloading when only part of t4_tom_mod_load() has run. - If t4_register_uld() fails, don't invoke t4_tom_mod_unload() directly. The module handling code in the kernel invokes MOD_UNLOAD on a module whose MOD_LOAD fails with an error already. Reviewed by: np (part of a larger patch) MFC after: 1 month Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/tom/t4_ddp.c head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Tue Mar 13 20:54:18 2018 (r330881) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Tue Mar 13 21:42:38 2018 (r330882) @@ -1939,7 +1939,7 @@ t4_aio_queue_ddp(struct socket *so, struct kaiocb *job return (0); } -int +void t4_ddp_mod_load(void) { @@ -1948,7 +1948,6 @@ t4_ddp_mod_load(void) TAILQ_INIT(&ddp_orphan_pagesets); mtx_init(&ddp_orphan_pagesets_lock, "ddp orphans", NULL, MTX_DEF); TASK_INIT(&ddp_orphan_task, 0, ddp_free_orphan_pagesets, NULL); - return (0); } void Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Tue Mar 13 20:54:18 2018 (r330881) +++ head/sys/dev/cxgbe/tom/t4_tom.c Tue Mar 13 21:42:38 2018 (r330882) @@ -1170,7 +1170,6 @@ t4_aio_queue_tom(struct socket *so, struct kaiocb *job static int t4_tom_mod_load(void) { - int rc; struct protosw *tcp_protosw, *tcp6_protosw; /* CPL handlers */ @@ -1178,9 +1177,7 @@ t4_tom_mod_load(void) t4_init_listen_cpl_handlers(); t4_init_cpl_io_handlers(); - rc = t4_ddp_mod_load(); - if (rc != 0) - return (rc); + t4_ddp_mod_load(); tcp_protosw = pffindproto(PF_INET, IPPROTO_TCP, SOCK_STREAM); if (tcp_protosw == NULL) @@ -1202,11 +1199,7 @@ t4_tom_mod_load(void) ifaddr_evhandler = EVENTHANDLER_REGISTER(ifaddr_event, t4_tom_ifaddr_event, NULL, EVENTHANDLER_PRI_ANY); - rc = t4_register_uld(&tom_uld_info); - if (rc != 0) - t4_tom_mod_unload(); - - return (rc); + return (t4_register_uld(&tom_uld_info)); } static void Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Tue Mar 13 20:54:18 2018 (r330881) +++ head/sys/dev/cxgbe/tom/t4_tom.h Tue Mar 13 21:42:38 2018 (r330882) @@ -389,7 +389,7 @@ void t4_free_page_pods(struct ppod_reservation *); int t4_soreceive_ddp(struct socket *, struct sockaddr **, struct uio *, struct mbuf **, struct mbuf **, int *); int t4_aio_queue_ddp(struct socket *, struct kaiocb *); -int t4_ddp_mod_load(void); +void t4_ddp_mod_load(void); void t4_ddp_mod_unload(void); void ddp_assert_empty(struct toepcb *); void ddp_init_toep(struct toepcb *); From owner-svn-src-all@freebsd.org Tue Mar 13 22:54:30 2018 Return-Path: Delivered-To: svn-src-all@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 BB6F8F57DF9; Tue, 13 Mar 2018 22:54:30 +0000 (UTC) (envelope-from glebius@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 656937AB4A; Tue, 13 Mar 2018 22:54:30 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 605332003C; Tue, 13 Mar 2018 22:54:30 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DMsUCc005594; Tue, 13 Mar 2018 22:54:30 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DMsU2r005593; Tue, 13 Mar 2018 22:54:30 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201803132254.w2DMsU2r005593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 13 Mar 2018 22:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330883 - head/stand/userboot/userboot X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/stand/userboot/userboot X-SVN-Commit-Revision: 330883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 22:54:30 -0000 Author: glebius Date: Tue Mar 13 22:54:29 2018 New Revision: 330883 URL: https://svnweb.freebsd.org/changeset/base/330883 Log: Fix typo that misteriously passes compilation. Modified: head/stand/userboot/userboot/main.c Modified: head/stand/userboot/userboot/main.c ============================================================================== --- head/stand/userboot/userboot/main.c Tue Mar 13 21:42:38 2018 (r330882) +++ head/stand/userboot/userboot/main.c Tue Mar 13 22:54:29 2018 (r330883) @@ -159,7 +159,7 @@ extract_currdev(void) //bzero(&dev, sizeof(dev)); #if defined(USERBOOT_ZFS_SUPPORT) - CT_ASSERT(sizeof(struct disk_devdesc) >= sizeof(struct zfs_devdesc)); + CTASSERT(sizeof(struct disk_devdesc) >= sizeof(struct zfs_devdesc)); if (userboot_zfs_found) { struct zfs_devdesc zdev; From owner-svn-src-all@freebsd.org Tue Mar 13 23:05:52 2018 Return-Path: Delivered-To: svn-src-all@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 A5886F5897F; Tue, 13 Mar 2018 23:05:52 +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 582397B3D2; Tue, 13 Mar 2018 23:05:52 +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 52CB5201C3; Tue, 13 Mar 2018 23:05:52 +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 w2DN5q0C010777; Tue, 13 Mar 2018 23:05:52 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DN5pnc010768; Tue, 13 Mar 2018 23:05:51 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201803132305.w2DN5pnc010768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 13 Mar 2018 23:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330884 - in head/sys: dev/cxgbe dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/tom X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: dev/cxgbe dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/tom X-SVN-Commit-Revision: 330884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 23:05:53 -0000 Author: jhb Date: Tue Mar 13 23:05:51 2018 New Revision: 330884 URL: https://svnweb.freebsd.org/changeset/base/330884 Log: Support for TLS offload of TOE connections on T6 adapters. The TOE engine in Chelsio T6 adapters supports offloading of TLS encryption and TCP segmentation for offloaded connections. Sockets using TLS are required to use a set of custom socket options to upload RX and TX keys to the NIC and to enable RX processing. Currently these socket options are implemented as TCP options in the vendor specific range. A patched OpenSSL library will be made available in a port / package for use with the TLS TOE support. TOE sockets can either offload both transmit and reception of TLS records or just transmit. TLS offload (both RX and TX) is enabled by setting the dev.t6nex..tls sysctl to 1 and requires TOE to be enabled on the relevant interface. Transmit offload can be used on any "normal" or TLS TOE socket by using the custom socket option to program a transmit key. This permits most TOE sockets to transparently offload TLS when applications use a patched SSL library (e.g. using LD_LIBRARY_PATH to request use of a patched OpenSSL library). Receive offload can only be used with TOE sockets using the TLS mode. The dev.t6nex.0.toe.tls_rx_ports sysctl can be set to a list of TCP port numbers. Any connection with either a local or remote port number in that list will be created as a TLS socket rather than a plain TOE socket. Note that although this sysctl accepts an arbitrary list of port numbers, the sysctl(8) tool is only able to set sysctl nodes to a single value. A TLS socket will hang without receiving data if used by an application that is not using a patched SSL library. Thus, the tls_rx_ports node should be used with care. For a server mostly concerned with offloading TLS transmit, this node is not needed as plain TOE sockets will fall back to software crypto when using an unpatched SSL library. New per-interface statistics nodes are added giving counts of TLS packets and payload bytes (payload bytes do not include TLS headers or authentication tags/MACs) offloaded via the TOE engine, e.g.: dev.cc.0.stats.rx_tls_octets: 149 dev.cc.0.stats.rx_tls_records: 13 dev.cc.0.stats.tx_tls_octets: 26501823 dev.cc.0.stats.tx_tls_records: 1620 TLS transmit work requests are constructed by a new variant of t4_push_frames() called t4_push_tls_records() in tom/t4_tls.c. TLS transmit work requests require a buffer containing IVs. If the IVs are too large to fit into the work request, a separate buffer is allocated when constructing a work request. This buffer is associated with the transmit descriptor and freed when the descriptor is ACKed by the adapter. Received TLS frames use two new CPL messages. The first message is a CPL_TLS_DATA containing the decryped payload of a single TLS record. The handler places the mbuf containing the received payload on an mbufq in the TOE pcb. The second message is a CPL_RX_TLS_CMP message which includes a copy of the TLS header and indicates if there were any errors. The handler for this message places the TLS header into the socket buffer followed by the saved mbuf with the payload data. Both of these handlers are contained in tom/t4_tls.c. A few routines were exposed from t4_cpl_io.c for use by t4_tls.c including send_rx_credits(), a new send_rx_modulate(), and t4_close_conn(). TLS keys for both transmit and receive are stored in onboard memory in the NIC in the "TLS keys" memory region. In some cases a TLS socket can hang with pending data available in the NIC that is not delivered to the host. As a workaround, TLS sockets are more aggressive about sending CPL_RX_DATA_ACK messages anytime that any data is read from a TLS socket. In addition, a fallback timer will periodically send CPL_RX_DATA_ACK messages to the NIC for connections that are still in the handshake phase. Once the connection has finished the handshake and programmed RX keys via the socket option, the timer is stopped. A new function select_ulp_mode() is used to determine what sub-mode a given TOE socket should use (plain TOE, DDP, or TLS). The existing set_tcpddp_ulp_mode() function has been renamed to set_ulp_mode() and handles initialization of TLS-specific state when necessary in addition to DDP-specific state. Since TLS sockets do not receive individual TCP segments but always receive full TLS records, they can receive more data than is available in the current window (e.g. if a 16k TLS record is received but the socket buffer is itself 16k). To cope with this, just drop the window to 0 when this happens, but track the overage and "eat" the overage as it is read from the socket buffer not opening the window (or adding rx_credits) for the overage bytes. Reviewed by: np (earlier version) Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D14529 Added: head/sys/dev/cxgbe/tom/t4_tls.c (contents, props changed) head/sys/dev/cxgbe/tom/t4_tls.h (contents, props changed) Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/firmware/t6fw_cfg.txt head/sys/dev/cxgbe/offload.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_cpl_io.c head/sys/dev/cxgbe/tom/t4_listen.c head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h head/sys/modules/cxgbe/tom/Makefile Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Tue Mar 13 22:54:29 2018 (r330883) +++ head/sys/dev/cxgbe/adapter.h Tue Mar 13 23:05:51 2018 (r330884) @@ -297,6 +297,10 @@ struct port_info { struct port_stats stats; u_int tnl_cong_drops; u_int tx_parse_error; + u_long tx_tls_records; + u_long tx_tls_octets; + u_long rx_tls_records; + u_long rx_tls_octets; struct callout tick; }; Modified: head/sys/dev/cxgbe/firmware/t6fw_cfg.txt ============================================================================== --- head/sys/dev/cxgbe/firmware/t6fw_cfg.txt Tue Mar 13 22:54:29 2018 (r330883) +++ head/sys/dev/cxgbe/firmware/t6fw_cfg.txt Tue Mar 13 23:05:51 2018 (r330884) @@ -163,10 +163,12 @@ nserver = 512 nhpfilter = 0 nhash = 16384 - protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, iscsi_t10dif, crypto_lookaside + protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, iscsi_t10dif, tlskeys, crypto_lookaside tp_l2t = 4096 tp_ddp = 2 tp_ddp_iscsi = 2 + tp_tls_key = 3 + tp_tls_mxrxsize = 17408 # 16384 + 1024, governs max rx data, pm max xfer len, rx coalesce sizes tp_stag = 2 tp_pbl = 5 tp_rq = 7 @@ -273,7 +275,7 @@ [fini] version = 0x1 - checksum = 0x7191019f + checksum = 0x9e8952d2 # # $FreeBSD$ # Modified: head/sys/dev/cxgbe/offload.h ============================================================================== --- head/sys/dev/cxgbe/offload.h Tue Mar 13 22:54:29 2018 (r330883) +++ head/sys/dev/cxgbe/offload.h Tue Mar 13 23:05:51 2018 (r330884) @@ -151,6 +151,9 @@ struct tom_tunables { int sndbuf; int ddp; int rx_coalesce; + int tls; + int *tls_rx_ports; + int num_tls_rx_ports; int tx_align; int tx_zcopy; }; Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue Mar 13 22:54:29 2018 (r330883) +++ head/sys/dev/cxgbe/t4_main.c Tue Mar 13 23:05:51 2018 (r330884) @@ -591,6 +591,7 @@ static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); static int sysctl_tc_params(SYSCTL_HANDLER_ARGS); #endif #ifdef TCP_OFFLOAD +static int sysctl_tls_rx_ports(SYSCTL_HANDLER_ARGS); static int sysctl_tp_tick(SYSCTL_HANDLER_ARGS); static int sysctl_tp_dack_timer(SYSCTL_HANDLER_ARGS); static int sysctl_tp_timer(SYSCTL_HANDLER_ARGS); @@ -1390,6 +1391,7 @@ t4_detach_common(device_t dev) free(sc->sge.iqmap, M_CXGBE); free(sc->sge.eqmap, M_CXGBE); free(sc->tids.ftid_tab, M_CXGBE); + free(sc->tt.tls_rx_ports, M_CXGBE); t4_destroy_dma_tag(sc); if (mtx_initialized(&sc->sc_lock)) { sx_xlock(&t4_list_lock); @@ -5433,6 +5435,14 @@ t4_sysctls(struct adapter *sc) SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_coalesce", CTLFLAG_RW, &sc->tt.rx_coalesce, 0, "receive coalescing"); + sc->tt.tls = 0; + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tls", CTLFLAG_RW, + &sc->tt.tls, 0, "Inline TLS allowed"); + + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tls_rx_ports", + CTLTYPE_INT | CTLFLAG_RW, sc, 0, sysctl_tls_rx_ports, + "I", "TCP ports that use inline TLS+TOE RX"); + sc->tt.tx_align = 1; SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_align", CTLFLAG_RW, &sc->tt.tx_align, 0, "chop and align payload"); @@ -5836,6 +5846,19 @@ cxgbe_sysctls(struct port_info *pi) "# of buffer-group 3 truncated packets"); #undef SYSCTL_ADD_T4_PORTSTAT + + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_records", + CTLFLAG_RD, &pi->tx_tls_records, + "# of TLS records transmitted"); + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_octets", + CTLFLAG_RD, &pi->tx_tls_octets, + "# of payload octets in transmitted TLS records"); + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_records", + CTLFLAG_RD, &pi->rx_tls_records, + "# of TLS records received"); + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_octets", + CTLFLAG_RD, &pi->rx_tls_octets, + "# of payload octets in received TLS records"); } static int @@ -8257,6 +8280,68 @@ done: #endif #ifdef TCP_OFFLOAD +static int +sysctl_tls_rx_ports(SYSCTL_HANDLER_ARGS) +{ + struct adapter *sc = arg1; + int *old_ports, *new_ports; + int i, new_count, rc; + + if (req->newptr == NULL && req->oldptr == NULL) + return (SYSCTL_OUT(req, NULL, imax(sc->tt.num_tls_rx_ports, 1) * + sizeof(sc->tt.tls_rx_ports[0]))); + + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4tlsrx"); + if (rc) + return (rc); + + if (sc->tt.num_tls_rx_ports == 0) { + i = -1; + rc = SYSCTL_OUT(req, &i, sizeof(i)); + } else + rc = SYSCTL_OUT(req, sc->tt.tls_rx_ports, + sc->tt.num_tls_rx_ports * sizeof(sc->tt.tls_rx_ports[0])); + if (rc == 0 && req->newptr != NULL) { + new_count = req->newlen / sizeof(new_ports[0]); + new_ports = malloc(new_count * sizeof(new_ports[0]), M_CXGBE, + M_WAITOK); + rc = SYSCTL_IN(req, new_ports, new_count * + sizeof(new_ports[0])); + if (rc) + goto err; + + /* Allow setting to a single '-1' to clear the list. */ + if (new_count == 1 && new_ports[0] == -1) { + ADAPTER_LOCK(sc); + old_ports = sc->tt.tls_rx_ports; + sc->tt.tls_rx_ports = NULL; + sc->tt.num_tls_rx_ports = 0; + ADAPTER_UNLOCK(sc); + free(old_ports, M_CXGBE); + } else { + for (i = 0; i < new_count; i++) { + if (new_ports[i] < 1 || + new_ports[i] > IPPORT_MAX) { + rc = EINVAL; + goto err; + } + } + + ADAPTER_LOCK(sc); + old_ports = sc->tt.tls_rx_ports; + sc->tt.tls_rx_ports = new_ports; + sc->tt.num_tls_rx_ports = new_count; + ADAPTER_UNLOCK(sc); + free(old_ports, M_CXGBE); + new_ports = NULL; + } + err: + free(new_ports, M_CXGBE); + } + end_synchronized_op(sc, 0); + return (rc); +} + static void unit_conv(char *buf, size_t len, u_int val, u_int factor) { Modified: head/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_connect.c Tue Mar 13 22:54:29 2018 (r330883) +++ head/sys/dev/cxgbe/tom/t4_connect.c Tue Mar 13 23:05:51 2018 (r330884) @@ -142,6 +142,10 @@ do_act_establish(struct sge_iq *iq, const struct rss_h } make_established(toep, cpl->snd_isn, cpl->rcv_isn, cpl->tcp_opt); + + if (toep->ulp_mode == ULP_MODE_TLS) + tls_establish(toep); + done: INP_WUNLOCK(inp); CURVNET_RESTORE(); @@ -268,6 +272,11 @@ calc_opt2a(struct socket *so, struct toepcb *toep) if (toep->ulp_mode == ULP_MODE_TCPDDP) opt2 |= F_RX_FC_VALID | F_RX_FC_DDP; #endif + if (toep->ulp_mode == ULP_MODE_TLS) { + opt2 |= F_RX_FC_VALID; + opt2 &= ~V_RX_COALESCE(M_RX_COALESCE); + opt2 |= F_RX_FC_DISABLE; + } return (htobe32(opt2)); } @@ -378,10 +387,7 @@ t4_connect(struct toedev *tod, struct socket *so, stru DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); toep->vnet = so->so_vnet; - if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0) - set_tcpddp_ulp_mode(toep); - else - toep->ulp_mode = ULP_MODE_NONE; + set_ulp_mode(toep, select_ulp_mode(so, sc)); SOCKBUF_LOCK(&so->so_rcv); /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ toep->rx_credits = min(select_rcv_wnd(so) >> 10, M_RCV_BUFSIZ); Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Mar 13 22:54:29 2018 (r330883) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Mar 13 23:05:51 2018 (r330884) @@ -73,9 +73,6 @@ __FBSDID("$FreeBSD$"); #include "tom/t4_tom_l2t.h" #include "tom/t4_tom.h" -#define IS_AIOTX_MBUF(m) \ - ((m)->m_flags & M_EXT && (m)->m_ext.ext_flags & EXT_FLAG_AIOTX) - static void t4_aiotx_cancel(struct kaiocb *job); static void t4_aiotx_queue_toep(struct toepcb *toep); @@ -106,7 +103,7 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par { struct wrqe *wr; struct fw_flowc_wr *flowc; - unsigned int nparams = ftxp ? 8 : 6, flowclen; + unsigned int nparams, flowclen, paramidx; struct vi_info *vi = toep->vi; struct port_info *pi = vi->pi; struct adapter *sc = pi->adapter; @@ -116,6 +113,15 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par KASSERT(!(toep->flags & TPF_FLOWC_WR_SENT), ("%s: flowc for tid %u sent already", __func__, toep->tid)); + if (ftxp != NULL) + nparams = 8; + else + nparams = 6; + if (toep->ulp_mode == ULP_MODE_TLS) + nparams++; + if (toep->tls.fcplenmax != 0) + nparams++; + flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval); wr = alloc_wrqe(roundup2(flowclen, 16), toep->ofld_txq); @@ -131,39 +137,45 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par flowc->flowid_len16 = htonl(V_FW_WR_LEN16(howmany(flowclen, 16)) | V_FW_WR_FLOWID(toep->tid)); - flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN; - flowc->mnemval[0].val = htobe32(pfvf); - flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; - flowc->mnemval[1].val = htobe32(pi->tx_chan); - flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; - flowc->mnemval[2].val = htobe32(pi->tx_chan); - flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; - flowc->mnemval[3].val = htobe32(toep->ofld_rxq->iq.abs_id); +#define FLOWC_PARAM(__m, __v) \ + do { \ + flowc->mnemval[paramidx].mnemonic = FW_FLOWC_MNEM_##__m; \ + flowc->mnemval[paramidx].val = htobe32(__v); \ + paramidx++; \ + } while (0) + + paramidx = 0; + + FLOWC_PARAM(PFNVFN, pfvf); + FLOWC_PARAM(CH, pi->tx_chan); + FLOWC_PARAM(PORT, pi->tx_chan); + FLOWC_PARAM(IQID, toep->ofld_rxq->iq.abs_id); if (ftxp) { uint32_t sndbuf = min(ftxp->snd_space, sc->tt.sndbuf); - flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDNXT; - flowc->mnemval[4].val = htobe32(ftxp->snd_nxt); - flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_RCVNXT; - flowc->mnemval[5].val = htobe32(ftxp->rcv_nxt); - flowc->mnemval[6].mnemonic = FW_FLOWC_MNEM_SNDBUF; - flowc->mnemval[6].val = htobe32(sndbuf); - flowc->mnemval[7].mnemonic = FW_FLOWC_MNEM_MSS; - flowc->mnemval[7].val = htobe32(ftxp->mss); + FLOWC_PARAM(SNDNXT, ftxp->snd_nxt); + FLOWC_PARAM(RCVNXT, ftxp->rcv_nxt); + FLOWC_PARAM(SNDBUF, sndbuf); + FLOWC_PARAM(MSS, ftxp->mss); CTR6(KTR_CXGBE, "%s: tid %u, mss %u, sndbuf %u, snd_nxt 0x%x, rcv_nxt 0x%x", __func__, toep->tid, ftxp->mss, sndbuf, ftxp->snd_nxt, ftxp->rcv_nxt); } else { - flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF; - flowc->mnemval[4].val = htobe32(512); - flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS; - flowc->mnemval[5].val = htobe32(512); + FLOWC_PARAM(SNDBUF, 512); + FLOWC_PARAM(MSS, 512); CTR2(KTR_CXGBE, "%s: tid %u", __func__, toep->tid); } + if (toep->ulp_mode == ULP_MODE_TLS) + FLOWC_PARAM(ULP_MODE, toep->ulp_mode); + if (toep->tls.fcplenmax != 0) + FLOWC_PARAM(TXDATAPLEN_MAX, toep->tls.fcplenmax); +#undef FLOWC_PARAM + KASSERT(paramidx == nparams, ("nparams mismatch")); + txsd->tx_credits = howmany(flowclen, 16); txsd->plen = 0; KASSERT(toep->tx_credits >= txsd->tx_credits && toep->txsd_avail > 0, @@ -421,7 +433,7 @@ make_established(struct toepcb *toep, uint32_t snd_isn soisconnected(so); } -static int +int send_rx_credits(struct adapter *sc, struct toepcb *toep, int credits) { struct wrqe *wr; @@ -443,6 +455,23 @@ send_rx_credits(struct adapter *sc, struct toepcb *toe } void +send_rx_modulate(struct adapter *sc, struct toepcb *toep) +{ + struct wrqe *wr; + struct cpl_rx_data_ack *req; + + wr = alloc_wrqe(sizeof(*req), toep->ctrlq); + if (wr == NULL) + return; + req = wrtod(wr); + + INIT_TP_WR_MIT_CPL(req, CPL_RX_DATA_ACK, toep->tid); + req->credit_dack = htobe32(F_RX_MODULATE_RX); + + t4_wrq_tx(sc, wr); +} + +void t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) { struct adapter *sc = tod->tod_softc; @@ -459,8 +488,18 @@ t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) ("%s: sb %p has more data (%d) than last time (%d).", __func__, sb, sbused(sb), toep->sb_cc)); - toep->rx_credits += toep->sb_cc - sbused(sb); + credits = toep->sb_cc - sbused(sb); toep->sb_cc = sbused(sb); + if (toep->ulp_mode == ULP_MODE_TLS) { + if (toep->tls.rcv_over >= credits) { + toep->tls.rcv_over -= credits; + credits = 0; + } else { + credits -= toep->tls.rcv_over; + toep->tls.rcv_over = 0; + } + } + toep->rx_credits += credits; if (toep->rx_credits > 0 && (tp->rcv_wnd <= 32 * 1024 || toep->rx_credits >= 64 * 1024 || @@ -471,7 +510,8 @@ t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) toep->rx_credits -= credits; tp->rcv_wnd += credits; tp->rcv_adv += credits; - } + } else if (toep->flags & TPF_FORCE_CREDITS) + send_rx_modulate(sc, toep); } void @@ -489,8 +529,8 @@ t4_rcvd(struct toedev *tod, struct tcpcb *tp) /* * Close a connection by sending a CPL_CLOSE_CON_REQ message. */ -static int -close_conn(struct adapter *sc, struct toepcb *toep) +int +t4_close_conn(struct adapter *sc, struct toepcb *toep) { struct wrqe *wr; struct cpl_close_con_req *req; @@ -691,6 +731,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep KASSERT(toep->ulp_mode == ULP_MODE_NONE || toep->ulp_mode == ULP_MODE_TCPDDP || + toep->ulp_mode == ULP_MODE_TLS || toep->ulp_mode == ULP_MODE_RDMA, ("%s: ulp_mode %u for toep %p", __func__, toep->ulp_mode, toep)); @@ -905,7 +946,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep /* Send a FIN if requested, but only if there's no more data to send */ if (m == NULL && toep->flags & TPF_SEND_FIN) - close_conn(sc, toep); + t4_close_conn(sc, toep); } static inline void @@ -1097,7 +1138,7 @@ t4_push_pdus(struct adapter *sc, struct toepcb *toep, /* Send a FIN if requested, but only if there are no more PDUs to send */ if (mbufq_first(pduq) == NULL && toep->flags & TPF_SEND_FIN) - close_conn(sc, toep); + t4_close_conn(sc, toep); } int @@ -1116,6 +1157,8 @@ t4_tod_output(struct toedev *tod, struct tcpcb *tp) if (toep->ulp_mode == ULP_MODE_ISCSI) t4_push_pdus(sc, toep, 0); + else if (tls_tx_key(toep)) + t4_push_tls_records(sc, toep, 0); else t4_push_frames(sc, toep, 0); @@ -1140,6 +1183,8 @@ t4_send_fin(struct toedev *tod, struct tcpcb *tp) if (tp->t_state >= TCPS_ESTABLISHED) { if (toep->ulp_mode == ULP_MODE_ISCSI) t4_push_pdus(sc, toep, 0); + else if (tls_tx_key(toep)) + t4_push_tls_records(sc, toep, 0); else t4_push_frames(sc, toep, 0); } @@ -1772,6 +1817,10 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header credits -= txsd->tx_credits; toep->tx_credits += txsd->tx_credits; plen += txsd->plen; + if (txsd->iv_buffer) { + free(txsd->iv_buffer, M_CXGBE); + txsd->iv_buffer = NULL; + } txsd++; toep->txsd_avail++; KASSERT(toep->txsd_avail <= toep->txsd_total, @@ -1797,6 +1846,8 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header CURVNET_SET(toep->vnet); if (toep->ulp_mode == ULP_MODE_ISCSI) t4_push_pdus(sc, toep, plen); + else if (tls_tx_key(toep)) + t4_push_tls_records(sc, toep, plen); else t4_push_frames(sc, toep, plen); CURVNET_RESTORE(); @@ -1826,6 +1877,12 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header tid, plen); #endif sbdrop_locked(sb, plen); + if (tls_tx_key(toep)) { + struct tls_ofld_info *tls_ofld = &toep->tls; + + MPASS(tls_ofld->sb_off >= plen); + tls_ofld->sb_off -= plen; + } if (!TAILQ_EMPTY(&toep->aiotx_jobq)) t4_aiotx_queue_toep(toep); sowwakeup_locked(so); /* unlocks so_snd */ @@ -2298,6 +2355,9 @@ t4_aio_queue_aiotx(struct socket *so, struct kaiocb *j return (EOPNOTSUPP); if (!sc->tt.tx_zcopy) + return (EOPNOTSUPP); + + if (is_tls_offload(toep) || tls_tx_key(toep)) return (EOPNOTSUPP); SOCKBUF_LOCK(&so->so_snd); Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Tue Mar 13 22:54:29 2018 (r330883) +++ head/sys/dev/cxgbe/tom/t4_listen.c Tue Mar 13 23:05:51 2018 (r330884) @@ -1056,6 +1056,11 @@ calc_opt2p(struct adapter *sc, struct port_info *pi, i if (ulp_mode == ULP_MODE_TCPDDP) opt2 |= F_RX_FC_VALID | F_RX_FC_DDP; #endif + if (ulp_mode == ULP_MODE_TLS) { + opt2 |= F_RX_FC_VALID; + opt2 &= ~V_RX_COALESCE(M_RX_COALESCE); + opt2 |= F_RX_FC_DISABLE; + } return htobe32(opt2); } @@ -1347,11 +1352,15 @@ found: INIT_TP_WR_MIT_CPL(rpl5, CPL_PASS_ACCEPT_RPL, tid); } - if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0) { - ulp_mode = ULP_MODE_TCPDDP; + ulp_mode = select_ulp_mode(so, sc); + switch (ulp_mode) { + case ULP_MODE_TCPDDP: synqe->flags |= TPF_SYNQE_TCPDDP; - } else - ulp_mode = ULP_MODE_NONE; + break; + case ULP_MODE_TLS: + synqe->flags |= TPF_SYNQE_TLS; + break; + } rpl->opt0 = calc_opt0(so, vi, e, mtu_idx, rscale, rx_credits, ulp_mode); rpl->opt2 = calc_opt2p(sc, pi, rxqid, &cpl->tcpopt, &th, ulp_mode); @@ -1407,8 +1416,8 @@ found: REJECT_PASS_ACCEPT(); } - CTR5(KTR_CXGBE, "%s: stid %u, tid %u, lctx %p, synqe %p, SYNACK", - __func__, stid, tid, lctx, synqe); + CTR6(KTR_CXGBE, "%s: stid %u, tid %u, lctx %p, synqe %p, SYNACK mode %d", + __func__, stid, tid, lctx, synqe, ulp_mode); INP_WLOCK(inp); synqe->flags |= TPF_SYNQE_HAS_L2TE; @@ -1557,9 +1566,11 @@ reset: toep->tid = tid; toep->l2te = &sc->l2t->l2tab[synqe->l2e_idx]; if (synqe->flags & TPF_SYNQE_TCPDDP) - set_tcpddp_ulp_mode(toep); + set_ulp_mode(toep, ULP_MODE_TCPDDP); + else if (synqe->flags & TPF_SYNQE_TLS) + set_ulp_mode(toep, ULP_MODE_TLS); else - toep->ulp_mode = ULP_MODE_NONE; + set_ulp_mode(toep, ULP_MODE_NONE); /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ toep->rx_credits = synqe->rcv_bufsize; Added: head/sys/dev/cxgbe/tom/t4_tls.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/cxgbe/tom/t4_tls.c Tue Mar 13 23:05:51 2018 (r330884) @@ -0,0 +1,1642 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2017-2018 Chelsio Communications, Inc. + * All rights reserved. + * Written by: John Baldwin + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "opt_inet.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef TCP_OFFLOAD +#include "common/common.h" +#include "common/t4_tcb.h" +#include "tom/t4_tom_l2t.h" +#include "tom/t4_tom.h" + +/* + * The TCP sequence number of a CPL_TLS_DATA mbuf is saved here while + * the mbuf is in the ulp_pdu_reclaimq. + */ +#define tls_tcp_seq PH_loc.thirtytwo[0] + +/* + * Handshake lock used for the handshake timer. Having a global lock + * is perhaps not ideal, but it avoids having to use callout_drain() + * in tls_uninit_toep() which can't block. Also, the timer shouldn't + * actually fire for most connections. + */ +static struct mtx tls_handshake_lock; + +static void +t4_set_tls_tcb_field(struct toepcb *toep, uint16_t word, uint64_t mask, + uint64_t val) +{ + struct adapter *sc = td_adapter(toep->td); + + t4_set_tcb_field(sc, toep->ctrlq, toep->tid, word, mask, val, 0, 0, + toep->ofld_rxq->iq.abs_id); +} + +/* TLS and DTLS common routines */ +int +tls_tx_key(struct toepcb *toep) +{ + struct tls_ofld_info *tls_ofld = &toep->tls; + + return (tls_ofld->tx_key_addr >= 0); +} + +int +tls_rx_key(struct toepcb *toep) +{ + struct tls_ofld_info *tls_ofld = &toep->tls; + + return (tls_ofld->rx_key_addr >= 0); +} + +static int +key_size(struct toepcb *toep) +{ + struct tls_ofld_info *tls_ofld = &toep->tls; + + return ((tls_ofld->key_location == TLS_SFO_WR_CONTEXTLOC_IMMEDIATE) ? + tls_ofld->k_ctx.tx_key_info_size : KEY_IN_DDR_SIZE); +} + +/* Set TLS Key-Id in TCB */ +static void +t4_set_tls_keyid(struct toepcb *toep, unsigned int key_id) +{ + + t4_set_tls_tcb_field(toep, W_TCB_RX_TLS_KEY_TAG, + V_TCB_RX_TLS_KEY_TAG(M_TCB_RX_TLS_BUF_TAG), + V_TCB_RX_TLS_KEY_TAG(key_id)); +} + +/* Clear TF_RX_QUIESCE to re-enable receive. */ +static void +t4_clear_rx_quiesce(struct toepcb *toep) +{ + + t4_set_tls_tcb_field(toep, W_TCB_T_FLAGS, V_TF_RX_QUIESCE(1), 0); +} + +static void +tls_clr_ofld_mode(struct toepcb *toep) +{ + + tls_stop_handshake_timer(toep); + + /* Operate in PDU extraction mode only. */ + t4_set_tls_tcb_field(toep, W_TCB_ULP_RAW, + V_TCB_ULP_RAW(M_TCB_ULP_RAW), + V_TCB_ULP_RAW(V_TF_TLS_ENABLE(1))); + t4_clear_rx_quiesce(toep); +} + +static void +tls_clr_quiesce(struct toepcb *toep) +{ + + tls_stop_handshake_timer(toep); + t4_clear_rx_quiesce(toep); +} + +/* + * Calculate the TLS data expansion size + */ +static int +tls_expansion_size(struct toepcb *toep, int data_len, int full_pdus_only, + unsigned short *pdus_per_ulp) +{ + struct tls_ofld_info *tls_ofld = &toep->tls; + struct tls_scmd *scmd = &tls_ofld->scmd0; + int expn_size = 0, frag_count = 0, pad_per_pdu = 0, + pad_last_pdu = 0, last_frag_size = 0, max_frag_size = 0; + int exp_per_pdu = 0; + int hdr_len = TLS_HEADER_LENGTH; + + do { + max_frag_size = tls_ofld->k_ctx.frag_size; + if (G_SCMD_CIPH_MODE(scmd->seqno_numivs) == + SCMD_CIPH_MODE_AES_GCM) { + frag_count = (data_len / max_frag_size); + exp_per_pdu = GCM_TAG_SIZE + AEAD_EXPLICIT_DATA_SIZE + + hdr_len; + expn_size = frag_count * exp_per_pdu; + if (full_pdus_only) { + *pdus_per_ulp = data_len / (exp_per_pdu + + max_frag_size); + if (*pdus_per_ulp > 32) + *pdus_per_ulp = 32; + else if(!*pdus_per_ulp) + *pdus_per_ulp = 1; + expn_size = (*pdus_per_ulp) * exp_per_pdu; + break; + } + if ((last_frag_size = data_len % max_frag_size) > 0) { + frag_count += 1; + expn_size += exp_per_pdu; + } + break; + } else if (G_SCMD_CIPH_MODE(scmd->seqno_numivs) != + SCMD_CIPH_MODE_NOP) { + /* Calculate the number of fragments we can make */ + frag_count = (data_len / max_frag_size); + if (frag_count > 0) { + pad_per_pdu = (((howmany((max_frag_size + + tls_ofld->mac_length), + CIPHER_BLOCK_SIZE)) * + CIPHER_BLOCK_SIZE) - + (max_frag_size + + tls_ofld->mac_length)); + if (!pad_per_pdu) + pad_per_pdu = CIPHER_BLOCK_SIZE; + exp_per_pdu = pad_per_pdu + + tls_ofld->mac_length + + hdr_len + CIPHER_BLOCK_SIZE; + expn_size = frag_count * exp_per_pdu; + } + if (full_pdus_only) { + *pdus_per_ulp = data_len / (exp_per_pdu + + max_frag_size); + if (*pdus_per_ulp > 32) + *pdus_per_ulp = 32; + else if (!*pdus_per_ulp) + *pdus_per_ulp = 1; + expn_size = (*pdus_per_ulp) * exp_per_pdu; + break; + } + /* Consider the last fragment */ + if ((last_frag_size = data_len % max_frag_size) > 0) { + pad_last_pdu = (((howmany((last_frag_size + + tls_ofld->mac_length), + CIPHER_BLOCK_SIZE)) * + CIPHER_BLOCK_SIZE) - + (last_frag_size + + tls_ofld->mac_length)); + if (!pad_last_pdu) + pad_last_pdu = CIPHER_BLOCK_SIZE; + expn_size += (pad_last_pdu + + tls_ofld->mac_length + hdr_len + + CIPHER_BLOCK_SIZE); + } + } + } while (0); + + return (expn_size); +} + +/* Copy Key to WR */ +static void +tls_copy_tx_key(struct toepcb *toep, void *dst) +{ + struct tls_ofld_info *tls_ofld = &toep->tls; + struct ulptx_sc_memrd *sc_memrd; + struct ulptx_idata *sc; + + if (tls_ofld->k_ctx.tx_key_info_size <= 0) + return; + + if (tls_ofld->key_location == TLS_SFO_WR_CONTEXTLOC_DDR) { + sc = dst; + sc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_NOOP)); + sc->len = htobe32(0); + sc_memrd = (struct ulptx_sc_memrd *)(sc + 1); + sc_memrd->cmd_to_len = htobe32(V_ULPTX_CMD(ULP_TX_SC_MEMRD) | + V_ULP_TX_SC_MORE(1) | + V_ULPTX_LEN16(tls_ofld->k_ctx.tx_key_info_size >> 4)); + sc_memrd->addr = htobe32(tls_ofld->tx_key_addr >> 5); + } else if (tls_ofld->key_location == TLS_SFO_WR_CONTEXTLOC_IMMEDIATE) { + memcpy(dst, &tls_ofld->k_ctx.tx, + tls_ofld->k_ctx.tx_key_info_size); + } +} + +/* TLS/DTLS content type for CPL SFO */ +static inline unsigned char +tls_content_type(unsigned char content_type) +{ + /* + * XXX: Shouldn't this map CONTENT_TYPE_APP_DATA to DATA and + * default to "CUSTOM" for all other types including + * heartbeat? + */ + switch (content_type) { + case CONTENT_TYPE_CCS: + return CPL_TX_TLS_SFO_TYPE_CCS; + case CONTENT_TYPE_ALERT: + return CPL_TX_TLS_SFO_TYPE_ALERT; + case CONTENT_TYPE_HANDSHAKE: + return CPL_TX_TLS_SFO_TYPE_HANDSHAKE; + case CONTENT_TYPE_HEARTBEAT: + return CPL_TX_TLS_SFO_TYPE_HEARTBEAT; + } + return CPL_TX_TLS_SFO_TYPE_DATA; +} + +static unsigned char +get_cipher_key_size(unsigned int ck_size) +{ + switch (ck_size) { + case AES_NOP: /* NOP */ + return 15; + case AES_128: /* AES128 */ + return CH_CK_SIZE_128; + case AES_192: /* AES192 */ + return CH_CK_SIZE_192; + case AES_256: /* AES256 */ + return CH_CK_SIZE_256; + default: + return CH_CK_SIZE_256; + } +} + +static unsigned char +get_mac_key_size(unsigned int mk_size) +{ + switch (mk_size) { + case SHA_NOP: /* NOP */ + return CH_MK_SIZE_128; + case SHA_GHASH: /* GHASH */ + case SHA_512: /* SHA512 */ + return CH_MK_SIZE_512; + case SHA_224: /* SHA2-224 */ + return CH_MK_SIZE_192; + case SHA_256: /* SHA2-256*/ + return CH_MK_SIZE_256; + case SHA_384: /* SHA384 */ + return CH_MK_SIZE_512; + case SHA1: /* SHA1 */ + default: + return CH_MK_SIZE_160; + } +} + +static unsigned int +get_proto_ver(int proto_ver) +{ + switch (proto_ver) { + case TLS1_2_VERSION: + return TLS_1_2_VERSION; + case TLS1_1_VERSION: + return TLS_1_1_VERSION; + case DTLS1_2_VERSION: + return DTLS_1_2_VERSION; + default: + return TLS_VERSION_MAX; + } +} + +static void +tls_rxkey_flit1(struct tls_keyctx *kwr, struct tls_key_context *kctx) +{ + + if (kctx->state.enc_mode == CH_EVP_CIPH_GCM_MODE) { + kwr->u.rxhdr.ivinsert_to_authinsrt = + htobe64(V_TLS_KEYCTX_TX_WR_IVINSERT(6ULL) | + V_TLS_KEYCTX_TX_WR_AADSTRTOFST(1ULL) | + V_TLS_KEYCTX_TX_WR_AADSTOPOFST(5ULL) | + V_TLS_KEYCTX_TX_WR_AUTHSRTOFST(14ULL) | + V_TLS_KEYCTX_TX_WR_AUTHSTOPOFST(16ULL) | + V_TLS_KEYCTX_TX_WR_CIPHERSRTOFST(14ULL) | + V_TLS_KEYCTX_TX_WR_CIPHERSTOPOFST(0ULL) | + V_TLS_KEYCTX_TX_WR_AUTHINSRT(16ULL)); + kwr->u.rxhdr.ivpresent_to_rxmk_size &= + ~(V_TLS_KEYCTX_TX_WR_RXOPAD_PRESENT(1)); + kwr->u.rxhdr.authmode_to_rxvalid &= + ~(V_TLS_KEYCTX_TX_WR_CIPHAUTHSEQCTRL(1)); + } else { + kwr->u.rxhdr.ivinsert_to_authinsrt = + htobe64(V_TLS_KEYCTX_TX_WR_IVINSERT(6ULL) | + V_TLS_KEYCTX_TX_WR_AADSTRTOFST(1ULL) | + V_TLS_KEYCTX_TX_WR_AADSTOPOFST(5ULL) | + V_TLS_KEYCTX_TX_WR_AUTHSRTOFST(22ULL) | + V_TLS_KEYCTX_TX_WR_AUTHSTOPOFST(0ULL) | + V_TLS_KEYCTX_TX_WR_CIPHERSRTOFST(22ULL) | + V_TLS_KEYCTX_TX_WR_CIPHERSTOPOFST(0ULL) | + V_TLS_KEYCTX_TX_WR_AUTHINSRT(0ULL)); + } +} + +/* Rx key */ +static void +prepare_rxkey_wr(struct tls_keyctx *kwr, struct tls_key_context *kctx) +{ + unsigned int ck_size = kctx->cipher_secret_size; + unsigned int mk_size = kctx->mac_secret_size; + int proto_ver = kctx->proto_ver; + + kwr->u.rxhdr.flitcnt_hmacctrl = + ((kctx->tx_key_info_size >> 4) << 3) | kctx->hmac_ctrl; + + kwr->u.rxhdr.protover_ciphmode = + V_TLS_KEYCTX_TX_WR_PROTOVER(get_proto_ver(proto_ver)) | + V_TLS_KEYCTX_TX_WR_CIPHMODE(kctx->state.enc_mode); + + kwr->u.rxhdr.authmode_to_rxvalid = + V_TLS_KEYCTX_TX_WR_AUTHMODE(kctx->state.auth_mode) | + V_TLS_KEYCTX_TX_WR_CIPHAUTHSEQCTRL(1) | + V_TLS_KEYCTX_TX_WR_SEQNUMCTRL(3) | + V_TLS_KEYCTX_TX_WR_RXVALID(1); + + kwr->u.rxhdr.ivpresent_to_rxmk_size = + V_TLS_KEYCTX_TX_WR_IVPRESENT(0) | + V_TLS_KEYCTX_TX_WR_RXOPAD_PRESENT(1) | + V_TLS_KEYCTX_TX_WR_RXCK_SIZE(get_cipher_key_size(ck_size)) | + V_TLS_KEYCTX_TX_WR_RXMK_SIZE(get_mac_key_size(mk_size)); + + tls_rxkey_flit1(kwr, kctx); + + /* No key reversal for GCM */ + if (kctx->state.enc_mode != CH_EVP_CIPH_GCM_MODE) { + t4_aes_getdeckey(kwr->keys.edkey, kctx->rx.key, + (kctx->cipher_secret_size << 3)); + memcpy(kwr->keys.edkey + kctx->cipher_secret_size, + kctx->rx.key + kctx->cipher_secret_size, + (IPAD_SIZE + OPAD_SIZE)); + } else { + memcpy(kwr->keys.edkey, kctx->rx.key, + (kctx->tx_key_info_size - SALT_SIZE)); + memcpy(kwr->u.rxhdr.rxsalt, kctx->rx.salt, SALT_SIZE); + } +} + +/* Tx key */ +static void +prepare_txkey_wr(struct tls_keyctx *kwr, struct tls_key_context *kctx) +{ + unsigned int ck_size = kctx->cipher_secret_size; + unsigned int mk_size = kctx->mac_secret_size; + + kwr->u.txhdr.ctxlen = + (kctx->tx_key_info_size >> 4); + kwr->u.txhdr.dualck_to_txvalid = + V_TLS_KEYCTX_TX_WR_TXOPAD_PRESENT(1) | + V_TLS_KEYCTX_TX_WR_SALT_PRESENT(1) | + V_TLS_KEYCTX_TX_WR_TXCK_SIZE(get_cipher_key_size(ck_size)) | + V_TLS_KEYCTX_TX_WR_TXMK_SIZE(get_mac_key_size(mk_size)) | + V_TLS_KEYCTX_TX_WR_TXVALID(1); + + memcpy(kwr->keys.edkey, kctx->tx.key, HDR_KCTX_SIZE); + if (kctx->state.enc_mode == CH_EVP_CIPH_GCM_MODE) { + memcpy(kwr->u.txhdr.txsalt, kctx->tx.salt, SALT_SIZE); + kwr->u.txhdr.dualck_to_txvalid &= + ~(V_TLS_KEYCTX_TX_WR_TXOPAD_PRESENT(1)); + } + kwr->u.txhdr.dualck_to_txvalid = htons(kwr->u.txhdr.dualck_to_txvalid); +} + +/* TLS Key memory management */ +int +tls_init_kmap(struct adapter *sc, struct tom_data *td) +{ + + td->key_map = vmem_create("T4TLS key map", sc->vres.key.start, + sc->vres.key.size, 8, 0, M_FIRSTFIT | M_NOWAIT); + if (td->key_map == NULL) + return (ENOMEM); + return (0); +} + +void +tls_free_kmap(struct tom_data *td) +{ + + if (td->key_map != NULL) + vmem_destroy(td->key_map); +} + +static int +get_new_keyid(struct toepcb *toep, struct tls_key_context *k_ctx) +{ + struct tom_data *td = toep->td; + vmem_addr_t addr; + + if (vmem_alloc(td->key_map, TLS_KEY_CONTEXT_SZ, M_NOWAIT | M_FIRSTFIT, + &addr) != 0) + return (-1); + + return (addr); +} + +static void +free_keyid(struct toepcb *toep, int keyid) +{ + struct tom_data *td = toep->td; + + vmem_free(td->key_map, keyid, TLS_KEY_CONTEXT_SZ); +} + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Mar 13 23:36:16 2018 Return-Path: Delivered-To: svn-src-all@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 5CC2C68BF; Tue, 13 Mar 2018 23:36:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 107FA7C699; Tue, 13 Mar 2018 23:36:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B8DA2065E; Tue, 13 Mar 2018 23:36:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DNaFP0025633; Tue, 13 Mar 2018 23:36:15 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DNaFme025632; Tue, 13 Mar 2018 23:36:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803132336.w2DNaFme025632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 13 Mar 2018 23:36:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330885 - head/sys/modules/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/modules/cam X-SVN-Commit-Revision: 330885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 23:36:16 -0000 Author: imp Date: Tue Mar 13 23:36:15 2018 New Revision: 330885 URL: https://svnweb.freebsd.org/changeset/base/330885 Log: We need opt_compat.h after r330819 and 330820. Add opt_compat.h to fix the stand-alone build case. Sponsored by: Netflix. Modified: head/sys/modules/cam/Makefile Modified: head/sys/modules/cam/Makefile ============================================================================== --- head/sys/modules/cam/Makefile Tue Mar 13 23:05:51 2018 (r330884) +++ head/sys/modules/cam/Makefile Tue Mar 13 23:36:15 2018 (r330885) @@ -8,6 +8,7 @@ KMOD= cam # See sys/conf/options for the flags that go into the different opt_*.h files. SRCS= opt_cam.h +SRCS= opt_compat.h SRCS+= opt_ada.h SRCS+= opt_scsi.h SRCS+= opt_cd.h From owner-svn-src-all@freebsd.org Tue Mar 13 23:37:34 2018 Return-Path: Delivered-To: svn-src-all@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 4FE636A50; Tue, 13 Mar 2018 23:37:34 +0000 (UTC) (envelope-from dteske@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 032517C835; Tue, 13 Mar 2018 23:37:34 +0000 (UTC) (envelope-from dteske@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 F261B20661; Tue, 13 Mar 2018 23:37:33 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2DNbXHO025718; Tue, 13 Mar 2018 23:37:33 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2DNbXDi025717; Tue, 13 Mar 2018 23:37:33 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201803132337.w2DNbXDi025717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 13 Mar 2018 23:37:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330886 - head/share/examples X-SVN-Group: head X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: head/share/examples X-SVN-Commit-Revision: 330886 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 23:37:34 -0000 Author: dteske Date: Tue Mar 13 23:37:33 2018 New Revision: 330886 URL: https://svnweb.freebsd.org/changeset/base/330886 Log: Install files added in SVN's r295373, r295457, r295542 Reported by: woodsb02 MFC after: 3 days X-MFC to: stable/11 Modified: head/share/examples/Makefile Modified: head/share/examples/Makefile ============================================================================== --- head/share/examples/Makefile Tue Mar 13 23:36:15 2018 (r330885) +++ head/share/examples/Makefile Tue Mar 13 23:37:33 2018 (r330886) @@ -76,6 +76,12 @@ XFILES= BSD_daemon/FreeBSD.pfa \ indent/indent.pro \ ipfw/change_rules.sh \ jails/README \ + jails/VIMAGE \ + jails/jail.xxx.conf \ + jails/jib \ + jails/jng \ + jails/rc.conf.jails \ + jails/rcjail.xxx.conf \ kld/Makefile \ kld/cdev/Makefile \ kld/cdev/README \ From owner-svn-src-all@freebsd.org Wed Mar 14 00:05:00 2018 Return-Path: Delivered-To: svn-src-all@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 B6B15F2D3A1; Wed, 14 Mar 2018 00:04:59 +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 446847DB0F; Wed, 14 Mar 2018 00:04:59 +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 3CDDA20B15; Wed, 14 Mar 2018 00:04:59 +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 w2E04xU0040380; Wed, 14 Mar 2018 00:04:59 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E04w3k040374; Wed, 14 Mar 2018 00:04:58 GMT (envelope-from np@FreeBSD.org) Message-Id: <201803140004.w2E04w3k040374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 14 Mar 2018 00:04:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330887 - head/usr.sbin/cxgbetool X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/usr.sbin/cxgbetool X-SVN-Commit-Revision: 330887 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 00:05:00 -0000 Author: np Date: Wed Mar 14 00:04:58 2018 New Revision: 330887 URL: https://svnweb.freebsd.org/changeset/base/330887 Log: cxgbetool(8): Add the ability to decode hardware TCBs. Obtained from: Chelsio Communications MFC after: 1 week Sponsored by: Chelsio Communications Added: head/usr.sbin/cxgbetool/tcb_common.c (contents, props changed) head/usr.sbin/cxgbetool/tcb_common.h (contents, props changed) head/usr.sbin/cxgbetool/tcbinfot4.c (contents, props changed) head/usr.sbin/cxgbetool/tcbinfot5.c (contents, props changed) head/usr.sbin/cxgbetool/tcbinfot6.c (contents, props changed) head/usr.sbin/cxgbetool/tcbshowt4.c (contents, props changed) head/usr.sbin/cxgbetool/tcbshowt5.c (contents, props changed) head/usr.sbin/cxgbetool/tcbshowt6.c (contents, props changed) Modified: head/usr.sbin/cxgbetool/Makefile head/usr.sbin/cxgbetool/cxgbetool.c Directory Properties: head/usr.sbin/cxgbetool/reg_defs_t5.c (props changed) head/usr.sbin/cxgbetool/reg_defs_t6.c (props changed) Modified: head/usr.sbin/cxgbetool/Makefile ============================================================================== --- head/usr.sbin/cxgbetool/Makefile Tue Mar 13 23:37:33 2018 (r330886) +++ head/usr.sbin/cxgbetool/Makefile Wed Mar 14 00:04:58 2018 (r330887) @@ -2,6 +2,11 @@ PROG= cxgbetool MAN= cxgbetool.8 +SRCS= cxgbetool.c +SRCS+= tcb_common.c +SRCS+= tcbinfot4.c tcbshowt4.c +SRCS+= tcbinfot5.c tcbshowt5.c +SRCS+= tcbinfot6.c tcbshowt6.c CFLAGS+= -I${SRCTOP}/sys/dev/cxgbe -I${SRCTOP}/sys -I. WARNS?= 2 Modified: head/usr.sbin/cxgbetool/cxgbetool.c ============================================================================== --- head/usr.sbin/cxgbetool/cxgbetool.c Tue Mar 13 23:37:33 2018 (r330886) +++ head/usr.sbin/cxgbetool/cxgbetool.c Wed Mar 14 00:04:58 2018 (r330887) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include "t4_ioctl.h" +#include "tcb_common.h" #define in_range(val, lo, hi) ( val < 0 || (val <= hi && val >= lo)) #define max(x, y) ((x) > (y) ? (x) : (y)) @@ -2102,6 +2103,7 @@ memdump(int argc, const char *argv[]) static void show_tcb(uint32_t *buf, uint32_t len) { + unsigned char *tcb = (unsigned char *)buf; const char *s; int i, n = 8; @@ -2112,6 +2114,10 @@ show_tcb(uint32_t *buf, uint32_t len) } printf("\n"); } + set_tcb_info(TIDTYPE_TCB, chip_id); + set_print_style(PRNTSTYL_COMP); + swizzle_tcb(tcb); + parse_n_display_xcb(tcb); } #define A_TP_CMM_TCB_BASE 0x7d10 Added: head/usr.sbin/cxgbetool/tcb_common.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/cxgbetool/tcb_common.c Wed Mar 14 00:04:58 2018 (r330887) @@ -0,0 +1,703 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "tcb_common.h" + +/***:----------------------------------------------------------------------- + ***: externals + ***:----------------------------------------------------------------------- + */ + +extern _TCBVAR g_tcb_info4[]; +extern _TCBVAR g_scb_info4[]; +extern _TCBVAR g_fcb_info4[]; +extern void t4_display_tcb_aux_0(_TCBVAR *tvp,int aux); +extern void t4_display_tcb_aux_1(_TCBVAR *tvp,int aux); +extern void t4_display_tcb_aux_2(_TCBVAR *tvp,int aux); +extern void t4_display_tcb_aux_3(_TCBVAR *tvp,int aux); + +extern _TCBVAR g_tcb_info5[]; +extern _TCBVAR g_scb_info5[]; +extern _TCBVAR g_fcb_info5[]; +extern void t5_display_tcb_aux_0(_TCBVAR *tvp,int aux); +extern void t5_display_tcb_aux_1(_TCBVAR *tvp,int aux); +extern void t5_display_tcb_aux_2(_TCBVAR *tvp,int aux); +extern void t5_display_tcb_aux_3(_TCBVAR *tvp,int aux); + +extern _TCBVAR g_tcb_info6[]; +extern _TCBVAR g_scb_info6[]; +extern _TCBVAR g_fcb_info6[]; +extern void t6_display_tcb_aux_0(_TCBVAR *tvp,int aux); +extern void t6_display_tcb_aux_1(_TCBVAR *tvp,int aux); +extern void t6_display_tcb_aux_2(_TCBVAR *tvp,int aux); +extern void t6_display_tcb_aux_3(_TCBVAR *tvp,int aux); +extern void t6_display_tcb_aux_4(_TCBVAR *tvp,int aux); + +/***:----------------------------------------------------------------------- + ***: globals + ***:----------------------------------------------------------------------- + */ + +_TCBVAR *g_tcb_info=g_tcb_info5; +_TCBVAR *g_scb_info=g_scb_info5; +_TCBVAR *g_fcb_info=g_fcb_info5; +static int g_tN=0; + +static int g_prntstyl=PRNTSTYL_COMP; + +static int g_got_scb=0; +static int g_got_fcb=0; + + +/***:----------------------------------------------------------------------- +***: error exit functions +***:----------------------------------------------------------------------- +*/ + +/**: err_exit functions +*: ------------------ +*/ + +void tcb_prflush(void) +{ + fflush(stdout); + fflush(stderr); +} + + +void tcb_code_err_exit(char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + printf("Coding Error in: "); + vprintf(fmt, args); + printf("\n"); + tcb_prflush(); + va_end(args); + exit(1); +} + +/***:----------------------------------------------------------------------- +***: tcb_hexdump functions +***:----------------------------------------------------------------------- +*/ + +void +tcb_hexdump(unsigned base, unsigned char *buf, unsigned int size) +{ + unsigned offset; + + for (offset = 0; offset < size; ++offset) { + if (!(offset % 16)) printf("\n0x%4.4x: ", base + offset); + else if (!(offset % 8)) printf(" "); + printf("%2.2x ", (unsigned char)buf[offset]); + } +} + +int tcb_strmatch_nc(char *cs, char *ct) { + while (*cs) + if (tolower(*cs++) != tolower(*ct++)) return (FALSE); + return (!(*ct)); /*return TRUE if *ct NULL at same time as *cs==NULL*/ +} + + +/*: ------------------------------------------------------------------------- +string functions +tcb_strmatch_nc: Similar to exact match, but case insensitive. +*/ + + +int +tcb_strncmp_nc(char *cs, char *ct, int n) +{ + /*case insensitive version of the standard strncmp() function */ + int i = 0; + int ret; + + + ret = 0; + for (i = 0; i < n && 0 == ret && !(EOS == *cs && EOS == *ct); ++i) { + /* this is weird, but it matched GCC linux when strings don't + * have any upper case characters. + */ + ret = tolower(*cs++) - tolower(*ct++); + } + return ret; +} + +int +tcb_startswith_nc(char *cs, char *ct) +{ /* return true if cs start with ct */ + return (0 == tcb_strncmp_nc(cs, ct, (int)strlen(ct))); +} + + + + +/***:----------------------------------------------------------------------- + ***: START OF WINDOWS FUNCTIONS + ***:----------------------------------------------------------------------- + */ + + +/***:----------------------------------------------------------------------- + ***: print utilties + ***:----------------------------------------------------------------------- + */ + +static int g_PR_indent=1; + +void PR(char *fmt, ...) +{ + int fmt_len; + va_list args; + va_start(args,fmt); + + if (g_PR_indent) printf(" "); + g_PR_indent=0; + fmt_len=(int) strlen(fmt); + if (fmt_len>0 && fmt[fmt_len-1]=='\n') g_PR_indent=1; + + vprintf(fmt,args); + tcb_prflush(); + va_end(args); +} + + +/***:----------------------------------------------------------------------- + ***: val() + ***:----------------------------------------------------------------------- + */ + +_TCBVAR * +lu_tcbvar(char *name) +{ + _TCBVAR *tvp=g_tcb_info; + + while (tvp->name!=NULL) { + if (tcb_strmatch_nc(name,tvp->name)) return tvp; + else if (tcb_strmatch_nc(name,tvp->aka )) return tvp; + tvp+=1; + } + tcb_code_err_exit("lu_tcbvar: bad name %s\n",name); + return NULL; +} + +unsigned +val(char *name) +{ + _TCBVAR *tvp; + + tvp=lu_tcbvar(name); + return tvp->val; +} + +ui64 +val64(char *name) +{ + _TCBVAR *tvp; + + tvp=lu_tcbvar(name); + return tvp->rawval; +} + + + +/***:----------------------------------------------------------------------- + ***: get_tcb_bits + ***:----------------------------------------------------------------------- + */ + + +static int +get_tcb_bit(unsigned char *A, int bit) +{ + int ret=0; + int ix,shift; + + ix = 127 - (bit>>3); + shift=bit&0x7; + /* prdbg(" ix: %u, shift=%u\n",ix,shift); */ + ret=(A[ix] >> shift) & 1; + return ret; +} + +static ui64 +get_tcb_bits (unsigned char *A, int hi, int lo) +{ + ui64 ret=0; + + if (lo>hi) { + int temp=lo; + lo=hi; + hi=temp; + } + + while (hi>=lo) { + ret = (ret<<1) | get_tcb_bit(A,hi); + --hi; + } + + return ret; +} + + +void +decompress_val(_TCBVAR *tvp,unsigned ulp_type,unsigned tx_max, + unsigned rcv_nxt,unsigned rx_frag0_start_idx_raw) +{ + unsigned rawval=(unsigned) tvp->rawval; + + switch(tvp->comp) { + case COMP_NONE: tvp->val=rawval; break; + case COMP_ULP: tvp->val=rawval; break; + case COMP_TX_MAX: + tvp->val=(tx_max - rawval) & 0xFFFFFFFF; + break; + case COMP_RCV_NXT: + if (tcb_startswith_nc(tvp->name,"rx_frag")) { + unsigned fragx=0; + if (!tcb_strmatch_nc(tvp->name,"rx_frag0_start_idx_raw")) + fragx=rawval; + tvp->val=(rcv_nxt+rx_frag0_start_idx_raw+fragx) & 0xFFFFFFFF; + } else { + tvp->val=(rcv_nxt - rawval) & 0xFFFFFFFF; + } + break; + case COMP_PTR: tvp->val=rawval; break; + case COMP_LEN: + { + tvp->val=rawval; + if (PM_MODE_RDDP==ulp_type || PM_MODE_DDP==ulp_type || + PM_MODE_IANDP==ulp_type) { + /* TP does this internally. Not sure if I should show the + * unaltered value or the raw value. For now I + * will diplay the raw value. For now I've added the code + * mainly to stop windows compiler from warning about ulp_type + * being an unreferenced parameter. + */ + tvp->val=0; + tvp->val=rawval; /* comment this out to display altered value */ + } + } + break; + default: + tcb_code_err_exit("decompress_val, bad switch: %d",tvp->comp); + break; + } + + + +} + + +void +get_tcb_field(_TCBVAR *tvp,unsigned char *buf) +{ + assert(tvp->hi-tvp->lo+1<=64); + assert(tvp->hi>=tvp->lo); + + tvp->rawval=get_tcb_bits(buf,tvp->lo,tvp->hi); + /* assume no compression and 32-bit value for now */ + tvp->val=(unsigned) (tvp->rawval & 0xFFFFFFFF); + + +} + + +/***:----------------------------------------------------------------------- + ***: spr_* functions + ***:----------------------------------------------------------------------- + */ + +char * +spr_tcp_state (unsigned state) +{ + char *ret="UNKNOWN"; + + if ( 0 == state) {ret = "CLOSED";} + else if ( 1 == state) {ret = "LISTEN";} + else if ( 2 == state) {ret = "SYN_SENT";} + else if ( 3 == state) {ret = "SYN_RCVD";} + else if ( 4 == state) {ret = "ESTABLISHED";} + else if ( 5 == state) {ret = "CLOSE_WAIT";} + else if ( 6 == state) {ret = "FIN_WAIT_1";} + else if ( 7 == state) {ret = "CLOSING";} + else if ( 8 == state) {ret = "LAST_ACK";} + else if ( 9 == state) {ret = "FIN_WAIT_2";} + else if (10 == state) {ret = "TIME_WAIT";} + else if (11 == state) {ret = "ESTABLISHED_RX";} + else if (12 == state) {ret = "ESTABLISHED_TX";} + else if (13 == state) {ret = "SYN_PEND";} + else if (14 == state) {ret = "ESC_1_STATE";} + else if (15 == state) {ret = "ESC_2_STATE";} + + return ret; +} + +char * +spr_cctrl_sel(unsigned sel0,unsigned sel1) +{ + unsigned sel=(sel1<<1) | sel0; + char *ret="UNKNOWN"; + + if ( 0 == sel) {ret = "Reno";} + else if ( 1 == sel) {ret = "Tahoe";} + else if ( 2 == sel) {ret = "NewReno";} + else if ( 3 == sel) {ret = "HighSpeed";} + + return ret; +} + + +char * +spr_ulp_type(unsigned ulp_type) +{ + char *ret="UNKNOWN"; + + /*The tp.h PM_MODE_XXX call 1 DDP and 5 IANDP, but external + * documentation (tcb.h" calls 5 ddp, and doesn't mention 1 or 3. + */ + + if ( PM_MODE_PASS == ulp_type) {ret = "TOE";} + else if ( PM_MODE_DDP == ulp_type) {ret = "DDP";} + else if ( PM_MODE_ISCSI == ulp_type) {ret = "ISCSI";} + else if ( PM_MODE_IWARP == ulp_type) {ret = "IWARP";} + else if ( PM_MODE_RDDP == ulp_type) {ret = "RDMA";} + else if ( PM_MODE_IANDP == ulp_type) {ret = "IANDP_DDP";} + else if ( PM_MODE_FCOE == ulp_type) {ret = "FCoE";} + else if ( PM_MODE_USER == ulp_type) {ret = "USER";} + else if ( PM_MODE_TLS == ulp_type) {ret = "TLS";} + else if ( PM_MODE_DTLS == ulp_type) {ret = "DTLS";} + + return ret; +} + +char * +spr_ip_version(unsigned ip_version) +{ + char *ret="UNKNOWN"; + + if ( 0 == ip_version) {ret = "IPv4";} + else if ( 1 == ip_version) {ret = "IPv6";} + + return ret; +} + + + +/***:----------------------------------------------------------------------- + ***: display_tcb() + ***:----------------------------------------------------------------------- + */ + +void +display_tcb_compressed(_TCBVAR *tvp,int aux) +{ + + if (g_tN==4) { + t4_display_tcb_aux_0(tvp,aux); + if (1==aux) t4_display_tcb_aux_1(tvp,aux); + else if (2==aux) t4_display_tcb_aux_2(tvp,aux); + else if (3==aux) t4_display_tcb_aux_3(tvp,aux); + + } else if (g_tN==5) { + t5_display_tcb_aux_0(tvp,aux); + if (1==aux) t5_display_tcb_aux_1(tvp,aux); + else if (2==aux) t5_display_tcb_aux_2(tvp,aux); + else if (3==aux) t5_display_tcb_aux_3(tvp,aux); + } else if (g_tN==6) { + t6_display_tcb_aux_0(tvp,aux); + if (1==aux) t6_display_tcb_aux_1(tvp,aux); + else if (2==aux) t6_display_tcb_aux_2(tvp,aux); + else if (3==aux) t6_display_tcb_aux_3(tvp,aux); + else if (4==aux) t6_display_tcb_aux_4(tvp,aux); + } +} + + + + +/***:----------------------------------------------------------------------- + ***: parse_n_decode_tcb + ***:----------------------------------------------------------------------- + */ + + +unsigned +parse_tcb( _TCBVAR *base_tvp, unsigned char *buf) +{ /* parse the TCB */ + _TCBVAR *tvp=base_tvp; + unsigned ulp_type; + int aux=1; /* assume TOE or iSCSI */ + unsigned tx_max=0, rcv_nxt=0, rx_frag0_start_idx_raw=0; + int got_tx_max=0, got_rcv_nxt=0, got_rx_frag0_start_idx_raw=0; + + + /* parse the TCB */ + while (tvp->name!=NULL) { + get_tcb_field(tvp,buf); + if (!got_tx_max && tcb_strmatch_nc("tx_max",tvp->name)) { + tx_max=tvp->val; + got_tx_max=1; + } + if (!got_rcv_nxt && tcb_strmatch_nc("rcv_nxt",tvp->name)) { + rcv_nxt=tvp->val; + got_rcv_nxt=1; + } + if (!got_rx_frag0_start_idx_raw && + tcb_strmatch_nc("rx_frag0_start_idx_raw",tvp->name)) { + rx_frag0_start_idx_raw=tvp->val; + got_rx_frag0_start_idx_raw=1; + } + tvp+=1; + } + + tvp=base_tvp; + ulp_type=tvp->val; /* ULP type is always first variable in TCB */ + if (PM_MODE_IANDP==ulp_type || PM_MODE_FCOE==ulp_type) aux=3; + else if (PM_MODE_RDDP==ulp_type) aux=2; + else if (6==g_tN && (PM_MODE_TLS==ulp_type || PM_MODE_DTLS==ulp_type)) aux=4; + else aux=1; + + assert(got_tx_max && got_rcv_nxt && got_rx_frag0_start_idx_raw); + + /* decompress the compressed values */ + tvp=base_tvp; + while (tvp->name!=NULL) { + decompress_val(tvp,ulp_type,tx_max,rcv_nxt,rx_frag0_start_idx_raw); + tvp+=1; + } + + return aux; +} + + + +void +parse_scb( _TCBVAR *base_tvp, unsigned char *buf) +{ /* parse the SCB */ + _TCBVAR *tvp=base_tvp; + + while (tvp->name!=NULL) { + if (tcb_strmatch_nc("scb_slush",tvp->name)) { + /* the scb_slush field is all of remaining memory */ + tvp->rawval=0; + tvp->val=0; + } else { + get_tcb_field(tvp,buf); + } + tvp+=1; + } +} + + +void +parse_fcb( _TCBVAR *base_tvp, unsigned char *buf) +{ /* parse the FCB */ + _TCBVAR *tvp=base_tvp; + + while (tvp->name!=NULL) { + get_tcb_field(tvp,buf); + tvp+=1; + } +} + + +void +display_list_tcb(_TCBVAR *base_tvp,int aux) +{ + _TCBVAR *tvp=base_tvp; + while (tvp->name!=NULL) { + if (tvp->aux==0 || tvp->aux==aux) { + if (tvp->hi-tvp->lo+1<=32) { + printf(" %4d:%4d %31s: %10u (0x%1x)",tvp->lo,tvp->hi,tvp->name, + (unsigned) tvp->rawval,(unsigned) tvp->rawval); + if (COMP_TX_MAX==tvp->comp || COMP_RCV_NXT==tvp->comp) + printf(" -> %1u (0x%x)", tvp->val,tvp->val); + } else { + printf(" %4d:%4d %31s: 0x%1llx",tvp->lo,tvp->hi,tvp->name, + tvp->rawval); + } + printf("\n"); + } + tvp+=1; + } +} + +void +display_tcb(_TCBVAR *tvp,unsigned char *buf,int aux) +{ + if (g_prntstyl==PRNTSTYL_VERBOSE || + g_prntstyl==PRNTSTYL_RAW) { + tcb_hexdump(0,buf,128); + printf("\n"); + } + + if (g_prntstyl==PRNTSTYL_VERBOSE || + g_prntstyl==PRNTSTYL_LIST) { + display_list_tcb(tvp,aux); + } + + if (g_prntstyl==PRNTSTYL_VERBOSE || + g_prntstyl==PRNTSTYL_COMP) { + display_tcb_compressed(tvp,aux); + } + +} + +void +parse_n_display_tcb(unsigned char *buf) +{ + _TCBVAR *tvp=g_tcb_info; + int aux; + + aux=parse_tcb(tvp,buf); + display_tcb(tvp,buf,aux); +} + +void +parse_n_display_scb(unsigned char *buf) +{ + _TCBVAR *tvp=g_scb_info; + + parse_scb(tvp,buf); + if (g_prntstyl==PRNTSTYL_VERBOSE || + g_prntstyl==PRNTSTYL_RAW) { + tcb_hexdump(0,buf,128); + printf("\n"); + } + if (g_prntstyl==PRNTSTYL_VERBOSE || + g_prntstyl==PRNTSTYL_LIST || + g_prntstyl==PRNTSTYL_COMP) { + display_list_tcb(tvp,0); + } +} + +void +parse_n_display_fcb(unsigned char *buf) +{ + _TCBVAR *tvp=g_fcb_info; + + parse_fcb(tvp,buf); + if (g_prntstyl==PRNTSTYL_VERBOSE || + g_prntstyl==PRNTSTYL_RAW) { + tcb_hexdump(0,buf,128); + printf("\n"); + } + + if (g_prntstyl==PRNTSTYL_VERBOSE || + g_prntstyl==PRNTSTYL_LIST || + g_prntstyl==PRNTSTYL_COMP) { + display_list_tcb(tvp,0); + } +} + +void +parse_n_display_xcb(unsigned char *buf) +{ + if (g_got_scb) parse_n_display_scb(buf); + else if (g_got_fcb) parse_n_display_fcb(buf); + else parse_n_display_tcb(buf); +} + +/***:----------------------------------------------------------------------- + ***: swizzle_tcb + ***:----------------------------------------------------------------------- + */ + +void +swizzle_tcb(unsigned char *buf) +{ + int i,j,k; + + for (i=0, j=128-16 ; i +#include +#include +#include +#include +#include + + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef EOS +#define EOS '\0' +#endif + +#ifndef __variable_sizes + +/* windows has _UI64_MAX. C99 has ULLONG_MAX, but I don't compile +with C99 for portability with windows, so the ui64 is a guess. +I'll add an assert to cl_main to confirm these sizes are accurate. +*/ +#ifdef _UI64_MAX /* windows */ +#if (_UI64_MAX == 0xFFFFFFFFFFFFFFFF) +typedef __int64 si64; +typedef unsigned __int64 ui64; +#endif +#else /*else of #ifdef _UI64_MAX */ +typedef long long int si64; +typedef unsigned long long int ui64; +#endif /*endif of #ifdef _UI64_MAX */ +#endif /* endif of #ifndef __variable_sizes */ + + + + +typedef struct tcb_var { + char *name; + int aux; + int lo; + int hi; + + char *faka; + int flo; + int fhi; + + char *aka; + + int comp; + + char *desc; + char *akadesc; + + ui64 rawval; + unsigned val; + +} _TCBVAR; + + +enum comp_types { + + COMP_NONE=0, + COMP_ULP, + COMP_TX_MAX, + COMP_RCV_NXT, + COMP_PTR, + COMP_LEN, + +}; + + +enum tidtypes { + TIDTYPE_TCB=0, + TIDTYPE_SCB=1, + TIDTYPE_FCB=2, + +}; + + +enum prntstyls { + PRNTSTYL_VERBOSE=0, + PRNTSTYL_LIST=1, + PRNTSTYL_COMP=2, + PRNTSTYL_RAW=3, + +}; + + +/* from tp/src/tp.h */ +#define PM_MODE_PASS 0 +#define PM_MODE_DDP 1 +#define PM_MODE_ISCSI 2 +#define PM_MODE_IWARP 3 +#define PM_MODE_RDDP 4 +#define PM_MODE_IANDP 5 +#define PM_MODE_FCOE 6 +#define PM_MODE_USER 7 +#define PM_MODE_TLS 8 +#define PM_MODE_DTLS 9 + + + +#define SEQ_ADD(a,b) (((a)+(b)) & 0xFFFFFFFF) +#define SEQ_SUB(a,b) (((a)-(b)) & 0xFFFFFFFF) + +///* functions needed by the tcbshowtN.c code */ +extern unsigned val(char *name); +extern ui64 val64(char *name); +extern void PR(char *fmt, ...); +extern char *spr_tcp_state(unsigned state); +extern char *spr_ip_version(unsigned ipver); +extern char *spr_cctrl_sel(unsigned cctrl_sel0,unsigned cctrl_sel1); +extern char *spr_ulp_type(unsigned ulp_type); + + +extern unsigned parse_tcb( _TCBVAR *base_tvp, unsigned char *buf); +extern void display_tcb(_TCBVAR *tvp,unsigned char *buf,int aux); +extern void parse_n_display_xcb(unsigned char *buf); + +extern void swizzle_tcb(unsigned char *buf); +extern void set_tidtype(unsigned int tidtype); +extern void set_tcb_info(unsigned int tidtype, unsigned int cardtype); +extern void set_print_style(unsigned int prntstyl); + +#endif /* __tcb_common_h */ Added: head/usr.sbin/cxgbetool/tcbinfot4.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/cxgbetool/tcbinfot4.c Wed Mar 14 00:04:58 2018 (r330887) @@ -0,0 +1,1423 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* Auto-generated file. Avoid direct editing. */ +/* Edits will be lost when file regenerated. */ +#include +#include "tcb_common.h" +_TCBVAR g_tcb_info4[]={ + {"ulp_type" , 0, 0, 3, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ulp_type" , /* aka */ + COMP_NONE , /* comp */ + "ULP mode: 0 =toe, 2=iscsi, 4=rdma, 5=ddp, remaining values are reserved", /*desc*/ + NULL, /*akadesc */ + }, + {"ulp_raw" , 0, 4, 11, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "ulp" , /* aka */ + COMP_ULP , /* comp */ + "ULP subtype", /*desc*/ + NULL, /*akadesc */ + }, + {"l2t_ix" , 0, 12, 23, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "l2t_ix" , /* aka */ + COMP_NONE , /* comp */ + "Destination MAC address index", /*desc*/ + NULL, /*akadesc */ + }, + {"smac_sel" , 0, 24, 31, /* name,aux,lo,hi */ + NULL , 0, 0, /* faka,flo,fhi */ + "smac_sel" , /* aka */ + COMP_NONE , /* comp */ + "Source MAC address index", /*desc*/ + NULL, /*akadesc */ + }, + {"TF_MIGRATING" , 0, 32, 32, /* name,aux,lo,hi */ + "t_flags" , 0, 0, /* faka,flo,fhi */ + "migrating" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_NON_OFFLOAD" , 0, 33, 33, /* name,aux,lo,hi */ + "t_flags" , 1, 1, /* faka,flo,fhi */ + "non_offload" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, + {"TF_LOCK_TID" , 0, 34, 34, /* name,aux,lo,hi */ + "t_flags" , 2, 2, /* faka,flo,fhi */ + "lock_tid" , /* aka */ + COMP_NONE , /* comp */ + NULL, /*desc*/ + NULL, /*akadesc */ + }, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 14 00:07:41 2018 Return-Path: Delivered-To: svn-src-all@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 9B7A6F2D734; Wed, 14 Mar 2018 00:07:41 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFEAF7DD13; Wed, 14 Mar 2018 00:07:40 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 9E6045A9F12; Wed, 14 Mar 2018 00:07:39 +0000 (UTC) Date: Wed, 14 Mar 2018 00:07:39 +0000 From: Brooks Davis To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330885 - head/sys/modules/cam Message-ID: <20180314000739.GA22416@spindle.one-eyed-alien.net> References: <201803132336.w2DNaFme025632@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="J2SCkAp4GZ/dPZZf" Content-Disposition: inline In-Reply-To: <201803132336.w2DNaFme025632@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 00:07:41 -0000 --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 13, 2018 at 11:36:15PM +0000, Warner Losh wrote: > Author: imp > Date: Tue Mar 13 23:36:15 2018 > New Revision: 330885 > URL: https://svnweb.freebsd.org/changeset/base/330885 >=20 > Log: > We need opt_compat.h after r330819 and 330820. > =20 > Add opt_compat.h to fix the stand-alone build case. Sorry about that. I only tested with buildkernel. I'll MFC this before either of those. -- Brooks --J2SCkAp4GZ/dPZZf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJaqGfLAAoJEKzQXbSebgfADXkH/jLwcW3zsKw/NRFITzdTGP8w 2QhaoV06tL0coyW5hjryjXfEXeamOCh1ubg7sNvNCpgM3xDgJAWyu9oG62NpdNdz y0wA8t6nheaeOk2Ak8mIqjH08E0WCqQ7SgQj0gdq1IcXF1NCliMQMDpsEmT8lDtc QUPzhSki8jc5GablzBgrmQs/VmYk2Lnf0Una8CWiceLDrs6nTsNgJ4FlZ8QYENZN aYL616bLbA1c8JeehKFq2l1JNW/SPLLbgivv7JH1g4x2s/y7zE2AEgKjXe3LHYcz cs/pefp3evdcGve2zdKivGgCIukp4ERcHtA0NCdsGFonWs4R2Wozu2rrLaD75FY= =Qr28 -----END PGP SIGNATURE----- --J2SCkAp4GZ/dPZZf-- From owner-svn-src-all@freebsd.org Wed Mar 14 00:27:26 2018 Return-Path: Delivered-To: svn-src-all@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 78F4FF301D4; Wed, 14 Mar 2018 00:27:26 +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 2776B7E990; Wed, 14 Mar 2018 00:27:26 +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 084CD20E24; Wed, 14 Mar 2018 00:27:26 +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 w2E0RQb2050113; Wed, 14 Mar 2018 00:27:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E0RP2M050108; Wed, 14 Mar 2018 00:27:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201803140027.w2E0RP2M050108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Mar 2018 00:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330888 - in stable/11: share/man/man4 sys/dev/isp X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/dev/isp X-SVN-Commit-Revision: 330888 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 00:27:26 -0000 Author: mav Date: Wed Mar 14 00:27:25 2018 New Revision: 330888 URL: https://svnweb.freebsd.org/changeset/base/330888 Log: MFC r330121: Add support for Enhanced Gen 5 (16Gb) and Gen 6 (32Gb) QLogic FC HBAs. Sponsored by: iXsystems, Inc. Modified: stable/11/share/man/man4/isp.4 stable/11/sys/dev/isp/isp.c stable/11/sys/dev/isp/isp_pci.c stable/11/sys/dev/isp/ispmbox.h stable/11/sys/dev/isp/ispvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/isp.4 ============================================================================== --- stable/11/share/man/man4/isp.4 Wed Mar 14 00:04:58 2018 (r330887) +++ stable/11/share/man/man4/isp.4 Wed Mar 14 00:27:25 2018 (r330888) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2009-2017 Alexander Motin +.\" Copyright (c) 2009-2018 Alexander Motin .\" Copyright (c) 2006 Marcus Alves Grando .\" Copyright (c) 1998-2001 Matthew Jacob, for NASA/Ames Research Center .\" @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 3, 2017 +.Dd February 27, 2018 .Dt ISP 4 .Os .Sh NAME @@ -139,6 +139,10 @@ Optical 4Gb Fibre Channel PCIe cards. Optical 8Gb Fibre Channel PCIe cards. .It Qlogic 267x/836x (aka 2031/8031) Optical 16Gb FC/FCoE PCIe cards. +.It Qlogic 2690/2692/2694 (aka 2684/2692) +Optical 16Gb Fibre Channel PCIe cards. +.It Qlogic 2740/2742/2764 (aka 2722/2714) +Optical 32Gb Fibre Channel PCIe cards. .El .Sh CONFIGURATION OPTIONS Target mode support for Fibre Channel adapters may be enabled with the Modified: stable/11/sys/dev/isp/isp.c ============================================================================== --- stable/11/sys/dev/isp/isp.c Wed Mar 14 00:04:58 2018 (r330887) +++ stable/11/sys/dev/isp/isp.c Wed Mar 14 00:27:25 2018 (r330888) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009-2017 Alexander Motin + * Copyright (c) 2009-2018 Alexander Motin * Copyright (c) 1997-2009 by Matthew Jacob * All rights reserved. * @@ -224,8 +224,11 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults) btype = "2532"; break; case ISP_HA_FC_2600: - btype = "2031"; + btype = "2600"; break; + case ISP_HA_FC_2700: + btype = "2700"; + break; default: break; } @@ -2018,7 +2021,7 @@ isp_fibre_init_2400(ispsoftc_t *isp) } icbp->icb_execthrottle = DEFAULT_EXEC_THROTTLE(isp); - if (icbp->icb_execthrottle < 1) { + if (icbp->icb_execthrottle < 1 && !IS_26XX(isp)) { isp_prt(isp, ISP_LOGERR, "bad execution throttle of %d- using %d", DEFAULT_EXEC_THROTTLE(isp), ICB_DFLT_THROTTLE); icbp->icb_execthrottle = ICB_DFLT_THROTTLE; } @@ -2123,11 +2126,15 @@ isp_fibre_init_2400(ispsoftc_t *isp) } else if (isp->isp_confopts & ISP_CFG_16GB) { icbp->icb_fwoptions3 &= ~ICB2400_OPT3_RATE_MASK; icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_16GB; + } else if (isp->isp_confopts & ISP_CFG_32GB) { + icbp->icb_fwoptions3 &= ~ICB2400_OPT3_RATE_MASK; + icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_32GB; } else { switch (icbp->icb_fwoptions3 & ICB2400_OPT3_RATE_MASK) { case ICB2400_OPT3_RATE_4GB: case ICB2400_OPT3_RATE_8GB: case ICB2400_OPT3_RATE_16GB: + case ICB2400_OPT3_RATE_32GB: case ICB2400_OPT3_RATE_AUTO: break; case ICB2400_OPT3_RATE_2GB: @@ -3092,6 +3099,8 @@ not_on_fabric: if (mbs.param[0] == MBOX_COMMAND_COMPLETE) { if (mbs.param[1] == MBGSD_10GB) fcp->isp_gbspeed = 10; + else if (mbs.param[1] == MBGSD_32GB) + fcp->isp_gbspeed = 32; else if (mbs.param[1] == MBGSD_16GB) fcp->isp_gbspeed = 16; else if (mbs.param[1] == MBGSD_8GB) @@ -5900,6 +5909,13 @@ isp_parse_async_fc(ispsoftc_t *isp, uint16_t mbox) isp_prt(isp, ISP_LOGERR, "Temperature alert (subcode 0x%x)", ISP_READ(isp, OUTMAILBOX1)); break; + case ASYNC_TRANSCEIVER_INSERTION: + isp_prt(isp, ISP_LOGDEBUG0, "Transceiver insertion (0x%x)", + ISP_READ(isp, OUTMAILBOX1)); + break; + case ASYNC_TRANSCEIVER_REMOVAL: + isp_prt(isp, ISP_LOGDEBUG0, "Transceiver removal"); + break; case ASYNC_AUTOLOAD_FW_COMPLETE: isp_prt(isp, ISP_LOGDEBUG0, "Autoload FW init complete"); break; @@ -6824,7 +6840,7 @@ static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x07, 0x01), /* 0x66: MBOX_TARGET_RESET */ ISP_FC_OPMAP(0x07, 0x01), /* 0x67: MBOX_CLEAR_TASK_SET */ ISP_FC_OPMAP(0x07, 0x01), /* 0x68: MBOX_ABORT_TASK_SET */ - ISP_FC_OPMAP(0x01, 0x07), /* 0x69: MBOX_GET_FW_STATE */ + ISP_FC_OPMAP_HALF(0x00, 0x01, 0x0f, 0x1f), /* 0x69: MBOX_GET_FW_STATE */ ISP_FC_OPMAP_HALF(0x6, 0x03, 0x0, 0xcf), /* 0x6a: MBOX_GET_PORT_NAME */ ISP_FC_OPMAP(0xcf, 0x01), /* 0x6b: MBOX_GET_LINK_STATUS */ ISP_FC_OPMAP(0x0f, 0x01), /* 0x6c: MBOX_INIT_LIP_RESET */ Modified: stable/11/sys/dev/isp/isp_pci.c ============================================================================== --- stable/11/sys/dev/isp/isp_pci.c Wed Mar 14 00:04:58 2018 (r330887) +++ stable/11/sys/dev/isp/isp_pci.c Wed Mar 14 00:27:25 2018 (r330888) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2009-2018 Alexander Motin * Copyright (c) 1997-2008 by Matthew Jacob * All rights reserved. * @@ -175,6 +176,17 @@ static struct ispmdvec mdvec_2600 = { NULL }; +static struct ispmdvec mdvec_2700 = { + isp_pci_run_isr_2400, + isp_pci_rd_reg_2600, + isp_pci_wr_reg_2600, + isp_pci_mbxdma, + isp_pci_dmasetup, + isp_common_dmateardown, + isp_pci_irqsetup, + NULL +}; + #ifndef PCIM_CMD_INVEN #define PCIM_CMD_INVEN 0x10 #endif @@ -207,142 +219,80 @@ static struct ispmdvec mdvec_2600 = { #define PCIR_ROMADDR 0x30 #endif -#ifndef PCI_VENDOR_QLOGIC #define PCI_VENDOR_QLOGIC 0x1077 -#endif -#ifndef PCI_PRODUCT_QLOGIC_ISP1020 #define PCI_PRODUCT_QLOGIC_ISP1020 0x1020 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP1080 #define PCI_PRODUCT_QLOGIC_ISP1080 0x1080 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP10160 #define PCI_PRODUCT_QLOGIC_ISP10160 0x1016 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP12160 #define PCI_PRODUCT_QLOGIC_ISP12160 0x1216 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP1240 #define PCI_PRODUCT_QLOGIC_ISP1240 0x1240 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP1280 #define PCI_PRODUCT_QLOGIC_ISP1280 0x1280 -#endif -#ifndef PCI_PRODUCT_QLOGIC_ISP2100 #define PCI_PRODUCT_QLOGIC_ISP2100 0x2100 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2200 #define PCI_PRODUCT_QLOGIC_ISP2200 0x2200 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2300 #define PCI_PRODUCT_QLOGIC_ISP2300 0x2300 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2312 #define PCI_PRODUCT_QLOGIC_ISP2312 0x2312 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2322 #define PCI_PRODUCT_QLOGIC_ISP2322 0x2322 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2422 #define PCI_PRODUCT_QLOGIC_ISP2422 0x2422 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2432 #define PCI_PRODUCT_QLOGIC_ISP2432 0x2432 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2532 #define PCI_PRODUCT_QLOGIC_ISP2532 0x2532 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP6312 +#define PCI_PRODUCT_QLOGIC_ISP5432 0x5432 #define PCI_PRODUCT_QLOGIC_ISP6312 0x6312 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP6322 #define PCI_PRODUCT_QLOGIC_ISP6322 0x6322 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP5432 -#define PCI_PRODUCT_QLOGIC_ISP5432 0x5432 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP2031 #define PCI_PRODUCT_QLOGIC_ISP2031 0x2031 -#endif - -#ifndef PCI_PRODUCT_QLOGIC_ISP8031 #define PCI_PRODUCT_QLOGIC_ISP8031 0x8031 -#endif +#define PCI_PRODUCT_QLOGIC_ISP2684 0x2171 +#define PCI_PRODUCT_QLOGIC_ISP2692 0x2b61 +#define PCI_PRODUCT_QLOGIC_ISP2714 0x2071 +#define PCI_PRODUCT_QLOGIC_ISP2722 0x2261 -#define PCI_QLOGIC_ISP5432 \ - ((PCI_PRODUCT_QLOGIC_ISP5432 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP1020 \ ((PCI_PRODUCT_QLOGIC_ISP1020 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP1080 \ ((PCI_PRODUCT_QLOGIC_ISP1080 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP10160 \ ((PCI_PRODUCT_QLOGIC_ISP10160 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP12160 \ ((PCI_PRODUCT_QLOGIC_ISP12160 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP1240 \ ((PCI_PRODUCT_QLOGIC_ISP1240 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP1280 \ ((PCI_PRODUCT_QLOGIC_ISP1280 << 16) | PCI_VENDOR_QLOGIC) #define PCI_QLOGIC_ISP2100 \ ((PCI_PRODUCT_QLOGIC_ISP2100 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2200 \ ((PCI_PRODUCT_QLOGIC_ISP2200 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2300 \ ((PCI_PRODUCT_QLOGIC_ISP2300 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2312 \ ((PCI_PRODUCT_QLOGIC_ISP2312 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2322 \ ((PCI_PRODUCT_QLOGIC_ISP2322 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2422 \ ((PCI_PRODUCT_QLOGIC_ISP2422 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2432 \ ((PCI_PRODUCT_QLOGIC_ISP2432 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2532 \ ((PCI_PRODUCT_QLOGIC_ISP2532 << 16) | PCI_VENDOR_QLOGIC) - +#define PCI_QLOGIC_ISP5432 \ + ((PCI_PRODUCT_QLOGIC_ISP5432 << 16) | PCI_VENDOR_QLOGIC) #define PCI_QLOGIC_ISP6312 \ ((PCI_PRODUCT_QLOGIC_ISP6312 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP6322 \ ((PCI_PRODUCT_QLOGIC_ISP6322 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP2031 \ ((PCI_PRODUCT_QLOGIC_ISP2031 << 16) | PCI_VENDOR_QLOGIC) - #define PCI_QLOGIC_ISP8031 \ ((PCI_PRODUCT_QLOGIC_ISP8031 << 16) | PCI_VENDOR_QLOGIC) +#define PCI_QLOGIC_ISP2684 \ + ((PCI_PRODUCT_QLOGIC_ISP2684 << 16) | PCI_VENDOR_QLOGIC) +#define PCI_QLOGIC_ISP2692 \ + ((PCI_PRODUCT_QLOGIC_ISP2692 << 16) | PCI_VENDOR_QLOGIC) +#define PCI_QLOGIC_ISP2714 \ + ((PCI_PRODUCT_QLOGIC_ISP2714 << 16) | PCI_VENDOR_QLOGIC) +#define PCI_QLOGIC_ISP2722 \ + ((PCI_PRODUCT_QLOGIC_ISP2722 << 16) | PCI_VENDOR_QLOGIC) /* * Odd case for some AMI raid cards... We need to *not* attach to this. @@ -462,6 +412,18 @@ isp_pci_probe(device_t dev) case PCI_QLOGIC_ISP8031: device_set_desc(dev, "Qlogic ISP 8031 PCI FCoE Adapter"); break; + case PCI_QLOGIC_ISP2684: + device_set_desc(dev, "Qlogic ISP 2684 PCI FC Adapter"); + break; + case PCI_QLOGIC_ISP2692: + device_set_desc(dev, "Qlogic ISP 2692 PCI FC Adapter"); + break; + case PCI_QLOGIC_ISP2714: + device_set_desc(dev, "Qlogic ISP 2714 PCI FC Adapter"); + break; + case PCI_QLOGIC_ISP2722: + device_set_desc(dev, "Qlogic ISP 2722 PCI FC Adapter"); + break; default: return (ENXIO); } @@ -807,6 +769,16 @@ isp_pci_attach(device_t dev) isp->isp_nchan += isp_nvports; isp->isp_mdvec = &mdvec_2600; isp->isp_type = ISP_HA_FC_2600; + pcs->pci_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = PCI_MBOX_REGS2400_OFF; + break; + case PCI_QLOGIC_ISP2684: + case PCI_QLOGIC_ISP2692: + case PCI_QLOGIC_ISP2714: + case PCI_QLOGIC_ISP2722: + did = 0x2700; + isp->isp_nchan += isp_nvports; + isp->isp_mdvec = &mdvec_2700; + isp->isp_type = ISP_HA_FC_2700; pcs->pci_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = PCI_MBOX_REGS2400_OFF; break; default: Modified: stable/11/sys/dev/isp/ispmbox.h ============================================================================== --- stable/11/sys/dev/isp/ispmbox.h Wed Mar 14 00:04:58 2018 (r330887) +++ stable/11/sys/dev/isp/ispmbox.h Wed Mar 14 00:27:25 2018 (r330888) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2009-2017 Alexander Motin + * Copyright (c) 2009-2018 Alexander Motin * Copyright (c) 1997-2009 by Matthew Jacob * All rights reserved. * @@ -176,6 +176,7 @@ #define MBGSD_4GB 0x03 /* 24XX only */ #define MBGSD_8GB 0x04 /* 25XX only */ #define MBGSD_16GB 0x05 /* 26XX only */ +#define MBGSD_32GB 0x06 /* 27XX only */ #define MBGSD_10GB 0x13 /* 26XX only */ #define MBOX_SEND_RNFT 0x005e #define MBOX_INIT_FIRMWARE 0x0060 @@ -297,6 +298,8 @@ #define ASYNC_INTER_DRIVER_COMP 0x8100 /* FCoE only */ #define ASYNC_INTER_DRIVER_NOTIFY 0x8101 /* FCoE only */ #define ASYNC_INTER_DRIVER_TIME_EXT 0x8102 /* FCoE only */ +#define ASYNC_TRANSCEIVER_INSERTION 0x8130 +#define ASYNC_TRANSCEIVER_REMOVAL 0x8131 #define ASYNC_NIC_FW_STATE_CHANGE 0x8200 /* FCoE only */ #define ASYNC_AUTOLOAD_FW_COMPLETE 0x8400 #define ASYNC_AUTOLOAD_FW_FAILURE 0x8401 @@ -1070,6 +1073,7 @@ typedef struct { #define ICB2400_OPT3_RATE_4GB 0x00006000 #define ICB2400_OPT3_RATE_8GB 0x00008000 #define ICB2400_OPT3_RATE_16GB 0x0000A000 +#define ICB2400_OPT3_RATE_32GB 0x0000C000 #define ICB2400_OPT3_ENA_OOF_XFRDY 0x00000200 #define ICB2400_OPT3_NO_N2N_LOGI 0x00000100 #define ICB2400_OPT3_NO_LOCAL_PLOGI 0x00000080 Modified: stable/11/sys/dev/isp/ispvar.h ============================================================================== --- stable/11/sys/dev/isp/ispvar.h Wed Mar 14 00:04:58 2018 (r330887) +++ stable/11/sys/dev/isp/ispvar.h Wed Mar 14 00:27:25 2018 (r330888) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2009-2017 Alexander Motin + * Copyright (c) 2009-2018 Alexander Motin * Copyright (c) 1997-2009 by Matthew Jacob * All rights reserved. * @@ -631,8 +631,8 @@ struct ispsoftc { #define ISP_CFG_NPORT_ONLY 0x04 /* insist on {N/F}-Port connection */ #define ISP_CFG_LPORT 0x06 /* prefer {N/F}L-Port connection */ #define ISP_CFG_NPORT 0x08 /* prefer {N/F}-Port connection */ -#define ISP_CFG_1GB 0x10 /* force 1GB connection (23XX only) */ -#define ISP_CFG_2GB 0x20 /* force 2GB connection (23XX only) */ +#define ISP_CFG_1GB 0x10 /* force 1Gb connection (23XX only) */ +#define ISP_CFG_2GB 0x20 /* force 2Gb connection (23XX only) */ #define ISP_CFG_NORELOAD 0x80 /* don't download f/w */ #define ISP_CFG_NONVRAM 0x40 /* ignore NVRAM */ #define ISP_CFG_NOFCTAPE 0x100 /* disable FC-Tape */ @@ -640,9 +640,10 @@ struct ispsoftc { #define ISP_CFG_OWNFSZ 0x400 /* override NVRAM frame size */ #define ISP_CFG_OWNLOOPID 0x800 /* override NVRAM loopid */ #define ISP_CFG_OWNEXCTHROTTLE 0x1000 /* override NVRAM execution throttle */ -#define ISP_CFG_4GB 0x2000 /* force 4GB connection (24XX only) */ -#define ISP_CFG_8GB 0x4000 /* force 8GB connection (25XX only) */ -#define ISP_CFG_16GB 0x8000 /* force 16GB connection (82XX only) */ +#define ISP_CFG_4GB 0x2000 /* force 4Gb connection (24XX only) */ +#define ISP_CFG_8GB 0x4000 /* force 8Gb connection (25XX only) */ +#define ISP_CFG_16GB 0x8000 /* force 16Gb connection (26XX only) */ +#define ISP_CFG_32GB 0x10000 /* force 32Gb connection (27XX only) */ /* * For each channel, the outer layers should know what role that channel @@ -743,6 +744,7 @@ struct ispsoftc { #define ISP_HA_FC_2400 0x60 #define ISP_HA_FC_2500 0x70 #define ISP_HA_FC_2600 0x80 +#define ISP_HA_FC_2700 0x90 #define IS_SCSI(isp) (isp->isp_type & ISP_HA_SCSI) #define IS_1020(isp) (isp->isp_type < ISP_HA_SCSI_1240) @@ -769,6 +771,7 @@ struct ispsoftc { #define IS_24XX(isp) ((isp)->isp_type >= ISP_HA_FC_2400) #define IS_25XX(isp) ((isp)->isp_type >= ISP_HA_FC_2500) #define IS_26XX(isp) ((isp)->isp_type >= ISP_HA_FC_2600) +#define IS_27XX(isp) ((isp)->isp_type >= ISP_HA_FC_2700) /* * DMA related macros From owner-svn-src-all@freebsd.org Wed Mar 14 01:38:48 2018 Return-Path: Delivered-To: svn-src-all@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 8B94FF3A962; Wed, 14 Mar 2018 01:38:48 +0000 (UTC) (envelope-from emaste@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 39D03814A3; Wed, 14 Mar 2018 01:38:48 +0000 (UTC) (envelope-from emaste@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 33F2A218C5; Wed, 14 Mar 2018 01:38:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2E1cmUo084669; Wed, 14 Mar 2018 01:38:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E1cmMJ084668; Wed, 14 Mar 2018 01:38:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803140138.w2E1cmMJ084668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 14 Mar 2018 01:38:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330890 - stable/11/share/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/share/mk X-SVN-Commit-Revision: 330890 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 01:38:48 -0000 Author: emaste Date: Wed Mar 14 01:38:47 2018 New Revision: 330890 URL: https://svnweb.freebsd.org/changeset/base/330890 Log: MFC r330613: Disable LLD_BOOTSTRAP under WITHOUT_CROSS_COMPILER LLD is a cross toolchain component. It shouldn't be built when requesting a build without building a cross compiler. (CROSS_COMPILER is somewhat unfortunately named; in any case, lld should be treated as GNU binutils here.) Submitted by: Dan McGregor Modified: stable/11/share/mk/src.opts.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/src.opts.mk ============================================================================== --- stable/11/share/mk/src.opts.mk Wed Mar 14 00:30:49 2018 (r330889) +++ stable/11/share/mk/src.opts.mk Wed Mar 14 01:38:47 2018 (r330890) @@ -397,6 +397,7 @@ MK_BINUTILS_BOOTSTRAP:= no MK_CLANG_BOOTSTRAP:= no MK_ELFTOOLCHAIN_BOOTSTRAP:= no MK_GCC_BOOTSTRAP:= no +MK_LLD_BOOTSTRAP:= no .endif .if ${MK_META_MODE} == "yes" From owner-svn-src-all@freebsd.org Wed Mar 14 02:35:50 2018 Return-Path: Delivered-To: svn-src-all@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 7DD87F4315A; Wed, 14 Mar 2018 02:35:50 +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 242C8835D7; Wed, 14 Mar 2018 02:35:50 +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 1BDEA221D5; Wed, 14 Mar 2018 02:35:50 +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 w2E2Zn3L014920; Wed, 14 Mar 2018 02:35:49 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E2ZnqF014919; Wed, 14 Mar 2018 02:35:49 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803140235.w2E2ZnqF014919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 14 Mar 2018 02:35:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330891 - head/stand/uboot/common X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/uboot/common X-SVN-Commit-Revision: 330891 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 02:35:50 -0000 Author: kevans Date: Wed Mar 14 02:35:49 2018 New Revision: 330891 URL: https://svnweb.freebsd.org/changeset/base/330891 Log: ubldr: Bump heap size from 512K to 1M lualoader in itself only uses another ~200K, but there seems to be no reason not to bump it a little higher to give us some more wiggle room. With this, I can boot using a menu-enabled lualoader, no problem and reasonably fast. Some heap usage datapoints from the review: forthloader, no menus, kernel loaded: heap base at 0x1203d5b0, top at 0x1208e000, used 330320 lualoader, no menus, kernel loaded: heap base at 0x42050028, top at 0x420ab000, used 372696 lualoader, menus, kernel loaded: heap base at 0x42050028, top at 0x420d5000, used 544728 Since then, the no menu case for lualoader should have decreased slightly as I've made some changes to make sure that it no longer loads any of th emenu bits with beastie disabled. While here, split heap size out into a HEAP_SIZE macro. Reviewed by: ian, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14471 Modified: head/stand/uboot/common/main.c Modified: head/stand/uboot/common/main.c ============================================================================== --- head/stand/uboot/common/main.c Wed Mar 14 01:38:47 2018 (r330890) +++ head/stand/uboot/common/main.c Wed Mar 14 02:35:49 2018 (r330891) @@ -41,6 +41,10 @@ __FBSDID("$FreeBSD$"); #define nitems(x) (sizeof((x)) / sizeof((x)[0])) #endif +#ifndef HEAP_SIZE +#define HEAP_SIZE (1 * 1024 * 1024) +#endif + struct uboot_devdesc currdev; struct arch_switch archsw; /* MI/MD interface boundary */ int devs_no; @@ -421,7 +425,7 @@ main(int argc, char **argv) * of our bss and the bottom of the u-boot stack to avoid overlap. */ uboot_heap_start = round_page((uintptr_t)end); - uboot_heap_end = uboot_heap_start + 512 * 1024; + uboot_heap_end = uboot_heap_start + HEAP_SIZE; setheap((void *)uboot_heap_start, (void *)uboot_heap_end); /* From owner-svn-src-all@freebsd.org Wed Mar 14 02:45:45 2018 Return-Path: Delivered-To: svn-src-all@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 D8712F43C0D for ; Wed, 14 Mar 2018 02:45:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D0C683C31 for ; Wed, 14 Mar 2018 02:45:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x233.google.com with SMTP id w63-v6so2668832ita.3 for ; Tue, 13 Mar 2018 19:45:44 -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=681Yubwpa9XEuCFXlVnvIwxe9ncjhQp20ZyNdG1+jus=; b=0WuSp10gn3v33Aqhivlt4hecSq9SWaY9NB2Hi77SGVm+zjV3Vxx8R7+JSPduHyR/Br tP/apYrAChc9H37+zJ+e4lg+S2BQvJHNYEr/fDt5c4vDI86VFYiEEUODqzi6k63FMEHH SLeVmuqhcMshOeGNsiLtUotavD1ne47NOU/AhR2qGqpp2qvZksyouVTyoaPeaK4MtYE7 MhUS3P2wujAb/6sRxj5ZRGpBWx7ArOSmlf9Om8QwaKd6yMvEYeDl/IZ98jK3ecc1fXVA HfcOO2rpjDtoPETep7K3u+9za7ZsrTXrWuE/u8mNrBBqWNGLhLwmQzSvX3Qn+N5tQS8M 5i4g== 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=681Yubwpa9XEuCFXlVnvIwxe9ncjhQp20ZyNdG1+jus=; b=iQmQDgLRgaXAvQzo3QjCLEouvUCb2QJoAfRAecTCYGDtGhXhHKv3DeNefmsghEwf8+ 3WdkO5wWx0+/d1q3iX5QM4QMWsh5aUbWpXr/xqQy5Te8lNjKLjMMx+yyJWMjiMpSOsEA AL/K2qrANp9JsKWx+bqcTe5M9hDIu670Ey8O7LT5FPppLL5ZlmXRosOKS3AYc/lqsR1u QMsmbhKc+iZfr4FB65cJeT/WerR7psPwBzawJP5p9IQdc9YvEZCfiyfmGfUaZs5iXstD dFYRn5QvI7MQYOUeKVGhDCOkNhbJ8XbkK59DmjZnnylTVJgUCXmVqir2m9okbb3QsTJ8 Yytg== X-Gm-Message-State: AElRT7En1rHpTb8jFf1gtNF2vLyPGmb4goOxIXnLmhi7pf/DR/142VdQ RiZFY2m+PZn12Jdkhy4ivgM7wtsuVn7kv//VdPuiiQ== X-Google-Smtp-Source: AG47ELs7FvzFjYs6v3TqvXJL77i9NAyMGimxykxpwYRgOAwJlXHj+QPODUJbTCEx7fyIh2MhUzAF9zqCp0GcvEkZyUY= X-Received: by 2002:a24:6f04:: with SMTP id x4-v6mr312559itb.51.1520995543553; Tue, 13 Mar 2018 19:45:43 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Tue, 13 Mar 2018 19:45:41 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:bcea:d775:d975:818] Received: by 10.79.203.196 with HTTP; Tue, 13 Mar 2018 19:45:41 -0700 (PDT) In-Reply-To: <20180314000739.GA22416@spindle.one-eyed-alien.net> References: <201803132336.w2DNaFme025632@repo.freebsd.org> <20180314000739.GA22416@spindle.one-eyed-alien.net> From: Warner Losh Date: Tue, 13 Mar 2018 20:45:41 -0600 X-Google-Sender-Auth: wl3g4fTl57Ce8T1BpNTCRiq1Ejg Message-ID: Subject: Re: svn commit: r330885 - head/sys/modules/cam To: Brooks Davis Cc: Warner Losh , 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.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 02:45:45 -0000 On Mar 13, 2018 6:07 PM, "Brooks Davis" wrote: On Tue, Mar 13, 2018 at 11:36:15PM +0000, Warner Losh wrote: > Author: imp > Date: Tue Mar 13 23:36:15 2018 > New Revision: 330885 > URL: https://svnweb.freebsd.org/changeset/base/330885 > > Log: > We need opt_compat.h after r330819 and 330820. > > Add opt_compat.h to fix the stand-alone build case. Sorry about that. I only tested with buildkernel. I'll MFC this before either of those. Don't fret. I was on the review and missed it too. Warner From owner-svn-src-all@freebsd.org Wed Mar 14 02:45:43 2018 Return-Path: Delivered-To: svn-src-all@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 0EB6FF43BD8; Wed, 14 Mar 2018 02:45:43 +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 B12EA83C2E; Wed, 14 Mar 2018 02:45:42 +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 89EBD22371; Wed, 14 Mar 2018 02:45:42 +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 w2E2jges019646; Wed, 14 Mar 2018 02:45:42 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E2jgpG019644; Wed, 14 Mar 2018 02:45:42 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140245.w2E2jgpG019644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 02:45:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330892 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330892 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 02:45:43 -0000 Author: eadler Date: Wed Mar 14 02:45:42 2018 New Revision: 330892 URL: https://svnweb.freebsd.org/changeset/base/330892 Log: MFC r304173,r304181,r304186: Fix restoring the kbd_mode part of the keyboard state in grab/ungrab. Simply change the mode to K_XLATE using a local variable and use the grab level as a flag to tell screen switches not to change it again, so that we don't need to switch scp->kbd_mode. We did the latter, but didn't have the complications to update the keyboard mode switch for every screen switch. sc->kbd_mode remains at its user setting for all scp's and ungrabbing restores to it. Restructure the grabbing functions into mere wrappers of new open and close functions. Scattered calls to sc_cnputc() and sc_cngetc() were broken by turning the semi-reentrant inline context-switching code in these functions into the grabbing functions. cncheckc() calls for panic dumps are the main broken case. The grabbing functions have special behaviour (mainly screen switching in sc_cngrab()) which makes them unsuitable as replacements for the inline code. Clean up the new sc cn open and close functions (old sc cn grab and ungrab functions). Mainly, spell sc as itself instead of as scp->sc. Modified: stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 02:35:49 2018 (r330891) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 02:45:42 2018 (r330892) @@ -1645,59 +1645,70 @@ sc_cnterm(struct consdev *cp) sc_console = NULL; } +struct sc_cnstate; /* not used yet */ +static void sccnclose(sc_softc_t *sc, struct sc_cnstate *sp); +static void sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int flags); + static void -sc_cngrab(struct consdev *cp) +sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int flags) { - scr_stat *scp; + int kbd_mode; if (!cold && - sc_console->sc->cur_scp->index != sc_console->index && - sc_console->sc->cur_scp->smode.mode == VT_AUTO && + sc->cur_scp->index != sc_console->index && + sc->cur_scp->smode.mode == VT_AUTO && sc_console->smode.mode == VT_AUTO) - sc_switch_scr(sc_console->sc, sc_console->index); + sc_switch_scr(sc, sc_console->index); - scp = sc_console->sc->cur_scp; - - if (scp->sc->kbd == NULL) + if (sc->kbd == NULL) return; - if (scp->sc->grab_level++ > 0) - return; - /* * Make sure the keyboard is accessible even when the kbd device * driver is disabled. */ - kbdd_enable(scp->sc->kbd); + kbdd_enable(sc->kbd); - /* we shall always use the keyboard in the XLATE mode here */ - scp->kbd_prev_mode = scp->kbd_mode; - scp->kbd_mode = K_XLATE; - (void)kbdd_ioctl(scp->sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode); - - kbdd_poll(scp->sc->kbd, TRUE); + /* Switch the keyboard to console mode (K_XLATE, polled) on all scp's. */ + kbd_mode = K_XLATE; + (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&kbd_mode); + kbdd_poll(sc->kbd, TRUE); } static void -sc_cnungrab(struct consdev *cp) +sccnclose(sc_softc_t *sc, struct sc_cnstate *sp) { - scr_stat *scp; - - scp = sc_console->sc->cur_scp; /* XXX */ - if (scp->sc->kbd == NULL) + if (sc->kbd == NULL) return; - if (--scp->sc->grab_level > 0) - return; + /* Restore keyboard mode (for the current, possibly-changed scp). */ + kbdd_poll(sc->kbd, FALSE); + (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&sc->cur_scp->kbd_mode); - kbdd_poll(scp->sc->kbd, FALSE); + kbdd_disable(sc->kbd); +} - scp->kbd_mode = scp->kbd_prev_mode; - (void)kbdd_ioctl(scp->sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode); - kbdd_disable(scp->sc->kbd); +static void +sc_cngrab(struct consdev *cp) +{ + sc_softc_t *sc; + + sc = sc_console->sc; + if (sc->grab_level++ == 0) + sccnopen(sc, NULL, 0); } static void +sc_cnungrab(struct consdev *cp) +{ + sc_softc_t *sc; + + sc = sc_console->sc; + if (--sc->grab_level == 0) + sccnclose(sc, NULL); +} + +static void sc_cnputc(struct consdev *cd, int c) { u_char buf[1]; @@ -2667,7 +2678,7 @@ exchange_scr(sc_softc_t *sc) sc_set_border(scp, scp->border); /* set up the keyboard for the new screen */ - if (sc->old_scp->kbd_mode != scp->kbd_mode) + if (sc->grab_level == 0 && sc->old_scp->kbd_mode != scp->kbd_mode) (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode); update_kbd_state(scp, scp->status, LOCK_MASK); @@ -3412,7 +3423,7 @@ next_code: if (!(flags & SCGETC_CN)) random_harvest_queue(&c, sizeof(c), 1, RANDOM_KEYBOARD); - if (scp->kbd_mode != K_XLATE) + if (sc->grab_level == 0 && scp->kbd_mode != K_XLATE) return KEYCHAR(c); /* if scroll-lock pressed allow history browsing */ Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Wed Mar 14 02:35:49 2018 (r330891) +++ stable/11/sys/dev/syscons/syscons.h Wed Mar 14 02:45:42 2018 (r330892) @@ -306,7 +306,6 @@ typedef struct scr_stat { int status; /* status (bitfield) */ int kbd_mode; /* keyboard I/O mode */ - int kbd_prev_mode; /* keyboard I/O mode */ int cursor_pos; /* cursor buffer position */ int cursor_oldpos; /* cursor old buffer position */ From owner-svn-src-all@freebsd.org Wed Mar 14 02:56:43 2018 Return-Path: Delivered-To: svn-src-all@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 AA895F468B6; Wed, 14 Mar 2018 02:56:43 +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 58770843DB; Wed, 14 Mar 2018 02:56:43 +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 535D7224EF; Wed, 14 Mar 2018 02:56:43 +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 w2E2uhjK024420; Wed, 14 Mar 2018 02:56:43 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E2uhgs024419; Wed, 14 Mar 2018 02:56:43 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140256.w2E2uhgs024419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 02:56:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330893 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 02:56:44 -0000 Author: eadler Date: Wed Mar 14 02:56:43 2018 New Revision: 330893 URL: https://svnweb.freebsd.org/changeset/base/330893 Log: MFC r304758: Reorganise a little to prepare for locking fixes: - in sccnopen(), open the keyboard before the screen. The keyboard currently requires Giant (although it must be spinlocked to work correctly as a console), so the previous order would be a LOR if it has any semblance of locking. - add a (currently dummy) state arg to scgetc(). Modified: stable/11/sys/dev/syscons/syscons.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 02:45:42 2018 (r330892) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 02:56:43 2018 (r330893) @@ -79,6 +79,8 @@ __FBSDID("$FreeBSD$"); #include #include +struct sc_cnstate; /* not used yet */ + #define COLD 0 #define WARM 1 @@ -185,7 +187,7 @@ static void scterm(int unit, int flags); static void scshutdown(void *, int); static void scsuspend(void *); static void scresume(void *); -static u_int scgetc(sc_softc_t *sc, u_int flags); +static u_int scgetc(sc_softc_t *sc, u_int flags, struct sc_cnstate *sp); static void sc_puts(scr_stat *scp, u_char *buf, int len, int kernel); #define SCGETC_CN 1 #define SCGETC_NONBLOCK 2 @@ -750,7 +752,7 @@ sckbdevent(keyboard_t *thiskbd, int event, void *arg) * I don't think this is nessesary, and it doesn't fix * the Xaccel-2.1 keyboard hang, but it can't hurt. XXX */ - while ((c = scgetc(sc, SCGETC_NONBLOCK)) != NOKEY) { + while ((c = scgetc(sc, SCGETC_NONBLOCK, NULL)) != NOKEY) { cur_tty = SC_DEV(sc, sc->cur_scp->index); if (!tty_opened_ns(cur_tty)) @@ -1645,7 +1647,6 @@ sc_cnterm(struct consdev *cp) sc_console = NULL; } -struct sc_cnstate; /* not used yet */ static void sccnclose(sc_softc_t *sc, struct sc_cnstate *sp); static void sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int flags); @@ -1654,14 +1655,8 @@ sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int fl { int kbd_mode; - if (!cold && - sc->cur_scp->index != sc_console->index && - sc->cur_scp->smode.mode == VT_AUTO && - sc_console->smode.mode == VT_AUTO) - sc_switch_scr(sc, sc_console->index); - if (sc->kbd == NULL) - return; + goto over_keyboard; /* * Make sure the keyboard is accessible even when the kbd device @@ -1673,6 +1668,14 @@ sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int fl kbd_mode = K_XLATE; (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&kbd_mode); kbdd_poll(sc->kbd, TRUE); +over_keyboard: ; + + if (!cold && + sc->cur_scp->index != sc_console->index && + sc->cur_scp->smode.mode == VT_AUTO && + sc_console->smode.mode == VT_AUTO) + sc_switch_scr(sc, sc_console->index); + } static void @@ -1787,7 +1790,7 @@ sc_cngetc(struct consdev *cd) return -1; } - c = scgetc(scp->sc, SCGETC_CN | SCGETC_NONBLOCK); + c = scgetc(scp->sc, SCGETC_CN | SCGETC_NONBLOCK, NULL); switch (KEYFLAGS(c)) { case 0: /* normal char */ @@ -3383,7 +3386,7 @@ sc_init_emulator(scr_stat *scp, char *name) * return NOKEY if there is nothing there. */ static u_int -scgetc(sc_softc_t *sc, u_int flags) +scgetc(sc_softc_t *sc, u_int flags, struct sc_cnstate *sp) { scr_stat *scp; #ifndef SC_NO_HISTORY From owner-svn-src-all@freebsd.org Wed Mar 14 03:00:19 2018 Return-Path: Delivered-To: svn-src-all@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 61B25F46D30; Wed, 14 Mar 2018 03:00:19 +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 0E8C08472C; Wed, 14 Mar 2018 03:00:19 +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 0918F224F7; Wed, 14 Mar 2018 03:00:19 +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 w2E30IGh024762; Wed, 14 Mar 2018 03:00:18 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E30HmE024745; Wed, 14 Mar 2018 03:00:17 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803140300.w2E30HmE024745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 14 Mar 2018 03:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330894 - in head/sys/contrib/zstd: . contrib/meson doc doc/images lib lib/common lib/compress lib/decompress lib/deprecated lib/dictBuilder lib/legacy programs tests zlibWrapper zlibWr... X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/contrib/zstd: . contrib/meson doc doc/images lib lib/common lib/compress lib/decompress lib/deprecated lib/dictBuilder lib/legacy programs tests zlibWrapper zlibWrapper/examples X-SVN-Commit-Revision: 330894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:00:20 -0000 Author: cem Date: Wed Mar 14 03:00:17 2018 New Revision: 330894 URL: https://svnweb.freebsd.org/changeset/base/330894 Log: Update to Zstandard 1.3.3 Includes patch to conditionalize use of __builtin_clz(ll) on __has_builtin(). The issue is tracked upstream at https://github.com/facebook/zstd/pull/884 . Otherwise, these are vanilla Zstandard 1.3.3 files. Note that the 1.3.4 release should be due out soon. Sponsored by: Dell EMC Isilon Added: head/sys/contrib/zstd/doc/images/zstd_logo86.png (contents, props changed) head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h - copied, changed from r330893, head/sys/contrib/zstd/lib/compress/zstd_compress.h head/sys/contrib/zstd/tests/seqgen.c (contents, props changed) head/sys/contrib/zstd/tests/seqgen.h (contents, props changed) Deleted: head/sys/contrib/zstd/lib/compress/zstd_compress.h Modified: head/sys/contrib/zstd/Makefile head/sys/contrib/zstd/NEWS head/sys/contrib/zstd/README.md head/sys/contrib/zstd/circle.yml head/sys/contrib/zstd/contrib/meson/meson.build head/sys/contrib/zstd/doc/zstd_compression_format.md head/sys/contrib/zstd/doc/zstd_manual.html head/sys/contrib/zstd/lib/BUCK head/sys/contrib/zstd/lib/common/bitstream.h head/sys/contrib/zstd/lib/common/mem.h head/sys/contrib/zstd/lib/common/pool.c head/sys/contrib/zstd/lib/common/xxhash.c head/sys/contrib/zstd/lib/common/zstd_common.c head/sys/contrib/zstd/lib/common/zstd_internal.h head/sys/contrib/zstd/lib/compress/zstd_compress.c head/sys/contrib/zstd/lib/compress/zstd_double_fast.c head/sys/contrib/zstd/lib/compress/zstd_double_fast.h head/sys/contrib/zstd/lib/compress/zstd_fast.c head/sys/contrib/zstd/lib/compress/zstd_fast.h head/sys/contrib/zstd/lib/compress/zstd_lazy.c head/sys/contrib/zstd/lib/compress/zstd_lazy.h head/sys/contrib/zstd/lib/compress/zstd_ldm.h head/sys/contrib/zstd/lib/compress/zstd_opt.c head/sys/contrib/zstd/lib/compress/zstd_opt.h head/sys/contrib/zstd/lib/compress/zstdmt_compress.c head/sys/contrib/zstd/lib/compress/zstdmt_compress.h head/sys/contrib/zstd/lib/decompress/zstd_decompress.c head/sys/contrib/zstd/lib/deprecated/zbuff_compress.c head/sys/contrib/zstd/lib/dictBuilder/zdict.c head/sys/contrib/zstd/lib/legacy/zstd_v01.c head/sys/contrib/zstd/lib/legacy/zstd_v02.c head/sys/contrib/zstd/lib/legacy/zstd_v03.c head/sys/contrib/zstd/lib/legacy/zstd_v04.c head/sys/contrib/zstd/lib/legacy/zstd_v05.c head/sys/contrib/zstd/lib/legacy/zstd_v06.c head/sys/contrib/zstd/lib/legacy/zstd_v07.c head/sys/contrib/zstd/lib/zstd.h head/sys/contrib/zstd/programs/BUCK head/sys/contrib/zstd/programs/Makefile head/sys/contrib/zstd/programs/bench.c head/sys/contrib/zstd/programs/bench.h head/sys/contrib/zstd/programs/dibio.c head/sys/contrib/zstd/programs/fileio.c head/sys/contrib/zstd/programs/fileio.h head/sys/contrib/zstd/programs/platform.h head/sys/contrib/zstd/programs/util.h head/sys/contrib/zstd/programs/zstd.1 head/sys/contrib/zstd/programs/zstd.1.md head/sys/contrib/zstd/programs/zstdcli.c head/sys/contrib/zstd/tests/Makefile head/sys/contrib/zstd/tests/decodecorpus.c head/sys/contrib/zstd/tests/fullbench.c head/sys/contrib/zstd/tests/fuzzer.c head/sys/contrib/zstd/tests/paramgrill.c head/sys/contrib/zstd/tests/playTests.sh head/sys/contrib/zstd/tests/zbufftest.c head/sys/contrib/zstd/tests/zstreamtest.c head/sys/contrib/zstd/zlibWrapper/BUCK head/sys/contrib/zstd/zlibWrapper/examples/zwrapbench.c head/sys/contrib/zstd/zlibWrapper/zstd_zlibwrapper.c Modified: head/sys/contrib/zstd/Makefile ============================================================================== --- head/sys/contrib/zstd/Makefile Wed Mar 14 02:56:43 2018 (r330893) +++ head/sys/contrib/zstd/Makefile Wed Mar 14 03:00:17 2018 (r330894) @@ -72,9 +72,12 @@ zstdmt: zlibwrapper: $(MAKE) -C $(ZWRAPDIR) test +.PHONY: check +check: shortest + .PHONY: test shortest test shortest: - $(MAKE) -C $(PRGDIR) allVariants + $(MAKE) -C $(PRGDIR) allVariants MOREFLAGS="-g -DZSTD_DEBUG=1" $(MAKE) -C $(TESTDIR) $@ .PHONY: examples @@ -127,11 +130,6 @@ uninstall: travis-install: $(MAKE) install PREFIX=~/install_test_dir -.PHONY: gppbuild -gppbuild: clean - g++ -v - CC=g++ $(MAKE) -C programs all CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror" - .PHONY: gcc5build gcc5build: clean gcc-5 -v @@ -163,7 +161,7 @@ aarch64build: clean CC=aarch64-linux-gnu-gcc CFLAGS="-Werror" $(MAKE) allzstd ppcbuild: clean - CC=powerpc-linux-gnu-gcc CLAGS="-m32 -Wno-attributes -Werror" $(MAKE) allzstd + CC=powerpc-linux-gnu-gcc CFLAGS="-m32 -Wno-attributes -Werror" $(MAKE) allzstd ppc64build: clean CC=powerpc-linux-gnu-gcc CFLAGS="-m64 -Werror" $(MAKE) allzstd Modified: head/sys/contrib/zstd/NEWS ============================================================================== --- head/sys/contrib/zstd/NEWS Wed Mar 14 02:56:43 2018 (r330893) +++ head/sys/contrib/zstd/NEWS Wed Mar 14 03:00:17 2018 (r330894) @@ -1,3 +1,15 @@ +v1.3.3 +perf: faster zstd_opt strategy (levels 17-19) +fix : bug #944 : multithreading with shared ditionary and large data, reported by @gsliepen +cli : fix : content size written in header by default +cli : fix : improved LZ4 format support, by @felixhandte +cli : new : hidden command `-S`, to benchmark multiple files while generating one result per file +api : fix : support large skippable frames, by @terrelln +api : fix : streaming interface was adding a useless 3-bytes null block to small frames +api : change : when setting `pledgedSrcSize`, use `ZSTD_CONTENTSIZE_UNKNOWN` macro value to mean "unknown" +build: fix : compilation under rhel6 and centos6, reported by @pixelb +build: added `check` target + v1.3.2 new : long range mode, using --long command, by Stella Lau (@stellamplau) new : ability to generate and decode magicless frames (#591) Modified: head/sys/contrib/zstd/README.md ============================================================================== --- head/sys/contrib/zstd/README.md Wed Mar 14 02:56:43 2018 (r330893) +++ head/sys/contrib/zstd/README.md Wed Mar 14 03:00:17 2018 (r330894) @@ -1,15 +1,16 @@ - __Zstandard__, or `zstd` as short version, is a fast lossless compression algorithm, - targeting real-time compression scenarios at zlib-level and better compression ratios. +

Zstandard

-It is provided as an open-source BSD-licensed **C** library, -and a command line utility producing and decoding `.zst` and `.gz` files. -For other programming languages, -you can consult a list of known ports on [Zstandard homepage](http://www.zstd.net/#other-languages). +__Zstandard__, or `zstd` as short version, is a fast lossless compression algorithm, +targeting real-time compression scenarios at zlib-level and better compression ratios. +It's backed by a very fast entropy stage, provided by [Huff0 and FSE library](https://github.com/Cyan4973/FiniteStateEntropy). -| dev branch status | -|-------------------| -| [![Build Status][travisDevBadge]][travisLink] [![Build status][AppveyorDevBadge]][AppveyorLink] [![Build status][CircleDevBadge]][CircleLink] +The project is provided as an open-source BSD-licensed **C** library, +and a command line utility producing and decoding `.zst`, `.gz`, `.xz` and `.lz4` files. +Should your project require another programming language, +a list of known ports and bindings is provided on [Zstandard homepage](http://www.zstd.net/#other-languages). +Development branch status : [![Build Status][travisDevBadge]][travisLink] [![Build status][AppveyorDevBadge]][AppveyorLink] [![Build status][CircleDevBadge]][CircleLink] + [travisDevBadge]: https://travis-ci.org/facebook/zstd.svg?branch=dev "Continuous Integration test suite" [travisLink]: https://travis-ci.org/facebook/zstd [AppveyorDevBadge]: https://ci.appveyor.com/api/projects/status/xt38wbdxjk5mrbem/branch/dev?svg=true "Windows test suite" @@ -17,8 +18,9 @@ you can consult a list of known ports on [Zstandard ho [CircleDevBadge]: https://circleci.com/gh/facebook/zstd/tree/dev.svg?style=shield "Short test suite" [CircleLink]: https://circleci.com/gh/facebook/zstd +### Benchmarks -As a reference, several fast compression algorithms were tested and compared +For reference, several fast compression algorithms were tested and compared on a server running Linux Debian (`Linux version 4.8.0-1-amd64`), with a Core i7-6700K CPU @ 4.0GHz, using [lzbench], an open-source in-memory benchmark by @inikep @@ -43,7 +45,9 @@ on the [Silesia compression corpus]. [LZ4]: http://www.lz4.org/ Zstd can also offer stronger compression ratios at the cost of compression speed. -Speed vs Compression trade-off is configurable by small increments. Decompression speed is preserved and remains roughly the same at all settings, a property shared by most LZ compression algorithms, such as [zlib] or lzma. +Speed vs Compression trade-off is configurable by small increments. +Decompression speed is preserved and remains roughly the same at all settings, +a property shared by most LZ compression algorithms, such as [zlib] or lzma. The following tests were run on a server running Linux Debian (`Linux version 4.8.0-1-amd64`) @@ -56,8 +60,8 @@ Compression Speed vs Ratio | Decompression Speed ---------------------------|-------------------- ![Compression Speed vs Ratio](doc/images/Cspeed4.png "Compression Speed vs Ratio") | ![Decompression Speed](doc/images/Dspeed4.png "Decompression Speed") -Several algorithms can produce higher compression ratios, but at slower speeds, falling outside of the graph. -For a larger picture including very slow modes, [click on this link](doc/images/DCspeed5.png) . +A few other algorithms can produce higher compression ratios at slower speeds, falling outside of the graph. +For a larger picture including slow modes, [click on this link](doc/images/DCspeed5.png). ### The case for Small Data compression @@ -84,7 +88,7 @@ Training works if there is some correlation in a famil Hence, deploying one dictionary per type of data will provide the greatest benefits. Dictionary gains are mostly effective in the first few KB. Then, the compression algorithm will gradually use previously decoded content to better compress the rest of the file. -#### Dictionary compression How To : +#### Dictionary compression How To: 1) Create the dictionary @@ -99,19 +103,16 @@ Dictionary gains are mostly effective in the first few `zstd -D dictionaryName --decompress FILE.zst` -### Build +### Build instructions -Once you have the repository cloned, there are multiple ways provided to build Zstandard. - #### Makefile -If your system is compatible with a standard `make` (or `gmake`) binary generator, -you can simply run it at the root directory. -It will generate `zstd` within root directory. +If your system is compatible with standard `make` (or `gmake`), +invoking `make` in root directory will generate `zstd` cli in root directory. -Other available options include : -- `make install` : create and install zstd binary, library and man page -- `make test` : create and run `zstd` and test tools on local platform +Other available options include: +- `make install` : create and install zstd cli, library and man pages +- `make check` : create and run `zstd`, tests its behavior on local platform #### cmake @@ -125,9 +126,9 @@ A Meson project is provided within `contrib/meson`. #### Visual Studio (Windows) -Going into `build` directory, you will find additional possibilities : -- Projects for Visual Studio 2005, 2008 and 2010 - + VS2010 project is compatible with VS2012, VS2013 and VS2015 +Going into `build` directory, you will find additional possibilities: +- Projects for Visual Studio 2005, 2008 and 2010. + + VS2010 project is compatible with VS2012, VS2013 and VS2015. - Automated build scripts for Visual compiler by @KrzysFR , in `build/VS_scripts`, which will build `zstd` cli and `libzstd` library without any need to open Visual Studio solution. @@ -143,11 +144,7 @@ Zstandard is dual-licensed under [BSD](LICENSE) and [G ### Contributing -The "dev" branch is the one where all contributions will be merged before reaching "master". -If you plan to propose a patch, please commit into the "dev" branch or its own feature branch. +The "dev" branch is the one where all contributions are merged before reaching "master". +If you plan to propose a patch, please commit into the "dev" branch, or its own feature branch. Direct commit to "master" are not permitted. For more information, please read [CONTRIBUTING](CONTRIBUTING.md). - -### Miscellaneous - -Zstd entropy stage is provided by [Huff0 and FSE, from Finite State Entropy library](https://github.com/Cyan4973/FiniteStateEntropy). Modified: head/sys/contrib/zstd/circle.yml ============================================================================== --- head/sys/contrib/zstd/circle.yml Wed Mar 14 02:56:43 2018 (r330893) +++ head/sys/contrib/zstd/circle.yml Wed Mar 14 03:00:17 2018 (r330894) @@ -3,13 +3,11 @@ dependencies: - sudo dpkg --add-architecture i386 - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; sudo apt-get -y -qq update - sudo apt-get -y install gcc-powerpc-linux-gnu gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross - - sudo apt-get -y install libstdc++-7-dev clang gcc g++ gcc-5 gcc-6 gcc-7 zlib1g-dev liblzma-dev - - sudo apt-get -y install linux-libc-dev:i386 libc6-dev-i386 test: override: - ? | - if [[ "$CIRCLE_NODE_INDEX" == "0" ]] ; then cc -v; make all && make clean && make -C lib libzstd-nomt && make clean; fi && + if [[ "$CIRCLE_NODE_INDEX" == "0" ]] ; then cc -v; CFLAGS="-O0 -Werror" make all && make clean; fi && if [[ "$CIRCLE_NODE_TOTAL" < "2" ]] || [[ "$CIRCLE_NODE_INDEX" == "1" ]]; then make gnu90build && make clean; fi : parallel: true @@ -20,32 +18,17 @@ test: parallel: true - ? | if [[ "$CIRCLE_NODE_INDEX" == "0" ]] ; then make c11build && make clean; fi && - if [[ "$CIRCLE_NODE_TOTAL" < "2" ]] || [[ "$CIRCLE_NODE_INDEX" == "1" ]]; then make cmakebuild && make clean; fi + if [[ "$CIRCLE_NODE_TOTAL" < "2" ]] || [[ "$CIRCLE_NODE_INDEX" == "1" ]]; then make ppc64build && make clean; fi : parallel: true - ? | - if [[ "$CIRCLE_NODE_INDEX" == "0" ]] ; then make gppbuild && make clean; fi && - if [[ "$CIRCLE_NODE_TOTAL" < "2" ]] || [[ "$CIRCLE_NODE_INDEX" == "1" ]]; then make gcc5build && make clean; fi - : - parallel: true - - ? | - if [[ "$CIRCLE_NODE_INDEX" == "0" ]] ; then make gcc6build && make clean; fi && - if [[ "$CIRCLE_NODE_TOTAL" < "2" ]] || [[ "$CIRCLE_NODE_INDEX" == "1" ]]; then make clangbuild && make clean; fi - : - parallel: true - - ? | - if [[ "$CIRCLE_NODE_INDEX" == "0" ]] ; then make m32build && make clean; fi && - if [[ "$CIRCLE_NODE_TOTAL" < "2" ]] || [[ "$CIRCLE_NODE_INDEX" == "1" ]]; then make armbuild && make clean; fi - : - parallel: true - - ? | if [[ "$CIRCLE_NODE_INDEX" == "0" ]] ; then make aarch64build && make clean; fi && if [[ "$CIRCLE_NODE_TOTAL" < "2" ]] || [[ "$CIRCLE_NODE_INDEX" == "1" ]]; then make ppcbuild && make clean; fi : parallel: true - ? | - if [[ "$CIRCLE_NODE_INDEX" == "0" ]] ; then make ppc64build && make clean; fi && - if [[ "$CIRCLE_NODE_TOTAL" < "2" ]] || [[ "$CIRCLE_NODE_INDEX" == "1" ]]; then make gcc7build && make clean; fi + if [[ "$CIRCLE_NODE_INDEX" == "0" ]] ; then make -j regressiontest && make clean; fi && + if [[ "$CIRCLE_NODE_TOTAL" < "2" ]] || [[ "$CIRCLE_NODE_INDEX" == "1" ]]; then make armbuild && make clean; fi : parallel: true - ? | @@ -54,8 +37,8 @@ test: : parallel: true - ? | - if [[ "$CIRCLE_NODE_INDEX" == "0" ]] ; then make -j regressiontest && make clean; fi && - if [[ "$CIRCLE_NODE_TOTAL" < "2" ]] || [[ "$CIRCLE_NODE_INDEX" == "1" ]]; then true; fi # Could add another test here + if [[ "$CIRCLE_NODE_INDEX" == "0" ]] ; then make cxxtest && make clean; fi && + if [[ "$CIRCLE_NODE_TOTAL" < "2" ]] || [[ "$CIRCLE_NODE_INDEX" == "1" ]]; then make -C lib libzstd-nomt && make clean; fi : parallel: true Modified: head/sys/contrib/zstd/contrib/meson/meson.build ============================================================================== --- head/sys/contrib/zstd/contrib/meson/meson.build Wed Mar 14 02:56:43 2018 (r330893) +++ head/sys/contrib/zstd/contrib/meson/meson.build Wed Mar 14 03:00:17 2018 (r330894) @@ -2,14 +2,39 @@ project('zstd', 'c', license: 'BSD') libm = meson.get_compiler('c').find_library('m', required: true) -lib_dir = join_paths(meson.source_root(), '..', '..', 'lib') +lib_dir = join_paths('..', '..', 'lib') common_dir = join_paths(lib_dir, 'common') compress_dir = join_paths(lib_dir, 'compress') decompress_dir = join_paths(lib_dir, 'decompress') dictbuilder_dir = join_paths(lib_dir, 'dictBuilder') deprecated_dir = join_paths(lib_dir, 'deprecated') -libzstd_srcs = [join_paths(common_dir, 'entropy_common.c'), join_paths(common_dir, 'fse_decompress.c'), join_paths(common_dir, 'threading.c'), join_paths(common_dir, 'pool.c'), join_paths(common_dir, 'zstd_common.c'), join_paths(common_dir, 'error_private.c'), join_paths(common_dir, 'xxhash.c'), join_paths(compress_dir, 'fse_compress.c'), join_paths(compress_dir, 'huf_compress.c'), join_paths(compress_dir, 'zstd_compress.c'), join_paths(compress_dir, 'zstdmt_compress.c'), join_paths(decompress_dir, 'huf_decompress.c'), join_paths(decompress_dir, 'zstd_decompress.c'), join_paths(dictbuilder_dir, 'cover.c'), join_paths(dictbuilder_dir, 'divsufsort.c'), join_paths(dictbuilder_dir, 'zdict.c'), join_paths(deprecated_dir, 'zbuff_common.c'), join_paths(deprecated_dir, 'zbuff_compress.c'), join_paths(deprecated_dir, 'zbuff_decompress.c')] +libzstd_srcs = [ + join_paths(common_dir, 'entropy_common.c'), + join_paths(common_dir, 'fse_decompress.c'), + join_paths(common_dir, 'threading.c'), + join_paths(common_dir, 'pool.c'), + join_paths(common_dir, 'zstd_common.c'), + join_paths(common_dir, 'error_private.c'), + join_paths(common_dir, 'xxhash.c'), + join_paths(compress_dir, 'fse_compress.c'), + join_paths(compress_dir, 'huf_compress.c'), + join_paths(compress_dir, 'zstd_compress.c'), + join_paths(compress_dir, 'zstd_fast.c'), + join_paths(compress_dir, 'zstd_double_fast.c'), + join_paths(compress_dir, 'zstd_lazy.c'), + join_paths(compress_dir, 'zstd_opt.c'), + join_paths(compress_dir, 'zstd_ldm.c'), + join_paths(compress_dir, 'zstdmt_compress.c'), + join_paths(decompress_dir, 'huf_decompress.c'), + join_paths(decompress_dir, 'zstd_decompress.c'), + join_paths(dictbuilder_dir, 'cover.c'), + join_paths(dictbuilder_dir, 'divsufsort.c'), + join_paths(dictbuilder_dir, 'zdict.c'), + join_paths(deprecated_dir, 'zbuff_common.c'), + join_paths(deprecated_dir, 'zbuff_compress.c'), + join_paths(deprecated_dir, 'zbuff_decompress.c') +] libzstd_includes = [include_directories(common_dir, dictbuilder_dir, compress_dir, lib_dir)] @@ -19,7 +44,15 @@ if get_option('legacy_support') legacy_dir = join_paths(lib_dir, 'legacy') libzstd_includes += [include_directories(legacy_dir)] - libzstd_srcs += [join_paths(legacy_dir, 'zstd_v01.c'), join_paths(legacy_dir, 'zstd_v02.c'), join_paths(legacy_dir, 'zstd_v03.c'), join_paths(legacy_dir, 'zstd_v04.c'), join_paths(legacy_dir, 'zstd_v05.c'), join_paths(legacy_dir, 'zstd_v06.c'), join_paths(legacy_dir, 'zstd_v07.c')] + libzstd_srcs += [ + join_paths(legacy_dir, 'zstd_v01.c'), + join_paths(legacy_dir, 'zstd_v02.c'), + join_paths(legacy_dir, 'zstd_v03.c'), + join_paths(legacy_dir, 'zstd_v04.c'), + join_paths(legacy_dir, 'zstd_v05.c'), + join_paths(legacy_dir, 'zstd_v06.c'), + join_paths(legacy_dir, 'zstd_v07.c') + ] else libzstd_cflags = [] endif @@ -39,16 +72,20 @@ libzstd = library('zstd', dependencies: libzstd_deps, install: true) -programs_dir = join_paths(meson.source_root(), '..', '..', 'programs') +programs_dir = join_paths('..', '..', 'programs') zstd = executable('zstd', - join_paths(programs_dir, 'bench.c'), join_paths(programs_dir, 'datagen.c'), join_paths(programs_dir, 'dibio.c'), join_paths(programs_dir, 'fileio.c'), join_paths(programs_dir, 'zstdcli.c'), + join_paths(programs_dir, 'bench.c'), + join_paths(programs_dir, 'datagen.c'), + join_paths(programs_dir, 'dibio.c'), + join_paths(programs_dir, 'fileio.c'), + join_paths(programs_dir, 'zstdcli.c'), include_directories: libzstd_includes, c_args: ['-DZSTD_NODICT', '-DZSTD_NOBENCH'], link_with: libzstd, install: true) -tests_dir = join_paths(meson.source_root(), '..', '..', 'tests') +tests_dir = join_paths('..', '..', 'tests') datagen_c = join_paths(programs_dir, 'datagen.c') test_includes = libzstd_includes + [include_directories(programs_dir)] Added: head/sys/contrib/zstd/doc/images/zstd_logo86.png ============================================================================== Binary file. No diff available. Modified: head/sys/contrib/zstd/doc/zstd_compression_format.md ============================================================================== --- head/sys/contrib/zstd/doc/zstd_compression_format.md Wed Mar 14 02:56:43 2018 (r330893) +++ head/sys/contrib/zstd/doc/zstd_compression_format.md Wed Mar 14 03:00:17 2018 (r330894) @@ -91,10 +91,10 @@ Overview Frames ------ -Zstandard compressed data is made of up one or more __frames__. +Zstandard compressed data is made of one or more __frames__. Each frame is independent and can be decompressed indepedently of other frames. The decompressed content of multiple concatenated frames is the concatenation of -each frames decompressed content. +each frame decompressed content. There are two frame formats defined by Zstandard: Zstandard frames and Skippable frames. @@ -182,7 +182,7 @@ data must be regenerated within a single continuous me In this case, `Window_Descriptor` byte is skipped, but `Frame_Content_Size` is necessarily present. As a consequence, the decoder must allocate a memory segment -of size equal or bigger than `Frame_Content_Size`. +of size equal or larger than `Frame_Content_Size`. In order to preserve the decoder from unreasonable memory requirements, a decoder is allowed to reject a compressed frame Modified: head/sys/contrib/zstd/doc/zstd_manual.html ============================================================================== --- head/sys/contrib/zstd/doc/zstd_manual.html Wed Mar 14 02:56:43 2018 (r330893) +++ head/sys/contrib/zstd/doc/zstd_manual.html Wed Mar 14 03:00:17 2018 (r330894) @@ -1,10 +1,10 @@ -zstd 1.3.2 Manual +zstd 1.3.3 Manual -

zstd 1.3.2 Manual

+

zstd 1.3.3 Manual


Contents

    @@ -19,16 +19,17 @@
  1. Streaming decompression - HowTo
  2. START OF ADVANCED AND EXPERIMENTAL FUNCTIONS
  3. Advanced types
  4. -
  5. Frame size functions
  6. -
  7. Context memory usage
  8. -
  9. Advanced compression functions
  10. -
  11. Advanced decompression functions
  12. -
  13. Advanced streaming functions
  14. -
  15. Buffer-less and synchronous inner streaming functions
  16. -
  17. Buffer-less streaming compression (synchronous mode)
  18. -
  19. Buffer-less streaming decompression (synchronous mode)
  20. -
  21. New advanced API (experimental)
  22. -
  23. Block level API
  24. +
  25. Custom memory allocation functions
  26. +
  27. Frame size functions
  28. +
  29. Context memory usage
  30. +
  31. Advanced compression functions
  32. +
  33. Advanced decompression functions
  34. +
  35. Advanced streaming functions
  36. +
  37. Buffer-less and synchronous inner streaming functions
  38. +
  39. Buffer-less streaming compression (synchronous mode)
  40. +
  41. Buffer-less streaming decompression (synchronous mode)
  42. +
  43. New advanced API (experimental)
  44. +
  45. Block level API

Introduction

@@ -111,7 +112,7 @@ unsigned long long ZSTD_getFrameContentSize(const void
   @return : content size to be decompressed, as a 64-bits value _if known and not empty_, 0 otherwise. 
 


-

Helper functions

#define ZSTD_COMPRESSBOUND(srcSize)   ((srcSize) + ((srcSize)>>8) + (((srcSize) < 128 KB) ? ((128 KB - (srcSize)) >> 11) /* margin, from 64 to 0 */ : 0))  /* this formula ensures that bound(A) + bound(B) <= bound(A+B) as long as A and B >= 128 KB */
+

Helper functions

#define ZSTD_COMPRESSBOUND(srcSize)   ((srcSize) + ((srcSize)>>8) + (((srcSize) < (128<<10)) ? (((128<<10) - (srcSize)) >> 11) /* margin, from 64 to 0 */ : 0))  /* this formula ensures that bound(A) + bound(B) <= bound(A+B) as long as A and B >= 128 KB */
 size_t      ZSTD_compressBound(size_t srcSize); /*!< maximum compressed size in worst case scenario */
 unsigned    ZSTD_isError(size_t code);          /*!< tells if a `size_t` function result is an error code */
 const char* ZSTD_getErrorName(size_t code);     /*!< provides readable string from an error code */
@@ -346,17 +347,15 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_o
     ZSTD_frameParameters fParams;
 } ZSTD_parameters;
 

-

Custom memory allocation functions

typedef void* (*ZSTD_allocFunction) (void* opaque, size_t size);
-typedef void  (*ZSTD_freeFunction) (void* opaque, void* address);
-typedef struct { ZSTD_allocFunction customAlloc; ZSTD_freeFunction customFree; void* opaque; } ZSTD_customMem;
-/* use this constant to defer to stdlib's functions */
-static const ZSTD_customMem ZSTD_defaultCMem = { NULL, NULL, NULL };
-

-

Frame size functions


+

Custom memory allocation functions


 
+
typedef struct { ZSTD_allocFunction customAlloc; ZSTD_freeFunction customFree; void* opaque; } ZSTD_customMem;
+

+

Frame size functions


+
 
size_t ZSTD_findFrameCompressedSize(const void* src, size_t srcSize);
 

`src` should point to the start of a ZSTD encoded frame or skippable frame - `srcSize` must be at least as large as the frame + `srcSize` must be >= first frame size @return : the compressed size of the first frame starting at `src`, suitable to pass to `ZSTD_decompress` or similar, or an error code if input is invalid @@ -391,7 +390,7 @@ static const ZSTD_customMem ZSTD_defaultCMem = { NULL, @return : size of the Frame Header


-

Context memory usage


+

Context memory usage


 
 
size_t ZSTD_sizeof_CCtx(const ZSTD_CCtx* cctx);
 size_t ZSTD_sizeof_DCtx(const ZSTD_DCtx* dctx);
@@ -450,7 +449,7 @@ size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_di
  
 


-

Advanced compression functions


+

Advanced compression functions


 
 
ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem);
 

Create a ZSTD compression context using external alloc and free functions @@ -462,7 +461,8 @@ size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_di It must outlive context usage. workspaceSize: Use ZSTD_estimateCCtxSize() or ZSTD_estimateCStreamSize() to determine how large workspace must be to support scenario. - @return : pointer to ZSTD_CCtx*, or NULL if error (size too small) + @return : pointer to ZSTD_CCtx* (same address as workspace, but different type), + or NULL if error (typically size too small) Note : zstd will never resize nor malloc() when using a static cctx. If it needs more memory than available, it will simply error out. Note 2 : there is no corresponding "free" function. @@ -505,7 +505,8 @@ size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_di to determine how large workspace must be. cParams : use ZSTD_getCParams() to transform a compression level into its relevants cParams. - @return : pointer to ZSTD_CDict*, or NULL if error (size too small) + @return : pointer to ZSTD_CDict* (same address as workspace, but different type), + or NULL if error (typically, size too small). Note : there is no corresponding "free" function. Since workspace was allocated externally, it must be freed externally. @@ -518,7 +519,7 @@ size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_di

ZSTD_parameters ZSTD_getParams(int compressionLevel, unsigned long long estimatedSrcSize, size_t dictSize);
 

same as ZSTD_getCParams(), but @return a full `ZSTD_parameters` object instead of sub-component `ZSTD_compressionParameters`. - All fields of `ZSTD_frameParameters` are set to default (0) + All fields of `ZSTD_frameParameters` are set to default : contentSize=1, checksum=0, noDictID=0


size_t ZSTD_checkCParams(ZSTD_compressionParameters params);
@@ -545,7 +546,7 @@ size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_di
 

Same as ZSTD_compress_usingCDict(), with fine-tune control over frame parameters


-

Advanced decompression functions


+

Advanced decompression functions


 
 
unsigned ZSTD_isFrame(const void* buffer, size_t size);
 

Tells if the content of `buffer` starts with a valid Frame Identifier. @@ -564,7 +565,8 @@ size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_di It must outlive context usage. workspaceSize: Use ZSTD_estimateDCtxSize() or ZSTD_estimateDStreamSize() to determine how large workspace must be to support scenario. - @return : pointer to ZSTD_DCtx*, or NULL if error (size too small) + @return : pointer to ZSTD_DCtx* (same address as workspace, but different type), + or NULL if error (typically size too small) Note : zstd will never resize nor malloc() when using a static dctx. If it needs more memory than available, it will simply error out. Note 2 : static dctx is incompatible with legacy support @@ -627,24 +629,26 @@ size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_di When identifying the exact failure cause, it's possible to use ZSTD_getFrameHeader(), which will provide a more precise error code.


-

Advanced streaming functions


+

Advanced streaming functions


 
 

Advanced Streaming compression functions

ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem);
 ZSTD_CStream* ZSTD_initStaticCStream(void* workspace, size_t workspaceSize);    /**< same as ZSTD_initStaticCCtx() */
-size_t ZSTD_initCStream_srcSize(ZSTD_CStream* zcs, int compressionLevel, unsigned long long pledgedSrcSize);   /**< pledgedSrcSize must be correct, a size of 0 means unknown.  for a frame size of 0 use initCStream_advanced */
+size_t ZSTD_initCStream_srcSize(ZSTD_CStream* zcs, int compressionLevel, unsigned long long pledgedSrcSize);   /**< pledgedSrcSize must be correct. If it is not known at init time, use ZSTD_CONTENTSIZE_UNKNOWN. Note that, for compatibility with older programs, "0" also disables frame content size field. It may be enabled in the future. */
 size_t ZSTD_initCStream_usingDict(ZSTD_CStream* zcs, const void* dict, size_t dictSize, int compressionLevel); /**< creates of an internal CDict (incompatible with static CCtx), except if dict == NULL or dictSize < 8, in which case no dict is used. Note: dict is loaded with ZSTD_dm_auto (treated as a full zstd dictionary if it begins with ZSTD_MAGIC_DICTIONARY, else as raw content) and ZSTD_dlm_byCopy.*/
 size_t ZSTD_initCStream_advanced(ZSTD_CStream* zcs, const void* dict, size_t dictSize,
-                                             ZSTD_parameters params, unsigned long long pledgedSrcSize);  /**< pledgedSrcSize is optional and can be 0 (meaning unknown). note: if the contentSizeFlag is set, pledgedSrcSize == 0 means the source size is actually 0. dict is loaded with ZSTD_dm_auto and ZSTD_dlm_byCopy. */
+                                             ZSTD_parameters params, unsigned long long pledgedSrcSize);  /**< pledgedSrcSize must be correct. If srcSize is not known at init time, use value ZSTD_CONTENTSIZE_UNKNOWN. dict is loaded with ZSTD_dm_auto and ZSTD_dlm_byCopy. */
 size_t ZSTD_initCStream_usingCDict(ZSTD_CStream* zcs, const ZSTD_CDict* cdict);  /**< note : cdict will just be referenced, and must outlive compression session */
-size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs, const ZSTD_CDict* cdict, ZSTD_frameParameters fParams, unsigned long long pledgedSrcSize);  /**< same as ZSTD_initCStream_usingCDict(), with control over frame parameters */
+size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs, const ZSTD_CDict* cdict, ZSTD_frameParameters fParams, unsigned long long pledgedSrcSize);  /**< same as ZSTD_initCStream_usingCDict(), with control over frame parameters. pledgedSrcSize must be correct. If srcSize is not known at init time, use value ZSTD_CONTENTSIZE_UNKNOWN. */
 

size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pledgedSrcSize);
 

start a new compression job, using same parameters from previous job. This is typically useful to skip dictionary loading stage, since it will re-use it in-place.. Note that zcs must be init at least once before using ZSTD_resetCStream(). - pledgedSrcSize==0 means "srcSize unknown". + If pledgedSrcSize is not known at reset time, use macro ZSTD_CONTENTSIZE_UNKNOWN. If pledgedSrcSize > 0, its value must be correct, as it will be written in header, and controlled at the end. - @return : 0, or an error code (which can be tested using ZSTD_isError()) + For the time being, pledgedSrcSize==0 is interpreted as "srcSize unknown" for compatibility with older programs, + but it may change to mean "empty" in some future version, so prefer using macro ZSTD_CONTENTSIZE_UNKNOWN. + @return : 0, or an error code (which can be tested using ZSTD_isError())


Advanced Streaming decompression functions

ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem);
@@ -655,14 +659,14 @@ size_t ZSTD_initDStream_usingDict(ZSTD_DStream* zds, c
 size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* zds, const ZSTD_DDict* ddict);  /**< note : ddict is referenced, it must outlive decompression session */
 size_t ZSTD_resetDStream(ZSTD_DStream* zds);  /**< re-use decompression parameters from previous init; saves dictionary loading */
 

-

Buffer-less and synchronous inner streaming functions

+

Buffer-less and synchronous inner streaming functions

   This is an advanced API, giving full control over buffer management, for users which need direct control over memory.
   But it's also a complex one, with several restrictions, documented below.
   Prefer normal streaming API for an easier experience.
  
 
-

Buffer-less streaming compression (synchronous mode)

+

Buffer-less streaming compression (synchronous mode)

   A ZSTD_CCtx object is required to track streaming operations.
   Use ZSTD_createCCtx() / ZSTD_freeCCtx() to manage resource.
   ZSTD_CCtx object can be re-used multiple times within successive compression operations.
@@ -693,12 +697,12 @@ size_t ZSTD_resetDStream(ZSTD_DStream* zds);  /**<
 
 

Buffer-less streaming compression functions

size_t ZSTD_compressBegin(ZSTD_CCtx* cctx, int compressionLevel);
 size_t ZSTD_compressBegin_usingDict(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, int compressionLevel);
-size_t ZSTD_compressBegin_advanced(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, ZSTD_parameters params, unsigned long long pledgedSrcSize); /**< pledgedSrcSize is optional and can be 0 (meaning unknown). note: if the contentSizeFlag is set, pledgedSrcSize == 0 means the source size is actually 0 */
+size_t ZSTD_compressBegin_advanced(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, ZSTD_parameters params, unsigned long long pledgedSrcSize); /**< pledgedSrcSize : If srcSize is not known at init time, use ZSTD_CONTENTSIZE_UNKNOWN */
 size_t ZSTD_compressBegin_usingCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict); /**< note: fails if cdict==NULL */
-size_t ZSTD_compressBegin_usingCDict_advanced(ZSTD_CCtx* const cctx, const ZSTD_CDict* const cdict, ZSTD_frameParameters const fParams, unsigned long long const pledgedSrcSize);   /* compression parameters are already set within cdict. pledgedSrcSize=0 means null-size */
-size_t ZSTD_copyCCtx(ZSTD_CCtx* cctx, const ZSTD_CCtx* preparedCCtx, unsigned long long pledgedSrcSize); /**<  note: if pledgedSrcSize can be 0, indicating unknown size.  if it is non-zero, it must be accurate.  for 0 size frames, use compressBegin_advanced */
+size_t ZSTD_compressBegin_usingCDict_advanced(ZSTD_CCtx* const cctx, const ZSTD_CDict* const cdict, ZSTD_frameParameters const fParams, unsigned long long const pledgedSrcSize);   /* compression parameters are already set within cdict. pledgedSrcSize must be correct. If srcSize is not known, use macro ZSTD_CONTENTSIZE_UNKNOWN */
+size_t ZSTD_copyCCtx(ZSTD_CCtx* cctx, const ZSTD_CCtx* preparedCCtx, unsigned long long pledgedSrcSize); /**<  note: if pledgedSrcSize is not known, use ZSTD_CONTENTSIZE_UNKNOWN */
 

-

Buffer-less streaming decompression (synchronous mode)

+

Buffer-less streaming decompression (synchronous mode)

   A ZSTD_DCtx object is required to track streaming operations.
   Use ZSTD_createDCtx() / ZSTD_freeDCtx() to manage it.
   A ZSTD_DCtx object can be re-used multiple times.
@@ -784,7 +788,7 @@ size_t ZSTD_decodingBufferSize_min(unsigned long long 
 

typedef enum { ZSTDnit_frameHeader, ZSTDnit_blockHeader, ZSTDnit_block, ZSTDnit_lastBlock, ZSTDnit_checksum, ZSTDnit_skippableFrame } ZSTD_nextInputType_e;
 

-

New advanced API (experimental)


+

New advanced API (experimental)


 
 
typedef enum {
     /* Question : should we have a format ZSTD_f_auto ?
@@ -848,18 +852,19 @@ size_t ZSTD_decodingBufferSize_min(unsigned long long 
                               * Special: value 0 means "do not change strategy". */
 
     /* frame parameters */
-    ZSTD_p_contentSizeFlag=200, /* Content size is written into frame header _whenever known_ (default:1)
-                              * note that content size must be known at the beginning,
-                              * it is sent using ZSTD_CCtx_setPledgedSrcSize() */
+    ZSTD_p_contentSizeFlag=200, /* Content size will be written into frame header _whenever known_ (default:1)
+                              * Content size must be known at the beginning of compression,
+                              * it is provided using ZSTD_CCtx_setPledgedSrcSize() */
     ZSTD_p_checksumFlag,     /* A 32-bits checksum of content is written at end of frame (default:0) */
-    ZSTD_p_dictIDFlag,       /* When applicable, dictID of dictionary is provided in frame header (default:1) */
+    ZSTD_p_dictIDFlag,       /* When applicable, dictionary's ID is written into frame header (default:1) */
 
     /* multi-threading parameters */
     ZSTD_p_nbThreads=400,    /* Select how many threads a compression job can spawn (default:1)
                               * More threads improve speed, but also increase memory usage.
                               * Can only receive a value > 1 if ZSTD_MULTITHREAD is enabled.
                               * Special: value 0 means "do not change nbThreads" */
-    ZSTD_p_jobSize,          /* Size of a compression job. Each compression job is completed in parallel.
+    ZSTD_p_jobSize,          /* Size of a compression job. This value is only enforced in streaming (non-blocking) mode.
+                              * Each compression job is completed in parallel, so indirectly controls the nb of active threads.
                               * 0 means default, which is dynamically determined based on compression parameters.
                               * Job size must be a minimum of overlapSize, or 1 KB, whichever is largest
                               * The minimum size is automatically and transparently enforced */
@@ -904,7 +909,8 @@ size_t ZSTD_decodingBufferSize_min(unsigned long long 
 
size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, unsigned value);
 

Set one compression parameter, selected by enum ZSTD_cParameter. Note : when `value` is an enum, cast it to unsigned for proper type checking. - @result : 0, or an error code (which can be tested with ZSTD_isError()). + @result : informational value (typically, the one being set, possibly corrected), + or an error code (which can be tested with ZSTD_isError()).


size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize);
@@ -913,7 +919,7 @@ size_t ZSTD_decodingBufferSize_min(unsigned long long 
  @result : 0, or an error code (which can be tested with ZSTD_isError()).
   Note 1 : 0 means zero, empty.
            In order to mean "unknown content size", pass constant ZSTD_CONTENTSIZE_UNKNOWN.
-           Note that ZSTD_CONTENTSIZE_UNKNOWN is default value for new compression jobs.
+           ZSTD_CONTENTSIZE_UNKNOWN is default value for any new compression job.
   Note 2 : If all data is provided and consumed in a single round,
            this value is overriden by srcSize instead. 
 


@@ -985,13 +991,19 @@ size_t ZSTD_CCtx_refPrefix_advanced(ZSTD_CCtx* cctx, c - Compression parameters cannot be changed once compression is started. - outpot->pos must be <= dstCapacity, input->pos must be <= srcSize - outpot->pos and input->pos will be updated. They are guaranteed to remain below their respective limit. - - @return provides the minimum amount of data still to flush from internal buffers + - In single-thread mode (default), function is blocking : it completed its job before returning to caller. + - In multi-thread mode, function is non-blocking : it just acquires a copy of input, and distribute job to internal worker threads, + and then immediately returns, just indicating that there is some data remaining to be flushed. + The function nonetheless guarantees forward progress : it will return only after it reads or write at least 1+ byte. + - Exception : in multi-threading mode, if the first call requests a ZSTD_e_end directive, it is blocking : it will complete compression before giving back control to caller. + - @return provides the minimum amount of data remaining to be flushed from internal buffers or an error code, which can be tested using ZSTD_isError(). - if @return != 0, flush is not fully completed, there is some data left within internal buffers. - - after a ZSTD_e_end directive, if internal buffer is not fully flushed, + if @return != 0, flush is not fully completed, there is still some data left within internal buffers. + This is useful to determine if a ZSTD_e_flush or ZSTD_e_end directive is completed. + - after a ZSTD_e_end directive, if internal buffer is not fully flushed (@return != 0), only ZSTD_e_end or ZSTD_e_flush operations are allowed. - It is necessary to fully flush internal buffers - before starting a new compression job, or changing compression parameters. + Before starting a new compression job, or changing compression parameters, + it is required to fully flush internal buffers.


@@ -1166,7 +1178,7 @@ size_t ZSTD_DCtx_refPrefix_advanced(ZSTD_DCtx* dctx, c


-

Block level API


+

Block level API


 
 

Frame metadata cost is typically ~18 bytes, which can be non-negligible for very small blocks (< 100 bytes). User will have to take in charge required information to regenerate data, such as compressed and content sizes. Modified: head/sys/contrib/zstd/lib/BUCK ============================================================================== --- head/sys/contrib/zstd/lib/BUCK Wed Mar 14 02:56:43 2018 (r330893) +++ head/sys/contrib/zstd/lib/BUCK Wed Mar 14 03:00:17 2018 (r330894) @@ -15,15 +15,9 @@ cxx_library( header_namespace='', visibility=['PUBLIC'], exported_headers=subdir_glob([ - ('compress', 'zstdmt_compress.h'), + ('compress', 'zstd*.h'), ]), - headers=subdir_glob([ - ('compress', 'zstd_opt.h'), - ]), - srcs=[ - 'compress/zstd_compress.c', - 'compress/zstdmt_compress.c', - ], + srcs=glob(['compress/zstd*.c']), deps=[':common'], ) @@ -31,7 +25,7 @@ cxx_library( name='decompress', header_namespace='', visibility=['PUBLIC'], - srcs=['decompress/zstd_decompress.c'], + srcs=glob(['decompress/zstd*.c']), deps=[ ':common', ':legacy', @@ -58,6 +52,9 @@ cxx_library( ]), srcs=glob(['legacy/*.c']), deps=[':common'], + exported_preprocessor_flags=[ + '-DZSTD_LEGACY_SUPPORT=4', + ], ) cxx_library( @@ -75,6 +72,15 @@ cxx_library( ) cxx_library( + name='compiler', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=subdir_glob([ + ('common', 'compiler.h'), + ]), +) + +cxx_library( name='bitstream', header_namespace='', visibility=['PUBLIC'], @@ -100,6 +106,7 @@ cxx_library( ], deps=[ ':bitstream', + ':compiler', ':errors', ':mem', ], @@ -133,7 +140,10 @@ cxx_library( ('common', 'pool.h'), ]), srcs=['common/pool.c'], - deps=[':threading'], + deps=[ + ':threading', + ':zstd_common', + ], ) cxx_library( @@ -144,6 +154,12 @@ cxx_library( ('common', 'threading.h'), ]), srcs=['common/threading.c'], + exported_preprocessor_flags=[ + '-DZSTD_MULTITHREAD', + ], + exported_linker_flags=[ + '-pthread', + ], ) cxx_library( @@ -154,6 +170,9 @@ cxx_library( ('common', 'xxhash.h'), ]), srcs=['common/xxhash.c'], + exported_preprocessor_flags=[ + '-DXXH_NAMESPACE=ZSTD_', + ], ) cxx_library( @@ -166,6 +185,7 @@ cxx_library( ]), srcs=['common/zstd_common.c'], deps=[ + ':compiler', ':errors', ':mem', ], @@ -175,6 +195,7 @@ cxx_library( name='common', deps=[ ':bitstream', + ':compiler', ':entropy', ':errors', ':mem', Modified: head/sys/contrib/zstd/lib/common/bitstream.h ============================================================================== --- head/sys/contrib/zstd/lib/common/bitstream.h Wed Mar 14 02:56:43 2018 (r330893) +++ head/sys/contrib/zstd/lib/common/bitstream.h Wed Mar 14 03:00:17 2018 (r330894) @@ -167,7 +167,7 @@ MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD /*-************************************************************** * Internal functions ****************************************************************/ -MEM_STATIC unsigned BIT_highbit32 (register U32 val) +MEM_STATIC unsigned BIT_highbit32 (U32 val) { assert(val != 0); { Modified: head/sys/contrib/zstd/lib/common/mem.h ============================================================================== --- head/sys/contrib/zstd/lib/common/mem.h Wed Mar 14 02:56:43 2018 (r330893) +++ head/sys/contrib/zstd/lib/common/mem.h Wed Mar 14 03:00:17 2018 (r330894) @@ -56,8 +56,6 @@ MEM_STATIC void MEM_check(void) { MEM_STATIC_ASSERT((s typedef int32_t S32; typedef uint64_t U64; typedef int64_t S64; - typedef intptr_t iPtrDiff; - typedef uintptr_t uPtrDiff; #else typedef unsigned char BYTE; typedef unsigned short U16; @@ -66,8 +64,6 @@ MEM_STATIC void MEM_check(void) { MEM_STATIC_ASSERT((s typedef signed int S32; typedef unsigned long long U64; typedef signed long long S64; - typedef ptrdiff_t iPtrDiff; - typedef size_t uPtrDiff; #endif @@ -123,20 +119,26 @@ MEM_STATIC void MEM_write64(void* memPtr, U64 value) { /* currently only defined for gcc and icc */ #if defined(_MSC_VER) || (defined(__INTEL_COMPILER) && defined(WIN32)) __pragma( pack(push, 1) ) - typedef union { U16 u16; U32 u32; U64 u64; size_t st; } unalign; + typedef struct { U16 v; } unalign16; + typedef struct { U32 v; } unalign32; + typedef struct { U64 v; } unalign64; + typedef struct { size_t v; } unalignArch; __pragma( pack(pop) ) #else - typedef union { U16 u16; U32 u32; U64 u64; size_t st; } __attribute__((packed)) unalign; + typedef struct { U16 v; } __attribute__((packed)) unalign16; + typedef struct { U32 v; } __attribute__((packed)) unalign32; + typedef struct { U64 v; } __attribute__((packed)) unalign64; + typedef struct { size_t v; } __attribute__((packed)) unalignArch; #endif -MEM_STATIC U16 MEM_read16(const void* ptr) { return ((const unalign*)ptr)->u16; } -MEM_STATIC U32 MEM_read32(const void* ptr) { return ((const unalign*)ptr)->u32; } -MEM_STATIC U64 MEM_read64(const void* ptr) { return ((const unalign*)ptr)->u64; } -MEM_STATIC size_t MEM_readST(const void* ptr) { return ((const unalign*)ptr)->st; } +MEM_STATIC U16 MEM_read16(const void* ptr) { return ((const unalign16*)ptr)->v; } +MEM_STATIC U32 MEM_read32(const void* ptr) { return ((const unalign32*)ptr)->v; } +MEM_STATIC U64 MEM_read64(const void* ptr) { return ((const unalign64*)ptr)->v; } +MEM_STATIC size_t MEM_readST(const void* ptr) { return ((const unalignArch*)ptr)->v; } -MEM_STATIC void MEM_write16(void* memPtr, U16 value) { ((unalign*)memPtr)->u16 = value; } -MEM_STATIC void MEM_write32(void* memPtr, U32 value) { ((unalign*)memPtr)->u32 = value; } -MEM_STATIC void MEM_write64(void* memPtr, U64 value) { ((unalign*)memPtr)->u64 = value; } +MEM_STATIC void MEM_write16(void* memPtr, U16 value) { ((unalign16*)memPtr)->v = value; } +MEM_STATIC void MEM_write32(void* memPtr, U32 value) { ((unalign32*)memPtr)->v = value; } +MEM_STATIC void MEM_write64(void* memPtr, U64 value) { ((unalign64*)memPtr)->v = value; } #else Modified: head/sys/contrib/zstd/lib/common/pool.c ============================================================================== --- head/sys/contrib/zstd/lib/common/pool.c Wed Mar 14 02:56:43 2018 (r330893) +++ head/sys/contrib/zstd/lib/common/pool.c Wed Mar 14 03:00:17 2018 (r330894) @@ -11,7 +11,6 @@ /* ====== Dependencies ======= */ #include /* size_t */ -#include /* malloc, calloc, free */ #include "pool.h" /* ====== Compiler specifics ====== */ @@ -115,7 +114,7 @@ POOL_ctx* POOL_create_advanced(size_t numThreads, size * and full queues. */ ctx->queueSize = queueSize + 1; - ctx->queue = (POOL_job*) malloc(ctx->queueSize * sizeof(POOL_job)); + ctx->queue = (POOL_job*)ZSTD_malloc(ctx->queueSize * sizeof(POOL_job), customMem); ctx->queueHead = 0; ctx->queueTail = 0; ctx->numThreadsBusy = 0; Modified: head/sys/contrib/zstd/lib/common/xxhash.c ============================================================================== --- head/sys/contrib/zstd/lib/common/xxhash.c Wed Mar 14 02:56:43 2018 (r330893) +++ head/sys/contrib/zstd/lib/common/xxhash.c Wed Mar 14 03:00:17 2018 (r330894) @@ -212,7 +212,7 @@ static U64 XXH_read64(const void* memPtr) #if defined(_MSC_VER) /* Visual Studio */ # define XXH_swap32 _byteswap_ulong # define XXH_swap64 _byteswap_uint64 -#elif (GCC_VERSION >= 403 && !defined(__riscv)) +#elif GCC_VERSION >= 403 # define XXH_swap32 __builtin_bswap32 # define XXH_swap64 __builtin_bswap64 #else Modified: head/sys/contrib/zstd/lib/common/zstd_common.c ============================================================================== --- head/sys/contrib/zstd/lib/common/zstd_common.c Wed Mar 14 02:56:43 2018 (r330893) +++ head/sys/contrib/zstd/lib/common/zstd_common.c Wed Mar 14 03:00:17 2018 (r330894) @@ -31,20 +31,26 @@ const char* ZSTD_versionString(void) { return ZSTD_VER * ZSTD Error Management ******************************************/ /*! ZSTD_isError() : -* tells if a return value is an error code */ + * tells if a return value is an error code */ unsigned ZSTD_isError(size_t code) { return ERR_isError(code); } /*! ZSTD_getErrorName() : -* provides error code string from function result (useful for debugging) */ + * provides error code string from function result (useful for debugging) */ const char* ZSTD_getErrorName(size_t code) { return ERR_getErrorName(code); } /*! ZSTD_getError() : -* convert a `size_t` function result into a proper ZSTD_errorCode enum */ + * convert a `size_t` function result into a proper ZSTD_errorCode enum */ ZSTD_ErrorCode ZSTD_getErrorCode(size_t code) { return ERR_getErrorCode(code); } /*! ZSTD_getErrorString() : -* provides error code string from enum */ + * provides error code string from enum */ const char* ZSTD_getErrorString(ZSTD_ErrorCode code) { return ERR_getErrorString(code); } + +/*! g_debuglog_enable : + * turn on/off debug traces (global switch) */ +#if defined(ZSTD_DEBUG) && (ZSTD_DEBUG >= 2) +int g_debuglog_enable = 1; +#endif /*=************************************************************** Modified: head/sys/contrib/zstd/lib/common/zstd_internal.h ============================================================================== --- head/sys/contrib/zstd/lib/common/zstd_internal.h Wed Mar 14 02:56:43 2018 (r330893) +++ head/sys/contrib/zstd/lib/common/zstd_internal.h Wed Mar 14 03:00:17 2018 (r330894) @@ -11,6 +11,10 @@ #ifndef ZSTD_CCOMMON_H_MODULE #define ZSTD_CCOMMON_H_MODULE +/* this module contains definitions which must be identical + * across compression, decompression and dictBuilder. + * It also contains a few functions useful to at least 2 of them + * and which benefit from being inlined */ /*-************************************* * Dependencies @@ -50,21 +54,26 @@ extern "C" { #if defined(ZSTD_DEBUG) && (ZSTD_DEBUG>=2) # include +extern int g_debuglog_enable; /* recommended values for ZSTD_DEBUG display levels : * 1 : no display, enables assert() only - * 2 : reserved for currently active debugging path - * 3 : events once per object lifetime (CCtx, CDict) + * 2 : reserved for currently active debug path + * 3 : events once per object lifetime (CCtx, CDict, etc.) * 4 : events once per frame * 5 : events once per block * 6 : events once per sequence (*very* verbose) */ -# define DEBUGLOG(l, ...) { \ - if (l<=ZSTD_DEBUG) { \ - fprintf(stderr, __FILE__ ": "); \ - fprintf(stderr, __VA_ARGS__); \ - fprintf(stderr, " \n"); \ +# define RAWLOG(l, ...) { \ + if ((g_debuglog_enable) & (l<=ZSTD_DEBUG)) { \ + fprintf(stderr, __VA_ARGS__); \ } } +# define DEBUGLOG(l, ...) { \ + if ((g_debuglog_enable) & (l<=ZSTD_DEBUG)) { \ + fprintf(stderr, __FILE__ ": " __VA_ARGS__); \ + fprintf(stderr, " \n"); \ + } } #else -# define DEBUGLOG(l, ...) {} /* disabled */ +# define RAWLOG(l, ...) {} /* disabled */ +# define DEBUGLOG(l, ...) {} /* disabled */ #endif @@ -85,9 +94,7 @@ extern "C" { #define ZSTD_OPT_NUM (1<<12) #define ZSTD_REP_NUM 3 /* number of repcodes */ -#define ZSTD_REP_CHECK (ZSTD_REP_NUM) /* number of repcodes to check by the optimal parser */ #define ZSTD_REP_MOVE (ZSTD_REP_NUM-1) -#define ZSTD_REP_MOVE_OPT (ZSTD_REP_NUM) static const U32 repStartValue[ZSTD_REP_NUM] = { 1, 4, 8 }; #define KB *(1 <<10) @@ -134,28 +141,40 @@ typedef enum { set_basic, set_rle, set_compressed, set #define LLFSELog 9 #define OffFSELog 8 -static const U32 LL_bits[MaxLL+1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 2, 2, 3, 3, 4, 6, 7, 8, 9,10,11,12, +static const U32 LL_bits[MaxLL+1] = { 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 2, 2, 3, 3, + 4, 6, 7, 8, 9,10,11,12, 13,14,15,16 }; -static const S16 LL_defaultNorm[MaxLL+1] = { 4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 1, 1, 1, 1, +static const S16 LL_defaultNorm[MaxLL+1] = { 4, 3, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 3, 2, 1, 1, 1, 1, 1, -1,-1,-1,-1 }; #define LL_DEFAULTNORMLOG 6 /* for static allocation */ static const U32 LL_defaultNormLog = LL_DEFAULTNORMLOG; -static const U32 ML_bits[MaxML+1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 7, 8, 9,10,11, +static const U32 ML_bits[MaxML+1] = { 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 2, 2, 3, 3, + 4, 4, 5, 7, 8, 9,10,11, 12,13,14,15,16 }; -static const S16 ML_defaultNorm[MaxML+1] = { 1, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,-1,-1, +static const S16 ML_defaultNorm[MaxML+1] = { 1, 4, 3, 2, 2, 2, 2, 2, + 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1,-1,-1, -1,-1,-1,-1,-1 }; #define ML_DEFAULTNORMLOG 6 /* for static allocation */ static const U32 ML_defaultNormLog = ML_DEFAULTNORMLOG; -static const S16 OF_defaultNorm[DefaultMaxOff+1] = { 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1,-1,-1,-1,-1,-1 }; +static const S16 OF_defaultNorm[DefaultMaxOff+1] = { 1, 1, 1, 1, 1, 1, 2, 2, + 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + -1,-1,-1,-1,-1 }; #define OF_DEFAULTNORMLOG 5 /* for static allocation */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 14 03:04:25 2018 Return-Path: Delivered-To: svn-src-all@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 856B4F496AC; Wed, 14 Mar 2018 03:04:25 +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 358F08510A; Wed, 14 Mar 2018 03:04:25 +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 3076C226F6; Wed, 14 Mar 2018 03:04:25 +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 w2E34PwR031032; Wed, 14 Mar 2018 03:04:25 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E34O5P031030; Wed, 14 Mar 2018 03:04:24 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140304.w2E34O5P031030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 03:04:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330895 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330895 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:04:25 -0000 Author: eadler Date: Wed Mar 14 03:04:24 2018 New Revision: 330895 URL: https://svnweb.freebsd.org/changeset/base/330895 Log: MFC r304773,r304800: Flesh out the state and flags args to sccnopen(). Set state flags to indicate (potentially partial) success of the open. Use these to decide what to close in sccnclose(). Only grab/ungrab use open/close so far. Add a per-sc variable to count successful keyboard opens and use this instead of the grab count to decide if the keyboad state has been switched. Start fixing the locking by using atomic ops for the most important counter -- the grab level one. Other racy counting will eventually be fixed by normal mutex or kdb locking in most cases. Use a 2-entry per-sc stack of states for grabbing. 2 is just enough to debug grabbing, e.g., for gets(). gets() grabs once and might not be able to do a full (or any) state switch. ddb grabs again and has a better chance of doing a full state switch and needs a place to stack the previous state. For more than 3 levels, grabbing just changes the count. Console drivers should try to switch on every i/o in case lower levels of nesting failed to switch but the current level succeeds, but then the switch (back) must be completed on every i/o and this flaps the state unless the switch is null. The main point of grabbing is to make it null quite often. Syscons grabbing also does a carefully chosen screen focus that is not done on every i/o. Add a large comment about grabbing. Restore some small lost comments. Modified: stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 03:00:17 2018 (r330894) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 03:04:24 2018 (r330895) @@ -79,8 +79,6 @@ __FBSDID("$FreeBSD$"); #include #include -struct sc_cnstate; /* not used yet */ - #define COLD 0 #define WARM 1 @@ -1655,7 +1653,13 @@ sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int fl { int kbd_mode; - if (sc->kbd == NULL) + /* assert(sc_console_unit >= 0) */ + + sp->kbd_opened = FALSE; + sp->scr_opened = FALSE; + + /* Opening the keyboard is optional. */ + if (!(flags & 1) || sc->kbd == NULL) goto over_keyboard; /* @@ -1667,48 +1671,79 @@ sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int fl /* Switch the keyboard to console mode (K_XLATE, polled) on all scp's. */ kbd_mode = K_XLATE; (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&kbd_mode); + sc->kbd_open_level++; kbdd_poll(sc->kbd, TRUE); + + sp->kbd_opened = TRUE; over_keyboard: ; + /* The screen is opened iff locking it succeeds. */ + sp->scr_opened = TRUE; + + /* The screen switch is optional. */ + if (!(flags & 2)) + return; + + /* try to switch to the kernel console screen */ if (!cold && sc->cur_scp->index != sc_console->index && sc->cur_scp->smode.mode == VT_AUTO && sc_console->smode.mode == VT_AUTO) sc_switch_scr(sc, sc_console->index); - } static void sccnclose(sc_softc_t *sc, struct sc_cnstate *sp) { - if (sc->kbd == NULL) + sp->scr_opened = FALSE; + + if (!sp->kbd_opened) return; /* Restore keyboard mode (for the current, possibly-changed scp). */ kbdd_poll(sc->kbd, FALSE); - (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&sc->cur_scp->kbd_mode); + if (--sc->kbd_open_level == 0) + (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&sc->cur_scp->kbd_mode); kbdd_disable(sc->kbd); + sp->kbd_opened = FALSE; } +/* + * Grabbing switches the screen and keyboard focus to sc_console and the + * keyboard mode to (K_XLATE, polled). Only switching to polled mode is + * essential (for preventing the interrupt handler from eating input + * between polls). Focus is part of the UI, and the other switches are + * work just was well when they are done on every entry and exit. + * + * Screen switches while grabbed are supported, and to maintain focus for + * this ungrabbing and closing only restore the polling state and then + * the keyboard mode if on the original screen. + */ + static void sc_cngrab(struct consdev *cp) { sc_softc_t *sc; + int lev; sc = sc_console->sc; - if (sc->grab_level++ == 0) - sccnopen(sc, NULL, 0); + lev = atomic_fetchadd_int(&sc->grab_level, 1); + if (lev >= 0 && lev < 2) + sccnopen(sc, &sc->grab_state[lev], 1 | 2); } static void sc_cnungrab(struct consdev *cp) { sc_softc_t *sc; + int lev; sc = sc_console->sc; - if (--sc->grab_level == 0) - sccnclose(sc, NULL); + lev = atomic_load_acq_int(&sc->grab_level) - 1; + if (lev >= 0 && lev < 2) + sccnclose(sc, &sc->grab_state[lev]); + atomic_add_int(&sc->grab_level, -1); } static void @@ -2681,7 +2716,7 @@ exchange_scr(sc_softc_t *sc) sc_set_border(scp, scp->border); /* set up the keyboard for the new screen */ - if (sc->grab_level == 0 && sc->old_scp->kbd_mode != scp->kbd_mode) + if (sc->kbd_open_level == 0 && sc->old_scp->kbd_mode != scp->kbd_mode) (void)kbdd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode); update_kbd_state(scp, scp->status, LOCK_MASK); @@ -3426,7 +3461,7 @@ next_code: if (!(flags & SCGETC_CN)) random_harvest_queue(&c, sizeof(c), 1, RANDOM_KEYBOARD); - if (sc->grab_level == 0 && scp->kbd_mode != K_XLATE) + if (sc->kbd_open_level == 0 && scp->kbd_mode != K_XLATE) return KEYCHAR(c); /* if scroll-lock pressed allow history browsing */ Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Wed Mar 14 03:00:17 2018 (r330894) +++ stable/11/sys/dev/syscons/syscons.h Wed Mar 14 03:04:24 2018 (r330895) @@ -188,6 +188,11 @@ struct video_adapter; struct scr_stat; struct tty; +struct sc_cnstate { + u_char kbd_opened; + u_char scr_opened; +}; + typedef struct sc_softc { int unit; /* unit # */ int config; /* configuration flags */ @@ -231,6 +236,9 @@ typedef struct sc_softc { char write_in_progress; char blink_in_progress; int grab_level; + /* 2 is just enough for kdb to grab for stepping normal grabbing: */ + struct sc_cnstate grab_state[2]; + int kbd_open_level; struct mtx scr_lock; /* mutex for sc_puts() */ struct mtx video_mtx; From owner-svn-src-all@freebsd.org Wed Mar 14 03:09:49 2018 Return-Path: Delivered-To: svn-src-all@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 BA068F49BB5; Wed, 14 Mar 2018 03:09:48 +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 67E7F85779; Wed, 14 Mar 2018 03:09:48 +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 62BE9226FC; Wed, 14 Mar 2018 03:09:48 +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 w2E39mxg031371; Wed, 14 Mar 2018 03:09:48 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E39mMD031368; Wed, 14 Mar 2018 03:09:48 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140309.w2E39mMD031368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 03:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330896 - in stable/11/sys: dev/syscons kern X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/sys: dev/syscons kern X-SVN-Commit-Revision: 330896 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:09:49 -0000 Author: eadler Date: Wed Mar 14 03:09:47 2018 New Revision: 330896 URL: https://svnweb.freebsd.org/changeset/base/330896 Log: MFC r304804: Less-quick fix for locking fixes in r172250. r172250 added a second syscons spinlock for the output routine alone. It is better to extend the coverage of the first syscons spinlock added in r162285. 2 locks might work with complicated juggling, but no juggling was done. What the 2 locks actually did was to cover some of the missing locking in each other and deadlock less often against each other than a single lock with larger coverage would against itself. Races are preferable to deadlocks here, but 2 locks are still worse since they are harder to understand and fix. Prefer deadlocks to races and merge the second lock into the first one. Extend the scope of the spinlocking to all of sc_cnputc() instead of just the sc_puts() part. This further prefers deadlocks to races. Extend the kdb_active hack from sc_puts() internals for the second lock to all spinlocking. This reduces deadlocks much more than the other changes increases them. The s/p,10* test in ddb gets much further now. Hide this detail in the SC_VIDEO_LOCK() macro. Add namespace pollution in 1 nested #include and reduce namespace pollution in other nested #includes to pay for this. Move the first lock higher in the witness order. The second lock was unnaturally low and the first lock was unnaturally high. The second lock had to be above "sleepq chain" and/or "callout" to avoid spurious LORs for visual bells in sc_puts(). Other console driver locks are already even higher (but not adjacent like they should be) except when they are missing from the table. Audio bells also benefit from the syscons lock being high so that audio mutexes have chance of being lower. Otherwise, console drviver locks should be as low as possible. Non-spurious LORs now occur if the bell code calls printf() or is interrupted (perhaps by an NMI) and the interrupt handler calls printf(). Previous commits turned off many bells in console i/o but missed ones done by the teken layer. Modified: stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h stable/11/sys/kern/subr_witness.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 03:04:24 2018 (r330895) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 03:09:47 2018 (r330896) @@ -343,7 +343,9 @@ sctty_outwakeup(struct tty *tp) len = ttydisc_getc(tp, buf, sizeof buf); if (len == 0) break; + SC_VIDEO_LOCK(scp->sc); sc_puts(scp, buf, len, 0); + SC_VIDEO_UNLOCK(scp->sc); } } @@ -1760,6 +1762,8 @@ sc_cnputc(struct consdev *cd, int c) /* assert(sc_console != NULL) */ + SC_VIDEO_LOCK(scp->sc); + #ifndef SC_NO_HISTORY if (scp == scp->sc->cur_scp && scp->status & SLKED) { scp->status &= ~SLKED; @@ -1793,6 +1797,7 @@ sc_cnputc(struct consdev *cd, int c) s = spltty(); /* block sckbdevent and scrn_timer */ sccnupdate(scp); splx(s); + SC_VIDEO_UNLOCK(scp->sc); } static int @@ -2726,24 +2731,14 @@ exchange_scr(sc_softc_t *sc) static void sc_puts(scr_stat *scp, u_char *buf, int len, int kernel) { - int need_unlock = 0; - #ifdef DEV_SPLASH /* make screensaver happy */ if (!sticky_splash && scp == scp->sc->cur_scp && !sc_saver_keyb_only) run_scrn_saver = FALSE; #endif - if (scp->tsw) { - if (!kdb_active && !mtx_owned(&scp->sc->scr_lock)) { - need_unlock = 1; - mtx_lock_spin(&scp->sc->scr_lock); - } + if (scp->tsw) (*scp->tsw->te_puts)(scp, buf, len, kernel); - if (need_unlock) - mtx_unlock_spin(&scp->sc->scr_lock); - } - if (scp->sc->delayed_next_scr) sc_switch_scr(scp->sc, scp->sc->delayed_next_scr - 1); } @@ -2906,10 +2901,8 @@ scinit(int unit, int flags) * disappeared... */ sc = sc_get_softc(unit, flags & SC_KERNEL_CONSOLE); - if ((sc->flags & SC_INIT_DONE) == 0) { - mtx_init(&sc->scr_lock, "scrlock", NULL, MTX_SPIN); + if ((sc->flags & SC_INIT_DONE) == 0) SC_VIDEO_LOCKINIT(sc); - } adp = NULL; if (sc->adapter >= 0) { @@ -3126,7 +3119,6 @@ scterm(int unit, int flags) (*scp->tsw->te_term)(scp, &scp->ts); if (scp->ts != NULL) free(scp->ts, M_DEVBUF); - mtx_destroy(&sc->scr_lock); mtx_destroy(&sc->video_mtx); /* clear the structure */ Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Wed Mar 14 03:04:24 2018 (r330895) +++ stable/11/sys/dev/syscons/syscons.h Wed Mar 14 03:09:47 2018 (r330896) @@ -34,8 +34,9 @@ #ifndef _DEV_SYSCONS_SYSCONS_H_ #define _DEV_SYSCONS_SYSCONS_H_ -#include -#include +#include /* XXX */ +#include +#include /* machine-dependent part of the header */ @@ -239,7 +240,6 @@ typedef struct sc_softc { /* 2 is just enough for kdb to grab for stepping normal grabbing: */ struct sc_cnstate grab_state[2]; int kbd_open_level; - struct mtx scr_lock; /* mutex for sc_puts() */ struct mtx video_mtx; long scrn_time_stamp; @@ -547,12 +547,12 @@ typedef struct { MTX_SPIN | MTX_RECURSE); #define SC_VIDEO_LOCK(sc) \ do { \ - if (!cold) \ + if (!kdb_active) \ mtx_lock_spin(&(sc)->video_mtx); \ } while(0) #define SC_VIDEO_UNLOCK(sc) \ do { \ - if (!cold) \ + if (!kdb_active) \ mtx_unlock_spin(&(sc)->video_mtx); \ } while(0) Modified: stable/11/sys/kern/subr_witness.c ============================================================================== --- stable/11/sys/kern/subr_witness.c Wed Mar 14 03:04:24 2018 (r330895) +++ stable/11/sys/kern/subr_witness.c Wed Mar 14 03:09:47 2018 (r330896) @@ -645,7 +645,6 @@ static struct witness_order_list_entry order_lists[] = #endif { "rm.mutex_mtx", &lock_class_mtx_spin }, { "sio", &lock_class_mtx_spin }, - { "scrlock", &lock_class_mtx_spin }, #ifdef __i386__ { "cy", &lock_class_mtx_spin }, #endif @@ -661,6 +660,7 @@ static struct witness_order_list_entry order_lists[] = { "pmc-per-proc", &lock_class_mtx_spin }, #endif { "process slock", &lock_class_mtx_spin }, + { "syscons video lock", &lock_class_mtx_spin }, { "sleepq chain", &lock_class_mtx_spin }, { "rm_spinlock", &lock_class_mtx_spin }, { "turnstile chain", &lock_class_mtx_spin }, @@ -669,7 +669,6 @@ static struct witness_order_list_entry order_lists[] = { "td_contested", &lock_class_mtx_spin }, { "callout", &lock_class_mtx_spin }, { "entropy harvest mutex", &lock_class_mtx_spin }, - { "syscons video lock", &lock_class_mtx_spin }, #ifdef SMP { "smp rendezvous", &lock_class_mtx_spin }, #endif From owner-svn-src-all@freebsd.org Wed Mar 14 03:20:09 2018 Return-Path: Delivered-To: svn-src-all@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 B426CF4A60F; Wed, 14 Mar 2018 03:20:08 +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 6644385D52; Wed, 14 Mar 2018 03:20:08 +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 5FDD12287D; Wed, 14 Mar 2018 03:20:08 +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 w2E3K8x7036486; Wed, 14 Mar 2018 03:20:08 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E3JuGP036341; Wed, 14 Mar 2018 03:19:56 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140319.w2E3JuGP036341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 03:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330897 - in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bi... X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bin/pwd bin/realpath bin/rm... X-SVN-Commit-Revision: 330897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:20:10 -0000 Author: eadler Date: Wed Mar 14 03:19:51 2018 New Revision: 330897 URL: https://svnweb.freebsd.org/changeset/base/330897 Log: Partial merge of the SPDX changes These changes are incomplete but are making it difficult to determine what other changes can/should be merged. No objections from: pfg Modified: stable/11/bin/cat/cat.c stable/11/bin/chflags/chflags.c stable/11/bin/chmod/chmod.c stable/11/bin/cp/cp.c stable/11/bin/cp/extern.h stable/11/bin/cp/utils.c stable/11/bin/date/date.c stable/11/bin/date/extern.h stable/11/bin/date/netdate.c stable/11/bin/dd/args.c stable/11/bin/dd/conv.c stable/11/bin/dd/conv_tab.c stable/11/bin/dd/dd.c stable/11/bin/dd/dd.h stable/11/bin/dd/extern.h stable/11/bin/dd/misc.c stable/11/bin/dd/position.c stable/11/bin/df/df.c stable/11/bin/domainname/domainname.c stable/11/bin/echo/echo.c stable/11/bin/ed/cbc.c stable/11/bin/hostname/hostname.c stable/11/bin/kill/kill.c stable/11/bin/ln/ln.c stable/11/bin/ls/cmp.c stable/11/bin/ls/extern.h stable/11/bin/ls/ls.c stable/11/bin/ls/ls.h stable/11/bin/ls/print.c stable/11/bin/ls/util.c stable/11/bin/mkdir/mkdir.c stable/11/bin/mv/mv.c stable/11/bin/pax/ar_io.c stable/11/bin/pax/ar_subs.c stable/11/bin/pax/buf_subs.c stable/11/bin/pax/cache.c stable/11/bin/pax/cache.h stable/11/bin/pax/cpio.c stable/11/bin/pax/cpio.h stable/11/bin/pax/extern.h stable/11/bin/pax/file_subs.c stable/11/bin/pax/ftree.c stable/11/bin/pax/ftree.h stable/11/bin/pax/gen_subs.c stable/11/bin/pax/options.c stable/11/bin/pax/options.h stable/11/bin/pax/pat_rep.c stable/11/bin/pax/pat_rep.h stable/11/bin/pax/pax.c stable/11/bin/pax/pax.h stable/11/bin/pax/sel_subs.c stable/11/bin/pax/sel_subs.h stable/11/bin/pax/tables.c stable/11/bin/pax/tables.h stable/11/bin/pax/tar.c stable/11/bin/pax/tar.h stable/11/bin/pax/tty_subs.c stable/11/bin/ps/extern.h stable/11/bin/ps/fmt.c stable/11/bin/ps/keyword.c stable/11/bin/ps/nlist.c stable/11/bin/ps/print.c stable/11/bin/ps/ps.c stable/11/bin/ps/ps.h stable/11/bin/pwd/pwd.c stable/11/bin/realpath/realpath.c stable/11/bin/rm/rm.c stable/11/bin/rmdir/rmdir.c stable/11/bin/sh/bltin/bltin.h stable/11/bin/sh/bltin/echo.c stable/11/bin/sh/mail.h stable/11/bin/sh/main.c stable/11/bin/sh/main.h stable/11/bin/sh/memalloc.c stable/11/bin/sh/memalloc.h stable/11/bin/sh/miscbltin.c stable/11/bin/sh/mknodes.c stable/11/bin/sh/mksyntax.c stable/11/bin/sh/myhistedit.h stable/11/bin/sh/mystring.c stable/11/bin/sh/mystring.h stable/11/bin/sh/options.c stable/11/bin/sh/options.h stable/11/bin/sh/output.c stable/11/bin/sh/output.h stable/11/bin/sh/parser.c stable/11/bin/sh/parser.h stable/11/bin/sh/redir.c stable/11/bin/sh/redir.h stable/11/bin/sh/shell.h stable/11/bin/sh/show.c stable/11/bin/sh/show.h stable/11/bin/sh/trap.c stable/11/bin/sh/trap.h stable/11/bin/sh/var.c stable/11/bin/sh/var.h stable/11/include/_ctype.h stable/11/include/a.out.h stable/11/include/ar.h stable/11/include/arpa/ftp.h stable/11/include/arpa/inet.h stable/11/include/arpa/nameser.h stable/11/include/arpa/nameser_compat.h stable/11/include/arpa/telnet.h stable/11/include/arpa/tftp.h stable/11/include/assert.h stable/11/include/bitstring.h stable/11/include/complex.h stable/11/include/cpio.h stable/11/include/ctype.h stable/11/include/db.h stable/11/include/dirent.h stable/11/include/dlfcn.h stable/11/include/elf-hints.h stable/11/include/elf.h stable/11/include/err.h stable/11/include/fmtmsg.h stable/11/include/fnmatch.h stable/11/include/fstab.h stable/11/include/fts.h stable/11/include/getopt.h stable/11/include/glob.h stable/11/include/grp.h stable/11/include/hesiod.h stable/11/include/iconv.h stable/11/include/inttypes.h stable/11/include/iso646.h stable/11/include/kenv.h stable/11/include/langinfo.h stable/11/include/libgen.h stable/11/include/limits.h stable/11/include/link.h stable/11/include/locale.h stable/11/include/malloc_np.h stable/11/include/memory.h stable/11/include/mk-osreldate.sh stable/11/include/monetary.h stable/11/include/mpool.h stable/11/include/mqueue.h stable/11/include/ndbm.h stable/11/include/netdb.h stable/11/include/nl_types.h stable/11/include/nlist.h stable/11/include/nss.h stable/11/include/nsswitch.h stable/11/include/paths.h stable/11/include/printf.h stable/11/include/proc_service.h stable/11/include/protocols/dumprestore.h stable/11/include/protocols/routed.h stable/11/include/protocols/rwhod.h stable/11/include/protocols/talkd.h stable/11/include/protocols/timed.h stable/11/include/pthread.h stable/11/include/pthread_np.h stable/11/include/pwd.h stable/11/include/ranlib.h stable/11/include/regex.h stable/11/include/resolv.h stable/11/include/rpc/auth.h stable/11/include/rpc/auth_des.h stable/11/include/rpc/auth_kerb.h stable/11/include/rpc/auth_unix.h stable/11/include/rpc/clnt.h stable/11/include/rpc/clnt_soc.h stable/11/include/rpc/des.h stable/11/include/rpc/des_crypt.h stable/11/include/rpc/nettype.h stable/11/include/rpc/pmap_clnt.h stable/11/include/rpc/pmap_prot.h stable/11/include/rpc/pmap_rmt.h stable/11/include/rpc/raw.h stable/11/include/rpc/rpc.h stable/11/include/rpc/rpc_com.h stable/11/include/rpc/rpc_msg.h stable/11/include/rpc/rpcb_clnt.h stable/11/include/rpc/rpcent.h stable/11/include/rpc/rpcsec_gss.h stable/11/include/rpc/svc.h stable/11/include/rpc/svc_auth.h stable/11/include/rpc/svc_dg.h stable/11/include/rpc/svc_soc.h stable/11/include/rpc/xdr.h stable/11/include/rpcsvc/nis_tags.h stable/11/include/rpcsvc/yp_prot.h stable/11/include/rpcsvc/ypclnt.h stable/11/include/runetype.h stable/11/include/semaphore.h stable/11/include/setjmp.h stable/11/include/signal.h stable/11/include/spawn.h stable/11/include/stab.h stable/11/include/stdalign.h stable/11/include/stdbool.h stable/11/include/stddef.h stable/11/include/stdio.h stable/11/include/stdlib.h stable/11/include/stdnoreturn.h stable/11/include/string.h stable/11/include/stringlist.h stable/11/include/strings.h stable/11/include/sysexits.h stable/11/include/tar.h stable/11/include/termios.h stable/11/include/tgmath.h stable/11/include/time.h stable/11/include/timeconv.h stable/11/include/timers.h stable/11/include/ttyent.h stable/11/include/uchar.h stable/11/include/ulimit.h stable/11/include/unistd.h stable/11/include/utime.h stable/11/include/utmpx.h stable/11/include/uuid.h stable/11/include/varargs.h stable/11/include/wchar.h stable/11/include/wctype.h stable/11/include/wordexp.h stable/11/include/xlocale.h stable/11/include/xlocale/_ctype.h stable/11/include/xlocale/_inttypes.h stable/11/include/xlocale/_langinfo.h stable/11/include/xlocale/_locale.h stable/11/include/xlocale/_monetary.h stable/11/include/xlocale/_stdio.h stable/11/include/xlocale/_stdlib.h stable/11/include/xlocale/_string.h stable/11/include/xlocale/_time.h stable/11/include/xlocale/_uchar.h stable/11/include/xlocale/_wchar.h stable/11/lib/csu/amd64/crt1.c stable/11/lib/csu/arm/crt1.c stable/11/lib/csu/common/crtbrand.c stable/11/lib/csu/common/ignore_init.c stable/11/lib/csu/common/notes.h stable/11/lib/csu/mips/crt1.c stable/11/lib/csu/powerpc/crt1.c stable/11/lib/csu/powerpc64/crt1.c stable/11/lib/csu/sparc64/crt1.c stable/11/lib/libarchive/config_freebsd.h stable/11/lib/libbluetooth/bluetooth.c stable/11/lib/libbluetooth/bluetooth.h stable/11/lib/libbluetooth/dev.c stable/11/lib/libbluetooth/hci.c stable/11/lib/libbsdstat/bsdstat.c stable/11/lib/libbsdstat/bsdstat.h stable/11/lib/libc/amd64/SYS.h stable/11/lib/libc/amd64/_fpmath.h stable/11/lib/libc/amd64/gen/_set_tp.c stable/11/lib/libc/amd64/gen/getcontextx.c stable/11/lib/libc/amd64/gen/makecontext.c stable/11/lib/libc/amd64/gen/signalcontext.c stable/11/lib/libc/amd64/string/strcpy.c stable/11/lib/libc/amd64/sys/amd64_get_fsbase.c stable/11/lib/libc/amd64/sys/amd64_get_gsbase.c stable/11/lib/libc/amd64/sys/amd64_set_fsbase.c stable/11/lib/libc/amd64/sys/amd64_set_gsbase.c stable/11/lib/libc/arm/SYS.h stable/11/lib/libc/arm/_fpmath.h stable/11/lib/libc/arm/aeabi/aeabi_atexit.c stable/11/lib/libc/arm/aeabi/aeabi_double.c stable/11/lib/libc/arm/aeabi/aeabi_float.c stable/11/lib/libc/arm/aeabi/aeabi_unwind_cpp.c stable/11/lib/libc/arm/gen/_set_tp.c stable/11/lib/libc/arm/gen/arm_initfini.c stable/11/lib/libc/arm/gen/fabs.c stable/11/lib/libc/arm/gen/flt_rounds.c stable/11/lib/libc/arm/gen/getcontextx.c stable/11/lib/libc/arm/gen/makecontext.c stable/11/lib/libc/arm/gen/signalcontext.c stable/11/lib/libc/arm/sys/__vdso_gettc.c stable/11/lib/libc/compat-43/creat.c stable/11/lib/libc/compat-43/gethostid.c stable/11/lib/libc/compat-43/getwd.c stable/11/lib/libc/compat-43/killpg.c stable/11/lib/libc/compat-43/sethostid.c stable/11/lib/libc/compat-43/setpgrp.c stable/11/lib/libc/compat-43/setrgid.c stable/11/lib/libc/compat-43/setruid.c stable/11/lib/libc/compat-43/sigcompat.c stable/11/lib/libc/db/btree/bt_close.c stable/11/lib/libc/db/btree/bt_conv.c stable/11/lib/libc/db/btree/bt_debug.c stable/11/lib/libc/db/btree/bt_delete.c stable/11/lib/libc/db/btree/bt_get.c stable/11/lib/libc/db/btree/bt_open.c stable/11/lib/libc/db/btree/bt_overflow.c stable/11/lib/libc/db/btree/bt_page.c stable/11/lib/libc/db/btree/bt_put.c stable/11/lib/libc/db/btree/bt_search.c stable/11/lib/libc/db/btree/bt_seq.c stable/11/lib/libc/db/btree/bt_split.c stable/11/lib/libc/db/btree/bt_utils.c stable/11/lib/libc/db/btree/btree.h stable/11/lib/libc/db/btree/extern.h stable/11/lib/libc/db/db/db.c stable/11/lib/libc/db/hash/extern.h stable/11/lib/libc/db/hash/hash.c stable/11/lib/libc/db/hash/hash.h stable/11/lib/libc/db/hash/hash_bigkey.c stable/11/lib/libc/db/hash/hash_buf.c stable/11/lib/libc/db/hash/hash_func.c stable/11/lib/libc/db/hash/hash_log2.c stable/11/lib/libc/db/hash/hash_page.c stable/11/lib/libc/db/hash/ndbm.c stable/11/lib/libc/db/hash/page.h stable/11/lib/libc/db/mpool/mpool-compat.c stable/11/lib/libc/db/mpool/mpool.c stable/11/lib/libc/db/recno/extern.h stable/11/lib/libc/db/recno/rec_close.c stable/11/lib/libc/db/recno/rec_delete.c stable/11/lib/libc/db/recno/rec_get.c stable/11/lib/libc/db/recno/rec_open.c stable/11/lib/libc/db/recno/rec_put.c stable/11/lib/libc/db/recno/rec_search.c stable/11/lib/libc/db/recno/rec_seq.c stable/11/lib/libc/db/recno/rec_utils.c stable/11/lib/libc/db/recno/recno.h stable/11/lib/libc/db/test/btree.tests/main.c stable/11/lib/libc/db/test/dbtest.c stable/11/lib/libc/db/test/hash.tests/driver2.c stable/11/lib/libc/db/test/hash.tests/tcreat3.c stable/11/lib/libc/db/test/hash.tests/tdel.c stable/11/lib/libc/db/test/hash.tests/thash4.c stable/11/lib/libc/db/test/hash.tests/tread2.c stable/11/lib/libc/db/test/hash.tests/tseq.c stable/11/lib/libc/db/test/hash.tests/tverify.c stable/11/lib/libc/gdtoa/_hdtoa.c stable/11/lib/libc/gdtoa/_hldtoa.c stable/11/lib/libc/gdtoa/_ldtoa.c stable/11/lib/libc/gdtoa/machdep_ldisQ.c stable/11/lib/libc/gdtoa/machdep_ldisd.c stable/11/lib/libc/gdtoa/machdep_ldisx.c stable/11/lib/libc/gen/__getosreldate.c stable/11/lib/libc/gen/__xuname.c stable/11/lib/libc/gen/_once_stub.c stable/11/lib/libc/gen/_pthread_stubs.c stable/11/lib/libc/gen/_spinlock_stub.c stable/11/lib/libc/gen/_thread_init.c stable/11/lib/libc/gen/alarm.c stable/11/lib/libc/gen/assert.c stable/11/lib/libc/gen/auxv.c stable/11/lib/libc/gen/cap_sandboxed.c stable/11/lib/libc/gen/clock.c stable/11/lib/libc/gen/clock_getcpuclockid.c stable/11/lib/libc/gen/closedir.c stable/11/lib/libc/gen/confstr.c stable/11/lib/libc/gen/crypt.c stable/11/lib/libc/gen/ctermid.c stable/11/lib/libc/gen/daemon.c stable/11/lib/libc/gen/devname.c stable/11/lib/libc/gen/dirfd.c stable/11/lib/libc/gen/disklabel.c stable/11/lib/libc/gen/dlfcn.c stable/11/lib/libc/gen/dup3.c stable/11/lib/libc/gen/elf_utils.c stable/11/lib/libc/gen/err.c stable/11/lib/libc/gen/errlst.c stable/11/lib/libc/gen/errno.c stable/11/lib/libc/gen/exec.c stable/11/lib/libc/gen/fdevname.c stable/11/lib/libc/gen/feature_present.c stable/11/lib/libc/gen/fmtcheck.c stable/11/lib/libc/gen/fmtmsg.c stable/11/lib/libc/gen/fnmatch.c stable/11/lib/libc/gen/fpclassify.c stable/11/lib/libc/gen/frexp.c stable/11/lib/libc/gen/fstab.c stable/11/lib/libc/gen/ftok.c stable/11/lib/libc/gen/fts-compat.c stable/11/lib/libc/gen/fts-compat.h stable/11/lib/libc/gen/fts.c stable/11/lib/libc/gen/gen-private.h stable/11/lib/libc/gen/getbootfile.c stable/11/lib/libc/gen/getbsize.c stable/11/lib/libc/gen/getcap.c stable/11/lib/libc/gen/getcwd.c stable/11/lib/libc/gen/getdomainname.c stable/11/lib/libc/gen/getgrent.c stable/11/lib/libc/gen/getgrouplist.c stable/11/lib/libc/gen/gethostname.c stable/11/lib/libc/gen/getloadavg.c stable/11/lib/libc/gen/getlogin.c stable/11/lib/libc/gen/getmntinfo.c stable/11/lib/libc/gen/getnetgrent.c stable/11/lib/libc/gen/getosreldate.c stable/11/lib/libc/gen/getpagesize.c stable/11/lib/libc/gen/getpagesizes.c stable/11/lib/libc/gen/getpeereid.c stable/11/lib/libc/gen/getpwent.c stable/11/lib/libc/gen/getttyent.c stable/11/lib/libc/gen/getusershell.c stable/11/lib/libc/gen/getutxent.c stable/11/lib/libc/gen/getvfsbyname.c stable/11/lib/libc/gen/glob.c stable/11/lib/libc/gen/initgroups.c stable/11/lib/libc/gen/isatty.c stable/11/lib/libc/gen/isinf.c stable/11/lib/libc/gen/isnan.c stable/11/lib/libc/gen/libc_dlopen.c stable/11/lib/libc/gen/lockf.c stable/11/lib/libc/gen/nice.c stable/11/lib/libc/gen/nlist.c stable/11/lib/libc/gen/opendir.c stable/11/lib/libc/gen/pause.c stable/11/lib/libc/gen/popen.c stable/11/lib/libc/gen/posix_spawn.c stable/11/lib/libc/gen/psignal.c stable/11/lib/libc/gen/pututxline.c stable/11/lib/libc/gen/pw_scan.c stable/11/lib/libc/gen/pw_scan.h stable/11/lib/libc/gen/raise.c stable/11/lib/libc/gen/readdir.c stable/11/lib/libc/gen/rewinddir.c stable/11/lib/libc/gen/scandir.c stable/11/lib/libc/gen/seekdir.c stable/11/lib/libc/gen/sem.c stable/11/lib/libc/gen/sem_new.c stable/11/lib/libc/gen/semctl.c stable/11/lib/libc/gen/setdomainname.c stable/11/lib/libc/gen/sethostname.c stable/11/lib/libc/gen/setjmperr.c stable/11/lib/libc/gen/setmode.c stable/11/lib/libc/gen/siginterrupt.c stable/11/lib/libc/gen/siglist.c stable/11/lib/libc/gen/signal.c stable/11/lib/libc/gen/sigsetops.c stable/11/lib/libc/gen/sleep.c stable/11/lib/libc/gen/stringlist.c stable/11/lib/libc/gen/strtofflags.c stable/11/lib/libc/gen/sysconf.c stable/11/lib/libc/gen/sysctl.c stable/11/lib/libc/gen/sysctlnametomib.c stable/11/lib/libc/gen/syslog.c stable/11/lib/libc/gen/telldir.c stable/11/lib/libc/gen/telldir.h stable/11/lib/libc/gen/termios.c stable/11/lib/libc/gen/time.c stable/11/lib/libc/gen/times.c stable/11/lib/libc/gen/timezone.c stable/11/lib/libc/gen/tls.c stable/11/lib/libc/gen/ttyname.c stable/11/lib/libc/gen/ttyslot.c stable/11/lib/libc/gen/ualarm.c stable/11/lib/libc/gen/ulimit.c stable/11/lib/libc/gen/uname.c stable/11/lib/libc/gen/unvis-compat.c stable/11/lib/libc/gen/usleep.c stable/11/lib/libc/gen/utime.c stable/11/lib/libc/gen/utxdb.c stable/11/lib/libc/gen/utxdb.h stable/11/lib/libc/gen/valloc.c stable/11/lib/libc/gen/wait.c stable/11/lib/libc/gen/wait3.c stable/11/lib/libc/gen/waitid.c stable/11/lib/libc/gen/waitpid.c stable/11/lib/libc/gen/wordexp.c stable/11/lib/libc/gmon/gmon.c stable/11/lib/libc/gmon/mcount.c stable/11/lib/libc/i386/SYS.h stable/11/lib/libc/i386/_fpmath.h stable/11/lib/libc/i386/gen/_set_tp.c stable/11/lib/libc/i386/gen/getcontextx.c stable/11/lib/libc/i386/gen/makecontext.c stable/11/lib/libc/i386/gen/signalcontext.c stable/11/lib/libc/i386/sys/i386_clr_watch.c stable/11/lib/libc/i386/sys/i386_get_fsbase.c stable/11/lib/libc/i386/sys/i386_get_gsbase.c stable/11/lib/libc/i386/sys/i386_get_ioperm.c stable/11/lib/libc/i386/sys/i386_get_ldt.c stable/11/lib/libc/i386/sys/i386_set_fsbase.c stable/11/lib/libc/i386/sys/i386_set_gsbase.c stable/11/lib/libc/i386/sys/i386_set_ioperm.c stable/11/lib/libc/i386/sys/i386_set_ldt.c stable/11/lib/libc/i386/sys/i386_set_watch.c stable/11/lib/libc/i386/sys/i386_vm86.c stable/11/lib/libc/iconv/__iconv.c stable/11/lib/libc/iconv/__iconv_free_list.c stable/11/lib/libc/iconv/__iconv_get_list.c stable/11/lib/libc/iconv/_strtol.h stable/11/lib/libc/iconv/_strtoul.h stable/11/lib/libc/iconv/bsd_iconv.c stable/11/lib/libc/iconv/citrus_aliasname_local.h stable/11/lib/libc/iconv/citrus_bcs.c stable/11/lib/libc/iconv/citrus_bcs.h stable/11/lib/libc/iconv/citrus_bcs_strtol.c stable/11/lib/libc/iconv/citrus_bcs_strtoul.c stable/11/lib/libc/iconv/citrus_csmapper.c stable/11/lib/libc/iconv/citrus_csmapper.h stable/11/lib/libc/iconv/citrus_db.c stable/11/lib/libc/iconv/citrus_db.h stable/11/lib/libc/iconv/citrus_db_factory.c stable/11/lib/libc/iconv/citrus_db_factory.h stable/11/lib/libc/iconv/citrus_db_file.h stable/11/lib/libc/iconv/citrus_db_hash.c stable/11/lib/libc/iconv/citrus_db_hash.h stable/11/lib/libc/iconv/citrus_esdb.c stable/11/lib/libc/iconv/citrus_esdb.h stable/11/lib/libc/iconv/citrus_esdb_file.h stable/11/lib/libc/iconv/citrus_fix_grouping.h stable/11/lib/libc/iconv/citrus_hash.c stable/11/lib/libc/iconv/citrus_hash.h stable/11/lib/libc/iconv/citrus_iconv.c stable/11/lib/libc/iconv/citrus_iconv.h stable/11/lib/libc/iconv/citrus_iconv_local.h stable/11/lib/libc/iconv/citrus_lock.h stable/11/lib/libc/iconv/citrus_lookup.c stable/11/lib/libc/iconv/citrus_lookup.h stable/11/lib/libc/iconv/citrus_lookup_factory.c stable/11/lib/libc/iconv/citrus_lookup_factory.h stable/11/lib/libc/iconv/citrus_lookup_file.h stable/11/lib/libc/iconv/citrus_mapper.c stable/11/lib/libc/iconv/citrus_mapper.h stable/11/lib/libc/iconv/citrus_mapper_local.h stable/11/lib/libc/iconv/citrus_memstream.c stable/11/lib/libc/iconv/citrus_memstream.h stable/11/lib/libc/iconv/citrus_mmap.c stable/11/lib/libc/iconv/citrus_mmap.h stable/11/lib/libc/iconv/citrus_module.c stable/11/lib/libc/iconv/citrus_module.h stable/11/lib/libc/iconv/citrus_namespace.h stable/11/lib/libc/iconv/citrus_none.c stable/11/lib/libc/iconv/citrus_none.h stable/11/lib/libc/iconv/citrus_pivot_factory.c stable/11/lib/libc/iconv/citrus_pivot_factory.h stable/11/lib/libc/iconv/citrus_pivot_file.h stable/11/lib/libc/iconv/citrus_prop.c stable/11/lib/libc/iconv/citrus_prop.h stable/11/lib/libc/iconv/citrus_region.h stable/11/lib/libc/iconv/citrus_stdenc.c stable/11/lib/libc/iconv/citrus_stdenc.h stable/11/lib/libc/iconv/citrus_stdenc_local.h stable/11/lib/libc/iconv/citrus_stdenc_template.h stable/11/lib/libc/iconv/citrus_types.h stable/11/lib/libc/iconv/iconv-internal.h stable/11/lib/libc/iconv/iconv.c stable/11/lib/libc/iconv/iconv_canonicalize.c stable/11/lib/libc/iconv/iconv_close.c stable/11/lib/libc/iconv/iconv_compat.c stable/11/lib/libc/iconv/iconv_open.c stable/11/lib/libc/iconv/iconv_open_into.c stable/11/lib/libc/iconv/iconv_set_relocation_prefix.c stable/11/lib/libc/iconv/iconvctl.c stable/11/lib/libc/iconv/iconvlist.c stable/11/lib/libc/include/compat.h stable/11/lib/libc/include/errlst.h stable/11/lib/libc/include/fpmath.h stable/11/lib/libc/include/libc_private.h stable/11/lib/libc/include/namespace.h stable/11/lib/libc/include/nscache.h stable/11/lib/libc/include/nscachedcli.h stable/11/lib/libc/include/nss_tls.h stable/11/lib/libc/include/reentrant.h stable/11/lib/libc/include/spinlock.h stable/11/lib/libc/include/un-namespace.h stable/11/lib/libc/inet/inet_addr.c stable/11/lib/libc/inet/inet_lnaof.c stable/11/lib/libc/inet/inet_makeaddr.c stable/11/lib/libc/inet/inet_netof.c stable/11/lib/libc/inet/inet_network.c stable/11/lib/libc/inet/inet_ntoa.c stable/11/lib/libc/locale/ascii.c stable/11/lib/libc/locale/btowc.c stable/11/lib/libc/locale/c16rtomb.c stable/11/lib/libc/locale/c32rtomb.c stable/11/lib/libc/locale/cXXrtomb_iconv.h stable/11/lib/libc/locale/collate.c stable/11/lib/libc/locale/collate.h stable/11/lib/libc/locale/collcmp.c stable/11/lib/libc/locale/ctype.c stable/11/lib/libc/locale/euc.c stable/11/lib/libc/locale/fix_grouping.c stable/11/lib/libc/locale/gb18030.c stable/11/lib/libc/locale/gb2312.c stable/11/lib/libc/locale/gbk.c stable/11/lib/libc/locale/isctype.c stable/11/lib/libc/locale/iswctype.c stable/11/lib/libc/locale/ldpart.c stable/11/lib/libc/locale/ldpart.h stable/11/lib/libc/locale/lmessages.c stable/11/lib/libc/locale/lmessages.h stable/11/lib/libc/locale/lmonetary.c stable/11/lib/libc/locale/lmonetary.h stable/11/lib/libc/locale/lnumeric.c stable/11/lib/libc/locale/lnumeric.h stable/11/lib/libc/locale/localeconv.c stable/11/lib/libc/locale/mblen.c stable/11/lib/libc/locale/mblocal.h stable/11/lib/libc/locale/mbrlen.c stable/11/lib/libc/locale/mbrtoc16.c stable/11/lib/libc/locale/mbrtoc32.c stable/11/lib/libc/locale/mbrtocXX_iconv.h stable/11/lib/libc/locale/mbrtowc.c stable/11/lib/libc/locale/mbsinit.c stable/11/lib/libc/locale/mbsnrtowcs.c stable/11/lib/libc/locale/mbsrtowcs.c stable/11/lib/libc/locale/mbstowcs.c stable/11/lib/libc/locale/mbtowc.c stable/11/lib/libc/locale/mskanji.c stable/11/lib/libc/locale/nextwctype.c stable/11/lib/libc/locale/nl_langinfo.c stable/11/lib/libc/locale/none.c stable/11/lib/libc/locale/rpmatch.c stable/11/lib/libc/locale/rune.c stable/11/lib/libc/locale/runefile.h stable/11/lib/libc/locale/runetype.c stable/11/lib/libc/locale/setlocale.c stable/11/lib/libc/locale/setlocale.h stable/11/lib/libc/locale/setrunelocale.c stable/11/lib/libc/locale/table.c stable/11/lib/libc/locale/tolower.c stable/11/lib/libc/locale/toupper.c stable/11/lib/libc/locale/utf8.c stable/11/lib/libc/locale/wcrtomb.c stable/11/lib/libc/locale/wcsftime.c stable/11/lib/libc/locale/wcsnrtombs.c stable/11/lib/libc/locale/wcsrtombs.c stable/11/lib/libc/locale/wcstod.c stable/11/lib/libc/locale/wcstof.c stable/11/lib/libc/locale/wcstoimax.c stable/11/lib/libc/locale/wcstol.c stable/11/lib/libc/locale/wcstold.c stable/11/lib/libc/locale/wcstoll.c stable/11/lib/libc/locale/wcstombs.c stable/11/lib/libc/locale/wcstoul.c stable/11/lib/libc/locale/wcstoull.c stable/11/lib/libc/locale/wcstoumax.c stable/11/lib/libc/locale/wctob.c stable/11/lib/libc/locale/wctomb.c stable/11/lib/libc/locale/wctrans.c stable/11/lib/libc/locale/wctype.c stable/11/lib/libc/locale/wcwidth.c stable/11/lib/libc/locale/xlocale.c stable/11/lib/libc/locale/xlocale_private.h stable/11/lib/libc/mips/SYS.h stable/11/lib/libc/mips/_fpmath.h stable/11/lib/libc/mips/gen/_set_tp.c stable/11/lib/libc/mips/gen/fabs.c stable/11/lib/libc/mips/gen/longjmp.c stable/11/lib/libc/mips/gen/makecontext.c stable/11/lib/libc/mips/gen/signalcontext.c stable/11/lib/libc/net/ether_addr.c stable/11/lib/libc/net/gai_strerror.c stable/11/lib/libc/net/getaddrinfo.c stable/11/lib/libc/net/gethostbydns.c stable/11/lib/libc/net/gethostbyht.c stable/11/lib/libc/net/gethostbynis.c stable/11/lib/libc/net/gethostnamadr.c stable/11/lib/libc/net/getifmaddrs.c stable/11/lib/libc/net/getnameinfo.c stable/11/lib/libc/net/getnetbydns.c stable/11/lib/libc/net/getnetbyht.c stable/11/lib/libc/net/getnetbynis.c stable/11/lib/libc/net/getnetnamadr.c stable/11/lib/libc/net/getproto.c stable/11/lib/libc/net/getprotoent.c stable/11/lib/libc/net/getprotoname.c stable/11/lib/libc/net/getservent.c stable/11/lib/libc/net/ip6opt.c stable/11/lib/libc/net/linkaddr.c stable/11/lib/libc/net/map_v4v6.c stable/11/lib/libc/net/name6.c stable/11/lib/libc/net/netdb_private.h stable/11/lib/libc/net/nscache.c stable/11/lib/libc/net/nscachedcli.c stable/11/lib/libc/net/nsdispatch.c stable/11/lib/libc/net/nslexer.l stable/11/lib/libc/net/nsparser.y stable/11/lib/libc/net/nss_backends.h stable/11/lib/libc/net/nss_compat.c stable/11/lib/libc/net/ntoh.c stable/11/lib/libc/net/rcmd.c stable/11/lib/libc/net/rcmdsh.c stable/11/lib/libc/net/recv.c stable/11/lib/libc/net/rthdr.c stable/11/lib/libc/net/sctp_sys_calls.c stable/11/lib/libc/net/send.c stable/11/lib/libc/net/sockatmark.c stable/11/lib/libc/net/sourcefilter.c stable/11/lib/libc/net/vars.c stable/11/lib/libc/posix1e/acl_branding.c stable/11/lib/libc/posix1e/acl_calc_mask.c stable/11/lib/libc/posix1e/acl_compat.c stable/11/lib/libc/posix1e/acl_copy.c stable/11/lib/libc/posix1e/acl_delete.c stable/11/lib/libc/posix1e/acl_delete_entry.c stable/11/lib/libc/posix1e/acl_entry.c stable/11/lib/libc/posix1e/acl_flag.c stable/11/lib/libc/posix1e/acl_free.c stable/11/lib/libc/posix1e/acl_from_text.c stable/11/lib/libc/posix1e/acl_from_text_nfs4.c stable/11/lib/libc/posix1e/acl_get.c stable/11/lib/libc/posix1e/acl_id_to_name.c stable/11/lib/libc/posix1e/acl_init.c stable/11/lib/libc/posix1e/acl_perm.c stable/11/lib/libc/posix1e/acl_set.c stable/11/lib/libc/posix1e/acl_strip.c stable/11/lib/libc/posix1e/acl_support.c stable/11/lib/libc/posix1e/acl_support.h stable/11/lib/libc/posix1e/acl_support_nfs4.c stable/11/lib/libc/posix1e/acl_to_text.c stable/11/lib/libc/posix1e/acl_to_text_nfs4.c stable/11/lib/libc/posix1e/acl_valid.c stable/11/lib/libc/posix1e/extattr.c stable/11/lib/libc/posix1e/mac.c stable/11/lib/libc/posix1e/mac_exec.c stable/11/lib/libc/posix1e/mac_get.c stable/11/lib/libc/posix1e/mac_set.c stable/11/lib/libc/powerpc/SYS.h stable/11/lib/libc/powerpc/_fpmath.h stable/11/lib/libc/powerpc/gen/_set_tp.c stable/11/lib/libc/powerpc/gen/flt_rounds.c stable/11/lib/libc/powerpc/gen/fpgetmask.c stable/11/lib/libc/powerpc/gen/fpgetround.c stable/11/lib/libc/powerpc/gen/fpgetsticky.c stable/11/lib/libc/powerpc/gen/fpsetmask.c stable/11/lib/libc/powerpc/gen/fpsetround.c stable/11/lib/libc/powerpc/gen/makecontext.c stable/11/lib/libc/powerpc/gen/signalcontext.c stable/11/lib/libc/powerpc/gen/syncicache.c stable/11/lib/libc/powerpc64/SYS.h stable/11/lib/libc/powerpc64/_fpmath.h stable/11/lib/libc/powerpc64/gen/_set_tp.c stable/11/lib/libc/powerpc64/gen/flt_rounds.c stable/11/lib/libc/powerpc64/gen/fpgetmask.c stable/11/lib/libc/powerpc64/gen/fpgetround.c stable/11/lib/libc/powerpc64/gen/fpgetsticky.c stable/11/lib/libc/powerpc64/gen/fpsetmask.c stable/11/lib/libc/powerpc64/gen/fpsetround.c stable/11/lib/libc/powerpc64/gen/makecontext.c stable/11/lib/libc/powerpc64/gen/signalcontext.c stable/11/lib/libc/powerpc64/gen/syncicache.c stable/11/lib/libc/quad/TESTS/divrem.c stable/11/lib/libc/quad/TESTS/mul.c stable/11/lib/libc/quad/adddi3.c stable/11/lib/libc/quad/anddi3.c stable/11/lib/libc/quad/ashldi3.c stable/11/lib/libc/quad/ashrdi3.c stable/11/lib/libc/quad/cmpdi2.c stable/11/lib/libc/quad/divdi3.c stable/11/lib/libc/quad/fixdfdi.c stable/11/lib/libc/quad/fixsfdi.c stable/11/lib/libc/quad/fixunsdfdi.c stable/11/lib/libc/quad/fixunssfdi.c stable/11/lib/libc/quad/floatdidf.c stable/11/lib/libc/quad/floatdisf.c stable/11/lib/libc/quad/floatunsdidf.c stable/11/lib/libc/quad/iordi3.c stable/11/lib/libc/quad/lshldi3.c stable/11/lib/libc/quad/lshrdi3.c stable/11/lib/libc/quad/moddi3.c stable/11/lib/libc/quad/muldi3.c stable/11/lib/libc/quad/negdi2.c stable/11/lib/libc/quad/notdi2.c stable/11/lib/libc/quad/qdivrem.c stable/11/lib/libc/quad/quad.h stable/11/lib/libc/quad/subdi3.c stable/11/lib/libc/quad/ucmpdi2.c stable/11/lib/libc/quad/udivdi3.c stable/11/lib/libc/quad/umoddi3.c stable/11/lib/libc/quad/xordi3.c stable/11/lib/libc/regex/cname.h stable/11/lib/libc/regex/engine.c stable/11/lib/libc/regex/regcomp.c stable/11/lib/libc/regex/regerror.c stable/11/lib/libc/regex/regex2.h stable/11/lib/libc/regex/regexec.c stable/11/lib/libc/regex/regfree.c stable/11/lib/libc/regex/utils.h stable/11/lib/libc/resolv/h_errno.c stable/11/lib/libc/resolv/herror.c stable/11/lib/libc/resolv/res_comp.c stable/11/lib/libc/resolv/res_debug.c stable/11/lib/libc/resolv/res_init.c stable/11/lib/libc/resolv/res_mkquery.c stable/11/lib/libc/resolv/res_query.c stable/11/lib/libc/resolv/res_send.c stable/11/lib/libc/resolv/res_state.c stable/11/lib/libc/rpc/auth_des.c stable/11/lib/libc/rpc/auth_none.c stable/11/lib/libc/rpc/auth_unix.c stable/11/lib/libc/rpc/authdes_prot.c stable/11/lib/libc/rpc/authunix_prot.c stable/11/lib/libc/rpc/bindresvport.c stable/11/lib/libc/rpc/clnt_bcast.c stable/11/lib/libc/rpc/clnt_dg.c stable/11/lib/libc/rpc/clnt_generic.c stable/11/lib/libc/rpc/clnt_perror.c stable/11/lib/libc/rpc/clnt_raw.c stable/11/lib/libc/rpc/clnt_simple.c stable/11/lib/libc/rpc/clnt_vc.c stable/11/lib/libc/rpc/crypt_client.c stable/11/lib/libc/rpc/des_crypt.c stable/11/lib/libc/rpc/des_soft.c stable/11/lib/libc/rpc/getnetconfig.c stable/11/lib/libc/rpc/getnetpath.c stable/11/lib/libc/rpc/getpublickey.c stable/11/lib/libc/rpc/getrpcent.c stable/11/lib/libc/rpc/getrpcport.c stable/11/lib/libc/rpc/key_call.c stable/11/lib/libc/rpc/key_prot_xdr.c stable/11/lib/libc/rpc/mt_misc.h stable/11/lib/libc/rpc/netname.c stable/11/lib/libc/rpc/netnamer.c stable/11/lib/libc/rpc/pmap_clnt.c stable/11/lib/libc/rpc/pmap_getmaps.c stable/11/lib/libc/rpc/pmap_getport.c stable/11/lib/libc/rpc/pmap_prot.c stable/11/lib/libc/rpc/pmap_prot2.c stable/11/lib/libc/rpc/pmap_rmt.c stable/11/lib/libc/rpc/rpc_callmsg.c stable/11/lib/libc/rpc/rpc_com.h stable/11/lib/libc/rpc/rpc_commondata.c stable/11/lib/libc/rpc/rpc_dtablesize.c stable/11/lib/libc/rpc/rpc_generic.c stable/11/lib/libc/rpc/rpc_prot.c stable/11/lib/libc/rpc/rpc_soc.c stable/11/lib/libc/rpc/rpcb_clnt.c stable/11/lib/libc/rpc/rpcb_prot.c stable/11/lib/libc/rpc/rpcb_st_xdr.c stable/11/lib/libc/rpc/rpcdname.c stable/11/lib/libc/rpc/rpcsec_gss_stub.c stable/11/lib/libc/rpc/rtime.c stable/11/lib/libc/rpc/svc.c stable/11/lib/libc/rpc/svc_auth.c stable/11/lib/libc/rpc/svc_auth_des.c stable/11/lib/libc/rpc/svc_auth_unix.c stable/11/lib/libc/rpc/svc_dg.c stable/11/lib/libc/rpc/svc_generic.c stable/11/lib/libc/rpc/svc_raw.c stable/11/lib/libc/rpc/svc_run.c stable/11/lib/libc/rpc/svc_simple.c stable/11/lib/libc/rpc/svc_vc.c stable/11/lib/libc/softfloat/fpgetmask.c stable/11/lib/libc/softfloat/fpgetround.c stable/11/lib/libc/softfloat/fpgetsticky.c stable/11/lib/libc/softfloat/fpsetmask.c stable/11/lib/libc/softfloat/fpsetround.c stable/11/lib/libc/softfloat/fpsetsticky.c stable/11/lib/libc/sparc64/SYS.h stable/11/lib/libc/sparc64/_fpmath.h stable/11/lib/libc/sparc64/fpu/fpu.c stable/11/lib/libc/sparc64/fpu/fpu_add.c stable/11/lib/libc/sparc64/fpu/fpu_arith.h stable/11/lib/libc/sparc64/fpu/fpu_compare.c stable/11/lib/libc/sparc64/fpu/fpu_emu.h stable/11/lib/libc/sparc64/fpu/fpu_extern.h stable/11/lib/libc/sparc64/fpu/fpu_qp.c stable/11/lib/libc/sparc64/fpu/fpu_reg.h stable/11/lib/libc/sparc64/gen/_set_tp.c stable/11/lib/libc/sparc64/gen/makecontext.c stable/11/lib/libc/sparc64/gen/signalcontext.c stable/11/lib/libc/sparc64/sys/__sparc_sigtramp_setup.c stable/11/lib/libc/sparc64/sys/__sparc_utrap.c stable/11/lib/libc/sparc64/sys/__sparc_utrap_align.c stable/11/lib/libc/sparc64/sys/__sparc_utrap_emul.c stable/11/lib/libc/sparc64/sys/__sparc_utrap_install.c stable/11/lib/libc/sparc64/sys/__sparc_utrap_private.h stable/11/lib/libc/sparc64/sys/__sparc_utrap_setup.c stable/11/lib/libc/stdio/_flock_stub.c stable/11/lib/libc/stdio/asprintf.c stable/11/lib/libc/stdio/clrerr.c stable/11/lib/libc/stdio/dprintf.c stable/11/lib/libc/stdio/fclose.c stable/11/lib/libc/stdio/fcloseall.c stable/11/lib/libc/stdio/fdopen.c stable/11/lib/libc/stdio/feof.c stable/11/lib/libc/stdio/ferror.c stable/11/lib/libc/stdio/fflush.c stable/11/lib/libc/stdio/fgetc.c stable/11/lib/libc/stdio/fgetln.c stable/11/lib/libc/stdio/fgetpos.c stable/11/lib/libc/stdio/fgets.c stable/11/lib/libc/stdio/fgetwc.c stable/11/lib/libc/stdio/fgetwln.c stable/11/lib/libc/stdio/fgetws.c stable/11/lib/libc/stdio/fileno.c stable/11/lib/libc/stdio/findfp.c stable/11/lib/libc/stdio/flags.c stable/11/lib/libc/stdio/floatio.h stable/11/lib/libc/stdio/fmemopen.c stable/11/lib/libc/stdio/fopen.c stable/11/lib/libc/stdio/fprintf.c stable/11/lib/libc/stdio/fpurge.c stable/11/lib/libc/stdio/fputc.c stable/11/lib/libc/stdio/fputs.c stable/11/lib/libc/stdio/fputwc.c stable/11/lib/libc/stdio/fputws.c stable/11/lib/libc/stdio/fread.c stable/11/lib/libc/stdio/freopen.c stable/11/lib/libc/stdio/fscanf.c stable/11/lib/libc/stdio/fseek.c stable/11/lib/libc/stdio/fsetpos.c stable/11/lib/libc/stdio/ftell.c stable/11/lib/libc/stdio/funopen.c stable/11/lib/libc/stdio/fvwrite.c stable/11/lib/libc/stdio/fvwrite.h stable/11/lib/libc/stdio/fwalk.c stable/11/lib/libc/stdio/fwide.c stable/11/lib/libc/stdio/fwprintf.c stable/11/lib/libc/stdio/fwrite.c stable/11/lib/libc/stdio/fwscanf.c stable/11/lib/libc/stdio/getc.c stable/11/lib/libc/stdio/getchar.c stable/11/lib/libc/stdio/getdelim.c stable/11/lib/libc/stdio/getline.c stable/11/lib/libc/stdio/gets.c stable/11/lib/libc/stdio/getw.c stable/11/lib/libc/stdio/getwc.c stable/11/lib/libc/stdio/getwchar.c stable/11/lib/libc/stdio/glue.h stable/11/lib/libc/stdio/local.h stable/11/lib/libc/stdio/makebuf.c stable/11/lib/libc/stdio/mktemp.c stable/11/lib/libc/stdio/open_memstream.c stable/11/lib/libc/stdio/open_wmemstream.c stable/11/lib/libc/stdio/perror.c stable/11/lib/libc/stdio/printf-pos.c stable/11/lib/libc/stdio/printf.c stable/11/lib/libc/stdio/printfcommon.h stable/11/lib/libc/stdio/printflocal.h stable/11/lib/libc/stdio/putc.c stable/11/lib/libc/stdio/putchar.c stable/11/lib/libc/stdio/puts.c stable/11/lib/libc/stdio/putw.c stable/11/lib/libc/stdio/putwc.c stable/11/lib/libc/stdio/putwchar.c stable/11/lib/libc/stdio/refill.c stable/11/lib/libc/stdio/remove.c stable/11/lib/libc/stdio/rewind.c stable/11/lib/libc/stdio/rget.c stable/11/lib/libc/stdio/scanf.c stable/11/lib/libc/stdio/setbuf.c stable/11/lib/libc/stdio/setbuffer.c stable/11/lib/libc/stdio/setvbuf.c stable/11/lib/libc/stdio/snprintf.c stable/11/lib/libc/stdio/sprintf.c stable/11/lib/libc/stdio/sscanf.c stable/11/lib/libc/stdio/stdio.c stable/11/lib/libc/stdio/swprintf.c stable/11/lib/libc/stdio/swscanf.c stable/11/lib/libc/stdio/tempnam.c stable/11/lib/libc/stdio/tmpfile.c stable/11/lib/libc/stdio/tmpnam.c stable/11/lib/libc/stdio/ungetc.c stable/11/lib/libc/stdio/ungetwc.c stable/11/lib/libc/stdio/vasprintf.c stable/11/lib/libc/stdio/vdprintf.c stable/11/lib/libc/stdio/vfprintf.c stable/11/lib/libc/stdio/vfscanf.c stable/11/lib/libc/stdio/vfwprintf.c stable/11/lib/libc/stdio/vfwscanf.c stable/11/lib/libc/stdio/vprintf.c stable/11/lib/libc/stdio/vscanf.c stable/11/lib/libc/stdio/vsnprintf.c stable/11/lib/libc/stdio/vsprintf.c stable/11/lib/libc/stdio/vsscanf.c stable/11/lib/libc/stdio/vswprintf.c stable/11/lib/libc/stdio/vswscanf.c stable/11/lib/libc/stdio/vwprintf.c stable/11/lib/libc/stdio/vwscanf.c stable/11/lib/libc/stdio/wbuf.c stable/11/lib/libc/stdio/wprintf.c stable/11/lib/libc/stdio/wscanf.c stable/11/lib/libc/stdio/wsetup.c stable/11/lib/libc/stdio/xprintf.c stable/11/lib/libc/stdio/xprintf_errno.c stable/11/lib/libc/stdio/xprintf_float.c stable/11/lib/libc/stdio/xprintf_hexdump.c stable/11/lib/libc/stdio/xprintf_int.c stable/11/lib/libc/stdio/xprintf_quote.c stable/11/lib/libc/stdio/xprintf_str.c stable/11/lib/libc/stdio/xprintf_time.c stable/11/lib/libc/stdio/xprintf_vis.c stable/11/lib/libc/stdlib/abort.c stable/11/lib/libc/stdlib/abs.c stable/11/lib/libc/stdlib/atexit.c stable/11/lib/libc/stdlib/atexit.h stable/11/lib/libc/stdlib/atof.c stable/11/lib/libc/stdlib/atoi.c stable/11/lib/libc/stdlib/atol.c stable/11/lib/libc/stdlib/atoll.c stable/11/lib/libc/stdlib/bsearch.c stable/11/lib/libc/stdlib/div.c stable/11/lib/libc/stdlib/exit.c stable/11/lib/libc/stdlib/getenv.c stable/11/lib/libc/stdlib/getopt.c stable/11/lib/libc/stdlib/getsubopt.c stable/11/lib/libc/stdlib/hcreate.c stable/11/lib/libc/stdlib/heapsort.c stable/11/lib/libc/stdlib/imaxabs.c stable/11/lib/libc/stdlib/imaxdiv.c stable/11/lib/libc/stdlib/labs.c stable/11/lib/libc/stdlib/ldiv.c stable/11/lib/libc/stdlib/llabs.c stable/11/lib/libc/stdlib/lldiv.c stable/11/lib/libc/stdlib/merge.c stable/11/lib/libc/stdlib/ptsname.c stable/11/lib/libc/stdlib/qsort.c stable/11/lib/libc/stdlib/quick_exit.c stable/11/lib/libc/stdlib/radixsort.c stable/11/lib/libc/stdlib/rand.c stable/11/lib/libc/stdlib/random.c stable/11/lib/libc/stdlib/reallocf.c stable/11/lib/libc/stdlib/realpath.c stable/11/lib/libc/stdlib/strfmon.c stable/11/lib/libc/stdlib/strtoimax.c stable/11/lib/libc/stdlib/strtol.c stable/11/lib/libc/stdlib/strtoll.c stable/11/lib/libc/stdlib/strtoq.c stable/11/lib/libc/stdlib/strtoul.c stable/11/lib/libc/stdlib/strtoull.c stable/11/lib/libc/stdlib/strtoumax.c stable/11/lib/libc/stdlib/strtouq.c stable/11/lib/libc/stdlib/system.c stable/11/lib/libc/stdtime/strptime.c stable/11/lib/libc/stdtime/timelocal.c stable/11/lib/libc/stdtime/timelocal.h stable/11/lib/libc/string/bcmp.c stable/11/lib/libc/string/bcopy.c stable/11/lib/libc/string/ffs.c stable/11/lib/libc/string/ffsl.c stable/11/lib/libc/string/ffsll.c stable/11/lib/libc/string/fls.c stable/11/lib/libc/string/flsl.c stable/11/lib/libc/string/flsll.c stable/11/lib/libc/string/memccpy.c stable/11/lib/libc/string/memchr.c stable/11/lib/libc/string/memcmp.c stable/11/lib/libc/string/memmem.c stable/11/lib/libc/string/memset.c stable/11/lib/libc/string/stpcpy.c stable/11/lib/libc/string/stpncpy.c stable/11/lib/libc/string/strcasecmp.c stable/11/lib/libc/string/strcasestr.c stable/11/lib/libc/string/strcat.c stable/11/lib/libc/string/strchr.c stable/11/lib/libc/string/strchrnul.c stable/11/lib/libc/string/strcmp.c stable/11/lib/libc/string/strcoll.c stable/11/lib/libc/string/strcpy.c stable/11/lib/libc/string/strcspn.c stable/11/lib/libc/string/strdup.c stable/11/lib/libc/string/strerror.c stable/11/lib/libc/string/strlen.c stable/11/lib/libc/string/strmode.c stable/11/lib/libc/string/strncat.c stable/11/lib/libc/string/strncmp.c stable/11/lib/libc/string/strncpy.c stable/11/lib/libc/string/strnlen.c stable/11/lib/libc/string/strnstr.c stable/11/lib/libc/string/strpbrk.c stable/11/lib/libc/string/strrchr.c stable/11/lib/libc/string/strsep.c stable/11/lib/libc/string/strsignal.c stable/11/lib/libc/string/strspn.c stable/11/lib/libc/string/strstr.c stable/11/lib/libc/string/strtok.c stable/11/lib/libc/string/strxfrm.c stable/11/lib/libc/string/swab.c stable/11/lib/libc/string/wcpcpy.c stable/11/lib/libc/string/wcpncpy.c stable/11/lib/libc/string/wcscasecmp.c stable/11/lib/libc/string/wcscat.c stable/11/lib/libc/string/wcschr.c stable/11/lib/libc/string/wcscmp.c stable/11/lib/libc/string/wcscoll.c stable/11/lib/libc/string/wcscpy.c stable/11/lib/libc/string/wcscspn.c stable/11/lib/libc/string/wcsdup.c stable/11/lib/libc/string/wcslcat.c stable/11/lib/libc/string/wcslcpy.c stable/11/lib/libc/string/wcslen.c stable/11/lib/libc/string/wcsncasecmp.c stable/11/lib/libc/string/wcsncat.c stable/11/lib/libc/string/wcsncmp.c stable/11/lib/libc/string/wcsncpy.c stable/11/lib/libc/string/wcsnlen.c stable/11/lib/libc/string/wcspbrk.c stable/11/lib/libc/string/wcsrchr.c stable/11/lib/libc/string/wcsspn.c stable/11/lib/libc/string/wcsstr.c stable/11/lib/libc/string/wcstok.c stable/11/lib/libc/string/wcswidth.c stable/11/lib/libc/string/wcsxfrm.c stable/11/lib/libc/string/wmemchr.c stable/11/lib/libc/string/wmemcmp.c stable/11/lib/libc/string/wmemcpy.c stable/11/lib/libc/string/wmemmove.c stable/11/lib/libc/string/wmemset.c stable/11/lib/libc/sys/__error.c stable/11/lib/libc/sys/__vdso_gettimeofday.c stable/11/lib/libc/sys/clock_gettime.c stable/11/lib/libc/sys/fcntl.c stable/11/lib/libc/sys/gettimeofday.c stable/11/lib/libc/sys/sigwait.c stable/11/lib/libc/uuid/uuid_compare.c stable/11/lib/libc/uuid/uuid_create.c stable/11/lib/libc/uuid/uuid_create_nil.c stable/11/lib/libc/uuid/uuid_equal.c stable/11/lib/libc/uuid/uuid_from_string.c stable/11/lib/libc/uuid/uuid_hash.c stable/11/lib/libc/uuid/uuid_is_nil.c stable/11/lib/libc/uuid/uuid_stream.c stable/11/lib/libc/uuid/uuid_to_string.c stable/11/lib/libc/xdr/xdr.c stable/11/lib/libc/xdr/xdr_array.c stable/11/lib/libc/xdr/xdr_float.c stable/11/lib/libc/xdr/xdr_mem.c stable/11/lib/libc/xdr/xdr_rec.c stable/11/lib/libc/xdr/xdr_reference.c stable/11/lib/libc/xdr/xdr_sizeof.c stable/11/lib/libc/xdr/xdr_stdio.c stable/11/lib/libc/yp/xdryp.c stable/11/lib/libc/yp/yplib.c stable/11/lib/libc_nonshared/__stub.c stable/11/lib/libcalendar/calendar.c stable/11/lib/libcalendar/calendar.h stable/11/lib/libcalendar/easter.c stable/11/lib/libcam/camlib.c stable/11/lib/libcam/camlib.h stable/11/lib/libcam/scsi_cmdparse.c stable/11/lib/libcompat/4.1/ftime.c stable/11/lib/libcompat/4.3/re_comp.c stable/11/lib/libcompat/4.3/rexec.c stable/11/lib/libcompat/4.4/cuserid.c stable/11/lib/libcrypt/crypt-md5.c stable/11/lib/libcrypt/crypt-nthash.c stable/11/lib/libcrypt/crypt-sha256.c stable/11/lib/libcrypt/crypt-sha512.c stable/11/lib/libcrypt/crypt.c stable/11/lib/libcrypt/crypt.h stable/11/lib/libcrypt/misc.c stable/11/lib/libdevinfo/devinfo.c stable/11/lib/libdevinfo/devinfo.h stable/11/lib/libdevinfo/devinfo_var.h stable/11/lib/libdevstat/devstat.c stable/11/lib/libdevstat/devstat.h stable/11/lib/libfetch/common.c stable/11/lib/libfetch/common.h stable/11/lib/libfetch/fetch.c stable/11/lib/libfetch/fetch.h stable/11/lib/libfetch/file.c stable/11/lib/libfetch/ftp.c stable/11/lib/libfetch/http.c stable/11/lib/libgeom/geom_ctl.c stable/11/lib/libgeom/geom_getxml.c stable/11/lib/libgeom/geom_stats.c stable/11/lib/libgeom/geom_util.c stable/11/lib/libgeom/geom_xml2tree.c stable/11/lib/libgeom/libgeom.h stable/11/lib/libgssapi/context.h stable/11/lib/libgssapi/cred.h stable/11/lib/libgssapi/gss_accept_sec_context.c stable/11/lib/libgssapi/gss_acquire_cred.c stable/11/lib/libgssapi/gss_add_cred.c stable/11/lib/libgssapi/gss_add_oid_set_member.c stable/11/lib/libgssapi/gss_buffer_set.c stable/11/lib/libgssapi/gss_canonicalize_name.c stable/11/lib/libgssapi/gss_compare_name.c stable/11/lib/libgssapi/gss_context_time.c stable/11/lib/libgssapi/gss_create_empty_oid_set.c stable/11/lib/libgssapi/gss_decapsulate_token.c stable/11/lib/libgssapi/gss_delete_sec_context.c stable/11/lib/libgssapi/gss_display_name.c stable/11/lib/libgssapi/gss_display_status.c stable/11/lib/libgssapi/gss_duplicate_name.c stable/11/lib/libgssapi/gss_duplicate_oid.c stable/11/lib/libgssapi/gss_encapsulate_token.c stable/11/lib/libgssapi/gss_export_name.c stable/11/lib/libgssapi/gss_export_sec_context.c stable/11/lib/libgssapi/gss_get_mic.c stable/11/lib/libgssapi/gss_import_name.c stable/11/lib/libgssapi/gss_import_sec_context.c stable/11/lib/libgssapi/gss_indicate_mechs.c stable/11/lib/libgssapi/gss_init_sec_context.c stable/11/lib/libgssapi/gss_inquire_context.c stable/11/lib/libgssapi/gss_inquire_cred.c stable/11/lib/libgssapi/gss_inquire_cred_by_mech.c stable/11/lib/libgssapi/gss_inquire_cred_by_oid.c stable/11/lib/libgssapi/gss_inquire_mechs_for_name.c stable/11/lib/libgssapi/gss_inquire_names_for_mech.c stable/11/lib/libgssapi/gss_inquire_sec_context_by_oid.c stable/11/lib/libgssapi/gss_krb5.c stable/11/lib/libgssapi/gss_mech_switch.c stable/11/lib/libgssapi/gss_names.c stable/11/lib/libgssapi/gss_oid_to_str.c stable/11/lib/libgssapi/gss_pname_to_uid.c stable/11/lib/libgssapi/gss_process_context_token.c stable/11/lib/libgssapi/gss_pseudo_random.c stable/11/lib/libgssapi/gss_release_buffer.c stable/11/lib/libgssapi/gss_release_cred.c stable/11/lib/libgssapi/gss_release_name.c stable/11/lib/libgssapi/gss_release_oid.c stable/11/lib/libgssapi/gss_release_oid_set.c stable/11/lib/libgssapi/gss_seal.c stable/11/lib/libgssapi/gss_set_cred_option.c stable/11/lib/libgssapi/gss_set_sec_context_option.c stable/11/lib/libgssapi/gss_sign.c stable/11/lib/libgssapi/gss_test_oid_set_member.c stable/11/lib/libgssapi/gss_unseal.c stable/11/lib/libgssapi/gss_unwrap.c stable/11/lib/libgssapi/gss_utils.c stable/11/lib/libgssapi/gss_verify.c stable/11/lib/libgssapi/gss_verify_mic.c stable/11/lib/libgssapi/gss_wrap.c stable/11/lib/libgssapi/gss_wrap_size_limit.c stable/11/lib/libgssapi/mech_switch.h stable/11/lib/libgssapi/name.h stable/11/lib/libgssapi/spnego.h stable/11/lib/libgssapi/utils.h stable/11/lib/libiconv_modules/BIG5/citrus_big5.c stable/11/lib/libiconv_modules/BIG5/citrus_big5.h stable/11/lib/libiconv_modules/DECHanyu/citrus_dechanyu.c stable/11/lib/libiconv_modules/DECHanyu/citrus_dechanyu.h stable/11/lib/libiconv_modules/EUC/citrus_euc.c stable/11/lib/libiconv_modules/EUC/citrus_euc.h stable/11/lib/libiconv_modules/EUCTW/citrus_euctw.c stable/11/lib/libiconv_modules/EUCTW/citrus_euctw.h stable/11/lib/libiconv_modules/GBK2K/citrus_gbk2k.c stable/11/lib/libiconv_modules/GBK2K/citrus_gbk2k.h stable/11/lib/libiconv_modules/HZ/citrus_hz.c stable/11/lib/libiconv_modules/HZ/citrus_hz.h stable/11/lib/libiconv_modules/ISO2022/citrus_iso2022.c stable/11/lib/libiconv_modules/ISO2022/citrus_iso2022.h stable/11/lib/libiconv_modules/JOHAB/citrus_johab.c stable/11/lib/libiconv_modules/JOHAB/citrus_johab.h stable/11/lib/libiconv_modules/MSKanji/citrus_mskanji.c stable/11/lib/libiconv_modules/MSKanji/citrus_mskanji.h stable/11/lib/libiconv_modules/UES/citrus_ues.c stable/11/lib/libiconv_modules/UES/citrus_ues.h stable/11/lib/libiconv_modules/UTF1632/citrus_utf1632.c stable/11/lib/libiconv_modules/UTF1632/citrus_utf1632.h stable/11/lib/libiconv_modules/UTF7/citrus_utf7.c stable/11/lib/libiconv_modules/UTF7/citrus_utf7.h stable/11/lib/libiconv_modules/UTF8/citrus_utf8.c stable/11/lib/libiconv_modules/UTF8/citrus_utf8.h stable/11/lib/libiconv_modules/VIQR/citrus_viqr.c stable/11/lib/libiconv_modules/VIQR/citrus_viqr.h stable/11/lib/libiconv_modules/ZW/citrus_zw.c stable/11/lib/libiconv_modules/ZW/citrus_zw.h stable/11/lib/libiconv_modules/iconv_none/citrus_iconv_none.c stable/11/lib/libiconv_modules/iconv_none/citrus_iconv_none.h stable/11/lib/libiconv_modules/iconv_std/citrus_iconv_std.c stable/11/lib/libiconv_modules/iconv_std/citrus_iconv_std.h stable/11/lib/libiconv_modules/iconv_std/citrus_iconv_std_local.h stable/11/lib/libiconv_modules/mapper_646/citrus_mapper_646.c stable/11/lib/libiconv_modules/mapper_646/citrus_mapper_646.h stable/11/lib/libiconv_modules/mapper_none/citrus_mapper_none.c stable/11/lib/libiconv_modules/mapper_none/citrus_mapper_none.h stable/11/lib/libiconv_modules/mapper_serial/citrus_mapper_serial.c stable/11/lib/libiconv_modules/mapper_serial/citrus_mapper_serial.h stable/11/lib/libiconv_modules/mapper_std/citrus_mapper_std.c stable/11/lib/libiconv_modules/mapper_std/citrus_mapper_std.h stable/11/lib/libiconv_modules/mapper_std/citrus_mapper_std_file.h stable/11/lib/libiconv_modules/mapper_std/citrus_mapper_std_local.h stable/11/lib/libiconv_modules/mapper_zone/citrus_mapper_zone.c stable/11/lib/libiconv_modules/mapper_zone/citrus_mapper_zone.h stable/11/lib/libipsec/ipsec_dump_policy.c stable/11/lib/libipsec/ipsec_get_policylen.c stable/11/lib/libipsec/ipsec_strerror.c stable/11/lib/libipsec/ipsec_strerror.h stable/11/lib/libipsec/libpfkey.h stable/11/lib/libipsec/pfkey.c stable/11/lib/libipsec/pfkey_dump.c stable/11/lib/libipsec/policy_parse.y stable/11/lib/libipsec/policy_token.l stable/11/lib/libipsec/test-policy.c stable/11/lib/libjail/jail.c stable/11/lib/libjail/jail.h stable/11/lib/libjail/jail_getid.c stable/11/lib/libkiconv/kiconv_sysctl.c stable/11/lib/libkiconv/quirks.c stable/11/lib/libkiconv/quirks.h stable/11/lib/libkiconv/xlat16_iconv.c stable/11/lib/libkiconv/xlat16_sysctl.c stable/11/lib/libkvm/kvm.c stable/11/lib/libkvm/kvm.h stable/11/lib/libkvm/kvm_amd64.c stable/11/lib/libkvm/kvm_arm.c stable/11/lib/libkvm/kvm_cptime.c stable/11/lib/libkvm/kvm_getloadavg.c stable/11/lib/libkvm/kvm_getswapinfo.c stable/11/lib/libkvm/kvm_i386.c stable/11/lib/libkvm/kvm_minidump_amd64.c stable/11/lib/libkvm/kvm_minidump_arm.c stable/11/lib/libkvm/kvm_minidump_i386.c stable/11/lib/libkvm/kvm_minidump_mips.c stable/11/lib/libkvm/kvm_pcpu.c stable/11/lib/libkvm/kvm_powerpc.c stable/11/lib/libkvm/kvm_powerpc64.c stable/11/lib/libkvm/kvm_private.h stable/11/lib/libkvm/kvm_proc.c stable/11/lib/libkvm/kvm_sparc64.c stable/11/lib/libkvm/kvm_vnet.c stable/11/lib/libmemstat/memstat.c stable/11/lib/libmemstat/memstat.h stable/11/lib/libmemstat/memstat_all.c stable/11/lib/libmemstat/memstat_internal.h stable/11/lib/libmemstat/memstat_malloc.c stable/11/lib/libmemstat/memstat_uma.c stable/11/lib/libmp/mpasbn.c stable/11/lib/libnandfs/libnandfs.h stable/11/lib/libnandfs/nandfs.c stable/11/lib/libnetbsd/rmd160.h stable/11/lib/libnetbsd/sha1.h stable/11/lib/libnetbsd/sha2.h stable/11/lib/libnetbsd/stdlib.h stable/11/lib/libnetbsd/strsuftoll.c stable/11/lib/libnetbsd/sys/cdefs.h stable/11/lib/libnetbsd/util.c stable/11/lib/libnetbsd/util.h stable/11/lib/libnv/common_impl.h stable/11/lib/libnv/msgio.c stable/11/lib/libnv/msgio.h stable/11/lib/libpam/libpam/security/pam_mod_misc.h stable/11/lib/libpam/modules/pam_chroot/pam_chroot.c stable/11/lib/libpam/modules/pam_deny/pam_deny.c stable/11/lib/libpam/modules/pam_echo/pam_echo.c stable/11/lib/libpam/modules/pam_exec/pam_exec.c stable/11/lib/libpam/modules/pam_ftpusers/pam_ftpusers.c stable/11/lib/libpam/modules/pam_group/pam_group.c stable/11/lib/libpam/modules/pam_guest/pam_guest.c stable/11/lib/libpam/modules/pam_ksu/pam_ksu.c stable/11/lib/libpam/modules/pam_lastlog/pam_lastlog.c stable/11/lib/libpam/modules/pam_login_access/pam_login_access.c stable/11/lib/libpam/modules/pam_login_access/pam_login_access.h stable/11/lib/libpam/modules/pam_nologin/pam_nologin.c stable/11/lib/libpam/modules/pam_opie/pam_opie.c stable/11/lib/libpam/modules/pam_opieaccess/pam_opieaccess.c stable/11/lib/libpam/modules/pam_permit/pam_permit.c stable/11/lib/libpam/modules/pam_radius/pam_radius.c stable/11/lib/libpam/modules/pam_rhosts/pam_rhosts.c stable/11/lib/libpam/modules/pam_rootok/pam_rootok.c stable/11/lib/libpam/modules/pam_securetty/pam_securetty.c stable/11/lib/libpam/modules/pam_self/pam_self.c stable/11/lib/libpam/modules/pam_ssh/pam_ssh.c stable/11/lib/libpam/modules/pam_tacplus/pam_tacplus.c stable/11/lib/libpam/modules/pam_unix/pam_unix.c stable/11/lib/libpjdlog/pjdlog.c stable/11/lib/libpjdlog/pjdlog.h stable/11/lib/libpmc/libpmc.c stable/11/lib/libpmc/libpmcinternal.h stable/11/lib/libpmc/pmc.h stable/11/lib/libpmc/pmclog.c stable/11/lib/libpmc/pmclog.h stable/11/lib/libprocstat/cd9660.c stable/11/lib/libprocstat/common_kvm.c stable/11/lib/libprocstat/common_kvm.h stable/11/lib/libprocstat/core.c stable/11/lib/libprocstat/core.h stable/11/lib/libprocstat/libprocstat.c stable/11/lib/libprocstat/libprocstat.h stable/11/lib/libprocstat/libprocstat_internal.h stable/11/lib/libprocstat/msdosfs.c stable/11/lib/libprocstat/smbfs.c stable/11/lib/libprocstat/udf.c stable/11/lib/libprocstat/zfs.c stable/11/lib/libradius/radlib.c stable/11/lib/libradius/radlib.h stable/11/lib/libradius/radlib_private.h stable/11/lib/libradius/radlib_vs.h stable/11/lib/librpcsec_gss/rpcsec_gss.c stable/11/lib/librpcsec_gss/rpcsec_gss_conf.c stable/11/lib/librpcsec_gss/rpcsec_gss_int.h stable/11/lib/librpcsec_gss/rpcsec_gss_misc.c stable/11/lib/librpcsec_gss/rpcsec_gss_prot.c stable/11/lib/librpcsec_gss/svc_rpcsec_gss.c stable/11/lib/librpcsvc/yp_passwd.c stable/11/lib/librpcsvc/yp_update.c stable/11/lib/librt/aio.c stable/11/lib/librt/mq.c stable/11/lib/librt/sigev_thread.c stable/11/lib/librt/sigev_thread.h stable/11/lib/librt/timer.c stable/11/lib/librtld_db/rtld_db.c stable/11/lib/librtld_db/rtld_db.h stable/11/lib/libsdp/sdp-int.h stable/11/lib/libsdp/sdp.h stable/11/lib/libsdp/search.c stable/11/lib/libsdp/service.c stable/11/lib/libsdp/session.c stable/11/lib/libsdp/util.c stable/11/lib/libstdbuf/stdbuf.c stable/11/lib/libstdthreads/call_once.c stable/11/lib/libstdthreads/cnd.c stable/11/lib/libstdthreads/mtx.c stable/11/lib/libstdthreads/thrd.c stable/11/lib/libstdthreads/threads.h stable/11/lib/libstdthreads/tss.c stable/11/lib/libtacplus/taclib.c stable/11/lib/libtacplus/taclib.h stable/11/lib/libtacplus/taclib_private.h stable/11/lib/libthr/arch/amd64/include/pthread_md.h stable/11/lib/libthr/arch/arm/include/pthread_md.h stable/11/lib/libthr/arch/i386/include/pthread_md.h stable/11/lib/libthr/arch/mips/include/pthread_md.h stable/11/lib/libthr/arch/powerpc/include/pthread_md.h stable/11/lib/libthr/arch/sparc64/include/pthread_md.h stable/11/lib/libthr/sys/thr_error.c stable/11/lib/libthr/thread/thr_affinity.c stable/11/lib/libthr/thread/thr_attr.c stable/11/lib/libthr/thread/thr_autoinit.c stable/11/lib/libthr/thread/thr_barrier.c stable/11/lib/libthr/thread/thr_barrierattr.c stable/11/lib/libthr/thread/thr_cancel.c stable/11/lib/libthr/thread/thr_clean.c stable/11/lib/libthr/thread/thr_concurrency.c stable/11/lib/libthr/thread/thr_cond.c stable/11/lib/libthr/thread/thr_condattr.c stable/11/lib/libthr/thread/thr_create.c stable/11/lib/libthr/thread/thr_detach.c stable/11/lib/libthr/thread/thr_equal.c stable/11/lib/libthr/thread/thr_event.c stable/11/lib/libthr/thread/thr_exit.c stable/11/lib/libthr/thread/thr_fork.c stable/11/lib/libthr/thread/thr_getcpuclockid.c stable/11/lib/libthr/thread/thr_getprio.c stable/11/lib/libthr/thread/thr_getschedparam.c stable/11/lib/libthr/thread/thr_getthreadid_np.c stable/11/lib/libthr/thread/thr_info.c stable/11/lib/libthr/thread/thr_init.c stable/11/lib/libthr/thread/thr_join.c stable/11/lib/libthr/thread/thr_kern.c stable/11/lib/libthr/thread/thr_kill.c stable/11/lib/libthr/thread/thr_list.c stable/11/lib/libthr/thread/thr_main_np.c stable/11/lib/libthr/thread/thr_multi_np.c stable/11/lib/libthr/thread/thr_mutex.c stable/11/lib/libthr/thread/thr_mutexattr.c stable/11/lib/libthr/thread/thr_once.c stable/11/lib/libthr/thread/thr_printf.c stable/11/lib/libthr/thread/thr_private.h stable/11/lib/libthr/thread/thr_pspinlock.c stable/11/lib/libthr/thread/thr_resume_np.c stable/11/lib/libthr/thread/thr_rtld.c stable/11/lib/libthr/thread/thr_rwlock.c stable/11/lib/libthr/thread/thr_rwlockattr.c stable/11/lib/libthr/thread/thr_self.c stable/11/lib/libthr/thread/thr_sem.c stable/11/lib/libthr/thread/thr_setprio.c stable/11/lib/libthr/thread/thr_setschedparam.c stable/11/lib/libthr/thread/thr_sig.c stable/11/lib/libthr/thread/thr_single_np.c stable/11/lib/libthr/thread/thr_sleepq.c stable/11/lib/libthr/thread/thr_spec.c stable/11/lib/libthr/thread/thr_spinlock.c stable/11/lib/libthr/thread/thr_stack.c stable/11/lib/libthr/thread/thr_suspend_np.c stable/11/lib/libthr/thread/thr_switch_np.c stable/11/lib/libthr/thread/thr_symbols.c stable/11/lib/libthr/thread/thr_syscalls.c stable/11/lib/libthr/thread/thr_umtx.c stable/11/lib/libthr/thread/thr_umtx.h stable/11/lib/libthr/thread/thr_yield.c stable/11/lib/libthread_db/arch/amd64/libpthread_md.c stable/11/lib/libthread_db/arch/arm/libpthread_md.c stable/11/lib/libthread_db/arch/i386/libpthread_md.c stable/11/lib/libthread_db/arch/mips/libpthread_md.c stable/11/lib/libthread_db/arch/powerpc/libpthread_md.c stable/11/lib/libthread_db/arch/sparc64/libpthread_md.c stable/11/lib/libthread_db/kse.h stable/11/lib/libthread_db/libpthread_db.c stable/11/lib/libthread_db/libpthread_db.h stable/11/lib/libthread_db/libthr_db.c stable/11/lib/libthread_db/thread_db.c stable/11/lib/libthread_db/thread_db.h stable/11/lib/libthread_db/thread_db_int.h stable/11/lib/libufs/block.c stable/11/lib/libufs/cgroup.c stable/11/lib/libufs/inode.c stable/11/lib/libufs/libufs.h stable/11/lib/libufs/sblock.c stable/11/lib/libufs/type.c stable/11/lib/libugidfw/ugidfw.c stable/11/lib/libugidfw/ugidfw.h stable/11/lib/libulog/ulog.h stable/11/lib/libulog/ulog_login.c stable/11/lib/libulog/ulog_login_pseudo.c stable/11/lib/libulog/utempter.c stable/11/lib/libulog/utempter.h stable/11/lib/libusb/libusb.h stable/11/lib/libusb/libusb01.c stable/11/lib/libusb/libusb10.c stable/11/lib/libusb/libusb10.h stable/11/lib/libusb/libusb10_desc.c stable/11/lib/libusb/libusb10_io.c stable/11/lib/libusb/libusb20.c stable/11/lib/libusb/libusb20.h stable/11/lib/libusb/libusb20_desc.c stable/11/lib/libusb/libusb20_desc.h stable/11/lib/libusb/libusb20_int.h stable/11/lib/libusb/libusb20_ugen20.c stable/11/lib/libusb/libusb_global_linux.h stable/11/lib/libusb/usb.h stable/11/lib/libusbhid/data.c stable/11/lib/libusbhid/descr.c stable/11/lib/libusbhid/descr_compat.c stable/11/lib/libusbhid/parse.c stable/11/lib/libusbhid/usage.c stable/11/lib/libusbhid/usbhid.h stable/11/lib/libusbhid/usbvar.h stable/11/lib/libutil/auth.c stable/11/lib/libutil/expand_number.c stable/11/lib/libutil/fparseln.c stable/11/lib/libutil/gr_util.c stable/11/lib/libutil/hexdump.c stable/11/lib/libutil/humanize_number.c stable/11/lib/libutil/kinfo_getallproc.c stable/11/lib/libutil/kinfo_getproc.c stable/11/lib/libutil/kld.c stable/11/lib/libutil/libutil.h stable/11/lib/libutil/login_crypt.c stable/11/lib/libutil/login_tty.c stable/11/lib/libutil/pidfile.c stable/11/lib/libutil/property.c stable/11/lib/libutil/pty.c stable/11/lib/libutil/pw_util.c stable/11/lib/libutil/quotafile.c stable/11/lib/libutil/realhostname.c stable/11/lib/libutil/stub.c stable/11/lib/libutil/trimdomain.c stable/11/lib/libutil/uucplock.c stable/11/lib/libvgl/bitmap.c stable/11/lib/libvgl/keyboard.c stable/11/lib/libvgl/main.c stable/11/lib/libvgl/mouse.c stable/11/lib/libvgl/simple.c stable/11/lib/libvgl/text.c stable/11/lib/libvgl/vgl.h stable/11/lib/libvmmapi/vmmapi.c stable/11/lib/libvmmapi/vmmapi.h stable/11/lib/libvmmapi/vmmapi_freebsd.c stable/11/lib/liby/main.c stable/11/lib/liby/yyerror.c stable/11/lib/libypclnt/ypclnt.h stable/11/lib/libypclnt/ypclnt_connect.c stable/11/lib/libypclnt/ypclnt_error.c stable/11/lib/libypclnt/ypclnt_free.c stable/11/lib/libypclnt/ypclnt_get.c stable/11/lib/libypclnt/ypclnt_new.c stable/11/lib/libypclnt/ypclnt_passwd.c stable/11/lib/msun/amd64/fenv.c stable/11/lib/msun/arm/fenv.c stable/11/lib/msun/arm/fenv.h stable/11/lib/msun/bsdsrc/b_exp.c stable/11/lib/msun/bsdsrc/b_log.c stable/11/lib/msun/bsdsrc/b_tgamma.c stable/11/lib/msun/bsdsrc/mathimpl.h stable/11/lib/msun/i387/fenv.c stable/11/lib/msun/i387/invtrig.c stable/11/lib/msun/ld128/invtrig.c stable/11/lib/msun/ld128/invtrig.h stable/11/lib/msun/ld128/k_expl.h stable/11/lib/msun/ld128/s_exp2l.c stable/11/lib/msun/ld128/s_expl.c stable/11/lib/msun/ld128/s_logl.c stable/11/lib/msun/ld128/s_nanl.c stable/11/lib/msun/ld80/invtrig.c stable/11/lib/msun/ld80/invtrig.h stable/11/lib/msun/ld80/k_expl.h stable/11/lib/msun/ld80/s_exp2l.c stable/11/lib/msun/ld80/s_expl.c stable/11/lib/msun/ld80/s_logl.c stable/11/lib/msun/ld80/s_nanl.c stable/11/lib/msun/mips/fenv.c stable/11/lib/msun/mips/fenv.h stable/11/lib/msun/powerpc/fenv.c stable/11/lib/msun/powerpc/fenv.h stable/11/lib/msun/sparc64/fenv.c stable/11/lib/msun/sparc64/fenv.h stable/11/lib/msun/src/catrig.c stable/11/lib/msun/src/catrigf.c stable/11/lib/msun/src/e_remainderl.c stable/11/lib/msun/src/e_sqrtl.c stable/11/lib/msun/src/fenv-softfloat.h stable/11/lib/msun/src/imprecise.c stable/11/lib/msun/src/k_exp.c stable/11/lib/msun/src/k_expf.c stable/11/lib/msun/src/s_carg.c stable/11/lib/msun/src/s_cargf.c stable/11/lib/msun/src/s_cargl.c stable/11/lib/msun/src/s_ccosh.c stable/11/lib/msun/src/s_ccoshf.c stable/11/lib/msun/src/s_cexp.c stable/11/lib/msun/src/s_cexpf.c stable/11/lib/msun/src/s_cimag.c stable/11/lib/msun/src/s_cimagf.c stable/11/lib/msun/src/s_cimagl.c stable/11/lib/msun/src/s_conj.c stable/11/lib/msun/src/s_conjf.c stable/11/lib/msun/src/s_conjl.c stable/11/lib/msun/src/s_copysignl.c stable/11/lib/msun/src/s_cosl.c stable/11/lib/msun/src/s_cproj.c stable/11/lib/msun/src/s_cprojf.c stable/11/lib/msun/src/s_cprojl.c stable/11/lib/msun/src/s_creal.c stable/11/lib/msun/src/s_crealf.c stable/11/lib/msun/src/s_creall.c stable/11/lib/msun/src/s_csinh.c stable/11/lib/msun/src/s_csinhf.c stable/11/lib/msun/src/s_csqrt.c stable/11/lib/msun/src/s_csqrtf.c stable/11/lib/msun/src/s_csqrtl.c stable/11/lib/msun/src/s_ctanh.c stable/11/lib/msun/src/s_ctanhf.c stable/11/lib/msun/src/s_exp2.c stable/11/lib/msun/src/s_exp2f.c stable/11/lib/msun/src/s_fabsl.c stable/11/lib/msun/src/s_fdim.c stable/11/lib/msun/src/s_fma.c stable/11/lib/msun/src/s_fmaf.c stable/11/lib/msun/src/s_fmal.c stable/11/lib/msun/src/s_fmax.c stable/11/lib/msun/src/s_fmaxf.c stable/11/lib/msun/src/s_fmaxl.c stable/11/lib/msun/src/s_fmin.c stable/11/lib/msun/src/s_fminf.c stable/11/lib/msun/src/s_fminl.c stable/11/lib/msun/src/s_frexpl.c stable/11/lib/msun/src/s_isfinite.c stable/11/lib/msun/src/s_isnan.c stable/11/lib/msun/src/s_isnormal.c stable/11/lib/msun/src/s_lrint.c stable/11/lib/msun/src/s_lround.c stable/11/lib/msun/src/s_modfl.c stable/11/lib/msun/src/s_nan.c stable/11/lib/msun/src/s_nearbyint.c stable/11/lib/msun/src/s_rintl.c stable/11/lib/msun/src/s_round.c stable/11/lib/msun/src/s_roundf.c stable/11/lib/msun/src/s_roundl.c stable/11/lib/msun/src/s_scalbln.c stable/11/lib/msun/src/s_signbit.c stable/11/lib/msun/src/s_sinl.c stable/11/lib/msun/src/s_tanl.c stable/11/lib/msun/src/s_tgammaf.c stable/11/lib/msun/x86/fenv.h stable/11/lib/ncurses/ncurses/pathnames.h stable/11/lib/ncurses/ncurses/termcap.c stable/11/libexec/bootpd/rtmsg.c stable/11/libexec/comsat/comsat.c stable/11/libexec/fingerd/fingerd.c stable/11/libexec/fingerd/pathnames.h stable/11/libexec/ftpd/extern.h stable/11/libexec/ftpd/ftpcmd.y stable/11/libexec/ftpd/ftpd.c stable/11/libexec/ftpd/logwtmp.c stable/11/libexec/ftpd/pathnames.h stable/11/libexec/ftpd/popen.c stable/11/libexec/getty/extern.h stable/11/libexec/getty/gettytab.h stable/11/libexec/getty/init.c stable/11/libexec/getty/main.c stable/11/libexec/getty/pathnames.h stable/11/libexec/getty/subr.c stable/11/libexec/mknetid/hash.c stable/11/libexec/mknetid/hash.h stable/11/libexec/mknetid/mknetid.c stable/11/libexec/mknetid/parse_group.c stable/11/libexec/rbootd/bpf.c stable/11/libexec/rbootd/conf.c stable/11/libexec/rbootd/defs.h stable/11/libexec/rbootd/parseconf.c stable/11/libexec/rbootd/pathnames.h stable/11/libexec/rbootd/rbootd.c stable/11/libexec/rbootd/rmp.h stable/11/libexec/rbootd/rmp_var.h stable/11/libexec/rbootd/rmpproto.c stable/11/libexec/rbootd/utils.c stable/11/libexec/revnetgroup/hash.c stable/11/libexec/revnetgroup/hash.h stable/11/libexec/revnetgroup/parse_netgroup.c stable/11/libexec/revnetgroup/revnetgroup.c stable/11/libexec/rpc.rstatd/rstatd.c stable/11/libexec/rpc.rusersd/extern.h stable/11/libexec/rpc.rusersd/rusers_proc.c stable/11/libexec/rpc.rusersd/rusersd.c stable/11/libexec/rtld-elf/malloc.c stable/11/libexec/rtld-elf/rtld_printf.c stable/11/libexec/talkd/announce.c stable/11/libexec/talkd/print.c stable/11/libexec/talkd/process.c stable/11/libexec/talkd/table.c stable/11/libexec/talkd/talkd.c stable/11/libexec/tftpd/tftpd.c stable/11/libexec/ypxfr/yp_dbwrite.c stable/11/libexec/ypxfr/ypxfr_extern.h stable/11/libexec/ypxfr/ypxfr_getmap.c stable/11/libexec/ypxfr/ypxfr_main.c stable/11/libexec/ypxfr/ypxfr_misc.c stable/11/libexec/ypxfr/ypxfrd_getmap.c stable/11/release/picobsd/tinyware/login/pathnames.h stable/11/release/picobsd/tinyware/login/pico-login.c stable/11/release/picobsd/tinyware/passwd/extern.h stable/11/release/picobsd/tinyware/passwd/local_passwd.c stable/11/release/picobsd/tinyware/passwd/passwd.c stable/11/release/picobsd/tinyware/passwd/pw_copy.c stable/11/release/picobsd/tinyware/passwd/pw_util.c stable/11/release/picobsd/tinyware/passwd/pw_util.h stable/11/sbin/bsdlabel/bsdlabel.c stable/11/sbin/bsdlabel/pathnames.h stable/11/sbin/clri/clri.c stable/11/sbin/devd/devd.cc stable/11/sbin/dhclient/alloc.c stable/11/sbin/dhclient/bpf.c stable/11/sbin/dhclient/clparse.c stable/11/sbin/dhclient/conflex.c stable/11/sbin/dhclient/convert.c stable/11/sbin/dhclient/dhclient.c stable/11/sbin/dhclient/dhcp.h stable/11/sbin/dhclient/dhcpd.h stable/11/sbin/dhclient/dhctoken.h stable/11/sbin/dhclient/dispatch.c stable/11/sbin/dhclient/errwarn.c stable/11/sbin/dhclient/hash.c stable/11/sbin/dhclient/inet.c stable/11/sbin/dhclient/options.c stable/11/sbin/dhclient/packet.c stable/11/sbin/dhclient/parse.c stable/11/sbin/dhclient/tables.c stable/11/sbin/dhclient/tree.c stable/11/sbin/dhclient/tree.h stable/11/sbin/dmesg/dmesg.c stable/11/sbin/dump/dump.h stable/11/sbin/dump/dumprmt.c stable/11/sbin/dump/itime.c stable/11/sbin/dump/main.c stable/11/sbin/dump/optr.c stable/11/sbin/dump/pathnames.h stable/11/sbin/dump/tape.c stable/11/sbin/dump/traverse.c stable/11/sbin/dump/unctime.c stable/11/sbin/dumpfs/dumpfs.c stable/11/sbin/dumpon/dumpon.c stable/11/sbin/etherswitchcfg/ifmedia.c stable/11/sbin/ffsinfo/ffsinfo.c stable/11/sbin/fsck/fsck.c stable/11/sbin/fsck/fsutil.c stable/11/sbin/fsck/preen.c stable/11/sbin/fsck_ffs/dir.c stable/11/sbin/fsck_ffs/fsck.h stable/11/sbin/fsck_ffs/fsutil.c stable/11/sbin/fsck_ffs/gjournal.c stable/11/sbin/fsck_ffs/globs.c stable/11/sbin/fsck_ffs/inode.c stable/11/sbin/fsck_ffs/main.c stable/11/sbin/fsck_ffs/pass1.c stable/11/sbin/fsck_ffs/pass1b.c stable/11/sbin/fsck_ffs/pass2.c stable/11/sbin/fsck_ffs/pass3.c stable/11/sbin/fsck_ffs/pass4.c stable/11/sbin/fsck_ffs/pass5.c stable/11/sbin/fsck_ffs/setup.c stable/11/sbin/fsck_ffs/utilities.c stable/11/sbin/growfs/debug.c stable/11/sbin/growfs/debug.h stable/11/sbin/growfs/growfs.c stable/11/sbin/gvinum/gvinum.h stable/11/sbin/ifconfig/af_inet.c stable/11/sbin/ifconfig/af_inet6.c stable/11/sbin/ifconfig/af_link.c stable/11/sbin/ifconfig/ifclone.c stable/11/sbin/ifconfig/ifconfig.c stable/11/sbin/ifconfig/ifmedia.c stable/11/sbin/ifconfig/ifvlan.c stable/11/sbin/init/init.c stable/11/sbin/init/pathnames.h stable/11/sbin/mknod/mknod.c stable/11/sbin/mount/getmntopts.c stable/11/sbin/mount/mntopts.h stable/11/sbin/mount/mount.c stable/11/sbin/mount/mount_fs.c stable/11/sbin/mount/pathnames.h stable/11/sbin/mount/vfslist.c stable/11/sbin/mount_cd9660/mount_cd9660.c stable/11/sbin/mount_nfs/mount_nfs.c stable/11/sbin/mount_nullfs/mount_nullfs.c stable/11/sbin/mount_udf/mount_udf.c stable/11/sbin/mount_unionfs/mount_unionfs.c stable/11/sbin/newfs/mkfs.c stable/11/sbin/newfs/newfs.c stable/11/sbin/newfs/newfs.h stable/11/sbin/nfsiod/nfsiod.c stable/11/sbin/ping/ping.c stable/11/sbin/ping6/ping6.c stable/11/sbin/quotacheck/preen.c stable/11/sbin/quotacheck/quotacheck.c stable/11/sbin/quotacheck/quotacheck.h stable/11/sbin/rcorder/ealloc.c stable/11/sbin/rcorder/hash.c stable/11/sbin/rcorder/hash.h stable/11/sbin/rcorder/sprite.h stable/11/sbin/reboot/reboot.c stable/11/sbin/restore/dirs.c stable/11/sbin/restore/extern.h stable/11/sbin/restore/interactive.c stable/11/sbin/restore/main.c stable/11/sbin/restore/restore.c stable/11/sbin/restore/restore.h stable/11/sbin/restore/symtab.c stable/11/sbin/restore/tape.c stable/11/sbin/restore/utilities.c stable/11/sbin/route/route.c stable/11/sbin/routed/defs.h stable/11/sbin/routed/if.c stable/11/sbin/routed/input.c stable/11/sbin/routed/main.c stable/11/sbin/routed/output.c stable/11/sbin/routed/parms.c stable/11/sbin/routed/pathnames.h stable/11/sbin/routed/radix.c stable/11/sbin/routed/radix.h stable/11/sbin/routed/rdisc.c stable/11/sbin/routed/rtquery/rtquery.c stable/11/sbin/routed/table.c stable/11/sbin/routed/trace.c stable/11/sbin/savecore/savecore.c stable/11/sbin/setkey/parse.y stable/11/sbin/setkey/setkey.c stable/11/sbin/setkey/test-pfkey.c stable/11/sbin/setkey/test-policy.c stable/11/sbin/setkey/token.l stable/11/sbin/setkey/vchar.h stable/11/sbin/shutdown/shutdown.c stable/11/sbin/sunlabel/sunlabel.c stable/11/sbin/swapon/swapon.c stable/11/sbin/sysctl/sysctl.c stable/11/sbin/tunefs/tunefs.c stable/11/sbin/umount/umount.c stable/11/share/examples/tests/tests/atf/cp_test.sh stable/11/share/examples/tests/tests/atf/printf_test.c stable/11/share/examples/tests/tests/plain/printf_test.c stable/11/sys/amd64/acpica/acpi_machdep.c stable/11/sys/amd64/amd64/atomic.c stable/11/sys/amd64/amd64/bios.c stable/11/sys/amd64/amd64/bpf_jit_machdep.c stable/11/sys/amd64/amd64/bpf_jit_machdep.h stable/11/sys/amd64/amd64/elf_machdep.c stable/11/sys/amd64/amd64/fpu.c stable/11/sys/amd64/amd64/gdb_machdep.c stable/11/sys/amd64/amd64/genassym.c stable/11/sys/amd64/amd64/in_cksum.c stable/11/sys/amd64/amd64/initcpu.c stable/11/sys/amd64/amd64/io.c stable/11/sys/amd64/amd64/machdep.c stable/11/sys/amd64/amd64/mem.c stable/11/sys/amd64/amd64/minidump_machdep.c stable/11/sys/amd64/amd64/mp_machdep.c stable/11/sys/amd64/amd64/pmap.c stable/11/sys/amd64/amd64/prof_machdep.c stable/11/sys/amd64/amd64/ptrace_machdep.c stable/11/sys/amd64/amd64/sys_machdep.c stable/11/sys/amd64/amd64/trap.c stable/11/sys/amd64/amd64/uio_machdep.c stable/11/sys/amd64/amd64/uma_machdep.c stable/11/sys/amd64/amd64/vm_machdep.c stable/11/sys/amd64/ia32/ia32_misc.c stable/11/sys/amd64/ia32/ia32_reg.c stable/11/sys/amd64/ia32/ia32_signal.c stable/11/sys/amd64/ia32/ia32_syscall.c stable/11/sys/amd64/include/_bus.h stable/11/sys/amd64/include/asm.h stable/11/sys/amd64/include/asmacros.h stable/11/sys/amd64/include/atomic.h stable/11/sys/amd64/include/bus_dma.h stable/11/sys/amd64/include/counter.h stable/11/sys/amd64/include/cpu.h stable/11/sys/amd64/include/cpufunc.h stable/11/sys/amd64/include/exec.h stable/11/sys/amd64/include/floatingpoint.h stable/11/sys/amd64/include/fpu.h stable/11/sys/amd64/include/gdb_machdep.h stable/11/sys/amd64/include/ieeefp.h stable/11/sys/amd64/include/in_cksum.h stable/11/sys/amd64/include/intr_machdep.h stable/11/sys/amd64/include/iodev.h stable/11/sys/amd64/include/kdb.h stable/11/sys/amd64/include/limits.h stable/11/sys/amd64/include/md_var.h stable/11/sys/amd64/include/memdev.h stable/11/sys/amd64/include/minidump.h stable/11/sys/amd64/include/mp_watchdog.h stable/11/sys/amd64/include/param.h stable/11/sys/amd64/include/pc/bios.h stable/11/sys/amd64/include/pcb.h stable/11/sys/amd64/include/pcpu.h stable/11/sys/amd64/include/pmap.h stable/11/sys/amd64/include/pmc_mdep.h stable/11/sys/amd64/include/ppireg.h stable/11/sys/amd64/include/proc.h stable/11/sys/amd64/include/profile.h stable/11/sys/amd64/include/reloc.h stable/11/sys/amd64/include/runq.h stable/11/sys/amd64/include/segments.h stable/11/sys/amd64/include/sf_buf.h stable/11/sys/amd64/include/timerreg.h stable/11/sys/amd64/include/tss.h stable/11/sys/amd64/include/varargs.h stable/11/sys/amd64/include/vm.h stable/11/sys/amd64/include/vmm.h stable/11/sys/amd64/include/vmm_dev.h stable/11/sys/amd64/include/vmm_instruction_emul.h stable/11/sys/amd64/include/vmparam.h stable/11/sys/amd64/linux32/linux.h stable/11/sys/amd64/linux32/linux32_dummy.c stable/11/sys/amd64/linux32/linux32_machdep.c stable/11/sys/amd64/linux32/linux32_sysvec.c stable/11/sys/amd64/pci/pci_cfgreg.c stable/11/sys/amd64/vmm/amd/amdv.c stable/11/sys/amd64/vmm/intel/ept.c stable/11/sys/amd64/vmm/intel/ept.h stable/11/sys/amd64/vmm/intel/vmcs.c stable/11/sys/amd64/vmm/intel/vmcs.h stable/11/sys/amd64/vmm/intel/vmx.c stable/11/sys/amd64/vmm/intel/vmx.h stable/11/sys/amd64/vmm/intel/vmx_controls.h stable/11/sys/amd64/vmm/intel/vmx_cpufunc.h stable/11/sys/amd64/vmm/intel/vmx_genassym.c stable/11/sys/amd64/vmm/intel/vmx_msr.c stable/11/sys/amd64/vmm/intel/vmx_msr.h stable/11/sys/amd64/vmm/intel/vtd.c stable/11/sys/amd64/vmm/io/iommu.c stable/11/sys/amd64/vmm/io/iommu.h stable/11/sys/amd64/vmm/io/ppt.c stable/11/sys/amd64/vmm/io/ppt.h stable/11/sys/amd64/vmm/io/vhpet.c stable/11/sys/amd64/vmm/io/vhpet.h stable/11/sys/amd64/vmm/io/vioapic.c stable/11/sys/amd64/vmm/io/vioapic.h stable/11/sys/amd64/vmm/io/vlapic.c stable/11/sys/amd64/vmm/io/vlapic.h stable/11/sys/amd64/vmm/io/vlapic_priv.h stable/11/sys/amd64/vmm/vmm.c stable/11/sys/amd64/vmm/vmm_dev.c stable/11/sys/amd64/vmm/vmm_host.c stable/11/sys/amd64/vmm/vmm_host.h stable/11/sys/amd64/vmm/vmm_instruction_emul.c stable/11/sys/amd64/vmm/vmm_ktr.h stable/11/sys/amd64/vmm/vmm_lapic.c stable/11/sys/amd64/vmm/vmm_lapic.h stable/11/sys/amd64/vmm/vmm_mem.c stable/11/sys/amd64/vmm/vmm_mem.h stable/11/sys/amd64/vmm/vmm_stat.c stable/11/sys/amd64/vmm/vmm_stat.h stable/11/sys/amd64/vmm/vmm_util.c stable/11/sys/amd64/vmm/vmm_util.h stable/11/sys/amd64/vmm/x86.c stable/11/sys/amd64/vmm/x86.h stable/11/sys/arm/allwinner/a10_ehci.c stable/11/sys/arm/allwinner/a10_gpio.c stable/11/sys/arm/allwinner/a10_sramc.c stable/11/sys/arm/allwinner/a10_sramc.h stable/11/sys/arm/allwinner/a20/a20_cpu_cfg.c stable/11/sys/arm/allwinner/a20/a20_cpu_cfg.h stable/11/sys/arm/allwinner/if_emac.c stable/11/sys/arm/allwinner/if_emacreg.h stable/11/sys/arm/arm/autoconf.c stable/11/sys/arm/arm/bus_space_generic.c stable/11/sys/arm/arm/busdma_machdep-v6.c stable/11/sys/arm/arm/cpufunc.c stable/11/sys/arm/arm/db_disasm.c stable/11/sys/arm/arm/disassem.c stable/11/sys/arm/arm/dump_machdep.c stable/11/sys/arm/arm/elf_machdep.c stable/11/sys/arm/arm/elf_trampoline.c stable/11/sys/arm/arm/fiq.c stable/11/sys/arm/arm/gdb_machdep.c stable/11/sys/arm/arm/genassym.c stable/11/sys/arm/arm/generic_timer.c stable/11/sys/arm/arm/gic.c stable/11/sys/arm/arm/in_cksum.c stable/11/sys/arm/arm/intr.c stable/11/sys/arm/arm/machdep.c stable/11/sys/arm/arm/mem.c stable/11/sys/arm/arm/minidump_machdep.c stable/11/sys/arm/arm/mp_machdep.c stable/11/sys/arm/arm/mpcore_timer.c stable/11/sys/arm/arm/physmem.c stable/11/sys/arm/arm/pl190.c stable/11/sys/arm/arm/pl310.c stable/11/sys/arm/arm/pmap-v6.c stable/11/sys/arm/arm/sc_machdep.c stable/11/sys/arm/arm/stack_machdep.c stable/11/sys/arm/arm/stdatomic.c stable/11/sys/arm/arm/sys_machdep.c stable/11/sys/arm/arm/uio_machdep.c stable/11/sys/arm/arm/undefined.c stable/11/sys/arm/arm/vfp.c stable/11/sys/arm/arm/vm_machdep.c stable/11/sys/arm/at91/at91.c stable/11/sys/arm/at91/at91_aic.c stable/11/sys/arm/at91/at91_aicreg.h stable/11/sys/arm/at91/at91_cfata.c stable/11/sys/arm/at91/at91_gpio.h stable/11/sys/arm/at91/at91_machdep.c stable/11/sys/arm/at91/at91_mci.c stable/11/sys/arm/at91/at91_mcireg.h stable/11/sys/arm/at91/at91_pdcreg.h stable/11/sys/arm/at91/at91_pio.c stable/11/sys/arm/at91/at91_pio_sam9g45.h stable/11/sys/arm/at91/at91_pioreg.h stable/11/sys/arm/at91/at91_piovar.h stable/11/sys/arm/at91/at91_pit.c stable/11/sys/arm/at91/at91_pitreg.h stable/11/sys/arm/at91/at91_pmc.c stable/11/sys/arm/at91/at91_pmcreg.h stable/11/sys/arm/at91/at91_pmcvar.h stable/11/sys/arm/at91/at91_rst.c stable/11/sys/arm/at91/at91_rstreg.h stable/11/sys/arm/at91/at91_rtc.c stable/11/sys/arm/at91/at91_rtcreg.h stable/11/sys/arm/at91/at91_sdramc.c stable/11/sys/arm/at91/at91_shdwc.c stable/11/sys/arm/at91/at91_smc.c stable/11/sys/arm/at91/at91_smc.h stable/11/sys/arm/at91/at91_spi.c stable/11/sys/arm/at91/at91_spireg.h stable/11/sys/arm/at91/at91_ssc.c stable/11/sys/arm/at91/at91_sscreg.h stable/11/sys/arm/at91/at91_st.c stable/11/sys/arm/at91/at91_streg.h stable/11/sys/arm/at91/at91_tcb.c stable/11/sys/arm/at91/at91_twi.c stable/11/sys/arm/at91/at91_twiio.h stable/11/sys/arm/at91/at91_twireg.h stable/11/sys/arm/at91/at91_usartreg.h stable/11/sys/arm/at91/at91_wdt.c stable/11/sys/arm/at91/at91_wdtreg.h stable/11/sys/arm/at91/at91board.h stable/11/sys/arm/at91/at91reg.h stable/11/sys/arm/at91/at91rm9200.c stable/11/sys/arm/at91/at91rm9200_devices.c stable/11/sys/arm/at91/at91rm9200var.h stable/11/sys/arm/at91/at91rm92reg.h stable/11/sys/arm/at91/at91sam9260.c stable/11/sys/arm/at91/at91sam9260reg.h stable/11/sys/arm/at91/at91sam9g20.c stable/11/sys/arm/at91/at91sam9g20reg.h stable/11/sys/arm/at91/at91sam9g45.c stable/11/sys/arm/at91/at91sam9g45reg.h stable/11/sys/arm/at91/at91sam9x5.c stable/11/sys/arm/at91/at91sam9x5reg.h stable/11/sys/arm/at91/at91soc.c stable/11/sys/arm/at91/at91soc.h stable/11/sys/arm/at91/at91var.h stable/11/sys/arm/at91/board_bwct.c stable/11/sys/arm/at91/board_eb9200.c stable/11/sys/arm/at91/board_ethernut5.c stable/11/sys/arm/at91/board_hl200.c stable/11/sys/arm/at91/board_hl201.c stable/11/sys/arm/at91/board_kb920x.c stable/11/sys/arm/at91/board_qila9g20.c stable/11/sys/arm/at91/board_sam9260ek.c stable/11/sys/arm/at91/board_sam9g20ek.c stable/11/sys/arm/at91/board_sam9x25ek.c stable/11/sys/arm/at91/board_sn9g45.c stable/11/sys/arm/at91/board_tsc4370.c stable/11/sys/arm/at91/if_ate.c stable/11/sys/arm/at91/if_atereg.h stable/11/sys/arm/at91/if_macb.c stable/11/sys/arm/at91/uart_bus_at91usart.c stable/11/sys/arm/at91/uart_cpu_at91usart.c stable/11/sys/arm/at91/uart_dev_at91usart.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_bscreg.h stable/11/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h stable/11/sys/arm/broadcom/bcm2835/bcm2835_dma.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_dma.h stable/11/sys/arm/broadcom/bcm2835/bcm2835_fb.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_fbd.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_gpio.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_gpio.h stable/11/sys/arm/broadcom/bcm2835/bcm2835_intr.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_machdep.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_mbox.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_mbox.h stable/11/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_spi.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_spireg.h stable/11/sys/arm/broadcom/bcm2835/bcm2835_spivar.h stable/11/sys/arm/broadcom/bcm2835/bcm2835_systimer.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h stable/11/sys/arm/broadcom/bcm2835/bcm2835_wdog.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_wdog.h stable/11/sys/arm/conf/genboardid.awk stable/11/sys/arm/freescale/fsl_ocotp.c stable/11/sys/arm/freescale/fsl_ocotpreg.h stable/11/sys/arm/freescale/fsl_ocotpvar.h stable/11/sys/arm/freescale/imx/imx51_ccm.c stable/11/sys/arm/freescale/imx/imx51_ccmreg.h stable/11/sys/arm/freescale/imx/imx51_ccmvar.h stable/11/sys/arm/freescale/imx/imx51_dpllreg.h stable/11/sys/arm/freescale/imx/imx51_ipuv3.c stable/11/sys/arm/freescale/imx/imx51_ipuv3_fbd.c stable/11/sys/arm/freescale/imx/imx51_ipuv3reg.h stable/11/sys/arm/freescale/imx/imx51_machdep.c stable/11/sys/arm/freescale/imx/imx51_sdmareg.h stable/11/sys/arm/freescale/imx/imx51_ssireg.h stable/11/sys/arm/freescale/imx/imx51_tzicreg.h stable/11/sys/arm/freescale/imx/imx53_machdep.c stable/11/sys/arm/freescale/imx/imx6_anatop.c stable/11/sys/arm/freescale/imx/imx6_anatopreg.h stable/11/sys/arm/freescale/imx/imx6_anatopvar.h stable/11/sys/arm/freescale/imx/imx6_ccm.c stable/11/sys/arm/freescale/imx/imx6_ccmreg.h stable/11/sys/arm/freescale/imx/imx6_machdep.c stable/11/sys/arm/freescale/imx/imx6_mp.c stable/11/sys/arm/freescale/imx/imx6_pl310.c stable/11/sys/arm/freescale/imx/imx6_usbphy.c stable/11/sys/arm/freescale/imx/imx_common.c stable/11/sys/arm/freescale/imx/imx_gpt.c stable/11/sys/arm/freescale/imx/imx_gptreg.h stable/11/sys/arm/freescale/imx/imx_machdep.c stable/11/sys/arm/freescale/imx/imx_machdep.h stable/11/sys/arm/freescale/imx/imx_nop_usbphy.c stable/11/sys/arm/freescale/imx/imx_wdog.c stable/11/sys/arm/freescale/imx/imx_wdogreg.h stable/11/sys/arm/freescale/imx/tzic.c stable/11/sys/arm/freescale/vybrid/vf_anadig.c stable/11/sys/arm/freescale/vybrid/vf_ccm.c stable/11/sys/arm/freescale/vybrid/vf_common.h stable/11/sys/arm/freescale/vybrid/vf_dcu4.c stable/11/sys/arm/freescale/vybrid/vf_dmamux.c stable/11/sys/arm/freescale/vybrid/vf_dmamux.h stable/11/sys/arm/freescale/vybrid/vf_edma.c stable/11/sys/arm/freescale/vybrid/vf_edma.h stable/11/sys/arm/freescale/vybrid/vf_ehci.c stable/11/sys/arm/freescale/vybrid/vf_gpio.c stable/11/sys/arm/freescale/vybrid/vf_i2c.c stable/11/sys/arm/freescale/vybrid/vf_iomuxc.c stable/11/sys/arm/freescale/vybrid/vf_iomuxc.h stable/11/sys/arm/freescale/vybrid/vf_machdep.c stable/11/sys/arm/freescale/vybrid/vf_mscm.c stable/11/sys/arm/freescale/vybrid/vf_nfc.c stable/11/sys/arm/freescale/vybrid/vf_port.c stable/11/sys/arm/freescale/vybrid/vf_port.h stable/11/sys/arm/freescale/vybrid/vf_sai.c stable/11/sys/arm/freescale/vybrid/vf_src.c stable/11/sys/arm/freescale/vybrid/vf_src.h stable/11/sys/arm/freescale/vybrid/vf_tcon.c stable/11/sys/arm/freescale/vybrid/vf_uart.c stable/11/sys/arm/include/_align.h stable/11/sys/arm/include/_bus.h stable/11/sys/arm/include/_inttypes.h stable/11/sys/arm/include/_limits.h stable/11/sys/arm/include/_stdint.h stable/11/sys/arm/include/_types.h stable/11/sys/arm/include/armreg.h stable/11/sys/arm/include/asm.h stable/11/sys/arm/include/asmacros.h stable/11/sys/arm/include/at91_gpio.h stable/11/sys/arm/include/atags.h stable/11/sys/arm/include/atomic.h stable/11/sys/arm/include/blockio.h stable/11/sys/arm/include/board.h stable/11/sys/arm/include/bus.h stable/11/sys/arm/include/bus_dma.h stable/11/sys/arm/include/clock.h stable/11/sys/arm/include/counter.h stable/11/sys/arm/include/cpufunc.h stable/11/sys/arm/include/disassem.h stable/11/sys/arm/include/elf.h stable/11/sys/arm/include/endian.h stable/11/sys/arm/include/exec.h stable/11/sys/arm/include/fdt.h stable/11/sys/arm/include/fiq.h stable/11/sys/arm/include/float.h stable/11/sys/arm/include/floatingpoint.h stable/11/sys/arm/include/frame.h stable/11/sys/arm/include/gdb_machdep.h stable/11/sys/arm/include/ieee.h stable/11/sys/arm/include/in_cksum.h stable/11/sys/arm/include/intr.h stable/11/sys/arm/include/kdb.h stable/11/sys/arm/include/limits.h stable/11/sys/arm/include/md_var.h stable/11/sys/arm/include/memdev.h stable/11/sys/arm/include/metadata.h stable/11/sys/arm/include/minidump.h stable/11/sys/arm/include/ofw_machdep.h stable/11/sys/arm/include/param.h stable/11/sys/arm/include/pcb.h stable/11/sys/arm/include/pcpu.h stable/11/sys/arm/include/physmem.h stable/11/sys/arm/include/pl310.h stable/11/sys/arm/include/pmap.h stable/11/sys/arm/include/pmc_mdep.h stable/11/sys/arm/include/proc.h stable/11/sys/arm/include/profile.h stable/11/sys/arm/include/psl.h stable/11/sys/arm/include/reloc.h stable/11/sys/arm/include/runq.h stable/11/sys/arm/include/sc_machdep.h stable/11/sys/arm/include/sf_buf.h stable/11/sys/arm/include/signal.h stable/11/sys/arm/include/stdarg.h stable/11/sys/arm/include/sysarch.h stable/11/sys/arm/include/ucontext.h stable/11/sys/arm/include/undefined.h stable/11/sys/arm/include/utrap.h stable/11/sys/arm/include/vdso.h stable/11/sys/arm/include/vfp.h stable/11/sys/arm/include/vm.h stable/11/sys/arm/include/vmparam.h stable/11/sys/arm/lpc/if_lpe.c stable/11/sys/arm/lpc/if_lpereg.h stable/11/sys/arm/lpc/lpc_dmac.c stable/11/sys/arm/lpc/lpc_fb.c stable/11/sys/arm/lpc/lpc_gpio.c stable/11/sys/arm/lpc/lpc_intc.c stable/11/sys/arm/lpc/lpc_machdep.c stable/11/sys/arm/lpc/lpc_mmc.c stable/11/sys/arm/lpc/lpc_ohci.c stable/11/sys/arm/lpc/lpc_pll.c stable/11/sys/arm/lpc/lpc_pwr.c stable/11/sys/arm/lpc/lpc_rtc.c stable/11/sys/arm/lpc/lpc_spi.c stable/11/sys/arm/lpc/lpc_timer.c stable/11/sys/arm/lpc/lpcreg.h stable/11/sys/arm/lpc/lpcvar.h stable/11/sys/arm/lpc/ssd1289.c stable/11/sys/arm/mv/armadaxp/armadaxp.c stable/11/sys/arm/mv/armadaxp/armadaxp_mp.c stable/11/sys/arm/mv/discovery/discovery.c stable/11/sys/arm/mv/gpio.c stable/11/sys/arm/mv/ic.c stable/11/sys/arm/mv/kirkwood/kirkwood.c stable/11/sys/arm/mv/mpic.c stable/11/sys/arm/mv/mv_common.c stable/11/sys/arm/mv/mv_localbus.c stable/11/sys/arm/mv/mv_machdep.c stable/11/sys/arm/mv/mv_pci.c stable/11/sys/arm/mv/mv_ts.c stable/11/sys/arm/mv/mvreg.h stable/11/sys/arm/mv/mvvar.h stable/11/sys/arm/mv/mvwin.h stable/11/sys/arm/mv/orion/db88f5xxx.c stable/11/sys/arm/mv/orion/orion.c stable/11/sys/arm/mv/rtc.c stable/11/sys/arm/mv/timer.c stable/11/sys/arm/rockchip/rk30xx_gpio.c stable/11/sys/arm/rockchip/rk30xx_grf.c stable/11/sys/arm/rockchip/rk30xx_grf.h stable/11/sys/arm/rockchip/rk30xx_machdep.c stable/11/sys/arm/rockchip/rk30xx_pmu.c stable/11/sys/arm/rockchip/rk30xx_pmu.h stable/11/sys/arm/rockchip/rk30xx_wdog.c stable/11/sys/arm/rockchip/rk30xx_wdog.h stable/11/sys/arm/samsung/exynos/exynos5_machdep.c stable/11/sys/arm/samsung/exynos/exynos5_mp.c stable/11/sys/arm/ti/aintc.c stable/11/sys/arm/ti/am335x/am335x_dmtimer.c stable/11/sys/arm/ti/am335x/am335x_lcd.c stable/11/sys/arm/ti/am335x/am335x_lcd.h stable/11/sys/arm/ti/am335x/am335x_lcd_syscons.c stable/11/sys/arm/ti/am335x/am335x_pmic.c stable/11/sys/arm/ti/am335x/am335x_prcm.c stable/11/sys/arm/ti/am335x/am335x_pwm.h stable/11/sys/arm/ti/am335x/am335x_reg.h stable/11/sys/arm/ti/am335x/am335x_scm.h stable/11/sys/arm/ti/am335x/am335x_scm_padconf.c stable/11/sys/arm/ti/am335x/am335x_usbss.c stable/11/sys/arm/ti/cpsw/if_cpsw.c stable/11/sys/arm/ti/cpsw/if_cpswreg.h stable/11/sys/arm/ti/cpsw/if_cpswvar.h stable/11/sys/arm/ti/omap4/omap4_l2cache.c stable/11/sys/arm/ti/omap4/omap4_mp.c stable/11/sys/arm/ti/omap4/omap4_prcm_clks.c stable/11/sys/arm/ti/omap4/omap4_reg.h stable/11/sys/arm/ti/omap4/omap4_scm_padconf.c stable/11/sys/arm/ti/omap4/omap4_smc.h stable/11/sys/arm/ti/omap4/pandaboard/pandaboard.c stable/11/sys/arm/ti/ti_cpuid.c stable/11/sys/arm/ti/ti_cpuid.h stable/11/sys/arm/ti/ti_edma3.c stable/11/sys/arm/ti/ti_edma3.h stable/11/sys/arm/ti/ti_gpio.c stable/11/sys/arm/ti/ti_i2c.c stable/11/sys/arm/ti/ti_i2c.h stable/11/sys/arm/ti/ti_machdep.c stable/11/sys/arm/ti/ti_mbox.c stable/11/sys/arm/ti/ti_mbox.h stable/11/sys/arm/ti/ti_prcm.c stable/11/sys/arm/ti/ti_prcm.h stable/11/sys/arm/ti/ti_pruss.c stable/11/sys/arm/ti/ti_pruss.h stable/11/sys/arm/ti/ti_scm.c stable/11/sys/arm/ti/ti_scm.h stable/11/sys/arm/ti/ti_sdhci.c stable/11/sys/arm/ti/ti_sdma.c stable/11/sys/arm/ti/ti_sdma.h stable/11/sys/arm/ti/ti_sdmareg.h stable/11/sys/arm/ti/ti_smc.h stable/11/sys/arm/ti/tivar.h stable/11/sys/arm/ti/twl/twl.c stable/11/sys/arm/ti/twl/twl.h stable/11/sys/arm/ti/twl/twl_clks.c stable/11/sys/arm/ti/twl/twl_clks.h stable/11/sys/arm/ti/twl/twl_vreg.c stable/11/sys/arm/ti/twl/twl_vreg.h stable/11/sys/arm/ti/usb/omap_ehci.c stable/11/sys/arm/ti/usb/omap_usb.h stable/11/sys/arm/versatile/pl050.c stable/11/sys/arm/versatile/sp804.c stable/11/sys/arm/versatile/versatile_clcd.c stable/11/sys/arm/versatile/versatile_common.c stable/11/sys/arm/versatile/versatile_machdep.c stable/11/sys/arm/versatile/versatile_pci.c stable/11/sys/arm/versatile/versatile_sic.c stable/11/sys/arm/xilinx/uart_dev_cdnc.c stable/11/sys/arm/xilinx/zy7_devcfg.c stable/11/sys/arm/xilinx/zy7_ehci.c stable/11/sys/arm/xilinx/zy7_gpio.c stable/11/sys/arm/xilinx/zy7_l2cache.c stable/11/sys/arm/xilinx/zy7_machdep.c stable/11/sys/arm/xilinx/zy7_reg.h stable/11/sys/arm/xilinx/zy7_slcr.c stable/11/sys/arm/xilinx/zy7_slcr.h stable/11/sys/arm/xscale/i8134x/crb_machdep.c stable/11/sys/arm/xscale/i8134x/i81342.c stable/11/sys/arm/xscale/i8134x/i81342_mcu.c stable/11/sys/arm/xscale/i8134x/i81342_pci.c stable/11/sys/arm/xscale/i8134x/i81342_space.c stable/11/sys/arm/xscale/i8134x/i81342reg.h stable/11/sys/arm/xscale/i8134x/i81342var.h stable/11/sys/arm/xscale/i8134x/iq81342_7seg.c stable/11/sys/arm/xscale/i8134x/iq81342reg.h stable/11/sys/arm/xscale/i8134x/iq81342var.h stable/11/sys/arm/xscale/i8134x/obio.c stable/11/sys/arm/xscale/i8134x/obiovar.h stable/11/sys/arm/xscale/i8134x/uart_bus_i81342.c stable/11/sys/arm/xscale/i8134x/uart_cpu_i81342.c stable/11/sys/arm/xscale/ixp425/avila_ata.c stable/11/sys/arm/xscale/ixp425/avila_gpio.c stable/11/sys/arm/xscale/ixp425/avila_led.c stable/11/sys/arm/xscale/ixp425/avila_machdep.c stable/11/sys/arm/xscale/ixp425/cambria_exp_space.c stable/11/sys/arm/xscale/ixp425/cambria_fled.c stable/11/sys/arm/xscale/ixp425/cambria_gpio.c stable/11/sys/arm/xscale/ixp425/cambria_led.c stable/11/sys/arm/xscale/ixp425/if_npe.c stable/11/sys/arm/xscale/ixp425/if_npereg.h stable/11/sys/arm/xscale/ixp425/ixdp425_pci.c stable/11/sys/arm/xscale/ixp425/ixdp425reg.h stable/11/sys/arm/xscale/ixp425/ixp425.c stable/11/sys/arm/xscale/ixp425/ixp425_a4x_space.c stable/11/sys/arm/xscale/ixp425/ixp425_iic.c stable/11/sys/arm/xscale/ixp425/ixp425_intr.h stable/11/sys/arm/xscale/ixp425/ixp425_mem.c stable/11/sys/arm/xscale/ixp425/ixp425_npe.c stable/11/sys/arm/xscale/ixp425/ixp425_npereg.h stable/11/sys/arm/xscale/ixp425/ixp425_npevar.h stable/11/sys/arm/xscale/ixp425/ixp425_pci.c stable/11/sys/arm/xscale/ixp425/ixp425_pci_space.c stable/11/sys/arm/xscale/ixp425/ixp425_qmgr.c stable/11/sys/arm/xscale/ixp425/ixp425_qmgr.h stable/11/sys/arm/xscale/ixp425/ixp425_space.c stable/11/sys/arm/xscale/ixp425/ixp425_timer.c stable/11/sys/arm/xscale/ixp425/ixp425_wdog.c stable/11/sys/arm/xscale/ixp425/ixp425reg.h stable/11/sys/arm/xscale/ixp425/ixp425var.h stable/11/sys/arm/xscale/ixp425/uart_bus_ixp425.c stable/11/sys/arm/xscale/ixp425/uart_cpu_ixp425.c stable/11/sys/arm/xscale/pxa/if_smc_smi.c stable/11/sys/arm/xscale/pxa/pxa_gpio.c stable/11/sys/arm/xscale/pxa/pxa_icu.c stable/11/sys/arm/xscale/pxa/pxa_machdep.c stable/11/sys/arm/xscale/pxa/pxa_obio.c stable/11/sys/arm/xscale/pxa/pxa_smi.c stable/11/sys/arm/xscale/pxa/pxa_space.c stable/11/sys/arm/xscale/pxa/pxa_timer.c stable/11/sys/arm/xscale/pxa/pxareg.h stable/11/sys/arm/xscale/pxa/pxavar.h stable/11/sys/arm/xscale/pxa/uart_bus_pxa.c stable/11/sys/arm/xscale/pxa/uart_cpu_pxa.c stable/11/sys/bsm/audit.h stable/11/sys/bsm/audit_domain.h stable/11/sys/bsm/audit_errno.h stable/11/sys/bsm/audit_fcntl.h stable/11/sys/bsm/audit_internal.h stable/11/sys/bsm/audit_kevents.h stable/11/sys/bsm/audit_record.h stable/11/sys/bsm/audit_socket_type.h stable/11/sys/compat/freebsd32/freebsd32_ioctl.c stable/11/sys/compat/freebsd32/freebsd32_ioctl.h stable/11/sys/compat/linprocfs/linprocfs.c stable/11/sys/compat/ndis/cfg_var.h stable/11/sys/compat/ndis/hal_var.h stable/11/sys/compat/ndis/kern_ndis.c stable/11/sys/compat/ndis/kern_windrv.c stable/11/sys/compat/ndis/ndis_var.h stable/11/sys/compat/ndis/ntoskrnl_var.h stable/11/sys/compat/ndis/pe_var.h stable/11/sys/compat/ndis/resource_var.h stable/11/sys/compat/ndis/subr_hal.c stable/11/sys/compat/ndis/subr_ndis.c stable/11/sys/compat/ndis/subr_ntoskrnl.c stable/11/sys/compat/ndis/subr_pe.c stable/11/sys/compat/ndis/subr_usbd.c stable/11/sys/compat/ndis/usbd_var.h stable/11/sys/conf/newvers.sh stable/11/sys/conf/systags.sh stable/11/sys/crypto/sha1.c stable/11/sys/crypto/sha1.h stable/11/sys/ddb/db_ps.c stable/11/sys/ddb/ddb.h stable/11/sys/dev/aac/aac.c stable/11/sys/dev/aac/aac_cam.c stable/11/sys/dev/aac/aac_debug.c stable/11/sys/dev/aac/aac_disk.c stable/11/sys/dev/aac/aac_linux.c stable/11/sys/dev/aac/aac_pci.c stable/11/sys/dev/aac/aac_tables.h stable/11/sys/dev/aac/aacreg.h stable/11/sys/dev/aac/aacvar.h stable/11/sys/dev/aacraid/aacraid.c stable/11/sys/dev/aacraid/aacraid_cam.c stable/11/sys/dev/aacraid/aacraid_debug.c stable/11/sys/dev/aacraid/aacraid_debug.h stable/11/sys/dev/aacraid/aacraid_linux.c stable/11/sys/dev/aacraid/aacraid_pci.c stable/11/sys/dev/aacraid/aacraid_reg.h stable/11/sys/dev/aacraid/aacraid_var.h stable/11/sys/dev/adb/adb.h stable/11/sys/dev/adb/adb_bus.c stable/11/sys/dev/adb/adb_buttons.c stable/11/sys/dev/adb/adb_kbd.c stable/11/sys/dev/adb/adb_mouse.c stable/11/sys/dev/adb/adbvar.h stable/11/sys/dev/adlink/adlink.c stable/11/sys/dev/advansys/adv_isa.c stable/11/sys/dev/advansys/adv_pci.c stable/11/sys/dev/advansys/advansys.c stable/11/sys/dev/advansys/advansys.h stable/11/sys/dev/advansys/advlib.c stable/11/sys/dev/advansys/advlib.h stable/11/sys/dev/advansys/adw_pci.c stable/11/sys/dev/advansys/adwcam.c stable/11/sys/dev/advansys/adwlib.c stable/11/sys/dev/advansys/adwlib.h stable/11/sys/dev/advansys/adwvar.h stable/11/sys/dev/ae/if_ae.c stable/11/sys/dev/ae/if_aereg.h stable/11/sys/dev/ae/if_aevar.h stable/11/sys/dev/age/if_age.c stable/11/sys/dev/age/if_agereg.h stable/11/sys/dev/age/if_agevar.h stable/11/sys/dev/agp/agp.c stable/11/sys/dev/agp/agp_ali.c stable/11/sys/dev/agp/agp_amd.c stable/11/sys/dev/agp/agp_amd64.c stable/11/sys/dev/agp/agp_apple.c stable/11/sys/dev/agp/agp_ati.c stable/11/sys/dev/agp/agp_i810.c stable/11/sys/dev/agp/agp_i810.h stable/11/sys/dev/agp/agp_intel.c stable/11/sys/dev/agp/agp_nvidia.c stable/11/sys/dev/agp/agp_sis.c stable/11/sys/dev/agp/agp_via.c stable/11/sys/dev/agp/agppriv.h stable/11/sys/dev/agp/agpreg.h stable/11/sys/dev/agp/agpvar.h stable/11/sys/dev/aha/aha.c stable/11/sys/dev/aha/aha_isa.c stable/11/sys/dev/aha/ahareg.h stable/11/sys/dev/ahci/ahci.c stable/11/sys/dev/ahci/ahci.h stable/11/sys/dev/ahci/ahciem.c stable/11/sys/dev/aic/aic.c stable/11/sys/dev/aic/aic6360reg.h stable/11/sys/dev/aic/aic_isa.c stable/11/sys/dev/aic/aic_pccard.c stable/11/sys/dev/aic/aicvar.h stable/11/sys/dev/aic7xxx/ahc_isa.c stable/11/sys/dev/aic7xxx/aic7770.c stable/11/sys/dev/aic7xxx/aic79xx.c stable/11/sys/dev/aic7xxx/aic79xx.h stable/11/sys/dev/aic7xxx/aic79xx_inline.h stable/11/sys/dev/aic7xxx/aic79xx_pci.c stable/11/sys/dev/aic7xxx/aic7xxx.c stable/11/sys/dev/aic7xxx/aic7xxx.h stable/11/sys/dev/aic7xxx/aic7xxx_93cx6.h stable/11/sys/dev/aic7xxx/aic7xxx_inline.h stable/11/sys/dev/aic7xxx/aic7xxx_pci.c stable/11/sys/dev/aic7xxx/aicasm/aicasm.c stable/11/sys/dev/aic7xxx/aicasm/aicasm.h stable/11/sys/dev/aic7xxx/aicasm/aicasm_gram.y stable/11/sys/dev/aic7xxx/aicasm/aicasm_insformat.h stable/11/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y stable/11/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l stable/11/sys/dev/aic7xxx/aicasm/aicasm_scan.l stable/11/sys/dev/aic7xxx/aicasm/aicasm_symbol.c stable/11/sys/dev/aic7xxx/aicasm/aicasm_symbol.h stable/11/sys/dev/alc/if_alc.c stable/11/sys/dev/alc/if_alcreg.h stable/11/sys/dev/alc/if_alcvar.h stable/11/sys/dev/ale/if_ale.c stable/11/sys/dev/ale/if_alereg.h stable/11/sys/dev/ale/if_alevar.h stable/11/sys/dev/altera/atse/a_api.h stable/11/sys/dev/altera/atse/if_atse.c stable/11/sys/dev/altera/atse/if_atse_fdt.c stable/11/sys/dev/altera/atse/if_atse_nexus.c stable/11/sys/dev/altera/atse/if_atsereg.h stable/11/sys/dev/altera/avgen/altera_avgen.c stable/11/sys/dev/altera/avgen/altera_avgen.h stable/11/sys/dev/altera/avgen/altera_avgen_fdt.c stable/11/sys/dev/altera/avgen/altera_avgen_nexus.c stable/11/sys/dev/altera/jtag_uart/altera_jtag_uart.h stable/11/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c stable/11/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c stable/11/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c stable/11/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c stable/11/sys/dev/altera/sdcard/altera_sdcard.c stable/11/sys/dev/altera/sdcard/altera_sdcard.h stable/11/sys/dev/altera/sdcard/altera_sdcard_disk.c stable/11/sys/dev/altera/sdcard/altera_sdcard_fdt.c stable/11/sys/dev/altera/sdcard/altera_sdcard_io.c stable/11/sys/dev/altera/sdcard/altera_sdcard_nexus.c stable/11/sys/dev/amdsbwd/amdsbwd.c stable/11/sys/dev/amdtemp/amdtemp.c stable/11/sys/dev/amr/amr.c stable/11/sys/dev/amr/amr_cam.c stable/11/sys/dev/amr/amr_disk.c stable/11/sys/dev/amr/amr_linux.c stable/11/sys/dev/amr/amr_pci.c stable/11/sys/dev/amr/amr_tables.h stable/11/sys/dev/amr/amrio.h stable/11/sys/dev/amr/amrreg.h stable/11/sys/dev/amr/amrvar.h stable/11/sys/dev/an/if_aironet_ieee.h stable/11/sys/dev/an/if_an.c stable/11/sys/dev/an/if_an_isa.c stable/11/sys/dev/an/if_an_pccard.c stable/11/sys/dev/an/if_an_pci.c stable/11/sys/dev/an/if_anreg.h stable/11/sys/dev/arcmsr/arcmsr.c stable/11/sys/dev/arcmsr/arcmsr.h stable/11/sys/dev/asmc/asmc.c stable/11/sys/dev/asmc/asmcvar.h stable/11/sys/dev/ata/ata-all.c stable/11/sys/dev/ata/ata-all.h stable/11/sys/dev/ata/ata-card.c stable/11/sys/dev/ata/ata-dma.c stable/11/sys/dev/ata/ata-isa.c stable/11/sys/dev/ata/ata-lowlevel.c stable/11/sys/dev/ata/ata-pci.c stable/11/sys/dev/ata/ata-pci.h stable/11/sys/dev/ata/ata-sata.c stable/11/sys/dev/ata/chipsets/ata-acard.c stable/11/sys/dev/ata/chipsets/ata-acerlabs.c stable/11/sys/dev/ata/chipsets/ata-amd.c stable/11/sys/dev/ata/chipsets/ata-ati.c stable/11/sys/dev/ata/chipsets/ata-cenatek.c stable/11/sys/dev/ata/chipsets/ata-cypress.c stable/11/sys/dev/ata/chipsets/ata-cyrix.c stable/11/sys/dev/ata/chipsets/ata-fsl.c stable/11/sys/dev/ata/chipsets/ata-highpoint.c stable/11/sys/dev/ata/chipsets/ata-intel.c stable/11/sys/dev/ata/chipsets/ata-ite.c stable/11/sys/dev/ata/chipsets/ata-jmicron.c stable/11/sys/dev/ata/chipsets/ata-marvell.c stable/11/sys/dev/ata/chipsets/ata-micron.c stable/11/sys/dev/ata/chipsets/ata-national.c stable/11/sys/dev/ata/chipsets/ata-netcell.c stable/11/sys/dev/ata/chipsets/ata-nvidia.c stable/11/sys/dev/ata/chipsets/ata-promise.c stable/11/sys/dev/ata/chipsets/ata-serverworks.c stable/11/sys/dev/ata/chipsets/ata-siliconimage.c stable/11/sys/dev/ata/chipsets/ata-sis.c stable/11/sys/dev/ata/chipsets/ata-via.c stable/11/sys/dev/ath/ah_osdep.c stable/11/sys/dev/ath/ah_osdep.h stable/11/sys/dev/ath/ath_dfs/null/dfs_null.c stable/11/sys/dev/ath/ath_hal/ar9002/ar9002phy.h stable/11/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c stable/11/sys/dev/ath/ath_hal/ar9002/ar9280_olc.h stable/11/sys/dev/ath/ath_hal/ar9002/ar9285_cal.c stable/11/sys/dev/ath/ath_hal/ar9002/ar9285_cal.h stable/11/sys/dev/ath/ath_hal/ar9002/ar9285_diversity.c stable/11/sys/dev/ath/ath_hal/ar9002/ar9285_diversity.h stable/11/sys/dev/ath/ath_hal/ar9002/ar9285_phy.c stable/11/sys/dev/ath/ath_hal/ar9002/ar9285_phy.h stable/11/sys/dev/ath/ath_hal/ar9002/ar9285phy.h stable/11/sys/dev/ath/ath_hal/ar9002/ar9287_cal.c stable/11/sys/dev/ath/ath_hal/ar9002/ar9287_cal.h stable/11/sys/dev/ath/ath_hal/ar9002/ar9287_olc.c stable/11/sys/dev/ath/ath_hal/ar9003/ar9300_devid.h stable/11/sys/dev/ath/ath_rate/amrr/amrr.c stable/11/sys/dev/ath/ath_rate/amrr/amrr.h stable/11/sys/dev/ath/ath_rate/onoe/onoe.c stable/11/sys/dev/ath/ath_rate/onoe/onoe.h stable/11/sys/dev/ath/ath_rate/sample/sample.c stable/11/sys/dev/ath/ath_rate/sample/sample.h stable/11/sys/dev/ath/ath_rate/sample/tx_schedules.h stable/11/sys/dev/ath/if_ath.c stable/11/sys/dev/ath/if_ath_ahb.c stable/11/sys/dev/ath/if_ath_alq.c stable/11/sys/dev/ath/if_ath_alq.h stable/11/sys/dev/ath/if_ath_beacon.c stable/11/sys/dev/ath/if_ath_beacon.h stable/11/sys/dev/ath/if_ath_btcoex.c stable/11/sys/dev/ath/if_ath_btcoex.h stable/11/sys/dev/ath/if_ath_debug.c stable/11/sys/dev/ath/if_ath_debug.h stable/11/sys/dev/ath/if_ath_keycache.c stable/11/sys/dev/ath/if_ath_keycache.h stable/11/sys/dev/ath/if_ath_led.c stable/11/sys/dev/ath/if_ath_led.h stable/11/sys/dev/ath/if_ath_lna_div.c stable/11/sys/dev/ath/if_ath_lna_div.h stable/11/sys/dev/ath/if_ath_misc.h stable/11/sys/dev/ath/if_ath_pci.c stable/11/sys/dev/ath/if_ath_rx.c stable/11/sys/dev/ath/if_ath_rx.h stable/11/sys/dev/ath/if_ath_rx_edma.c stable/11/sys/dev/ath/if_ath_rx_edma.h stable/11/sys/dev/ath/if_ath_spectral.c stable/11/sys/dev/ath/if_ath_spectral.h stable/11/sys/dev/ath/if_ath_sysctl.c stable/11/sys/dev/ath/if_ath_sysctl.h stable/11/sys/dev/ath/if_ath_tdma.c stable/11/sys/dev/ath/if_ath_tdma.h stable/11/sys/dev/ath/if_ath_tsf.h stable/11/sys/dev/ath/if_ath_tx.c stable/11/sys/dev/ath/if_ath_tx.h stable/11/sys/dev/ath/if_ath_tx_edma.c stable/11/sys/dev/ath/if_ath_tx_edma.h stable/11/sys/dev/ath/if_ath_tx_ht.c stable/11/sys/dev/ath/if_ath_tx_ht.h stable/11/sys/dev/ath/if_athdfs.h stable/11/sys/dev/ath/if_athioctl.h stable/11/sys/dev/ath/if_athrate.h stable/11/sys/dev/ath/if_athvar.h stable/11/sys/dev/atkbdc/atkbd.c stable/11/sys/dev/atkbdc/atkbd_atkbdc.c stable/11/sys/dev/atkbdc/atkbdc.c stable/11/sys/dev/atkbdc/atkbdc_ebus.c stable/11/sys/dev/atkbdc/atkbdc_isa.c stable/11/sys/dev/atkbdc/atkbdc_subr.c stable/11/sys/dev/atkbdc/atkbdc_subr.h stable/11/sys/dev/atkbdc/atkbdcreg.h stable/11/sys/dev/atkbdc/atkbdreg.h stable/11/sys/dev/auxio/auxio.c stable/11/sys/dev/auxio/auxioreg.h stable/11/sys/dev/bce/if_bce.c stable/11/sys/dev/bce/if_bcefw.h stable/11/sys/dev/bce/if_bcereg.h stable/11/sys/dev/bfe/if_bfe.c stable/11/sys/dev/bfe/if_bfereg.h stable/11/sys/dev/bge/if_bge.c stable/11/sys/dev/bge/if_bgereg.h stable/11/sys/dev/bktr/bktr_audio.c stable/11/sys/dev/bktr/bktr_audio.h stable/11/sys/dev/bktr/bktr_card.c stable/11/sys/dev/bktr/bktr_card.h stable/11/sys/dev/bktr/bktr_core.c stable/11/sys/dev/bktr/bktr_core.h stable/11/sys/dev/bktr/bktr_i2c.c stable/11/sys/dev/bktr/bktr_i2c.h stable/11/sys/dev/bktr/bktr_mem.c stable/11/sys/dev/bktr/bktr_mem.h stable/11/sys/dev/bktr/bktr_os.c stable/11/sys/dev/bktr/bktr_os.h stable/11/sys/dev/bktr/bktr_reg.h stable/11/sys/dev/bktr/bktr_tuner.c stable/11/sys/dev/bktr/bktr_tuner.h stable/11/sys/dev/bktr/ioctl_meteor.h stable/11/sys/dev/bktr/msp34xx.c stable/11/sys/dev/bm/if_bm.c stable/11/sys/dev/bm/if_bmreg.h stable/11/sys/dev/bm/if_bmvar.h stable/11/sys/dev/buslogic/bt.c stable/11/sys/dev/buslogic/bt_isa.c stable/11/sys/dev/buslogic/bt_pci.c stable/11/sys/dev/buslogic/btreg.h stable/11/sys/dev/bvm/bvm_console.c stable/11/sys/dev/bvm/bvm_dbg.c stable/11/sys/dev/bwi/bitops.h stable/11/sys/dev/bwi/bwimac.c stable/11/sys/dev/bwi/bwimac.h stable/11/sys/dev/bwi/bwiphy.c stable/11/sys/dev/bwi/bwiphy.h stable/11/sys/dev/bwi/bwirf.c stable/11/sys/dev/bwi/bwirf.h stable/11/sys/dev/bwi/if_bwi.c stable/11/sys/dev/bwi/if_bwi_pci.c stable/11/sys/dev/bwi/if_bwireg.h stable/11/sys/dev/bwi/if_bwivar.h stable/11/sys/dev/bwn/if_bwn.c stable/11/sys/dev/bwn/if_bwnreg.h stable/11/sys/dev/bwn/if_bwnvar.h stable/11/sys/dev/bxe/57710_init_values.c stable/11/sys/dev/bxe/57710_int_offsets.h stable/11/sys/dev/bxe/57711_init_values.c stable/11/sys/dev/bxe/57711_int_offsets.h stable/11/sys/dev/bxe/57712_init_values.c stable/11/sys/dev/bxe/57712_int_offsets.h stable/11/sys/dev/bxe/bxe.c stable/11/sys/dev/bxe/bxe.h stable/11/sys/dev/bxe/bxe_dcb.h stable/11/sys/dev/bxe/bxe_debug.c stable/11/sys/dev/bxe/bxe_elink.c stable/11/sys/dev/bxe/bxe_elink.h stable/11/sys/dev/bxe/bxe_stats.c stable/11/sys/dev/bxe/bxe_stats.h stable/11/sys/dev/bxe/ecore_fw_defs.h stable/11/sys/dev/bxe/ecore_hsi.h stable/11/sys/dev/bxe/ecore_init.h stable/11/sys/dev/bxe/ecore_init_ops.h stable/11/sys/dev/bxe/ecore_mfw_req.h stable/11/sys/dev/bxe/ecore_reg.h stable/11/sys/dev/bxe/ecore_sp.c stable/11/sys/dev/bxe/ecore_sp.h stable/11/sys/dev/cadence/if_cgem.c stable/11/sys/dev/cadence/if_cgem_hw.h stable/11/sys/dev/cardbus/cardbus.c stable/11/sys/dev/cardbus/cardbus_cis.c stable/11/sys/dev/cardbus/cardbus_cis.h stable/11/sys/dev/cardbus/cardbus_device.c stable/11/sys/dev/cardbus/cardbusreg.h stable/11/sys/dev/cardbus/cardbusvar.h stable/11/sys/dev/cas/if_cas.c stable/11/sys/dev/cas/if_casreg.h stable/11/sys/dev/cas/if_casvar.h stable/11/sys/dev/cesa/cesa.c stable/11/sys/dev/cesa/cesa.h stable/11/sys/dev/cfe/cfe_api.c stable/11/sys/dev/cfe/cfe_api.h stable/11/sys/dev/cfe/cfe_api_int.h stable/11/sys/dev/cfe/cfe_console.c stable/11/sys/dev/cfe/cfe_env.c stable/11/sys/dev/cfe/cfe_error.h stable/11/sys/dev/cfe/cfe_ioctl.h stable/11/sys/dev/cfe/cfe_resource.c stable/11/sys/dev/cfi/cfi_bus_fdt.c stable/11/sys/dev/cfi/cfi_bus_ixp4xx.c stable/11/sys/dev/cfi/cfi_bus_nexus.c stable/11/sys/dev/cfi/cfi_core.c stable/11/sys/dev/cfi/cfi_dev.c stable/11/sys/dev/cfi/cfi_disk.c stable/11/sys/dev/cfi/cfi_reg.h stable/11/sys/dev/cfi/cfi_var.h stable/11/sys/dev/ciss/ciss.c stable/11/sys/dev/ciss/cissio.h stable/11/sys/dev/ciss/cissreg.h stable/11/sys/dev/ciss/cissvar.h stable/11/sys/dev/cm/if_cm_isa.c stable/11/sys/dev/cm/smc90cx6.c stable/11/sys/dev/cm/smc90cx6reg.h stable/11/sys/dev/cm/smc90cx6var.h stable/11/sys/dev/cmx/cmx_pccard.c stable/11/sys/dev/cmx/cmxreg.h stable/11/sys/dev/cmx/cmxvar.h stable/11/sys/dev/coretemp/coretemp.c stable/11/sys/dev/cpuctl/cpuctl.c stable/11/sys/dev/cpufreq/ichss.c stable/11/sys/dev/cs/if_cs.c stable/11/sys/dev/cs/if_cs_isa.c stable/11/sys/dev/cs/if_cs_pccard.c stable/11/sys/dev/cs/if_csreg.h stable/11/sys/dev/cs/if_csvar.h stable/11/sys/dev/cxgb/bin2h.pl stable/11/sys/dev/cxgb/common/cxgb_ael1002.c stable/11/sys/dev/cxgb/common/cxgb_aq100x.c stable/11/sys/dev/cxgb/common/cxgb_common.h stable/11/sys/dev/cxgb/common/cxgb_firmware_exports.h stable/11/sys/dev/cxgb/common/cxgb_mc5.c stable/11/sys/dev/cxgb/common/cxgb_mv88e1xxx.c stable/11/sys/dev/cxgb/common/cxgb_regs.h stable/11/sys/dev/cxgb/common/cxgb_sge_defs.h stable/11/sys/dev/cxgb/common/cxgb_t3_cpl.h stable/11/sys/dev/cxgb/common/cxgb_t3_hw.c stable/11/sys/dev/cxgb/common/cxgb_tcb.h stable/11/sys/dev/cxgb/common/cxgb_tn1010.c stable/11/sys/dev/cxgb/common/cxgb_vsc7323.c stable/11/sys/dev/cxgb/common/cxgb_vsc8211.c stable/11/sys/dev/cxgb/common/cxgb_xgmac.c stable/11/sys/dev/cxgb/cxgb_adapter.h stable/11/sys/dev/cxgb/cxgb_ioctl.h stable/11/sys/dev/cxgb/cxgb_main.c stable/11/sys/dev/cxgb/cxgb_offload.h stable/11/sys/dev/cxgb/cxgb_osdep.h stable/11/sys/dev/cxgb/cxgb_sge.c stable/11/sys/dev/cxgb/cxgb_t3fw.h stable/11/sys/dev/cxgb/sys/mvec.h stable/11/sys/dev/cxgb/sys/uipc_mvec.c stable/11/sys/dev/cxgb/t3b_protocol_sram.h stable/11/sys/dev/cxgb/t3b_tp_eeprom.h stable/11/sys/dev/cxgb/t3c_protocol_sram.h stable/11/sys/dev/cxgb/t3c_tp_eeprom.h stable/11/sys/dev/cxgbe/adapter.h stable/11/sys/dev/cxgbe/common/common.h stable/11/sys/dev/cxgbe/common/t4_hw.c stable/11/sys/dev/cxgbe/common/t4_hw.h stable/11/sys/dev/cxgbe/common/t4_msg.h stable/11/sys/dev/cxgbe/common/t4_regs.h stable/11/sys/dev/cxgbe/common/t4_regs_values.h stable/11/sys/dev/cxgbe/common/t4_tcb.h stable/11/sys/dev/cxgbe/iw_cxgbe/cm.c stable/11/sys/dev/cxgbe/iw_cxgbe/cq.c stable/11/sys/dev/cxgbe/iw_cxgbe/device.c stable/11/sys/dev/cxgbe/iw_cxgbe/ev.c stable/11/sys/dev/cxgbe/iw_cxgbe/id_table.c stable/11/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h stable/11/sys/dev/cxgbe/iw_cxgbe/mem.c stable/11/sys/dev/cxgbe/iw_cxgbe/provider.c stable/11/sys/dev/cxgbe/iw_cxgbe/qp.c stable/11/sys/dev/cxgbe/iw_cxgbe/resource.c stable/11/sys/dev/cxgbe/iw_cxgbe/t4.h stable/11/sys/dev/cxgbe/iw_cxgbe/user.h stable/11/sys/dev/cxgbe/offload.h stable/11/sys/dev/cxgbe/osdep.h stable/11/sys/dev/cxgbe/t4_ioctl.h stable/11/sys/dev/cxgbe/t4_l2t.c stable/11/sys/dev/cxgbe/t4_l2t.h stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/t4_sge.c stable/11/sys/dev/cxgbe/t4_tracer.c stable/11/sys/dev/cxgbe/tom/t4_connect.c stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c stable/11/sys/dev/cxgbe/tom/t4_ddp.c stable/11/sys/dev/cxgbe/tom/t4_listen.c stable/11/sys/dev/cxgbe/tom/t4_tom.c stable/11/sys/dev/cxgbe/tom/t4_tom.h stable/11/sys/dev/cxgbe/tom/t4_tom_l2t.c stable/11/sys/dev/cxgbe/tom/t4_tom_l2t.h stable/11/sys/dev/cy/cy.c stable/11/sys/dev/cy/cy_isa.c stable/11/sys/dev/cy/cy_pci.c stable/11/sys/dev/cy/cyreg.h stable/11/sys/dev/cy/cyvar.h stable/11/sys/dev/dc/dcphy.c stable/11/sys/dev/dc/if_dc.c stable/11/sys/dev/dc/if_dcreg.h stable/11/sys/dev/dc/pnphy.c stable/11/sys/dev/dcons/dcons.c stable/11/sys/dev/dcons/dcons.h stable/11/sys/dev/dcons/dcons_crom.c stable/11/sys/dev/dcons/dcons_os.c stable/11/sys/dev/dcons/dcons_os.h stable/11/sys/dev/de/dc21040reg.h stable/11/sys/dev/de/if_de.c stable/11/sys/dev/de/if_devar.h stable/11/sys/dev/dpms/dpms.c stable/11/sys/dev/dpt/dpt.h stable/11/sys/dev/dpt/dpt_pci.c stable/11/sys/dev/dpt/dpt_scsi.c stable/11/sys/dev/drm2/drm_gem.c stable/11/sys/dev/drm2/drm_gem_names.c stable/11/sys/dev/drm2/drm_gem_names.h stable/11/sys/dev/drm2/drm_linux_list_sort.c stable/11/sys/dev/drm2/i915/i915_gem.c stable/11/sys/dev/e1000/e1000_80003es2lan.c stable/11/sys/dev/e1000/e1000_80003es2lan.h stable/11/sys/dev/e1000/e1000_82540.c stable/11/sys/dev/e1000/e1000_82541.c stable/11/sys/dev/e1000/e1000_82541.h stable/11/sys/dev/e1000/e1000_82542.c stable/11/sys/dev/e1000/e1000_82543.c stable/11/sys/dev/e1000/e1000_82543.h stable/11/sys/dev/e1000/e1000_82571.c stable/11/sys/dev/e1000/e1000_82571.h stable/11/sys/dev/e1000/e1000_82575.c stable/11/sys/dev/e1000/e1000_82575.h stable/11/sys/dev/e1000/e1000_api.c stable/11/sys/dev/e1000/e1000_api.h stable/11/sys/dev/e1000/e1000_defines.h stable/11/sys/dev/e1000/e1000_hw.h stable/11/sys/dev/e1000/e1000_i210.c stable/11/sys/dev/e1000/e1000_i210.h stable/11/sys/dev/e1000/e1000_ich8lan.c stable/11/sys/dev/e1000/e1000_ich8lan.h stable/11/sys/dev/e1000/e1000_mac.c stable/11/sys/dev/e1000/e1000_mac.h stable/11/sys/dev/e1000/e1000_manage.c stable/11/sys/dev/e1000/e1000_manage.h stable/11/sys/dev/e1000/e1000_mbx.c stable/11/sys/dev/e1000/e1000_mbx.h stable/11/sys/dev/e1000/e1000_nvm.c stable/11/sys/dev/e1000/e1000_nvm.h stable/11/sys/dev/e1000/e1000_osdep.c stable/11/sys/dev/e1000/e1000_osdep.h stable/11/sys/dev/e1000/e1000_phy.c stable/11/sys/dev/e1000/e1000_phy.h stable/11/sys/dev/e1000/e1000_regs.h stable/11/sys/dev/e1000/e1000_vf.c stable/11/sys/dev/e1000/e1000_vf.h stable/11/sys/dev/e1000/if_em.c stable/11/sys/dev/e1000/if_em.h stable/11/sys/dev/ed/ax88x90reg.h stable/11/sys/dev/ed/dl100xxreg.h stable/11/sys/dev/ed/if_ed.c stable/11/sys/dev/ed/if_ed_3c503.c stable/11/sys/dev/ed/if_ed_hpp.c stable/11/sys/dev/ed/if_ed_isa.c stable/11/sys/dev/ed/if_ed_novell.c stable/11/sys/dev/ed/if_ed_pccard.c stable/11/sys/dev/ed/if_ed_pci.c stable/11/sys/dev/ed/if_ed_rtl80x9.c stable/11/sys/dev/ed/if_ed_sic.c stable/11/sys/dev/ed/if_ed_wd80x3.c stable/11/sys/dev/ed/if_edvar.h stable/11/sys/dev/ed/rtl80x9reg.h stable/11/sys/dev/ed/tc5299jreg.h stable/11/sys/dev/ep/if_ep.c stable/11/sys/dev/ep/if_ep_isa.c stable/11/sys/dev/ep/if_ep_pccard.c stable/11/sys/dev/ep/if_epreg.h stable/11/sys/dev/ep/if_epvar.h stable/11/sys/dev/esp/am53c974reg.h stable/11/sys/dev/esp/esp_pci.c stable/11/sys/dev/esp/esp_sbus.c stable/11/sys/dev/esp/ncr53c9x.c stable/11/sys/dev/esp/ncr53c9xreg.h stable/11/sys/dev/esp/ncr53c9xvar.h stable/11/sys/dev/et/if_et.c stable/11/sys/dev/et/if_etreg.h stable/11/sys/dev/et/if_etvar.h stable/11/sys/dev/etherswitch/arswitch/arswitch.c stable/11/sys/dev/etherswitch/arswitch/arswitch_7240.c stable/11/sys/dev/etherswitch/arswitch/arswitch_7240.h stable/11/sys/dev/etherswitch/arswitch/arswitch_8216.c stable/11/sys/dev/etherswitch/arswitch/arswitch_8216.h stable/11/sys/dev/etherswitch/arswitch/arswitch_8226.c stable/11/sys/dev/etherswitch/arswitch/arswitch_8226.h stable/11/sys/dev/etherswitch/arswitch/arswitch_8316.c stable/11/sys/dev/etherswitch/arswitch/arswitch_8316.h stable/11/sys/dev/etherswitch/arswitch/arswitch_8327.c stable/11/sys/dev/etherswitch/arswitch/arswitch_8327.h stable/11/sys/dev/etherswitch/arswitch/arswitch_9340.c stable/11/sys/dev/etherswitch/arswitch/arswitch_9340.h stable/11/sys/dev/etherswitch/arswitch/arswitch_phy.c stable/11/sys/dev/etherswitch/arswitch/arswitch_phy.h stable/11/sys/dev/etherswitch/arswitch/arswitch_reg.c stable/11/sys/dev/etherswitch/arswitch/arswitch_reg.h stable/11/sys/dev/etherswitch/arswitch/arswitch_vlans.c stable/11/sys/dev/etherswitch/arswitch/arswitch_vlans.h stable/11/sys/dev/etherswitch/arswitch/arswitchreg.h stable/11/sys/dev/etherswitch/arswitch/arswitchvar.h stable/11/sys/dev/etherswitch/etherswitch.c stable/11/sys/dev/etherswitch/ip17x/ip175c.c stable/11/sys/dev/etherswitch/ip17x/ip175c.h stable/11/sys/dev/etherswitch/ip17x/ip175d.c stable/11/sys/dev/etherswitch/ip17x/ip175d.h stable/11/sys/dev/etherswitch/ip17x/ip17x.c stable/11/sys/dev/etherswitch/ip17x/ip17x_phy.c stable/11/sys/dev/etherswitch/ip17x/ip17x_phy.h stable/11/sys/dev/etherswitch/ip17x/ip17x_reg.h stable/11/sys/dev/etherswitch/ip17x/ip17x_var.h stable/11/sys/dev/etherswitch/ip17x/ip17x_vlans.c stable/11/sys/dev/etherswitch/ip17x/ip17x_vlans.h stable/11/sys/dev/etherswitch/miiproxy.c stable/11/sys/dev/etherswitch/miiproxy.h stable/11/sys/dev/etherswitch/rtl8366/rtl8366rb.c stable/11/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h stable/11/sys/dev/etherswitch/ukswitch/ukswitch.c stable/11/sys/dev/ex/if_ex.c stable/11/sys/dev/ex/if_ex_isa.c stable/11/sys/dev/ex/if_ex_pccard.c stable/11/sys/dev/ex/if_exreg.h stable/11/sys/dev/ex/if_exvar.h stable/11/sys/dev/exca/exca.c stable/11/sys/dev/exca/excareg.h stable/11/sys/dev/exca/excavar.h stable/11/sys/dev/fb/creator.c stable/11/sys/dev/fb/creatorreg.h stable/11/sys/dev/fb/fb.c stable/11/sys/dev/fb/fbd.c stable/11/sys/dev/fb/fbreg.h stable/11/sys/dev/fb/gallant12x22.c stable/11/sys/dev/fb/machfb.c stable/11/sys/dev/fb/s3_pci.c stable/11/sys/dev/fb/splash.c stable/11/sys/dev/fb/splash_bmp.c stable/11/sys/dev/fb/splash_pcx.c stable/11/sys/dev/fb/splash_txt.c stable/11/sys/dev/fb/splashreg.h stable/11/sys/dev/fb/vesa.c stable/11/sys/dev/fb/vesa.h stable/11/sys/dev/fb/vga.c stable/11/sys/dev/fb/vgareg.h stable/11/sys/dev/fdc/fdc.c stable/11/sys/dev/fdc/fdc_acpi.c stable/11/sys/dev/fdc/fdc_isa.c stable/11/sys/dev/fdc/fdc_pccard.c stable/11/sys/dev/fdc/fdcvar.h stable/11/sys/dev/fdt/fdt_common.c stable/11/sys/dev/fdt/fdt_common.h stable/11/sys/dev/fdt/fdt_powerpc.c stable/11/sys/dev/fdt/fdt_slicer.c stable/11/sys/dev/fdt/simplebus.c stable/11/sys/dev/ffec/if_ffec.c stable/11/sys/dev/ffec/if_ffecreg.h stable/11/sys/dev/filemon/filemon.c stable/11/sys/dev/filemon/filemon.h stable/11/sys/dev/filemon/filemon_wrapper.c stable/11/sys/dev/firewire/firewire.c stable/11/sys/dev/firewire/firewire.h stable/11/sys/dev/firewire/firewire_phy.h stable/11/sys/dev/firewire/firewirereg.h stable/11/sys/dev/firewire/fwcrom.c stable/11/sys/dev/firewire/fwdev.c stable/11/sys/dev/firewire/fwdma.c stable/11/sys/dev/firewire/fwdma.h stable/11/sys/dev/firewire/fwmem.c stable/11/sys/dev/firewire/fwmem.h stable/11/sys/dev/firewire/fwohci.c stable/11/sys/dev/firewire/fwohci_pci.c stable/11/sys/dev/firewire/fwohcireg.h stable/11/sys/dev/firewire/fwohcivar.h stable/11/sys/dev/firewire/fwphyreg.h stable/11/sys/dev/firewire/iec13213.h stable/11/sys/dev/firewire/iec68113.h stable/11/sys/dev/firewire/if_fwe.c stable/11/sys/dev/firewire/if_fwevar.h stable/11/sys/dev/firewire/if_fwip.c stable/11/sys/dev/firewire/if_fwipvar.h stable/11/sys/dev/firewire/sbp.c stable/11/sys/dev/firewire/sbp.h stable/11/sys/dev/firewire/sbp_targ.c stable/11/sys/dev/flash/at45d.c stable/11/sys/dev/flash/mx25l.c stable/11/sys/dev/flash/mx25lreg.h stable/11/sys/dev/fxp/if_fxp.c stable/11/sys/dev/fxp/if_fxpreg.h stable/11/sys/dev/fxp/if_fxpvar.h stable/11/sys/dev/fxp/inphy.c stable/11/sys/dev/fxp/inphyreg.h stable/11/sys/dev/fxp/rcvbundl.h stable/11/sys/dev/gem/if_gem.c stable/11/sys/dev/gem/if_gem_pci.c stable/11/sys/dev/gem/if_gem_sbus.c stable/11/sys/dev/gem/if_gemreg.h stable/11/sys/dev/gem/if_gemvar.h stable/11/sys/dev/glxiic/glxiic.c stable/11/sys/dev/glxsb/glxsb.h stable/11/sys/dev/glxsb/glxsb_hash.c stable/11/sys/dev/gpio/gpiobus.c stable/11/sys/dev/gpio/gpiobusvar.h stable/11/sys/dev/gpio/gpioc.c stable/11/sys/dev/gpio/gpioiic.c stable/11/sys/dev/gpio/gpioled.c stable/11/sys/dev/gpio/ofw_gpiobus.c stable/11/sys/dev/gxemul/cons/gxemul_cons.c stable/11/sys/dev/gxemul/disk/gxemul_disk.c stable/11/sys/dev/gxemul/disk/gxemul_diskreg.h stable/11/sys/dev/gxemul/ether/gxreg.h stable/11/sys/dev/gxemul/ether/if_gx.c stable/11/sys/dev/hifn/hifn7751.c stable/11/sys/dev/hifn/hifn7751reg.h stable/11/sys/dev/hifn/hifn7751var.h stable/11/sys/dev/hme/if_hme.c stable/11/sys/dev/hme/if_hme_pci.c stable/11/sys/dev/hme/if_hme_sbus.c stable/11/sys/dev/hme/if_hmereg.h stable/11/sys/dev/hme/if_hmevar.h stable/11/sys/dev/hpt27xx/array.h stable/11/sys/dev/hpt27xx/him.h stable/11/sys/dev/hpt27xx/himfuncs.h stable/11/sys/dev/hpt27xx/hpt27xx_config.c stable/11/sys/dev/hpt27xx/hpt27xx_config.h stable/11/sys/dev/hpt27xx/hpt27xx_os_bsd.c stable/11/sys/dev/hpt27xx/hpt27xx_osm_bsd.c stable/11/sys/dev/hpt27xx/hptintf.h stable/11/sys/dev/hpt27xx/ldm.h stable/11/sys/dev/hpt27xx/list.h stable/11/sys/dev/hpt27xx/os_bsd.h stable/11/sys/dev/hpt27xx/osm.h stable/11/sys/dev/hpt27xx/wj.h stable/11/sys/dev/hptiop/hptiop.c stable/11/sys/dev/hptiop/hptiop.h stable/11/sys/dev/hptmv/access601.h stable/11/sys/dev/hptmv/array.h stable/11/sys/dev/hptmv/atapi.h stable/11/sys/dev/hptmv/command.h stable/11/sys/dev/hptmv/entry.c stable/11/sys/dev/hptmv/global.h stable/11/sys/dev/hptmv/gui_lib.c stable/11/sys/dev/hptmv/hptintf.h stable/11/sys/dev/hptmv/hptproc.c stable/11/sys/dev/hptmv/ioctl.c stable/11/sys/dev/hptmv/mv.c stable/11/sys/dev/hptmv/mvOs.h stable/11/sys/dev/hptmv/mvSata.h stable/11/sys/dev/hptmv/mvStorageDev.h stable/11/sys/dev/hptmv/osbsd.h stable/11/sys/dev/hptmv/raid5n.h stable/11/sys/dev/hptmv/vdevice.h stable/11/sys/dev/hptnr/array.h stable/11/sys/dev/hptnr/him.h stable/11/sys/dev/hptnr/himfuncs.h stable/11/sys/dev/hptnr/hptintf.h stable/11/sys/dev/hptnr/hptnr_config.c stable/11/sys/dev/hptnr/hptnr_config.h stable/11/sys/dev/hptnr/hptnr_os_bsd.c stable/11/sys/dev/hptnr/hptnr_osm_bsd.c stable/11/sys/dev/hptnr/ldm.h stable/11/sys/dev/hptnr/list.h stable/11/sys/dev/hptnr/os_bsd.h stable/11/sys/dev/hptnr/osm.h stable/11/sys/dev/hptnr/wj.h stable/11/sys/dev/hptrr/array.h stable/11/sys/dev/hptrr/him.h stable/11/sys/dev/hptrr/himfuncs.h stable/11/sys/dev/hptrr/hptintf.h stable/11/sys/dev/hptrr/hptrr_config.c stable/11/sys/dev/hptrr/hptrr_config.h stable/11/sys/dev/hptrr/hptrr_os_bsd.c stable/11/sys/dev/hptrr/hptrr_osm_bsd.c stable/11/sys/dev/hptrr/ldm.h stable/11/sys/dev/hptrr/list.h stable/11/sys/dev/hptrr/os_bsd.h stable/11/sys/dev/hptrr/osm.h stable/11/sys/dev/hwpmc/hwpmc_amd.c stable/11/sys/dev/hwpmc/hwpmc_amd.h stable/11/sys/dev/hwpmc/hwpmc_arm.c stable/11/sys/dev/hwpmc/hwpmc_core.c stable/11/sys/dev/hwpmc/hwpmc_core.h stable/11/sys/dev/hwpmc/hwpmc_intel.c stable/11/sys/dev/hwpmc/hwpmc_logging.c stable/11/sys/dev/hwpmc/hwpmc_mips.c stable/11/sys/dev/hwpmc/hwpmc_mips24k.c stable/11/sys/dev/hwpmc/hwpmc_mod.c stable/11/sys/dev/hwpmc/hwpmc_mpc7xxx.c stable/11/sys/dev/hwpmc/hwpmc_octeon.c stable/11/sys/dev/hwpmc/hwpmc_pentium.c stable/11/sys/dev/hwpmc/hwpmc_pentium.h stable/11/sys/dev/hwpmc/hwpmc_piv.c stable/11/sys/dev/hwpmc/hwpmc_piv.h stable/11/sys/dev/hwpmc/hwpmc_powerpc.c stable/11/sys/dev/hwpmc/hwpmc_powerpc.h stable/11/sys/dev/hwpmc/hwpmc_ppc970.c stable/11/sys/dev/hwpmc/hwpmc_ppro.c stable/11/sys/dev/hwpmc/hwpmc_ppro.h stable/11/sys/dev/hwpmc/hwpmc_soft.c stable/11/sys/dev/hwpmc/hwpmc_soft.h stable/11/sys/dev/hwpmc/hwpmc_sparc64.c stable/11/sys/dev/hwpmc/hwpmc_tsc.c stable/11/sys/dev/hwpmc/hwpmc_tsc.h stable/11/sys/dev/hwpmc/hwpmc_uncore.c stable/11/sys/dev/hwpmc/hwpmc_uncore.h stable/11/sys/dev/hwpmc/hwpmc_x86.c stable/11/sys/dev/hwpmc/hwpmc_xscale.c stable/11/sys/dev/hwpmc/hwpmc_xscale.h stable/11/sys/dev/hwpmc/pmc_events.h stable/11/sys/dev/hyperv/include/hyperv.h stable/11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c stable/11/sys/dev/hyperv/storvsc/hv_vstorage.h stable/11/sys/dev/hyperv/utilities/hv_kvp.h stable/11/sys/dev/ic/cd1400.h stable/11/sys/dev/ic/cd180.h stable/11/sys/dev/ic/esp.h stable/11/sys/dev/ic/i8253reg.h stable/11/sys/dev/ic/i82586.h stable/11/sys/dev/ic/i8259.h stable/11/sys/dev/ic/nec765.h stable/11/sys/dev/ic/ns16550.h stable/11/sys/dev/ic/quicc.h stable/11/sys/dev/ic/sab82532.h stable/11/sys/dev/ic/via6522reg.h stable/11/sys/dev/ic/z8530.h stable/11/sys/dev/ichwd/ichwd.c stable/11/sys/dev/ichwd/ichwd.h stable/11/sys/dev/ida/ida.c stable/11/sys/dev/ida/ida_disk.c stable/11/sys/dev/ida/ida_pci.c stable/11/sys/dev/ida/idareg.h stable/11/sys/dev/ida/idavar.h stable/11/sys/dev/if_ndis/if_ndis.c stable/11/sys/dev/if_ndis/if_ndis_pccard.c stable/11/sys/dev/if_ndis/if_ndis_pci.c stable/11/sys/dev/if_ndis/if_ndis_usb.c stable/11/sys/dev/if_ndis/if_ndisvar.h stable/11/sys/dev/iicbus/ad7417.c stable/11/sys/dev/iicbus/ad7418.c stable/11/sys/dev/iicbus/adt746x.c stable/11/sys/dev/iicbus/ds1631.c stable/11/sys/dev/iicbus/ds1672.c stable/11/sys/dev/iicbus/ds1775.c stable/11/sys/dev/iicbus/icee.c stable/11/sys/dev/iicbus/if_ic.c stable/11/sys/dev/iicbus/iic.c stable/11/sys/dev/iicbus/iic.h stable/11/sys/dev/iicbus/iicbb.c stable/11/sys/dev/iicbus/iicbus.c stable/11/sys/dev/iicbus/iicbus.h stable/11/sys/dev/iicbus/iicoc.c stable/11/sys/dev/iicbus/iicoc.h stable/11/sys/dev/iicbus/iiconf.c stable/11/sys/dev/iicbus/iiconf.h stable/11/sys/dev/iicbus/iicsmb.c stable/11/sys/dev/iicbus/max6690.c stable/11/sys/dev/iicbus/s35390a.c stable/11/sys/dev/iir/iir.c stable/11/sys/dev/iir/iir.h stable/11/sys/dev/iir/iir_ctrl.c stable/11/sys/dev/iir/iir_pci.c stable/11/sys/dev/io/iodev.c stable/11/sys/dev/io/iodev.h stable/11/sys/dev/ipmi/ipmi.c stable/11/sys/dev/ipmi/ipmi_acpi.c stable/11/sys/dev/ipmi/ipmi_isa.c stable/11/sys/dev/ipmi/ipmi_kcs.c stable/11/sys/dev/ipmi/ipmi_linux.c stable/11/sys/dev/ipmi/ipmi_pci.c stable/11/sys/dev/ipmi/ipmi_smbios.c stable/11/sys/dev/ipmi/ipmi_smbus.c stable/11/sys/dev/ipmi/ipmi_smic.c stable/11/sys/dev/ipmi/ipmi_ssif.c stable/11/sys/dev/ipmi/ipmivars.h stable/11/sys/dev/ips/ips.c stable/11/sys/dev/ips/ips.h stable/11/sys/dev/ips/ips_commands.c stable/11/sys/dev/ips/ips_disk.c stable/11/sys/dev/ips/ips_disk.h stable/11/sys/dev/ips/ips_ioctl.c stable/11/sys/dev/ips/ips_ioctl.h stable/11/sys/dev/ips/ips_pci.c stable/11/sys/dev/ips/ipsreg.h stable/11/sys/dev/ipw/if_ipw.c stable/11/sys/dev/ipw/if_ipwreg.h stable/11/sys/dev/ipw/if_ipwvar.h stable/11/sys/dev/isci/environment.h stable/11/sys/dev/isci/isci.c stable/11/sys/dev/isci/isci.h stable/11/sys/dev/isci/isci_controller.c stable/11/sys/dev/isci/isci_domain.c stable/11/sys/dev/isci/isci_interrupt.c stable/11/sys/dev/isci/isci_io_request.c stable/11/sys/dev/isci/isci_logger.c stable/11/sys/dev/isci/isci_oem_parameters.c stable/11/sys/dev/isci/isci_remote_device.c stable/11/sys/dev/isci/isci_sysctl.c stable/11/sys/dev/isci/isci_task_request.c stable/11/sys/dev/isci/isci_timer.c stable/11/sys/dev/isci/scil/intel_ata.h stable/11/sys/dev/isci/scil/intel_pci.h stable/11/sys/dev/isci/scil/intel_sas.h stable/11/sys/dev/isci/scil/intel_sat.h stable/11/sys/dev/isci/scil/intel_sata.h stable/11/sys/dev/isci/scil/intel_scsi.h stable/11/sys/dev/isci/scil/sati.c stable/11/sys/dev/isci/scil/sati.h stable/11/sys/dev/isci/scil/sati_abort_task_set.c stable/11/sys/dev/isci/scil/sati_abort_task_set.h stable/11/sys/dev/isci/scil/sati_atapi.c stable/11/sys/dev/isci/scil/sati_atapi.h stable/11/sys/dev/isci/scil/sati_callbacks.h stable/11/sys/dev/isci/scil/sati_design.h stable/11/sys/dev/isci/scil/sati_device.c stable/11/sys/dev/isci/scil/sati_device.h stable/11/sys/dev/isci/scil/sati_inquiry.c stable/11/sys/dev/isci/scil/sati_inquiry.h stable/11/sys/dev/isci/scil/sati_log_sense.c stable/11/sys/dev/isci/scil/sati_log_sense.h stable/11/sys/dev/isci/scil/sati_lun_reset.c stable/11/sys/dev/isci/scil/sati_lun_reset.h stable/11/sys/dev/isci/scil/sati_mode_pages.c stable/11/sys/dev/isci/scil/sati_mode_pages.h stable/11/sys/dev/isci/scil/sati_mode_select.c stable/11/sys/dev/isci/scil/sati_mode_select.h stable/11/sys/dev/isci/scil/sati_mode_sense.c stable/11/sys/dev/isci/scil/sati_mode_sense.h stable/11/sys/dev/isci/scil/sati_mode_sense_10.c stable/11/sys/dev/isci/scil/sati_mode_sense_10.h stable/11/sys/dev/isci/scil/sati_mode_sense_6.c stable/11/sys/dev/isci/scil/sati_mode_sense_6.h stable/11/sys/dev/isci/scil/sati_move.c stable/11/sys/dev/isci/scil/sati_move.h stable/11/sys/dev/isci/scil/sati_passthrough.c stable/11/sys/dev/isci/scil/sati_passthrough.h stable/11/sys/dev/isci/scil/sati_read.c stable/11/sys/dev/isci/scil/sati_read.h stable/11/sys/dev/isci/scil/sati_read_buffer.c stable/11/sys/dev/isci/scil/sati_read_buffer.h stable/11/sys/dev/isci/scil/sati_read_capacity.c stable/11/sys/dev/isci/scil/sati_read_capacity.h stable/11/sys/dev/isci/scil/sati_reassign_blocks.c stable/11/sys/dev/isci/scil/sati_reassign_blocks.h stable/11/sys/dev/isci/scil/sati_report_luns.c stable/11/sys/dev/isci/scil/sati_report_luns.h stable/11/sys/dev/isci/scil/sati_request_sense.c stable/11/sys/dev/isci/scil/sati_request_sense.h stable/11/sys/dev/isci/scil/sati_start_stop_unit.c stable/11/sys/dev/isci/scil/sati_start_stop_unit.h stable/11/sys/dev/isci/scil/sati_synchronize_cache.c stable/11/sys/dev/isci/scil/sati_synchronize_cache.h stable/11/sys/dev/isci/scil/sati_test_unit_ready.c stable/11/sys/dev/isci/scil/sati_test_unit_ready.h stable/11/sys/dev/isci/scil/sati_translator_sequence.h stable/11/sys/dev/isci/scil/sati_types.h stable/11/sys/dev/isci/scil/sati_unmap.c stable/11/sys/dev/isci/scil/sati_unmap.h stable/11/sys/dev/isci/scil/sati_util.c stable/11/sys/dev/isci/scil/sati_util.h stable/11/sys/dev/isci/scil/sati_verify.c stable/11/sys/dev/isci/scil/sati_verify.h stable/11/sys/dev/isci/scil/sati_write.c stable/11/sys/dev/isci/scil/sati_write.h stable/11/sys/dev/isci/scil/sati_write_and_verify.c stable/11/sys/dev/isci/scil/sati_write_and_verify.h stable/11/sys/dev/isci/scil/sati_write_buffer.c stable/11/sys/dev/isci/scil/sati_write_buffer.h stable/11/sys/dev/isci/scil/sati_write_long.c stable/11/sys/dev/isci/scil/sati_write_long.h stable/11/sys/dev/isci/scil/sci_abstract_list.c stable/11/sys/dev/isci/scil/sci_abstract_list.h stable/11/sys/dev/isci/scil/sci_base_controller.c stable/11/sys/dev/isci/scil/sci_base_controller.h stable/11/sys/dev/isci/scil/sci_base_domain.c stable/11/sys/dev/isci/scil/sci_base_domain.h stable/11/sys/dev/isci/scil/sci_base_iterator.c stable/11/sys/dev/isci/scil/sci_base_iterator.h stable/11/sys/dev/isci/scil/sci_base_library.c stable/11/sys/dev/isci/scil/sci_base_library.h stable/11/sys/dev/isci/scil/sci_base_logger.c stable/11/sys/dev/isci/scil/sci_base_logger.h stable/11/sys/dev/isci/scil/sci_base_memory_descriptor_list.c stable/11/sys/dev/isci/scil/sci_base_memory_descriptor_list.h stable/11/sys/dev/isci/scil/sci_base_memory_descriptor_list_decorator.c stable/11/sys/dev/isci/scil/sci_base_object.c stable/11/sys/dev/isci/scil/sci_base_object.h stable/11/sys/dev/isci/scil/sci_base_observer.c stable/11/sys/dev/isci/scil/sci_base_observer.h stable/11/sys/dev/isci/scil/sci_base_phy.c stable/11/sys/dev/isci/scil/sci_base_phy.h stable/11/sys/dev/isci/scil/sci_base_port.c stable/11/sys/dev/isci/scil/sci_base_port.h stable/11/sys/dev/isci/scil/sci_base_remote_device.c stable/11/sys/dev/isci/scil/sci_base_remote_device.h stable/11/sys/dev/isci/scil/sci_base_request.c stable/11/sys/dev/isci/scil/sci_base_request.h stable/11/sys/dev/isci/scil/sci_base_state.h stable/11/sys/dev/isci/scil/sci_base_state_machine.c stable/11/sys/dev/isci/scil/sci_base_state_machine.h stable/11/sys/dev/isci/scil/sci_base_state_machine_logger.c stable/11/sys/dev/isci/scil/sci_base_state_machine_logger.h stable/11/sys/dev/isci/scil/sci_base_state_machine_observer.c stable/11/sys/dev/isci/scil/sci_base_state_machine_observer.h stable/11/sys/dev/isci/scil/sci_base_subject.c stable/11/sys/dev/isci/scil/sci_base_subject.h stable/11/sys/dev/isci/scil/sci_controller.h stable/11/sys/dev/isci/scil/sci_controller_constants.h stable/11/sys/dev/isci/scil/sci_fast_list.h stable/11/sys/dev/isci/scil/sci_iterator.h stable/11/sys/dev/isci/scil/sci_library.h stable/11/sys/dev/isci/scil/sci_logger.h stable/11/sys/dev/isci/scil/sci_memory_descriptor_list.h stable/11/sys/dev/isci/scil/sci_memory_descriptor_list_decorator.h stable/11/sys/dev/isci/scil/sci_object.h stable/11/sys/dev/isci/scil/sci_overview.h stable/11/sys/dev/isci/scil/sci_pool.h stable/11/sys/dev/isci/scil/sci_simple_list.h stable/11/sys/dev/isci/scil/sci_status.h stable/11/sys/dev/isci/scil/sci_types.h stable/11/sys/dev/isci/scil/sci_util.c stable/11/sys/dev/isci/scil/sci_util.h stable/11/sys/dev/isci/scil/scic_config_parameters.h stable/11/sys/dev/isci/scil/scic_controller.h stable/11/sys/dev/isci/scil/scic_io_request.h stable/11/sys/dev/isci/scil/scic_library.h stable/11/sys/dev/isci/scil/scic_logger.h stable/11/sys/dev/isci/scil/scic_overview.h stable/11/sys/dev/isci/scil/scic_phy.h stable/11/sys/dev/isci/scil/scic_port.h stable/11/sys/dev/isci/scil/scic_remote_device.h stable/11/sys/dev/isci/scil/scic_sds_controller.c stable/11/sys/dev/isci/scil/scic_sds_controller.h stable/11/sys/dev/isci/scil/scic_sds_controller_registers.h stable/11/sys/dev/isci/scil/scic_sds_library.c stable/11/sys/dev/isci/scil/scic_sds_library.h stable/11/sys/dev/isci/scil/scic_sds_logger.h stable/11/sys/dev/isci/scil/scic_sds_pci.c stable/11/sys/dev/isci/scil/scic_sds_pci.h stable/11/sys/dev/isci/scil/scic_sds_phy.c stable/11/sys/dev/isci/scil/scic_sds_phy.h stable/11/sys/dev/isci/scil/scic_sds_phy_registers.h stable/11/sys/dev/isci/scil/scic_sds_port.c stable/11/sys/dev/isci/scil/scic_sds_port.h stable/11/sys/dev/isci/scil/scic_sds_port_configuration_agent.c stable/11/sys/dev/isci/scil/scic_sds_port_configuration_agent.h stable/11/sys/dev/isci/scil/scic_sds_port_registers.h stable/11/sys/dev/isci/scil/scic_sds_remote_device.c stable/11/sys/dev/isci/scil/scic_sds_remote_device.h stable/11/sys/dev/isci/scil/scic_sds_remote_node_context.c stable/11/sys/dev/isci/scil/scic_sds_remote_node_context.h stable/11/sys/dev/isci/scil/scic_sds_remote_node_table.c stable/11/sys/dev/isci/scil/scic_sds_remote_node_table.h stable/11/sys/dev/isci/scil/scic_sds_request.c stable/11/sys/dev/isci/scil/scic_sds_request.h stable/11/sys/dev/isci/scil/scic_sds_sgpio.c stable/11/sys/dev/isci/scil/scic_sds_smp_remote_device.c stable/11/sys/dev/isci/scil/scic_sds_smp_request.c stable/11/sys/dev/isci/scil/scic_sds_smp_request.h stable/11/sys/dev/isci/scil/scic_sds_ssp_request.c stable/11/sys/dev/isci/scil/scic_sds_stp_packet_request.c stable/11/sys/dev/isci/scil/scic_sds_stp_packet_request.h stable/11/sys/dev/isci/scil/scic_sds_stp_pio_request.h stable/11/sys/dev/isci/scil/scic_sds_stp_remote_device.c stable/11/sys/dev/isci/scil/scic_sds_stp_request.c stable/11/sys/dev/isci/scil/scic_sds_stp_request.h stable/11/sys/dev/isci/scil/scic_sds_unsolicited_frame_control.c stable/11/sys/dev/isci/scil/scic_sds_unsolicited_frame_control.h stable/11/sys/dev/isci/scil/scic_sgpio.h stable/11/sys/dev/isci/scil/scic_task_request.h stable/11/sys/dev/isci/scil/scic_user_callback.h stable/11/sys/dev/isci/scil/scif_config_parameters.h stable/11/sys/dev/isci/scil/scif_controller.h stable/11/sys/dev/isci/scil/scif_domain.h stable/11/sys/dev/isci/scil/scif_io_request.h stable/11/sys/dev/isci/scil/scif_library.h stable/11/sys/dev/isci/scil/scif_logger.h stable/11/sys/dev/isci/scil/scif_overview.h stable/11/sys/dev/isci/scil/scif_remote_device.h stable/11/sys/dev/isci/scil/scif_sas_constants.h stable/11/sys/dev/isci/scil/scif_sas_controller.c stable/11/sys/dev/isci/scil/scif_sas_controller.h stable/11/sys/dev/isci/scil/scif_sas_controller_state_handlers.c stable/11/sys/dev/isci/scil/scif_sas_controller_states.c stable/11/sys/dev/isci/scil/scif_sas_design.h stable/11/sys/dev/isci/scil/scif_sas_domain.c stable/11/sys/dev/isci/scil/scif_sas_domain.h stable/11/sys/dev/isci/scil/scif_sas_domain_state_handlers.c stable/11/sys/dev/isci/scil/scif_sas_domain_states.c stable/11/sys/dev/isci/scil/scif_sas_high_priority_request_queue.c stable/11/sys/dev/isci/scil/scif_sas_high_priority_request_queue.h stable/11/sys/dev/isci/scil/scif_sas_internal_io_request.c stable/11/sys/dev/isci/scil/scif_sas_internal_io_request.h stable/11/sys/dev/isci/scil/scif_sas_io_request.c stable/11/sys/dev/isci/scil/scif_sas_io_request.h stable/11/sys/dev/isci/scil/scif_sas_io_request_state_handlers.c stable/11/sys/dev/isci/scil/scif_sas_io_request_states.c stable/11/sys/dev/isci/scil/scif_sas_library.c stable/11/sys/dev/isci/scil/scif_sas_library.h stable/11/sys/dev/isci/scil/scif_sas_logger.h stable/11/sys/dev/isci/scil/scif_sas_remote_device.c stable/11/sys/dev/isci/scil/scif_sas_remote_device.h stable/11/sys/dev/isci/scil/scif_sas_remote_device_ready_substate_handlers.c stable/11/sys/dev/isci/scil/scif_sas_remote_device_ready_substates.c stable/11/sys/dev/isci/scil/scif_sas_remote_device_starting_substate_handlers.c stable/11/sys/dev/isci/scil/scif_sas_remote_device_starting_substates.c stable/11/sys/dev/isci/scil/scif_sas_remote_device_state_handlers.c stable/11/sys/dev/isci/scil/scif_sas_remote_device_states.c stable/11/sys/dev/isci/scil/scif_sas_request.c stable/11/sys/dev/isci/scil/scif_sas_request.h stable/11/sys/dev/isci/scil/scif_sas_sati_binding.h stable/11/sys/dev/isci/scil/scif_sas_smp_activity_clear_affiliation.c stable/11/sys/dev/isci/scil/scif_sas_smp_io_request.c stable/11/sys/dev/isci/scil/scif_sas_smp_io_request.h stable/11/sys/dev/isci/scil/scif_sas_smp_phy.c stable/11/sys/dev/isci/scil/scif_sas_smp_phy.h stable/11/sys/dev/isci/scil/scif_sas_smp_remote_device.c stable/11/sys/dev/isci/scil/scif_sas_smp_remote_device.h stable/11/sys/dev/isci/scil/scif_sas_stp_io_request.c stable/11/sys/dev/isci/scil/scif_sas_stp_io_request.h stable/11/sys/dev/isci/scil/scif_sas_stp_remote_device.c stable/11/sys/dev/isci/scil/scif_sas_stp_remote_device.h stable/11/sys/dev/isci/scil/scif_sas_stp_task_request.c stable/11/sys/dev/isci/scil/scif_sas_stp_task_request.h stable/11/sys/dev/isci/scil/scif_sas_task_request.c stable/11/sys/dev/isci/scil/scif_sas_task_request.h stable/11/sys/dev/isci/scil/scif_sas_task_request_state_handlers.c stable/11/sys/dev/isci/scil/scif_sas_task_request_states.c stable/11/sys/dev/isci/scil/scif_sas_timer.c stable/11/sys/dev/isci/scil/scif_task_request.h stable/11/sys/dev/isci/scil/scif_user_callback.h stable/11/sys/dev/isci/scil/scu_bios_definitions.h stable/11/sys/dev/isci/scil/scu_completion_codes.h stable/11/sys/dev/isci/scil/scu_constants.h stable/11/sys/dev/isci/scil/scu_event_codes.h stable/11/sys/dev/isci/scil/scu_registers.h stable/11/sys/dev/isci/scil/scu_remote_node_context.h stable/11/sys/dev/isci/scil/scu_task_context.h stable/11/sys/dev/isci/scil/scu_unsolicited_frame.h stable/11/sys/dev/isci/scil/scu_viit_data.h stable/11/sys/dev/isci/types.h stable/11/sys/dev/iscsi/icl.c stable/11/sys/dev/iscsi/icl.h stable/11/sys/dev/iscsi/iscsi.c stable/11/sys/dev/iscsi/iscsi.h stable/11/sys/dev/iscsi/iscsi_ioctl.h stable/11/sys/dev/iscsi/iscsi_proto.h stable/11/sys/dev/iscsi_initiator/isc_cam.c stable/11/sys/dev/iscsi_initiator/isc_sm.c stable/11/sys/dev/iscsi_initiator/isc_soc.c stable/11/sys/dev/iscsi_initiator/isc_subr.c stable/11/sys/dev/iscsi_initiator/iscsi.c stable/11/sys/dev/iscsi_initiator/iscsi.h stable/11/sys/dev/iscsi_initiator/iscsi_subr.c stable/11/sys/dev/iscsi_initiator/iscsivar.h stable/11/sys/dev/isp/isp_freebsd.c stable/11/sys/dev/isp/isp_freebsd.h stable/11/sys/dev/isp/isp_ioctl.h stable/11/sys/dev/isp/isp_library.c stable/11/sys/dev/isp/isp_library.h stable/11/sys/dev/isp/isp_sbus.c stable/11/sys/dev/isp/isp_stds.h stable/11/sys/dev/isp/isp_target.c stable/11/sys/dev/isp/isp_target.h stable/11/sys/dev/isp/ispreg.h stable/11/sys/dev/ispfw/asm_1000.h stable/11/sys/dev/ispfw/asm_1040.h stable/11/sys/dev/ispfw/asm_1080.h stable/11/sys/dev/ispfw/asm_12160.h stable/11/sys/dev/ispfw/asm_2100.h stable/11/sys/dev/ispfw/asm_2200.h stable/11/sys/dev/ispfw/asm_2300.h stable/11/sys/dev/ispfw/asm_2322.h stable/11/sys/dev/ispfw/asm_2400.h stable/11/sys/dev/ispfw/asm_2500.h stable/11/sys/dev/ispfw/ispfw.c stable/11/sys/dev/iwi/if_iwi.c stable/11/sys/dev/iwi/if_iwireg.h stable/11/sys/dev/iwi/if_iwivar.h stable/11/sys/dev/ixgb/if_ixgb.c stable/11/sys/dev/ixgb/if_ixgb.h stable/11/sys/dev/ixgb/if_ixgb_osdep.h stable/11/sys/dev/ixgb/ixgb_ee.c stable/11/sys/dev/ixgb/ixgb_ee.h stable/11/sys/dev/ixgb/ixgb_hw.c stable/11/sys/dev/ixgb/ixgb_hw.h stable/11/sys/dev/ixgb/ixgb_ids.h stable/11/sys/dev/ixgbe/ixgbe.h stable/11/sys/dev/ixgbe/ixgbe_82598.c stable/11/sys/dev/ixgbe/ixgbe_82598.h stable/11/sys/dev/ixgbe/ixgbe_82599.c stable/11/sys/dev/ixgbe/ixgbe_82599.h stable/11/sys/dev/ixgbe/ixgbe_api.c stable/11/sys/dev/ixgbe/ixgbe_api.h stable/11/sys/dev/ixgbe/ixgbe_common.c stable/11/sys/dev/ixgbe/ixgbe_common.h stable/11/sys/dev/ixgbe/ixgbe_dcb.c stable/11/sys/dev/ixgbe/ixgbe_dcb.h stable/11/sys/dev/ixgbe/ixgbe_dcb_82598.c stable/11/sys/dev/ixgbe/ixgbe_dcb_82598.h stable/11/sys/dev/ixgbe/ixgbe_dcb_82599.c stable/11/sys/dev/ixgbe/ixgbe_dcb_82599.h stable/11/sys/dev/ixgbe/ixgbe_mbx.c stable/11/sys/dev/ixgbe/ixgbe_mbx.h stable/11/sys/dev/ixgbe/ixgbe_osdep.h stable/11/sys/dev/ixgbe/ixgbe_phy.c stable/11/sys/dev/ixgbe/ixgbe_phy.h stable/11/sys/dev/ixgbe/ixgbe_type.h stable/11/sys/dev/ixgbe/ixgbe_vf.c stable/11/sys/dev/ixgbe/ixgbe_vf.h stable/11/sys/dev/ixgbe/ixgbe_x540.c stable/11/sys/dev/ixgbe/ixgbe_x540.h stable/11/sys/dev/jme/if_jme.c stable/11/sys/dev/jme/if_jmereg.h stable/11/sys/dev/jme/if_jmevar.h stable/11/sys/dev/joy/joy.c stable/11/sys/dev/joy/joy_isa.c stable/11/sys/dev/joy/joyvar.h stable/11/sys/dev/kbd/kbd.c stable/11/sys/dev/kbd/kbdreg.h stable/11/sys/dev/kbd/kbdtables.h stable/11/sys/dev/kbdmux/kbdmux.c stable/11/sys/dev/ksyms/ksyms.c stable/11/sys/dev/le/am7990.c stable/11/sys/dev/le/am79900.c stable/11/sys/dev/le/am79900reg.h stable/11/sys/dev/le/am79900var.h stable/11/sys/dev/le/am7990reg.h stable/11/sys/dev/le/am7990var.h stable/11/sys/dev/le/if_le_isa.c stable/11/sys/dev/le/if_le_lebuffer.c stable/11/sys/dev/le/if_le_ledma.c stable/11/sys/dev/le/if_le_pci.c stable/11/sys/dev/le/lance.c stable/11/sys/dev/le/lancereg.h stable/11/sys/dev/le/lancevar.h stable/11/sys/dev/le/lebuffer_sbus.c stable/11/sys/dev/lge/if_lge.c stable/11/sys/dev/lge/if_lgereg.h stable/11/sys/dev/lmc/if_lmc.c stable/11/sys/dev/lmc/if_lmc.h stable/11/sys/dev/malo/if_malo.c stable/11/sys/dev/malo/if_malo.h stable/11/sys/dev/malo/if_malo_pci.c stable/11/sys/dev/malo/if_malohal.c stable/11/sys/dev/malo/if_malohal.h stable/11/sys/dev/malo/if_maloioctl.h stable/11/sys/dev/mc146818/mc146818.c stable/11/sys/dev/mc146818/mc146818var.h stable/11/sys/dev/md/md.c stable/11/sys/dev/mem/memdev.c stable/11/sys/dev/mem/memutil.c stable/11/sys/dev/mfi/mfi.c stable/11/sys/dev/mfi/mfi_cam.c stable/11/sys/dev/mfi/mfi_debug.c stable/11/sys/dev/mfi/mfi_disk.c stable/11/sys/dev/mfi/mfi_ioctl.h stable/11/sys/dev/mfi/mfi_linux.c stable/11/sys/dev/mfi/mfi_pci.c stable/11/sys/dev/mfi/mfi_syspd.c stable/11/sys/dev/mfi/mfi_tbolt.c stable/11/sys/dev/mfi/mfireg.h stable/11/sys/dev/mfi/mfivar.h stable/11/sys/dev/mge/if_mge.c stable/11/sys/dev/mge/if_mgevar.h stable/11/sys/dev/mii/acphy.c stable/11/sys/dev/mii/acphyreg.h stable/11/sys/dev/mii/amphy.c stable/11/sys/dev/mii/amphyreg.h stable/11/sys/dev/mii/atphy.c stable/11/sys/dev/mii/atphyreg.h stable/11/sys/dev/mii/axphy.c stable/11/sys/dev/mii/bmtphy.c stable/11/sys/dev/mii/bmtphyreg.h stable/11/sys/dev/mii/brgphy.c stable/11/sys/dev/mii/brgphyreg.h stable/11/sys/dev/mii/ciphy.c stable/11/sys/dev/mii/ciphyreg.h stable/11/sys/dev/mii/e1000phy.c stable/11/sys/dev/mii/e1000phyreg.h stable/11/sys/dev/mii/gentbi.c stable/11/sys/dev/mii/icsphy.c stable/11/sys/dev/mii/icsphyreg.h stable/11/sys/dev/mii/ip1000phy.c stable/11/sys/dev/mii/ip1000phyreg.h stable/11/sys/dev/mii/jmphy.c stable/11/sys/dev/mii/jmphyreg.h stable/11/sys/dev/mii/lxtphy.c stable/11/sys/dev/mii/lxtphyreg.h stable/11/sys/dev/mii/mii.c stable/11/sys/dev/mii/mii.h stable/11/sys/dev/mii/mii_bitbang.c stable/11/sys/dev/mii/mii_bitbang.h stable/11/sys/dev/mii/mii_physubr.c stable/11/sys/dev/mii/miivar.h stable/11/sys/dev/mii/mlphy.c stable/11/sys/dev/mii/nsgphy.c stable/11/sys/dev/mii/nsgphyreg.h stable/11/sys/dev/mii/nsphy.c stable/11/sys/dev/mii/nsphyreg.h stable/11/sys/dev/mii/nsphyter.c stable/11/sys/dev/mii/nsphyterreg.h stable/11/sys/dev/mii/pnaphy.c stable/11/sys/dev/mii/qsphy.c stable/11/sys/dev/mii/qsphyreg.h stable/11/sys/dev/mii/rdcphy.c stable/11/sys/dev/mii/rdcphyreg.h stable/11/sys/dev/mii/rgephy.c stable/11/sys/dev/mii/rgephyreg.h stable/11/sys/dev/mii/rlphy.c stable/11/sys/dev/mii/rlswitch.c stable/11/sys/dev/mii/smcphy.c stable/11/sys/dev/mii/smscphy.c stable/11/sys/dev/mii/tdkphy.c stable/11/sys/dev/mii/tdkphyreg.h stable/11/sys/dev/mii/tlphy.c stable/11/sys/dev/mii/tlphyreg.h stable/11/sys/dev/mii/truephy.c stable/11/sys/dev/mii/truephyreg.h stable/11/sys/dev/mii/ukphy.c stable/11/sys/dev/mii/ukphy_subr.c stable/11/sys/dev/mii/xmphy.c stable/11/sys/dev/mii/xmphyreg.h stable/11/sys/dev/mk48txx/mk48txx.c stable/11/sys/dev/mk48txx/mk48txxreg.h stable/11/sys/dev/mk48txx/mk48txxvar.h stable/11/sys/dev/mlx/mlx.c stable/11/sys/dev/mlx/mlx_disk.c stable/11/sys/dev/mlx/mlx_pci.c stable/11/sys/dev/mlx/mlxio.h stable/11/sys/dev/mlx/mlxreg.h stable/11/sys/dev/mlx/mlxvar.h stable/11/sys/dev/mly/mly.c stable/11/sys/dev/mly/mly_tables.h stable/11/sys/dev/mly/mlyio.h stable/11/sys/dev/mly/mlyreg.h stable/11/sys/dev/mly/mlyvar.h stable/11/sys/dev/mmc/bridge.h stable/11/sys/dev/mmc/mmc.c stable/11/sys/dev/mmc/mmcbrvar.h stable/11/sys/dev/mmc/mmcreg.h stable/11/sys/dev/mmc/mmcsd.c stable/11/sys/dev/mmc/mmcvar.h stable/11/sys/dev/mps/mpi/mpi2.h stable/11/sys/dev/mps/mpi/mpi2_cnfg.h stable/11/sys/dev/mps/mpi/mpi2_hbd.h stable/11/sys/dev/mps/mpi/mpi2_init.h stable/11/sys/dev/mps/mpi/mpi2_ioc.h stable/11/sys/dev/mps/mpi/mpi2_ra.h stable/11/sys/dev/mps/mpi/mpi2_raid.h stable/11/sys/dev/mps/mpi/mpi2_sas.h stable/11/sys/dev/mps/mpi/mpi2_targ.h stable/11/sys/dev/mps/mpi/mpi2_tool.h stable/11/sys/dev/mps/mpi/mpi2_type.h stable/11/sys/dev/mps/mps.c stable/11/sys/dev/mps/mps_config.c stable/11/sys/dev/mps/mps_ioctl.h stable/11/sys/dev/mps/mps_mapping.c stable/11/sys/dev/mps/mps_mapping.h stable/11/sys/dev/mps/mps_pci.c stable/11/sys/dev/mps/mps_sas.c stable/11/sys/dev/mps/mps_sas.h stable/11/sys/dev/mps/mps_sas_lsi.c stable/11/sys/dev/mps/mps_table.c stable/11/sys/dev/mps/mps_table.h stable/11/sys/dev/mps/mps_user.c stable/11/sys/dev/mps/mpsvar.h stable/11/sys/dev/mpt/mpilib/mpi.h stable/11/sys/dev/mpt/mpilib/mpi_cnfg.h stable/11/sys/dev/mpt/mpilib/mpi_fc.h stable/11/sys/dev/mpt/mpilib/mpi_init.h stable/11/sys/dev/mpt/mpilib/mpi_ioc.h stable/11/sys/dev/mpt/mpilib/mpi_lan.h stable/11/sys/dev/mpt/mpilib/mpi_log_fc.h stable/11/sys/dev/mpt/mpilib/mpi_log_sas.h stable/11/sys/dev/mpt/mpilib/mpi_raid.h stable/11/sys/dev/mpt/mpilib/mpi_sas.h stable/11/sys/dev/mpt/mpilib/mpi_targ.h stable/11/sys/dev/mpt/mpilib/mpi_tool.h stable/11/sys/dev/mpt/mpilib/mpi_type.h stable/11/sys/dev/mpt/mpt.c stable/11/sys/dev/mpt/mpt.h stable/11/sys/dev/mpt/mpt_cam.c stable/11/sys/dev/mpt/mpt_cam.h stable/11/sys/dev/mpt/mpt_debug.c stable/11/sys/dev/mpt/mpt_pci.c stable/11/sys/dev/mpt/mpt_raid.c stable/11/sys/dev/mpt/mpt_raid.h stable/11/sys/dev/mpt/mpt_reg.h stable/11/sys/dev/mpt/mpt_user.c stable/11/sys/dev/mse/mse.c stable/11/sys/dev/mse/mse_isa.c stable/11/sys/dev/mse/msevar.h stable/11/sys/dev/msk/if_msk.c stable/11/sys/dev/msk/if_mskreg.h stable/11/sys/dev/mvs/mvs.c stable/11/sys/dev/mvs/mvs.h stable/11/sys/dev/mvs/mvs_pci.c stable/11/sys/dev/mvs/mvs_soc.c stable/11/sys/dev/mwl/if_mwl.c stable/11/sys/dev/mwl/if_mwl_pci.c stable/11/sys/dev/mwl/if_mwlioctl.h stable/11/sys/dev/mwl/if_mwlvar.h stable/11/sys/dev/mwl/mwldiag.h stable/11/sys/dev/mwl/mwlhal.c stable/11/sys/dev/mwl/mwlhal.h stable/11/sys/dev/mwl/mwlreg.h stable/11/sys/dev/mxge/eth_z8e.h stable/11/sys/dev/mxge/ethp_z8e.h stable/11/sys/dev/mxge/if_mxge.c stable/11/sys/dev/mxge/if_mxge_var.h stable/11/sys/dev/mxge/mcp_gen_header.h stable/11/sys/dev/mxge/mxge_mcp.h stable/11/sys/dev/mxge/rss_eth_z8e.h stable/11/sys/dev/mxge/rss_ethp_z8e.h stable/11/sys/dev/my/if_my.c stable/11/sys/dev/my/if_myreg.h stable/11/sys/dev/nand/nand.c stable/11/sys/dev/nand/nand.h stable/11/sys/dev/nand/nand_bbt.c stable/11/sys/dev/nand/nand_cdev.c stable/11/sys/dev/nand/nand_dev.h stable/11/sys/dev/nand/nand_ecc_pos.h stable/11/sys/dev/nand/nand_generic.c stable/11/sys/dev/nand/nand_geom.c stable/11/sys/dev/nand/nand_id.c stable/11/sys/dev/nand/nandbus.c stable/11/sys/dev/nand/nandbus.h stable/11/sys/dev/nand/nandsim.c stable/11/sys/dev/nand/nandsim.h stable/11/sys/dev/nand/nandsim_chip.c stable/11/sys/dev/nand/nandsim_chip.h stable/11/sys/dev/nand/nandsim_ctrl.c stable/11/sys/dev/nand/nandsim_log.c stable/11/sys/dev/nand/nandsim_log.h stable/11/sys/dev/nand/nandsim_swap.c stable/11/sys/dev/nand/nandsim_swap.h stable/11/sys/dev/nand/nfc_at91.c stable/11/sys/dev/nand/nfc_at91.h stable/11/sys/dev/nand/nfc_fsl.c stable/11/sys/dev/nand/nfc_fsl.h stable/11/sys/dev/nand/nfc_mv.c stable/11/sys/dev/ncv/ncr53c500.c stable/11/sys/dev/ncv/ncr53c500_pccard.c stable/11/sys/dev/ncv/ncr53c500hw.h stable/11/sys/dev/ncv/ncr53c500hwtab.h stable/11/sys/dev/ncv/ncr53c500reg.h stable/11/sys/dev/ncv/ncr53c500var.h stable/11/sys/dev/netmap/if_em_netmap.h stable/11/sys/dev/netmap/if_igb_netmap.h stable/11/sys/dev/netmap/if_lem_netmap.h stable/11/sys/dev/netmap/if_re_netmap.h stable/11/sys/dev/netmap/ixgbe_netmap.h stable/11/sys/dev/netmap/netmap.c stable/11/sys/dev/netmap/netmap_freebsd.c stable/11/sys/dev/netmap/netmap_generic.c stable/11/sys/dev/netmap/netmap_kern.h stable/11/sys/dev/netmap/netmap_mbq.c stable/11/sys/dev/netmap/netmap_mbq.h stable/11/sys/dev/netmap/netmap_mem2.c stable/11/sys/dev/netmap/netmap_mem2.h stable/11/sys/dev/netmap/netmap_offloadings.c stable/11/sys/dev/netmap/netmap_pipe.c stable/11/sys/dev/netmap/netmap_vale.c stable/11/sys/dev/nge/if_nge.c stable/11/sys/dev/nge/if_ngereg.h stable/11/sys/dev/nmdm/nmdm.c stable/11/sys/dev/nsp/nsp.c stable/11/sys/dev/nsp/nsp_pccard.c stable/11/sys/dev/nsp/nspreg.h stable/11/sys/dev/nsp/nspvar.h stable/11/sys/dev/null/null.c stable/11/sys/dev/nvd/nvd.c stable/11/sys/dev/nvme/nvme.c stable/11/sys/dev/nvme/nvme.h stable/11/sys/dev/nvme/nvme_ctrlr.c stable/11/sys/dev/nvme/nvme_ctrlr_cmd.c stable/11/sys/dev/nvme/nvme_ns.c stable/11/sys/dev/nvme/nvme_ns_cmd.c stable/11/sys/dev/nvme/nvme_private.h stable/11/sys/dev/nvme/nvme_qpair.c stable/11/sys/dev/nvme/nvme_sysctl.c stable/11/sys/dev/nvme/nvme_test.c stable/11/sys/dev/nvme/nvme_util.c stable/11/sys/dev/nvram/nvram.c stable/11/sys/dev/nvram2env/nvram2env.c stable/11/sys/dev/nxge/if_nxge.c stable/11/sys/dev/nxge/if_nxge.h stable/11/sys/dev/nxge/include/version.h stable/11/sys/dev/nxge/include/xge-debug.h stable/11/sys/dev/nxge/include/xge-defs.h stable/11/sys/dev/nxge/include/xge-list.h stable/11/sys/dev/nxge/include/xge-os-pal.h stable/11/sys/dev/nxge/include/xge-queue.h stable/11/sys/dev/nxge/include/xgehal-channel.h stable/11/sys/dev/nxge/include/xgehal-config.h stable/11/sys/dev/nxge/include/xgehal-device.h stable/11/sys/dev/nxge/include/xgehal-driver.h stable/11/sys/dev/nxge/include/xgehal-event.h stable/11/sys/dev/nxge/include/xgehal-fifo.h stable/11/sys/dev/nxge/include/xgehal-mgmt.h stable/11/sys/dev/nxge/include/xgehal-mgmtaux.h stable/11/sys/dev/nxge/include/xgehal-mm.h stable/11/sys/dev/nxge/include/xgehal-regs.h stable/11/sys/dev/nxge/include/xgehal-ring.h stable/11/sys/dev/nxge/include/xgehal-stats.h stable/11/sys/dev/nxge/include/xgehal-types.h stable/11/sys/dev/nxge/include/xgehal.h stable/11/sys/dev/nxge/xge-osdep.h stable/11/sys/dev/nxge/xgehal/xge-queue.c stable/11/sys/dev/nxge/xgehal/xgehal-channel-fp.c stable/11/sys/dev/nxge/xgehal/xgehal-channel.c stable/11/sys/dev/nxge/xgehal/xgehal-config.c stable/11/sys/dev/nxge/xgehal/xgehal-device-fp.c stable/11/sys/dev/nxge/xgehal/xgehal-device.c stable/11/sys/dev/nxge/xgehal/xgehal-driver.c stable/11/sys/dev/nxge/xgehal/xgehal-fifo-fp.c stable/11/sys/dev/nxge/xgehal/xgehal-fifo.c stable/11/sys/dev/nxge/xgehal/xgehal-mgmt.c stable/11/sys/dev/nxge/xgehal/xgehal-mgmtaux.c stable/11/sys/dev/nxge/xgehal/xgehal-mm.c stable/11/sys/dev/nxge/xgehal/xgehal-ring-fp.c stable/11/sys/dev/nxge/xgehal/xgehal-ring.c stable/11/sys/dev/nxge/xgehal/xgehal-stats.c stable/11/sys/dev/nxge/xgell-version.h stable/11/sys/dev/oce/oce_hw.c stable/11/sys/dev/oce/oce_hw.h stable/11/sys/dev/oce/oce_if.c stable/11/sys/dev/oce/oce_if.h stable/11/sys/dev/oce/oce_mbox.c stable/11/sys/dev/oce/oce_queue.c stable/11/sys/dev/oce/oce_sysctl.c stable/11/sys/dev/oce/oce_util.c stable/11/sys/dev/ofw/ofw_bus.h stable/11/sys/dev/ofw/ofw_bus_subr.c stable/11/sys/dev/ofw/ofw_bus_subr.h stable/11/sys/dev/ofw/ofw_console.c stable/11/sys/dev/ofw/ofw_disk.c stable/11/sys/dev/ofw/ofw_fdt.c stable/11/sys/dev/ofw/ofw_pci.h stable/11/sys/dev/ofw/ofw_standard.c stable/11/sys/dev/ofw/ofwvar.h stable/11/sys/dev/ofw/openfirm.c stable/11/sys/dev/ofw/openfirm.h stable/11/sys/dev/ofw/openfirmio.c stable/11/sys/dev/ofw/openfirmio.h stable/11/sys/dev/ofw/openpromio.c stable/11/sys/dev/ofw/openpromio.h stable/11/sys/dev/pbio/pbio.c stable/11/sys/dev/pbio/pbioio.h stable/11/sys/dev/pccard/pccard.c stable/11/sys/dev/pccard/pccard_cis.c stable/11/sys/dev/pccard/pccard_cis.h stable/11/sys/dev/pccard/pccard_cis_quirks.c stable/11/sys/dev/pccard/pccard_device.c stable/11/sys/dev/pccard/pccardreg.h stable/11/sys/dev/pccard/pccardvar.h stable/11/sys/dev/pccard/pccardvarp.h stable/11/sys/dev/pccbb/pccbb.c stable/11/sys/dev/pccbb/pccbb_isa.c stable/11/sys/dev/pccbb/pccbb_pci.c stable/11/sys/dev/pccbb/pccbbdevid.h stable/11/sys/dev/pccbb/pccbbreg.h stable/11/sys/dev/pccbb/pccbbvar.h stable/11/sys/dev/pcf/envctrl.c stable/11/sys/dev/pcf/pcf.c stable/11/sys/dev/pcf/pcf_ebus.c stable/11/sys/dev/pcf/pcf_isa.c stable/11/sys/dev/pcf/pcfvar.h stable/11/sys/dev/pci/fixup_pci.c stable/11/sys/dev/pci/hostb_pci.c stable/11/sys/dev/pci/ignore_pci.c stable/11/sys/dev/pci/isa_pci.c stable/11/sys/dev/pci/pci.c stable/11/sys/dev/pci/pci_pci.c stable/11/sys/dev/pci/pci_private.h stable/11/sys/dev/pci/pci_subr.c stable/11/sys/dev/pci/pci_user.c stable/11/sys/dev/pci/pcib_private.h stable/11/sys/dev/pci/pcireg.h stable/11/sys/dev/pci/pcivar.h stable/11/sys/dev/pci/vga_pci.c stable/11/sys/dev/pcn/if_pcn.c stable/11/sys/dev/pcn/if_pcnreg.h stable/11/sys/dev/pdq/if_fpa.c stable/11/sys/dev/pdq/pdq.c stable/11/sys/dev/pdq/pdq_freebsd.h stable/11/sys/dev/pdq/pdq_ifsubr.c stable/11/sys/dev/pdq/pdqreg.h stable/11/sys/dev/pdq/pdqvar.h stable/11/sys/dev/powermac_nvram/powermac_nvram.c stable/11/sys/dev/powermac_nvram/powermac_nvramvar.h stable/11/sys/dev/ppbus/if_plip.c stable/11/sys/dev/ppbus/immio.c stable/11/sys/dev/ppbus/lpbb.c stable/11/sys/dev/ppbus/lpt.c stable/11/sys/dev/ppbus/lpt.h stable/11/sys/dev/ppbus/pcfclock.c stable/11/sys/dev/ppbus/ppb_1284.c stable/11/sys/dev/ppbus/ppb_1284.h stable/11/sys/dev/ppbus/ppb_base.c stable/11/sys/dev/ppbus/ppb_msq.c stable/11/sys/dev/ppbus/ppb_msq.h stable/11/sys/dev/ppbus/ppbconf.c stable/11/sys/dev/ppbus/ppbconf.h stable/11/sys/dev/ppbus/ppbio.h stable/11/sys/dev/ppbus/ppi.c stable/11/sys/dev/ppbus/ppi.h stable/11/sys/dev/ppbus/vpo.c stable/11/sys/dev/ppbus/vpoio.c stable/11/sys/dev/ppbus/vpoio.h stable/11/sys/dev/ppc/ppc.c stable/11/sys/dev/ppc/ppc_acpi.c stable/11/sys/dev/ppc/ppc_isa.c stable/11/sys/dev/ppc/ppc_pci.c stable/11/sys/dev/ppc/ppc_puc.c stable/11/sys/dev/ppc/ppcreg.h stable/11/sys/dev/ppc/ppcvar.h stable/11/sys/dev/pst/pst-iop.c stable/11/sys/dev/pst/pst-iop.h stable/11/sys/dev/pst/pst-pci.c stable/11/sys/dev/pst/pst-raid.c stable/11/sys/dev/pty/pty.c stable/11/sys/dev/puc/puc.c stable/11/sys/dev/puc/puc_bfe.h stable/11/sys/dev/puc/puc_bus.h stable/11/sys/dev/puc/puc_cfg.c stable/11/sys/dev/puc/puc_cfg.h stable/11/sys/dev/puc/puc_pccard.c stable/11/sys/dev/puc/puc_pci.c stable/11/sys/dev/puc/pucdata.c stable/11/sys/dev/qlxgb/qla_dbg.c stable/11/sys/dev/qlxgb/qla_dbg.h stable/11/sys/dev/qlxgb/qla_def.h stable/11/sys/dev/qlxgb/qla_glbl.h stable/11/sys/dev/qlxgb/qla_hw.c stable/11/sys/dev/qlxgb/qla_hw.h stable/11/sys/dev/qlxgb/qla_inline.h stable/11/sys/dev/qlxgb/qla_ioctl.c stable/11/sys/dev/qlxgb/qla_ioctl.h stable/11/sys/dev/qlxgb/qla_isr.c stable/11/sys/dev/qlxgb/qla_misc.c stable/11/sys/dev/qlxgb/qla_os.c stable/11/sys/dev/qlxgb/qla_os.h stable/11/sys/dev/qlxgb/qla_reg.h stable/11/sys/dev/qlxgb/qla_ver.h stable/11/sys/dev/qlxgbe/ql_dbg.c stable/11/sys/dev/qlxgbe/ql_dbg.h stable/11/sys/dev/qlxgbe/ql_def.h stable/11/sys/dev/qlxgbe/ql_glbl.h stable/11/sys/dev/qlxgbe/ql_hw.c stable/11/sys/dev/qlxgbe/ql_hw.h stable/11/sys/dev/qlxgbe/ql_inline.h stable/11/sys/dev/qlxgbe/ql_ioctl.c stable/11/sys/dev/qlxgbe/ql_ioctl.h stable/11/sys/dev/qlxgbe/ql_isr.c stable/11/sys/dev/qlxgbe/ql_misc.c stable/11/sys/dev/qlxgbe/ql_os.c stable/11/sys/dev/qlxgbe/ql_os.h stable/11/sys/dev/qlxgbe/ql_reset.c stable/11/sys/dev/qlxgbe/ql_tmplt.h stable/11/sys/dev/qlxgbe/ql_ver.h stable/11/sys/dev/qlxge/qls_dbg.c stable/11/sys/dev/qlxge/qls_dbg.h stable/11/sys/dev/qlxge/qls_def.h stable/11/sys/dev/qlxge/qls_dump.c stable/11/sys/dev/qlxge/qls_dump.h stable/11/sys/dev/qlxge/qls_glbl.h stable/11/sys/dev/qlxge/qls_hw.c stable/11/sys/dev/qlxge/qls_hw.h stable/11/sys/dev/qlxge/qls_inline.h stable/11/sys/dev/qlxge/qls_ioctl.c stable/11/sys/dev/qlxge/qls_ioctl.h stable/11/sys/dev/qlxge/qls_isr.c stable/11/sys/dev/qlxge/qls_os.c stable/11/sys/dev/qlxge/qls_os.h stable/11/sys/dev/qlxge/qls_ver.h stable/11/sys/dev/quicc/quicc_bfe.h stable/11/sys/dev/quicc/quicc_bfe_fdt.c stable/11/sys/dev/quicc/quicc_bus.h stable/11/sys/dev/quicc/quicc_core.c stable/11/sys/dev/rc/rc.c stable/11/sys/dev/rc/rcreg.h stable/11/sys/dev/re/if_re.c stable/11/sys/dev/rndtest/rndtest.c stable/11/sys/dev/rndtest/rndtest.h stable/11/sys/dev/rp/rp.c stable/11/sys/dev/rp/rp_isa.c stable/11/sys/dev/rp/rp_pci.c stable/11/sys/dev/rp/rpreg.h stable/11/sys/dev/rp/rpvar.h stable/11/sys/dev/rt/if_rt.c stable/11/sys/dev/rt/if_rtreg.h stable/11/sys/dev/rt/if_rtvar.h stable/11/sys/dev/safe/safe.c stable/11/sys/dev/safe/safereg.h stable/11/sys/dev/safe/safevar.h stable/11/sys/dev/scc/scc_bfe.h stable/11/sys/dev/scc/scc_bfe_ebus.c stable/11/sys/dev/scc/scc_bfe_macio.c stable/11/sys/dev/scc/scc_bfe_quicc.c stable/11/sys/dev/scc/scc_bfe_sbus.c stable/11/sys/dev/scc/scc_bus.h stable/11/sys/dev/scc/scc_core.c stable/11/sys/dev/scc/scc_dev_quicc.c stable/11/sys/dev/scc/scc_dev_sab82532.c stable/11/sys/dev/scc/scc_dev_z8530.c stable/11/sys/dev/sdhci/sdhci.c stable/11/sys/dev/sdhci/sdhci.h stable/11/sys/dev/sdhci/sdhci_fdt.c stable/11/sys/dev/sdhci/sdhci_pci.c stable/11/sys/dev/sec/sec.c stable/11/sys/dev/sec/sec.h stable/11/sys/dev/sf/if_sf.c stable/11/sys/dev/sf/if_sfreg.h stable/11/sys/dev/sfxge/common/efsys.h stable/11/sys/dev/sfxge/common/efx.h stable/11/sys/dev/sfxge/common/efx_bootcfg.c stable/11/sys/dev/sfxge/common/efx_ev.c stable/11/sys/dev/sfxge/common/efx_filter.c stable/11/sys/dev/sfxge/common/efx_impl.h stable/11/sys/dev/sfxge/common/efx_intr.c stable/11/sys/dev/sfxge/common/efx_mac.c stable/11/sys/dev/sfxge/common/efx_mcdi.c stable/11/sys/dev/sfxge/common/efx_mcdi.h stable/11/sys/dev/sfxge/common/efx_mon.c stable/11/sys/dev/sfxge/common/efx_nic.c stable/11/sys/dev/sfxge/common/efx_nvram.c stable/11/sys/dev/sfxge/common/efx_phy.c stable/11/sys/dev/sfxge/common/efx_port.c stable/11/sys/dev/sfxge/common/efx_regs.h stable/11/sys/dev/sfxge/common/efx_regs_ef10.h stable/11/sys/dev/sfxge/common/efx_regs_mcdi.h stable/11/sys/dev/sfxge/common/efx_regs_pci.h stable/11/sys/dev/sfxge/common/efx_rx.c stable/11/sys/dev/sfxge/common/efx_sram.c stable/11/sys/dev/sfxge/common/efx_tx.c stable/11/sys/dev/sfxge/common/efx_types.h stable/11/sys/dev/sfxge/common/efx_vpd.c stable/11/sys/dev/sfxge/common/siena_flash.h stable/11/sys/dev/sfxge/common/siena_impl.h stable/11/sys/dev/sfxge/common/siena_mac.c stable/11/sys/dev/sfxge/common/siena_nic.c stable/11/sys/dev/sfxge/common/siena_nvram.c stable/11/sys/dev/sfxge/common/siena_phy.c stable/11/sys/dev/sfxge/common/siena_sram.c stable/11/sys/dev/sfxge/common/siena_vpd.c stable/11/sys/dev/sfxge/sfxge.c stable/11/sys/dev/sfxge/sfxge.h stable/11/sys/dev/sfxge/sfxge_dma.c stable/11/sys/dev/sfxge/sfxge_ev.c stable/11/sys/dev/sfxge/sfxge_intr.c stable/11/sys/dev/sfxge/sfxge_mcdi.c stable/11/sys/dev/sfxge/sfxge_port.c stable/11/sys/dev/sfxge/sfxge_rx.c stable/11/sys/dev/sfxge/sfxge_rx.h stable/11/sys/dev/sfxge/sfxge_tx.c stable/11/sys/dev/sfxge/sfxge_tx.h stable/11/sys/dev/sge/if_sge.c stable/11/sys/dev/sge/if_sgereg.h stable/11/sys/dev/siba/siba_bwn.c stable/11/sys/dev/siba/siba_core.c stable/11/sys/dev/siba/siba_ids.h stable/11/sys/dev/siba/sibareg.h stable/11/sys/dev/siba/sibavar.h stable/11/sys/dev/siis/siis.c stable/11/sys/dev/siis/siis.h stable/11/sys/dev/sio/sio.c stable/11/sys/dev/sio/sio_isa.c stable/11/sys/dev/sio/sio_pccard.c stable/11/sys/dev/sio/sio_pci.c stable/11/sys/dev/sio/sio_puc.c stable/11/sys/dev/sio/sioreg.h stable/11/sys/dev/sio/siovar.h stable/11/sys/dev/sis/if_sis.c stable/11/sys/dev/sis/if_sisreg.h stable/11/sys/dev/sk/if_sk.c stable/11/sys/dev/sk/if_skreg.h stable/11/sys/dev/sk/xmaciireg.h stable/11/sys/dev/smbus/smb.c stable/11/sys/dev/smbus/smb.h stable/11/sys/dev/smbus/smbconf.c stable/11/sys/dev/smbus/smbconf.h stable/11/sys/dev/smbus/smbus.c stable/11/sys/dev/smbus/smbus.h stable/11/sys/dev/smc/if_smc.c stable/11/sys/dev/smc/if_smcreg.h stable/11/sys/dev/smc/if_smcvar.h stable/11/sys/dev/sn/if_sn.c stable/11/sys/dev/sn/if_sn_isa.c stable/11/sys/dev/sn/if_sn_pccard.c stable/11/sys/dev/sn/if_snreg.h stable/11/sys/dev/sn/if_snvar.h stable/11/sys/dev/sn/ositech.h stable/11/sys/dev/snp/snp.c stable/11/sys/dev/sound/chip.h stable/11/sys/dev/sound/clone.c stable/11/sys/dev/sound/clone.h stable/11/sys/dev/sound/driver.c stable/11/sys/dev/sound/isa/ad1816.c stable/11/sys/dev/sound/isa/ad1816.h stable/11/sys/dev/sound/isa/ess.c stable/11/sys/dev/sound/isa/gusc.c stable/11/sys/dev/sound/isa/mss.c stable/11/sys/dev/sound/isa/mss.h stable/11/sys/dev/sound/isa/sb.h stable/11/sys/dev/sound/isa/sb16.c stable/11/sys/dev/sound/isa/sb8.c stable/11/sys/dev/sound/isa/sbc.c stable/11/sys/dev/sound/isa/sndbuf_dma.c stable/11/sys/dev/sound/macio/aoa.c stable/11/sys/dev/sound/macio/aoa.h stable/11/sys/dev/sound/macio/davbus.c stable/11/sys/dev/sound/macio/davbusreg.h stable/11/sys/dev/sound/macio/i2s.c stable/11/sys/dev/sound/macio/onyx.c stable/11/sys/dev/sound/macio/snapper.c stable/11/sys/dev/sound/macio/tumbler.c stable/11/sys/dev/sound/midi/midi.c stable/11/sys/dev/sound/midi/midi.h stable/11/sys/dev/sound/midi/midiq.h stable/11/sys/dev/sound/midi/mpu401.c stable/11/sys/dev/sound/midi/mpu401.h stable/11/sys/dev/sound/midi/sequencer.c stable/11/sys/dev/sound/midi/sequencer.h stable/11/sys/dev/sound/pci/allegro_code.h stable/11/sys/dev/sound/pci/allegro_reg.h stable/11/sys/dev/sound/pci/als4000.c stable/11/sys/dev/sound/pci/als4000.h stable/11/sys/dev/sound/pci/atiixp.c stable/11/sys/dev/sound/pci/atiixp.h stable/11/sys/dev/sound/pci/aureal.c stable/11/sys/dev/sound/pci/aureal.h stable/11/sys/dev/sound/pci/cmi.c stable/11/sys/dev/sound/pci/cmireg.h stable/11/sys/dev/sound/pci/cs4281.c stable/11/sys/dev/sound/pci/cs4281.h stable/11/sys/dev/sound/pci/cs461x_dsp.h stable/11/sys/dev/sound/pci/csa.c stable/11/sys/dev/sound/pci/csapcm.c stable/11/sys/dev/sound/pci/csareg.h stable/11/sys/dev/sound/pci/csavar.h stable/11/sys/dev/sound/pci/ds1-fw.h stable/11/sys/dev/sound/pci/ds1.c stable/11/sys/dev/sound/pci/emu10k1.c stable/11/sys/dev/sound/pci/emu10kx-midi.c stable/11/sys/dev/sound/pci/emu10kx-pcm.c stable/11/sys/dev/sound/pci/emu10kx.c stable/11/sys/dev/sound/pci/emu10kx.h stable/11/sys/dev/sound/pci/envy24.c stable/11/sys/dev/sound/pci/envy24.h stable/11/sys/dev/sound/pci/envy24ht.c stable/11/sys/dev/sound/pci/envy24ht.h stable/11/sys/dev/sound/pci/es137x.c stable/11/sys/dev/sound/pci/es137x.h stable/11/sys/dev/sound/pci/fm801.c stable/11/sys/dev/sound/pci/hda/hda_reg.h stable/11/sys/dev/sound/pci/hda/hdaa.c stable/11/sys/dev/sound/pci/hda/hdaa.h stable/11/sys/dev/sound/pci/hda/hdaa_patches.c stable/11/sys/dev/sound/pci/hda/hdac.c stable/11/sys/dev/sound/pci/hda/hdac.h stable/11/sys/dev/sound/pci/hda/hdac_private.h stable/11/sys/dev/sound/pci/hda/hdac_reg.h stable/11/sys/dev/sound/pci/hda/hdacc.c stable/11/sys/dev/sound/pci/hdspe-pcm.c stable/11/sys/dev/sound/pci/hdspe.c stable/11/sys/dev/sound/pci/hdspe.h stable/11/sys/dev/sound/pci/ich.c stable/11/sys/dev/sound/pci/ich.h stable/11/sys/dev/sound/pci/maestro.c stable/11/sys/dev/sound/pci/maestro3.c stable/11/sys/dev/sound/pci/maestro_reg.h stable/11/sys/dev/sound/pci/neomagic-coeff.h stable/11/sys/dev/sound/pci/neomagic.c stable/11/sys/dev/sound/pci/neomagic.h stable/11/sys/dev/sound/pci/solo.c stable/11/sys/dev/sound/pci/spicds.c stable/11/sys/dev/sound/pci/spicds.h stable/11/sys/dev/sound/pci/t4dwave.c stable/11/sys/dev/sound/pci/t4dwave.h stable/11/sys/dev/sound/pci/via8233.c stable/11/sys/dev/sound/pci/via8233.h stable/11/sys/dev/sound/pci/via82c686.c stable/11/sys/dev/sound/pci/via82c686.h stable/11/sys/dev/sound/pci/vibes.c stable/11/sys/dev/sound/pci/vibes.h stable/11/sys/dev/sound/pcm/ac97.c stable/11/sys/dev/sound/pcm/ac97.h stable/11/sys/dev/sound/pcm/ac97_patch.c stable/11/sys/dev/sound/pcm/ac97_patch.h stable/11/sys/dev/sound/pcm/buffer.c stable/11/sys/dev/sound/pcm/buffer.h stable/11/sys/dev/sound/pcm/channel.c stable/11/sys/dev/sound/pcm/channel.h stable/11/sys/dev/sound/pcm/dsp.c stable/11/sys/dev/sound/pcm/dsp.h stable/11/sys/dev/sound/pcm/feeder.c stable/11/sys/dev/sound/pcm/feeder.h stable/11/sys/dev/sound/pcm/feeder_chain.c stable/11/sys/dev/sound/pcm/feeder_eq.c stable/11/sys/dev/sound/pcm/feeder_format.c stable/11/sys/dev/sound/pcm/feeder_matrix.c stable/11/sys/dev/sound/pcm/feeder_mixer.c stable/11/sys/dev/sound/pcm/feeder_rate.c stable/11/sys/dev/sound/pcm/feeder_volume.c stable/11/sys/dev/sound/pcm/g711.h stable/11/sys/dev/sound/pcm/intpcm.h stable/11/sys/dev/sound/pcm/matrix.h stable/11/sys/dev/sound/pcm/matrix_map.h stable/11/sys/dev/sound/pcm/mixer.c stable/11/sys/dev/sound/pcm/mixer.h stable/11/sys/dev/sound/pcm/pcm.h stable/11/sys/dev/sound/pcm/sndstat.c stable/11/sys/dev/sound/pcm/sndstat.h stable/11/sys/dev/sound/pcm/sound.c stable/11/sys/dev/sound/pcm/sound.h stable/11/sys/dev/sound/pcm/vchan.c stable/11/sys/dev/sound/pcm/vchan.h stable/11/sys/dev/sound/sbus/apcdmareg.h stable/11/sys/dev/sound/sbus/cs4231.c stable/11/sys/dev/sound/sbus/cs4231.h stable/11/sys/dev/sound/unit.c stable/11/sys/dev/sound/unit.h stable/11/sys/dev/sound/usb/uaudio.c stable/11/sys/dev/sound/usb/uaudio.h stable/11/sys/dev/sound/usb/uaudio_pcm.c stable/11/sys/dev/sound/usb/uaudioreg.h stable/11/sys/dev/sound/version.h stable/11/sys/dev/spibus/ofw_spibus.c stable/11/sys/dev/ste/if_ste.c stable/11/sys/dev/ste/if_stereg.h stable/11/sys/dev/stg/tmc18c30.c stable/11/sys/dev/stg/tmc18c30_isa.c stable/11/sys/dev/stg/tmc18c30_pccard.c stable/11/sys/dev/stg/tmc18c30_pci.c stable/11/sys/dev/stg/tmc18c30_subr.c stable/11/sys/dev/stg/tmc18c30reg.h stable/11/sys/dev/stg/tmc18c30var.h stable/11/sys/dev/stge/if_stge.c stable/11/sys/dev/stge/if_stgereg.h stable/11/sys/dev/sym/sym_conf.h stable/11/sys/dev/sym/sym_defs.h stable/11/sys/dev/sym/sym_fw.h stable/11/sys/dev/sym/sym_fw1.h stable/11/sys/dev/sym/sym_fw2.h stable/11/sys/dev/sym/sym_hipd.c stable/11/sys/dev/syscons/apm/apm_saver.c stable/11/sys/dev/syscons/blank/blank_saver.c stable/11/sys/dev/syscons/daemon/daemon_saver.c stable/11/sys/dev/syscons/dragon/dragon_saver.c stable/11/sys/dev/syscons/fade/fade_saver.c stable/11/sys/dev/syscons/fire/fire_saver.c stable/11/sys/dev/syscons/green/green_saver.c stable/11/sys/dev/syscons/logo/logo_saver.c stable/11/sys/dev/syscons/rain/rain_saver.c stable/11/sys/dev/syscons/scgfbrndr.c stable/11/sys/dev/syscons/schistory.c stable/11/sys/dev/syscons/scmouse.c stable/11/sys/dev/syscons/scterm-teken.c stable/11/sys/dev/syscons/scterm.c stable/11/sys/dev/syscons/scvesactl.c stable/11/sys/dev/syscons/scvgarndr.c stable/11/sys/dev/syscons/scvidctl.c stable/11/sys/dev/syscons/scvtb.c stable/11/sys/dev/syscons/snake/snake_saver.c stable/11/sys/dev/syscons/star/star_saver.c stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h stable/11/sys/dev/syscons/sysmouse.c stable/11/sys/dev/syscons/warp/warp_saver.c stable/11/sys/dev/tdfx/tdfx_io.h stable/11/sys/dev/tdfx/tdfx_linux.c stable/11/sys/dev/tdfx/tdfx_linux.h stable/11/sys/dev/tdfx/tdfx_pci.c stable/11/sys/dev/tdfx/tdfx_pci.h stable/11/sys/dev/tdfx/tdfx_vars.h stable/11/sys/dev/terasic/de4led/terasic_de4led.c stable/11/sys/dev/terasic/de4led/terasic_de4led.h stable/11/sys/dev/terasic/de4led/terasic_de4led_fdt.c stable/11/sys/dev/terasic/de4led/terasic_de4led_nexus.c stable/11/sys/dev/terasic/mtl/terasic_mtl.c stable/11/sys/dev/terasic/mtl/terasic_mtl.h stable/11/sys/dev/terasic/mtl/terasic_mtl_fdt.c stable/11/sys/dev/terasic/mtl/terasic_mtl_nexus.c stable/11/sys/dev/terasic/mtl/terasic_mtl_pixel.c stable/11/sys/dev/terasic/mtl/terasic_mtl_reg.c stable/11/sys/dev/terasic/mtl/terasic_mtl_syscons.c stable/11/sys/dev/terasic/mtl/terasic_mtl_text.c stable/11/sys/dev/ti/if_ti.c stable/11/sys/dev/ti/if_tireg.h stable/11/sys/dev/tl/if_tl.c stable/11/sys/dev/tl/if_tlreg.h stable/11/sys/dev/trm/trm.c stable/11/sys/dev/trm/trm.h stable/11/sys/dev/tsec/if_tsec.c stable/11/sys/dev/tsec/if_tsec.h stable/11/sys/dev/tsec/if_tsec_fdt.c stable/11/sys/dev/tsec/if_tsecreg.h stable/11/sys/dev/twa/tw_cl.h stable/11/sys/dev/twa/tw_cl_externs.h stable/11/sys/dev/twa/tw_cl_fwif.h stable/11/sys/dev/twa/tw_cl_init.c stable/11/sys/dev/twa/tw_cl_intr.c stable/11/sys/dev/twa/tw_cl_io.c stable/11/sys/dev/twa/tw_cl_ioctl.h stable/11/sys/dev/twa/tw_cl_misc.c stable/11/sys/dev/twa/tw_cl_share.h stable/11/sys/dev/twa/tw_osl.h stable/11/sys/dev/twa/tw_osl_cam.c stable/11/sys/dev/twa/tw_osl_externs.h stable/11/sys/dev/twa/tw_osl_freebsd.c stable/11/sys/dev/twa/tw_osl_includes.h stable/11/sys/dev/twa/tw_osl_inline.h stable/11/sys/dev/twa/tw_osl_ioctl.h stable/11/sys/dev/twa/tw_osl_share.h stable/11/sys/dev/twa/tw_osl_types.h stable/11/sys/dev/twe/twe.c stable/11/sys/dev/twe/twe_compat.h stable/11/sys/dev/twe/twe_freebsd.c stable/11/sys/dev/twe/twe_tables.h stable/11/sys/dev/twe/tweio.h stable/11/sys/dev/twe/twereg.h stable/11/sys/dev/twe/twevar.h stable/11/sys/dev/tws/tws.c stable/11/sys/dev/tws/tws.h stable/11/sys/dev/tws/tws_cam.c stable/11/sys/dev/tws/tws_hdm.c stable/11/sys/dev/tws/tws_hdm.h stable/11/sys/dev/tws/tws_services.c stable/11/sys/dev/tws/tws_services.h stable/11/sys/dev/tws/tws_user.c stable/11/sys/dev/tws/tws_user.h stable/11/sys/dev/tx/if_tx.c stable/11/sys/dev/tx/if_txreg.h stable/11/sys/dev/tx/if_txvar.h stable/11/sys/dev/txp/3c990img.h stable/11/sys/dev/txp/if_txp.c stable/11/sys/dev/txp/if_txpreg.h stable/11/sys/dev/uart/uart.h stable/11/sys/dev/uart/uart_bus.h stable/11/sys/dev/uart/uart_bus_acpi.c stable/11/sys/dev/uart/uart_bus_ebus.c stable/11/sys/dev/uart/uart_bus_fdt.c stable/11/sys/dev/uart/uart_bus_isa.c stable/11/sys/dev/uart/uart_bus_pccard.c stable/11/sys/dev/uart/uart_bus_pci.c stable/11/sys/dev/uart/uart_bus_puc.c stable/11/sys/dev/uart/uart_bus_scc.c stable/11/sys/dev/uart/uart_core.c stable/11/sys/dev/uart/uart_cpu.h stable/11/sys/dev/uart/uart_cpu_fdt.c stable/11/sys/dev/uart/uart_cpu_powerpc.c stable/11/sys/dev/uart/uart_cpu_sparc64.c stable/11/sys/dev/uart/uart_cpu_x86.c stable/11/sys/dev/uart/uart_dbg.c stable/11/sys/dev/uart/uart_dev_imx.c stable/11/sys/dev/uart/uart_dev_lpc.c stable/11/sys/dev/uart/uart_dev_ns8250.c stable/11/sys/dev/uart/uart_dev_ns8250.h stable/11/sys/dev/uart/uart_dev_pl011.c stable/11/sys/dev/uart/uart_dev_quicc.c stable/11/sys/dev/uart/uart_dev_sab82532.c stable/11/sys/dev/uart/uart_dev_ti8250.c stable/11/sys/dev/uart/uart_dev_z8530.c stable/11/sys/dev/uart/uart_kbd_sun.c stable/11/sys/dev/uart/uart_kbd_sun.h stable/11/sys/dev/uart/uart_subr.c stable/11/sys/dev/uart/uart_tty.c stable/11/sys/dev/ubsec/ubsec.c stable/11/sys/dev/ubsec/ubsecreg.h stable/11/sys/dev/ubsec/ubsecvar.h stable/11/sys/dev/usb/controller/at91dci.c stable/11/sys/dev/usb/controller/at91dci.h stable/11/sys/dev/usb/controller/at91dci_atmelarm.c stable/11/sys/dev/usb/controller/at91dci_fdt.c stable/11/sys/dev/usb/controller/atmegadci.c stable/11/sys/dev/usb/controller/atmegadci.h stable/11/sys/dev/usb/controller/atmegadci_atmelarm.c stable/11/sys/dev/usb/controller/avr32dci.c stable/11/sys/dev/usb/controller/avr32dci.h stable/11/sys/dev/usb/controller/dwc_otg.c stable/11/sys/dev/usb/controller/dwc_otg.h stable/11/sys/dev/usb/controller/dwc_otg_fdt.c stable/11/sys/dev/usb/controller/dwc_otgreg.h stable/11/sys/dev/usb/controller/ehci.c stable/11/sys/dev/usb/controller/ehci.h stable/11/sys/dev/usb/controller/ehci_fsl.c stable/11/sys/dev/usb/controller/ehci_imx.c stable/11/sys/dev/usb/controller/ehci_ixp4xx.c stable/11/sys/dev/usb/controller/ehci_mv.c stable/11/sys/dev/usb/controller/ehci_pci.c stable/11/sys/dev/usb/controller/ehcireg.h stable/11/sys/dev/usb/controller/musb_otg.c stable/11/sys/dev/usb/controller/musb_otg.h stable/11/sys/dev/usb/controller/musb_otg_atmelarm.c stable/11/sys/dev/usb/controller/ohci.c stable/11/sys/dev/usb/controller/ohci.h stable/11/sys/dev/usb/controller/ohci_pci.c stable/11/sys/dev/usb/controller/ohci_s3c24x0.c stable/11/sys/dev/usb/controller/ohcireg.h stable/11/sys/dev/usb/controller/uhci.c stable/11/sys/dev/usb/controller/uhci.h stable/11/sys/dev/usb/controller/uhci_pci.c stable/11/sys/dev/usb/controller/uhcireg.h stable/11/sys/dev/usb/controller/usb_controller.c stable/11/sys/dev/usb/controller/uss820dci.c stable/11/sys/dev/usb/controller/uss820dci.h stable/11/sys/dev/usb/controller/uss820dci_atmelarm.c stable/11/sys/dev/usb/controller/xhci.c stable/11/sys/dev/usb/controller/xhci.h stable/11/sys/dev/usb/controller/xhci_pci.c stable/11/sys/dev/usb/controller/xhcireg.h stable/11/sys/dev/usb/gadget/g_audio.c stable/11/sys/dev/usb/gadget/g_audio.h stable/11/sys/dev/usb/gadget/g_keyboard.c stable/11/sys/dev/usb/gadget/g_keyboard.h stable/11/sys/dev/usb/gadget/g_modem.c stable/11/sys/dev/usb/gadget/g_modem.h stable/11/sys/dev/usb/gadget/g_mouse.c stable/11/sys/dev/usb/gadget/g_mouse.h stable/11/sys/dev/usb/input/atp.c stable/11/sys/dev/usb/input/uep.c stable/11/sys/dev/usb/input/uhid.c stable/11/sys/dev/usb/input/ukbd.c stable/11/sys/dev/usb/input/ums.c stable/11/sys/dev/usb/input/usb_rdesc.h stable/11/sys/dev/usb/input/wsp.c stable/11/sys/dev/usb/misc/udbp.c stable/11/sys/dev/usb/misc/ufm.c stable/11/sys/dev/usb/net/if_aue.c stable/11/sys/dev/usb/net/if_auereg.h stable/11/sys/dev/usb/net/if_axe.c stable/11/sys/dev/usb/net/if_axereg.h stable/11/sys/dev/usb/net/if_axge.c stable/11/sys/dev/usb/net/if_axgereg.h stable/11/sys/dev/usb/net/if_cdce.c stable/11/sys/dev/usb/net/if_cdcereg.h stable/11/sys/dev/usb/net/if_cue.c stable/11/sys/dev/usb/net/if_cuereg.h stable/11/sys/dev/usb/net/if_ipheth.c stable/11/sys/dev/usb/net/if_iphethvar.h stable/11/sys/dev/usb/net/if_kue.c stable/11/sys/dev/usb/net/if_kuefw.h stable/11/sys/dev/usb/net/if_kuereg.h stable/11/sys/dev/usb/net/if_mos.c stable/11/sys/dev/usb/net/if_mosreg.h stable/11/sys/dev/usb/net/if_rue.c stable/11/sys/dev/usb/net/if_ruereg.h stable/11/sys/dev/usb/net/if_smsc.c stable/11/sys/dev/usb/net/if_smscreg.h stable/11/sys/dev/usb/net/if_udav.c stable/11/sys/dev/usb/net/if_udavreg.h stable/11/sys/dev/usb/net/if_usie.c stable/11/sys/dev/usb/net/if_usievar.h stable/11/sys/dev/usb/net/ruephy.c stable/11/sys/dev/usb/net/ruephyreg.h stable/11/sys/dev/usb/net/uhso.c stable/11/sys/dev/usb/net/usb_ethernet.c stable/11/sys/dev/usb/net/usb_ethernet.h stable/11/sys/dev/usb/quirk/usb_quirk.c stable/11/sys/dev/usb/quirk/usb_quirk.h stable/11/sys/dev/usb/serial/ubsa.c stable/11/sys/dev/usb/serial/ubser.c stable/11/sys/dev/usb/serial/uchcom.c stable/11/sys/dev/usb/serial/ucycom.c stable/11/sys/dev/usb/serial/ufoma.c stable/11/sys/dev/usb/serial/uftdi.c stable/11/sys/dev/usb/serial/ugensa.c stable/11/sys/dev/usb/serial/uipaq.c stable/11/sys/dev/usb/serial/ulpt.c stable/11/sys/dev/usb/serial/umcs.c stable/11/sys/dev/usb/serial/umcs.h stable/11/sys/dev/usb/serial/umct.c stable/11/sys/dev/usb/serial/umodem.c stable/11/sys/dev/usb/serial/uplcom.c stable/11/sys/dev/usb/serial/usb_serial.c stable/11/sys/dev/usb/serial/usb_serial.h stable/11/sys/dev/usb/serial/uvisor.c stable/11/sys/dev/usb/serial/uvscom.c stable/11/sys/dev/usb/storage/umass.c stable/11/sys/dev/usb/storage/urio.c stable/11/sys/dev/usb/storage/ustorage_fs.c stable/11/sys/dev/usb/template/usb_template.c stable/11/sys/dev/usb/template/usb_template.h stable/11/sys/dev/usb/template/usb_template_audio.c stable/11/sys/dev/usb/template/usb_template_cdce.c stable/11/sys/dev/usb/template/usb_template_kbd.c stable/11/sys/dev/usb/template/usb_template_modem.c stable/11/sys/dev/usb/template/usb_template_mouse.c stable/11/sys/dev/usb/template/usb_template_msc.c stable/11/sys/dev/usb/template/usb_template_mtp.c stable/11/sys/dev/usb/ufm_ioctl.h stable/11/sys/dev/usb/usb.h stable/11/sys/dev/usb/usb_bus.h stable/11/sys/dev/usb/usb_busdma.c stable/11/sys/dev/usb/usb_busdma.h stable/11/sys/dev/usb/usb_cdc.h stable/11/sys/dev/usb/usb_controller.h stable/11/sys/dev/usb/usb_core.c stable/11/sys/dev/usb/usb_core.h stable/11/sys/dev/usb/usb_debug.c stable/11/sys/dev/usb/usb_debug.h stable/11/sys/dev/usb/usb_dev.c stable/11/sys/dev/usb/usb_dev.h stable/11/sys/dev/usb/usb_device.c stable/11/sys/dev/usb/usb_device.h stable/11/sys/dev/usb/usb_dynamic.c stable/11/sys/dev/usb/usb_dynamic.h stable/11/sys/dev/usb/usb_endian.h stable/11/sys/dev/usb/usb_error.c stable/11/sys/dev/usb/usb_freebsd.h stable/11/sys/dev/usb/usb_freebsd_loader.h stable/11/sys/dev/usb/usb_generic.c stable/11/sys/dev/usb/usb_generic.h stable/11/sys/dev/usb/usb_handle_request.c stable/11/sys/dev/usb/usb_hid.c stable/11/sys/dev/usb/usb_hub.c stable/11/sys/dev/usb/usb_hub.h stable/11/sys/dev/usb/usb_ioctl.h stable/11/sys/dev/usb/usb_lookup.c stable/11/sys/dev/usb/usb_mbuf.c stable/11/sys/dev/usb/usb_mbuf.h stable/11/sys/dev/usb/usb_msctest.c stable/11/sys/dev/usb/usb_msctest.h stable/11/sys/dev/usb/usb_parse.c stable/11/sys/dev/usb/usb_pci.h stable/11/sys/dev/usb/usb_pf.c stable/11/sys/dev/usb/usb_pf.h stable/11/sys/dev/usb/usb_process.c stable/11/sys/dev/usb/usb_process.h stable/11/sys/dev/usb/usb_request.c stable/11/sys/dev/usb/usb_request.h stable/11/sys/dev/usb/usb_transfer.c stable/11/sys/dev/usb/usb_transfer.h stable/11/sys/dev/usb/usb_util.c stable/11/sys/dev/usb/usb_util.h stable/11/sys/dev/usb/usbdi.h stable/11/sys/dev/usb/usbdi_util.h stable/11/sys/dev/usb/usbhid.h stable/11/sys/dev/usb/wlan/if_uath.c stable/11/sys/dev/usb/wlan/if_zydfw.h stable/11/sys/dev/vge/if_vge.c stable/11/sys/dev/vge/if_vgereg.h stable/11/sys/dev/vge/if_vgevar.h stable/11/sys/dev/viawd/viawd.c stable/11/sys/dev/viawd/viawd.h stable/11/sys/dev/virtio/balloon/virtio_balloon.c stable/11/sys/dev/virtio/balloon/virtio_balloon.h stable/11/sys/dev/virtio/block/virtio_blk.c stable/11/sys/dev/virtio/block/virtio_blk.h stable/11/sys/dev/virtio/network/if_vtnet.c stable/11/sys/dev/virtio/network/if_vtnetvar.h stable/11/sys/dev/virtio/network/virtio_net.h stable/11/sys/dev/virtio/pci/virtio_pci.c stable/11/sys/dev/virtio/pci/virtio_pci.h stable/11/sys/dev/virtio/random/virtio_random.c stable/11/sys/dev/virtio/scsi/virtio_scsi.c stable/11/sys/dev/virtio/scsi/virtio_scsi.h stable/11/sys/dev/virtio/scsi/virtio_scsivar.h stable/11/sys/dev/virtio/virtio.c stable/11/sys/dev/virtio/virtio.h stable/11/sys/dev/virtio/virtio_ring.h stable/11/sys/dev/virtio/virtqueue.c stable/11/sys/dev/virtio/virtqueue.h stable/11/sys/dev/vkbd/vkbd.c stable/11/sys/dev/vkbd/vkbd_var.h stable/11/sys/dev/vr/if_vr.c stable/11/sys/dev/vr/if_vrreg.h stable/11/sys/dev/vt/colors/vt_termcolors.c stable/11/sys/dev/vt/colors/vt_termcolors.h stable/11/sys/dev/vt/font/vt_font_default.c stable/11/sys/dev/vt/font/vt_mouse_cursor.c stable/11/sys/dev/vt/hw/efifb/efifb.c stable/11/sys/dev/vt/hw/fb/vt_early_fb.c stable/11/sys/dev/vt/hw/fb/vt_fb.c stable/11/sys/dev/vt/hw/fb/vt_fb.h stable/11/sys/dev/vt/hw/ofwfb/ofwfb.c stable/11/sys/dev/vt/logo/logo_freebsd.c stable/11/sys/dev/vt/vt.h stable/11/sys/dev/vt/vt_buf.c stable/11/sys/dev/vt/vt_consolectl.c stable/11/sys/dev/vt/vt_core.c stable/11/sys/dev/vt/vt_font.c stable/11/sys/dev/vt/vt_sysmouse.c stable/11/sys/dev/vte/if_vte.c stable/11/sys/dev/vte/if_vtereg.h stable/11/sys/dev/vte/if_vtevar.h stable/11/sys/dev/vx/if_vx.c stable/11/sys/dev/vx/if_vx_pci.c stable/11/sys/dev/vx/if_vxreg.h stable/11/sys/dev/vx/if_vxvar.h stable/11/sys/dev/vxge/include/vxge-debug.h stable/11/sys/dev/vxge/include/vxge-defs.h stable/11/sys/dev/vxge/include/vxge-list.h stable/11/sys/dev/vxge/include/vxge-os-debug.h stable/11/sys/dev/vxge/include/vxge-os-pal.h stable/11/sys/dev/vxge/include/vxge-queue.h stable/11/sys/dev/vxge/include/vxgehal-config.h stable/11/sys/dev/vxge/include/vxgehal-ll.h stable/11/sys/dev/vxge/include/vxgehal-mgmt.h stable/11/sys/dev/vxge/include/vxgehal-mgmtaux.h stable/11/sys/dev/vxge/include/vxgehal-stats.h stable/11/sys/dev/vxge/include/vxgehal-status.h stable/11/sys/dev/vxge/include/vxgehal-types.h stable/11/sys/dev/vxge/include/vxgehal-version.h stable/11/sys/dev/vxge/vxge-firmware.h stable/11/sys/dev/vxge/vxge-osdep.h stable/11/sys/dev/vxge/vxge.c stable/11/sys/dev/vxge/vxge.h stable/11/sys/dev/vxge/vxgehal/vxge-queue.c stable/11/sys/dev/vxge/vxgehal/vxgehal-blockpool.c stable/11/sys/dev/vxge/vxgehal/vxgehal-blockpool.h stable/11/sys/dev/vxge/vxgehal/vxgehal-channel.c stable/11/sys/dev/vxge/vxgehal/vxgehal-channel.h stable/11/sys/dev/vxge/vxgehal/vxgehal-common-reg.h stable/11/sys/dev/vxge/vxgehal/vxgehal-config-priv.h stable/11/sys/dev/vxge/vxgehal/vxgehal-config.c stable/11/sys/dev/vxge/vxgehal/vxgehal-debug.h stable/11/sys/dev/vxge/vxgehal/vxgehal-device.c stable/11/sys/dev/vxge/vxgehal/vxgehal-device.h stable/11/sys/dev/vxge/vxgehal/vxgehal-doorbells.c stable/11/sys/dev/vxge/vxgehal/vxgehal-doorbells.h stable/11/sys/dev/vxge/vxgehal/vxgehal-driver.c stable/11/sys/dev/vxge/vxgehal/vxgehal-driver.h stable/11/sys/dev/vxge/vxgehal/vxgehal-fifo.c stable/11/sys/dev/vxge/vxgehal/vxgehal-fifo.h stable/11/sys/dev/vxge/vxgehal/vxgehal-ifmsg.c stable/11/sys/dev/vxge/vxgehal/vxgehal-ifmsg.h stable/11/sys/dev/vxge/vxgehal/vxgehal-legacy-reg.h stable/11/sys/dev/vxge/vxgehal/vxgehal-memrepair-reg.h stable/11/sys/dev/vxge/vxgehal/vxgehal-mgmt.c stable/11/sys/dev/vxge/vxgehal/vxgehal-mgmtaux.c stable/11/sys/dev/vxge/vxgehal/vxgehal-mm.c stable/11/sys/dev/vxge/vxgehal/vxgehal-mm.h stable/11/sys/dev/vxge/vxgehal/vxgehal-mrpcim-reg.h stable/11/sys/dev/vxge/vxgehal/vxgehal-mrpcim.c stable/11/sys/dev/vxge/vxgehal/vxgehal-mrpcim.h stable/11/sys/dev/vxge/vxgehal/vxgehal-pcicfgmgmt-reg.h stable/11/sys/dev/vxge/vxgehal/vxgehal-regdefs.h stable/11/sys/dev/vxge/vxgehal/vxgehal-regs.h stable/11/sys/dev/vxge/vxgehal/vxgehal-ring.c stable/11/sys/dev/vxge/vxgehal/vxgehal-ring.h stable/11/sys/dev/vxge/vxgehal/vxgehal-srpcim-reg.h stable/11/sys/dev/vxge/vxgehal/vxgehal-srpcim.c stable/11/sys/dev/vxge/vxgehal/vxgehal-srpcim.h stable/11/sys/dev/vxge/vxgehal/vxgehal-swapper.c stable/11/sys/dev/vxge/vxgehal/vxgehal-swapper.h stable/11/sys/dev/vxge/vxgehal/vxgehal-toc-reg.h stable/11/sys/dev/vxge/vxgehal/vxgehal-virtualpath.c stable/11/sys/dev/vxge/vxgehal/vxgehal-virtualpath.h stable/11/sys/dev/vxge/vxgehal/vxgehal-vpath-reg.h stable/11/sys/dev/vxge/vxgehal/vxgehal-vpmgmt-reg.h stable/11/sys/dev/vxge/vxgehal/vxgehal.h stable/11/sys/dev/vxge/vxgell-version.h stable/11/sys/dev/watchdog/watchdog.c stable/11/sys/dev/wb/if_wb.c stable/11/sys/dev/wb/if_wbreg.h stable/11/sys/dev/wbwd/wbwd.c stable/11/sys/dev/wi/if_wavelan_ieee.h stable/11/sys/dev/wi/if_wi_macio.c stable/11/sys/dev/wi/if_wi_pccard.c stable/11/sys/dev/wi/if_wi_pci.c stable/11/sys/dev/wi/if_wireg.h stable/11/sys/dev/wi/if_wivar.h stable/11/sys/dev/wtap/if_medium.c stable/11/sys/dev/wtap/if_medium.h stable/11/sys/dev/wtap/if_wtap.c stable/11/sys/dev/wtap/if_wtap_module.c stable/11/sys/dev/wtap/if_wtapioctl.h stable/11/sys/dev/wtap/if_wtapvar.h stable/11/sys/dev/wtap/plugins/visibility.c stable/11/sys/dev/wtap/plugins/visibility.h stable/11/sys/dev/wtap/plugins/visibility_ioctl.h stable/11/sys/dev/wtap/plugins/wtap_plugin.h stable/11/sys/dev/wtap/wtap_hal/hal.c stable/11/sys/dev/wtap/wtap_hal/hal.h stable/11/sys/dev/wtap/wtap_hal/handler.h stable/11/sys/dev/xe/if_xe.c stable/11/sys/dev/xe/if_xe_pccard.c stable/11/sys/dev/xe/if_xereg.h stable/11/sys/dev/xe/if_xevar.h stable/11/sys/dev/xen/blkback/blkback.c stable/11/sys/dev/xen/control/control.c stable/11/sys/dev/xen/netback/netback.c stable/11/sys/dev/xen/netback/netback_unit_tests.c stable/11/sys/dev/xen/netfront/netfront.c stable/11/sys/dev/xen/pcifront/pcifront.c stable/11/sys/dev/xen/timer/timer.c stable/11/sys/dev/xen/timer/timer.h stable/11/sys/dev/xen/xenpci/xenpci.c stable/11/sys/dev/xen/xenpci/xenpcivar.h stable/11/sys/dev/xl/if_xl.c stable/11/sys/dev/xl/if_xlreg.h stable/11/sys/dev/xl/xlphy.c stable/11/sys/fs/cd9660/cd9660_bmap.c stable/11/sys/fs/cd9660/cd9660_lookup.c stable/11/sys/fs/cd9660/cd9660_mount.h stable/11/sys/fs/cd9660/cd9660_node.c stable/11/sys/fs/cd9660/cd9660_node.h stable/11/sys/fs/cd9660/cd9660_rrip.c stable/11/sys/fs/cd9660/cd9660_rrip.h stable/11/sys/fs/cd9660/cd9660_util.c stable/11/sys/fs/cd9660/cd9660_vfsops.c stable/11/sys/fs/cd9660/cd9660_vnops.c stable/11/sys/fs/cd9660/iso.h stable/11/sys/fs/cd9660/iso_rrip.h stable/11/sys/fs/deadfs/dead_vnops.c stable/11/sys/fs/ext2fs/ext2_alloc.c stable/11/sys/fs/ext2fs/ext2_balloc.c stable/11/sys/fs/ext2fs/ext2_bmap.c stable/11/sys/fs/ext2fs/ext2_extern.h stable/11/sys/fs/ext2fs/ext2_inode.c stable/11/sys/fs/ext2fs/ext2_lookup.c stable/11/sys/fs/ext2fs/ext2_mount.h stable/11/sys/fs/ext2fs/ext2_subr.c stable/11/sys/fs/ext2fs/ext2_vfsops.c stable/11/sys/fs/ext2fs/ext2_vnops.c stable/11/sys/fs/ext2fs/fs.h stable/11/sys/fs/ext2fs/inode.h stable/11/sys/fs/fdescfs/fdesc.h stable/11/sys/fs/fdescfs/fdesc_vfsops.c stable/11/sys/fs/fdescfs/fdesc_vnops.c stable/11/sys/fs/fifofs/fifo_vnops.c stable/11/sys/fs/fuse/fuse.h stable/11/sys/fs/fuse/fuse_debug.h stable/11/sys/fs/fuse/fuse_device.c stable/11/sys/fs/fuse/fuse_file.c stable/11/sys/fs/fuse/fuse_file.h stable/11/sys/fs/fuse/fuse_internal.c stable/11/sys/fs/fuse/fuse_internal.h stable/11/sys/fs/fuse/fuse_io.c stable/11/sys/fs/fuse/fuse_io.h stable/11/sys/fs/fuse/fuse_ipc.c stable/11/sys/fs/fuse/fuse_ipc.h stable/11/sys/fs/fuse/fuse_kernel.h stable/11/sys/fs/fuse/fuse_main.c stable/11/sys/fs/fuse/fuse_node.c stable/11/sys/fs/fuse/fuse_node.h stable/11/sys/fs/fuse/fuse_param.h stable/11/sys/fs/fuse/fuse_vfsops.c stable/11/sys/fs/fuse/fuse_vnops.c stable/11/sys/fs/nfs/nfs.h stable/11/sys/fs/nfs/nfs_commonkrpc.c stable/11/sys/fs/nfs/nfs_commonport.c stable/11/sys/fs/nfs/nfs_commonsubs.c stable/11/sys/fs/nfs/nfs_var.h stable/11/sys/fs/nfs/nfsm_subs.h stable/11/sys/fs/nfs/nfsport.h stable/11/sys/fs/nfs/nfsproto.h stable/11/sys/fs/nfs/nfsrvcache.h stable/11/sys/fs/nfs/rpcv2.h stable/11/sys/fs/nfs/xdr_subs.h stable/11/sys/fs/nfsclient/nfs.h stable/11/sys/fs/nfsclient/nfs_clbio.c stable/11/sys/fs/nfsclient/nfs_clcomsubs.c stable/11/sys/fs/nfsclient/nfs_clkrpc.c stable/11/sys/fs/nfsclient/nfs_clnfsiod.c stable/11/sys/fs/nfsclient/nfs_clnode.c stable/11/sys/fs/nfsclient/nfs_clport.c stable/11/sys/fs/nfsclient/nfs_clrpcops.c stable/11/sys/fs/nfsclient/nfs_clsubs.c stable/11/sys/fs/nfsclient/nfs_clvfsops.c stable/11/sys/fs/nfsclient/nfs_clvnops.c stable/11/sys/fs/nfsclient/nfsmount.h stable/11/sys/fs/nfsclient/nfsnode.h stable/11/sys/fs/nfsserver/nfs_nfsdcache.c stable/11/sys/fs/nfsserver/nfs_nfsdkrpc.c stable/11/sys/fs/nfsserver/nfs_nfsdport.c stable/11/sys/fs/nfsserver/nfs_nfsdserv.c stable/11/sys/fs/nfsserver/nfs_nfsdsocket.c stable/11/sys/fs/nfsserver/nfs_nfsdsubs.c stable/11/sys/fs/nullfs/null.h stable/11/sys/fs/nullfs/null_subr.c stable/11/sys/fs/nullfs/null_vfsops.c stable/11/sys/fs/nullfs/null_vnops.c stable/11/sys/fs/procfs/procfs.c stable/11/sys/fs/procfs/procfs.h stable/11/sys/fs/procfs/procfs_dbregs.c stable/11/sys/fs/procfs/procfs_fpregs.c stable/11/sys/fs/procfs/procfs_map.c stable/11/sys/fs/procfs/procfs_mem.c stable/11/sys/fs/procfs/procfs_note.c stable/11/sys/fs/procfs/procfs_osrel.c stable/11/sys/fs/procfs/procfs_regs.c stable/11/sys/fs/procfs/procfs_rlimit.c stable/11/sys/fs/procfs/procfs_status.c stable/11/sys/fs/procfs/procfs_type.c stable/11/sys/fs/unionfs/union.h stable/11/sys/fs/unionfs/union_subr.c stable/11/sys/fs/unionfs/union_vfsops.c stable/11/sys/fs/unionfs/union_vnops.c stable/11/sys/geom/vinum/geom_vinum_share.c stable/11/sys/geom/vinum/geom_vinum_subr.c stable/11/sys/geom/vinum/geom_vinum_var.h stable/11/sys/i386/acpica/acpi_machdep.c stable/11/sys/i386/bios/smapi.c stable/11/sys/i386/i386/atomic.c stable/11/sys/i386/i386/bios.c stable/11/sys/i386/i386/bpf_jit_machdep.c stable/11/sys/i386/i386/bpf_jit_machdep.h stable/11/sys/i386/i386/elf_machdep.c stable/11/sys/i386/i386/gdb_machdep.c stable/11/sys/i386/i386/genassym.c stable/11/sys/i386/i386/geode.c stable/11/sys/i386/i386/in_cksum.c stable/11/sys/i386/i386/initcpu.c stable/11/sys/i386/i386/io.c stable/11/sys/i386/i386/k6_mem.c stable/11/sys/i386/i386/longrun.c stable/11/sys/i386/i386/machdep.c stable/11/sys/i386/i386/mem.c stable/11/sys/i386/i386/minidump_machdep.c stable/11/sys/i386/i386/mp_machdep.c stable/11/sys/i386/i386/pmap.c stable/11/sys/i386/i386/ptrace_machdep.c stable/11/sys/i386/i386/sys_machdep.c stable/11/sys/i386/i386/trap.c stable/11/sys/i386/i386/uio_machdep.c stable/11/sys/i386/i386/vm86.c stable/11/sys/i386/i386/vm_machdep.c stable/11/sys/i386/ibcs2/coff.h stable/11/sys/i386/ibcs2/ibcs2_dirent.h stable/11/sys/i386/ibcs2/ibcs2_errno.c stable/11/sys/i386/ibcs2/ibcs2_errno.h stable/11/sys/i386/ibcs2/ibcs2_fcntl.c stable/11/sys/i386/ibcs2/ibcs2_fcntl.h stable/11/sys/i386/ibcs2/ibcs2_ioctl.c stable/11/sys/i386/ibcs2/ibcs2_ipc.c stable/11/sys/i386/ibcs2/ibcs2_ipc.h stable/11/sys/i386/ibcs2/ibcs2_isc.c stable/11/sys/i386/ibcs2/ibcs2_misc.c stable/11/sys/i386/ibcs2/ibcs2_mount.h stable/11/sys/i386/ibcs2/ibcs2_msg.c stable/11/sys/i386/ibcs2/ibcs2_other.c stable/11/sys/i386/ibcs2/ibcs2_signal.c stable/11/sys/i386/ibcs2/ibcs2_signal.h stable/11/sys/i386/ibcs2/ibcs2_socksys.c stable/11/sys/i386/ibcs2/ibcs2_socksys.h stable/11/sys/i386/ibcs2/ibcs2_stat.c stable/11/sys/i386/ibcs2/ibcs2_stat.h stable/11/sys/i386/ibcs2/ibcs2_statfs.h stable/11/sys/i386/ibcs2/ibcs2_stropts.h stable/11/sys/i386/ibcs2/ibcs2_sysi86.c stable/11/sys/i386/ibcs2/ibcs2_sysvec.c stable/11/sys/i386/ibcs2/ibcs2_termios.h stable/11/sys/i386/ibcs2/ibcs2_time.h stable/11/sys/i386/ibcs2/ibcs2_types.h stable/11/sys/i386/ibcs2/ibcs2_unistd.h stable/11/sys/i386/ibcs2/ibcs2_ustat.h stable/11/sys/i386/ibcs2/ibcs2_util.c stable/11/sys/i386/ibcs2/ibcs2_util.h stable/11/sys/i386/ibcs2/ibcs2_utime.h stable/11/sys/i386/ibcs2/ibcs2_utsname.h stable/11/sys/i386/ibcs2/ibcs2_xenix.c stable/11/sys/i386/ibcs2/imgact_coff.c stable/11/sys/i386/include/_bus.h stable/11/sys/i386/include/asm.h stable/11/sys/i386/include/asmacros.h stable/11/sys/i386/include/atomic.h stable/11/sys/i386/include/bootinfo.h stable/11/sys/i386/include/bus_dma.h stable/11/sys/i386/include/counter.h stable/11/sys/i386/include/cpu.h stable/11/sys/i386/include/cpufunc.h stable/11/sys/i386/include/cputypes.h stable/11/sys/i386/include/elan_mmcr.h stable/11/sys/i386/include/exec.h stable/11/sys/i386/include/floatingpoint.h stable/11/sys/i386/include/gdb_machdep.h stable/11/sys/i386/include/ieeefp.h stable/11/sys/i386/include/if_wl_wavelan.h stable/11/sys/i386/include/in_cksum.h stable/11/sys/i386/include/intr_machdep.h stable/11/sys/i386/include/ioctl_bt848.h stable/11/sys/i386/include/ioctl_meteor.h stable/11/sys/i386/include/iodev.h stable/11/sys/i386/include/kdb.h stable/11/sys/i386/include/limits.h stable/11/sys/i386/include/md_var.h stable/11/sys/i386/include/memdev.h stable/11/sys/i386/include/minidump.h stable/11/sys/i386/include/mp_watchdog.h stable/11/sys/i386/include/npx.h stable/11/sys/i386/include/param.h stable/11/sys/i386/include/pc/bios.h stable/11/sys/i386/include/pcaudioio.h stable/11/sys/i386/include/pcb.h stable/11/sys/i386/include/pcb_ext.h stable/11/sys/i386/include/pcpu.h stable/11/sys/i386/include/pmap.h stable/11/sys/i386/include/pmc_mdep.h stable/11/sys/i386/include/ppireg.h stable/11/sys/i386/include/proc.h stable/11/sys/i386/include/profile.h stable/11/sys/i386/include/reloc.h stable/11/sys/i386/include/runq.h stable/11/sys/i386/include/segments.h stable/11/sys/i386/include/sf_buf.h stable/11/sys/i386/include/sigframe.h stable/11/sys/i386/include/signal.h stable/11/sys/i386/include/smapi.h stable/11/sys/i386/include/timerreg.h stable/11/sys/i386/include/tss.h stable/11/sys/i386/include/ucontext.h stable/11/sys/i386/include/varargs.h stable/11/sys/i386/include/vm.h stable/11/sys/i386/include/vm86.h stable/11/sys/i386/include/vmparam.h stable/11/sys/i386/isa/ccbque.h stable/11/sys/i386/isa/elink.c stable/11/sys/i386/isa/elink.h stable/11/sys/i386/isa/pmtimer.c stable/11/sys/i386/isa/prof_machdep.c stable/11/sys/i386/linux/imgact_linux.c stable/11/sys/i386/linux/linux.h stable/11/sys/i386/linux/linux_dummy.c stable/11/sys/i386/linux/linux_machdep.c stable/11/sys/i386/linux/linux_ptrace.c stable/11/sys/i386/linux/linux_sysvec.c stable/11/sys/i386/pci/pci_cfgreg.c stable/11/sys/i386/pci/pci_pir.c stable/11/sys/isa/isareg.h stable/11/sys/isa/pnpreg.h stable/11/sys/isa/rtc.h stable/11/sys/kern/init_main.c stable/11/sys/kern/kern_acct.c stable/11/sys/kern/kern_clock.c stable/11/sys/kern/kern_cons.c stable/11/sys/kern/kern_descrip.c stable/11/sys/kern/kern_exit.c stable/11/sys/kern/kern_fork.c stable/11/sys/kern/kern_ktrace.c stable/11/sys/kern/kern_lockf.c stable/11/sys/kern/kern_malloc.c stable/11/sys/kern/kern_mib.c stable/11/sys/kern/kern_proc.c stable/11/sys/kern/kern_prot.c stable/11/sys/kern/kern_resource.c stable/11/sys/kern/kern_rmlock.c stable/11/sys/kern/kern_shutdown.c stable/11/sys/kern/kern_sig.c stable/11/sys/kern/kern_synch.c stable/11/sys/kern/kern_sysctl.c stable/11/sys/kern/kern_time.c stable/11/sys/kern/kern_timeout.c stable/11/sys/kern/kern_xxx.c stable/11/sys/kern/ksched.c stable/11/sys/kern/p1003_1b.c stable/11/sys/kern/posix4_mib.c stable/11/sys/kern/sched_4bsd.c stable/11/sys/kern/subr_autoconf.c stable/11/sys/kern/subr_blist.c stable/11/sys/kern/subr_clock.c stable/11/sys/kern/subr_hash.c stable/11/sys/kern/subr_log.c stable/11/sys/kern/subr_mchain.c stable/11/sys/kern/subr_param.c stable/11/sys/kern/subr_pcpu.c stable/11/sys/kern/subr_prf.c stable/11/sys/kern/subr_prof.c stable/11/sys/kern/subr_rtc.c stable/11/sys/kern/subr_scanf.c stable/11/sys/kern/subr_sglist.c stable/11/sys/kern/subr_syscall.c stable/11/sys/kern/subr_trap.c stable/11/sys/kern/subr_uio.c stable/11/sys/kern/sys_generic.c stable/11/sys/kern/sys_socket.c stable/11/sys/kern/tty_compat.c stable/11/sys/kern/tty_info.c stable/11/sys/kern/uipc_domain.c stable/11/sys/kern/uipc_mbuf.c stable/11/sys/kern/uipc_mbuf2.c stable/11/sys/kern/uipc_sockbuf.c stable/11/sys/kern/uipc_socket.c stable/11/sys/kern/uipc_syscalls.c stable/11/sys/kern/uipc_usrreq.c stable/11/sys/kern/vfs_cache.c stable/11/sys/kern/vfs_cluster.c stable/11/sys/kern/vfs_default.c stable/11/sys/kern/vfs_export.c stable/11/sys/kern/vfs_init.c stable/11/sys/kern/vfs_lookup.c stable/11/sys/kern/vfs_mount.c stable/11/sys/kern/vfs_mountroot.c stable/11/sys/kern/vfs_subr.c stable/11/sys/kern/vfs_syscalls.c stable/11/sys/kern/vfs_vnops.c stable/11/sys/libkern/arm/muldi3.c stable/11/sys/libkern/ashldi3.c stable/11/sys/libkern/ashrdi3.c stable/11/sys/libkern/bcmp.c stable/11/sys/libkern/bsearch.c stable/11/sys/libkern/cmpdi2.c stable/11/sys/libkern/divdi3.c stable/11/sys/libkern/ffs.c stable/11/sys/libkern/ffsl.c stable/11/sys/libkern/fls.c stable/11/sys/libkern/flsl.c stable/11/sys/libkern/flsll.c stable/11/sys/libkern/fnmatch.c stable/11/sys/libkern/lshrdi3.c stable/11/sys/libkern/mcount.c stable/11/sys/libkern/memchr.c stable/11/sys/libkern/memcmp.c stable/11/sys/libkern/moddi3.c stable/11/sys/libkern/qdivrem.c stable/11/sys/libkern/qsort.c stable/11/sys/libkern/quad.h stable/11/sys/libkern/random.c stable/11/sys/libkern/scanc.c stable/11/sys/libkern/strcasecmp.c stable/11/sys/libkern/strcat.c stable/11/sys/libkern/strchr.c stable/11/sys/libkern/strcmp.c stable/11/sys/libkern/strcpy.c stable/11/sys/libkern/strncmp.c stable/11/sys/libkern/strncpy.c stable/11/sys/libkern/strrchr.c stable/11/sys/libkern/strsep.c stable/11/sys/libkern/strstr.c stable/11/sys/libkern/strtol.c stable/11/sys/libkern/strtoq.c stable/11/sys/libkern/strtoul.c stable/11/sys/libkern/strtouq.c stable/11/sys/libkern/ucmpdi2.c stable/11/sys/libkern/udivdi3.c stable/11/sys/libkern/umoddi3.c stable/11/sys/mips/adm5120/adm5120_machdep.c stable/11/sys/mips/adm5120/adm5120reg.h stable/11/sys/mips/adm5120/admpci.c stable/11/sys/mips/adm5120/console.c stable/11/sys/mips/adm5120/if_admsw.c stable/11/sys/mips/adm5120/if_admswreg.h stable/11/sys/mips/adm5120/if_admswvar.h stable/11/sys/mips/adm5120/obio.c stable/11/sys/mips/adm5120/obiovar.h stable/11/sys/mips/adm5120/uart_bus_adm5120.c stable/11/sys/mips/adm5120/uart_cpu_adm5120.c stable/11/sys/mips/adm5120/uart_dev_adm5120.c stable/11/sys/mips/adm5120/uart_dev_adm5120.h stable/11/sys/mips/alchemy/alchemy_machdep.c stable/11/sys/mips/alchemy/aureg.h stable/11/sys/mips/alchemy/obio.c stable/11/sys/mips/alchemy/uart_bus_alchemy.c stable/11/sys/mips/alchemy/uart_cpu_alchemy.c stable/11/sys/mips/atheros/apb.c stable/11/sys/mips/atheros/apbvar.h stable/11/sys/mips/atheros/ar71xx_bus_space_reversed.c stable/11/sys/mips/atheros/ar71xx_bus_space_reversed.h stable/11/sys/mips/atheros/ar71xx_chip.c stable/11/sys/mips/atheros/ar71xx_chip.h stable/11/sys/mips/atheros/ar71xx_cpudef.h stable/11/sys/mips/atheros/ar71xx_ehci.c stable/11/sys/mips/atheros/ar71xx_fixup.c stable/11/sys/mips/atheros/ar71xx_fixup.h stable/11/sys/mips/atheros/ar71xx_gpio.c stable/11/sys/mips/atheros/ar71xx_gpiovar.h stable/11/sys/mips/atheros/ar71xx_machdep.c stable/11/sys/mips/atheros/ar71xx_ohci.c stable/11/sys/mips/atheros/ar71xx_pci.c stable/11/sys/mips/atheros/ar71xx_pci_bus_space.c stable/11/sys/mips/atheros/ar71xx_pci_bus_space.h stable/11/sys/mips/atheros/ar71xx_setup.c stable/11/sys/mips/atheros/ar71xx_setup.h stable/11/sys/mips/atheros/ar71xx_spi.c stable/11/sys/mips/atheros/ar71xx_wdog.c stable/11/sys/mips/atheros/ar71xxreg.h stable/11/sys/mips/atheros/ar724x_chip.c stable/11/sys/mips/atheros/ar724x_chip.h stable/11/sys/mips/atheros/ar724x_pci.c stable/11/sys/mips/atheros/ar724xreg.h stable/11/sys/mips/atheros/ar91xx_chip.c stable/11/sys/mips/atheros/ar91xx_chip.h stable/11/sys/mips/atheros/ar91xxreg.h stable/11/sys/mips/atheros/ar933x_chip.c stable/11/sys/mips/atheros/ar933x_chip.h stable/11/sys/mips/atheros/ar933x_uart.h stable/11/sys/mips/atheros/ar933xreg.h stable/11/sys/mips/atheros/ar934x_chip.c stable/11/sys/mips/atheros/ar934x_chip.h stable/11/sys/mips/atheros/ar934xreg.h stable/11/sys/mips/atheros/if_arge.c stable/11/sys/mips/atheros/if_argevar.h stable/11/sys/mips/atheros/pcf2123_rtc.c stable/11/sys/mips/atheros/pcf2123reg.h stable/11/sys/mips/atheros/uart_bus_ar71xx.c stable/11/sys/mips/atheros/uart_bus_ar933x.c stable/11/sys/mips/atheros/uart_cpu_ar71xx.c stable/11/sys/mips/atheros/uart_cpu_ar933x.c stable/11/sys/mips/atheros/uart_dev_ar933x.c stable/11/sys/mips/atheros/uart_dev_ar933x.h stable/11/sys/mips/beri/beri_machdep.c stable/11/sys/mips/beri/beri_pic.c stable/11/sys/mips/cavium/ciu.c stable/11/sys/mips/cavium/cryptocteon/cavium_crypto.c stable/11/sys/mips/cavium/cvmx_config.h stable/11/sys/mips/cavium/if_octm.c stable/11/sys/mips/cavium/obio.c stable/11/sys/mips/cavium/obiovar.h stable/11/sys/mips/cavium/octe/cavium-ethernet.h stable/11/sys/mips/cavium/octe/ethernet-common.c stable/11/sys/mips/cavium/octe/ethernet-common.h stable/11/sys/mips/cavium/octe/ethernet-defines.h stable/11/sys/mips/cavium/octe/ethernet-headers.h stable/11/sys/mips/cavium/octe/ethernet-mdio.c stable/11/sys/mips/cavium/octe/ethernet-mdio.h stable/11/sys/mips/cavium/octe/ethernet-mem.c stable/11/sys/mips/cavium/octe/ethernet-mem.h stable/11/sys/mips/cavium/octe/ethernet-mv88e61xx.c stable/11/sys/mips/cavium/octe/ethernet-mv88e61xx.h stable/11/sys/mips/cavium/octe/ethernet-rgmii.c stable/11/sys/mips/cavium/octe/ethernet-rx.c stable/11/sys/mips/cavium/octe/ethernet-rx.h stable/11/sys/mips/cavium/octe/ethernet-sgmii.c stable/11/sys/mips/cavium/octe/ethernet-spi.c stable/11/sys/mips/cavium/octe/ethernet-tx.c stable/11/sys/mips/cavium/octe/ethernet-tx.h stable/11/sys/mips/cavium/octe/ethernet-util.h stable/11/sys/mips/cavium/octe/ethernet-xaui.c stable/11/sys/mips/cavium/octe/ethernet.c stable/11/sys/mips/cavium/octe/mv88e61xxphy.c stable/11/sys/mips/cavium/octe/mv88e61xxphyreg.h stable/11/sys/mips/cavium/octe/octe.c stable/11/sys/mips/cavium/octe/octebus.c stable/11/sys/mips/cavium/octe/octebusvar.h stable/11/sys/mips/cavium/octe/wrapper-cvmx-includes.h stable/11/sys/mips/cavium/octeon_cop2.h stable/11/sys/mips/cavium/octeon_ds1337.c stable/11/sys/mips/cavium/octeon_ebt3000_cf.c stable/11/sys/mips/cavium/octeon_gpio.c stable/11/sys/mips/cavium/octeon_gpiovar.h stable/11/sys/mips/cavium/octeon_irq.h stable/11/sys/mips/cavium/octeon_machdep.c stable/11/sys/mips/cavium/octeon_mp.c stable/11/sys/mips/cavium/octeon_pci_console.c stable/11/sys/mips/cavium/octeon_pcmap_regs.h stable/11/sys/mips/cavium/octeon_pmc.c stable/11/sys/mips/cavium/octeon_rnd.c stable/11/sys/mips/cavium/octeon_rtc.c stable/11/sys/mips/cavium/octeon_wdog.c stable/11/sys/mips/cavium/octopci.c stable/11/sys/mips/cavium/octopci_bus_space.c stable/11/sys/mips/cavium/octopcireg.h stable/11/sys/mips/cavium/octopcivar.h stable/11/sys/mips/cavium/uart_bus_octeonusart.c stable/11/sys/mips/cavium/uart_cpu_octeonusart.c stable/11/sys/mips/cavium/uart_dev_oct16550.c stable/11/sys/mips/cavium/usb/octusb.c stable/11/sys/mips/cavium/usb/octusb.h stable/11/sys/mips/cavium/usb/octusb_octeon.c stable/11/sys/mips/gxemul/gxemul_machdep.c stable/11/sys/mips/gxemul/mpreg.h stable/11/sys/mips/idt/idt_machdep.c stable/11/sys/mips/idt/idtpci.c stable/11/sys/mips/idt/idtreg.h stable/11/sys/mips/idt/if_kr.c stable/11/sys/mips/idt/if_krreg.h stable/11/sys/mips/idt/obio.c stable/11/sys/mips/idt/obiovar.h stable/11/sys/mips/idt/uart_bus_rc32434.c stable/11/sys/mips/idt/uart_cpu_rc32434.c stable/11/sys/mips/include/_align.h stable/11/sys/mips/include/_bus.h stable/11/sys/mips/include/_inttypes.h stable/11/sys/mips/include/_limits.h stable/11/sys/mips/include/_stdint.h stable/11/sys/mips/include/_types.h stable/11/sys/mips/include/asm.h stable/11/sys/mips/include/atomic.h stable/11/sys/mips/include/bootinfo.h stable/11/sys/mips/include/bus.h stable/11/sys/mips/include/bus_dma.h stable/11/sys/mips/include/cache.h stable/11/sys/mips/include/cache_mipsNN.h stable/11/sys/mips/include/cache_r4k.h stable/11/sys/mips/include/counter.h stable/11/sys/mips/include/cpu.h stable/11/sys/mips/include/cpufunc.h stable/11/sys/mips/include/cpuinfo.h stable/11/sys/mips/include/cpuregs.h stable/11/sys/mips/include/db_machdep.h stable/11/sys/mips/include/elf.h stable/11/sys/mips/include/endian.h stable/11/sys/mips/include/exec.h stable/11/sys/mips/include/fdt.h stable/11/sys/mips/include/float.h stable/11/sys/mips/include/floatingpoint.h stable/11/sys/mips/include/fls64.h stable/11/sys/mips/include/frame.h stable/11/sys/mips/include/gdb_machdep.h stable/11/sys/mips/include/hwfunc.h stable/11/sys/mips/include/ieee.h stable/11/sys/mips/include/in_cksum.h stable/11/sys/mips/include/intr_machdep.h stable/11/sys/mips/include/kdb.h stable/11/sys/mips/include/limits.h stable/11/sys/mips/include/md_var.h stable/11/sys/mips/include/memdev.h stable/11/sys/mips/include/metadata.h stable/11/sys/mips/include/minidump.h stable/11/sys/mips/include/mips_opcode.h stable/11/sys/mips/include/octeon_cop2.h stable/11/sys/mips/include/ofw_machdep.h stable/11/sys/mips/include/param.h stable/11/sys/mips/include/pcb.h stable/11/sys/mips/include/pcpu.h stable/11/sys/mips/include/pmap.h stable/11/sys/mips/include/proc.h stable/11/sys/mips/include/profile.h stable/11/sys/mips/include/pte.h stable/11/sys/mips/include/ptrace.h stable/11/sys/mips/include/reg.h stable/11/sys/mips/include/regdef.h stable/11/sys/mips/include/regnum.h stable/11/sys/mips/include/reloc.h stable/11/sys/mips/include/runq.h stable/11/sys/mips/include/sc_machdep.h stable/11/sys/mips/include/sf_buf.h stable/11/sys/mips/include/sigframe.h stable/11/sys/mips/include/signal.h stable/11/sys/mips/include/sysarch.h stable/11/sys/mips/include/tlb.h stable/11/sys/mips/include/tls.h stable/11/sys/mips/include/trap.h stable/11/sys/mips/include/ucontext.h stable/11/sys/mips/include/varargs.h stable/11/sys/mips/include/vdso.h stable/11/sys/mips/include/vm.h stable/11/sys/mips/include/vmparam.h stable/11/sys/mips/malta/gt.c stable/11/sys/mips/malta/gt_pci.c stable/11/sys/mips/malta/gt_pci_bus_space.c stable/11/sys/mips/malta/gt_pci_bus_space.h stable/11/sys/mips/malta/gtreg.h stable/11/sys/mips/malta/gtvar.h stable/11/sys/mips/malta/malta_machdep.c stable/11/sys/mips/malta/maltareg.h stable/11/sys/mips/malta/obio.c stable/11/sys/mips/malta/obiovar.h stable/11/sys/mips/malta/uart_bus_maltausart.c stable/11/sys/mips/malta/uart_cpu_maltausart.c stable/11/sys/mips/malta/yamon.c stable/11/sys/mips/malta/yamon.h stable/11/sys/mips/mips/autoconf.c stable/11/sys/mips/mips/bus_space_generic.c stable/11/sys/mips/mips/busdma_machdep.c stable/11/sys/mips/mips/cache.c stable/11/sys/mips/mips/cache_mipsNN.c stable/11/sys/mips/mips/cpu.c stable/11/sys/mips/mips/db_disasm.c stable/11/sys/mips/mips/db_interface.c stable/11/sys/mips/mips/db_trace.c stable/11/sys/mips/mips/dump_machdep.c stable/11/sys/mips/mips/elf_machdep.c stable/11/sys/mips/mips/elf_trampoline.c stable/11/sys/mips/mips/freebsd32_machdep.c stable/11/sys/mips/mips/gdb_machdep.c stable/11/sys/mips/mips/genassym.c stable/11/sys/mips/mips/in_cksum.c stable/11/sys/mips/mips/intr_machdep.c stable/11/sys/mips/mips/libkern_machdep.c stable/11/sys/mips/mips/machdep.c stable/11/sys/mips/mips/mem.c stable/11/sys/mips/mips/minidump_machdep.c stable/11/sys/mips/mips/mp_machdep.c stable/11/sys/mips/mips/octeon_cop2.c stable/11/sys/mips/mips/pm_machdep.c stable/11/sys/mips/mips/pmap.c stable/11/sys/mips/mips/ptrace_machdep.c stable/11/sys/mips/mips/sc_machdep.c stable/11/sys/mips/mips/stack_machdep.c stable/11/sys/mips/mips/stdatomic.c stable/11/sys/mips/mips/sys_machdep.c stable/11/sys/mips/mips/tick.c stable/11/sys/mips/mips/tlb.c stable/11/sys/mips/mips/trap.c stable/11/sys/mips/mips/uio_machdep.c stable/11/sys/mips/mips/uma_machdep.c stable/11/sys/mips/mips/vm_machdep.c stable/11/sys/mips/nlm/board.c stable/11/sys/mips/nlm/board.h stable/11/sys/mips/nlm/board_cpld.c stable/11/sys/mips/nlm/board_eeprom.c stable/11/sys/mips/nlm/bus_space_rmi.c stable/11/sys/mips/nlm/bus_space_rmi_pci.c stable/11/sys/mips/nlm/clock.h stable/11/sys/mips/nlm/cms.c stable/11/sys/mips/nlm/dev/net/mdio.c stable/11/sys/mips/nlm/dev/net/nae.c stable/11/sys/mips/nlm/dev/net/sgmii.c stable/11/sys/mips/nlm/dev/net/ucore/ucore.h stable/11/sys/mips/nlm/dev/net/ucore/ucore_app.c stable/11/sys/mips/nlm/dev/net/xaui.c stable/11/sys/mips/nlm/dev/net/xlpge.c stable/11/sys/mips/nlm/dev/net/xlpge.h stable/11/sys/mips/nlm/dev/sec/nlmrsa.c stable/11/sys/mips/nlm/dev/sec/nlmrsalib.h stable/11/sys/mips/nlm/dev/sec/nlmsec.c stable/11/sys/mips/nlm/dev/sec/nlmseclib.c stable/11/sys/mips/nlm/dev/sec/nlmseclib.h stable/11/sys/mips/nlm/dev/sec/rsa_ucode.h stable/11/sys/mips/nlm/hal/bridge.h stable/11/sys/mips/nlm/hal/cop2.h stable/11/sys/mips/nlm/hal/cpucontrol.h stable/11/sys/mips/nlm/hal/fmn.c stable/11/sys/mips/nlm/hal/fmn.h stable/11/sys/mips/nlm/hal/gbu.h stable/11/sys/mips/nlm/hal/haldefs.h stable/11/sys/mips/nlm/hal/interlaken.h stable/11/sys/mips/nlm/hal/iomap.h stable/11/sys/mips/nlm/hal/mdio.h stable/11/sys/mips/nlm/hal/mips-extns.h stable/11/sys/mips/nlm/hal/mmu.h stable/11/sys/mips/nlm/hal/nae.h stable/11/sys/mips/nlm/hal/nlm_hal.c stable/11/sys/mips/nlm/hal/nlmsaelib.h stable/11/sys/mips/nlm/hal/pcibus.h stable/11/sys/mips/nlm/hal/pic.h stable/11/sys/mips/nlm/hal/poe.h stable/11/sys/mips/nlm/hal/sgmii.h stable/11/sys/mips/nlm/hal/sys.h stable/11/sys/mips/nlm/hal/uart.h stable/11/sys/mips/nlm/hal/ucore_loader.h stable/11/sys/mips/nlm/hal/usb.h stable/11/sys/mips/nlm/hal/xaui.h stable/11/sys/mips/nlm/interrupt.h stable/11/sys/mips/nlm/intr_machdep.c stable/11/sys/mips/nlm/msgring.h stable/11/sys/mips/nlm/tick.c stable/11/sys/mips/nlm/uart_cpu_xlp.c stable/11/sys/mips/nlm/usb_init.c stable/11/sys/mips/nlm/xlp.h stable/11/sys/mips/nlm/xlp_machdep.c stable/11/sys/mips/nlm/xlp_pci.c stable/11/sys/mips/rmi/board.c stable/11/sys/mips/rmi/board.h stable/11/sys/mips/rmi/bus_space_rmi.c stable/11/sys/mips/rmi/bus_space_rmi_pci.c stable/11/sys/mips/rmi/dev/iic/at24co2n.c stable/11/sys/mips/rmi/dev/iic/max6657.c stable/11/sys/mips/rmi/dev/nlge/if_nlge.c stable/11/sys/mips/rmi/dev/nlge/if_nlge.h stable/11/sys/mips/rmi/dev/sec/desc.h stable/11/sys/mips/rmi/dev/sec/rmilib.c stable/11/sys/mips/rmi/dev/sec/rmilib.h stable/11/sys/mips/rmi/dev/sec/rmisec.c stable/11/sys/mips/rmi/dev/xlr/atx_cpld.h stable/11/sys/mips/rmi/dev/xlr/debug.h stable/11/sys/mips/rmi/dev/xlr/xgmac_mdio.h stable/11/sys/mips/rmi/fmn.c stable/11/sys/mips/rmi/interrupt.h stable/11/sys/mips/rmi/intr_machdep.c stable/11/sys/mips/rmi/iodi.c stable/11/sys/mips/rmi/iomap.h stable/11/sys/mips/rmi/msgring.c stable/11/sys/mips/rmi/msgring.cfg stable/11/sys/mips/rmi/msgring.h stable/11/sys/mips/rmi/pcibus.h stable/11/sys/mips/rmi/pic.h stable/11/sys/mips/rmi/rmi_boot_info.h stable/11/sys/mips/rmi/rmi_mips_exts.h stable/11/sys/mips/rmi/tick.c stable/11/sys/mips/rmi/uart_bus_xlr_iodi.c stable/11/sys/mips/rmi/uart_cpu_mips_xlr.c stable/11/sys/mips/rmi/xlr_i2c.c stable/11/sys/mips/rmi/xlr_machdep.c stable/11/sys/mips/rmi/xlr_pci.c stable/11/sys/mips/rmi/xlr_pcmcia.c stable/11/sys/mips/rmi/xls_ehci.c stable/11/sys/mips/rt305x/obio.c stable/11/sys/mips/rt305x/obiovar.h stable/11/sys/mips/rt305x/rt305x_dotg.c stable/11/sys/mips/rt305x/rt305x_gpio.c stable/11/sys/mips/rt305x/rt305x_gpio.h stable/11/sys/mips/rt305x/rt305x_gpiovar.h stable/11/sys/mips/rt305x/rt305x_ic.c stable/11/sys/mips/rt305x/rt305x_icvar.h stable/11/sys/mips/rt305x/rt305x_machdep.c stable/11/sys/mips/rt305x/rt305x_sysctl.c stable/11/sys/mips/rt305x/rt305x_sysctlvar.h stable/11/sys/mips/rt305x/rt305xreg.h stable/11/sys/mips/rt305x/rt_swreg.h stable/11/sys/mips/rt305x/uart_bus_rt305x.c stable/11/sys/mips/rt305x/uart_cpu_rt305x.c stable/11/sys/mips/rt305x/uart_dev_rt305x.c stable/11/sys/mips/rt305x/uart_dev_rt305x.h stable/11/sys/mips/sibyte/ata_zbbus.c stable/11/sys/mips/sibyte/sb_bus_space.h stable/11/sys/mips/sibyte/sb_machdep.c stable/11/sys/mips/sibyte/sb_scd.c stable/11/sys/mips/sibyte/sb_scd.h stable/11/sys/mips/sibyte/sb_zbbus.c stable/11/sys/mips/sibyte/sb_zbpci.c stable/11/sys/net/bpf.c stable/11/sys/net/bpf.h stable/11/sys/net/bpf_buffer.c stable/11/sys/net/bpf_filter.c stable/11/sys/net/bpf_jitter.c stable/11/sys/net/bpf_jitter.h stable/11/sys/net/bpfdesc.h stable/11/sys/net/fddi.h stable/11/sys/net/if.c stable/11/sys/net/if.h stable/11/sys/net/if_arc.h stable/11/sys/net/if_arcsubr.c stable/11/sys/net/if_arp.h stable/11/sys/net/if_clone.c stable/11/sys/net/if_clone.h stable/11/sys/net/if_disc.c stable/11/sys/net/if_dl.h stable/11/sys/net/if_edsc.c stable/11/sys/net/if_ethersubr.c stable/11/sys/net/if_fddisubr.c stable/11/sys/net/if_fwsubr.c stable/11/sys/net/if_gif.c stable/11/sys/net/if_gif.h stable/11/sys/net/if_llc.h stable/11/sys/net/if_loop.c stable/11/sys/net/if_stf.c stable/11/sys/net/if_types.h stable/11/sys/net/if_var.h stable/11/sys/net/ifq.h stable/11/sys/net/pfkeyv2.h stable/11/sys/net/radix.c stable/11/sys/net/radix.h stable/11/sys/net/radix_mpath.c stable/11/sys/net/radix_mpath.h stable/11/sys/net/raw_cb.c stable/11/sys/net/raw_cb.h stable/11/sys/net/raw_usrreq.c stable/11/sys/net/route.c stable/11/sys/net/route.h stable/11/sys/net/rtsock.c stable/11/sys/net/slcompress.c stable/11/sys/net/slcompress.h stable/11/sys/netinet/icmp6.h stable/11/sys/netinet/icmp_var.h stable/11/sys/netinet/if_ether.c stable/11/sys/netinet/if_ether.h stable/11/sys/netinet/igmp.c stable/11/sys/netinet/igmp.h stable/11/sys/netinet/igmp_var.h stable/11/sys/netinet/in.c stable/11/sys/netinet/in.h stable/11/sys/netinet/in_cksum.c stable/11/sys/netinet/in_gif.c stable/11/sys/netinet/in_pcb.c stable/11/sys/netinet/in_pcb.h stable/11/sys/netinet/in_proto.c stable/11/sys/netinet/in_systm.h stable/11/sys/netinet/in_var.h stable/11/sys/netinet/ip.h stable/11/sys/netinet/ip6.h stable/11/sys/netinet/ip_divert.c stable/11/sys/netinet/ip_ecn.c stable/11/sys/netinet/ip_ecn.h stable/11/sys/netinet/ip_encap.c stable/11/sys/netinet/ip_encap.h stable/11/sys/netinet/ip_icmp.c stable/11/sys/netinet/ip_icmp.h stable/11/sys/netinet/ip_input.c stable/11/sys/netinet/ip_mroute.c stable/11/sys/netinet/ip_mroute.h stable/11/sys/netinet/ip_options.c stable/11/sys/netinet/ip_options.h stable/11/sys/netinet/ip_output.c stable/11/sys/netinet/ip_var.h stable/11/sys/netinet/pim.h stable/11/sys/netinet/pim_var.h stable/11/sys/netinet/raw_ip.c stable/11/sys/netinet/sctp.h stable/11/sys/netinet/sctp_asconf.c stable/11/sys/netinet/sctp_asconf.h stable/11/sys/netinet/sctp_auth.c stable/11/sys/netinet/sctp_auth.h stable/11/sys/netinet/sctp_bsd_addr.c stable/11/sys/netinet/sctp_bsd_addr.h stable/11/sys/netinet/sctp_cc_functions.c stable/11/sys/netinet/sctp_constants.h stable/11/sys/netinet/sctp_crc32.c stable/11/sys/netinet/sctp_crc32.h stable/11/sys/netinet/sctp_dtrace_declare.h stable/11/sys/netinet/sctp_dtrace_define.h stable/11/sys/netinet/sctp_header.h stable/11/sys/netinet/sctp_indata.c stable/11/sys/netinet/sctp_indata.h stable/11/sys/netinet/sctp_input.c stable/11/sys/netinet/sctp_input.h stable/11/sys/netinet/sctp_lock_bsd.h stable/11/sys/netinet/sctp_os.h stable/11/sys/netinet/sctp_os_bsd.h stable/11/sys/netinet/sctp_output.c stable/11/sys/netinet/sctp_output.h stable/11/sys/netinet/sctp_pcb.c stable/11/sys/netinet/sctp_pcb.h stable/11/sys/netinet/sctp_peeloff.c stable/11/sys/netinet/sctp_peeloff.h stable/11/sys/netinet/sctp_structs.h stable/11/sys/netinet/sctp_sysctl.c stable/11/sys/netinet/sctp_sysctl.h stable/11/sys/netinet/sctp_timer.c stable/11/sys/netinet/sctp_timer.h stable/11/sys/netinet/sctp_uio.h stable/11/sys/netinet/sctp_usrreq.c stable/11/sys/netinet/sctp_var.h stable/11/sys/netinet/sctputil.c stable/11/sys/netinet/sctputil.h stable/11/sys/netinet/tcp.h stable/11/sys/netinet/tcp_debug.c stable/11/sys/netinet/tcp_debug.h stable/11/sys/netinet/tcp_fsm.h stable/11/sys/netinet/tcp_input.c stable/11/sys/netinet/tcp_output.c stable/11/sys/netinet/tcp_reass.c stable/11/sys/netinet/tcp_sack.c stable/11/sys/netinet/tcp_seq.h stable/11/sys/netinet/tcp_subr.c stable/11/sys/netinet/tcp_syncache.h stable/11/sys/netinet/tcp_timer.c stable/11/sys/netinet/tcp_timer.h stable/11/sys/netinet/tcp_timewait.c stable/11/sys/netinet/tcp_usrreq.c stable/11/sys/netinet/tcp_var.h stable/11/sys/netinet/tcpip.h stable/11/sys/netinet/udp.h stable/11/sys/netinet/udp_usrreq.c stable/11/sys/netinet/udp_var.h stable/11/sys/netinet6/dest6.c stable/11/sys/netinet6/frag6.c stable/11/sys/netinet6/icmp6.c stable/11/sys/netinet6/in6.c stable/11/sys/netinet6/in6.h stable/11/sys/netinet6/in6_cksum.c stable/11/sys/netinet6/in6_gif.c stable/11/sys/netinet6/in6_ifattach.c stable/11/sys/netinet6/in6_ifattach.h stable/11/sys/netinet6/in6_pcb.c stable/11/sys/netinet6/in6_pcb.h stable/11/sys/netinet6/in6_proto.c stable/11/sys/netinet6/in6_rmx.c stable/11/sys/netinet6/in6_src.c stable/11/sys/netinet6/in6_var.h stable/11/sys/netinet6/ip6_ecn.h stable/11/sys/netinet6/ip6_forward.c stable/11/sys/netinet6/ip6_id.c stable/11/sys/netinet6/ip6_input.c stable/11/sys/netinet6/ip6_mroute.c stable/11/sys/netinet6/ip6_mroute.h stable/11/sys/netinet6/ip6_output.c stable/11/sys/netinet6/ip6_var.h stable/11/sys/netinet6/ip6protosw.h stable/11/sys/netinet6/mld6.c stable/11/sys/netinet6/nd6.c stable/11/sys/netinet6/nd6.h stable/11/sys/netinet6/nd6_nbr.c stable/11/sys/netinet6/nd6_rtr.c stable/11/sys/netinet6/pim6.h stable/11/sys/netinet6/pim6_var.h stable/11/sys/netinet6/raw_ip6.c stable/11/sys/netinet6/raw_ip6.h stable/11/sys/netinet6/route6.c stable/11/sys/netinet6/scope6.c stable/11/sys/netinet6/scope6_var.h stable/11/sys/netinet6/sctp6_usrreq.c stable/11/sys/netinet6/sctp6_var.h stable/11/sys/netinet6/tcp6_var.h stable/11/sys/netinet6/udp6_usrreq.c stable/11/sys/netinet6/udp6_var.h stable/11/sys/netipsec/ah.h stable/11/sys/netipsec/esp.h stable/11/sys/netipsec/ipcomp.h stable/11/sys/netipsec/ipcomp_var.h stable/11/sys/netipsec/ipsec.c stable/11/sys/netipsec/ipsec.h stable/11/sys/netipsec/ipsec6.h stable/11/sys/netipsec/key.c stable/11/sys/netipsec/key.h stable/11/sys/netipsec/key_debug.c stable/11/sys/netipsec/key_debug.h stable/11/sys/netipsec/key_var.h stable/11/sys/netipsec/keydb.h stable/11/sys/netipsec/keysock.c stable/11/sys/netipsec/keysock.h stable/11/sys/netpfil/pf/in4_cksum.c stable/11/sys/netsmb/smb_crypt.c stable/11/sys/nfs/bootp_subr.c stable/11/sys/nfs/krpc_subr.c stable/11/sys/nfs/nfs_common.h stable/11/sys/nfs/nfs_diskless.c stable/11/sys/nfs/nfs_nfssvc.c stable/11/sys/nfs/nfsdiskless.h stable/11/sys/nfs/nfsproto.h stable/11/sys/nfs/nfssvc.h stable/11/sys/nfs/xdr_subs.h stable/11/sys/nfsclient/nfs.h stable/11/sys/nfsclient/nfsargs.h stable/11/sys/nfsclient/nfsm_subs.h stable/11/sys/nfsclient/nfsmount.h stable/11/sys/nfsclient/nfsnode.h stable/11/sys/nfsclient/nfsstats.h stable/11/sys/nfsserver/nfs.h stable/11/sys/nfsserver/nfsm_subs.h stable/11/sys/nfsserver/nfsrvcache.h stable/11/sys/nfsserver/nfsrvstats.h stable/11/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c stable/11/sys/powerpc/aim/mmu_oea.c stable/11/sys/powerpc/aim/mmu_oea64.c stable/11/sys/powerpc/aim/mmu_oea64.h stable/11/sys/powerpc/aim/moea64_native.c stable/11/sys/powerpc/aim/mp_cpudep.c stable/11/sys/powerpc/aim/slb.c stable/11/sys/powerpc/booke/machdep_e500.c stable/11/sys/powerpc/booke/machdep_ppc4xx.c stable/11/sys/powerpc/booke/mp_cpudep.c stable/11/sys/powerpc/booke/platform_bare.c stable/11/sys/powerpc/booke/pmap.c stable/11/sys/powerpc/cpufreq/dfs.c stable/11/sys/powerpc/cpufreq/pcr.c stable/11/sys/powerpc/cpufreq/pmufreq.c stable/11/sys/powerpc/fpu/fpu_add.c stable/11/sys/powerpc/fpu/fpu_arith.h stable/11/sys/powerpc/fpu/fpu_compare.c stable/11/sys/powerpc/fpu/fpu_div.c stable/11/sys/powerpc/fpu/fpu_emu.c stable/11/sys/powerpc/fpu/fpu_emu.h stable/11/sys/powerpc/fpu/fpu_explode.c stable/11/sys/powerpc/fpu/fpu_extern.h stable/11/sys/powerpc/fpu/fpu_implode.c stable/11/sys/powerpc/fpu/fpu_instr.h stable/11/sys/powerpc/fpu/fpu_mul.c stable/11/sys/powerpc/fpu/fpu_sqrt.c stable/11/sys/powerpc/fpu/fpu_subr.c stable/11/sys/powerpc/include/_align.h stable/11/sys/powerpc/include/_bus.h stable/11/sys/powerpc/include/_inttypes.h stable/11/sys/powerpc/include/_limits.h stable/11/sys/powerpc/include/_stdint.h stable/11/sys/powerpc/include/_types.h stable/11/sys/powerpc/include/altivec.h stable/11/sys/powerpc/include/asm.h stable/11/sys/powerpc/include/atomic.h stable/11/sys/powerpc/include/bat.h stable/11/sys/powerpc/include/bus.h stable/11/sys/powerpc/include/bus_dma.h stable/11/sys/powerpc/include/counter.h stable/11/sys/powerpc/include/cpu.h stable/11/sys/powerpc/include/cpufunc.h stable/11/sys/powerpc/include/dbdma.h stable/11/sys/powerpc/include/elf.h stable/11/sys/powerpc/include/endian.h stable/11/sys/powerpc/include/exec.h stable/11/sys/powerpc/include/float.h stable/11/sys/powerpc/include/floatingpoint.h stable/11/sys/powerpc/include/fpu.h stable/11/sys/powerpc/include/frame.h stable/11/sys/powerpc/include/gdb_machdep.h stable/11/sys/powerpc/include/hid.h stable/11/sys/powerpc/include/ieee.h stable/11/sys/powerpc/include/in_cksum.h stable/11/sys/powerpc/include/intr_machdep.h stable/11/sys/powerpc/include/kdb.h stable/11/sys/powerpc/include/limits.h stable/11/sys/powerpc/include/machdep.h stable/11/sys/powerpc/include/md_var.h stable/11/sys/powerpc/include/memdev.h stable/11/sys/powerpc/include/metadata.h stable/11/sys/powerpc/include/mmuvar.h stable/11/sys/powerpc/include/ofw_machdep.h stable/11/sys/powerpc/include/openpicreg.h stable/11/sys/powerpc/include/openpicvar.h stable/11/sys/powerpc/include/param.h stable/11/sys/powerpc/include/pcb.h stable/11/sys/powerpc/include/pcpu.h stable/11/sys/powerpc/include/pio.h stable/11/sys/powerpc/include/platform.h stable/11/sys/powerpc/include/platformvar.h stable/11/sys/powerpc/include/pmap.h stable/11/sys/powerpc/include/proc.h stable/11/sys/powerpc/include/psl.h stable/11/sys/powerpc/include/pte.h stable/11/sys/powerpc/include/ptrace.h stable/11/sys/powerpc/include/reloc.h stable/11/sys/powerpc/include/rtas.h stable/11/sys/powerpc/include/runq.h stable/11/sys/powerpc/include/sc_machdep.h stable/11/sys/powerpc/include/sigframe.h stable/11/sys/powerpc/include/signal.h stable/11/sys/powerpc/include/slb.h stable/11/sys/powerpc/include/smp.h stable/11/sys/powerpc/include/spr.h stable/11/sys/powerpc/include/sr.h stable/11/sys/powerpc/include/stdarg.h stable/11/sys/powerpc/include/sysarch.h stable/11/sys/powerpc/include/tlb.h stable/11/sys/powerpc/include/trap.h stable/11/sys/powerpc/include/ucontext.h stable/11/sys/powerpc/include/varargs.h stable/11/sys/powerpc/include/vdso.h stable/11/sys/powerpc/include/vm.h stable/11/sys/powerpc/include/vmparam.h stable/11/sys/powerpc/mambo/mambo.c stable/11/sys/powerpc/mambo/mambo_console.c stable/11/sys/powerpc/mambo/mambo_disk.c stable/11/sys/powerpc/mambo/mambocall.h stable/11/sys/powerpc/mpc85xx/atpic.c stable/11/sys/powerpc/mpc85xx/ds1553_bus_fdt.c stable/11/sys/powerpc/mpc85xx/ds1553_core.c stable/11/sys/powerpc/mpc85xx/ds1553_reg.h stable/11/sys/powerpc/mpc85xx/i2c.c stable/11/sys/powerpc/mpc85xx/isa.c stable/11/sys/powerpc/mpc85xx/lbc.c stable/11/sys/powerpc/mpc85xx/lbc.h stable/11/sys/powerpc/mpc85xx/mpc85xx.c stable/11/sys/powerpc/mpc85xx/mpc85xx.h stable/11/sys/powerpc/mpc85xx/pci_mpc85xx.c stable/11/sys/powerpc/mpc85xx/platform_mpc85xx.c stable/11/sys/powerpc/ofw/ofw_machdep.c stable/11/sys/powerpc/ofw/ofw_pcib_pci.c stable/11/sys/powerpc/ofw/ofw_pcibus.c stable/11/sys/powerpc/ofw/ofw_pcibus.h stable/11/sys/powerpc/ofw/ofw_real.c stable/11/sys/powerpc/ofw/ofw_syscons.c stable/11/sys/powerpc/ofw/ofw_syscons.h stable/11/sys/powerpc/ofw/openpic_ofw.c stable/11/sys/powerpc/ofw/rtas.c stable/11/sys/powerpc/powermac/ata_dbdma.c stable/11/sys/powerpc/powermac/ata_dbdma.h stable/11/sys/powerpc/powermac/ata_kauai.c stable/11/sys/powerpc/powermac/ata_macio.c stable/11/sys/powerpc/powermac/atibl.c stable/11/sys/powerpc/powermac/cpcht.c stable/11/sys/powerpc/powermac/cuda.c stable/11/sys/powerpc/powermac/cudavar.h stable/11/sys/powerpc/powermac/dbdma.c stable/11/sys/powerpc/powermac/dbdmavar.h stable/11/sys/powerpc/powermac/fcu.c stable/11/sys/powerpc/powermac/grackle.c stable/11/sys/powerpc/powermac/gracklevar.h stable/11/sys/powerpc/powermac/hrowpic.c stable/11/sys/powerpc/powermac/hrowpicvar.h stable/11/sys/powerpc/powermac/kiic.c stable/11/sys/powerpc/powermac/macgpio.c stable/11/sys/powerpc/powermac/macgpiovar.h stable/11/sys/powerpc/powermac/macio.c stable/11/sys/powerpc/powermac/maciovar.h stable/11/sys/powerpc/powermac/nvbl.c stable/11/sys/powerpc/powermac/platform_powermac.c stable/11/sys/powerpc/powermac/pmu.c stable/11/sys/powerpc/powermac/pmuvar.h stable/11/sys/powerpc/powermac/powermac_thermal.c stable/11/sys/powerpc/powermac/powermac_thermal.h stable/11/sys/powerpc/powermac/pswitch.c stable/11/sys/powerpc/powermac/smu.c stable/11/sys/powerpc/powermac/smusat.c stable/11/sys/powerpc/powermac/uninorth.c stable/11/sys/powerpc/powermac/uninorthpci.c stable/11/sys/powerpc/powermac/uninorthvar.h stable/11/sys/powerpc/powermac/vcoregpio.c stable/11/sys/powerpc/powermac/viareg.h stable/11/sys/powerpc/powerpc/altivec.c stable/11/sys/powerpc/powerpc/autoconf.c stable/11/sys/powerpc/powerpc/bcopy.c stable/11/sys/powerpc/powerpc/bus_machdep.c stable/11/sys/powerpc/powerpc/busdma_machdep.c stable/11/sys/powerpc/powerpc/clock.c stable/11/sys/powerpc/powerpc/copyinout.c stable/11/sys/powerpc/powerpc/copystr.c stable/11/sys/powerpc/powerpc/cpu.c stable/11/sys/powerpc/powerpc/db_hwwatch.c stable/11/sys/powerpc/powerpc/dump_machdep.c stable/11/sys/powerpc/powerpc/elf32_machdep.c stable/11/sys/powerpc/powerpc/elf64_machdep.c stable/11/sys/powerpc/powerpc/exec_machdep.c stable/11/sys/powerpc/powerpc/fpu.c stable/11/sys/powerpc/powerpc/fuswintr.c stable/11/sys/powerpc/powerpc/gdb_machdep.c stable/11/sys/powerpc/powerpc/genassym.c stable/11/sys/powerpc/powerpc/in_cksum.c stable/11/sys/powerpc/powerpc/intr_machdep.c stable/11/sys/powerpc/powerpc/mem.c stable/11/sys/powerpc/powerpc/mp_machdep.c stable/11/sys/powerpc/powerpc/openpic.c stable/11/sys/powerpc/powerpc/platform.c stable/11/sys/powerpc/powerpc/pmap_dispatch.c stable/11/sys/powerpc/powerpc/sc_machdep.c stable/11/sys/powerpc/powerpc/stack_machdep.c stable/11/sys/powerpc/powerpc/suswintr.c stable/11/sys/powerpc/powerpc/syncicache.c stable/11/sys/powerpc/powerpc/sys_machdep.c stable/11/sys/powerpc/powerpc/uio_machdep.c stable/11/sys/powerpc/powerpc/vm_machdep.c stable/11/sys/powerpc/ps3/ehci_ps3.c stable/11/sys/powerpc/ps3/if_glc.c stable/11/sys/powerpc/ps3/if_glcreg.h stable/11/sys/powerpc/ps3/mmu_ps3.c stable/11/sys/powerpc/ps3/ohci_ps3.c stable/11/sys/powerpc/ps3/platform_ps3.c stable/11/sys/powerpc/ps3/ps3_syscons.c stable/11/sys/powerpc/ps3/ps3bus.c stable/11/sys/powerpc/ps3/ps3bus.h stable/11/sys/powerpc/ps3/ps3cdrom.c stable/11/sys/powerpc/ps3/ps3disk.c stable/11/sys/powerpc/ps3/ps3pic.c stable/11/sys/powerpc/pseries/mmu_phyp.c stable/11/sys/powerpc/pseries/phyp-hvcall.h stable/11/sys/powerpc/pseries/phyp_console.c stable/11/sys/powerpc/pseries/phyp_llan.c stable/11/sys/powerpc/pseries/phyp_vscsi.c stable/11/sys/powerpc/pseries/platform_chrp.c stable/11/sys/powerpc/pseries/plpar_iommu.c stable/11/sys/powerpc/pseries/plpar_iommu.h stable/11/sys/powerpc/pseries/plpar_pcibus.c stable/11/sys/powerpc/pseries/rtas_dev.c stable/11/sys/powerpc/pseries/rtas_pci.c stable/11/sys/powerpc/pseries/vdevice.c stable/11/sys/powerpc/pseries/xics.c stable/11/sys/powerpc/psim/ata_iobus.c stable/11/sys/powerpc/psim/iobus.c stable/11/sys/powerpc/psim/iobusvar.h stable/11/sys/powerpc/psim/openpic_iobus.c stable/11/sys/powerpc/psim/uart_iobus.c stable/11/sys/riscv/riscv/in_cksum.c stable/11/sys/riscv/riscv/pmap.c stable/11/sys/rpc/auth.h stable/11/sys/rpc/auth_none.c stable/11/sys/rpc/auth_unix.c stable/11/sys/rpc/authunix_prot.c stable/11/sys/rpc/clnt.h stable/11/sys/rpc/clnt_dg.c stable/11/sys/rpc/clnt_vc.c stable/11/sys/rpc/krpc.h stable/11/sys/rpc/nettype.h stable/11/sys/rpc/pmap_prot.h stable/11/sys/rpc/rpc.h stable/11/sys/rpc/rpc_callmsg.c stable/11/sys/rpc/rpc_com.h stable/11/sys/rpc/rpc_generic.c stable/11/sys/rpc/rpc_msg.h stable/11/sys/rpc/rpc_prot.c stable/11/sys/rpc/rpcb_clnt.c stable/11/sys/rpc/rpcb_clnt.h stable/11/sys/rpc/rpcb_prot.c stable/11/sys/rpc/rpcb_prot.h stable/11/sys/rpc/rpcm_subs.h stable/11/sys/rpc/rpcsec_gss/rpcsec_gss.c stable/11/sys/rpc/rpcsec_gss/rpcsec_gss_int.h stable/11/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c stable/11/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c stable/11/sys/rpc/svc.c stable/11/sys/rpc/svc.h stable/11/sys/rpc/svc_auth.c stable/11/sys/rpc/svc_auth.h stable/11/sys/rpc/svc_auth_unix.c stable/11/sys/rpc/svc_dg.c stable/11/sys/rpc/svc_generic.c stable/11/sys/rpc/svc_vc.c stable/11/sys/rpc/types.h stable/11/sys/rpc/xdr.h stable/11/sys/security/audit/audit.c stable/11/sys/security/audit/audit.h stable/11/sys/security/audit/audit_arg.c stable/11/sys/security/audit/audit_bsm.c stable/11/sys/security/audit/audit_bsm_klib.c stable/11/sys/security/audit/audit_private.h stable/11/sys/security/audit/audit_syscalls.c stable/11/sys/security/audit/audit_worker.c stable/11/sys/security/audit/bsm_domain.c stable/11/sys/security/audit/bsm_errno.c stable/11/sys/security/audit/bsm_fcntl.c stable/11/sys/security/audit/bsm_socket_type.c stable/11/sys/security/audit/bsm_token.c stable/11/sys/sparc64/include/_types.h stable/11/sys/sparc64/include/asm.h stable/11/sys/sparc64/include/bus_common.h stable/11/sys/sparc64/include/cache.h stable/11/sys/sparc64/include/cpu.h stable/11/sys/sparc64/include/endian.h stable/11/sys/sparc64/include/float.h stable/11/sys/sparc64/include/floatingpoint.h stable/11/sys/sparc64/include/ieee.h stable/11/sys/sparc64/include/in_cksum.h stable/11/sys/sparc64/include/iommureg.h stable/11/sys/sparc64/include/md_var.h stable/11/sys/sparc64/include/pmap.h stable/11/sys/sparc64/include/proc.h stable/11/sys/sparc64/include/ptrace.h stable/11/sys/sparc64/include/reg.h stable/11/sys/sparc64/include/reloc.h stable/11/sys/sparc64/include/setjmp.h stable/11/sys/sparc64/include/signal.h stable/11/sys/sparc64/include/sysarch.h stable/11/sys/sparc64/include/varargs.h stable/11/sys/sparc64/include/vmparam.h stable/11/sys/sparc64/sparc64/cache.c stable/11/sys/sparc64/sparc64/eeprom.c stable/11/sys/sparc64/sparc64/in_cksum.c stable/11/sys/sparc64/sparc64/intr_machdep.c stable/11/sys/sparc64/sparc64/machdep.c stable/11/sys/sparc64/sparc64/mem.c stable/11/sys/sparc64/sparc64/pmap.c stable/11/sys/sparc64/sparc64/trap.c stable/11/sys/sparc64/sparc64/uio_machdep.c stable/11/sys/sparc64/sparc64/vm_machdep.c stable/11/sys/sys/_bitset.h stable/11/sys/sys/_bus_dma.h stable/11/sys/sys/_callout.h stable/11/sys/sys/_cpuset.h stable/11/sys/sys/_ffcounter.h stable/11/sys/sys/_iovec.h stable/11/sys/sys/_kstack_cache.h stable/11/sys/sys/_lock.h stable/11/sys/sys/_lockmgr.h stable/11/sys/sys/_mutex.h stable/11/sys/sys/_null.h stable/11/sys/sys/_pctrie.h stable/11/sys/sys/_pthreadtypes.h stable/11/sys/sys/_rmlock.h stable/11/sys/sys/_rwlock.h stable/11/sys/sys/_semaphore.h stable/11/sys/sys/_sigset.h stable/11/sys/sys/_sockaddr_storage.h stable/11/sys/sys/_stack.h stable/11/sys/sys/_stdint.h stable/11/sys/sys/_sx.h stable/11/sys/sys/_task.h stable/11/sys/sys/_termios.h stable/11/sys/sys/_timespec.h stable/11/sys/sys/_timeval.h stable/11/sys/sys/_types.h stable/11/sys/sys/_umtx.h stable/11/sys/sys/_unrhdr.h stable/11/sys/sys/aac_ioctl.h stable/11/sys/sys/acct.h stable/11/sys/sys/acl.h stable/11/sys/sys/agpio.h stable/11/sys/sys/aio.h stable/11/sys/sys/alq.h stable/11/sys/sys/assym.h stable/11/sys/sys/ata.h stable/11/sys/sys/bio.h stable/11/sys/sys/bitset.h stable/11/sys/sys/bitstring.h stable/11/sys/sys/blist.h stable/11/sys/sys/boot.h stable/11/sys/sys/buf.h stable/11/sys/sys/buf_ring.h stable/11/sys/sys/bufobj.h stable/11/sys/sys/bus.h stable/11/sys/sys/bus_dma.h stable/11/sys/sys/busdma_bufalloc.h stable/11/sys/sys/callout.h stable/11/sys/sys/capability.h stable/11/sys/sys/caprights.h stable/11/sys/sys/cdefs.h stable/11/sys/sys/cdrio.h stable/11/sys/sys/cfictl.h stable/11/sys/sys/chio.h stable/11/sys/sys/clock.h stable/11/sys/sys/condvar.h stable/11/sys/sys/conf.h stable/11/sys/sys/cons.h stable/11/sys/sys/consio.h stable/11/sys/sys/copyright.h stable/11/sys/sys/counter.h stable/11/sys/sys/cpu.h stable/11/sys/sys/cpuctl.h stable/11/sys/sys/cpuset.h stable/11/sys/sys/ctype.h stable/11/sys/sys/devicestat.h stable/11/sys/sys/digiio.h stable/11/sys/sys/dir.h stable/11/sys/sys/dirent.h stable/11/sys/sys/disklabel.h stable/11/sys/sys/diskmbr.h stable/11/sys/sys/dkstat.h stable/11/sys/sys/domain.h stable/11/sys/sys/dtrace_bsd.h stable/11/sys/sys/dvdio.h stable/11/sys/sys/elf.h stable/11/sys/sys/elf32.h stable/11/sys/sys/elf64.h stable/11/sys/sys/elf_common.h stable/11/sys/sys/elf_generic.h stable/11/sys/sys/endian.h stable/11/sys/sys/errno.h stable/11/sys/sys/eui64.h stable/11/sys/sys/event.h stable/11/sys/sys/eventhandler.h stable/11/sys/sys/eventvar.h stable/11/sys/sys/exec.h stable/11/sys/sys/extattr.h stable/11/sys/sys/fail.h stable/11/sys/sys/fbio.h stable/11/sys/sys/fcntl.h stable/11/sys/sys/fdcio.h stable/11/sys/sys/file.h stable/11/sys/sys/filedesc.h stable/11/sys/sys/filio.h stable/11/sys/sys/firmware.h stable/11/sys/sys/gmon.h stable/11/sys/sys/gpio.h stable/11/sys/sys/gpt.h stable/11/sys/sys/hash.h stable/11/sys/sys/hhook.h stable/11/sys/sys/iconv.h stable/11/sys/sys/imgact.h stable/11/sys/sys/imgact_aout.h stable/11/sys/sys/imgact_elf.h stable/11/sys/sys/interrupt.h stable/11/sys/sys/ioccom.h stable/11/sys/sys/ioctl.h stable/11/sys/sys/ioctl_compat.h stable/11/sys/sys/ipc.h stable/11/sys/sys/ipmi.h stable/11/sys/sys/jail.h stable/11/sys/sys/joystick.h stable/11/sys/sys/kdb.h stable/11/sys/sys/kenv.h stable/11/sys/sys/kernel.h stable/11/sys/sys/kerneldump.h stable/11/sys/sys/khelp.h stable/11/sys/sys/kobj.h stable/11/sys/sys/ksem.h stable/11/sys/sys/kthread.h stable/11/sys/sys/ktr.h stable/11/sys/sys/ktr_class.h stable/11/sys/sys/ktrace.h stable/11/sys/sys/libkern.h stable/11/sys/sys/limits.h stable/11/sys/sys/link_aout.h stable/11/sys/sys/link_elf.h stable/11/sys/sys/linker.h stable/11/sys/sys/linker_set.h stable/11/sys/sys/lock.h stable/11/sys/sys/lock_profile.h stable/11/sys/sys/lockf.h stable/11/sys/sys/lockmgr.h stable/11/sys/sys/lockstat.h stable/11/sys/sys/loginclass.h stable/11/sys/sys/mac.h stable/11/sys/sys/malloc.h stable/11/sys/sys/mbuf.h stable/11/sys/sys/mchain.h stable/11/sys/sys/mdioctl.h stable/11/sys/sys/memdesc.h stable/11/sys/sys/mman.h stable/11/sys/sys/module.h stable/11/sys/sys/module_khelp.h stable/11/sys/sys/mount.h stable/11/sys/sys/mpt_ioctl.h stable/11/sys/sys/mqueue.h stable/11/sys/sys/msg.h stable/11/sys/sys/msgbuf.h stable/11/sys/sys/mtio.h stable/11/sys/sys/mutex.h stable/11/sys/sys/namei.h stable/11/sys/sys/nlist_aout.h stable/11/sys/sys/osd.h stable/11/sys/sys/param.h stable/11/sys/sys/pciio.h stable/11/sys/sys/pcpu.h stable/11/sys/sys/pctrie.h stable/11/sys/sys/pioctl.h stable/11/sys/sys/pmc.h stable/11/sys/sys/pmckern.h stable/11/sys/sys/pmclog.h stable/11/sys/sys/poll.h stable/11/sys/sys/posix4.h stable/11/sys/sys/power.h stable/11/sys/sys/priority.h stable/11/sys/sys/priv.h stable/11/sys/sys/proc.h stable/11/sys/sys/procctl.h stable/11/sys/sys/procdesc.h stable/11/sys/sys/procfs.h stable/11/sys/sys/protosw.h stable/11/sys/sys/ptio.h stable/11/sys/sys/ptrace.h stable/11/sys/sys/queue.h stable/11/sys/sys/racct.h stable/11/sys/sys/random.h stable/11/sys/sys/rangelock.h stable/11/sys/sys/rctl.h stable/11/sys/sys/reboot.h stable/11/sys/sys/refcount.h stable/11/sys/sys/regression.h stable/11/sys/sys/resource.h stable/11/sys/sys/resourcevar.h stable/11/sys/sys/rmlock.h stable/11/sys/sys/rtprio.h stable/11/sys/sys/runq.h stable/11/sys/sys/rwlock.h stable/11/sys/sys/sbuf.h stable/11/sys/sys/sched.h stable/11/sys/sys/sdt.h stable/11/sys/sys/select.h stable/11/sys/sys/selinfo.h stable/11/sys/sys/sema.h stable/11/sys/sys/serial.h stable/11/sys/sys/sf_buf.h stable/11/sys/sys/sglist.h stable/11/sys/sys/shm.h stable/11/sys/sys/sigio.h stable/11/sys/sys/signal.h stable/11/sys/sys/signalvar.h stable/11/sys/sys/sleepqueue.h stable/11/sys/sys/slicer.h stable/11/sys/sys/snoop.h stable/11/sys/sys/sockbuf.h stable/11/sys/sys/socket.h stable/11/sys/sys/socketvar.h stable/11/sys/sys/sockio.h stable/11/sys/sys/sockopt.h stable/11/sys/sys/stack.h stable/11/sys/sys/stat.h stable/11/sys/sys/stdatomic.h stable/11/sys/sys/stddef.h stable/11/sys/sys/stdint.h stable/11/sys/sys/sun_disklabel.h stable/11/sys/sys/sx.h stable/11/sys/sys/syscallsubr.h stable/11/sys/sys/sysctl.h stable/11/sys/sys/sysent.h stable/11/sys/sys/syslimits.h stable/11/sys/sys/syslog.h stable/11/sys/sys/systm.h stable/11/sys/sys/taskqueue.h stable/11/sys/sys/terminal.h stable/11/sys/sys/thr.h stable/11/sys/sys/tiio.h stable/11/sys/sys/time.h stable/11/sys/sys/timeb.h stable/11/sys/sys/timeet.h stable/11/sys/sys/timeffc.h stable/11/sys/sys/timers.h stable/11/sys/sys/times.h stable/11/sys/sys/timespec.h stable/11/sys/sys/tree.h stable/11/sys/sys/tty.h stable/11/sys/sys/ttycom.h stable/11/sys/sys/ttydefaults.h stable/11/sys/sys/ttydevsw.h stable/11/sys/sys/ttydisc.h stable/11/sys/sys/ttyhook.h stable/11/sys/sys/ttyqueue.h stable/11/sys/sys/turnstile.h stable/11/sys/sys/types.h stable/11/sys/sys/ucontext.h stable/11/sys/sys/ucred.h stable/11/sys/sys/uio.h stable/11/sys/sys/umtx.h stable/11/sys/sys/un.h stable/11/sys/sys/unistd.h stable/11/sys/sys/unpcb.h stable/11/sys/sys/user.h stable/11/sys/sys/utsname.h stable/11/sys/sys/uuid.h stable/11/sys/sys/vdso.h stable/11/sys/sys/vmem.h stable/11/sys/sys/vmmeter.h stable/11/sys/sys/vnode.h stable/11/sys/sys/wait.h stable/11/sys/sys/watchdog.h stable/11/sys/tools/makeobjops.awk stable/11/sys/tools/vnode_if.awk stable/11/sys/ufs/ffs/ffs_alloc.c stable/11/sys/ufs/ffs/ffs_balloc.c stable/11/sys/ufs/ffs/ffs_extern.h stable/11/sys/ufs/ffs/ffs_inode.c stable/11/sys/ufs/ffs/ffs_subr.c stable/11/sys/ufs/ffs/ffs_tables.c stable/11/sys/ufs/ffs/ffs_vfsops.c stable/11/sys/ufs/ffs/ffs_vnops.c stable/11/sys/ufs/ffs/fs.h stable/11/sys/ufs/ufs/dir.h stable/11/sys/ufs/ufs/inode.h stable/11/sys/ufs/ufs/quota.h stable/11/sys/ufs/ufs/ufs_bmap.c stable/11/sys/ufs/ufs/ufs_extern.h stable/11/sys/ufs/ufs/ufs_inode.c stable/11/sys/ufs/ufs/ufs_lookup.c stable/11/sys/ufs/ufs/ufs_quota.c stable/11/sys/ufs/ufs/ufs_vfsops.c stable/11/sys/ufs/ufs/ufs_vnops.c stable/11/sys/ufs/ufs/ufsmount.h stable/11/sys/vm/device_pager.c stable/11/sys/vm/pmap.h stable/11/sys/vm/swap_pager.c stable/11/sys/vm/swap_pager.h stable/11/sys/vm/vm.h stable/11/sys/vm/vm_extern.h stable/11/sys/vm/vm_fault.c stable/11/sys/vm/vm_glue.c stable/11/sys/vm/vm_init.c stable/11/sys/vm/vm_kern.c stable/11/sys/vm/vm_kern.h stable/11/sys/vm/vm_map.c stable/11/sys/vm/vm_map.h stable/11/sys/vm/vm_meter.c stable/11/sys/vm/vm_mmap.c stable/11/sys/vm/vm_object.c stable/11/sys/vm/vm_object.h stable/11/sys/vm/vm_page.c stable/11/sys/vm/vm_page.h stable/11/sys/vm/vm_pageout.c stable/11/sys/vm/vm_pageout.h stable/11/sys/vm/vm_pager.c stable/11/sys/vm/vm_pager.h stable/11/sys/vm/vm_param.h stable/11/sys/vm/vm_unix.c stable/11/sys/vm/vnode_pager.c stable/11/sys/vm/vnode_pager.h stable/11/sys/x86/include/_align.h stable/11/sys/x86/include/_limits.h stable/11/sys/x86/include/_types.h stable/11/sys/x86/include/endian.h stable/11/sys/x86/include/float.h stable/11/sys/x86/include/frame.h stable/11/sys/x86/include/psl.h stable/11/sys/x86/include/ptrace.h stable/11/sys/x86/include/reg.h stable/11/sys/x86/include/segments.h stable/11/sys/x86/include/setjmp.h stable/11/sys/x86/include/signal.h stable/11/sys/x86/include/specialreg.h stable/11/sys/x86/include/stdarg.h stable/11/sys/x86/include/sysarch.h stable/11/sys/x86/include/trap.h stable/11/sys/x86/isa/clock.c stable/11/sys/x86/isa/icu.h stable/11/sys/x86/isa/isa_dma.c stable/11/sys/x86/isa/nmi.c stable/11/sys/x86/x86/delay.c stable/11/sys/x86/x86/msi.c stable/11/tools/regression/aio/aiop/aiop.c stable/11/tools/regression/p1003_1b/fifo.c stable/11/tools/regression/p1003_1b/memlock.c stable/11/tools/regression/p1003_1b/p26.c stable/11/tools/regression/p1003_1b/sched.c stable/11/tools/regression/p1003_1b/yield.c stable/11/tools/regression/posixsem/posixsem.c stable/11/tools/regression/posixsem/test.c stable/11/tools/regression/posixsem/test.h stable/11/tools/test/hwpmc/pmctest.py stable/11/tools/tools/cxgbtool/cxgbtool.c stable/11/tools/tools/pirtool/pirtable.h stable/11/tools/tools/pirtool/pirtool.c stable/11/tools/tools/vxge/vxge_cmn.h stable/11/tools/tools/vxge/vxge_info.c stable/11/tools/tools/vxge/vxge_info.h stable/11/tools/tools/vxge/vxge_log.c stable/11/tools/tools/vxge/vxge_log.h stable/11/usr.bin/apply/apply.c stable/11/usr.bin/ar/ar.c stable/11/usr.bin/banner/banner.c stable/11/usr.bin/basename/basename.c stable/11/usr.bin/biff/biff.c stable/11/usr.bin/calendar/calendar.c stable/11/usr.bin/calendar/calendar.h stable/11/usr.bin/calendar/day.c stable/11/usr.bin/calendar/io.c stable/11/usr.bin/calendar/locale.c stable/11/usr.bin/calendar/pathnames.h stable/11/usr.bin/calendar/pom.c stable/11/usr.bin/cap_mkdb/cap_mkdb.c stable/11/usr.bin/chpass/chpass.c stable/11/usr.bin/chpass/chpass.h stable/11/usr.bin/chpass/edit.c stable/11/usr.bin/chpass/field.c stable/11/usr.bin/chpass/table.c stable/11/usr.bin/chpass/util.c stable/11/usr.bin/cksum/cksum.c stable/11/usr.bin/cksum/crc.c stable/11/usr.bin/cksum/extern.h stable/11/usr.bin/cksum/print.c stable/11/usr.bin/cksum/sum1.c stable/11/usr.bin/cksum/sum2.c stable/11/usr.bin/cmp/cmp.c stable/11/usr.bin/cmp/extern.h stable/11/usr.bin/cmp/misc.c stable/11/usr.bin/cmp/regular.c stable/11/usr.bin/cmp/special.c stable/11/usr.bin/col/col.c stable/11/usr.bin/colrm/colrm.c stable/11/usr.bin/column/column.c stable/11/usr.bin/comm/comm.c stable/11/usr.bin/compress/compress.c stable/11/usr.bin/compress/zopen.c stable/11/usr.bin/ctags/C.c stable/11/usr.bin/ctags/ctags.c stable/11/usr.bin/ctags/ctags.h stable/11/usr.bin/ctags/fortran.c stable/11/usr.bin/ctags/lisp.c stable/11/usr.bin/ctags/print.c stable/11/usr.bin/ctags/tree.c stable/11/usr.bin/ctags/yacc.c stable/11/usr.bin/cut/cut.c stable/11/usr.bin/dirname/dirname.c stable/11/usr.bin/du/du.c stable/11/usr.bin/env/env.c stable/11/usr.bin/expand/expand.c stable/11/usr.bin/false/false.c stable/11/usr.bin/find/extern.h stable/11/usr.bin/find/find.c stable/11/usr.bin/find/find.h stable/11/usr.bin/find/function.c stable/11/usr.bin/find/ls.c stable/11/usr.bin/find/main.c stable/11/usr.bin/find/misc.c stable/11/usr.bin/find/operator.c stable/11/usr.bin/find/option.c stable/11/usr.bin/finger/extern.h stable/11/usr.bin/finger/finger.c stable/11/usr.bin/finger/finger.h stable/11/usr.bin/finger/lprint.c stable/11/usr.bin/finger/net.c stable/11/usr.bin/finger/sprint.c stable/11/usr.bin/finger/util.c stable/11/usr.bin/fold/fold.c stable/11/usr.bin/from/from.c stable/11/usr.bin/fstat/fstat.c stable/11/usr.bin/gcore/extern.h stable/11/usr.bin/gcore/gcore.c stable/11/usr.bin/gprof/amd64.h stable/11/usr.bin/gprof/aout.c stable/11/usr.bin/gprof/arcs.c stable/11/usr.bin/gprof/arm.h stable/11/usr.bin/gprof/dfn.c stable/11/usr.bin/gprof/elf.c stable/11/usr.bin/gprof/gprof.c stable/11/usr.bin/gprof/gprof.h stable/11/usr.bin/gprof/hertz.c stable/11/usr.bin/gprof/i386.h stable/11/usr.bin/gprof/lookup.c stable/11/usr.bin/gprof/mips.h stable/11/usr.bin/gprof/pathnames.h stable/11/usr.bin/gprof/powerpc.h stable/11/usr.bin/gprof/printgprof.c stable/11/usr.bin/gprof/printlist.c stable/11/usr.bin/gprof/sparc64.h stable/11/usr.bin/gzip/zuncompress.c stable/11/usr.bin/head/head.c stable/11/usr.bin/hexdump/conv.c stable/11/usr.bin/hexdump/display.c stable/11/usr.bin/hexdump/hexdump.c stable/11/usr.bin/hexdump/hexdump.h stable/11/usr.bin/hexdump/hexsyntax.c stable/11/usr.bin/hexdump/odsyntax.c stable/11/usr.bin/hexdump/parse.c stable/11/usr.bin/id/id.c stable/11/usr.bin/indent/args.c stable/11/usr.bin/indent/indent.c stable/11/usr.bin/indent/indent_codes.h stable/11/usr.bin/indent/indent_globs.h stable/11/usr.bin/indent/io.c stable/11/usr.bin/indent/lexi.c stable/11/usr.bin/indent/parse.c stable/11/usr.bin/indent/pr_comment.c stable/11/usr.bin/join/join.c stable/11/usr.bin/jot/jot.c stable/11/usr.bin/kdump/kdump.c stable/11/usr.bin/ktrace/ktrace.c stable/11/usr.bin/ktrace/ktrace.h stable/11/usr.bin/ktrace/subr.c stable/11/usr.bin/lam/lam.c stable/11/usr.bin/last/last.c stable/11/usr.bin/lastcomm/lastcomm.c stable/11/usr.bin/lastcomm/pathnames.h stable/11/usr.bin/leave/leave.c stable/11/usr.bin/lex/initparse.c stable/11/usr.bin/locate/bigram/locate.bigram.c stable/11/usr.bin/locate/code/locate.code.c stable/11/usr.bin/locate/locate/fastfind.c stable/11/usr.bin/locate/locate/locate.c stable/11/usr.bin/locate/locate/locate.h stable/11/usr.bin/locate/locate/util.c stable/11/usr.bin/lock/lock.c stable/11/usr.bin/logger/logger.c stable/11/usr.bin/login/login.c stable/11/usr.bin/login/login_audit.c stable/11/usr.bin/login/pathnames.h stable/11/usr.bin/logname/logname.c stable/11/usr.bin/look/look.c stable/11/usr.bin/look/pathnames.h stable/11/usr.bin/lorder/lorder.sh stable/11/usr.bin/m4/eval.c stable/11/usr.bin/m4/extern.h stable/11/usr.bin/m4/look.c stable/11/usr.bin/m4/main.c stable/11/usr.bin/m4/mdef.h stable/11/usr.bin/m4/misc.c stable/11/usr.bin/m4/pathnames.h stable/11/usr.bin/m4/stdd.h stable/11/usr.bin/mail/cmd1.c stable/11/usr.bin/mail/cmd2.c stable/11/usr.bin/mail/cmd3.c stable/11/usr.bin/mail/cmdtab.c stable/11/usr.bin/mail/collect.c stable/11/usr.bin/mail/def.h stable/11/usr.bin/mail/edit.c stable/11/usr.bin/mail/extern.h stable/11/usr.bin/mail/fio.c stable/11/usr.bin/mail/getname.c stable/11/usr.bin/mail/glob.h stable/11/usr.bin/mail/head.c stable/11/usr.bin/mail/lex.c stable/11/usr.bin/mail/list.c stable/11/usr.bin/mail/main.c stable/11/usr.bin/mail/names.c stable/11/usr.bin/mail/pathnames.h stable/11/usr.bin/mail/popen.c stable/11/usr.bin/mail/quit.c stable/11/usr.bin/mail/rcv.h stable/11/usr.bin/mail/send.c stable/11/usr.bin/mail/strings.c stable/11/usr.bin/mail/temp.c stable/11/usr.bin/mail/tty.c stable/11/usr.bin/mail/util.c stable/11/usr.bin/mail/v7.local.c stable/11/usr.bin/mail/vars.c stable/11/usr.bin/mail/version.c stable/11/usr.bin/mesg/mesg.c stable/11/usr.bin/mkdep/mkdep.gcc.sh stable/11/usr.bin/mkdep/mkdep.sh stable/11/usr.bin/mkfifo/mkfifo.c stable/11/usr.bin/mklocale/extern.h stable/11/usr.bin/mklocale/ldef.h stable/11/usr.bin/mklocale/lex.l stable/11/usr.bin/mklocale/yacc.y stable/11/usr.bin/mkstr/mkstr.c stable/11/usr.bin/msgs/msgs.c stable/11/usr.bin/msgs/pathnames.h stable/11/usr.bin/mt/mt.c stable/11/usr.bin/netstat/if.c stable/11/usr.bin/netstat/inet6.c stable/11/usr.bin/netstat/ipsec.c stable/11/usr.bin/netstat/main.c stable/11/usr.bin/netstat/mbuf.c stable/11/usr.bin/netstat/mroute.c stable/11/usr.bin/netstat/mroute6.c stable/11/usr.bin/netstat/netstat.h stable/11/usr.bin/netstat/pfkey.c stable/11/usr.bin/netstat/route.c stable/11/usr.bin/netstat/sctp.c stable/11/usr.bin/netstat/unix.c stable/11/usr.bin/nice/nice.c stable/11/usr.bin/nohup/nohup.c stable/11/usr.bin/pagesize/pagesize.sh stable/11/usr.bin/paste/paste.c stable/11/usr.bin/patch/mkpath.c stable/11/usr.bin/pr/egetopt.c stable/11/usr.bin/pr/extern.h stable/11/usr.bin/pr/pr.c stable/11/usr.bin/pr/pr.h stable/11/usr.bin/printenv/printenv.c stable/11/usr.bin/printf/printf.c stable/11/usr.bin/quota/quota.c stable/11/usr.bin/renice/renice.c stable/11/usr.bin/rev/rev.c stable/11/usr.bin/rs/rs.c stable/11/usr.bin/rup/rup.c stable/11/usr.bin/ruptime/ruptime.c stable/11/usr.bin/rusers/rusers.c stable/11/usr.bin/rwall/rwall.c stable/11/usr.bin/rwho/rwho.c stable/11/usr.bin/script/script.c stable/11/usr.bin/sed/compile.c stable/11/usr.bin/sed/defs.h stable/11/usr.bin/sed/extern.h stable/11/usr.bin/sed/main.c stable/11/usr.bin/sed/misc.c stable/11/usr.bin/sed/process.c stable/11/usr.bin/shar/shar.sh stable/11/usr.bin/showmount/showmount.c stable/11/usr.bin/split/split.c stable/11/usr.bin/su/su.c stable/11/usr.bin/systat/cmds.c stable/11/usr.bin/systat/cmdtab.c stable/11/usr.bin/systat/devs.c stable/11/usr.bin/systat/extern.h stable/11/usr.bin/systat/fetch.c stable/11/usr.bin/systat/icmp.c stable/11/usr.bin/systat/icmp6.c stable/11/usr.bin/systat/iostat.c stable/11/usr.bin/systat/ip.c stable/11/usr.bin/systat/ip6.c stable/11/usr.bin/systat/keyboard.c stable/11/usr.bin/systat/main.c stable/11/usr.bin/systat/netcmds.c stable/11/usr.bin/systat/netstat.c stable/11/usr.bin/systat/pigs.c stable/11/usr.bin/systat/swap.c stable/11/usr.bin/systat/systat.h stable/11/usr.bin/systat/tcp.c stable/11/usr.bin/systat/vmstat.c stable/11/usr.bin/tail/extern.h stable/11/usr.bin/tail/forward.c stable/11/usr.bin/tail/misc.c stable/11/usr.bin/tail/read.c stable/11/usr.bin/tail/reverse.c stable/11/usr.bin/tail/tail.c stable/11/usr.bin/talk/ctl.c stable/11/usr.bin/talk/ctl_transact.c stable/11/usr.bin/talk/display.c stable/11/usr.bin/talk/get_addrs.c stable/11/usr.bin/talk/get_names.c stable/11/usr.bin/talk/init_disp.c stable/11/usr.bin/talk/invite.c stable/11/usr.bin/talk/io.c stable/11/usr.bin/talk/look_up.c stable/11/usr.bin/talk/msgs.c stable/11/usr.bin/talk/talk.c stable/11/usr.bin/talk/talk.h stable/11/usr.bin/talk/talk_ctl.h stable/11/usr.bin/tcopy/tcopy.c stable/11/usr.bin/tee/tee.c stable/11/usr.bin/tftp/main.c stable/11/usr.bin/tftp/tftp.c stable/11/usr.bin/tftp/tftp.h stable/11/usr.bin/time/time.c stable/11/usr.bin/tip/libacu/biz22.c stable/11/usr.bin/tip/libacu/biz31.c stable/11/usr.bin/tip/libacu/courier.c stable/11/usr.bin/tip/libacu/df.c stable/11/usr.bin/tip/libacu/dn11.c stable/11/usr.bin/tip/libacu/hayes.c stable/11/usr.bin/tip/libacu/t3000.c stable/11/usr.bin/tip/libacu/v3451.c stable/11/usr.bin/tip/libacu/v831.c stable/11/usr.bin/tip/libacu/ventel.c stable/11/usr.bin/tip/tip/acu.c stable/11/usr.bin/tip/tip/acutab.c stable/11/usr.bin/tip/tip/cmds.c stable/11/usr.bin/tip/tip/cmdtab.c stable/11/usr.bin/tip/tip/cu.c stable/11/usr.bin/tip/tip/hunt.c stable/11/usr.bin/tip/tip/log.c stable/11/usr.bin/tip/tip/partab.c stable/11/usr.bin/tip/tip/pathnames.h stable/11/usr.bin/tip/tip/remote.c stable/11/usr.bin/tip/tip/tip.c stable/11/usr.bin/tip/tip/tip.h stable/11/usr.bin/tip/tip/tipout.c stable/11/usr.bin/tip/tip/uucplock.c stable/11/usr.bin/tip/tip/value.c stable/11/usr.bin/tip/tip/vars.c stable/11/usr.bin/touch/touch.c stable/11/usr.bin/tput/clear.sh stable/11/usr.bin/tput/tput.c stable/11/usr.bin/tr/extern.h stable/11/usr.bin/tr/str.c stable/11/usr.bin/tr/tr.c stable/11/usr.bin/true/true.c stable/11/usr.bin/truss/amd64-freebsd.c stable/11/usr.bin/truss/amd64-freebsd32.c stable/11/usr.bin/truss/amd64-linux.c stable/11/usr.bin/truss/amd64-linux32.c stable/11/usr.bin/truss/arm-freebsd.c stable/11/usr.bin/truss/extern.h stable/11/usr.bin/truss/i386-freebsd.c stable/11/usr.bin/truss/i386-linux.c stable/11/usr.bin/truss/main.c stable/11/usr.bin/truss/mips-freebsd.c stable/11/usr.bin/truss/setup.c stable/11/usr.bin/truss/sparc64-freebsd.c stable/11/usr.bin/truss/syscalls.c stable/11/usr.bin/tset/extern.h stable/11/usr.bin/tset/map.c stable/11/usr.bin/tset/misc.c stable/11/usr.bin/tset/set.c stable/11/usr.bin/tset/term.c stable/11/usr.bin/tset/tset.c stable/11/usr.bin/tset/wrterm.c stable/11/usr.bin/tsort/tsort.c stable/11/usr.bin/tty/tty.c stable/11/usr.bin/ul/ul.c stable/11/usr.bin/uname/uname.c stable/11/usr.bin/unexpand/unexpand.c stable/11/usr.bin/uniq/uniq.c stable/11/usr.bin/uudecode/uudecode.c stable/11/usr.bin/uuencode/uuencode.c stable/11/usr.bin/vgrind/extern.h stable/11/usr.bin/vgrind/pathnames.h stable/11/usr.bin/vgrind/regexp.c stable/11/usr.bin/vgrind/vfontedpr.c stable/11/usr.bin/vgrind/vgrind.sh stable/11/usr.bin/vmstat/vmstat.c stable/11/usr.bin/w/extern.h stable/11/usr.bin/w/pr_time.c stable/11/usr.bin/w/proc_compare.c stable/11/usr.bin/w/w.c stable/11/usr.bin/wall/ttymsg.c stable/11/usr.bin/wall/wall.c stable/11/usr.bin/wc/wc.c stable/11/usr.bin/what/what.c stable/11/usr.bin/whois/whois.c stable/11/usr.bin/write/write.c stable/11/usr.bin/xargs/pathnames.h stable/11/usr.bin/xargs/xargs.c stable/11/usr.bin/xinstall/xinstall.c stable/11/usr.bin/xstr/pathnames.h stable/11/usr.bin/xstr/xstr.c stable/11/usr.bin/yes/yes.c stable/11/usr.sbin/accton/accton.c stable/11/usr.sbin/ancontrol/ancontrol.c stable/11/usr.sbin/arp/arp.c stable/11/usr.sbin/chown/chown.c stable/11/usr.sbin/chroot/chroot.c stable/11/usr.sbin/config/config.h stable/11/usr.sbin/config/config.y stable/11/usr.sbin/config/lang.l stable/11/usr.sbin/config/main.c stable/11/usr.sbin/config/mkheaders.c stable/11/usr.sbin/config/mkmakefile.c stable/11/usr.sbin/config/mkoptions.c stable/11/usr.sbin/crashinfo/crashinfo.sh stable/11/usr.sbin/dconschat/dconschat.c stable/11/usr.sbin/edquota/edquota.c stable/11/usr.sbin/edquota/pathnames.h stable/11/usr.sbin/fwcontrol/fwcontrol.c stable/11/usr.sbin/fwcontrol/fwdv.c stable/11/usr.sbin/fwcontrol/fwmpegts.c stable/11/usr.sbin/ifmcstat/ifmcstat.c stable/11/usr.sbin/ifmcstat/printb.c stable/11/usr.sbin/inetd/inetd.c stable/11/usr.sbin/inetd/inetd.h stable/11/usr.sbin/inetd/pathnames.h stable/11/usr.sbin/iostat/iostat.c stable/11/usr.sbin/ip6addrctl/ip6addrctl.c stable/11/usr.sbin/kgmon/kgmon.c stable/11/usr.sbin/kldxref/ef.c stable/11/usr.sbin/kldxref/ef_obj.c stable/11/usr.sbin/kldxref/kldxref.c stable/11/usr.sbin/lpr/common_source/common.c stable/11/usr.sbin/lpr/common_source/displayq.c stable/11/usr.sbin/lpr/common_source/lp.h stable/11/usr.sbin/lpr/common_source/lp.local.h stable/11/usr.sbin/lpr/common_source/net.c stable/11/usr.sbin/lpr/common_source/pathnames.h stable/11/usr.sbin/lpr/common_source/printcap.c stable/11/usr.sbin/lpr/common_source/rmjob.c stable/11/usr.sbin/lpr/common_source/startdaemon.c stable/11/usr.sbin/lpr/filters/lpf.c stable/11/usr.sbin/lpr/lpc/cmds.c stable/11/usr.sbin/lpr/lpc/cmdtab.c stable/11/usr.sbin/lpr/lpc/extern.h stable/11/usr.sbin/lpr/lpc/lpc.c stable/11/usr.sbin/lpr/lpc/lpc.h stable/11/usr.sbin/lpr/lpd/extern.h stable/11/usr.sbin/lpr/lpd/lpd.c stable/11/usr.sbin/lpr/lpd/lpdchar.c stable/11/usr.sbin/lpr/lpd/modes.c stable/11/usr.sbin/lpr/lpd/printjob.c stable/11/usr.sbin/lpr/lpd/recvjob.c stable/11/usr.sbin/lpr/lpq/lpq.c stable/11/usr.sbin/lpr/lpr/lpr.c stable/11/usr.sbin/lpr/lprm/lprm.c stable/11/usr.sbin/lpr/lptest/lptest.c stable/11/usr.sbin/lpr/pac/pac.c stable/11/usr.sbin/makefs/ffs.c stable/11/usr.sbin/makefs/ffs/ffs_alloc.c stable/11/usr.sbin/makefs/ffs/ffs_balloc.c stable/11/usr.sbin/makefs/ffs/ffs_extern.h stable/11/usr.sbin/makefs/ffs/ffs_subr.c stable/11/usr.sbin/makefs/ffs/mkfs.c stable/11/usr.sbin/makefs/ffs/ufs_bmap.c stable/11/usr.sbin/makefs/ffs/ufs_inode.h stable/11/usr.sbin/manctl/manctl.sh stable/11/usr.sbin/mld6query/mld6.c stable/11/usr.sbin/mountd/mountd.c stable/11/usr.sbin/mountd/pathnames.h stable/11/usr.sbin/mptutil/mpt_cam.c stable/11/usr.sbin/mptutil/mpt_cmd.c stable/11/usr.sbin/mptutil/mpt_config.c stable/11/usr.sbin/mptutil/mpt_drive.c stable/11/usr.sbin/mptutil/mpt_evt.c stable/11/usr.sbin/mptutil/mpt_show.c stable/11/usr.sbin/mptutil/mpt_volume.c stable/11/usr.sbin/mptutil/mptutil.c stable/11/usr.sbin/mptutil/mptutil.h stable/11/usr.sbin/nandsim/nandsim_rcfile.c stable/11/usr.sbin/nandsim/nandsim_rcfile.h stable/11/usr.sbin/ndiscvt/inf-parse.y stable/11/usr.sbin/ndiscvt/inf-token.l stable/11/usr.sbin/ndiscvt/inf.c stable/11/usr.sbin/ndiscvt/ndiscvt.c stable/11/usr.sbin/ndiscvt/ndisgen.sh stable/11/usr.sbin/ndiscvt/windrv_stub.c stable/11/usr.sbin/ndp/ndp.c stable/11/usr.sbin/nfsd/nfsd.c stable/11/usr.sbin/pciconf/cap.c stable/11/usr.sbin/pciconf/pciconf.h stable/11/usr.sbin/ppp/slcompress.c stable/11/usr.sbin/ppp/slcompress.h stable/11/usr.sbin/pstat/pstat.c stable/11/usr.sbin/pwd_mkdb/pwd_mkdb.c stable/11/usr.sbin/quotaon/quotaon.c stable/11/usr.sbin/repquota/repquota.c stable/11/usr.sbin/rip6query/rip6query.c stable/11/usr.sbin/rmt/rmt.c stable/11/usr.sbin/route6d/misc/cksum.c stable/11/usr.sbin/route6d/route6d.c stable/11/usr.sbin/route6d/route6d.h stable/11/usr.sbin/rpc.lockd/lock_proc.c stable/11/usr.sbin/rpc.lockd/lockd.c stable/11/usr.sbin/rpc.lockd/lockd.h stable/11/usr.sbin/rpc.lockd/lockd_lock.c stable/11/usr.sbin/rpc.statd/file.c stable/11/usr.sbin/rpc.statd/procs.c stable/11/usr.sbin/rpc.statd/statd.c stable/11/usr.sbin/rpc.statd/statd.h stable/11/usr.sbin/rpc.yppasswdd/yppasswdd_extern.h stable/11/usr.sbin/rpc.yppasswdd/yppasswdd_main.c stable/11/usr.sbin/rpc.yppasswdd/yppasswdd_server.c stable/11/usr.sbin/rpc.ypupdated/yp_dbdelete.c stable/11/usr.sbin/rpc.ypupdated/yp_dbupdate.c stable/11/usr.sbin/rpc.ypupdated/ypupdated_main.c stable/11/usr.sbin/rpc.ypupdated/ypupdated_server.c stable/11/usr.sbin/rpc.ypxfrd/ypxfrd_extern.h stable/11/usr.sbin/rpc.ypxfrd/ypxfrd_main.c stable/11/usr.sbin/rpc.ypxfrd/ypxfrd_server.c stable/11/usr.sbin/rpcbind/check_bound.c stable/11/usr.sbin/rpcbind/pmap_svc.c stable/11/usr.sbin/rpcbind/rpcb_stat.c stable/11/usr.sbin/rpcbind/rpcb_svc.c stable/11/usr.sbin/rpcbind/rpcb_svc_4.c stable/11/usr.sbin/rpcbind/rpcb_svc_com.c stable/11/usr.sbin/rpcbind/rpcbind.c stable/11/usr.sbin/rpcbind/rpcbind.h stable/11/usr.sbin/rpcbind/warmstart.c stable/11/usr.sbin/rrenumd/lexer.l stable/11/usr.sbin/rrenumd/parser.y stable/11/usr.sbin/rrenumd/rrenumd.c stable/11/usr.sbin/rrenumd/rrenumd.h stable/11/usr.sbin/rtadvd/advcap.c stable/11/usr.sbin/rtadvd/config.c stable/11/usr.sbin/rtadvd/config.h stable/11/usr.sbin/rtadvd/if.c stable/11/usr.sbin/rtadvd/if.h stable/11/usr.sbin/rtadvd/rrenum.c stable/11/usr.sbin/rtadvd/rrenum.h stable/11/usr.sbin/rtadvd/rtadvd.c stable/11/usr.sbin/rtadvd/rtadvd.h stable/11/usr.sbin/rtadvd/timer.c stable/11/usr.sbin/rtadvd/timer.h stable/11/usr.sbin/rtadvd/timer_subr.c stable/11/usr.sbin/rtadvd/timer_subr.h stable/11/usr.sbin/rtsold/dump.c stable/11/usr.sbin/rtsold/if.c stable/11/usr.sbin/rtsold/probe.c stable/11/usr.sbin/rtsold/rtsock.c stable/11/usr.sbin/rtsold/rtsol.c stable/11/usr.sbin/rtsold/rtsold.c stable/11/usr.sbin/rtsold/rtsold.h stable/11/usr.sbin/rwhod/rwhod.c stable/11/usr.sbin/setfib/setfib.c stable/11/usr.sbin/syslogd/pathnames.h stable/11/usr.sbin/syslogd/syslogd.c stable/11/usr.sbin/timed/timed/acksend.c stable/11/usr.sbin/timed/timed/byteorder.c stable/11/usr.sbin/timed/timed/candidate.c stable/11/usr.sbin/timed/timed/cksum.c stable/11/usr.sbin/timed/timed/correct.c stable/11/usr.sbin/timed/timed/extern.h stable/11/usr.sbin/timed/timed/globals.h stable/11/usr.sbin/timed/timed/master.c stable/11/usr.sbin/timed/timed/measure.c stable/11/usr.sbin/timed/timed/networkdelta.c stable/11/usr.sbin/timed/timed/pathnames.h stable/11/usr.sbin/timed/timed/readmsg.c stable/11/usr.sbin/timed/timed/slave.c stable/11/usr.sbin/timed/timed/timed.c stable/11/usr.sbin/timed/timedc/cmds.c stable/11/usr.sbin/timed/timedc/cmdtab.c stable/11/usr.sbin/timed/timedc/extern.h stable/11/usr.sbin/timed/timedc/timedc.c stable/11/usr.sbin/timed/timedc/timedc.h stable/11/usr.sbin/traceroute6/traceroute6.c stable/11/usr.sbin/trpt/trpt.c stable/11/usr.sbin/vipw/vipw.c stable/11/usr.sbin/wpa/ndis_events/ndis_events.c stable/11/usr.sbin/wpa/wpa_supplicant/Packet32.c stable/11/usr.sbin/wpa/wpa_supplicant/Packet32.h stable/11/usr.sbin/yp_mkdb/yp_mkdb.c stable/11/usr.sbin/ypbind/yp_ping.c stable/11/usr.sbin/yppush/yppush_main.c stable/11/usr.sbin/ypserv/yp_access.c stable/11/usr.sbin/ypserv/yp_dblookup.c stable/11/usr.sbin/ypserv/yp_dnslookup.c stable/11/usr.sbin/ypserv/yp_error.c stable/11/usr.sbin/ypserv/yp_extern.h stable/11/usr.sbin/ypserv/yp_main.c stable/11/usr.sbin/ypserv/yp_server.c stable/11/usr.sbin/ypserv/yp_svc_udp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/cat/cat.c ============================================================================== --- stable/11/bin/cat/cat.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/cat/cat.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/chflags/chflags.c ============================================================================== --- stable/11/bin/chflags/chflags.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/chflags/chflags.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/chmod/chmod.c ============================================================================== --- stable/11/bin/chmod/chmod.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/chmod/chmod.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/cp/cp.c ============================================================================== --- stable/11/bin/cp/cp.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/cp/cp.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1988, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/cp/extern.h ============================================================================== --- stable/11/bin/cp/extern.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/cp/extern.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/cp/utils.c ============================================================================== --- stable/11/bin/cp/utils.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/cp/utils.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/date/date.c ============================================================================== --- stable/11/bin/date/date.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/date/date.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1985, 1987, 1988, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/date/extern.h ============================================================================== --- stable/11/bin/date/extern.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/date/extern.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/date/netdate.c ============================================================================== --- stable/11/bin/date/netdate.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/date/netdate.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/dd/args.c ============================================================================== --- stable/11/bin/dd/args.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/dd/args.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/dd/conv.c ============================================================================== --- stable/11/bin/dd/conv.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/dd/conv.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/dd/conv_tab.c ============================================================================== --- stable/11/bin/dd/conv_tab.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/dd/conv_tab.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/dd/dd.c ============================================================================== --- stable/11/bin/dd/dd.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/dd/dd.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/dd/dd.h ============================================================================== --- stable/11/bin/dd/dd.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/dd/dd.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/dd/extern.h ============================================================================== --- stable/11/bin/dd/extern.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/dd/extern.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/dd/misc.c ============================================================================== --- stable/11/bin/dd/misc.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/dd/misc.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/dd/position.c ============================================================================== --- stable/11/bin/dd/position.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/dd/position.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/df/df.c ============================================================================== --- stable/11/bin/df/df.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/df/df.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1980, 1990, 1993, 1994 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. Modified: stable/11/bin/domainname/domainname.c ============================================================================== --- stable/11/bin/domainname/domainname.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/domainname/domainname.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/echo/echo.c ============================================================================== --- stable/11/bin/echo/echo.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/echo/echo.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/ed/cbc.c ============================================================================== --- stable/11/bin/ed/cbc.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ed/cbc.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,5 +1,7 @@ /* cbc.c: This file contains the encryption routines for the ed line editor */ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1993 The Regents of the University of California. * All rights reserved. * Modified: stable/11/bin/hostname/hostname.c ============================================================================== --- stable/11/bin/hostname/hostname.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/hostname/hostname.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/kill/kill.c ============================================================================== --- stable/11/bin/kill/kill.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/kill/kill.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1988, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/ln/ln.c ============================================================================== --- stable/11/bin/ln/ln.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ln/ln.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1987, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/ls/cmp.c ============================================================================== --- stable/11/bin/ls/cmp.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ls/cmp.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/ls/extern.h ============================================================================== --- stable/11/bin/ls/extern.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ls/extern.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/ls/ls.c ============================================================================== --- stable/11/bin/ls/ls.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ls/ls.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/ls/ls.h ============================================================================== --- stable/11/bin/ls/ls.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ls/ls.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/ls/print.c ============================================================================== --- stable/11/bin/ls/print.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ls/print.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/ls/util.c ============================================================================== --- stable/11/bin/ls/util.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ls/util.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/mkdir/mkdir.c ============================================================================== --- stable/11/bin/mkdir/mkdir.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/mkdir/mkdir.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1983, 1992, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/mv/mv.c ============================================================================== --- stable/11/bin/mv/mv.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/mv/mv.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/pax/ar_io.c ============================================================================== --- stable/11/bin/pax/ar_io.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/ar_io.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/ar_subs.c ============================================================================== --- stable/11/bin/pax/ar_subs.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/ar_subs.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/buf_subs.c ============================================================================== --- stable/11/bin/pax/buf_subs.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/buf_subs.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/cache.c ============================================================================== --- stable/11/bin/pax/cache.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/cache.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/cache.h ============================================================================== --- stable/11/bin/pax/cache.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/cache.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/cpio.c ============================================================================== --- stable/11/bin/pax/cpio.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/cpio.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/cpio.h ============================================================================== --- stable/11/bin/pax/cpio.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/cpio.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/extern.h ============================================================================== --- stable/11/bin/pax/extern.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/extern.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/file_subs.c ============================================================================== --- stable/11/bin/pax/file_subs.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/file_subs.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/ftree.c ============================================================================== --- stable/11/bin/pax/ftree.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/ftree.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/ftree.h ============================================================================== --- stable/11/bin/pax/ftree.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/ftree.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/gen_subs.c ============================================================================== --- stable/11/bin/pax/gen_subs.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/gen_subs.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/options.c ============================================================================== --- stable/11/bin/pax/options.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/options.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/options.h ============================================================================== --- stable/11/bin/pax/options.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/options.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/pat_rep.c ============================================================================== --- stable/11/bin/pax/pat_rep.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/pat_rep.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/pat_rep.h ============================================================================== --- stable/11/bin/pax/pat_rep.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/pat_rep.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/pax.c ============================================================================== --- stable/11/bin/pax/pax.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/pax.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/pax.h ============================================================================== --- stable/11/bin/pax/pax.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/pax.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/sel_subs.c ============================================================================== --- stable/11/bin/pax/sel_subs.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/sel_subs.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/sel_subs.h ============================================================================== --- stable/11/bin/pax/sel_subs.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/sel_subs.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/tables.c ============================================================================== --- stable/11/bin/pax/tables.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/tables.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/tables.h ============================================================================== --- stable/11/bin/pax/tables.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/tables.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/tar.c ============================================================================== --- stable/11/bin/pax/tar.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/tar.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/tar.h ============================================================================== --- stable/11/bin/pax/tar.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/tar.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/pax/tty_subs.c ============================================================================== --- stable/11/bin/pax/tty_subs.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pax/tty_subs.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992 Keith Muller. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. Modified: stable/11/bin/ps/extern.h ============================================================================== --- stable/11/bin/ps/extern.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ps/extern.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/ps/fmt.c ============================================================================== --- stable/11/bin/ps/fmt.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ps/fmt.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/ps/keyword.c ============================================================================== --- stable/11/bin/ps/keyword.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ps/keyword.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1990, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/ps/nlist.c ============================================================================== --- stable/11/bin/ps/nlist.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ps/nlist.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1990, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/ps/print.c ============================================================================== --- stable/11/bin/ps/print.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ps/print.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1990, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/ps/ps.c ============================================================================== --- stable/11/bin/ps/ps.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ps/ps.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1990, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/ps/ps.h ============================================================================== --- stable/11/bin/ps/ps.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/ps/ps.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/pwd/pwd.c ============================================================================== --- stable/11/bin/pwd/pwd.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/pwd/pwd.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/realpath/realpath.c ============================================================================== --- stable/11/bin/realpath/realpath.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/realpath/realpath.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/rm/rm.c ============================================================================== --- stable/11/bin/rm/rm.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/rm/rm.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1990, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/rmdir/rmdir.c ============================================================================== --- stable/11/bin/rmdir/rmdir.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/rmdir/rmdir.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/bltin/bltin.h ============================================================================== --- stable/11/bin/sh/bltin/bltin.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/bltin/bltin.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/bltin/echo.c ============================================================================== --- stable/11/bin/sh/bltin/echo.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/bltin/echo.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/mail.h ============================================================================== --- stable/11/bin/sh/mail.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/mail.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/main.c ============================================================================== --- stable/11/bin/sh/main.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/main.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/main.h ============================================================================== --- stable/11/bin/sh/main.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/main.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/memalloc.c ============================================================================== --- stable/11/bin/sh/memalloc.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/memalloc.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/memalloc.h ============================================================================== --- stable/11/bin/sh/memalloc.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/memalloc.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/miscbltin.c ============================================================================== --- stable/11/bin/sh/miscbltin.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/miscbltin.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/mknodes.c ============================================================================== --- stable/11/bin/sh/mknodes.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/mknodes.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/mksyntax.c ============================================================================== --- stable/11/bin/sh/mksyntax.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/mksyntax.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/myhistedit.h ============================================================================== --- stable/11/bin/sh/myhistedit.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/myhistedit.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/mystring.c ============================================================================== --- stable/11/bin/sh/mystring.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/mystring.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/mystring.h ============================================================================== --- stable/11/bin/sh/mystring.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/mystring.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/options.c ============================================================================== --- stable/11/bin/sh/options.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/options.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/options.h ============================================================================== --- stable/11/bin/sh/options.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/options.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/output.c ============================================================================== --- stable/11/bin/sh/output.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/output.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/output.h ============================================================================== --- stable/11/bin/sh/output.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/output.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/parser.c ============================================================================== --- stable/11/bin/sh/parser.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/parser.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/parser.h ============================================================================== --- stable/11/bin/sh/parser.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/parser.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/redir.c ============================================================================== --- stable/11/bin/sh/redir.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/redir.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/redir.h ============================================================================== --- stable/11/bin/sh/redir.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/redir.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/shell.h ============================================================================== --- stable/11/bin/sh/shell.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/shell.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/show.c ============================================================================== --- stable/11/bin/sh/show.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/show.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/show.h ============================================================================== --- stable/11/bin/sh/show.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/show.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1995 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/trap.c ============================================================================== --- stable/11/bin/sh/trap.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/trap.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/trap.h ============================================================================== --- stable/11/bin/sh/trap.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/trap.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/var.c ============================================================================== --- stable/11/bin/sh/var.c Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/var.c Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/bin/sh/var.h ============================================================================== --- stable/11/bin/sh/var.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/bin/sh/var.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/include/_ctype.h ============================================================================== --- stable/11/include/_ctype.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/include/_ctype.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. Modified: stable/11/include/a.out.h ============================================================================== --- stable/11/include/a.out.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/include/a.out.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/include/ar.h ============================================================================== --- stable/11/include/ar.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/include/ar.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. Modified: stable/11/include/arpa/ftp.h ============================================================================== --- stable/11/include/arpa/ftp.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/include/arpa/ftp.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1983, 1989, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/include/arpa/inet.h ============================================================================== --- stable/11/include/arpa/inet.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/include/arpa/inet.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-3-Clause + * * ++Copyright++ 1983, 1993 * - * Copyright (c) 1983, 1993 Modified: stable/11/include/arpa/nameser.h ============================================================================== --- stable/11/include/arpa/nameser.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/include/arpa/nameser.h Wed Mar 14 03:19:51 2018 (r330897) @@ -15,7 +15,9 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* +/*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1983, 1989, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/include/arpa/nameser_compat.h ============================================================================== --- stable/11/include/arpa/nameser_compat.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/include/arpa/nameser_compat.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,7 @@ -/* Copyright (c) 1983, 1989 +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1983, 1989 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/11/include/arpa/telnet.h ============================================================================== --- stable/11/include/arpa/telnet.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/include/arpa/telnet.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/include/arpa/tftp.h ============================================================================== --- stable/11/include/arpa/tftp.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/include/arpa/tftp.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. * Modified: stable/11/include/assert.h ============================================================================== --- stable/11/include/assert.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/include/assert.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. Modified: stable/11/include/bitstring.h ============================================================================== --- stable/11/include/bitstring.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/include/bitstring.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2003 Poul-Henning Kamp * All rights reserved. * Modified: stable/11/include/complex.h ============================================================================== --- stable/11/include/complex.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/include/complex.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2001-2011 The FreeBSD Project. * All rights reserved. * Modified: stable/11/include/cpio.h ============================================================================== --- stable/11/include/cpio.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/include/cpio.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2002 Mike Barcroft * All rights reserved. * Modified: stable/11/include/ctype.h ============================================================================== --- stable/11/include/ctype.h Wed Mar 14 03:09:47 2018 (r330896) +++ stable/11/include/ctype.h Wed Mar 14 03:19:51 2018 (r330897) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-3-Clause + * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 14 03:30:35 2018 Return-Path: Delivered-To: svn-src-all@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 A6F57F4B10F; Wed, 14 Mar 2018 03:30:35 +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 566238640B; Wed, 14 Mar 2018 03:30:35 +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 513C422A22; Wed, 14 Mar 2018 03:30:35 +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 w2E3UZck041221; Wed, 14 Mar 2018 03:30:35 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E3UYPo041214; Wed, 14 Mar 2018 03:30:34 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803140330.w2E3UYPo041214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 14 Mar 2018 03:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330898 - stable/11/stand/libsa X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/stand/libsa X-SVN-Commit-Revision: 330898 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:30:35 -0000 Author: kevans Date: Wed Mar 14 03:30:34 2018 New Revision: 330898 URL: https://svnweb.freebsd.org/changeset/base/330898 Log: MFC r329339: libsa: Consolidate tftp sendrecv into net.c sendrecv bootp/arp/rarp/rpc all use the sendrecv implementation in net.c. tftp has its own implementation because it passes an extra parameter into the recv callback for the received payload type to be held. These sendrecv implementations are otherwise equivalent, so consolidate them. The other users of sendrecv won't be using the extra argument to recv, but this gives us only one place to worry about respecting timeouts and one consistent timeout behavior. Modified: stable/11/stand/libsa/arp.c stable/11/stand/libsa/bootp.c stable/11/stand/libsa/net.c stable/11/stand/libsa/net.h stable/11/stand/libsa/rarp.c stable/11/stand/libsa/rpc.c stable/11/stand/libsa/tftp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/libsa/arp.c ============================================================================== --- stable/11/stand/libsa/arp.c Wed Mar 14 03:19:51 2018 (r330897) +++ stable/11/stand/libsa/arp.c Wed Mar 14 03:30:34 2018 (r330898) @@ -65,7 +65,7 @@ int arp_num = 1; /* Local forwards */ static ssize_t arpsend(struct iodesc *, void *, size_t); -static ssize_t arprecv(struct iodesc *, void **, void **, time_t); +static ssize_t arprecv(struct iodesc *, void **, void **, time_t, void *); /* Broadcast an ARP packet, asking who has addr on interface d */ u_char * @@ -118,7 +118,7 @@ arpwhohas(struct iodesc *d, struct in_addr addr) ah = NULL; i = sendrecv(d, arpsend, &wbuf.data, sizeof(wbuf.data), - arprecv, &pkt, (void **)&ah); + arprecv, &pkt, (void **)&ah, NULL); if (i == -1) { panic("arp: no response for %s\n", inet_ntoa(addr)); @@ -160,7 +160,7 @@ arpsend(struct iodesc *d, void *pkt, size_t len) * else -1 (and errno == 0) */ static ssize_t -arprecv(struct iodesc *d, void **pkt, void **payload, time_t tleft) +arprecv(struct iodesc *d, void **pkt, void **payload, time_t tleft, void *extra) { ssize_t n; struct ether_arp *ah; Modified: stable/11/stand/libsa/bootp.c ============================================================================== --- stable/11/stand/libsa/bootp.c Wed Mar 14 03:19:51 2018 (r330897) +++ stable/11/stand/libsa/bootp.c Wed Mar 14 03:30:34 2018 (r330898) @@ -73,7 +73,7 @@ static char vm_cmu[4] = VM_CMU; /* Local forwards */ static ssize_t bootpsend(struct iodesc *, void *, size_t); -static ssize_t bootprecv(struct iodesc *, void **, void **, time_t); +static ssize_t bootprecv(struct iodesc *, void **, void **, time_t, void *); static int vend_rfc1048(u_char *, u_int); #ifdef BOOTP_VEND_CMU static void vend_cmu(u_char *); @@ -183,7 +183,7 @@ bootp(int sock) if(sendrecv(d, bootpsend, bp, sizeof(*bp), - bootprecv, &pkt, (void **)&rbootp) == -1) { + bootprecv, &pkt, (void **)&rbootp, NULL) == -1) { printf("bootp: no reply\n"); return; } @@ -209,7 +209,7 @@ bootp(int sock) free(pkt); if(sendrecv(d, bootpsend, bp, sizeof(*bp), - bootprecv, &pkt, (void **)&rbootp) == -1) { + bootprecv, &pkt, (void **)&rbootp, NULL) == -1) { printf("DHCPREQUEST failed\n"); return; } @@ -286,7 +286,8 @@ bootpsend(struct iodesc *d, void *pkt, size_t len) } static ssize_t -bootprecv(struct iodesc *d, void **pkt, void **payload, time_t tleft) +bootprecv(struct iodesc *d, void **pkt, void **payload, time_t tleft, + void *extra) { ssize_t n; struct bootp *bp; Modified: stable/11/stand/libsa/net.c ============================================================================== --- stable/11/stand/libsa/net.c Wed Mar 14 03:19:51 2018 (r330897) +++ stable/11/stand/libsa/net.c Wed Mar 14 03:30:34 2018 (r330898) @@ -72,8 +72,8 @@ ssize_t sendrecv(struct iodesc *d, ssize_t (*sproc)(struct iodesc *, void *, size_t), void *sbuf, size_t ssize, - ssize_t (*rproc)(struct iodesc *, void **, void **, time_t), - void **pkt, void **payload) + ssize_t (*rproc)(struct iodesc *, void **, void **, time_t, void *), + void **pkt, void **payload, void *recv_extra) { ssize_t cc; time_t t, tmo, tlast; @@ -116,7 +116,7 @@ sendrecv(struct iodesc *d, } /* Try to get a packet and process it. */ - cc = (*rproc)(d, pkt, payload, tleft); + cc = (*rproc)(d, pkt, payload, tleft, recv_extra); /* Return on data, EOF or real error. */ if (cc != -1 || (errno != 0 && errno != ETIMEDOUT)) return (cc); Modified: stable/11/stand/libsa/net.h ============================================================================== --- stable/11/stand/libsa/net.h Wed Mar 14 03:19:51 2018 (r330897) +++ stable/11/stand/libsa/net.h Wed Mar 14 03:30:34 2018 (r330898) @@ -115,8 +115,9 @@ ssize_t readudp(struct iodesc *, void **, void **, tim ssize_t sendrecv(struct iodesc *, ssize_t (*)(struct iodesc *, void *, size_t), void *, size_t, - ssize_t (*)(struct iodesc *, void **, void **, time_t), - void **, void **); + ssize_t (*)(struct iodesc *, void **, void **, time_t, + void *), + void **, void **, void *); /* bootp/DHCP */ void bootp(int); Modified: stable/11/stand/libsa/rarp.c ============================================================================== --- stable/11/stand/libsa/rarp.c Wed Mar 14 03:19:51 2018 (r330897) +++ stable/11/stand/libsa/rarp.c Wed Mar 14 03:30:34 2018 (r330898) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); static ssize_t rarpsend(struct iodesc *, void *, size_t); -static ssize_t rarprecv(struct iodesc *, void **, void **, time_t); +static ssize_t rarprecv(struct iodesc *, void **, void **, time_t, void *); /* * Ethernet (Reverse) Address Resolution Protocol (see RFC 903, and 826). @@ -99,7 +99,7 @@ rarp_getipaddress(int sock) if (sendrecv(d, rarpsend, &wbuf.data, sizeof(wbuf.data), - rarprecv, &pkt, (void *)&ap) < 0) { + rarprecv, &pkt, (void *)&ap, NULL) < 0) { printf("No response for RARP request\n"); return (-1); } @@ -143,7 +143,8 @@ rarpsend(struct iodesc *d, void *pkt, size_t len) * else -1 (and errno == 0) */ static ssize_t -rarprecv(struct iodesc *d, void **pkt, void **payload, time_t tleft) +rarprecv(struct iodesc *d, void **pkt, void **payload, time_t tleft, + void *extra) { ssize_t n; struct ether_arp *ap; Modified: stable/11/stand/libsa/rpc.c ============================================================================== --- stable/11/stand/libsa/rpc.c Wed Mar 14 03:19:51 2018 (r330897) +++ stable/11/stand/libsa/rpc.c Wed Mar 14 03:30:34 2018 (r330898) @@ -97,7 +97,7 @@ struct rpc_reply { }; /* Local forwards */ -static ssize_t recvrpc(struct iodesc *, void **, void **, time_t); +static ssize_t recvrpc(struct iodesc *, void **, void **, time_t, void *); static int rpc_getport(struct iodesc *, n_long, n_long); int rpc_xid; @@ -167,7 +167,7 @@ rpc_call(struct iodesc *d, n_long prog, n_long vers, n ptr = NULL; cc = sendrecv(d, sendudp, send_head, send_tail - send_head, - recvrpc, &ptr, (void **)&reply); + recvrpc, &ptr, (void **)&reply, NULL); #ifdef RPC_DEBUG if (debug) @@ -217,7 +217,7 @@ rpc_call(struct iodesc *d, n_long prog, n_long vers, n * Remaining checks are done by callrpc */ static ssize_t -recvrpc(struct iodesc *d, void **pkt, void **payload, time_t tleft) +recvrpc(struct iodesc *d, void **pkt, void **payload, time_t tleft, void *extra) { void *ptr; struct rpc_reply *reply; Modified: stable/11/stand/libsa/tftp.c ============================================================================== --- stable/11/stand/libsa/tftp.c Wed Mar 14 03:19:51 2018 (r330897) +++ stable/11/stand/libsa/tftp.c Wed Mar 14 03:30:34 2018 (r330898) @@ -61,7 +61,10 @@ __FBSDID("$FreeBSD$"); #include "tftp.h" struct tftp_handle; +struct tftprecv_extra; +static ssize_t recvtftp(struct iodesc *d, void **pkt, void **payload, + time_t tleft, void *recv_extra); static int tftp_open(const char *path, struct open_file *f); static int tftp_close(struct open_file *f); static int tftp_parse_oack(struct tftp_handle *h, char *buf, size_t len); @@ -70,11 +73,6 @@ static int tftp_write(struct open_file *f, void *buf, static off_t tftp_seek(struct open_file *f, off_t offset, int where); static int tftp_set_blksize(struct tftp_handle *h, const char *str); static int tftp_stat(struct open_file *f, struct stat *sb); -static ssize_t sendrecv_tftp(struct tftp_handle *h, - ssize_t (*sproc)(struct iodesc *, void *, size_t), - void *sbuf, size_t ssize, - ssize_t (*rproc)(struct tftp_handle *h, void **, void **, time_t, unsigned short *), - void **, void **, unsigned short *rtype); struct fs_ops tftp_fsops = { "tftp", @@ -118,6 +116,11 @@ struct tftp_handle { struct tftphdr *tftp_hdr; }; +struct tftprecv_extra { + struct tftp_handle *tftp_handle; + unsigned short rtype; /* Received type */ +}; + #define TFTP_MAX_ERRCODE EOPTNEG static const int tftperrors[TFTP_MAX_ERRCODE + 1] = { 0, /* ??? */ @@ -178,15 +181,19 @@ tftp_sendack(struct tftp_handle *h) } static ssize_t -recvtftp(struct tftp_handle *h, void **pkt, void **payload, time_t tleft, - unsigned short *rtype) +recvtftp(struct iodesc *d, void **pkt, void **payload, time_t tleft, + void *recv_extra) { - struct iodesc *d = h->iodesc; + struct tftprecv_extra *extra; + struct tftp_handle *h; struct tftphdr *t; + unsigned short *rtype; void *ptr = NULL; ssize_t len; errno = 0; + extra = (struct tftprecv_extra *)recv_extra; + h = extra->tftp_handle; len = readudp(d, &ptr, (void **)&t, tleft); @@ -195,7 +202,7 @@ recvtftp(struct tftp_handle *h, void **pkt, void **pay return (-1); } - *rtype = ntohs(t->th_opcode); + extra->rtype = ntohs(t->th_opcode); switch (ntohs(t->th_opcode)) { case DATA: { int got; @@ -282,6 +289,7 @@ tftp_makereq(struct tftp_handle *h) struct tftphdr t; u_char space[FNAME_SIZE + 6]; } __packed __aligned(4) wbuf; + struct tftprecv_extra recv_extra; char *wtail; int l; ssize_t res; @@ -289,7 +297,6 @@ tftp_makereq(struct tftp_handle *h) struct tftphdr *t; char *tftp_blksize = NULL; int blksize_l; - unsigned short rtype = 0; /* * Allow overriding default TFTP block size by setting @@ -334,8 +341,9 @@ tftp_makereq(struct tftp_handle *h) h->validsize = 0; pkt = NULL; - res = sendrecv_tftp(h, &sendudp, &wbuf.t, wtail - (char *) &wbuf.t, - &recvtftp, &pkt, (void **)&t, &rtype); + recv_extra.tftp_handle = h; + res = sendrecv(h->iodesc, &sendudp, &wbuf.t, wtail - (char *) &wbuf.t, + (void *)&recvtftp, &pkt, (void **)&t, &recv_extra); if (res == -1) { free(pkt); return (errno); @@ -345,13 +353,13 @@ tftp_makereq(struct tftp_handle *h) h->pkt = pkt; h->tftp_hdr = t; - if (rtype == OACK) + if (recv_extra.rtype == OACK) return (tftp_getnextblock(h)); /* Server ignored our blksize request, revert to TFTP default. */ h->tftp_blksize = SEGSIZE; - switch (rtype) { + switch (recv_extra.rtype) { case DATA: { h->currblock = 1; h->validsize = res; @@ -377,11 +385,11 @@ tftp_getnextblock(struct tftp_handle *h) u_char header[HEADER_SIZE]; struct tftphdr t; } __packed __aligned(4) wbuf; + struct tftprecv_extra recv_extra; char *wtail; int res; void *pkt; struct tftphdr *t; - unsigned short rtype = 0; wbuf.t.th_opcode = htons((u_short) ACK); wtail = (char *) &wbuf.t.th_block; wbuf.t.th_block = htons((u_short) h->currblock); @@ -390,8 +398,9 @@ tftp_getnextblock(struct tftp_handle *h) h->iodesc->xid = h->currblock + 1; /* expected block */ pkt = NULL; - res = sendrecv_tftp(h, &sendudp, &wbuf.t, wtail - (char *) &wbuf.t, - &recvtftp, &pkt, (void **)&t, &rtype); + recv_extra.tftp_handle = h; + res = sendrecv(h->iodesc, &sendudp, &wbuf.t, wtail - (char *) &wbuf.t, + (void *)&recvtftp, &pkt, (void **)&t, &recv_extra); if (res == -1) { /* 0 is OK! */ free(pkt); @@ -603,67 +612,6 @@ tftp_seek(struct open_file *f, off_t offset, int where return (-1); } return (tftpfile->off); -} - -static ssize_t -sendrecv_tftp(struct tftp_handle *h, - ssize_t (*sproc)(struct iodesc *, void *, size_t), - void *sbuf, size_t ssize, - ssize_t (*rproc)(struct tftp_handle *, void **, void **, time_t, - unsigned short *), - void **pkt, void **payload, unsigned short *rtype) -{ - struct iodesc *d = h->iodesc; - ssize_t cc; - time_t t, t1, tleft; - -#ifdef TFTP_DEBUG - if (debug) - printf("sendrecv: called\n"); -#endif - - tleft = MINTMO; - t = t1 = getsecs(); - for (;;) { - if ((getsecs() - t) > MAXTMO) { - errno = ETIMEDOUT; - return -1; - } - - cc = (*sproc)(d, sbuf, ssize); - if (cc != -1 && cc < ssize) - panic("sendrecv: short write! (%zd < %zu)", - cc, ssize); - - if (cc == -1) { - /* Error on transmit; wait before retrying */ - while ((getsecs() - t1) < tleft); - t1 = getsecs(); - continue; - } - - t1 = getsecs(); -recvnext: - if ((getsecs() - t) > MAXTMO) { - errno = ETIMEDOUT; - return -1; - } - /* Try to get a packet and process it. */ - cc = (*rproc)(h, pkt, payload, tleft, rtype); - /* Return on data, EOF or real error. */ - if (cc != -1 || (errno != 0 && errno != ETIMEDOUT)) - return (cc); - if ((getsecs() - t1) < tleft) { - goto recvnext; - } - - /* Timed out or didn't get the packet we're waiting for */ - tleft += MINTMO; - if (tleft > (2 * MINTMO)) { - tleft = (2 * MINTMO); - } - t1 = getsecs(); - } } static int From owner-svn-src-all@freebsd.org Wed Mar 14 03:36:28 2018 Return-Path: Delivered-To: svn-src-all@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 4F99EF4B84E; Wed, 14 Mar 2018 03:36:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1760869CC; Wed, 14 Mar 2018 03:36:27 +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 EC6D222B9D; Wed, 14 Mar 2018 03:36:27 +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 w2E3aRbS046134; Wed, 14 Mar 2018 03:36:27 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E3aRBU046133; Wed, 14 Mar 2018 03:36:27 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803140336.w2E3aRBU046133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 14 Mar 2018 03:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330899 - stable/11/sys/dev/ofw X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/dev/ofw X-SVN-Commit-Revision: 330899 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:36:28 -0000 Author: kevans Date: Wed Mar 14 03:36:27 2018 New Revision: 330899 URL: https://svnweb.freebsd.org/changeset/base/330899 Log: MFC r317191, r317195: Don't ignore "disabled" CPUs r317191 (cognet): ePAPR states that any non-boot CPU will come in "disabled" state. So we should not consider a "disabled" cpu as a CPU we have to ignore, and we should use them if they provide a "enable-method". While I'm there, support "ok" as well as "okay", while ePAPR only accepts "okay", linux accepts "ok" too so we can expect it to be used. r317195 (cognet): Update comment ot reflect realilty, we know also take care of CPUs that provide a enable-method. Modified: stable/11/sys/dev/ofw/ofw_cpu.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ofw/ofw_cpu.c ============================================================================== --- stable/11/sys/dev/ofw/ofw_cpu.c Wed Mar 14 03:30:34 2018 (r330898) +++ stable/11/sys/dev/ofw/ofw_cpu.c Wed Mar 14 03:36:27 2018 (r330899) @@ -315,13 +315,16 @@ ofw_cpu_early_foreach(ofw_cpu_foreach_cb callback, boo /* * If we are filtering by runnable then limit to only - * those that have been enabled. + * those that have been enabled, or do provide a method + * to enable them. */ if (only_runnable) { status[0] = '\0'; OF_getprop(child, "status", status, sizeof(status)); - if (status[0] != '\0' && strcmp(status, "okay") != 0) - continue; + if (status[0] != '\0' && strcmp(status, "okay") != 0 && + strcmp(status, "ok") != 0 && + !OF_hasprop(child, "enable-method")) + continue; } /* From owner-svn-src-all@freebsd.org Wed Mar 14 03:37:37 2018 Return-Path: Delivered-To: svn-src-all@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 D9081F4BA0C; Wed, 14 Mar 2018 03:37:37 +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 874C486B57; Wed, 14 Mar 2018 03:37:37 +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 8237622BA2; Wed, 14 Mar 2018 03:37:37 +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 w2E3bb9a046228; Wed, 14 Mar 2018 03:37:37 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E3bb5E046227; Wed, 14 Mar 2018 03:37:37 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803140337.w2E3bb5E046227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 14 Mar 2018 03:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330900 - stable/11/sys/dev/ofw X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/dev/ofw X-SVN-Commit-Revision: 330900 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:37:38 -0000 Author: kevans Date: Wed Mar 14 03:37:37 2018 New Revision: 330900 URL: https://svnweb.freebsd.org/changeset/base/330900 Log: MFC r322287 (mw): Add support for "compatible" parameter in ofw_fdt_fixup Sometimes it's convenient to provide fixup to many boards that use the same SoC family (eg. Marvell Armada 38x). Instead of putting multiple entries in fdt_fixup_table, use one entry which refers to all boards with given SoC. Modified: stable/11/sys/dev/ofw/ofw_fdt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ofw/ofw_fdt.c ============================================================================== --- stable/11/sys/dev/ofw/ofw_fdt.c Wed Mar 14 03:36:27 2018 (r330899) +++ stable/11/sys/dev/ofw/ofw_fdt.c Wed Mar 14 03:37:37 2018 (r330900) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "ofw_if.h" @@ -431,7 +432,15 @@ ofw_fdt_fixup(ofw_t ofw) for (i = 0; fdt_fixup_table[i].model != NULL; i++) { if (strncmp(model, fdt_fixup_table[i].model, FDT_MODEL_LEN) != 0) - continue; + /* + * Sometimes it's convenient to provide one + * fixup entry that refers to many boards. + * To handle this case, simply check if model + * is compatible parameter + */ + if(!ofw_bus_node_is_compatible(root, + fdt_fixup_table[i].model)) + continue; if (fdt_fixup_table[i].handler != NULL) (*fdt_fixup_table[i].handler)(root); From owner-svn-src-all@freebsd.org Wed Mar 14 03:39:32 2018 Return-Path: Delivered-To: svn-src-all@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 5B587F4BC33; Wed, 14 Mar 2018 03:39:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E6BC86D65; Wed, 14 Mar 2018 03:39:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0951022BA6; Wed, 14 Mar 2018 03:39:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2E3dVu7046346; Wed, 14 Mar 2018 03:39:31 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E3dVfZ046345; Wed, 14 Mar 2018 03:39:31 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803140339.w2E3dVfZ046345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 14 Mar 2018 03:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330901 - stable/11/sys/dev/ofw X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/dev/ofw X-SVN-Commit-Revision: 330901 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:39:32 -0000 Author: kevans Date: Wed Mar 14 03:39:31 2018 New Revision: 330901 URL: https://svnweb.freebsd.org/changeset/base/330901 Log: MFC r322289: Enable uing ofw_bus_find_compatible in early platform code Before this patch function ofw_bus_find_compatible was using memory allocations in order to find compatible node and the property's length. This way there was always a suited buffer for property, however this approach had also disadvantages - ofw_bus_find_compatible couldn't be used when malloc is not available, e.g. during fdt fixup stage. In order to remove the usage limitation of ofw_bus_find_compatible(), this patch modifies the function to use ofw_bus_node_is_compatible() (instead of the one without _int suffix), which uses a fixed buffer on stack instead of dynamic allocations. Modified: stable/11/sys/dev/ofw/ofw_bus_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- stable/11/sys/dev/ofw/ofw_bus_subr.c Wed Mar 14 03:37:37 2018 (r330900) +++ stable/11/sys/dev/ofw/ofw_bus_subr.c Wed Mar 14 03:39:31 2018 (r330901) @@ -703,22 +703,14 @@ phandle_t ofw_bus_find_compatible(phandle_t node, const char *onecompat) { phandle_t child, ret; - void *compat; - int len; /* * Traverse all children of 'start' node, and find first with * matching 'compatible' property. */ for (child = OF_child(node); child != 0; child = OF_peer(child)) { - len = OF_getprop_alloc(child, "compatible", 1, &compat); - if (len >= 0) { - ret = ofw_bus_node_is_compatible_int(compat, len, - onecompat); - free(compat, M_OFWPROP); - if (ret != 0) - return (child); - } + if (ofw_bus_node_is_compatible(child, onecompat) != 0) + return (child); ret = ofw_bus_find_compatible(child, onecompat); if (ret != 0) From owner-svn-src-all@freebsd.org Wed Mar 14 03:41:08 2018 Return-Path: Delivered-To: svn-src-all@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 07B53F4BE50; Wed, 14 Mar 2018 03:41:08 +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 B1E3286F89; Wed, 14 Mar 2018 03:41:07 +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 ACF8322BD2; Wed, 14 Mar 2018 03:41:07 +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 w2E3f7bA048080; Wed, 14 Mar 2018 03:41:07 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E3f7Kb048079; Wed, 14 Mar 2018 03:41:07 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803140341.w2E3f7Kb048079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 14 Mar 2018 03:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330902 - stable/11/sys/dev/ofw X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/dev/ofw X-SVN-Commit-Revision: 330902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:41:08 -0000 Author: kevans Date: Wed Mar 14 03:41:07 2018 New Revision: 330902 URL: https://svnweb.freebsd.org/changeset/base/330902 Log: MFC r322359: Enable OF_setprop API function to add property in FDT This patch modifies function ofw_fdt_setprop (called by OF_setprop), so that it can add property, when replacing is not possible. Adding property is needed to fixup FDT's that have missing properties. Modified: stable/11/sys/dev/ofw/ofw_fdt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ofw/ofw_fdt.c ============================================================================== --- stable/11/sys/dev/ofw/ofw_fdt.c Wed Mar 14 03:39:31 2018 (r330901) +++ stable/11/sys/dev/ofw/ofw_fdt.c Wed Mar 14 03:41:07 2018 (r330902) @@ -362,7 +362,11 @@ ofw_fdt_setprop(ofw_t ofw, phandle_t package, const ch if (offset < 0) return (-1); - return (fdt_setprop_inplace(fdtp, offset, propname, buf, len)); + if (fdt_setprop_inplace(fdtp, offset, propname, buf, len) != 0) + /* Try to add property, when setting value inplace failed */ + return (fdt_setprop(fdtp, offset, propname, buf, len)); + + return (0); } /* Convert a device specifier to a fully qualified pathname. */ From owner-svn-src-all@freebsd.org Wed Mar 14 03:43:49 2018 Return-Path: Delivered-To: svn-src-all@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 D9EC9F4C1EC; Wed, 14 Mar 2018 03:43:49 +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 8102687342; Wed, 14 Mar 2018 03:43:49 +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 7A2E922D21; Wed, 14 Mar 2018 03:43:49 +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 w2E3hnxD051172; Wed, 14 Mar 2018 03:43:49 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E3hnxg051171; Wed, 14 Mar 2018 03:43:49 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803140343.w2E3hnxg051171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 14 Mar 2018 03:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330903 - stable/11/sys/dev/ofw X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/dev/ofw X-SVN-Commit-Revision: 330903 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:43:50 -0000 Author: kevans Date: Wed Mar 14 03:43:49 2018 New Revision: 330903 URL: https://svnweb.freebsd.org/changeset/base/330903 Log: MFC r326204: Do not bind to CPUs with SMT Do not bind to CPUs with SMT, which use a different CPU numbering convention that does not play well with this driver. Modified: stable/11/sys/dev/ofw/ofw_cpu.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ofw/ofw_cpu.c ============================================================================== --- stable/11/sys/dev/ofw/ofw_cpu.c Wed Mar 14 03:41:07 2018 (r330902) +++ stable/11/sys/dev/ofw/ofw_cpu.c Wed Mar 14 03:43:49 2018 (r330903) @@ -191,6 +191,10 @@ ofw_cpu_probe(device_t dev) if (type == NULL || strcmp(type, "cpu") != 0) return (ENXIO); + /* Skip SMT CPUs, which we can't reasonably represent with this code */ + if (OF_hasprop(ofw_bus_get_node(dev), "ibm,ppc-interrupt-server#s")) + return (ENXIO); + device_set_desc(dev, "Open Firmware CPU"); return (0); } From owner-svn-src-all@freebsd.org Wed Mar 14 03:45:33 2018 Return-Path: Delivered-To: svn-src-all@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 D57B7F4C3DD; Wed, 14 Mar 2018 03:45: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 8ACAE875B4; Wed, 14 Mar 2018 03:45: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 853C422D26; Wed, 14 Mar 2018 03:45: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 w2E3jXOg051431; Wed, 14 Mar 2018 03:45:33 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E3jXK1051429; Wed, 14 Mar 2018 03:45:33 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803140345.w2E3jXK1051429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 14 Mar 2018 03:45:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330904 - in stable/11/sys: dev/ofw powerpc/ofw X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/sys: dev/ofw powerpc/ofw X-SVN-Commit-Revision: 330904 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:45:34 -0000 Author: kevans Date: Wed Mar 14 03:45:33 2018 New Revision: 330904 URL: https://svnweb.freebsd.org/changeset/base/330904 Log: MFC r326310: Back out OF module installation in the event of failure. PS3 firmware gives some ancient FDT version (2) that fails the init check in OFW_FDT. It is still possible to make progress, but not while the OF layer is going crazy. Modified: stable/11/sys/dev/ofw/openfirm.c stable/11/sys/powerpc/ofw/ofw_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ofw/openfirm.c ============================================================================== --- stable/11/sys/dev/ofw/openfirm.c Wed Mar 14 03:43:49 2018 (r330903) +++ stable/11/sys/dev/ofw/openfirm.c Wed Mar 14 03:45:33 2018 (r330904) @@ -201,6 +201,12 @@ OF_install(char *name, int prio) ofw_def_t *ofwp, **ofwpp; static int curr_prio = 0; + /* Allow OF layer to be uninstalled */ + if (name == NULL) { + ofw_def_impl = NULL; + return (FALSE); + } + /* * Try and locate the OFW kobj corresponding to the name. */ Modified: stable/11/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- stable/11/sys/powerpc/ofw/ofw_machdep.c Wed Mar 14 03:43:49 2018 (r330903) +++ stable/11/sys/powerpc/ofw/ofw_machdep.c Wed Mar 14 03:45:33 2018 (r330904) @@ -389,6 +389,7 @@ boolean_t OF_bootstrap() { boolean_t status = FALSE; + int err = 0; #ifdef AIM if (openfirmware_entry != NULL) { @@ -405,7 +406,7 @@ OF_bootstrap() if (status != TRUE) return status; - OF_init(openfirmware); + err = OF_init(openfirmware); } else #endif if (fdt != NULL) { @@ -414,9 +415,15 @@ OF_bootstrap() if (status != TRUE) return status; - OF_init(fdt); - OF_interpret("perform-fixup", 0); + err = OF_init(fdt); + if (err == 0) + OF_interpret("perform-fixup", 0); } + + if (err != 0) { + OF_install(NULL, 0); + status = FALSE; + } return (status); } From owner-svn-src-all@freebsd.org Wed Mar 14 03:47:59 2018 Return-Path: Delivered-To: svn-src-all@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 5D459F4C6ED; Wed, 14 Mar 2018 03:47:59 +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 08F3E877D1; Wed, 14 Mar 2018 03:47:59 +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 DCE1822D2A; Wed, 14 Mar 2018 03:47:58 +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 w2E3lwtG051569; Wed, 14 Mar 2018 03:47:58 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E3lwrg051568; Wed, 14 Mar 2018 03:47:58 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803140347.w2E3lwrg051568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 14 Mar 2018 03:47:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330905 - stable/11/sys/dev/ofw X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/dev/ofw X-SVN-Commit-Revision: 330905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:47:59 -0000 Author: kevans Date: Wed Mar 14 03:47:58 2018 New Revision: 330905 URL: https://svnweb.freebsd.org/changeset/base/330905 Log: MFC r327391: Avoid use of the fdt_get_property_*() API [It is] intrinsically incompatible with FDT versions < 16. This also simplifies the code a bit. Modified: stable/11/sys/dev/ofw/ofw_fdt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ofw/ofw_fdt.c ============================================================================== --- stable/11/sys/dev/ofw/ofw_fdt.c Wed Mar 14 03:45:33 2018 (r330904) +++ stable/11/sys/dev/ofw/ofw_fdt.c Wed Mar 14 03:47:58 2018 (r330905) @@ -227,7 +227,7 @@ ofw_fdt_instance_to_package(ofw_t ofw, ihandle_t insta static ssize_t ofw_fdt_getproplen(ofw_t ofw, phandle_t package, const char *propname) { - const struct fdt_property *prop; + const void *prop; int offset, len; offset = fdt_phandle_offset(package); @@ -235,7 +235,7 @@ ofw_fdt_getproplen(ofw_t ofw, phandle_t package, const return (-1); len = -1; - prop = fdt_get_property(fdtp, offset, propname, &len); + prop = fdt_getprop(fdtp, offset, propname, &len); if (prop == NULL && strcmp(propname, "name") == 0) { /* Emulate the 'name' property */ @@ -312,7 +312,7 @@ static int ofw_fdt_nextprop(ofw_t ofw, phandle_t package, const char *previous, char *buf, size_t size) { - const struct fdt_property *prop; + const void *prop; const char *name; int offset; @@ -327,7 +327,7 @@ ofw_fdt_nextprop(ofw_t ofw, phandle_t package, const c if (previous != NULL) { while (offset >= 0) { - prop = fdt_get_property_by_offset(fdtp, offset, NULL); + prop = fdt_getprop_by_offset(fdtp, offset, &name, NULL); if (prop == NULL) return (-1); /* Internal error */ @@ -336,17 +336,16 @@ ofw_fdt_nextprop(ofw_t ofw, phandle_t package, const c return (0); /* No more properties */ /* Check if the last one was the one we wanted */ - name = fdt_string(fdtp, fdt32_to_cpu(prop->nameoff)); if (strcmp(name, previous) == 0) break; } } - prop = fdt_get_property_by_offset(fdtp, offset, &offset); + prop = fdt_getprop_by_offset(fdtp, offset, &name, &offset); if (prop == NULL) return (-1); /* Internal error */ - strncpy(buf, fdt_string(fdtp, fdt32_to_cpu(prop->nameoff)), size); + strncpy(buf, name, size); return (1); } From owner-svn-src-all@freebsd.org Wed Mar 14 03:49:16 2018 Return-Path: Delivered-To: svn-src-all@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 AB834F4C86E; Wed, 14 Mar 2018 03:49:16 +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 5BA6087934; Wed, 14 Mar 2018 03:49:16 +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 5504122D2D; Wed, 14 Mar 2018 03:49:16 +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 w2E3nG5V051673; Wed, 14 Mar 2018 03:49:16 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E3nGE4051671; Wed, 14 Mar 2018 03:49:16 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803140349.w2E3nGE4051671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 14 Mar 2018 03:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330906 - in stable/11/sys: dev/ofw powerpc/ofw X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/sys: dev/ofw powerpc/ofw X-SVN-Commit-Revision: 330906 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:49:17 -0000 Author: kevans Date: Wed Mar 14 03:49:15 2018 New Revision: 330906 URL: https://svnweb.freebsd.org/changeset/base/330906 Log: MFC r329579: Set internal error returns [of some OF functions] to 0 Set internal error returns for OF_peer(), OF_child(), and OF_parent() to zero, matching the IEEE 1275 standard. Since these internal error paths have never, to my knowledge, been taken, behavior is unchanged. Modified: stable/11/sys/dev/ofw/ofw_standard.c stable/11/sys/powerpc/ofw/ofw_real.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ofw/ofw_standard.c ============================================================================== --- stable/11/sys/dev/ofw/ofw_standard.c Wed Mar 14 03:47:58 2018 (r330905) +++ stable/11/sys/dev/ofw/ofw_standard.c Wed Mar 14 03:49:15 2018 (r330906) @@ -232,7 +232,7 @@ ofw_std_peer(ofw_t ofw, phandle_t node) args.node = node; if (openfirmware(&args) == -1) - return (-1); + return (0); return (args.next); } @@ -254,7 +254,7 @@ ofw_std_child(ofw_t ofw, phandle_t node) args.node = node; if (openfirmware(&args) == -1) - return (-1); + return (0); return (args.child); } @@ -276,7 +276,7 @@ ofw_std_parent(ofw_t ofw, phandle_t node) args.node = node; if (openfirmware(&args) == -1) - return (-1); + return (0); return (args.parent); } Modified: stable/11/sys/powerpc/ofw/ofw_real.c ============================================================================== --- stable/11/sys/powerpc/ofw/ofw_real.c Wed Mar 14 03:47:58 2018 (r330905) +++ stable/11/sys/powerpc/ofw/ofw_real.c Wed Mar 14 03:49:15 2018 (r330906) @@ -366,7 +366,7 @@ ofw_real_peer(ofw_t ofw, phandle_t node) argsptr = ofw_real_map(&args, sizeof(args)); if (openfirmware((void *)argsptr) == -1) { ofw_real_stop(); - return (-1); + return (0); } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); @@ -395,7 +395,7 @@ ofw_real_child(ofw_t ofw, phandle_t node) argsptr = ofw_real_map(&args, sizeof(args)); if (openfirmware((void *)argsptr) == -1) { ofw_real_stop(); - return (-1); + return (0); } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); @@ -424,7 +424,7 @@ ofw_real_parent(ofw_t ofw, phandle_t node) argsptr = ofw_real_map(&args, sizeof(args)); if (openfirmware((void *)argsptr) == -1) { ofw_real_stop(); - return (-1); + return (0); } ofw_real_unmap(argsptr, &args, sizeof(args)); ofw_real_stop(); From owner-svn-src-all@freebsd.org Wed Mar 14 03:50:13 2018 Return-Path: Delivered-To: svn-src-all@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 EAEB6F4C9CB; Wed, 14 Mar 2018 03:50: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 9E18E87AC5; Wed, 14 Mar 2018 03:50:12 +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 94EF622D32; Wed, 14 Mar 2018 03:50:12 +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 w2E3oC32051789; Wed, 14 Mar 2018 03:50:12 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E3oCnY051788; Wed, 14 Mar 2018 03:50:12 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803140350.w2E3oCnY051788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 14 Mar 2018 03:50:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330907 - stable/11/sys/dev/ofw X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/dev/ofw X-SVN-Commit-Revision: 330907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 03:50:13 -0000 Author: kevans Date: Wed Mar 14 03:50:12 2018 New Revision: 330907 URL: https://svnweb.freebsd.org/changeset/base/330907 Log: MFC r330019: ofw_fdt: Simplify parts with new libfdt methods libfdt now provides methods to iterate through subnodes and properties in a convenient fashion. Replace our ofw_fdt_{peer,child} searches with calls to their corresponding libfdt methods. Rework ofw_fdt_nextprop to use the fdt_for_each_property_offset macro, making it even more obvious what it's doing. No functional change intended. Modified: stable/11/sys/dev/ofw/ofw_fdt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ofw/ofw_fdt.c ============================================================================== --- stable/11/sys/dev/ofw/ofw_fdt.c Wed Mar 14 03:49:15 2018 (r330906) +++ stable/11/sys/dev/ofw/ofw_fdt.c Wed Mar 14 03:50:12 2018 (r330907) @@ -153,7 +153,7 @@ fdt_phandle_offset(phandle_t p) static phandle_t ofw_fdt_peer(ofw_t ofw, phandle_t node) { - int depth, offset; + int offset; if (node == 0) { /* Find root node */ @@ -165,39 +165,21 @@ ofw_fdt_peer(ofw_t ofw, phandle_t node) offset = fdt_phandle_offset(node); if (offset < 0) return (0); - - for (depth = 1, offset = fdt_next_node(fdtp, offset, &depth); - offset >= 0; - offset = fdt_next_node(fdtp, offset, &depth)) { - if (depth < 0) - return (0); - if (depth == 1) - return (fdt_offset_phandle(offset)); - } - - return (0); + offset = fdt_next_subnode(fdtp, offset); + return (fdt_offset_phandle(offset)); } /* Return the first child of this node or 0. */ static phandle_t ofw_fdt_child(ofw_t ofw, phandle_t node) { - int depth, offset; + int offset; offset = fdt_phandle_offset(node); if (offset < 0) return (0); - - for (depth = 0, offset = fdt_next_node(fdtp, offset, &depth); - (offset >= 0) && (depth > 0); - offset = fdt_next_node(fdtp, offset, &depth)) { - if (depth < 0) - return (0); - if (depth == 1) - return (fdt_offset_phandle(offset)); - } - - return (0); + offset = fdt_first_subnode(fdtp, offset); + return (fdt_offset_phandle(offset)); } /* Return the parent of this node or 0. */ @@ -320,26 +302,24 @@ ofw_fdt_nextprop(ofw_t ofw, phandle_t package, const c if (offset < 0) return (-1); - /* Find the first prop in the node */ - offset = fdt_first_property_offset(fdtp, offset); - if (offset < 0) - return (0); /* No properties */ - - if (previous != NULL) { - while (offset >= 0) { + if (previous == NULL) + /* Find the first prop in the node */ + offset = fdt_first_property_offset(fdtp, offset); + else { + fdt_for_each_property_offset(offset, fdtp, offset) { prop = fdt_getprop_by_offset(fdtp, offset, &name, NULL); if (prop == NULL) return (-1); /* Internal error */ - + /* Skip until we find 'previous', then bail out */ + if (strcmp(name, previous) != 0) + continue; offset = fdt_next_property_offset(fdtp, offset); - if (offset < 0) - return (0); /* No more properties */ - - /* Check if the last one was the one we wanted */ - if (strcmp(name, previous) == 0) - break; + break; } } + + if (offset < 0) + return (0); /* No properties */ prop = fdt_getprop_by_offset(fdtp, offset, &name, &offset); if (prop == NULL) From owner-svn-src-all@freebsd.org Wed Mar 14 04:00:01 2018 Return-Path: Delivered-To: svn-src-all@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 ABC4BF4D7F0; Wed, 14 Mar 2018 04:00:01 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 5F0216857A; Wed, 14 Mar 2018 04:00:01 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59C0022ED1; Wed, 14 Mar 2018 04:00:01 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2E401TD057042; Wed, 14 Mar 2018 04:00:01 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E400a0057035; Wed, 14 Mar 2018 04:00:00 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201803140400.w2E400a0057035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 14 Mar 2018 04:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r330908 - in releng/11.1: . sys/amd64/amd64 sys/amd64/ia32 sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel sys/conf sys/dev/cpuctl sys/dev/hyperv/vmbus sys/dev/hyperv/vmbus/amd64 sy... X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng/11.1: . sys/amd64/amd64 sys/amd64/ia32 sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel sys/conf sys/dev/cpuctl sys/dev/hyperv/vmbus sys/dev/hyperv/vmbus/amd64 sys/dev/hyperv/vmbus/i386 s... X-SVN-Commit-Revision: 330908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 04:00:02 -0000 Author: gordon Date: Wed Mar 14 04:00:00 2018 New Revision: 330908 URL: https://svnweb.freebsd.org/changeset/base/330908 Log: Add mitigations for two classes of speculative execution vulnerabilities on amd64. [FreeBSD-SA-18:03.speculative_execution] Approved by: so Security: FreeBSD-SA-18:03.speculative_execution Security: CVE-2017-5715 Security: CVE-2017-5754 Modified: releng/11.1/UPDATING releng/11.1/sys/amd64/amd64/apic_vector.S releng/11.1/sys/amd64/amd64/atpic_vector.S releng/11.1/sys/amd64/amd64/cpu_switch.S releng/11.1/sys/amd64/amd64/db_trace.c releng/11.1/sys/amd64/amd64/exception.S releng/11.1/sys/amd64/amd64/genassym.c releng/11.1/sys/amd64/amd64/initcpu.c releng/11.1/sys/amd64/amd64/machdep.c releng/11.1/sys/amd64/amd64/mp_machdep.c releng/11.1/sys/amd64/amd64/pmap.c releng/11.1/sys/amd64/amd64/support.S releng/11.1/sys/amd64/amd64/sys_machdep.c releng/11.1/sys/amd64/amd64/trap.c releng/11.1/sys/amd64/amd64/vm_machdep.c releng/11.1/sys/amd64/ia32/ia32_exception.S releng/11.1/sys/amd64/ia32/ia32_syscall.c releng/11.1/sys/amd64/include/asmacros.h releng/11.1/sys/amd64/include/frame.h releng/11.1/sys/amd64/include/intr_machdep.h releng/11.1/sys/amd64/include/md_var.h releng/11.1/sys/amd64/include/pcb.h releng/11.1/sys/amd64/include/pcpu.h releng/11.1/sys/amd64/include/pmap.h releng/11.1/sys/amd64/include/smp.h releng/11.1/sys/amd64/vmm/intel/vmx.c releng/11.1/sys/amd64/vmm/vmm.c releng/11.1/sys/conf/Makefile.amd64 releng/11.1/sys/conf/newvers.sh releng/11.1/sys/dev/cpuctl/cpuctl.c releng/11.1/sys/dev/hyperv/vmbus/amd64/vmbus_vector.S releng/11.1/sys/dev/hyperv/vmbus/i386/vmbus_vector.S releng/11.1/sys/dev/hyperv/vmbus/vmbus.c releng/11.1/sys/i386/i386/apic_vector.s releng/11.1/sys/i386/i386/atpic_vector.s releng/11.1/sys/i386/i386/exception.s releng/11.1/sys/i386/i386/machdep.c releng/11.1/sys/i386/i386/pmap.c releng/11.1/sys/i386/i386/support.s releng/11.1/sys/i386/i386/vm_machdep.c releng/11.1/sys/sys/cpuctl.h releng/11.1/sys/x86/include/apicvar.h releng/11.1/sys/x86/include/specialreg.h releng/11.1/sys/x86/include/x86_smp.h releng/11.1/sys/x86/include/x86_var.h releng/11.1/sys/x86/isa/atpic.c releng/11.1/sys/x86/x86/cpu_machdep.c releng/11.1/sys/x86/x86/identcpu.c releng/11.1/sys/x86/x86/local_apic.c releng/11.1/sys/x86/x86/mp_x86.c releng/11.1/sys/x86/xen/pv.c releng/11.1/usr.sbin/cpucontrol/cpucontrol.8 releng/11.1/usr.sbin/cpucontrol/cpucontrol.c Modified: releng/11.1/UPDATING ============================================================================== --- releng/11.1/UPDATING Wed Mar 14 03:50:12 2018 (r330907) +++ releng/11.1/UPDATING Wed Mar 14 04:00:00 2018 (r330908) @@ -16,6 +16,11 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20180314 p8 FreeBSD-SA-18:03.speculative_execution + + Add mitigations for two classes of speculative execution vulnerabilities + on amd64. + 20180307 p7 FreeBSD-SA-18:01.ipsec FreeBSD-SA-18:02.ntp FreeBSD-EN-18:01.tzdata Modified: releng/11.1/sys/amd64/amd64/apic_vector.S ============================================================================== --- releng/11.1/sys/amd64/amd64/apic_vector.S Wed Mar 14 03:50:12 2018 (r330907) +++ releng/11.1/sys/amd64/amd64/apic_vector.S Wed Mar 14 04:00:00 2018 (r330908) @@ -2,7 +2,13 @@ * Copyright (c) 1989, 1990 William F. Jolitz. * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2014-2018 The FreeBSD Foundation + * All rights reserved. * + * Portions of this software were developed by + * Konstantin Belousov under sponsorship from + * the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -38,12 +44,12 @@ #include "opt_smp.h" +#include "assym.s" + #include #include #include -#include "assym.s" - #ifdef SMP #define LK lock ; #else @@ -73,30 +79,28 @@ as_lapic_eoi: * translates that into a vector, and passes the vector to the * lapic_handle_intr() function. */ -#define ISR_VEC(index, vec_name) \ - .text ; \ - SUPERALIGN_TEXT ; \ -IDTVEC(vec_name) ; \ - PUSH_FRAME ; \ - FAKE_MCOUNT(TF_RIP(%rsp)) ; \ - cmpl $0,x2apic_mode ; \ - je 1f ; \ - movl $(MSR_APIC_ISR0 + index),%ecx ; \ - rdmsr ; \ - jmp 2f ; \ -1: ; \ - movq lapic_map, %rdx ; /* pointer to local APIC */ \ - movl LA_ISR + 16 * (index)(%rdx), %eax ; /* load ISR */ \ -2: ; \ - bsrl %eax, %eax ; /* index of highest set bit in ISR */ \ - jz 3f ; \ - addl $(32 * index),%eax ; \ - movq %rsp, %rsi ; \ - movl %eax, %edi ; /* pass the IRQ */ \ - call lapic_handle_intr ; \ -3: ; \ - MEXITCOUNT ; \ + .macro ISR_VEC index, vec_name + INTR_HANDLER \vec_name + FAKE_MCOUNT(TF_RIP(%rsp)) + cmpl $0,x2apic_mode + je 1f + movl $(MSR_APIC_ISR0 + \index),%ecx + rdmsr + jmp 2f +1: + movq lapic_map, %rdx /* pointer to local APIC */ + movl LA_ISR + 16 * (\index)(%rdx), %eax /* load ISR */ +2: + bsrl %eax, %eax /* index of highest set bit in ISR */ + jz 3f + addl $(32 * \index),%eax + movq %rsp, %rsi + movl %eax, %edi /* pass the IRQ */ + call lapic_handle_intr +3: + MEXITCOUNT jmp doreti + .endm /* * Handle "spurious INTerrupts". @@ -108,26 +112,21 @@ IDTVEC(vec_name) ; \ .text SUPERALIGN_TEXT IDTVEC(spuriousint) - /* No EOI cycle used here */ - jmp doreti_iret - ISR_VEC(1, apic_isr1) - ISR_VEC(2, apic_isr2) - ISR_VEC(3, apic_isr3) - ISR_VEC(4, apic_isr4) - ISR_VEC(5, apic_isr5) - ISR_VEC(6, apic_isr6) - ISR_VEC(7, apic_isr7) + ISR_VEC 1, apic_isr1 + ISR_VEC 2, apic_isr2 + ISR_VEC 3, apic_isr3 + ISR_VEC 4, apic_isr4 + ISR_VEC 5, apic_isr5 + ISR_VEC 6, apic_isr6 + ISR_VEC 7, apic_isr7 /* * Local APIC periodic timer handler. */ - .text - SUPERALIGN_TEXT -IDTVEC(timerint) - PUSH_FRAME + INTR_HANDLER timerint FAKE_MCOUNT(TF_RIP(%rsp)) movq %rsp, %rdi call lapic_handle_timer @@ -137,10 +136,7 @@ IDTVEC(timerint) /* * Local APIC CMCI handler. */ - .text - SUPERALIGN_TEXT -IDTVEC(cmcint) - PUSH_FRAME + INTR_HANDLER cmcint FAKE_MCOUNT(TF_RIP(%rsp)) call lapic_handle_cmc MEXITCOUNT @@ -149,10 +145,7 @@ IDTVEC(cmcint) /* * Local APIC error interrupt handler. */ - .text - SUPERALIGN_TEXT -IDTVEC(errorint) - PUSH_FRAME + INTR_HANDLER errorint FAKE_MCOUNT(TF_RIP(%rsp)) call lapic_handle_error MEXITCOUNT @@ -163,10 +156,7 @@ IDTVEC(errorint) * Xen event channel upcall interrupt handler. * Only used when the hypervisor supports direct vector callbacks. */ - .text - SUPERALIGN_TEXT -IDTVEC(xen_intr_upcall) - PUSH_FRAME + INTR_HANDLER xen_intr_upcall FAKE_MCOUNT(TF_RIP(%rsp)) movq %rsp, %rdi call xen_intr_handle_upcall @@ -183,74 +173,68 @@ IDTVEC(xen_intr_upcall) SUPERALIGN_TEXT invltlb_ret: call as_lapic_eoi - POP_FRAME - jmp doreti_iret + jmp ld_regs SUPERALIGN_TEXT -IDTVEC(invltlb) - PUSH_FRAME - + INTR_HANDLER invltlb call invltlb_handler jmp invltlb_ret -IDTVEC(invltlb_pcid) - PUSH_FRAME - + INTR_HANDLER invltlb_pcid call invltlb_pcid_handler jmp invltlb_ret -IDTVEC(invltlb_invpcid) - PUSH_FRAME - + INTR_HANDLER invltlb_invpcid_nopti call invltlb_invpcid_handler jmp invltlb_ret + INTR_HANDLER invltlb_invpcid_pti + call invltlb_invpcid_pti_handler + jmp invltlb_ret + /* * Single page TLB shootdown */ - .text + INTR_HANDLER invlpg + call invlpg_handler + jmp invltlb_ret - SUPERALIGN_TEXT -IDTVEC(invlpg) - PUSH_FRAME + INTR_HANDLER invlpg_invpcid + call invlpg_invpcid_handler + jmp invltlb_ret - call invlpg_handler + INTR_HANDLER invlpg_pcid + call invlpg_pcid_handler jmp invltlb_ret /* * Page range TLB shootdown. */ - .text - SUPERALIGN_TEXT -IDTVEC(invlrng) - PUSH_FRAME - + INTR_HANDLER invlrng call invlrng_handler jmp invltlb_ret + INTR_HANDLER invlrng_invpcid + call invlrng_invpcid_handler + jmp invltlb_ret + + INTR_HANDLER invlrng_pcid + call invlrng_pcid_handler + jmp invltlb_ret + /* * Invalidate cache. */ - .text - SUPERALIGN_TEXT -IDTVEC(invlcache) - PUSH_FRAME - + INTR_HANDLER invlcache call invlcache_handler jmp invltlb_ret /* * Handler for IPIs sent via the per-cpu IPI bitmap. */ - .text - SUPERALIGN_TEXT -IDTVEC(ipi_intr_bitmap_handler) - PUSH_FRAME - + INTR_HANDLER ipi_intr_bitmap_handler call as_lapic_eoi - FAKE_MCOUNT(TF_RIP(%rsp)) - call ipi_bitmap_handler MEXITCOUNT jmp doreti @@ -258,24 +242,15 @@ IDTVEC(ipi_intr_bitmap_handler) /* * Executed by a CPU when it receives an IPI_STOP from another CPU. */ - .text - SUPERALIGN_TEXT -IDTVEC(cpustop) - PUSH_FRAME - + INTR_HANDLER cpustop call as_lapic_eoi - call cpustop_handler jmp doreti /* * Executed by a CPU when it receives an IPI_SUSPEND from another CPU. */ - .text - SUPERALIGN_TEXT -IDTVEC(cpususpend) - PUSH_FRAME - + INTR_HANDLER cpususpend call cpususpend_handler call as_lapic_eoi jmp doreti @@ -285,10 +260,7 @@ IDTVEC(cpususpend) * * - Calls the generic rendezvous action function. */ - .text - SUPERALIGN_TEXT -IDTVEC(rendezvous) - PUSH_FRAME + INTR_HANDLER rendezvous #ifdef COUNT_IPIS movl PCPU(CPUID), %eax movq ipi_rendezvous_counts(,%rax,8), %rax @@ -327,5 +299,9 @@ IDTVEC(justreturn) popq %rcx popq %rax jmp doreti_iret + + INTR_HANDLER justreturn1 + call as_lapic_eoi + jmp doreti #endif /* SMP */ Modified: releng/11.1/sys/amd64/amd64/atpic_vector.S ============================================================================== --- releng/11.1/sys/amd64/amd64/atpic_vector.S Wed Mar 14 03:50:12 2018 (r330907) +++ releng/11.1/sys/amd64/amd64/atpic_vector.S Wed Mar 14 04:00:00 2018 (r330908) @@ -36,38 +36,35 @@ * master and slave interrupt controllers. */ +#include "assym.s" #include -#include "assym.s" - /* * Macros for interrupt entry, call to handler, and exit. */ -#define INTR(irq_num, vec_name) \ - .text ; \ - SUPERALIGN_TEXT ; \ -IDTVEC(vec_name) ; \ - PUSH_FRAME ; \ - FAKE_MCOUNT(TF_RIP(%rsp)) ; \ - movq %rsp, %rsi ; \ - movl $irq_num, %edi; /* pass the IRQ */ \ - call atpic_handle_intr ; \ - MEXITCOUNT ; \ + .macro INTR irq_num, vec_name + INTR_HANDLER \vec_name + FAKE_MCOUNT(TF_RIP(%rsp)) + movq %rsp, %rsi + movl $\irq_num, %edi /* pass the IRQ */ + call atpic_handle_intr + MEXITCOUNT jmp doreti + .endm - INTR(0, atpic_intr0) - INTR(1, atpic_intr1) - INTR(2, atpic_intr2) - INTR(3, atpic_intr3) - INTR(4, atpic_intr4) - INTR(5, atpic_intr5) - INTR(6, atpic_intr6) - INTR(7, atpic_intr7) - INTR(8, atpic_intr8) - INTR(9, atpic_intr9) - INTR(10, atpic_intr10) - INTR(11, atpic_intr11) - INTR(12, atpic_intr12) - INTR(13, atpic_intr13) - INTR(14, atpic_intr14) - INTR(15, atpic_intr15) + INTR 0, atpic_intr0 + INTR 1, atpic_intr1 + INTR 2, atpic_intr2 + INTR 3, atpic_intr3 + INTR 4, atpic_intr4 + INTR 5, atpic_intr5 + INTR 6, atpic_intr6 + INTR 7, atpic_intr7 + INTR 8, atpic_intr8 + INTR 9, atpic_intr9 + INTR 10, atpic_intr10 + INTR 11, atpic_intr11 + INTR 12, atpic_intr12 + INTR 13, atpic_intr13 + INTR 14, atpic_intr14 + INTR 15, atpic_intr15 Modified: releng/11.1/sys/amd64/amd64/cpu_switch.S ============================================================================== --- releng/11.1/sys/amd64/amd64/cpu_switch.S Wed Mar 14 03:50:12 2018 (r330907) +++ releng/11.1/sys/amd64/amd64/cpu_switch.S Wed Mar 14 04:00:00 2018 (r330908) @@ -191,9 +191,11 @@ do_kthread: done_tss: movq %r8,PCPU(RSP0) movq %r8,PCPU(CURPCB) - /* Update the TSS_RSP0 pointer for the next interrupt */ + /* Update the COMMON_TSS_RSP0 pointer for the next interrupt */ + cmpb $0,pti(%rip) + jne 1f movq %r8,COMMON_TSS_RSP0(%rdx) - movq %r12,PCPU(CURTHREAD) /* into next thread */ +1: movq %r12,PCPU(CURTHREAD) /* into next thread */ /* Test if debug registers should be restored. */ testl $PCB_DBREGS,PCB_FLAGS(%r8) @@ -270,7 +272,12 @@ do_tss: movq %rdx,PCPU(TSSP) shrq $8,%rcx movl %ecx,8(%rax) movb $0x89,5(%rax) /* unset busy */ - movl $TSSSEL,%eax + cmpb $0,pti(%rip) + je 1f + movq PCPU(PRVSPACE),%rax + addq $PC_PTI_STACK+PC_PTI_STACK_SZ*8,%rax + movq %rax,COMMON_TSS_RSP0(%rdx) +1: movl $TSSSEL,%eax ltr %ax jmp done_tss Modified: releng/11.1/sys/amd64/amd64/db_trace.c ============================================================================== --- releng/11.1/sys/amd64/amd64/db_trace.c Wed Mar 14 03:50:12 2018 (r330907) +++ releng/11.1/sys/amd64/amd64/db_trace.c Wed Mar 14 04:00:00 2018 (r330908) @@ -200,6 +200,7 @@ db_nextframe(struct amd64_frame **fp, db_addr_t *ip, s if (name != NULL) { if (strcmp(name, "calltrap") == 0 || strcmp(name, "fork_trampoline") == 0 || + strcmp(name, "mchk_calltrap") == 0 || strcmp(name, "nmi_calltrap") == 0 || strcmp(name, "Xdblfault") == 0) frame_type = TRAP; Modified: releng/11.1/sys/amd64/amd64/exception.S ============================================================================== --- releng/11.1/sys/amd64/amd64/exception.S Wed Mar 14 03:50:12 2018 (r330907) +++ releng/11.1/sys/amd64/amd64/exception.S Wed Mar 14 04:00:00 2018 (r330908) @@ -1,12 +1,16 @@ /*- * Copyright (c) 1989, 1990 William F. Jolitz. * Copyright (c) 1990 The Regents of the University of California. - * Copyright (c) 2007 The FreeBSD Foundation + * Copyright (c) 2007-2018 The FreeBSD Foundation * All rights reserved. * * Portions of this software were developed by A. Joseph Koshy under * sponsorship from the FreeBSD Foundation and Google, Inc. * + * Portions of this software were developed by + * Konstantin Belousov under sponsorship from + * the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -38,13 +42,13 @@ #include "opt_compat.h" #include "opt_hwpmc_hooks.h" +#include "assym.s" + #include #include #include #include -#include "assym.s" - #ifdef KDTRACE_HOOKS .bss .globl dtrace_invop_jump_addr @@ -100,69 +104,62 @@ dtrace_invop_calltrap_addr: MCOUNT_LABEL(user) MCOUNT_LABEL(btrap) -/* Traps that we leave interrupts disabled for.. */ -#define TRAP_NOEN(a) \ - subq $TF_RIP,%rsp; \ - movl $(a),TF_TRAPNO(%rsp) ; \ - movq $0,TF_ADDR(%rsp) ; \ - movq $0,TF_ERR(%rsp) ; \ +/* Traps that we leave interrupts disabled for. */ + .macro TRAP_NOEN l, trapno + PTI_ENTRY \l,X\l + .globl X\l + .type X\l,@function +X\l: subq $TF_RIP,%rsp + movl $\trapno,TF_TRAPNO(%rsp) + movq $0,TF_ADDR(%rsp) + movq $0,TF_ERR(%rsp) jmp alltraps_noen -IDTVEC(dbg) - TRAP_NOEN(T_TRCTRAP) -IDTVEC(bpt) - TRAP_NOEN(T_BPTFLT) + .endm + + TRAP_NOEN dbg, T_TRCTRAP + TRAP_NOEN bpt, T_BPTFLT #ifdef KDTRACE_HOOKS -IDTVEC(dtrace_ret) - TRAP_NOEN(T_DTRACE_RET) + TRAP_NOEN dtrace_ret, T_DTRACE_RET #endif /* Regular traps; The cpu does not supply tf_err for these. */ -#define TRAP(a) \ - subq $TF_RIP,%rsp; \ - movl $(a),TF_TRAPNO(%rsp) ; \ - movq $0,TF_ADDR(%rsp) ; \ - movq $0,TF_ERR(%rsp) ; \ + .macro TRAP l, trapno + PTI_ENTRY \l,X\l + .globl X\l + .type X\l,@function +X\l: + subq $TF_RIP,%rsp + movl $\trapno,TF_TRAPNO(%rsp) + movq $0,TF_ADDR(%rsp) + movq $0,TF_ERR(%rsp) jmp alltraps -IDTVEC(div) - TRAP(T_DIVIDE) -IDTVEC(ofl) - TRAP(T_OFLOW) -IDTVEC(bnd) - TRAP(T_BOUND) -IDTVEC(ill) - TRAP(T_PRIVINFLT) -IDTVEC(dna) - TRAP(T_DNA) -IDTVEC(fpusegm) - TRAP(T_FPOPFLT) -IDTVEC(mchk) - TRAP(T_MCHK) -IDTVEC(rsvd) - TRAP(T_RESERVED) -IDTVEC(fpu) - TRAP(T_ARITHTRAP) -IDTVEC(xmm) - TRAP(T_XMMFLT) + .endm -/* This group of traps have tf_err already pushed by the cpu */ -#define TRAP_ERR(a) \ - subq $TF_ERR,%rsp; \ - movl $(a),TF_TRAPNO(%rsp) ; \ - movq $0,TF_ADDR(%rsp) ; \ + TRAP div, T_DIVIDE + TRAP ofl, T_OFLOW + TRAP bnd, T_BOUND + TRAP ill, T_PRIVINFLT + TRAP dna, T_DNA + TRAP fpusegm, T_FPOPFLT + TRAP rsvd, T_RESERVED + TRAP fpu, T_ARITHTRAP + TRAP xmm, T_XMMFLT + +/* This group of traps have tf_err already pushed by the cpu. */ + .macro TRAP_ERR l, trapno + PTI_ENTRY \l,X\l,has_err=1 + .globl X\l + .type X\l,@function +X\l: + subq $TF_ERR,%rsp + movl $\trapno,TF_TRAPNO(%rsp) + movq $0,TF_ADDR(%rsp) jmp alltraps -IDTVEC(tss) - TRAP_ERR(T_TSSFLT) -IDTVEC(missing) - subq $TF_ERR,%rsp - movl $T_SEGNPFLT,TF_TRAPNO(%rsp) - jmp prot_addrf -IDTVEC(stk) - subq $TF_ERR,%rsp - movl $T_STKFLT,TF_TRAPNO(%rsp) - jmp prot_addrf -IDTVEC(align) - TRAP_ERR(T_ALIGNFLT) + .endm + TRAP_ERR tss, T_TSSFLT + TRAP_ERR align, T_ALIGNFLT + /* * alltraps entry point. Use swapgs if this is the first time in the * kernel from userland. Reenable interrupts if they were enabled @@ -174,25 +171,24 @@ IDTVEC(align) alltraps: movq %rdi,TF_RDI(%rsp) testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ - jz alltraps_testi /* already running with kernel GS.base */ + jz 1f /* already running with kernel GS.base */ swapgs movq PCPU(CURPCB),%rdi andl $~PCB_FULL_IRET,PCB_FLAGS(%rdi) - movw %fs,TF_FS(%rsp) - movw %gs,TF_GS(%rsp) - movw %es,TF_ES(%rsp) - movw %ds,TF_DS(%rsp) -alltraps_testi: - testl $PSL_I,TF_RFLAGS(%rsp) - jz alltraps_pushregs_no_rdi - sti -alltraps_pushregs_no_rdi: - movq %rsi,TF_RSI(%rsp) +1: SAVE_SEGS movq %rdx,TF_RDX(%rsp) + movq %rax,TF_RAX(%rsp) movq %rcx,TF_RCX(%rsp) + testb $SEL_RPL_MASK,TF_CS(%rsp) + jz 2f + call handle_ibrs_entry +2: testl $PSL_I,TF_RFLAGS(%rsp) + jz alltraps_pushregs_no_rax + sti +alltraps_pushregs_no_rax: + movq %rsi,TF_RSI(%rsp) movq %r8,TF_R8(%rsp) movq %r9,TF_R9(%rsp) - movq %rax,TF_RAX(%rsp) movq %rbx,TF_RBX(%rsp) movq %rbp,TF_RBP(%rsp) movq %r10,TF_R10(%rsp) @@ -248,15 +244,18 @@ calltrap: alltraps_noen: movq %rdi,TF_RDI(%rsp) testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ - jz 1f /* already running with kernel GS.base */ + jz 1f /* already running with kernel GS.base */ swapgs movq PCPU(CURPCB),%rdi andl $~PCB_FULL_IRET,PCB_FLAGS(%rdi) -1: movw %fs,TF_FS(%rsp) - movw %gs,TF_GS(%rsp) - movw %es,TF_ES(%rsp) - movw %ds,TF_DS(%rsp) - jmp alltraps_pushregs_no_rdi +1: SAVE_SEGS + movq %rdx,TF_RDX(%rsp) + movq %rax,TF_RAX(%rsp) + movq %rcx,TF_RCX(%rsp) + testb $SEL_RPL_MASK,TF_CS(%rsp) + jz alltraps_pushregs_no_rax + call handle_ibrs_entry + jmp alltraps_pushregs_no_rax IDTVEC(dblfault) subq $TF_ERR,%rsp @@ -278,71 +277,132 @@ IDTVEC(dblfault) movq %r13,TF_R13(%rsp) movq %r14,TF_R14(%rsp) movq %r15,TF_R15(%rsp) - movw %fs,TF_FS(%rsp) - movw %gs,TF_GS(%rsp) - movw %es,TF_ES(%rsp) - movw %ds,TF_DS(%rsp) + SAVE_SEGS movl $TF_HASSEGS,TF_FLAGS(%rsp) cld testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ jz 1f /* already running with kernel GS.base */ swapgs 1: - movq %rsp,%rdi + movq PCPU(KCR3),%rax + cmpq $~0,%rax + je 2f + movq %rax,%cr3 +2: movq %rsp,%rdi call dblfault_handler -2: - hlt - jmp 2b +3: hlt + jmp 3b + ALIGN_TEXT +IDTVEC(page_pti) + testb $SEL_RPL_MASK,PTI_CS-2*8(%rsp) + jz Xpage + swapgs + pushq %rax + pushq %rdx + movq %cr3,%rax + movq %rax,PCPU(SAVED_UCR3) + PTI_UUENTRY has_err=1 + subq $TF_ERR,%rsp + movq %rdi,TF_RDI(%rsp) + movq %rax,TF_RAX(%rsp) + movq %rdx,TF_RDX(%rsp) + movq %rcx,TF_RCX(%rsp) + jmp page_u IDTVEC(page) subq $TF_ERR,%rsp - movl $T_PAGEFLT,TF_TRAPNO(%rsp) - movq %rdi,TF_RDI(%rsp) /* free up a GP register */ + movq %rdi,TF_RDI(%rsp) /* free up GP registers */ + movq %rax,TF_RAX(%rsp) + movq %rdx,TF_RDX(%rsp) + movq %rcx,TF_RCX(%rsp) testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ - jz 1f /* already running with kernel GS.base */ + jz page_cr2 /* already running with kernel GS.base */ swapgs - movq PCPU(CURPCB),%rdi +page_u: movq PCPU(CURPCB),%rdi andl $~PCB_FULL_IRET,PCB_FLAGS(%rdi) -1: movq %cr2,%rdi /* preserve %cr2 before .. */ + movq PCPU(SAVED_UCR3),%rax + movq %rax,PCB_SAVED_UCR3(%rdi) + call handle_ibrs_entry +page_cr2: + movq %cr2,%rdi /* preserve %cr2 before .. */ movq %rdi,TF_ADDR(%rsp) /* enabling interrupts. */ - movw %fs,TF_FS(%rsp) - movw %gs,TF_GS(%rsp) - movw %es,TF_ES(%rsp) - movw %ds,TF_DS(%rsp) + SAVE_SEGS + movl $T_PAGEFLT,TF_TRAPNO(%rsp) testl $PSL_I,TF_RFLAGS(%rsp) - jz alltraps_pushregs_no_rdi + jz alltraps_pushregs_no_rax sti - jmp alltraps_pushregs_no_rdi + jmp alltraps_pushregs_no_rax /* * We have to special-case this one. If we get a trap in doreti() at * the iretq stage, we'll reenter with the wrong gs state. We'll have * to do a special the swapgs in this case even coming from the kernel. * XXX linux has a trap handler for their equivalent of load_gs(). + * + * On the stack, we have the hardware interrupt frame to return + * to usermode (faulted) and another frame with error code, for + * fault. For PTI, copy both frames to the main thread stack. */ -IDTVEC(prot) + .macro PROTF_ENTRY name,trapno +\name\()_pti_doreti: + pushq %rax + pushq %rdx + swapgs + movq PCPU(KCR3),%rax + movq %rax,%cr3 + movq PCPU(RSP0),%rax + subq $2*PTI_SIZE-3*8,%rax /* no err, %rax, %rdx in faulted frame */ + MOVE_STACKS (PTI_SIZE / 4 - 3) + movq %rax,%rsp + popq %rdx + popq %rax + swapgs + jmp X\name +IDTVEC(\name\()_pti) + cmpq $doreti_iret,PTI_RIP-2*8(%rsp) + je \name\()_pti_doreti + testb $SEL_RPL_MASK,PTI_CS-2*8(%rsp) /* %rax, %rdx not yet pushed */ + jz X\name + PTI_UENTRY has_err=1 + swapgs +IDTVEC(\name) subq $TF_ERR,%rsp - movl $T_PROTFLT,TF_TRAPNO(%rsp) + movl $\trapno,TF_TRAPNO(%rsp) + jmp prot_addrf + .endm + + PROTF_ENTRY missing, T_SEGNPFLT + PROTF_ENTRY stk, T_STKFLT + PROTF_ENTRY prot, T_PROTFLT + prot_addrf: movq $0,TF_ADDR(%rsp) movq %rdi,TF_RDI(%rsp) /* free up a GP register */ + movq %rax,TF_RAX(%rsp) + movq %rdx,TF_RDX(%rsp) + movq %rcx,TF_RCX(%rsp) + movw %fs,TF_FS(%rsp) + movw %gs,TF_GS(%rsp) leaq doreti_iret(%rip),%rdi cmpq %rdi,TF_RIP(%rsp) - je 1f /* kernel but with user gsbase!! */ + je 5f /* kernel but with user gsbase!! */ testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ - jz 2f /* already running with kernel GS.base */ -1: swapgs -2: movq PCPU(CURPCB),%rdi + jz 6f /* already running with kernel GS.base */ + swapgs + movq PCPU(CURPCB),%rdi +4: call handle_ibrs_entry orl $PCB_FULL_IRET,PCB_FLAGS(%rdi) /* always full iret from GPF */ - movw %fs,TF_FS(%rsp) - movw %gs,TF_GS(%rsp) movw %es,TF_ES(%rsp) movw %ds,TF_DS(%rsp) testl $PSL_I,TF_RFLAGS(%rsp) - jz alltraps_pushregs_no_rdi + jz alltraps_pushregs_no_rax sti - jmp alltraps_pushregs_no_rdi + jmp alltraps_pushregs_no_rax +5: swapgs +6: movq PCPU(CURPCB),%rdi + jmp 4b + /* * Fast syscall entry point. We enter here with just our new %cs/%ss set, * and the new privilige level. We are still running on the old user stack @@ -352,8 +412,18 @@ prot_addrf: * We do not support invoking this from a custom %cs or %ss (e.g. using * entries from an LDT). */ + SUPERALIGN_TEXT +IDTVEC(fast_syscall_pti) + swapgs + movq %rax,PCPU(SCRATCH_RAX) + movq PCPU(KCR3),%rax + movq %rax,%cr3 + jmp fast_syscall_common + SUPERALIGN_TEXT IDTVEC(fast_syscall) swapgs + movq %rax,PCPU(SCRATCH_RAX) +fast_syscall_common: movq %rsp,PCPU(SCRATCH_RSP) movq PCPU(RSP0),%rsp /* Now emulate a trapframe. Make the 8 byte alignment odd for call. */ @@ -363,10 +433,11 @@ IDTVEC(fast_syscall) movq %rcx,TF_RIP(%rsp) /* %rcx original value is in %r10 */ movq PCPU(SCRATCH_RSP),%r11 /* %r11 already saved */ movq %r11,TF_RSP(%rsp) /* user stack pointer */ - movw %fs,TF_FS(%rsp) - movw %gs,TF_GS(%rsp) - movw %es,TF_ES(%rsp) - movw %ds,TF_DS(%rsp) + movq PCPU(SCRATCH_RAX),%rax + movq %rax,TF_RAX(%rsp) /* syscall number */ + movq %rdx,TF_RDX(%rsp) /* arg 3 */ + SAVE_SEGS + call handle_ibrs_entry movq PCPU(CURPCB),%r11 andl $~PCB_FULL_IRET,PCB_FLAGS(%r11) sti @@ -375,11 +446,9 @@ IDTVEC(fast_syscall) movq $2,TF_ERR(%rsp) movq %rdi,TF_RDI(%rsp) /* arg 1 */ movq %rsi,TF_RSI(%rsp) /* arg 2 */ - movq %rdx,TF_RDX(%rsp) /* arg 3 */ movq %r10,TF_RCX(%rsp) /* arg 4 */ movq %r8,TF_R8(%rsp) /* arg 5 */ movq %r9,TF_R9(%rsp) /* arg 6 */ - movq %rax,TF_RAX(%rsp) /* syscall number */ movq %rbx,TF_RBX(%rsp) /* C preserved */ movq %rbp,TF_RBP(%rsp) /* C preserved */ movq %r12,TF_R12(%rsp) /* C preserved */ @@ -398,11 +467,12 @@ IDTVEC(fast_syscall) /* Disable interrupts before testing PCB_FULL_IRET. */ cli testl $PCB_FULL_IRET,PCB_FLAGS(%rax) - jnz 3f + jnz 4f /* Check for and handle AST's on return to userland. */ movq PCPU(CURTHREAD),%rax testl $TDF_ASTPENDING | TDF_NEEDRESCHED,TD_FLAGS(%rax) - jne 2f + jne 3f + call handle_ibrs_exit /* Restore preserved registers. */ MEXITCOUNT movq TF_RDI(%rsp),%rdi /* bonus; preserve arg 1 */ @@ -412,16 +482,21 @@ IDTVEC(fast_syscall) movq TF_RFLAGS(%rsp),%r11 /* original %rflags */ movq TF_RIP(%rsp),%rcx /* original %rip */ movq TF_RSP(%rsp),%rsp /* user stack pointer */ - swapgs + cmpb $0,pti + je 2f + movq PCPU(UCR3),%r9 + movq %r9,%cr3 + xorl %r9d,%r9d +2: swapgs sysretq -2: /* AST scheduled. */ +3: /* AST scheduled. */ sti movq %rsp,%rdi call ast jmp 1b -3: /* Requested full context restore, use doreti for that. */ +4: /* Requested full context restore, use doreti for that. */ MEXITCOUNT jmp doreti @@ -477,17 +552,15 @@ IDTVEC(nmi) movq %r13,TF_R13(%rsp) movq %r14,TF_R14(%rsp) movq %r15,TF_R15(%rsp) - movw %fs,TF_FS(%rsp) - movw %gs,TF_GS(%rsp) - movw %es,TF_ES(%rsp) - movw %ds,TF_DS(%rsp) + SAVE_SEGS movl $TF_HASSEGS,TF_FLAGS(%rsp) cld xorl %ebx,%ebx testb $SEL_RPL_MASK,TF_CS(%rsp) jnz nmi_fromuserspace /* - * We've interrupted the kernel. Preserve GS.base in %r12. + * We've interrupted the kernel. Preserve GS.base in %r12, + * %cr3 in %r13, and possibly lower half of MSR_IA32_SPEC_CTL in %r14d. */ movl $MSR_GSBASE,%ecx rdmsr @@ -499,10 +572,32 @@ IDTVEC(nmi) movl %edx,%eax shrq $32,%rdx wrmsr + movq %cr3,%r13 + movq PCPU(KCR3),%rax + cmpq $~0,%rax + je 1f + movq %rax,%cr3 +1: testl $CPUID_STDEXT3_IBPB,cpu_stdext_feature3(%rip) + je nmi_calltrap + movl $MSR_IA32_SPEC_CTRL,%ecx + rdmsr + movl %eax,%r14d + call handle_ibrs_entry jmp nmi_calltrap nmi_fromuserspace: incl %ebx swapgs + movq %cr3,%r13 + movq PCPU(KCR3),%rax + cmpq $~0,%rax + je 1f + movq %rax,%cr3 +1: call handle_ibrs_entry + movq PCPU(CURPCB),%rdi + testq %rdi,%rdi + jz 3f + orl $PCB_FULL_IRET,PCB_FLAGS(%rdi) +3: /* Note: this label is also used by ddb and gdb: */ nmi_calltrap: FAKE_MCOUNT(TF_RIP(%rsp)) @@ -525,26 +620,29 @@ nmi_calltrap: movq PCPU(CURTHREAD),%rax orq %rax,%rax /* curthread present? */ jz nocallchain - testl $TDP_CALLCHAIN,TD_PFLAGS(%rax) /* flagged for capture? */ - jz nocallchain /* - * A user callchain is to be captured, so: - * - Move execution to the regular kernel stack, to allow for - * nested NMI interrupts. - * - Take the processor out of "NMI" mode by faking an "iret". - * - Enable interrupts, so that copyin() can work. + * Move execution to the regular kernel stack, because we + * committed to return through doreti. */ movq %rsp,%rsi /* source stack pointer */ movq $TF_SIZE,%rcx movq PCPU(RSP0),%rdx subq %rcx,%rdx movq %rdx,%rdi /* destination stack pointer */ - shrq $3,%rcx /* trap frame size in long words */ cld rep movsq /* copy trapframe */ + movq %rdx,%rsp /* we are on the regular kstack */ + testl $TDP_CALLCHAIN,TD_PFLAGS(%rax) /* flagged for capture? */ + jz nocallchain + /* + * A user callchain is to be captured, so: + * - Take the processor out of "NMI" mode by faking an "iret", + * to allow for nested NMI interrupts. + * - Enable interrupts, so that copyin() can work. + */ movl %ss,%eax pushq %rax /* tf_ss */ pushq %rdx /* tf_rsp (on kernel stack) */ @@ -574,33 +672,139 @@ outofnmi: cli nocallchain: #endif - testl %ebx,%ebx + testl %ebx,%ebx /* %ebx == 0 => return to userland */ jnz doreti_exit -nmi_kernelexit: /* + * Restore speculation control MSR, if preserved. + */ + testl $CPUID_STDEXT3_IBPB,cpu_stdext_feature3(%rip) + je 1f + movl %r14d,%eax + xorl %edx,%edx + movl $MSR_IA32_SPEC_CTRL,%ecx + wrmsr + /* * Put back the preserved MSR_GSBASE value. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 14 05:25:19 2018 Return-Path: Delivered-To: svn-src-all@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 7020CF56574; Wed, 14 Mar 2018 05:25:19 +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 BCE056CEE0; Wed, 14 Mar 2018 05:25:18 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from freyja.zeit4.iv.bundesimmobilien.de ([87.138.105.249]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0McEkx-1fFZrX2ihz-00Jedu; Wed, 14 Mar 2018 06:25:17 +0100 Date: Wed, 14 Mar 2018 06:25:10 +0100 From: "O. Hartmann" To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330884 - in head/sys: dev/cxgbe dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/tom Message-ID: <20180314062510.0e575da4@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <201803132305.w2DN5pnc010768@repo.freebsd.org> References: <201803132305.w2DN5pnc010768@repo.freebsd.org> Organization: Walstatt MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:/hPSB2sWmFH5jiqUEHl3nMqk8PE4vkV0IWpMr1SO9jHcK/S4Pa3 dPG3xf8xbrh+9lalooqvfMIynGuNjO4bP2mjLm8w0VbvHQo4hIEmAaTcua5sgWik14A6DGp zlQsmJq4H+MWha/cxBC8Yz5wj35BnupCJpQFzvRr75/jQD/YW3As5vSqgKoK4hgHQ0JQeBc J89leEuxfsWhe8CaL7ikg== X-UI-Out-Filterresults: notjunk:1;V01:K0:NOYfab7eNFY=:tD7cQLFce4zRH5SlklPUZA Ueibz5nlaI2vWduYBPPXyrAhCp6ERkKud/bov72MCku8DuDdCAc6KTGKyv0NbTKFnm6gWjJMI qKHPzNviTUk9RcBvo+oVHNTYFEVUjihO+B7uvSyrO1+hwOS8EWi9CUAr7YHgsvdI8A0cSS/8Q vwHf3Tvr4BP9G9gH5XOWV8fvTLHnFm5HsYNMGhec5WZedhNLewLHlga4VGq++HIib7wvEA7xl 0xNqH//dR1k1DpzEBk8k1qsmwxLKpKkWPcHZjeWoCAVQxQeIjbbeVwItquWolTzS4DcxzU4ms LI4c1KIH+bOVA4dhtlkqbnFPGjbVGWi8DAHnFQV1IlGcJio/Oo4rTYXGxWnciRKknM0V3A0nm rwratcBBxz8r8FSfjybwGUeV7w8TwZIs0kfr+yqEu9xZwPmvtDNOCvHpZFnw2wgPGdEhvn9Nd gYivJ57GBGWEOkZSItNzEkHXf1DM/K0chJZr4Y+graRuVhGuYYQWtZwMeBiL4DAvNcsuV3shm 2oEyD4WLZR2Iit6IDRhP+v0XjJ0XlZVqGqCK43oTIAw6ISLj7GziYOKq2+2rTJ+hnlJvoxF4z f+bEZaJ0jntQw0sONp2vu06Hiacu6pfbeVxpqz6ZuVWFizJ5IXHaSfgJ5vHG6Kv+VzWr8wQWj 8rd3XgM+gE5aGd0UoxBFfshvz8PHMixx4yeUOb7TuIIBKd9lIQQksIeav0FtWE8zPcJpt2kEp FPz2xjdyFDnEqS9OUfGoDVVX32/bctsjwwwAnVjYEyOsmGkPUi4YqMCx/19r/IuOmqrF8WwoH I99EfQwwXa/NQHVVuO8n1ZcDtYzbiK/TlCchondPxwNwQLsZkI= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 05:25:20 -0000 On Tue, 13 Mar 2018 23:05:51 +0000 (UTC) John Baldwin wrote: > Author: jhb > Date: Tue Mar 13 23:05:51 2018 > New Revision: 330884 > URL: https://svnweb.freebsd.org/changeset/base/330884 > > Log: > Support for TLS offload of TOE connections on T6 adapters. > > The TOE engine in Chelsio T6 adapters supports offloading of TLS > encryption and TCP segmentation for offloaded connections. Sockets > using TLS are required to use a set of custom socket options to upload > RX and TX keys to the NIC and to enable RX processing. Currently > these socket options are implemented as TCP options in the vendor > specific range. A patched OpenSSL library will be made available in a > port / package for use with the TLS TOE support. > > TOE sockets can either offload both transmit and reception of TLS > records or just transmit. TLS offload (both RX and TX) is enabled by > setting the dev.t6nex..tls sysctl to 1 and requires TOE to be > enabled on the relevant interface. Transmit offload can be used on > any "normal" or TLS TOE socket by using the custom socket option to > program a transmit key. This permits most TOE sockets to > transparently offload TLS when applications use a patched SSL library > (e.g. using LD_LIBRARY_PATH to request use of a patched OpenSSL > library). Receive offload can only be used with TOE sockets using the > TLS mode. The dev.t6nex.0.toe.tls_rx_ports sysctl can be set to a > list of TCP port numbers. Any connection with either a local or > remote port number in that list will be created as a TLS socket rather > than a plain TOE socket. Note that although this sysctl accepts an > arbitrary list of port numbers, the sysctl(8) tool is only able to set > sysctl nodes to a single value. A TLS socket will hang without > receiving data if used by an application that is not using a patched > SSL library. Thus, the tls_rx_ports node should be used with care. > For a server mostly concerned with offloading TLS transmit, this node > is not needed as plain TOE sockets will fall back to software crypto > when using an unpatched SSL library. > > New per-interface statistics nodes are added giving counts of TLS > packets and payload bytes (payload bytes do not include TLS headers or > authentication tags/MACs) offloaded via the TOE engine, e.g.: > > dev.cc.0.stats.rx_tls_octets: 149 > dev.cc.0.stats.rx_tls_records: 13 > dev.cc.0.stats.tx_tls_octets: 26501823 > dev.cc.0.stats.tx_tls_records: 1620 > > TLS transmit work requests are constructed by a new variant of > t4_push_frames() called t4_push_tls_records() in tom/t4_tls.c. > > TLS transmit work requests require a buffer containing IVs. If the > IVs are too large to fit into the work request, a separate buffer is > allocated when constructing a work request. This buffer is associated > with the transmit descriptor and freed when the descriptor is ACKed by > the adapter. > > Received TLS frames use two new CPL messages. The first message is a > CPL_TLS_DATA containing the decryped payload of a single TLS record. > The handler places the mbuf containing the received payload on an > mbufq in the TOE pcb. The second message is a CPL_RX_TLS_CMP message > which includes a copy of the TLS header and indicates if there were > any errors. The handler for this message places the TLS header into > the socket buffer followed by the saved mbuf with the payload data. > Both of these handlers are contained in tom/t4_tls.c. > > A few routines were exposed from t4_cpl_io.c for use by t4_tls.c > including send_rx_credits(), a new send_rx_modulate(), and > t4_close_conn(). > > TLS keys for both transmit and receive are stored in onboard memory > in the NIC in the "TLS keys" memory region. > > In some cases a TLS socket can hang with pending data available in the > NIC that is not delivered to the host. As a workaround, TLS sockets > are more aggressive about sending CPL_RX_DATA_ACK messages anytime that > any data is read from a TLS socket. In addition, a fallback timer will > periodically send CPL_RX_DATA_ACK messages to the NIC for connections > that are still in the handshake phase. Once the connection has > finished the handshake and programmed RX keys via the socket option, > the timer is stopped. > > A new function select_ulp_mode() is used to determine what sub-mode a > given TOE socket should use (plain TOE, DDP, or TLS). The existing > set_tcpddp_ulp_mode() function has been renamed to set_ulp_mode() and > handles initialization of TLS-specific state when necessary in > addition to DDP-specific state. > > Since TLS sockets do not receive individual TCP segments but always > receive full TLS records, they can receive more data than is available > in the current window (e.g. if a 16k TLS record is received but the > socket buffer is itself 16k). To cope with this, just drop the window > to 0 when this happens, but track the overage and "eat" the overage as > it is read from the socket buffer not opening the window (or adding > rx_credits) for the overage bytes. > > Reviewed by: np (earlier version) > Sponsored by: Chelsio Communications > Differential Revision: https://reviews.freebsd.org/D14529 > > Added: > head/sys/dev/cxgbe/tom/t4_tls.c (contents, props changed) > head/sys/dev/cxgbe/tom/t4_tls.h (contents, props changed) > Modified: > head/sys/dev/cxgbe/adapter.h > head/sys/dev/cxgbe/firmware/t6fw_cfg.txt > head/sys/dev/cxgbe/offload.h > head/sys/dev/cxgbe/t4_main.c > head/sys/dev/cxgbe/tom/t4_connect.c > head/sys/dev/cxgbe/tom/t4_cpl_io.c > head/sys/dev/cxgbe/tom/t4_listen.c > head/sys/dev/cxgbe/tom/t4_tom.c > head/sys/dev/cxgbe/tom/t4_tom.h > head/sys/modules/cxgbe/tom/Makefile > > Modified: head/sys/dev/cxgbe/adapter.h > ============================================================================== > --- head/sys/dev/cxgbe/adapter.h Tue Mar 13 22:54:29 2018 > (r330883) +++ head/sys/dev/cxgbe/adapter.h Tue Mar 13 23:05:51 > 2018 (r330884) @@ -297,6 +297,10 @@ struct port_info { > struct port_stats stats; > u_int tnl_cong_drops; > u_int tx_parse_error; > + u_long tx_tls_records; > + u_long tx_tls_octets; > + u_long rx_tls_records; > + u_long rx_tls_octets; > > struct callout tick; > }; > > Modified: head/sys/dev/cxgbe/firmware/t6fw_cfg.txt > ============================================================================== > --- head/sys/dev/cxgbe/firmware/t6fw_cfg.txt Tue Mar 13 22:54:29 > 2018 (r330883) +++ head/sys/dev/cxgbe/firmware/t6fw_cfg.txt Tue > Mar 13 23:05:51 2018 (r330884) @@ -163,10 +163,12 @@ > nserver = 512 > nhpfilter = 0 > nhash = 16384 > - protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, > iscsi_t10dif, crypto_lookaside > + protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, > iscsi_t10dif, tlskeys, crypto_lookaside tp_l2t = 4096 > tp_ddp = 2 > tp_ddp_iscsi = 2 > + tp_tls_key = 3 > + tp_tls_mxrxsize = 17408 # 16384 + 1024, governs max rx data, pm > max xfer len, rx coalesce sizes tp_stag = 2 > tp_pbl = 5 > tp_rq = 7 > @@ -273,7 +275,7 @@ > > [fini] > version = 0x1 > - checksum = 0x7191019f > + checksum = 0x9e8952d2 > # > # $FreeBSD$ > # > > Modified: head/sys/dev/cxgbe/offload.h > ============================================================================== > --- head/sys/dev/cxgbe/offload.h Tue Mar 13 22:54:29 2018 > (r330883) +++ head/sys/dev/cxgbe/offload.h Tue Mar 13 23:05:51 > 2018 (r330884) @@ -151,6 +151,9 @@ struct tom_tunables { > int sndbuf; > int ddp; > int rx_coalesce; > + int tls; > + int *tls_rx_ports; > + int num_tls_rx_ports; > int tx_align; > int tx_zcopy; > }; > > Modified: head/sys/dev/cxgbe/t4_main.c > ============================================================================== > --- head/sys/dev/cxgbe/t4_main.c Tue Mar 13 22:54:29 2018 > (r330883) +++ head/sys/dev/cxgbe/t4_main.c Tue Mar 13 23:05:51 > 2018 (r330884) @@ -591,6 +591,7 @@ static int > sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); static int > sysctl_tc_params(SYSCTL_HANDLER_ARGS); #endif > #ifdef TCP_OFFLOAD > +static int sysctl_tls_rx_ports(SYSCTL_HANDLER_ARGS); > static int sysctl_tp_tick(SYSCTL_HANDLER_ARGS); > static int sysctl_tp_dack_timer(SYSCTL_HANDLER_ARGS); > static int sysctl_tp_timer(SYSCTL_HANDLER_ARGS); > @@ -1390,6 +1391,7 @@ t4_detach_common(device_t dev) > free(sc->sge.iqmap, M_CXGBE); > free(sc->sge.eqmap, M_CXGBE); > free(sc->tids.ftid_tab, M_CXGBE); > + free(sc->tt.tls_rx_ports, M_CXGBE); > t4_destroy_dma_tag(sc); > if (mtx_initialized(&sc->sc_lock)) { > sx_xlock(&t4_list_lock); > @@ -5433,6 +5435,14 @@ t4_sysctls(struct adapter *sc) > SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_coalesce", > CTLFLAG_RW, &sc->tt.rx_coalesce, 0, "receive > coalescing"); > + sc->tt.tls = 0; > + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tls", CTLFLAG_RW, > + &sc->tt.tls, 0, "Inline TLS allowed"); > + > + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tls_rx_ports", > + CTLTYPE_INT | CTLFLAG_RW, sc, 0, sysctl_tls_rx_ports, > + "I", "TCP ports that use inline TLS+TOE RX"); > + > sc->tt.tx_align = 1; > SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_align", > CTLFLAG_RW, &sc->tt.tx_align, 0, "chop and align > payload"); @@ -5836,6 +5846,19 @@ cxgbe_sysctls(struct port_info *pi) > "# of buffer-group 3 truncated packets"); > > #undef SYSCTL_ADD_T4_PORTSTAT > + > + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_records", > + CTLFLAG_RD, &pi->tx_tls_records, > + "# of TLS records transmitted"); > + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_octets", > + CTLFLAG_RD, &pi->tx_tls_octets, > + "# of payload octets in transmitted TLS records"); > + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_records", > + CTLFLAG_RD, &pi->rx_tls_records, > + "# of TLS records received"); > + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_octets", > + CTLFLAG_RD, &pi->rx_tls_octets, > + "# of payload octets in received TLS records"); > } > > static int > @@ -8257,6 +8280,68 @@ done: > #endif > > #ifdef TCP_OFFLOAD > +static int > +sysctl_tls_rx_ports(SYSCTL_HANDLER_ARGS) > +{ > + struct adapter *sc = arg1; > + int *old_ports, *new_ports; > + int i, new_count, rc; > + > + if (req->newptr == NULL && req->oldptr == NULL) > + return (SYSCTL_OUT(req, NULL, imax(sc->tt.num_tls_rx_ports, > 1) * > + sizeof(sc->tt.tls_rx_ports[0]))); > + > + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4tlsrx"); > + if (rc) > + return (rc); > + > + if (sc->tt.num_tls_rx_ports == 0) { > + i = -1; > + rc = SYSCTL_OUT(req, &i, sizeof(i)); > + } else > + rc = SYSCTL_OUT(req, sc->tt.tls_rx_ports, > + sc->tt.num_tls_rx_ports * > sizeof(sc->tt.tls_rx_ports[0])); > + if (rc == 0 && req->newptr != NULL) { > + new_count = req->newlen / sizeof(new_ports[0]); > + new_ports = malloc(new_count * sizeof(new_ports[0]), M_CXGBE, > + M_WAITOK); > + rc = SYSCTL_IN(req, new_ports, new_count * > + sizeof(new_ports[0])); > + if (rc) > + goto err; > + > + /* Allow setting to a single '-1' to clear the list. */ > + if (new_count == 1 && new_ports[0] == -1) { > + ADAPTER_LOCK(sc); > + old_ports = sc->tt.tls_rx_ports; > + sc->tt.tls_rx_ports = NULL; > + sc->tt.num_tls_rx_ports = 0; > + ADAPTER_UNLOCK(sc); > + free(old_ports, M_CXGBE); > + } else { > + for (i = 0; i < new_count; i++) { > + if (new_ports[i] < 1 || > + new_ports[i] > IPPORT_MAX) { > + rc = EINVAL; > + goto err; > + } > + } > + > + ADAPTER_LOCK(sc); > + old_ports = sc->tt.tls_rx_ports; > + sc->tt.tls_rx_ports = new_ports; > + sc->tt.num_tls_rx_ports = new_count; > + ADAPTER_UNLOCK(sc); > + free(old_ports, M_CXGBE); > + new_ports = NULL; > + } > + err: > + free(new_ports, M_CXGBE); > + } > + end_synchronized_op(sc, 0); > + return (rc); > +} > + > static void > unit_conv(char *buf, size_t len, u_int val, u_int factor) > { > > Modified: head/sys/dev/cxgbe/tom/t4_connect.c > ============================================================================== > --- head/sys/dev/cxgbe/tom/t4_connect.c Tue Mar 13 22:54:29 > 2018 (r330883) +++ head/sys/dev/cxgbe/tom/t4_connect.c Tue Mar > 13 23:05:51 2018 (r330884) @@ -142,6 +142,10 @@ > do_act_establish(struct sge_iq *iq, const struct rss_h } > > make_established(toep, cpl->snd_isn, cpl->rcv_isn, cpl->tcp_opt); > + > + if (toep->ulp_mode == ULP_MODE_TLS) > + tls_establish(toep); > + > done: > INP_WUNLOCK(inp); > CURVNET_RESTORE(); > @@ -268,6 +272,11 @@ calc_opt2a(struct socket *so, struct toepcb *toep) > if (toep->ulp_mode == ULP_MODE_TCPDDP) > opt2 |= F_RX_FC_VALID | F_RX_FC_DDP; > #endif > + if (toep->ulp_mode == ULP_MODE_TLS) { > + opt2 |= F_RX_FC_VALID; > + opt2 &= ~V_RX_COALESCE(M_RX_COALESCE); > + opt2 |= F_RX_FC_DISABLE; > + } > > return (htobe32(opt2)); > } > @@ -378,10 +387,7 @@ t4_connect(struct toedev *tod, struct socket *so, stru > DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); > > toep->vnet = so->so_vnet; > - if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0) > - set_tcpddp_ulp_mode(toep); > - else > - toep->ulp_mode = ULP_MODE_NONE; > + set_ulp_mode(toep, select_ulp_mode(so, sc)); > SOCKBUF_LOCK(&so->so_rcv); > /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ > toep->rx_credits = min(select_rcv_wnd(so) >> 10, M_RCV_BUFSIZ); > > Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c > ============================================================================== > --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Mar 13 22:54:29 2018 > (r330883) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Mar 13 23:05:51 > 2018 (r330884) @@ -73,9 +73,6 @@ __FBSDID("$FreeBSD$"); > #include "tom/t4_tom_l2t.h" > #include "tom/t4_tom.h" > > -#define > IS_AIOTX_MBUF(m) \ > - ((m)->m_flags & M_EXT && (m)->m_ext.ext_flags & EXT_FLAG_AIOTX) > - > static void t4_aiotx_cancel(struct kaiocb *job); > static void t4_aiotx_queue_toep(struct toepcb *toep); > > @@ -106,7 +103,7 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par > { > struct wrqe *wr; > struct fw_flowc_wr *flowc; > - unsigned int nparams = ftxp ? 8 : 6, flowclen; > + unsigned int nparams, flowclen, paramidx; > struct vi_info *vi = toep->vi; > struct port_info *pi = vi->pi; > struct adapter *sc = pi->adapter; > @@ -116,6 +113,15 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par > KASSERT(!(toep->flags & TPF_FLOWC_WR_SENT), > ("%s: flowc for tid %u sent already", __func__, toep->tid)); > > + if (ftxp != NULL) > + nparams = 8; > + else > + nparams = 6; > + if (toep->ulp_mode == ULP_MODE_TLS) > + nparams++; > + if (toep->tls.fcplenmax != 0) > + nparams++; > + > flowclen = sizeof(*flowc) + nparams * sizeof(struct > fw_flowc_mnemval); > wr = alloc_wrqe(roundup2(flowclen, 16), toep->ofld_txq); > @@ -131,39 +137,45 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par > flowc->flowid_len16 = htonl(V_FW_WR_LEN16(howmany(flowclen, 16)) | > V_FW_WR_FLOWID(toep->tid)); > > - flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN; > - flowc->mnemval[0].val = htobe32(pfvf); > - flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; > - flowc->mnemval[1].val = htobe32(pi->tx_chan); > - flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; > - flowc->mnemval[2].val = htobe32(pi->tx_chan); > - flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; > - flowc->mnemval[3].val = htobe32(toep->ofld_rxq->iq.abs_id); > +#define FLOWC_PARAM(__m, __v) \ > + do { \ > + flowc->mnemval[paramidx].mnemonic = FW_FLOWC_MNEM_##__m; \ > + flowc->mnemval[paramidx].val = htobe32(__v); \ > + paramidx++; \ > + } while (0) > + > + paramidx = 0; > + > + FLOWC_PARAM(PFNVFN, pfvf); > + FLOWC_PARAM(CH, pi->tx_chan); > + FLOWC_PARAM(PORT, pi->tx_chan); > + FLOWC_PARAM(IQID, toep->ofld_rxq->iq.abs_id); > if (ftxp) { > uint32_t sndbuf = min(ftxp->snd_space, sc->tt.sndbuf); > > - flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDNXT; > - flowc->mnemval[4].val = htobe32(ftxp->snd_nxt); > - flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_RCVNXT; > - flowc->mnemval[5].val = htobe32(ftxp->rcv_nxt); > - flowc->mnemval[6].mnemonic = FW_FLOWC_MNEM_SNDBUF; > - flowc->mnemval[6].val = htobe32(sndbuf); > - flowc->mnemval[7].mnemonic = FW_FLOWC_MNEM_MSS; > - flowc->mnemval[7].val = htobe32(ftxp->mss); > + FLOWC_PARAM(SNDNXT, ftxp->snd_nxt); > + FLOWC_PARAM(RCVNXT, ftxp->rcv_nxt); > + FLOWC_PARAM(SNDBUF, sndbuf); > + FLOWC_PARAM(MSS, ftxp->mss); > > CTR6(KTR_CXGBE, > "%s: tid %u, mss %u, sndbuf %u, snd_nxt 0x%x, rcv_nxt > 0x%x", __func__, toep->tid, ftxp->mss, sndbuf, ftxp->snd_nxt, > ftxp->rcv_nxt); > } else { > - flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF; > - flowc->mnemval[4].val = htobe32(512); > - flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS; > - flowc->mnemval[5].val = htobe32(512); > + FLOWC_PARAM(SNDBUF, 512); > + FLOWC_PARAM(MSS, 512); > > CTR2(KTR_CXGBE, "%s: tid %u", __func__, toep->tid); > } > + if (toep->ulp_mode == ULP_MODE_TLS) > + FLOWC_PARAM(ULP_MODE, toep->ulp_mode); > + if (toep->tls.fcplenmax != 0) > + FLOWC_PARAM(TXDATAPLEN_MAX, toep->tls.fcplenmax); > +#undef FLOWC_PARAM > > + KASSERT(paramidx == nparams, ("nparams mismatch")); > + > txsd->tx_credits = howmany(flowclen, 16); > txsd->plen = 0; > KASSERT(toep->tx_credits >= txsd->tx_credits && toep->txsd_avail > 0, > @@ -421,7 +433,7 @@ make_established(struct toepcb *toep, uint32_t snd_isn > soisconnected(so); > } > > -static int > +int > send_rx_credits(struct adapter *sc, struct toepcb *toep, int credits) > { > struct wrqe *wr; > @@ -443,6 +455,23 @@ send_rx_credits(struct adapter *sc, struct toepcb *toe > } > > void > +send_rx_modulate(struct adapter *sc, struct toepcb *toep) > +{ > + struct wrqe *wr; > + struct cpl_rx_data_ack *req; > + > + wr = alloc_wrqe(sizeof(*req), toep->ctrlq); > + if (wr == NULL) > + return; > + req = wrtod(wr); > + > + INIT_TP_WR_MIT_CPL(req, CPL_RX_DATA_ACK, toep->tid); > + req->credit_dack = htobe32(F_RX_MODULATE_RX); > + > + t4_wrq_tx(sc, wr); > +} > + > +void > t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) > { > struct adapter *sc = tod->tod_softc; > @@ -459,8 +488,18 @@ t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) > ("%s: sb %p has more data (%d) than last time (%d).", > __func__, sb, sbused(sb), toep->sb_cc)); > > - toep->rx_credits += toep->sb_cc - sbused(sb); > + credits = toep->sb_cc - sbused(sb); > toep->sb_cc = sbused(sb); > + if (toep->ulp_mode == ULP_MODE_TLS) { > + if (toep->tls.rcv_over >= credits) { > + toep->tls.rcv_over -= credits; > + credits = 0; > + } else { > + credits -= toep->tls.rcv_over; > + toep->tls.rcv_over = 0; > + } > + } > + toep->rx_credits += credits; > > if (toep->rx_credits > 0 && > (tp->rcv_wnd <= 32 * 1024 || toep->rx_credits >= 64 * 1024 || > @@ -471,7 +510,8 @@ t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) > toep->rx_credits -= credits; > tp->rcv_wnd += credits; > tp->rcv_adv += credits; > - } > + } else if (toep->flags & TPF_FORCE_CREDITS) > + send_rx_modulate(sc, toep); > } > > void > @@ -489,8 +529,8 @@ t4_rcvd(struct toedev *tod, struct tcpcb *tp) > /* > * Close a connection by sending a CPL_CLOSE_CON_REQ message. > */ > -static int > -close_conn(struct adapter *sc, struct toepcb *toep) > +int > +t4_close_conn(struct adapter *sc, struct toepcb *toep) > { > struct wrqe *wr; > struct cpl_close_con_req *req; > @@ -691,6 +731,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep > > KASSERT(toep->ulp_mode == ULP_MODE_NONE || > toep->ulp_mode == ULP_MODE_TCPDDP || > + toep->ulp_mode == ULP_MODE_TLS || > toep->ulp_mode == ULP_MODE_RDMA, > ("%s: ulp_mode %u for toep %p", __func__, toep->ulp_mode, toep)); > > @@ -905,7 +946,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep > > /* Send a FIN if requested, but only if there's no more data to send > */ if (m == NULL && toep->flags & TPF_SEND_FIN) > - close_conn(sc, toep); > + t4_close_conn(sc, toep); > } > > static inline void > @@ -1097,7 +1138,7 @@ t4_push_pdus(struct adapter *sc, struct toepcb *toep, > > /* Send a FIN if requested, but only if there are no more PDUs to > send */ if (mbufq_first(pduq) == NULL && toep->flags & TPF_SEND_FIN) > - close_conn(sc, toep); > + t4_close_conn(sc, toep); > } > > int > @@ -1116,6 +1157,8 @@ t4_tod_output(struct toedev *tod, struct tcpcb *tp) > > if (toep->ulp_mode == ULP_MODE_ISCSI) > t4_push_pdus(sc, toep, 0); > + else if (tls_tx_key(toep)) > + t4_push_tls_records(sc, toep, 0); > else > t4_push_frames(sc, toep, 0); > > @@ -1140,6 +1183,8 @@ t4_send_fin(struct toedev *tod, struct tcpcb *tp) > if (tp->t_state >= TCPS_ESTABLISHED) { > if (toep->ulp_mode == ULP_MODE_ISCSI) > t4_push_pdus(sc, toep, 0); > + else if (tls_tx_key(toep)) > + t4_push_tls_records(sc, toep, 0); > else > t4_push_frames(sc, toep, 0); > } > @@ -1772,6 +1817,10 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header > credits -= txsd->tx_credits; > toep->tx_credits += txsd->tx_credits; > plen += txsd->plen; > + if (txsd->iv_buffer) { > + free(txsd->iv_buffer, M_CXGBE); > + txsd->iv_buffer = NULL; > + } > txsd++; > toep->txsd_avail++; > KASSERT(toep->txsd_avail <= toep->txsd_total, > @@ -1797,6 +1846,8 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header > CURVNET_SET(toep->vnet); > if (toep->ulp_mode == ULP_MODE_ISCSI) > t4_push_pdus(sc, toep, plen); > + else if (tls_tx_key(toep)) > + t4_push_tls_records(sc, toep, plen); > else > t4_push_frames(sc, toep, plen); > CURVNET_RESTORE(); > @@ -1826,6 +1877,12 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header > tid, plen); > #endif > sbdrop_locked(sb, plen); > + if (tls_tx_key(toep)) { > + struct tls_ofld_info *tls_ofld = &toep->tls; > + > + MPASS(tls_ofld->sb_off >= plen); > + tls_ofld->sb_off -= plen; > + } > if (!TAILQ_EMPTY(&toep->aiotx_jobq)) > t4_aiotx_queue_toep(toep); > sowwakeup_locked(so); /* unlocks so_snd */ > @@ -2298,6 +2355,9 @@ t4_aio_queue_aiotx(struct socket *so, struct kaiocb *j > return (EOPNOTSUPP); > > if (!sc->tt.tx_zcopy) > + return (EOPNOTSUPP); > + > + if (is_tls_offload(toep) || tls_tx_key(toep)) > return (EOPNOTSUPP); > > SOCKBUF_LOCK(&so->so_snd); > > Modified: head/sys/dev/cxgbe/tom/t4_listen.c > ============================================================================== > --- head/sys/dev/cxgbe/tom/t4_listen.c Tue Mar 13 22:54:29 2018 > (r330883) +++ head/sys/dev/cxgbe/tom/t4_listen.c Tue Mar 13 23:05:51 > 2018 (r330884) @@ -1056,6 +1056,11 @@ calc_opt2p(struct adapter *sc, > struct port_info *pi, i if (ulp_mode == ULP_MODE_TCPDDP) > opt2 |= F_RX_FC_VALID | F_RX_FC_DDP; > #endif > + if (ulp_mode == ULP_MODE_TLS) { > + opt2 |= F_RX_FC_VALID; > + opt2 &= ~V_RX_COALESCE(M_RX_COALESCE); > + opt2 |= F_RX_FC_DISABLE; > + } > > return htobe32(opt2); > } > @@ -1347,11 +1352,15 @@ found: > > INIT_TP_WR_MIT_CPL(rpl5, CPL_PASS_ACCEPT_RPL, tid); > } > - if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0) { > - ulp_mode = ULP_MODE_TCPDDP; > + ulp_mode = select_ulp_mode(so, sc); > + switch (ulp_mode) { > + case ULP_MODE_TCPDDP: > synqe->flags |= TPF_SYNQE_TCPDDP; > - } else > - ulp_mode = ULP_MODE_NONE; > + break; > + case ULP_MODE_TLS: > + synqe->flags |= TPF_SYNQE_TLS; > + break; > + } > rpl->opt0 = calc_opt0(so, vi, e, mtu_idx, rscale, rx_credits, > ulp_mode); rpl->opt2 = calc_opt2p(sc, pi, rxqid, &cpl->tcpopt, &th, ulp_mode); > > @@ -1407,8 +1416,8 @@ found: > REJECT_PASS_ACCEPT(); > } > > - CTR5(KTR_CXGBE, "%s: stid %u, tid %u, lctx %p, synqe %p, SYNACK", > - __func__, stid, tid, lctx, synqe); > + CTR6(KTR_CXGBE, "%s: stid %u, tid %u, lctx %p, synqe %p, SYNACK mode > %d", > + __func__, stid, tid, lctx, synqe, ulp_mode); > > INP_WLOCK(inp); > synqe->flags |= TPF_SYNQE_HAS_L2TE; > @@ -1557,9 +1566,11 @@ reset: > toep->tid = tid; > toep->l2te = &sc->l2t->l2tab[synqe->l2e_idx]; > if (synqe->flags & TPF_SYNQE_TCPDDP) > - set_tcpddp_ulp_mode(toep); > + set_ulp_mode(toep, ULP_MODE_TCPDDP); > + else if (synqe->flags & TPF_SYNQE_TLS) > + set_ulp_mode(toep, ULP_MODE_TLS); > else > - toep->ulp_mode = ULP_MODE_NONE; > + set_ulp_mode(toep, ULP_MODE_NONE); > /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ > toep->rx_credits = synqe->rcv_bufsize; > > > Added: head/sys/dev/cxgbe/tom/t4_tls.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/cxgbe/tom/t4_tls.c Tue Mar 13 23:05:51 2018 > (r330884) @@ -0,0 +1,1642 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2017-2018 Chelsio Communications, Inc. > + * All rights reserved. > + * Written by: John Baldwin > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include "opt_inet.h" > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#ifdef TCP_OFFLOAD > +#include "common/common.h" > +#include "common/t4_tcb.h" > +#include "tom/t4_tom_l2t.h" > +#include "tom/t4_tom.h" > + > +/* > + * The TCP sequence number of a CPL_TLS_DATA mbuf is saved here while > + * the mbuf is in the ulp_pdu_reclaimq. > + */ > +#define tls_tcp_seq PH_loc.thirtytwo[0] > + > +/* > + * Handshake lock used for the handshake timer. Having a global lock > + * is perhaps not ideal, but it avoids having to use callout_drain() > + * in tls_uninit_toep() which can't block. Also, the timer shouldn't > + * actually fire for most connections. > + */ > +static struct mtx tls_handshake_lock; > + > +static void > +t4_set_tls_tcb_field(struct toepcb *toep, uint16_t word, uint64_t mask, > + uint64_t val) > +{ > + struct adapter *sc = td_adapter(toep->td); > + > + t4_set_tcb_field(sc, toep->ctrlq, toep->tid, word, mask, val, 0, 0, > + toep->ofld_rxq->iq.abs_id); > +} > + > +/* TLS and DTLS common routines */ > +int > +tls_tx_key(struct toepcb *toep) > +{ > + struct tls_ofld_info *tls_ofld = &toep->tls; > + > + return (tls_ofld->tx_key_addr >= 0); > +} > + > +int > +tls_rx_key(struct toepcb *toep) > +{ > + struct tls_ofld_info *tls_ofld = &toep->tls; > + > + return (tls_ofld->rx_key_addr >= 0); > +} > + > +static int > +key_size(struct toepcb *toep) > +{ > + struct tls_ofld_info *tls_ofld = &toep->tls; > + > + return ((tls_ofld->key_location == TLS_SFO_WR_CONTEXTLOC_IMMEDIATE) ? > + tls_ofld->k_ctx.tx_key_info_size : KEY_IN_DDR_SIZE); > +} > + > +/* Set TLS Key-Id in TCB */ > +static void > +t4_set_tls_keyid(struct toepcb *toep, unsigned int key_id) > +{ > + > + t4_set_tls_tcb_field(toep, W_TCB_RX_TLS_KEY_TAG, > + V_TCB_RX_TLS_KEY_TAG(M_TCB_RX_TLS_BUF_TAG), > + V_TCB_RX_TLS_KEY_TAG(key_id)); > +} > + > +/* Clear TF_RX_QUIESCE to re-enable receive. */ > +static void > +t4_clear_rx_quiesce(struct toepcb *toep) > +{ > + > + t4_set_tls_tcb_field(toep, W_TCB_T_FLAGS, V_TF_RX_QUIESCE(1), 0); > +} > + > +static void > +tls_clr_ofld_mode(struct toepcb *toep) > +{ > + > + tls_stop_handshake_timer(toep); > + > + /* Operate in PDU extraction mode only. */ > + t4_set_tls_tcb_field(toep, W_TCB_ULP_RAW, > + V_TCB_ULP_RAW(M_TCB_ULP_RAW), > + V_TCB_ULP_RAW(V_TF_TLS_ENABLE(1))); > + t4_clear_rx_quiesce(toep); > +} > + > +static void > +tls_clr_quiesce(struct toepcb *toep) > +{ > + > + tls_stop_handshake_timer(toep); > + t4_clear_rx_quiesce(toep); > +} > + > +/* > + * Calculate the TLS data expansion size > + */ > +static int > +tls_expansion_size(struct toepcb *toep, int data_len, int full_pdus_only, > + unsigned short *pdus_per_ulp) > +{ > + struct tls_ofld_info *tls_ofld = &toep->tls; > + struct tls_scmd *scmd = &tls_ofld->scmd0; > + int expn_size = 0, frag_count = 0, pad_per_pdu = 0, > + pad_last_pdu = 0, last_frag_size = 0, max_frag_size = 0; > + int exp_per_pdu = 0; > + int hdr_len = TLS_HEADER_LENGTH; > + > + do { > + max_frag_size = tls_ofld->k_ctx.frag_size; > + if (G_SCMD_CIPH_MODE(scmd->seqno_numivs) == > + SCMD_CIPH_MODE_AES_GCM) { > + frag_count = (data_len / max_frag_size); > + exp_per_pdu = GCM_TAG_SIZE + AEAD_EXPLICIT_DATA_SIZE > + > + hdr_len; > + expn_size = frag_count * exp_per_pdu; > + if (full_pdus_only) { > + *pdus_per_ulp = data_len / (exp_per_pdu + > + max_frag_size); > + if (*pdus_per_ulp > 32) > + *pdus_per_ulp = 32; > + else if(!*pdus_per_ulp) > + *pdus_per_ulp = 1; > + expn_size = (*pdus_per_ulp) * exp_per_pdu; > + break; > + } > + if ((last_frag_size = data_len % max_frag_size) > 0) > { > + frag_count += 1; > + expn_size += exp_per_pdu; > + } > + break; > + } else if (G_SCMD_CIPH_MODE(scmd->seqno_numivs) != > + SCMD_CIPH_MODE_NOP) { > + /* Calculate the number of fragments we can make */ > + frag_count = (data_len / max_frag_size); > + if (frag_count > 0) { > + pad_per_pdu = (((howmany((max_frag_size + > + tls_ofld->mac_length), > + CIPHER_BLOCK_SIZE)) * > + CIPHER_BLOCK_SIZE) - > + (max_frag_size + > + tls_ofld->mac_length)); > + if (!pad_per_pdu) > + pad_per_pdu = CIPHER_BLOCK_SIZE; > + exp_per_pdu = pad_per_pdu + > + tls_ofld->mac_length + > + hdr_len + CIPHER_BLOCK_SIZE; > + expn_size = frag_count * exp_per_pdu; > + } > + if (full_pdus_only) { > + *pdus_per_ulp = data_len / (exp_per_pdu + > + max_frag_size); > + if (*pdus_per_ulp > 32) > + *pdus_per_ulp = 32; > + else if (!*pdus_per_ulp) > + *pdus_per_ulp = 1; > + expn_size = (*pdus_per_ulp) * exp_per_pdu; > + break; > + } > + /* Consider the last fragment */ > + if ((last_frag_size = data_len % max_frag_size) > 0) > { > + pad_last_pdu = (((howmany((last_frag_size + > + > tls_ofld->mac_length), > + CIPHER_BLOCK_SIZE)) * > + CIPHER_BLOCK_SIZE) - > + (last_frag_size + > + tls_ofld->mac_length)); > + if (!pad_last_pdu) > + pad_last_pdu = CIPHER_BLOCK_SIZE; > + expn_size += (pad_last_pdu + > + tls_ofld->mac_length + hdr_len > + > + CIPHER_BLOCK_SIZE); > + } > + } > + } while (0); > + > + return (expn_size); > +} > + > +/* Copy Key to WR */ > +static void > +tls_copy_tx_key(struct toepcb *toep, void *dst) > +{ > + struct tls_ofld_info *tls_ofld = &toep->tls; > + struct ulptx_sc_memrd *sc_memrd; > + struct ulptx_idata *sc; > + > + if (tls_ofld->k_ctx.tx_key_info_size <= 0) > + return; > + > + if (tls_ofld->key_location == TLS_SFO_WR_CONTEXTLOC_DDR) { > + sc = dst; > + sc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_NOOP)); > + sc->len = htobe32(0); > + sc_memrd = (struct ulptx_sc_memrd *)(sc + 1); > + sc_memrd->cmd_to_len = htobe32(V_ULPTX_CMD(ULP_TX_SC_MEMRD) | > + V_ULP_TX_SC_MORE(1) | > + V_ULPTX_LEN16(tls_ofld->k_ctx.tx_key_info_size >> 4)); > + sc_memrd->addr = htobe32(tls_ofld->tx_key_addr >> 5); > + } else if (tls_ofld->key_location == > TLS_SFO_WR_CONTEXTLOC_IMMEDIATE) { > + memcpy(dst, &tls_ofld->k_ctx.tx, > + tls_ofld->k_ctx.tx_key_info_size); > + } > +} > + > +/* TLS/DTLS content type for CPL SFO */ > +static inline unsigned char > +tls_content_type(unsigned char content_type) > +{ > + /* > + * XXX: Shouldn't this map CONTENT_TYPE_APP_DATA to DATA and > + * default to "CUSTOM" for all other types including > + * heartbeat? > + */ > + switch (content_type) { > + case CONTENT_TYPE_CCS: > + return CPL_TX_TLS_SFO_TYPE_CCS; > + case CONTENT_TYPE_ALERT: > + return CPL_TX_TLS_SFO_TYPE_ALERT; > + case CONTENT_TYPE_HANDSHAKE: > + return CPL_TX_TLS_SFO_TYPE_HANDSHAKE; > + case CONTENT_TYPE_HEARTBEAT: > + return CPL_TX_TLS_SFO_TYPE_HEARTBEAT; > + } > + return CPL_TX_TLS_SFO_TYPE_DATA; > +} > + > +static unsigned char > +get_cipher_key_size(unsigned int ck_size) > +{ > + switch (ck_size) { > + case AES_NOP: /* NOP */ > + return 15; > + case AES_128: /* AES128 */ > + return CH_CK_SIZE_128; > + case AES_192: /* AES192 */ > + return CH_CK_SIZE_192; > + case AES_256: /* AES256 */ > + return CH_CK_SIZE_256; > + default: > + return CH_CK_SIZE_256; > + } > +} > + > +static unsigned char > +get_mac_key_size(unsigned int mk_size) > +{ > + switch (mk_size) { > + case SHA_NOP: /* NOP */ > + return CH_MK_SIZE_128; > + case SHA_GHASH: /* GHASH */ > + case SHA_512: /* SHA512 */ > + return CH_MK_SIZE_512; > + case SHA_224: /* SHA2-224 */ > + return CH_MK_SIZE_192; > + case SHA_256: /* SHA2-256*/ > + return CH_MK_SIZE_256; > + case SHA_384: /* SHA384 */ > + return CH_MK_SIZE_512; > + case SHA1: /* SHA1 */ > + default: > + return CH_MK_SIZE_160; > + } > +} > + > +static unsigned int > +get_proto_ver(int proto_ver) > +{ > + switch (proto_ver) { > + case TLS1_2_VERSION: > + return TLS_1_2_VERSION; > + case TLS1_1_VERSION: > + return TLS_1_1_VERSION; > + case DTLS1_2_VERSION: > + return DTLS_1_2_VERSION; > + default: > + return TLS_VERSION_MAX; > + } > +} > + > +static void > +tls_rxkey_flit1(struct tls_keyctx *kwr, struct tls_key_context *kctx) > +{ > + > + if (kctx->state.enc_mode == CH_EVP_CIPH_GCM_MODE) { > + kwr->u.rxhdr.ivinsert_to_authinsrt = > + htobe64(V_TLS_KEYCTX_TX_WR_IVINSERT(6ULL) | > + V_TLS_KEYCTX_TX_WR_AADSTRTOFST(1ULL) | > + V_TLS_KEYCTX_TX_WR_AADSTOPOFST(5ULL) | > + V_TLS_KEYCTX_TX_WR_AUTHSRTOFST(14ULL) | > + V_TLS_KEYCTX_TX_WR_AUTHSTOPOFST(16ULL) | > + V_TLS_KEYCTX_TX_WR_CIPHERSRTOFST(14ULL) | > + V_TLS_KEYCTX_TX_WR_CIPHERSTOPOFST(0ULL) | > + V_TLS_KEYCTX_TX_WR_AUTHINSRT(16ULL)); > + kwr->u.rxhdr.ivpresent_to_rxmk_size &= > + ~(V_TLS_KEYCTX_TX_WR_RXOPAD_PRESENT(1)); > + kwr->u.rxhdr.authmode_to_rxvalid &= > + ~(V_TLS_KEYCTX_TX_WR_CIPHAUTHSEQCTRL(1)); > + } else { > + kwr->u.rxhdr.ivinsert_to_authinsrt = > + htobe64(V_TLS_KEYCTX_TX_WR_IVINSERT(6ULL) | > + V_TLS_KEYCTX_TX_WR_AADSTRTOFST(1ULL) | > + V_TLS_KEYCTX_TX_WR_AADSTOPOFST(5ULL) | > + V_TLS_KEYCTX_TX_WR_AUTHSRTOFST(22ULL) | > + V_TLS_KEYCTX_TX_WR_AUTHSTOPOFST(0ULL) | > + V_TLS_KEYCTX_TX_WR_CIPHERSRTOFST(22ULL) | > + V_TLS_KEYCTX_TX_WR_CIPHERSTOPOFST(0ULL) | > + V_TLS_KEYCTX_TX_WR_AUTHINSRT(0ULL)); > + } > +} > + > +/* Rx key */ > +static void > +prepare_rxkey_wr(struct tls_keyctx *kwr, struct tls_key_context *kctx) > +{ > + unsigned int ck_size = kctx->cipher_secret_size; > + unsigned int mk_size = kctx->mac_secret_size; > + int proto_ver = kctx->proto_ver; > + > + kwr->u.rxhdr.flitcnt_hmacctrl = > + ((kctx->tx_key_info_size >> 4) << 3) | kctx->hmac_ctrl; > + > + kwr->u.rxhdr.protover_ciphmode = > + V_TLS_KEYCTX_TX_WR_PROTOVER(get_proto_ver(proto_ver)) | > + V_TLS_KEYCTX_TX_WR_CIPHMODE(kctx->state.enc_mode); > + > + kwr->u.rxhdr.authmode_to_rxvalid = > + V_TLS_KEYCTX_TX_WR_AUTHMODE(kctx->state.auth_mode) | > + V_TLS_KEYCTX_TX_WR_CIPHAUTHSEQCTRL(1) | > + V_TLS_KEYCTX_TX_WR_SEQNUMCTRL(3) | > + V_TLS_KEYCTX_TX_WR_RXVALID(1); > + > + kwr->u.rxhdr.ivpresent_to_rxmk_size = > + V_TLS_KEYCTX_TX_WR_IVPRESENT(0) | > + V_TLS_KEYCTX_TX_WR_RXOPAD_PRESENT(1) | > + V_TLS_KEYCTX_TX_WR_RXCK_SIZE(get_cipher_key_size(ck_size)) | > + V_TLS_KEYCTX_TX_WR_RXMK_SIZE(get_mac_key_size(mk_size)); > + > + tls_rxkey_flit1(kwr, kctx); > + > + /* No key reversal for GCM */ > + if (kctx->state.enc_mode != CH_EVP_CIPH_GCM_MODE) { > + t4_aes_getdeckey(kwr->keys.edkey, kctx->rx.key, > + (kctx->cipher_secret_size << 3)); > + memcpy(kwr->keys.edkey + kctx->cipher_secret_size, > + kctx->rx.key + kctx->cipher_secret_size, > + (IPAD_SIZE + OPAD_SIZE)); > + } else { > + memcpy(kwr->keys.edkey, kctx->rx.key, > + (kctx->tx_key_info_size - SALT_SIZE)); > + memcpy(kwr->u.rxhdr.rxsalt, kctx->rx.salt, SALT_SIZE); > + } > +} > + > +/* Tx key */ > +static void > +prepare_txkey_wr(struct tls_keyctx *kwr, struct tls_key_context *kctx) > +{ > + unsigned int ck_size = kctx->cipher_secret_size; > + unsigned int mk_size = kctx->mac_secret_size; > + > + kwr->u.txhdr.ctxlen = > + (kctx->tx_key_info_size >> 4); > + kwr->u.txhdr.dualck_to_txvalid = > + V_TLS_KEYCTX_TX_WR_TXOPAD_PRESENT(1) | > + V_TLS_KEYCTX_TX_WR_SALT_PRESENT(1) | > + V_TLS_KEYCTX_TX_WR_TXCK_SIZE(get_cipher_key_size(ck_size)) | > + V_TLS_KEYCTX_TX_WR_TXMK_SIZE(get_mac_key_size(mk_size)) | > + V_TLS_KEYCTX_TX_WR_TXVALID(1); > + > + memcpy(kwr->keys.edkey, kctx->tx.key, HDR_KCTX_SIZE); > + if (kctx->state.enc_mode == CH_EVP_CIPH_GCM_MODE) { > + memcpy(kwr->u.txhdr.txsalt, kctx->tx.salt, SALT_SIZE); > + kwr->u.txhdr.dualck_to_txvalid &= > + ~(V_TLS_KEYCTX_TX_WR_TXOPAD_PRESENT(1)); > + } > + kwr->u.txhdr.dualck_to_txvalid = > htons(kwr->u.txhdr.dualck_to_txvalid); +} > + > +/* TLS Key memory management */ > +int > +tls_init_kmap(struct adapter *sc, struct tom_data *td) > +{ > + > + td->key_map = vmem_create("T4TLS key map", sc->vres.key.start, > + sc->vres.key.size, 8, 0, M_FIRSTFIT | M_NOWAIT); > + if (td->key_map == NULL) > + return (ENOMEM); > + return (0); > +} > + > +void > +tls_free_kmap(struct tom_data *td) > +{ > + > + if (td->key_map != NULL) > + vmem_destroy(td->key_map); > +} > + > +static int > +get_new_keyid(struct toepcb *toep, struct tls_key_context *k_ctx) > +{ > + struct tom_data *td = toep->td; > + vmem_addr_t addr; > + > + if (vmem_alloc(td->key_map, TLS_KEY_CONTEXT_SZ, M_NOWAIT | > M_FIRSTFIT, > + &addr) != 0) > + return (-1); > + > + return (addr); > +} > + > +static void > +free_keyid(struct toepcb *toep, int keyid) > +{ > + struct tom_data *td = toep->td; > + > + vmem_free(td->key_map, keyid, TLS_KEY_CONTEXT_SZ); > +} > + > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > 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" Building a kernel fails on CURRENT revision 330908 with the follwoing error: [...] ===> gpio/gpioiic (all) --- all_subdir_cxgbe --- --- cm.o --- In file included from /usr/src/sys/dev/cxgbe/iw_cxgbe/cm.c:68: /usr/src/sys/dev/cxgbe/tom/t4_tom.h:327:28: error: use of undeclared identifier 'ULP_MODE_TLS' return (toep->ulp_mode == ULP_MODE_TLS); ^ /usr/src/sys/dev/cxgbe/tom/t4_tom.h:333:12: error: incomplete definition of type 'struct adapter' return (sc->tt.tls && sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS); ~~^ /usr/src/sys/dev/cxgbe/offload.h:139:8: note: forward declaration of 'struct adapter' struct adapter; Kind regards, oh From owner-svn-src-all@freebsd.org Wed Mar 14 06:36:54 2018 Return-Path: Delivered-To: svn-src-all@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 035BDF59466; Wed, 14 Mar 2018 06:36:54 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (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 51C476F62B; Wed, 14 Mar 2018 06:36:53 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from freyja.zeit4.iv.bundesimmobilien.de ([87.138.105.249]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M9K5G-1emhAq3lle-00CmKn; Wed, 14 Mar 2018 07:36:51 +0100 Date: Wed, 14 Mar 2018 07:36:49 +0100 From: "O. Hartmann" To: "O. Hartmann" Cc: John Baldwin , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r330884 - in head/sys: dev/cxgbe dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/tom Message-ID: <20180314073649.654776b3@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <20180314062510.0e575da4@freyja.zeit4.iv.bundesimmobilien.de> References: <201803132305.w2DN5pnc010768@repo.freebsd.org> <20180314062510.0e575da4@freyja.zeit4.iv.bundesimmobilien.de> Organization: Walstatt MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:dvoAxol4Tgm4n2tEq2Ed6m8TXpecddPQOX7hVsV9RYpG1Tmu47n noEn1iz2Hchy2mBXBSsnSJtyjlHpJ0DWDX4I+X7QG38rQ1NcdJTvwZ6hri4aX9XWhwWcSSt sHwaAmjZzlvw7LJNQRRK0HS/exCa4MiHCgZEGV1q/w8KrfUQrxGzkFmsX8A9J3gpjTaD3gL rH/RwRnOW8fIjIW0hHs8A== X-UI-Out-Filterresults: notjunk:1;V01:K0:0pdMtaXHbRA=:+OIh65ORIhsCr3vS/Y4YNl LmV/S/6y6dgt4RV5R5vPHXHS/9y/KMeoXipmlYe/CkxZqGp6p5DOWXL8D6myxU5r/AsJVOOBM 0velQlFoGVHt7PjlwMyszHreTo2CMIRnkGZcPys+93rfzyy/QQcNbYl+tt7OvEwa09ouji9Xa CEG37v4/a6soF1Z9j9felblicAlvsSSYb8VXYbZG3kT+HdDSAuqqcVbrXu0GzxUTLoJsjMZTf 3tBgNTL5K4mPURV3jxHgRdkzQk2ZJdZILszE1WK4Y4+uEx4qMICbLeFd0WE49N4XxdTYpxvJA 3QfI4n4vFlJFdvhoSXDdDA40PNZKBbaUk46wLsM5la8W8AfJ0cqQzKH+YWh7BSq2Ehd4fLqbA Bx3Eq4N2qr2826OCAbzR+BfByxDSoLH+o9Rb8pGD6k8v0AZ+wL597+pziMR+oXt3dsq8cxLVB kmjwQI4fNubPO/mhgkkh4ViBrTWmhIoGBubAsvSYqydr8en4BneFxezyUjqt9g5C7ikLJaYN0 f3VjOB2Xbun6rYQFhinc86b7atNYLt/1yN2QoGSRK2RhWLLhbbztCJVZnays0AO+mUmVOLz4D 7S6wxZHqkpqIfk1VIYpasd8VrC93XR5JiykxgVHOABjpQvKcOtjR/T5Ozfq3blRfD6zMiN2Ui 2bf08OFKceEiXIntSi5B4R2UI5VfJRo6KaKuvpz3qXtuvhIrQixbwJ8XYkDfs6eY1iHf4643Y 6cfnyVF7NiT3ctV+xR0+7DfygjFoM6pZ9Q6NTxegjDFXKcBnm6Wzp0N78lcf9ElxccjRRf+ol FkBtHX/iyl7aU693g+BHalIIdPhVFbK+UBZRD1lTTGRlyKJVZM= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 06:36:54 -0000 On Wed, 14 Mar 2018 06:25:10 +0100 "O. Hartmann" wrote: > On Tue, 13 Mar 2018 23:05:51 +0000 (UTC) > John Baldwin wrote: > > > Author: jhb > > Date: Tue Mar 13 23:05:51 2018 > > New Revision: 330884 > > URL: https://svnweb.freebsd.org/changeset/base/330884 > > > > Log: > > Support for TLS offload of TOE connections on T6 adapters. > > > > The TOE engine in Chelsio T6 adapters supports offloading of TLS > > encryption and TCP segmentation for offloaded connections. Sockets > > using TLS are required to use a set of custom socket options to upload > > RX and TX keys to the NIC and to enable RX processing. Currently > > these socket options are implemented as TCP options in the vendor > > specific range. A patched OpenSSL library will be made available in a > > port / package for use with the TLS TOE support. > > > > TOE sockets can either offload both transmit and reception of TLS > > records or just transmit. TLS offload (both RX and TX) is enabled by > > setting the dev.t6nex..tls sysctl to 1 and requires TOE to be > > enabled on the relevant interface. Transmit offload can be used on > > any "normal" or TLS TOE socket by using the custom socket option to > > program a transmit key. This permits most TOE sockets to > > transparently offload TLS when applications use a patched SSL library > > (e.g. using LD_LIBRARY_PATH to request use of a patched OpenSSL > > library). Receive offload can only be used with TOE sockets using the > > TLS mode. The dev.t6nex.0.toe.tls_rx_ports sysctl can be set to a > > list of TCP port numbers. Any connection with either a local or > > remote port number in that list will be created as a TLS socket rather > > than a plain TOE socket. Note that although this sysctl accepts an > > arbitrary list of port numbers, the sysctl(8) tool is only able to set > > sysctl nodes to a single value. A TLS socket will hang without > > receiving data if used by an application that is not using a patched > > SSL library. Thus, the tls_rx_ports node should be used with care. > > For a server mostly concerned with offloading TLS transmit, this node > > is not needed as plain TOE sockets will fall back to software crypto > > when using an unpatched SSL library. > > > > New per-interface statistics nodes are added giving counts of TLS > > packets and payload bytes (payload bytes do not include TLS headers or > > authentication tags/MACs) offloaded via the TOE engine, e.g.: > > > > dev.cc.0.stats.rx_tls_octets: 149 > > dev.cc.0.stats.rx_tls_records: 13 > > dev.cc.0.stats.tx_tls_octets: 26501823 > > dev.cc.0.stats.tx_tls_records: 1620 > > > > TLS transmit work requests are constructed by a new variant of > > t4_push_frames() called t4_push_tls_records() in tom/t4_tls.c. > > > > TLS transmit work requests require a buffer containing IVs. If the > > IVs are too large to fit into the work request, a separate buffer is > > allocated when constructing a work request. This buffer is associated > > with the transmit descriptor and freed when the descriptor is ACKed by > > the adapter. > > > > Received TLS frames use two new CPL messages. The first message is a > > CPL_TLS_DATA containing the decryped payload of a single TLS record. > > The handler places the mbuf containing the received payload on an > > mbufq in the TOE pcb. The second message is a CPL_RX_TLS_CMP message > > which includes a copy of the TLS header and indicates if there were > > any errors. The handler for this message places the TLS header into > > the socket buffer followed by the saved mbuf with the payload data. > > Both of these handlers are contained in tom/t4_tls.c. > > > > A few routines were exposed from t4_cpl_io.c for use by t4_tls.c > > including send_rx_credits(), a new send_rx_modulate(), and > > t4_close_conn(). > > > > TLS keys for both transmit and receive are stored in onboard memory > > in the NIC in the "TLS keys" memory region. > > > > In some cases a TLS socket can hang with pending data available in the > > NIC that is not delivered to the host. As a workaround, TLS sockets > > are more aggressive about sending CPL_RX_DATA_ACK messages anytime that > > any data is read from a TLS socket. In addition, a fallback timer will > > periodically send CPL_RX_DATA_ACK messages to the NIC for connections > > that are still in the handshake phase. Once the connection has > > finished the handshake and programmed RX keys via the socket option, > > the timer is stopped. > > > > A new function select_ulp_mode() is used to determine what sub-mode a > > given TOE socket should use (plain TOE, DDP, or TLS). The existing > > set_tcpddp_ulp_mode() function has been renamed to set_ulp_mode() and > > handles initialization of TLS-specific state when necessary in > > addition to DDP-specific state. > > > > Since TLS sockets do not receive individual TCP segments but always > > receive full TLS records, they can receive more data than is available > > in the current window (e.g. if a 16k TLS record is received but the > > socket buffer is itself 16k). To cope with this, just drop the window > > to 0 when this happens, but track the overage and "eat" the overage as > > it is read from the socket buffer not opening the window (or adding > > rx_credits) for the overage bytes. > > > > Reviewed by: np (earlier version) > > Sponsored by: Chelsio Communications > > Differential Revision: https://reviews.freebsd.org/D14529 > > > > Added: > > head/sys/dev/cxgbe/tom/t4_tls.c (contents, props changed) > > head/sys/dev/cxgbe/tom/t4_tls.h (contents, props changed) > > Modified: > > head/sys/dev/cxgbe/adapter.h > > head/sys/dev/cxgbe/firmware/t6fw_cfg.txt > > head/sys/dev/cxgbe/offload.h > > head/sys/dev/cxgbe/t4_main.c > > head/sys/dev/cxgbe/tom/t4_connect.c > > head/sys/dev/cxgbe/tom/t4_cpl_io.c > > head/sys/dev/cxgbe/tom/t4_listen.c > > head/sys/dev/cxgbe/tom/t4_tom.c > > head/sys/dev/cxgbe/tom/t4_tom.h > > head/sys/modules/cxgbe/tom/Makefile > > > > Modified: head/sys/dev/cxgbe/adapter.h > > ============================================================================== > > --- head/sys/dev/cxgbe/adapter.h Tue Mar 13 22:54:29 2018 > > (r330883) +++ head/sys/dev/cxgbe/adapter.h Tue Mar 13 23:05:51 > > 2018 (r330884) @@ -297,6 +297,10 @@ struct port_info { > > struct port_stats stats; > > u_int tnl_cong_drops; > > u_int tx_parse_error; > > + u_long tx_tls_records; > > + u_long tx_tls_octets; > > + u_long rx_tls_records; > > + u_long rx_tls_octets; > > > > struct callout tick; > > }; > > > > Modified: head/sys/dev/cxgbe/firmware/t6fw_cfg.txt > > ============================================================================== > > --- head/sys/dev/cxgbe/firmware/t6fw_cfg.txt Tue Mar 13 22:54:29 > > 2018 (r330883) +++ head/sys/dev/cxgbe/firmware/t6fw_cfg.txt > > Tue Mar 13 23:05:51 2018 (r330884) @@ -163,10 +163,12 @@ > > nserver = 512 > > nhpfilter = 0 > > nhash = 16384 > > - protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, > > iscsi_target_pdu, iscsi_t10dif, crypto_lookaside > > + protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, > > iscsi_target_pdu, iscsi_t10dif, tlskeys, crypto_lookaside tp_l2t = 4096 > > tp_ddp = 2 > > tp_ddp_iscsi = 2 > > + tp_tls_key = 3 > > + tp_tls_mxrxsize = 17408 # 16384 + 1024, governs max rx data, pm > > max xfer len, rx coalesce sizes tp_stag = 2 > > tp_pbl = 5 > > tp_rq = 7 > > @@ -273,7 +275,7 @@ > > > > [fini] > > version = 0x1 > > - checksum = 0x7191019f > > + checksum = 0x9e8952d2 > > # > > # $FreeBSD$ > > # > > > > Modified: head/sys/dev/cxgbe/offload.h > > ============================================================================== > > --- head/sys/dev/cxgbe/offload.h Tue Mar 13 22:54:29 2018 > > (r330883) +++ head/sys/dev/cxgbe/offload.h Tue Mar 13 23:05:51 > > 2018 (r330884) @@ -151,6 +151,9 @@ struct tom_tunables { > > int sndbuf; > > int ddp; > > int rx_coalesce; > > + int tls; > > + int *tls_rx_ports; > > + int num_tls_rx_ports; > > int tx_align; > > int tx_zcopy; > > }; > > > > Modified: head/sys/dev/cxgbe/t4_main.c > > ============================================================================== > > --- head/sys/dev/cxgbe/t4_main.c Tue Mar 13 22:54:29 2018 > > (r330883) +++ head/sys/dev/cxgbe/t4_main.c Tue Mar 13 23:05:51 > > 2018 (r330884) @@ -591,6 +591,7 @@ static int > > sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); static int > > sysctl_tc_params(SYSCTL_HANDLER_ARGS); #endif > > #ifdef TCP_OFFLOAD > > +static int sysctl_tls_rx_ports(SYSCTL_HANDLER_ARGS); > > static int sysctl_tp_tick(SYSCTL_HANDLER_ARGS); > > static int sysctl_tp_dack_timer(SYSCTL_HANDLER_ARGS); > > static int sysctl_tp_timer(SYSCTL_HANDLER_ARGS); > > @@ -1390,6 +1391,7 @@ t4_detach_common(device_t dev) > > free(sc->sge.iqmap, M_CXGBE); > > free(sc->sge.eqmap, M_CXGBE); > > free(sc->tids.ftid_tab, M_CXGBE); > > + free(sc->tt.tls_rx_ports, M_CXGBE); > > t4_destroy_dma_tag(sc); > > if (mtx_initialized(&sc->sc_lock)) { > > sx_xlock(&t4_list_lock); > > @@ -5433,6 +5435,14 @@ t4_sysctls(struct adapter *sc) > > SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_coalesce", > > CTLFLAG_RW, &sc->tt.rx_coalesce, 0, "receive > > coalescing"); > > + sc->tt.tls = 0; > > + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tls", CTLFLAG_RW, > > + &sc->tt.tls, 0, "Inline TLS allowed"); > > + > > + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tls_rx_ports", > > + CTLTYPE_INT | CTLFLAG_RW, sc, 0, sysctl_tls_rx_ports, > > + "I", "TCP ports that use inline TLS+TOE RX"); > > + > > sc->tt.tx_align = 1; > > SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_align", > > CTLFLAG_RW, &sc->tt.tx_align, 0, "chop and align > > payload"); @@ -5836,6 +5846,19 @@ cxgbe_sysctls(struct port_info *pi) > > "# of buffer-group 3 truncated packets"); > > > > #undef SYSCTL_ADD_T4_PORTSTAT > > + > > + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_records", > > + CTLFLAG_RD, &pi->tx_tls_records, > > + "# of TLS records transmitted"); > > + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_octets", > > + CTLFLAG_RD, &pi->tx_tls_octets, > > + "# of payload octets in transmitted TLS records"); > > + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_records", > > + CTLFLAG_RD, &pi->rx_tls_records, > > + "# of TLS records received"); > > + SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_octets", > > + CTLFLAG_RD, &pi->rx_tls_octets, > > + "# of payload octets in received TLS records"); > > } > > > > static int > > @@ -8257,6 +8280,68 @@ done: > > #endif > > > > #ifdef TCP_OFFLOAD > > +static int > > +sysctl_tls_rx_ports(SYSCTL_HANDLER_ARGS) > > +{ > > + struct adapter *sc = arg1; > > + int *old_ports, *new_ports; > > + int i, new_count, rc; > > + > > + if (req->newptr == NULL && req->oldptr == NULL) > > + return (SYSCTL_OUT(req, NULL, imax(sc->tt.num_tls_rx_ports, > > 1) * > > + sizeof(sc->tt.tls_rx_ports[0]))); > > + > > + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, > > "t4tlsrx"); > > + if (rc) > > + return (rc); > > + > > + if (sc->tt.num_tls_rx_ports == 0) { > > + i = -1; > > + rc = SYSCTL_OUT(req, &i, sizeof(i)); > > + } else > > + rc = SYSCTL_OUT(req, sc->tt.tls_rx_ports, > > + sc->tt.num_tls_rx_ports * > > sizeof(sc->tt.tls_rx_ports[0])); > > + if (rc == 0 && req->newptr != NULL) { > > + new_count = req->newlen / sizeof(new_ports[0]); > > + new_ports = malloc(new_count * sizeof(new_ports[0]), > > M_CXGBE, > > + M_WAITOK); > > + rc = SYSCTL_IN(req, new_ports, new_count * > > + sizeof(new_ports[0])); > > + if (rc) > > + goto err; > > + > > + /* Allow setting to a single '-1' to clear the list. */ > > + if (new_count == 1 && new_ports[0] == -1) { > > + ADAPTER_LOCK(sc); > > + old_ports = sc->tt.tls_rx_ports; > > + sc->tt.tls_rx_ports = NULL; > > + sc->tt.num_tls_rx_ports = 0; > > + ADAPTER_UNLOCK(sc); > > + free(old_ports, M_CXGBE); > > + } else { > > + for (i = 0; i < new_count; i++) { > > + if (new_ports[i] < 1 || > > + new_ports[i] > IPPORT_MAX) { > > + rc = EINVAL; > > + goto err; > > + } > > + } > > + > > + ADAPTER_LOCK(sc); > > + old_ports = sc->tt.tls_rx_ports; > > + sc->tt.tls_rx_ports = new_ports; > > + sc->tt.num_tls_rx_ports = new_count; > > + ADAPTER_UNLOCK(sc); > > + free(old_ports, M_CXGBE); > > + new_ports = NULL; > > + } > > + err: > > + free(new_ports, M_CXGBE); > > + } > > + end_synchronized_op(sc, 0); > > + return (rc); > > +} > > + > > static void > > unit_conv(char *buf, size_t len, u_int val, u_int factor) > > { > > > > Modified: head/sys/dev/cxgbe/tom/t4_connect.c > > ============================================================================== > > --- head/sys/dev/cxgbe/tom/t4_connect.c Tue Mar 13 22:54:29 > > 2018 (r330883) +++ head/sys/dev/cxgbe/tom/t4_connect.c Tue Mar > > 13 23:05:51 2018 (r330884) @@ -142,6 +142,10 @@ > > do_act_establish(struct sge_iq *iq, const struct rss_h } > > > > make_established(toep, cpl->snd_isn, cpl->rcv_isn, cpl->tcp_opt); > > + > > + if (toep->ulp_mode == ULP_MODE_TLS) > > + tls_establish(toep); > > + > > done: > > INP_WUNLOCK(inp); > > CURVNET_RESTORE(); > > @@ -268,6 +272,11 @@ calc_opt2a(struct socket *so, struct toepcb *toep) > > if (toep->ulp_mode == ULP_MODE_TCPDDP) > > opt2 |= F_RX_FC_VALID | F_RX_FC_DDP; > > #endif > > + if (toep->ulp_mode == ULP_MODE_TLS) { > > + opt2 |= F_RX_FC_VALID; > > + opt2 &= ~V_RX_COALESCE(M_RX_COALESCE); > > + opt2 |= F_RX_FC_DISABLE; > > + } > > > > return (htobe32(opt2)); > > } > > @@ -378,10 +387,7 @@ t4_connect(struct toedev *tod, struct socket *so, stru > > DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); > > > > toep->vnet = so->so_vnet; > > - if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0) > > - set_tcpddp_ulp_mode(toep); > > - else > > - toep->ulp_mode = ULP_MODE_NONE; > > + set_ulp_mode(toep, select_ulp_mode(so, sc)); > > SOCKBUF_LOCK(&so->so_rcv); > > /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ > > toep->rx_credits = min(select_rcv_wnd(so) >> 10, M_RCV_BUFSIZ); > > > > Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c > > ============================================================================== > > --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Mar 13 22:54:29 2018 > > (r330883) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Mar 13 23:05:51 > > 2018 (r330884) @@ -73,9 +73,6 @@ __FBSDID("$FreeBSD$"); > > #include "tom/t4_tom_l2t.h" > > #include "tom/t4_tom.h" > > > > -#define > > IS_AIOTX_MBUF(m) \ > > - ((m)->m_flags & M_EXT && (m)->m_ext.ext_flags & EXT_FLAG_AIOTX) > > - > > static void t4_aiotx_cancel(struct kaiocb *job); > > static void t4_aiotx_queue_toep(struct toepcb *toep); > > > > @@ -106,7 +103,7 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par > > { > > struct wrqe *wr; > > struct fw_flowc_wr *flowc; > > - unsigned int nparams = ftxp ? 8 : 6, flowclen; > > + unsigned int nparams, flowclen, paramidx; > > struct vi_info *vi = toep->vi; > > struct port_info *pi = vi->pi; > > struct adapter *sc = pi->adapter; > > @@ -116,6 +113,15 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par > > KASSERT(!(toep->flags & TPF_FLOWC_WR_SENT), > > ("%s: flowc for tid %u sent already", __func__, toep->tid)); > > > > + if (ftxp != NULL) > > + nparams = 8; > > + else > > + nparams = 6; > > + if (toep->ulp_mode == ULP_MODE_TLS) > > + nparams++; > > + if (toep->tls.fcplenmax != 0) > > + nparams++; > > + > > flowclen = sizeof(*flowc) + nparams * sizeof(struct > > fw_flowc_mnemval); > > wr = alloc_wrqe(roundup2(flowclen, 16), toep->ofld_txq); > > @@ -131,39 +137,45 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_par > > flowc->flowid_len16 = htonl(V_FW_WR_LEN16(howmany(flowclen, 16)) | > > V_FW_WR_FLOWID(toep->tid)); > > > > - flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN; > > - flowc->mnemval[0].val = htobe32(pfvf); > > - flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; > > - flowc->mnemval[1].val = htobe32(pi->tx_chan); > > - flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; > > - flowc->mnemval[2].val = htobe32(pi->tx_chan); > > - flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; > > - flowc->mnemval[3].val = htobe32(toep->ofld_rxq->iq.abs_id); > > +#define FLOWC_PARAM(__m, __v) \ > > + do { \ > > + flowc->mnemval[paramidx].mnemonic = FW_FLOWC_MNEM_##__m; \ > > + flowc->mnemval[paramidx].val = htobe32(__v); \ > > + paramidx++; \ > > + } while (0) > > + > > + paramidx = 0; > > + > > + FLOWC_PARAM(PFNVFN, pfvf); > > + FLOWC_PARAM(CH, pi->tx_chan); > > + FLOWC_PARAM(PORT, pi->tx_chan); > > + FLOWC_PARAM(IQID, toep->ofld_rxq->iq.abs_id); > > if (ftxp) { > > uint32_t sndbuf = min(ftxp->snd_space, sc->tt.sndbuf); > > > > - flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDNXT; > > - flowc->mnemval[4].val = htobe32(ftxp->snd_nxt); > > - flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_RCVNXT; > > - flowc->mnemval[5].val = htobe32(ftxp->rcv_nxt); > > - flowc->mnemval[6].mnemonic = FW_FLOWC_MNEM_SNDBUF; > > - flowc->mnemval[6].val = htobe32(sndbuf); > > - flowc->mnemval[7].mnemonic = FW_FLOWC_MNEM_MSS; > > - flowc->mnemval[7].val = htobe32(ftxp->mss); > > + FLOWC_PARAM(SNDNXT, ftxp->snd_nxt); > > + FLOWC_PARAM(RCVNXT, ftxp->rcv_nxt); > > + FLOWC_PARAM(SNDBUF, sndbuf); > > + FLOWC_PARAM(MSS, ftxp->mss); > > > > CTR6(KTR_CXGBE, > > "%s: tid %u, mss %u, sndbuf %u, snd_nxt 0x%x, rcv_nxt > > 0x%x", __func__, toep->tid, ftxp->mss, sndbuf, ftxp->snd_nxt, > > ftxp->rcv_nxt); > > } else { > > - flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF; > > - flowc->mnemval[4].val = htobe32(512); > > - flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS; > > - flowc->mnemval[5].val = htobe32(512); > > + FLOWC_PARAM(SNDBUF, 512); > > + FLOWC_PARAM(MSS, 512); > > > > CTR2(KTR_CXGBE, "%s: tid %u", __func__, toep->tid); > > } > > + if (toep->ulp_mode == ULP_MODE_TLS) > > + FLOWC_PARAM(ULP_MODE, toep->ulp_mode); > > + if (toep->tls.fcplenmax != 0) > > + FLOWC_PARAM(TXDATAPLEN_MAX, toep->tls.fcplenmax); > > +#undef FLOWC_PARAM > > > > + KASSERT(paramidx == nparams, ("nparams mismatch")); > > + > > txsd->tx_credits = howmany(flowclen, 16); > > txsd->plen = 0; > > KASSERT(toep->tx_credits >= txsd->tx_credits && toep->txsd_avail > > > 0, @@ -421,7 +433,7 @@ make_established(struct toepcb *toep, uint32_t > > snd_isn soisconnected(so); > > } > > > > -static int > > +int > > send_rx_credits(struct adapter *sc, struct toepcb *toep, int credits) > > { > > struct wrqe *wr; > > @@ -443,6 +455,23 @@ send_rx_credits(struct adapter *sc, struct toepcb *toe > > } > > > > void > > +send_rx_modulate(struct adapter *sc, struct toepcb *toep) > > +{ > > + struct wrqe *wr; > > + struct cpl_rx_data_ack *req; > > + > > + wr = alloc_wrqe(sizeof(*req), toep->ctrlq); > > + if (wr == NULL) > > + return; > > + req = wrtod(wr); > > + > > + INIT_TP_WR_MIT_CPL(req, CPL_RX_DATA_ACK, toep->tid); > > + req->credit_dack = htobe32(F_RX_MODULATE_RX); > > + > > + t4_wrq_tx(sc, wr); > > +} > > + > > +void > > t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) > > { > > struct adapter *sc = tod->tod_softc; > > @@ -459,8 +488,18 @@ t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) > > ("%s: sb %p has more data (%d) than last time (%d).", > > __func__, sb, sbused(sb), toep->sb_cc)); > > > > - toep->rx_credits += toep->sb_cc - sbused(sb); > > + credits = toep->sb_cc - sbused(sb); > > toep->sb_cc = sbused(sb); > > + if (toep->ulp_mode == ULP_MODE_TLS) { > > + if (toep->tls.rcv_over >= credits) { > > + toep->tls.rcv_over -= credits; > > + credits = 0; > > + } else { > > + credits -= toep->tls.rcv_over; > > + toep->tls.rcv_over = 0; > > + } > > + } > > + toep->rx_credits += credits; > > > > if (toep->rx_credits > 0 && > > (tp->rcv_wnd <= 32 * 1024 || toep->rx_credits >= 64 * 1024 || > > @@ -471,7 +510,8 @@ t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp) > > toep->rx_credits -= credits; > > tp->rcv_wnd += credits; > > tp->rcv_adv += credits; > > - } > > + } else if (toep->flags & TPF_FORCE_CREDITS) > > + send_rx_modulate(sc, toep); > > } > > > > void > > @@ -489,8 +529,8 @@ t4_rcvd(struct toedev *tod, struct tcpcb *tp) > > /* > > * Close a connection by sending a CPL_CLOSE_CON_REQ message. > > */ > > -static int > > -close_conn(struct adapter *sc, struct toepcb *toep) > > +int > > +t4_close_conn(struct adapter *sc, struct toepcb *toep) > > { > > struct wrqe *wr; > > struct cpl_close_con_req *req; > > @@ -691,6 +731,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep > > > > KASSERT(toep->ulp_mode == ULP_MODE_NONE || > > toep->ulp_mode == ULP_MODE_TCPDDP || > > + toep->ulp_mode == ULP_MODE_TLS || > > toep->ulp_mode == ULP_MODE_RDMA, > > ("%s: ulp_mode %u for toep %p", __func__, toep->ulp_mode, > > toep)); > > @@ -905,7 +946,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep > > > > /* Send a FIN if requested, but only if there's no more data to > > send */ if (m == NULL && toep->flags & TPF_SEND_FIN) > > - close_conn(sc, toep); > > + t4_close_conn(sc, toep); > > } > > > > static inline void > > @@ -1097,7 +1138,7 @@ t4_push_pdus(struct adapter *sc, struct toepcb *toep, > > > > /* Send a FIN if requested, but only if there are no more PDUs to > > send */ if (mbufq_first(pduq) == NULL && toep->flags & TPF_SEND_FIN) > > - close_conn(sc, toep); > > + t4_close_conn(sc, toep); > > } > > > > int > > @@ -1116,6 +1157,8 @@ t4_tod_output(struct toedev *tod, struct tcpcb *tp) > > > > if (toep->ulp_mode == ULP_MODE_ISCSI) > > t4_push_pdus(sc, toep, 0); > > + else if (tls_tx_key(toep)) > > + t4_push_tls_records(sc, toep, 0); > > else > > t4_push_frames(sc, toep, 0); > > > > @@ -1140,6 +1183,8 @@ t4_send_fin(struct toedev *tod, struct tcpcb *tp) > > if (tp->t_state >= TCPS_ESTABLISHED) { > > if (toep->ulp_mode == ULP_MODE_ISCSI) > > t4_push_pdus(sc, toep, 0); > > + else if (tls_tx_key(toep)) > > + t4_push_tls_records(sc, toep, 0); > > else > > t4_push_frames(sc, toep, 0); > > } > > @@ -1772,6 +1817,10 @@ do_fw4_ack(struct sge_iq *iq, const struct > > rss_header credits -= txsd->tx_credits; > > toep->tx_credits += txsd->tx_credits; > > plen += txsd->plen; > > + if (txsd->iv_buffer) { > > + free(txsd->iv_buffer, M_CXGBE); > > + txsd->iv_buffer = NULL; > > + } > > txsd++; > > toep->txsd_avail++; > > KASSERT(toep->txsd_avail <= toep->txsd_total, > > @@ -1797,6 +1846,8 @@ do_fw4_ack(struct sge_iq *iq, const struct rss_header > > CURVNET_SET(toep->vnet); > > if (toep->ulp_mode == ULP_MODE_ISCSI) > > t4_push_pdus(sc, toep, plen); > > + else if (tls_tx_key(toep)) > > + t4_push_tls_records(sc, toep, plen); > > else > > t4_push_frames(sc, toep, plen); > > CURVNET_RESTORE(); > > @@ -1826,6 +1877,12 @@ do_fw4_ack(struct sge_iq *iq, const struct > > rss_header tid, plen); > > #endif > > sbdrop_locked(sb, plen); > > + if (tls_tx_key(toep)) { > > + struct tls_ofld_info *tls_ofld = > > &toep->tls; + > > + MPASS(tls_ofld->sb_off >= plen); > > + tls_ofld->sb_off -= plen; > > + } > > if (!TAILQ_EMPTY(&toep->aiotx_jobq)) > > t4_aiotx_queue_toep(toep); > > sowwakeup_locked(so); /* unlocks so_snd */ > > @@ -2298,6 +2355,9 @@ t4_aio_queue_aiotx(struct socket *so, struct kaiocb *j > > return (EOPNOTSUPP); > > > > if (!sc->tt.tx_zcopy) > > + return (EOPNOTSUPP); > > + > > + if (is_tls_offload(toep) || tls_tx_key(toep)) > > return (EOPNOTSUPP); > > > > SOCKBUF_LOCK(&so->so_snd); > > > > Modified: head/sys/dev/cxgbe/tom/t4_listen.c > > ============================================================================== > > --- head/sys/dev/cxgbe/tom/t4_listen.c Tue Mar 13 22:54:29 2018 > > (r330883) +++ head/sys/dev/cxgbe/tom/t4_listen.c Tue Mar 13 23:05:51 > > 2018 (r330884) @@ -1056,6 +1056,11 @@ calc_opt2p(struct adapter *sc, > > struct port_info *pi, i if (ulp_mode == ULP_MODE_TCPDDP) > > opt2 |= F_RX_FC_VALID | F_RX_FC_DDP; > > #endif > > + if (ulp_mode == ULP_MODE_TLS) { > > + opt2 |= F_RX_FC_VALID; > > + opt2 &= ~V_RX_COALESCE(M_RX_COALESCE); > > + opt2 |= F_RX_FC_DISABLE; > > + } > > > > return htobe32(opt2); > > } > > @@ -1347,11 +1352,15 @@ found: > > > > INIT_TP_WR_MIT_CPL(rpl5, CPL_PASS_ACCEPT_RPL, tid); > > } > > - if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0) { > > - ulp_mode = ULP_MODE_TCPDDP; > > + ulp_mode = select_ulp_mode(so, sc); > > + switch (ulp_mode) { > > + case ULP_MODE_TCPDDP: > > synqe->flags |= TPF_SYNQE_TCPDDP; > > - } else > > - ulp_mode = ULP_MODE_NONE; > > + break; > > + case ULP_MODE_TLS: > > + synqe->flags |= TPF_SYNQE_TLS; > > + break; > > + } > > rpl->opt0 = calc_opt0(so, vi, e, mtu_idx, rscale, rx_credits, > > ulp_mode); rpl->opt2 = calc_opt2p(sc, pi, rxqid, &cpl->tcpopt, &th, > > ulp_mode); > > @@ -1407,8 +1416,8 @@ found: > > REJECT_PASS_ACCEPT(); > > } > > > > - CTR5(KTR_CXGBE, "%s: stid %u, tid %u, lctx %p, synqe %p, SYNACK", > > - __func__, stid, tid, lctx, synqe); > > + CTR6(KTR_CXGBE, "%s: stid %u, tid %u, lctx %p, synqe %p, SYNACK > > mode %d", > > + __func__, stid, tid, lctx, synqe, ulp_mode); > > > > INP_WLOCK(inp); > > synqe->flags |= TPF_SYNQE_HAS_L2TE; > > @@ -1557,9 +1566,11 @@ reset: > > toep->tid = tid; > > toep->l2te = &sc->l2t->l2tab[synqe->l2e_idx]; > > if (synqe->flags & TPF_SYNQE_TCPDDP) > > - set_tcpddp_ulp_mode(toep); > > + set_ulp_mode(toep, ULP_MODE_TCPDDP); > > + else if (synqe->flags & TPF_SYNQE_TLS) > > + set_ulp_mode(toep, ULP_MODE_TLS); > > else > > - toep->ulp_mode = ULP_MODE_NONE; > > + set_ulp_mode(toep, ULP_MODE_NONE); > > /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ > > toep->rx_credits = synqe->rcv_bufsize; > > > > > > Added: head/sys/dev/cxgbe/tom/t4_tls.c > > ============================================================================== > > --- /dev/null 00:00:00 1970 (empty, because file is newly > > added) +++ head/sys/dev/cxgbe/tom/t4_tls.c Tue Mar 13 23:05:51 2018 > > (r330884) @@ -0,0 +1,1642 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > > + * > > + * Copyright (c) 2017-2018 Chelsio Communications, Inc. > > + * All rights reserved. > > + * Written by: John Baldwin > > + * > > + * Redistribution and use in source and binary forms, with or without > > + * modification, are permitted provided that the following conditions > > + * are met: > > + * 1. Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * 2. Redistributions in binary form must reproduce the above copyright > > + * notice, this list of conditions and the following disclaimer in the > > + * documentation and/or other materials provided with the distribution. > > + * > > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > > PURPOSE > > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > > CONSEQUENTIAL > > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > > STRICT > > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY > > WAY > > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > > + * SUCH DAMAGE. > > + */ > > + > > +#include "opt_inet.h" > > + > > +#include > > +__FBSDID("$FreeBSD$"); > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#ifdef TCP_OFFLOAD > > +#include "common/common.h" > > +#include "common/t4_tcb.h" > > +#include "tom/t4_tom_l2t.h" > > +#include "tom/t4_tom.h" > > + > > +/* > > + * The TCP sequence number of a CPL_TLS_DATA mbuf is saved here while > > + * the mbuf is in the ulp_pdu_reclaimq. > > + */ > > +#define tls_tcp_seq PH_loc.thirtytwo[0] > > + > > +/* > > + * Handshake lock used for the handshake timer. Having a global lock > > + * is perhaps not ideal, but it avoids having to use callout_drain() > > + * in tls_uninit_toep() which can't block. Also, the timer shouldn't > > + * actually fire for most connections. > > + */ > > +static struct mtx tls_handshake_lock; > > + > > +static void > > +t4_set_tls_tcb_field(struct toepcb *toep, uint16_t word, uint64_t mask, > > + uint64_t val) > > +{ > > + struct adapter *sc = td_adapter(toep->td); > > + > > + t4_set_tcb_field(sc, toep->ctrlq, toep->tid, word, mask, val, 0, 0, > > + toep->ofld_rxq->iq.abs_id); > > +} > > + > > +/* TLS and DTLS common routines */ > > +int > > +tls_tx_key(struct toepcb *toep) > > +{ > > + struct tls_ofld_info *tls_ofld = &toep->tls; > > + > > + return (tls_ofld->tx_key_addr >= 0); > > +} > > + > > +int > > +tls_rx_key(struct toepcb *toep) > > +{ > > + struct tls_ofld_info *tls_ofld = &toep->tls; > > + > > + return (tls_ofld->rx_key_addr >= 0); > > +} > > + > > +static int > > +key_size(struct toepcb *toep) > > +{ > > + struct tls_ofld_info *tls_ofld = &toep->tls; > > + > > + return ((tls_ofld->key_location == > > TLS_SFO_WR_CONTEXTLOC_IMMEDIATE) ? > > + tls_ofld->k_ctx.tx_key_info_size : KEY_IN_DDR_SIZE); > > +} > > + > > +/* Set TLS Key-Id in TCB */ > > +static void > > +t4_set_tls_keyid(struct toepcb *toep, unsigned int key_id) > > +{ > > + > > + t4_set_tls_tcb_field(toep, W_TCB_RX_TLS_KEY_TAG, > > + V_TCB_RX_TLS_KEY_TAG(M_TCB_RX_TLS_BUF_TAG), > > + V_TCB_RX_TLS_KEY_TAG(key_id)); > > +} > > + > > +/* Clear TF_RX_QUIESCE to re-enable receive. */ > > +static void > > +t4_clear_rx_quiesce(struct toepcb *toep) > > +{ > > + > > + t4_set_tls_tcb_field(toep, W_TCB_T_FLAGS, V_TF_RX_QUIESCE(1), 0); > > +} > > + > > +static void > > +tls_clr_ofld_mode(struct toepcb *toep) > > +{ > > + > > + tls_stop_handshake_timer(toep); > > + > > + /* Operate in PDU extraction mode only. */ > > + t4_set_tls_tcb_field(toep, W_TCB_ULP_RAW, > > + V_TCB_ULP_RAW(M_TCB_ULP_RAW), > > + V_TCB_ULP_RAW(V_TF_TLS_ENABLE(1))); > > + t4_clear_rx_quiesce(toep); > > +} > > + > > +static void > > +tls_clr_quiesce(struct toepcb *toep) > > +{ > > + > > + tls_stop_handshake_timer(toep); > > + t4_clear_rx_quiesce(toep); > > +} > > + > > +/* > > + * Calculate the TLS data expansion size > > + */ > > +static int > > +tls_expansion_size(struct toepcb *toep, int data_len, int full_pdus_only, > > + unsigned short *pdus_per_ulp) > > +{ > > + struct tls_ofld_info *tls_ofld = &toep->tls; > > + struct tls_scmd *scmd = &tls_ofld->scmd0; > > + int expn_size = 0, frag_count = 0, pad_per_pdu = 0, > > + pad_last_pdu = 0, last_frag_size = 0, max_frag_size = 0; > > + int exp_per_pdu = 0; > > + int hdr_len = TLS_HEADER_LENGTH; > > + > > + do { > > + max_frag_size = tls_ofld->k_ctx.frag_size; > > + if (G_SCMD_CIPH_MODE(scmd->seqno_numivs) == > > + SCMD_CIPH_MODE_AES_GCM) { > > + frag_count = (data_len / max_frag_size); > > + exp_per_pdu = GCM_TAG_SIZE + > > AEAD_EXPLICIT_DATA_SIZE + > > + hdr_len; > > + expn_size = frag_count * exp_per_pdu; > > + if (full_pdus_only) { > > + *pdus_per_ulp = data_len / (exp_per_pdu + > > + max_frag_size); > > + if (*pdus_per_ulp > 32) > > + *pdus_per_ulp = 32; > > + else if(!*pdus_per_ulp) > > + *pdus_per_ulp = 1; > > + expn_size = (*pdus_per_ulp) * exp_per_pdu; > > + break; > > + } > > + if ((last_frag_size = data_len % max_frag_size) > > > 0) { > > + frag_count += 1; > > + expn_size += exp_per_pdu; > > + } > > + break; > > + } else if (G_SCMD_CIPH_MODE(scmd->seqno_numivs) != > > + SCMD_CIPH_MODE_NOP) { > > + /* Calculate the number of fragments we can make */ > > + frag_count = (data_len / max_frag_size); > > + if (frag_count > 0) { > > + pad_per_pdu = (((howmany((max_frag_size + > > + > > tls_ofld->mac_length), > > + CIPHER_BLOCK_SIZE)) * > > + CIPHER_BLOCK_SIZE) - > > + (max_frag_size + > > + tls_ofld->mac_length)); > > + if (!pad_per_pdu) > > + pad_per_pdu = CIPHER_BLOCK_SIZE; > > + exp_per_pdu = pad_per_pdu + > > + tls_ofld->mac_length + > > + hdr_len + CIPHER_BLOCK_SIZE; > > + expn_size = frag_count * exp_per_pdu; > > + } > > + if (full_pdus_only) { > > + *pdus_per_ulp = data_len / (exp_per_pdu + > > + max_frag_size); > > + if (*pdus_per_ulp > 32) > > + *pdus_per_ulp = 32; > > + else if (!*pdus_per_ulp) > > + *pdus_per_ulp = 1; > > + expn_size = (*pdus_per_ulp) * exp_per_pdu; > > + break; > > + } > > + /* Consider the last fragment */ > > + if ((last_frag_size = data_len % max_frag_size) > > > 0) { > > + pad_last_pdu = (((howmany((last_frag_size + > > + > > tls_ofld->mac_length), > > + CIPHER_BLOCK_SIZE)) > > * > > + CIPHER_BLOCK_SIZE) - > > + (last_frag_size + > > + tls_ofld->mac_length)); > > + if (!pad_last_pdu) > > + pad_last_pdu = CIPHER_BLOCK_SIZE; > > + expn_size += (pad_last_pdu + > > + tls_ofld->mac_length + > > hdr_len + > > + CIPHER_BLOCK_SIZE); > > + } > > + } > > + } while (0); > > + > > + return (expn_size); > > +} > > + > > +/* Copy Key to WR */ > > +static void > > +tls_copy_tx_key(struct toepcb *toep, void *dst) > > +{ > > + struct tls_ofld_info *tls_ofld = &toep->tls; > > + struct ulptx_sc_memrd *sc_memrd; > > + struct ulptx_idata *sc; > > + > > + if (tls_ofld->k_ctx.tx_key_info_size <= 0) > > + return; > > + > > + if (tls_ofld->key_location == TLS_SFO_WR_CONTEXTLOC_DDR) { > > + sc = dst; > > + sc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_NOOP)); > > + sc->len = htobe32(0); > > + sc_memrd = (struct ulptx_sc_memrd *)(sc + 1); > > + sc_memrd->cmd_to_len = > > htobe32(V_ULPTX_CMD(ULP_TX_SC_MEMRD) | > > + V_ULP_TX_SC_MORE(1) | > > + V_ULPTX_LEN16(tls_ofld->k_ctx.tx_key_info_size >> 4)); > > + sc_memrd->addr = htobe32(tls_ofld->tx_key_addr >> 5); > > + } else if (tls_ofld->key_location == > > TLS_SFO_WR_CONTEXTLOC_IMMEDIATE) { > > + memcpy(dst, &tls_ofld->k_ctx.tx, > > + tls_ofld->k_ctx.tx_key_info_size); > > + } > > +} > > + > > +/* TLS/DTLS content type for CPL SFO */ > > +static inline unsigned char > > +tls_content_type(unsigned char content_type) > > +{ > > + /* > > + * XXX: Shouldn't this map CONTENT_TYPE_APP_DATA to DATA and > > + * default to "CUSTOM" for all other types including > > + * heartbeat? > > + */ > > + switch (content_type) { > > + case CONTENT_TYPE_CCS: > > + return CPL_TX_TLS_SFO_TYPE_CCS; > > + case CONTENT_TYPE_ALERT: > > + return CPL_TX_TLS_SFO_TYPE_ALERT; > > + case CONTENT_TYPE_HANDSHAKE: > > + return CPL_TX_TLS_SFO_TYPE_HANDSHAKE; > > + case CONTENT_TYPE_HEARTBEAT: > > + return CPL_TX_TLS_SFO_TYPE_HEARTBEAT; > > + } > > + return CPL_TX_TLS_SFO_TYPE_DATA; > > +} > > + > > +static unsigned char > > +get_cipher_key_size(unsigned int ck_size) > > +{ > > + switch (ck_size) { > > + case AES_NOP: /* NOP */ > > + return 15; > > + case AES_128: /* AES128 */ > > + return CH_CK_SIZE_128; > > + case AES_192: /* AES192 */ > > + return CH_CK_SIZE_192; > > + case AES_256: /* AES256 */ > > + return CH_CK_SIZE_256; > > + default: > > + return CH_CK_SIZE_256; > > + } > > +} > > + > > +static unsigned char > > +get_mac_key_size(unsigned int mk_size) > > +{ > > + switch (mk_size) { > > + case SHA_NOP: /* NOP */ > > + return CH_MK_SIZE_128; > > + case SHA_GHASH: /* GHASH */ > > + case SHA_512: /* SHA512 */ > > + return CH_MK_SIZE_512; > > + case SHA_224: /* SHA2-224 */ > > + return CH_MK_SIZE_192; > > + case SHA_256: /* SHA2-256*/ > > + return CH_MK_SIZE_256; > > + case SHA_384: /* SHA384 */ > > + return CH_MK_SIZE_512; > > + case SHA1: /* SHA1 */ > > + default: > > + return CH_MK_SIZE_160; > > + } > > +} > > + > > +static unsigned int > > +get_proto_ver(int proto_ver) > > +{ > > + switch (proto_ver) { > > + case TLS1_2_VERSION: > > + return TLS_1_2_VERSION; > > + case TLS1_1_VERSION: > > + return TLS_1_1_VERSION; > > + case DTLS1_2_VERSION: > > + return DTLS_1_2_VERSION; > > + default: > > + return TLS_VERSION_MAX; > > + } > > +} > > + > > +static void > > +tls_rxkey_flit1(struct tls_keyctx *kwr, struct tls_key_context *kctx) > > +{ > > + > > + if (kctx->state.enc_mode == CH_EVP_CIPH_GCM_MODE) { > > + kwr->u.rxhdr.ivinsert_to_authinsrt = > > + htobe64(V_TLS_KEYCTX_TX_WR_IVINSERT(6ULL) | > > + V_TLS_KEYCTX_TX_WR_AADSTRTOFST(1ULL) | > > + V_TLS_KEYCTX_TX_WR_AADSTOPOFST(5ULL) | > > + V_TLS_KEYCTX_TX_WR_AUTHSRTOFST(14ULL) | > > + V_TLS_KEYCTX_TX_WR_AUTHSTOPOFST(16ULL) | > > + V_TLS_KEYCTX_TX_WR_CIPHERSRTOFST(14ULL) | > > + V_TLS_KEYCTX_TX_WR_CIPHERSTOPOFST(0ULL) | > > + V_TLS_KEYCTX_TX_WR_AUTHINSRT(16ULL)); > > + kwr->u.rxhdr.ivpresent_to_rxmk_size &= > > + ~(V_TLS_KEYCTX_TX_WR_RXOPAD_PRESENT(1)); > > + kwr->u.rxhdr.authmode_to_rxvalid &= > > + ~(V_TLS_KEYCTX_TX_WR_CIPHAUTHSEQCTRL(1)); > > + } else { > > + kwr->u.rxhdr.ivinsert_to_authinsrt = > > + htobe64(V_TLS_KEYCTX_TX_WR_IVINSERT(6ULL) | > > + V_TLS_KEYCTX_TX_WR_AADSTRTOFST(1ULL) | > > + V_TLS_KEYCTX_TX_WR_AADSTOPOFST(5ULL) | > > + V_TLS_KEYCTX_TX_WR_AUTHSRTOFST(22ULL) | > > + V_TLS_KEYCTX_TX_WR_AUTHSTOPOFST(0ULL) | > > + V_TLS_KEYCTX_TX_WR_CIPHERSRTOFST(22ULL) | > > + V_TLS_KEYCTX_TX_WR_CIPHERSTOPOFST(0ULL) | > > + V_TLS_KEYCTX_TX_WR_AUTHINSRT(0ULL)); > > + } > > +} > > + > > +/* Rx key */ > > +static void > > +prepare_rxkey_wr(struct tls_keyctx *kwr, struct tls_key_context *kctx) > > +{ > > + unsigned int ck_size = kctx->cipher_secret_size; > > + unsigned int mk_size = kctx->mac_secret_size; > > + int proto_ver = kctx->proto_ver; > > + > > + kwr->u.rxhdr.flitcnt_hmacctrl = > > + ((kctx->tx_key_info_size >> 4) << 3) | kctx->hmac_ctrl; > > + > > + kwr->u.rxhdr.protover_ciphmode = > > + V_TLS_KEYCTX_TX_WR_PROTOVER(get_proto_ver(proto_ver)) | > > + V_TLS_KEYCTX_TX_WR_CIPHMODE(kctx->state.enc_mode); > > + > > + kwr->u.rxhdr.authmode_to_rxvalid = > > + V_TLS_KEYCTX_TX_WR_AUTHMODE(kctx->state.auth_mode) | > > + V_TLS_KEYCTX_TX_WR_CIPHAUTHSEQCTRL(1) | > > + V_TLS_KEYCTX_TX_WR_SEQNUMCTRL(3) | > > + V_TLS_KEYCTX_TX_WR_RXVALID(1); > > + > > + kwr->u.rxhdr.ivpresent_to_rxmk_size = > > + V_TLS_KEYCTX_TX_WR_IVPRESENT(0) | > > + V_TLS_KEYCTX_TX_WR_RXOPAD_PRESENT(1) | > > + V_TLS_KEYCTX_TX_WR_RXCK_SIZE(get_cipher_key_size(ck_size)) > > | > > + V_TLS_KEYCTX_TX_WR_RXMK_SIZE(get_mac_key_size(mk_size)); > > + > > + tls_rxkey_flit1(kwr, kctx); > > + > > + /* No key reversal for GCM */ > > + if (kctx->state.enc_mode != CH_EVP_CIPH_GCM_MODE) { > > + t4_aes_getdeckey(kwr->keys.edkey, kctx->rx.key, > > + (kctx->cipher_secret_size << 3)); > > + memcpy(kwr->keys.edkey + kctx->cipher_secret_size, > > + kctx->rx.key + kctx->cipher_secret_size, > > + (IPAD_SIZE + OPAD_SIZE)); > > + } else { > > + memcpy(kwr->keys.edkey, kctx->rx.key, > > + (kctx->tx_key_info_size - SALT_SIZE)); > > + memcpy(kwr->u.rxhdr.rxsalt, kctx->rx.salt, SALT_SIZE); > > + } > > +} > > + > > +/* Tx key */ > > +static void > > +prepare_txkey_wr(struct tls_keyctx *kwr, struct tls_key_context *kctx) > > +{ > > + unsigned int ck_size = kctx->cipher_secret_size; > > + unsigned int mk_size = kctx->mac_secret_size; > > + > > + kwr->u.txhdr.ctxlen = > > + (kctx->tx_key_info_size >> 4); > > + kwr->u.txhdr.dualck_to_txvalid = > > + V_TLS_KEYCTX_TX_WR_TXOPAD_PRESENT(1) | > > + V_TLS_KEYCTX_TX_WR_SALT_PRESENT(1) | > > + V_TLS_KEYCTX_TX_WR_TXCK_SIZE(get_cipher_key_size(ck_size)) > > | > > + V_TLS_KEYCTX_TX_WR_TXMK_SIZE(get_mac_key_size(mk_size)) | > > + V_TLS_KEYCTX_TX_WR_TXVALID(1); > > + > > + memcpy(kwr->keys.edkey, kctx->tx.key, HDR_KCTX_SIZE); > > + if (kctx->state.enc_mode == CH_EVP_CIPH_GCM_MODE) { > > + memcpy(kwr->u.txhdr.txsalt, kctx->tx.salt, SALT_SIZE); > > + kwr->u.txhdr.dualck_to_txvalid &= > > + ~(V_TLS_KEYCTX_TX_WR_TXOPAD_PRESENT(1)); > > + } > > + kwr->u.txhdr.dualck_to_txvalid = > > htons(kwr->u.txhdr.dualck_to_txvalid); +} > > + > > +/* TLS Key memory management */ > > +int > > +tls_init_kmap(struct adapter *sc, struct tom_data *td) > > +{ > > + > > + td->key_map = vmem_create("T4TLS key map", sc->vres.key.start, > > + sc->vres.key.size, 8, 0, M_FIRSTFIT | M_NOWAIT); > > + if (td->key_map == NULL) > > + return (ENOMEM); > > + return (0); > > +} > > + > > +void > > +tls_free_kmap(struct tom_data *td) > > +{ > > + > > + if (td->key_map != NULL) > > + vmem_destroy(td->key_map); > > +} > > + > > +static int > > +get_new_keyid(struct toepcb *toep, struct tls_key_context *k_ctx) > > +{ > > + struct tom_data *td = toep->td; > > + vmem_addr_t addr; > > + > > + if (vmem_alloc(td->key_map, TLS_KEY_CONTEXT_SZ, M_NOWAIT | > > M_FIRSTFIT, > > + &addr) != 0) > > + return (-1); > > + > > + return (addr); > > +} > > + > > +static void > > +free_keyid(struct toepcb *toep, int keyid) > > +{ > > + struct tom_data *td = toep->td; > > + > > + vmem_free(td->key_map, keyid, TLS_KEY_CONTEXT_SZ); > > +} > > + > > > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > > _______________________________________________ > > 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" > > Building a kernel fails on CURRENT revision 330908 with the follwoing error: > > [...] > ===> gpio/gpioiic (all) > --- all_subdir_cxgbe --- > --- cm.o --- > In file included from /usr/src/sys/dev/cxgbe/iw_cxgbe/cm.c:68: > /usr/src/sys/dev/cxgbe/tom/t4_tom.h:327:28: error: use of undeclared > identifier 'ULP_MODE_TLS' return (toep->ulp_mode == ULP_MODE_TLS); > ^ > /usr/src/sys/dev/cxgbe/tom/t4_tom.h:333:12: error: incomplete definition of > type 'struct adapter' return (sc->tt.tls && sc->cryptocaps & > FW_CAPS_CONFIG_TLSKEYS); ~~^ > /usr/src/sys/dev/cxgbe/offload.h:139:8: note: forward declaration of 'struct > adapter' struct adapter; > > > > Kind regards, > > oh problem occurs when WITH_OFED=YES is set in /etc/src.conf. From owner-svn-src-all@freebsd.org Wed Mar 14 07:08:02 2018 Return-Path: Delivered-To: svn-src-all@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 BF4D7F5A9E2; Wed, 14 Mar 2018 07:08:02 +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 74C4C70CB4; Wed, 14 Mar 2018 07:08:02 +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 6F35924BEB; Wed, 14 Mar 2018 07:08:02 +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 w2E782cB052157; Wed, 14 Mar 2018 07:08:02 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E782ej052156; Wed, 14 Mar 2018 07:08:02 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140708.w2E782ej052156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 07:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330909 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330909 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 07:08:03 -0000 Author: eadler Date: Wed Mar 14 07:08:02 2018 New Revision: 330909 URL: https://svnweb.freebsd.org/changeset/base/330909 Log: MFC r305010: Add screen locking calls to sc cn grab and ungrab. The locking functions just use the same mutex locking as sc cn putc so they have the same defects. The locking calls to acquire the lock are actually in sc cn open and close. Ungrab has to unlock, although this opens a race window. Change the direct mutex lock calls in sc cn putc to the new locking functions via the open and close functions. Putc also has to unlock, but doesn't keep the screen open like grab. Screen open and close reduce to locking, except screen open for grab also attempts to switch the screen. Keyboard locking is more difficult and still null, even when keyboard input calls screen functions, except some of the functions have locks too deep to work right. This organization gives a single place to fix some of the locking. Modified: stable/11/sys/dev/syscons/syscons.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 04:00:00 2018 (r330908) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:08:02 2018 (r330909) @@ -1651,8 +1651,22 @@ sc_cnterm(struct consdev *cp) static void sccnclose(sc_softc_t *sc, struct sc_cnstate *sp); static void sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int flags); +static void sccnscrlock(sc_softc_t *sc, struct sc_cnstate *sp); +static void sccnscrunlock(sc_softc_t *sc, struct sc_cnstate *sp); static void +sccnscrlock(sc_softc_t *sc, struct sc_cnstate *sp) +{ + SC_VIDEO_LOCK(sc); +} + +static void +sccnscrunlock(sc_softc_t *sc, struct sc_cnstate *sp) +{ + SC_VIDEO_UNLOCK(sc); +} + +static void sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int flags) { int kbd_mode; @@ -1682,6 +1696,7 @@ sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int fl over_keyboard: ; /* The screen is opened iff locking it succeeds. */ + sccnscrlock(sc, sp); sp->scr_opened = TRUE; /* The screen switch is optional. */ @@ -1700,6 +1715,7 @@ static void sccnclose(sc_softc_t *sc, struct sc_cnstate *sp) { sp->scr_opened = FALSE; + sccnscrunlock(sc, sp); if (!sp->kbd_opened) return; @@ -1733,8 +1749,10 @@ sc_cngrab(struct consdev *cp) sc = sc_console->sc; lev = atomic_fetchadd_int(&sc->grab_level, 1); - if (lev >= 0 && lev < 2) + if (lev >= 0 && lev < 2) { sccnopen(sc, &sc->grab_state[lev], 1 | 2); + sccnscrunlock(sc, &sc->grab_state[lev]); + } } static void @@ -1745,14 +1763,17 @@ sc_cnungrab(struct consdev *cp) sc = sc_console->sc; lev = atomic_load_acq_int(&sc->grab_level) - 1; - if (lev >= 0 && lev < 2) + if (lev >= 0 && lev < 2) { + sccnscrlock(sc, &sc->grab_state[lev]); sccnclose(sc, &sc->grab_state[lev]); + } atomic_add_int(&sc->grab_level, -1); } static void sc_cnputc(struct consdev *cd, int c) { + struct sc_cnstate st; u_char buf[1]; scr_stat *scp = sc_console; #ifndef SC_NO_HISTORY @@ -1764,7 +1785,7 @@ sc_cnputc(struct consdev *cd, int c) /* assert(sc_console != NULL) */ - SC_VIDEO_LOCK(scp->sc); + sccnopen(scp->sc, &st, 0); #ifndef SC_NO_HISTORY if (scp == scp->sc->cur_scp && scp->status & SLKED) { @@ -1799,7 +1820,7 @@ sc_cnputc(struct consdev *cd, int c) s = spltty(); /* block sckbdevent and scrn_timer */ sccnupdate(scp); splx(s); - SC_VIDEO_UNLOCK(scp->sc); + sccnclose(scp->sc, &st); } static int From owner-svn-src-all@freebsd.org Wed Mar 14 07:08:46 2018 Return-Path: Delivered-To: svn-src-all@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 C8398F5AA91; Wed, 14 Mar 2018 07:08:46 +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 79A6B70E0E; Wed, 14 Mar 2018 07:08:46 +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 747D824BEC; Wed, 14 Mar 2018 07:08:46 +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 w2E78kH3052221; Wed, 14 Mar 2018 07:08:46 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E78ksI052220; Wed, 14 Mar 2018 07:08:46 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140708.w2E78ksI052220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 07:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330910 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 07:08:47 -0000 Author: eadler Date: Wed Mar 14 07:08:46 2018 New Revision: 330910 URL: https://svnweb.freebsd.org/changeset/base/330910 Log: MFC r305059: Start adding locking to sc_cngetc(). Restore an splx() lost in r228644. We aren't nearly ready to remove spl's. They give hints about missing locking. This lost one was misplaced. Dropping it early for convenience gave race windows for accesses to the fkey buffer. Giant locking accidentally fixed this for non-console cases. Put the spl's around the whole function. Since there are many returns that would need splx() just before them for a direct fix, split the function into a wrapper that does the spl's and a "locked" function that does the work. Return earlier when no keyboard is attached to match the ordering in a planned version. This breaks the dubious feature of returning keys from the fkey buffer after the keyboard has gone away. Losing the keys wouldn't matter, but we keep them too long now. Modified: stable/11/sys/dev/syscons/syscons.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:08:02 2018 (r330909) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:08:46 2018 (r330910) @@ -1650,6 +1650,7 @@ sc_cnterm(struct consdev *cp) } static void sccnclose(sc_softc_t *sc, struct sc_cnstate *sp); +static int sc_cngetc_locked(struct sc_cnstate *sp); static void sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int flags); static void sccnscrlock(sc_softc_t *sc, struct sc_cnstate *sp); static void sccnscrunlock(sc_softc_t *sc, struct sc_cnstate *sp); @@ -1826,15 +1827,28 @@ sc_cnputc(struct consdev *cd, int c) static int sc_cngetc(struct consdev *cd) { + int c, s; + + /* assert(sc_console != NULL) */ + s = spltty(); /* block sckbdevent and scrn_timer while we poll */ + if (sc_console->sc->kbd == NULL) { + splx(s); + return -1; + } + c = sc_cngetc_locked(NULL); + splx(s); + return c; +} + +static int +sc_cngetc_locked(struct sc_cnstate *sp) +{ static struct fkeytab fkey; static int fkeycp; scr_stat *scp; const u_char *p; - int s = spltty(); /* block sckbdevent and scrn_timer while we poll */ int c; - /* assert(sc_console != NULL) */ - /* * Stop the screen saver and update the screen if necessary. * What if we have been running in the screen saver code... XXX @@ -1843,15 +1857,8 @@ sc_cngetc(struct consdev *cd) scp = sc_console->sc->cur_scp; /* XXX */ sccnupdate(scp); - if (fkeycp < fkey.len) { - splx(s); + if (fkeycp < fkey.len) return fkey.str[fkeycp++]; - } - - if (scp->sc->kbd == NULL) { - splx(s); - return -1; - } c = scgetc(scp->sc, SCGETC_CN | SCGETC_NONBLOCK, NULL); From owner-svn-src-all@freebsd.org Wed Mar 14 07:11:34 2018 Return-Path: Delivered-To: svn-src-all@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 69748F5AE72; Wed, 14 Mar 2018 07:11: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 17A46711FA; Wed, 14 Mar 2018 07:11: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 EC75C24D2D; Wed, 14 Mar 2018 07:11:33 +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 w2E7BXDU055371; Wed, 14 Mar 2018 07:11:33 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E7BXYO055370; Wed, 14 Mar 2018 07:11:33 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140711.w2E7BXYO055370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 07:11:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330911 - stable/11/sys/dev/kbdmux X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/kbdmux X-SVN-Commit-Revision: 330911 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 07:11:34 -0000 Author: eadler Date: Wed Mar 14 07:11:33 2018 New Revision: 330911 URL: https://svnweb.freebsd.org/changeset/base/330911 Log: MFC r305060: Fix keyboard polling "on/off" to support recursion. vt depends on this, and sc will soon depend on it again. The on/off request is passed without modification to lower layers, so the bug was smaller in this layer than in in lower layers (the sequence on;on;off left polling off when it should be on, but the sequence on;on;off;on;off... doesn't allow the interrupt handler to eat the input after an "off" that should't turn off polled mode, provided lower layers don't have the bug, since this layer is virtual. The bug was small in lower layers too. Normally everything is Giant locked for keyboards, and this locks out the interrupt handler in on;on;off;on;off... sequences. However, PR 211884 says that fixing this bug in ukbd in r303765 apparently causes the eating-by-interrupt behaviour that the fix is to prevent. Modified: stable/11/sys/dev/kbdmux/kbdmux.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/kbdmux/kbdmux.c ============================================================================== --- stable/11/sys/dev/kbdmux/kbdmux.c Wed Mar 14 07:08:46 2018 (r330910) +++ stable/11/sys/dev/kbdmux/kbdmux.c Wed Mar 14 07:11:33 2018 (r330911) @@ -158,9 +158,9 @@ struct kbdmux_state int ks_flags; /* flags */ #define COMPOSE (1 << 0) /* compose char flag */ -#define POLLING (1 << 1) /* polling */ #define TASK (1 << 2) /* interrupt task queued */ + int ks_polling; /* poll nesting count */ int ks_mode; /* K_XLATE, K_RAW, K_CODE */ int ks_state; /* state */ int ks_accents; /* accent key index (> 0) */ @@ -717,7 +717,7 @@ next_code: /* see if there is something in the keyboard queue */ scancode = kbdmux_kbd_getc(state); if (scancode == -1) { - if (state->ks_flags & POLLING) { + if (state->ks_polling != 0) { kbdmux_kbd_t *k; SLIST_FOREACH(k, &state->ks_kbds, next) { @@ -1317,7 +1317,8 @@ kbdmux_clear_state_locked(kbdmux_state_t *state) { KBDMUX_LOCK_ASSERT(state, MA_OWNED); - state->ks_flags &= ~(COMPOSE|POLLING); + state->ks_flags &= ~COMPOSE; + state->ks_polling = 0; state->ks_state &= LOCK_MASK; /* preserve locking key state */ state->ks_accents = 0; state->ks_composed_char = 0; @@ -1377,9 +1378,9 @@ kbdmux_poll(keyboard_t *kbd, int on) KBDMUX_LOCK(state); if (on) - state->ks_flags |= POLLING; + state->ks_polling++; else - state->ks_flags &= ~POLLING; + state->ks_polling--; /* set poll on slave keyboards */ SLIST_FOREACH(k, &state->ks_kbds, next) From owner-svn-src-all@freebsd.org Wed Mar 14 07:16:30 2018 Return-Path: Delivered-To: svn-src-all@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 57EBCF5B26B; Wed, 14 Mar 2018 07:16:30 +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 0615B714EC; Wed, 14 Mar 2018 07:16:30 +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 00E7024D76; Wed, 14 Mar 2018 07:16:30 +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 w2E7GTwO057169; Wed, 14 Mar 2018 07:16:29 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E7GT9T057167; Wed, 14 Mar 2018 07:16:29 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140716.w2E7GT9T057167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 07:16:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330912 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 07:16:30 -0000 Author: eadler Date: Wed Mar 14 07:16:29 2018 New Revision: 330912 URL: https://svnweb.freebsd.org/changeset/base/330912 Log: MFC r305121,r305231: Add some locking to sc_cngetc(). Keyboard input needs Giant locking, and that is not possible to do correctly here. Use mtx_trylock() and proceed unlocked as before if we can't acquire Giant (non-recursively), except in kdb mode don't even try to acquire Giant. Everything here is a hack, but it often works. Even if mtx_trylock() succeeds, this might be a LOR. Keyboard input also needs screen locking, to handle screen updates and switches. Add this, using the same simplistic screen locking as for sc_cnputc(). Giant must be acquired before the screen lock, and the screen lock must be dropped when calling the keyboard driver (else it would get a harmless LOR if it tries to acquire Giant). It was intended that sc cn open/close hide the locking calls, and they do for i/o functions functions except for this complication. Non-console keyboard input is still only Giant-locked, with screen locking in some called functions. This is correct for the keyboard parts only. When Giant cannot be acquired properly, atkbd and kbdmux tend to race and work (they assume that the caller acquired Giant properly and don't try to acquire it again or check that it has been acquired, and the races rarely matter), while ukbd tends to deadlock or panic (since it does the opposite, and has other usb threads to deadlock with). The keyboard (Giant) locking here does very little, but the screen locking completes screen locking for console mode except for not detecting or handling deadlock. The log message for the previous commit didn't mention the most the important detail that sc_cngetc() now opens and closes the keyboard on every call again. This was moved from sc_cngetc() to scn_cngrab/ ungrab() in r228644, but the change wasn't quite complete. After fixes for nesting in kbdd_poll() in ukbd and kbdmux, these opens and closes should have no significant effect if done while grabbed. They fix unusual cases when cngetc() is called while not grabbed. This commit is the main fix for screen locking in sc_cnputc(): detect deadlock or likely-deadlock and handle it by buffering the output atomically and printing it later if the deadlock condition clears (and sc_cnputc() is called). The most common deadlock is when the screen lock is held by ourself. Then it would be safe to acquire the lock recursively if the console driver is calling printf() in a safe context, but we don't know when that is. It is not safe to ignore the lock even in kdb or panic mode. But ignore it in panic mode. The only other known case of deadlock is when another thread holds the lock but is running on a stopped CPU. Detect that case approximately by using trylock and retrying for 1000 usec. On a 4 GHz CPU, 100 usec is almost long enough -- screen switches take slightly longer than that. Not retrying at all is good enough except for stress tests, and planned future versions will extend the timeout so that the stress tests work better. To see the behaviour when deadlock is detected, single step through sctty_outwakeup() (or sc_puts() to start with deadlock). Another (serial) console is needed to the buffered-only output, but the keyboard works in this context to continue or step out of the deadlocked region. The buffer is not large enough to hold all the output for this. Modified: stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:11:33 2018 (r330911) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:16:29 2018 (r330912) @@ -1651,20 +1651,68 @@ sc_cnterm(struct consdev *cp) static void sccnclose(sc_softc_t *sc, struct sc_cnstate *sp); static int sc_cngetc_locked(struct sc_cnstate *sp); +static void sccnkbdlock(sc_softc_t *sc, struct sc_cnstate *sp); +static void sccnkbdunlock(sc_softc_t *sc, struct sc_cnstate *sp); static void sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int flags); static void sccnscrlock(sc_softc_t *sc, struct sc_cnstate *sp); static void sccnscrunlock(sc_softc_t *sc, struct sc_cnstate *sp); static void +sccnkbdlock(sc_softc_t *sc, struct sc_cnstate *sp) +{ + /* + * Locking method: hope for the best. + * The keyboard is supposed to be Giant locked. We can't handle that + * in general. The kdb_active case here is not safe, and we will + * proceed without the lock in all cases. + */ + sp->kbd_locked = !kdb_active && mtx_trylock(&Giant); +} + +static void +sccnkbdunlock(sc_softc_t *sc, struct sc_cnstate *sp) +{ + if (sp->kbd_locked) + mtx_unlock(&Giant); + sp->kbd_locked = FALSE; +} + +static void sccnscrlock(sc_softc_t *sc, struct sc_cnstate *sp) { - SC_VIDEO_LOCK(sc); + int retries; + + /** + * Locking method: + * - if kdb_active and video_mtx is not owned by anyone, then lock + * by kdb remaining active + * - if !kdb_active, try to acquire video_mtx without blocking or + * recursing; if we get it then it works normally. + * Note that video_mtx is especially unusable if we already own it, + * since then it is protecting something and syscons is not reentrant + * enough to ignore the protection even in the kdb_active case. + */ + if (kdb_active) { + sp->kdb_locked = sc->video_mtx.mtx_lock == MTX_UNOWNED || panicstr; + sp->mtx_locked = FALSE; + } else { + sp->kdb_locked = FALSE; + for (retries = 0; retries < 1000; retries++) { + sp->mtx_locked = mtx_trylock_spin_flags(&sc->video_mtx, + MTX_QUIET) != 0 || panicstr; + if (sp->mtx_locked) + break; + DELAY(1); + } + } } static void sccnscrunlock(sc_softc_t *sc, struct sc_cnstate *sp) { - SC_VIDEO_UNLOCK(sc); + if (sp->mtx_locked) + mtx_unlock_spin(&sc->video_mtx); + sp->mtx_locked = sp->kdb_locked = FALSE; } static void @@ -1676,11 +1724,14 @@ sccnopen(sc_softc_t *sc, struct sc_cnstate *sp, int fl sp->kbd_opened = FALSE; sp->scr_opened = FALSE; + sp->kbd_locked = FALSE; /* Opening the keyboard is optional. */ if (!(flags & 1) || sc->kbd == NULL) goto over_keyboard; + sccnkbdlock(sc, sp); + /* * Make sure the keyboard is accessible even when the kbd device * driver is disabled. @@ -1698,6 +1749,8 @@ over_keyboard: ; /* The screen is opened iff locking it succeeds. */ sccnscrlock(sc, sp); + if (!sp->kdb_locked && !sp->mtx_locked) + return; sp->scr_opened = TRUE; /* The screen switch is optional. */ @@ -1728,6 +1781,7 @@ sccnclose(sc_softc_t *sc, struct sc_cnstate *sp) kbdd_disable(sc->kbd); sp->kbd_opened = FALSE; + sccnkbdunlock(sc, sp); } /* @@ -1753,6 +1807,7 @@ sc_cngrab(struct consdev *cp) if (lev >= 0 && lev < 2) { sccnopen(sc, &sc->grab_state[lev], 1 | 2); sccnscrunlock(sc, &sc->grab_state[lev]); + sccnkbdunlock(sc, &sc->grab_state[lev]); } } @@ -1765,12 +1820,17 @@ sc_cnungrab(struct consdev *cp) sc = sc_console->sc; lev = atomic_load_acq_int(&sc->grab_level) - 1; if (lev >= 0 && lev < 2) { + sccnkbdlock(sc, &sc->grab_state[lev]); sccnscrlock(sc, &sc->grab_state[lev]); sccnclose(sc, &sc->grab_state[lev]); } atomic_add_int(&sc->grab_level, -1); } +static char sc_cnputc_log[0x1000]; +static u_int sc_cnputc_loghead; +static u_int sc_cnputc_logtail; + static void sc_cnputc(struct consdev *cd, int c) { @@ -1782,12 +1842,28 @@ sc_cnputc(struct consdev *cd, int c) struct tty *tp; #endif #endif /* !SC_NO_HISTORY */ + u_int head; int s; /* assert(sc_console != NULL) */ sccnopen(scp->sc, &st, 0); + /* + * Log the output. + * + * In the unlocked case, the logging is intentionally only + * perfectly atomic for the indexes. + */ + head = atomic_fetchadd_int(&sc_cnputc_loghead, 1); + sc_cnputc_log[head % sizeof(sc_cnputc_log)] = c; + + /* + * If we couldn't open, return to defer output. + */ + if (!st.scr_opened) + return; + #ifndef SC_NO_HISTORY if (scp == scp->sc->cur_scp && scp->status & SLKED) { scp->status &= ~SLKED; @@ -1815,8 +1891,14 @@ sc_cnputc(struct consdev *cd, int c) } #endif /* !SC_NO_HISTORY */ - buf[0] = c; - sc_puts(scp, buf, 1, 1); + /* Play any output still in the log (our char may already be done). */ + while (sc_cnputc_logtail != atomic_load_acq_int(&sc_cnputc_loghead)) { + buf[0] = sc_cnputc_log[sc_cnputc_logtail++ % sizeof(sc_cnputc_log)]; + if (atomic_load_acq_int(&sc_cnputc_loghead) - sc_cnputc_logtail >= + sizeof(sc_cnputc_log)) + continue; + sc_puts(scp, buf, 1, 1); + } s = spltty(); /* block sckbdevent and scrn_timer */ sccnupdate(scp); @@ -1827,16 +1909,20 @@ sc_cnputc(struct consdev *cd, int c) static int sc_cngetc(struct consdev *cd) { + struct sc_cnstate st; int c, s; /* assert(sc_console != NULL) */ + sccnopen(sc_console->sc, &st, 1); s = spltty(); /* block sckbdevent and scrn_timer while we poll */ - if (sc_console->sc->kbd == NULL) { + if (!st.kbd_opened) { splx(s); - return -1; + sccnclose(sc_console->sc, &st); + return -1; /* means no keyboard since we fudged the locking */ } - c = sc_cngetc_locked(NULL); + c = sc_cngetc_locked(&st); splx(s); + sccnclose(sc_console->sc, &st); return c; } @@ -1853,14 +1939,16 @@ sc_cngetc_locked(struct sc_cnstate *sp) * Stop the screen saver and update the screen if necessary. * What if we have been running in the screen saver code... XXX */ - sc_touch_scrn_saver(); + if (sp->scr_opened) + sc_touch_scrn_saver(); scp = sc_console->sc->cur_scp; /* XXX */ - sccnupdate(scp); + if (sp->scr_opened) + sccnupdate(scp); if (fkeycp < fkey.len) return fkey.str[fkeycp++]; - c = scgetc(scp->sc, SCGETC_CN | SCGETC_NONBLOCK, NULL); + c = scgetc(scp->sc, SCGETC_CN | SCGETC_NONBLOCK, sp); switch (KEYFLAGS(c)) { case 0: /* normal char */ @@ -3466,7 +3554,11 @@ next_code: scp = sc->cur_scp; /* first see if there is something in the keyboard port */ for (;;) { + if (flags & SCGETC_CN) + sccnscrunlock(sc, sp); c = kbdd_read_char(sc->kbd, !(flags & SCGETC_NONBLOCK)); + if (flags & SCGETC_CN) + sccnscrlock(sc, sp); if (c == ERRKEY) { if (!(flags & SCGETC_CN)) sc_bell(scp, bios_value.bell_pitch, BELL_DURATION); Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Wed Mar 14 07:11:33 2018 (r330911) +++ stable/11/sys/dev/syscons/syscons.h Wed Mar 14 07:16:29 2018 (r330912) @@ -192,6 +192,9 @@ struct scr_stat; struct tty; struct sc_cnstate { + u_char kbd_locked; + u_char kdb_locked; + u_char mtx_locked; u_char kbd_opened; u_char scr_opened; }; From owner-svn-src-all@freebsd.org Wed Mar 14 07:30:59 2018 Return-Path: Delivered-To: svn-src-all@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 EB196F5BED4; Wed, 14 Mar 2018 07:30:58 +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 A03F771D99; Wed, 14 Mar 2018 07:30:58 +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 9B37E24F27; Wed, 14 Mar 2018 07:30:58 +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 w2E7UwR7062315; Wed, 14 Mar 2018 07:30:58 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E7Uw8L062312; Wed, 14 Mar 2018 07:30:58 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140730.w2E7Uw8L062312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 07:30:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330913 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330913 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 07:30:59 -0000 Author: eadler Date: Wed Mar 14 07:30:58 2018 New Revision: 330913 URL: https://svnweb.freebsd.org/changeset/base/330913 Log: MFC r314641,r314646,r314997,r315390: Colorize syscons kernel console output according to a table indexed by the CPU number. This was originally for debugging near-deadlock conditions where multiple CPUs either deadlock or scramble each other's output trying to report the problem, but I found it interesting and sometimes useful for ordinary kernel messages. Ordinary kernel messages shouldn't be interleaved, but if they are then the colorization makes them readable even if the interleaving is for every character (provided the CPU printing each message doesn't change). The default colors are 8-15 starting at 15 (bright white on black) for CPU 0 and repeating every 8 CPUs. This works best with 8 CPUs. Non-bright colors and nonzero background colors need special configuration to avoid unreadable and ugly combinations so are not configured by default. The next bright color after 15 is 8 (bright black = dark gray) is not very readable but is the only other color used with 2 CPUs. After that the next bright color is 9 (bright blue) which is not much brighter than bright black, but is used with 3+ CPUs. Other bright colors are brighter. Colorization is configured by default so that it gets tested. It can only be turned off by configuring SC_KERNEL_CONS_ATTR to anything other than FG_WHITE. After booting, all colors can be changed using the syscons.kattr sysctl. This is a SYSCTL_OPAQUE, and no utility is provided to change it (sysctl only displays it). The default colors work in all VGA modes that I could test. In 2-color graphics modes, all 8 bright colors are displayed as bright white, so the colorization has no effect, but anything with a nonzero background gives white on white unless the foreground is zero. I don't have an mono or VGA grayscale hardware to test on. Support for mono mode seems to have never worked right in syscons (I think bright white gives white underline with either bold or bright), but VGA grayscale should work better than 2-color graphics. Implement ec_putc() (emergency kernel [syscons] console putc()) and use it in emergency in sc_cnputc(). Locking fixes in sc_cnputc() previously turned off normal output in near-deadlock conditions and added deferred output which might never be completed. Emergency output goes to the frame buffer using sufficiently atomic non-blocking writes if the console is in text mode (in graphics mode, nothing is done, modulo races setting the graphics mode bit). Screen updates overwrite the emergency output if the emergency condition clears enough to reach them. ec_putc() also works for "early" console output in normal x86 text mode as soon as this mode is initialized (if ever). This uses a hard-coded x86 frame buffer address before cninit() and a hopefully MI address after cninit(). But non-x86 is more likely to not support text mode, when ec_putc() will be null. ec_putc() has no dependencies of syscons before cninit(), and only has them later to track syscons' mode changes. This commit doesn't attach ec_putc() for early use. To test emergency use, put a breakpoint in central syscons output code like sc_puts() and do some user output. The system used to race or deadlock in ddb output soon after entry to ddb. The locking fixes deferred the output until after leaving ddb, so ddb was unusable and you had to try typing c[ontinue] blindly until it exited, or better use a serial console in parallel. Now the output goes to a window in the middle 2/3 of the screen. Scrolling is circular and there is no cursor, but otherwise ec_putc() provides full dumb terminal functionality and very fast output that hides artificates from dumb overwrites. Modified: stable/11/sys/dev/syscons/scterm-teken.c stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/scterm-teken.c ============================================================================== --- stable/11/sys/dev/syscons/scterm-teken.c Wed Mar 14 07:16:29 2018 (r330912) +++ stable/11/sys/dev/syscons/scterm-teken.c Wed Mar 14 07:30:58 2018 (r330913) @@ -178,7 +178,7 @@ scteken_puts(scr_stat *scp, u_char *buf, int len, int if (kernel) { /* Use special colors for kernel messages. */ backup = *teken_get_curattr(&ts->ts_teken); - scteken_revattr(SC_KERNEL_CONS_ATTR, &kattr); + scteken_revattr(sc_kattr(), &kattr); teken_set_curattr(&ts->ts_teken, &kattr); teken_input(&ts->ts_teken, buf, len); teken_set_curattr(&ts->ts_teken, &backup); Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:16:29 2018 (r330912) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:30:58 2018 (r330913) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -102,6 +103,8 @@ static default_attr user_default = { SC_NORM_REV_ATTR, }; +static u_char sc_kattrtab[MAXCPU]; + static int sc_console_unit = -1; static int sc_saver_keyb_only = 1; static scr_stat *sc_console; @@ -143,6 +146,8 @@ static int sc_no_suspend_vtswitch = 0; static int sc_susp_scr; static SYSCTL_NODE(_hw, OID_AUTO, syscons, CTLFLAG_RD, 0, "syscons"); +SYSCTL_OPAQUE(_hw_syscons, OID_AUTO, kattr, CTLFLAG_RW, + &sc_kattrtab, sizeof(sc_kattrtab), "CU", "kernel console attributes"); static SYSCTL_NODE(_hw_syscons, OID_AUTO, saver, CTLFLAG_RD, 0, "saver"); SYSCTL_INT(_hw_syscons_saver, OID_AUTO, keybonly, CTLFLAG_RW, &sc_saver_keyb_only, 0, "screen saver interrupted by input only"); @@ -263,6 +268,62 @@ static struct cdevsw consolectl_devsw = { .d_name = "consolectl", }; +/* ec -- emergency console. */ + +static u_int ec_scroffset; + +static void +ec_putc(int c) +{ + uintptr_t fb; + u_short *scrptr; + u_int ind; + int attr, column, mysize, width, xsize, yborder, ysize; + + if (c < 0 || c > 0xff || c == '\a') + return; + if (sc_console == NULL) { +#if !defined(__amd64__) && !defined(__i386__) + return; +#endif + /* + * This is enough for ec_putc() to work very early on x86 + * if the kernel starts in normal color text mode. + */ + fb = 0xb8000; + xsize = 80; + ysize = 25; + } else { + if (main_console.status & GRAPHICS_MODE) + return; + fb = main_console.sc->adp->va_window; + xsize = main_console.xsize; + ysize = main_console.ysize; + } + yborder = ysize / 5; + scrptr = (u_short *)(void *)fb + xsize * yborder; + mysize = xsize * (ysize - 2 * yborder); + do { + ind = ec_scroffset; + column = ind % xsize; + width = (c == '\b' ? -1 : c == '\t' ? (column + 8) & ~7 : + c == '\r' ? -column : c == '\n' ? xsize - column : 1); + if (width == 0 || (width < 0 && ind < -width)) + return; + } while (atomic_cmpset_rel_int(&ec_scroffset, ind, ind + width) == 0); + if (c == '\b' || c == '\r') + return; + if (c == '\n') + ind += xsize; /* XXX clearing from new pos is not atomic */ + + attr = sc_kattr(); + if (c == '\t' || c == '\n') + c = ' '; + do + scrptr[ind++ % mysize] = (attr << 8) | c; + while (--width != 0); +} + int sc_probe_unit(int unit, int flags) { @@ -1859,10 +1920,13 @@ sc_cnputc(struct consdev *cd, int c) sc_cnputc_log[head % sizeof(sc_cnputc_log)] = c; /* - * If we couldn't open, return to defer output. + * If we couldn't open, do special reentrant output and return to defer + * normal output. */ - if (!st.scr_opened) + if (!st.scr_opened) { + ec_putc(c); return; + } #ifndef SC_NO_HISTORY if (scp == scp->sc->cur_scp && scp->status & SLKED) { @@ -3009,8 +3073,16 @@ scinit(int unit, int flags) int i; /* one time initialization */ - if (init_done == COLD) + if (init_done == COLD) { sc_get_bios_values(&bios_value); + for (i = 0; i < nitems(sc_kattrtab); i++) { +#if SC_KERNEL_CONS_ATTR == FG_WHITE + sc_kattrtab[i] = 8 + (i + FG_WHITE) % 8U; +#else + sc_kattrtab[i] = SC_KERNEL_CONS_ATTR; +#endif + } + } init_done = WARM; /* @@ -4024,6 +4096,12 @@ sc_bell(scr_stat *scp, int pitch, int duration) pitch *= 2; sysbeep(1193182 / pitch, duration); } +} + +int +sc_kattr(void) +{ + return (sc_kattrtab[PCPU_GET(cpuid) % nitems(sc_kattrtab)]); } static void Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Wed Mar 14 07:16:29 2018 (r330912) +++ stable/11/sys/dev/syscons/syscons.h Wed Mar 14 07:30:58 2018 (r330913) @@ -591,6 +591,7 @@ void sc_paste(scr_stat *scp, const u_char *p, int cou void sc_respond(scr_stat *scp, const u_char *p, int count, int wakeup); void sc_bell(scr_stat *scp, int pitch, int duration); +int sc_kattr(void); /* schistory.c */ #ifndef SC_NO_HISTORY From owner-svn-src-all@freebsd.org Wed Mar 14 07:32:49 2018 Return-Path: Delivered-To: svn-src-all@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 7CC8E297; Wed, 14 Mar 2018 07:32:49 +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 2F3AE72178; Wed, 14 Mar 2018 07:32:49 +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 29FAA25083; Wed, 14 Mar 2018 07:32:49 +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 w2E7WmfB066895; Wed, 14 Mar 2018 07:32:48 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E7WmtD066894; Wed, 14 Mar 2018 07:32:48 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140732.w2E7WmtD066894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 07:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330914 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330914 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 07:32:49 -0000 Author: eadler Date: Wed Mar 14 07:32:48 2018 New Revision: 330914 URL: https://svnweb.freebsd.org/changeset/base/330914 Log: MFC r315000: Start fixing some bugs in attribute handling. This change just does cleanups missed in r56043 17 years ago. The default attributes were still stored in structs for the purpose of changing them and passing around pointers to the defaults, but r56043 added another layer that made the defaults invariant and only used for initialization and reset. Just use the defaults directly. This was already done for the kernel defaults. The defaults for reverse attributes aren't actually used, but are ignored in layers that no longer support them. Modified: stable/11/sys/dev/syscons/syscons.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:30:58 2018 (r330913) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:32:48 2018 (r330914) @@ -93,16 +93,6 @@ __FBSDID("$FreeBSD$"); /* NULL-safe version of "tty_opened()" */ #define tty_opened_ns(tp) ((tp) != NULL && tty_opened(tp)) -typedef struct default_attr { - int std_color; /* normal hardware color */ - int rev_color; /* reverse hardware color */ -} default_attr; - -static default_attr user_default = { - SC_NORM_ATTR, - SC_NORM_REV_ATTR, -}; - static u_char sc_kattrtab[MAXCPU]; static int sc_console_unit = -1; @@ -3170,9 +3160,7 @@ scinit(int unit, int flags) if (sc_init_emulator(scp, SC_DFLT_TERM)) sc_init_emulator(scp, "*"); - (*scp->tsw->te_default_attr)(scp, - user_default.std_color, - user_default.rev_color); + (*scp->tsw->te_default_attr)(scp, SC_NORM_ATTR, SC_NORM_REV_ATTR); } else { /* assert(sc_malloc) */ sc->dev = malloc(sizeof(struct tty *)*sc->vtys, M_DEVBUF, @@ -3589,8 +3577,7 @@ sc_init_emulator(scr_stat *scp, char *name) scp->rndr = rndr; scp->rndr->init(scp); - /* XXX */ - (*sw->te_default_attr)(scp, user_default.std_color, user_default.rev_color); + (*sw->te_default_attr)(scp, SC_NORM_ATTR, SC_NORM_REV_ATTR); sc_clear_screen(scp); return 0; From owner-svn-src-all@freebsd.org Wed Mar 14 07:39:29 2018 Return-Path: Delivered-To: svn-src-all@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 6AC39921; Wed, 14 Mar 2018 07:39:29 +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 1BD78724D4; Wed, 14 Mar 2018 07:39:29 +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 120FD25087; Wed, 14 Mar 2018 07:39:29 +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 w2E7dSKS067187; Wed, 14 Mar 2018 07:39:28 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E7dSEl067184; Wed, 14 Mar 2018 07:39:28 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140739.w2E7dSEl067184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 07:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330915 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330915 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 07:39:29 -0000 Author: eadler Date: Wed Mar 14 07:39:28 2018 New Revision: 330915 URL: https://svnweb.freebsd.org/changeset/base/330915 Log: MFC r315003,r315065,r315066: Rename scteken_revattr() to scteken_sc_to_te_attr(). scteken_revattr() looked like it might handle reverse attributes, but it actually handles conversion of attributes in the direction indicated by the new name. Reverse attributes are just broken. Rename scteken_attr() to scteken_te_to_sc_attr(). scteken_attr() looked like it might give teken attributes, but it actually gives sc attributes. Change scteken_te_to_sc_attr() to return int instead of unsigned int. u_char would be enough, and it promotes to int, and syscons uses int or u_short for its attributes everywhere else (u_short holds a shifted form and it promotes to int too). Add a scteken_set_cursor() (sc to teken) method and use it to fix some cases of initialization and resetting of the teken cursor position. (This bad name is consistent with others, but it is too easy to confuse with scteken_cursor() which goes in the opposite direction.) The following cases were broken: - for booting without a syscons console, the teken and sc positions for ttyv0 were (0, 0), but are supposed to be somewhere in the middle of the screen (after carefully preserved BIOS and loader messages) (at least if there is no mode switch that loses the messages). - after mode switches, the screen is cleared and the cursor is supposed to be moved to (0, 0), but it was only moved there for sc. The following case was hacked to work: - for booting with a syscons console, it was arranged that scteken_init() for the console could see a nonzero cursor position and adjust, although this broke the sc seeing it in the non-console case above. Fix the attribute for scteken_clear() (change it back from the user user default normal attribute to the current attribute). This change only fixes a logic error. scterm_clear() used to be used for terminal reset, but teken uses a general fill function for that, leaving scterm_clear() only used for initialization and mode change, when using the user default attribute is correct. It is not really a terminal function, but needs to sync its changes with the terminal layer. Syncing of the attribute is currently broken for terminal reset, but works for initialization and mode change. Modified: stable/11/sys/dev/syscons/scterm-teken.c stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/scterm-teken.c ============================================================================== --- stable/11/sys/dev/syscons/scterm-teken.c Wed Mar 14 07:32:48 2018 (r330914) +++ stable/11/sys/dev/syscons/scterm-teken.c Wed Mar 14 07:39:28 2018 (r330915) @@ -53,8 +53,8 @@ __FBSDID("$FreeBSD$"); #include -static void scteken_revattr(unsigned char, teken_attr_t *); -static unsigned int scteken_attr(const teken_attr_t *); +static void scteken_sc_to_te_attr(unsigned char, teken_attr_t *); +static int scteken_te_to_sc_attr(const teken_attr_t *); static sc_term_init_t scteken_init; static sc_term_term_t scteken_term; @@ -64,6 +64,7 @@ static sc_term_default_attr_t scteken_default_attr; static sc_term_clear_t scteken_clear; static sc_term_input_t scteken_input; static sc_term_fkeystr_t scteken_fkeystr; +static sc_term_set_cursor_t scteken_set_cursor; static void scteken_nop(void); typedef struct { @@ -90,6 +91,7 @@ static sc_term_sw_t sc_term_scteken = { (sc_term_notify_t *)scteken_nop, scteken_input, scteken_fkeystr, + scteken_set_cursor, }; SCTERM_MODULE(scteken, sc_term_scteken); @@ -142,13 +144,6 @@ scteken_init(scr_stat *scp, void **softc, int code) tp.tp_row = scp->ysize; tp.tp_col = scp->xsize; teken_set_winsize(&ts->ts_teken, &tp); - - if (scp->cursor_pos < scp->ysize * scp->xsize) { - /* Valid old cursor position. */ - tp.tp_row = scp->cursor_pos / scp->xsize; - tp.tp_col = scp->cursor_pos % scp->xsize; - teken_set_cursor(&ts->ts_teken, &tp); - } break; } @@ -178,7 +173,7 @@ scteken_puts(scr_stat *scp, u_char *buf, int len, int if (kernel) { /* Use special colors for kernel messages. */ backup = *teken_get_curattr(&ts->ts_teken); - scteken_revattr(sc_kattr(), &kattr); + scteken_sc_to_te_attr(sc_kattr(), &kattr); teken_set_curattr(&ts->ts_teken, &kattr); teken_input(&ts->ts_teken, buf, len); teken_set_curattr(&ts->ts_teken, &backup); @@ -195,19 +190,19 @@ scteken_ioctl(scr_stat *scp, struct tty *tp, u_long cm { teken_stat *ts = scp->ts; vid_info_t *vi; - unsigned int attr; + int attr; switch (cmd) { case GIO_ATTR: /* get current attributes */ *(int*)data = - scteken_attr(teken_get_curattr(&ts->ts_teken)); + scteken_te_to_sc_attr(teken_get_curattr(&ts->ts_teken)); return (0); case CONS_GETINFO: /* get current (virtual) console info */ vi = (vid_info_t *)data; if (vi->size != sizeof(struct vid_info)) return EINVAL; - attr = scteken_attr(teken_get_defattr(&ts->ts_teken)); + attr = scteken_te_to_sc_attr(teken_get_defattr(&ts->ts_teken)); vi->mv_norm.fore = attr & 0x0f; vi->mv_norm.back = (attr >> 4) & 0x0f; vi->mv_rev.fore = vi->mv_norm.back; @@ -227,16 +222,20 @@ scteken_default_attr(scr_stat *scp, int color, int rev teken_stat *ts = scp->ts; teken_attr_t ta; - scteken_revattr(color, &ta); + scteken_sc_to_te_attr(color, &ta); teken_set_defattr(&ts->ts_teken, &ta); } static void scteken_clear(scr_stat *scp) { + teken_stat *ts = scp->ts; sc_move_cursor(scp, 0, 0); - sc_vtb_clear(&scp->vtb, scp->sc->scr_map[0x20], SC_NORM_ATTR << 8); + scteken_set_cursor(scp, 0, 0); + sc_vtb_clear(&scp->vtb, scp->sc->scr_map[0x20], + scteken_te_to_sc_attr(teken_get_curattr(&ts->ts_teken)) + << 8); mark_all(scp); } @@ -298,6 +297,17 @@ scteken_fkeystr(scr_stat *scp, int c) } static void +scteken_set_cursor(scr_stat *scp, int col, int row) +{ + teken_stat *ts = scp->ts; + teken_pos_t tp; + + tp.tp_col = col; + tp.tp_row = row; + teken_set_cursor(&ts->ts_teken, &tp); +} + +static void scteken_nop(void) { @@ -323,7 +333,7 @@ static const unsigned char bgcolors[TC_NCOLORS] = { }; static void -scteken_revattr(unsigned char color, teken_attr_t *a) +scteken_sc_to_te_attr(unsigned char color, teken_attr_t *a) { teken_color_t fg, bg; @@ -362,10 +372,10 @@ scteken_revattr(unsigned char color, teken_attr_t *a) } } -static unsigned int -scteken_attr(const teken_attr_t *a) +static int +scteken_te_to_sc_attr(const teken_attr_t *a) { - unsigned int attr = 0; + int attr = 0; teken_color_t fg, bg; if (a->ta_format & TF_REVERSE) { @@ -560,7 +570,7 @@ scteken_putchar(void *arg, const teken_pos_t *tp, teke * characters. Simply print a space and assume that the left * hand side describes the entire character. */ - attr = scteken_attr(a) << 8; + attr = scteken_te_to_sc_attr(a) << 8; if (a->ta_format & TF_CJK_RIGHT) c = ' '; #ifdef TEKEN_UTF8 @@ -592,7 +602,7 @@ scteken_fill(void *arg, const teken_rect_t *r, teken_c unsigned int width; int attr, row; - attr = scteken_attr(a) << 8; + attr = scteken_te_to_sc_attr(a) << 8; #ifdef TEKEN_UTF8 scteken_get_cp437(&c, &attr); #endif /* TEKEN_UTF8 */ Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:32:48 2018 (r330914) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:39:28 2018 (r330915) @@ -3148,16 +3148,6 @@ scinit(int unit, int flags) init_scp(sc, sc->first_vty, scp); sc_vtb_init(&scp->vtb, VTB_MEMORY, scp->xsize, scp->ysize, (void *)sc_buffer, FALSE); - - /* move cursors to the initial positions */ - if (col >= scp->xsize) - col = 0; - if (row >= scp->ysize) - row = scp->ysize - 1; - scp->xpos = col; - scp->ypos = row; - scp->cursor_pos = scp->cursor_oldpos = row*scp->xsize + col; - if (sc_init_emulator(scp, SC_DFLT_TERM)) sc_init_emulator(scp, "*"); (*scp->tsw->te_default_attr)(scp, SC_NORM_ATTR, SC_NORM_REV_ATTR); @@ -3179,6 +3169,17 @@ scinit(int unit, int flags) sc_vtb_copy(&scp->scr, 0, &scp->vtb, 0, scp->xsize*scp->ysize); #endif + /* Sync h/w cursor position to s/w (sc and teken). */ + if (col >= scp->xsize) + col = 0; + if (row >= scp->ysize) + row = scp->ysize - 1; + scp->xpos = col; + scp->ypos = row; + scp->cursor_pos = scp->cursor_oldpos = row*scp->xsize + col; + (*scp->tsw->te_set_cursor)(scp, col, row); + + /* Sync BIOS cursor shape to s/w (sc only). */ if (bios_value.cursor_end < scp->font_size) sc->dflt_curs_attr.base = scp->font_size - bios_value.cursor_end - 1; Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Wed Mar 14 07:32:48 2018 (r330914) +++ stable/11/sys/dev/syscons/syscons.h Wed Mar 14 07:39:28 2018 (r330915) @@ -404,6 +404,7 @@ typedef void sc_term_notify_t(scr_stat *scp, int event #define SC_TE_NOTIFY_VTSWITCH_OUT 1 typedef int sc_term_input_t(scr_stat *scp, int c, struct tty *tp); typedef const char *sc_term_fkeystr_t(scr_stat *scp, int c); +typedef void sc_term_set_cursor_t(scr_stat *scp, int col, int row); typedef struct sc_term_sw { LIST_ENTRY(sc_term_sw) link; @@ -422,6 +423,7 @@ typedef struct sc_term_sw { sc_term_notify_t *te_notify; sc_term_input_t *te_input; sc_term_fkeystr_t *te_fkeystr; + sc_term_set_cursor_t *te_set_cursor; } sc_term_sw_t; #define SCTERM_MODULE(name, sw) \ From owner-svn-src-all@freebsd.org Wed Mar 14 07:47:27 2018 Return-Path: Delivered-To: svn-src-all@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 9CE486134; Wed, 14 Mar 2018 07:47:27 +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 395BD72A41; Wed, 14 Mar 2018 07:47:27 +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 2FF5E25217; Wed, 14 Mar 2018 07:47:27 +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 w2E7lRPR072354; Wed, 14 Mar 2018 07:47:27 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E7lQxb072344; Wed, 14 Mar 2018 07:47:26 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140747.w2E7lQxb072344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 07:47:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330916 - in stable/11/sys: dev/syscons dev/vt kern teken teken/libteken X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/sys: dev/syscons dev/vt kern teken teken/libteken X-SVN-Commit-Revision: 330916 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 07:47:28 -0000 Author: eadler Date: Wed Mar 14 07:47:26 2018 New Revision: 330916 URL: https://svnweb.freebsd.org/changeset/base/330916 Log: MFC r315418,r315480,r316019: Add teken_256to16() to convert xterm-256 256-color codes to xterm 16-color codes. This will be used to fix bright colors. Improve teken_256to8(). Use a lookup table instead of calculations. The calculations were inaccurate since they used indexes into the xterm-256 6x6x6 color map instead of actual xterm colors. Also, change the threshold for converting to a primary color: require the primary's component to be 2 or more higher instead of just higher. This affects about 1/5 of the table entries and gives uniformly distributed colors in the 6x6x6 submap except for greys (35 entries each for red, green, blue, cyan, brown and magenta, instead of approx. only 15 each for the mixed colors). Even more mixed colors would be better for matching colors, but uniform distribution is best for preserving contrast. For teken_256to16(), bright colors are just the ones with luminosity >= 60%. These are actually light colors (more white instead of more saturation), while xterm bright colors except for white itself are actually saturated with no white, so have luminosity only 50%. These functions are layering violations. teken cannot do correct conversions since it shouldn't know the color maps of anything except xterm. Translating through xterm-16 colors loses information. This gives bugs like xterm-256 near-brown -> xterm-16 red -> VGA red. ------------------------------------------------------------------------ r315480 | bde | 2017-03-18 11:13:54 +0000 (Sat, 18 Mar 2017) | 51 lines Fix bright colors for syscons, and make them work for the first time for vt. Restore syscons' rendering of background (bg) brightness as foreground (fg) blinking and vice versa, and add rendering of blinking as background brightness to vt. Bright/saturated is conflated with light/white in the implementation and in this description. Bright colors were broken in all cases, but appeared to work in the only case shown by "vidcontrol show". A boldness hack was applied only in 1 layering-violation place (for some syscons sequences) where it made some cases seem to work but was undone by clearing bold using ANSI sequences, and more seriously was not undone when setting ANSI/xterm dark colors so left them bright. Move this hack to drivers. The boldness hack is only for fg brightness. Restore/add a similar hack for bg brightness rendered as fg blinking and vice versa. This works even better for vt, since vt changes the default text mode to give the more useful bg brightness instead of fg blinking. The brightness bit in colors was unnecessarily removed by the boldness hack. In other cases, it was lost later by teken_256to8(). Use teken_256to16() to not lose it. teken_256to8() was intended to be used for bg colors to allow finer or bg-specific control for the more difficult reduction to 8; however, since 16 bg colors actually work on VGA except in syscons text mode and the conversion isn't subtle enough to significantly in that mode, teken_256to8() is not used now. There are still bugs, especially in vidcontrol, if bright/blinking background colors are set. Restore XOR logic for bold/bright fg in syscons (don't change OR logic for vt). Remove broken ifdef on FG_UNDERLINE and its wrong or missing bit and restore the correct hard-coded bit. FG_UNDERLINE is only for mono mode which is not really supported. Restore XOR logic for blinking/bright bg in syscons (in vt, add OR logic and render as bright bg). Remove related broken ifdef on BG_BLINKING and its missing bit and restore the correct hard-coded bit. The same bit means blinking or bright bg depending on the mode, and we want to ignore the difference everywhere. Simplify conversions of attributes in syscons. Don't pretend to support bold fonts. Don't support unusual encodings of brightness. It is as good as possible to map 16 VGA colors to 16 xterm-16 colors. E.g., VGA brown -> xterm-16 Olive will be converted back to VGA brown, so we don't need to convert to xterm-256 Brown. Teken cons25 compatibility code already does the same, and duplicates some small tables. This is mostly for the sc -> te direction. The other direction uses teken_256to16() which is too generic. ------------------------------------------------------------------------ r316019 | bde | 2017-03-27 10:48:28 +0000 (Mon, 27 Mar 2017) | 30 lines Oops, my fix for bright colors broke bright black some more (in cases that used to work via the bold hack). Fix the table entry for bright black. Fix spelling of plain black in nearby table entries (use the macro for black everywhere everywhere). Fix the currently-unused non-bright color table to not have bright colors in entries 9-15. Improve nearby comments. Start converting to the xterm terminology and default rendering of "bright" instead of "light" for bright colors. Syscons wasn't affected by the bug since I optimized it a little by converting colors 0-15 directly. This also fixes the layering of the conversion for these colors. Apply the same optimization to vt (actually the layer above it). This also moves the conversion 1 closer to the correct layer for colors 0-15. The optimization of just avoiding 2 calls to a trivial function is worth about 10% for simple output to the virtual buffer with occasional rendering. The optimization is so large because the 2 calls are done on every character, so although there are too many other calls and other instructions per character, there are only about 10 times as many. Old versions of syscons were about 10 times faster for simple output, by using a fast path with about 12 instructions per character. Rendering to even slow hardware takes relatively little time provided it is rarely actually done. Modified: stable/11/sys/dev/syscons/scterm-teken.c stable/11/sys/dev/vt/vt_core.c stable/11/sys/kern/subr_terminal.c stable/11/sys/teken/libteken/teken.3 stable/11/sys/teken/teken.c stable/11/sys/teken/teken.h stable/11/sys/teken/teken_subr_compat.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/scterm-teken.c ============================================================================== --- stable/11/sys/dev/syscons/scterm-teken.c Wed Mar 14 07:39:28 2018 (r330915) +++ stable/11/sys/dev/syscons/scterm-teken.c Wed Mar 14 07:47:26 2018 (r330916) @@ -317,88 +317,57 @@ scteken_nop(void) * libteken routines. */ -static const unsigned char fgcolors_normal[TC_NCOLORS] = { - FG_BLACK, FG_RED, FG_GREEN, FG_BROWN, - FG_BLUE, FG_MAGENTA, FG_CYAN, FG_LIGHTGREY, +static const teken_color_t sc_to_te_color[] = { + TC_BLACK, TC_BLUE, TC_GREEN, TC_CYAN, + TC_RED, TC_MAGENTA, TC_BROWN, TC_WHITE, }; -static const unsigned char fgcolors_bold[TC_NCOLORS] = { - FG_DARKGREY, FG_LIGHTRED, FG_LIGHTGREEN, FG_YELLOW, - FG_LIGHTBLUE, FG_LIGHTMAGENTA, FG_LIGHTCYAN, FG_WHITE, +static const unsigned char te_to_sc_color[] = { + FG_BLACK, FG_RED, FG_GREEN, FG_BROWN, + FG_BLUE, FG_MAGENTA, FG_CYAN, FG_LIGHTGREY, }; -static const unsigned char bgcolors[TC_NCOLORS] = { - BG_BLACK, BG_RED, BG_GREEN, BG_BROWN, - BG_BLUE, BG_MAGENTA, BG_CYAN, BG_LIGHTGREY, -}; - static void scteken_sc_to_te_attr(unsigned char color, teken_attr_t *a) { - teken_color_t fg, bg; /* - * XXX: Reverse conversion of syscons to teken attributes. Not - * realiable. Maybe we should turn it into a 1:1 mapping one of - * these days? + * Conversions of attrs are not reversible. Since sc attrs are + * pure colors in the simplest mode (16-color graphics) and the + * API is too deficient to tell us the mode, always convert to + * pure colors. The conversion is essentially the identity except + * for reordering the non-brightness bits in the 2 color numbers. */ - a->ta_format = 0; - a->ta_fgcolor = TC_WHITE; - a->ta_bgcolor = TC_BLACK; - -#ifdef FG_BLINK - if (color & FG_BLINK) { - a->ta_format |= TF_BLINK; - color &= ~FG_BLINK; - } -#endif /* FG_BLINK */ - - for (fg = 0; fg < TC_NCOLORS; fg++) { - for (bg = 0; bg < TC_NCOLORS; bg++) { - if ((fgcolors_normal[fg] | bgcolors[bg]) == color) { - a->ta_fgcolor = fg; - a->ta_bgcolor = bg; - return; - } - - if ((fgcolors_bold[fg] | bgcolors[bg]) == color) { - a->ta_fgcolor = fg; - a->ta_bgcolor = bg; - a->ta_format |= TF_BOLD; - return; - } - } - } + a->ta_fgcolor = sc_to_te_color[color & 7] | (color & 8); + a->ta_bgcolor = sc_to_te_color[(color >> 4) & 7] | ((color >> 4) & 8); } static int scteken_te_to_sc_attr(const teken_attr_t *a) { - int attr = 0; + int attr; teken_color_t fg, bg; if (a->ta_format & TF_REVERSE) { - fg = teken_256to8(a->ta_bgcolor); - bg = teken_256to8(a->ta_fgcolor); + fg = a->ta_bgcolor; + bg = a->ta_fgcolor; } else { - fg = teken_256to8(a->ta_fgcolor); - bg = teken_256to8(a->ta_bgcolor); + fg = a->ta_fgcolor; + bg = a->ta_bgcolor; } - if (a->ta_format & TF_BOLD) - attr |= fgcolors_bold[fg]; - else - attr |= fgcolors_normal[fg]; - attr |= bgcolors[bg]; + if (fg >= 16) + fg = teken_256to16(fg); + if (bg >= 16) + bg = teken_256to16(bg); + attr = te_to_sc_color[fg & 7] | (fg & 8) | + ((te_to_sc_color[bg & 7] | (bg & 8)) << 4); -#ifdef FG_UNDERLINE - if (a->ta_format & TF_UNDERLINE) - attr |= FG_UNDERLINE; -#endif /* FG_UNDERLINE */ -#ifdef FG_BLINK + /* XXX: underline mapping for Hercules adapter can be better. */ + if (a->ta_format & (TF_BOLD | TF_UNDERLINE)) + attr ^= 8; if (a->ta_format & TF_BLINK) - attr |= FG_BLINK; -#endif /* FG_BLINK */ + attr ^= 0x80; return (attr); } Modified: stable/11/sys/dev/vt/vt_core.c ============================================================================== --- stable/11/sys/dev/vt/vt_core.c Wed Mar 14 07:39:28 2018 (r330915) +++ stable/11/sys/dev/vt/vt_core.c Wed Mar 14 07:47:26 2018 (r330916) @@ -1077,6 +1077,8 @@ vt_determine_colors(term_char_t c, int cursor, if (TCHAR_FORMAT(c) & TF_BOLD) *fg = TCOLOR_LIGHT(*fg); *bg = TCHAR_BGCOLOR(c); + if (TCHAR_FORMAT(c) & TF_BLINK) + *bg = TCOLOR_LIGHT(*bg); if (TCHAR_FORMAT(c) & TF_REVERSE) invert ^= 1; Modified: stable/11/sys/kern/subr_terminal.c ============================================================================== --- stable/11/sys/kern/subr_terminal.c Wed Mar 14 07:39:28 2018 (r330915) +++ stable/11/sys/kern/subr_terminal.c Wed Mar 14 07:47:26 2018 (r330916) @@ -130,9 +130,34 @@ static const teken_attr_t default_message = { .ta_format = TCHAR_FORMAT(TERMINAL_NORM_ATTR) }; +/* Fudge fg brightness as TF_BOLD (shifted). */ +#define TCOLOR_FG_FUDGED(color) __extension__ ({ \ + teken_color_t _c; \ + \ + _c = (color); \ + TCOLOR_FG(_c & 7) | ((_c & 8) << 18); \ +}) + +/* Fudge bg brightness as TF_BLINK (shifted). */ +#define TCOLOR_BG_FUDGED(color) __extension__ ({ \ + teken_color_t _c; \ + \ + _c = (color); \ + TCOLOR_BG(_c & 7) | ((_c & 8) << 20); \ +}) + +#define TCOLOR_256TO16(color) __extension__ ({ \ + teken_color_t _c; \ + \ + _c = (color); \ + if (_c >= 16) \ + _c = teken_256to16(_c); \ + _c; \ +}) + #define TCHAR_CREATE(c, a) ((c) | TFORMAT((a)->ta_format) | \ - TCOLOR_FG(teken_256to8((a)->ta_fgcolor)) | \ - TCOLOR_BG(teken_256to8((a)->ta_bgcolor))) + TCOLOR_FG_FUDGED(TCOLOR_256TO16((a)->ta_fgcolor)) | \ + TCOLOR_BG_FUDGED(TCOLOR_256TO16((a)->ta_bgcolor))) static void terminal_init(struct terminal *tm) Modified: stable/11/sys/teken/libteken/teken.3 ============================================================================== --- stable/11/sys/teken/libteken/teken.3 Wed Mar 14 07:39:28 2018 (r330915) +++ stable/11/sys/teken/libteken/teken.3 Wed Mar 14 07:47:26 2018 (r330916) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2011 +.Dd Mar 13, 2017 .Dt TEKEN 3 .Os .Sh NAME @@ -57,6 +57,8 @@ .Ft const char * .Fn teken_get_sequence "teken_t *t" "unsigned int id" .Ft teken_color_t +.Fn teken_256to16 "teken_color_t color" +.Ft teken_color_t .Fn teken_256to8 "teken_color_t color" .Ft void .Fn teken_get_defattr_cons25 "teken_t *t" "int *fg" "int *bg" @@ -163,10 +165,22 @@ This library also provides a set of functions that sho any modern applications. .Pp The +.Fn teken_256to16 +function converts an xterm-256 256-color code to an xterm 16-color code +whose color with default palettes is as similar as possible (not very +similar). +The lower 3 bits of the result are the ANSI color and the next lowest +bit is brightness. +Other layers (hardare and software) that only support 16 colors can use +this to avoid knowing the details of 256-color codes. +.Pp +The .Fn teken_256to8 -function converts a color code to one of the 8 primary colors, allowing -the terminal to be rendered on graphics hardware that only supports 8 or -16 colors (e.g. VGA). +function is similar to +.Fn teken_256to16 +except it converts to an ANSI 8-color code. +This is more accurate than discarding the brigtness bit in the result of +.Fn teken_256to16 . .Pp The .Fn teken_get_defattr_cons25 Modified: stable/11/sys/teken/teken.c ============================================================================== --- stable/11/sys/teken/teken.c Wed Mar 14 07:39:28 2018 (r330915) +++ stable/11/sys/teken/teken.c Wed Mar 14 07:47:26 2018 (r330916) @@ -452,55 +452,203 @@ teken_state_numbers(teken_t *t, teken_char_t c) return (0); } +#define k TC_BLACK +#define b TC_BLUE +#define y TC_BROWN +#define c TC_CYAN +#define g TC_GREEN +#define m TC_MAGENTA +#define r TC_RED +#define w TC_WHITE +#define K (TC_BLACK | TC_LIGHT) +#define B (TC_BLUE | TC_LIGHT) +#define Y (TC_BROWN | TC_LIGHT) +#define C (TC_CYAN | TC_LIGHT) +#define G (TC_GREEN | TC_LIGHT) +#define M (TC_MAGENTA | TC_LIGHT) +#define R (TC_RED | TC_LIGHT) +#define W (TC_WHITE | TC_LIGHT) + +/** + * The xterm-256 color map has steps of 0x28 (in the range 0-0xff), except + * for the first step which is 0x5f. Scale to the range 0-6 by dividing + * by 0x28 and rounding down. The range of 0-5 cannot represent the + * larger first step. + * + * This table is generated by the follow rules: + * - if all components are equal, the result is black for (0, 0, 0) and + * (2, 2, 2), else white; otherwise: + * - subtract the smallest component from all components + * - if this gives only one nonzero component, then that is the color + * - else if one component is 2 or more larger than the other nonzero one, + * then that component gives the color + * - else there are 2 nonzero components. The color is that of a small + * equal mixture of these components (cyan, yellow or magenta). E.g., + * (0, 5, 6) (Turquoise2) is a much purer cyan than (0, 2, 3) + * (DeepSkyBlue4), but we map both to cyan since we can't represent + * delicate shades of either blue or cyan and blue would be worse. + * Here it is important that components of 1 never occur. Blue would + * be twice as large as green in (0, 1, 2). + */ +static const teken_color_t teken_256to8tab[] = { + /* xterm normal colors: */ + k, r, g, y, b, m, c, w, + + /* xterm bright colors: */ + k, r, g, y, b, m, c, w, + + /* Red0 submap. */ + k, b, b, b, b, b, + g, c, c, b, b, b, + g, c, c, c, b, b, + g, g, c, c, c, b, + g, g, g, c, c, c, + g, g, g, g, c, c, + + /* Red2 submap. */ + r, m, m, b, b, b, + y, k, b, b, b, b, + y, g, c, c, b, b, + g, g, c, c, c, b, + g, g, g, c, c, c, + g, g, g, g, c, c, + + /* Red3 submap. */ + r, m, m, m, b, b, + y, r, m, m, b, b, + y, y, w, b, b, b, + y, y, g, c, c, b, + g, g, g, c, c, c, + g, g, g, g, c, c, + + /* Red4 submap. */ + r, r, m, m, m, b, + r, r, m, m, m, b, + y, y, r, m, m, b, + y, y, y, w, b, b, + y, y, y, g, c, c, + g, g, g, g, c, c, + + /* Red5 submap. */ + r, r, r, m, m, m, + r, r, r, m, m, m, + r, r, r, m, m, m, + y, y, y, r, m, m, + y, y, y, y, w, b, + y, y, y, y, g, c, + + /* Red6 submap. */ + r, r, r, r, m, m, + r, r, r, r, m, m, + r, r, r, r, m, m, + r, r, r, r, m, m, + y, y, y, y, r, m, + y, y, y, y, y, w, + + /* Grey submap. */ + k, k, k, k, k, k, + k, k, k, k, k, k, + w, w, w, w, w, w, + w, w, w, w, w, w, +}; + +/* + * This table is generated from the previous one by setting TC_LIGHT for + * entries whose luminosity in the xterm256 color map is 60% or larger. + * Thus the previous table is currently not really needed. It will be + * used for different fine tuning of the tables. + */ +static const teken_color_t teken_256to16tab[] = { + /* xterm normal colors: */ + k, r, g, y, b, m, c, w, + + /* xterm bright colors: */ + K, R, G, Y, B, M, C, W, + + /* Red0 submap. */ + k, b, b, b, b, b, + g, c, c, b, b, b, + g, c, c, c, b, b, + g, g, c, c, c, b, + g, g, g, c, c, c, + g, g, g, g, c, c, + + /* Red2 submap. */ + r, m, m, b, b, b, + y, K, b, b, B, B, + y, g, c, c, B, B, + g, g, c, c, C, B, + g, G, G, C, C, C, + g, G, G, G, C, C, + + /* Red3 submap. */ + r, m, m, m, b, b, + y, r, m, m, B, B, + y, y, w, B, B, B, + y, y, G, C, C, B, + g, G, G, C, C, C, + g, G, G, G, C, C, + + /* Red4 submap. */ + r, r, m, m, m, b, + r, r, m, m, M, B, + y, y, R, M, M, B, + y, y, Y, W, B, B, + y, Y, Y, G, C, C, + g, G, G, G, C, C, + + /* Red5 submap. */ + r, r, r, m, m, m, + r, R, R, M, M, M, + r, R, R, M, M, M, + y, Y, Y, R, M, M, + y, Y, Y, Y, W, B, + y, Y, Y, Y, G, C, + + /* Red6 submap. */ + r, r, r, r, m, m, + r, R, R, R, M, M, + r, R, R, R, M, M, + r, R, R, R, M, M, + y, Y, Y, Y, R, M, + y, Y, Y, Y, Y, W, + + /* Grey submap. */ + k, k, k, k, k, k, + K, K, K, K, K, K, + w, w, w, w, w, w, + W, W, W, W, W, W, +}; + +#undef k +#undef b +#undef y +#undef c +#undef g +#undef m +#undef r +#undef w +#undef K +#undef B +#undef Y +#undef C +#undef G +#undef M +#undef R +#undef W + teken_color_t teken_256to8(teken_color_t c) { - unsigned int r, g, b; - if (c < 16) { - /* Traditional color indices. */ - return (c % 8); - } else if (c >= 244) { - /* Upper grayscale colors. */ - return (TC_WHITE); - } else if (c >= 232) { - /* Lower grayscale colors. */ - return (TC_BLACK); - } + return (teken_256to8tab[c % 256]); +} - /* Convert to RGB. */ - c -= 16; - b = c % 6; - g = (c / 6) % 6; - r = c / 36; +teken_color_t +teken_256to16(teken_color_t c) +{ - if (r < g) { - /* Possibly green. */ - if (g < b) - return (TC_BLUE); - else if (g > b) - return (TC_GREEN); - else - return (TC_CYAN); - } else if (r > g) { - /* Possibly red. */ - if (r < b) - return (TC_BLUE); - else if (r > b) - return (TC_RED); - else - return (TC_MAGENTA); - } else { - /* Possibly brown. */ - if (g < b) - return (TC_BLUE); - else if (g > b) - return (TC_BROWN); - else if (r < 3) - return (TC_BLACK); - else - return (TC_WHITE); - } + return (teken_256to16tab[c % 256]); } static const char * const special_strings_cons25[] = { Modified: stable/11/sys/teken/teken.h ============================================================================== --- stable/11/sys/teken/teken.h Wed Mar 14 07:39:28 2018 (r330915) +++ stable/11/sys/teken/teken.h Wed Mar 14 07:47:26 2018 (r330916) @@ -56,6 +56,7 @@ typedef unsigned char teken_color_t; #define TC_CYAN 6 #define TC_WHITE 7 #define TC_NCOLORS 8 +#define TC_LIGHT 8 /* ORed with the others. */ typedef struct { teken_unit_t tp_row; @@ -203,6 +204,7 @@ void teken_set_8bit(teken_t *); void teken_set_cons25(teken_t *); /* Color conversion. */ +teken_color_t teken_256to16(teken_color_t); teken_color_t teken_256to8(teken_color_t); #endif /* !_TEKEN_H_ */ Modified: stable/11/sys/teken/teken_subr_compat.h ============================================================================== --- stable/11/sys/teken/teken_subr_compat.h Wed Mar 14 07:39:28 2018 (r330915) +++ stable/11/sys/teken/teken_subr_compat.h Wed Mar 14 07:47:26 2018 (r330916) @@ -40,23 +40,16 @@ static void teken_subr_cons25_set_adapter_background(teken_t *t, unsigned int c) { - t->t_defattr.ta_bgcolor = cons25_colors[c % 8]; - t->t_curattr.ta_bgcolor = cons25_colors[c % 8]; + t->t_defattr.ta_bgcolor = cons25_colors[c % 8] | (c & 8); + t->t_curattr.ta_bgcolor = cons25_colors[c % 8] | (c & 8); } static void teken_subr_cons25_set_adapter_foreground(teken_t *t, unsigned int c) { - t->t_defattr.ta_fgcolor = cons25_colors[c % 8]; - t->t_curattr.ta_fgcolor = cons25_colors[c % 8]; - if (c >= 8) { - t->t_defattr.ta_format |= TF_BOLD; - t->t_curattr.ta_format |= TF_BOLD; - } else { - t->t_defattr.ta_format &= ~TF_BOLD; - t->t_curattr.ta_format &= ~TF_BOLD; - } + t->t_defattr.ta_fgcolor = cons25_colors[c % 8] | (c & 8); + t->t_curattr.ta_fgcolor = cons25_colors[c % 8] | (c & 8); } static const teken_color_t cons25_revcolors[8] = { 0, 4, 2, 6, 1, 5, 3, 7 }; From owner-svn-src-all@freebsd.org Wed Mar 14 07:51:34 2018 Return-Path: Delivered-To: svn-src-all@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 87E83653E; Wed, 14 Mar 2018 07:51: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 353C272CFE; Wed, 14 Mar 2018 07:51: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 3001B25354; Wed, 14 Mar 2018 07:51: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 w2E7pXbX073274; Wed, 14 Mar 2018 07:51:33 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E7pXSH073273; Wed, 14 Mar 2018 07:51:33 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140751.w2E7pXSH073273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 07:51:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330917 - stable/11/sys/dev/vt X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/vt X-SVN-Commit-Revision: 330917 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 07:51:34 -0000 Author: eadler Date: Wed Mar 14 07:51:33 2018 New Revision: 330917 URL: https://svnweb.freebsd.org/changeset/base/330917 Log: MFC r317174: Revert r316796. It is not necessary since r317173. Modified: stable/11/sys/dev/vt/vt_cpulogos.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vt/vt_cpulogos.c ============================================================================== --- stable/11/sys/dev/vt/vt_cpulogos.c Wed Mar 14 07:47:26 2018 (r330916) +++ stable/11/sys/dev/vt/vt_cpulogos.c Wed Mar 14 07:51:33 2018 (r330917) @@ -153,7 +153,6 @@ vt_fini_logos(void *dummy __unused) struct winsize wsz; term_pos_t size; unsigned int i; - int row; if (!vt_draw_logo_cpus) return; @@ -171,7 +170,7 @@ vt_fini_logos(void *dummy __unused) vt_draw_logo_cpus = 0; VT_UNLOCK(vd); - for (i = row = 0; i < VT_MAXWINDOWS; i++) { + for (i = 0; i < VT_MAXWINDOWS; i++) { vw = vd->vd_windows[i]; if (vw == NULL) continue; @@ -194,16 +193,11 @@ vt_fini_logos(void *dummy __unused) vt_compute_drawable_area(vw); if (vd->vd_curwindow == vw) { - row = vw->vw_draw_area.tr_begin.tp_row; vd->vd_flags |= VDF_INVALID; vt_resume_flush_timer(vd, 0); } VT_UNLOCK(vd); } - - if (row > 0 && vd->vd_driver->vd_drawrect != NULL) - vd->vd_driver->vd_drawrect(vd, 0, 0, vd->vd_width, row - 1, - 1, TC_BLACK); } static void From owner-svn-src-all@freebsd.org Wed Mar 14 07:55:31 2018 Return-Path: Delivered-To: svn-src-all@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 DB0DE69F5; Wed, 14 Mar 2018 07:55:30 +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 86C9E7326C; Wed, 14 Mar 2018 07:55:30 +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 7E35D2539B; Wed, 14 Mar 2018 07:55:30 +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 w2E7tU12077720; Wed, 14 Mar 2018 07:55:30 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E7tUKB077717; Wed, 14 Mar 2018 07:55:30 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140755.w2E7tUKB077717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 07:55:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330918 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330918 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 07:55:31 -0000 Author: eadler Date: Wed Mar 14 07:55:29 2018 New Revision: 330918 URL: https://svnweb.freebsd.org/changeset/base/330918 Log: MFC r315984: Restore switching to a separate kernel terminal "input" state and extend it to a separate state for each CPU. Terminal "input" is user or kernel output. Its state includes the current parser state for escape sequences and multi-byte characters, and some results of previous parsing (mainly attributes), and in teken the cursor position, but not completed output. This state must be switched for kernel output since the kernel can preempt anything, including itself, and this must not affect the preempted state more than necessary. Since vty0 is shared, it is necessary to affect the frame buffer and cursor position and history, but escape sequences must not be affected and attributes for further output must not be affected. This used to work. The syscons terminal state contained mainly the parser state for escape sequences and attributes, but not the cursor position, and was switched. This was first broken by SMP and/or preemptive kernels. Then there should really be a separate state for each thread, and one more for ddb, or locking to prevent preemption. Serialization of printf() helps. But it is arcane that full syscons escape sequences mostly work in kernel printf(), and I have never seen them used except by me to test this fix. They worked perfectly except for the races, since "input" from the kernel was not special in any way. This was broken to use teken. The general switch was removed, and the kernel normal attribute was switched specially. The kernel reverse attribute (config option SC_CONS_REVERSE_ATTR) became unused, and is still unusable because teken doesn't support default reverse attributes (it used to only be used via the ANSI escape sequence to set reverse video). The only new difficulty for using teken seems to be that the cursor position is in the "input" state, so it must be updated in the active input state for each half of the switch. Do this to complete the restoration. The per-CPU state is mainly to make per-CPU coloring work cleanly, at a cost of some space. Each CPU gets its own full set of attribute (not just the current attribute) maintained in the usual way. This also reduces races from unserialized printf()s. However, this gives races for serialized printf()s that otherwise have none. Nothing prevents the CPU doing the a printf() changing in the middle of an escape sequence. Modified: stable/11/sys/dev/syscons/scterm-teken.c stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/scterm-teken.c ============================================================================== --- stable/11/sys/dev/syscons/scterm-teken.c Wed Mar 14 07:51:33 2018 (r330917) +++ stable/11/sys/dev/syscons/scterm-teken.c Wed Mar 14 07:55:29 2018 (r330918) @@ -164,23 +164,12 @@ scteken_term(scr_stat *scp, void **softc) } static void -scteken_puts(scr_stat *scp, u_char *buf, int len, int kernel) +scteken_puts(scr_stat *scp, u_char *buf, int len) { teken_stat *ts = scp->ts; - teken_attr_t backup, kattr; scp->sc->write_in_progress++; - if (kernel) { - /* Use special colors for kernel messages. */ - backup = *teken_get_curattr(&ts->ts_teken); - scteken_sc_to_te_attr(sc_kattr(), &kattr); - teken_set_curattr(&ts->ts_teken, &kattr); - teken_input(&ts->ts_teken, buf, len); - teken_set_curattr(&ts->ts_teken, &backup); - } else { - /* Print user messages with regular colors. */ - teken_input(&ts->ts_teken, buf, len); - } + teken_input(&ts->ts_teken, buf, len); scp->sc->write_in_progress--; } Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:51:33 2018 (r330917) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:55:29 2018 (r330918) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -99,6 +100,7 @@ static int sc_console_unit = -1; static int sc_saver_keyb_only = 1; static scr_stat *sc_console; static struct consdev *sc_consptr; +static void *kernel_console_ts[MAXCPU]; static scr_stat main_console; static struct tty *main_devs[MAXCONS]; @@ -183,7 +185,7 @@ static void scshutdown(void *, int); static void scsuspend(void *); static void scresume(void *); static u_int scgetc(sc_softc_t *sc, u_int flags, struct sc_cnstate *sp); -static void sc_puts(scr_stat *scp, u_char *buf, int len, int kernel); +static void sc_puts(scr_stat *scp, u_char *buf, int len); #define SCGETC_CN 1 #define SCGETC_NONBLOCK 2 static void sccnupdate(scr_stat *scp); @@ -220,6 +222,7 @@ static void update_font(scr_stat *); static int save_kbd_state(scr_stat *scp); static int update_kbd_state(scr_stat *scp, int state, int mask); static int update_kbd_leds(scr_stat *scp, int which); +static int sc_kattr(void); static timeout_t blink_screen; static struct tty *sc_alloc_tty(int, int); @@ -397,7 +400,7 @@ sctty_outwakeup(struct tty *tp) if (len == 0) break; SC_VIDEO_LOCK(scp->sc); - sc_puts(scp, buf, len, 0); + sc_puts(scp, buf, len); SC_VIDEO_UNLOCK(scp->sc); } } @@ -544,7 +547,8 @@ sc_attach_unit(int unit, int flags) sc_softc_t *sc; scr_stat *scp; struct cdev *dev; - int vc; + void *oldts, *ts; + int i, vc; if (!vty_enabled(VTY_SC)) return ENXIO; @@ -559,8 +563,27 @@ sc_attach_unit(int unit, int flags) /* assert(sc_console != NULL) */ flags |= SC_KERNEL_CONSOLE; scmeminit(NULL); + + scinit(unit, flags); + + if (sc_console->tsw->te_size > 0) { + /* assert(sc_console->ts != NULL); */ + oldts = sc_console->ts; + for (i = 0; i <= mp_maxid; i++) { + ts = malloc(sc_console->tsw->te_size, M_DEVBUF, M_WAITOK); + bcopy(oldts, ts, sc_console->tsw->te_size); + sc_console->ts = ts; + (*sc_console->tsw->te_default_attr)(sc_console, sc_kattrtab[i], + SC_KERNEL_CONS_REV_ATTR); + kernel_console_ts[i] = ts; + } + sc_console->ts = oldts; + (*sc_console->tsw->te_default_attr)(sc_console, SC_NORM_ATTR, + SC_NORM_REV_ATTR); + } + } else { + scinit(unit, flags); } - scinit(unit, flags); sc = sc_get_softc(unit, flags & SC_KERNEL_CONSOLE); sc->config = flags; @@ -1888,6 +1911,7 @@ sc_cnputc(struct consdev *cd, int c) struct sc_cnstate st; u_char buf[1]; scr_stat *scp = sc_console; + void *oldts, *ts; #ifndef SC_NO_HISTORY #if 0 struct tty *tp; @@ -1951,7 +1975,16 @@ sc_cnputc(struct consdev *cd, int c) if (atomic_load_acq_int(&sc_cnputc_loghead) - sc_cnputc_logtail >= sizeof(sc_cnputc_log)) continue; - sc_puts(scp, buf, 1, 1); + /* Console output has a per-CPU "input" state. Switch for it. */ + oldts = scp->ts; + ts = kernel_console_ts[PCPU_GET(cpuid)]; + if (ts != NULL) { + scp->ts = ts; + (*scp->tsw->te_set_cursor)(scp, scp->xpos, scp->ypos); + } + sc_puts(scp, buf, 1); + scp->ts = oldts; + (*scp->tsw->te_set_cursor)(scp, scp->xpos, scp->ypos); } s = spltty(); /* block sckbdevent and scrn_timer */ @@ -2901,7 +2934,7 @@ exchange_scr(sc_softc_t *sc) } static void -sc_puts(scr_stat *scp, u_char *buf, int len, int kernel) +sc_puts(scr_stat *scp, u_char *buf, int len) { #ifdef DEV_SPLASH /* make screensaver happy */ @@ -2910,7 +2943,7 @@ sc_puts(scr_stat *scp, u_char *buf, int len, int kerne #endif if (scp->tsw) - (*scp->tsw->te_puts)(scp, buf, len, kernel); + (*scp->tsw->te_puts)(scp, buf, len); if (scp->sc->delayed_next_scr) sc_switch_scr(scp->sc, scp->sc->delayed_next_scr - 1); } @@ -3150,7 +3183,8 @@ scinit(int unit, int flags) (void *)sc_buffer, FALSE); if (sc_init_emulator(scp, SC_DFLT_TERM)) sc_init_emulator(scp, "*"); - (*scp->tsw->te_default_attr)(scp, SC_NORM_ATTR, SC_NORM_REV_ATTR); + (*scp->tsw->te_default_attr)(scp, SC_KERNEL_CONS_ATTR, + SC_KERNEL_CONS_REV_ATTR); } else { /* assert(sc_malloc) */ sc->dev = malloc(sizeof(struct tty *)*sc->vtys, M_DEVBUF, @@ -4086,9 +4120,11 @@ sc_bell(scr_stat *scp, int pitch, int duration) } } -int +static int sc_kattr(void) { + if (sc_console == NULL) + return (SC_KERNEL_CONS_ATTR); return (sc_kattrtab[PCPU_GET(cpuid) % nitems(sc_kattrtab)]); } Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Wed Mar 14 07:51:33 2018 (r330917) +++ stable/11/sys/dev/syscons/syscons.h Wed Mar 14 07:55:29 2018 (r330918) @@ -391,7 +391,7 @@ typedef int sc_term_init_t(scr_stat *scp, void **tcp, #define SC_TE_COLD_INIT 0 #define SC_TE_WARM_INIT 1 typedef int sc_term_term_t(scr_stat *scp, void **tcp); -typedef void sc_term_puts_t(scr_stat *scp, u_char *buf, int len, int kernel); +typedef void sc_term_puts_t(scr_stat *scp, u_char *buf, int len); typedef int sc_term_ioctl_t(scr_stat *scp, struct tty *tp, u_long cmd, caddr_t data, struct thread *td); typedef int sc_term_reset_t(scr_stat *scp, int code); @@ -593,7 +593,6 @@ void sc_paste(scr_stat *scp, const u_char *p, int cou void sc_respond(scr_stat *scp, const u_char *p, int count, int wakeup); void sc_bell(scr_stat *scp, int pitch, int duration); -int sc_kattr(void); /* schistory.c */ #ifndef SC_NO_HISTORY From owner-svn-src-all@freebsd.org Wed Mar 14 07:58:12 2018 Return-Path: Delivered-To: svn-src-all@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 4DE5EF2B057; Wed, 14 Mar 2018 07:58:12 +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 EF1647345D; Wed, 14 Mar 2018 07:58:11 +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 E9EDC2539F; Wed, 14 Mar 2018 07:58:11 +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 w2E7wBhT077845; Wed, 14 Mar 2018 07:58:11 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E7wB2x077842; Wed, 14 Mar 2018 07:58:11 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140758.w2E7wB2x077842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 07:58:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330919 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 07:58:12 -0000 Author: eadler Date: Wed Mar 14 07:58:11 2018 New Revision: 330919 URL: https://svnweb.freebsd.org/changeset/base/330919 Log: MFC r316136: The switch to kernel terminal context needs to update more than the cursor position. Especially the screen size, and potentially everything except the input state and attributes. Do this by changing the cursor position setting method to a general syncing method. Use proper constructors instead of copying to create kernel terminal contexts. We really want clones and not new instances, but there is no method for cloning and there is nothing in the active instance that needs to be cloned exactly. Add proper destructors for kernel terminal contexts. I doubt that the destructor code has every been reached, but if it was then it leaked the memory of the clones. Remove freeing of statically allocated memory for the non-kernel terminal context for the same terminal as the kernel. This is in the nearly unreachable code. This used to not happen because delicate context swapping made the user context use the dynamic memory and kernel context the static memory. I didn't restore this swapping since it would have been unnatural to have all kernel contexts except 1 dynamic. The constructor for terminal context has bad layering for reasons related to the bug. It has to return static memory early before malloc() works. Callers also can't allocate memory until after the first constructor selects an emulator and tells upper layers the size of its context. After that, the cloning hack required the cloning code to allocate the memory, but for all other constructors it would be better for the terminal layer to allocate and deallocate the memory in all cases. Zero the memory when allocating terminal contexts dynamically. Modified: stable/11/sys/dev/syscons/scterm-teken.c stable/11/sys/dev/syscons/syscons.c stable/11/sys/dev/syscons/syscons.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/scterm-teken.c ============================================================================== --- stable/11/sys/dev/syscons/scterm-teken.c Wed Mar 14 07:55:29 2018 (r330918) +++ stable/11/sys/dev/syscons/scterm-teken.c Wed Mar 14 07:58:11 2018 (r330919) @@ -64,7 +64,7 @@ static sc_term_default_attr_t scteken_default_attr; static sc_term_clear_t scteken_clear; static sc_term_input_t scteken_input; static sc_term_fkeystr_t scteken_fkeystr; -static sc_term_set_cursor_t scteken_set_cursor; +static sc_term_sync_t scteken_sync; static void scteken_nop(void); typedef struct { @@ -91,7 +91,7 @@ static sc_term_sw_t sc_term_scteken = { (sc_term_notify_t *)scteken_nop, scteken_input, scteken_fkeystr, - scteken_set_cursor, + scteken_sync, }; SCTERM_MODULE(scteken, sc_term_scteken); @@ -221,7 +221,7 @@ scteken_clear(scr_stat *scp) teken_stat *ts = scp->ts; sc_move_cursor(scp, 0, 0); - scteken_set_cursor(scp, 0, 0); + scteken_sync(scp); sc_vtb_clear(&scp->vtb, scp->sc->scr_map[0x20], scteken_te_to_sc_attr(teken_get_curattr(&ts->ts_teken)) << 8); @@ -286,13 +286,16 @@ scteken_fkeystr(scr_stat *scp, int c) } static void -scteken_set_cursor(scr_stat *scp, int col, int row) +scteken_sync(scr_stat *scp) { teken_stat *ts = scp->ts; teken_pos_t tp; - tp.tp_col = col; - tp.tp_row = row; + tp.tp_col = scp->xsize; + tp.tp_row = scp->ysize; + teken_set_winsize_noreset(&ts->ts_teken, &tp); + tp.tp_col = scp->xpos; + tp.tp_row = scp->ypos; teken_set_cursor(&ts->ts_teken, &tp); } Modified: stable/11/sys/dev/syscons/syscons.c ============================================================================== --- stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:55:29 2018 (r330918) +++ stable/11/sys/dev/syscons/syscons.c Wed Mar 14 07:58:11 2018 (r330919) @@ -570,8 +570,9 @@ sc_attach_unit(int unit, int flags) /* assert(sc_console->ts != NULL); */ oldts = sc_console->ts; for (i = 0; i <= mp_maxid; i++) { - ts = malloc(sc_console->tsw->te_size, M_DEVBUF, M_WAITOK); - bcopy(oldts, ts, sc_console->tsw->te_size); + ts = malloc(sc_console->tsw->te_size, M_DEVBUF, + M_WAITOK | M_ZERO); + (*sc_console->tsw->te_init)(sc_console, &ts, SC_TE_COLD_INIT); sc_console->ts = ts; (*sc_console->tsw->te_default_attr)(sc_console, sc_kattrtab[i], SC_KERNEL_CONS_REV_ATTR); @@ -1708,6 +1709,9 @@ sc_cninit(struct consdev *cp) static void sc_cnterm(struct consdev *cp) { + void *ts; + int i; + /* we are not the kernel console any more, release everything */ if (sc_console_unit < 0) @@ -1718,6 +1722,12 @@ sc_cnterm(struct consdev *cp) sccnupdate(sc_console); #endif + for (i = 0; i <= mp_maxid; i++) { + ts = kernel_console_ts[i]; + kernel_console_ts[i] = NULL; + (*sc_console->tsw->te_term)(sc_console, &ts); + free(ts, M_DEVBUF); + } scterm(sc_console_unit, SC_KERNEL_CONSOLE); sc_console_unit = -1; sc_console = NULL; @@ -1980,11 +1990,11 @@ sc_cnputc(struct consdev *cd, int c) ts = kernel_console_ts[PCPU_GET(cpuid)]; if (ts != NULL) { scp->ts = ts; - (*scp->tsw->te_set_cursor)(scp, scp->xpos, scp->ypos); + (*scp->tsw->te_sync)(scp); } sc_puts(scp, buf, 1); scp->ts = oldts; - (*scp->tsw->te_set_cursor)(scp, scp->xpos, scp->ypos); + (*scp->tsw->te_sync)(scp); } s = spltty(); /* block sckbdevent and scrn_timer */ @@ -3211,7 +3221,7 @@ scinit(int unit, int flags) scp->xpos = col; scp->ypos = row; scp->cursor_pos = scp->cursor_oldpos = row*scp->xsize + col; - (*scp->tsw->te_set_cursor)(scp, col, row); + (*scp->tsw->te_sync)(scp); /* Sync BIOS cursor shape to s/w (sc only). */ if (bios_value.cursor_end < scp->font_size) @@ -3330,12 +3340,11 @@ scterm(int unit, int flags) scp = sc_get_stat(sc->dev[0]); if (scp->tsw) (*scp->tsw->te_term)(scp, &scp->ts); - if (scp->ts != NULL) - free(scp->ts, M_DEVBUF); mtx_destroy(&sc->video_mtx); /* clear the structure */ if (!(flags & SC_KERNEL_CONSOLE)) { + free(scp->ts, M_DEVBUF); /* XXX: We need delete_dev() for this */ free(sc->dev, M_DEVBUF); #if 0 Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Wed Mar 14 07:55:29 2018 (r330918) +++ stable/11/sys/dev/syscons/syscons.h Wed Mar 14 07:58:11 2018 (r330919) @@ -404,7 +404,7 @@ typedef void sc_term_notify_t(scr_stat *scp, int event #define SC_TE_NOTIFY_VTSWITCH_OUT 1 typedef int sc_term_input_t(scr_stat *scp, int c, struct tty *tp); typedef const char *sc_term_fkeystr_t(scr_stat *scp, int c); -typedef void sc_term_set_cursor_t(scr_stat *scp, int col, int row); +typedef void sc_term_sync_t(scr_stat *scp); typedef struct sc_term_sw { LIST_ENTRY(sc_term_sw) link; @@ -423,7 +423,7 @@ typedef struct sc_term_sw { sc_term_notify_t *te_notify; sc_term_input_t *te_input; sc_term_fkeystr_t *te_fkeystr; - sc_term_set_cursor_t *te_set_cursor; + sc_term_sync_t *te_sync; } sc_term_sw_t; #define SCTERM_MODULE(name, sw) \ From owner-svn-src-all@freebsd.org Wed Mar 14 08:15:27 2018 Return-Path: Delivered-To: svn-src-all@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 0A76AF2D6BA; Wed, 14 Mar 2018 08:15:27 +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 B35B673F84; Wed, 14 Mar 2018 08:15:26 +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 ADFC9256B5; Wed, 14 Mar 2018 08:15:26 +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 w2E8FQJH087732; Wed, 14 Mar 2018 08:15:26 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E8FQKO087728; Wed, 14 Mar 2018 08:15:26 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140815.w2E8FQKO087728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 08:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330920 - stable/11/sys/dev/syscons X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/syscons X-SVN-Commit-Revision: 330920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 08:15:27 -0000 Author: eadler Date: Wed Mar 14 08:15:26 2018 New Revision: 330920 URL: https://svnweb.freebsd.org/changeset/base/330920 Log: MFC r316636,r316642,r316675,r316733,r316737,r316741,r316827,r316830,r316865,r316878: Fix removal of the keyboard cursor image in text mode, especially in the vga renderer. Removal used stale attributes and didn't try to merge with the current attribute for cut marking, so special rendering of cut marking was lost in many cases. The gfb renderer is too broken to support special rendering of cut marking at all, so this change is supposed to be just a style fix for it. Remove all traces of the saveunder method which was used to implement this bug. Fix drawing of the cursor image in text mode, only in the vga renderer. This used a stale attribute from the frame buffer instead of from the saveunder, but did merge with the current attribute for cut marking so it caused less obvious bugs (subtle misrendering for the character under the cursor). The saveunder method may be good in simpler drivers, but in syscons the 'under' is already saved in a better way in the vtb. Just redraw it from there, with visible complications for cut marking and invisible complications for mouse cursors. Almost all drawing requests are passed a flag 'flip' which currently means to flip to reverse video for characters in the cut marking region, but should mean that the the characters are in the cut marking regions so should be rendered specially, preferably using something better than reverse video. The gfb renderer always ignores this flag. The vga renderer ignored it for removal of the text cursor -- the saveunder gave the stale rendering at the time the cursor was drawn. Mouse cursors need even more complicated methods. They are handled by drawing them last and removing them first. Removing them usually redraws many other characters with the correct cut marking (but transiently loses the keyboard cursor, which is redrawn soon). This tended to hide the saveunder bug for forward motions of the keyboard cursor. But slow backward motions of the keyboard cursor always lost the cut marking, and fast backwards motions lost in for about 4 in every 5 characters, depending on races with the scrn_update() timeout handler. This is because the forward motions are usually into the region redrawn for the mouse cursor, while backwards motions rarely are. Text cursor drawing in the vga renderer used also used a possibly-stale copy of the character and its attribute. The vga render has the "optimization" of sometimes reading characters from the screen instead of from the vtb (this was not so good even in 1990 when main memory was only a few times faster than video RAM). Due to care in update orders, the character is never stale, but its attribute might be (just the cut marking part, again due to care in order). gfb doesn't have the scp->scr pointer used for the "optimization", and vga only uses this pointer for text mode. So most cases have to refresh from the vtb, and we can be sure that the ordering of vtb updates and drawing is as required for this to work. ------------------------------------------------------------------------ r316642 | bde | 2017-04-08 10:00:39 +0000 (Sat, 08 Apr 2017) | 36 lines Quick fix for removal of the mouse cursor in vga direct graphics modes (that is, in all supported 8, 15, 16 and 24-color modes). Moving the mouse cursor while holding down a button (giving cut marking) left a trail of garbage from misremoved mouse cursors (usually colored rectangles and not cursor shapes). Cases with a button not held down worked better and may even have worked. No renderer support for removing (software) mouse cursors is needed (and many renderers don't have any), since sc_remove_mouse_image() marks for update the region containing the image and usually much more. The mouse cursor can be (partially) over as many as 4 character cells, and removing it in only the 1-4 cells occupied by it would be best for efficiency and for avoiding flicker. However, sc_remove_mouse_image() can only mark a single linear region and usually marks a full row of cells and 1 more to be sure to cover the 4 cells. It always does this, so using the special rendering method just wastes even more time and gives even more flicker. The special methods will be removed soon. The general method always works. vga_pxlmouse_direct() appeared to defer to it by returning immediately if !on. However, vga_pxlmouse_direct() actually did foot-shooting using a disguised saveunder method. Normal order near a mouse move is: (1) remove the mouse cursor in the renderer (optional) (2) remove the mouse cursor again and refresh the screen over the mouse cursor and much more from the vtb. When the mouse has actually moved and a button is down, many attributes in this region are changed to be up to date with the new cut marking (3) draw the keyboard cursor again if it was clobbered by the update (4) draw the mouse cursor image in its new position. The bug was to remove the mouse cursor again in step (4), before the drawing it again in (4), using a saveunder that was valid in step (1) at best. The quick fix is to use the saveunder in step (1) and not in step (4). Using it in step (4) also used it before it was initialized, initially and after mode and screen switches. ------------------------------------------------------------------------ r316675 | bde | 2017-04-10 06:19:09 +0000 (Mon, 10 Apr 2017) | 29 lines Special rendering methods for removing mouse cursors cannot be removed like I hoped, since they are needed for removing parts over the border. Continue fixing bugs in them. In the vga planar mode renderer, remove removal of the part of the image over the text window. This was hard-coded for nearly 8x16 fonts and in practice didn't remove enough for 8x8 fonts. This used the wrong attribute over cutmarked regions. The caller refreshes with the correct attribute later, so the attribute bug only caused flicker. The caller uses the same hard-coding, so the refreshes fix up all the spots with the wrong attribute, but keep missing the missed spots. This still gives trails of bits of cursors for cursor motions in the affected configurations (mainly depth 4 modes with 8x8) fonts. 8x14 fonts barely escape the problem since although the cursor is drawn as 16x16, its active part is only 9x13 and the active part fits in the hard-coded 2x2 character cell window for 8x14 fonts. 8x8 fonts need a 2x3 window. In the fb non-sparc64 renderer, the buggy image removal was buggier and was already avoided by returning before it. Remove it completely and fix nearby style bugs. It was essentially the same as for the vga planar mode renderer (obfuscated by swapping x and y). This was buggier since fb should handle more types of hardware so the hard-coding is wronger. The remaining fb image removal is also buggier. It never supported software cursors drawn into the border, and the hardware cursor is probably broken by other bugs to be fixed soon. ------------------------------------------------------------------------ r316733 | bde | 2017-04-12 16:21:55 +0000 (Wed, 12 Apr 2017) | 45 lines Fix clobbering of the default attribute and the screen position in scteken_init(). Move the internals of scteken_sync() into a local function to help do this. scteken_init() reset or adjusted the default attribute and screen position at least 3 and 5 times, respectively. Warm init shouldn't do any more than reset the "input" state. (scterm-sc.c (which still works after minor editing), only resets the escape state and the saved cursor position, and then does a nearly-null sync of the current color.) This mainly broke mode changes, and was most noticeable when the background color is not teken's default (usually black). Then the screen gets cleared in the wrong color. vidcontrol restores the default normal attribute and tries to restore the default reverse attribute. vidcontrol doesn't clear the screen again after restoring the attribute(s), and it is too late to do it there without flicker. Now the default normal attribute is restored before the change affects the rendering. When the foreground color is not teken's default, clearing with the wrong attributes gave strange cursor colors for some cursor types. The default reverse attribute is not restored since it is unsupported. 2/3 of the clobbering was from 2 resetting window resizing calls. The second one is needed to restore the size, but must not reset. Window resizing also sanitizes the cursor position, and after the main reset resets the window size, the cursor row would often be adjusted from 24 to 23 if it were not already reset to 0. scteken_sync() is good for restoring the window size and the cursor position in the correct order, but was unusable at init time since scp->ts is not always initialized then. Adjust to use its internals. I didn't notice any problems from the cursor reset. The cursor should be reset, and a previous fix was to reset it consistently a little later. Doing nothing for warm init works almost as well, if not better. It is not very useful to reset the escape state for mode changes, since the reset is especially likely to be null then. The escape state is most likely to be non-initial and corrupted by its most normal uses -- sloppy non-atomic output where a context switch or just mixing stdout with stderr splits up escape sequences. ------------------------------------------------------------------------ r316737 | bde | 2017-04-12 18:52:06 +0000 (Wed, 12 Apr 2017) | 23 lines Fix removal of mouse image by the vga planar renderer in the right border in unusual cases. Optimize and significantly clean up removal in this renderer. Optimize removal in the vga direct renderer. Removal only needs to be done in the border (the part with pixels) in both cases. The planar renderer used the condition scp->xoff > 0 to test whether a right border exists. This actually tests for a left border, and when the total horizontal border is 8 pixels, rounding gives only a right border. This was the unusual broken case. An example is easy to configure using something like "vidcontrol -f 8x16 iso-8x16 -g 79x25 MODE_27". Optimize the planar case a little by only removing 9x13 active pixels out of 16x16. Optimize it a lot by not doing anything if there is no overlap with the border. Don't unroll the main loop or hard-code so many assumptions about font sizes in it. On my Haswell system, graphics memory and i/o accesses takes about 520 cycles each so optimizations from unrolling are in the noise. Optimize the direct case to not do anything if there is no overlap with the border. Do a sanity check on the saveunder's coordinates. This requires a previous change to pass non-rounded coordinates. ------------------------------------------------------------------------ r316741 | bde | 2017-04-12 20:18:38 +0000 (Wed, 12 Apr 2017) | 24 lines Improve drawing of the vga planar mode mouse image a little. Unobfuscate the method a lot. Reduce the AND mask to the complement of the cursor's frame, so that area inside the frame is not drawn first in black and then in lightwhite. The AND-OR method is only directly suitable for the text mouse image, since it doesn't go to the hardware there. Planar mode Mouse cursor drawing takes 10-20 usec on my Haswell system (approx. 100 graphics accesses at 130 nsec each), so the transient was not visible. The method used the fancy read mode 1 and its color compare and color don't care registers with value 0 in them so that all colors matched. All that this did was make byte reads of frame buffer memory return 0xff, so that the x86 case could obfuscate read+write as "and". The read must be done for its side effect on the graphics controller but is not used, except it must return 0xff to avoid affecting the write when the write is obfuscated as a read-modify-write "and". Perhaps that was a good optimization for 8088 CPUs where each extra instruction byte took as long as a byte memory access. Just use read+write after removing the fancy read mode. Remove x86 ifdefs that did the "and". After removing the "and" in the non-x86 part of the ifdefs, fix 4 of 6 cases where the shift was wrong. ------------------------------------------------------------------------ r316827 | bde | 2017-04-14 12:03:34 +0000 (Fri, 14 Apr 2017) | 19 lines Further unobfuscate the method of drawing the mouse cursor in vga planar mode. Don't manually unroll the 2 inner loops. On Haswell, doing so gave a speedup of about 0.5% (about 4 cycles per iteration out of 1400), but hard-coded a limit of width 9 and made better better optimizations harder to see. gcc-4.2.1 -O does the unrolling anyway, unless tricked with a volatile hack. gcc's unrolling is not very good and gives a a speedup of about half as much (about 2 cycles per iteration). (All timing on i386.) Manual unrolling was only feasible because the inner loop only iterates once or twice. Usually twice, but a dynamic check is needed to decide, and was not moved from the second-innermost loop manually or by gcc. This commit basically adds another dynamic check in the inner loop. Cursor widths of 10-17 require 3 iterations in the inner loop and this is not so easy to unroll -- even gcc stops at 2. ------------------------------------------------------------------------ r316830 | bde | 2017-04-14 14:00:13 +0000 (Fri, 14 Apr 2017) | 13 lines Optimize drawing of the mouse cursor in vga planar mode almost as much as possible, by avoiding null ANDs and ORs to the frame buffer. Mouse cursors are fairly sparse, especially for their frame. Pixels are written in groups of 8 in planar mode and the per-group sparseness is not as large, but it still averages about 40% with the current 9x13 mouse cursor. The average drawing time is reduced by about this amount (from 22 usec constant to 12.5 usec average on Haswell). This optimization is relatively larger with larger cursors. Width 10 requires 6 frame buffer accesses per line instead of 4 if not done sparsely, but rarely more than 4 if done sparsely. ------------------------------------------------------------------------ r316865 | bde | 2017-04-14 17:02:24 +0000 (Fri, 14 Apr 2017) | 10 lines Adjust shifting so that cursor widths up to 17 (was 9) work in vga planar mode. Direct mode always supported widths up to 32, except for its hard-coded 16s matching the pixmap size. Text mode is still limited to 9 its 2x2 character cell method and missing adjustments for the gap between characters, if any. Cursor heights can be almost anything in graphics modes. Modified: stable/11/sys/dev/syscons/scgfbrndr.c stable/11/sys/dev/syscons/scterm-teken.c stable/11/sys/dev/syscons/scvgarndr.c stable/11/sys/dev/syscons/syscons.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/syscons/scgfbrndr.c ============================================================================== --- stable/11/sys/dev/syscons/scgfbrndr.c Wed Mar 14 07:58:11 2018 (r330919) +++ stable/11/sys/dev/syscons/scgfbrndr.c Wed Mar 14 08:15:26 2018 (r330920) @@ -273,13 +273,11 @@ gfb_cursor(scr_stat *scp, int at, int blink, int on, i c = sc_vtb_getc(&scp->vtb, at); vidd_putc(scp->sc->adp, at, c, (a >> 4) | ((a & 0xf) << 4)); - scp->cursor_saveunder_attr = a; - scp->cursor_saveunder_char = c; } else { if (scp->status & VR_CURSOR_ON) vidd_putc(scp->sc->adp, at, - scp->cursor_saveunder_char, - scp->cursor_saveunder_attr); + sc_vtb_getc(&scp->vtb, at), + sc_vtb_geta(&scp->vtb, at) >> 8); scp->status &= ~VR_CURSOR_ON; } } @@ -339,28 +337,14 @@ static void gfb_mouse(scr_stat *scp, int x, int y, int on) { #ifdef __sparc64__ - vidd_putm(scp->sc->adp, x, y, mouse_pointer, - on ? 0xffffffff : 0x0, 22, 12); + vidd_putm(scp->sc->adp, x, y, mouse_pointer, + on ? 0xffffffff : 0x0, 22, 12); #else - int i, pos; - if (on) { - - /* Display the mouse pointer image... */ vidd_putm(scp->sc->adp, x, y, mouse_pointer, 0xffffffff, 16, 8); } else { - - /* - Erase the mouse cursor image by redrawing the text - underneath it... - */ - return; - pos = x*scp->xsize + y; - i = (y < scp->xsize - 1) ? 2 : 1; - (*scp->rndr->draw)(scp, pos, i, FALSE); - if (x < scp->ysize - 1) - (*scp->rndr->draw)(scp, pos + scp->xsize, i, FALSE); + /* XXX: removal is incomplete for h/w cursors and borders. */ } #endif } Modified: stable/11/sys/dev/syscons/scterm-teken.c ============================================================================== --- stable/11/sys/dev/syscons/scterm-teken.c Wed Mar 14 07:58:11 2018 (r330919) +++ stable/11/sys/dev/syscons/scterm-teken.c Wed Mar 14 08:15:26 2018 (r330920) @@ -74,6 +74,8 @@ typedef struct { static teken_stat reserved_teken_stat; +static void scteken_sync_internal(scr_stat *, teken_stat *); + static sc_term_sw_t sc_term_scteken = { { NULL, NULL }, "scteken", /* emulator name */ @@ -118,7 +120,7 @@ static int scteken_init(scr_stat *scp, void **softc, int code) { teken_stat *ts; - teken_pos_t tp; + teken_attr_t ta; if (*softc == NULL) { if (reserved_teken_stat.ts_busy) @@ -133,17 +135,16 @@ scteken_init(scr_stat *scp, void **softc, int code) ts->ts_busy = 1; /* FALLTHROUGH */ case SC_TE_WARM_INIT: + ta = *teken_get_defattr(&ts->ts_teken); teken_init(&ts->ts_teken, &scteken_funcs, scp); + teken_set_defattr(&ts->ts_teken, &ta); #ifndef TEKEN_UTF8 teken_set_8bit(&ts->ts_teken); #endif /* !TEKEN_UTF8 */ #ifdef TEKEN_CONS25 teken_set_cons25(&ts->ts_teken); #endif /* TEKEN_CONS25 */ - - tp.tp_row = scp->ysize; - tp.tp_col = scp->xsize; - teken_set_winsize(&ts->ts_teken, &tp); + scteken_sync_internal(scp, ts); break; } @@ -221,7 +222,7 @@ scteken_clear(scr_stat *scp) teken_stat *ts = scp->ts; sc_move_cursor(scp, 0, 0); - scteken_sync(scp); + scteken_sync_internal(scp, ts); sc_vtb_clear(&scp->vtb, scp->sc->scr_map[0x20], scteken_te_to_sc_attr(teken_get_curattr(&ts->ts_teken)) << 8); @@ -286,9 +287,8 @@ scteken_fkeystr(scr_stat *scp, int c) } static void -scteken_sync(scr_stat *scp) +scteken_sync_internal(scr_stat *scp, teken_stat *ts) { - teken_stat *ts = scp->ts; teken_pos_t tp; tp.tp_col = scp->xsize; @@ -297,6 +297,12 @@ scteken_sync(scr_stat *scp) tp.tp_col = scp->xpos; tp.tp_row = scp->ypos; teken_set_cursor(&ts->ts_teken, &tp); +} + +static void +scteken_sync(scr_stat *scp) +{ + scteken_sync_internal(scp, scp->ts); } static void Modified: stable/11/sys/dev/syscons/scvgarndr.c ============================================================================== --- stable/11/sys/dev/syscons/scvgarndr.c Wed Mar 14 07:58:11 2018 (r330919) +++ stable/11/sys/dev/syscons/scvgarndr.c Wed Mar 14 08:15:26 2018 (r330920) @@ -161,6 +161,8 @@ RENDERER_MODULE(vga, vga_set); #ifndef SC_NO_CUTPASTE #if !defined(SC_ALT_MOUSE_IMAGE) || defined(SC_PIXEL_MODE) +#define MOUSE_IMAGE_HEIGHT 13 +#define MOUSE_IMAGE_WIDTH 9 static u_short mouse_and_mask[16] = { 0xc000, 0xe000, 0xf000, 0xf800, 0xfc00, 0xfe00, 0xff00, 0xff80, 0xfe00, 0x1e00, 0x1f00, 0x0f00, 0x0f00, 0x0000, 0x0000, 0x0000 @@ -296,8 +298,6 @@ draw_txtcharcursor(scr_stat *scp, int at, u_short c, u sc_softc_t *sc; sc = scp->sc; - scp->cursor_saveunder_char = c; - scp->cursor_saveunder_attr = a; #ifndef SC_NO_FONT_LOADING if (scp->curs_attr.flags & CONS_CHAR_CURSOR) { @@ -374,18 +374,18 @@ vga_txtcursor(scr_stat *scp, int at, int blink, int on if (on) { scp->status |= VR_CURSOR_ON; draw_txtcharcursor(scp, at, - sc_vtb_getc(&scp->scr, at), - sc_vtb_geta(&scp->scr, at), + sc_vtb_getc(&scp->vtb, at), + sc_vtb_geta(&scp->vtb, at), flip); } else { - cursor_attr = scp->cursor_saveunder_attr; + cursor_attr = sc_vtb_geta(&scp->vtb, at); if (flip) cursor_attr = (cursor_attr & 0x8800) | ((cursor_attr & 0x7000) >> 4) | ((cursor_attr & 0x0700) << 4); if (scp->status & VR_CURSOR_ON) sc_vtb_putc(&scp->scr, at, - scp->cursor_saveunder_char, + sc_vtb_getc(&scp->vtb, at), cursor_attr); scp->status &= ~VR_CURSOR_ON; } @@ -1032,71 +1032,44 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y) int line_width; int xoff, yoff; int ymax; - u_short m; - int i, j; + uint32_t m; + int i, j, k; + uint8_t m1; line_width = scp->sc->adp->va_line_width; xoff = (x - scp->xoff*8)%8; yoff = y - rounddown(y, line_width); ymax = imin(y + 16, scp->ypixel); - outw(GDCIDX, 0x0805); /* read mode 1, write mode 0 */ + outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ outw(GDCIDX, 0x0001); /* set/reset enable */ - outw(GDCIDX, 0x0002); /* color compare */ - outw(GDCIDX, 0x0007); /* color don't care */ outw(GDCIDX, 0xff08); /* bit mask */ outw(GDCIDX, 0x0803); /* data rotate/function select (and) */ p = scp->sc->adp->va_window + line_width*y + x/8; - if (x < scp->xpixel - 8) { - for (i = y, j = 0; i < ymax; ++i, ++j) { - m = ~(mouse_and_mask[j] >> xoff); -#if defined(__i386__) || defined(__amd64__) - *(u_char *)p &= m >> 8; - *(u_char *)(p + 1) &= m; -#else - writeb(p, readb(p) & (m >> 8)); - writeb(p + 1, readb(p + 1) & (m >> 8)); -#endif - p += line_width; + for (i = y, j = 0; i < ymax; ++i, ++j) { + m = ~((mouse_and_mask[j] & ~mouse_or_mask[j]) << 8 >> xoff); + for (k = 0; k < 3; ++k) { + m1 = m >> (8 * (2 - k)); + if (m1 != 0xff && x + 8 * k < scp->xpixel) { + readb(p + k); + writeb(p + k, m1); + } } - } else { - xoff += 8; - for (i = y, j = 0; i < ymax; ++i, ++j) { - m = ~(mouse_and_mask[j] >> xoff); -#if defined(__i386__) || defined(__amd64__) - *(u_char *)p &= m; -#else - writeb(p, readb(p) & (m >> 8)); -#endif - p += line_width; - } + p += line_width; } outw(GDCIDX, 0x1003); /* data rotate/function select (or) */ p = scp->sc->adp->va_window + line_width*y + x/8; - if (x < scp->xpixel - 8) { - for (i = y, j = 0; i < ymax; ++i, ++j) { - m = mouse_or_mask[j] >> xoff; -#if defined(__i386__) || defined(__amd64__) - *(u_char *)p &= m >> 8; - *(u_char *)(p + 1) &= m; -#else - writeb(p, readb(p) & (m >> 8)); - writeb(p + 1, readb(p + 1) & (m >> 8)); -#endif - p += line_width; + for (i = y, j = 0; i < ymax; ++i, ++j) { + m = mouse_or_mask[j] << 8 >> xoff; + for (k = 0; k < 3; ++k) { + m1 = m >> (8 * (2 - k)); + if (m1 != 0 && x + 8 * k < scp->xpixel) { + readb(p + k); + writeb(p + k, m1); + } } - } else { - for (i = y, j = 0; i < ymax; ++i, ++j) { - m = mouse_or_mask[j] >> xoff; -#if defined(__i386__) || defined(__amd64__) - *(u_char *)p &= m; -#else - writeb(p, readb(p) & (m >> 8)); -#endif - p += line_width; - } + p += line_width; } - outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ outw(GDCIDX, 0x0003); /* data rotate/function select */ } @@ -1104,54 +1077,31 @@ static void remove_pxlmouse_planar(scr_stat *scp, int x, int y) { vm_offset_t p; - int col, row; - int pos; - int line_width; - int ymax; - int i; + int bx, by, i, line_width, xend, xoff, yend, yoff; - /* erase the mouse cursor image */ - col = x/8 - scp->xoff; - row = y/scp->font_size - scp->yoff; - pos = row*scp->xsize + col; - i = (col < scp->xsize - 1) ? 2 : 1; - (*scp->rndr->draw)(scp, pos, i, FALSE); - if (row < scp->ysize - 1) - (*scp->rndr->draw)(scp, pos + scp->xsize, i, FALSE); + /* + * It is only necessary to remove the mouse image where it overlaps + * the border. Determine the overlap, and do nothing if it is empty. + */ + bx = (scp->xoff + scp->xsize) * 8; + by = (scp->yoff + scp->ysize) * scp->font_size; + xend = imin(x + MOUSE_IMAGE_WIDTH, scp->xpixel); + yend = imin(y + MOUSE_IMAGE_HEIGHT, scp->ypixel); + if (xend <= bx && yend <= by) + return; - /* paint border if necessary */ + /* Repaint the non-empty overlap. */ line_width = scp->sc->adp->va_line_width; outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ outw(GDCIDX, 0x0003); /* data rotate/function select */ outw(GDCIDX, 0x0f01); /* set/reset enable */ outw(GDCIDX, 0xff08); /* bit mask */ outw(GDCIDX, (scp->border << 8) | 0x00); /* set/reset */ - if (row == scp->ysize - 1) { - i = (scp->ysize + scp->yoff)*scp->font_size; - ymax = imin(i + scp->font_size, scp->ypixel); - p = scp->sc->adp->va_window + i*line_width + scp->xoff + col; - if (col < scp->xsize - 1) { - for (; i < ymax; ++i) { - writeb(p, 0); - writeb(p + 1, 0); - p += line_width; - } - } else { - for (; i < ymax; ++i) { - writeb(p, 0); - p += line_width; - } - } - } - if ((col == scp->xsize - 1) && (scp->xoff > 0)) { - i = (row + scp->yoff)*scp->font_size; - ymax = imin(i + scp->font_size*2, scp->ypixel); - p = scp->sc->adp->va_window + i*line_width - + scp->xoff + scp->xsize; - for (; i < ymax; ++i) { + for (i = x / 8, xoff = i * 8; xoff < xend; ++i, xoff += 8) { + yoff = (xoff >= bx) ? y : by; + p = scp->sc->adp->va_window + yoff * line_width + i; + for (; yoff < yend; ++yoff, p += line_width) writeb(p, 0); - p += line_width; - } } outw(GDCIDX, 0x0000); /* set/reset */ outw(GDCIDX, 0x0001); /* set/reset enable */ @@ -1171,7 +1121,14 @@ vga_pxlmouse_direct(scr_stat *scp, int x, int y, int o uint8_t *u8; int bpp; - if (!on) + /* + * Determine overlap with the border and then if removing, do nothing + * if the overlap is empty. + */ + xend = imin(x + 16, scp->xpixel); + yend = imin(y + 16, scp->ypixel); + if (!on && xend <= (scp->xoff + scp->xsize) * 8 && + yend <= (scp->yoff + scp->ysize) * scp->font_size) return; bpp = scp->sc->adp->va_info.vi_depth; @@ -1182,9 +1139,18 @@ vga_pxlmouse_direct(scr_stat *scp, int x, int y, int o line_width = scp->sc->adp->va_line_width; pixel_size = scp->sc->adp->va_info.vi_pixel_size; - xend = imin(x + 16, scp->xpixel); - yend = imin(y + 16, scp->ypixel); + if (on) + goto do_on; + /* + * Repaint overlap with the border and nearby. Unlike in the planar + * case, we kept track of everything under the cursor so can restore + * it all, but we don't completely trust the saved state to be still + * relevant, so do nothing if it is obviously stale. + */ + if (x != x_old || y != y_old || xend != xend_old || yend != yend_old) + return; + p = scp->sc->adp->va_window + y_old * line_width + x_old * pixel_size; for (i = 0; i < (yend_old - y_old); i++) { @@ -1209,7 +1175,9 @@ vga_pxlmouse_direct(scr_stat *scp, int x, int y, int o p += line_width; } + return; +do_on: p = scp->sc->adp->va_window + y * line_width + x * pixel_size; for (i = 0; i < (yend - y); i++) { Modified: stable/11/sys/dev/syscons/syscons.h ============================================================================== --- stable/11/sys/dev/syscons/syscons.h Wed Mar 14 07:58:11 2018 (r330919) +++ stable/11/sys/dev/syscons/syscons.h Wed Mar 14 08:15:26 2018 (r330920) @@ -322,8 +322,6 @@ typedef struct scr_stat { int cursor_pos; /* cursor buffer position */ int cursor_oldpos; /* cursor old buffer position */ - u_short cursor_saveunder_char; /* saved char under cursor */ - u_short cursor_saveunder_attr; /* saved attr under cursor */ struct cursor_attr dflt_curs_attr; struct cursor_attr curr_curs_attr; struct cursor_attr curs_attr; From owner-svn-src-all@freebsd.org Wed Mar 14 08:27:06 2018 Return-Path: Delivered-To: svn-src-all@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 7B62EF2F6D2; Wed, 14 Mar 2018 08:27:06 +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 2CC4B748FB; Wed, 14 Mar 2018 08:27:06 +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 27A8B25840; Wed, 14 Mar 2018 08:27:06 +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 w2E8R6Dk093162; Wed, 14 Mar 2018 08:27:06 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E8R6jq093161; Wed, 14 Mar 2018 08:27:06 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140827.w2E8R6jq093161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 08:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330921 - stable/11/sys/dev/vt/hw/vga X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/vt/hw/vga X-SVN-Commit-Revision: 330921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 08:27:06 -0000 Author: eadler Date: Wed Mar 14 08:27:05 2018 New Revision: 330921 URL: https://svnweb.freebsd.org/changeset/base/330921 Log: MFC r330834: vt_vga: check if VGA is available from ACPI FADT table On x86 the IA-PC Boot Flags in the FADT can signal whether VGA is available or not. Modified: stable/11/sys/dev/vt/hw/vga/vt_vga.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- stable/11/sys/dev/vt/hw/vga/vt_vga.c Wed Mar 14 08:15:26 2018 (r330920) +++ stable/11/sys/dev/vt/hw/vga/vt_vga.c Wed Mar 14 08:27:05 2018 (r330921) @@ -30,6 +30,8 @@ * SUCH DAMAGE. */ +#include "opt_acpi.h" + #include __FBSDID("$FreeBSD$"); @@ -46,6 +48,10 @@ __FBSDID("$FreeBSD$"); #include +#if ((defined(__amd64__) || defined(__i386__)) && defined(DEV_ACPI)) +#include +#endif + struct vga_softc { bus_space_tag_t vga_fb_tag; bus_space_handle_t vga_fb_handle; @@ -1196,11 +1202,39 @@ vga_initialize(struct vt_device *vd, int textmode) return (0); } +static bool +vga_acpi_disabled(void) +{ +#if ((defined(__amd64__) || defined(__i386__)) && defined(DEV_ACPI)) + ACPI_TABLE_FADT *fadt; + vm_paddr_t physaddr; + uint16_t flags; + + physaddr = acpi_find_table(ACPI_SIG_FADT); + if (physaddr == 0) + return (false); + + fadt = acpi_map_table(physaddr, ACPI_SIG_FADT); + if (fadt == NULL) { + printf("vt_vga: unable to map FADT ACPI table\n"); + return (false); + } + + flags = fadt->BootFlags; + acpi_unmap_table(fadt); + + if (flags & ACPI_FADT_NO_VGA) + return (true); +#endif + + return (false); +} + static int vga_probe(struct vt_device *vd) { - return (CN_INTERNAL); + return (vga_acpi_disabled() ? CN_DEAD : CN_INTERNAL); } static int From owner-svn-src-all@freebsd.org Wed Mar 14 08:29:17 2018 Return-Path: Delivered-To: svn-src-all@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 1EE0FF2FB23 for ; Wed, 14 Mar 2018 08:29:17 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x229.google.com (mail-yw0-x229.google.com [IPv6:2607:f8b0:4002:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 52FC274BC7 for ; Wed, 14 Mar 2018 08:29:16 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x229.google.com with SMTP id x197so1573347ywg.11 for ; Wed, 14 Mar 2018 01:29:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=yQroqdnfH6zi/wKMjFQzUi8k7AudIYu8OE+AzbXF9Es=; b=COe90MninELsqky5qQlqGYaaFF7F66+s33P5qt+LLbKfNqG4RHmiCohrILPB8vkpmr 7JDMVTexCGs9K+MsipemCH+Eax0x+jAZOvsRrygrOZlC6sD+WzQRJ0ltbd+5L2eqdds9 zauqit7BnjW0dR5LV9bYd5wZEjJM0s0H6DIwc= 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; bh=yQroqdnfH6zi/wKMjFQzUi8k7AudIYu8OE+AzbXF9Es=; b=hjcviPth185EDYt6MDhF1vS+RXzbT2xXmQrg6B/266e8ts8RKbKUPWYdm5WTXmBNwQ 4Zw6uB3Qy4LscvlFVbMiaEyYARuJQ4r9GygdprOlgxetPjyq3oS/7rNsqSkoEde31eg6 p+Rl12YcfXuN/tWgd98rr1idTLNM8T/bc4quwBBTxrf0qBaWJs6TpFdVStaLBOCyiRIu pRDiQqdliuKMTxbrbDwfeiJkHBsSUYReJwFnbmuuDfy+XCUuoz/0kQeKrR0e3iubh2fX yUbJm+Px4/R+vTTZT84sQFrPJXwm6xZKL7yG9xBlgEYtNsfG3iqgK1UgMvHdXFv1ZlWh HrbA== X-Gm-Message-State: AElRT7G//NFWVu16NFLicX8eo4MJbEihrPh0ENMwJB1XL1mD7oO+e978 qtFCa3iWZs7tfL+y5gC+FdLqJQMKc0spxLAC3JFqsw== X-Google-Smtp-Source: AG47ELvCszSXIf+InoMgHAAK5AdGld0NNhyXZHwxfafqvuLRgvrjCUxwcI1HCmSWcqqzGbKU87yXb8S8qfU4iPdMLeY= X-Received: by 10.129.110.86 with SMTP id j83mr2611721ywc.19.1521016155583; Wed, 14 Mar 2018 01:29:15 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Wed, 14 Mar 2018 01:28:45 -0700 (PDT) In-Reply-To: <201803140827.w2E8R6jq093161@repo.freebsd.org> References: <201803140827.w2E8R6jq093161@repo.freebsd.org> From: Eitan Adler Date: Wed, 14 Mar 2018 01:28:45 -0700 X-Google-Sender-Auth: p9jbByKqPJncxU_apmGcCpFQqD8 Message-ID: Subject: Re: svn commit: r330921 - stable/11/sys/dev/vt/hw/vga To: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 08:29:17 -0000 On 14 March 2018 at 01:27, Eitan Adler wrote: > Author: eadler > Date: Wed Mar 14 08:27:05 2018 > New Revision: 330921 > URL: https://svnweb.freebsd.org/changeset/base/330921 > > Log: > MFC r330834: > > vt_vga: check if VGA is available from ACPI FADT table > > On x86 the IA-PC Boot Flags in the FADT can signal whether VGA is > available or not. Woops. This was a bit early, but I'm only going to revert if its discovered to cause problems. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@freebsd.org Wed Mar 14 08:33:04 2018 Return-Path: Delivered-To: svn-src-all@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 9D851F30236; Wed, 14 Mar 2018 08:33:04 +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 513DA75095; Wed, 14 Mar 2018 08:33:04 +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 4C25E259CA; Wed, 14 Mar 2018 08:33:04 +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 w2E8X4R8098001; Wed, 14 Mar 2018 08:33:04 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E8X4ZH098000; Wed, 14 Mar 2018 08:33:04 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140833.w2E8X4ZH098000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 08:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330922 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 330922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 08:33:04 -0000 Author: eadler Date: Wed Mar 14 08:33:03 2018 New Revision: 330922 URL: https://svnweb.freebsd.org/changeset/base/330922 Log: MFC r322663: Correct multicast address used in pfsync(4) As stated in src/sys/netinet/in.h L395, address used is 224.0.0.240. PR: 216885 Modified: stable/11/share/man/man4/pfsync.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/pfsync.4 ============================================================================== --- stable/11/share/man/man4/pfsync.4 Wed Mar 14 08:27:05 2018 (r330921) +++ stable/11/share/man/man4/pfsync.4 Wed Mar 14 08:33:03 2018 (r330922) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 20, 2011 +.Dd August 18, 2017 .Dt PFSYNC 4 .Os .Sh NAME @@ -90,7 +90,7 @@ interface: .Ed .Pp By default, state change messages are sent out on the synchronisation -interface using IP multicast packets to the 244.0.0.240 group address. +interface using IP multicast packets to the 224.0.0.240 group address. An alternative destination address for .Nm packets can be specified using the From owner-svn-src-all@freebsd.org Wed Mar 14 08:45:20 2018 Return-Path: Delivered-To: svn-src-all@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 5EA68F31185; Wed, 14 Mar 2018 08:45:20 +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 1098E758F3; Wed, 14 Mar 2018 08:45:20 +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 0B83E25B48; Wed, 14 Mar 2018 08:45:20 +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 w2E8jJpI003299; Wed, 14 Mar 2018 08:45:19 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E8jJgT003298; Wed, 14 Mar 2018 08:45:19 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140845.w2E8jJgT003298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 08:45:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330923 - stable/11/sys/dev/bhnd/nvram X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/bhnd/nvram X-SVN-Commit-Revision: 330923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 08:45:20 -0000 Author: eadler Date: Wed Mar 14 08:45:19 2018 New Revision: 330923 URL: https://svnweb.freebsd.org/changeset/base/330923 Log: MFC r302509: Fix heap overflow in bhnd(4) SPROM parsing. The bus_region_* APIs accept the number of data items to be read, while the code was passing the total number of bytes, resulting in an overflow of the SPROM parser's buffer. Modified: stable/11/sys/dev/bhnd/nvram/bhnd_sprom_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/bhnd/nvram/bhnd_sprom_subr.c ============================================================================== --- stable/11/sys/dev/bhnd/nvram/bhnd_sprom_subr.c Wed Mar 14 08:33:03 2018 (r330922) +++ stable/11/sys/dev/bhnd/nvram/bhnd_sprom_subr.c Wed Mar 14 08:45:19 2018 (r330923) @@ -523,7 +523,8 @@ sprom_direct_read(struct bhnd_sprom *sc, size_t offset p = (uint16_t *)buf; res_offset = sc->sp_res_off + offset; - bhnd_bus_read_region_stream_2(sc->sp_res, res_offset, p, nbytes); + bhnd_bus_read_region_stream_2(sc->sp_res, res_offset, p, + (nbytes / sizeof(uint16_t))); *crc = bhnd_nvram_crc8(p, nbytes, *crc); return (0); From owner-svn-src-all@freebsd.org Wed Mar 14 08:48:40 2018 Return-Path: Delivered-To: svn-src-all@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 BF324F314F6; Wed, 14 Mar 2018 08:48:40 +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 74D9675B32; Wed, 14 Mar 2018 08:48:40 +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 6B57425B4A; Wed, 14 Mar 2018 08:48:40 +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 w2E8mexb003440; Wed, 14 Mar 2018 08:48:40 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E8menB003439; Wed, 14 Mar 2018 08:48:40 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803140848.w2E8menB003439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 14 Mar 2018 08:48:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330924 - stable/11/tools/tools/sysbuild X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/tools/tools/sysbuild X-SVN-Commit-Revision: 330924 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 08:48:40 -0000 Author: eadler Date: Wed Mar 14 08:48:40 2018 New Revision: 330924 URL: https://svnweb.freebsd.org/changeset/base/330924 Log: MFC r302452: Add missing PORTS_OPTS to two make commands Modified: stable/11/tools/tools/sysbuild/sysbuild.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/sysbuild/sysbuild.sh ============================================================================== --- stable/11/tools/tools/sysbuild/sysbuild.sh Wed Mar 14 08:45:19 2018 (r330923) +++ stable/11/tools/tools/sysbuild/sysbuild.sh Wed Mar 14 08:48:40 2018 (r330924) @@ -242,7 +242,7 @@ ports_build() ( do b=`echo $p | tr / _` t=`echo $p | sed "s,${pd},,"` - pn=`cd $p && make package-name` + pn=`cd $p && make package-name ${PORTS_OPTS}` if [ "x`basename $p`" == "xpkg" ] ; then log_it "Very Special: $t ($pn)" @@ -289,7 +289,7 @@ ports_build() ( else log_it FAIL build $p fi - make clean + make clean ${PORTS_OPTS} ) > _.$b 2>&1 < /dev/null done ) From owner-svn-src-all@freebsd.org Wed Mar 14 09:20:04 2018 Return-Path: Delivered-To: svn-src-all@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 50E5FF33CF2; Wed, 14 Mar 2018 09:20:04 +0000 (UTC) (envelope-from wma@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 030F777129; Wed, 14 Mar 2018 09:20:04 +0000 (UTC) (envelope-from wma@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 F212825FF6; Wed, 14 Mar 2018 09:20:03 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2E9K3vr019123; Wed, 14 Mar 2018 09:20:03 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E9K3mn019118; Wed, 14 Mar 2018 09:20:03 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201803140920.w2E9K3mn019118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Wed, 14 Mar 2018 09:20:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330925 - in head/sys: conf powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: wma X-SVN-Commit-Paths: in head/sys: conf powerpc/powernv X-SVN-Commit-Revision: 330925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 09:20:04 -0000 Author: wma Date: Wed Mar 14 09:20:03 2018 New Revision: 330925 URL: https://svnweb.freebsd.org/changeset/base/330925 Log: PowerNV: Fix I2C to compile if FDT is disabled Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: IBM, QCM Technologies Modified: head/sys/conf/files.powerpc head/sys/powerpc/powernv/opal_i2c.c head/sys/powerpc/powernv/opal_i2cm.c head/sys/powerpc/powernv/powernv_centaur.c head/sys/powerpc/powernv/powernv_xscom.c Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Wed Mar 14 08:48:40 2018 (r330924) +++ head/sys/conf/files.powerpc Wed Mar 14 09:20:03 2018 (r330925) @@ -186,8 +186,8 @@ powerpc/powermac/vcoregpio.c optional powermac powerpc/powernv/opal.c optional powernv powerpc/powernv/opal_console.c optional powernv powerpc/powernv/opal_dev.c optional powernv -powerpc/powernv/opal_i2c.c optional iicbus fdt powernv -powerpc/powernv/opal_i2cm.c optional iicbus fdt powernv +powerpc/powernv/opal_i2c.c optional iicbus powernv +powerpc/powernv/opal_i2cm.c optional iicbus powernv powerpc/powernv/opal_pci.c optional powernv pci powerpc/powernv/opalcall.S optional powernv powerpc/powernv/platform_powernv.c optional powernv Modified: head/sys/powerpc/powernv/opal_i2c.c ============================================================================== --- head/sys/powerpc/powernv/opal_i2c.c Wed Mar 14 08:48:40 2018 (r330924) +++ head/sys/powerpc/powernv/opal_i2c.c Wed Mar 14 09:20:03 2018 (r330925) @@ -120,7 +120,9 @@ static int opal_i2c_probe(device_t dev) { +#ifdef FDT if (!(ofw_bus_is_compatible(dev, "ibm,opal-i2c"))) +#endif return (ENXIO); device_set_desc(dev, "opal-i2c"); @@ -131,6 +133,7 @@ opal_i2c_probe(device_t dev) static int opal_i2c_attach(device_t dev) { +#ifdef FDT struct opal_i2c_softc *sc; int len; @@ -150,6 +153,9 @@ opal_i2c_attach(device_t dev) I2C_LOCK_INIT(sc); return (bus_generic_attach(dev)); +#else + return (ENXIO); +#endif } static int Modified: head/sys/powerpc/powernv/opal_i2cm.c ============================================================================== --- head/sys/powerpc/powernv/opal_i2cm.c Wed Mar 14 08:48:40 2018 (r330924) +++ head/sys/powerpc/powernv/opal_i2cm.c Wed Mar 14 09:20:03 2018 (r330925) @@ -57,14 +57,17 @@ struct opal_i2cm_softc static int opal_i2cm_attach(device_t); static int opal_i2cm_probe(device_t); +#ifdef FDT static const struct ofw_bus_devinfo * opal_i2cm_get_devinfo(device_t, device_t); +#endif static device_method_t opal_i2cm_methods[] = { /* Device interface */ DEVMETHOD(device_probe, opal_i2cm_probe), DEVMETHOD(device_attach, opal_i2cm_attach), +#ifdef FDT /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_devinfo, opal_i2cm_get_devinfo), DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), @@ -72,6 +75,7 @@ static device_method_t opal_i2cm_methods[] = { DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), +#endif DEVMETHOD_END }; @@ -82,8 +86,10 @@ static int opal_i2cm_probe(device_t dev) { +#ifdef FDT if (!(ofw_bus_is_compatible(dev, "ibm,centaur-i2cm") || ofw_bus_is_compatible(dev, "ibm,power8-i2cm"))) +#endif return (ENXIO); device_set_desc(dev, "centaur-i2cm"); @@ -93,6 +99,7 @@ opal_i2cm_probe(device_t dev) static int opal_i2cm_attach(device_t dev) { +#ifdef FDT phandle_t child; device_t cdev; struct ofw_bus_devinfo *dinfo; @@ -116,13 +123,18 @@ opal_i2cm_attach(device_t dev) } return (bus_generic_attach(dev)); +#else + return (ENXIO); +#endif } +#ifdef FDT static const struct ofw_bus_devinfo * opal_i2cm_get_devinfo(device_t dev, device_t child) { return (device_get_ivars(child)); } +#endif DEFINE_CLASS_0(opal_i2cm, opal_i2cm_driver, opal_i2cm_methods, sizeof(struct opal_i2cm_softc)); Modified: head/sys/powerpc/powernv/powernv_centaur.c ============================================================================== --- head/sys/powerpc/powernv/powernv_centaur.c Wed Mar 14 08:48:40 2018 (r330924) +++ head/sys/powerpc/powernv/powernv_centaur.c Wed Mar 14 09:20:03 2018 (r330925) @@ -57,14 +57,17 @@ struct powernv_centaur_softc static int powernv_centaur_attach(device_t); static int powernv_centaur_probe(device_t); +#ifdef FDT static const struct ofw_bus_devinfo * powernv_centaur_get_devinfo(device_t, device_t); +#endif static device_method_t powernv_centaur_methods[] = { /* Device interface */ DEVMETHOD(device_probe, powernv_centaur_probe), DEVMETHOD(device_attach, powernv_centaur_attach), +#ifdef FDT /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_devinfo, powernv_centaur_get_devinfo), DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), @@ -72,7 +75,7 @@ static device_method_t powernv_centaur_methods[] = { DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), - +#endif DEVMETHOD_END }; @@ -82,7 +85,9 @@ static int powernv_centaur_probe(device_t dev) { +#ifdef FDT if (!(ofw_bus_is_compatible(dev, "ibm,centaur"))) +#endif return (ENXIO); device_set_desc(dev, "centaur"); @@ -92,6 +97,7 @@ powernv_centaur_probe(device_t dev) static int powernv_centaur_attach(device_t dev) { +#ifdef FDT phandle_t child; device_t cdev; struct ofw_bus_devinfo *dinfo; @@ -115,13 +121,18 @@ powernv_centaur_attach(device_t dev) } return (bus_generic_attach(dev)); +#else + return (ENXIO); +#endif } +#ifdef FDT static const struct ofw_bus_devinfo * powernv_centaur_get_devinfo(device_t dev, device_t child) { return (device_get_ivars(child)); } +#endif DEFINE_CLASS_0(powernv_centaur, powernv_centaur_driver, powernv_centaur_methods, sizeof(struct powernv_centaur_softc)); Modified: head/sys/powerpc/powernv/powernv_xscom.c ============================================================================== --- head/sys/powerpc/powernv/powernv_xscom.c Wed Mar 14 08:48:40 2018 (r330924) +++ head/sys/powerpc/powernv/powernv_xscom.c Wed Mar 14 09:20:03 2018 (r330925) @@ -57,14 +57,17 @@ struct powernv_xscom_softc static int powernv_xscom_attach(device_t); static int powernv_xscom_probe(device_t); +#ifdef FDT static const struct ofw_bus_devinfo * powernv_xscom_get_devinfo(device_t, device_t); +#endif static device_method_t powernv_xscom_methods[] = { /* Device interface */ DEVMETHOD(device_probe, powernv_xscom_probe), DEVMETHOD(device_attach, powernv_xscom_attach), +#ifdef FDT /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_devinfo, powernv_xscom_get_devinfo), DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), @@ -72,6 +75,7 @@ static device_method_t powernv_xscom_methods[] = { DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), +#endif DEVMETHOD_END }; @@ -82,7 +86,9 @@ static int powernv_xscom_probe(device_t dev) { +#ifdef FDT if (!(ofw_bus_is_compatible(dev, "ibm,xscom"))) +#endif return (ENXIO); device_set_desc(dev, "xscom"); @@ -92,6 +98,7 @@ powernv_xscom_probe(device_t dev) static int powernv_xscom_attach(device_t dev) { +#ifdef FDT phandle_t child; device_t cdev; struct ofw_bus_devinfo *dinfo; @@ -115,13 +122,18 @@ powernv_xscom_attach(device_t dev) } return (bus_generic_attach(dev)); +#else + return (ENXIO); +#endif } +#ifdef FDT static const struct ofw_bus_devinfo * powernv_xscom_get_devinfo(device_t dev, device_t child) { return (device_get_ivars(child)); } +#endif DEFINE_CLASS_0(powernv_xscom, powernv_xscom_driver, powernv_xscom_methods, sizeof(struct powernv_xscom_softc)); From owner-svn-src-all@freebsd.org Wed Mar 14 09:57:59 2018 Return-Path: Delivered-To: svn-src-all@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 4C99AF3F9EF; Wed, 14 Mar 2018 09:57:59 +0000 (UTC) (envelope-from tijl@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 EE6947871D; Wed, 14 Mar 2018 09:57:58 +0000 (UTC) (envelope-from tijl@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 E94B926627; Wed, 14 Mar 2018 09:57:58 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2E9vweD038727; Wed, 14 Mar 2018 09:57:58 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2E9vwxO038725; Wed, 14 Mar 2018 09:57:58 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201803140957.w2E9vwxO038725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Wed, 14 Mar 2018 09:57:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330926 - in stable/11/sys/cam: . scsi X-SVN-Group: stable-11 X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: in stable/11/sys/cam: . scsi X-SVN-Commit-Revision: 330926 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 09:57:59 -0000 Author: tijl Date: Wed Mar 14 09:57:58 2018 New Revision: 330926 URL: https://svnweb.freebsd.org/changeset/base/330926 Log: MFC r314624: Reject userland CCBs that have CAM_UNLOCKED set. CAM_UNLOCKED is internal flag and cannot correctly be set by userland. Return EINVAL from CAMIOCOMMAND and CAMIOQUEUE if it is set. Also fix leaks in some of the error paths for CAMIOQUEUE. PR: 215356 Modified: stable/11/sys/cam/cam_xpt.c stable/11/sys/cam/scsi/scsi_pass.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/cam_xpt.c ============================================================================== --- stable/11/sys/cam/cam_xpt.c Wed Mar 14 09:20:03 2018 (r330925) +++ stable/11/sys/cam/cam_xpt.c Wed Mar 14 09:57:58 2018 (r330926) @@ -414,6 +414,9 @@ xptdoioctl(struct cdev *dev, u_long cmd, caddr_t addr, inccb = (union ccb *)addr; + if (inccb->ccb_h.flags & CAM_UNLOCKED) + return (EINVAL); + bus = xpt_find_bus(inccb->ccb_h.path_id); if (bus == NULL) return (EINVAL); Modified: stable/11/sys/cam/scsi/scsi_pass.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_pass.c Wed Mar 14 09:20:03 2018 (r330925) +++ stable/11/sys/cam/scsi/scsi_pass.c Wed Mar 14 09:57:58 2018 (r330926) @@ -1798,6 +1798,11 @@ passdoioctl(struct cdev *dev, u_long cmd, caddr_t addr inccb = (union ccb *)addr; + if (inccb->ccb_h.flags & CAM_UNLOCKED) { + error = EINVAL; + break; + } + /* * Some CCB types, like scan bus and scan lun can only go * through the transport layer device. @@ -1891,20 +1896,23 @@ passdoioctl(struct cdev *dev, u_long cmd, caddr_t addr xpt_print(periph->path, "Copy of user CCB %p to " "kernel address %p failed with error %d\n", *user_ccb, ccb, error); - uma_zfree(softc->pass_zone, io_req); - cam_periph_lock(periph); - break; + goto camioqueue_error; } + if (ccb->ccb_h.flags & CAM_UNLOCKED) { + error = EINVAL; + goto camioqueue_error; + } + if (ccb->ccb_h.flags & CAM_CDB_POINTER) { if (ccb->csio.cdb_len > IOCDBLEN) { error = EINVAL; - break; + goto camioqueue_error; } error = copyin(ccb->csio.cdb_io.cdb_ptr, ccb->csio.cdb_io.cdb_bytes, ccb->csio.cdb_len); - if (error) - break; + if (error != 0) + goto camioqueue_error; ccb->ccb_h.flags &= ~CAM_CDB_POINTER; } @@ -1916,10 +1924,8 @@ passdoioctl(struct cdev *dev, u_long cmd, caddr_t addr xpt_print(periph->path, "CCB function code %#x is " "restricted to the XPT device\n", ccb->ccb_h.func_code); - uma_zfree(softc->pass_zone, io_req); - cam_periph_lock(periph); error = ENODEV; - break; + goto camioqueue_error; } /* @@ -1966,11 +1972,8 @@ passdoioctl(struct cdev *dev, u_long cmd, caddr_t addr || (fc == XPT_DEV_ADVINFO) || (fc == XPT_NVME_ADMIN) || (fc == XPT_NVME_IO)) { error = passmemsetup(periph, io_req); - if (error != 0) { - uma_zfree(softc->pass_zone, io_req); - cam_periph_lock(periph); - break; - } + if (error != 0) + goto camioqueue_error; } else io_req->mapinfo.num_bufs_used = 0; @@ -2014,6 +2017,11 @@ passdoioctl(struct cdev *dev, u_long cmd, caddr_t addr TAILQ_REMOVE(&softc->active_queue, io_req, links); TAILQ_INSERT_TAIL(&softc->done_queue, io_req, links); } + break; + +camioqueue_error: + uma_zfree(softc->pass_zone, io_req); + cam_periph_lock(periph); break; } case CAMIOGET: From owner-svn-src-all@freebsd.org Wed Mar 14 12:44:50 2018 Return-Path: Delivered-To: svn-src-all@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 37C87F4FA1C; Wed, 14 Mar 2018 12:44:50 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0E657EDF8; Wed, 14 Mar 2018 12:44:49 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f44.google.com with SMTP id e5-v6so546914lfb.7; Wed, 14 Mar 2018 05:44:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GoU7R3s4zH3CS6xLNxpUzZ772/EB1SYCeHiqVpgEUd8=; b=I5nmqAFstrL5iURN03T9Av+j7/C5WXTqBjivlhFuanDoCd5nUgQxKsfaeQ8nI9/sPj XcJwJo1R3qkVBv1vkrcOXAfC6WkS5AOB6MitcrMHjCrcYsoDNfNd5uRt5hnJ2i2DMoyy G95q4ROOmlyi+a8iLG4Dvuu3IFS0BMePdx7JohGHLOkaVYWMPB0HVQJoTZA0fWdcROXp BdPSxMyco/le7XEb8ja+A/9Oq5bDFN3oNUQoQqmMlgag5Ysu0T0RSYSTfwE5k7Gydxir qcSqKiQJOTMA0vLPODmxmUl3fN4o0FKbT/h2EJZi2n2zs7xGiq4V0mn5LCBR0dzw3JdE QEwA== X-Gm-Message-State: AElRT7EGDj9Uon1UPDOneTnX0R7mxf2x2aEohxbfzqEFlBZIIlDLX6Dc OdMAorpmxbK348NP38D1myIwJb9i X-Google-Smtp-Source: AG47ELvYG6QDZQp6hJ3yCQ3d9yxPyMdUC0UOmyvZQvaNS/oFCzpGvJ9OxjWV9qqLMxTErp3Cdo5z7Q== X-Received: by 10.46.22.89 with SMTP id 25mr3329757ljw.86.1521031479859; Wed, 14 Mar 2018 05:44:39 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id f16sm572532lja.48.2018.03.14.05.44.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Mar 2018 05:44:38 -0700 (PDT) Subject: Re: svn commit: r330883 - head/stand/userboot/userboot To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803132254.w2DMsU2r005593@repo.freebsd.org> From: Andriy Gapon Message-ID: <45a6c658-1133-ad46-d8df-48ee5bbccddf@FreeBSD.org> Date: Wed, 14 Mar 2018 14:44:37 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <201803132254.w2DMsU2r005593@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 12:44:50 -0000 On 14/03/2018 00:54, Gleb Smirnoff wrote: > Author: glebius > Date: Tue Mar 13 22:54:29 2018 > New Revision: 330883 > URL: https://svnweb.freebsd.org/changeset/base/330883 > > Log: > Fix typo that misteriously passes compilation. > > Modified: > head/stand/userboot/userboot/main.c > > Modified: head/stand/userboot/userboot/main.c > ============================================================================== > --- head/stand/userboot/userboot/main.c Tue Mar 13 21:42:38 2018 (r330882) > +++ head/stand/userboot/userboot/main.c Tue Mar 13 22:54:29 2018 (r330883) > @@ -159,7 +159,7 @@ extract_currdev(void) > //bzero(&dev, sizeof(dev)); > > #if defined(USERBOOT_ZFS_SUPPORT) > - CT_ASSERT(sizeof(struct disk_devdesc) >= sizeof(struct zfs_devdesc)); > + CTASSERT(sizeof(struct disk_devdesc) >= sizeof(struct zfs_devdesc)); > if (userboot_zfs_found) { > struct zfs_devdesc zdev; It seems that this was compiled to a call to an external CT_ASSERT function. Probably not enough warning flags to fail on a function without a prototype? Also, not sure how it worked at run-time. Maybe userboot.so is linked and loaded in such a way that it allows undefined symbols as long as they are not used. So, probably extract_currdev() just didn't get called. Anyway, thank you for spotting and fixing. -- Andriy Gapon From owner-svn-src-all@freebsd.org Wed Mar 14 13:20:37 2018 Return-Path: Delivered-To: svn-src-all@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 395E4F51901; Wed, 14 Mar 2018 13:20:37 +0000 (UTC) (envelope-from emaste@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 DFCDB804D2; Wed, 14 Mar 2018 13:20:36 +0000 (UTC) (envelope-from emaste@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 DA9F748F; Wed, 14 Mar 2018 13:20:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2EDKafo039165; Wed, 14 Mar 2018 13:20:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EDKaoW039162; Wed, 14 Mar 2018 13:20:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803141320.w2EDKaoW039162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 14 Mar 2018 13:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330927 - in head/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Commit-Revision: 330927 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 13:20:37 -0000 Author: emaste Date: Wed Mar 14 13:20:36 2018 New Revision: 330927 URL: https://svnweb.freebsd.org/changeset/base/330927 Log: Remove stray ; at end of linux_vdso_deinstall() Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/i386/linux/linux_sysvec.c Modified: head/sys/amd64/linux/linux_sysvec.c ============================================================================== --- head/sys/amd64/linux/linux_sysvec.c Wed Mar 14 09:57:58 2018 (r330926) +++ head/sys/amd64/linux/linux_sysvec.c Wed Mar 14 13:20:36 2018 (r330927) @@ -839,7 +839,7 @@ linux_vdso_deinstall(void *param) { __elfN(linux_shared_page_fini)(linux_shared_page_obj); -}; +} SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t)linux_vdso_deinstall, NULL); Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Wed Mar 14 09:57:58 2018 (r330926) +++ head/sys/amd64/linux32/linux32_sysvec.c Wed Mar 14 13:20:36 2018 (r330927) @@ -1036,7 +1036,7 @@ linux_vdso_deinstall(void *param) { __elfN(linux_shared_page_fini)(linux_shared_page_obj); -}; +} SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t)linux_vdso_deinstall, NULL); Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Wed Mar 14 09:57:58 2018 (r330926) +++ head/sys/i386/linux/linux_sysvec.c Wed Mar 14 13:20:36 2018 (r330927) @@ -1010,7 +1010,7 @@ linux_vdso_deinstall(void *param) { __elfN(linux_shared_page_fini)(linux_shared_page_obj); -}; +} SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t)linux_vdso_deinstall, NULL); From owner-svn-src-all@freebsd.org Wed Mar 14 13:20:45 2018 Return-Path: Delivered-To: svn-src-all@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 CAF04F5192D for ; Wed, 14 Mar 2018 13:20:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D460805CB for ; Wed, 14 Mar 2018 13:20:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22c.google.com with SMTP id v6so4324890iog.7 for ; Wed, 14 Mar 2018 06:20:44 -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=3ZUkfVhp2AjkLbAQ7O0VBGHSB8WCLJKzipKiSfaqzYc=; b=bgVUsoPsbg1sClDs0c3caFrDo8Og0BWTZ7aXoYavSpP1DVXtoP7egTndl0jVxXuGhd nacxQK578yafxwy+jErOKeR08Gr8F90HKYQFvMUhi+yhrUNk+Wuk0uWzgLGxzP+BMqDE np0iVL97QyXQ360ycNLLZkkgFJ6yG5VHsSN3/3peV5wmdrgQjDeI5w73Wgmew3t/e9zn zzU/7m5buooriGks8yXd3hKnCxDn8Wa4OJJXiac8Yh2LRWHdXE5/UUpzuJfzS21r+XGJ 3/GcXFyUqCUpns3lcTDkrKmvDYyiHyaavClZV2p1GC8uN5552YJRO2gk5FTwiE1HpXT0 2q3A== 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=3ZUkfVhp2AjkLbAQ7O0VBGHSB8WCLJKzipKiSfaqzYc=; b=F7t+zOAlbBITusATz9aihEmBLx6y67zFF3AhwfgKdB5/Yp28V71znXWUkAUsMIIHb1 OpouE/qCl/yErDDfLA46cQcL1B4QWoW4wWdYb0+OHavNTwfbImRKdjr/xhtcYAYoH6UJ hOs5xIcRbC7aGAkJ5vN7HCHH5zWUQV6N3Wi5cMXbYzceiCOpb8WsHYZui0uk+EZSsTdK FrnhQXJGwBzQfwd5z4JW/0NC4HFj81PFJ8nWpu2/EGW2qgXiyL+sEDjtVhXvw010nrxo lRwjYNt/omwWGiZzpLMb7LfS36yVRiucY25H9hx7IdEuETwAS7ihK7qnlWH/PPPtLwsf y3aw== X-Gm-Message-State: AElRT7FRwWpvz2yTSxbF6sYBn6S/byUM9tGbEAox1rSoP1apq8uUDaNN HhmH9o39xjjl7yFnzvrSmIjKbduQlKWoyCTkuK3fSA== X-Google-Smtp-Source: AG47ELv1kSK5WUFXVttsrN9tBKgDpVbdkO758pq0ytai8Gs6MvG4iBke3Bc6X3vif9AOOMmz5OTTt9zNQEGJUWviP9c= X-Received: by 10.107.18.162 with SMTP id 34mr4612343ios.168.1521033643671; Wed, 14 Mar 2018 06:20:43 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Wed, 14 Mar 2018 06:20:42 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:bcea:d775:d975:818] Received: by 10.79.203.196 with HTTP; Wed, 14 Mar 2018 06:20:42 -0700 (PDT) In-Reply-To: <45a6c658-1133-ad46-d8df-48ee5bbccddf@FreeBSD.org> References: <201803132254.w2DMsU2r005593@repo.freebsd.org> <45a6c658-1133-ad46-d8df-48ee5bbccddf@FreeBSD.org> From: Warner Losh Date: Wed, 14 Mar 2018 07:20:42 -0600 X-Google-Sender-Auth: N0emh7PIhhRXKD3eidjgj05fleU Message-ID: Subject: Re: svn commit: r330883 - head/stand/userboot/userboot To: Andriy Gapon Cc: Gleb Smirnoff , 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.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 13:20:46 -0000 On Mar 14, 2018 6:45 AM, "Andriy Gapon" wrote: On 14/03/2018 00:54, Gleb Smirnoff wrote: > Author: glebius > Date: Tue Mar 13 22:54:29 2018 > New Revision: 330883 > URL: https://svnweb.freebsd.org/changeset/base/330883 > > Log: > Fix typo that misteriously passes compilation. > > Modified: > head/stand/userboot/userboot/main.c > > Modified: head/stand/userboot/userboot/main.c > ============================================================ ================== > --- head/stand/userboot/userboot/main.c Tue Mar 13 21:42:38 2018 (r330882) > +++ head/stand/userboot/userboot/main.c Tue Mar 13 22:54:29 2018 (r330883) > @@ -159,7 +159,7 @@ extract_currdev(void) > //bzero(&dev, sizeof(dev)); > > #if defined(USERBOOT_ZFS_SUPPORT) > - CT_ASSERT(sizeof(struct disk_devdesc) >= sizeof(struct zfs_devdesc)); > + CTASSERT(sizeof(struct disk_devdesc) >= sizeof(struct zfs_devdesc)); > if (userboot_zfs_found) { > struct zfs_devdesc zdev; It seems that this was compiled to a call to an external CT_ASSERT function. Probably not enough warning flags to fail on a function without a prototype? Also, not sure how it worked at run-time. Maybe userboot.so is linked and loaded in such a way that it allows undefined symbols as long as they are not used. So, probably extract_currdev() just didn't get called. Anyway, thank you for spotting and fixing. I'll have to see if I can tighten up the warns to prevent this in the future. Warner From owner-svn-src-all@freebsd.org Wed Mar 14 14:21:24 2018 Return-Path: Delivered-To: svn-src-all@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 CBCE7F54E51 for ; Wed, 14 Mar 2018 14:21:24 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52634829E0 for ; Wed, 14 Mar 2018 14:21:23 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: d788596d-2792-11e8-b951-f99fef315fd9 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id d788596d-2792-11e8-b951-f99fef315fd9; Wed, 14 Mar 2018 14:20:27 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w2EELKCr022775; Wed, 14 Mar 2018 08:21:20 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1521037280.84937.285.camel@freebsd.org> Subject: Re: svn commit: r330925 - in head/sys: conf powerpc/powernv From: Ian Lepore To: Wojciech Macek , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 14 Mar 2018 08:21:20 -0600 In-Reply-To: <201803140920.w2E9K3mn019118@repo.freebsd.org> References: <201803140920.w2E9K3mn019118@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 14:21:25 -0000 On Wed, 2018-03-14 at 09:20 +0000, Wojciech Macek wrote: > Author: wma > Date: Wed Mar 14 09:20:03 2018 > New Revision: 330925 > URL: https://svnweb.freebsd.org/changeset/base/330925 > > Log: >   PowerNV: Fix I2C to compile if FDT is disabled >    >   Submitted by:          Wojciech Macek >   Obtained from:         Semihalf >   Sponsored by:          IBM, QCM Technologies > This seems to be a nonsensical commit.  What's the point of compiling in a driver which is hard-coded to return failure from the probe and attach routines?  The pre-change code seemed more correct: the driver can only possibly work if FDT/OFW data is available, so only compile it in when that option is in effect. -- Ian From owner-svn-src-all@freebsd.org Wed Mar 14 14:32:02 2018 Return-Path: Delivered-To: svn-src-all@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 2F5C6F558EA; Wed, 14 Mar 2018 14:32:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D583D831CC; Wed, 14 Mar 2018 14:32:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D0729F68; Wed, 14 Mar 2018 14:32:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2EEW10T077672; Wed, 14 Mar 2018 14:32:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EEW194077671; Wed, 14 Mar 2018 14:32:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201803141432.w2EEW194077671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 14 Mar 2018 14:32:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330928 - stable/11/release/doc/share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/share/xml X-SVN-Commit-Revision: 330928 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 14:32:02 -0000 Author: gjb Date: Wed Mar 14 14:32:01 2018 New Revision: 330928 URL: https://svnweb.freebsd.org/changeset/base/330928 Log: Document SA-18:03.speculative_execution. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/security.xml ============================================================================== --- stable/11/release/doc/share/xml/security.xml Wed Mar 14 13:20:36 2018 (r330927) +++ stable/11/release/doc/share/xml/security.xml Wed Mar 14 14:32:01 2018 (r330928) @@ -75,6 +75,22 @@ 07 March 2018 Multiple vulnerabilities + + + FreeBSD-SA-18:03.speculative_execution + 14 March 2018 + + Speculative Execution Vulnerabilities + + This advisory addresses the most significant issues + for &os; 11.1 on &arch.amd64; CPUs. We expect to + update this advisory to include 10.x for &arch.amd64; + CPUs. Future &os; releases will address this issue on + &arch.i386; and other CPUs. + + + From owner-svn-src-all@freebsd.org Wed Mar 14 14:45:58 2018 Return-Path: Delivered-To: svn-src-all@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 DD23FF564E5; Wed, 14 Mar 2018 14:45:57 +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 8B37983C2E; Wed, 14 Mar 2018 14:45:57 +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 6C0541210; Wed, 14 Mar 2018 14:45:57 +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 w2EEjvFP084705; Wed, 14 Mar 2018 14:45:57 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EEjvK4084703; Wed, 14 Mar 2018 14:45:57 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803141445.w2EEjvK4084703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 14 Mar 2018 14:45:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330929 - in head: . release/packages X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: . release/packages X-SVN-Commit-Revision: 330929 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 14:45:58 -0000 Author: kevans Date: Wed Mar 14 14:45:57 2018 New Revision: 330929 URL: https://svnweb.freebsd.org/changeset/base/330929 Log: pkgbase: Fix post-install script for kernel packages kernel.ucl uses a hardcoded boot/kernel for kldxref, which is the incorrect directory when we're installing extra kernels that aren't the "default" kernel (placed at boot/kernel). Fix this by instead using a new %KERNELDIR% that we now replace in Makefile.inc1 with "kernel" for the default kernel and "kernel.${_kernel}" for these extra kernels so that, e.g. /boot/kernel.SHIVA, will get properly kldxref'd upon update and avoid outdated linker.hints. Reviewed by: gjb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14689 Modified: head/Makefile.inc1 head/release/packages/kernel.ucl Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Mar 14 14:32:01 2018 (r330928) +++ head/Makefile.inc1 Wed Mar 14 14:45:57 2018 (r330929) @@ -1698,6 +1698,7 @@ create-kernel-packages-flavor${flavor:C,^""$,${_defaul pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \ sed -e "s/%VERSION%/${PKG_VERSION}/" \ -e "s/%PKGNAME%/kernel-${INSTALLKERNEL:tl}${flavor}/" \ + -e "s/%KERNELDIR%/kernel/" \ -e "s/%COMMENT%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \ -e "s/%DESC%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \ -e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \ @@ -1733,6 +1734,7 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_ pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \ sed -e "s/%VERSION%/${PKG_VERSION}/" \ -e "s/%PKGNAME%/kernel-${_kernel:tl}${flavor}/" \ + -e "s/%KERNELDIR%/kernel.${_kernel}/" \ -e "s/%COMMENT%/FreeBSD ${_kernel} kernel ${flavor}/" \ -e "s/%DESC%/FreeBSD ${_kernel} kernel ${flavor}/" \ -e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \ Modified: head/release/packages/kernel.ucl ============================================================================== --- head/release/packages/kernel.ucl Wed Mar 14 14:32:01 2018 (r330928) +++ head/release/packages/kernel.ucl Wed Mar 14 14:45:57 2018 (r330929) @@ -17,6 +17,6 @@ desc = < Delivered-To: svn-src-all@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 947D2F56DFF; Wed, 14 Mar 2018 14:53:37 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (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 1F8E48464D; Wed, 14 Mar 2018 14:53:36 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (cpe-75-82-218-62.socal.res.rr.com [75.82.218.62]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id w2EErXkH006774 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 14 Mar 2018 07:53:34 -0700 Subject: Re: svn commit: r330925 - in head/sys: conf powerpc/powernv To: Ian Lepore , Wojciech Macek , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803140920.w2E9K3mn019118@repo.freebsd.org> <1521037280.84937.285.camel@freebsd.org> From: Nathan Whitehorn Message-ID: <35bd7933-3d70-3e3f-1400-467ca6b9b561@freebsd.org> Date: Wed, 14 Mar 2018 07:53:33 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1521037280.84937.285.camel@freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Sonic-CAuth: UmFuZG9tSVY3OLlw8Wbf75t+CumguRFq1HzQySHQ01HGbXNVIh97Xlzwf++3AkvUPc5wnF2SE9ecfYaYKkrzyeDy4kqAtEgsuRXQE6QQIfs= X-Sonic-ID: C;ekDAd5cn6BGlXiAFsE207w== M;hIL7d5cn6BGlXiAFsE207w== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 14:53:37 -0000 On 03/14/18 07:21, Ian Lepore wrote: > On Wed, 2018-03-14 at 09:20 +0000, Wojciech Macek wrote: >> Author: wma >> Date: Wed Mar 14 09:20:03 2018 >> New Revision: 330925 >> URL: https://svnweb.freebsd.org/changeset/base/330925 >> >> Log: >>   PowerNV: Fix I2C to compile if FDT is disabled >> >>   Submitted by:          Wojciech Macek >>   Obtained from:         Semihalf >>   Sponsored by:          IBM, QCM Technologies >> > This seems to be a nonsensical commit.  What's the point of compiling > in a driver which is hard-coded to return failure from the probe and > attach routines?  The pre-change code seemed more correct: the driver > can only possibly work if FDT/OFW data is available, so only compile it > in when that option is in effect. > > -- Ian > It's even worse than that: the files.powerpc uses of fdt are *also* wrong, because it depends on OF, not FDT per se, which is unconditionally available on all AIM-type PowerPC kernels, so there is no need to test for *anything*. -Nathan From owner-svn-src-all@freebsd.org Wed Mar 14 15:03:07 2018 Return-Path: Delivered-To: svn-src-all@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 0B437F57936; Wed, 14 Mar 2018 15:03:07 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (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 96986850D8; Wed, 14 Mar 2018 15:03:06 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (cpe-75-82-218-62.socal.res.rr.com [75.82.218.62]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id w2EEq46A005522 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 14 Mar 2018 07:52:04 -0700 Subject: Re: svn commit: r330925 - in head/sys: conf powerpc/powernv To: Wojciech Macek , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803140920.w2E9K3mn019118@repo.freebsd.org> From: Nathan Whitehorn Message-ID: Date: Wed, 14 Mar 2018 07:52:03 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <201803140920.w2E9K3mn019118@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Sonic-CAuth: UmFuZG9tSVbhHv716Be7hz3hsySgGTGdD4UnUt/z4QuM5NLg6szxJD47Tvhwy5jv8VmKTqqOdKANprgb7eVJM3/3JcxhAunosXCRad3FfbE= X-Sonic-ID: C;AnFRQpcn6BGVdSAFsE207w== M;ANrBQpcn6BGVdSAFsE207w== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 15:03:07 -0000 On 03/14/18 02:20, Wojciech Macek wrote: > Author: wma > Date: Wed Mar 14 09:20:03 2018 > New Revision: 330925 > URL: https://svnweb.freebsd.org/changeset/base/330925 > > Log: > PowerNV: Fix I2C to compile if FDT is disabled > > Submitted by: Wojciech Macek > Obtained from: Semihalf > Sponsored by: IBM, QCM Technologies I don't think this makes any sense, for several reasons: 1. You are gating on #ifdef FDT for things that are using the OF_* API and aren't actually FDT-specific, so the #ifdef checks are testing the wrong thing. 2. It isn't possible to even build a PowerPC/AIM kernel, like PowerNV, without the Open Firmware support code that this uses, so there is no circumstance in which this helps anything. 3. The PowerNV platform is non-functional without a device tree intrinsically, so, even if you could build a kernel like this somehow, it would be impossible for it to work. Given all of that, why was this necessary? It seems to just add pointless #ifdef to code that does not need it. -Nathan > > Modified: > head/sys/conf/files.powerpc > head/sys/powerpc/powernv/opal_i2c.c > head/sys/powerpc/powernv/opal_i2cm.c > head/sys/powerpc/powernv/powernv_centaur.c > head/sys/powerpc/powernv/powernv_xscom.c > > Modified: head/sys/conf/files.powerpc > ============================================================================== > --- head/sys/conf/files.powerpc Wed Mar 14 08:48:40 2018 (r330924) > +++ head/sys/conf/files.powerpc Wed Mar 14 09:20:03 2018 (r330925) > @@ -186,8 +186,8 @@ powerpc/powermac/vcoregpio.c optional powermac > powerpc/powernv/opal.c optional powernv > powerpc/powernv/opal_console.c optional powernv > powerpc/powernv/opal_dev.c optional powernv > -powerpc/powernv/opal_i2c.c optional iicbus fdt powernv > -powerpc/powernv/opal_i2cm.c optional iicbus fdt powernv > +powerpc/powernv/opal_i2c.c optional iicbus powernv > +powerpc/powernv/opal_i2cm.c optional iicbus powernv > powerpc/powernv/opal_pci.c optional powernv pci > powerpc/powernv/opalcall.S optional powernv > powerpc/powernv/platform_powernv.c optional powernv > > Modified: head/sys/powerpc/powernv/opal_i2c.c > ============================================================================== > --- head/sys/powerpc/powernv/opal_i2c.c Wed Mar 14 08:48:40 2018 (r330924) > +++ head/sys/powerpc/powernv/opal_i2c.c Wed Mar 14 09:20:03 2018 (r330925) > @@ -120,7 +120,9 @@ static int > opal_i2c_probe(device_t dev) > { > > +#ifdef FDT > if (!(ofw_bus_is_compatible(dev, "ibm,opal-i2c"))) > +#endif > return (ENXIO); > > device_set_desc(dev, "opal-i2c"); > @@ -131,6 +133,7 @@ opal_i2c_probe(device_t dev) > static int > opal_i2c_attach(device_t dev) > { > +#ifdef FDT > struct opal_i2c_softc *sc; > int len; > > @@ -150,6 +153,9 @@ opal_i2c_attach(device_t dev) > I2C_LOCK_INIT(sc); > > return (bus_generic_attach(dev)); > +#else > + return (ENXIO); > +#endif > } > > static int > > Modified: head/sys/powerpc/powernv/opal_i2cm.c > ============================================================================== > --- head/sys/powerpc/powernv/opal_i2cm.c Wed Mar 14 08:48:40 2018 (r330924) > +++ head/sys/powerpc/powernv/opal_i2cm.c Wed Mar 14 09:20:03 2018 (r330925) > @@ -57,14 +57,17 @@ struct opal_i2cm_softc > > static int opal_i2cm_attach(device_t); > static int opal_i2cm_probe(device_t); > +#ifdef FDT > static const struct ofw_bus_devinfo * > opal_i2cm_get_devinfo(device_t, device_t); > +#endif > > static device_method_t opal_i2cm_methods[] = { > /* Device interface */ > DEVMETHOD(device_probe, opal_i2cm_probe), > DEVMETHOD(device_attach, opal_i2cm_attach), > > +#ifdef FDT > /* ofw_bus interface */ > DEVMETHOD(ofw_bus_get_devinfo, opal_i2cm_get_devinfo), > DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), > @@ -72,6 +75,7 @@ static device_method_t opal_i2cm_methods[] = { > DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), > DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), > DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), > +#endif > > DEVMETHOD_END > }; > @@ -82,8 +86,10 @@ static int > opal_i2cm_probe(device_t dev) > { > > +#ifdef FDT > if (!(ofw_bus_is_compatible(dev, "ibm,centaur-i2cm") || > ofw_bus_is_compatible(dev, "ibm,power8-i2cm"))) > +#endif > return (ENXIO); > > device_set_desc(dev, "centaur-i2cm"); > @@ -93,6 +99,7 @@ opal_i2cm_probe(device_t dev) > static int > opal_i2cm_attach(device_t dev) > { > +#ifdef FDT > phandle_t child; > device_t cdev; > struct ofw_bus_devinfo *dinfo; > @@ -116,13 +123,18 @@ opal_i2cm_attach(device_t dev) > } > > return (bus_generic_attach(dev)); > +#else > + return (ENXIO); > +#endif > } > > +#ifdef FDT > static const struct ofw_bus_devinfo * > opal_i2cm_get_devinfo(device_t dev, device_t child) > { > return (device_get_ivars(child)); > } > +#endif > > DEFINE_CLASS_0(opal_i2cm, opal_i2cm_driver, opal_i2cm_methods, > sizeof(struct opal_i2cm_softc)); > > Modified: head/sys/powerpc/powernv/powernv_centaur.c > ============================================================================== > --- head/sys/powerpc/powernv/powernv_centaur.c Wed Mar 14 08:48:40 2018 (r330924) > +++ head/sys/powerpc/powernv/powernv_centaur.c Wed Mar 14 09:20:03 2018 (r330925) > @@ -57,14 +57,17 @@ struct powernv_centaur_softc > > static int powernv_centaur_attach(device_t); > static int powernv_centaur_probe(device_t); > +#ifdef FDT > static const struct ofw_bus_devinfo * > powernv_centaur_get_devinfo(device_t, device_t); > +#endif > > static device_method_t powernv_centaur_methods[] = { > /* Device interface */ > DEVMETHOD(device_probe, powernv_centaur_probe), > DEVMETHOD(device_attach, powernv_centaur_attach), > > +#ifdef FDT > /* ofw_bus interface */ > DEVMETHOD(ofw_bus_get_devinfo, powernv_centaur_get_devinfo), > DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), > @@ -72,7 +75,7 @@ static device_method_t powernv_centaur_methods[] = { > DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), > DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), > DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), > - > +#endif > DEVMETHOD_END > }; > > @@ -82,7 +85,9 @@ static int > powernv_centaur_probe(device_t dev) > { > > +#ifdef FDT > if (!(ofw_bus_is_compatible(dev, "ibm,centaur"))) > +#endif > return (ENXIO); > > device_set_desc(dev, "centaur"); > @@ -92,6 +97,7 @@ powernv_centaur_probe(device_t dev) > static int > powernv_centaur_attach(device_t dev) > { > +#ifdef FDT > phandle_t child; > device_t cdev; > struct ofw_bus_devinfo *dinfo; > @@ -115,13 +121,18 @@ powernv_centaur_attach(device_t dev) > } > > return (bus_generic_attach(dev)); > +#else > + return (ENXIO); > +#endif > } > > +#ifdef FDT > static const struct ofw_bus_devinfo * > powernv_centaur_get_devinfo(device_t dev, device_t child) > { > return (device_get_ivars(child)); > } > +#endif > > DEFINE_CLASS_0(powernv_centaur, powernv_centaur_driver, powernv_centaur_methods, > sizeof(struct powernv_centaur_softc)); > > Modified: head/sys/powerpc/powernv/powernv_xscom.c > ============================================================================== > --- head/sys/powerpc/powernv/powernv_xscom.c Wed Mar 14 08:48:40 2018 (r330924) > +++ head/sys/powerpc/powernv/powernv_xscom.c Wed Mar 14 09:20:03 2018 (r330925) > @@ -57,14 +57,17 @@ struct powernv_xscom_softc > > static int powernv_xscom_attach(device_t); > static int powernv_xscom_probe(device_t); > +#ifdef FDT > static const struct ofw_bus_devinfo * > powernv_xscom_get_devinfo(device_t, device_t); > +#endif > > static device_method_t powernv_xscom_methods[] = { > /* Device interface */ > DEVMETHOD(device_probe, powernv_xscom_probe), > DEVMETHOD(device_attach, powernv_xscom_attach), > > +#ifdef FDT > /* ofw_bus interface */ > DEVMETHOD(ofw_bus_get_devinfo, powernv_xscom_get_devinfo), > DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), > @@ -72,6 +75,7 @@ static device_method_t powernv_xscom_methods[] = { > DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), > DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), > DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), > +#endif > > DEVMETHOD_END > }; > @@ -82,7 +86,9 @@ static int > powernv_xscom_probe(device_t dev) > { > > +#ifdef FDT > if (!(ofw_bus_is_compatible(dev, "ibm,xscom"))) > +#endif > return (ENXIO); > > device_set_desc(dev, "xscom"); > @@ -92,6 +98,7 @@ powernv_xscom_probe(device_t dev) > static int > powernv_xscom_attach(device_t dev) > { > +#ifdef FDT > phandle_t child; > device_t cdev; > struct ofw_bus_devinfo *dinfo; > @@ -115,13 +122,18 @@ powernv_xscom_attach(device_t dev) > } > > return (bus_generic_attach(dev)); > +#else > + return (ENXIO); > +#endif > } > > +#ifdef FDT > static const struct ofw_bus_devinfo * > powernv_xscom_get_devinfo(device_t dev, device_t child) > { > return (device_get_ivars(child)); > } > +#endif > > DEFINE_CLASS_0(powernv_xscom, powernv_xscom_driver, powernv_xscom_methods, > sizeof(struct powernv_xscom_softc)); > From owner-svn-src-all@freebsd.org Wed Mar 14 16:14:33 2018 Return-Path: Delivered-To: svn-src-all@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 22FFAF5B945; Wed, 14 Mar 2018 16:14:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2442683AC; Wed, 14 Mar 2018 16:14:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 1190A2603AE; Wed, 14 Mar 2018 17:14:31 +0100 (CET) Subject: Re: svn commit: r330885 - head/sys/modules/cam To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803132336.w2DNaFme025632@repo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Wed, 14 Mar 2018 17:14:26 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <201803132336.w2DNaFme025632@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 16:14:33 -0000 On 03/14/18 00:36, Warner Losh wrote: > Author: imp > Date: Tue Mar 13 23:36:15 2018 > New Revision: 330885 > URL: https://svnweb.freebsd.org/changeset/base/330885 > > Log: > We need opt_compat.h after r330819 and 330820. > > Add opt_compat.h to fix the stand-alone build case. > > Sponsored by: Netflix. > > Modified: > head/sys/modules/cam/Makefile > > Modified: head/sys/modules/cam/Makefile > ============================================================================== > --- head/sys/modules/cam/Makefile Tue Mar 13 23:05:51 2018 (r330884) > +++ head/sys/modules/cam/Makefile Tue Mar 13 23:36:15 2018 (r330885) > @@ -8,6 +8,7 @@ KMOD= cam > > # See sys/conf/options for the flags that go into the different opt_*.h files. > SRCS= opt_cam.h > +SRCS= opt_compat.h > SRCS+= opt_ada.h > SRCS+= opt_scsi.h > SRCS+= opt_cd.h > > Hi, Should this be SRCS+= ? --HPS From owner-svn-src-all@freebsd.org Wed Mar 14 16:16:26 2018 Return-Path: Delivered-To: svn-src-all@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 71C29F5BACA; Wed, 14 Mar 2018 16:16:26 +0000 (UTC) (envelope-from nwhitehorn@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 12CA768590; Wed, 14 Mar 2018 16:16:26 +0000 (UTC) (envelope-from nwhitehorn@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 0919D1FA3; Wed, 14 Mar 2018 16:16:26 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2EGGPvE030625; Wed, 14 Mar 2018 16:16:25 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EGGPOp030624; Wed, 14 Mar 2018 16:16:25 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201803141616.w2EGGPOp030624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Wed, 14 Mar 2018 16:16:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330930 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 330930 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 16:16:26 -0000 Author: nwhitehorn Date: Wed Mar 14 16:16:25 2018 New Revision: 330930 URL: https://svnweb.freebsd.org/changeset/base/330930 Log: The expression (aim | fdt) is always true on PowerPC. The last PowerPC platform that can run without a device tree (PS3) still uses the OF_*() functions to check if one exists and OF_* is used unconditionally in core parts of the system like powerpc/machdep.c. Reflect this reality in files.powerpc, for example by changing occurrences of aim | fdt to standard. Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Wed Mar 14 14:45:57 2018 (r330929) +++ head/sys/conf/files.powerpc Wed Mar 14 16:16:25 2018 (r330930) @@ -32,7 +32,7 @@ dev/adb/adb_buttons.c optional adb dev/agp/agp_apple.c optional agp powermac dev/fb/fb.c optional sc # ofwbus depends on simplebus. -dev/fdt/simplebus.c optional aim | fdt +dev/fdt/simplebus.c optional standard dev/hwpmc/hwpmc_e500.c optional hwpmc dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc dev/hwpmc/hwpmc_powerpc.c optional hwpmc @@ -55,7 +55,7 @@ dev/ofw/ofw_if.m optional aim dev/ofw/ofw_bus_subr.c optional aim dev/ofw/ofw_console.c optional aim dev/ofw/ofw_disk.c optional ofwd aim -dev/ofw/ofwbus.c optional aim | fdt +dev/ofw/ofwbus.c optional aim dev/ofw/ofwpci.c optional pci dev/ofw/ofw_standard.c optional aim powerpc dev/ofw/ofw_subr.c optional aim powerpc @@ -74,7 +74,7 @@ dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc dev/tsec/if_tsec.c optional tsec -dev/tsec/if_tsec_fdt.c optional tsec fdt +dev/tsec/if_tsec_fdt.c optional tsec dev/uart/uart_cpu_powerpc.c optional uart dev/usb/controller/ehci_fsl.c optional ehci mpc85xx dev/vt/hw/ofwfb/ofwfb.c optional vt aim @@ -136,12 +136,12 @@ powerpc/mambo/mambo_disk.c optional mambo powerpc/mikrotik/platform_rb.c optional mikrotik powerpc/mikrotik/rb_led.c optional mikrotik powerpc/mpc85xx/atpic.c optional mpc85xx isa -powerpc/mpc85xx/ds1553_bus_fdt.c optional ds1553 fdt +powerpc/mpc85xx/ds1553_bus_fdt.c optional ds1553 powerpc/mpc85xx/ds1553_core.c optional ds1553 powerpc/mpc85xx/fsl_diu.c optional mpc85xx diu powerpc/mpc85xx/fsl_espi.c optional mpc85xx spibus powerpc/mpc85xx/fsl_sata.c optional mpc85xx ata -powerpc/mpc85xx/i2c.c optional iicbus fdt +powerpc/mpc85xx/i2c.c optional iicbus powerpc/mpc85xx/isa.c optional mpc85xx isa powerpc/mpc85xx/lbc.c optional mpc85xx powerpc/mpc85xx/mpc85xx.c optional mpc85xx @@ -158,7 +158,7 @@ powerpc/ofw/ofw_real.c optional aim powerpc/ofw/ofw_syscons.c optional sc aim powerpc/ofw/ofwcall32.S optional aim powerpc powerpc/ofw/ofwcall64.S optional aim powerpc64 -powerpc/ofw/openpic_ofw.c optional aim | fdt +powerpc/ofw/openpic_ofw.c optional standard powerpc/ofw/rtas.c optional aim powerpc/powermac/ata_kauai.c optional powermac ata | powermac atamacio powerpc/powermac/ata_macio.c optional powermac ata | powermac atamacio From owner-svn-src-all@freebsd.org Wed Mar 14 16:19:35 2018 Return-Path: Delivered-To: svn-src-all@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 6CBCAF5BE4B; Wed, 14 Mar 2018 16:19:35 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-lf0-x22c.google.com (mail-lf0-x22c.google.com [IPv6:2a00:1450:4010:c07::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D24F16882F; Wed, 14 Mar 2018 16:19:34 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-lf0-x22c.google.com with SMTP id y19-v6so5707760lfd.4; Wed, 14 Mar 2018 09:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=fycUc9k7JlUKV1cVGIpm1kkvnGnSz2Rs58NOnkCqq3Q=; b=FDDHlwNaYfAIZoEUazt0da/d/PpeiJyrnWGzLZzpiit+g68F9DtqlkY+GTuq+j3YV0 ofifY+fgraCgKe52mr28QlbLpmS0qYHFydy03eDg+tTsjQiBFhfK/f4lfAH4WKgL6td8 b0UoGhsTeHmii/hOILShQbssMrbWsjJ0AVczGGoTj26XYHQfh8vFXBZkyOZyKeqoKqJD TWW5fOXFQ/Q1O4dVDlSnBDJYf6vzRaPYcN4DNvOhbhywOwXV2FyMj8vi2aYziK4IhRL5 KTFIyFrfwPSvgi9bbAyhYU7B+VeprsqeGAHKWbi6ubpOKWIxrrcS3+qaSUPSrqXePuow Bwvg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alumni-cwru-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=fycUc9k7JlUKV1cVGIpm1kkvnGnSz2Rs58NOnkCqq3Q=; b=k8Km1d1GqQ1C6WygHpwTHYK2yxJSnsbULCt/sl4cPshmSvgh3WJFdEx0JZ5ctrx4uM zjCAJvi4PH1zshf++/KtwVpc736SW/OSbE9N+nQl45vXUnoH0LNYvQK3orG++BUFQq7Q 6jfWvr6Kq8pZBMyUBMMM5WLYR+0+XCgtXBtnbwTbQaVcXgW6637ypvFvv/SflPUALUgB oXWDroG02IlzMqTAKNFHO3FM6O9s3GpoabbcANATitIA2nEB6dBs7L0GKb6509ndOqcN lgoK3PKGLXtZA+oeZ7Usj/U8TO892f7CJ3ZDkCgzhZukJQO5gyFIbh0c+f1DKKRfUc8X 8ajQ== 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=fycUc9k7JlUKV1cVGIpm1kkvnGnSz2Rs58NOnkCqq3Q=; b=frKIfixWPcjggQxAJYu/ZjcF8Kf/f30bbY8F/DzKISRlSmHWth97KUS9LQIesNgI2i Bev+vcDBk+DPmK2qt1sTTX035Lwjipu0ev6ckjpZ2+r5pqTCPJjM3i0bJUAs9mR0Pgb4 w0QyWa9E+GwzVdFCTJTTaF5ly0OpaIE28y6F/xe7+CXoaFqfyOqSCWSMCUevfjXygXHY afsnHKRMtlkMuP7y5mhEvgJKZ9T9IKVx6wkT7P0NMJXvcWV+IxPG7GWOmxWo9b7x+X/s ep2FFUTHlgHzEeHeZbGrtLSyL2QKx0BhEjJwwhmQqPTMmQKK3582BYXMfjeZTumtSfsF ig0g== X-Gm-Message-State: AElRT7GFLW1SClK2T1aEG+o/CF7E9wefvgwUAg25DeRV+ctEFSwFB2dD MARWjsViqzItRtfiB17/6B0eRCiYNjmAhX02WtE= X-Google-Smtp-Source: AG47ELs8nhiFCIAcq92uSNZNv/99GieWwwtmsLzUTEvoEO0iE2qTTJCKjz3VvvseyCS1UsArRTQYhlXrstdcHTweAEU= X-Received: by 2002:a19:2744:: with SMTP id n65-v6mr4030337lfn.67.1521044372198; Wed, 14 Mar 2018 09:19:32 -0700 (PDT) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.46.85.26 with HTTP; Wed, 14 Mar 2018 09:19:31 -0700 (PDT) In-Reply-To: <201803141616.w2EGGPOp030624@repo.freebsd.org> References: <201803141616.w2EGGPOp030624@repo.freebsd.org> From: Justin Hibbits Date: Wed, 14 Mar 2018 11:19:31 -0500 X-Google-Sender-Auth: Y6EbzJXZz7cCyc4VJ72cuGaU1Yc Message-ID: Subject: Re: svn commit: r330930 - head/sys/conf To: Nathan Whitehorn Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 16:19:35 -0000 On Wed, Mar 14, 2018 at 11:16 AM, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Wed Mar 14 16:16:25 2018 > New Revision: 330930 > URL: https://svnweb.freebsd.org/changeset/base/330930 > > Log: > The expression (aim | fdt) is always true on PowerPC. The last PowerPC > platform that can run without a device tree (PS3) still uses the OF_*() > functions to check if one exists and OF_* is used unconditionally in > core parts of the system like powerpc/machdep.c. Reflect this reality > in files.powerpc, for example by changing occurrences of aim | fdt to > standard. > > Modified: > head/sys/conf/files.powerpc > > Modified: head/sys/conf/files.powerpc > ============================================================================== > --- head/sys/conf/files.powerpc Wed Mar 14 14:45:57 2018 (r330929) > +++ head/sys/conf/files.powerpc Wed Mar 14 16:16:25 2018 (r330930) > @@ -32,7 +32,7 @@ dev/adb/adb_buttons.c optional adb > dev/agp/agp_apple.c optional agp powermac > dev/fb/fb.c optional sc > # ofwbus depends on simplebus. > -dev/fdt/simplebus.c optional aim | fdt > +dev/fdt/simplebus.c optional standard > dev/hwpmc/hwpmc_e500.c optional hwpmc > dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc > dev/hwpmc/hwpmc_powerpc.c optional hwpmc > @@ -55,7 +55,7 @@ dev/ofw/ofw_if.m optional aim > dev/ofw/ofw_bus_subr.c optional aim > dev/ofw/ofw_console.c optional aim > dev/ofw/ofw_disk.c optional ofwd aim > -dev/ofw/ofwbus.c optional aim | fdt > +dev/ofw/ofwbus.c optional aim ofwbus is used by Book-E too, not just AIM. And 'aim' is not defined for Book-E platforms. Maybe it should be 'standard' instead? - Justin From owner-svn-src-all@freebsd.org Wed Mar 14 16:43:00 2018 Return-Path: Delivered-To: svn-src-all@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 EBD1E6CE; Wed, 14 Mar 2018 16:42:59 +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 6C28269F38; Wed, 14 Mar 2018 16:42:58 +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 w2EGgtBn088820; Wed, 14 Mar 2018 09:42:55 -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 w2EGgtYM088819; Wed, 14 Mar 2018 09:42:55 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803141642.w2EGgtYM088819@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330930 - head/sys/conf In-Reply-To: <201803141616.w2EGGPOp030624@repo.freebsd.org> To: Nathan Whitehorn Date: Wed, 14 Mar 2018 09:42:55 -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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 16:43:00 -0000 > Author: nwhitehorn > Date: Wed Mar 14 16:16:25 2018 > New Revision: 330930 > URL: https://svnweb.freebsd.org/changeset/base/330930 > > Log: > The expression (aim | fdt) is always true on PowerPC. The last PowerPC > platform that can run without a device tree (PS3) still uses the OF_*() > functions to check if one exists and OF_* is used unconditionally in > core parts of the system like powerpc/machdep.c. Reflect this reality > in files.powerpc, for example by changing occurrences of aim | fdt to > standard. > > Modified: > head/sys/conf/files.powerpc > > Modified: head/sys/conf/files.powerpc > ============================================================================== > --- head/sys/conf/files.powerpc Wed Mar 14 14:45:57 2018 (r330929) > +++ head/sys/conf/files.powerpc Wed Mar 14 16:16:25 2018 (r330930) > @@ -32,7 +32,7 @@ dev/adb/adb_buttons.c optional adb > dev/agp/agp_apple.c optional agp powermac > dev/fb/fb.c optional sc > # ofwbus depends on simplebus. > -dev/fdt/simplebus.c optional aim | fdt > +dev/fdt/simplebus.c optional standard optionaly standard? > dev/hwpmc/hwpmc_e500.c optional hwpmc > dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc > dev/hwpmc/hwpmc_powerpc.c optional hwpmc > @@ -55,7 +55,7 @@ dev/ofw/ofw_if.m optional aim > dev/ofw/ofw_bus_subr.c optional aim > dev/ofw/ofw_console.c optional aim > dev/ofw/ofw_disk.c optional ofwd aim > -dev/ofw/ofwbus.c optional aim | fdt > +dev/ofw/ofwbus.c optional aim > dev/ofw/ofwpci.c optional pci > dev/ofw/ofw_standard.c optional aim powerpc > dev/ofw/ofw_subr.c optional aim powerpc > @@ -74,7 +74,7 @@ dev/syscons/scgfbrndr.c optional sc > dev/syscons/scterm-teken.c optional sc > dev/syscons/scvtb.c optional sc > dev/tsec/if_tsec.c optional tsec > -dev/tsec/if_tsec_fdt.c optional tsec fdt > +dev/tsec/if_tsec_fdt.c optional tsec > dev/uart/uart_cpu_powerpc.c optional uart > dev/usb/controller/ehci_fsl.c optional ehci mpc85xx > dev/vt/hw/ofwfb/ofwfb.c optional vt aim > @@ -136,12 +136,12 @@ powerpc/mambo/mambo_disk.c optional mambo > powerpc/mikrotik/platform_rb.c optional mikrotik > powerpc/mikrotik/rb_led.c optional mikrotik > powerpc/mpc85xx/atpic.c optional mpc85xx isa > -powerpc/mpc85xx/ds1553_bus_fdt.c optional ds1553 fdt > +powerpc/mpc85xx/ds1553_bus_fdt.c optional ds1553 > powerpc/mpc85xx/ds1553_core.c optional ds1553 > powerpc/mpc85xx/fsl_diu.c optional mpc85xx diu > powerpc/mpc85xx/fsl_espi.c optional mpc85xx spibus > powerpc/mpc85xx/fsl_sata.c optional mpc85xx ata > -powerpc/mpc85xx/i2c.c optional iicbus fdt > +powerpc/mpc85xx/i2c.c optional iicbus > powerpc/mpc85xx/isa.c optional mpc85xx isa > powerpc/mpc85xx/lbc.c optional mpc85xx > powerpc/mpc85xx/mpc85xx.c optional mpc85xx > @@ -158,7 +158,7 @@ powerpc/ofw/ofw_real.c optional aim > powerpc/ofw/ofw_syscons.c optional sc aim > powerpc/ofw/ofwcall32.S optional aim powerpc > powerpc/ofw/ofwcall64.S optional aim powerpc64 > -powerpc/ofw/openpic_ofw.c optional aim | fdt > +powerpc/ofw/openpic_ofw.c optional standard And here too > powerpc/ofw/rtas.c optional aim > powerpc/powermac/ata_kauai.c optional powermac ata | powermac atamacio > powerpc/powermac/ata_macio.c optional powermac ata | powermac atamacio > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Wed Mar 14 16:43:48 2018 Return-Path: Delivered-To: svn-src-all@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 56F707C1 for ; Wed, 14 Mar 2018 16:43:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D77686A090 for ; Wed, 14 Mar 2018 16:43:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x236.google.com with SMTP id u66-v6so5418517ith.1 for ; Wed, 14 Mar 2018 09:43: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=YLqB7unhpM7dijXOpq6bHvtaIxWppwK13pyYFUu/pQQ=; b=CGGQZgBeJksauwTNOtrCOrhJKcQMLDIKpO3dMEUmDXye5HasEUuqw5ikamrN2ZNc8W O9JeSVfBUyg2uvFXtMyQijm7J30seOixwei+2z6zq8GyUX/dT+GsHXZt/XoTGa/xWbBG XEeAJhEMf5tCTAjiXsc0MbaM+8cNQgGZAndWKQTkJX+jeHKVnHSecS/2JFOcVQpn3x7a UkFVA4kb+6136131dnoEXFa5nB2nlB3udqCIhMmM9YY3nVNZylyll278IGIYc6O4Mhkp vFaT4iPD1UPBntOtHg6GM7DWaJELdfF/uGNsh4AyXzYtsAl1o0UcAmSCCLbt3NaFRfWu cxCA== 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=YLqB7unhpM7dijXOpq6bHvtaIxWppwK13pyYFUu/pQQ=; b=RoTdmVefWB8kzlsh/xtEc3Mb1D5rouzuvYzWgkwgm41LSr2k4kBpnzc6Dl8iK6Vn92 XlqS17g4ngBnY8YJccP6egOLmLvCRomLkoe8xqjVg/HtEnL9YW3oog3nQ4IbFafN2BP9 0ymb8O1bXe2kLfWrio6r0Yz06gFpwNj+CwdLCoGJCEWT/P9B0nnasHwSilEgLnCxv4p/ gM13PrklHRAsAPQxNTHBm42y6S+OFbRd6jiuJf4GzZOoGAoCt3TLa9D5H3BZg3i/8yP+ CLXsAys8IQrdxWSQaSVxPId4RUYOr3NYAFGGiejI9cM5Zl+S0LsI0DEe1xGRasOf7sAK TRNA== X-Gm-Message-State: AElRT7GjeSnwQmzrXsXbJbv2M6RRG2KMHcgtuOnjeEeBPs2gn2pUguXZ K69SMVqGqOg2Rbm9AlfDQ8aszuKtbZJMzGnA4W7lSg== X-Google-Smtp-Source: AG47ELt3aKP1lBUMKkZuuoeEVk0Yc/P/HkzCqcql6YHMBe5x7qeKAgDo8SG7pof2ljty/jsb5lVMHg4qA+ARadgeJ3Y= X-Received: by 10.36.16.147 with SMTP id 141mr2771893ity.73.1521045827128; Wed, 14 Mar 2018 09:43:47 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Wed, 14 Mar 2018 09:43:46 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201803132336.w2DNaFme025632@repo.freebsd.org> From: Warner Losh Date: Wed, 14 Mar 2018 10:43:46 -0600 X-Google-Sender-Auth: HQUzLTL9OAobKUI1VotX0UpYi84 Message-ID: Subject: Re: svn commit: r330885 - head/sys/modules/cam To: Hans Petter Selasky Cc: Warner Losh , 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.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 16:43:48 -0000 On Wed, Mar 14, 2018 at 10:14 AM, Hans Petter Selasky wrote: > On 03/14/18 00:36, Warner Losh wrote: > >> Author: imp >> Date: Tue Mar 13 23:36:15 2018 >> New Revision: 330885 >> URL: https://svnweb.freebsd.org/changeset/base/330885 >> >> Log: >> We need opt_compat.h after r330819 and 330820. >> Add opt_compat.h to fix the stand-alone build case. >> Sponsored by: Netflix. >> >> Modified: >> head/sys/modules/cam/Makefile >> >> Modified: head/sys/modules/cam/Makefile >> ============================================================ >> ================== >> --- head/sys/modules/cam/Makefile Tue Mar 13 23:05:51 2018 >> (r330884) >> +++ head/sys/modules/cam/Makefile Tue Mar 13 23:36:15 2018 >> (r330885) >> @@ -8,6 +8,7 @@ KMOD= cam >> # See sys/conf/options for the flags that go into the different >> opt_*.h files. >> SRCS= opt_cam.h >> +SRCS= opt_compat.h >> SRCS+= opt_ada.h >> SRCS+= opt_scsi.h >> SRCS+= opt_cd.h >> >> >> > Hi, > > Should this be SRCS+= ? Yes. I had an unclean build and it worked. Good eye. Wanrer From owner-svn-src-all@freebsd.org Wed Mar 14 16:44:17 2018 Return-Path: Delivered-To: svn-src-all@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 27B5783C; Wed, 14 Mar 2018 16:44:17 +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 CDAB56A1CF; Wed, 14 Mar 2018 16:44:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C48262427; Wed, 14 Mar 2018 16:44:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2EGiGll046072; Wed, 14 Mar 2018 16:44:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EGiGbx046071; Wed, 14 Mar 2018 16:44:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803141644.w2EGiGbx046071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Mar 2018 16:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330931 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 330931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 16:44:17 -0000 Author: imp Date: Wed Mar 14 16:44:16 2018 New Revision: 330931 URL: https://svnweb.freebsd.org/changeset/base/330931 Log: Allow NULL ccb to cam_iosched_bio_complete When the ccb is NULL to cam_iosched_bio_complete, just update the other statistics, but not the time. If many operations are collapsed together, this is needed to keep stats properly for the grouped bp. This should fix trim accounting. Sponsored by: Netflix Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Wed Mar 14 16:16:25 2018 (r330930) +++ head/sys/cam/cam_iosched.c Wed Mar 14 16:44:16 2018 (r330931) @@ -1493,7 +1493,7 @@ cam_iosched_bio_complete(struct cam_iosched_softc *isc printf("Completing command with bio_cmd == %#x\n", bp->bio_cmd); } - if (!(bp->bio_flags & BIO_ERROR)) + if (!(bp->bio_flags & BIO_ERROR) && done_ccb != NULL) cam_iosched_io_metric_update(isc, cam_iosched_sbintime_t(done_ccb->ccb_h.qos.periph_data), bp->bio_cmd, bp->bio_bcount); From owner-svn-src-all@freebsd.org Wed Mar 14 16:44:51 2018 Return-Path: Delivered-To: svn-src-all@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 798298D3; Wed, 14 Mar 2018 16:44:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2AEEB6A2DF; Wed, 14 Mar 2018 16:44:51 +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 25B352428; Wed, 14 Mar 2018 16:44:51 +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 w2EGipWx046142; Wed, 14 Mar 2018 16:44:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EGioti046140; Wed, 14 Mar 2018 16:44:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803141644.w2EGioti046140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Mar 2018 16:44:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330932 - in head/sys: cam/nvme dev/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: cam/nvme dev/nvme X-SVN-Commit-Revision: 330932 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 16:44:51 -0000 Author: imp Date: Wed Mar 14 16:44:50 2018 New Revision: 330932 URL: https://svnweb.freebsd.org/changeset/base/330932 Log: Implement trim collapsing in nda When multiple trims are in the queue, collapse them as much as possible. At present, this usually results in only a few trims being collapsed together, but more work on that will make it possible to do hundreds (up to some configurable max). Sponsored by: Netflix Modified: head/sys/cam/nvme/nvme_da.c head/sys/dev/nvme/nvme.h Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Wed Mar 14 16:44:16 2018 (r330931) +++ head/sys/cam/nvme/nvme_da.c Wed Mar 14 16:44:50 2018 (r330932) @@ -93,12 +93,10 @@ typedef enum { } nda_ccb_state; /* Offsets into our private area for storing information */ -#define ccb_state ppriv_field0 -#define ccb_bp ppriv_ptr1 +#define ccb_state ccb_h.ppriv_field0 +#define ccb_bp ccb_h.ppriv_ptr1 /* For NDA_CCB_BUFFER_IO */ +#define ccb_trim ccb_h.ppriv_ptr1 /* For NDA_CCB_TRIM */ -struct trim_request { - TAILQ_HEAD(, bio) bps; -}; struct nda_softc { struct cam_iosched_softc *cam_iosched; int outstanding_cmds; /* Number of active commands */ @@ -107,12 +105,13 @@ struct nda_softc { nda_flags flags; nda_quirks quirks; int unmappedio; + quad_t deletes; + quad_t dsm_req; uint32_t nsid; /* Namespace ID for this nda device */ struct disk *disk; struct task sysctl_task; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; - struct trim_request trim_req; #ifdef CAM_IO_STATS struct sysctl_ctx_list sysctl_stats_ctx; struct sysctl_oid *sysctl_stats_tree; @@ -122,6 +121,14 @@ struct nda_softc { #endif }; +struct nda_trim_request { + union { + struct nvme_dsm_range dsm; + uint8_t data[NVME_MAX_DSM_TRIM]; + }; + TAILQ_HEAD(, bio) bps; +}; + /* Need quirk table */ static disk_strategy_t ndastrategy; @@ -150,11 +157,14 @@ static void ndasuspend(void *arg); #ifndef NDA_DEFAULT_RETRY #define NDA_DEFAULT_RETRY 4 #endif +#ifndef NDA_MAX_TRIM_ENTRIES +#define NDA_MAX_TRIM_ENTRIES 256 /* Number of DSM trims to use, max 256 */ +#endif - //static int nda_retry_count = NDA_DEFAULT_RETRY; static int nda_send_ordered = NDA_DEFAULT_SEND_ORDERED; static int nda_default_timeout = NDA_DEFAULT_TIMEOUT; +static int nda_max_trim_entries = NDA_MAX_TRIM_ENTRIES; /* * All NVMe media is non-rotational, so all nvme device instances @@ -361,6 +371,9 @@ ndastrategy(struct bio *bp) return; } + if (bp->bio_cmd == BIO_DELETE) + softc->deletes++; + /* * Place it in the queue of disk activities for this disk */ @@ -401,7 +414,7 @@ ndadump(void *arg, void *virtual, vm_offset_t physical memset(&nvmeio, 0, sizeof(nvmeio)); if (length > 0) { xpt_setup_ccb(&nvmeio.ccb_h, periph->path, CAM_PRIORITY_NORMAL); - nvmeio.ccb_h.ccb_state = NDA_CCB_DUMP; + nvmeio.ccb_state = NDA_CCB_DUMP; nda_nvme_write(softc, &nvmeio, virtual, lba, length, count); error = cam_periph_runccb((union ccb *)&nvmeio, cam_periph_error, 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); @@ -414,7 +427,7 @@ ndadump(void *arg, void *virtual, vm_offset_t physical /* Flush */ xpt_setup_ccb(&nvmeio.ccb_h, periph->path, CAM_PRIORITY_NORMAL); - nvmeio.ccb_h.ccb_state = NDA_CCB_DUMP; + nvmeio.ccb_state = NDA_CCB_DUMP; nda_nvme_flush(softc, &nvmeio); error = cam_periph_runccb((union ccb *)&nvmeio, cam_periph_error, 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); @@ -610,6 +623,14 @@ ndasysctlinit(void *context, int pending) OID_AUTO, "unmapped_io", CTLFLAG_RD | CTLFLAG_MPSAFE, &softc->unmappedio, 0, "Unmapped I/O leaf"); + SYSCTL_ADD_QUAD(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "deletes", CTLFLAG_RD | CTLFLAG_MPSAFE, + &softc->deletes, "Number of BIO_DELETE requests"); + + SYSCTL_ADD_QUAD(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "dsm_req", CTLFLAG_RD | CTLFLAG_MPSAFE, + &softc->dsm_req, "Number of DSM requests sent to SIM"); + SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, @@ -902,24 +923,42 @@ ndastart(struct cam_periph *periph, union ccb *start_c } case BIO_DELETE: { - struct nvme_dsm_range *dsm_range; + struct nvme_dsm_range *dsm_range, *dsm_end; + struct nda_trim_request *trim; + struct bio *bp1; + int ents; - dsm_range = - malloc(sizeof(*dsm_range), M_NVMEDA, M_ZERO | M_NOWAIT); - if (dsm_range == NULL) { + trim = malloc(sizeof(*trim), M_NVMEDA, M_ZERO | M_NOWAIT); + if (trim == NULL) { biofinish(bp, NULL, ENOMEM); xpt_release_ccb(start_ccb); ndaschedule(periph); return; } - dsm_range->length = - htole32(bp->bio_bcount / softc->disk->d_sectorsize); - dsm_range->starting_lba = - htole64(bp->bio_offset / softc->disk->d_sectorsize); - bp->bio_driver2 = dsm_range; - nda_nvme_trim(softc, &start_ccb->nvmeio, dsm_range, 1); - start_ccb->ccb_h.ccb_state = NDA_CCB_TRIM; - start_ccb->ccb_h.flags |= CAM_UNLOCKED; + TAILQ_INIT(&trim->bps); + bp1 = bp; + ents = sizeof(trim->data) / sizeof(struct nvme_dsm_range); + ents = min(ents, nda_max_trim_entries); + dsm_range = &trim->dsm; + dsm_end = dsm_range + ents; + do { + TAILQ_INSERT_TAIL(&trim->bps, bp1, bio_queue); + dsm_range->length = + htole32(bp1->bio_bcount / softc->disk->d_sectorsize); + dsm_range->starting_lba = + htole32(bp1->bio_offset / softc->disk->d_sectorsize); + dsm_range++; + if (dsm_range >= dsm_end) + break; + bp1 = cam_iosched_next_trim(softc->cam_iosched); + /* XXX -- Could collapse adjacent ranges, but we don't for now */ + /* XXX -- Could limit based on total payload size */ + } while (bp1 != NULL); + start_ccb->ccb_trim = trim; + softc->dsm_req++; + nda_nvme_trim(softc, &start_ccb->nvmeio, &trim->dsm, + dsm_range - &trim->dsm); + start_ccb->ccb_state = NDA_CCB_TRIM; /* * Note: We can have multiple TRIMs in flight, so we don't call * cam_iosched_submit_trim(softc->cam_iosched); @@ -932,10 +971,10 @@ ndastart(struct cam_periph *periph, union ccb *start_c nda_nvme_flush(softc, nvmeio); break; } - start_ccb->ccb_h.ccb_state = NDA_CCB_BUFFER_IO; - start_ccb->ccb_h.flags |= CAM_UNLOCKED; + start_ccb->ccb_state = NDA_CCB_BUFFER_IO; + start_ccb->ccb_bp = bp; out: - start_ccb->ccb_h.ccb_bp = bp; + start_ccb->ccb_h.flags |= CAM_UNLOCKED; softc->outstanding_cmds++; softc->refcount++; cam_periph_unlock(periph); @@ -963,16 +1002,14 @@ ndadone(struct cam_periph *periph, union ccb *done_ccb CAM_DEBUG(path, CAM_DEBUG_TRACE, ("ndadone\n")); - state = nvmeio->ccb_h.ccb_state & NDA_CCB_TYPE_MASK; + state = nvmeio->ccb_state & NDA_CCB_TYPE_MASK; switch (state) { case NDA_CCB_BUFFER_IO: case NDA_CCB_TRIM: { - struct bio *bp; int error; cam_periph_lock(periph); - bp = (struct bio *)done_ccb->ccb_h.ccb_bp; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { error = ndaerror(done_ccb, 0, 0); if (error == ERESTART) { @@ -991,59 +1028,68 @@ ndadone(struct cam_periph *periph, union ccb *done_ccb panic("REQ_CMP with QFRZN"); error = 0; } - bp->bio_error = error; - if (error != 0) { - bp->bio_resid = bp->bio_bcount; - bp->bio_flags |= BIO_ERROR; - } else { - bp->bio_resid = 0; - } - if (state == NDA_CCB_TRIM) - free(bp->bio_driver2, M_NVMEDA); - softc->outstanding_cmds--; + if (state == NDA_CCB_BUFFER_IO) { + struct bio *bp; - /* - * We need to call cam_iosched before we call biodone so that we - * don't measure any activity that happens in the completion - * routine, which in the case of sendfile can be quite - * extensive. - */ - cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb); - xpt_release_ccb(done_ccb); - if (state == NDA_CCB_TRIM) { -#ifdef notyet + bp = (struct bio *)done_ccb->ccb_bp; + bp->bio_error = error; + if (error != 0) { + bp->bio_resid = bp->bio_bcount; + bp->bio_flags |= BIO_ERROR; + } else { + bp->bio_resid = 0; + } + softc->outstanding_cmds--; + + /* + * We need to call cam_iosched before we call biodone so that we + * don't measure any activity that happens in the completion + * routine, which in the case of sendfile can be quite + * extensive. + */ + cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb); + xpt_release_ccb(done_ccb); + ndaschedule(periph); + cam_periph_unlock(periph); + biodone(bp); + } else { /* state == NDA_CCB_TRIM */ + struct nda_trim_request *trim; + struct bio *bp1, *bp2; TAILQ_HEAD(, bio) queue; - struct bio *bp1; + trim = nvmeio->ccb_trim; TAILQ_INIT(&queue); - TAILQ_CONCAT(&queue, &softc->trim_req.bps, bio_queue); -#endif + TAILQ_CONCAT(&queue, &trim->bps, bio_queue); + free(trim, M_NVMEDA); + /* * Since we can have multiple trims in flight, we don't * need to call this here. * cam_iosched_trim_done(softc->cam_iosched); */ + /* + * The the I/O scheduler that we're finishing the I/O + * so we can keep book. The first one we pass in the CCB + * which has the timing information. The rest we pass in NULL + * so we can keep proper counts. + */ + bp1 = TAILQ_FIRST(&queue); + cam_iosched_bio_complete(softc->cam_iosched, bp1, done_ccb); + xpt_release_ccb(done_ccb); ndaschedule(periph); cam_periph_unlock(periph); -#ifdef notyet -/* Not yet collapsing several BIO_DELETE requests into one TRIM */ - while ((bp1 = TAILQ_FIRST(&queue)) != NULL) { - TAILQ_REMOVE(&queue, bp1, bio_queue); - bp1->bio_error = error; + while ((bp2 = TAILQ_FIRST(&queue)) != NULL) { + TAILQ_REMOVE(&queue, bp2, bio_queue); + bp2->bio_error = error; if (error != 0) { - bp1->bio_flags |= BIO_ERROR; - bp1->bio_resid = bp1->bio_bcount; + bp2->bio_flags |= BIO_ERROR; + bp2->bio_resid = bp1->bio_bcount; } else - bp1->bio_resid = 0; - biodone(bp1); + bp2->bio_resid = 0; + if (bp1 != bp2) + cam_iosched_bio_complete(softc->cam_iosched, bp2, NULL); + biodone(bp2); } -#else - biodone(bp); -#endif - } else { - ndaschedule(periph); - cam_periph_unlock(periph); - biodone(bp); } return; } Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Wed Mar 14 16:44:16 2018 (r330931) +++ head/sys/dev/nvme/nvme.h Wed Mar 14 16:44:50 2018 (r330932) @@ -484,6 +484,9 @@ struct nvme_dsm_range { uint64_t starting_lba; } __packed; +/* Largest DSM Trim that can be done */ +#define NVME_MAX_DSM_TRIM 4096 + _Static_assert(sizeof(struct nvme_dsm_range) == 16, "bad size for nvme_dsm_ranage"); /* status code types */ From owner-svn-src-all@freebsd.org Wed Mar 14 16:44:59 2018 Return-Path: Delivered-To: svn-src-all@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 763D0920; Wed, 14 Mar 2018 16:44:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C88156A3BD; Wed, 14 Mar 2018 16:44: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 751F32429; Wed, 14 Mar 2018 16:44: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 w2EGivQa046196; Wed, 14 Mar 2018 16:44:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EGivZA046195; Wed, 14 Mar 2018 16:44:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803141644.w2EGivZA046195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Mar 2018 16:44:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330933 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 330933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 16:44:59 -0000 Author: imp Date: Wed Mar 14 16:44:57 2018 New Revision: 330933 URL: https://svnweb.freebsd.org/changeset/base/330933 Log: Fix inverted logic that counted all completions as errors, except when they were actual errors. Sponsored by: Netflix Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Wed Mar 14 16:44:50 2018 (r330932) +++ head/sys/cam/cam_iosched.c Wed Mar 14 16:44:57 2018 (r330933) @@ -1473,18 +1473,18 @@ cam_iosched_bio_complete(struct cam_iosched_softc *isc printf("done: %p %#x\n", bp, bp->bio_cmd); if (bp->bio_cmd == BIO_WRITE) { retval = cam_iosched_limiter_iodone(&isc->write_stats, bp); - if (!(bp->bio_flags & BIO_ERROR)) + if ((bp->bio_flags & BIO_ERROR) != 0) isc->write_stats.errs++; isc->write_stats.out++; isc->write_stats.pending--; } else if (bp->bio_cmd == BIO_READ) { retval = cam_iosched_limiter_iodone(&isc->read_stats, bp); - if (!(bp->bio_flags & BIO_ERROR)) + if ((bp->bio_flags & BIO_ERROR) != 0) isc->read_stats.errs++; isc->read_stats.out++; isc->read_stats.pending--; } else if (bp->bio_cmd == BIO_DELETE) { - if (!(bp->bio_flags & BIO_ERROR)) + if ((bp->bio_flags & BIO_ERROR) != 0) isc->trim_stats.errs++; isc->trim_stats.out++; isc->trim_stats.pending--; From owner-svn-src-all@freebsd.org Wed Mar 14 16:45:07 2018 Return-Path: Delivered-To: svn-src-all@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 A2DB69C9; Wed, 14 Mar 2018 16:45:07 +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 E84A46A4BD; Wed, 14 Mar 2018 16:45:05 +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 1CB26242A; Wed, 14 Mar 2018 16:45:05 +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 w2EGj4Fk046264; Wed, 14 Mar 2018 16:45:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EGj41j046263; Wed, 14 Mar 2018 16:45:04 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803141645.w2EGj41j046263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Mar 2018 16:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330934 - head/sys/modules/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/modules/cam X-SVN-Commit-Revision: 330934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 16:45:07 -0000 Author: imp Date: Wed Mar 14 16:45:04 2018 New Revision: 330934 URL: https://svnweb.freebsd.org/changeset/base/330934 Log: This should have been += so clean builds work. Noticed by: hps@ Modified: head/sys/modules/cam/Makefile Modified: head/sys/modules/cam/Makefile ============================================================================== --- head/sys/modules/cam/Makefile Wed Mar 14 16:44:57 2018 (r330933) +++ head/sys/modules/cam/Makefile Wed Mar 14 16:45:04 2018 (r330934) @@ -8,7 +8,7 @@ KMOD= cam # See sys/conf/options for the flags that go into the different opt_*.h files. SRCS= opt_cam.h -SRCS= opt_compat.h +SRCS+= opt_compat.h SRCS+= opt_ada.h SRCS+= opt_scsi.h SRCS+= opt_cd.h From owner-svn-src-all@freebsd.org Wed Mar 14 17:08:29 2018 Return-Path: Delivered-To: svn-src-all@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 2D584F2B64A; Wed, 14 Mar 2018 17:08:29 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from pv33p00im-asmtp001.me.com (pv33p00im-asmtp001.me.com [17.142.194.250]) (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 B86B36B818; Wed, 14 Mar 2018 17:08:28 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.pv33p00im-asmtp001.me.com by pv33p00im-asmtp001.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0P5L00900BCHI700@pv33p00im-asmtp001.me.com>; Wed, 14 Mar 2018 17:08:17 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=04042017; t=1521047297; bh=TAXoB+StXcej1KkQol0X9tJkrakNsRmANZ096y7v8Nw=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=hCRjya7ZjDNpunqNuKMjXt0X/C4GzVY6Uud2kaBuebx4bIlIor8iMK409YypIlzlV P5O1SN4cHrKDvEvbrCQuQ8ikeh3Q4GZpHqJXbc00mnflGR9AUsLl6o/7z5+3YU0v0h /NjABRr586oq2P1DIT0gBARBODs6MuWQHvFvOjtu8MKq2VIIACHtdRDZLHEIVNZXPq WzAgElIIUy/2eQpbEpirndNzDCCqOGqJ5Afl/MHOVrhicATH8bkC1wybcW1rN80N4n RwYtM6rv4COGMrnvLsgNAXo4zm6x2vqeZt2LZsfqRJXmAKudJbLQpDT2prYKILBBXb wQWRbrLofi56g== Received: from icloud.com ([127.0.0.1]) by pv33p00im-asmtp001.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0P5L00OKUBLQ4330@pv33p00im-asmtp001.me.com>; Wed, 14 Mar 2018 17:08:15 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-14_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1803140191 User-Agent: Microsoft-MacOutlook/10.a.0.180210 Date: Wed, 14 Mar 2018 10:08:13 -0700 Subject: Re: svn commit: r330932 - in head/sys: cam/nvme dev/nvme From: Ravi Pokala To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <22796282-7844-4E9A-AC32-10B09822FD25@mac.com> Thread-topic: svn commit: r330932 - in head/sys: cam/nvme dev/nvme References: <201803141644.w2EGioti046140@repo.freebsd.org> In-reply-to: <201803141644.w2EGioti046140@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 17:08:29 -0000 Hi Warner, The TRIM command takes a buffer of range structures, and this change consol= idates multiple range structures into the buffer for a single TRIM command, = correct? Whereas the old functionality was to populate the buffer with a sin= gle range structure? So if we wanted to trim ranges [P..T], [A..E], [K..O], the old functionalit= y would be: TRIM:[P..T] ; TRIM:[A..E] ; TRIM:[K..O] The new functionality would be: TRIM:[P..T], [A..E], [K..O] Right? > + /* XXX -- Could collapse adjacent ranges, but we don't for now */ > + /* XXX -- Could limit based on total payload size */ And that future enhancement would make it: TRIM:[A..E], [K..T] Is that correct? Thanks, Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: on behalf of Warner Losh Date: 2018-03-14, Wednesday at 09:44 To: , , Subject: svn commit: r330932 - in head/sys: cam/nvme dev/nvme > Author: imp > Date: Wed Mar 14 16:44:50 2018 > New Revision: 330932 > URL: https://svnweb.freebsd.org/changeset/base/330932 >=20 > Log: > Implement trim collapsing in nda > =20 > When multiple trims are in the queue, collapse them as much as > possible. At present, this usually results in only a few trims being > collapsed together, but more work on that will make it possible to do > hundreds (up to some configurable max). > =20 > Sponsored by: Netflix From owner-svn-src-all@freebsd.org Wed Mar 14 17:16:59 2018 Return-Path: Delivered-To: svn-src-all@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 0EB01F2C02F for ; Wed, 14 Mar 2018 17:16:59 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 946316BE7F for ; Wed, 14 Mar 2018 17:16:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22e.google.com with SMTP id k21so5259442ioc.2 for ; Wed, 14 Mar 2018 10:16:58 -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=qMy42KClhMDzjHxMoAr4dnI+vIVkfLrBRK6G0cbiiZs=; b=ldERe3k2XvDyI5jbg8IVce4kz/LOXIJO9PffmP3mERf2e5NOmsMfbXOY/PnWXU0Dia 2wjfiB7Wwczf6uLDgEuFkXWnHYdRPlkzQ5B/VcFgG1IMuqlIcI3Y7PD4QdM1Ie8PNqXe tZUhi+p+acFJZIcuuOJH2psa5DUFi0+UAd2oMAIpP0wlu345zs6bUHMHrOc+QDkbG6ZU k1SOvoiWnh49BCrPmlnRvcWyfStkeQKCb3NUWgyT3WvnRrKiE9s1Xb937OYZ3WoE3Eku Cfu86aKZ9+Y7b2108zznvDOgvglz2xcys8xsA1Y6vdRpOf2Ir+U89Q7eBywjrDmkKUJ3 Q+UQ== 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=qMy42KClhMDzjHxMoAr4dnI+vIVkfLrBRK6G0cbiiZs=; b=bd5yo+wRYT/3esHF/8pxiZHzkbgxsQuxronFzkF86I4/S0D08DCZr3CIq1uG6PkL8J 5/42enAb1FcJUbaLm76ZrXstpvieRaFRTIm3NZ5cBebWqmuGpgDPpm6jAI9+m14+lZLi 0Q04AEW0lMoPDp2nD4t3IIhtsgBej/ojPueBjrpihYmNY+bee/5802yvDx5PvdjTcmHb U7XmHMugwv/f+vRsnZPEUy0zd3dVrivp2Dz+fjVQSBUXJspTN0W0lgn3y9FJPzMifRZN B2IEUv/Ies8+swZOYxBa78/jATuYeBa0ipt0IfVpRHn6nTBwcLkfqvhInmZ/rR7KsgTY A8Wg== X-Gm-Message-State: AElRT7G/Rw3aj5sHFJbfuUFGeTwr4gZjB2Q+tSxs+6TAxS6jT+1x/rpl blPSSeqt2G/KQHC7NqbkjqHSxkBG243gU00PXN2i7Q== X-Google-Smtp-Source: AG47ELt9KF4HfadbqSET7nCzhfLO/0FcWX6Dy2d0jgfMK8lJ9KuGbnd7wUY+FJej5h9w4eYLFJbvtjcfW5hl3jamzgE= X-Received: by 10.107.18.162 with SMTP id 34mr5522556ios.168.1521047817533; Wed, 14 Mar 2018 10:16:57 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Wed, 14 Mar 2018 10:16:56 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <22796282-7844-4E9A-AC32-10B09822FD25@mac.com> References: <201803141644.w2EGioti046140@repo.freebsd.org> <22796282-7844-4E9A-AC32-10B09822FD25@mac.com> From: Warner Losh Date: Wed, 14 Mar 2018 11:16:56 -0600 X-Google-Sender-Auth: Nt8IVSvNg4Q03LsHOdK3LDq6Cas Message-ID: Subject: Re: svn commit: r330932 - in head/sys: cam/nvme dev/nvme To: Ravi Pokala Cc: Warner Losh , 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.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 17:16:59 -0000 On Wed, Mar 14, 2018 at 11:08 AM, Ravi Pokala wrote: > Hi Warner, > > The TRIM command takes a buffer of range structures, and this change > consolidates multiple range structures into the buffer for a single TRIM > command, correct? Whereas the old functionality was to populate the buffe= r > with a single range structure? > > So if we wanted to trim ranges [P..T], [A..E], [K..O], the old > functionality would be: > > TRIM:[P..T] ; TRIM:[A..E] ; TRIM:[K..O] > > The new functionality would be: > > TRIM:[P..T], [A..E], [K..O] > > Right? Correct. This helps a lot, at least for the drives I have access to. I'm working on adaptive features to allow us to know when it will help. > + /* XXX -- Could collapse adjacent ranges, > but we don't for now */ > > + /* XXX -- Could limit based on total > payload size */ > > And that future enhancement would make it: > > TRIM:[A..E], [K..T] > > Is that correct? > Yes. That's right. This code doesn't do that now. We also need to work on read biasing and a few other things as well, independent of what we send down to the driver. That's the scheduling bits. Some of the dynamic stuff will be only in the dynamic scheduler, but we need to not do trims first. I think that a strategy of collecting N BIO_DELETEs before we send down the DSM TRIM to the drive rather than sending them down asap would be useful (with some reasonable timeout so things don't get stuck for too long). Collecting TRIMs don't hang anything in the system, except reclaiming blocks on delete, as far as I can tell... I accidentally queued 10M trims and didn't drain them for 8 hours w/o anybody but the graphs for the machine that report queue length noticing... Warner > Thanks, > > Ravi (rpokala@) > > =EF=BB=BF-----Original Message----- > From: on behalf of Warner Losh > > Date: 2018-03-14, Wednesday at 09:44 > To: , , < > svn-src-head@freebsd.org> > Subject: svn commit: r330932 - in head/sys: cam/nvme dev/nvme > > > Author: imp > > Date: Wed Mar 14 16:44:50 2018 > > New Revision: 330932 > > URL: https://svnweb.freebsd.org/changeset/base/330932 > > > > Log: > > Implement trim collapsing in nda > > > > When multiple trims are in the queue, collapse them as much as > > possible. At present, this usually results in only a few trims being > > collapsed together, but more work on that will make it possible to do > > hundreds (up to some configurable max). > > > > Sponsored by: Netflix > > > > From owner-svn-src-all@freebsd.org Wed Mar 14 17:22:31 2018 Return-Path: Delivered-To: svn-src-all@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 8433AF2C867; Wed, 14 Mar 2018 17:22:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92CEB6C45B; Wed, 14 Mar 2018 17:22:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id DD6FF10AC13; Wed, 14 Mar 2018 13:22:29 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330884 - in head/sys: dev/cxgbe dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/tom Date: Tue, 13 Mar 2018 17:06:12 -0700 Message-ID: <2410730.L0NrraExMU@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201803132305.w2DN5pnc010768@repo.freebsd.org> References: <201803132305.w2DN5pnc010768@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 14 Mar 2018 13:22:30 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 17:22:31 -0000 On Tuesday, March 13, 2018 11:05:51 PM John Baldwin wrote: > Author: jhb > Date: Tue Mar 13 23:05:51 2018 > New Revision: 330884 > URL: https://svnweb.freebsd.org/changeset/base/330884 > > Log: > Support for TLS offload of TOE connections on T6 adapters. > > The TOE engine in Chelsio T6 adapters supports offloading of TLS > encryption and TCP segmentation for offloaded connections. Sockets > using TLS are required to use a set of custom socket options to upload > RX and TX keys to the NIC and to enable RX processing. Currently > these socket options are implemented as TCP options in the vendor > specific range. A patched OpenSSL library will be made available in a > port / package for use with the TLS TOE support. Note that making use of this requires a patched SSL library. There is not yet a port for one, but I'm working with brnrd@ to make a package of a patched OpenSSL. -- John Baldwin From owner-svn-src-all@freebsd.org Wed Mar 14 17:53:13 2018 Return-Path: Delivered-To: svn-src-all@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 A5600F2FE0F; Wed, 14 Mar 2018 17:53:13 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (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 2EAAD6DBC5; Wed, 14 Mar 2018 17:53:12 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from helicon.physics.ucla.edu (helicon.physics.ucla.edu [169.232.156.253]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id w2EHr4NC030327 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 14 Mar 2018 10:53:04 -0700 Subject: Re: svn commit: r330930 - head/sys/conf To: Justin Hibbits Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803141616.w2EGGPOp030624@repo.freebsd.org> From: Nathan Whitehorn Message-ID: <76363d7d-e21d-6e97-f638-855342242422@freebsd.org> Date: Wed, 14 Mar 2018 10:53:04 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Sonic-CAuth: UmFuZG9tSVYJY8NSNe1sKCX5bG0mM0HMZEChF7BWn9n9PE5RtekAM/3R7KkabCPAerVHR7eQ/cbD4Hm8z2RMhZUmQhiYnehOKgFefpqWCwI= X-Sonic-ID: C;GtSbi7An6BGjDyAFsE207w== M;LI3Vi7An6BGjDyAFsE207w== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 17:53:13 -0000 On 03/14/18 09:19, Justin Hibbits wrote: > On Wed, Mar 14, 2018 at 11:16 AM, Nathan Whitehorn > wrote: >> Author: nwhitehorn >> Date: Wed Mar 14 16:16:25 2018 >> New Revision: 330930 >> URL: https://svnweb.freebsd.org/changeset/base/330930 >> >> Log: >> The expression (aim | fdt) is always true on PowerPC. The last PowerPC >> platform that can run without a device tree (PS3) still uses the OF_*() >> functions to check if one exists and OF_* is used unconditionally in >> core parts of the system like powerpc/machdep.c. Reflect this reality >> in files.powerpc, for example by changing occurrences of aim | fdt to >> standard. >> >> Modified: >> head/sys/conf/files.powerpc >> >> Modified: head/sys/conf/files.powerpc >> ============================================================================== >> --- head/sys/conf/files.powerpc Wed Mar 14 14:45:57 2018 (r330929) >> +++ head/sys/conf/files.powerpc Wed Mar 14 16:16:25 2018 (r330930) >> @@ -32,7 +32,7 @@ dev/adb/adb_buttons.c optional adb >> dev/agp/agp_apple.c optional agp powermac >> dev/fb/fb.c optional sc >> # ofwbus depends on simplebus. >> -dev/fdt/simplebus.c optional aim | fdt >> +dev/fdt/simplebus.c optional standard >> dev/hwpmc/hwpmc_e500.c optional hwpmc >> dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc >> dev/hwpmc/hwpmc_powerpc.c optional hwpmc >> @@ -55,7 +55,7 @@ dev/ofw/ofw_if.m optional aim >> dev/ofw/ofw_bus_subr.c optional aim >> dev/ofw/ofw_console.c optional aim >> dev/ofw/ofw_disk.c optional ofwd aim >> -dev/ofw/ofwbus.c optional aim | fdt >> +dev/ofw/ofwbus.c optional aim > ofwbus is used by Book-E too, not just AIM. And 'aim' is not defined > for Book-E platforms. Maybe it should be 'standard' instead? > > - Justin > See the comment above this line (which isn't in the diff): ofwbus.c can also be brought in by conf/files through the definition of options FDT. This block is just a safety valve for (AIM && !FDT) to make sure we always get it. We could also mark all of these standard; config is smart enough to deduplicate things. Would you prefer that? -Nathan From owner-svn-src-all@freebsd.org Wed Mar 14 17:53:38 2018 Return-Path: Delivered-To: svn-src-all@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 A2731F2FEB5; Wed, 14 Mar 2018 17:53:38 +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 4C1E36DD09; Wed, 14 Mar 2018 17:53:38 +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 46FFB2F27; Wed, 14 Mar 2018 17:53:38 +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 w2EHrc7n081238; Wed, 14 Mar 2018 17:53:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EHrbrE081231; Wed, 14 Mar 2018 17:53:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803141753.w2EHrbrE081231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Mar 2018 17:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330935 - in head/sys: cam cam/ata cam/nvme cam/scsi conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: cam cam/ata cam/nvme cam/scsi conf X-SVN-Commit-Revision: 330935 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 17:53:38 -0000 Author: imp Date: Wed Mar 14 17:53:37 2018 New Revision: 330935 URL: https://svnweb.freebsd.org/changeset/base/330935 Log: Create a sysctl kern.cam.{,a,n}da.X.invalidate kern.cam.{,a,n}da.X.invalidate=1 forces *daX to detach by calling cam_periph_invalidate on the underlying periph. This is for testing purposes only. Include only with options CAM_TEST_FAILURE and rename the former [AN]DA_TEST_FAILURE, and fix nda to compile with it set. We're using it at work to harden geom and the buffer cache to be resilient in the face of drive failure. Today, it far too often results in a panic. While much work was done on SIM initiated removal for the USB thumnb drive removal work, little has been done for periph initiated removal. This simulates what *daerror() does for some errors nicely: we get the same panics with it that we do with failing drives. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D14581 Modified: head/sys/cam/ata/ata_da.c head/sys/cam/cam_periph.c head/sys/cam/cam_periph.h head/sys/cam/nvme/nvme_da.c head/sys/cam/scsi/scsi_da.c head/sys/conf/NOTES head/sys/conf/options Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Mar 14 16:45:04 2018 (r330934) +++ head/sys/cam/ata/ata_da.c Wed Mar 14 17:53:37 2018 (r330935) @@ -238,7 +238,7 @@ struct ada_softc { int write_cache; int unmappedio; int rotating; -#ifdef ADA_TEST_FAILURE +#ifdef CAM_TEST_FAILURE int force_read_error; int force_write_error; int periodic_read_error; @@ -1475,7 +1475,7 @@ adasysctlinit(void *context, int pending) "max_seq_zones", CTLFLAG_RD, &softc->max_seq_zones, "Maximum Number of Open Sequential Write Required Zones"); -#ifdef ADA_TEST_FAILURE +#ifdef CAM_TEST_FAILURE /* * Add a 'door bell' sysctl which allows one to set it from userland * and cause something bad to happen. For the moment, we only allow @@ -1493,6 +1493,10 @@ adasysctlinit(void *context, int pending) OID_AUTO, "periodic_read_error", CTLFLAG_RW | CTLFLAG_MPSAFE, &softc->periodic_read_error, 0, "Force a read error every N reads (don't set too low)."); + SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "invalidate", CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_MPSAFE, + periph, 0, cam_periph_invalidate_sysctl, "I", + "Write 1 to invalidate the drive immediately"); #endif #ifdef CAM_IO_STATS @@ -2293,7 +2297,7 @@ adastart(struct cam_periph *periph, union ccb *start_c data_ptr = bp; } -#ifdef ADA_TEST_FAILURE +#ifdef CAM_TEST_FAILURE int fail = 0; /* Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Wed Mar 14 16:45:04 2018 (r330934) +++ head/sys/cam/cam_periph.c Wed Mar 14 17:53:37 2018 (r330935) @@ -2066,3 +2066,25 @@ cam_periph_devctl_notify(union ccb *ccb) free(sbmsg, M_CAMPERIPH); } +/* + * Sysctl to force an invalidation of the drive right now. Can be + * called with CTLFLAG_MPSAFE since we take periph lock. + */ +int +cam_periph_invalidate_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct cam_periph *periph; + int error, value; + + periph = arg1; + value = 0; + error = sysctl_handle_int(oidp, &value, 0, req); + if (error != 0 || req->newptr == NULL || value != 1) + return (error); + + cam_periph_lock(periph); + cam_periph_invalidate(periph); + cam_periph_unlock(periph); + + return (0); +} Modified: head/sys/cam/cam_periph.h ============================================================================== --- head/sys/cam/cam_periph.h Wed Mar 14 16:45:04 2018 (r330934) +++ head/sys/cam/cam_periph.h Wed Mar 14 17:53:37 2018 (r330935) @@ -37,6 +37,7 @@ #include #ifdef _KERNEL +#include #include #include @@ -198,6 +199,7 @@ void cam_periph_freeze_after_event(struct cam_periph u_int duration_ms); int cam_periph_error(union ccb *ccb, cam_flags camflags, u_int32_t sense_flags); +int cam_periph_invalidate_sysctl(SYSCTL_HANDLER_ARGS); static __inline struct mtx * cam_periph_mtx(struct cam_periph *periph) Modified: head/sys/cam/nvme/nvme_da.c ============================================================================== --- head/sys/cam/nvme/nvme_da.c Wed Mar 14 16:45:04 2018 (r330934) +++ head/sys/cam/nvme/nvme_da.c Wed Mar 14 17:53:37 2018 (r330935) @@ -112,6 +112,12 @@ struct nda_softc { struct task sysctl_task; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; +#ifdef CAM_TEST_FAILURE + int force_read_error; + int force_write_error; + int periodic_read_error; + int periodic_read_count; +#endif #ifdef CAM_IO_STATS struct sysctl_ctx_list sysctl_stats_ctx; struct sysctl_oid *sysctl_stats_tree; @@ -666,6 +672,13 @@ ndasysctlinit(void *context, int pending) "Device pack invalidations."); #endif +#ifdef CAM_TEST_FAILURE + SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "invalidate", CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_MPSAFE, + periph, 0, cam_periph_invalidate_sysctl, "I", + "Write 1 to invalidate the drive immediately"); +#endif + cam_iosched_sysctl_init(softc->cam_iosched, &softc->sysctl_ctx, softc->sysctl_tree); @@ -876,7 +889,7 @@ ndastart(struct cam_periph *periph, union ccb *start_c /* FALLTHROUGH */ case BIO_READ: { -#ifdef NDA_TEST_FAILURE +#ifdef CAM_TEST_FAILURE int fail = 0; /* Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Wed Mar 14 16:45:04 2018 (r330934) +++ head/sys/cam/scsi/scsi_da.c Wed Mar 14 17:53:37 2018 (r330935) @@ -2203,6 +2203,13 @@ dasysctlinit(void *context, int pending) 0, "Rotating media"); +#ifdef CAM_TEST_FAILURE + SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "invalidate", CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_MPSAFE, + periph, 0, cam_periph_invalidate_sysctl, "I", + "Write 1 to invalidate the drive immediately"); +#endif + /* * Add some addressing info. */ Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Mar 14 16:45:04 2018 (r330934) +++ head/sys/conf/NOTES Wed Mar 14 17:53:37 2018 (r330935) @@ -1356,6 +1356,7 @@ options SCSI_NO_SENSE_STRINGS options SCSI_NO_OP_STRINGS options SCSI_DELAY=5000 # Be pessimistic about Joe SCSI device options CAM_IOSCHED_DYNAMIC +options CAM_TEST_FAILURE # Options for the CAM CDROM driver: # CHANGER_MIN_BUSY_SECONDS: Guaranteed minimum time quantum for a changer LUN Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Mar 14 16:45:04 2018 (r330934) +++ head/sys/conf/options Wed Mar 14 17:53:37 2018 (r330935) @@ -335,12 +335,12 @@ CAM_DEBUG_LUN opt_cam.h CAM_DEBUG_FLAGS opt_cam.h CAM_BOOT_DELAY opt_cam.h CAM_IOSCHED_DYNAMIC opt_cam.h +CAM_TEST_FAILURE opt_cam.h SCSI_DELAY opt_scsi.h SCSI_NO_SENSE_STRINGS opt_scsi.h SCSI_NO_OP_STRINGS opt_scsi.h # Options used only in cam/ata/ata_da.c -ADA_TEST_FAILURE opt_ada.h ATA_STATIC_ID opt_ada.h # Options used only in cam/scsi/scsi_cd.c From owner-svn-src-all@freebsd.org Wed Mar 14 17:59:04 2018 Return-Path: Delivered-To: svn-src-all@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 980F3F30512; Wed, 14 Mar 2018 17:59:04 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2DE26E090; Wed, 14 Mar 2018 17:59:03 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-lf0-x244.google.com with SMTP id m69-v6so6126619lfe.8; Wed, 14 Mar 2018 10:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=XdmrOrzpJJzHOkbpFJMbhkZdJa1tVZnL8eo6Uq/nNPg=; b=jcH+GRf9RJkAI4xT5E/Re7kOvDh/caXBstb6OfMbmtdAxqY4x+GpmHr48tqVjbzSq1 h+nx8w+G70iCOivjQTtLsU9xSDoWLuUn78FJEjCauKalfrzkeIWARR2kOVLhy/OUEUrS jN60qS6t+Zfm4AarlfP7M+9ATbY7AJLEr4TrNpVl9OA+wZJ2MjciWTwLf+omNAYYJLIm bZT1y23jpeyjMnPdMVyKXR8i6i7ko4NGoTyZLC6vsi46krhvBccNr/WO2eK3J+76Augh zSfXTif3Z0nsYuLhgD218Pwbbb6w0T19atF5AJdPV6HiqxQTjmJxV1aFMt3gVdzAmD9j Nu5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alumni-cwru-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=XdmrOrzpJJzHOkbpFJMbhkZdJa1tVZnL8eo6Uq/nNPg=; b=VjBsGbfj34gG782usEhA3/Qv59avXJvoO31dGne3YitEk2m7HxOZf+M9E9NYYYYf3H C5A0WoZ/yAUKttnHZlfqqmR0Qblxha7SSn4nrA8k5mkZGBuOyiu5fexmhp+G6NeukLih e5DTVbgiQp68RrziIyru4ZG5Io9qDf5p3oWMkJdX9KJnGSLhmVOgBaNGKuXOtUwjXGwm JO8HV1stqd2T6TuSWbQL+qZG99DoWNYx5xI90ISEGd2EnR1eqSpzTmbiq5Kf0Zi4aStr uojHiakN9Fr/kUFcECQXIWt5h0blmANvrFCbTh0L27YcLjYceaWJ4m+mYh6kwJd+Bv7s aaHQ== 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=XdmrOrzpJJzHOkbpFJMbhkZdJa1tVZnL8eo6Uq/nNPg=; b=adYZWfaKyZipXPzqGdj4ve3wT+mDT7bwt5EZDyVbg16S6+RLP8jOVa8GYx+f/cKeSD ZpeTrPpyu3+E/S5uzn1AG0GsgR5W1DfyCQ85OE+EO5YmNciBoO2/qigQ/4dZL04xhvfr JBgjd1+UseqyYqkTkNPq/p/XnUNmUMZ7VG5ubql5uuL5TZhH63DKy2LRl3YeVjqxfdKq 4KWo+sCUxhtWRD3Z9HOuurRix7lNa25TEC8NGunh5hj7gg95BfPTJXroIv7ttK64GKh7 LdrT4Gi6/ty/JvLopl5/asvO0AGj3OxHK6f+tUvJBRzdwBtzSXSJb4FjJb8+f6IJff27 nfIw== X-Gm-Message-State: AElRT7Fp79jzc1MfErXcd9cVo3LOkSLHvhK/qtzdCApuiOQb7YYkOO/V jZzqIOON038DsTMfo+9+oZwVPuXIpEqygv866eE= X-Google-Smtp-Source: AG47ELvraFY6hvsezWueB+nDjFWlrxBi+SKr5aIzhFB+dcMLBfi37d7U7yvzxMdYfLUh7wV7nHIvGAq2NIo0Ac7Sa1k= X-Received: by 2002:a19:d5c2:: with SMTP id m185-v6mr3929104lfg.5.1521050342157; Wed, 14 Mar 2018 10:59:02 -0700 (PDT) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.46.85.26 with HTTP; Wed, 14 Mar 2018 10:59:01 -0700 (PDT) In-Reply-To: <76363d7d-e21d-6e97-f638-855342242422@freebsd.org> References: <201803141616.w2EGGPOp030624@repo.freebsd.org> <76363d7d-e21d-6e97-f638-855342242422@freebsd.org> From: Justin Hibbits Date: Wed, 14 Mar 2018 12:59:01 -0500 X-Google-Sender-Auth: TZxz2Djoflh2Ellbx8IwiubujVM Message-ID: Subject: Re: svn commit: r330930 - head/sys/conf To: Nathan Whitehorn Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 17:59:04 -0000 On Wed, Mar 14, 2018 at 12:53 PM, Nathan Whitehorn wrote: > > > On 03/14/18 09:19, Justin Hibbits wrote: >> >> On Wed, Mar 14, 2018 at 11:16 AM, Nathan Whitehorn >> wrote: >>> >>> Author: nwhitehorn >>> Date: Wed Mar 14 16:16:25 2018 >>> New Revision: 330930 >>> URL: https://svnweb.freebsd.org/changeset/base/330930 >>> >>> Log: >>> The expression (aim | fdt) is always true on PowerPC. The last PowerPC >>> platform that can run without a device tree (PS3) still uses the >>> OF_*() >>> functions to check if one exists and OF_* is used unconditionally in >>> core parts of the system like powerpc/machdep.c. Reflect this reality >>> in files.powerpc, for example by changing occurrences of aim | fdt to >>> standard. >>> >>> Modified: >>> head/sys/conf/files.powerpc >>> >>> Modified: head/sys/conf/files.powerpc >>> >>> ============================================================================== >>> --- head/sys/conf/files.powerpc Wed Mar 14 14:45:57 2018 (r330929) >>> +++ head/sys/conf/files.powerpc Wed Mar 14 16:16:25 2018 (r330930) >>> @@ -32,7 +32,7 @@ dev/adb/adb_buttons.c optional adb >>> dev/agp/agp_apple.c optional agp powermac >>> dev/fb/fb.c optional sc >>> # ofwbus depends on simplebus. >>> -dev/fdt/simplebus.c optional aim | fdt >>> +dev/fdt/simplebus.c optional standard >>> dev/hwpmc/hwpmc_e500.c optional hwpmc >>> dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc >>> dev/hwpmc/hwpmc_powerpc.c optional hwpmc >>> @@ -55,7 +55,7 @@ dev/ofw/ofw_if.m optional aim >>> dev/ofw/ofw_bus_subr.c optional aim >>> dev/ofw/ofw_console.c optional aim >>> dev/ofw/ofw_disk.c optional ofwd aim >>> -dev/ofw/ofwbus.c optional aim | fdt >>> +dev/ofw/ofwbus.c optional aim >> >> ofwbus is used by Book-E too, not just AIM. And 'aim' is not defined >> for Book-E platforms. Maybe it should be 'standard' instead? >> >> - Justin >> > > See the comment above this line (which isn't in the diff): ofwbus.c can also > be brought in by conf/files through the definition of options FDT. This > block is just a safety valve for (AIM && !FDT) to make sure we always get > it. We could also mark all of these standard; config is smart enough to > deduplicate things. Would you prefer that? > -Nathan > Just mark them standard, since they are really standard. - Justin From owner-svn-src-all@freebsd.org Wed Mar 14 18:07:41 2018 Return-Path: Delivered-To: svn-src-all@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 A9519F30FE2; Wed, 14 Mar 2018 18:07:41 +0000 (UTC) (envelope-from nwhitehorn@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 527BB6E68B; Wed, 14 Mar 2018 18:07:41 +0000 (UTC) (envelope-from nwhitehorn@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 2EE8430A2; Wed, 14 Mar 2018 18:07:41 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2EI7fjM086348; Wed, 14 Mar 2018 18:07:41 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EI7fd6086347; Wed, 14 Mar 2018 18:07:41 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201803141807.w2EI7fd6086347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Wed, 14 Mar 2018 18:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330936 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 330936 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 18:07:41 -0000 Author: nwhitehorn Date: Wed Mar 14 18:07:40 2018 New Revision: 330936 URL: https://svnweb.freebsd.org/changeset/base/330936 Log: Fix fat-fingering ("optional standard") and move all the OF code to being marked "standard", which is less confusing than having it conditional on AIM CPUs here, and then picked up through options FDT from conf/files on Book-E. Request by: jhibbits Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Wed Mar 14 17:53:37 2018 (r330935) +++ head/sys/conf/files.powerpc Wed Mar 14 18:07:40 2018 (r330936) @@ -31,8 +31,6 @@ dev/adb/adb_if.m optional adb dev/adb/adb_buttons.c optional adb dev/agp/agp_apple.c optional agp powermac dev/fb/fb.c optional sc -# ofwbus depends on simplebus. -dev/fdt/simplebus.c optional standard dev/hwpmc/hwpmc_e500.c optional hwpmc dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc dev/hwpmc/hwpmc_powerpc.c optional hwpmc @@ -46,19 +44,21 @@ dev/iicbus/max6690.c optional max6690 powermac dev/iicbus/ofw_iicbus.c optional iicbus aim dev/nand/nfc_fsl.c optional nand mpc85xx dev/nand/nfc_rb.c optional nand mpc85xx -# ofw can be either aim or fdt: fdt case handled in files. aim only powerpc specific. -dev/ofw/openfirm.c optional aim -dev/ofw/openfirmio.c optional aim -dev/ofw/ofw_bus_if.m optional aim -dev/ofw/ofw_cpu.c optional aim -dev/ofw/ofw_if.m optional aim -dev/ofw/ofw_bus_subr.c optional aim +# Most ofw stuff below is brought in by conf/files for options FDT, but +# we always want it, even on non-FDT platforms. +dev/fdt/simplebus.c standard +dev/ofw/openfirm.c standard +dev/ofw/openfirmio.c standard +dev/ofw/ofw_bus_if.m standard +dev/ofw/ofw_cpu.c standard +dev/ofw/ofw_if.m standard +dev/ofw/ofw_bus_subr.c standard dev/ofw/ofw_console.c optional aim dev/ofw/ofw_disk.c optional ofwd aim -dev/ofw/ofwbus.c optional aim +dev/ofw/ofwbus.c standard dev/ofw/ofwpci.c optional pci dev/ofw/ofw_standard.c optional aim powerpc -dev/ofw/ofw_subr.c optional aim powerpc +dev/ofw/ofw_subr.c standard dev/powermac_nvram/powermac_nvram.c optional powermac_nvram powermac dev/quicc/quicc_bfe_fdt.c optional quicc mpc85xx dev/scc/scc_bfe_macio.c optional scc powermac From owner-svn-src-all@freebsd.org Wed Mar 14 18:09:26 2018 Return-Path: Delivered-To: svn-src-all@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 79D19F3122A; Wed, 14 Mar 2018 18:09:26 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (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 159EE6E829; Wed, 14 Mar 2018 18:09:25 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from helicon.physics.ucla.edu (helicon.physics.ucla.edu [169.232.156.253]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id w2EI9Mjq017291 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 14 Mar 2018 11:09:22 -0700 Subject: Re: svn commit: r330930 - head/sys/conf To: Justin Hibbits Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803141616.w2EGGPOp030624@repo.freebsd.org> <76363d7d-e21d-6e97-f638-855342242422@freebsd.org> From: Nathan Whitehorn Message-ID: Date: Wed, 14 Mar 2018 11:09:22 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Sonic-CAuth: UmFuZG9tSVZ7CsFEyoWlPb5mGuKNwH6UkUu9u07UB9l3eLB62j5Mh7qfvBNsooq3pemaS12XjsteutfQo341ezcAmD6VymIBJo3IrymDXBc= X-Sonic-ID: C;ym5T0rIn6BGnfCAFsE207w== M;fkp40rIn6BGnfCAFsE207w== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 18:09:26 -0000 On 03/14/18 10:59, Justin Hibbits wrote: > On Wed, Mar 14, 2018 at 12:53 PM, Nathan Whitehorn > wrote: >> >> On 03/14/18 09:19, Justin Hibbits wrote: >>> On Wed, Mar 14, 2018 at 11:16 AM, Nathan Whitehorn >>> wrote: >>>> Author: nwhitehorn >>>> Date: Wed Mar 14 16:16:25 2018 >>>> New Revision: 330930 >>>> URL: https://svnweb.freebsd.org/changeset/base/330930 >>>> >>>> Log: >>>> The expression (aim | fdt) is always true on PowerPC. The last PowerPC >>>> platform that can run without a device tree (PS3) still uses the >>>> OF_*() >>>> functions to check if one exists and OF_* is used unconditionally in >>>> core parts of the system like powerpc/machdep.c. Reflect this reality >>>> in files.powerpc, for example by changing occurrences of aim | fdt to >>>> standard. >>>> >>>> Modified: >>>> head/sys/conf/files.powerpc >>>> >>>> Modified: head/sys/conf/files.powerpc >>>> >>>> ============================================================================== >>>> --- head/sys/conf/files.powerpc Wed Mar 14 14:45:57 2018 (r330929) >>>> +++ head/sys/conf/files.powerpc Wed Mar 14 16:16:25 2018 (r330930) >>>> @@ -32,7 +32,7 @@ dev/adb/adb_buttons.c optional adb >>>> dev/agp/agp_apple.c optional agp powermac >>>> dev/fb/fb.c optional sc >>>> # ofwbus depends on simplebus. >>>> -dev/fdt/simplebus.c optional aim | fdt >>>> +dev/fdt/simplebus.c optional standard >>>> dev/hwpmc/hwpmc_e500.c optional hwpmc >>>> dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc >>>> dev/hwpmc/hwpmc_powerpc.c optional hwpmc >>>> @@ -55,7 +55,7 @@ dev/ofw/ofw_if.m optional aim >>>> dev/ofw/ofw_bus_subr.c optional aim >>>> dev/ofw/ofw_console.c optional aim >>>> dev/ofw/ofw_disk.c optional ofwd aim >>>> -dev/ofw/ofwbus.c optional aim | fdt >>>> +dev/ofw/ofwbus.c optional aim >>> ofwbus is used by Book-E too, not just AIM. And 'aim' is not defined >>> for Book-E platforms. Maybe it should be 'standard' instead? >>> >>> - Justin >>> >> See the comment above this line (which isn't in the diff): ofwbus.c can also >> be brought in by conf/files through the definition of options FDT. This >> block is just a safety valve for (AIM && !FDT) to make sure we always get >> it. We could also mark all of these standard; config is smart enough to >> deduplicate things. Would you prefer that? >> -Nathan >> > Just mark them standard, since they are really standard. > > - Justin > Done in r330936. -Nathan From owner-svn-src-all@freebsd.org Wed Mar 14 18:27:07 2018 Return-Path: Delivered-To: svn-src-all@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 4F094F32DD7; Wed, 14 Mar 2018 18:27:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0E276FF48; Wed, 14 Mar 2018 18:27:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7D3133CB; Wed, 14 Mar 2018 18:27:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2EIR6PL098043; Wed, 14 Mar 2018 18:27:06 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EIR6U8098042; Wed, 14 Mar 2018 18:27:06 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201803141827.w2EIR6U8098042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 14 Mar 2018 18:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330937 - head/sys/dev/iscsi X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/dev/iscsi X-SVN-Commit-Revision: 330937 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 18:27:07 -0000 Author: trasz Date: Wed Mar 14 18:27:06 2018 New Revision: 330937 URL: https://svnweb.freebsd.org/changeset/base/330937 Log: Fix typo in a warning message. MFC after: 2 weeks Modified: head/sys/dev/iscsi/iscsi.c Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Wed Mar 14 18:07:40 2018 (r330936) +++ head/sys/dev/iscsi/iscsi.c Wed Mar 14 18:27:06 2018 (r330937) @@ -1281,10 +1281,10 @@ iscsi_pdu_handle_async_message(struct icl_pdu *respons iscsi_session_terminate(is); break; case BHSAM_EVENT_TARGET_TERMINATES_CONNECTION: - ISCSI_SESSION_WARN(is, "target indicates it will drop drop the connection"); + ISCSI_SESSION_WARN(is, "target indicates it will drop the connection"); break; case BHSAM_EVENT_TARGET_TERMINATES_SESSION: - ISCSI_SESSION_WARN(is, "target indicates it will drop drop the session"); + ISCSI_SESSION_WARN(is, "target indicates it will drop the session"); break; default: /* From owner-svn-src-all@freebsd.org Wed Mar 14 19:04:41 2018 Return-Path: Delivered-To: svn-src-all@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 854FDF35D4A; Wed, 14 Mar 2018 19:04:41 +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 3711771617; Wed, 14 Mar 2018 19:04:41 +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 320C83DEA; Wed, 14 Mar 2018 19:04:41 +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 w2EJ4fdQ017954; Wed, 14 Mar 2018 19:04:41 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EJ4eRM017948; Wed, 14 Mar 2018 19:04:40 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201803141904.w2EJ4eRM017948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 14 Mar 2018 19:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330938 - in stable/10/sys: dev/acpica dev/cardbus dev/pci powerpc/ofw sparc64/pci X-SVN-Group: stable-10 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/10/sys: dev/acpica dev/cardbus dev/pci powerpc/ofw sparc64/pci X-SVN-Commit-Revision: 330938 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 19:04:41 -0000 Author: jhb Date: Wed Mar 14 19:04:40 2018 New Revision: 330938 URL: https://svnweb.freebsd.org/changeset/base/330938 Log: Convert pci_delete_child() to a bus_child_deleted() method. Instead of providing a wrapper around device_delete_child() that the PCI bus and child bus drivers must call explicitly, move the bulk of the logic from pci_delete_child() into a bus_child_deleted() method (pci_child_deleted()). This allows PCI devices to be safely deleted via device_delete_child(). - Add a bus_child_deleted method to the ACPI PCI bus which clears the device_t associated with the corresponding ACPI handle in addition to the normal PCI bus cleanup. - Change cardbus_detach_card to call device_delete_children() and move CardBus-specific delete logic into a new cardbus_child_deleted() method. - Use device_delete_child() instead of pci_delete_child() in the SRIOV code. - Add a bus_child_deleted method to the OpenFirmware PCI bus drivers which frees the OpenFirmware device info for each PCI device. To preserve KBI, a pci_delete_child() function is left in place that just calls device_delete_child(). PR: 226562 Requested by: dexuan Modified: stable/10/sys/dev/acpica/acpi_pci.c stable/10/sys/dev/cardbus/cardbus.c stable/10/sys/dev/pci/pci.c stable/10/sys/dev/pci/pci_private.h stable/10/sys/powerpc/ofw/ofw_pcibus.c stable/10/sys/sparc64/pci/ofw_pcibus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/acpica/acpi_pci.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_pci.c Wed Mar 14 18:27:06 2018 (r330937) +++ stable/10/sys/dev/acpica/acpi_pci.c Wed Mar 14 19:04:40 2018 (r330938) @@ -70,6 +70,7 @@ CTASSERT(ACPI_STATE_D2 == PCI_POWERSTATE_D2); CTASSERT(ACPI_STATE_D3 == PCI_POWERSTATE_D3); static int acpi_pci_attach(device_t dev); +static void acpi_pci_child_deleted(device_t dev, device_t child); static int acpi_pci_child_location_str_method(device_t cbdev, device_t child, char *buf, size_t buflen); static int acpi_pci_probe(device_t dev); @@ -92,6 +93,7 @@ static device_method_t acpi_pci_methods[] = { /* Bus interface */ DEVMETHOD(bus_read_ivar, acpi_pci_read_ivar), DEVMETHOD(bus_write_ivar, acpi_pci_write_ivar), + DEVMETHOD(bus_child_deleted, acpi_pci_child_deleted), DEVMETHOD(bus_child_location_str, acpi_pci_child_location_str_method), DEVMETHOD(bus_get_dma_tag, acpi_pci_get_dma_tag), DEVMETHOD(bus_get_domain, acpi_get_domain), @@ -143,6 +145,16 @@ acpi_pci_write_ivar(device_t dev, device_t child, int return (0); } return (pci_write_ivar(dev, child, which, value)); +} + +static void +acpi_pci_child_deleted(device_t dev, device_t child) +{ + struct acpi_pci_devinfo *dinfo = device_get_ivars(child); + + if (acpi_get_device(dinfo->ap_handle) == child) + AcpiDetachData(dinfo->ap_handle, acpi_fake_objhandler); + pci_child_deleted(dev, child); } static int Modified: stable/10/sys/dev/cardbus/cardbus.c ============================================================================== --- stable/10/sys/dev/cardbus/cardbus.c Wed Mar 14 18:27:06 2018 (r330937) +++ stable/10/sys/dev/cardbus/cardbus.c Wed Mar 14 19:04:40 2018 (r330938) @@ -226,31 +226,30 @@ cardbus_attach_card(device_t cbdev) return (ENOENT); } +static void +cardbus_child_deleted(device_t cbdev, device_t child) +{ + struct cardbus_devinfo *dinfo = device_get_ivars(child); + + if (dinfo->pci.cfg.dev != child) + device_printf(cbdev, "devinfo dev mismatch\n"); + cardbus_device_destroy(dinfo); + pci_child_deleted(cbdev, child); +} + static int cardbus_detach_card(device_t cbdev) { - int numdevs; - device_t *devlist; - int tmp; int err = 0; - if (device_get_children(cbdev, &devlist, &numdevs) != 0) - return (ENOENT); - if (numdevs == 0) { - free(devlist, M_TEMP); - return (ENOENT); - } + err = bus_generic_detach(cbdev); + if (err) + return (err); + err = device_delete_children(cbdev); + if (err) + return (err); - for (tmp = 0; tmp < numdevs; tmp++) { - struct cardbus_devinfo *dinfo = device_get_ivars(devlist[tmp]); - - if (dinfo->pci.cfg.dev != devlist[tmp]) - device_printf(cbdev, "devinfo dev mismatch\n"); - cardbus_device_destroy(dinfo); - pci_delete_child(cbdev, devlist[tmp]); - } POWER_DISABLE_SOCKET(device_get_parent(cbdev), cbdev); - free(devlist, M_TEMP); return (err); } @@ -335,6 +334,7 @@ static device_method_t cardbus_methods[] = { DEVMETHOD(device_resume, cardbus_resume), /* Bus interface */ + DEVMETHOD(bus_child_deleted, cardbus_child_deleted), DEVMETHOD(bus_get_dma_tag, bus_generic_get_dma_tag), DEVMETHOD(bus_read_ivar, cardbus_read_ivar), DEVMETHOD(bus_driver_added, cardbus_driver_added), Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Wed Mar 14 18:27:06 2018 (r330937) +++ stable/10/sys/dev/pci/pci.c Wed Mar 14 19:04:40 2018 (r330938) @@ -154,6 +154,7 @@ static device_method_t pci_methods[] = { DEVMETHOD(bus_release_resource, pci_release_resource), DEVMETHOD(bus_activate_resource, pci_activate_resource), DEVMETHOD(bus_deactivate_resource, pci_deactivate_resource), + DEVMETHOD(bus_child_deleted, pci_child_deleted), DEVMETHOD(bus_child_detached, pci_child_detached), DEVMETHOD(bus_child_pnpinfo_str, pci_child_pnpinfo_str_method), DEVMETHOD(bus_child_location_str, pci_child_location_str_method), @@ -4883,7 +4884,7 @@ pci_deactivate_resource(device_t dev, device_t child, } void -pci_delete_child(device_t dev, device_t child) +pci_child_deleted(device_t dev, device_t child) { struct resource_list_entry *rle; struct resource_list *rl; @@ -4892,13 +4893,14 @@ pci_delete_child(device_t dev, device_t child) dinfo = device_get_ivars(child); rl = &dinfo->resources; - if (device_is_attached(child)) - device_detach(child); - /* Turn off access to resources we're about to free */ - pci_write_config(child, PCIR_COMMAND, pci_read_config(child, - PCIR_COMMAND, 2) & ~(PCIM_CMD_MEMEN | PCIM_CMD_PORTEN), 2); + if (bus_child_present(child) != 0) { + pci_write_config(child, PCIR_COMMAND, pci_read_config(child, + PCIR_COMMAND, 2) & ~(PCIM_CMD_MEMEN | PCIM_CMD_PORTEN), 2); + pci_disable_busmaster(child); + } + /* Free all allocated resources */ STAILQ_FOREACH(rle, rl, link) { if (rle->res) { @@ -4918,8 +4920,17 @@ pci_delete_child(device_t dev, device_t child) } resource_list_free(rl); - device_delete_child(dev, child); pci_freecfg(dinfo); +} + +/* KBI compatability shim. */ +extern void pci_delete_child(device_t dev, device_t child); + +void +pci_delete_child(device_t dev, device_t child) +{ + + device_delete_child (dev, child); } void Modified: stable/10/sys/dev/pci/pci_private.h ============================================================================== --- stable/10/sys/dev/pci/pci_private.h Wed Mar 14 18:27:06 2018 (r330937) +++ stable/10/sys/dev/pci/pci_private.h Wed Mar 14 19:04:40 2018 (r330938) @@ -54,7 +54,6 @@ void pci_add_child(device_t bus, struct pci_devinfo * void pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask); int pci_attach_common(device_t dev); -void pci_delete_child(device_t dev, device_t child); void pci_driver_added(device_t dev, driver_t *driver); int pci_print_child(device_t dev, device_t child); void pci_probe_nomatch(device_t dev, device_t child); @@ -118,6 +117,7 @@ struct pci_devinfo *pci_read_device(device_t pcib, int size_t size); void pci_print_verbose(struct pci_devinfo *dinfo); int pci_freecfg(struct pci_devinfo *dinfo); +void pci_child_deleted(device_t dev, device_t child); void pci_child_detached(device_t dev, device_t child); int pci_child_location_str_method(device_t cbdev, device_t child, char *buf, size_t buflen); Modified: stable/10/sys/powerpc/ofw/ofw_pcibus.c ============================================================================== --- stable/10/sys/powerpc/ofw/ofw_pcibus.c Wed Mar 14 18:27:06 2018 (r330937) +++ stable/10/sys/powerpc/ofw/ofw_pcibus.c Wed Mar 14 19:04:40 2018 (r330938) @@ -61,6 +61,7 @@ static device_probe_t ofw_pcibus_probe; static device_attach_t ofw_pcibus_attach; static pci_assign_interrupt_t ofw_pcibus_assign_interrupt; static ofw_bus_get_devinfo_t ofw_pcibus_get_devinfo; +static bus_child_deleted_t ofw_pcibus_child_deleted; static int ofw_pcibus_child_pnpinfo_str_method(device_t cbdev, device_t child, char *buf, size_t buflen); @@ -73,6 +74,7 @@ static device_method_t ofw_pcibus_methods[] = { DEVMETHOD(device_attach, ofw_pcibus_attach), /* Bus interface */ + DEVMETHOD(bus_child_deleted, ofw_pcibus_child_deleted), DEVMETHOD(bus_child_pnpinfo_str, ofw_pcibus_child_pnpinfo_str_method), /* PCI interface */ @@ -265,6 +267,16 @@ ofw_pcibus_enum_bus(device_t dev, u_int domain, u_int pci_add_child(dev, (struct pci_devinfo *)dinfo); } } +} + +static void +ofw_pcibus_child_deleted(device_t dev, device_t child) +{ + struct ofw_pcibus_devinfo *dinfo; + + dinfo = device_get_ivars(dev); + ofw_bus_gen_destroy_devinfo(&dinfo->opd_obdinfo); + pci_child_deleted(dev, child); } static int Modified: stable/10/sys/sparc64/pci/ofw_pcibus.c ============================================================================== --- stable/10/sys/sparc64/pci/ofw_pcibus.c Wed Mar 14 18:27:06 2018 (r330937) +++ stable/10/sys/sparc64/pci/ofw_pcibus.c Wed Mar 14 19:04:40 2018 (r330938) @@ -65,6 +65,7 @@ static void ofw_pcibus_setup_device(device_t bridge, u u_int busno, u_int slot, u_int func); /* Methods */ +static bus_child_deleted_t ofw_pcibus_child_deleted; static bus_child_pnpinfo_str_t ofw_pcibus_pnpinfo_str; static device_attach_t ofw_pcibus_attach; static device_probe_t ofw_pcibus_probe; @@ -77,6 +78,7 @@ static device_method_t ofw_pcibus_methods[] = { DEVMETHOD(device_attach, ofw_pcibus_attach), /* Bus interface */ + DEVMETHOD(bus_child_deleted, ofw_pcibus_child_deleted), DEVMETHOD(bus_child_pnpinfo_str, ofw_pcibus_pnpinfo_str), /* PCI interface */ @@ -325,6 +327,16 @@ ofw_pcibus_get_devinfo(device_t bus, device_t dev) dinfo = device_get_ivars(dev); return (&dinfo->opd_obdinfo); +} + +static void +ofw_pcibus_child_deleted(device_t dev, device_t child) +{ + struct ofw_pcibus_devinfo *dinfo; + + dinfo = device_get_ivars(dev); + ofw_bus_gen_destroy_devinfo(&dinfo->opd_obdinfo); + pci_child_deleted(dev, child); } static int From owner-svn-src-all@freebsd.org Wed Mar 14 19:09:07 2018 Return-Path: Delivered-To: svn-src-all@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 55674F374C1; Wed, 14 Mar 2018 19:09:07 +0000 (UTC) (envelope-from dteske@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 0A83C71A97; Wed, 14 Mar 2018 19:09:07 +0000 (UTC) (envelope-from dteske@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 0117B3DED; Wed, 14 Mar 2018 19:09:06 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2EJ96Ho018192; Wed, 14 Mar 2018 19:09:06 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EJ96IP018188; Wed, 14 Mar 2018 19:09:06 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201803141909.w2EJ96IP018188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 14 Mar 2018 19:09:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330939 - in head: lib/libdpv lib/libfigpar usr.bin/dpv usr.sbin/bsdconfig X-SVN-Group: head X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: in head: lib/libdpv lib/libfigpar usr.bin/dpv usr.sbin/bsdconfig X-SVN-Commit-Revision: 330939 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 19:09:07 -0000 Author: dteske Date: Wed Mar 14 19:09:06 2018 New Revision: 330939 URL: https://svnweb.freebsd.org/changeset/base/330939 Log: Use full month in dpv(3), figpar(3), and bsdconfig(8) manuals Reported by: maxim Modified: head/lib/libdpv/dpv.3 head/lib/libfigpar/figpar.3 head/usr.bin/dpv/dpv.1 head/usr.sbin/bsdconfig/bsdconfig.8 Modified: head/lib/libdpv/dpv.3 ============================================================================== --- head/lib/libdpv/dpv.3 Wed Mar 14 19:04:40 2018 (r330938) +++ head/lib/libdpv/dpv.3 Wed Mar 14 19:09:06 2018 (r330939) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 13, 2018 +.Dd March 13, 2018 .Dt DPV 3 .Os .Sh NAME Modified: head/lib/libfigpar/figpar.3 ============================================================================== --- head/lib/libfigpar/figpar.3 Wed Mar 14 19:04:40 2018 (r330938) +++ head/lib/libfigpar/figpar.3 Wed Mar 14 19:09:06 2018 (r330939) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 13, 2018 +.Dd March 13, 2018 .Dt FIGPAR 3 .Os .Sh NAME Modified: head/usr.bin/dpv/dpv.1 ============================================================================== --- head/usr.bin/dpv/dpv.1 Wed Mar 14 19:04:40 2018 (r330938) +++ head/usr.bin/dpv/dpv.1 Wed Mar 14 19:09:06 2018 (r330939) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jan 26, 2016 +.Dd January 26, 2016 .Dt DPV 1 .Os .Sh NAME Modified: head/usr.sbin/bsdconfig/bsdconfig.8 ============================================================================== --- head/usr.sbin/bsdconfig/bsdconfig.8 Wed Mar 14 19:04:40 2018 (r330938) +++ head/usr.sbin/bsdconfig/bsdconfig.8 Wed Mar 14 19:09:06 2018 (r330939) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jun 5, 2013 +.Dd June 5, 2013 .Dt BSDCONFIG 8 .Os .Sh NAME From owner-svn-src-all@freebsd.org Wed Mar 14 19:09:59 2018 Return-Path: Delivered-To: svn-src-all@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 781F4F375F7; Wed, 14 Mar 2018 19:09:59 +0000 (UTC) (envelope-from bapt@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 2F1E471C1F; Wed, 14 Mar 2018 19:09:59 +0000 (UTC) (envelope-from bapt@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 2A1A53DEE; Wed, 14 Mar 2018 19:09:59 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2EJ9x4x018273; Wed, 14 Mar 2018 19:09:59 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EJ9xtj018272; Wed, 14 Mar 2018 19:09:59 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201803141909.w2EJ9xtj018272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 14 Mar 2018 19:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330940 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 330940 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 19:09:59 -0000 Author: bapt Date: Wed Mar 14 19:09:58 2018 New Revision: 330940 URL: https://svnweb.freebsd.org/changeset/base/330940 Log: Update to 2018-03-06 MFC after: 3 days Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors ============================================================================== --- head/share/misc/pci_vendors Wed Mar 14 19:09:06 2018 (r330939) +++ head/share/misc/pci_vendors Wed Mar 14 19:09:58 2018 (r330940) @@ -1,9 +1,10 @@ # $FreeBSD$ +# # List of PCI ID's # -# Version: 2018.02.15 -# Date: 2018-02-15 03:15:01 +# Version: 2018.03.06 +# Date: 2018-03-06 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -26,6 +27,17 @@ 0010 Allied Telesis, Inc (Wrong ID) # This is a relabelled RTL-8139 8139 AT-2500TX V3 Ethernet +0014 Loongson Technology LLC + 7a02 APB (Advanced Peripheral Bus) Controller + 7a03 Gigabit Ethernet Controller + 7a04 OTG USB Controller + 7a05 Vivante GPU (Graphics Processing Unit) + 7a06 DC (Display Controller) + 7a07 HDA (High Definition Audio) Controller + 7a08 SATA AHCI Controller + 7a0f DMA (Direct Memory Access) Controller + 7a14 EHCI USB Controller + 7a24 OHCI USB Controller 001c PEAK-System Technik GmbH 0001 PCAN-PCI CAN-Bus controller 001c 0004 2 Channel CAN Bus SJC1000 @@ -753,7 +765,9 @@ 131b Kaveri [Radeon R4 Graphics] 131c Kaveri [Radeon R7 Graphics] 131d Kaveri [Radeon R6 Graphics] - 15dd Vega [Radeon Vega 8 Mobile] + 15dd Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] + 103c 83c6 Radeon Vega 8 Mobile + 1458 d000 Radeon RX Vega 11 15ff Vega [Radeon Vega 28 Mobile] 1714 BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series] 103c 168b ProBook 4535s @@ -1601,10 +1615,12 @@ 103c 2100 FirePro M4100 6602 Mars 6603 Mars - 6604 Opal XT [Radeon R7 M265] + 6604 Opal XT [Radeon R7 M265/M365X/M465] 103c 8006 FirePro M4170 + 103c 814f Litho XT [Radeon R7 M365X] + 103c 82aa Litho XT [Radeon R7 M465] 17aa 3643 Radeon R7 A360 - 6605 Opal PRO [Radeon R7 M260] + 6605 Opal PRO [Radeon R7 M260X] 103c 2259 FirePro M4150 6606 Mars XTX [Radeon HD 8790M] 1028 0684 FirePro W4170M @@ -1679,6 +1695,7 @@ 103c 80be Radeon R5 M330 103c 8136 Radeon R5 M330 103c 8329 Radeon R7 M520 + 17aa 3633 Radeon R5 A330 17aa 3804 Radeon R5 M330 17aa 3809 Radeon R5 M330 17aa 381a Radeon R5 M430 @@ -2298,8 +2315,11 @@ 1043 04fb Radeon RX 480 1043 04fd Radeon RX 480 8GB 1458 22f0 Radeon RX 570 + 1458 22f7 Radeon RX 570 Gaming 4G 1462 3411 Radeon RX 470 1462 3413 Radeon RX 480 + 1462 3416 Radeon RX 570 + 1462 3418 Radeon RX 580 Armor 4G OC 148c 2372 Radeon RX 480 148c 2373 Radeon RX 470 1682 9470 Radeon RX 470 @@ -2334,7 +2354,14 @@ 106b 0179 Radeon Pro 560 1642 1727 Polaris 21 XL [Radeon RX 560D] 1682 956d Polaris 21 XL [Radeon RX 560D] - 67ff Baffin [Radeon RX 560] + 67ff Baffin [Radeon RX 550 640SP / RX 560] + 1002 0b04 Radeon RX 560 + 1043 04bc Radeon RX 560 + 1458 22ed Radeon RX 560 + 148c 2381 Radeon RX 560 + 1682 9560 Radeon RX 560 + 1da2 e348 Radeon RX 560 + 1da2 e367 Radeon RX 550 640SP 6800 Wimbledon XT [Radeon HD 7970M] 1002 0124 Radeon HD 7970M 8086 2110 Radeon HD 7970M @@ -2349,7 +2376,9 @@ 6808 Pitcairn XT GL [FirePro W7000] 1002 0310 FirePro S7000 1002 0420 Radeon Sky 500 + 103c 030c MED-X7000 13cc 3d25 MXRT-7500 + 15c3 030c MED-X7000 6809 Pitcairn LE GL [FirePro W5000] 13cc 3d23 MXRT-5500 13cc 3d24 MXRT-5550 @@ -2411,8 +2440,6 @@ 682d Chelsea XT GL [FirePro M4000] 682f Chelsea LP [Radeon HD 7730M] 103c 1851 Radeon HD 7750M - 6830 Cape Verde [Radeon HD 7800M Series] - 6831 Cape Verde [AMD Radeon HD 7700M Series] 6835 Cape Verde PRX [Radeon R9 255 OEM] 6837 Cape Verde LE [Radeon HD 7730/8730] 1462 2796 Radeon HD 8730 @@ -3026,6 +3053,7 @@ 103c 2269 Radeon R7 M260 103c 22c6 Radeon R7 M260 103c 22c8 Radeon R7 M260 + 103c 2b45 Radeon R7 A360 103c 808c Radeon R7 M260 103c 8099 Radeon R7 M360 103c 80b5 Radeon R7 M360 @@ -3062,7 +3090,8 @@ 148c 9380 Radeon R9 380 # Make naming scheme consistent 174b e308 Radeon R9 380 Nitro 4G D5 - 694c Vega [Radeon RX Vega M] + 694c Polaris 22 [Radeon RX Vega M GH] + 694e Polaris 22 [Radeon RX Vega M GL] 6980 Polaris12 6981 Polaris12 6985 Lexa XT [Radeon PRO WX 3100] @@ -3351,11 +3380,13 @@ 9553 RV710/M92 [Mobility Radeon HD 4530/4570/545v] 1025 015e Mobility Radeon HD 4570 1025 017d Mobility Radeon HD 4570 - 1025 0205 Mobility Radeon HD 4570 + 1025 0205 Mobility Radeon HD 4570 / 545v 1025 0206 Mobility Radeon HD 4570 1025 0237 Mobility Radeon HD 4570 - 1028 02be Mobility Radeon HD 4570 + 1028 02be Mobility Radeon HD 4570 / 545v 1028 02e8 Mobility Radeon HD 4530 + 103c 143c Mobility Radeon HD 545v + 103c 1446 Mobility Radeon HD 545v 103c 3624 Mobility Radeon HD 4530 103c 3628 Mobility Radeon HD 4530 103c 3636 Mobility Radeon HD 4530 @@ -3363,6 +3394,12 @@ 1043 1b42 Mobility Radeon HD 4570 104d 9056 Mobility Radeon HD 4570 1179 ff82 Satellite L505-13T GPU (Mobility Radeon HD 5145) + 144d c07f Mobility Radeon HD 545v + 144d c571 Mobility Radeon HD 545v + 1462 1006 Mobility Radeon HD 545v + 17aa 2129 Mobility Radeon HD 545v + 17aa 215b Mobility Radeon HD 545v + 17aa 21bb Mobility Radeon HD 545v 9555 RV710/M92 [Mobility Radeon HD 4350/4550] 103c 1411 ProBook 4720s GPU (Mobility Radeon HD 4350) 9557 RV711 GL [FirePro RG220] @@ -3409,7 +3446,7 @@ 95c6 RV620 LE [Radeon HD 3450 AGP] 95c9 RV620 LE [Radeon HD 3450 PCI] 95cc RV620 GL [FirePro V3700] - 95cd RV620 [FirePro 2450] + 95cd RV620 GL [FirePro 2450] 95cf RV620 GL [FirePro 2260] 960f RS780 HDMI Audio [Radeon 3000/3100 / HD 3200/3300] 9610 RS780 [Radeon HD 3200] @@ -3485,7 +3522,19 @@ 985d Mullins 985e Mullins 985f Mullins - 9874 Carrizo + 9874 Wani [Radeon R5/R6/R7 Graphics] + 1002 1871 Radeon R5 Graphics + 1002 1e20 Radeon R7 Graphics + 1028 06bd Radeon R6 Graphics + 103c 2b44 Radeon R6 Graphics + 103c 8221 Radeon R5 Graphics + 103c 8223 Radeon R5 Graphics + 103c 8238 Radeon R7 Graphics + 103c 8353 Radeon R7 Graphics + 1458 d000 Radeon R7 Graphics + 17aa 5113 Radeon R6 Graphics + 17aa 5116 Radeon R6 Graphics + 17aa 5118 Radeon R5 Graphics 9900 Trinity [Radeon HD 7660G] 103c 1985 Pavilion 17-e163sg Notebook PC # AMD A10-5800K CPU @@ -9871,7 +9920,7 @@ 0863 C79 [GeForce 9400M] 106b 00aa MacBook5,1 0864 C79 [GeForce 9300] - 0865 C79 [GeForce 9300/ION] + 0865 C79 [GeForce 9300 / ION] 0866 C79 [GeForce 9400M G] 106b 00b1 GeForce 9400M 0867 C79 [GeForce 9400] @@ -9895,12 +9944,12 @@ 1043 1c12 GeForce G102M 1043 1c52 GeForce G205M 0874 C79 [ION] - 0876 ION VGA [GeForce 9400M] + 0876 C79 [GeForce 9400M / ION] 087a C79 [GeForce 9400] - 087d ION VGA + 087d C79 [ION] 19da a123 IONITX-F-E - 087e ION LE VGA - 087f ION LE VGA + 087e C79 [ION LE] + 087f C79 [ION LE] 08a0 MCP89 [GeForce 320M] 08a2 MCP89 [GeForce 320M] 08a3 MCP89 [GeForce 320M] @@ -9931,6 +9980,7 @@ 0a64 GT218 [ION] 0a65 GT218 [GeForce 210] 1043 8334 EN210 SILENT + 1458 36a9 GV-N210D3-1GI (rev. 6.0/6.1) 1462 8094 N210 [Geforce 210] PCIe graphics adapter 0a66 GT218 [GeForce 310] 0a67 GT218 [GeForce 315] @@ -9941,7 +9991,7 @@ 1028 040b Latitude E6510 17aa 2142 ThinkPad T410 0a6e GT218M [GeForce 305M] - 0a6f GT218 [ION] + 0a6f GT218M [ION] 0a70 GT218M [GeForce 310M] 0a71 GT218M [GeForce 305M] 0a72 GT218M [GeForce 310M] @@ -9949,7 +9999,7 @@ 0a74 GT218M [GeForce G210M] 1b0a 903a GeForce G210 0a75 GT218M [GeForce 310M] - 0a76 GT218 [ION 2] + 0a76 GT218M [ION 2] 0a78 GT218GL [Quadro FX 380 LP] 0a7a GT218M [GeForce 315M] 104d 907e GeForce 315M @@ -10869,6 +10919,7 @@ 1288 GK208B [GeForce GT 720] 1289 GK208 [GeForce GT 710] 128b GK208B [GeForce GT 710] + 1043 85f7 GT710-SL-1GD5 1290 GK208M [GeForce GT 730M] 103c 2afa GeForce GT 730A 103c 2b04 GeForce GT 730A @@ -11040,6 +11091,7 @@ 1bb7 GP104GLM [Quadro P4000 Mobile] 1462 11e9 Quadro P4000 Max-Q 1bb8 GP104GLM [Quadro P3000 Mobile] + 1bbb GP104GLM [Quadro P3200 Mobile] 1bc7 GP104 [P104-101] 1be0 GP104M [GeForce GTX 1080 Mobile] 1028 07c0 GeForce GTX 1080 Max-Q @@ -11079,6 +11131,8 @@ 1cb6 GP107GL [Quadro P620] 1d01 GP108 [GeForce GT 1030] 1d10 GP108M [GeForce MX150] + 1d12 GP108M [GeForce MX150] + 1d72 1701 Mi Notebook Pro [GeForce MX150] 1d33 GP108GL [Quadro P500] 1d81 GV100 [TITAN V] 1db1 GV100GL [Tesla V100 SXM2] @@ -11424,6 +11478,7 @@ 8821 RTL8821AE 802.11ac PCIe Wireless Network Adapter b723 RTL8723BE PCIe Wireless Network Adapter 10ec 8739 Dell Wireless 1801 + b822 RTL8822BE 802.11a/b/g/n/ac WiFi adapter c821 RTL8821CE 802.11ac PCIe Wireless Network Adapter 10ed Ascii Corporation 7310 V7310 @@ -13354,6 +13409,7 @@ 0102 Extended IDE Controller 0103 EX-IDE Type-B 010f NVMe Controller + 0115 XG4 NVMe SSD Controller 0404 DVD Decoder card 0406 Tecra Video Capture device 0407 DVD Decoder card (Version 2) @@ -13482,6 +13538,7 @@ 1028 01d7 XPS M1210 1028 01f3 Inspiron 1420 1028 022f Inspiron 1525 + 103c 1521 HP EliteBook 8540w 103c 30b5 Presario V3242AU 103c 30b7 Presario V6133CL 103c 30cc Pavilion dv6700 @@ -13533,6 +13590,7 @@ 1028 01f5 Inspiron 1501 1028 024f Latitude e6500 103c 03b5 Presario V3242AU + 103c 1521 HP EliteBook 8540w 103c 30b7 Presario V6133CL 103c 30cf Pavilion dv9500/9600/9700 series 1183 0843 Alienware Aurora m9700 @@ -15032,7 +15090,7 @@ 12a2 Newgen Systems Corporation 12a3 Lucent Technologies 8105 T8105 H100 Digital Switch -12a4 NTT Electronics Technology Company +12a4 NTT Electronics Corporation 12a5 Vision Dynamics Ltd. 12a6 Scalable Networks, Inc. 12a7 AMO GmbH @@ -18684,6 +18742,7 @@ 15b3 0026 ConnectX-3 IB FDR Dual Port Mezzanine Card 15b3 0028 ConnectX-3 VPI Dual QSFP+ Port QDR Infiniband 40Gb/s or 10Gb Ethernet 15b3 0059 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Mezzanine Card + 15b3 0064 ConnectX-3 EN 10/40 GbE Single Port QSFP+ Adapter (MCX313A-BCBT) 15b3 0065 ConnectX-3 VPI IB FDR/40 GbE Dual Port QSFP+ Adapter 15b3 0066 ConnectX-3 IB FDR10 Dual Port Mezzanine Card 15b3 0067 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Adapter @@ -18731,9 +18790,10 @@ 15b3 0050 ConnectX-4 100 GbE Dual Port QSFP28 Adapter 1014 MT27700 Family [ConnectX-4 Virtual Function] 1015 MT27710 Family [ConnectX-4 Lx] + 15b3 0001 ConnectX-4 Lx EN network interface card, 25GbE single-port SFP28, PCIe3.0 x8, tall bracket, ROHS R6 + 15b3 0003 Stand-up ConnectX-4 Lx EN, 25GbE dual-port SFP28, PCIe3.0 x8, MCX4121A-ACAT 15b3 0004 ConnectX-4 Lx Stand-up dual-port 10GbE MCX4121A-XCAT 15b3 0005 Mellanox Technologies ConnectX-4 Lx Stand-up single-port 40GbE MCX4131A-BCAT - 15b3 0016 ConnectX-4 Lx 25 GbE Dual Port SFP28 Adapter 15b3 0020 MCX4411A-ACQN, ConnectX-4 Lx EN OCP, 1x25Gb 15b3 0021 MCX4421A-ACQN ConnectX-4 Lx EN OCP,2x25G 15b3 0025 ConnectX-4 Lx 25 GbE Dual Port SFP28 rNDC @@ -20665,6 +20725,7 @@ 5808 DDRdrive X8 dd52 DDRdrive X1-30 19e5 Huawei Technologies Co., Ltd. + 1710 iBMA Virtual Network Adapter 1711 Hi1710 [iBMC Intelligent Management system chip w/VGA support] 19e7 NET (Network Equipment Technologies) 1001 STIX DSP Card @@ -20717,12 +20778,15 @@ 0200 TILE-Gx processor 0201 TILE-Gx Processor Virtual Function 2000 TILE-Gx PCI Express Root Port -1a4a SLAC National Accelerator Lab PPA-REG +1a4a SLAC National Accelerator Lab TID-AIR 1000 MCOR Power Supply Controller 1010 AMC EVR - Stockholm Timing Board 2000 PGPCard - 4 Lane 2001 PGPCard - 8 Lane Plus EVR 2010 PCI-Express EVR +# PC-260-101-03 + 2020 PGP-GEN3 PCIe + 2030 data_dev 1a51 Hectronic AB 1a55 Rohde & Schwarz DVS GmbH 0010 SDStationOEM @@ -21246,6 +21310,7 @@ 100e AR-ARKA-FX1 [Arkville 64B DPDK Data Mover] 1d6c 2001 DPDK-Aware Virtual Function [Arkville VF] 4200 A5PL-E1-10GETI [10 GbE Ethernet Traffic Instrument] +1d72 Xiaomi 1d78 DERA 1d7c Aerotech, Inc. 1d87 Fuzhou Rockchip Electronics Co., Ltd From owner-svn-src-all@freebsd.org Wed Mar 14 19:17:41 2018 Return-Path: Delivered-To: svn-src-all@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 ED735F3A17A; Wed, 14 Mar 2018 19:17:40 +0000 (UTC) (envelope-from jkim@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 998827234F; Wed, 14 Mar 2018 19:17:40 +0000 (UTC) (envelope-from jkim@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 942713F79; Wed, 14 Mar 2018 19:17:40 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2EJHeJn023166; Wed, 14 Mar 2018 19:17:40 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EJHcp8023141; Wed, 14 Mar 2018 19:17:38 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201803141917.w2EJHcp8023141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 14 Mar 2018 19:17:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r330941 - in vendor-sys/acpica/dist: . source/components/debugger source/components/dispatcher source/components/events source/components/executer source/components/hardware source/comp... X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor-sys/acpica/dist: . source/components/debugger source/components/dispatcher source/components/events source/components/executer source/components/hardware source/components/namespace source/c... X-SVN-Commit-Revision: 330941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 19:17:41 -0000 Author: jkim Date: Wed Mar 14 19:17:38 2018 New Revision: 330941 URL: https://svnweb.freebsd.org/changeset/base/330941 Log: Import ACPICA 20180313. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/components/debugger/dbdisply.c vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c vendor-sys/acpica/dist/source/components/events/evevent.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/components/events/evgpeblk.c vendor-sys/acpica/dist/source/components/events/evrgnini.c vendor-sys/acpica/dist/source/components/events/evxface.c vendor-sys/acpica/dist/source/components/events/evxfgpe.c vendor-sys/acpica/dist/source/components/executer/exdebug.c vendor-sys/acpica/dist/source/components/hardware/hwgpe.c vendor-sys/acpica/dist/source/components/hardware/hwsleep.c vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c vendor-sys/acpica/dist/source/components/namespace/nsdumpdv.c vendor-sys/acpica/dist/source/components/namespace/nseval.c vendor-sys/acpica/dist/source/components/namespace/nsload.c vendor-sys/acpica/dist/source/components/namespace/nsparse.c vendor-sys/acpica/dist/source/components/namespace/nsxfname.c vendor-sys/acpica/dist/source/components/parser/psargs.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/parser/psobject.c vendor-sys/acpica/dist/source/components/tables/tbdata.c vendor-sys/acpica/dist/source/components/tables/tbinstal.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/components/utilities/utxfinit.c vendor-sys/acpica/dist/source/include/acevents.h vendor-sys/acpica/dist/source/include/acmacros.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.c vendor-sys/acpica/dist/source/tools/acpinames/anmain.c vendor-sys/acpica/dist/source/tools/acpinames/anstubs.c vendor-sys/acpica/dist/source/tools/acpinames/antables.c vendor-sys/acpica/dist/source/tools/acpisrc/acpisrc.h vendor-sys/acpica/dist/source/tools/acpisrc/asconvrt.c vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c vendor-sys/acpica/dist/source/tools/acpisrc/asutils.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/changes.txt Wed Mar 14 19:17:38 2018 (r330941) @@ -1,4 +1,50 @@ ---------------------------------------- +13 March 2018. Summary of changes for version 20180313: + + +1) ACPICA kernel-resident subsystem: + +Implemented various improvements to the GPE support: + +1) Dispatch all active GPEs at initialization time so that no GPEs are +lost. +2) Enable runtime GPEs earlier. Some systems expect GPEs to be enabled +before devices are enumerated. +3) Don't unconditionally clear ACPI IRQs during suspend/resume, so that +IRQs are not lost. +4) Add parallel GPE handling to eliminate the possibility of dispatching +the same GPE twice. +5) Dispatch any pending GPEs after enabling for the first time. + +AcpiGetObjectInfo - removed support for the _STA method. This was causing +problems on some platforms. + +Added a new _OSI string, "Windows 2017.2". + +Cleaned up and simplified the module-level code support. These changes +are in preparation for the eventual removal of the legacy MLC support +(deferred execution), replaced by the new MLC architecture which executes +the MLC as a table is loaded (DSDT/SSDTs). + +Changed a compile-time option to a runtime option. Changes the option to +ignore ACPI table load-time package resolution errors into a runtime +option. Used only for platforms that generate many AE_NOT_FOUND errors +during boot. AcpiGbl_IgnorePackageResolutionErrors. + +Fixed the ACPI_ERROR_NAMESPACE macro. This change involves putting some +ACPI_ERROR_NAMESPACE parameters inside macros. By doing so, we avoid +compilation errors from unused variables (seen with some compilers). + + +2) iASL Compiler/Disassembler and Tools: + +ASLTS: parallelized execution in order to achieve an (approximately) 2X +performance increase. + +ASLTS: Updated to use the iASL __LINE__ and __METHOD__ macros. Improves +error reporting. + +---------------------------------------- 09 February 2018. Summary of changes for version 20180209: Modified: vendor-sys/acpica/dist/source/components/debugger/dbdisply.c ============================================================================== --- vendor-sys/acpica/dist/source/components/debugger/dbdisply.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/debugger/dbdisply.c Wed Mar 14 19:17:38 2018 (r330941) @@ -820,9 +820,8 @@ AcpiDbDisplayObjectType ( return; } - AcpiOsPrintf ("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n", - ACPI_FORMAT_UINT64 (Info->Address), - Info->CurrentStatus, Info->Flags); + AcpiOsPrintf ("ADR: %8.8X%8.8X, Flags: %X\n", + ACPI_FORMAT_UINT64 (Info->Address), Info->Flags); AcpiOsPrintf ("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n", Info->HighestDstates[0], Info->HighestDstates[1], Modified: vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c ============================================================================== --- vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c Wed Mar 14 19:17:38 2018 (r330941) @@ -546,34 +546,33 @@ AcpiDsResolvePackageElement ( ScopeInfo.Scope.Node = Element->Reference.Node; /* Prefix node */ - Status = AcpiNsLookup (&ScopeInfo, - (char *) Element->Reference.Aml, /* Pointer to AML path */ + Status = AcpiNsLookup (&ScopeInfo, (char *) Element->Reference.Aml, ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL, &ResolvedNode); if (ACPI_FAILURE (Status)) { -#if defined ACPI_IGNORE_PACKAGE_RESOLUTION_ERRORS && !defined ACPI_APPLICATION - /* - * For the kernel-resident ACPICA, optionally be silent about the - * NOT_FOUND case. Although this is potentially a serious problem, - * it can generate a lot of noise/errors on platforms whose - * firmware carries around a bunch of unused Package objects. - * To disable these errors, define ACPI_IGNORE_PACKAGE_RESOLUTION_ERRORS - * in the OS-specific header. - * - * All errors are always reported for ACPICA applications such as - * AcpiExec. - */ - if (Status == AE_NOT_FOUND) + if ((Status == AE_NOT_FOUND) && AcpiGbl_IgnorePackageResolutionErrors) { - /* Reference name not found, set the element to NULL */ + /* + * Optionally be silent about the NOT_FOUND case for the referenced + * name. Although this is potentially a serious problem, + * it can generate a lot of noise/errors on platforms whose + * firmware carries around a bunch of unused Package objects. + * To disable these errors, set this global to TRUE: + * AcpiGbl_IgnorePackageResolutionErrors + * + * If the AML actually tries to use such a package, the unresolved + * element(s) will be replaced with NULL elements. + */ + /* Referenced name not found, set the element to NULL */ + AcpiUtRemoveReference (*ElementPtr); *ElementPtr = NULL; return_VOID; } -#endif + Status2 = AcpiNsExternalizeName (ACPI_UINT32_MAX, (char *) Element->Reference.Aml, NULL, &ExternalPath); Modified: vendor-sys/acpica/dist/source/components/events/evevent.c ============================================================================== --- vendor-sys/acpica/dist/source/components/events/evevent.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/events/evevent.c Wed Mar 14 19:17:38 2018 (r330941) @@ -344,6 +344,7 @@ AcpiEvFixedEventDetect ( UINT32 FixedStatus; UINT32 FixedEnable; UINT32 i; + ACPI_STATUS Status; ACPI_FUNCTION_NAME (EvFixedEventDetect); @@ -353,8 +354,12 @@ AcpiEvFixedEventDetect ( * Read the fixed feature status and enable registers, as all the cases * depend on their values. Ignore errors here. */ - (void) AcpiHwRegisterRead (ACPI_REGISTER_PM1_STATUS, &FixedStatus); - (void) AcpiHwRegisterRead (ACPI_REGISTER_PM1_ENABLE, &FixedEnable); + Status = AcpiHwRegisterRead (ACPI_REGISTER_PM1_STATUS, &FixedStatus); + Status |= AcpiHwRegisterRead (ACPI_REGISTER_PM1_ENABLE, &FixedEnable); + if (ACPI_FAILURE (Status)) + { + return (IntStatus); + } ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, "Fixed Event Block: Enable %08X Status %08X\n", Modified: vendor-sys/acpica/dist/source/components/events/evgpe.c ============================================================================== --- vendor-sys/acpica/dist/source/components/events/evgpe.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/events/evgpe.c Wed Mar 14 19:17:38 2018 (r330941) @@ -226,7 +226,7 @@ AcpiEvUpdateGpeEnableMask ( * * RETURN: Status * - * DESCRIPTION: Clear a GPE of stale events and enable it. + * DESCRIPTION: Enable a GPE. * ******************************************************************************/ @@ -240,14 +240,6 @@ AcpiEvEnableGpe ( ACPI_FUNCTION_TRACE (EvEnableGpe); - /* Clear the GPE (of stale events) */ - - Status = AcpiHwClearGpe (GpeEventInfo); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - /* Enable the requested GPE */ Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE); @@ -542,17 +534,12 @@ UINT32 AcpiEvGpeDetect ( ACPI_GPE_XRUPT_INFO *GpeXruptList) { - ACPI_STATUS Status; ACPI_GPE_BLOCK_INFO *GpeBlock; ACPI_NAMESPACE_NODE *GpeDevice; ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; ACPI_GPE_EVENT_INFO *GpeEventInfo; UINT32 GpeNumber; - ACPI_GPE_HANDLER_INFO *GpeHandlerInfo; UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED; - UINT8 EnabledStatusByte; - UINT64 StatusReg; - UINT64 EnableReg; ACPI_CPU_FLAGS Flags; UINT32 i; UINT32 j; @@ -608,105 +595,25 @@ AcpiEvGpeDetect ( continue; } - /* Read the Status Register */ - - Status = AcpiHwRead (&StatusReg, &GpeRegisterInfo->StatusAddress); - if (ACPI_FAILURE (Status)) - { - goto UnlockAndExit; - } - - /* Read the Enable Register */ - - Status = AcpiHwRead (&EnableReg, &GpeRegisterInfo->EnableAddress); - if (ACPI_FAILURE (Status)) - { - goto UnlockAndExit; - } - - ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, - "Read registers for GPE %02X-%02X: Status=%02X, Enable=%02X, " - "RunEnable=%02X, WakeEnable=%02X\n", - GpeRegisterInfo->BaseGpeNumber, - GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1), - (UINT32) StatusReg, (UINT32) EnableReg, - GpeRegisterInfo->EnableForRun, - GpeRegisterInfo->EnableForWake)); - - /* Check if there is anything active at all in this register */ - - EnabledStatusByte = (UINT8) (StatusReg & EnableReg); - if (!EnabledStatusByte) - { - /* No active GPEs in this register, move on */ - - continue; - } - /* Now look at the individual GPEs in this byte register */ for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) { - /* Examine one GPE bit */ + /* Detect and dispatch one GPE bit */ GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i * ACPI_GPE_REGISTER_WIDTH) + j]; GpeNumber = j + GpeRegisterInfo->BaseGpeNumber; - - if (EnabledStatusByte & (1 << j)) - { - /* Invoke global event handler if present */ - - AcpiGpeCount++; - if (AcpiGbl_GlobalEventHandler) - { - AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_GPE, - GpeDevice, GpeNumber, - AcpiGbl_GlobalEventHandlerContext); - } - - /* Found an active GPE */ - - if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == - ACPI_GPE_DISPATCH_RAW_HANDLER) - { - /* Dispatch the event to a raw handler */ - - GpeHandlerInfo = GpeEventInfo->Dispatch.Handler; - - /* - * There is no protection around the namespace node - * and the GPE handler to ensure a safe destruction - * because: - * 1. The namespace node is expected to always - * exist after loading a table. - * 2. The GPE handler is expected to be flushed by - * AcpiOsWaitEventsComplete() before the - * destruction. - */ - AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); - IntStatus |= GpeHandlerInfo->Address ( - GpeDevice, GpeNumber, GpeHandlerInfo->Context); - Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); - } - else - { - /* - * Dispatch the event to a standard handler or - * method. - */ - IntStatus |= AcpiEvGpeDispatch (GpeDevice, - GpeEventInfo, GpeNumber); - } - } + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + IntStatus |= AcpiEvDetectGpe ( + GpeDevice, GpeEventInfo, GpeNumber); + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); } } GpeBlock = GpeBlock->Next; } -UnlockAndExit: - AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); return (IntStatus); } @@ -894,6 +801,137 @@ AcpiEvFinishGpe ( /******************************************************************************* * + * FUNCTION: AcpiEvDetectGpe + * + * PARAMETERS: GpeDevice - Device node. NULL for GPE0/GPE1 + * GpeEventInfo - Info for this GPE + * GpeNumber - Number relative to the parent GPE block + * + * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED + * + * DESCRIPTION: Detect and dispatch a General Purpose Event to either a function + * (e.g. EC) or method (e.g. _Lxx/_Exx) handler. + * NOTE: GPE is W1C, so it is possible to handle a single GPE from both + * task and irq context in parallel as long as the process to + * detect and mask the GPE is atomic. + * However the atomicity of ACPI_GPE_DISPATCH_RAW_HANDLER is + * dependent on the raw handler itself. + * + ******************************************************************************/ + +UINT32 +AcpiEvDetectGpe ( + ACPI_NAMESPACE_NODE *GpeDevice, + ACPI_GPE_EVENT_INFO *GpeEventInfo, + UINT32 GpeNumber) +{ + UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED; + UINT8 EnabledStatusByte; + UINT64 StatusReg; + UINT64 EnableReg; + UINT32 RegisterBit; + ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; + ACPI_GPE_HANDLER_INFO *GpeHandlerInfo; + ACPI_CPU_FLAGS Flags; + ACPI_STATUS Status; + + + ACPI_FUNCTION_TRACE (EvGpeDetect); + + + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); + + /* Get the info block for the entire GPE register */ + + GpeRegisterInfo = GpeEventInfo->RegisterInfo; + + /* Get the register bitmask for this GPE */ + + RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo); + + /* GPE currently enabled (enable bit == 1)? */ + + Status = AcpiHwRead (&EnableReg, &GpeRegisterInfo->EnableAddress); + if (ACPI_FAILURE (Status)) + { + goto ErrorExit; + } + + /* GPE currently active (status bit == 1)? */ + + Status = AcpiHwRead (&StatusReg, &GpeRegisterInfo->StatusAddress); + if (ACPI_FAILURE (Status)) + { + goto ErrorExit; + } + + /* Check if there is anything active at all in this GPE */ + + ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, + "Read registers for GPE %02X: Status=%02X, Enable=%02X, " + "RunEnable=%02X, WakeEnable=%02X\n", + GpeNumber, + (UINT32) (StatusReg & RegisterBit), + (UINT32) (EnableReg & RegisterBit), + GpeRegisterInfo->EnableForRun, + GpeRegisterInfo->EnableForWake)); + + EnabledStatusByte = (UINT8) (StatusReg & EnableReg); + if (!(EnabledStatusByte & RegisterBit)) + { + goto ErrorExit; + } + + /* Invoke global event handler if present */ + + AcpiGpeCount++; + if (AcpiGbl_GlobalEventHandler) + { + AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_GPE, + GpeDevice, GpeNumber, + AcpiGbl_GlobalEventHandlerContext); + } + + /* Found an active GPE */ + + if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == + ACPI_GPE_DISPATCH_RAW_HANDLER) + { + /* Dispatch the event to a raw handler */ + + GpeHandlerInfo = GpeEventInfo->Dispatch.Handler; + + /* + * There is no protection around the namespace node + * and the GPE handler to ensure a safe destruction + * because: + * 1. The namespace node is expected to always + * exist after loading a table. + * 2. The GPE handler is expected to be flushed by + * AcpiOsWaitEventsComplete() before the + * destruction. + */ + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + IntStatus |= GpeHandlerInfo->Address ( + GpeDevice, GpeNumber, GpeHandlerInfo->Context); + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); + } + else + { + /* Dispatch the event to a standard handler or method. */ + + IntStatus |= AcpiEvGpeDispatch (GpeDevice, + GpeEventInfo, GpeNumber); + } + +ErrorExit: + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + return (IntStatus); +} + + +/******************************************************************************* + * * FUNCTION: AcpiEvGpeDispatch * * PARAMETERS: GpeDevice - Device node. NULL for GPE0/GPE1 @@ -904,8 +942,6 @@ AcpiEvFinishGpe ( * * DESCRIPTION: Dispatch a General Purpose Event to either a function (e.g. EC) * or method (e.g. _Lxx/_Exx) handler. - * - * This function executes at interrupt level. * ******************************************************************************/ Modified: vendor-sys/acpica/dist/source/components/events/evgpeblk.c ============================================================================== --- vendor-sys/acpica/dist/source/components/events/evgpeblk.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/events/evgpeblk.c Wed Mar 14 19:17:38 2018 (r330941) @@ -585,7 +585,7 @@ ACPI_STATUS AcpiEvInitializeGpeBlock ( ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, - void *Ignored) + void *Context) { ACPI_STATUS Status; ACPI_GPE_EVENT_INFO *GpeEventInfo; @@ -593,6 +593,8 @@ AcpiEvInitializeGpeBlock ( UINT32 GpeIndex; UINT32 i; UINT32 j; + BOOLEAN *IsPollingNeeded = Context; + ACPI_ERROR_ONLY (UINT32 GpeNumber); ACPI_FUNCTION_TRACE (EvInitializeGpeBlock); @@ -622,14 +624,14 @@ AcpiEvInitializeGpeBlock ( GpeIndex = (i * ACPI_GPE_REGISTER_WIDTH) + j; GpeEventInfo = &GpeBlock->EventInfo[GpeIndex]; + ACPI_ERROR_ONLY(GpeNumber = GpeBlock->BlockBaseNumber + GpeIndex); + GpeEventInfo->Flags |= ACPI_GPE_INITIALIZED; /* * Ignore GPEs that have no corresponding _Lxx/_Exx method * and GPEs that are used to wake the system */ - if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_NONE) || - (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_HANDLER) || - (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_RAW_HANDLER) || + if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) != ACPI_GPE_DISPATCH_METHOD) || (GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE)) { continue; @@ -640,8 +642,16 @@ AcpiEvInitializeGpeBlock ( { ACPI_EXCEPTION ((AE_INFO, Status, "Could not enable GPE 0x%02X", - GpeIndex + GpeBlock->BlockBaseNumber)); + GpeNumber)); continue; + } + + GpeEventInfo->Flags |= ACPI_GPE_AUTO_ENABLED; + + if (IsPollingNeeded && + ACPI_GPE_IS_POLLING_NEEDED (GpeEventInfo)) + { + *IsPollingNeeded = TRUE; } GpeEnabledCount++; Modified: vendor-sys/acpica/dist/source/components/events/evrgnini.c ============================================================================== --- vendor-sys/acpica/dist/source/components/events/evrgnini.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/events/evrgnini.c Wed Mar 14 19:17:38 2018 (r330941) @@ -736,9 +736,12 @@ AcpiEvInitializeRegion ( * Node's object was replaced by this Method object and we * saved the handler in the method object. * + * Note: Only used for the legacy MLC support. Will + * be removed in the future. + * * See AcpiNsExecModuleCode */ - if (!AcpiGbl_ParseTableAsTermList && + if (!AcpiGbl_ExecuteTablesAsMethods && ObjDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL) { HandlerObj = ObjDesc->Method.Dispatch.Handler; Modified: vendor-sys/acpica/dist/source/components/events/evxface.c ============================================================================== --- vendor-sys/acpica/dist/source/components/events/evxface.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/events/evxface.c Wed Mar 14 19:17:38 2018 (r330941) @@ -1257,6 +1257,15 @@ AcpiRemoveGpeHandler ( Handler->OriginallyEnabled) { (void) AcpiEvAddGpeReference (GpeEventInfo); + if (ACPI_GPE_IS_POLLING_NEEDED (GpeEventInfo)) + { + /* Poll edge triggered GPEs to handle existing events */ + + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + (void) AcpiEvDetectGpe ( + GpeDevice, GpeEventInfo, GpeNumber); + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); + } } AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); Modified: vendor-sys/acpica/dist/source/components/events/evxfgpe.c ============================================================================== --- vendor-sys/acpica/dist/source/components/events/evxfgpe.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/events/evxfgpe.c Wed Mar 14 19:17:38 2018 (r330941) @@ -188,6 +188,7 @@ AcpiUpdateAllGpes ( void) { ACPI_STATUS Status; + BOOLEAN IsPollingNeeded = FALSE; ACPI_FUNCTION_TRACE (AcpiUpdateAllGpes); @@ -204,7 +205,8 @@ AcpiUpdateAllGpes ( goto UnlockAndExit; } - Status = AcpiEvWalkGpeList (AcpiEvInitializeGpeBlock, NULL); + Status = AcpiEvWalkGpeList (AcpiEvInitializeGpeBlock, + &IsPollingNeeded); if (ACPI_SUCCESS (Status)) { AcpiGbl_AllGpesInitialized = TRUE; @@ -212,6 +214,13 @@ AcpiUpdateAllGpes ( UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS); + + if (IsPollingNeeded && AcpiGbl_AllGpesInitialized) + { + /* Poll GPEs to handle already triggered events */ + + AcpiEvGpeDetect (AcpiGbl_GpeXruptListHead); + } return_ACPI_STATUS (Status); } @@ -259,6 +268,16 @@ AcpiEnableGpe ( ACPI_GPE_DISPATCH_NONE) { Status = AcpiEvAddGpeReference (GpeEventInfo); + if (ACPI_SUCCESS (Status) && + ACPI_GPE_IS_POLLING_NEEDED (GpeEventInfo)) + { + /* Poll edge-triggered GPEs to handle existing events */ + + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + (void) AcpiEvDetectGpe ( + GpeDevice, GpeEventInfo, GpeNumber); + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); + } } else { @@ -608,6 +627,16 @@ AcpiSetupGpeForWake ( */ GpeEventInfo->Flags = (ACPI_GPE_DISPATCH_NOTIFY | ACPI_GPE_LEVEL_TRIGGERED); + } + else if (GpeEventInfo->Flags & ACPI_GPE_AUTO_ENABLED) + { + /* + * A reference to this GPE has been added during the GPE block + * initialization, so drop it now to prevent the GPE from being + * permanently enabled and clear its ACPI_GPE_AUTO_ENABLED flag. + */ + (void) AcpiEvRemoveGpeReference (GpeEventInfo); + GpeEventInfo->Flags &= ~~ACPI_GPE_AUTO_ENABLED; } /* Modified: vendor-sys/acpica/dist/source/components/executer/exdebug.c ============================================================================== --- vendor-sys/acpica/dist/source/components/executer/exdebug.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/executer/exdebug.c Wed Mar 14 19:17:38 2018 (r330941) @@ -204,15 +204,14 @@ AcpiExDoDebugObject ( return_VOID; } - /* Null string or newline -- don't emit the line header */ + /* Newline -- don't emit the line header */ if (SourceDesc && (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc) == ACPI_DESC_TYPE_OPERAND) && (SourceDesc->Common.Type == ACPI_TYPE_STRING)) { - if ((SourceDesc->String.Length == 0) || - ((SourceDesc->String.Length == 1) && - (*SourceDesc->String.Pointer == '\n'))) + if ((SourceDesc->String.Length == 1) && + (*SourceDesc->String.Pointer == '\n')) { AcpiOsPrintf ("\n"); return_VOID; Modified: vendor-sys/acpica/dist/source/components/hardware/hwgpe.c ============================================================================== --- vendor-sys/acpica/dist/source/components/hardware/hwgpe.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/hardware/hwgpe.c Wed Mar 14 19:17:38 2018 (r330941) @@ -658,7 +658,6 @@ AcpiHwDisableAllGpes ( Status = AcpiEvWalkGpeList (AcpiHwDisableGpeBlock, NULL); - Status = AcpiEvWalkGpeList (AcpiHwClearGpeBlock, NULL); return_ACPI_STATUS (Status); } Modified: vendor-sys/acpica/dist/source/components/hardware/hwsleep.c ============================================================================== --- vendor-sys/acpica/dist/source/components/hardware/hwsleep.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/hardware/hwsleep.c Wed Mar 14 19:17:38 2018 (r330941) @@ -198,16 +198,8 @@ AcpiHwLegacySleep ( return_ACPI_STATUS (Status); } - /* Clear all fixed and general purpose status bits */ - - Status = AcpiHwClearAcpiStatus (); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - /* - * 1) Disable/Clear all GPEs + * 1) Disable all GPEs * 2) Enable all wakeup GPEs */ Status = AcpiHwDisableAllGpes (); @@ -427,7 +419,7 @@ AcpiHwLegacyWake ( * might get fired there * * Restore the GPEs: - * 1) Disable/Clear all GPEs + * 1) Disable all GPEs * 2) Enable all runtime GPEs */ Status = AcpiHwDisableAllGpes (); Modified: vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c ============================================================================== --- vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c Wed Mar 14 19:17:38 2018 (r330941) @@ -337,7 +337,7 @@ AcpiEnterSleepStateS4bios ( } /* - * 1) Disable/Clear all GPEs + * 1) Disable all GPEs * 2) Enable all wakeup GPEs */ Status = AcpiHwDisableAllGpes (); Modified: vendor-sys/acpica/dist/source/components/namespace/nsdumpdv.c ============================================================================== --- vendor-sys/acpica/dist/source/components/namespace/nsdumpdv.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/namespace/nsdumpdv.c Wed Mar 14 19:17:38 2018 (r330941) @@ -208,9 +208,8 @@ AcpiNsDumpOneDevice ( } ACPI_DEBUG_PRINT_RAW ((ACPI_DB_TABLES, - " HID: %s, ADR: %8.8X%8.8X, Status: %X\n", - Info->HardwareId.Value, ACPI_FORMAT_UINT64 (Info->Address), - Info->CurrentStatus)); + " HID: %s, ADR: %8.8X%8.8X\n", + Info->HardwareId.Value, ACPI_FORMAT_UINT64 (Info->Address))); ACPI_FREE (Info); } Modified: vendor-sys/acpica/dist/source/components/namespace/nseval.c ============================================================================== --- vendor-sys/acpica/dist/source/components/namespace/nseval.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/namespace/nseval.c Wed Mar 14 19:17:38 2018 (r330941) @@ -429,7 +429,17 @@ AcpiNsEvaluate ( Status = AE_OK; } + else if (ACPI_FAILURE(Status)) + { + /* If ReturnObject exists, delete it */ + if (Info->ReturnObject) + { + AcpiUtRemoveReference (Info->ReturnObject); + Info->ReturnObject = NULL; + } + } + ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "*** Completed evaluation of object %s ***\n", Info->RelativePathname)); @@ -457,6 +467,17 @@ Cleanup: * DESCRIPTION: Execute all elements of the global module-level code list. * Each element is executed as a single control method. * + * NOTE: With this option enabled, each block of detected executable AML + * code that is outside of any control method is wrapped with a temporary + * control method object and placed on a global list. The methods on this + * list are executed below. + * + * This function executes the module-level code for all tables only after + * all of the tables have been loaded. It is a legacy option and is + * not compatible with other ACPI implementations. See AcpiNsLoadTable. + * + * This function will be removed when the legacy option is removed. + * ******************************************************************************/ void @@ -477,6 +498,9 @@ AcpiNsExecModuleCodeList ( Next = AcpiGbl_ModuleCodeList; if (!Next) { + ACPI_DEBUG_PRINT ((ACPI_DB_INIT_NAMES, + "Legacy MLC block list is empty\n")); + return_VOID; } Modified: vendor-sys/acpica/dist/source/components/namespace/nsload.c ============================================================================== --- vendor-sys/acpica/dist/source/components/namespace/nsload.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/namespace/nsload.c Wed Mar 14 19:17:38 2018 (r330941) @@ -270,23 +270,17 @@ Unlock: "**** Completed Table Object Initialization\n")); /* - * Execute any module-level code that was detected during the table load - * phase. Although illegal since ACPI 2.0, there are many machines that - * contain this type of code. Each block of detected executable AML code - * outside of any control method is wrapped with a temporary control - * method object and placed on a global list. The methods on this list - * are executed below. + * This case handles the legacy option that groups all module-level + * code blocks together and defers execution until all of the tables + * are loaded. Execute all of these blocks at this time. + * Execute any module-level code that was detected during the table + * load phase. * - * This case executes the module-level code for each table immediately - * after the table has been loaded. This provides compatibility with - * other ACPI implementations. Optionally, the execution can be deferred - * until later, see AcpiInitializeObjects. + * Note: this option is deprecated and will be eliminated in the + * future. Use of this option can cause problems with AML code that + * depends upon in-order immediate execution of module-level code. */ - if (!AcpiGbl_ParseTableAsTermList && !AcpiGbl_GroupModuleLevelCode) - { - AcpiNsExecModuleCodeList (); - } - + AcpiNsExecModuleCodeList (); return_ACPI_STATUS (Status); } Modified: vendor-sys/acpica/dist/source/components/namespace/nsparse.c ============================================================================== --- vendor-sys/acpica/dist/source/components/namespace/nsparse.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/namespace/nsparse.c Wed Mar 14 19:17:38 2018 (r330941) @@ -171,9 +171,18 @@ * * RETURN: Status * - * DESCRIPTION: Load ACPI/AML table by executing the entire table as a - * TermList. + * DESCRIPTION: Load ACPI/AML table by executing the entire table as a single + * large control method. * + * NOTE: The point of this is to execute any module-level code in-place + * as the table is parsed. Some AML code depends on this behavior. + * + * It is a run-time option at this time, but will eventually become + * the default. + * + * Note: This causes the table to only have a single-pass parse. + * However, this is compatible with other ACPI implementations. + * ******************************************************************************/ ACPI_STATUS @@ -403,8 +412,19 @@ AcpiNsParseTable ( ACPI_FUNCTION_TRACE (NsParseTable); - if (AcpiGbl_ParseTableAsTermList) + if (AcpiGbl_ExecuteTablesAsMethods) { + /* + * This case executes the AML table as one large control method. + * The point of this is to execute any module-level code in-place + * as the table is parsed. Some AML code depends on this behavior. + * + * It is a run-time option at this time, but will eventually become + * the default. + * + * Note: This causes the table to only have a single-pass parse. + * However, this is compatible with other ACPI implementations. + */ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_PARSE, "%s: **** Start table execution pass\n", ACPI_GET_FUNCTION_NAME)); Modified: vendor-sys/acpica/dist/source/components/namespace/nsxfname.c ============================================================================== --- vendor-sys/acpica/dist/source/components/namespace/nsxfname.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/namespace/nsxfname.c Wed Mar 14 19:17:38 2018 (r330941) @@ -376,7 +376,7 @@ AcpiNsCopyDeviceId ( * namespace node and possibly by running several standard * control methods (Such as in the case of a device.) * - * For Device and Processor objects, run the Device _HID, _UID, _CID, _STA, + * For Device and Processor objects, run the Device _HID, _UID, _CID, * _CLS, _ADR, _SxW, and _SxD methods. * * Note: Allocates the return buffer, must be freed by the caller. @@ -385,8 +385,9 @@ AcpiNsCopyDeviceId ( * discovery namespace traversal. Therefore, no complex methods can be * executed, especially those that access operation regions. Therefore, do * not add any additional methods that could cause problems in this area. - * this was the fate of the _SUB method which was found to cause such - * problems and was removed (11/2015). + * Because of this reason support for the following methods has been removed: + * 1) _SUB method was removed (11/2015) + * 2) _STA method was removed (02/2018) * ******************************************************************************/ @@ -517,25 +518,12 @@ AcpiGetObjectInfo ( { /* * Get extra info for ACPI Device/Processor objects only: - * Run the _STA, _ADR and, SxW, and _SxD methods. + * Run the _ADR and, SxW, and _SxD methods. * * Notes: none of these methods are required, so they may or may * not be present for this device. The Info->Valid bitfield is used * to indicate which methods were found and run successfully. - * - * For _STA, if the method does not exist, then (as per the ACPI - * specification), the returned CurrentStatus flags will indicate - * that the device is present/functional/enabled. Otherwise, the - * CurrentStatus flags reflect the value returned from _STA. */ - - /* Execute the Device._STA method */ - - Status = AcpiUtExecute_STA (Node, &Info->CurrentStatus); - if (ACPI_SUCCESS (Status)) - { - Valid |= ACPI_VALID_STA; - } /* Execute the Device._ADR method */ Modified: vendor-sys/acpica/dist/source/components/parser/psargs.c ============================================================================== --- vendor-sys/acpica/dist/source/components/parser/psargs.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/parser/psargs.c Wed Mar 14 19:17:38 2018 (r330941) @@ -1051,6 +1051,9 @@ AcpiPsGetNextArg ( if (Arg->Common.AmlOpcode == AML_INT_METHODCALL_OP) { + /* Free method call op and corresponding namestring sub-ob */ + + AcpiPsFreeOp (Arg->Common.Value.Arg); AcpiPsFreeOp (Arg); Arg = NULL; WalkState->ArgCount = 1; Modified: vendor-sys/acpica/dist/source/components/parser/psloop.c ============================================================================== --- vendor-sys/acpica/dist/source/components/parser/psloop.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/parser/psloop.c Wed Mar 14 19:17:38 2018 (r330941) @@ -287,10 +287,18 @@ AcpiPsGetArguments ( WalkState->ArgCount, WalkState->PassNumber)); /* - * Handle executable code at "module-level". This refers to - * executable opcodes that appear outside of any control method. + * This case handles the legacy option that groups all module-level + * code blocks together and defers execution until all of the tables + * are loaded. Execute all of these blocks at this time. + * Execute any module-level code that was detected during the table + * load phase. + * + * Note: this option is deprecated and will be eliminated in the + * future. Use of this option can cause problems with AML code that + * depends upon in-order immediate execution of module-level code. */ - if ((WalkState->PassNumber <= ACPI_IMODE_LOAD_PASS2) && + if (AcpiGbl_GroupModuleLevelCode && + (WalkState->PassNumber <= ACPI_IMODE_LOAD_PASS2) && ((WalkState->ParseFlags & ACPI_PARSE_DISASSEMBLE) == 0)) { /* @@ -439,6 +447,16 @@ AcpiPsGetArguments ( * DESCRIPTION: Wrap the module-level code with a method object and link the * object to the global list. Note, the mutex field of the method * object is used to link multiple module-level code objects. + * + * NOTE: In this legacy option, each block of detected executable AML + * code that is outside of any control method is wrapped with a temporary + * control method object and placed on a global list below. + * + * This function executes the module-level code for all tables only after + * all of the tables have been loaded. It is a legacy option and is + * not compatible with other ACPI implementations. See AcpiNsLoadTable. + * + * This function will be removed when the legacy option is removed. * ******************************************************************************/ Modified: vendor-sys/acpica/dist/source/components/parser/psobject.c ============================================================================== --- vendor-sys/acpica/dist/source/components/parser/psobject.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/parser/psobject.c Wed Mar 14 19:17:38 2018 (r330941) @@ -182,7 +182,7 @@ static ACPI_STATUS AcpiPsGetAmlOpcode ( ACPI_WALK_STATE *WalkState) { - UINT32 AmlOffset; + ACPI_ERROR_ONLY (UINT32 AmlOffset); ACPI_FUNCTION_TRACE_PTR (PsGetAmlOpcode, WalkState); @@ -217,8 +217,8 @@ AcpiPsGetAmlOpcode ( if (WalkState->PassNumber == 2) { - AmlOffset = (UINT32) ACPI_PTR_DIFF (WalkState->Aml, - WalkState->ParserState.AmlStart); + ACPI_ERROR_ONLY(AmlOffset = (UINT32) ACPI_PTR_DIFF (WalkState->Aml, + WalkState->ParserState.AmlStart)); ACPI_ERROR ((AE_INFO, "Unknown opcode 0x%.2X at table offset 0x%.4X, ignoring", Modified: vendor-sys/acpica/dist/source/components/tables/tbdata.c ============================================================================== --- vendor-sys/acpica/dist/source/components/tables/tbdata.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/tables/tbdata.c Wed Mar 14 19:17:38 2018 (r330941) @@ -1190,12 +1190,18 @@ AcpiTbLoadTable ( Status = AcpiNsLoadTable (TableIndex, ParentNode); - /* Execute any module-level code that was found in the table */ - - if (!AcpiGbl_ParseTableAsTermList && AcpiGbl_GroupModuleLevelCode) - { - AcpiNsExecModuleCodeList (); - } + /* + * This case handles the legacy option that groups all module-level + * code blocks together and defers execution until all of the tables + * are loaded. Execute all of these blocks at this time. + * Execute any module-level code that was detected during the table + * load phase. + * + * Note: this option is deprecated and will be eliminated in the + * future. Use of this option can cause problems with AML code that + * depends upon in-order immediate execution of module-level code. + */ + AcpiNsExecModuleCodeList (); /* * Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is Modified: vendor-sys/acpica/dist/source/components/tables/tbinstal.c ============================================================================== --- vendor-sys/acpica/dist/source/components/tables/tbinstal.c Wed Mar 14 19:09:58 2018 (r330940) +++ vendor-sys/acpica/dist/source/components/tables/tbinstal.c Wed Mar 14 19:17:38 2018 (r330941) @@ -356,11 +356,11 @@ AcpiTbOverrideTable ( ACPI_TABLE_DESC *OldTableDesc) { ACPI_STATUS Status; - char *OverrideType; ACPI_TABLE_DESC NewTableDesc; ACPI_TABLE_HEADER *Table; ACPI_PHYSICAL_ADDRESS Address; UINT32 Length; + ACPI_ERROR_ONLY (char *OverrideType); /* (1) Attempt logical override (returns a logical address) */ @@ -370,7 +370,7 @@ AcpiTbOverrideTable ( { AcpiTbAcquireTempTable (&NewTableDesc, ACPI_PTR_TO_PHYSADDR (Table), ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL); - OverrideType = "Logical"; + ACPI_ERROR_ONLY (OverrideType = "Logical"); goto FinishOverride; } @@ -382,7 +382,7 @@ AcpiTbOverrideTable ( { AcpiTbAcquireTempTable (&NewTableDesc, Address, ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL); - OverrideType = "Physical"; + ACPI_ERROR_ONLY (OverrideType = "Physical"); goto FinishOverride; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 14 19:18:36 2018 Return-Path: Delivered-To: svn-src-all@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 5EA00F3A280; Wed, 14 Mar 2018 19:18:36 +0000 (UTC) (envelope-from jkim@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 0D51172568; Wed, 14 Mar 2018 19:18:36 +0000 (UTC) (envelope-from jkim@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 E3F273F7C; Wed, 14 Mar 2018 19:18:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2EJIZYE023395; Wed, 14 Mar 2018 19:18:35 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EJIZwY023394; Wed, 14 Mar 2018 19:18:35 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201803141918.w2EJIZwY023394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 14 Mar 2018 19:18:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r330942 - vendor-sys/acpica/20180313 X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-sys/acpica/20180313 X-SVN-Commit-Revision: 330942 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 19:18:36 -0000 Author: jkim Date: Wed Mar 14 19:18:35 2018 New Revision: 330942 URL: https://svnweb.freebsd.org/changeset/base/330942 Log: Tag ACPICA 20180313. Added: vendor-sys/acpica/20180313/ - copied from r330941, vendor-sys/acpica/dist/ From owner-svn-src-all@freebsd.org Wed Mar 14 19:23:18 2018 Return-Path: Delivered-To: svn-src-all@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 2B372F3AB8A; Wed, 14 Mar 2018 19:23:18 +0000 (UTC) (envelope-from dteske@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 CF13972C26; Wed, 14 Mar 2018 19:23:17 +0000 (UTC) (envelope-from dteske@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 CA0E94135; Wed, 14 Mar 2018 19:23:17 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2EJNH5S028448; Wed, 14 Mar 2018 19:23:17 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EJNHHa028446; Wed, 14 Mar 2018 19:23:17 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201803141923.w2EJNHHa028446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 14 Mar 2018 19:23:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330943 - head/lib/libdpv X-SVN-Group: head X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: head/lib/libdpv X-SVN-Commit-Revision: 330943 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 19:23:18 -0000 Author: dteske Date: Wed Mar 14 19:23:17 2018 New Revision: 330943 URL: https://svnweb.freebsd.org/changeset/base/330943 Log: Fix bad error messages from dpv(3) Before = dpv: <__func__>: posix_spawnp(3): No such file or directory After = dpv: : No such file or directory Most notably, show the 2nd argument being passed to posix_spawnp(3) so we know what path/cmd failed. Also, we don't need to have "posix_spawnp(3)" in the error message nor the function because that can [a] change and [b] traversed using a debugger if necessary. Modified: head/lib/libdpv/dialog_util.c head/lib/libdpv/util.c Modified: head/lib/libdpv/dialog_util.c ============================================================================== --- head/lib/libdpv/dialog_util.c Wed Mar 14 19:18:35 2018 (r330942) +++ head/lib/libdpv/dialog_util.c Wed Mar 14 19:23:17 2018 (r330943) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2018 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -328,8 +328,7 @@ dialog_spawn_gauge(char *init_prompt, pid_t *pid) posix_spawn_file_actions_addclose(&action, stdin_pipe[1]); error = posix_spawnp(pid, dialog, &action, (const posix_spawnattr_t *)NULL, dargv, environ); - if (error != 0) - err(EXIT_FAILURE, "%s: posix_spawnp(3)", __func__); + if (error != 0) err(EXIT_FAILURE, "%s", dialog); /* NB: Do not free(3) *dargv[], else SIGSEGV */ Modified: head/lib/libdpv/util.c ============================================================================== --- head/lib/libdpv/util.c Wed Mar 14 19:18:35 2018 (r330942) +++ head/lib/libdpv/util.c Wed Mar 14 19:23:17 2018 (r330943) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2014 Devin Teske + * Copyright (c) 2013-2018 Devin Teske * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -100,8 +100,7 @@ shell_spawn_pipecmd(const char *cmd, const char *label posix_spawn_file_actions_addclose(&action, stdin_pipe[1]); error = posix_spawnp(pid, shellcmd, &action, (const posix_spawnattr_t *)NULL, shellcmd_argv, environ); - if (error != 0) - err(EXIT_FAILURE, "%s: posix_spawnp(3)", __func__); + if (error != 0) err(EXIT_FAILURE, "%s", shellcmd); return stdin_pipe[1]; } From owner-svn-src-all@freebsd.org Wed Mar 14 19:51:29 2018 Return-Path: Delivered-To: svn-src-all@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 EED3FF40AB7; Wed, 14 Mar 2018 19:51:28 +0000 (UTC) (envelope-from hselasky@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 9FA2E73D61; Wed, 14 Mar 2018 19:51:28 +0000 (UTC) (envelope-from hselasky@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 9A23E447E; Wed, 14 Mar 2018 19:51:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2EJpSCj043031; Wed, 14 Mar 2018 19:51:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EJpSHp043030; Wed, 14 Mar 2018 19:51:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803141951.w2EJpSHp043030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 14 Mar 2018 19:51:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330944 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 330944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 19:51:29 -0000 Author: hselasky Date: Wed Mar 14 19:51:28 2018 New Revision: 330944 URL: https://svnweb.freebsd.org/changeset/base/330944 Log: Fix compliancy of the kstrtoXXX() functions in the LinuxKPI, by skipping one newline character at the end, if any. Found by: greg@unrelenting.technology MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Wed Mar 14 19:23:17 2018 (r330943) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Wed Mar 14 19:51:28 2018 (r330944) @@ -295,6 +295,9 @@ kstrtoul(const char *cp, unsigned int base, unsigned l *res = strtoul(cp, &end, base); + /* skip newline character, if any */ + if (*end == '\n') + end++; if (*cp == 0 || *end != 0) return (-EINVAL); return (0); @@ -307,6 +310,9 @@ kstrtol(const char *cp, unsigned int base, long *res) *res = strtol(cp, &end, base); + /* skip newline character, if any */ + if (*end == '\n') + end++; if (*cp == 0 || *end != 0) return (-EINVAL); return (0); @@ -320,6 +326,9 @@ kstrtoint(const char *cp, unsigned int base, int *res) *res = temp = strtol(cp, &end, base); + /* skip newline character, if any */ + if (*end == '\n') + end++; if (*cp == 0 || *end != 0) return (-EINVAL); if (temp != (int)temp) @@ -335,6 +344,9 @@ kstrtouint(const char *cp, unsigned int base, unsigned *res = temp = strtoul(cp, &end, base); + /* skip newline character, if any */ + if (*end == '\n') + end++; if (*cp == 0 || *end != 0) return (-EINVAL); if (temp != (unsigned int)temp) @@ -350,6 +362,9 @@ kstrtou32(const char *cp, unsigned int base, u32 *res) *res = temp = strtoul(cp, &end, base); + /* skip newline character, if any */ + if (*end == '\n') + end++; if (*cp == 0 || *end != 0) return (-EINVAL); if (temp != (u32)temp) From owner-svn-src-all@freebsd.org Wed Mar 14 20:07:53 2018 Return-Path: Delivered-To: svn-src-all@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 7B2C9F41CE1; Wed, 14 Mar 2018 20:07:53 +0000 (UTC) (envelope-from brooks@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 2D41A747B2; Wed, 14 Mar 2018 20:07:53 +0000 (UTC) (envelope-from brooks@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 278944732; Wed, 14 Mar 2018 20:07:53 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2EK7qFv049115; Wed, 14 Mar 2018 20:07:52 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EK7qSU049114; Wed, 14 Mar 2018 20:07:52 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803142007.w2EK7qSU049114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 14 Mar 2018 20:07:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330945 - head/sys/modules/isp X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/modules/isp X-SVN-Commit-Revision: 330945 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 20:07:53 -0000 Author: brooks Date: Wed Mar 14 20:07:52 2018 New Revision: 330945 URL: https://svnweb.freebsd.org/changeset/base/330945 Log: Add opt_compat.h to isp(4) as required by r330876. MFC with: r330876 Modified: head/sys/modules/isp/Makefile Modified: head/sys/modules/isp/Makefile ============================================================================== --- head/sys/modules/isp/Makefile Wed Mar 14 19:51:28 2018 (r330944) +++ head/sys/modules/isp/Makefile Wed Mar 14 20:07:52 2018 (r330945) @@ -4,7 +4,7 @@ KMOD= isp SRCS= bus_if.h device_if.h pci_if.h \ - opt_cam.h opt_ddb.h opt_isp.h \ + opt_cam.h opt_compat.h opt_ddb.h opt_isp.h \ isp.c isp_library.c isp_target.c isp_freebsd.c isp_pci.c .if ${MACHINE} == sparc64 From owner-svn-src-all@freebsd.org Wed Mar 14 20:46:27 2018 Return-Path: Delivered-To: svn-src-all@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 C3FF9F46409; Wed, 14 Mar 2018 20:46:26 +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 761D275FED; Wed, 14 Mar 2018 20:46:26 +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 6CDA24D31; Wed, 14 Mar 2018 20:46:26 +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 w2EKkQ98069660; Wed, 14 Mar 2018 20:46:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EKkQZ0069657; Wed, 14 Mar 2018 20:46:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201803142046.w2EKkQZ0069657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 14 Mar 2018 20:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330946 - head/sys/dev/cxgbe/tom X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 330946 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 20:46:27 -0000 Author: jhb Date: Wed Mar 14 20:46:25 2018 New Revision: 330946 URL: https://svnweb.freebsd.org/changeset/base/330946 Log: Remove TLS-related inlines from t4_tom.h to fix iw_cxgbe(4) build. - Remove the one use of is_tls_offload() and the function. AIO special handling only needs to be disabled when a TOE socket is actively doing TLS offload on transmit. The TOE socket's mode (which affects receive operation) doesn't matter, so remove the check for the socket's mode and only check if a TOE socket has TLS transmit keys configured to determine if an AIO write request should fall back to the normal socket handling instead of the TOE fast path. - Move can_tls_offload() into t4_tls.c. It is not used in critical paths, so inlining isn't that important. Change return type to bool while here. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c head/sys/dev/cxgbe/tom/t4_tls.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Mar 14 20:07:52 2018 (r330945) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Mar 14 20:46:25 2018 (r330946) @@ -2357,7 +2357,7 @@ t4_aio_queue_aiotx(struct socket *so, struct kaiocb *j if (!sc->tt.tx_zcopy) return (EOPNOTSUPP); - if (is_tls_offload(toep) || tls_tx_key(toep)) + if (tls_tx_key(toep)) return (EOPNOTSUPP); SOCKBUF_LOCK(&so->so_snd); Modified: head/sys/dev/cxgbe/tom/t4_tls.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tls.c Wed Mar 14 20:07:52 2018 (r330945) +++ head/sys/dev/cxgbe/tom/t4_tls.c Wed Mar 14 20:46:25 2018 (r330946) @@ -73,6 +73,13 @@ t4_set_tls_tcb_field(struct toepcb *toep, uint16_t wor } /* TLS and DTLS common routines */ +bool +can_tls_offload(struct adapter *sc) +{ + + return (sc->tt.tls && sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS); +} + int tls_tx_key(struct toepcb *toep) { Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Wed Mar 14 20:07:52 2018 (r330945) +++ head/sys/dev/cxgbe/tom/t4_tom.h Wed Mar 14 20:46:25 2018 (r330946) @@ -321,18 +321,6 @@ mbuf_ulp_submode(struct mbuf *m) return (m->m_pkthdr.PH_per.eight[0]); } -static inline int -is_tls_offload(struct toepcb *toep) -{ - return (toep->ulp_mode == ULP_MODE_TLS); -} - -static inline int -can_tls_offload(struct adapter *sc) -{ - return (sc->tt.tls && sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS); -} - /* t4_tom.c */ struct toepcb *alloc_toepcb(struct vi_info *, int, int, int); struct toepcb *hold_toepcb(struct toepcb *); @@ -430,6 +418,7 @@ void handle_ddp_tcb_rpl(struct toepcb *, const struct void insert_ddp_data(struct toepcb *, uint32_t); /* t4_tls.c */ +bool can_tls_offload(struct adapter *); int t4_ctloutput_tls(struct socket *, struct sockopt *); void t4_push_tls_records(struct adapter *, struct toepcb *, int); void t4_tls_mod_load(void); From owner-svn-src-all@freebsd.org Wed Mar 14 20:49:52 2018 Return-Path: Delivered-To: svn-src-all@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 91218F466E8; Wed, 14 Mar 2018 20:49:52 +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 3CA6F7620E; Wed, 14 Mar 2018 20:49:52 +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 2E61B4D32; Wed, 14 Mar 2018 20:49:52 +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 w2EKnqbf069829; Wed, 14 Mar 2018 20:49:52 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EKnqdY069828; Wed, 14 Mar 2018 20:49:52 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201803142049.w2EKnqdY069828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 14 Mar 2018 20:49:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330947 - head/sys/dev/cxgbe/tom X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 330947 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 20:49:52 -0000 Author: jhb Date: Wed Mar 14 20:49:51 2018 New Revision: 330947 URL: https://svnweb.freebsd.org/changeset/base/330947 Log: Fix the check for an empty send socket buffer on a TOE TLS socket. Compare sbavail() with the cached sb_off of already-sent data instead of always comparing with zero. This will correctly close the connection and send the FIN if the socket buffer contains some previously-sent data but no unsent data. Reported by: Harsh Jain @ Chelsio Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/tom/t4_tls.c Modified: head/sys/dev/cxgbe/tom/t4_tls.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tls.c Wed Mar 14 20:46:25 2018 (r330946) +++ head/sys/dev/cxgbe/tom/t4_tls.c Wed Mar 14 20:49:51 2018 (r330947) @@ -1175,7 +1175,8 @@ t4_push_tls_records(struct adapter *sc, struct toepcb * Send a FIN if requested, but only if there's no * more data to send. */ - if (sbavail(sb) == 0 && toep->flags & TPF_SEND_FIN) { + if (sbavail(sb) == tls_ofld->sb_off && + toep->flags & TPF_SEND_FIN) { if (sowwakeup) sowwakeup_locked(so); else From owner-svn-src-all@freebsd.org Wed Mar 14 20:55:29 2018 Return-Path: Delivered-To: svn-src-all@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 4555CF46D1F; Wed, 14 Mar 2018 20:55:29 +0000 (UTC) (envelope-from dteske@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 E71F1766BC; Wed, 14 Mar 2018 20:55:28 +0000 (UTC) (envelope-from dteske@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 DC8C34EBE; Wed, 14 Mar 2018 20:55:28 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2EKtSYQ074486; Wed, 14 Mar 2018 20:55:28 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EKtSAj074484; Wed, 14 Mar 2018 20:55:28 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201803142055.w2EKtSAj074484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 14 Mar 2018 20:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330948 - in head/lib: libdpv libfigpar X-SVN-Group: head X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: in head/lib: libdpv libfigpar X-SVN-Commit-Revision: 330948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 20:55:29 -0000 Author: dteske Date: Wed Mar 14 20:55:28 2018 New Revision: 330948 URL: https://svnweb.freebsd.org/changeset/base/330948 Log: Bump copyright following recent changes Modified: head/lib/libdpv/dpv.3 head/lib/libfigpar/figpar.3 Modified: head/lib/libdpv/dpv.3 ============================================================================== --- head/lib/libdpv/dpv.3 Wed Mar 14 20:49:51 2018 (r330947) +++ head/lib/libdpv/dpv.3 Wed Mar 14 20:55:28 2018 (r330948) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2016 Devin Teske +.\" Copyright (c) 2013-2018 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/lib/libfigpar/figpar.3 ============================================================================== --- head/lib/libfigpar/figpar.3 Wed Mar 14 20:49:51 2018 (r330947) +++ head/lib/libfigpar/figpar.3 Wed Mar 14 20:55:28 2018 (r330948) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2015 Devin Teske +.\" Copyright (c) 2013-2018 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without From owner-svn-src-all@freebsd.org Wed Mar 14 21:11:42 2018 Return-Path: Delivered-To: svn-src-all@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 B86F6F49F80; Wed, 14 Mar 2018 21:11:42 +0000 (UTC) (envelope-from brooks@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 64ACA772B1; Wed, 14 Mar 2018 21:11:42 +0000 (UTC) (envelope-from brooks@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 5F9F650F7; Wed, 14 Mar 2018 21:11:42 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2ELBgdP081184; Wed, 14 Mar 2018 21:11:42 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2ELBfGT081179; Wed, 14 Mar 2018 21:11:41 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803142111.w2ELBfGT081179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 14 Mar 2018 21:11:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330949 - in head/sys: dev/aac dev/aacraid modules/aac modules/aacraid sys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/sys: dev/aac dev/aacraid modules/aac modules/aacraid sys X-SVN-Commit-Revision: 330949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 21:11:43 -0000 Author: brooks Date: Wed Mar 14 21:11:41 2018 New Revision: 330949 URL: https://svnweb.freebsd.org/changeset/base/330949 Log: Fix FSACTL_GET_NEXT_ADAPTER_FIB under 32-bit compat. This includes FSACTL_LNX_GET_NEXT_ADAPTER_FIB. Reviewed by: cem Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14672 Modified: head/sys/dev/aac/aac.c head/sys/dev/aacraid/aacraid.c head/sys/modules/aac/Makefile head/sys/modules/aacraid/Makefile head/sys/sys/aac_ioctl.h Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Wed Mar 14 20:55:28 2018 (r330948) +++ head/sys/dev/aac/aac.c Wed Mar 14 21:11:41 2018 (r330949) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #define AAC_DRIVERNAME "aac" #include "opt_aac.h" +#include "opt_compat.h" /* #include */ #include @@ -45,7 +46,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include @@ -3521,7 +3524,19 @@ aac_getnext_aif(struct aac_softc *sc, caddr_t arg) fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - if ((error = copyin(arg, &agf, sizeof(agf))) == 0) { +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) { + struct get_adapter_fib_ioctl32 agf32; + error = copyin(arg, &agf32, sizeof(agf32)); + if (error == 0) { + agf.AdapterFibContext = agf32.AdapterFibContext; + agf.Wait = agf32.Wait; + agf.AifFib = (caddr_t)(uintptr_t)agf32.AifFib; + } + } else +#endif + error = copyin(arg, &agf, sizeof(agf)); + if (error == 0) { for (ctx = sc->fibctx; ctx; ctx = ctx->next) { if (agf.AdapterFibContext == ctx->unique) break; Modified: head/sys/dev/aacraid/aacraid.c ============================================================================== --- head/sys/dev/aacraid/aacraid.c Wed Mar 14 20:55:28 2018 (r330948) +++ head/sys/dev/aacraid/aacraid.c Wed Mar 14 21:11:41 2018 (r330949) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #define AAC_DRIVERNAME "aacraid" #include "opt_aacraid.h" +#include "opt_compat.h" /* #include */ #include @@ -46,7 +47,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include @@ -3381,7 +3384,19 @@ aac_getnext_aif(struct aac_softc *sc, caddr_t arg) fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); mtx_lock(&sc->aac_io_lock); - if ((error = copyin(arg, &agf, sizeof(agf))) == 0) { +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) { + struct get_adapter_fib_ioctl32 agf32; + error = copyin(arg, &agf32, sizeof(agf32)); + if (error == 0) { + agf.AdapterFibContext = agf32.AdapterFibContext; + agf.Wait = agf32.Wait; + agf.AifFib = (caddr_t)(uintptr_t)agf32.AifFib; + } + } else +#endif + error = copyin(arg, &agf, sizeof(agf)); + if (error == 0) { for (ctx = sc->fibctx; ctx; ctx = ctx->next) { if (agf.AdapterFibContext == ctx->unique) break; Modified: head/sys/modules/aac/Makefile ============================================================================== --- head/sys/modules/aac/Makefile Wed Mar 14 20:55:28 2018 (r330948) +++ head/sys/modules/aac/Makefile Wed Mar 14 21:11:41 2018 (r330949) @@ -8,7 +8,7 @@ SUBDIR= aac_linux KMOD= aac SRCS= aac.c aac_pci.c aac_disk.c aac_cam.c -SRCS+= opt_scsi.h opt_cam.h opt_aac.h +SRCS+= opt_scsi.h opt_cam.h opt_compat.h opt_aac.h SRCS+= device_if.h bus_if.h pci_if.h # To enable debug output from the driver, uncomment these two lines. Modified: head/sys/modules/aacraid/Makefile ============================================================================== --- head/sys/modules/aacraid/Makefile Wed Mar 14 20:55:28 2018 (r330948) +++ head/sys/modules/aacraid/Makefile Wed Mar 14 21:11:41 2018 (r330949) @@ -8,7 +8,7 @@ SUBDIR= aacraid_linux KMOD= aacraid SRCS= aacraid.c aacraid_pci.c aacraid_cam.c -SRCS+= opt_scsi.h opt_cam.h opt_aacraid.h +SRCS+= opt_scsi.h opt_cam.h opt_compat.h opt_aacraid.h SRCS+= device_if.h bus_if.h pci_if.h # To enable debug output from the driver, uncomment these two lines. Modified: head/sys/sys/aac_ioctl.h ============================================================================== --- head/sys/sys/aac_ioctl.h Wed Mar 14 20:55:28 2018 (r330948) +++ head/sys/sys/aac_ioctl.h Wed Mar 14 21:11:41 2018 (r330949) @@ -175,6 +175,14 @@ struct get_adapter_fib_ioctl { caddr_t AifFib; }; +#ifdef _KERNEL +struct get_adapter_fib_ioctl32 { + u_int32_t AdapterFibContext; + int Wait; + u_int32_t AifFib; +}; +#endif + struct aac_query_disk { int32_t ContainerNumber; int32_t Bus; From owner-svn-src-all@freebsd.org Wed Mar 14 21:21:04 2018 Return-Path: Delivered-To: svn-src-all@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 79EE1F4A8E7; Wed, 14 Mar 2018 21:21:04 +0000 (UTC) (envelope-from smh@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 2ED2077898; Wed, 14 Mar 2018 21:21:04 +0000 (UTC) (envelope-from smh@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 29D4F5257; Wed, 14 Mar 2018 21:21:04 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2ELL33H088650; Wed, 14 Mar 2018 21:21:03 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2ELL3XX088649; Wed, 14 Mar 2018 21:21:03 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201803142121.w2ELL3XX088649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Wed, 14 Mar 2018 21:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330950 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: smh X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330950 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 21:21:04 -0000 Author: smh Date: Wed Mar 14 21:21:03 2018 New Revision: 330950 URL: https://svnweb.freebsd.org/changeset/base/330950 Log: Prevent ZFS TRIM breaking VTOC8 partitions Update the ZFS TRIM code to ensure it respects VTOC8 partition headers as documented by the ZFS On-Disk Specification section 1.3 Before this a zpool create on a VTOC8 partitioned device would overwrite the partition metadata. Reported by: marius Reviewed by: marius agv MFC after: 1 week Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Wed Mar 14 21:11:41 2018 (r330949) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Wed Mar 14 21:21:03 2018 (r330950) @@ -802,7 +802,9 @@ vdev_label_init(vdev_t *vd, uint64_t crtxg, vdev_label } /* - * TRIM the whole thing so that we start with a clean slate. + * TRIM the whole thing, excluding the blank space and boot header + * as specified by ZFS On-Disk Specification (section 1.3), so that + * we start with a clean slate. * It's just an optimization, so we don't care if it fails. * Don't TRIM if removing so that we don't interfere with zpool * disaster recovery. @@ -810,7 +812,8 @@ vdev_label_init(vdev_t *vd, uint64_t crtxg, vdev_label if (zfs_trim_enabled && vdev_trim_on_init && !vd->vdev_notrim && (reason == VDEV_LABEL_CREATE || reason == VDEV_LABEL_SPARE || reason == VDEV_LABEL_L2CACHE)) - zio_wait(zio_trim(NULL, spa, vd, 0, vd->vdev_psize)); + zio_wait(zio_trim(NULL, spa, vd, VDEV_SKIP_SIZE, + vd->vdev_psize - VDEV_SKIP_SIZE)); /* * Initialize its label. From owner-svn-src-all@freebsd.org Wed Mar 14 21:22:40 2018 Return-Path: Delivered-To: svn-src-all@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 72C7FF4AB8B for ; Wed, 14 Mar 2018 21:22:40 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E0D2777C28 for ; Wed, 14 Mar 2018 21:22:39 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wm0-x236.google.com with SMTP id h76so6764840wme.4 for ; Wed, 14 Mar 2018 14:22:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=IOJ67JowcSbu0ggXrBXDO807fyXCOGPEsmjm+hgKSIg=; b=I1D08fEG2BZ2nhHb5z2q2257H6yDmeFkLnFL2Sf23Jhho9DAJS1pxmpGijOPcPT9GW GRHYCRDZ/i/NVuYyH1ipTbnKVgmASnuM5mXWaWlCXd6BdA26gZ2AJHrv88KVkaMJw6KP HBduwFy8LiThZF0J3To3dRRKhZZNJC9DdRogTGl7j3xm5bEX7NpWBE3xjJL6/3h9EXcN 11l59q46Cbh6ROK26xuyBLSaTqwCBCi8BH96NU22w77dr+WJ9dQy30GV8+9lP3DqRXCA QO4VhNlHybSAVXYZhNfgPd4d/MVoHJF67RkFbsVhPwId8jRSPpvXga6/dgDddM7bNRnq tBcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=IOJ67JowcSbu0ggXrBXDO807fyXCOGPEsmjm+hgKSIg=; b=pjj4tXXbtx9o8u6AWjAsOk8S0ezBhziTXz3O08Wkz7qDQ2cWI0Rg8YiL7e4hIyy+w5 Qcb55FqOhTI82sD1dIik94LbS2ypyMkrrSKj/EnsKxWX37RmQpAVxi/6T3BZN7wVd4jU xXhiVUiwdyvIht5XUMpqGkHDBT0J/V/Lb/zRGDEUhYSXiLj/a3CyRJAzLWNzv4i8dOfl mZqsap18j691QX5b+AxdSasDm7kvLrcxZ9UBs4nrUW0JbRKQezRsUc62YzOm3UFawmOi uPCK77YCWUb5kV/WrpHybW2qpQOCpcGeM05lMxXJId/qJOyKASnbGVyxuoUNdSE4hoTp 8k3Q== X-Gm-Message-State: AElRT7F5O+cKAFhgfIdLZa1JoUrRTgUD8YvHnYtLppNiaBljU+RHLHVo 4TSWOzZ+wZ4uN0p6Rlg6+PGEtA== X-Google-Smtp-Source: AG47ELuCy6IKRETs38CRj8xZubXt0LujoPZ6uwPty/ZmkzIN7fyvOt6u269AbRa05QDAl3K5IQlMQg== X-Received: by 10.28.158.205 with SMTP id h196mr2632268wme.25.1521062558297; Wed, 14 Mar 2018 14:22:38 -0700 (PDT) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id 93sm3478941wrh.46.2018.03.14.14.22.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Mar 2018 14:22:37 -0700 (PDT) Subject: Re: svn commit: r330950 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803142121.w2ELL3XX088649@repo.freebsd.org> From: Steven Hartland Message-ID: Date: Wed, 14 Mar 2018 21:22:59 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <201803142121.w2ELL3XX088649@repo.freebsd.org> Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 21:22:40 -0000 Missed the differential review: https://reviews.freebsd.org/D14695 On 14/03/2018 21:21, Steven Hartland wrote: > Author: smh > Date: Wed Mar 14 21:21:03 2018 > New Revision: 330950 > URL: https://svnweb.freebsd.org/changeset/base/330950 > > Log: > Prevent ZFS TRIM breaking VTOC8 partitions > > Update the ZFS TRIM code to ensure it respects VTOC8 partition headers as > documented by the ZFS On-Disk Specification section 1.3 > > Before this a zpool create on a VTOC8 partitioned device would overwrite the > partition metadata. > > Reported by: marius > Reviewed by: marius agv > MFC after: 1 week > Sponsored by: Multiplay > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Wed Mar 14 21:11:41 2018 (r330949) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Wed Mar 14 21:21:03 2018 (r330950) > @@ -802,7 +802,9 @@ vdev_label_init(vdev_t *vd, uint64_t crtxg, vdev_label > } > > /* > - * TRIM the whole thing so that we start with a clean slate. > + * TRIM the whole thing, excluding the blank space and boot header > + * as specified by ZFS On-Disk Specification (section 1.3), so that > + * we start with a clean slate. > * It's just an optimization, so we don't care if it fails. > * Don't TRIM if removing so that we don't interfere with zpool > * disaster recovery. > @@ -810,7 +812,8 @@ vdev_label_init(vdev_t *vd, uint64_t crtxg, vdev_label > if (zfs_trim_enabled && vdev_trim_on_init && !vd->vdev_notrim && > (reason == VDEV_LABEL_CREATE || reason == VDEV_LABEL_SPARE || > reason == VDEV_LABEL_L2CACHE)) > - zio_wait(zio_trim(NULL, spa, vd, 0, vd->vdev_psize)); > + zio_wait(zio_trim(NULL, spa, vd, VDEV_SKIP_SIZE, > + vd->vdev_psize - VDEV_SKIP_SIZE)); > > /* > * Initialize its label. > From owner-svn-src-all@freebsd.org Wed Mar 14 21:32:24 2018 Return-Path: Delivered-To: svn-src-all@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 4119DF4B3B6; Wed, 14 Mar 2018 21:32:24 +0000 (UTC) (envelope-from smh@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 EBAA5781C0; Wed, 14 Mar 2018 21:32:23 +0000 (UTC) (envelope-from smh@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 E66B7553B; Wed, 14 Mar 2018 21:32:23 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2ELWNxa094475; Wed, 14 Mar 2018 21:32:23 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2ELWNAS094473; Wed, 14 Mar 2018 21:32:23 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201803142132.w2ELWNAS094473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Wed, 14 Mar 2018 21:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330951 - head/sys/dev/mps X-SVN-Group: head X-SVN-Commit-Author: smh X-SVN-Commit-Paths: head/sys/dev/mps X-SVN-Commit-Revision: 330951 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 21:32:24 -0000 Author: smh Date: Wed Mar 14 21:32:23 2018 New Revision: 330951 URL: https://svnweb.freebsd.org/changeset/base/330951 Log: Fix mps deadlock when handling panic During shutdown mps waits for its SSU requests to complete however when performing a reboot after handling a panic the scheduler is stopped so getmicrotime which is used can be non-functional. Switch to using the same method as shutdown_panic to ensure we actually complete. In addition reduce the timeout when RB_NOSYNC is set in howto as we expect this to fail. Reviewed by: slm MFC after: 1 week Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D12776 Modified: head/sys/dev/mps/mps_sas_lsi.c head/sys/dev/mps/mpsvar.h Modified: head/sys/dev/mps/mps_sas_lsi.c ============================================================================== --- head/sys/dev/mps/mps_sas_lsi.c Wed Mar 14 21:21:03 2018 (r330950) +++ head/sys/dev/mps/mps_sas_lsi.c Wed Mar 14 21:32:23 2018 (r330951) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -126,7 +127,7 @@ int mpssas_get_sas_address_for_sata_disk(struct mps_so u64 *sas_address, u16 handle, u32 device_info, u8 *is_SATA_SSD); static int mpssas_volume_add(struct mps_softc *sc, u16 handle); -static void mpssas_SSU_to_SATA_devices(struct mps_softc *sc); +static void mpssas_SSU_to_SATA_devices(struct mps_softc *sc, int howto); static void mpssas_stop_unit_done(struct cam_periph *periph, union ccb *done_ccb); @@ -1122,7 +1123,7 @@ out: * Return nothing. */ static void -mpssas_SSU_to_SATA_devices(struct mps_softc *sc) +mpssas_SSU_to_SATA_devices(struct mps_softc *sc, int howto) { struct mpssas_softc *sassc = sc->sassc; union ccb *ccb; @@ -1130,7 +1131,7 @@ mpssas_SSU_to_SATA_devices(struct mps_softc *sc) target_id_t targetid; struct mpssas_target *target; char path_str[64]; - struct timeval cur_time, start_time; + int timeout; /* * For each target, issue a StartStopUnit command to stop the device. @@ -1193,17 +1194,23 @@ mpssas_SSU_to_SATA_devices(struct mps_softc *sc) } /* - * Wait until all of the SSU commands have completed or time has - * expired (60 seconds). Pause for 100ms each time through. If any - * command times out, the target will be reset in the SCSI command - * timeout routine. + * Timeout after 60 seconds by default or 10 seconds if howto has + * RB_NOSYNC set which indicates we're likely handling a panic. */ - getmicrotime(&start_time); - while (sc->SSU_refcount) { + timeout = 600; + if (howto & RB_NOSYNC) + timeout = 100; + + /* + * Wait until all of the SSU commands have completed or timeout has + * expired. Pause for 100ms each time through. If any command + * times out, the target will be reset in the SCSI command timeout + * routine. + */ + while (sc->SSU_refcount > 0) { pause("mpswait", hz/10); - getmicrotime(&cur_time); - if ((cur_time.tv_sec - start_time.tv_sec) > 60) { + if (--timeout == 0) { mps_dprint(sc, MPS_FAULT, "Time has expired waiting " "for SSU commands to complete.\n"); break; @@ -1245,7 +1252,7 @@ mpssas_stop_unit_done(struct cam_periph *periph, union * Return nothing. */ void -mpssas_ir_shutdown(struct mps_softc *sc) +mpssas_ir_shutdown(struct mps_softc *sc, int howto) { u16 volume_mapping_flags; u16 ioc_pg8_flags = le16toh(sc->ioc_pg8.Flags); @@ -1350,5 +1357,5 @@ out: } } } - mpssas_SSU_to_SATA_devices(sc); + mpssas_SSU_to_SATA_devices(sc, howto); } Modified: head/sys/dev/mps/mpsvar.h ============================================================================== --- head/sys/dev/mps/mpsvar.h Wed Mar 14 21:21:03 2018 (r330950) +++ head/sys/dev/mps/mpsvar.h Wed Mar 14 21:32:23 2018 (r330951) @@ -772,7 +772,7 @@ int mps_config_get_volume_wwid(struct mps_softc *sc, u int mps_config_get_raid_pd_pg0(struct mps_softc *sc, Mpi2ConfigReply_t *mpi_reply, Mpi2RaidPhysDiskPage0_t *config_page, u32 page_address); -void mpssas_ir_shutdown(struct mps_softc *sc); +void mpssas_ir_shutdown(struct mps_softc *sc, int howto); int mps_reinit(struct mps_softc *sc); void mpssas_handle_reinit(struct mps_softc *sc); From owner-svn-src-all@freebsd.org Wed Mar 14 22:11:45 2018 Return-Path: Delivered-To: svn-src-all@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 E059EF4D7C8; Wed, 14 Mar 2018 22:11:45 +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 96C8179896; Wed, 14 Mar 2018 22:11:45 +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 91CDD5B2B; Wed, 14 Mar 2018 22:11:45 +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 w2EMBjJo010881; Wed, 14 Mar 2018 22:11:45 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EMBjVd010880; Wed, 14 Mar 2018 22:11:45 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803142211.w2EMBjVd010880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 14 Mar 2018 22:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330952 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 330952 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 22:11:46 -0000 Author: cem Date: Wed Mar 14 22:11:45 2018 New Revision: 330952 URL: https://svnweb.freebsd.org/changeset/base/330952 Log: vfs_bio.c: Apply cleanups motivated by Coverity analysis It is believed that the conditions Coverity indicated were actually impossible to hit. So this patch just adds a cleanup to only compute v_mount once in brelse(), and in vfs_bio_getpages() always initializes error to zero to appease the static analyzer. No functional change intended. Submitted by: Darrick Lew Reviewed by: kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D14613 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Wed Mar 14 21:32:23 2018 (r330951) +++ head/sys/kern/vfs_bio.c Wed Mar 14 22:11:45 2018 (r330952) @@ -2450,6 +2450,7 @@ buf_dirty_count_severe(void) void brelse(struct buf *bp) { + struct mount *v_mnt; int qindex; /* @@ -2560,11 +2561,13 @@ brelse(struct buf *bp) * around to prevent it from being reconstituted and starting a second * background write. */ + + v_mnt = bp->b_vp != NULL ? bp->b_vp->v_mount : NULL; + if ((bp->b_flags & B_VMIO) && (bp->b_flags & B_NOCACHE || (bp->b_ioflags & BIO_ERROR && bp->b_iocmd == BIO_READ)) && - !(bp->b_vp->v_mount != NULL && - (bp->b_vp->v_mount->mnt_vfc->vfc_flags & VFCF_NETWORK) != 0 && - !vn_isdisk(bp->b_vp, NULL) && (bp->b_flags & B_DELWRI))) { + (v_mnt == NULL || (v_mnt->mnt_vfc->vfc_flags & VFCF_NETWORK) == 0 || + vn_isdisk(bp->b_vp, NULL) || (bp->b_flags & B_DELWRI) == 0)) { vfs_vmio_invalidate(bp); allocbuf(bp, 0); } @@ -4977,6 +4980,7 @@ vfs_bio_getpages(struct vnode *vp, vm_page_t *ma, int object = vp->v_object; mp = vp->v_mount; + error = 0; la = IDX_TO_OFF(ma[count - 1]->pindex); if (la >= object->un_pager.vnp.vnp_size) return (VM_PAGER_BAD); From owner-svn-src-all@freebsd.org Wed Mar 14 22:20:48 2018 Return-Path: Delivered-To: svn-src-all@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 0EBBCF4DFCB; Wed, 14 Mar 2018 22:20:48 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp001.me.com (mr11p00im-asmtp001.me.com [17.110.69.252]) (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 A5F2079D37; Wed, 14 Mar 2018 22:20:47 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp001.me.com by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0P5L00600P6EET00@mr11p00im-asmtp001.me.com>; Wed, 14 Mar 2018 22:20:33 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=04042017; t=1521066033; bh=dH39DvZpAsXDT2rENC7KQgbwvgwgJlnZKn/NXClJB7U=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=iSs0A+zChB0pM++LDdXXYGArzeagjblwZFX6COLGbjdBiEujAiuRtR1H88758bJvu 8ltTw03AdE+FsjmYDGdo2H7I/kjEZf0C/eKYqsjceLWsz3/skGH11MawJG2Z3lT58e vbDTAMUTZXNNNpsYx51+Wu/Wys2pTONshYn9cHC6iN5RBo6ABiguKBBkG3e2lguj5w viZ+Su3vKVtrh2KY+nkswHfK5/DvEbdXeGTFJH+0XhO4R5BmA0lNeR9/WshxMV4IsV 2bP8OMjb+VtR0iArTlz+hFDv6OOIvoIqD0O7lWSo/n8Ic16Jl7m6xuv7jf0E1dxPbw oDVNg11VD094A== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0P5L00N5QQ27QW10@mr11p00im-asmtp001.me.com>; Wed, 14 Mar 2018 22:20:33 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-14_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1803140239 User-Agent: Microsoft-MacOutlook/10.b.0.180311 Date: Wed, 14 Mar 2018 15:20:31 -0700 Subject: Re: svn commit: r330952 - head/sys/kern From: Ravi Pokala To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <7219A600-5C72-43D6-9E8B-7BBC1D097AF2@mac.com> Thread-topic: svn commit: r330952 - head/sys/kern References: <201803142211.w2EMBjVd010880@repo.freebsd.org> In-reply-to: <201803142211.w2EMBjVd010880@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 22:20:48 -0000 -----Original Message----- From: on behalf of Conrad Meyer Date: 2018-03-14, Wednesday at 15:11 To: , , Subject: svn commit: r330952 - head/sys/kern > Author: cem > Date: Wed Mar 14 22:11:45 2018 > New Revision: 330952 > URL: https://svnweb.freebsd.org/changeset/base/330952 > > Log: > vfs_bio.c: Apply cleanups motivated by Coverity analysis What's the Coverity ID? Thanks, Ravi (rpokala@) From owner-svn-src-all@freebsd.org Wed Mar 14 22:50:30 2018 Return-Path: Delivered-To: svn-src-all@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 D762AF4F86D for ; Wed, 14 Mar 2018 22:50:29 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 654457AED2 for ; Wed, 14 Mar 2018 22:50:29 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wm0-x233.google.com with SMTP id t3so7008739wmc.2 for ; Wed, 14 Mar 2018 15:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=FJ0KObVfYEJuc6+g7DzWChT5CV4sxhgpEmS2qITuFZ8=; b=m8kr9lBTgh/bcWX2aVIoTdizqo9EDVNhrLIf0GyPuHLwCnAv1FAJXFxDzpiXzk2xzg KZqL0N4RUjiTYnMtTrDMDEcJWjnD1IMbq2A37K5ESrJxp1AwXbYk662HlQ3TBtC7GIV6 JznYjazuRNIp/jf+m/iR35QOnJYGIm54U+8+M45BmWXcTod6Ge1lmIZmoMGSNiBGLZ2M 7VA61u+EV+2Ig/vDuotSSXc2glhj7SFO7i9SKL4h75KdM7h2TVgyb3tIiaMs+vxmd26V nvLbAHd7Hibwil0cwi34EW0KUYOwkxWXLKt27/vhyYN1hdKVSRN+a8NnHA2dEpgV/oyI FTLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=FJ0KObVfYEJuc6+g7DzWChT5CV4sxhgpEmS2qITuFZ8=; b=lbOcrpkqc/U/QBQXw2VpRifIteHRI8L9eK2ay3cgBnCAW7j8xY1zMrUEYGZaaosLT0 ZXHSifNNm9Wv7OpZVqS5U+bvTxev2H/LNM9l+RuXV6V15omnb3O0acFErTlN3jqi9MV+ pTZsVoVXGJV9oFo/j17AVE6RSriEMvnZJUW3+itA7X66RirTVpGOEU5mjbJyxLBuuvjt PWYcNzinqfKzZkiNZ2D2wplaICCAAF3eCO4dKbw+9UjB6SCb7//X7n/DTZohVruRhKkz ID33KL6623fRDdj6qRLcjvw+5c+E2e0ntJzg1TtsxkbNFs5wawuvlEQCFrG+k0abe5hu pjHA== X-Gm-Message-State: AElRT7GFexEsBCUbNVLo+/LY/UwWi4rVgFxDtHLRNgNJdwYfdkqDSgR0 FitMDBT+ubTyKU1FhKDKWq0SUg== X-Google-Smtp-Source: AG47ELu+bty+4sg7dgU/SNvtcsTUNvLikp1UMCWjRusIKZ7v48e8u+x6EKFiJdNVsJ5HC7lxOF0fmQ== X-Received: by 10.28.108.7 with SMTP id h7mr2825729wmc.35.1521067823304; Wed, 14 Mar 2018 15:50:23 -0700 (PDT) Received: from mutt-hbsd ([5.254.112.154]) by smtp.gmail.com with ESMTPSA id m9sm4205930wrg.79.2018.03.14.15.50.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Mar 2018 15:50:22 -0700 (PDT) Date: Wed, 14 Mar 2018 18:50:09 -0400 From: Shawn Webb To: Alan Somers Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r329984 - in head: cddl/contrib/opensolaris/lib/libzpool/common sys/cddl/compat/opensolaris/sys Message-ID: <20180314225009.gu3awgryggsxqmff@mutt-hbsd> References: <201802251429.w1PEThjY035303@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6hriqc5dgbphwzer" Content-Disposition: inline In-Reply-To: <201802251429.w1PEThjY035303@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20171215 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 22:50:30 -0000 --6hriqc5dgbphwzer Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 25, 2018 at 02:29:43PM +0000, Alan Somers wrote: > Author: asomers > Date: Sun Feb 25 14:29:43 2018 > New Revision: 329984 > URL: https://svnweb.freebsd.org/changeset/base/329984 >=20 > Log: > Don't declare __assfail as static > =20 > It gets called by dmu_buf_init_user, which is inline but not static. S= o it > needs global linkage itself. > =20 > Reported by: GCC-6 > MFC after: 17 days > X-MFC-With: 329722 >=20 Hey Alan, This commit breaks compiling world with ASAN. Some applications, like zfs, will fail with this error: /lib/libuutil.so.2: Undefined symbol "__assfail" Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --6hriqc5dgbphwzer Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlqppx0ACgkQaoRlj1JF bu4UmQ//UXvruRxifAAXzUyTuhNu++/qKJv1GqV7joVYk71vYfNuSz/kWtXH6G1M f9KZA8+4eK2RlvaJi/UOEWgN1MjJK2HQMu1DxtqjeuTx4i2qTD1eRHGRRO6beEdk mIh6sru587E8yFCHGefYvRq097Fc9gtyIInkU3MbdiF8avfiqbRSy+KCxUcUeo6P bH3A57XONjN8Af+B3U+L+CR1pPiwh5oWKAcFNcOKDBp7v8YdsLZQNwUccfgUNVzk DlkW3bnGU62z/qfsI4yDtNp8tgpqy22AX3Ii1WMcy0lnMM/MrXRM1yrw9MDX93ew UTlzf3Z37TlIPHdMuj+FdmNQUk6RWZl6rNiwuOaZIR47pV/FgzboEXKdWui0av4d CFtfQtYkp+Lu9vAOwV7ahy8mDNVGfVp8MZsyPH5mFzw/SkQGvnMZA8n/ciNu+8ys 12HSBHlaBh9sCvJ0fHIbdfITmYkDgwqip00yyHaET4itWz5xcpuiQvKDWNMHisKZ NvRRuzzooqO50vN9/V1fQ7Zc8Jsa9mZTqJ4w2K8wg7m4PckJhVhVR7y27m9WWBol ZX1wmwXBHnYpS7WwRAHp+fx9ELGKrxMVn9rM7v+KwIuv2sr0DI7p85QfK7503HN5 oUwkJ9dI3CZJ2UK/fAmZvia4rbMWutpFwyM5Q17Mr7WQTkjvFeQ= =8pIF -----END PGP SIGNATURE----- --6hriqc5dgbphwzer-- From owner-svn-src-all@freebsd.org Wed Mar 14 22:51:35 2018 Return-Path: Delivered-To: svn-src-all@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 6555BF4F991; Wed, 14 Mar 2018 22:51:35 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x229.google.com (mail-lf0-x229.google.com [IPv6:2a00:1450:4010:c07::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF2DA7B2A5; Wed, 14 Mar 2018 22:51:34 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x229.google.com with SMTP id e5-v6so3225992lfb.7; Wed, 14 Mar 2018 15:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ivQ+5w6gqTTydb1tqWIWXFraOTP1/upmkImTTfJeDec=; b=uW15boNDWjtrJL9ymmyRINKGBpwqGdQw/V0FJ9lGJvZ3mwGPfFvfQgWr/BJT/KJRcA 5xiNRQSYoPKd9OoCj208jRpEanZc80It7ojaE/b+lucBZCaYKtf2oqGiNj4qpUDk2ZS2 ZcnzPt3Rv5jujXqv8DQsIpDYQEgmt2PjErnDnm+C10S6kZMJNVdS92nCH6IA0Pn7tJIC 01WYdWJx10Q4knsaU82ps/pS79yQZF5dNU2AwnPieCKBb72X9Z1oWamqYnLsr3qRxEGf aJhLHLDwlGMcRM62Cu2Tw5FLuEz8ickycz3t+Y6UuVFfHGqmIG93tH9/+sDjHEgVvKfd J4FQ== 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=ivQ+5w6gqTTydb1tqWIWXFraOTP1/upmkImTTfJeDec=; b=IZvGTnN8FOCC6CHNFYnuQ6RfTwf0c5KeaphBUF8hnR0+pC8xlK72fYnsUXb0VMkY4+ AMfIxA9HbxSQpicHNfLsvunX1/VfOY7LDpNSo2WugtNkuMbAfmfSpptZ6VwkYfldAFId E5x54SFmhCH5ATL6TbIJ+5wq3tsqipTbg3aOpyXeAo9B5/UzPiVX8Yt/Rw6WydtohLM3 ZTMsTm94U9LUua5jRoev6olD7kOz+dXh2D+AUCHaghBvyIWtvmkrdG4r+TpoQTyWEJ5b BADw6Lz8gW1JCjzNVTa6SCGodqkViztF5cDHnI3IoizXZeXGry4hyZCDr+Q3mWzGXOML t3gg== X-Gm-Message-State: AElRT7G2WM9wOqTbRs7/SoS6cZsajSJUIrT8S+g04hEWtZOXIYVmH6N+ V26K7l7k6i9IGoSkZRSRbvOczTxeWaijBpChsHM= X-Google-Smtp-Source: AG47ELvbQ31C/QxnTUcrXLcOsOiqeRpEPIDYlkNq7dj9CLsbUclbcGfDTTEh8yZ+sTsuiXaHGKPpSh7PfZDAFp4zKw8= X-Received: by 2002:a19:6d03:: with SMTP id i3-v6mr2115996lfc.34.1521067888317; Wed, 14 Mar 2018 15:51:28 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.2.195 with HTTP; Wed, 14 Mar 2018 15:51:27 -0700 (PDT) In-Reply-To: <20180314225009.gu3awgryggsxqmff@mutt-hbsd> References: <201802251429.w1PEThjY035303@repo.freebsd.org> <20180314225009.gu3awgryggsxqmff@mutt-hbsd> From: Alan Somers Date: Wed, 14 Mar 2018 16:51:27 -0600 X-Google-Sender-Auth: wzY93_gut6vTAIVG8GkPbp6e9tY Message-ID: Subject: Re: svn commit: r329984 - in head: cddl/contrib/opensolaris/lib/libzpool/common sys/cddl/compat/opensolaris/sys To: Shawn Webb 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.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 22:51:35 -0000 On Wed, Mar 14, 2018 at 4:50 PM, Shawn Webb wrote: > On Sun, Feb 25, 2018 at 02:29:43PM +0000, Alan Somers wrote: > > Author: asomers > > Date: Sun Feb 25 14:29:43 2018 > > New Revision: 329984 > > URL: https://svnweb.freebsd.org/changeset/base/329984 > > > > Log: > > Don't declare __assfail as static > > > > It gets called by dmu_buf_init_user, which is inline but not static. > So it > > needs global linkage itself. > > > > Reported by: GCC-6 > > MFC after: 17 days > > X-MFC-With: 329722 > > > > Hey Alan, > > This commit breaks compiling world with ASAN. > > Some applications, like zfs, will fail with this error: > > /lib/libuutil.so.2: Undefined symbol "__assfail" > > Thanks, > How does one build world with ASAN ? From owner-svn-src-all@freebsd.org Wed Mar 14 22:52:28 2018 Return-Path: Delivered-To: svn-src-all@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 899E6F4FBD6; Wed, 14 Mar 2018 22:52:28 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com [209.85.223.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACEF57B4A0; Wed, 14 Mar 2018 22:52:27 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f174.google.com with SMTP id d11so15981iop.6; Wed, 14 Mar 2018 15:52:27 -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=EJKhYOfqoQupUx11I9Sze+AEcGgMQFHna0T+R8n11QM=; b=QLZ5sftrgpQ0pKfJXkZwBw+vBU0p7SoU34DH1unNp5d9EIPvmcNS3fYASr5A5aTbQd Z5X/jMObphMSuIZIVLCdqSoQ0M0m2rcW6636E3ib0Xo5etEuRTve+Xi9SVfflGGdUEFL UOYb+KvIM7yV2p2NlFa7kE6f+ksbbpbHpwo+DXF/VgktK5DU0jpTA5Bcjw8nLTxpJ3zb xIXXMXChdPbZwgTO4Z04Nra4xib7DrenmptQNWljHGashXBlL8n4pN2++YEZWpwBfNgT rtJdPm9lx+H2Zc18McYIcoWDSowsyb6G4hUo0wJEYc3ffnwIiVWHNgJA/aqUP+F8Md57 Bl4g== X-Gm-Message-State: AElRT7FHp9MMwP1TBZNsm7c+VZJg7IoRYaLTGUkhQV1ZsSjRb49TnhB2 f58zlX2Bd5jZBIb0lzLc1fvloeZl X-Google-Smtp-Source: AG47ELuwIEB9VkuCzDottK4pcC+iIk3gof3xUTg+YC5O9Rl+ocqzGiKfDbhzvOYJJ6lv3wDlyP4Hsw== X-Received: by 10.107.24.4 with SMTP id 4mr6726092ioy.149.1521067588350; Wed, 14 Mar 2018 15:46:28 -0700 (PDT) Received: from mail-it0-f46.google.com (mail-it0-f46.google.com. [209.85.214.46]) by smtp.gmail.com with ESMTPSA id k198-v6sm1796342itk.5.2018.03.14.15.46.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Mar 2018 15:46:28 -0700 (PDT) Received: by mail-it0-f46.google.com with SMTP id e98-v6so1486999itd.4; Wed, 14 Mar 2018 15:46:28 -0700 (PDT) X-Received: by 10.36.161.2 with SMTP id y2mr3985720ite.53.1521067587927; Wed, 14 Mar 2018 15:46:27 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.153.132 with HTTP; Wed, 14 Mar 2018 15:46:27 -0700 (PDT) In-Reply-To: <7219A600-5C72-43D6-9E8B-7BBC1D097AF2@mac.com> References: <201803142211.w2EMBjVd010880@repo.freebsd.org> <7219A600-5C72-43D6-9E8B-7BBC1D097AF2@mac.com> From: Conrad Meyer Date: Wed, 14 Mar 2018 15:46:27 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r330952 - head/sys/kern To: Ravi Pokala Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 22:52:28 -0000 I believe they didn't come from the public FreeBSD Coverity instance, and I don't think ID numbers are portable between instances. You might be able to look up similar issues in the public instance, though. Best, Conrad On Wed, Mar 14, 2018 at 3:20 PM, Ravi Pokala wrote: > -----Original Message----- > From: on behalf of Conrad Meyer > Date: 2018-03-14, Wednesday at 15:11 > To: , , > Subject: svn commit: r330952 - head/sys/kern > >> Author: cem >> Date: Wed Mar 14 22:11:45 2018 >> New Revision: 330952 >> URL: https://svnweb.freebsd.org/changeset/base/330952 >> >> Log: >> vfs_bio.c: Apply cleanups motivated by Coverity analysis > > What's the Coverity ID? > > Thanks, > > Ravi (rpokala@) > > > From owner-svn-src-all@freebsd.org Wed Mar 14 22:56:07 2018 Return-Path: Delivered-To: svn-src-all@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 620B5F4FF3A; Wed, 14 Mar 2018 22:56:07 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x242.google.com (mail-lf0-x242.google.com [IPv6:2a00:1450:4010:c07::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C6F557B766; Wed, 14 Mar 2018 22:56:06 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x242.google.com with SMTP id t132-v6so7285306lfe.2; Wed, 14 Mar 2018 15:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=lCf5xpMuYQMAtv8ltbgifZpOFCWFVt/VbCAqtC0L+5o=; b=tSIj3ZUiMOA2zHrZsne3PfX3kvumoDjR4K9QERDk+TyTpvO7UGHUyCqsGsL80mME8t 7eIaqLYKyxxUOA5MnsxBmZAjpwXMMJLY0f+jwwvzZV15it3MXst28yVRyULBedPWJ8z3 pCN+gbkHWFS2etx57ZR79xEJvObU1z7ser0VNbzT5xiyEJFKTjMsrF6gYzu3fTF9U5Fd 8Nf8tnqQe1sokzNklmjSJhMBTMXrpBaTfvlfZHYoW0cHeB8f3ZuO6DlNlQkB4WcUVO1J Vxk0htTFM3BLgkPwNi9iXcKsXnp4xkmlrnxUBkMf7ir5OTrAKqVAiGVHLMuPw9Y0eR11 Ku8Q== 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=lCf5xpMuYQMAtv8ltbgifZpOFCWFVt/VbCAqtC0L+5o=; b=I5/Imzou69rN4KMGsVxjejUn/XW/Wuvqu/FA51kyc1Kp0gsItKk0dqRJo5KA0Rln2k LB0AY91ICZdtX89YnA46lJ0Zl/G8UNdnJIkhYgnb7Vos3XyZm0AaRurq0q2E8GGKh9A0 0h3CnpwaJq7/y05OOlufoWNBnN7z54C9NBxbyTtV3NGt+PWXkNfguhBNVPY/X0GF0wbH CM3s3nE36Dfnyd4NxTLMwi1TYccInoI7U4tiSP9TgdQB5qakBIXA8sGFCuuXlI+rReNe /LPsHfJVJdVXgnEIFEksRg+iwF6IuB8qj40bEDGfK0OnYdC3WVtXF+R9+PPx1vVUJ8Or 1Q0A== X-Gm-Message-State: AElRT7GxitswHmtUQfprRe0p8MFyCcMbpuLfTllIKR3/1N2HHzRsL0gv YSL4L4oj1Tfl8zHm9hNRqn2LW1CtWq0jl55Vito= X-Google-Smtp-Source: AG47ELuZhc99YE1dJLPKePSZEax40p+LlUfCBK5ERG9VOc5t82LTb90RTlqqxrsxGDuPyhpG/FUG3W5SBjmQOyPYt3k= X-Received: by 10.46.154.213 with SMTP id p21mr1314641ljj.59.1521068165170; Wed, 14 Mar 2018 15:56:05 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.2.195 with HTTP; Wed, 14 Mar 2018 15:56:04 -0700 (PDT) In-Reply-To: References: <201803142211.w2EMBjVd010880@repo.freebsd.org> <7219A600-5C72-43D6-9E8B-7BBC1D097AF2@mac.com> From: Alan Somers Date: Wed, 14 Mar 2018 16:56:04 -0600 X-Google-Sender-Auth: i65UtCOv1lekUN9jjwcQboCg3cY Message-ID: Subject: Re: svn commit: r330952 - head/sys/kern To: "Conrad E. Meyer" Cc: Ravi Pokala , 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.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 22:56:07 -0000 Well, you _would_ be able to, except the public instance has been down for 3 weeks :( https://scan.coverity.com/ On Wed, Mar 14, 2018 at 4:46 PM, Conrad Meyer wrote: > I believe they didn't come from the public FreeBSD Coverity instance, > and I don't think ID numbers are portable between instances. You > might be able to look up similar issues in the public instance, > though. > > Best, > Conrad > > On Wed, Mar 14, 2018 at 3:20 PM, Ravi Pokala wrote: > > -----Original Message----- > > From: on behalf of Conrad Meyer > > > Date: 2018-03-14, Wednesday at 15:11 > > To: , , < > svn-src-head@freebsd.org> > > Subject: svn commit: r330952 - head/sys/kern > > > >> Author: cem > >> Date: Wed Mar 14 22:11:45 2018 > >> New Revision: 330952 > >> URL: https://svnweb.freebsd.org/changeset/base/330952 > >> > >> Log: > >> vfs_bio.c: Apply cleanups motivated by Coverity analysis > > > > What's the Coverity ID? > > > > Thanks, > > > > Ravi (rpokala@) > > > > > > > > From owner-svn-src-all@freebsd.org Wed Mar 14 22:56:38 2018 Return-Path: Delivered-To: svn-src-all@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 515F6F4FF9D for ; Wed, 14 Mar 2018 22:56:38 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B3B317B8A3 for ; Wed, 14 Mar 2018 22:56:37 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wm0-x22a.google.com with SMTP id x7so7045473wmc.0 for ; Wed, 14 Mar 2018 15:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+G2LKilQWpU4xzD85C+CWtGPeZGoTIcECSNak5eGcVU=; b=EgWhiCBhjDc++HvrOH1+2D1XjQhHU5bBKEP8ZWJyUyk6tbBR9DK58a+cGnXxR+1anS KjjQ5b2jTFdHwx9CRU+s5EiOHPLOwhVwKfRvgWS8XIyHvbZKh7rLGOmqCEGEfox/W1Xw xpQWRZRd9s3G0tBl9M8Rj0J0PdDWA+qugajwPXH/cW2rmuqUrWaGvgBbCZ/29WYHx4WU 2atIIfnMExhRnhJ+0YUZsIlEy6Kfwh7i6RR331csHFDCdqWC3Ranou2sTGsCHu45MMCl /UOAq51UxmSOX0KuAun1RQTl4PqoskhxuVMXIdaocNsv5uYw4eKyMjgBHUnH7yT6XmoT /R1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+G2LKilQWpU4xzD85C+CWtGPeZGoTIcECSNak5eGcVU=; b=M5ST3rdnloJnEopuklmGmHKrcrXraRAUgeV+eLBiJuCqKhCT3lEy+6y42aVOmvlWbU lAwW875RJlGL1lIsXX1fWFZTtoCWxgdUqJhJYEUgT7aSmu2p+xsLYYLBzQXCDhq3Sp5i U6xox3TV9O8DgNFwTjtauSyjl9EUNPPU2sqKafkaHCNyjQddhhCCIKek7q6TUidF8AUF XLtzwlNAdHLOY5GhU6fZJuAJcbEs2xiuVMf5+DXaq5Rr89PvqxS1ZXixJ3AqwjYrbmsO 93eDRL12dzH/+mGaUGCgu87Z2gIDflyqzL+aQ8eO6RQyCZ5ZgNu0Fq+LQxxqlKci8OPg retA== X-Gm-Message-State: AElRT7H4xXQifR5+INNWRtZWDy5a/zYMBd/wCrIYu6QHSLcjMPQqEvnk EOYbUOni+dQWy7XMFdkXJEvc/A== X-Google-Smtp-Source: AG47ELv4jDzf6G/Q8XIZqAy1sDnAvEyWZ0+F/m7i8tiEuu3uG8lpCIqLJwjgmI3/vbB4y01PBDATrw== X-Received: by 10.28.137.147 with SMTP id l141mr2787388wmd.141.1521068196537; Wed, 14 Mar 2018 15:56:36 -0700 (PDT) Received: from mutt-hbsd ([5.254.112.154]) by smtp.gmail.com with ESMTPSA id z39sm5490694wrz.19.2018.03.14.15.56.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Mar 2018 15:56:35 -0700 (PDT) Date: Wed, 14 Mar 2018 18:56:23 -0400 From: Shawn Webb To: Alan Somers Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r329984 - in head: cddl/contrib/opensolaris/lib/libzpool/common sys/cddl/compat/opensolaris/sys Message-ID: <20180314225623.zp6ufw5h7bua4etf@mutt-hbsd> References: <201802251429.w1PEThjY035303@repo.freebsd.org> <20180314225009.gu3awgryggsxqmff@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ye3dpcyzgfytrpzo" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20171215 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 22:56:38 -0000 --ye3dpcyzgfytrpzo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 14, 2018 at 04:51:27PM -0600, Alan Somers wrote: > On Wed, Mar 14, 2018 at 4:50 PM, Shawn Webb > wrote: >=20 > > On Sun, Feb 25, 2018 at 02:29:43PM +0000, Alan Somers wrote: > > > Author: asomers > > > Date: Sun Feb 25 14:29:43 2018 > > > New Revision: 329984 > > > URL: https://svnweb.freebsd.org/changeset/base/329984 > > > > > > Log: > > > Don't declare __assfail as static > > > > > > It gets called by dmu_buf_init_user, which is inline but not static. > > So it > > > needs global linkage itself. > > > > > > Reported by: GCC-6 > > > MFC after: 17 days > > > X-MFC-With: 329722 > > > > > > > Hey Alan, > > > > This commit breaks compiling world with ASAN. > > > > Some applications, like zfs, will fail with this error: > > > > /lib/libuutil.so.2: Undefined symbol "__assfail" > > > > Thanks, > > >=20 > How does one build world with ASAN ? HardenedBSD has a feature branch in its playground repo for ASAN-ified world. We introduced two new MK_* toggles: MK_ASAN and MK_ASAN_RECOVER. MK_ASAN is self-explanitory. MK_ASAN_RECOVER tells the sanitizer framework to let the application continue running instead of abort execution. Here's where the magic gets set: https://github.com/HardenedBSD/hardenedBSD-playground/blob/hardened/current= /asan/share/mk/bsd.prog.mk#L125-L134 Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --ye3dpcyzgfytrpzo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlqpqJcACgkQaoRlj1JF bu64kw//ZnaTKF5HLdKL0M8/lDw/6dPnkHE9y8hBIyl24jWJUeXrv/7qCbBlRvuf I3x3o1LO8EVvyPWJYtnAXOvnn1odFSZ6RpnOvM6QZHEvW3aOwhXC6xjRMVCxTdoa R30NbCyly76ZOghcXGZoZdCY/0c6cUdVxgiXqPDca+dVQRZhLMs0nqHKazewiiUE +u+f8w3R0SZcAWYcctYfrMSIHyi/7z4Nhe5uz99Kc8MsVrdTw47FARsApod35E0F H7srtVsLclK34vlgCWW5wjTXaedto6CMoYAB+PiINQ67c3KDdkOOkJhNVw5koVir nr4uwmqEHkCDmLOr0A/w1BpekLib7PGlKYiK+T6PqfFbRqXfrulJeLjC6ci/MYOi V6YG8yhVrd/pisLvMVemquDexP/FJG3/1B8H/H14wrGDDqSg1i4F+cPwqXtfy0NI u3Xg26nv/qK/ydXcHOnFadAPytFxVl+5k+ijP+kWwyfjAk2G4q/R88Uz6zWAmbI+ xjmXBuMG4aNvjaTnb5gfLphRof9EcyrAGF9CAyYQBJr/asqVZIDhI/LCmonnlJvl j0rJ1RzJPioRFPCCpZ7ePlRhBCO7cPIiwQrzUE6rTEpMPu9r8hybvoK35eALab1r PJaPtrJjysTM11GKkX6HjvaKE5RToiX6Rzu7BWUf1wMweBuk9Fg= =SzXb -----END PGP SIGNATURE----- --ye3dpcyzgfytrpzo-- From owner-svn-src-all@freebsd.org Wed Mar 14 23:01:05 2018 Return-Path: Delivered-To: svn-src-all@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 4F037F502ED; Wed, 14 Mar 2018 23:01:05 +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 002AF7BBF7; Wed, 14 Mar 2018 23:01:05 +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 EF148618B; Wed, 14 Mar 2018 23:01:04 +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 w2EN14Ff037528; Wed, 14 Mar 2018 23:01:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EN14nu037527; Wed, 14 Mar 2018 23:01:04 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803142301.w2EN14nu037527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Mar 2018 23:01:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330953 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 330953 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 23:01:05 -0000 Author: imp Date: Wed Mar 14 23:01:04 2018 New Revision: 330953 URL: https://svnweb.freebsd.org/changeset/base/330953 Log: Don't make the namespace devices eternal. We'll need to delete namespaces soon, so go ahead and stop making these devices eternal. It doesn't help much, and will be getting in the way soon. Sponsored by: Netflix Modified: head/sys/dev/nvme/nvme_ns.c Modified: head/sys/dev/nvme/nvme_ns.c ============================================================================== --- head/sys/dev/nvme/nvme_ns.c Wed Mar 14 22:11:45 2018 (r330952) +++ head/sys/dev/nvme/nvme_ns.c Wed Mar 14 23:01:04 2018 (r330953) @@ -577,21 +577,9 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t */ unit = device_get_unit(ctrlr->dev) * NVME_MAX_NAMESPACES + ns->id - 1; -/* - * MAKEDEV_ETERNAL was added in r210923, for cdevs that will never - * be destroyed. This avoids refcounting on the cdev object. - * That should be OK case here, as long as we're not supporting PCIe - * surprise removal nor namespace deletion. - */ -#ifdef MAKEDEV_ETERNAL_KLD - ns->cdev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &nvme_ns_cdevsw, unit, - NULL, UID_ROOT, GID_WHEEL, 0600, "nvme%dns%d", - device_get_unit(ctrlr->dev), ns->id); -#else ns->cdev = make_dev_credf(0, &nvme_ns_cdevsw, unit, NULL, UID_ROOT, GID_WHEEL, 0600, "nvme%dns%d", device_get_unit(ctrlr->dev), ns->id); -#endif #ifdef NVME_UNMAPPED_BIO_SUPPORT ns->cdev->si_flags |= SI_UNMAPPED; #endif From owner-svn-src-all@freebsd.org Wed Mar 14 23:01:19 2018 Return-Path: Delivered-To: svn-src-all@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 10208F5044D; Wed, 14 Mar 2018 23:01:19 +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 9AFAB7BD1B; Wed, 14 Mar 2018 23:01:18 +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 95DC2619C; Wed, 14 Mar 2018 23:01:18 +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 w2EN1Ixm037585; Wed, 14 Mar 2018 23:01:18 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2EN1I7B037584; Wed, 14 Mar 2018 23:01:18 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803142301.w2EN1I7B037584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Mar 2018 23:01:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330954 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 330954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 23:01:19 -0000 Author: imp Date: Wed Mar 14 23:01:18 2018 New Revision: 330954 URL: https://svnweb.freebsd.org/changeset/base/330954 Log: When tearing down a queue pair, also delete the queue entries. The NVME standard has required in section 7.2.6, since at least 1.1, that a clean shutdown is signalled by deleting the subission and the completion queues before setting the shutdown bit in CC. The 1.0 standard, apparently, did not and many of the early Intel cards didn't care. Some newer cards care, at least one whose beta firmware can scramble the card on an unclean shutdown. Linux has done this for some time. To make it possible to move forward with an evaluation of this pre-release card with wonky firmware, delete the queues on the card when we delete the qpair structures. Sponsored by: Netflix Modified: head/sys/dev/nvme/nvme_ctrlr.c Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Wed Mar 14 23:01:04 2018 (r330953) +++ head/sys/dev/nvme/nvme_ctrlr.c Wed Mar 14 23:01:18 2018 (r330954) @@ -514,6 +514,34 @@ nvme_ctrlr_create_qpairs(struct nvme_controller *ctrlr } static int +nvme_ctrlr_destroy_qpair(struct nvme_controller *ctrlr, struct nvme_qpair *qpair) +{ + struct nvme_completion_poll_status status; + + status.done = 0; + nvme_ctrlr_cmd_delete_io_sq(qpair->ctrlr, qpair, + nvme_completion_poll_cb, &status); + while (!atomic_load_acq_int(&status.done)) + pause("nvme", 1); + if (nvme_completion_is_error(&status.cpl)) { + nvme_printf(ctrlr, "nvme_create_io_sq failed!\n"); + return (ENXIO); + } + + status.done = 0; + nvme_ctrlr_cmd_delete_io_cq(ctrlr, qpair, + nvme_completion_poll_cb, &status); + while (!atomic_load_acq_int(&status.done)) + pause("nvme", 1); + if (nvme_completion_is_error(&status.cpl)) { + nvme_printf(ctrlr, "nvme_create_io_cq failed!\n"); + return (ENXIO); + } + + return (0); +} + +static int nvme_ctrlr_construct_namespaces(struct nvme_controller *ctrlr) { struct nvme_namespace *ns; @@ -1274,6 +1302,7 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, dev destroy_dev(ctrlr->cdev); for (i = 0; i < ctrlr->num_io_queues; i++) { + nvme_ctrlr_destroy_qpair(ctrlr, &ctrlr->ioq[i]); nvme_io_qpair_destroy(&ctrlr->ioq[i]); } From owner-svn-src-all@freebsd.org Wed Mar 14 23:06:12 2018 Return-Path: Delivered-To: svn-src-all@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 F1732F5081F; Wed, 14 Mar 2018 23:06:11 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x22e.google.com (mail-lf0-x22e.google.com [IPv6:2a00:1450:4010:c07::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2EB3F7C1C9; Wed, 14 Mar 2018 23:06:11 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x22e.google.com with SMTP id e5-v6so3265231lfb.7; Wed, 14 Mar 2018 16:06:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=/O+oTxbLJSd6GeRVzUN2D+eWPQ42ca6YHX/RIKzqKNE=; b=HggjDVi0+HpavgRURRvTicVx4QQw0RIRXfd6nchag2Z81FJKaQDwxK84AWdwCemqK+ CZfzzKm7f38kl+sTugHS/dzgQBeqF5bssgeKERPeCIhyP0CeYLKu8kDFfoweTexspBOF EoTKHkfINVrIT5YEUHjIac13hjPGyj7eBpNz1s9n7wFRNQWVRzJW/wq6asSdp9dBbTOu DcHncVRPgpZQZyABhC/5ocQEKX71L37ghNdFniUcwSkt7QgWFiDagCh/MTYkw86sb6Zw GAs+P4WSuMkOFjhfgqZB0Rclyrvn/FubnLKXa6Fg7UxWsWgER5lgJ/Jg6hUoU9sudGVe ReuA== 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=/O+oTxbLJSd6GeRVzUN2D+eWPQ42ca6YHX/RIKzqKNE=; b=SNx33tuzLc//SldClF4t5SxDj53dLF3JCmj2NdzZB5GkmrJV9H9oqVA5SJmXfiJ8a4 4AMN5Gr+0joib263CeEuEd9HuGVQH5SMOHunyKpKNiIBco4a3tr7sn+vg6de/LqzVL62 HYv1Z7ZQ8pGSv/bwn6cE3cQTVzhgL8OpFaJgctEn2yZcsSphRs304cs7Ggb1ejv5BUZK P/ZJQDDvWudDDJhj+1JDLUSm4FUK0Zk5XQSyXgC++pmuSi9bQIBiCIRwXMiYoIFDGLJX KEaIN8r8TDymVP735TFBZtUwXdTuPtJ4CngnW+acwPU/AQs7iFuNugVkF755YriY4LPg s22Q== X-Gm-Message-State: AElRT7GxsaNKixht7cqU39VGc1Hcg1EchHrAFrif2GTFigbJ4GDZNo3T /YKn091WZx5BZdjlbDIIjQP6w/vquI9DDsrPzcE= X-Google-Smtp-Source: AG47ELt6CAWWIyGyOvz9lk1/9ODj0faDuWpRngjt98dZ9TOrgSisii9velI0M2pTN17CYI6ThEgK73LwbGRVBllnnYs= X-Received: by 10.46.157.135 with SMTP id c7mr2838949ljj.46.1521068769714; Wed, 14 Mar 2018 16:06:09 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.2.195 with HTTP; Wed, 14 Mar 2018 16:06:09 -0700 (PDT) In-Reply-To: <20180314225623.zp6ufw5h7bua4etf@mutt-hbsd> References: <201802251429.w1PEThjY035303@repo.freebsd.org> <20180314225009.gu3awgryggsxqmff@mutt-hbsd> <20180314225623.zp6ufw5h7bua4etf@mutt-hbsd> From: Alan Somers Date: Wed, 14 Mar 2018 17:06:09 -0600 X-Google-Sender-Auth: mtzKjN0uTjC4Hg8b-LMUpzx65so Message-ID: Subject: Re: svn commit: r329984 - in head: cddl/contrib/opensolaris/lib/libzpool/common sys/cddl/compat/opensolaris/sys To: Shawn Webb 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.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 23:06:12 -0000 On Wed, Mar 14, 2018 at 4:56 PM, Shawn Webb wrote: > On Wed, Mar 14, 2018 at 04:51:27PM -0600, Alan Somers wrote: > > On Wed, Mar 14, 2018 at 4:50 PM, Shawn Webb > > wrote: > > > > > On Sun, Feb 25, 2018 at 02:29:43PM +0000, Alan Somers wrote: > > > > Author: asomers > > > > Date: Sun Feb 25 14:29:43 2018 > > > > New Revision: 329984 > > > > URL: https://svnweb.freebsd.org/changeset/base/329984 > > > > > > > > Log: > > > > Don't declare __assfail as static > > > > > > > > It gets called by dmu_buf_init_user, which is inline but not > static. > > > So it > > > > needs global linkage itself. > > > > > > > > Reported by: GCC-6 > > > > MFC after: 17 days > > > > X-MFC-With: 329722 > > > > > > > > > > Hey Alan, > > > > > > This commit breaks compiling world with ASAN. > > > > > > Some applications, like zfs, will fail with this error: > > > > > > /lib/libuutil.so.2: Undefined symbol "__assfail" > > > > > > Thanks, > > > > > > > How does one build world with ASAN ? > > HardenedBSD has a feature branch in its playground repo for ASAN-ified > world. > > We introduced two new MK_* toggles: MK_ASAN and MK_ASAN_RECOVER. > MK_ASAN is self-explanitory. MK_ASAN_RECOVER tells the sanitizer > framework to let the application continue running instead of abort > execution. > > Here's where the magic gets set: > > https://github.com/HardenedBSD/hardenedBSD-playground/blob/hardened/ > current/asan/share/mk/bsd.prog.mk#L125-L134 > > Thanks, > I don't use HardenedBSD. Can you provide an invocation that will demonstrate the breakage on FreeBSD head? I tried a few things, and they all either worked, or failed with errors other than the one you showed. From owner-svn-src-all@freebsd.org Wed Mar 14 23:12:05 2018 Return-Path: Delivered-To: svn-src-all@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 AFF2BF50DB7 for ; Wed, 14 Mar 2018 23:12:05 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wr0-x22d.google.com (mail-wr0-x22d.google.com [IPv6:2a00:1450:400c:c0c::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00CD27C6E5 for ; Wed, 14 Mar 2018 23:12:05 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wr0-x22d.google.com with SMTP id n12so6439437wra.2 for ; Wed, 14 Mar 2018 16:12:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3heOQTW182WIoLtztSyvVajSB//2/CI2J2dUJEfROq8=; b=PXie4MIi0hO9lZcZlUD0fXCjWcPHMMPFJK8Z/1SMrYcevCikU1bI/ZbtrMjRyDMMWr SqDS4fYqoRLN5An1m9dU4pKrErhALTf1tNxVyAMgUM/DA9aT6OiZ/W3tPPy9jdPq1XXI pLs9gCWF5Z0RE8hluj77Dwcf+K3B09TiFbs/pQFVvBHcXvNy1DrSDA07frt8ynToH+tN C/LzXC/Y9V70TY54EA6NE/GIlWeUUgfwqJxK1PTMw/4+BUy5SrJ3wFH+EP77B6IOCSwF tDgb05tdnOrrpV1M7dn8/2LF4JgM8eHFbBwVDg3K1c6meIpZFQBmzrDFUA1qm7pYh585 TcFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3heOQTW182WIoLtztSyvVajSB//2/CI2J2dUJEfROq8=; b=Nq0Ad1j0khnADKgGMIcQPhZdo+v9E/+rXtw0iZJ1ABReHCrofCcQlxtA5zHWRSHoZ8 IBh+3mhWjD8AeGxP4AyaA3eRRXeW9nLq3Bk/XX775qoenI03KeLmx41BBiqZyuNG/CWz himWEmpubBRVhIIDRT7+biScCIpw3e7CSx9hIyFugZY3k1K/HlPLgYrlsV9S66ZBjYkK 067+629MTmBL1a8h8Cn+N/OKJvdxFGVY91A9Cm6uQJspOG5Z2HnY6eEkIrLykr0BydHN vMQdEzn9OkTe6gmmjyl7XsaQS/X7LmjC8CLh0PkXf/bw7owLRaXdq6dJ4pxM3HSGmxjl wGgQ== X-Gm-Message-State: AElRT7H6JXFygf2Cv6PXdzmFZyu7t+Vfvr/GtHZdSs3eErDnH65Zj2HI W5GOryv8JLXmrZM9FSAQmgggWw== X-Google-Smtp-Source: AG47ELtM/XRVI35t5243L0k4rbw+i/WfKNeq2re5oA9wFoNlTqVVxTRq6ETs8cBMOXtPW1dn6EOQHw== X-Received: by 10.223.136.146 with SMTP id f18mr5431548wrf.57.1521069123780; Wed, 14 Mar 2018 16:12:03 -0700 (PDT) Received: from mutt-hbsd (torsrv0.snydernet.net. [185.100.86.154]) by smtp.gmail.com with ESMTPSA id d4sm2561482wmh.42.2018.03.14.16.12.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Mar 2018 16:12:03 -0700 (PDT) Date: Wed, 14 Mar 2018 19:11:50 -0400 From: Shawn Webb To: Alan Somers Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r329984 - in head: cddl/contrib/opensolaris/lib/libzpool/common sys/cddl/compat/opensolaris/sys Message-ID: <20180314231150.whi6ndflt77iyybw@mutt-hbsd> References: <201802251429.w1PEThjY035303@repo.freebsd.org> <20180314225009.gu3awgryggsxqmff@mutt-hbsd> <20180314225623.zp6ufw5h7bua4etf@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gu7ci6sptypsxkle" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20171215 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 23:12:06 -0000 --gu7ci6sptypsxkle Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 14, 2018 at 05:06:09PM -0600, Alan Somers wrote: > On Wed, Mar 14, 2018 at 4:56 PM, Shawn Webb > wrote: >=20 > > On Wed, Mar 14, 2018 at 04:51:27PM -0600, Alan Somers wrote: > > > On Wed, Mar 14, 2018 at 4:50 PM, Shawn Webb > > > wrote: > > > > > > > On Sun, Feb 25, 2018 at 02:29:43PM +0000, Alan Somers wrote: > > > > > Author: asomers > > > > > Date: Sun Feb 25 14:29:43 2018 > > > > > New Revision: 329984 > > > > > URL: https://svnweb.freebsd.org/changeset/base/329984 > > > > > > > > > > Log: > > > > > Don't declare __assfail as static > > > > > > > > > > It gets called by dmu_buf_init_user, which is inline but not > > static. > > > > So it > > > > > needs global linkage itself. > > > > > > > > > > Reported by: GCC-6 > > > > > MFC after: 17 days > > > > > X-MFC-With: 329722 > > > > > > > > > > > > > Hey Alan, > > > > > > > > This commit breaks compiling world with ASAN. > > > > > > > > Some applications, like zfs, will fail with this error: > > > > > > > > /lib/libuutil.so.2: Undefined symbol "__assfail" > > > > > > > > Thanks, > > > > > > > > > > How does one build world with ASAN ? > > > > HardenedBSD has a feature branch in its playground repo for ASAN-ified > > world. > > > > We introduced two new MK_* toggles: MK_ASAN and MK_ASAN_RECOVER. > > MK_ASAN is self-explanitory. MK_ASAN_RECOVER tells the sanitizer > > framework to let the application continue running instead of abort > > execution. > > > > Here's where the magic gets set: > > > > https://github.com/HardenedBSD/hardenedBSD-playground/blob/hardened/ > > current/asan/share/mk/bsd.prog.mk#L125-L134 > > > > Thanks, > > >=20 > I don't use HardenedBSD. Can you provide an invocation that will > demonstrate the breakage on FreeBSD head? I tried a few things, and they > all either worked, or failed with errors other than the one you showed. No worries. I've just reverted the commit in that feature branch. If I have time, I'll see about porting the ASAN work to vanilla FreeBSD. But my time is extremely limited these days. Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --gu7ci6sptypsxkle Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlqprDEACgkQaoRlj1JF bu5JjQ/+L+8YxLuF6A8521Jf1Z1MHyP/n13HmM30KPIKWIrM/9phA+9qxm6IUnWG ixOoF/RsTn07M2BkJLL/LzFoluIXiY+CFv01bI7eRu8raLugppbNsU7L4LDJlThK I3xlxfhwRhu175VAIfl5+PPxcBRKMcsu0yAkucoijKXqMVjwnyEu+EOwv1GhdNC4 y/JduSI459khEpOA9kHfXAZ/8dl9m7XLG1vgcs/Ix+m+4KDMXXb7oU/xlxc4yES5 eRRzWmWk2CAK0SQDDdCC3tTgOqZXpJT0JpvJrHXR6J1D0nEBL2ehIA/+dZKwUJqX BPYQr3vYhVL3cEINK10j/EUkTbba0kYkuGCi+XhDZqTI7flSUF24w8xqRr2SEhyk 19OaT1Zwy/nGQgKRrdyKF2mXib+m+55Noo3rF/VPLHlSJttXPQUFKyxGUYd03D5x iAWRdziSHPh2XSPebGCPEF71XRKsfM7zyfwPpE4ItpX8AaTxUZvWq/x9HZoIjXTN eYBTppg6lwoTm+UZKvyLcJ5t/oyqt6a7rEE62lZsBdWMpoyJ3/cRylfZ1KnVYjhY 2wysY1Rm7vd30lq+m/hB0K2l2DlpQjpbd9m71apgJ7x8fQc8CNHIvQ79t7R5vK1d IDozYqUHKi5fEojJHgmgL7JzD1ObWWpQoaDihcFMpWqYe1laZLo= =0VSS -----END PGP SIGNATURE----- --gu7ci6sptypsxkle-- From owner-svn-src-all@freebsd.org Wed Mar 14 23:19:02 2018 Return-Path: Delivered-To: svn-src-all@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 BC70DF5134B; Wed, 14 Mar 2018 23:19:02 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E20F7CC1C; Wed, 14 Mar 2018 23:19:02 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x22c.google.com with SMTP id d71so6368906iog.4; Wed, 14 Mar 2018 16:19:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=GaShFCSPkuEZt1uEWC4xOw8UUCOYY+BeoBbowlqu8eM=; b=J9nTtdxK3c45quIUgPfE6UEyllPybvhKSqXIJUhB6sJefXI+8t9VE0h1L27Rc0hiyX gxPEd4fFXcyRKy1UuwZPx1MhYLdTp4ocjjk/DAUqvHYQaIcdHWUpvmlsAKJj3UazIWGW ztNZIPRiJf76qfWNjFa2KwPBE+3OEYU/NOZHGSwB3tM/Jq+OnvzZ5Xum1FufTGwIbuzI PWuBjlL0O91Qu+eF8Lx9VUd0Uot3yadq5ECtmmfkUg2P3sbev8RD9X17MjBFBhtXZr8+ lRMoflkDY4cS5TbIRBKd0pETzXgjtDJOjxuZIp2GIoUp5aXX6j0FVAfqLNkEs+Fysh/x 9EsQ== 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=GaShFCSPkuEZt1uEWC4xOw8UUCOYY+BeoBbowlqu8eM=; b=T5qStay0o8mg9Qt5+QRHGvZO8ay4Nvq0I4xCV1R+imMlRtUYNyN01CiI6ItNkmVclr F7QkGMi97PJfLN53GWoapr05uduI3qrKMRbuPzZLfPzVQLsUCTg+DsI+KKHSwF0Y30fj QfUgTvMX5zSErGeWadRgFysq4eLFe9OUIgbrn8CskT5CmOIbm2yEk4eDB4RK/uEG4hdo fKfR669O9VoaSsEGtnbDEfNKs+b9o4q9WeLqaMkajRH9NzSU3uXGpslEr8hjWmXDZoQd BIKl4El4wpGhw2wNEQY2632g0fA5I0B5JEdasWtp63BxxTybh0Fcz63bNids8niYUxxK tEiw== X-Gm-Message-State: AElRT7GCwcwer7Xw59e8N9J87pnI8BjJPC+10aIaHOMhdCCvaCeBHQdb 1rVbuQ5tE1V5GXDOjDoElWbOSMRa+SghHgD7NbIUnw== X-Google-Smtp-Source: AG47ELtJiXQ77g7NrZSFg8MIHb9pY+yCeI6sz4KS/+jwuTJaI46MPWiTjhgk3VTU3jWq2AcQ9HAWVbTB7tJonEJPzFM= X-Received: by 10.107.134.85 with SMTP id i82mr3458020iod.210.1521069541621; Wed, 14 Mar 2018 16:19:01 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.163.13 with HTTP; Wed, 14 Mar 2018 16:18:41 -0700 (PDT) In-Reply-To: <201712282146.vBSLk9Uo033652@repo.freebsd.org> References: <201712282146.vBSLk9Uo033652@repo.freebsd.org> From: Ed Maste Date: Wed, 14 Mar 2018 19:18:41 -0400 X-Google-Sender-Auth: JIw29IQXDS_VQ-i_L5pdjpgPXbw Message-ID: Subject: Re: svn commit: r327314 - head/sys/x86/x86 To: Marius Strobl Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 23:19:03 -0000 On 28 December 2017 at 16:46, Marius Strobl wrote: > Author: marius > Date: Thu Dec 28 21:46:09 2017 > New Revision: 327314 > URL: https://svnweb.freebsd.org/changeset/base/327314 > > Log: > With the advent of interrupt remapping, Intel has repurposed bit 11 > (now: Interrupt_Index[15]) and assigned the previously reserved bits > ... Will you MFC this to stable/11 so it can arrive in 11.2? From owner-svn-src-all@freebsd.org Wed Mar 14 23:20:03 2018 Return-Path: Delivered-To: svn-src-all@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 3902AF51416; Wed, 14 Mar 2018 23:20:03 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com [IPv6:2a00:1450:4010:c07::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 847637CD82; Wed, 14 Mar 2018 23:20:02 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x22d.google.com with SMTP id e5-v6so3301494lfb.7; Wed, 14 Mar 2018 16:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=GZSy6Q2lLfWuyVUvhjmo4r+sMwCm5hjZZbA/uTrYzX0=; b=R1P4czo0tNRsAzNoz6/DHG59plOyz3FyLjVy6lvD9FPezQYR1F+X/7uI0gbSD08xle Aa5Fva8L9fzKyTRKSNUUpTi9Tzgxdm9f3PctsDmPnUv/8MVp2LXzaihTWIko7M8P1tBJ W55i0wDEP8buVkCXlE7/pBW2xvsdPOOU3UM7ZTqWPwuJYXrvxwpdwfUDIGBgEvUMQ+5V pQrcTPTZEx4BHRrSvHSEWmGE2ZXNSUSxMCNEH2mhwMoa67Zh7RO1jiL8DGiPp+FDaHLe dtqBvuTSBqaGwgcCYx/TnxM0BkIVwiXdUXg/romedYFxRocZN9F2FUGWVm4sfIyFFzID SBSQ== 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=GZSy6Q2lLfWuyVUvhjmo4r+sMwCm5hjZZbA/uTrYzX0=; b=Zd8pEb8nNG0ltpnuW+xxnBVwFSzVpeqjTisHyg40cyVt5qvg4bn+4Xur63DhGaLQrW 7CbvvjWZYEhuWQ+zTynyiKybnidz/PbGzdHSkPcKz1/MZuwKpJpgN1lidj6eUqK7D8Jo gv8I2o/icCx5YNyLUwapv78lZ9mHZB64JzWL0sPLFD5h7v6bwU0Pw1fc2Ck5Zt6Gd8Wk a0xT0dLeecZums02B5s38VgxrU/snwS6hlKte7I7sONKYOmzsnfOF98muIkhKISho1Ra IHkvlVhNXfw5G1ApSIotVl4jztIxQysp6zk/y/vrrEoi+JJ8AXDt9Xbp7rJIX4vCoRCJ UyRQ== X-Gm-Message-State: AElRT7G/72bU2JZCY4XbnT16gG/jHgosnVKB7KnNm6fh1c31cSgjsJZB 7bWNXMleFCGWoHdzhgqjPGXj5kpf/YVJsBuA0jg= X-Google-Smtp-Source: AG47ELt66OXeUUCn3pUsAdkJNbNowKpCS9sjJPQg9/i5wThY9Xq0gz+vkyUgKaGqnnBxnHGQiiq97VkUbqm+2z2BfYM= X-Received: by 10.46.20.30 with SMTP id u30mr4804095ljd.12.1521069601221; Wed, 14 Mar 2018 16:20:01 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.2.195 with HTTP; Wed, 14 Mar 2018 16:20:00 -0700 (PDT) In-Reply-To: <20180314231150.whi6ndflt77iyybw@mutt-hbsd> References: <201802251429.w1PEThjY035303@repo.freebsd.org> <20180314225009.gu3awgryggsxqmff@mutt-hbsd> <20180314225623.zp6ufw5h7bua4etf@mutt-hbsd> <20180314231150.whi6ndflt77iyybw@mutt-hbsd> From: Alan Somers Date: Wed, 14 Mar 2018 17:20:00 -0600 X-Google-Sender-Auth: 99JibYKM-Xx4QLude-UA7b9PhBE Message-ID: Subject: Re: svn commit: r329984 - in head: cddl/contrib/opensolaris/lib/libzpool/common sys/cddl/compat/opensolaris/sys To: Shawn Webb 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.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 23:20:03 -0000 On Wed, Mar 14, 2018 at 5:11 PM, Shawn Webb wrote: > On Wed, Mar 14, 2018 at 05:06:09PM -0600, Alan Somers wrote: > > On Wed, Mar 14, 2018 at 4:56 PM, Shawn Webb > > wrote: > > > > > On Wed, Mar 14, 2018 at 04:51:27PM -0600, Alan Somers wrote: > > > > On Wed, Mar 14, 2018 at 4:50 PM, Shawn Webb < > shawn.webb@hardenedbsd.org> > > > > wrote: > > > > > > > > > On Sun, Feb 25, 2018 at 02:29:43PM +0000, Alan Somers wrote: > > > > > > Author: asomers > > > > > > Date: Sun Feb 25 14:29:43 2018 > > > > > > New Revision: 329984 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/329984 > > > > > > > > > > > > Log: > > > > > > Don't declare __assfail as static > > > > > > > > > > > > It gets called by dmu_buf_init_user, which is inline but not > > > static. > > > > > So it > > > > > > needs global linkage itself. > > > > > > > > > > > > Reported by: GCC-6 > > > > > > MFC after: 17 days > > > > > > X-MFC-With: 329722 > > > > > > > > > > > > > > > > Hey Alan, > > > > > > > > > > This commit breaks compiling world with ASAN. > > > > > > > > > > Some applications, like zfs, will fail with this error: > > > > > > > > > > /lib/libuutil.so.2: Undefined symbol "__assfail" > > > > > > > > > > Thanks, > > > > > > > > > > > > > How does one build world with ASAN ? > > > > > > HardenedBSD has a feature branch in its playground repo for ASAN-ified > > > world. > > > > > > We introduced two new MK_* toggles: MK_ASAN and MK_ASAN_RECOVER. > > > MK_ASAN is self-explanitory. MK_ASAN_RECOVER tells the sanitizer > > > framework to let the application continue running instead of abort > > > execution. > > > > > > Here's where the magic gets set: > > > > > > https://github.com/HardenedBSD/hardenedBSD-playground/blob/hardened/ > > > current/asan/share/mk/bsd.prog.mk#L125-L134 > > > > > > Thanks, > > > > > > > I don't use HardenedBSD. Can you provide an invocation that will > > demonstrate the breakage on FreeBSD head? I tried a few things, and they > > all either worked, or failed with errors other than the one you showed. > > No worries. I've just reverted the commit in that feature branch. If I > have time, I'll see about porting the ASAN work to vanilla FreeBSD. > But my time is extremely limited these days. > > Thanks, > Ok. BTW, that commit is due for MFC as of today. Unless I hear from you otherwise, I'll go ahead and MFC it. From owner-svn-src-all@freebsd.org Wed Mar 14 23:23:47 2018 Return-Path: Delivered-To: svn-src-all@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 59879F5194F for ; Wed, 14 Mar 2018 23:23:47 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C70FC7D2FC for ; Wed, 14 Mar 2018 23:23:46 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wm0-x230.google.com with SMTP id u10so6969755wmu.4 for ; Wed, 14 Mar 2018 16:23:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lVXBLdLLVdRAH8WvtTTwn3KL2AMuSLfFRit7UstUkL8=; b=iVh0TJXpMd0m82D0W5awkUECone5LeHF97W4EAv5iiervIeQBt5TTbeEyBgObDmblf jbffkd8hjh13LX22hWxIY1AoOQo2d+7nbtBz14LHAZtaPvcmsN+oI+paQTG9PLjBgPFf yk/WEoAdjkXC2OhQtZJGdg5+f91t75GvRUudn2vZIo4ci4+urTOKEJKnaTbN7PhKOe/U Yb7eJbDc1/cXD1QbHuzAb+C3GPX3+HGvPK4588a3TR+x4/iCPf5LI7wPtyXMLtOUDHZj w7iN6SldjPyLuoVPzO1i7d1iYiaQrkum5fEBLwCw6yJ82B84vJdA/Ck43y6S/shTWIHp rdGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lVXBLdLLVdRAH8WvtTTwn3KL2AMuSLfFRit7UstUkL8=; b=aZkfeyixvrDm57SFnwJHcMRdKpEMUvmFG/u5nZqpxOWOv7Fi8jGKU/p9/hrI2KzP4c XsOpGuFQ9nI4zxUGTU61PwGFKrdQKSyIM1bE4oTdWob8lruuiJV/CKNs24YikuOEclfK FqB7a+R0auhc4eZ8kFPdhYxdVkEg+TEii8h7+RDo8l0jXAstBwSkItTOL9RxVVU7bhfn vV6toVWcAOyeA0yCTNKRbUxuHzFnejzzRbJftoANLDbM4UAj3WiQS/gnV7O06C3qbKlA wIa60r/yP1N/RnXEKZLySPE+1xiqz0zqbdI9zKvFzgBKI20iSe3wyD4d6UILZxFJewIg jcHg== X-Gm-Message-State: AElRT7FxFvkARfHAe3A3r5pCdnGTyARwUuMHbDiPMco/amvZ8l100H7/ mVaX7bWc0cmYwgy92vC7cJtSqSR11Kc= X-Google-Smtp-Source: AG47ELsuwdSiH5usvsdkaDD24gzPIPlUlpCqH1mbCe4o94bIisTdJUPQWOXWQiZ98QYnp6jcSUheRw== X-Received: by 10.80.177.86 with SMTP id l22mr6737356edd.88.1521069825566; Wed, 14 Mar 2018 16:23:45 -0700 (PDT) Received: from mutt-hbsd (bzq-62-219-3-47.dcenter.bezeqint.net. [62.219.3.47]) by smtp.gmail.com with ESMTPSA id b10sm939871edk.32.2018.03.14.16.23.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Mar 2018 16:23:44 -0700 (PDT) Date: Wed, 14 Mar 2018 19:23:30 -0400 From: Shawn Webb To: Alan Somers Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r329984 - in head: cddl/contrib/opensolaris/lib/libzpool/common sys/cddl/compat/opensolaris/sys Message-ID: <20180314232330.sjeqpbb3hwc37mhb@mutt-hbsd> References: <201802251429.w1PEThjY035303@repo.freebsd.org> <20180314225009.gu3awgryggsxqmff@mutt-hbsd> <20180314225623.zp6ufw5h7bua4etf@mutt-hbsd> <20180314231150.whi6ndflt77iyybw@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rpfwgcyxd2hi5f2b" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20171215 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 23:23:47 -0000 --rpfwgcyxd2hi5f2b Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 14, 2018 at 05:20:00PM -0600, Alan Somers wrote: > On Wed, Mar 14, 2018 at 5:11 PM, Shawn Webb > wrote: >=20 > > On Wed, Mar 14, 2018 at 05:06:09PM -0600, Alan Somers wrote: > > > On Wed, Mar 14, 2018 at 4:56 PM, Shawn Webb > > > wrote: > > > > > > > On Wed, Mar 14, 2018 at 04:51:27PM -0600, Alan Somers wrote: > > > > > On Wed, Mar 14, 2018 at 4:50 PM, Shawn Webb < > > shawn.webb@hardenedbsd.org> > > > > > wrote: > > > > > > > > > > > On Sun, Feb 25, 2018 at 02:29:43PM +0000, Alan Somers wrote: > > > > > > > Author: asomers > > > > > > > Date: Sun Feb 25 14:29:43 2018 > > > > > > > New Revision: 329984 > > > > > > > URL: https://svnweb.freebsd.org/changeset/base/329984 > > > > > > > > > > > > > > Log: > > > > > > > Don't declare __assfail as static > > > > > > > > > > > > > > It gets called by dmu_buf_init_user, which is inline but not > > > > static. > > > > > > So it > > > > > > > needs global linkage itself. > > > > > > > > > > > > > > Reported by: GCC-6 > > > > > > > MFC after: 17 days > > > > > > > X-MFC-With: 329722 > > > > > > > > > > > > > > > > > > > Hey Alan, > > > > > > > > > > > > This commit breaks compiling world with ASAN. > > > > > > > > > > > > Some applications, like zfs, will fail with this error: > > > > > > > > > > > > /lib/libuutil.so.2: Undefined symbol "__assfail" > > > > > > > > > > > > Thanks, > > > > > > > > > > > > > > > > How does one build world with ASAN ? > > > > > > > > HardenedBSD has a feature branch in its playground repo for ASAN-if= ied > > > > world. > > > > > > > > We introduced two new MK_* toggles: MK_ASAN and MK_ASAN_RECOVER. > > > > MK_ASAN is self-explanitory. MK_ASAN_RECOVER tells the sanitizer > > > > framework to let the application continue running instead of abort > > > > execution. > > > > > > > > Here's where the magic gets set: > > > > > > > > https://github.com/HardenedBSD/hardenedBSD-playground/blob/hardened/ > > > > current/asan/share/mk/bsd.prog.mk#L125-L134 > > > > > > > > Thanks, > > > > > > > > > > I don't use HardenedBSD. Can you provide an invocation that will > > > demonstrate the breakage on FreeBSD head? I tried a few things, and = they > > > all either worked, or failed with errors other than the one you showe= d. > > > > No worries. I've just reverted the commit in that feature branch. If I > > have time, I'll see about porting the ASAN work to vanilla FreeBSD. > > But my time is extremely limited these days. > > > > Thanks, > > >=20 > Ok. BTW, that commit is due for MFC as of today. Unless I hear from you > otherwise, I'll go ahead and MFC it. That's totally fine. The ASAN-ified work is done in a feature branch that will only track HEAD. Given that I'm abusing ASAN in this particular case, the ASAN-ified world should never land in any production build. I don't plan to test 11-STABLE with ASAN. Thanks for letting me know, though. --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --rpfwgcyxd2hi5f2b Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlqpru4ACgkQaoRlj1JF bu4AQA/+Oeo5XFuGPbeH0h/UkXPF7mTZoqiLPNNxDneiiJchRQwRpp5nHPz9IzSD /KHcghgvDDXeMLh+k/KURJaS4nPyYSuojS90oi5JMoYFcDfATyedUgSSxXXAUbN4 ldRPoMfxqdl4p1ne6TP6aN8A9Z08epkbzYHxMlnTDUz2CAyRSnNlHXb3acr9rhUN jnd2wbXoiV6tBjPTvnETCGIs4mGSCF2Cj6n+HGfxjerxgWcHtnDf4NJZ60UK5D4m lgK65V1moW40/a7ibElQS+Gily8zd/F7fcoHr+Dq0iOh9ein+Nr55WHyNfFixhlP y5O1PFxdCspofqmSqr7QuWvloFLo7wfldspjqlyaK5y/Gi8jQjrnnjDpE1IroqRf cEW/PtaftradvbAY1+Xzlec7qSJZnpHyDbnfhlbV92/VmLpbMT4nzdB8F+it0wn2 h318CS+EtipI2ZQgc4QXz0Qls3Eldf8hTTOeZQcf9u2D6oaKHhufhqY3+yLmGjp3 c1o1VDPrAKqQTr8HtQcivls8q8AoobJ55ISPEa8H9ysKfcBigV41ECGXlzyJwXYd 1tMeQhKXuFM8zqBvrqLZMNgIPIBHldJr5O3bkOwl5aU2D7PFsI7nvaDdW7V5WCw4 6/KarKr90eB50gGkduA/9tXHE7YK2ZVw5UBp+A9pI/IDZ9s+F+8= =p20Z -----END PGP SIGNATURE----- --rpfwgcyxd2hi5f2b-- From owner-svn-src-all@freebsd.org Wed Mar 14 23:28:29 2018 Return-Path: Delivered-To: svn-src-all@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 60D29F51CAA; Wed, 14 Mar 2018 23:28: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 14A317D51A; Wed, 14 Mar 2018 23:28: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 0B2EF65FC; Wed, 14 Mar 2018 23:28: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 w2ENSSI1050586; Wed, 14 Mar 2018 23:28:28 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2ENSS7h050585; Wed, 14 Mar 2018 23:28:28 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803142328.w2ENSS7h050585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Mar 2018 23:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330955 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 330955 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 23:28:29 -0000 Author: imp Date: Wed Mar 14 23:28:28 2018 New Revision: 330955 URL: https://svnweb.freebsd.org/changeset/base/330955 Log: Fix error messages in cut and pasted code. Also, fix an unnecessary deref to get ctrlr. Noticed by: rpokala@ Sponsored by: Netflix Modified: head/sys/dev/nvme/nvme_ctrlr.c Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Wed Mar 14 23:01:18 2018 (r330954) +++ head/sys/dev/nvme/nvme_ctrlr.c Wed Mar 14 23:28:28 2018 (r330955) @@ -519,12 +519,12 @@ nvme_ctrlr_destroy_qpair(struct nvme_controller *ctrlr struct nvme_completion_poll_status status; status.done = 0; - nvme_ctrlr_cmd_delete_io_sq(qpair->ctrlr, qpair, + nvme_ctrlr_cmd_delete_io_sq(ctrlr, qpair, nvme_completion_poll_cb, &status); while (!atomic_load_acq_int(&status.done)) pause("nvme", 1); if (nvme_completion_is_error(&status.cpl)) { - nvme_printf(ctrlr, "nvme_create_io_sq failed!\n"); + nvme_printf(ctrlr, "nvme_destroy_io_sq failed!\n"); return (ENXIO); } @@ -534,7 +534,7 @@ nvme_ctrlr_destroy_qpair(struct nvme_controller *ctrlr while (!atomic_load_acq_int(&status.done)) pause("nvme", 1); if (nvme_completion_is_error(&status.cpl)) { - nvme_printf(ctrlr, "nvme_create_io_cq failed!\n"); + nvme_printf(ctrlr, "nvme_destroy_io_cq failed!\n"); return (ENXIO); } From owner-svn-src-all@freebsd.org Wed Mar 14 23:42:29 2018 Return-Path: Delivered-To: svn-src-all@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 554F0F52998; Wed, 14 Mar 2018 23:42:29 +0000 (UTC) (envelope-from jkim@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 02F557E0B3; Wed, 14 Mar 2018 23:42:29 +0000 (UTC) (envelope-from jkim@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 F20F368E9; Wed, 14 Mar 2018 23:42:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2ENgS7B060454; Wed, 14 Mar 2018 23:42:28 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2ENgSvf060453; Wed, 14 Mar 2018 23:42:28 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201803142342.w2ENgSvf060453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 14 Mar 2018 23:42:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330956 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 330956 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 23:42:29 -0000 Author: jkim Date: Wed Mar 14 23:42:28 2018 New Revision: 330956 URL: https://svnweb.freebsd.org/changeset/base/330956 Log: Remove local definitions for _STA method in favor of ACPICA. These macros were added in ACPICA 20051216, more than a decade ago. Modified: head/sys/dev/acpica/acpivar.h Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Wed Mar 14 23:28:28 2018 (r330955) +++ head/sys/dev/acpica/acpivar.h Wed Mar 14 23:42:28 2018 (r330956) @@ -320,20 +320,14 @@ void acpi_EnterDebugger(void); #define ACPI_OSC_BAD_REVISION (1 << 3) #define ACPI_OSC_CAPS_MASKED (1 << 4) -/* Values for the device _STA (status) method. */ -#define ACPI_STA_PRESENT (1 << 0) -#define ACPI_STA_ENABLED (1 << 1) -#define ACPI_STA_SHOW_IN_UI (1 << 2) -#define ACPI_STA_FUNCTIONAL (1 << 3) -#define ACPI_STA_BATT_PRESENT (1 << 4) - #define ACPI_DEVINFO_PRESENT(x, flags) \ (((x) & (flags)) == (flags)) #define ACPI_DEVICE_PRESENT(x) \ - ACPI_DEVINFO_PRESENT(x, ACPI_STA_PRESENT | ACPI_STA_FUNCTIONAL) + ACPI_DEVINFO_PRESENT(x, ACPI_STA_DEVICE_PRESENT | \ + ACPI_STA_DEVICE_FUNCTIONING) #define ACPI_BATTERY_PRESENT(x) \ - ACPI_DEVINFO_PRESENT(x, ACPI_STA_PRESENT | ACPI_STA_FUNCTIONAL | \ - ACPI_STA_BATT_PRESENT) + ACPI_DEVINFO_PRESENT(x, ACPI_STA_DEVICE_PRESENT | \ + ACPI_STA_DEVICE_FUNCTIONING | ACPI_STA_BATTERY_PRESENT) /* Callback function type for walking subtables within a table. */ typedef void acpi_subtable_handler(ACPI_SUBTABLE_HEADER *, void *); From owner-svn-src-all@freebsd.org Wed Mar 14 23:45:51 2018 Return-Path: Delivered-To: svn-src-all@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 018C2F52C5D; Wed, 14 Mar 2018 23:45:50 +0000 (UTC) (envelope-from jkim@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 A13167E2BE; Wed, 14 Mar 2018 23:45:50 +0000 (UTC) (envelope-from jkim@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 977C868EC; Wed, 14 Mar 2018 23:45:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2ENjoiV060662; Wed, 14 Mar 2018 23:45:50 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2ENjm72060638; Wed, 14 Mar 2018 23:45:48 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201803142345.w2ENjm72060638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 14 Mar 2018 23:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330957 - in head/sys: contrib/dev/acpica contrib/dev/acpica/components/debugger contrib/dev/acpica/components/dispatcher contrib/dev/acpica/components/events contrib/dev/acpica/compone... X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/sys: contrib/dev/acpica contrib/dev/acpica/components/debugger contrib/dev/acpica/components/dispatcher contrib/dev/acpica/components/events contrib/dev/acpica/components/executer contrib/dev/... X-SVN-Commit-Revision: 330957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 23:45:51 -0000 Author: jkim Date: Wed Mar 14 23:45:48 2018 New Revision: 330957 URL: https://svnweb.freebsd.org/changeset/base/330957 Log: Merge ACPICA 20180313. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/components/debugger/dbdisply.c head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c head/sys/contrib/dev/acpica/components/events/evevent.c head/sys/contrib/dev/acpica/components/events/evgpe.c head/sys/contrib/dev/acpica/components/events/evgpeblk.c head/sys/contrib/dev/acpica/components/events/evrgnini.c head/sys/contrib/dev/acpica/components/events/evxface.c head/sys/contrib/dev/acpica/components/events/evxfgpe.c head/sys/contrib/dev/acpica/components/executer/exdebug.c head/sys/contrib/dev/acpica/components/hardware/hwgpe.c head/sys/contrib/dev/acpica/components/hardware/hwsleep.c head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c head/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c head/sys/contrib/dev/acpica/components/namespace/nseval.c head/sys/contrib/dev/acpica/components/namespace/nsload.c head/sys/contrib/dev/acpica/components/namespace/nsparse.c head/sys/contrib/dev/acpica/components/namespace/nsxfname.c head/sys/contrib/dev/acpica/components/parser/psargs.c head/sys/contrib/dev/acpica/components/parser/psloop.c head/sys/contrib/dev/acpica/components/parser/psobject.c head/sys/contrib/dev/acpica/components/tables/tbdata.c head/sys/contrib/dev/acpica/components/tables/tbinstal.c head/sys/contrib/dev/acpica/components/tables/tbxfload.c head/sys/contrib/dev/acpica/components/utilities/utosi.c head/sys/contrib/dev/acpica/components/utilities/utxfinit.c head/sys/contrib/dev/acpica/include/acevents.h head/sys/contrib/dev/acpica/include/acmacros.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/dev/acpica/acpi.c Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/changes.txt Wed Mar 14 23:45:48 2018 (r330957) @@ -1,4 +1,50 @@ ---------------------------------------- +13 March 2018. Summary of changes for version 20180313: + + +1) ACPICA kernel-resident subsystem: + +Implemented various improvements to the GPE support: + +1) Dispatch all active GPEs at initialization time so that no GPEs are +lost. +2) Enable runtime GPEs earlier. Some systems expect GPEs to be enabled +before devices are enumerated. +3) Don't unconditionally clear ACPI IRQs during suspend/resume, so that +IRQs are not lost. +4) Add parallel GPE handling to eliminate the possibility of dispatching +the same GPE twice. +5) Dispatch any pending GPEs after enabling for the first time. + +AcpiGetObjectInfo - removed support for the _STA method. This was causing +problems on some platforms. + +Added a new _OSI string, "Windows 2017.2". + +Cleaned up and simplified the module-level code support. These changes +are in preparation for the eventual removal of the legacy MLC support +(deferred execution), replaced by the new MLC architecture which executes +the MLC as a table is loaded (DSDT/SSDTs). + +Changed a compile-time option to a runtime option. Changes the option to +ignore ACPI table load-time package resolution errors into a runtime +option. Used only for platforms that generate many AE_NOT_FOUND errors +during boot. AcpiGbl_IgnorePackageResolutionErrors. + +Fixed the ACPI_ERROR_NAMESPACE macro. This change involves putting some +ACPI_ERROR_NAMESPACE parameters inside macros. By doing so, we avoid +compilation errors from unused variables (seen with some compilers). + + +2) iASL Compiler/Disassembler and Tools: + +ASLTS: parallelized execution in order to achieve an (approximately) 2X +performance increase. + +ASLTS: Updated to use the iASL __LINE__ and __METHOD__ macros. Improves +error reporting. + +---------------------------------------- 09 February 2018. Summary of changes for version 20180209: Modified: head/sys/contrib/dev/acpica/components/debugger/dbdisply.c ============================================================================== --- head/sys/contrib/dev/acpica/components/debugger/dbdisply.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/debugger/dbdisply.c Wed Mar 14 23:45:48 2018 (r330957) @@ -820,9 +820,8 @@ AcpiDbDisplayObjectType ( return; } - AcpiOsPrintf ("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n", - ACPI_FORMAT_UINT64 (Info->Address), - Info->CurrentStatus, Info->Flags); + AcpiOsPrintf ("ADR: %8.8X%8.8X, Flags: %X\n", + ACPI_FORMAT_UINT64 (Info->Address), Info->Flags); AcpiOsPrintf ("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n", Info->HighestDstates[0], Info->HighestDstates[1], Modified: head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c ============================================================================== --- head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c Wed Mar 14 23:45:48 2018 (r330957) @@ -546,34 +546,33 @@ AcpiDsResolvePackageElement ( ScopeInfo.Scope.Node = Element->Reference.Node; /* Prefix node */ - Status = AcpiNsLookup (&ScopeInfo, - (char *) Element->Reference.Aml, /* Pointer to AML path */ + Status = AcpiNsLookup (&ScopeInfo, (char *) Element->Reference.Aml, ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL, &ResolvedNode); if (ACPI_FAILURE (Status)) { -#if defined ACPI_IGNORE_PACKAGE_RESOLUTION_ERRORS && !defined ACPI_APPLICATION - /* - * For the kernel-resident ACPICA, optionally be silent about the - * NOT_FOUND case. Although this is potentially a serious problem, - * it can generate a lot of noise/errors on platforms whose - * firmware carries around a bunch of unused Package objects. - * To disable these errors, define ACPI_IGNORE_PACKAGE_RESOLUTION_ERRORS - * in the OS-specific header. - * - * All errors are always reported for ACPICA applications such as - * AcpiExec. - */ - if (Status == AE_NOT_FOUND) + if ((Status == AE_NOT_FOUND) && AcpiGbl_IgnorePackageResolutionErrors) { - /* Reference name not found, set the element to NULL */ + /* + * Optionally be silent about the NOT_FOUND case for the referenced + * name. Although this is potentially a serious problem, + * it can generate a lot of noise/errors on platforms whose + * firmware carries around a bunch of unused Package objects. + * To disable these errors, set this global to TRUE: + * AcpiGbl_IgnorePackageResolutionErrors + * + * If the AML actually tries to use such a package, the unresolved + * element(s) will be replaced with NULL elements. + */ + /* Referenced name not found, set the element to NULL */ + AcpiUtRemoveReference (*ElementPtr); *ElementPtr = NULL; return_VOID; } -#endif + Status2 = AcpiNsExternalizeName (ACPI_UINT32_MAX, (char *) Element->Reference.Aml, NULL, &ExternalPath); Modified: head/sys/contrib/dev/acpica/components/events/evevent.c ============================================================================== --- head/sys/contrib/dev/acpica/components/events/evevent.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/events/evevent.c Wed Mar 14 23:45:48 2018 (r330957) @@ -344,6 +344,7 @@ AcpiEvFixedEventDetect ( UINT32 FixedStatus; UINT32 FixedEnable; UINT32 i; + ACPI_STATUS Status; ACPI_FUNCTION_NAME (EvFixedEventDetect); @@ -353,8 +354,12 @@ AcpiEvFixedEventDetect ( * Read the fixed feature status and enable registers, as all the cases * depend on their values. Ignore errors here. */ - (void) AcpiHwRegisterRead (ACPI_REGISTER_PM1_STATUS, &FixedStatus); - (void) AcpiHwRegisterRead (ACPI_REGISTER_PM1_ENABLE, &FixedEnable); + Status = AcpiHwRegisterRead (ACPI_REGISTER_PM1_STATUS, &FixedStatus); + Status |= AcpiHwRegisterRead (ACPI_REGISTER_PM1_ENABLE, &FixedEnable); + if (ACPI_FAILURE (Status)) + { + return (IntStatus); + } ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, "Fixed Event Block: Enable %08X Status %08X\n", Modified: head/sys/contrib/dev/acpica/components/events/evgpe.c ============================================================================== --- head/sys/contrib/dev/acpica/components/events/evgpe.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/events/evgpe.c Wed Mar 14 23:45:48 2018 (r330957) @@ -226,7 +226,7 @@ AcpiEvUpdateGpeEnableMask ( * * RETURN: Status * - * DESCRIPTION: Clear a GPE of stale events and enable it. + * DESCRIPTION: Enable a GPE. * ******************************************************************************/ @@ -240,14 +240,6 @@ AcpiEvEnableGpe ( ACPI_FUNCTION_TRACE (EvEnableGpe); - /* Clear the GPE (of stale events) */ - - Status = AcpiHwClearGpe (GpeEventInfo); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - /* Enable the requested GPE */ Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE); @@ -542,17 +534,12 @@ UINT32 AcpiEvGpeDetect ( ACPI_GPE_XRUPT_INFO *GpeXruptList) { - ACPI_STATUS Status; ACPI_GPE_BLOCK_INFO *GpeBlock; ACPI_NAMESPACE_NODE *GpeDevice; ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; ACPI_GPE_EVENT_INFO *GpeEventInfo; UINT32 GpeNumber; - ACPI_GPE_HANDLER_INFO *GpeHandlerInfo; UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED; - UINT8 EnabledStatusByte; - UINT64 StatusReg; - UINT64 EnableReg; ACPI_CPU_FLAGS Flags; UINT32 i; UINT32 j; @@ -608,105 +595,25 @@ AcpiEvGpeDetect ( continue; } - /* Read the Status Register */ - - Status = AcpiHwRead (&StatusReg, &GpeRegisterInfo->StatusAddress); - if (ACPI_FAILURE (Status)) - { - goto UnlockAndExit; - } - - /* Read the Enable Register */ - - Status = AcpiHwRead (&EnableReg, &GpeRegisterInfo->EnableAddress); - if (ACPI_FAILURE (Status)) - { - goto UnlockAndExit; - } - - ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, - "Read registers for GPE %02X-%02X: Status=%02X, Enable=%02X, " - "RunEnable=%02X, WakeEnable=%02X\n", - GpeRegisterInfo->BaseGpeNumber, - GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1), - (UINT32) StatusReg, (UINT32) EnableReg, - GpeRegisterInfo->EnableForRun, - GpeRegisterInfo->EnableForWake)); - - /* Check if there is anything active at all in this register */ - - EnabledStatusByte = (UINT8) (StatusReg & EnableReg); - if (!EnabledStatusByte) - { - /* No active GPEs in this register, move on */ - - continue; - } - /* Now look at the individual GPEs in this byte register */ for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) { - /* Examine one GPE bit */ + /* Detect and dispatch one GPE bit */ GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i * ACPI_GPE_REGISTER_WIDTH) + j]; GpeNumber = j + GpeRegisterInfo->BaseGpeNumber; - - if (EnabledStatusByte & (1 << j)) - { - /* Invoke global event handler if present */ - - AcpiGpeCount++; - if (AcpiGbl_GlobalEventHandler) - { - AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_GPE, - GpeDevice, GpeNumber, - AcpiGbl_GlobalEventHandlerContext); - } - - /* Found an active GPE */ - - if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == - ACPI_GPE_DISPATCH_RAW_HANDLER) - { - /* Dispatch the event to a raw handler */ - - GpeHandlerInfo = GpeEventInfo->Dispatch.Handler; - - /* - * There is no protection around the namespace node - * and the GPE handler to ensure a safe destruction - * because: - * 1. The namespace node is expected to always - * exist after loading a table. - * 2. The GPE handler is expected to be flushed by - * AcpiOsWaitEventsComplete() before the - * destruction. - */ - AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); - IntStatus |= GpeHandlerInfo->Address ( - GpeDevice, GpeNumber, GpeHandlerInfo->Context); - Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); - } - else - { - /* - * Dispatch the event to a standard handler or - * method. - */ - IntStatus |= AcpiEvGpeDispatch (GpeDevice, - GpeEventInfo, GpeNumber); - } - } + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + IntStatus |= AcpiEvDetectGpe ( + GpeDevice, GpeEventInfo, GpeNumber); + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); } } GpeBlock = GpeBlock->Next; } -UnlockAndExit: - AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); return (IntStatus); } @@ -894,6 +801,137 @@ AcpiEvFinishGpe ( /******************************************************************************* * + * FUNCTION: AcpiEvDetectGpe + * + * PARAMETERS: GpeDevice - Device node. NULL for GPE0/GPE1 + * GpeEventInfo - Info for this GPE + * GpeNumber - Number relative to the parent GPE block + * + * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED + * + * DESCRIPTION: Detect and dispatch a General Purpose Event to either a function + * (e.g. EC) or method (e.g. _Lxx/_Exx) handler. + * NOTE: GPE is W1C, so it is possible to handle a single GPE from both + * task and irq context in parallel as long as the process to + * detect and mask the GPE is atomic. + * However the atomicity of ACPI_GPE_DISPATCH_RAW_HANDLER is + * dependent on the raw handler itself. + * + ******************************************************************************/ + +UINT32 +AcpiEvDetectGpe ( + ACPI_NAMESPACE_NODE *GpeDevice, + ACPI_GPE_EVENT_INFO *GpeEventInfo, + UINT32 GpeNumber) +{ + UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED; + UINT8 EnabledStatusByte; + UINT64 StatusReg; + UINT64 EnableReg; + UINT32 RegisterBit; + ACPI_GPE_REGISTER_INFO *GpeRegisterInfo; + ACPI_GPE_HANDLER_INFO *GpeHandlerInfo; + ACPI_CPU_FLAGS Flags; + ACPI_STATUS Status; + + + ACPI_FUNCTION_TRACE (EvGpeDetect); + + + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); + + /* Get the info block for the entire GPE register */ + + GpeRegisterInfo = GpeEventInfo->RegisterInfo; + + /* Get the register bitmask for this GPE */ + + RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo); + + /* GPE currently enabled (enable bit == 1)? */ + + Status = AcpiHwRead (&EnableReg, &GpeRegisterInfo->EnableAddress); + if (ACPI_FAILURE (Status)) + { + goto ErrorExit; + } + + /* GPE currently active (status bit == 1)? */ + + Status = AcpiHwRead (&StatusReg, &GpeRegisterInfo->StatusAddress); + if (ACPI_FAILURE (Status)) + { + goto ErrorExit; + } + + /* Check if there is anything active at all in this GPE */ + + ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, + "Read registers for GPE %02X: Status=%02X, Enable=%02X, " + "RunEnable=%02X, WakeEnable=%02X\n", + GpeNumber, + (UINT32) (StatusReg & RegisterBit), + (UINT32) (EnableReg & RegisterBit), + GpeRegisterInfo->EnableForRun, + GpeRegisterInfo->EnableForWake)); + + EnabledStatusByte = (UINT8) (StatusReg & EnableReg); + if (!(EnabledStatusByte & RegisterBit)) + { + goto ErrorExit; + } + + /* Invoke global event handler if present */ + + AcpiGpeCount++; + if (AcpiGbl_GlobalEventHandler) + { + AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_GPE, + GpeDevice, GpeNumber, + AcpiGbl_GlobalEventHandlerContext); + } + + /* Found an active GPE */ + + if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == + ACPI_GPE_DISPATCH_RAW_HANDLER) + { + /* Dispatch the event to a raw handler */ + + GpeHandlerInfo = GpeEventInfo->Dispatch.Handler; + + /* + * There is no protection around the namespace node + * and the GPE handler to ensure a safe destruction + * because: + * 1. The namespace node is expected to always + * exist after loading a table. + * 2. The GPE handler is expected to be flushed by + * AcpiOsWaitEventsComplete() before the + * destruction. + */ + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + IntStatus |= GpeHandlerInfo->Address ( + GpeDevice, GpeNumber, GpeHandlerInfo->Context); + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); + } + else + { + /* Dispatch the event to a standard handler or method. */ + + IntStatus |= AcpiEvGpeDispatch (GpeDevice, + GpeEventInfo, GpeNumber); + } + +ErrorExit: + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + return (IntStatus); +} + + +/******************************************************************************* + * * FUNCTION: AcpiEvGpeDispatch * * PARAMETERS: GpeDevice - Device node. NULL for GPE0/GPE1 @@ -904,8 +942,6 @@ AcpiEvFinishGpe ( * * DESCRIPTION: Dispatch a General Purpose Event to either a function (e.g. EC) * or method (e.g. _Lxx/_Exx) handler. - * - * This function executes at interrupt level. * ******************************************************************************/ Modified: head/sys/contrib/dev/acpica/components/events/evgpeblk.c ============================================================================== --- head/sys/contrib/dev/acpica/components/events/evgpeblk.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/events/evgpeblk.c Wed Mar 14 23:45:48 2018 (r330957) @@ -585,7 +585,7 @@ ACPI_STATUS AcpiEvInitializeGpeBlock ( ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_BLOCK_INFO *GpeBlock, - void *Ignored) + void *Context) { ACPI_STATUS Status; ACPI_GPE_EVENT_INFO *GpeEventInfo; @@ -593,6 +593,8 @@ AcpiEvInitializeGpeBlock ( UINT32 GpeIndex; UINT32 i; UINT32 j; + BOOLEAN *IsPollingNeeded = Context; + ACPI_ERROR_ONLY (UINT32 GpeNumber); ACPI_FUNCTION_TRACE (EvInitializeGpeBlock); @@ -622,14 +624,14 @@ AcpiEvInitializeGpeBlock ( GpeIndex = (i * ACPI_GPE_REGISTER_WIDTH) + j; GpeEventInfo = &GpeBlock->EventInfo[GpeIndex]; + ACPI_ERROR_ONLY(GpeNumber = GpeBlock->BlockBaseNumber + GpeIndex); + GpeEventInfo->Flags |= ACPI_GPE_INITIALIZED; /* * Ignore GPEs that have no corresponding _Lxx/_Exx method * and GPEs that are used to wake the system */ - if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_NONE) || - (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_HANDLER) || - (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_RAW_HANDLER) || + if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) != ACPI_GPE_DISPATCH_METHOD) || (GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE)) { continue; @@ -640,8 +642,16 @@ AcpiEvInitializeGpeBlock ( { ACPI_EXCEPTION ((AE_INFO, Status, "Could not enable GPE 0x%02X", - GpeIndex + GpeBlock->BlockBaseNumber)); + GpeNumber)); continue; + } + + GpeEventInfo->Flags |= ACPI_GPE_AUTO_ENABLED; + + if (IsPollingNeeded && + ACPI_GPE_IS_POLLING_NEEDED (GpeEventInfo)) + { + *IsPollingNeeded = TRUE; } GpeEnabledCount++; Modified: head/sys/contrib/dev/acpica/components/events/evrgnini.c ============================================================================== --- head/sys/contrib/dev/acpica/components/events/evrgnini.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/events/evrgnini.c Wed Mar 14 23:45:48 2018 (r330957) @@ -736,9 +736,12 @@ AcpiEvInitializeRegion ( * Node's object was replaced by this Method object and we * saved the handler in the method object. * + * Note: Only used for the legacy MLC support. Will + * be removed in the future. + * * See AcpiNsExecModuleCode */ - if (!AcpiGbl_ParseTableAsTermList && + if (!AcpiGbl_ExecuteTablesAsMethods && ObjDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL) { HandlerObj = ObjDesc->Method.Dispatch.Handler; Modified: head/sys/contrib/dev/acpica/components/events/evxface.c ============================================================================== --- head/sys/contrib/dev/acpica/components/events/evxface.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/events/evxface.c Wed Mar 14 23:45:48 2018 (r330957) @@ -1257,6 +1257,15 @@ AcpiRemoveGpeHandler ( Handler->OriginallyEnabled) { (void) AcpiEvAddGpeReference (GpeEventInfo); + if (ACPI_GPE_IS_POLLING_NEEDED (GpeEventInfo)) + { + /* Poll edge triggered GPEs to handle existing events */ + + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + (void) AcpiEvDetectGpe ( + GpeDevice, GpeEventInfo, GpeNumber); + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); + } } AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); Modified: head/sys/contrib/dev/acpica/components/events/evxfgpe.c ============================================================================== --- head/sys/contrib/dev/acpica/components/events/evxfgpe.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/events/evxfgpe.c Wed Mar 14 23:45:48 2018 (r330957) @@ -188,6 +188,7 @@ AcpiUpdateAllGpes ( void) { ACPI_STATUS Status; + BOOLEAN IsPollingNeeded = FALSE; ACPI_FUNCTION_TRACE (AcpiUpdateAllGpes); @@ -204,7 +205,8 @@ AcpiUpdateAllGpes ( goto UnlockAndExit; } - Status = AcpiEvWalkGpeList (AcpiEvInitializeGpeBlock, NULL); + Status = AcpiEvWalkGpeList (AcpiEvInitializeGpeBlock, + &IsPollingNeeded); if (ACPI_SUCCESS (Status)) { AcpiGbl_AllGpesInitialized = TRUE; @@ -212,6 +214,13 @@ AcpiUpdateAllGpes ( UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS); + + if (IsPollingNeeded && AcpiGbl_AllGpesInitialized) + { + /* Poll GPEs to handle already triggered events */ + + AcpiEvGpeDetect (AcpiGbl_GpeXruptListHead); + } return_ACPI_STATUS (Status); } @@ -259,6 +268,16 @@ AcpiEnableGpe ( ACPI_GPE_DISPATCH_NONE) { Status = AcpiEvAddGpeReference (GpeEventInfo); + if (ACPI_SUCCESS (Status) && + ACPI_GPE_IS_POLLING_NEEDED (GpeEventInfo)) + { + /* Poll edge-triggered GPEs to handle existing events */ + + AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + (void) AcpiEvDetectGpe ( + GpeDevice, GpeEventInfo, GpeNumber); + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); + } } else { @@ -608,6 +627,16 @@ AcpiSetupGpeForWake ( */ GpeEventInfo->Flags = (ACPI_GPE_DISPATCH_NOTIFY | ACPI_GPE_LEVEL_TRIGGERED); + } + else if (GpeEventInfo->Flags & ACPI_GPE_AUTO_ENABLED) + { + /* + * A reference to this GPE has been added during the GPE block + * initialization, so drop it now to prevent the GPE from being + * permanently enabled and clear its ACPI_GPE_AUTO_ENABLED flag. + */ + (void) AcpiEvRemoveGpeReference (GpeEventInfo); + GpeEventInfo->Flags &= ~~ACPI_GPE_AUTO_ENABLED; } /* Modified: head/sys/contrib/dev/acpica/components/executer/exdebug.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exdebug.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/executer/exdebug.c Wed Mar 14 23:45:48 2018 (r330957) @@ -204,15 +204,14 @@ AcpiExDoDebugObject ( return_VOID; } - /* Null string or newline -- don't emit the line header */ + /* Newline -- don't emit the line header */ if (SourceDesc && (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc) == ACPI_DESC_TYPE_OPERAND) && (SourceDesc->Common.Type == ACPI_TYPE_STRING)) { - if ((SourceDesc->String.Length == 0) || - ((SourceDesc->String.Length == 1) && - (*SourceDesc->String.Pointer == '\n'))) + if ((SourceDesc->String.Length == 1) && + (*SourceDesc->String.Pointer == '\n')) { AcpiOsPrintf ("\n"); return_VOID; Modified: head/sys/contrib/dev/acpica/components/hardware/hwgpe.c ============================================================================== --- head/sys/contrib/dev/acpica/components/hardware/hwgpe.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/hardware/hwgpe.c Wed Mar 14 23:45:48 2018 (r330957) @@ -658,7 +658,6 @@ AcpiHwDisableAllGpes ( Status = AcpiEvWalkGpeList (AcpiHwDisableGpeBlock, NULL); - Status = AcpiEvWalkGpeList (AcpiHwClearGpeBlock, NULL); return_ACPI_STATUS (Status); } Modified: head/sys/contrib/dev/acpica/components/hardware/hwsleep.c ============================================================================== --- head/sys/contrib/dev/acpica/components/hardware/hwsleep.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/hardware/hwsleep.c Wed Mar 14 23:45:48 2018 (r330957) @@ -198,16 +198,8 @@ AcpiHwLegacySleep ( return_ACPI_STATUS (Status); } - /* Clear all fixed and general purpose status bits */ - - Status = AcpiHwClearAcpiStatus (); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - /* - * 1) Disable/Clear all GPEs + * 1) Disable all GPEs * 2) Enable all wakeup GPEs */ Status = AcpiHwDisableAllGpes (); @@ -427,7 +419,7 @@ AcpiHwLegacyWake ( * might get fired there * * Restore the GPEs: - * 1) Disable/Clear all GPEs + * 1) Disable all GPEs * 2) Enable all runtime GPEs */ Status = AcpiHwDisableAllGpes (); Modified: head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c ============================================================================== --- head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c Wed Mar 14 23:45:48 2018 (r330957) @@ -337,7 +337,7 @@ AcpiEnterSleepStateS4bios ( } /* - * 1) Disable/Clear all GPEs + * 1) Disable all GPEs * 2) Enable all wakeup GPEs */ Status = AcpiHwDisableAllGpes (); Modified: head/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c Wed Mar 14 23:45:48 2018 (r330957) @@ -208,9 +208,8 @@ AcpiNsDumpOneDevice ( } ACPI_DEBUG_PRINT_RAW ((ACPI_DB_TABLES, - " HID: %s, ADR: %8.8X%8.8X, Status: %X\n", - Info->HardwareId.Value, ACPI_FORMAT_UINT64 (Info->Address), - Info->CurrentStatus)); + " HID: %s, ADR: %8.8X%8.8X\n", + Info->HardwareId.Value, ACPI_FORMAT_UINT64 (Info->Address))); ACPI_FREE (Info); } Modified: head/sys/contrib/dev/acpica/components/namespace/nseval.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nseval.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/namespace/nseval.c Wed Mar 14 23:45:48 2018 (r330957) @@ -429,7 +429,17 @@ AcpiNsEvaluate ( Status = AE_OK; } + else if (ACPI_FAILURE(Status)) + { + /* If ReturnObject exists, delete it */ + if (Info->ReturnObject) + { + AcpiUtRemoveReference (Info->ReturnObject); + Info->ReturnObject = NULL; + } + } + ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "*** Completed evaluation of object %s ***\n", Info->RelativePathname)); @@ -457,6 +467,17 @@ Cleanup: * DESCRIPTION: Execute all elements of the global module-level code list. * Each element is executed as a single control method. * + * NOTE: With this option enabled, each block of detected executable AML + * code that is outside of any control method is wrapped with a temporary + * control method object and placed on a global list. The methods on this + * list are executed below. + * + * This function executes the module-level code for all tables only after + * all of the tables have been loaded. It is a legacy option and is + * not compatible with other ACPI implementations. See AcpiNsLoadTable. + * + * This function will be removed when the legacy option is removed. + * ******************************************************************************/ void @@ -477,6 +498,9 @@ AcpiNsExecModuleCodeList ( Next = AcpiGbl_ModuleCodeList; if (!Next) { + ACPI_DEBUG_PRINT ((ACPI_DB_INIT_NAMES, + "Legacy MLC block list is empty\n")); + return_VOID; } Modified: head/sys/contrib/dev/acpica/components/namespace/nsload.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsload.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/namespace/nsload.c Wed Mar 14 23:45:48 2018 (r330957) @@ -270,23 +270,17 @@ Unlock: "**** Completed Table Object Initialization\n")); /* - * Execute any module-level code that was detected during the table load - * phase. Although illegal since ACPI 2.0, there are many machines that - * contain this type of code. Each block of detected executable AML code - * outside of any control method is wrapped with a temporary control - * method object and placed on a global list. The methods on this list - * are executed below. + * This case handles the legacy option that groups all module-level + * code blocks together and defers execution until all of the tables + * are loaded. Execute all of these blocks at this time. + * Execute any module-level code that was detected during the table + * load phase. * - * This case executes the module-level code for each table immediately - * after the table has been loaded. This provides compatibility with - * other ACPI implementations. Optionally, the execution can be deferred - * until later, see AcpiInitializeObjects. + * Note: this option is deprecated and will be eliminated in the + * future. Use of this option can cause problems with AML code that + * depends upon in-order immediate execution of module-level code. */ - if (!AcpiGbl_ParseTableAsTermList && !AcpiGbl_GroupModuleLevelCode) - { - AcpiNsExecModuleCodeList (); - } - + AcpiNsExecModuleCodeList (); return_ACPI_STATUS (Status); } Modified: head/sys/contrib/dev/acpica/components/namespace/nsparse.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsparse.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/namespace/nsparse.c Wed Mar 14 23:45:48 2018 (r330957) @@ -171,9 +171,18 @@ * * RETURN: Status * - * DESCRIPTION: Load ACPI/AML table by executing the entire table as a - * TermList. + * DESCRIPTION: Load ACPI/AML table by executing the entire table as a single + * large control method. * + * NOTE: The point of this is to execute any module-level code in-place + * as the table is parsed. Some AML code depends on this behavior. + * + * It is a run-time option at this time, but will eventually become + * the default. + * + * Note: This causes the table to only have a single-pass parse. + * However, this is compatible with other ACPI implementations. + * ******************************************************************************/ ACPI_STATUS @@ -403,8 +412,19 @@ AcpiNsParseTable ( ACPI_FUNCTION_TRACE (NsParseTable); - if (AcpiGbl_ParseTableAsTermList) + if (AcpiGbl_ExecuteTablesAsMethods) { + /* + * This case executes the AML table as one large control method. + * The point of this is to execute any module-level code in-place + * as the table is parsed. Some AML code depends on this behavior. + * + * It is a run-time option at this time, but will eventually become + * the default. + * + * Note: This causes the table to only have a single-pass parse. + * However, this is compatible with other ACPI implementations. + */ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_PARSE, "%s: **** Start table execution pass\n", ACPI_GET_FUNCTION_NAME)); Modified: head/sys/contrib/dev/acpica/components/namespace/nsxfname.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsxfname.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/namespace/nsxfname.c Wed Mar 14 23:45:48 2018 (r330957) @@ -376,7 +376,7 @@ AcpiNsCopyDeviceId ( * namespace node and possibly by running several standard * control methods (Such as in the case of a device.) * - * For Device and Processor objects, run the Device _HID, _UID, _CID, _STA, + * For Device and Processor objects, run the Device _HID, _UID, _CID, * _CLS, _ADR, _SxW, and _SxD methods. * * Note: Allocates the return buffer, must be freed by the caller. @@ -385,8 +385,9 @@ AcpiNsCopyDeviceId ( * discovery namespace traversal. Therefore, no complex methods can be * executed, especially those that access operation regions. Therefore, do * not add any additional methods that could cause problems in this area. - * this was the fate of the _SUB method which was found to cause such - * problems and was removed (11/2015). + * Because of this reason support for the following methods has been removed: + * 1) _SUB method was removed (11/2015) + * 2) _STA method was removed (02/2018) * ******************************************************************************/ @@ -517,25 +518,12 @@ AcpiGetObjectInfo ( { /* * Get extra info for ACPI Device/Processor objects only: - * Run the _STA, _ADR and, SxW, and _SxD methods. + * Run the _ADR and, SxW, and _SxD methods. * * Notes: none of these methods are required, so they may or may * not be present for this device. The Info->Valid bitfield is used * to indicate which methods were found and run successfully. - * - * For _STA, if the method does not exist, then (as per the ACPI - * specification), the returned CurrentStatus flags will indicate - * that the device is present/functional/enabled. Otherwise, the - * CurrentStatus flags reflect the value returned from _STA. */ - - /* Execute the Device._STA method */ - - Status = AcpiUtExecute_STA (Node, &Info->CurrentStatus); - if (ACPI_SUCCESS (Status)) - { - Valid |= ACPI_VALID_STA; - } /* Execute the Device._ADR method */ Modified: head/sys/contrib/dev/acpica/components/parser/psargs.c ============================================================================== --- head/sys/contrib/dev/acpica/components/parser/psargs.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/parser/psargs.c Wed Mar 14 23:45:48 2018 (r330957) @@ -1051,6 +1051,9 @@ AcpiPsGetNextArg ( if (Arg->Common.AmlOpcode == AML_INT_METHODCALL_OP) { + /* Free method call op and corresponding namestring sub-ob */ + + AcpiPsFreeOp (Arg->Common.Value.Arg); AcpiPsFreeOp (Arg); Arg = NULL; WalkState->ArgCount = 1; Modified: head/sys/contrib/dev/acpica/components/parser/psloop.c ============================================================================== --- head/sys/contrib/dev/acpica/components/parser/psloop.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/parser/psloop.c Wed Mar 14 23:45:48 2018 (r330957) @@ -287,10 +287,18 @@ AcpiPsGetArguments ( WalkState->ArgCount, WalkState->PassNumber)); /* - * Handle executable code at "module-level". This refers to - * executable opcodes that appear outside of any control method. + * This case handles the legacy option that groups all module-level + * code blocks together and defers execution until all of the tables + * are loaded. Execute all of these blocks at this time. + * Execute any module-level code that was detected during the table + * load phase. + * + * Note: this option is deprecated and will be eliminated in the + * future. Use of this option can cause problems with AML code that + * depends upon in-order immediate execution of module-level code. */ - if ((WalkState->PassNumber <= ACPI_IMODE_LOAD_PASS2) && + if (AcpiGbl_GroupModuleLevelCode && + (WalkState->PassNumber <= ACPI_IMODE_LOAD_PASS2) && ((WalkState->ParseFlags & ACPI_PARSE_DISASSEMBLE) == 0)) { /* @@ -439,6 +447,16 @@ AcpiPsGetArguments ( * DESCRIPTION: Wrap the module-level code with a method object and link the * object to the global list. Note, the mutex field of the method * object is used to link multiple module-level code objects. + * + * NOTE: In this legacy option, each block of detected executable AML + * code that is outside of any control method is wrapped with a temporary + * control method object and placed on a global list below. + * + * This function executes the module-level code for all tables only after + * all of the tables have been loaded. It is a legacy option and is + * not compatible with other ACPI implementations. See AcpiNsLoadTable. + * + * This function will be removed when the legacy option is removed. * ******************************************************************************/ Modified: head/sys/contrib/dev/acpica/components/parser/psobject.c ============================================================================== --- head/sys/contrib/dev/acpica/components/parser/psobject.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/parser/psobject.c Wed Mar 14 23:45:48 2018 (r330957) @@ -182,7 +182,7 @@ static ACPI_STATUS AcpiPsGetAmlOpcode ( ACPI_WALK_STATE *WalkState) { - UINT32 AmlOffset; + ACPI_ERROR_ONLY (UINT32 AmlOffset); ACPI_FUNCTION_TRACE_PTR (PsGetAmlOpcode, WalkState); @@ -217,8 +217,8 @@ AcpiPsGetAmlOpcode ( if (WalkState->PassNumber == 2) { - AmlOffset = (UINT32) ACPI_PTR_DIFF (WalkState->Aml, - WalkState->ParserState.AmlStart); + ACPI_ERROR_ONLY(AmlOffset = (UINT32) ACPI_PTR_DIFF (WalkState->Aml, + WalkState->ParserState.AmlStart)); ACPI_ERROR ((AE_INFO, "Unknown opcode 0x%.2X at table offset 0x%.4X, ignoring", Modified: head/sys/contrib/dev/acpica/components/tables/tbdata.c ============================================================================== --- head/sys/contrib/dev/acpica/components/tables/tbdata.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/tables/tbdata.c Wed Mar 14 23:45:48 2018 (r330957) @@ -1190,12 +1190,18 @@ AcpiTbLoadTable ( Status = AcpiNsLoadTable (TableIndex, ParentNode); - /* Execute any module-level code that was found in the table */ - - if (!AcpiGbl_ParseTableAsTermList && AcpiGbl_GroupModuleLevelCode) - { - AcpiNsExecModuleCodeList (); - } + /* + * This case handles the legacy option that groups all module-level + * code blocks together and defers execution until all of the tables + * are loaded. Execute all of these blocks at this time. + * Execute any module-level code that was detected during the table + * load phase. + * + * Note: this option is deprecated and will be eliminated in the + * future. Use of this option can cause problems with AML code that + * depends upon in-order immediate execution of module-level code. + */ + AcpiNsExecModuleCodeList (); /* * Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is Modified: head/sys/contrib/dev/acpica/components/tables/tbinstal.c ============================================================================== --- head/sys/contrib/dev/acpica/components/tables/tbinstal.c Wed Mar 14 23:42:28 2018 (r330956) +++ head/sys/contrib/dev/acpica/components/tables/tbinstal.c Wed Mar 14 23:45:48 2018 (r330957) @@ -356,11 +356,11 @@ AcpiTbOverrideTable ( ACPI_TABLE_DESC *OldTableDesc) { ACPI_STATUS Status; - char *OverrideType; ACPI_TABLE_DESC NewTableDesc; ACPI_TABLE_HEADER *Table; ACPI_PHYSICAL_ADDRESS Address; UINT32 Length; + ACPI_ERROR_ONLY (char *OverrideType); /* (1) Attempt logical override (returns a logical address) */ @@ -370,7 +370,7 @@ AcpiTbOverrideTable ( { AcpiTbAcquireTempTable (&NewTableDesc, ACPI_PTR_TO_PHYSADDR (Table), ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL); - OverrideType = "Logical"; + ACPI_ERROR_ONLY (OverrideType = "Logical"); goto FinishOverride; } @@ -382,7 +382,7 @@ AcpiTbOverrideTable ( { AcpiTbAcquireTempTable (&NewTableDesc, Address, ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL); - OverrideType = "Physical"; + ACPI_ERROR_ONLY (OverrideType = "Physical"); goto FinishOverride; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 14 23:59:27 2018 Return-Path: Delivered-To: svn-src-all@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 0D666F5391D; Wed, 14 Mar 2018 23:59:27 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E2617E8E9; Wed, 14 Mar 2018 23:59:26 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.15.2/8.15.2/ALCHEMY.FRANKEN.DE) with ESMTPS id w2ENxISs076904 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 15 Mar 2018 00:59:19 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.15.2/8.15.2/Submit) id w2ENxIKV076903; Thu, 15 Mar 2018 00:59:18 +0100 (CET) (envelope-from marius) Date: Thu, 15 Mar 2018 00:59:18 +0100 From: Marius Strobl To: Ed Maste Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327314 - head/sys/x86/x86 Message-ID: <20180314235918.GZ12352@alchemy.franken.de> References: <201712282146.vBSLk9Uo033652@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (alchemy.franken.de [0.0.0.0]); Thu, 15 Mar 2018 00:59:19 +0100 (CET) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 23:59:27 -0000 On Wed, Mar 14, 2018 at 07:18:41PM -0400, Ed Maste wrote: > On 28 December 2017 at 16:46, Marius Strobl wrote: > > Author: marius > > Date: Thu Dec 28 21:46:09 2017 > > New Revision: 327314 > > URL: https://svnweb.freebsd.org/changeset/base/327314 > > > > Log: > > With the advent of interrupt remapping, Intel has repurposed bit 11 > > (now: Interrupt_Index[15]) and assigned the previously reserved bits > > ... > > Will you MFC this to stable/11 so it can arrive in 11.2? Yes, in fact I was working on the MFCs when your e-mail arrived but am struggling with some unrelated build fuck-ups. Marius From owner-svn-src-all@freebsd.org Wed Mar 14 23:59:51 2018 Return-Path: Delivered-To: svn-src-all@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 A8F3EF5398F; Wed, 14 Mar 2018 23:59:51 +0000 (UTC) (envelope-from marius@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 56BDC7EA2E; Wed, 14 Mar 2018 23:59:51 +0000 (UTC) (envelope-from marius@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 519846A7B; Wed, 14 Mar 2018 23:59:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2ENxpEP066011; Wed, 14 Mar 2018 23:59:51 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2ENxpwO066010; Wed, 14 Mar 2018 23:59:51 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201803142359.w2ENxpwO066010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 14 Mar 2018 23:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330958 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/11/sys/x86/x86 X-SVN-Commit-Revision: 330958 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 23:59:51 -0000 Author: marius Date: Wed Mar 14 23:59:50 2018 New Revision: 330958 URL: https://svnweb.freebsd.org/changeset/base/330958 Log: MFC: 327314 With the advent of interrupt remapping, Intel has repurposed bit 11 (now: Interrupt_Index[15]) and assigned the previously reserved bits 55:48 (Interrupt_Index[14:0] goes into 63:49 while Destination Field used 63:56 and bit 48 now is Interrupt_Format) in the IO redirection tables (see the VT-d specification, "5.1.5.1 I/OxAPIC Programming"). Thus, when not using interrupt remapping, ensure that all previously reserved bits in the high part of the RTEs are zero instead of doing a read-modify-write for their Destination Field bits only. Otherwise, on machines based on Apollo Lake and its derivatives such as Denverton, typically some of the previously preserved bits remain set after boot when not employing interrupt remapping. The result is that INTx interrupts are not getting delivered. Note: With an AMD IOMMU, interrupt remapping apparently bypasses the IO APIC altogether. Submitted by: loos (modulo comment) Reviewed by: jhb (modulo comment) Modified: stable/11/sys/x86/x86/io_apic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/io_apic.c ============================================================================== --- stable/11/sys/x86/x86/io_apic.c Wed Mar 14 23:45:48 2018 (r330957) +++ stable/11/sys/x86/x86/io_apic.c Wed Mar 14 23:59:50 2018 (r330958) @@ -306,7 +306,7 @@ static void ioapic_program_intpin(struct ioapic_intsrc *intpin) { struct ioapic *io = (struct ioapic *)intpin->io_intsrc.is_pic; - uint32_t low, high, value; + uint32_t low, high; #ifdef ACPI_DMAR int error; #endif @@ -352,7 +352,11 @@ ioapic_program_intpin(struct ioapic_intsrc *intpin) } #endif - /* Set the destination. */ + /* + * Set the destination. Note that with Intel interrupt remapping, + * the previously reserved bits 55:48 now have a purpose so ensure + * these are zero. + */ low = IOART_DESTPHY; high = intpin->io_cpu << APIC_ID_SHIFT; @@ -390,10 +394,7 @@ ioapic_program_intpin(struct ioapic_intsrc *intpin) } /* Write the values to the APIC. */ - value = ioapic_read(io->io_addr, IOAPIC_REDTBL_HI(intpin->io_intpin)); - value &= ~IOART_DEST; - value |= high; - ioapic_write(io->io_addr, IOAPIC_REDTBL_HI(intpin->io_intpin), value); + ioapic_write(io->io_addr, IOAPIC_REDTBL_HI(intpin->io_intpin), high); intpin->io_lowreg = low; ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), low); } From owner-svn-src-all@freebsd.org Wed Mar 14 23:59:53 2018 Return-Path: Delivered-To: svn-src-all@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 E144EF53998; Wed, 14 Mar 2018 23:59:52 +0000 (UTC) (envelope-from marius@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 93D767EA31; Wed, 14 Mar 2018 23:59:52 +0000 (UTC) (envelope-from marius@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 74A646A7C; Wed, 14 Mar 2018 23:59:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2ENxqZR066054; Wed, 14 Mar 2018 23:59:52 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2ENxqO0066053; Wed, 14 Mar 2018 23:59:52 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201803142359.w2ENxqO0066053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 14 Mar 2018 23:59:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330959 - stable/10/sys/x86/x86 X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10/sys/x86/x86 X-SVN-Commit-Revision: 330959 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 23:59:53 -0000 Author: marius Date: Wed Mar 14 23:59:52 2018 New Revision: 330959 URL: https://svnweb.freebsd.org/changeset/base/330959 Log: MFC: 327314 With the advent of interrupt remapping, Intel has repurposed bit 11 (now: Interrupt_Index[15]) and assigned the previously reserved bits 55:48 (Interrupt_Index[14:0] goes into 63:49 while Destination Field used 63:56 and bit 48 now is Interrupt_Format) in the IO redirection tables (see the VT-d specification, "5.1.5.1 I/OxAPIC Programming"). Thus, when not using interrupt remapping, ensure that all previously reserved bits in the high part of the RTEs are zero instead of doing a read-modify-write for their Destination Field bits only. Otherwise, on machines based on Apollo Lake and its derivatives such as Denverton, typically some of the previously preserved bits remain set after boot when not employing interrupt remapping. The result is that INTx interrupts are not getting delivered. Note: With an AMD IOMMU, interrupt remapping apparently bypasses the IO APIC altogether. Submitted by: loos (modulo comment) Reviewed by: jhb (modulo comment) Modified: stable/10/sys/x86/x86/io_apic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/x86/io_apic.c ============================================================================== --- stable/10/sys/x86/x86/io_apic.c Wed Mar 14 23:59:50 2018 (r330958) +++ stable/10/sys/x86/x86/io_apic.c Wed Mar 14 23:59:52 2018 (r330959) @@ -252,7 +252,7 @@ static void ioapic_program_intpin(struct ioapic_intsrc *intpin) { struct ioapic *io = (struct ioapic *)intpin->io_intsrc.is_pic; - uint32_t low, high, value; + uint32_t low, high; /* * If a pin is completely invalid or if it is valid but hasn't @@ -270,7 +270,11 @@ ioapic_program_intpin(struct ioapic_intsrc *intpin) return; } - /* Set the destination. */ + /* + * Set the destination. Note that with Intel interrupt remapping, + * the previously reserved bits 55:48 now have a purpose so ensure + * these are zero. + */ low = IOART_DESTPHY; high = intpin->io_cpu << APIC_ID_SHIFT; @@ -308,10 +312,7 @@ ioapic_program_intpin(struct ioapic_intsrc *intpin) } /* Write the values to the APIC. */ - value = ioapic_read(io->io_addr, IOAPIC_REDTBL_HI(intpin->io_intpin)); - value &= ~IOART_DEST; - value |= high; - ioapic_write(io->io_addr, IOAPIC_REDTBL_HI(intpin->io_intpin), value); + ioapic_write(io->io_addr, IOAPIC_REDTBL_HI(intpin->io_intpin), high); intpin->io_lowreg = low; ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin), low); } From owner-svn-src-all@freebsd.org Thu Mar 15 00:43:26 2018 Return-Path: Delivered-To: svn-src-all@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 599E0F55FF9; Thu, 15 Mar 2018 00:43:26 +0000 (UTC) (envelope-from emaste@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 0362F805BF; Thu, 15 Mar 2018 00:43:26 +0000 (UTC) (envelope-from emaste@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 EEC747211; Thu, 15 Mar 2018 00:43:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2F0hPPH090897; Thu, 15 Mar 2018 00:43:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F0hP0t090896; Thu, 15 Mar 2018 00:43:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803150043.w2F0hP0t090896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Mar 2018 00:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330960 - stable/11/sys/dev/asmc X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/dev/asmc X-SVN-Commit-Revision: 330960 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 00:43:26 -0000 Author: emaste Date: Thu Mar 15 00:43:25 2018 New Revision: 330960 URL: https://svnweb.freebsd.org/changeset/base/330960 Log: MFC r330667: asmc: update temperature sensor name/description PR: 225911 Submitted by: Trev Modified: stable/11/sys/dev/asmc/asmcvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/asmc/asmcvar.h ============================================================================== --- stable/11/sys/dev/asmc/asmcvar.h Wed Mar 14 23:59:52 2018 (r330959) +++ stable/11/sys/dev/asmc/asmcvar.h Thu Mar 15 00:43:25 2018 (r330960) @@ -311,7 +311,7 @@ struct asmc_softc { "cpu0_proximity", "hdd_bay", \ "northbridge_die", \ "northbridge_proximity", \ - "wireless_module", } + "wireless_proximity", } #define ASMC_MM31_TEMPDESCS { "CPU0 Die Core Temperature", \ "CPU0 Heatsink Temperature", \ @@ -319,7 +319,7 @@ struct asmc_softc { "HDD Bay Temperature", \ "Northbridge Die Core Temperature", \ "Northbridge Proximity Temperature", \ - "Wireless Module Temperature", } + "Wireless Module Proximity Temperature", } #define ASMC_MP_TEMPS { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \ "TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \ From owner-svn-src-all@freebsd.org Thu Mar 15 00:44:35 2018 Return-Path: Delivered-To: svn-src-all@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 3C67FF5614A; Thu, 15 Mar 2018 00:44:35 +0000 (UTC) (envelope-from emaste@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 E1B7280752; Thu, 15 Mar 2018 00:44:34 +0000 (UTC) (envelope-from emaste@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 DC7697213; Thu, 15 Mar 2018 00:44:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2F0iYLp091025; Thu, 15 Mar 2018 00:44:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F0iYMG091024; Thu, 15 Mar 2018 00:44:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803150044.w2F0iYMG091024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Mar 2018 00:44:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330961 - stable/10/sys/dev/asmc X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/10/sys/dev/asmc X-SVN-Commit-Revision: 330961 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 00:44:35 -0000 Author: emaste Date: Thu Mar 15 00:44:34 2018 New Revision: 330961 URL: https://svnweb.freebsd.org/changeset/base/330961 Log: MFC r330667: asmc: update temperature sensor name/description PR: 225911 Submitted by: Trev Modified: stable/10/sys/dev/asmc/asmcvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/asmc/asmcvar.h ============================================================================== --- stable/10/sys/dev/asmc/asmcvar.h Thu Mar 15 00:43:25 2018 (r330960) +++ stable/10/sys/dev/asmc/asmcvar.h Thu Mar 15 00:44:34 2018 (r330961) @@ -241,7 +241,7 @@ struct asmc_softc { "cpu0_proximity", "hdd_bay", \ "northbridge_die", \ "northbridge_proximity", \ - "wireless_module", } + "wireless_proximity", } #define ASMC_MM31_TEMPDESCS { "CPU0 Die Core Temperature", \ "CPU0 Heatsink Temperature", \ @@ -249,7 +249,7 @@ struct asmc_softc { "HDD Bay Temperature", \ "Northbridge Die Core Temperature", \ "Northbridge Proximity Temperature", \ - "Wireless Module Temperature", } + "Wireless Module Proximity Temperature", } #define ASMC_MP_TEMPS { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \ "TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \ From owner-svn-src-all@freebsd.org Thu Mar 15 00:57:58 2018 Return-Path: Delivered-To: svn-src-all@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 727BCF56BF4; Thu, 15 Mar 2018 00:57:58 +0000 (UTC) (envelope-from emaste@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 21BC980DF4; Thu, 15 Mar 2018 00:57:58 +0000 (UTC) (envelope-from emaste@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 150CE739B; Thu, 15 Mar 2018 00:57:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2F0vvLd096172; Thu, 15 Mar 2018 00:57:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F0vvhe096171; Thu, 15 Mar 2018 00:57:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803150057.w2F0vvhe096171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Mar 2018 00:57:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330962 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 330962 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 00:57:58 -0000 Author: emaste Date: Thu Mar 15 00:57:57 2018 New Revision: 330962 URL: https://svnweb.freebsd.org/changeset/base/330962 Log: Remove KERNEL_RETPOLINE from BROKEN_OPTIONS on i386 Clang will compile both amd64 and i386 with retpoline. Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/kern.opts.mk Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Thu Mar 15 00:44:34 2018 (r330961) +++ head/sys/conf/kern.opts.mk Thu Mar 15 00:57:57 2018 (r330962) @@ -87,7 +87,7 @@ BROKEN_OPTIONS+= OFED .endif # Things that don't work based on toolchain support. -.if ${MACHINE} != "amd64" +.if ${MACHINE} != "i386" && ${MACHINE} != "amd64" BROKEN_OPTIONS+= KERNEL_RETPOLINE .endif From owner-svn-src-all@freebsd.org Thu Mar 15 01:07:22 2018 Return-Path: Delivered-To: svn-src-all@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 5996CF574BC; Thu, 15 Mar 2018 01:07:22 +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 0FD30813E8; Thu, 15 Mar 2018 01:07:22 +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 007087531; Thu, 15 Mar 2018 01:07:21 +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 w2F17Lto001606; Thu, 15 Mar 2018 01:07:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F17L4Y001605; Thu, 15 Mar 2018 01:07:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201803150107.w2F17L4Y001605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 15 Mar 2018 01:07:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330963 - head/sys/dev/isp X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/isp X-SVN-Commit-Revision: 330963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 01:07:22 -0000 Author: mav Date: Thu Mar 15 01:07:21 2018 New Revision: 330963 URL: https://svnweb.freebsd.org/changeset/base/330963 Log: Increase ABOUT FIRMWARE command timeout to 5s. It seems default timeout of 100ms is not enough for my 2694L card, while it was perfectly fine for others, even for full-height 2694. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Thu Mar 15 00:57:57 2018 (r330962) +++ head/sys/dev/isp/isp.c Thu Mar 15 01:07:21 2018 (r330963) @@ -876,6 +876,7 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults) } } } else if (IS_26XX(isp)) { + isp_prt(isp, ISP_LOGDEBUG1, "loading firmware from flash"); MBSINIT(&mbs, MBOX_LOAD_FLASH_FIRMWARE, MBLOGALL, 5000000); mbs.ibitm = 0x01; mbs.obitm = 0x07; @@ -913,9 +914,12 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults) * we still need to (re)start it. */ MBSINIT(&mbs, MBOX_EXEC_FIRMWARE, MBLOGALL, 5000000); - if (IS_24XX(isp)) { + if (IS_26XX(isp)) { mbs.param[1] = code_org >> 16; mbs.param[2] = code_org; + } else if (IS_24XX(isp)) { + mbs.param[1] = code_org >> 16; + mbs.param[2] = code_org; if (isp->isp_loaded_fw) { mbs.param[3] = 0; } else { @@ -954,7 +958,7 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults) * Ask the chip for the current firmware version. * This should prove that the new firmware is working. */ - MBSINIT(&mbs, MBOX_ABOUT_FIRMWARE, MBLOGALL, 0); + MBSINIT(&mbs, MBOX_ABOUT_FIRMWARE, MBLOGALL, 5000000); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { return; @@ -6739,7 +6743,7 @@ static const char *scsi_mbcmd_names[] = { static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x01, 0x01), /* 0x00: MBOX_NO_OP */ ISP_FC_OPMAP(0x1f, 0x01), /* 0x01: MBOX_LOAD_RAM */ - ISP_FC_OPMAP_HALF(0x07, 0xff, 0x00, 0x03), /* 0x02: MBOX_EXEC_FIRMWARE */ + ISP_FC_OPMAP_HALF(0x07, 0xff, 0x00, 0x1f), /* 0x02: MBOX_EXEC_FIRMWARE */ ISP_FC_OPMAP(0xdf, 0x01), /* 0x03: MBOX_DUMP_RAM */ ISP_FC_OPMAP(0x07, 0x07), /* 0x04: MBOX_WRITE_RAM_WORD */ ISP_FC_OPMAP(0x03, 0x07), /* 0x05: MBOX_READ_RAM_WORD */ From owner-svn-src-all@freebsd.org Thu Mar 15 02:25:29 2018 Return-Path: Delivered-To: svn-src-all@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 8B517F2CA74; Thu, 15 Mar 2018 02:25:29 +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 3CF8F84F66; Thu, 15 Mar 2018 02:25:29 +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 3613D10352; Thu, 15 Mar 2018 02:25:29 +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 w2F2PSdb041312; Thu, 15 Mar 2018 02:25:28 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F2PS5P041311; Thu, 15 Mar 2018 02:25:28 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803150225.w2F2PS5P041311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 02:25:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330965 - stable/11/usr.sbin/ypldap X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.sbin/ypldap X-SVN-Commit-Revision: 330965 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 02:25:29 -0000 Author: eadler Date: Thu Mar 15 02:25:28 2018 New Revision: 330965 URL: https://svnweb.freebsd.org/changeset/base/330965 Log: MFC r302535: Do not allow whitespace in macro names. Modified: stable/11/usr.sbin/ypldap/parse.y Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ypldap/parse.y ============================================================================== --- stable/11/usr.sbin/ypldap/parse.y Thu Mar 15 02:20:06 2018 (r330964) +++ stable/11/usr.sbin/ypldap/parse.y Thu Mar 15 02:25:28 2018 (r330965) @@ -144,6 +144,14 @@ include : INCLUDE STRING { ; varset : STRING '=' STRING { + char *s = $1; + while (*s++) { + if (isspace((unsigned char) *s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatal("cannot store variable"); free($1); From owner-svn-src-all@freebsd.org Thu Mar 15 02:20:07 2018 Return-Path: Delivered-To: svn-src-all@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 8EB27F2C3C3; Thu, 15 Mar 2018 02:20:07 +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 40FC084AC7; Thu, 15 Mar 2018 02:20:07 +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 3AD1B101C3; Thu, 15 Mar 2018 02:20:07 +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 w2F2K7B6036530; Thu, 15 Mar 2018 02:20:07 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F2K6ff036525; Thu, 15 Mar 2018 02:20:06 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803150220.w2F2K6ff036525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 02:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330964 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 330964 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 02:20:07 -0000 Author: eadler Date: Thu Mar 15 02:20:06 2018 New Revision: 330964 URL: https://svnweb.freebsd.org/changeset/base/330964 Log: MFC r302525,r302526: Do allow auditing of read(2) and write(2) system calls, by assigning those system calls audit event identifiers AUE_READ and AUE_WRITE. While auditing file-descriptor I/O is not required by the Common Criteria, in practice this proves useful for both live and forensic analysis. NB: freebsd32 already assigns AUE_READ and AUE_WRITE to read(2) and write(2). In process-descriptor close(2) and fstat(2), audit target process information. pgkill(2) already audits target process ID. Modified: stable/11/sys/kern/init_sysent.c stable/11/sys/kern/sys_procdesc.c stable/11/sys/kern/syscalls.master stable/11/sys/sys/sysproto.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/init_sysent.c ============================================================================== --- stable/11/sys/kern/init_sysent.c Thu Mar 15 01:07:21 2018 (r330963) +++ stable/11/sys/kern/init_sysent.c Thu Mar 15 02:20:06 2018 (r330964) @@ -48,8 +48,8 @@ struct sysent sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 0 = syscall */ { AS(sys_exit_args), (sy_call_t *)sys_sys_exit, AUE_EXIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 1 = exit */ { 0, (sy_call_t *)sys_fork, AUE_FORK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 2 = fork */ - { AS(read_args), (sy_call_t *)sys_read, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 3 = read */ - { AS(write_args), (sy_call_t *)sys_write, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 4 = write */ + { AS(read_args), (sy_call_t *)sys_read, AUE_READ, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 3 = read */ + { AS(write_args), (sy_call_t *)sys_write, AUE_WRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 4 = write */ { AS(open_args), (sy_call_t *)sys_open, AUE_OPEN_RWTC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 5 = open */ { AS(close_args), (sy_call_t *)sys_close, AUE_CLOSE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 6 = close */ { AS(wait4_args), (sy_call_t *)sys_wait4, AUE_WAIT4, NULL, 0, 0, 0, SY_THR_STATIC }, /* 7 = wait4 */ Modified: stable/11/sys/kern/sys_procdesc.c ============================================================================== --- stable/11/sys/kern/sys_procdesc.c Thu Mar 15 01:07:21 2018 (r330963) +++ stable/11/sys/kern/sys_procdesc.c Thu Mar 15 02:20:06 2018 (r330964) @@ -1,10 +1,15 @@ /*- - * Copyright (c) 2009 Robert N. M. Watson + * Copyright (c) 2009, 2016 Robert N. M. Watson * All rights reserved. * * This software was developed at the University of Cambridge Computer * Laboratory with support from a grant from Google, Inc. * + * Portions of this software were developed by BAE Systems, the University of + * Cambridge Computer Laboratory, and Memorial University under DARPA/AFRL + * contract FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent + * Computing (TC) research program. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -383,6 +388,7 @@ procdesc_close(struct file *fp, struct thread *td) sx_xunlock(&proctree_lock); } else { PROC_LOCK(p); + AUDIT_ARG_PROCESS(p); if (p->p_state == PRS_ZOMBIE) { /* * If the process is already dead and just awaiting @@ -529,6 +535,7 @@ procdesc_stat(struct file *fp, struct stat *sb, struct sx_slock(&proctree_lock); if (pd->pd_proc != NULL) { PROC_LOCK(pd->pd_proc); + AUDIT_ARG_PROCESS(pd->pd_proc); /* Set birth and [acm] times to process start time. */ pstart = pd->pd_proc->p_stats->p_start; Modified: stable/11/sys/kern/syscalls.master ============================================================================== --- stable/11/sys/kern/syscalls.master Thu Mar 15 01:07:21 2018 (r330963) +++ stable/11/sys/kern/syscalls.master Thu Mar 15 02:20:06 2018 (r330964) @@ -62,9 +62,9 @@ 1 AUE_EXIT STD { void sys_exit(int rval); } exit \ sys_exit_args void 2 AUE_FORK STD { int fork(void); } -3 AUE_NULL STD { ssize_t read(int fd, void *buf, \ +3 AUE_READ STD { ssize_t read(int fd, void *buf, \ size_t nbyte); } -4 AUE_NULL STD { ssize_t write(int fd, const void *buf, \ +4 AUE_WRITE STD { ssize_t write(int fd, const void *buf, \ size_t nbyte); } 5 AUE_OPEN_RWTC STD { int open(char *path, int flags, int mode); } ; XXX should be { int open(const char *path, int flags, ...); } Modified: stable/11/sys/sys/sysproto.h ============================================================================== --- stable/11/sys/sys/sysproto.h Thu Mar 15 01:07:21 2018 (r330963) +++ stable/11/sys/sys/sysproto.h Thu Mar 15 02:20:06 2018 (r330964) @@ -2518,8 +2518,8 @@ int freebsd10_pipe(struct thread *, struct freebsd10_p #define SYS_AUE_syscall AUE_NULL #define SYS_AUE_exit AUE_EXIT #define SYS_AUE_fork AUE_FORK -#define SYS_AUE_read AUE_NULL -#define SYS_AUE_write AUE_NULL +#define SYS_AUE_read AUE_READ +#define SYS_AUE_write AUE_WRITE #define SYS_AUE_open AUE_OPEN_RWTC #define SYS_AUE_close AUE_CLOSE #define SYS_AUE_wait4 AUE_WAIT4 From owner-svn-src-all@freebsd.org Thu Mar 15 02:32:23 2018 Return-Path: Delivered-To: svn-src-all@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 047BAF2D666; Thu, 15 Mar 2018 02:32:23 +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 ACEF485822; Thu, 15 Mar 2018 02:32:22 +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 A7DE8104E0; Thu, 15 Mar 2018 02:32:22 +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 w2F2WMii046338; Thu, 15 Mar 2018 02:32:22 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F2WM8N046337; Thu, 15 Mar 2018 02:32:22 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803150232.w2F2WM8N046337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 02:32:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330966 - stable/11/lib/libcompat/4.3 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/lib/libcompat/4.3 X-SVN-Commit-Revision: 330966 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 02:32:23 -0000 Author: eadler Date: Thu Mar 15 02:32:22 2018 New Revision: 330966 URL: https://svnweb.freebsd.org/changeset/base/330966 Log: MFC r329102: libcompat: Use %hu for unsigned shorts. Modified: stable/11/lib/libcompat/4.3/rexec.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libcompat/4.3/rexec.c ============================================================================== --- stable/11/lib/libcompat/4.3/rexec.c Thu Mar 15 02:25:28 2018 (r330965) +++ stable/11/lib/libcompat/4.3/rexec.c Thu Mar 15 02:32:22 2018 (r330966) @@ -356,7 +356,7 @@ retry: goto bad; } port = ntohs((u_short)sin2.sin_port); - (void) sprintf(num, "%u", port); + (void) sprintf(num, "%hu", port); (void) write(s, num, strlen(num)+1); { int len = sizeof (from); s3 = accept(s2, (struct sockaddr *)&from, &len); From owner-svn-src-all@freebsd.org Thu Mar 15 04:59:48 2018 Return-Path: Delivered-To: svn-src-all@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 6C1A1F4C072; Thu, 15 Mar 2018 04:59:48 +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 14AAC6BCEB; Thu, 15 Mar 2018 04:59:48 +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 0C58011C0A; Thu, 15 Mar 2018 04:59:48 +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 w2F4xlWR018119; Thu, 15 Mar 2018 04:59:47 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F4xl9X018118; Thu, 15 Mar 2018 04:59:47 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803150459.w2F4xl9X018118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 04:59:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330967 - stable/11/usr.sbin/fwcontrol X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.sbin/fwcontrol X-SVN-Commit-Revision: 330967 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 04:59:48 -0000 Author: eadler Date: Thu Mar 15 04:59:47 2018 New Revision: 330967 URL: https://svnweb.freebsd.org/changeset/base/330967 Log: MFC r327279,r327571: Close fd when we're done dv-sending the file. Modified: stable/11/usr.sbin/fwcontrol/fwdv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/fwcontrol/fwdv.c ============================================================================== --- stable/11/usr.sbin/fwcontrol/fwdv.c Thu Mar 15 02:32:22 2018 (r330966) +++ stable/11/usr.sbin/fwcontrol/fwdv.c Thu Mar 15 04:59:47 2018 (r330967) @@ -409,7 +409,6 @@ again: err(1, "write failed"); } } - close(fd); fprintf(stderr, "\n"); send_end: gettimeofday(&end, NULL); @@ -417,4 +416,5 @@ send_end: + (end.tv_usec - start.tv_usec) * 1e-6; fprintf(stderr, "%d frames, %.2f secs, %.2f frames/sec\n", frames, rtime, frames/rtime); + close(fd); } From owner-svn-src-all@freebsd.org Thu Mar 15 05:04:47 2018 Return-Path: Delivered-To: svn-src-all@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 49CD2F4C746; Thu, 15 Mar 2018 05:04:47 +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 DF2246C192; Thu, 15 Mar 2018 05:04:46 +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 BB91211D9D; Thu, 15 Mar 2018 05:04:46 +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 w2F54kr2022961; Thu, 15 Mar 2018 05:04:46 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F54ks2022958; Thu, 15 Mar 2018 05:04:46 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803150504.w2F54ks2022958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 05:04:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330968 - in stable/11/usr.sbin: ifmcstat pciconf X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/usr.sbin: ifmcstat pciconf X-SVN-Commit-Revision: 330968 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 05:04:47 -0000 Author: eadler Date: Thu Mar 15 05:04:46 2018 New Revision: 330968 URL: https://svnweb.freebsd.org/changeset/base/330968 Log: MFC r327580,r327581: bits is never null when we call ot. Add an assert to that effect and remove test for NULL. Remove dead code (comma is either 0 or 1 for sure, no need to test). Close /dev/pci when we're done with it. Modified: stable/11/usr.sbin/ifmcstat/printb.c stable/11/usr.sbin/pciconf/cap.c stable/11/usr.sbin/pciconf/pciconf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ifmcstat/printb.c ============================================================================== --- stable/11/usr.sbin/ifmcstat/printb.c Thu Mar 15 04:59:47 2018 (r330967) +++ stable/11/usr.sbin/ifmcstat/printb.c Thu Mar 15 05:04:46 2018 (r330968) @@ -32,6 +32,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include /* @@ -43,7 +44,8 @@ printb(const char *s, unsigned int v, const char *bits int i, any = 0; char c; - if (bits && *bits == 8) + assert(bits != NULL); + if (*bits == 8) printf("%s=%o", s, v); else printf("%s=%x", s, v); Modified: stable/11/usr.sbin/pciconf/cap.c ============================================================================== --- stable/11/usr.sbin/pciconf/cap.c Thu Mar 15 04:59:47 2018 (r330967) +++ stable/11/usr.sbin/pciconf/cap.c Thu Mar 15 05:04:46 2018 (r330968) @@ -161,7 +161,7 @@ cap_pcix(int fd, struct pci_conf *p, uint8_t ptr) printf("supports"); comma = 0; if (status & PCIXM_STATUS_133CAP) { - printf("%s 133MHz", comma ? "," : ""); + printf(" 133MHz"); comma = 1; } if (status & PCIXM_STATUS_266CAP) { @@ -351,10 +351,8 @@ cap_vendor(int fd, struct pci_conf *p, uint8_t ptr) printf("%s SATA RAID-0/1/10", comma ? "," : ""); comma = 1; } - if (fvec & (1 << 3)) { - printf("%s SATA AHCI", comma ? "," : ""); - comma = 1; - } + if (fvec & (1 << 3)) + printf(", SATA AHCI"); } } } Modified: stable/11/usr.sbin/pciconf/pciconf.c ============================================================================== --- stable/11/usr.sbin/pciconf/pciconf.c Thu Mar 15 04:59:47 2018 (r330967) +++ stable/11/usr.sbin/pciconf/pciconf.c Thu Mar 15 05:04:46 2018 (r330968) @@ -1001,6 +1001,7 @@ writeit(const char *name, const char *reg, const char if (ioctl(fd, PCIOCWRITE, &pi) < 0) err(1, "ioctl(PCIOCWRITE)"); + close(fd); } static void @@ -1020,4 +1021,5 @@ chkattached(const char *name) exitstatus = pi.pi_data ? 0 : 2; /* exit(2), if NOT attached */ printf("%s: %s%s\n", name, pi.pi_data == 0 ? "not " : "", "attached"); + close(fd); } From owner-svn-src-all@freebsd.org Thu Mar 15 05:13:30 2018 Return-Path: Delivered-To: svn-src-all@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 3C6E4F4D315; Thu, 15 Mar 2018 05:13:30 +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 E1DD26C755; Thu, 15 Mar 2018 05:13:29 +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 DC2FE11F21; Thu, 15 Mar 2018 05:13:29 +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 w2F5DTso028196; Thu, 15 Mar 2018 05:13:29 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F5DTvO028195; Thu, 15 Mar 2018 05:13:29 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803150513.w2F5DTvO028195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 05:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330969 - stable/11/usr.bin/mail X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/mail X-SVN-Commit-Revision: 330969 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 05:13:30 -0000 Author: eadler Date: Thu Mar 15 05:13:29 2018 New Revision: 330969 URL: https://svnweb.freebsd.org/changeset/base/330969 Log: MFC r302533: mail(1): Fix a comment. Modified: stable/11/usr.bin/mail/collect.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mail/collect.c ============================================================================== --- stable/11/usr.bin/mail/collect.c Thu Mar 15 05:04:46 2018 (r330968) +++ stable/11/usr.bin/mail/collect.c Thu Mar 15 05:13:29 2018 (r330969) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include "extern.h" /* - * Read a message from standard output and return a read file to it + * Read a message from standard input and return a read file to it * or NULL on error. */ From owner-svn-src-all@freebsd.org Thu Mar 15 05:58:36 2018 Return-Path: Delivered-To: svn-src-all@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 7DF8EF5034D; Thu, 15 Mar 2018 05:58:36 +0000 (UTC) (envelope-from tsoome@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 2B8016E152; Thu, 15 Mar 2018 05:58:36 +0000 (UTC) (envelope-from tsoome@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 267B71255B; Thu, 15 Mar 2018 05:58:36 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2F5warL052189; Thu, 15 Mar 2018 05:58:36 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F5wZDa052186; Thu, 15 Mar 2018 05:58:35 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201803150558.w2F5wZDa052186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 15 Mar 2018 05:58:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330970 - in head/stand/efi: include libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/stand/efi: include libefi X-SVN-Commit-Revision: 330970 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 05:58:36 -0000 Author: tsoome Date: Thu Mar 15 05:58:35 2018 New Revision: 330970 URL: https://svnweb.freebsd.org/changeset/base/330970 Log: libefi: UEFI_BOOT_VAR_GUID duplicates EFI_GLOBAL_VARIABLE Drop UEFI_BOOT_VAR_GUID and use EFI_GLOBAL_VARIABLE. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D14696 Modified: head/stand/efi/include/efi.h head/stand/efi/libefi/efienv.c Modified: head/stand/efi/include/efi.h ============================================================================== --- head/stand/efi/include/efi.h Thu Mar 15 05:13:29 2018 (r330969) +++ head/stand/efi/include/efi.h Thu Mar 15 05:58:35 2018 (r330970) @@ -59,7 +59,5 @@ Revision History */ #define FREEBSD_BOOT_VAR_GUID \ { 0xCFEE69AD, 0xA0DE, 0x47A9, {0x93, 0xA8, 0xF6, 0x31, 0x06, 0xF8, 0xAE, 0x99} } -#define UEFI_BOOT_VAR_GUID \ - { 0x8be4df61, 0x93ca, 0x11d2, {0xaa, 0x0d, 0x00, 0xe0, 0x98, 0x03, 0x2b, 0x8c} } #endif Modified: head/stand/efi/libefi/efienv.c ============================================================================== --- head/stand/efi/libefi/efienv.c Thu Mar 15 05:13:29 2018 (r330969) +++ head/stand/efi/libefi/efienv.c Thu Mar 15 05:58:35 2018 (r330970) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); #include static EFI_GUID FreeBSDBootVarGUID = FREEBSD_BOOT_VAR_GUID; -static EFI_GUID GlobalBootVarGUID = UEFI_BOOT_VAR_GUID; +static EFI_GUID GlobalBootVarGUID = EFI_GLOBAL_VARIABLE; EFI_STATUS efi_getenv(EFI_GUID *g, const char *v, void *data, size_t *len) From owner-svn-src-all@freebsd.org Thu Mar 15 06:19:46 2018 Return-Path: Delivered-To: svn-src-all@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 A7BC1F51087; Thu, 15 Mar 2018 06:19:46 +0000 (UTC) (envelope-from wma@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 4E6C46ED2D; Thu, 15 Mar 2018 06:19:46 +0000 (UTC) (envelope-from wma@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 44D5212861; Thu, 15 Mar 2018 06:19:46 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2F6Jkjf063626; Thu, 15 Mar 2018 06:19:46 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F6JjEP063620; Thu, 15 Mar 2018 06:19:45 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201803150619.w2F6JjEP063620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Thu, 15 Mar 2018 06:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330971 - in head/sys: conf powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: wma X-SVN-Commit-Paths: in head/sys: conf powerpc/powernv X-SVN-Commit-Revision: 330971 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 06:19:47 -0000 Author: wma Date: Thu Mar 15 06:19:45 2018 New Revision: 330971 URL: https://svnweb.freebsd.org/changeset/base/330971 Log: Reverting r330925 for now Modified: head/sys/conf/files.powerpc head/sys/powerpc/powernv/opal_i2c.c head/sys/powerpc/powernv/opal_i2cm.c head/sys/powerpc/powernv/powernv_centaur.c head/sys/powerpc/powernv/powernv_xscom.c Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Thu Mar 15 05:58:35 2018 (r330970) +++ head/sys/conf/files.powerpc Thu Mar 15 06:19:45 2018 (r330971) @@ -186,8 +186,8 @@ powerpc/powermac/vcoregpio.c optional powermac powerpc/powernv/opal.c optional powernv powerpc/powernv/opal_console.c optional powernv powerpc/powernv/opal_dev.c optional powernv -powerpc/powernv/opal_i2c.c optional iicbus powernv -powerpc/powernv/opal_i2cm.c optional iicbus powernv +powerpc/powernv/opal_i2c.c optional iicbus fdt powernv +powerpc/powernv/opal_i2cm.c optional iicbus fdt powernv powerpc/powernv/opal_pci.c optional powernv pci powerpc/powernv/opalcall.S optional powernv powerpc/powernv/platform_powernv.c optional powernv Modified: head/sys/powerpc/powernv/opal_i2c.c ============================================================================== --- head/sys/powerpc/powernv/opal_i2c.c Thu Mar 15 05:58:35 2018 (r330970) +++ head/sys/powerpc/powernv/opal_i2c.c Thu Mar 15 06:19:45 2018 (r330971) @@ -120,9 +120,7 @@ static int opal_i2c_probe(device_t dev) { -#ifdef FDT if (!(ofw_bus_is_compatible(dev, "ibm,opal-i2c"))) -#endif return (ENXIO); device_set_desc(dev, "opal-i2c"); @@ -133,7 +131,6 @@ opal_i2c_probe(device_t dev) static int opal_i2c_attach(device_t dev) { -#ifdef FDT struct opal_i2c_softc *sc; int len; @@ -153,9 +150,6 @@ opal_i2c_attach(device_t dev) I2C_LOCK_INIT(sc); return (bus_generic_attach(dev)); -#else - return (ENXIO); -#endif } static int Modified: head/sys/powerpc/powernv/opal_i2cm.c ============================================================================== --- head/sys/powerpc/powernv/opal_i2cm.c Thu Mar 15 05:58:35 2018 (r330970) +++ head/sys/powerpc/powernv/opal_i2cm.c Thu Mar 15 06:19:45 2018 (r330971) @@ -57,17 +57,14 @@ struct opal_i2cm_softc static int opal_i2cm_attach(device_t); static int opal_i2cm_probe(device_t); -#ifdef FDT static const struct ofw_bus_devinfo * opal_i2cm_get_devinfo(device_t, device_t); -#endif static device_method_t opal_i2cm_methods[] = { /* Device interface */ DEVMETHOD(device_probe, opal_i2cm_probe), DEVMETHOD(device_attach, opal_i2cm_attach), -#ifdef FDT /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_devinfo, opal_i2cm_get_devinfo), DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), @@ -75,7 +72,6 @@ static device_method_t opal_i2cm_methods[] = { DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), -#endif DEVMETHOD_END }; @@ -86,10 +82,8 @@ static int opal_i2cm_probe(device_t dev) { -#ifdef FDT if (!(ofw_bus_is_compatible(dev, "ibm,centaur-i2cm") || ofw_bus_is_compatible(dev, "ibm,power8-i2cm"))) -#endif return (ENXIO); device_set_desc(dev, "centaur-i2cm"); @@ -99,7 +93,6 @@ opal_i2cm_probe(device_t dev) static int opal_i2cm_attach(device_t dev) { -#ifdef FDT phandle_t child; device_t cdev; struct ofw_bus_devinfo *dinfo; @@ -123,18 +116,13 @@ opal_i2cm_attach(device_t dev) } return (bus_generic_attach(dev)); -#else - return (ENXIO); -#endif } -#ifdef FDT static const struct ofw_bus_devinfo * opal_i2cm_get_devinfo(device_t dev, device_t child) { return (device_get_ivars(child)); } -#endif DEFINE_CLASS_0(opal_i2cm, opal_i2cm_driver, opal_i2cm_methods, sizeof(struct opal_i2cm_softc)); Modified: head/sys/powerpc/powernv/powernv_centaur.c ============================================================================== --- head/sys/powerpc/powernv/powernv_centaur.c Thu Mar 15 05:58:35 2018 (r330970) +++ head/sys/powerpc/powernv/powernv_centaur.c Thu Mar 15 06:19:45 2018 (r330971) @@ -57,17 +57,14 @@ struct powernv_centaur_softc static int powernv_centaur_attach(device_t); static int powernv_centaur_probe(device_t); -#ifdef FDT static const struct ofw_bus_devinfo * powernv_centaur_get_devinfo(device_t, device_t); -#endif static device_method_t powernv_centaur_methods[] = { /* Device interface */ DEVMETHOD(device_probe, powernv_centaur_probe), DEVMETHOD(device_attach, powernv_centaur_attach), -#ifdef FDT /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_devinfo, powernv_centaur_get_devinfo), DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), @@ -75,7 +72,7 @@ static device_method_t powernv_centaur_methods[] = { DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), -#endif + DEVMETHOD_END }; @@ -85,9 +82,7 @@ static int powernv_centaur_probe(device_t dev) { -#ifdef FDT if (!(ofw_bus_is_compatible(dev, "ibm,centaur"))) -#endif return (ENXIO); device_set_desc(dev, "centaur"); @@ -97,7 +92,6 @@ powernv_centaur_probe(device_t dev) static int powernv_centaur_attach(device_t dev) { -#ifdef FDT phandle_t child; device_t cdev; struct ofw_bus_devinfo *dinfo; @@ -121,18 +115,13 @@ powernv_centaur_attach(device_t dev) } return (bus_generic_attach(dev)); -#else - return (ENXIO); -#endif } -#ifdef FDT static const struct ofw_bus_devinfo * powernv_centaur_get_devinfo(device_t dev, device_t child) { return (device_get_ivars(child)); } -#endif DEFINE_CLASS_0(powernv_centaur, powernv_centaur_driver, powernv_centaur_methods, sizeof(struct powernv_centaur_softc)); Modified: head/sys/powerpc/powernv/powernv_xscom.c ============================================================================== --- head/sys/powerpc/powernv/powernv_xscom.c Thu Mar 15 05:58:35 2018 (r330970) +++ head/sys/powerpc/powernv/powernv_xscom.c Thu Mar 15 06:19:45 2018 (r330971) @@ -57,17 +57,14 @@ struct powernv_xscom_softc static int powernv_xscom_attach(device_t); static int powernv_xscom_probe(device_t); -#ifdef FDT static const struct ofw_bus_devinfo * powernv_xscom_get_devinfo(device_t, device_t); -#endif static device_method_t powernv_xscom_methods[] = { /* Device interface */ DEVMETHOD(device_probe, powernv_xscom_probe), DEVMETHOD(device_attach, powernv_xscom_attach), -#ifdef FDT /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_devinfo, powernv_xscom_get_devinfo), DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), @@ -75,7 +72,6 @@ static device_method_t powernv_xscom_methods[] = { DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), -#endif DEVMETHOD_END }; @@ -86,9 +82,7 @@ static int powernv_xscom_probe(device_t dev) { -#ifdef FDT if (!(ofw_bus_is_compatible(dev, "ibm,xscom"))) -#endif return (ENXIO); device_set_desc(dev, "xscom"); @@ -98,7 +92,6 @@ powernv_xscom_probe(device_t dev) static int powernv_xscom_attach(device_t dev) { -#ifdef FDT phandle_t child; device_t cdev; struct ofw_bus_devinfo *dinfo; @@ -122,18 +115,13 @@ powernv_xscom_attach(device_t dev) } return (bus_generic_attach(dev)); -#else - return (ENXIO); -#endif } -#ifdef FDT static const struct ofw_bus_devinfo * powernv_xscom_get_devinfo(device_t dev, device_t child) { return (device_get_ivars(child)); } -#endif DEFINE_CLASS_0(powernv_xscom, powernv_xscom_driver, powernv_xscom_methods, sizeof(struct powernv_xscom_softc)); From owner-svn-src-all@freebsd.org Thu Mar 15 08:30:06 2018 Return-Path: Delivered-To: svn-src-all@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 9D83AF586E9; Thu, 15 Mar 2018 08:30:06 +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 4CE0273A0C; Thu, 15 Mar 2018 08:30:06 +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 2D8F913C61; Thu, 15 Mar 2018 08:30:06 +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 w2F8U6If030363; Thu, 15 Mar 2018 08:30:06 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F8U5q8030361; Thu, 15 Mar 2018 08:30:05 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803150830.w2F8U5q8030361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 08:30:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330972 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 330972 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 08:30:06 -0000 Author: eadler Date: Thu Mar 15 08:30:05 2018 New Revision: 330972 URL: https://svnweb.freebsd.org/changeset/base/330972 Log: MFC r303063,r311852,r311930,r317040,r320506,r321301,r325162,r326759,r329004,: Add myself (stevek) as a src committer and mentor (sjg) to committers-src.dot Approved by: sjg (mentor) ------------------------------------------------------------------------ r311852 | ler | 2017-01-10 04:31:56 +0000 (Tue, 10 Jan 2017) | 5 lines Add myself to committers-ports.dot Approved by: adamw (mentor) Differential Revision: https://reviews.freebsd.org/D9117 ------------------------------------------------------------------------ r311930 | dumbbell | 2017-01-11 19:29:28 +0000 (Wed, 11 Jan 2017) | 5 lines committers-ports.dot: Add myself Approved by: antoine (mentor) Differential Revision: https://reviews.freebsd.org/D9143 ------------------------------------------------------------------------ r317040 | ganbold | 2017-04-17 07:27:45 +0000 (Mon, 17 Apr 2017) | 2 lines Belatedly add myself to committers-src.dot file. ------------------------------------------------------------------------ r320506 | kevans | 2017-06-30 20:01:31 +0000 (Fri, 30 Jun 2017) | 5 lines Add myself to commiters-src.dot, emaste@ as mentor; sort his mentees while here Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D11429 ------------------------------------------------------------------------ r321301 | mjoras | 2017-07-20 18:14:27 +0000 (Thu, 20 Jul 2017) | 5 lines Add myself and mentor line to committers-src.dot. Approved by: rstone (mentor) Differential Revision: https://reviews.freebsd.org/D11672 ------------------------------------------------------------------------ r325162 | arichardson | 2017-10-30 18:17:02 +0000 (Mon, 30 Oct 2017) | 5 lines Add myself to committers-src.dot Reviewed by: jhb (mentor) Approved by: jhb (mentor) ------------------------------------------------------------------------ r326759 | chuck | 2017-12-11 04:40:25 +0000 (Mon, 11 Dec 2017) | 6 lines Add myself to committers-src.dot Reviewed by: ken, imp Approved by: ken (mentor), imp (mentor) Differential Revision: https://reviews.freebsd.org/D13406 ------------------------------------------------------------------------ r329004 | jeb | 2018-02-08 00:14:20 +0000 (Thu, 08 Feb 2018) | 5 lines Add myself to committers-src.dot Reviewed by: erj (mentor) Approved by: erj (mentor) Modified: stable/11/share/misc/committers-ports.dot stable/11/share/misc/committers-src.dot Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/committers-ports.dot ============================================================================== --- stable/11/share/misc/committers-ports.dot Thu Mar 15 06:19:45 2018 (r330971) +++ stable/11/share/misc/committers-ports.dot Thu Mar 15 08:30:05 2018 (r330972) @@ -90,6 +90,7 @@ delphij [label="Xin Li\ndelphij@FreeBSD.org\n2006/05/0 demon [label="Dmitry Sivachenko\ndemon@FreeBSD.org\n2000/11/13"] dhn [label="Dennis Herrmann\ndhn@FreeBSD.org\n2009/03/03"] dryice [label="Dryice Dong Liu\ndryice@FreeBSD.org\n2006/12/25"] +dumbbell [label="Jean-Sebastien Pedron\ndumbbell@FreeBSD.org\n2017/01/10"] dvl [label="Dan Langille\ndvl@FreeBSD.org\n2014/08/10"] eadler [label="Eitan Adler\neadler@FreeBSD.org\n2011/08/17"] edwin [label="Edwin Groothuis\nedwin@FreeBSD.org\n2002/10/22"] @@ -143,6 +144,7 @@ laszlof [label="Frank Laszlo\nlaszlof@FreeBSD.org\n200 lawrance [label="Sam Lawrance\nlawrance@FreeBSD.org\n2005/04/11\n2007/02/21"] lbr [label="Lars Balker Rasmussen\nlbr@FreeBSD.org\n2006/04/30"] leeym [label="Yen-Ming Lee\nleeym@FreeBSD.org\n2002/08/14"] +ler [label="Larry Rosenman\nler@FreeBSD.org\n2017/01/09"] lev [label="Lev Serebryakov\nlev@FreeBSD.org\n2003/06/17"] linimon [label="Mark Linimon\nlinimon@FreeBSD.org\n2003/10/23"] lioux [label="Mario Sergio Fujikawa Ferriera\nlioux@FreeBSD.org\n2000/10/14"] @@ -248,6 +250,7 @@ znerd [label="Ernst de Haan\nznerd@FreeBSD.org\n2001/1 adamw -> ahze adamw -> jylefort +adamw -> ler adamw -> mezz adamw -> pav adamw -> woodsb02 @@ -257,6 +260,8 @@ ade -> jpaetzel ahze -> shaun ahze -> tmclaugh +antoine -> dumbbell + araujo -> lippe araujo -> pclin araujo -> pgollucci @@ -275,6 +280,7 @@ bdrewery -> trociny bapt -> bdrewery bapt -> bofh +bapt -> dumbbell bapt -> eadler bapt -> grembo bapt -> jbeich @@ -543,6 +549,7 @@ rene -> bar rene -> cmt rene -> crees rene -> jgh +rene -> ler rene -> olivierd rm -> koobs Modified: stable/11/share/misc/committers-src.dot ============================================================================== --- stable/11/share/misc/committers-src.dot Thu Mar 15 06:19:45 2018 (r330971) +++ stable/11/share/misc/committers-src.dot Thu Mar 15 08:30:05 2018 (r330972) @@ -114,6 +114,7 @@ andreast [label="Andreas Tobler\nandreast@FreeBSD.org\ andrew [label="Andrew Turner\nandrew@FreeBSD.org\n2010/07/19"] antoine [label="Antoine Brodin\nantoine@FreeBSD.org\n2008/02/03"] araujo [label="Marcelo Araujo\naraujo@FreeBSD.org\n2015/08/04"] +arichardson [label="Alex Richardson\narichardson@FreeBSD.org\n2017/10/30"] ariff [label="Ariff Abdullah\nariff@FreeBSD.org\n2005/11/14"] art [label="Artem Belevich\nart@FreeBSD.org\n2011/03/29"] arybchik [label="Andrew Rybchenko\narybchik@FreeBSD.org\n2014/10/12"] @@ -136,6 +137,7 @@ bryanv [label="Bryan Venteicher\nbryanv@FreeBSD.org\n2 bschmidt [label="Bernhard Schmidt\nbschmidt@FreeBSD.org\n2010/02/06"] bz [label="Bjoern A. Zeeb\nbz@FreeBSD.org\n2004/07/27"] cem [label="Conrad Meyer\ncem@FreeBSD.org\n2015/07/05"] +chuck [label="Chuck Tuffli\nchuck@FreeBSD.org\n2017/09/06"] cognet [label="Olivier Houchard\ncognet@FreeBSD.org\n2002/10/09"] cokane [label="Coleman Kane\ncokane@FreeBSD.org\n2000/06/19"] cperciva [label="Colin Percival\ncperciva@FreeBSD.org\n2004/01/20"] @@ -167,6 +169,7 @@ flz [label="Florent Thoumie\nflz@FreeBSD.org\n2006/03/ gabor [label="Gabor Kovesdan\ngabor@FreeBSD.org\n2010/02/02"] gad [label="Garance A. Drosehn\ngad@FreeBSD.org\n2000/10/27"] gallatin [label="Andrew Gallatin\ngallatin@FreeBSD.org\n1999/01/15"] +ganbold [label="Ganbold Tsagaankhuu\nganbold@FreeBSD.org\n2013/12/18"] gavin [label="Gavin Atkinson\ngavin@FreeBSD.org\n2009/12/07"] gibbs [label="Justin T. Gibbs\ngibbs@FreeBSD.org\n????/??/??"] gjb [label="Glen Barber\ngjb@FreeBSD.org\n2013/06/04"] @@ -190,6 +193,7 @@ jasone [label="Jason Evans\njasone@FreeBSD.org\n1999/0 jceel [label="Jakub Klama\njceel@FreeBSD.org\n2011/09/25"] jch [label="Julien Charbon\njch@FreeBSD.org\n2014/09/24"] jchandra [label="Jayachandran C.\njchandra@FreeBSD.org\n2010/05/19"] +jeb [label="Jeb Cramer\njeb@FreeBSD.org\n2018/01/25"] jeff [label="Jeff Roberson\njeff@FreeBSD.org\n2002/02/21"] jh [label="Jaakko Heinonen\njh@FreeBSD.org\n2009/10/02"] jhb [label="John Baldwin\njhb@FreeBSD.org\n1999/08/23"] @@ -216,6 +220,7 @@ kan [label="Alexander Kabaev\nkan@FreeBSD.org\n2002/07 karels [label="Mike Karels\nkarels@FreeBSD.org\n2016/06/09"] ken [label="Ken Merry\nken@FreeBSD.org\n1998/09/08"] kensmith [label="Ken Smith\nkensmith@FreeBSD.org\n2004/01/23"] +kevans [label="Kyle Evans\nkevans@FreeBSD.org\n2017/06/20"] kevlo [label="Kevin Lo\nkevlo@FreeBSD.org\n2006/07/23"] kib [label="Konstantin Belousov\nkib@FreeBSD.org\n2006/06/03"] kmacy [label="Kip Macy\nkmacy@FreeBSD.org\n2005/06/01"] @@ -239,6 +244,7 @@ mdodd [label="Matthew N. Dodd\nmdodd@FreeBSD.org\n1999 melifaro [label="Alexander V. Chernikov\nmelifaro@FreeBSD.org\n2011/10/04"] mjacob [label="Matt Jacob\nmjacob@FreeBSD.org\n1997/08/13"] mjg [label="Mateusz Guzik\nmjg@FreeBSD.org\n2012/06/04"] +mjoras [label="Matt Joras\nmjoras@FreeBSD.org\n2017/07/12"] mlaier [label="Max Laier\nmlaier@FreeBSD.org\n2004/02/10"] mmel [label="Michal Meloun\nmmel@FreeBSD.org\n2015/11/01"] monthadar [label="Monthadar Al Jaberi\nmonthadar@FreeBSD.org\n2012/04/02"] @@ -303,6 +309,7 @@ sobomax [label="Maxim Sobolev\nsobomax@FreeBSD.org\n20 sos [label="Soren Schmidt\nsos@FreeBSD.org\n????/??/??"] sson [label="Stacey Son\nsson@FreeBSD.org\n2008/07/08"] stas [label="Stanislav Sedov\nstas@FreeBSD.org\n2008/08/22"] +stevek [label="Stephen J. Kiernan\nstevek@FreeBSD.org\n2016/07/18"] suz [label="SUZUKI Shinsuke\nsuz@FreeBSD.org\n2002/03/26"] syrinx [label="Shteryana Shopova\nsyrinx@FreeBSD.org\n2006/10/07"] takawata [label="Takanori Watanabe\ntakawata@FreeBSD.org\n2000/07/06"] @@ -395,6 +402,7 @@ brian -> joe brooks -> bushman brooks -> jamie brooks -> theraven +brooks -> arichardson bz -> anchie bz -> jamie @@ -453,12 +461,15 @@ eivind -> des eivind -> rwatson emaste -> achim -emaste -> rstone emaste -> dteske +emaste -> kevans emaste -> markj +emaste -> rstone emax -> markus +erj -> jeb + fjoe -> versus gallatin -> ticso @@ -498,6 +509,7 @@ imp -> ambrisko imp -> andrew imp -> bmah imp -> bruno +imp -> chuck imp -> dmlb imp -> emax imp -> furuta @@ -542,6 +554,7 @@ jhb -> peterj jhb -> pfg jhb -> rnoland jhb -> rpokala +jhb -> arichardson jimharris -> carl @@ -586,6 +599,7 @@ julian -> mp kan -> kib ken -> asomers +ken -> chuck ken -> slm kib -> ae @@ -700,6 +714,7 @@ rrs -> jchandra rrs -> tuexen rstone -> markj +rstone -> mjoras ru -> ceri ru -> cjc @@ -734,6 +749,7 @@ sam -> benjsc sam -> sephe sbruno -> hiren +sbruno -> jeb sbruno -> jimharris schweikh -> dds @@ -754,8 +770,11 @@ shin -> ume simon -> benl sjg -> phil +sjg -> stevek sos -> marcel + +stas -> ganbold theraven -> phil From owner-svn-src-all@freebsd.org Thu Mar 15 08:40:23 2018 Return-Path: Delivered-To: svn-src-all@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 24A45F59167; Thu, 15 Mar 2018 08:40:23 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E428740BE; Thu, 15 Mar 2018 08:40:22 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f48.google.com with SMTP id q69-v6so8848931lfi.10; Thu, 15 Mar 2018 01:40:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/AVBOGK3rBwsFZ1JNG2vHE1ITTT9loJVADMmlppik2s=; b=qLTMVhhAzZYqzaiN11XCiIdpBevQoahsRILf1amTlpttk3h3p1aO7dgHILIcaQ5jC4 jNn9N/duzLyDsgv4cZmwbugN47aEoU4R5NbXmq6rrxk2CsZT7+xzIWFMc9K4w6AXi3Cv OsDwMqaBfyZZ6g2/mu/zR550uiCnPgYyyF1iZUuJ6zo/tn4ipzyTVAgeL7r9RHZHNmxs ujVFbKxQp1YEScpPuvMi6llXDxcDSbxCTc4oRrbOl0U2vmyOUteEsuCoDox2R2IVsRM3 VtsNELy9uIb20UJG0q5gkt8EnNFplG00mjQ+I6lbviC2R6za+oi25SyxLchwgCJ9P78I F+Nw== X-Gm-Message-State: AElRT7H3AowmFgKj1bLX3PBE9YZlERIgbOVJyUPkg5fjR+/7BO6tK4Vg hMhcCrC5H3KcI3vs2N969lrXt5fYz7Y= X-Google-Smtp-Source: AG47ELsPo0ubmSNyoQEfaH4d3/Xbc+YL6qNiq/q8oBf5ggDH3RBlPIEaXK+gAKlYINnky5dAfhMmLA== X-Received: by 2002:a19:1754:: with SMTP id n81-v6mr4959895lfi.113.1521103214979; Thu, 15 Mar 2018 01:40:14 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id v8sm377032ljj.79.2018.03.15.01.40.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Mar 2018 01:40:14 -0700 (PDT) Subject: Re: svn commit: r330972 - stable/11/share/misc To: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org References: <201803150830.w2F8U5q8030361@repo.freebsd.org> From: Andriy Gapon Message-ID: Date: Thu, 15 Mar 2018 10:40:13 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <201803150830.w2F8U5q8030361@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 08:40:23 -0000 On 15/03/2018 10:30, Eitan Adler wrote: > Author: eadler > Date: Thu Mar 15 08:30:05 2018 > New Revision: 330972 > URL: https://svnweb.freebsd.org/changeset/base/330972 > > Log: > MFC r303063,r311852,r311930,r317040,r320506,r321301,r325162,r326759,r329004,: I have never seen things like these MFC-ed before... Should we be really doing them? > Add myself (stevek) as a src committer and mentor (sjg) to committers-src.dot > > Approved by: sjg (mentor) > > ------------------------------------------------------------------------ > r311852 | ler | 2017-01-10 04:31:56 +0000 (Tue, 10 Jan 2017) | 5 lines > > Add myself to committers-ports.dot > > Approved by: adamw (mentor) > Differential Revision: https://reviews.freebsd.org/D9117 > > ------------------------------------------------------------------------ > r311930 | dumbbell | 2017-01-11 19:29:28 +0000 (Wed, 11 Jan 2017) | 5 lines > > committers-ports.dot: Add myself > > Approved by: antoine (mentor) > Differential Revision: https://reviews.freebsd.org/D9143 > > ------------------------------------------------------------------------ > r317040 | ganbold | 2017-04-17 07:27:45 +0000 (Mon, 17 Apr 2017) | 2 lines > > Belatedly add myself to committers-src.dot file. > > ------------------------------------------------------------------------ > r320506 | kevans | 2017-06-30 20:01:31 +0000 (Fri, 30 Jun 2017) | 5 lines > > Add myself to commiters-src.dot, emaste@ as mentor; sort his mentees while here > > Approved by: emaste (mentor) > Differential Revision: https://reviews.freebsd.org/D11429 > > ------------------------------------------------------------------------ > r321301 | mjoras | 2017-07-20 18:14:27 +0000 (Thu, 20 Jul 2017) | 5 lines > > Add myself and mentor line to committers-src.dot. > > Approved by: rstone (mentor) > Differential Revision: https://reviews.freebsd.org/D11672 > > ------------------------------------------------------------------------ > r325162 | arichardson | 2017-10-30 18:17:02 +0000 (Mon, 30 Oct 2017) | 5 lines > > Add myself to committers-src.dot > > Reviewed by: jhb (mentor) > Approved by: jhb (mentor) > > ------------------------------------------------------------------------ > r326759 | chuck | 2017-12-11 04:40:25 +0000 (Mon, 11 Dec 2017) | 6 lines > > Add myself to committers-src.dot > > Reviewed by: ken, imp > Approved by: ken (mentor), imp (mentor) > Differential Revision: https://reviews.freebsd.org/D13406 > > ------------------------------------------------------------------------ > r329004 | jeb | 2018-02-08 00:14:20 +0000 (Thu, 08 Feb 2018) | 5 lines > > Add myself to committers-src.dot > > Reviewed by: erj (mentor) > Approved by: erj (mentor) > > Modified: > stable/11/share/misc/committers-ports.dot > stable/11/share/misc/committers-src.dot > Directory Properties: > stable/11/ (props changed) > -- Andriy Gapon From owner-svn-src-all@freebsd.org Thu Mar 15 08:46:50 2018 Return-Path: Delivered-To: svn-src-all@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 74AB1F59865; Thu, 15 Mar 2018 08:46:50 +0000 (UTC) (envelope-from avg@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 2164B745BD; Thu, 15 Mar 2018 08:46:50 +0000 (UTC) (envelope-from avg@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 1754A13F71; Thu, 15 Mar 2018 08:46:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2F8knxK040015; Thu, 15 Mar 2018 08:46:49 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F8kncg040011; Thu, 15 Mar 2018 08:46:49 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803150846.w2F8kncg040011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 08:46:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r330973 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 330973 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 08:46:50 -0000 Author: avg Date: Thu Mar 15 08:46:49 2018 New Revision: 330973 URL: https://svnweb.freebsd.org/changeset/base/330973 Log: 9164 assert: newds == os->os_dsl_dataset illumos/illumos-gate@5f5913bb83405db87f982abee80162a479d363af https://github.com/illumos/illumos-gate/commit/5f5913bb83405db87f982abee80162a479d363af https://www.illumos.org/issues/9164 This issue has been reported by Alan Somers as https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225877 dmu_objset_refresh_ownership() first disowns a dataset (and releases it) and then owns it again. There is an assert that the new dataset object is the same as the old dataset object. When running ZFS Test Suite on FreeBSD we see this panic from zpool_upgrade_007_pos test: panic: solaris assert: newds == os->os_dsl_dataset (0xfffff80045f4c000 == 0xfffff80021ab4800) I see that the old dataset has dsl_dataset_evict_async() pending in ds_dbu.dbu_tqent and its ds_dbuf is NULL. Reviewed by: Matt Ahrens Reviewed by: Don Brady Approved by: Richard Lowe Author: Andriy Gapon Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Thu Mar 15 08:30:05 2018 (r330972) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Thu Mar 15 08:46:49 2018 (r330973) @@ -670,23 +670,21 @@ dmu_objset_rele(objset_t *os, void *tag) * same name so that it can be partially torn down and reconstructed. */ void -dmu_objset_refresh_ownership(objset_t *os, void *tag) +dmu_objset_refresh_ownership(dsl_dataset_t *ds, dsl_dataset_t **newds, + void *tag) { dsl_pool_t *dp; - dsl_dataset_t *ds, *newds; char name[ZFS_MAX_DATASET_NAME_LEN]; - ds = os->os_dsl_dataset; VERIFY3P(ds, !=, NULL); VERIFY3P(ds->ds_owner, ==, tag); VERIFY(dsl_dataset_long_held(ds)); dsl_dataset_name(ds, name); - dp = dmu_objset_pool(os); + dp = ds->ds_dir->dd_pool; dsl_pool_config_enter(dp, FTAG); - dmu_objset_disown(os, tag); - VERIFY0(dsl_dataset_own(dp, name, tag, &newds)); - VERIFY3P(newds, ==, os->os_dsl_dataset); + dsl_dataset_disown(ds, tag); + VERIFY0(dsl_dataset_own(dp, name, tag, newds)); dsl_pool_config_exit(dp, FTAG); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h Thu Mar 15 08:30:05 2018 (r330972) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h Thu Mar 15 08:46:49 2018 (r330973) @@ -153,7 +153,8 @@ int dmu_objset_own(const char *name, dmu_objset_type_t boolean_t readonly, void *tag, objset_t **osp); int dmu_objset_own_obj(struct dsl_pool *dp, uint64_t obj, dmu_objset_type_t type, boolean_t readonly, void *tag, objset_t **osp); -void dmu_objset_refresh_ownership(objset_t *os, void *tag); +void dmu_objset_refresh_ownership(struct dsl_dataset *ds, + struct dsl_dataset **newds, void *tag); void dmu_objset_rele(objset_t *os, void *tag); void dmu_objset_disown(objset_t *os, void *tag); int dmu_objset_from_ds(struct dsl_dataset *ds, objset_t **osp); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Thu Mar 15 08:30:05 2018 (r330972) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Thu Mar 15 08:46:49 2018 (r330973) @@ -4925,14 +4925,14 @@ zfs_ioc_userspace_upgrade(zfs_cmd_t *zc) * objset needs to be closed & reopened (to grow the * objset_phys_t). Suspend/resume the fs will do that. */ - dsl_dataset_t *ds; + dsl_dataset_t *ds, *newds; ds = dmu_objset_ds(zfsvfs->z_os); error = zfs_suspend_fs(zfsvfs); if (error == 0) { - dmu_objset_refresh_ownership(zfsvfs->z_os, + dmu_objset_refresh_ownership(ds, &newds, zfsvfs); - error = zfs_resume_fs(zfsvfs, ds); + error = zfs_resume_fs(zfsvfs, newds); } } if (error == 0) From owner-svn-src-all@freebsd.org Thu Mar 15 08:49:22 2018 Return-Path: Delivered-To: svn-src-all@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 6CE85F59B3E; Thu, 15 Mar 2018 08:49:22 +0000 (UTC) (envelope-from avg@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 21415747C7; Thu, 15 Mar 2018 08:49:22 +0000 (UTC) (envelope-from avg@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 1B53B13F77; Thu, 15 Mar 2018 08:49:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2F8nLEa040189; Thu, 15 Mar 2018 08:49:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F8nLri040186; Thu, 15 Mar 2018 08:49:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803150849.w2F8nLri040186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 08:49:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330974 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 330974 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 08:49:22 -0000 Author: avg Date: Thu Mar 15 08:49:21 2018 New Revision: 330974 URL: https://svnweb.freebsd.org/changeset/base/330974 Log: MFV r330973: 9164 assert: newds == os->os_dsl_dataset illumos/illumos-gate@5f5913bb83405db87f982abee80162a479d363af https://github.com/illumos/illumos-gate/commit/5f5913bb83405db87f982abee80162a479d363af https://www.illumos.org/issues/9164 This issue has been reported by Alan Somers as https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225877 dmu_objset_refresh_ownership() first disowns a dataset (and releases it) and then owns it again. There is an assert that the new dataset object is the same as the old dataset object. When running ZFS Test Suite on FreeBSD we see this panic from zpool_upgrade_007_pos test: panic: solaris assert: newds == os->os_dsl_dataset (0xfffff80045f4c000 == 0xfffff80021ab4800) I see that the old dataset has dsl_dataset_evict_async() pending in ds_dbu.dbu_tqent and its ds_dbuf is NULL. Reviewed by: Matt Ahrens Reviewed by: Don Brady Approved by: Richard Lowe Author: Andriy Gapon PR: 225877 Reported by: asomers MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Thu Mar 15 08:46:49 2018 (r330973) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Thu Mar 15 08:49:21 2018 (r330974) @@ -670,23 +670,21 @@ dmu_objset_rele(objset_t *os, void *tag) * same name so that it can be partially torn down and reconstructed. */ void -dmu_objset_refresh_ownership(objset_t *os, void *tag) +dmu_objset_refresh_ownership(dsl_dataset_t *ds, dsl_dataset_t **newds, + void *tag) { dsl_pool_t *dp; - dsl_dataset_t *ds, *newds; char name[ZFS_MAX_DATASET_NAME_LEN]; - ds = os->os_dsl_dataset; VERIFY3P(ds, !=, NULL); VERIFY3P(ds->ds_owner, ==, tag); VERIFY(dsl_dataset_long_held(ds)); dsl_dataset_name(ds, name); - dp = dmu_objset_pool(os); + dp = ds->ds_dir->dd_pool; dsl_pool_config_enter(dp, FTAG); - dmu_objset_disown(os, tag); - VERIFY0(dsl_dataset_own(dp, name, tag, &newds)); - VERIFY3P(newds, ==, os->os_dsl_dataset); + dsl_dataset_disown(ds, tag); + VERIFY0(dsl_dataset_own(dp, name, tag, newds)); dsl_pool_config_exit(dp, FTAG); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Thu Mar 15 08:46:49 2018 (r330973) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Thu Mar 15 08:49:21 2018 (r330974) @@ -153,7 +153,8 @@ int dmu_objset_own(const char *name, dmu_objset_type_t boolean_t readonly, void *tag, objset_t **osp); int dmu_objset_own_obj(struct dsl_pool *dp, uint64_t obj, dmu_objset_type_t type, boolean_t readonly, void *tag, objset_t **osp); -void dmu_objset_refresh_ownership(objset_t *os, void *tag); +void dmu_objset_refresh_ownership(struct dsl_dataset *ds, + struct dsl_dataset **newds, void *tag); void dmu_objset_rele(objset_t *os, void *tag); void dmu_objset_disown(objset_t *os, void *tag); int dmu_objset_from_ds(struct dsl_dataset *ds, objset_t **osp); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Mar 15 08:46:49 2018 (r330973) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Mar 15 08:49:21 2018 (r330974) @@ -5115,14 +5115,14 @@ zfs_ioc_userspace_upgrade(zfs_cmd_t *zc) * objset needs to be closed & reopened (to grow the * objset_phys_t). Suspend/resume the fs will do that. */ - dsl_dataset_t *ds; + dsl_dataset_t *ds, *newds; ds = dmu_objset_ds(zfsvfs->z_os); error = zfs_suspend_fs(zfsvfs); if (error == 0) { - dmu_objset_refresh_ownership(zfsvfs->z_os, + dmu_objset_refresh_ownership(ds, &newds, zfsvfs); - error = zfs_resume_fs(zfsvfs, ds); + error = zfs_resume_fs(zfsvfs, newds); } } if (error == 0) From owner-svn-src-all@freebsd.org Thu Mar 15 08:52:49 2018 Return-Path: Delivered-To: svn-src-all@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 D80F2F5A05D; Thu, 15 Mar 2018 08:52:49 +0000 (UTC) (envelope-from avg@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 830E974CD4; Thu, 15 Mar 2018 08:52:49 +0000 (UTC) (envelope-from avg@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 7D755140F2; Thu, 15 Mar 2018 08:52:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2F8qngF045126; Thu, 15 Mar 2018 08:52:49 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F8qnRB045125; Thu, 15 Mar 2018 08:52:49 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803150852.w2F8qnRB045125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 08:52:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330975 - head/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade X-SVN-Commit-Revision: 330975 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 08:52:50 -0000 Author: avg Date: Thu Mar 15 08:52:49 2018 New Revision: 330975 URL: https://svnweb.freebsd.org/changeset/base/330975 Log: re-enable zpool_upgrade_007_pos test after the fix in r330974 The test was disabled in r329248. PR: 225877 Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/zpool_upgrade_test.sh Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/zpool_upgrade_test.sh ============================================================================== --- head/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/zpool_upgrade_test.sh Thu Mar 15 08:49:21 2018 (r330974) +++ head/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/zpool_upgrade_test.sh Thu Mar 15 08:52:49 2018 (r330975) @@ -207,7 +207,6 @@ zpool_upgrade_007_pos_body() . $(atf_get_srcdir)/zpool_upgrade.cfg verify_disk_count "$DISKS" 2 - atf_skip "PR 225877 - panic: solaris assert: newds == os->os_dsl_dataset during" ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_upgrade_007_pos.ksh || atf_fail "Testcase failed" } From owner-svn-src-all@freebsd.org Thu Mar 15 09:04:25 2018 Return-Path: Delivered-To: svn-src-all@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 5284EF5AF82; Thu, 15 Mar 2018 09:04:25 +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 ED01F75689; Thu, 15 Mar 2018 09:04:24 +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 E7B9814279; Thu, 15 Mar 2018 09:04:24 +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 w2F94OQQ050373; Thu, 15 Mar 2018 09:04:24 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F94OYZ050364; Thu, 15 Mar 2018 09:04:24 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803150904.w2F94OYZ050364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 09:04:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330976 - in stable/11/usr.sbin/makefs: . cd9660 ffs X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/usr.sbin/makefs: . cd9660 ffs X-SVN-Commit-Revision: 330976 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 09:04:25 -0000 Author: eadler Date: Thu Mar 15 09:04:23 2018 New Revision: 330976 URL: https://svnweb.freebsd.org/changeset/base/330976 Log: MFC r303036,r303038,r306822,r307923,: makefs: reorder 'usage' alphabetically From NetBSD, Mon Aug 15 14:45:01 2011 +0000 (wiz) Re-order `usage' alphabetically; rename option arguments in the manpage's `SYNOPSIS' section to match those from `usage' (not the other way around; the `usage'-line (and other parts of makefs.c) contain the correct names); minor punctuation improvements. From Snader_LB. makefs.8 1.36 makefs.c 1.30 Obtained from: NetBSD ------------------------------------------------------------------------ r303038 | emaste | 2016-07-19 18:40:54 +0000 (Tue, 19 Jul 2016) | 56 lines makefs: sync NetBSD IDs with upstream for changes that we already have May 22 21:51:39 2011 +0000 (christos): From Nathan Whitehorn (nwhitehorn at freebsd dot org): Add code to generate bootable ISOs on Powermac and CHRP systems. Synthesize some partition maps (APM and MBR, respectively) pointing to (a) the whole disk, and (b) relevant El Torito boot images that have been added by other code. These partition maps are a little bit funny looking, but they seem to work. FreeBSD has been using this successfully in their release generation on powerpc, as well as generating all non-SPARC install media. SPARC support could probably be added as an extension of this patch. makefs.8 1.33 Tue Aug 23 17:09:11 2011 +0000 (christos): PR/45285: Martin Matuska: makefs does not properly convert ISO level 1 and 2 filenames (buffer overflow) makefs does not properly verify the maximum filename length in the special "." case for both ISO level 1 and ISO level 2 filename conversion. This creates broken images or causes a buffer overflow (ISO level 2). ISO level 1: If a filename contains only dots or up to 8 characters followed by dots the 8+3 limit check doesn't work. ISO level 2: If a filename contains a dot in the first 30 characters and a dot on the 30th character, the length limit check doesn't work and the buffer is overflowed. $ mkdir level1 $ touch level1/12345............ $ makefs -t cd9660 -o isolevel=1 test.iso level1 $ mkdir level2 $ touch level2/1234567890.2345678901234567.....34567890123456789012345 $ makefs -t cd9660 -o isolevel=2 test.iso level2 cd9660.c 1.32 Sun Oct 9 21:33:43 2011 +0000 (christos): add support for setting the ufs label. (Nathan Whitehorn) ffs.c 1.45 ffs.h 1.2 mkfs.c 1.22 makefs.8 1.37 Obtained from: NetBSD ------------------------------------------------------------------------ r306822 | emaste | 2016-10-07 19:12:15 +0000 (Fri, 07 Oct 2016) | 4 lines makefs: diff reduction with NetBSD Obtained from: NetBSD usr.sbin/makefs/cd9660.c 1.33 ------------------------------------------------------------------------ r307923 | marcel | 2016-10-25 16:21:38 +0000 (Tue, 25 Oct 2016) | 7 lines Allow building makefs(8) from another Makefile (such as one in a seperate directory hierarchy used to build tools). This boils down to replacing the use of ${.CURDIR} with either ${SRCDIR} or ${SRCTOP}. SRCDIR is defined as the directory in which the Makefile lives that bmake(1) is currently reading. Use SRCTOP when reaching outside of makefs's directory. Modified: stable/11/usr.sbin/makefs/Makefile stable/11/usr.sbin/makefs/cd9660.c stable/11/usr.sbin/makefs/cd9660/Makefile.inc stable/11/usr.sbin/makefs/ffs.c stable/11/usr.sbin/makefs/ffs.h stable/11/usr.sbin/makefs/ffs/Makefile.inc stable/11/usr.sbin/makefs/ffs/mkfs.c stable/11/usr.sbin/makefs/makefs.8 stable/11/usr.sbin/makefs/makefs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/makefs/Makefile ============================================================================== --- stable/11/usr.sbin/makefs/Makefile Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/Makefile Thu Mar 15 09:04:23 2018 (r330976) @@ -1,10 +1,12 @@ # $FreeBSD$ +SRCDIR:=${.PARSEDIR:tA} + .include PROG= makefs -CFLAGS+=-I${.CURDIR} +CFLAGS+=-I${SRCDIR} SRCS= cd9660.c ffs.c \ makefs.c \ @@ -14,24 +16,24 @@ MAN= makefs.8 WARNS?= 2 -.include "${.CURDIR}/cd9660/Makefile.inc" -.include "${.CURDIR}/ffs/Makefile.inc" +.include "${SRCDIR}/cd9660/Makefile.inc" +.include "${SRCDIR}/ffs/Makefile.inc" CFLAGS+=-DHAVE_STRUCT_STAT_ST_FLAGS=1 CFLAGS+=-DHAVE_STRUCT_STAT_ST_GEN=1 -.PATH: ${.CURDIR}/../../contrib/mtree -CFLAGS+=-I${.CURDIR}/../../contrib/mtree +.PATH: ${SRCTOP}/contrib/mtree +CFLAGS+=-I${SRCTOP}/contrib/mtree SRCS+= getid.c misc.c spec.c -.PATH: ${.CURDIR}/../../contrib/mknod -CFLAGS+=-I${.CURDIR}/../../contrib/mknod +.PATH: ${SRCTOP}/contrib/mknod +CFLAGS+=-I${SRCTOP}/contrib/mknod SRCS+= pack_dev.c -.PATH: ${.CURDIR}/../../sys/ufs/ffs +.PATH: ${SRCTOP}/sys/ufs/ffs SRCS+= ffs_tables.c -CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd +CFLAGS+= -I${SRCTOP}/lib/libnetbsd LIBADD= netbsd util sbuf .if ${MK_TESTS} != "no" Modified: stable/11/usr.sbin/makefs/cd9660.c ============================================================================== --- stable/11/usr.sbin/makefs/cd9660.c Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/cd9660.c Thu Mar 15 09:04:23 2018 (r330976) @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660.c,v 1.31 2011/08/06 23:25:19 christos Exp $ */ +/* $NetBSD: cd9660.c,v 1.32 2011/08/23 17:09:11 christos Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-NetBSD AND BSD-4-Clause @@ -1624,6 +1624,7 @@ cd9660_level1_convert_filename(const char *oldname, ch if (diskStructure.archimedes_enabled && *oldname == ',' && strlen(oldname) == 4) break; + /* Enforce 12.3 / 8 */ if (namelen == 8 && !found_ext) break; @@ -1631,7 +1632,7 @@ cd9660_level1_convert_filename(const char *oldname, ch if (islower((unsigned char)*oldname)) *newname++ = toupper((unsigned char)*oldname); else if (isupper((unsigned char)*oldname) - || isdigit((unsigned char)*oldname)) + || isdigit((unsigned char)*oldname)) *newname++ = *oldname; else *newname++ = '_'; @@ -1641,7 +1642,7 @@ cd9660_level1_convert_filename(const char *oldname, ch else namelen++; } - oldname ++; + oldname++; } if (is_file) { if (!found_ext && !diskStructure.omit_trailing_period) Modified: stable/11/usr.sbin/makefs/cd9660/Makefile.inc ============================================================================== --- stable/11/usr.sbin/makefs/cd9660/Makefile.inc Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/cd9660/Makefile.inc Thu Mar 15 09:04:23 2018 (r330976) @@ -1,9 +1,9 @@ # $FreeBSD$ # -.PATH: ${.CURDIR}/cd9660 ${.CURDIR}/../../sys/fs/cd9660/ +.PATH: ${SRCDIR}/cd9660 ${SRCTOP}/sys/fs/cd9660/ -CFLAGS+=-I${.CURDIR}/../../sys/fs/cd9660/ +CFLAGS+=-I${SRCTOP}/sys/fs/cd9660/ SRCS+= cd9660_strings.c cd9660_debug.c cd9660_eltorito.c \ cd9660_write.c cd9660_conversion.c iso9660_rrip.c cd9660_archimedes.c Modified: stable/11/usr.sbin/makefs/ffs.c ============================================================================== --- stable/11/usr.sbin/makefs/ffs.c Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/ffs.c Thu Mar 15 09:04:23 2018 (r330976) @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.c,v 1.44 2009/04/28 22:49:26 joerg Exp $ */ +/* $NetBSD: ffs.c,v 1.45 2011/10/09 22:49:26 christos Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause Modified: stable/11/usr.sbin/makefs/ffs.h ============================================================================== --- stable/11/usr.sbin/makefs/ffs.h Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/ffs.h Thu Mar 15 09:04:23 2018 (r330976) @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.h,v 1.1 2004/12/20 20:51:42 jmc Exp $ */ +/* $NetBSD: ffs.h,v 1.2 2004/12/20 20:51:42 jmc Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause Modified: stable/11/usr.sbin/makefs/ffs/Makefile.inc ============================================================================== --- stable/11/usr.sbin/makefs/ffs/Makefile.inc Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/ffs/Makefile.inc Thu Mar 15 09:04:23 2018 (r330976) @@ -1,9 +1,9 @@ # $FreeBSD$ # -.PATH: ${.CURDIR}/ffs ${.CURDIR}/../../sys/ufs/ffs +.PATH: ${SRCDIR}/ffs ${SRCTOP}/sys/ufs/ffs -CFLAGS+= -I${.CURDIR}/../../sys/ufs/ffs +CFLAGS+= -I${SRCTOP}/sys/ufs/ffs SRCS+= ffs_alloc.c ffs_balloc.c ffs_bswap.c ffs_subr.c ufs_bmap.c SRCS+= buf.c mkfs.c Modified: stable/11/usr.sbin/makefs/ffs/mkfs.c ============================================================================== --- stable/11/usr.sbin/makefs/ffs/mkfs.c Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/ffs/mkfs.c Thu Mar 15 09:04:23 2018 (r330976) @@ -1,4 +1,4 @@ -/* $NetBSD: mkfs.c,v 1.20 2004/06/24 22:30:13 lukem Exp $ */ +/* $NetBSD: mkfs.c,v 1.22 2011/10/09 22:30:13 christos Exp $ */ /*- * SPDX-License-Identifier: BSD-3-Clause Modified: stable/11/usr.sbin/makefs/makefs.8 ============================================================================== --- stable/11/usr.sbin/makefs/makefs.8 Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/makefs.8 Thu Mar 15 09:04:23 2018 (r330976) @@ -1,4 +1,4 @@ -.\" $NetBSD: makefs.8,v 1.32 2009/01/20 20:47:25 bjh21 Exp $ +.\" $NetBSD: makefs.8,v 1.33 2011/05/22 21:51:39 christos Exp $ .\" .\" Copyright (c) 2001-2003 Wasabi Systems, Inc. .\" All rights reserved. @@ -407,7 +407,8 @@ The utility appeared in .Nx 1.6 . .Sh AUTHORS -.An Luke Mewburn Aq Mt lukem@NetBSD.org +.An Luke Mewburn +.Aq Mt lukem@NetBSD.org (original program), .An Daniel Watt , .An Walter Deignan , Modified: stable/11/usr.sbin/makefs/makefs.c ============================================================================== --- stable/11/usr.sbin/makefs/makefs.c Thu Mar 15 08:52:49 2018 (r330975) +++ stable/11/usr.sbin/makefs/makefs.c Thu Mar 15 09:04:23 2018 (r330976) @@ -405,10 +405,10 @@ usage(void) prog = getprogname(); fprintf(stderr, -"usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n" -"\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-R roundup-size]\n" -"\t[-s image-size] [-b free-blocks] [-f free-files] [-F mtree-specfile]\n" -"\t[-xZ] [-N userdb-dir] [-T ]\n" +"usage: %s [-xZ] [-B endian] [-b free-blocks] [-d debug-mask]\n" +"\t[-F mtree-specfile] [-f free-files] [-M minimum-size] [-m maximum-size]\n" +"\t[-N userdb-dir] [-o fs-options] [-R roundup-size] [-S sector-size]\n" +"\t[-s image-size] [-T ] [-t fs-type]\n" "\timage-file directory | manifest [extra-directory ...]\n", prog); exit(1); From owner-svn-src-all@freebsd.org Thu Mar 15 09:07:01 2018 Return-Path: Delivered-To: svn-src-all@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 8E021F5B297 for ; Thu, 15 Mar 2018 09:07:01 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x229.google.com (mail-yw0-x229.google.com [IPv6:2607:f8b0:4002:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B5EA7587B for ; Thu, 15 Mar 2018 09:07:01 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x229.google.com with SMTP id z82so1110292ywd.9 for ; Thu, 15 Mar 2018 02:07:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ddyqj9y2JsaoKLoYq9gR5crab6R24OTirTFCl4cFzVA=; b=rIGxK4UrKfDpJ31otQaNvko5oE7jN0ZMvsp/2E37uFPMMdlAx3zoBVJCCtQRSpPbLH neWbMufqO9cVaxa2qR4BIr0wEjIoP5llSNQqwMAefqYlSfDzYZnPZC1/D9NvBoqjTv23 xzhEkPDNtBMnGlXZDa+Vhj9L9a9FwVZnrr/Oo= 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=ddyqj9y2JsaoKLoYq9gR5crab6R24OTirTFCl4cFzVA=; b=TE2B2cvqHBSvcOThyyM/VyySBOQk+LBjwwdfrAZpbxnwfBdpfPgiXvfVJm/5d8aDW3 CRHbZen4tl+MaGbzqgq9kD49DAP/V0gJQRU9kF5t39y3rp0qAk3CCj7pW5dXkppGGkHk nd5oA7raFp8S9Q1dv5S4cGI4mOwe1/M9G5/UnrjrouiX45Fh0d+k7H/6gd8qWZIk7eDe AK1najDzoTlJqlaA+PGWRQY5IqkGVtStP6yWzLSx8RCbLO9L7K90vOqYllfBHXiFb+yP FG5OgYAxtHQUtT9voOxr3So74seJURFoFrWO0Dz47twm/8eXxlRG54IpN3kSL+xL+8RP y6Ng== X-Gm-Message-State: AElRT7HMZCimEadCrkxgg0SOhG9NIEh1R2toP3j4Lg+82O+As/36WPR3 59rdZnHik4lpU/T6vPCx9A+4ZXEAr2fyB/7RSw0MmQ== X-Google-Smtp-Source: AG47ELsR8CUXDAbZSpOVLQ7t0+63wNBkxOKCiKGedD/ohdGDPyNcQ8kG7nWteIPGYENoStvEyUegJMh/2J5Hwsqi5W8= X-Received: by 10.129.4.3 with SMTP id 3mr3628466ywe.162.1521104820301; Thu, 15 Mar 2018 02:07:00 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Thu, 15 Mar 2018 02:06:29 -0700 (PDT) In-Reply-To: References: <201803150830.w2F8U5q8030361@repo.freebsd.org> From: Eitan Adler Date: Thu, 15 Mar 2018 02:06:29 -0700 X-Google-Sender-Auth: 7WQT0qw39ETGRw2FXO4zJz6KTTc Message-ID: Subject: Re: svn commit: r330972 - stable/11/share/misc To: Andriy Gapon Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 09:07:01 -0000 On 15 March 2018 at 01:40, Andriy Gapon wrote: > On 15/03/2018 10:30, Eitan Adler wrote: >> Author: eadler >> Date: Thu Mar 15 08:30:05 2018 >> New Revision: 330972 >> URL: https://svnweb.freebsd.org/changeset/base/330972 >> >> Log: >> MFC r303063,r311852,r311930,r317040,r320506,r321301,r325162,r326759,r329004,: > > I have never seen things like these MFC-ed before... > Should we be really doing them? I don't see any reason not to. I don't expect people to do them, though it might be interesting to add it as a teaching tool. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@freebsd.org Thu Mar 15 09:16:11 2018 Return-Path: Delivered-To: svn-src-all@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 92236F5BD5E; Thu, 15 Mar 2018 09:16:11 +0000 (UTC) (envelope-from avg@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 44FCE75F91; Thu, 15 Mar 2018 09:16:11 +0000 (UTC) (envelope-from avg@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 3FE8714413; Thu, 15 Mar 2018 09:16:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2F9GBlZ055324; Thu, 15 Mar 2018 09:16:11 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F9GAxo055322; Thu, 15 Mar 2018 09:16:10 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803150916.w2F9GAxo055322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 09:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330977 - head/sys/geom X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/geom X-SVN-Commit-Revision: 330977 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 09:16:11 -0000 Author: avg Date: Thu Mar 15 09:16:10 2018 New Revision: 330977 URL: https://svnweb.freebsd.org/changeset/base/330977 Log: g_access: deal with races created by geoms that drop the topology lock The problem is that g_access() must be called with the GEOM topology lock held. And that gives a false impression that the lock is indeed held across the call. But this isn't always true because many classes, ZVOL being one of the many, need to drop the lock. It's either to perform an I/O on the first open or to acquire a different lock (like in g_mirror_access). That, of course, can break many assumptions. For example, g_slice_access() adds an extra exclusive count on the first open. As described above, an underlying geom may drop the topology lock and that would open a race with another thread that would also request another extra exclusive count. In general, two consumers may be granted incompatible accesses. To avoid this problem the code is changed to mark a geom with special flag before calling its access method and clear the flag afterwards. If another thread sees that flag, then it means that the topology lock has been dropped (either by the geom in question or downstream from it), so it is not safe to make another access call. So, the second thread would use g_topology_sleep() to wait until the flag is cleared and only then would it proceed with the access. Also see http://docs.freebsd.org/cgi/mid.cgi?809d9254-ee56-59d8-69a4-08838e985cea PR: 225960 Reported by: asomers Reviewed by: markj, mav MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D14533 Modified: head/sys/geom/geom.h head/sys/geom/geom_subr.c Modified: head/sys/geom/geom.h ============================================================================== --- head/sys/geom/geom.h Thu Mar 15 09:04:23 2018 (r330976) +++ head/sys/geom/geom.h Thu Mar 15 09:16:10 2018 (r330977) @@ -159,8 +159,10 @@ struct g_geom { void *spare1; void *softc; unsigned flags; -#define G_GEOM_WITHER 1 -#define G_GEOM_VOLATILE_BIO 2 +#define G_GEOM_WITHER 0x01 +#define G_GEOM_VOLATILE_BIO 0x02 +#define G_GEOM_IN_ACCESS 0x04 +#define G_GEOM_ACCESS_WAIT 0x08 LIST_HEAD(,g_geom_alias) aliases; }; Modified: head/sys/geom/geom_subr.c ============================================================================== --- head/sys/geom/geom_subr.c Thu Mar 15 09:04:23 2018 (r330976) +++ head/sys/geom/geom_subr.c Thu Mar 15 09:16:10 2018 (r330977) @@ -876,7 +876,11 @@ int g_access(struct g_consumer *cp, int dcr, int dcw, int dce) { struct g_provider *pp; + struct g_geom *gp; int pw, pe; +#ifdef INVARIANTS + int sr, sw, se; +#endif int error; g_topology_assert(); @@ -884,6 +888,7 @@ g_access(struct g_consumer *cp, int dcr, int dcw, int pp = cp->provider; KASSERT(pp != NULL, ("access but not attached")); G_VALID_PROVIDER(pp); + gp = pp->geom; g_trace(G_T_ACCESS, "g_access(%p(%s), %d, %d, %d)", cp, pp->name, dcr, dcw, dce); @@ -892,7 +897,7 @@ g_access(struct g_consumer *cp, int dcr, int dcw, int KASSERT(cp->acw + dcw >= 0, ("access resulting in negative acw")); KASSERT(cp->ace + dce >= 0, ("access resulting in negative ace")); KASSERT(dcr != 0 || dcw != 0 || dce != 0, ("NOP access request")); - KASSERT(pp->geom->access != NULL, ("NULL geom->access")); + KASSERT(gp->access != NULL, ("NULL geom->access")); /* * If our class cares about being spoiled, and we have been, we @@ -904,6 +909,27 @@ g_access(struct g_consumer *cp, int dcr, int dcw, int return (ENXIO); /* + * A number of GEOM classes either need to perform an I/O on the first + * open or to acquire a different subsystem's lock. To do that they + * may have to drop the topology lock. + * Other GEOM classes perform special actions when opening a lower rank + * geom for the first time. As a result, more than one thread may + * end up performing the special actions. + * So, we prevent concurrent "first" opens by marking the consumer with + * special flag. + * + * Note that if the geom's access method never drops the topology lock, + * then we will never see G_GEOM_IN_ACCESS here. + */ + while ((gp->flags & G_GEOM_IN_ACCESS) != 0) { + g_trace(G_T_ACCESS, + "%s: race on geom %s via provider %s and consumer of %s", + __func__, gp->name, pp->name, cp->geom->name); + gp->flags |= G_GEOM_ACCESS_WAIT; + g_topology_sleep(gp, 0); + } + + /* * Figure out what counts the provider would have had, if this * consumer had (r0w0e0) at this time. */ @@ -918,7 +944,7 @@ g_access(struct g_consumer *cp, int dcr, int dcw, int pp, pp->name); /* If foot-shooting is enabled, any open on rank#1 is OK */ - if ((g_debugflags & 16) && pp->geom->rank == 1) + if ((g_debugflags & 16) && gp->rank == 1) ; /* If we try exclusive but already write: fail */ else if (dce > 0 && pw > 0) @@ -935,11 +961,27 @@ g_access(struct g_consumer *cp, int dcr, int dcw, int /* Ok then... */ - error = pp->geom->access(pp, dcr, dcw, dce); +#ifdef INVARIANTS + sr = cp->acr; + sw = cp->acw; + se = cp->ace; +#endif + gp->flags |= G_GEOM_IN_ACCESS; + error = gp->access(pp, dcr, dcw, dce); KASSERT(dcr > 0 || dcw > 0 || dce > 0 || error == 0, ("Geom provider %s::%s dcr=%d dcw=%d dce=%d error=%d failed " - "closing ->access()", pp->geom->class->name, pp->name, dcr, dcw, + "closing ->access()", gp->class->name, pp->name, dcr, dcw, dce, error)); + + g_topology_assert(); + gp->flags &= ~G_GEOM_IN_ACCESS; + KASSERT(cp->acr == sr && cp->acw == sw && cp->ace == se, + ("Access counts changed during geom->access")); + if ((gp->flags & G_GEOM_ACCESS_WAIT) != 0) { + gp->flags &= ~G_GEOM_ACCESS_WAIT; + wakeup(gp); + } + if (!error) { /* * If we open first write, spoil any partner consumers. @@ -949,7 +991,7 @@ g_access(struct g_consumer *cp, int dcr, int dcw, int if (pp->acw == 0 && dcw != 0) g_spoil(pp, cp); else if (pp->acw != 0 && pp->acw == -dcw && pp->error == 0 && - !(pp->geom->flags & G_GEOM_WITHER)) + !(gp->flags & G_GEOM_WITHER)) g_post_event(g_new_provider_event, pp, M_WAITOK, pp, NULL); From owner-svn-src-all@freebsd.org Thu Mar 15 09:22:21 2018 Return-Path: Delivered-To: svn-src-all@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 62102F5C4F0; Thu, 15 Mar 2018 09:22:21 +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 1294376589; Thu, 15 Mar 2018 09:22:21 +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 0D5B5145AC; Thu, 15 Mar 2018 09:22:21 +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 w2F9MLmx060182; Thu, 15 Mar 2018 09:22:21 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F9MKwQ060178; Thu, 15 Mar 2018 09:22:20 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803150922.w2F9MKwQ060178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 09:22:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330978 - in stable/11: share/misc usr.bin/calendar/calendars X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11: share/misc usr.bin/calendar/calendars X-SVN-Commit-Revision: 330978 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 09:22:21 -0000 Author: eadler Date: Thu Mar 15 09:22:20 2018 New Revision: 330978 URL: https://svnweb.freebsd.org/changeset/base/330978 Log: MFC r302485,r303203,r303341,r304025,r306133,r306518,r308576,r308686,r309019,r309059,r310024,r311853,r312793,r313033,r313577,r313741,r314692,r317772,r317939,r319674,r319923,r321392,r322979,r323222,r323222,r323398,r323502,r323602,r323767,r323767,r323958,r325220,r326172,r326253,r330652,r330761,r330762,r330763,r330765,: Misc. *.dot additions Modified: stable/11/share/misc/committers-doc.dot stable/11/share/misc/committers-ports.dot stable/11/share/misc/committers-src.dot stable/11/usr.bin/calendar/calendars/calendar.freebsd Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/committers-doc.dot ============================================================================== --- stable/11/share/misc/committers-doc.dot Thu Mar 15 09:16:10 2018 (r330977) +++ stable/11/share/misc/committers-doc.dot Thu Mar 15 09:22:20 2018 (r330978) @@ -85,6 +85,7 @@ pluknet [label="Sergey Kandaurov\npluknet@FreeBSD.org\ remko [label="Remko Lodder\nremko@FreeBSD.org\n2004/10/16"] rene [label="Rene Ladan\nrene@FreeBSD.org\n2008/11/03"] ryusuke [label="Ryusuke Suzuki\nryusuke@FreeBSD.org\n2009/12/21"] +sevan [label="Sevan Janiyan\nsevan@FreeBSD.org\n2016/09/16"] simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2003/07/20"] skreuzer [label="Steven Kreuzer\nskreuzer@FreeBSD.org\n2014/01/15"] taras [label="Taras Korenko\ntaras@FreeBSD.org\n2010/06/25"] @@ -104,6 +105,7 @@ bcr -> crees bcr -> jgh bcr -> allanjude bcr -> bhd +bcr -> sevan blackend -> ale Modified: stable/11/share/misc/committers-ports.dot ============================================================================== --- stable/11/share/misc/committers-ports.dot Thu Mar 15 09:16:10 2018 (r330977) +++ stable/11/share/misc/committers-ports.dot Thu Mar 15 09:22:20 2018 (r330978) @@ -29,7 +29,6 @@ node [color=grey62, style=filled, bgcolor=black]; # Alumni go here.. Try to keep things sorted. -adamw [label="Adam Weinberger\nadamw@FreeBSD.org\n2002/10/16\n2006/09/25"] asami [label="Satoshi Asami\nasami@FreeBSD.org\n1994/11/18\n2001/09/11"] billf [label="Bill Fumerola\nbillf@FreeBSD.org\n1998/11/11\n2006/12/14"] jmallett [label="Juli Mallett\njmallett@FreeBSD.org\n2003/01/16\n2006/08/10"] @@ -43,6 +42,8 @@ node [color=lightblue2, style=filled, bgcolor=black]; ache [label="Andrey Chernov\nache@FreeBSD.org\n1994/11/15"] acm [label="Jose Alonso Cardenas Marquez\nacm@FreeBSD.org\n2006/07/18"] +adamw [label="Adam Weinberger\nadamw@FreeBSD.org\n2002/10/16"] +adridg [label="Adriaan de Groot\nadridg@FreeBSD.org\n2017/09/08"] ahze [label="Michael Johnson\nahze@FreeBSD.org\n2004/10/29"] ak [label="Alex Kozlov\nak@FreeBSD.org\n2012/02/29"] ale [label="Alex Dupre\nale@FreeBSD.org\n2004/01/12"] @@ -84,7 +85,9 @@ daichi [label="Daichi Goto\ndaichi@FreeBSD.org\n2002/1 danfe [label="Alexey Dokuchaev\ndanfe@FreeBSD.org\n2004/08/20"] danilo [label="Danilo E. Gondolfo\ndanilo@FreeBSD.org\n2013/09/23"] db [label="Diane Bruce\ndb@FreeBSD.org\n2007/01/18"] +dbaio [label="Danilo G. Baio\ndbaio@FreeBSD.org\n2017/05/03"] dbn [label="David Naylor\ndbn@FreeBSD.org\n2013/01/14"] +dch [label="Dave Cottlehuber\ndch@FreeBSD.org\n2017/09/09"] decke [label="Bernhard Froehlich\ndecke@FreeBSD.org\n2010/03/21"] delphij [label="Xin Li\ndelphij@FreeBSD.org\n2006/05/01"] demon [label="Dmitry Sivachenko\ndemon@FreeBSD.org\n2000/11/13"] @@ -97,8 +100,10 @@ edwin [label="Edwin Groothuis\nedwin@FreeBSD.org\n2002 ehaupt [label="Emanuel Haupt\nehaupt@FreeBSD.org\n2005/10/03"] eik [label="Oliver Eikemeier\neik@FreeBSD.org\n2003/11/12"] erwin [label="Erwin Lansing\nerwin@FreeBSD.org\n2003/06/04"] +eugen [label="Eugene Grosbein\neugen@FreeBSD.org\n2017/03/04"] farrokhi [label="Babak Farrokhi\nfarrokhi@FreeBSD.org\n2006/11/07"] feld [label="Mark Felder\nfeld@FreeBSD.org\n2013/06/25"] +fernape [label="Fernando Apesteguia\nfernape@FreeBSD.org\n2018/03/03"] fjoe [label="Max Khon\nfjoe@FreeBSD.org\n2001/08/06"] flo [label="Florian Smeets\nflo@FreeBSD.org\n2010/12/07"] fluffy [label="Dima Panov\nfluffy@FreeBSD.org\n2009/08/10"] @@ -126,6 +131,7 @@ jhale [label="Jason E. Hale\njhale@FreeBSD.org\n2012/0 jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2007/09/12"] jlaffaye [label="Julien Laffaye\njlaffaye@FreeBSD.org\n2011/06/06"] jmelo [label="Jean Milanez Melo\njmelo@FreeBSD.org\n2006/03/31"] +joneum [label="Jochen Neumeister\njoneum@FreeBSD.org\n2017/05/11"] joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1994/08/22"] johans [label="Johan Selst\njohans@FreeBSD.org\n2006/04/01"] josef [label="Josef El-Rayes\njosef@FreeBSD.org\n2004/12/20"] @@ -145,7 +151,9 @@ lawrance [label="Sam Lawrance\nlawrance@FreeBSD.org\n2 lbr [label="Lars Balker Rasmussen\nlbr@FreeBSD.org\n2006/04/30"] leeym [label="Yen-Ming Lee\nleeym@FreeBSD.org\n2002/08/14"] ler [label="Larry Rosenman\nler@FreeBSD.org\n2017/01/09"] +leres [label="Craig Leres\nleres@FreeBSD.org\n2017/10/10"] lev [label="Lev Serebryakov\nlev@FreeBSD.org\n2003/06/17"] +lifanov [label="Nikolai Lifanov\nlifanov@FreeBSD.org\n2016/12/11"] linimon [label="Mark Linimon\nlinimon@FreeBSD.org\n2003/10/23"] lioux [label="Mario Sergio Fujikawa Ferriera\nlioux@FreeBSD.org\n2000/10/14"] lippe [label="Felippe de Meirelles Motta\nlippe@FreeBSD.org\n2008/03/08"] @@ -167,8 +175,10 @@ matthew [label="Matthew Seaman\nmatthew@FreeBSD.org\n2 mezz [label="Jeremy Messenger\nmezz@FreeBSD.org\n2004/04/30"] mharo [label="Michael Haro\nmharo@FreeBSD.org\n1999/04/13"] milki [label="Jonathan Chu\nmilki@FreeBSD.org\n2013/12/15"] +misha [label="Mikhail Pchelin\nmisha@FreeBSD.org\n2016/11/15"] miwi [label="Martin Wilke\nmiwi@FreeBSD.org\n2006/06/04"] mm [label="Martin Matuska\nmm@FreeBSD.org\n2007/04/04"] +mmokhi [label="Mahdi Mokhtari\nmmokhi@FreeBSD.org\n2017/02/09"] mnag [label="Marcus Alves Grando\nmnag@FreeBSD.org\n2005/09/15"] mva [label="Marcus von Appen\nmva@FreeBSD.org\n2009/02/16"] nemysis [label="Rusmir Dusko\nnemysis@FreeBSD.org\n2013/07/31"] @@ -189,9 +199,11 @@ pclin [label="Po-Chien Lin\npclin@FreeBSD.org\n2013/02 pgj [label="Gabor Pali\npgj@FreeBSD.org\n2009/04/12"] pgollucci [label="Philip M. Gollucci\npgollucci@FreeBSD.org\n2008/07/21"] philip [label="Philip Paeps\nphilip@FreeBSD.org\n2005/10/19"] +pizzamig [label="Luca Pizzamiglio\npizzamig@FreeBSD.org\n2017/08/25"] rafan [label="Rong-En Fan\nrafan@FreeBSD.org\n2006/06/23"] rakuco [label="Raphael Kubo da Costa\nrakuco@FreeBSD.org\n2011/08/22"] rene [label="Rene Ladan\nrene@FreeBSD.org\n2010/04/11"] +rezny [label="Matthew Rezny\nrezny@FreeBSD.org\n2017/01/09"] riggs [label="Thomas Zander\nriggs@FreeBSD.org\n2014/01/09"] rm [label="Ruslan Makhmatkhanov\nrm@FreeBSD.org\n2011/11/06"] rnoland [label="Robert Noland\nrnoland@FreeBSD.org\n2008/07/21"] @@ -207,6 +219,7 @@ scheidell [label="Michael Scheidell\nscheidell@FreeBSD sem [label="Sergey Matveychuk\nsem@FreeBSD.org\n2004/07/07"] sergei [label="Sergei Kolobov\nsergei@FreeBSD.org\n2003/10/21"] shaun [label="Shaun Amott\nshaun@FreeBSD.org\n2006/06/19"] +shurd [label="Stephen Hurd\nshurd@FreeBSD.org\n2014/06/14"] simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2005/01/08"] skreuzer [label="Steven Kreuzer\nskreuzer@FreeBSD.org\n2009/03/25"] sobomax[label="Maxim Sobolev\nsobomax@FreeBSD.org\n2000/05/17"] @@ -218,17 +231,20 @@ sunpoet [label="Po-Chuan Hsieh\nsunpoet@FreeBSD.org\n2 swills [label="Steve Wills\nswills@FreeBSD.org\n2010/09/03"] sylvio [label="Sylvio Cesar Teixeira\nsylvio@FreeBSD.org\n2009/10/29"] tabthorpe [label="Thomas Abthorpe\ntabthorpe@FreeBSD.org\n2007/08/20"] +tcberner [label="Tobias C. Berner\ntcberner@FreeBSD.org\n2016/07/06"] tdb [label="Tim Bishop\ntdb@FreeBSD.org\n2005/11/30"] thierry [label="Thierry Thomas\nthierry@FreeBSD.org\n2004/03/15"] tijl [label="Tijl Coosemans\ntijl@FreeBSD.org\n2013/03/27"] timur [label="Timur Bakeyev\ntimur@FreeBSD.org\n2007/06/07"] tj [label="Tom Judge\ntj@FreeBSD.org\n2012/05/28"] tmclaugh [label="Tom McLaughlin\ntmclaugh@FreeBSD.org\n2005/09/15"] +tobik [label="Tobias Kortkamp\ntobik@FreeBSD.org\n2017/02/08"] tota [label="TAKATSU Tomonari\ntota@FreeBSD.org\n2009/03/30"] trasz [label="Edward Tomasz Napierala\ntrasz@FreeBSD.org\n2007/04/12"] trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2004/07/06"] trociny [label="Mikolaj Golub\ntrociny@FreeBSD.org\n2013/10/17"] tz [label="Torsten Zuehlsdorff\ntz@FreeBSD.org\n2016/06/04"] +ultima [label="Richard Gallamore\nultima@FreeBSD.org\n2017/06/07"] uqs [label="Ulrich Spoerlein\nuqs@FreeBSD.org\n2012/01/19"] vd [label="Vasil Dimov\nvd@FreeBSD.org\n2006/01/19"] vg [label="Veniamin Gvozdikov\nvg@FreeBSD.org\n2013/06/11"] @@ -239,6 +255,7 @@ woodsb02 [label="Ben Woods\nwoodsb02@FreeBSD.org\n2016 wxs [label="Wesley Shields\nwxs@FreeBSD.org\n2008/01/03"] xmj [label="Johannes Jost Meixner\nxmj@FreeBSD.org\n2014/04/07"] xride [label="Soeren Straarup\nxride@FreeBSD.org\n2006/09/27"] +yuri [label="Yuri Victorovich\nyuri@FreeBSD.org\n2017/10/30"] yzlin [label="Yi-Jheng Lin\nyzlin@FreeBSD.org\n2009/07/19"] zeising [label="Niclas Zeising\nzeising@FreeBSD.org\n2012/07/03"] zi [label="Ryan Steinmetz\nzi@FreeBSD.org\n2011/07/14"] @@ -274,6 +291,8 @@ asami -> obrien avilla -> jhale avilla -> rakuco +az -> eugen + bdrewery -> dbn bdrewery -> sbruno bdrewery -> trociny @@ -325,6 +344,7 @@ culot -> marino culot -> wg db -> tj +db -> shurd decke -> sperber @@ -364,6 +384,8 @@ erwin -> simon feld -> brnrd feld -> junovitch +feld -> mmokhi +feld -> rezny fjoe -> danfe fjoe -> flo @@ -380,6 +402,7 @@ flz -> johans flz -> laszlof flz -> romain +jpaetzel -> misha jpaetzel -> wg gabor -> lippe @@ -389,6 +412,7 @@ gabor -> scheidell garga -> acm garga -> alepulver +garga -> dbaio garga -> mandree garga -> mm garga -> rnoland @@ -420,6 +444,9 @@ jadawin -> wen joerg -> netchild +jrm -> dch +jrm -> jwb + junovitch -> tz knu -> daichi @@ -448,8 +475,15 @@ lawrance -> itetcu leeym -> clsung +ler -> leres + +lifanov -> ultima + lioux -> pat +lme -> pizzamig +lme -> tobik + lwhsu -> yzlin maho -> stephen @@ -471,9 +505,16 @@ makc -> rakuco mat -> bmah mat -> dvl mat -> gordon +mat -> mmokhi +mat -> tcberner mat -> thierry +mat -> tobik mat -> woodsb02 +matthew -> leres +matthew -> lifanov +matthew -> ultima + mezz -> tmclaugh miwi -> amdmi3 @@ -487,6 +528,7 @@ miwi -> dhn miwi -> farrokhi miwi -> fluffy miwi -> gahr +miwi -> joneum miwi -> kmoore miwi -> lme miwi -> makc @@ -518,6 +560,8 @@ novel -> rm obrien -> mharo obrien -> gerald +olivier -> pizzamig + osa -> vg pat -> adamw @@ -543,12 +587,15 @@ pi -> tz rafan -> chinsan +rakuco -> adridg rakuco -> alonso +rakuco -> tcberner rene -> bar rene -> cmt rene -> crees rene -> jgh +rene -> joneum rene -> ler rene -> olivierd @@ -569,6 +616,7 @@ shaun -> timur shaun -> matthew skreuzer -> gnn +skreuzer -> shurd sobomax -> demon sobomax -> glewis @@ -580,9 +628,11 @@ stas -> araujo steve -> netchild +swills -> dch swills -> feld swills -> milki swills -> pclin +swills -> rezny swills -> robak swills -> rpaulo swills -> tz @@ -604,12 +654,22 @@ tabthorpe -> rene tabthorpe -> zi tabthorpe -> gblach +tcberner -> adridg +tcberner -> joneum +tcberner -> yuri +tcberner -> fernape + thierry -> jadawin thierry -> riggs tmclaugh -> itetcu tmclaugh -> xride +tz -> joneum +tz -> fernape + +vsevolod -> eugen + wen -> cs wen -> culot wen -> pawel @@ -617,6 +677,7 @@ wen -> pawel wg -> alexey wg -> danilo wg -> dvl +wg -> misha wg -> nemysis will -> lioux Modified: stable/11/share/misc/committers-src.dot ============================================================================== --- stable/11/share/misc/committers-src.dot Thu Mar 15 09:16:10 2018 (r330977) +++ stable/11/share/misc/committers-src.dot Thu Mar 15 09:22:20 2018 (r330978) @@ -15,7 +15,7 @@ digraph src { # foo [label="Foo Bar\nfoo@FreeBSD.org\n????/??/??"] # # ????/??/?? is the date when the commit bit was obtained, usually the one you -# can find looking at svn logs for the svnadmin/access file. +# can find looking at svn logs for the svnadmin/conf/access file. # Use YYYY/MM/DD format. # # For returned commit bits, the node definition will follow this example: @@ -78,7 +78,6 @@ non [label="Noriaki Mitsnaga\nnon@FreeBSD.org\n2000/06 onoe [label="Atsushi Onoe\nonoe@FreeBSD.org\n2000/07/21\n2008/11/10"] rafan [label="Rong-En Fan\nrafan@FreeBSD.org\n2007/01/31\n2012/07/23"] randi [label="Randi Harper\nrandi@FreeBSD.org\n2010/04/20\n2012/05/10"] -rgrimes [label="Rod Grimes\nrgrimes@FreeBSD.org\n1993/06/12\n2003/03/08"] rink [label="Rink Springer\nrink@FreeBSD.org\n2006/01/16\n2010/11/04"] robert [label="Robert Drehmel\nrobert@FreeBSD.org\n2001/08/23\n2006/05/13"] sah [label="Sam Hopkins\nsah@FreeBSD.org\n2004/12/15\n2008/11/10"] @@ -142,11 +141,14 @@ cognet [label="Olivier Houchard\ncognet@FreeBSD.org\n2 cokane [label="Coleman Kane\ncokane@FreeBSD.org\n2000/06/19"] cperciva [label="Colin Percival\ncperciva@FreeBSD.org\n2004/01/20"] csjp [label="Christian S.J. Peron\ncsjp@FreeBSD.org\n2004/05/04"] +dab [label="David Bright\ndab@FreeBSD.org\n2016/10/24"] das [label="David Schultz\ndas@FreeBSD.org\n2003/02/21"] davide [label="Davide Italiano\ndavide@FreeBSD.org\n2012/01/27"] dchagin [label="Dmitry Chagin\ndchagin@FreeBSD.org\n2009/02/28"] +def [label="Konrad Witaszczyk\ndef@FreeBSD.org\n2016/11/02"] delphij [label="Xin Li\ndelphij@FreeBSD.org\n2004/09/14"] des [label="Dag-Erling Smorgrav\ndes@FreeBSD.org\n1998/04/03"] +dexuan [label="Dexuan Cui\ndexuan@FreeBSD.org\n2016/10/24"] dfr [label="Doug Rabson\ndfr@FreeBSD.org\n????/??/??"] dg [label="David Greenman\ndg@FreeBSD.org\n1993/06/14"] dim [label="Dimitry Andric\ndim@FreeBSD.org\n2010/08/30"] @@ -162,10 +164,12 @@ emaste [label="Ed Maste\nemaste@FreeBSD.org\n2005/10/0 emax [label="Maksim Yevmenkin\nemax@FreeBSD.org\n2003/10/12"] eri [label="Ermal Luci\neri@FreeBSD.org\n2008/06/11"] erj [label="Eric Joyner\nerj@FreeBSD.org\n2014/12/14"] +eugen [label="Eugene Grosbein\neugen@FreeBSD.org\n2017/09/19"] fabient [label="Fabien Thomas\nfabient@FreeBSD.org\n2009/03/16"] fanf [label="Tony Finch\nfanf@FreeBSD.org\n2002/05/05"] fjoe [label="Max Khon\nfjoe@FreeBSD.org\n2001/08/06"] flz [label="Florent Thoumie\nflz@FreeBSD.org\n2006/03/30"] +fsu [label="Fedor Uporov\nfsu@FreeBSD.org\n2017/08/28"] gabor [label="Gabor Kovesdan\ngabor@FreeBSD.org\n2010/02/02"] gad [label="Garance A. Drosehn\ngad@FreeBSD.org\n2000/10/27"] gallatin [label="Andrew Gallatin\ngallatin@FreeBSD.org\n1999/01/15"] @@ -183,6 +187,7 @@ gshapiro [label="Gregory Shapiro\ngshapiro@FreeBSD.org harti [label="Hartmut Brandt\nharti@FreeBSD.org\n2003/01/29"] hiren [label="Hiren Panchasara\nhiren@FreeBSD.org\n2013/04/12"] hmp [label="Hiten Pandya\nhmp@FreeBSD.org\n2004/03/23"] +hselasky [label="Hans Petter Selasky\nhselasky@FreeBSD.org\n"] ian [label="Ian Lepore\nian@FreeBSD.org\n2013/01/07"] iedowse [label="Ian Dowse\niedowse@FreeBSD.org\n2000/12/01"] imp [label="Warner Losh\nimp@FreeBSD.org\n1996/09/20"] @@ -223,6 +228,7 @@ kensmith [label="Ken Smith\nkensmith@FreeBSD.org\n2004 kevans [label="Kyle Evans\nkevans@FreeBSD.org\n2017/06/20"] kevlo [label="Kevin Lo\nkevlo@FreeBSD.org\n2006/07/23"] kib [label="Konstantin Belousov\nkib@FreeBSD.org\n2006/06/03"] +kibab [label="Ilya Bakulin\nkibab@FreeBSD.org\n2017/09/02"] kmacy [label="Kip Macy\nkmacy@FreeBSD.org\n2005/06/01"] kp [label="Kristof Provost\nkp@FreeBSD.org\n2015/03/22"] landonf [label="Landon Fuller\nlandonf@FreeBSD.org\n2016/05/31"] @@ -242,6 +248,7 @@ maxim [label="Maxim Konovalov\nmaxim@FreeBSD.org\n2002 mdf [label="Matthew Fleming\nmdf@FreeBSD.org\n2010/06/04"] mdodd [label="Matthew N. Dodd\nmdodd@FreeBSD.org\n1999/07/27"] melifaro [label="Alexander V. Chernikov\nmelifaro@FreeBSD.org\n2011/10/04"] +mizhka [label="Michael Zhilin\nmizhka@FreeBSD.org\n2016/07/19"] mjacob [label="Matt Jacob\nmjacob@FreeBSD.org\n1997/08/13"] mjg [label="Mateusz Guzik\nmjg@FreeBSD.org\n2012/06/04"] mjoras [label="Matt Joras\nmjoras@FreeBSD.org\n2017/07/12"] @@ -250,6 +257,7 @@ mmel [label="Michal Meloun\nmmel@FreeBSD.org\n2015/11/ monthadar [label="Monthadar Al Jaberi\nmonthadar@FreeBSD.org\n2012/04/02"] mp [label="Mark Peek\nmp@FreeBSD.org\n2001/07/27"] mr [label="Michael Reifenberger\nmr@FreeBSD.org\n2001/09/30"] +mw [label="Marcin Wojtas\nmw@FreeBSD.org\n2017/07/18"] neel [label="Neel Natu\nneel@FreeBSD.org\n2009/09/20"] netchild [label="Alexander Leidinger\nnetchild@FreeBSD.org\n2005/03/31"] ngie [label="Ngie Cooper\nngie@FreeBSD.org\n2014/07/27"] @@ -264,7 +272,7 @@ peadar [label="Peter Edwards\npeadar@FreeBSD.org\n2004 peter [label="Peter Wemm\npeter@FreeBSD.org\n1995/07/04"] peterj [label="Peter Jeremy\npeterj@FreeBSD.org\n2012/09/14"] pfg [label="Pedro Giffuni\npfg@FreeBSD.org\n2011/12/01"] -phil [label="Phil Shafer\nphil@FreeBSD.ogr\n2016/12/30"] +phil [label="Phil Shafer\nphil@FreeBSD.ogr\n2015/12/30"] philip [label="Philip Paeps\nphilip@FreeBSD.org\n2004/01/21"] phk [label="Poul-Henning Kamp\nphk@FreeBSD.org\n1994/02/21"] pho [label="Peter Holm\npho@FreeBSD.org\n2008/11/16"] @@ -276,7 +284,9 @@ qingli [label="Qing Li\nqingli@FreeBSD.org\n2005/04/13 ray [label="Aleksandr Rybalko\nray@FreeBSD.org\n2011/05/25"] rdivacky [label="Roman Divacky\nrdivacky@FreeBSD.org\n2008/03/13"] remko [label="Remko Lodder\nremko@FreeBSD.org\n2007/02/23"] +rgrimes [label="Rodney W. Grimes\nrgrimes@FreeBSD.org\n1993/06/12\n2017/03/03"] rik [label="Roman Kurakin\nrik@FreeBSD.org\n2003/12/18"] +rlibby [label="Ryan Libby\nrlibby@FreeBSD.org\n2017/06/07"] rmacklem [label="Rick Macklem\nrmacklem@FreeBSD.org\n2009/03/27"] rmh [label="Robert Millan\nrmh@FreeBSD.org\n2011/09/18"] rnoland [label="Robert Noland\nrnoland@FreeBSD.org\n2008/09/15"] @@ -300,9 +310,11 @@ se [label="Stefan Esser\nse@FreeBSD.org\n1994/08/26"] sephe [label="Sepherosa Ziehau\nsephe@FreeBSD.org\n2007/03/28"] sepotvin [label="Stephane E. Potvin\nsepotvin@FreeBSD.org\n2007/02/15"] sgalabov [label="Stanislav Galabov\nsgalabov@FreeBSD.org\n2016/02/24"] +shurd [label="Stephen Hurd\nshurd@FreeBSD.org\n2017/09/02"] simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2006/03/07"] sjg [label="Simon J. Gerraty\nsjg@FreeBSD.org\n2012/10/23"] skra [label="Svatopluk Kraus\nskra@FreeBSD.org\n2015/10/28"] +slavash [label="Slava Shwartsman\nslavash@FreeBSD.org\n2018/02/08"] slm [label="Stephen McConnell\nslm@FreeBSD.org\n2014/05/07"] smh [label="Steven Hartland\nsmh@FreeBSD.org\n2012/11/12"] sobomax [label="Maxim Sobolev\nsobomax@FreeBSD.org\n2001/07/25"] @@ -317,6 +329,7 @@ theraven [label="David Chisnall\ntheraven@FreeBSD.org\ thompsa [label="Andrew Thompson\nthompsa@FreeBSD.org\n2005/05/25"] ticso [label="Bernd Walter\nticso@FreeBSD.org\n2002/01/31"] tijl [label="Tijl Coosemans\ntijl@FreeBSD.org\n2010/07/16"] +tsoome [label="Toomas Soome\ntsoome@FreeBSD.org\n2016/08/10"] trasz [label="Edward Tomasz Napierala\ntrasz@FreeBSD.org\n2008/08/22"] trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/05/28"] trociny [label="Mikolaj Golub\ntrociny@FreeBSD.org\n2011/03/10"] @@ -334,6 +347,7 @@ wkoszek [label="Wojciech A. Koszek\nwkoszek@FreeBSD.or wma [label="Wojciech Macek\nwma@FreeBSD.org\n2016/01/18"] wollman [label="Garrett Wollman\nwollman@FreeBSD.org\n????/??/??"] wsalamon [label="Wayne Salamon\nwsalamon@FreeBSD.org\n2005/06/25"] +wulf [label="Vladimir Kondratyev\nwulf@FreeBSD.org\n2017/04/27"] yongari [label="Pyun YongHyeon\nyongari@FreeBSD.org\n2004/08/01"] zbb [label="Zbigniew Bodek\nzbb@FreeBSD.org\n2013/09/02"] zec [label="Marko Zec\nzec@FreeBSD.org\n2008/06/22"] @@ -359,6 +373,7 @@ adrian -> jmcneill adrian -> landonf adrian -> lidl adrian -> loos +adrian -> mizhka adrian -> monthadar adrian -> ray adrian -> rmh @@ -367,6 +382,8 @@ adrian -> sgalabov ae -> melifaro +allanjude -> tsoome + alc -> davide andre -> qingli @@ -376,12 +393,14 @@ andrew -> manu anholt -> jkim avg -> art +avg -> eugen avg -> pluknet avg -> smh bapt -> allanjude bapt -> araujo bapt -> bdrewery +bapt -> wulf benno -> grehan @@ -413,6 +432,7 @@ cognet -> jceel cognet -> kevlo cognet -> ian cognet -> manu +cognet -> mw cognet -> wkoszek cognet -> wma cognet -> zbb @@ -497,13 +517,17 @@ gnn -> jtl gnn -> karels gonzo -> jmcneill +gonzo -> wulf grehan -> bryanv +grehan -> rgrimes grog -> edwin grog -> le grog -> peterj +hselasky -> slavash + imp -> akiyama imp -> ambrisko imp -> andrew @@ -516,6 +540,7 @@ imp -> furuta imp -> joe imp -> jon imp -> keichii +imp -> kibab imp -> mb imp -> mr imp -> neel @@ -529,6 +554,7 @@ imp -> sanpei imp -> shiba imp -> takawata imp -> toshi +imp -> tsoome imp -> uch jake -> bms @@ -618,6 +644,7 @@ kib -> rdivacky kib -> rmacklem kib -> rmh kib -> skra +kib -> slavash kib -> stas kib -> tijl kib -> trociny @@ -634,11 +661,13 @@ marcel -> nwhitehorn marcel -> sjg markj -> cem +markj -> rlibby markm -> jasone markm -> sheldonh mav -> ae +mav -> eugen mdf -> gleb @@ -676,6 +705,8 @@ obrien -> gshapiro obrien -> kan obrien -> sam +pfg -> fsu + peter -> asmodai peter -> jayanth peter -> ps @@ -690,6 +721,7 @@ philip -> kp phk -> jkoshy phk -> mux +pjd -> def pjd -> kib pjd -> lulf pjd -> oshogbo @@ -751,6 +783,7 @@ sam -> sephe sbruno -> hiren sbruno -> jeb sbruno -> jimharris +sbruno -> shurd schweikh -> dds @@ -762,6 +795,8 @@ scottl -> sbruno scottl -> slm scottl -> yongari +sephe -> dexuan + sheldonh -> dwmalone sheldonh -> iedowse @@ -789,6 +824,7 @@ ume -> suz ume -> tshiozak vangyzen -> badger +vangyzen -> dab wes -> scf Modified: stable/11/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- stable/11/usr.bin/calendar/calendars/calendar.freebsd Thu Mar 15 09:16:10 2018 (r330977) +++ stable/11/usr.bin/calendar/calendars/calendar.freebsd Thu Mar 15 09:22:20 2018 (r330978) @@ -28,6 +28,7 @@ 01/19 Ruslan Ermilov born in Simferopol, USSR, 1974 01/19 Marcelo S. Araujo born in Joinville, Santa Catarina, Brazil, 1981 01/20 Poul-Henning Kamp born in Korsoer, Denmark, 1966 +01/21 Mahdi Mokhtari born in Tehran, Iran, 1995 01/22 Johann Visagie born in Cape Town, South Africa, 1970 01/23 Hideyuki KURASHINA born in Niigata, Japan, 1982 01/24 Fabien Thomas born in Avignon, France, 1971 @@ -113,6 +114,7 @@ 03/25 Andrew R. Reiter born in Springfield, Massachusetts, United States, 1980 03/27 Josef El-Rayes born in Linz, Austria, 1982 03/28 Sean C. Farley born in Indianapolis, Indiana, United States, 1970 +03/29 Dave Cottlehuber born in Christchurch, New Zealand, 1973 03/29 Thierry Thomas born in Luxeuil les Bains, France, 1961 03/30 Po-Chuan Hsieh born in Taipei, Taiwan, Republic of China, 1978 03/31 First quarter status reports are due on 04/15 @@ -140,10 +142,12 @@ 04/22 Joerg Wunsch born in Dresden, Sachsen, Germany, 1962 04/22 Jun Kuriyama born in Matsue, Shimane, Japan, 1973 04/22 Jakub Klama born in Blachownia, Silesia, Poland, 1989 +04/25 Richard Gallamore born in Kissimmee, Florida, United States, 1987 04/26 Rene Ladan born in Geldrop, the Netherlands, 1980 04/29 Adam Weinberger born in Berkeley, California, United States, 1980 04/29 Eric Anholt born in Portland, Oregon, United States, 1983 05/01 Randall Stewart born in Spokane, Washington, United States, 1959 +05/02 Danilo G. Baio born in Maringa, Parana, Brazil, 1986 05/02 Wojciech A. Koszek born in Czestochowa, Poland, 1987 05/03 Brian Dean born in Elkins, West Virginia, United States, 1966 05/03 Patrick Kelsey born in Freehold, New Jersey, United States, 1976 @@ -273,6 +277,7 @@ 08/19 Chin-San Huang born in Yi-Lan, Taiwan, Republic of China, 1979 08/19 Pav Lucistnik born in Kutna Hora, Czech Republic, 1980 08/20 Michael Heffner born in Cleona, Pennsylvania, United States, 1981 +08/22 Ilya Bakulin born in Tbilisi, USSR, 1986 08/24 Mark Linimon born in Houston, Texas, United States, 1955 08/24 Alexander Botero-Lowry died in San Francisco, California, United States, 2012 08/25 Beech Rintoul born in Oakland, California, United States, 1952 @@ -359,6 +364,7 @@ 11/21 Mark Johnston born in Toronto, Ontario, Canada, 1989 11/22 Frederic Culot born in Saint-Germain-En-Laye, France, 1976 11/23 Josef Lawrence Karthauser born in Pembury, Kent, United Kingdom, 1972 +11/23 Luca Pizzamiglio born in Casalpusterlengo, Italy, 1978 11/24 Andrey Zakhvatov born in Chelyabinsk, Russian Federation, 1974 11/24 Daniel Gerzo born in Bratislava, Slovakia, 1986 11/28 Nik Clayton born in Peterborough, United Kingdom, 1973 From owner-svn-src-all@freebsd.org Thu Mar 15 09:28:11 2018 Return-Path: Delivered-To: svn-src-all@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 8E474F5CAD0; Thu, 15 Mar 2018 09:28:11 +0000 (UTC) (envelope-from avg@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 39CB97688C; Thu, 15 Mar 2018 09:28:11 +0000 (UTC) (envelope-from avg@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 328DE145BD; Thu, 15 Mar 2018 09:28:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2F9SBQW060414; Thu, 15 Mar 2018 09:28:11 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F9SB7O060413; Thu, 15 Mar 2018 09:28:11 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803150928.w2F9SB7O060413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 09:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330979 - head/tests/sys/cddl/zfs/tests/cli_root/zfs_copies X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/tests/sys/cddl/zfs/tests/cli_root/zfs_copies X-SVN-Commit-Revision: 330979 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 09:28:11 -0000 Author: avg Date: Thu Mar 15 09:28:10 2018 New Revision: 330979 URL: https://svnweb.freebsd.org/changeset/base/330979 Log: re-enable zfs_copies_006_pos test after a fix in r330977 The test was disabled in r329408. PR: 225960 Modified: head/tests/sys/cddl/zfs/tests/cli_root/zfs_copies/zfs_copies_test.sh Modified: head/tests/sys/cddl/zfs/tests/cli_root/zfs_copies/zfs_copies_test.sh ============================================================================== --- head/tests/sys/cddl/zfs/tests/cli_root/zfs_copies/zfs_copies_test.sh Thu Mar 15 09:22:20 2018 (r330978) +++ head/tests/sys/cddl/zfs/tests/cli_root/zfs_copies/zfs_copies_test.sh Thu Mar 15 09:28:10 2018 (r330979) @@ -170,7 +170,6 @@ zfs_copies_006_pos_body() . $(atf_get_srcdir)/zfs_copies.cfg verify_disk_count "$DISKS" 1 - atf_skip "PR 225960 g_access leak when unmounting UFS on a zvol" ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_copies_006_pos.ksh || atf_fail "Testcase failed" } From owner-svn-src-all@freebsd.org Thu Mar 15 09:30:39 2018 Return-Path: Delivered-To: svn-src-all@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 C2518F5CDB9; Thu, 15 Mar 2018 09:30:39 +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 6FCDA76C00; Thu, 15 Mar 2018 09:30:39 +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 6ABA9145C9; Thu, 15 Mar 2018 09:30:39 +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 w2F9Ud9w060738; Thu, 15 Mar 2018 09:30:39 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F9Udnc060737; Thu, 15 Mar 2018 09:30:39 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803150930.w2F9Udnc060737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 09:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330980 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 330980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 09:30:39 -0000 Author: eadler Date: Thu Mar 15 09:30:39 2018 New Revision: 330980 URL: https://svnweb.freebsd.org/changeset/base/330980 Log: MFC r327474: bsdinstall: inform users that typing will not be visible Some users, especially those that are new, might be confused when passwd does not echo anything. Inform users that the password will not be visible. PR: 196113 Modified: stable/11/usr.sbin/bsdinstall/scripts/rootpass Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/rootpass ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/rootpass Thu Mar 15 09:28:10 2018 (r330979) +++ stable/11/usr.sbin/bsdinstall/scripts/rootpass Thu Mar 15 09:30:39 2018 (r330980) @@ -32,5 +32,6 @@ echo "========================" echo echo "Please select a password for the system management account (root):" +echo "Typed characters will not be visible." chroot $BSDINSTALL_CHROOT passwd root 2>&1 From owner-svn-src-all@freebsd.org Thu Mar 15 09:38:19 2018 Return-Path: Delivered-To: svn-src-all@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 70A6DF5D860; Thu, 15 Mar 2018 09:38:19 +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 1D1BC773E2; Thu, 15 Mar 2018 09:38:19 +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 10C8814740; Thu, 15 Mar 2018 09:38:19 +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 w2F9cI58065826; Thu, 15 Mar 2018 09:38:18 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F9cIHu065824; Thu, 15 Mar 2018 09:38:18 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803150938.w2F9cIHu065824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 09:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330981 - stable/11/usr.bin/morse X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/morse X-SVN-Commit-Revision: 330981 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 09:38:19 -0000 Author: eadler Date: Thu Mar 15 09:38:18 2018 New Revision: 330981 URL: https://svnweb.freebsd.org/changeset/base/330981 Log: MFC r327514,r327521,r327614,r327615,r327616,r327623: morse(6): several improvements - add ñ, ', and _ - remove lint support - add missing header for ioctl - fix two typod - Use `-r` for "reverse" mode and to match DragonFlyBSD. - Move defines around to clear up logic - use `errx` instead of `fprintf` and `exit` - Use copyright comment header - Make it easier to compile on !FreeBSD - Diff reduction against DragonFlyBSD - bump Dd - use 'r' instead of 'D' from the original submission PR: 35109 Modified: stable/11/usr.bin/morse/morse.6 stable/11/usr.bin/morse/morse.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/morse/morse.6 ============================================================================== --- stable/11/usr.bin/morse/morse.6 Thu Mar 15 09:30:39 2018 (r330980) +++ stable/11/usr.bin/morse/morse.6 Thu Mar 15 09:38:18 2018 (r330981) @@ -29,7 +29,7 @@ .\" @(#)bcd.6 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd June 7, 2005 +.Dd January 5, 2018 .Dt MORSE 6 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nd reformat input as morse code .Sh SYNOPSIS .Nm -.Op Fl elps +.Op Fl elrps .Op Fl d Ar device .Op Fl w Ar speed .Op Fl c Ar speed @@ -85,13 +85,18 @@ Similar to .Fl p , but use the RTS line of .Ar device -(which must by a TTY device) +(which must be a TTY device) in order to emit the morse code. .It Fl e Echo each character before it is sent, used together with either .Fl p or .Fl d . +.It Fl r +Decode morse output consisting of dots and dashes (as generated by using +the +.Fl s +option). .El .Pp The Modified: stable/11/usr.bin/morse/morse.c ============================================================================== --- stable/11/usr.bin/morse/morse.c Thu Mar 15 09:30:39 2018 (r330980) +++ stable/11/usr.bin/morse/morse.c Thu Mar 15 09:38:18 2018 (r330981) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * @@ -32,23 +32,21 @@ * */ -#ifndef lint static const char copyright[] = "@(#) Copyright (c) 1988, 1993\n\ The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ -#ifndef lint #if 0 static char sccsid[] = "@(#)morse.c 8.1 (Berkeley) 5/31/93"; #endif static const char rcsid[] = "$FreeBSD$"; -#endif /* not lint */ #include +#include #include +#include #include #include #include @@ -59,9 +57,14 @@ static const char rcsid[] = #include #include +#ifdef __FreeBSD__ /* Always use the speaker, let the open fail if -p is selected */ #define SPEAKER "/dev/speaker" +#endif +#define WHITESPACE " \t\n" +#define DELIMITERS " \t" + #ifdef SPEAKER #include #endif @@ -132,6 +135,8 @@ static const struct morsetab mtab[] = { {'$', "...-..-"}, {'+', ".-.-."}, /* AR */ {'@', ".--.-."}, /* AC */ + {'_', "..--.-"}, + {'\'', ".----."}, /* prosigns without already assigned values */ @@ -156,6 +161,7 @@ static const struct morsetab iso8859_1tab[] = { {'\350', "..-.."}, /* è */ {'\351', "..-.."}, /* é */ {'\352', "-..-."}, /* ê */ + {'\361', "--.--"}, /* ñ */ {'\366', "---."}, /* ö */ {'\374', "..--"}, /* ü */ @@ -267,14 +273,11 @@ static const struct morsetab koi8rtab[] = { }; static void show(const char *), play(const char *), morse(char); +static void decode (char *), fdecode(FILE *); static void ttyout(const char *); static void sighandler(int); -#define GETOPTOPTS "c:d:ef:lsw:" -#define USAGE \ -"usage: morse [-els] [-d device] [-w speed] [-c speed] [-f frequency] [string ...]\n" - -static int pflag, lflag, sflag, eflag; +static int pflag, lflag, rflag, sflag, eflag; static int wpm = 20; /* effective words per minute */ static int cpm; /* effective words per minute between * characters */ @@ -293,17 +296,20 @@ static int olflags; #ifdef SPEAKER static tone_t sound; -#undef GETOPTOPTS -#define GETOPTOPTS "c:d:ef:lpsw:" -#undef USAGE +#define GETOPTOPTS "c:d:ef:lprsw:" #define USAGE \ -"usage: morse [-elps] [-d device] [-w speed] [-c speed] [-f frequency] [string ...]\n" +"usage: morse [-elprs] [-d device] [-w speed] [-c speed] [-f frequency] [string ...]\n" +#else +#define GETOPTOPTS "c:d:ef:lrsw:" +#define USAGE \ +"usage: morse [-elrs] [-d device] [-w speed] [-c speed] [-f frequency] [string ...]\n" + #endif static const struct morsetab *hightab; int -main(int argc, char **argv) +main(int argc, char *argv[]) { int ch, lflags; char *p, *codeset; @@ -331,6 +337,9 @@ main(int argc, char **argv) pflag = 1; break; #endif + case 'r': + rflag = 1; + break; case 's': sflag = 1; break; @@ -339,42 +348,36 @@ main(int argc, char **argv) break; case '?': default: - fputs(USAGE, stderr); - exit(1); + errx(1, USAGE); } - if (sflag && lflag) { - fputs("morse: only one of -l and -s allowed\n", stderr); - exit(1); + if ((sflag && lflag) || (sflag && rflag) || (lflag && rflag)) { + errx(1, "morse: only one of -l, -s, and -r allowed\n"); } if ((pflag || device) && (sflag || lflag)) { - fputs("morse: only one of -p, -d and -l, -s allowed\n", stderr); - exit(1); + errx(1, "morse: only one of -p, -d and -l, -s allowed\n"); } - if (cpm == 0) + if (cpm == 0) { cpm = wpm; + } if ((pflag || device) && ((wpm < 1) || (wpm > 60) || (cpm < 1) || (cpm > 60))) { - fputs("morse: insane speed\n", stderr); - exit(1); + errx(1, "morse: insane speed\n"); } - if ((pflag || device) && (freq == 0)) + if ((pflag || device) && (freq == 0)) { freq = FREQUENCY; - + } #ifdef SPEAKER if (pflag) { if ((spkr = open(SPEAKER, O_WRONLY, 0)) == -1) { - perror(SPEAKER); - exit(1); + err(1, SPEAKER); } } else #endif if (device) { if ((line = open(device, O_WRONLY | O_NONBLOCK)) == -1) { - perror("open tty line"); - exit(1); + err(1, "open tty line"); } if (tcgetattr(line, &otty) == -1) { - perror("tcgetattr() failed"); - exit(1); + err(1, "tcgetattr() failed"); } ntty = otty; ntty.c_cflag |= CLOCAL; @@ -419,9 +422,29 @@ main(int argc, char **argv) hightab = iso8859_7tab; } - if (lflag) + if (lflag) { printf("m"); - if (*argv) { + } + if (rflag) { + if (*argv) { + do { + p = strtok(*argv, DELIMITERS); + if (p == NULL) { + decode(*argv); + } + else { + while (p) { + decode(p); + p = strtok(NULL, DELIMITERS); + } + } + } while (*++argv); + putchar('\n'); + } else { + fdecode(stdin); + } + } + else if (*argv) { do { for (p = *argv; *p; ++p) { if (eflag) @@ -518,15 +541,13 @@ play(const char *s) } if (sound.duration) { if (ioctl(spkr, SPKRTONE, &sound) == -1) { - perror("ioctl play"); - exit(1); + err(1, "ioctl play"); } } sound.frequency = 0; sound.duration = dot_clock; if (ioctl(spkr, SPKRTONE, &sound) == -1) { - perror("ioctl rest"); - exit(1); + err(1, "ioctl rest"); } } sound.frequency = 0; @@ -575,6 +596,68 @@ ttyout(const char *s) } duration = cdot_clock * CHAR_SPACE * 10000; usleep(duration); +} + +void +fdecode(FILE *stream) +{ + char *n, *p, *s; + char buf[BUFSIZ]; + + s = buf; + while (fgets(s, BUFSIZ - (s - buf), stream)) { + p = buf; + + while (*p && isblank(*p)) { + p++; + } + while (*p && isspace(*p)) { + p++; + putchar (' '); + } + while (*p) { + n = strpbrk(p, WHITESPACE); + if (n == NULL) { + /* The token was interrupted at the end + * of the buffer. Shift it to the begin + * of the buffer. + */ + for (s = buf; *p; *s++ = *p++) + ; + } else { + *n = '\0'; + n++; + decode(p); + p = n; + } + } + } + putchar('\n'); +} + +void +decode(char *p) +{ + char c; + const struct morsetab *m; + + c = ' '; + for (m = mtab; m != NULL && m->inchar != '\0'; m++) { + if (strcmp(m->morse, p) == 0) { + c = m->inchar; + break; + } + } + + if (c == ' ') + for (m = hightab; m != NULL && m->inchar != '\0'; m++) { + if (strcmp(m->morse, p) == 0) { + c = m->inchar; + break; + } + } + + putchar(c); } static void From owner-svn-src-all@freebsd.org Thu Mar 15 09:43:39 2018 Return-Path: Delivered-To: svn-src-all@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 A6FB2F5DF2F; Thu, 15 Mar 2018 09:43:39 +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 2B90C7796E; Thu, 15 Mar 2018 09:43:39 +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 26984148B7; Thu, 15 Mar 2018 09:43:39 +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 w2F9hd0q070637; Thu, 15 Mar 2018 09:43:39 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F9hdPX070636; Thu, 15 Mar 2018 09:43:39 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803150943.w2F9hdPX070636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 09:43:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330982 - stable/11/bin/df X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/bin/df X-SVN-Commit-Revision: 330982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 09:43:39 -0000 Author: eadler Date: Thu Mar 15 09:43:38 2018 New Revision: 330982 URL: https://svnweb.freebsd.org/changeset/base/330982 Log: MFC r305139: df(1): Allow duplicate -l flags gracefully Rather than producing a misleading error message when duplicate -l flags are provided to df(1), simply ignore extra flags and proceed as if only one was specified. This seems most reasonable given the usage for -l: -l Only display information about locally-mounted file systems. l and t flags still conflict, as before. PR: 208169 Modified: stable/11/bin/df/df.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/df/df.c ============================================================================== --- stable/11/bin/df/df.c Thu Mar 15 09:38:18 2018 (r330981) +++ stable/11/bin/df/df.c Thu Mar 15 09:43:38 2018 (r330982) @@ -193,6 +193,9 @@ main(int argc, char *argv[]) hflag = 0; break; case 'l': + /* Ignore duplicate -l */ + if (lflag) + break; if (vfslist != NULL) xo_errx(1, "-l and -t are mutually exclusive."); vfslist = makevfslist(makenetvfslist()); From owner-svn-src-all@freebsd.org Thu Mar 15 09:49:24 2018 Return-Path: Delivered-To: svn-src-all@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 DA0E3675; Thu, 15 Mar 2018 09:49:23 +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 842A577D77; Thu, 15 Mar 2018 09:49:23 +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 78BDF148BB; Thu, 15 Mar 2018 09:49:23 +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 w2F9nNBk070898; Thu, 15 Mar 2018 09:49:23 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2F9nNjg070897; Thu, 15 Mar 2018 09:49:23 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803150949.w2F9nNjg070897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 09:49:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330983 - stable/11/sbin/rcorder X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sbin/rcorder X-SVN-Commit-Revision: 330983 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 09:49:24 -0000 Author: eadler Date: Thu Mar 15 09:49:23 2018 New Revision: 330983 URL: https://svnweb.freebsd.org/changeset/base/330983 Log: MFC r305857,r305858,r305859: sbin/rcorder/rcorder.8: Amend HISTORY rcorder appeared in FreeBSD 5.0. Address issues raised by igor. PR: 212547 Submitted by: Sevan Janiyan ------------------------------------------------------------------------ r305858 | allanjude | 2016-09-16 04:11:04 +0000 (Fri, 16 Sep 2016) | 10 lines sbin/reboot/reboot.8: Amend HISTORY A standalone reboot utility showed up in 4.0BSD, in AT&T UNIX init has a case for reboot and is present in the version shipped with V5 either way, current entry is incorrect. PR: 212548 Submitted by: Sevan Janiyan ------------------------------------------------------------------------ r305859 | allanjude | 2016-09-16 04:12:32 +0000 (Fri, 16 Sep 2016) | 8 lines sbin/umount/umount.8: Amend HISTORY umount first appeared in V1, confirmed using TUHS archive http://minnie.tuhs.org/cgi-bin/utree.pl?file=V1/man/man1/umount.1 PR: 212554 Submitted by: Sevan Janiyan Modified: stable/11/sbin/rcorder/rcorder.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/rcorder/rcorder.8 ============================================================================== --- stable/11/sbin/rcorder/rcorder.8 Thu Mar 15 09:43:38 2018 (r330982) +++ stable/11/sbin/rcorder/rcorder.8 Thu Mar 15 09:49:23 2018 (r330983) @@ -1,7 +1,7 @@ .\" $NetBSD: rcorder.8,v 1.3 2000/07/17 14:16:22 mrg Exp $ .\" .\" Copyright (c) 1998 -.\" Perry E. Metzger. All rights reserved. +.\" Perry E. Metzger. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 5, 2011 +.Dd September 10, 2016 .Dt RCORDER 8 .Os .Sh NAME @@ -160,8 +160,11 @@ processing the stated file. .Sh HISTORY The .Nm -utility first appeared in +utility appeared in .Nx 1.5 . +.Nm +utility first appeared in +.Fx 5.0 . .Sh AUTHORS .An -nosplit Written by @@ -172,7 +175,7 @@ and The .Dq Li REQUIRE keyword is misleading: -It doesn't describe which daemons have to be running before a script +It does not describe which daemons have to be running before a script will be started. It describes which scripts must be placed before it in the dependency ordering. From owner-svn-src-all@freebsd.org Thu Mar 15 10:01:12 2018 Return-Path: Delivered-To: svn-src-all@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 7E5C66352; Thu, 15 Mar 2018 10:01:12 +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 30B9F78524; Thu, 15 Mar 2018 10:01:12 +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 2B6C914A9F; Thu, 15 Mar 2018 10:01:12 +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 w2FA1Cns077259; Thu, 15 Mar 2018 10:01:12 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FA1CqW077258; Thu, 15 Mar 2018 10:01:12 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803151001.w2FA1CqW077258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 10:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330984 - stable/11/usr.bin/calendar/calendars X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/calendar/calendars X-SVN-Commit-Revision: 330984 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 10:01:12 -0000 Author: eadler Date: Thu Mar 15 10:01:11 2018 New Revision: 330984 URL: https://svnweb.freebsd.org/changeset/base/330984 Log: MFC r306135,r311859,r321763,r321764,r321766,r321767,r321768,r321769,r321771,r321774,r321776,r321783,r321784,r321785,r321786,r321787,r321788,r321789,r321793,r321796,r321797,r321801,r321802,r321804,r321814,r321817,r321818,r321834,r321835,r321853,r321857,r321860,r321866,r321885,r321886,r321889,r321890,r321892,r321893,r321897,r321939,r321966,r321974,r321982,r321989,r322035,r322093,r322108,r322314,r322330,r322335,r322350,r322353,r322365,r322416,r322471,r322484,r322638,r322649,r322881,r322886,r323972,r330768,: Misc calendar changes Modified: stable/11/usr.bin/calendar/calendars/calendar.freebsd Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- stable/11/usr.bin/calendar/calendars/calendar.freebsd Thu Mar 15 09:49:23 2018 (r330983) +++ stable/11/usr.bin/calendar/calendars/calendar.freebsd Thu Mar 15 10:01:11 2018 (r330984) @@ -8,6 +8,7 @@ #define _calendar_freebsd_ 01/01 Dimitry Andric born in Utrecht, the Netherlands, 1969 +01/01 Lev Serebryakov born in Leningrad, USSR, 1979 01/01 Alexander Langer born in Duesseldorf, Nordrhein-Westfalen, Germany, 1981 01/02 Ion-Mihai "IOnut" Tetcu born in Bucharest, Romania, 1980 01/02 Patrick Li born in Beijing, People's Republic of China, 1985 @@ -18,7 +19,10 @@ 01/10 Jean-Yves Lefort born in Charleroi, Belgium, 1980 01/12 Yen-Ming Lee born in Taipei, Taiwan, Republic of China, 1977 01/12 Ying-Chieh Liao born in Taipei, Taiwan, Republic of China, 1979 +01/12 Kristof Provost born in Aalst, Belgium, 1983 +01/13 Ruslan Bukin born in Dudinka, Russian Federation, 1985 01/14 Yi-Jheng Lin born in Taichung, Taiwan, Republic of China, 1985 +01/15 Anne Dickison born in Madison, Indiana, United States, 1976 01/16 Ariff Abdullah born in Kuala Lumpur, Malaysia, 1978 01/16 Dmitry Sivachenko born in Moscow, USSR, 1978 01/16 Vanilla I. Shu born in Taipei, Taiwan, Republic of China, 1978 @@ -33,6 +37,7 @@ 01/23 Hideyuki KURASHINA born in Niigata, Japan, 1982 01/24 Fabien Thomas born in Avignon, France, 1971 01/24 Matteo Riondato born in Padova, Italy, 1986 +01/25 Nick Hibma born in Groningen, the Netherlands, 1972 01/25 Bernd Walter born in Moers, Nordrhein-Westfalen, Germany, 1974 01/26 Andrew Gallatin born in Buffalo, New York, United States, 1970 01/27 Nick Sayer born in San Diego, California, United States, 1968 @@ -50,14 +55,16 @@ 02/02 Michael W Lucas born in Detroit, Michigan, United States, 1967 02/02 Dmitry Chagin born in Stalingrad, USSR, 1976 02/02 Yoichi Nakayama born in Tsu, Mie, Japan, 1976 +02/02 Yoshihiro Takahashi born in Yokohama, Kanagawa, Japan, 1976 02/03 Jason Helfman born in Royal Oak, Michigan, United States, 1972 02/04 Eitan Adler born in West Hempstead, New York, United States, 1991 02/05 Frank Laszlo born in Howell, Michigan, United States, 1983 02/06 Julien Charbon born in Saint Etienne, Loire, France, 1978 +02/07 Bjoern Heidotting born in Uelsen, Germany, 1980 02/10 David Greenman born in Portland, Oregon, United States, 1968 02/10 Paul Richards born in Ammanford, Carmarthenshire, United Kingdom, 1968 02/10 Simon Barner born in Rosenheim, Bayern, Germany, 1980 -02/10 Jason E. Hale born in Pittsburgh, Pennsylvania, Unites States, 1982 +02/10 Jason E. Hale born in Pittsburgh, Pennsylvania, United States, 1982 02/13 Jesper Skriver born in Aarhus, Denmark, 1975 02/13 Steve Wills born in Lynchburg, Virginia, United States, 1975 02/13 Andrey Slusar born in Odessa, USSR, 1979 @@ -66,6 +73,9 @@ 02/14 Erwin Lansing born in 's-Hertogenbosch, the Netherlands, 1975 02/14 Martin Blapp born in Olten, Switzerland, 1976 02/15 Hiren Panchasara born in Ahmedabad, Gujarat, India, 1984 +02/16 Justin Hibbits born in Toledo, Ohio, United States, 1983 +02/16 Tobias Christian Berner born in Bern, Switzerland, 1985 +02/18 Christoph Moench-Tegeder born in Hannover, Niedersachsen, Germany, 1980 02/19 Murray Stokely born in Jacksonville, Florida, United States, 1979 02/20 Anders Nordby born in Oslo, Norway, 1976 02/21 Alexey Zelkin born in Simferopol, Ukraine, 1978 @@ -91,6 +101,8 @@ 03/07 Michael P. Pritchard born in Los Angeles, California, United States, 1964 03/07 Giorgos Keramidas born in Athens, Greece, 1976 03/10 Andreas Klemm born in Duesseldorf, Nordrhein-Westfalen, Germany, 1963 +03/10 Luiz Otavio O Souza born in Bauru, Sao Paulo, Brazil, 1978 +03/10 Nikolai Lifanov born in Moscow, Russian Federation, 1989 03/11 Soeren Straarup born in Andst, Denmark, 1978 03/12 Greg Lewis born in Adelaide, South Australia, Australia, 1969 03/13 Alexander Leidinger born in Neunkirchen, Saarland, Germany, 1976 @@ -112,6 +124,7 @@ 03/24 Marcel Moolenaar born in Hilversum, the Netherlands, 1968 03/24 Emanuel Haupt born in Zurich, Switzerland, 1979 03/25 Andrew R. Reiter born in Springfield, Massachusetts, United States, 1980 +03/26 Jonathan Anderson born in Ottawa, Ontario, Canada, 1983 03/27 Josef El-Rayes born in Linz, Austria, 1982 03/28 Sean C. Farley born in Indianapolis, Indiana, United States, 1970 03/29 Dave Cottlehuber born in Christchurch, New Zealand, 1973 @@ -119,6 +132,7 @@ 03/30 Po-Chuan Hsieh born in Taipei, Taiwan, Republic of China, 1978 03/31 First quarter status reports are due on 04/15 04/01 Matthew Jacob born in San Francisco, California, United States, 1958 +04/01 Alexander V. Chernikov born in Moscow, Russian Federation, 1984 04/01 Bill Fenner born in Bellefonte, Pennsylvania, United States, 1971 04/01 Peter Edwards born in Dublin, Ireland, 1973 04/03 Hellmuth Michaelis born in Kiel, Schleswig-Holstein, Germany, 1958 @@ -133,6 +147,7 @@ 04/11 Bruce A. Mah born in Fresno, California, United States, 1969 04/12 Patrick Gardella born in Columbus, Ohio, United States, 1967 04/12 Ed Schouten born in Oss, the Netherlands, 1986 +04/12 Ruey-Cherng Yu born in Keelung, Taiwan, 1978 04/13 Oliver Braun born in Nuremberg, Bavaria, Germany, 1972 04/14 Crist J. Clark born in Milwaukee, Wisconsin, United States, 1970 04/14 Glen J. Barber born in Wilkes-Barre, Pennsylvania, United States, 1981 @@ -144,6 +159,8 @@ 04/22 Jakub Klama born in Blachownia, Silesia, Poland, 1989 04/25 Richard Gallamore born in Kissimmee, Florida, United States, 1987 04/26 Rene Ladan born in Geldrop, the Netherlands, 1980 +04/28 Oleg Bulyzhin born in Kharkov, USSR, 1976 +04/28 Andriy Voskoboinyk born in Bila Tserkva, Ukraine, 1992 04/29 Adam Weinberger born in Berkeley, California, United States, 1980 04/29 Eric Anholt born in Portland, Oregon, United States, 1983 05/01 Randall Stewart born in Spokane, Washington, United States, 1959 @@ -161,12 +178,14 @@ 05/10 Markus Brueffer born in Gronau, Nordrhein-Westfalen, Germany, 1977 05/11 Kurt Lidl born in Rockville, Maryland, United States, 1968 05/11 Jesus Rodriguez born in Barcelona, Spain, 1972 +05/11 Marcin Wojtas born in Krakow, Poland, 1986 05/11 Roman Kurakin born in Moscow, USSR, 1979 05/11 Ulrich Spoerlein born in Schesslitz, Bayern, Germany, 1981 05/13 Pete Fritchman born in Lansdale, Pennsylvania, United States, 1983 05/14 Tatsumi Hosokawa born in Tokyo, Japan, 1968 05/14 Shigeyuku Fukushima born in Osaka, Japan, 1974 05/14 Bruce Cran born in Cambridge, United Kingdom, 1981 +05/15 Hans Petter Selasky born in Flekkefjord, Norway, 1982 05/16 Johann Kois born in Wolfsberg, Austria, 1975 05/16 Marcus Alves Grando born in Florianopolis, Santa Catarina, Brazil, 1979 05/17 Thomas Abthorpe born in Port Arthur, Ontario, Canada, 1968 @@ -175,6 +194,7 @@ 05/19 Sofian Brabez born in Toulouse, France, 1984 05/20 Dan Moschuk died in Burlington, Ontario, Canada, 2010 05/21 Kris Kennaway born in Winnipeg, Manitoba, Canada, 1978 +05/22 James Gritton born in San Francisco, California, United States, 1967 05/22 Clive Tong-I Lin born in Changhua, Taiwan, Republic of China, 1978 05/22 Michael Bushkov born in Rostov-on-Don, Russian Federation, 1985 05/22 Rui Paulo born in Evora, Portugal, 1986 @@ -182,6 +202,7 @@ 05/23 Munechika Sumikawa born in Osaka, Osaka, Japan, 1972 05/24 Duncan McLennan Barclay born in London, Middlesex, United Kingdom, 1970 05/24 Oliver Lehmann born in Karlsburg, Germany, 1981 +05/25 Pawel Pekala born in Swidnica, Poland, 1980 05/25 Tom Rhodes born in Ellwood City, Pennsylvania, United States, 1981 05/25 Roman Divacky born in Brno, Czech Republic, 1983 05/26 Jim Pirzyk born in Chicago, Illinois, United States, 1968 @@ -189,6 +210,7 @@ 05/27 Ollivier Robert born in Paris, France, 1967 05/29 Wilko Bulte born in Arnhem, the Netherlands, 1965 05/29 Seigo Tanimura born in Kitakyushu, Fukuoka, Japan, 1976 +05/30 Wen Heping born in Xiangxiang, Hunan, China, 1970 05/31 Ville Skytta born in Helsinki, Finland, 1974 06/02 Jean-Marc Zucconi born in Pontarlier, France, 1954 06/02 Alexander Botero-Lowry born in Austin, Texas, United States, 1986 @@ -205,6 +227,9 @@ 06/06 Alan Eldridge died in Denver, Colorado, United States, 2003 06/07 Jimmy Olgeni born in Milano, Italy, 1976 06/07 Benjamin Close born in Adelaide, Australia, 1978 +06/07 Roger Pau Monne born in Reus, Catalunya, Spain, 1986 +06/08 Ravi Pokala born in Royal Oak, Michigan, United States, 1980 +06/09 Stanislav Galabov born in Sofia, Bulgaria 1978 06/11 Alonso Cardenas Marquez born in Arequipa, Peru, 1979 06/14 Josh Paetzel born in Minneapolis, Minnesota, United States, 1973 06/17 Tilman Linneweh born in Weinheim, Baden-Wuerttemberg, Germany, 1978 @@ -218,12 +243,14 @@ 06/26 Brian Somers born in Dundrum, Dublin, Ireland, 1967 06/28 Mark Santcroos born in Rotterdam, the Netherlands, 1979 06/28 Xin Li born in Beijing, People's Republic of China, 1982 +06/28 Bradley T. Hughes born in Amarillo, Texas, United States, 1977 06/29 Wilfredo Sanchez Vega born in Majaguez, Puerto Rico, United States, 1972 06/29 Daniel Harris born in Lubbock, Texas, United States, 1985 06/29 Andrew Pantyukhin born in Moscow, Russian Federation, 1985 06/30 Guido van Rooij born in Best, Noord-Brabant, the Netherlands, 1965 06/30 Second quarter status reports are due on 07/15 07/01 Matthew Dillon born in San Francisco, California, United States, 1966 +07/01 Mateusz Guzik born in Nowy Targ, Poland, 1986 07/02 Mark Christopher Ovens born in Preston, Lancashire, United Kingdom, 1958 07/02 Vasil Venelinov Dimov born in Shumen, Bulgaria, 1982 07/04 Motoyuki Konno born in Musashino, Tokyo, Japan, 1969 @@ -238,6 +265,7 @@ 07/10 David Schultz born in Oakland, California, United States, 1982 07/10 Ben Woods born in Perth, Western Australia, Australia, 1984 07/11 Jesus R. Camou born in Hermosillo, Sonora, Mexico, 1983 +07/14 Fernando Apesteguia born in Madrid, Spain, 1981 07/15 Gary Jennejohn born in Rochester, New York, United States, 1950 07/16 Suleiman Souhlal born in Roma, Italy, 1983 07/16 Davide Italiano born in Milazzo, Italy, 1989 @@ -245,6 +273,7 @@ 07/19 Masafumi NAKANE born in Okazaki, Aichi, Japan, 1972 07/19 Simon L. Nielsen born in Copenhagen, Denmark, 1980 07/19 Gleb Smirnoff born in Kharkov, USSR, 1981 +07/20 Dru Lavigne born in Kingston, Ontario, Canada, 1965 07/20 Andrey V. Elsukov born in Kotelnich, Russian Federation, 1981 07/22 James Housley born in Chicago, Illinois, United States, 1965 07/22 Jens Schweikhardt born in Waiblingen, Baden-Wuerttemberg, Germany, 1967 @@ -273,6 +302,7 @@ 08/12 Joe Marcus Clarke born in Lakeland, Florida, United States, 1976 08/12 Max Brazhnikov born in Leningradskaya, Russian Federation, 1979 08/14 Stefan Esser born in Cologne, Nordrhein-Westfalen, Germany, 1961 +08/16 Andrey Chernov died in Moscow, Russian Federation, 2017 08/17 Olivier Houchard born in Nancy, France, 1980 08/19 Chin-San Huang born in Yi-Lan, Taiwan, Republic of China, 1979 08/19 Pav Lucistnik born in Kutna Hora, Czech Republic, 1980 @@ -282,6 +312,7 @@ 08/24 Alexander Botero-Lowry died in San Francisco, California, United States, 2012 08/25 Beech Rintoul born in Oakland, California, United States, 1952 08/25 Jean Milanez Melo born in Divinopolis, Minas Gerais, Brazil, 1982 +08/26 Scott Long born in Chicago, Illinois, United States, 1974 08/26 Dima Ruban born in Nalchik, USSR, 1970 08/26 Marc Fonvieille born in Avignon, France, 1972 08/26 Herve Quiroz born in Aix-en-Provence, France, 1977 @@ -299,10 +330,12 @@ 09/05 Mark Robert Vaughan Murray born in Harare, Mashonaland, Zimbabwe, 1961 09/05 Adrian Harold Chadd born in Perth, Western Australia, Australia, 1979 09/05 Rodrigo Osorio born in Montevideo, Uruguay, 1975 +09/06 Eric Joyner born in Fairfax, Virginia, United States, 1991 09/07 Tim Bishop born in Cornwall, United Kingdom, 1978 09/07 Chris Rees born in Kettering, United Kingdom, 1987 09/08 Boris Samorodov born in Krasnodar, Russian Federation, 1963 09/09 Yoshio Mita born in Hiroshima, Japan, 1972 +09/09 Steven Hartland born in Wordsley, United Kingdom, 1973 09/10 Wesley R. Peters born in Hartford, Alabama, United States, 1961 09/12 Weongyo Jeong born in Haman, Korea, 1980 09/12 Benedict Christopher Reuschling born in Darmstadt, Germany, 1981 @@ -310,11 +343,17 @@ 09/14 Matthew Seaman born in Bristol, United Kingdom, 1965 09/15 Aleksandr Rybalko born in Odessa, Ukraine, 1977 09/15 Dima Panov born in Khabarovsk, Russian Federation, 1978 +09/16 Maksim Yevmenkin born in Taganrog, USSR, 1974 09/17 Maxim Bolotin born in Rostov-on-Don, Russian Federation, 1976 09/18 Matthew Fleming born in Cleveland, Ohio, United States, 1975 09/20 Kevin Lo born in Taipei, Taiwan, Republic of China, 1972 +09/21 Alex Kozlov born in Bila Tserkva, Ukraine, 1970 09/21 Gleb Kurtsou born in Minsk, Belarus, 1984 +09/22 Alan Somers born in San Antonio, Texas, United States, 1982 09/22 Bryan Drewery born in San Diego, California, United States, 1984 +09/23 Martin Matuska born in Bratislava, Slovakia, 1979 +09/24 Larry Rosenman born in Queens, New York, United States, 1957 +09/27 Kyle Evans born in Oklahoma City, Oklahoma, United States, 1991 09/27 Neil Blakey-Milner born in Port Elizabeth, South Africa, 1978 09/27 Renato Botelho born in Araras, Sao Paulo, Brazil, 1979 09/28 Greg Lehey born in Melbourne, Victoria, Australia, 1948 @@ -328,25 +367,36 @@ 10/05 Hiroki Sato born in Yamagata, Japan, 1977 10/05 Chris Costello born in Houston, Texas, United States, 1985 10/09 Stefan Walter born in Werne, Nordrhein-Westfalen, Germany, 1978 +10/11 Rick Macklem born in Ontario, Canada, 1955 10/12 Pawel Jakub Dawidek born in Radzyn Podlaski, Poland, 1980 10/15 Maxim Konovalov born in Khabarovsk, USSR, 1973 +10/15 Eugene Grosbein born in Novokuznetsk, Russian Republic, USSR, 1976 10/16 Remko Lodder born in Rotterdam, the Netherlands, 1983 10/17 Maho NAKATA born in Osaka, Japan, 1974 10/18 Sheldon Hearn born in Cape Town, Western Cape, South Africa, 1974 +10/18 Vladimir Kondratyev born in Ryazan, USSR, 1975 10/19 Nicholas Souchu born in Suresnes, Hauts-de-Seine, France, 1972 10/19 Nick Barkas born in Longview, Washington, United States, 1981 +10/19 Pedro Giffuni born in Bogotá, Colombia, 1968 10/20 Joel Dahl born in Bitterna, Skaraborg, Sweden, 1983 10/20 Dmitry Marakasov born in Moscow, Russian Federation, 1984 10/21 Ben Smithurst born in Sheffield, South Yorkshire, United Kingdom, 1981 10/22 Jean-Sebastien Pedron born in Redon, Ille-et-Vilaine, France, 1980 10/23 Mario Sergio Fujikawa Ferreira born in Brasilia, Distrito Federal, Brazil, 1976 +10/23 Romain Tartière born in Clermont-Ferrand, France, 1984 10/25 Eric Melville born in Los Gatos, California, United States, 1980 10/25 Julien Laffaye born in Toulouse, France, 1988 10/25 Ashish SHUKLA born in Kanpur, India, 1985 +10/25 Toomas Soome born Estonia, 1971 10/26 Matthew Ahrens born in United States, 1979 10/26 Philip M. Gollucci born in Silver Spring, Maryland, United States, 1979 10/27 Takanori Watanabe born in Numazu, Shizuoka, Japan, 1972 +10/30 Olli Hauer born in Sindelfingen, Germany, 1968 +10/31 Taras Korenko born in Cherkasy region, Ukraine, 1980 +11/03 Ryan Stone born in Ottawa, Ontario, Canada, 1985 11/05 M. Warner Losh born in Kansas City, Kansas, United States, 1966 +11/06 Michael Zhilin born in Stary Oskol, USSR, 1985 +11/08 Joseph R. Mingrone born in Charlottetown, Prince Edward Island, Canada, 1976 11/09 Coleman Kane born in Cincinnati, Ohio, United States, 1980 11/09 Antoine Brodin born in Bagnolet, France, 1981 11/10 Gregory Neil Shapiro born in Providence, Rhode Island, United States, 1970 @@ -356,6 +406,7 @@ 11/15 Lars Engels born in Hilden, Nordrhein-Westfalen, Germany, 1980 11/15 Tijl Coosemans born in Duffel, Belgium, 1983 11/16 Jose Maria Alcaide Salinas born in Madrid, Spain, 1962 +11/16 Matt Joras born in Evanston, Illinois, United States, 1992 11/17 Ralf S. Engelschall born in Dachau, Bavaria, Germany, 1972 11/18 Thomas Quinot born in Paris, France, 1977 11/19 Konstantin Belousov born in Kiev, USSR, 1972 @@ -367,6 +418,7 @@ 11/23 Luca Pizzamiglio born in Casalpusterlengo, Italy, 1978 11/24 Andrey Zakhvatov born in Chelyabinsk, Russian Federation, 1974 11/24 Daniel Gerzo born in Bratislava, Slovakia, 1986 +11/25 Fedor Uporov born in Yalta, Crimea, USSR, 1988 11/28 Nik Clayton born in Peterborough, United Kingdom, 1973 11/28 Stanislav Sedov born in Chelyabinsk, USSR, 1985 12/01 Hajimu Umemoto born in Nara, Japan, 1961 @@ -376,6 +428,7 @@ 12/04 Mariusz Zaborski born in Skierniewice, Poland, 1990 12/05 Ivan Voras born in Slavonski Brod, Croatia, 1981 12/06 Stefan Farfeleder born in Wien, Austria, 1980 +12/08 Michael Tuexen born in Oldenburg, Germany, 1966 12/11 Ganael Laplanche born in Reims, France, 1980 12/15 James FitzGibbon born in Amersham, Buckinghamshire, United Kingdom, 1974 12/15 Timur I. Bakeyev born in Kazan, Republic of Tatarstan, USSR, 1974 @@ -386,9 +439,11 @@ 12/19 Stephen Hurd born in Estevan, Saskatchewan, Canada, 1975 12/20 Sean Bruno born in Monterey, California, United States, 1974 12/21 Rong-En Fan born in Taipei, Taiwan, Republic of China, 1982 +12/22 Alan L. Cox born in Warren, Ohio, United States, 1964 12/22 Maxim Sobolev born in Dnepropetrovsk, Ukraine, 1976 12/23 Sean Chittenden born in Seattle, Washington, United States, 1979 12/23 Alejandro Pulver born in Buenos Aires, Argentina, 1989 +12/24 Jochen Neumeister born in Heidenheim, Germany, 1975 12/24 Guido Falsi born in Firenze, Italy, 1978 12/25 Niclas Zeising born in Stockholm, Sweden, 1986 12/28 Soren Schmidt born in Maribo, Denmark, 1960 From owner-svn-src-all@freebsd.org Thu Mar 15 10:13:26 2018 Return-Path: Delivered-To: svn-src-all@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 3615CF2D733; Thu, 15 Mar 2018 10:13:26 +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 DB0FB78E2A; Thu, 15 Mar 2018 10:13:25 +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 D539714D63; Thu, 15 Mar 2018 10:13:25 +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 w2FADPI1085478; Thu, 15 Mar 2018 10:13:25 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FADPDh085477; Thu, 15 Mar 2018 10:13:25 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803151013.w2FADPDh085477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 15 Mar 2018 10:13:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330985 - stable/11/usr.sbin/freebsd-update X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.sbin/freebsd-update X-SVN-Commit-Revision: 330985 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 10:13:26 -0000 Author: eadler Date: Thu Mar 15 10:13:25 2018 New Revision: 330985 URL: https://svnweb.freebsd.org/changeset/base/330985 Log: MFC r324441: Fix freebsd-update(8) erroneous message and exit status when "fetch install" used. PR: 190660 Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/11/usr.sbin/freebsd-update/freebsd-update.sh Thu Mar 15 10:01:11 2018 (r330984) +++ stable/11/usr.sbin/freebsd-update/freebsd-update.sh Thu Mar 15 10:13:25 2018 (r330985) @@ -420,6 +420,9 @@ init_params () { # Run without a TTY NOTTYOK=0 + + # Fetched first in a chain of commands + ISFETCHED=0 } # Parse the command line @@ -785,8 +788,10 @@ install_check_params () { # Check that we have updates ready to install if ! [ -L ${BDHASH}-install ]; then echo "No updates are available to install." - echo "Run '$0 fetch' first." - exit 1 + if [ $ISFETCHED -eq 0 ]; then + echo "Run '$0 fetch' first." + fi + exit 0 fi if ! [ -f ${BDHASH}-install/INDEX-OLD ] || ! [ -f ${BDHASH}-install/INDEX-NEW ]; then @@ -3243,6 +3248,7 @@ cmd_fetch () { fi fetch_check_params fetch_run || exit 1 + ISFETCHED=1 } # Cron command. Make sure the parameters are sensible; wait From owner-svn-src-all@freebsd.org Thu Mar 15 10:52:09 2018 Return-Path: Delivered-To: svn-src-all@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 B2BADF3FE41; Thu, 15 Mar 2018 10:52:09 +0000 (UTC) (envelope-from avg@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 671DF7A48E; Thu, 15 Mar 2018 10:52:09 +0000 (UTC) (envelope-from avg@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 6202F15356; Thu, 15 Mar 2018 10:52:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FAq93e005396; Thu, 15 Mar 2018 10:52:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FAq8DU005391; Thu, 15 Mar 2018 10:52:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151052.w2FAq8DU005391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 10:52:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330986 - in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 330986 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 10:52:10 -0000 Author: avg Date: Thu Mar 15 10:52:08 2018 New Revision: 330986 URL: https://svnweb.freebsd.org/changeset/base/330986 Log: MFC r329717: MFV r329715: 8997 ztest assertion failure in zil_lwb_write_issue Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Thu Mar 15 10:13:25 2018 (r330985) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Thu Mar 15 10:52:08 2018 (r330986) @@ -858,7 +858,7 @@ dmu_tx_delay(dmu_tx_t *tx, uint64_t dirty) * decreasing performance. */ static int -dmu_tx_try_assign(dmu_tx_t *tx, txg_how_t txg_how) +dmu_tx_try_assign(dmu_tx_t *tx, uint64_t txg_how) { spa_t *spa = tx->tx_pool->dp_spa; @@ -878,13 +878,13 @@ dmu_tx_try_assign(dmu_tx_t *tx, txg_how_t txg_how) * of the failuremode setting. */ if (spa_get_failmode(spa) == ZIO_FAILURE_MODE_CONTINUE && - txg_how != TXG_WAIT) + !(txg_how & TXG_WAIT)) return (SET_ERROR(EIO)); return (SET_ERROR(ERESTART)); } - if (!tx->tx_waited && + if (!tx->tx_dirty_delayed && dsl_pool_need_dirty_delay(tx->tx_pool)) { tx->tx_wait_dirty = B_TRUE; return (SET_ERROR(ERESTART)); @@ -972,41 +972,44 @@ dmu_tx_unassign(dmu_tx_t *tx) } /* - * Assign tx to a transaction group. txg_how can be one of: + * Assign tx to a transaction group; txg_how is a bitmask: * - * (1) TXG_WAIT. If the current open txg is full, waits until there's - * a new one. This should be used when you're not holding locks. - * It will only fail if we're truly out of space (or over quota). + * If TXG_WAIT is set and the currently open txg is full, this function + * will wait until there's a new txg. This should be used when no locks + * are being held. With this bit set, this function will only fail if + * we're truly out of space (or over quota). * - * (2) TXG_NOWAIT. If we can't assign into the current open txg without - * blocking, returns immediately with ERESTART. This should be used - * whenever you're holding locks. On an ERESTART error, the caller - * should drop locks, do a dmu_tx_wait(tx), and try again. + * If TXG_WAIT is *not* set and we can't assign into the currently open + * txg without blocking, this function will return immediately with + * ERESTART. This should be used whenever locks are being held. On an + * ERESTART error, the caller should drop all locks, call dmu_tx_wait(), + * and try again. * - * (3) TXG_WAITED. Like TXG_NOWAIT, but indicates that dmu_tx_wait() - * has already been called on behalf of this operation (though - * most likely on a different tx). + * If TXG_NOTHROTTLE is set, this indicates that this tx should not be + * delayed due on the ZFS Write Throttle (see comments in dsl_pool.c for + * details on the throttle). This is used by the VFS operations, after + * they have already called dmu_tx_wait() (though most likely on a + * different tx). */ int -dmu_tx_assign(dmu_tx_t *tx, txg_how_t txg_how) +dmu_tx_assign(dmu_tx_t *tx, uint64_t txg_how) { int err; ASSERT(tx->tx_txg == 0); - ASSERT(txg_how == TXG_WAIT || txg_how == TXG_NOWAIT || - txg_how == TXG_WAITED); + ASSERT0(txg_how & ~(TXG_WAIT | TXG_NOTHROTTLE)); ASSERT(!dsl_pool_sync_context(tx->tx_pool)); /* If we might wait, we must not hold the config lock. */ - ASSERT(txg_how != TXG_WAIT || !dsl_pool_config_held(tx->tx_pool)); + IMPLY((txg_how & TXG_WAIT), !dsl_pool_config_held(tx->tx_pool)); - if (txg_how == TXG_WAITED) - tx->tx_waited = B_TRUE; + if ((txg_how & TXG_NOTHROTTLE)) + tx->tx_dirty_delayed = B_TRUE; while ((err = dmu_tx_try_assign(tx, txg_how)) != 0) { dmu_tx_unassign(tx); - if (err != ERESTART || txg_how != TXG_WAIT) + if (err != ERESTART || !(txg_how & TXG_WAIT)) return (err); dmu_tx_wait(tx); @@ -1043,12 +1046,12 @@ dmu_tx_wait(dmu_tx_t *tx) tx->tx_wait_dirty = B_FALSE; /* - * Note: setting tx_waited only has effect if the caller - * used TX_WAIT. Otherwise they are going to destroy - * this tx and try again. The common case, zfs_write(), - * uses TX_WAIT. + * Note: setting tx_dirty_delayed only has effect if the + * caller used TX_WAIT. Otherwise they are going to + * destroy this tx and try again. The common case, + * zfs_write(), uses TX_WAIT. */ - tx->tx_waited = B_TRUE; + tx->tx_dirty_delayed = B_TRUE; } else if (spa_suspended(spa) || tx->tx_lasttried_txg == 0) { /* * If the pool is suspended we need to wait until it Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu Mar 15 10:13:25 2018 (r330985) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu Mar 15 10:52:08 2018 (r330986) @@ -231,11 +231,14 @@ typedef enum dmu_object_type { DMU_OTN_ZAP_METADATA = DMU_OT(DMU_BSWAP_ZAP, B_TRUE), } dmu_object_type_t; -typedef enum txg_how { - TXG_WAIT = 1, - TXG_NOWAIT, - TXG_WAITED, -} txg_how_t; +/* + * These flags are intended to be used to specify the "txg_how" + * parameter when calling the dmu_tx_assign() function. See the comment + * above dmu_tx_assign() for more details on the meaning of these flags. + */ +#define TXG_NOWAIT (0ULL) +#define TXG_WAIT (1ULL<<0) +#define TXG_NOTHROTTLE (1ULL<<1) void byteswap_uint64_array(void *buf, size_t size); void byteswap_uint32_array(void *buf, size_t size); @@ -684,7 +687,7 @@ void dmu_tx_hold_spill(dmu_tx_t *tx, uint64_t object); void dmu_tx_hold_sa(dmu_tx_t *tx, struct sa_handle *hdl, boolean_t may_grow); void dmu_tx_hold_sa_create(dmu_tx_t *tx, int total_size); void dmu_tx_abort(dmu_tx_t *tx); -int dmu_tx_assign(dmu_tx_t *tx, enum txg_how txg_how); +int dmu_tx_assign(dmu_tx_t *tx, uint64_t txg_how); void dmu_tx_wait(dmu_tx_t *tx); void dmu_tx_commit(dmu_tx_t *tx); void dmu_tx_mark_netfree(dmu_tx_t *tx); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h Thu Mar 15 10:13:25 2018 (r330985) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h Thu Mar 15 10:52:08 2018 (r330986) @@ -66,9 +66,6 @@ struct dmu_tx { /* placeholder for syncing context, doesn't need specific holds */ boolean_t tx_anyobj; - /* has this transaction already been delayed? */ - boolean_t tx_waited; - /* transaction is marked as being a "net free" of space */ boolean_t tx_netfree; @@ -78,6 +75,9 @@ struct dmu_tx { /* need to wait for sufficient dirty space */ boolean_t tx_wait_dirty; + /* has this transaction already been delayed? */ + boolean_t tx_dirty_delayed; + int tx_err; }; @@ -113,7 +113,7 @@ typedef struct dmu_tx_callback { * These routines are defined in dmu.h, and are called by the user. */ dmu_tx_t *dmu_tx_create(objset_t *dd); -int dmu_tx_assign(dmu_tx_t *tx, txg_how_t txg_how); +int dmu_tx_assign(dmu_tx_t *tx, uint64_t txg_how); void dmu_tx_commit(dmu_tx_t *tx); void dmu_tx_abort(dmu_tx_t *tx); uint64_t dmu_tx_get_txg(dmu_tx_t *tx); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Mar 15 10:13:25 2018 (r330985) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Mar 15 10:52:08 2018 (r330986) @@ -127,7 +127,7 @@ * * If dmu_tx_assign() returns ERESTART and zfsvfs->z_assign is TXG_NOWAIT, * then drop all locks, call dmu_tx_wait(), and try again. On subsequent - * calls to dmu_tx_assign(), pass TXG_WAITED rather than TXG_NOWAIT, + * calls to dmu_tx_assign(), pass TXG_NOTHROTTLE in addition to TXG_NOWAIT, * to indicate that this operation has already called dmu_tx_wait(). * This will ensure that we don't retry forever, waiting a short bit * each time. @@ -152,7 +152,7 @@ * rw_enter(...); // grab any other locks you need * tx = dmu_tx_create(...); // get DMU tx * dmu_tx_hold_*(); // hold each object you might modify - * error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT); + * error = dmu_tx_assign(tx, (waited ? TXG_NOTHROTTLE : 0) | TXG_NOWAIT); * if (error) { * rw_exit(...); // drop locks * zfs_dirent_unlock(dl); // unlock directory entry Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Thu Mar 15 10:13:25 2018 (r330985) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Thu Mar 15 10:52:08 2018 (r330986) @@ -1217,22 +1217,13 @@ zil_lwb_write_issue(zilog_t *zilog, lwb_t *lwb) tx = dmu_tx_create(zilog->zl_os); /* - * Since we are not going to create any new dirty data and we can even - * help with clearing the existing dirty data, we should not be subject - * to the dirty data based delays. - * We (ab)use TXG_WAITED to bypass the delay mechanism. - * One side effect from using TXG_WAITED is that dmu_tx_assign() can - * fail if the pool is suspended. Those are dramatic circumstances, - * so we return NULL to signal that the normal ZIL processing is not - * possible and txg_wait_synced() should be used to ensure that the data - * is on disk. + * Since we are not going to create any new dirty data, and we + * can even help with clearing the existing dirty data, we + * should not be subject to the dirty data based delays. We + * use TXG_NOTHROTTLE to bypass the delay mechanism. */ - error = dmu_tx_assign(tx, TXG_WAITED); - if (error != 0) { - ASSERT3S(error, ==, EIO); - dmu_tx_abort(tx); - return (NULL); - } + VERIFY0(dmu_tx_assign(tx, TXG_WAIT | TXG_NOTHROTTLE)); + dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx); txg = dmu_tx_get_txg(tx); From owner-svn-src-all@freebsd.org Thu Mar 15 11:00:56 2018 Return-Path: Delivered-To: svn-src-all@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 6A085F419FC; Thu, 15 Mar 2018 11:00:56 +0000 (UTC) (envelope-from avg@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 17B5B7A92B; Thu, 15 Mar 2018 11:00:56 +0000 (UTC) (envelope-from avg@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 1278315395; Thu, 15 Mar 2018 11:00:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FB0t9u006513; Thu, 15 Mar 2018 11:00:55 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FB0tZr006507; Thu, 15 Mar 2018 11:00:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151100.w2FB0tZr006507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 11:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330987 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 330987 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 11:00:56 -0000 Author: avg Date: Thu Mar 15 11:00:55 2018 New Revision: 330987 URL: https://svnweb.freebsd.org/changeset/base/330987 Log: MFC r322245,r329717: MFV r322242: 8373 TXG_WAIT in ZIL commit path MFC r322245: MFV r322242: 8373 TXG_WAIT in ZIL commit path MFC r329717: MFV r329715: 8997 ztest assertion failure in zil_lwb_write_issue Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Thu Mar 15 10:52:08 2018 (r330986) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Thu Mar 15 11:00:55 2018 (r330987) @@ -1159,7 +1159,7 @@ dmu_tx_delay(dmu_tx_t *tx, uint64_t dirty) } static int -dmu_tx_try_assign(dmu_tx_t *tx, txg_how_t txg_how) +dmu_tx_try_assign(dmu_tx_t *tx, uint64_t txg_how) { dmu_tx_hold_t *txh; spa_t *spa = tx->tx_pool->dp_spa; @@ -1182,13 +1182,13 @@ dmu_tx_try_assign(dmu_tx_t *tx, txg_how_t txg_how) * of the failuremode setting. */ if (spa_get_failmode(spa) == ZIO_FAILURE_MODE_CONTINUE && - txg_how != TXG_WAIT) + !(txg_how & TXG_WAIT)) return (SET_ERROR(EIO)); return (SET_ERROR(ERESTART)); } - if (!tx->tx_waited && + if (!tx->tx_dirty_delayed && dsl_pool_need_dirty_delay(tx->tx_pool)) { tx->tx_wait_dirty = B_TRUE; return (SET_ERROR(ERESTART)); @@ -1308,41 +1308,44 @@ dmu_tx_unassign(dmu_tx_t *tx) } /* - * Assign tx to a transaction group. txg_how can be one of: + * Assign tx to a transaction group; txg_how is a bitmask: * - * (1) TXG_WAIT. If the current open txg is full, waits until there's - * a new one. This should be used when you're not holding locks. - * It will only fail if we're truly out of space (or over quota). + * If TXG_WAIT is set and the currently open txg is full, this function + * will wait until there's a new txg. This should be used when no locks + * are being held. With this bit set, this function will only fail if + * we're truly out of space (or over quota). * - * (2) TXG_NOWAIT. If we can't assign into the current open txg without - * blocking, returns immediately with ERESTART. This should be used - * whenever you're holding locks. On an ERESTART error, the caller - * should drop locks, do a dmu_tx_wait(tx), and try again. + * If TXG_WAIT is *not* set and we can't assign into the currently open + * txg without blocking, this function will return immediately with + * ERESTART. This should be used whenever locks are being held. On an + * ERESTART error, the caller should drop all locks, call dmu_tx_wait(), + * and try again. * - * (3) TXG_WAITED. Like TXG_NOWAIT, but indicates that dmu_tx_wait() - * has already been called on behalf of this operation (though - * most likely on a different tx). + * If TXG_NOTHROTTLE is set, this indicates that this tx should not be + * delayed due on the ZFS Write Throttle (see comments in dsl_pool.c for + * details on the throttle). This is used by the VFS operations, after + * they have already called dmu_tx_wait() (though most likely on a + * different tx). */ int -dmu_tx_assign(dmu_tx_t *tx, txg_how_t txg_how) +dmu_tx_assign(dmu_tx_t *tx, uint64_t txg_how) { int err; ASSERT(tx->tx_txg == 0); - ASSERT(txg_how == TXG_WAIT || txg_how == TXG_NOWAIT || - txg_how == TXG_WAITED); + ASSERT0(txg_how & ~(TXG_WAIT | TXG_NOTHROTTLE)); ASSERT(!dsl_pool_sync_context(tx->tx_pool)); /* If we might wait, we must not hold the config lock. */ - ASSERT(txg_how != TXG_WAIT || !dsl_pool_config_held(tx->tx_pool)); + IMPLY((txg_how & TXG_WAIT), !dsl_pool_config_held(tx->tx_pool)); - if (txg_how == TXG_WAITED) - tx->tx_waited = B_TRUE; + if ((txg_how & TXG_NOTHROTTLE)) + tx->tx_dirty_delayed = B_TRUE; while ((err = dmu_tx_try_assign(tx, txg_how)) != 0) { dmu_tx_unassign(tx); - if (err != ERESTART || txg_how != TXG_WAIT) + if (err != ERESTART || !(txg_how & TXG_WAIT)) return (err); dmu_tx_wait(tx); @@ -1379,12 +1382,12 @@ dmu_tx_wait(dmu_tx_t *tx) tx->tx_wait_dirty = B_FALSE; /* - * Note: setting tx_waited only has effect if the caller - * used TX_WAIT. Otherwise they are going to destroy - * this tx and try again. The common case, zfs_write(), - * uses TX_WAIT. + * Note: setting tx_dirty_delayed only has effect if the + * caller used TX_WAIT. Otherwise they are going to + * destroy this tx and try again. The common case, + * zfs_write(), uses TX_WAIT. */ - tx->tx_waited = B_TRUE; + tx->tx_dirty_delayed = B_TRUE; } else if (spa_suspended(spa) || tx->tx_lasttried_txg == 0) { /* * If the pool is suspended we need to wait until it Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu Mar 15 10:52:08 2018 (r330986) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu Mar 15 11:00:55 2018 (r330987) @@ -230,11 +230,14 @@ typedef enum dmu_object_type { DMU_OTN_ZAP_METADATA = DMU_OT(DMU_BSWAP_ZAP, B_TRUE), } dmu_object_type_t; -typedef enum txg_how { - TXG_WAIT = 1, - TXG_NOWAIT, - TXG_WAITED, -} txg_how_t; +/* + * These flags are intended to be used to specify the "txg_how" + * parameter when calling the dmu_tx_assign() function. See the comment + * above dmu_tx_assign() for more details on the meaning of these flags. + */ +#define TXG_NOWAIT (0ULL) +#define TXG_WAIT (1ULL<<0) +#define TXG_NOTHROTTLE (1ULL<<1) void byteswap_uint64_array(void *buf, size_t size); void byteswap_uint32_array(void *buf, size_t size); @@ -676,7 +679,7 @@ void dmu_tx_hold_spill(dmu_tx_t *tx, uint64_t object); void dmu_tx_hold_sa(dmu_tx_t *tx, struct sa_handle *hdl, boolean_t may_grow); void dmu_tx_hold_sa_create(dmu_tx_t *tx, int total_size); void dmu_tx_abort(dmu_tx_t *tx); -int dmu_tx_assign(dmu_tx_t *tx, enum txg_how txg_how); +int dmu_tx_assign(dmu_tx_t *tx, uint64_t txg_how); void dmu_tx_wait(dmu_tx_t *tx); void dmu_tx_commit(dmu_tx_t *tx); void dmu_tx_mark_netfree(dmu_tx_t *tx); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h Thu Mar 15 10:52:08 2018 (r330986) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h Thu Mar 15 11:00:55 2018 (r330987) @@ -66,15 +66,15 @@ struct dmu_tx { /* placeholder for syncing context, doesn't need specific holds */ boolean_t tx_anyobj; - /* has this transaction already been delayed? */ - boolean_t tx_waited; - /* time this transaction was created */ hrtime_t tx_start; /* need to wait for sufficient dirty space */ boolean_t tx_wait_dirty; + /* has this transaction already been delayed? */ + boolean_t tx_dirty_delayed; + int tx_err; #ifdef ZFS_DEBUG uint64_t tx_space_towrite; @@ -124,7 +124,7 @@ typedef struct dmu_tx_callback { * These routines are defined in dmu.h, and are called by the user. */ dmu_tx_t *dmu_tx_create(objset_t *dd); -int dmu_tx_assign(dmu_tx_t *tx, txg_how_t txg_how); +int dmu_tx_assign(dmu_tx_t *tx, uint64_t txg_how); void dmu_tx_commit(dmu_tx_t *tx); void dmu_tx_abort(dmu_tx_t *tx); uint64_t dmu_tx_get_txg(dmu_tx_t *tx); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Mar 15 10:52:08 2018 (r330986) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Mar 15 11:00:55 2018 (r330987) @@ -125,7 +125,7 @@ * * If dmu_tx_assign() returns ERESTART and zfsvfs->z_assign is TXG_NOWAIT, * then drop all locks, call dmu_tx_wait(), and try again. On subsequent - * calls to dmu_tx_assign(), pass TXG_WAITED rather than TXG_NOWAIT, + * calls to dmu_tx_assign(), pass TXG_NOTHROTTLE in addition to TXG_NOWAIT, * to indicate that this operation has already called dmu_tx_wait(). * This will ensure that we don't retry forever, waiting a short bit * each time. @@ -150,7 +150,7 @@ * rw_enter(...); // grab any other locks you need * tx = dmu_tx_create(...); // get DMU tx * dmu_tx_hold_*(); // hold each object you might modify - * error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT); + * error = dmu_tx_assign(tx, (waited ? TXG_NOTHROTTLE : 0) | TXG_NOWAIT); * if (error) { * rw_exit(...); // drop locks * zfs_dirent_unlock(dl); // unlock directory entry Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Thu Mar 15 10:52:08 2018 (r330986) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Thu Mar 15 11:00:55 2018 (r330987) @@ -994,7 +994,15 @@ zil_lwb_write_start(zilog_t *zilog, lwb_t *lwb, boolea * to clean up in the event of allocation failure or I/O failure. */ tx = dmu_tx_create(zilog->zl_os); - VERIFY(dmu_tx_assign(tx, TXG_WAIT) == 0); + + /* + * Since we are not going to create any new dirty data, and we + * can even help with clearing the existing dirty data, we + * should not be subject to the dirty data based delays. We + * use TXG_NOTHROTTLE to bypass the delay mechanism. + */ + VERIFY0(dmu_tx_assign(tx, TXG_WAIT | TXG_NOTHROTTLE)); + dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx); txg = dmu_tx_get_txg(tx); From owner-svn-src-all@freebsd.org Thu Mar 15 11:03:40 2018 Return-Path: Delivered-To: svn-src-all@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 155D4F41F4E; Thu, 15 Mar 2018 11:03:40 +0000 (UTC) (envelope-from avg@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 B40257AECC; Thu, 15 Mar 2018 11:03:39 +0000 (UTC) (envelope-from avg@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 AED8B154EC; Thu, 15 Mar 2018 11:03:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FB3d06010321; Thu, 15 Mar 2018 11:03:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FB3doo010320; Thu, 15 Mar 2018 11:03:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151103.w2FB3doo010320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 11:03:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330988 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330988 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 11:03:40 -0000 Author: avg Date: Thu Mar 15 11:03:39 2018 New Revision: 330988 URL: https://svnweb.freebsd.org/changeset/base/330988 Log: MFC r330057: add ZFS_ENTER protection to .zfs/snapshot vnode operations that need it Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Thu Mar 15 11:00:55 2018 (r330987) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Thu Mar 15 11:03:39 2018 (r330988) @@ -1071,6 +1071,7 @@ zfsctl_snapdir_readdir(ap) return (error); } + ZFS_ENTER(zfsvfs); for (;;) { uint64_t cookie; uint64_t id; @@ -1087,6 +1088,7 @@ zfsctl_snapdir_readdir(ap) *eofp = 1; error = 0; } + ZFS_EXIT(zfsvfs); return (error); } @@ -1099,6 +1101,7 @@ zfsctl_snapdir_readdir(ap) if (error != 0) { if (error == ENAMETOOLONG) error = 0; + ZFS_EXIT(zfsvfs); return (SET_ERROR(error)); } uio->uio_offset = cookie + dots_offset; @@ -1122,6 +1125,7 @@ zfsctl_snapdir_getattr(ap) uint64_t snap_count; int err; + ZFS_ENTER(zfsvfs); zfsctl_common_getattr(vp, vap); vap->va_ctime = dmu_objset_snap_cmtime(zfsvfs->z_os); vap->va_mtime = vap->va_ctime; @@ -1129,12 +1133,15 @@ zfsctl_snapdir_getattr(ap) if (dsl_dataset_phys(ds)->ds_snapnames_zapobj != 0) { err = zap_count(dmu_objset_pool(ds->ds_objset)->dp_meta_objset, dsl_dataset_phys(ds)->ds_snapnames_zapobj, &snap_count); - if (err != 0) + if (err != 0) { + ZFS_EXIT(zfsvfs); return (err); + } vap->va_nlink += snap_count; } vap->va_size = vap->va_nlink; + ZFS_EXIT(zfsvfs); return (0); } From owner-svn-src-all@freebsd.org Thu Mar 15 11:04:31 2018 Return-Path: Delivered-To: svn-src-all@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 EDFACF43062; Thu, 15 Mar 2018 11:04:30 +0000 (UTC) (envelope-from avg@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 9A86E7B02E; Thu, 15 Mar 2018 11:04:30 +0000 (UTC) (envelope-from avg@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 95830154EE; Thu, 15 Mar 2018 11:04:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FB4Uwt010413; Thu, 15 Mar 2018 11:04:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FB4Uww010412; Thu, 15 Mar 2018 11:04:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151104.w2FB4Uww010412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 11:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r330989 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 330989 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 11:04:31 -0000 Author: avg Date: Thu Mar 15 11:04:30 2018 New Revision: 330989 URL: https://svnweb.freebsd.org/changeset/base/330989 Log: MFC r330057: add ZFS_ENTER protection to .zfs/snapshot vnode operations that need it Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Thu Mar 15 11:03:39 2018 (r330988) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Thu Mar 15 11:04:30 2018 (r330989) @@ -1071,6 +1071,7 @@ zfsctl_snapdir_readdir(ap) return (error); } + ZFS_ENTER(zfsvfs); for (;;) { uint64_t cookie; uint64_t id; @@ -1087,6 +1088,7 @@ zfsctl_snapdir_readdir(ap) *eofp = 1; error = 0; } + ZFS_EXIT(zfsvfs); return (error); } @@ -1099,6 +1101,7 @@ zfsctl_snapdir_readdir(ap) if (error != 0) { if (error == ENAMETOOLONG) error = 0; + ZFS_EXIT(zfsvfs); return (SET_ERROR(error)); } uio->uio_offset = cookie + dots_offset; @@ -1122,6 +1125,7 @@ zfsctl_snapdir_getattr(ap) uint64_t snap_count; int err; + ZFS_ENTER(zfsvfs); zfsctl_common_getattr(vp, vap); vap->va_ctime = dmu_objset_snap_cmtime(zfsvfs->z_os); vap->va_mtime = vap->va_ctime; @@ -1129,12 +1133,15 @@ zfsctl_snapdir_getattr(ap) if (dsl_dataset_phys(ds)->ds_snapnames_zapobj != 0) { err = zap_count(dmu_objset_pool(ds->ds_objset)->dp_meta_objset, dsl_dataset_phys(ds)->ds_snapnames_zapobj, &snap_count); - if (err != 0) + if (err != 0) { + ZFS_EXIT(zfsvfs); return (err); + } vap->va_nlink += snap_count; } vap->va_size = vap->va_nlink; + ZFS_EXIT(zfsvfs); return (0); } From owner-svn-src-all@freebsd.org Thu Mar 15 11:06:05 2018 Return-Path: Delivered-To: svn-src-all@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 E95CDF43201; Thu, 15 Mar 2018 11:06:04 +0000 (UTC) (envelope-from avg@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 9E2187B1B9; Thu, 15 Mar 2018 11:06:04 +0000 (UTC) (envelope-from avg@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 98CAA154F0; Thu, 15 Mar 2018 11:06:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FB64IY010542; Thu, 15 Mar 2018 11:06:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FB64kS010538; Thu, 15 Mar 2018 11:06:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151106.w2FB64kS010538@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 11:06:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330990 - in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 330990 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 11:06:05 -0000 Author: avg Date: Thu Mar 15 11:06:04 2018 New Revision: 330990 URL: https://svnweb.freebsd.org/changeset/base/330990 Log: MFC r329823: another rework of getzfsvfs / getzfsvfs_impl code Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Thu Mar 15 11:04:30 2018 (r330989) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Thu Mar 15 11:06:04 2018 (r330990) @@ -426,7 +426,11 @@ extern int zfs_secpolicy_destroy_perms(const char *, c extern int zfs_busy(void); extern void zfs_unmount_snap(const char *); extern void zfs_destroy_unmount_origin(const char *); +#ifdef illumos extern int getzfsvfs_impl(struct objset *, struct zfsvfs **); +#else +extern int getzfsvfs_impl(struct objset *, vfs_t **); +#endif extern int getzfsvfs(const char *, struct zfsvfs **); /* Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c Thu Mar 15 11:04:30 2018 (r330989) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c Thu Mar 15 11:06:04 2018 (r330990) @@ -226,7 +226,9 @@ get_temporary_prop(dsl_dataset_t *ds, zfs_prop_t zfs_p return (0); #else int error; +#ifdef illumos zfsvfs_t *zfvp; +#endif vfs_t *vfsp; objset_t *os; uint64_t tmp = *val; @@ -235,12 +237,12 @@ get_temporary_prop(dsl_dataset_t *ds, zfs_prop_t zfs_p if (error != 0) return (error); - error = getzfsvfs_impl(os, &zfvp); + error = getzfsvfs_impl(os, &vfsp); if (error != 0) return (error); - +#ifdef illumos vfsp = zfvp->z_vfs; - +#endif switch (zfs_prop) { case ZFS_PROP_ATIME: if (vfs_optionisset(vfsp, MNTOPT_NOATIME, NULL)) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Mar 15 11:04:30 2018 (r330989) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Mar 15 11:06:04 2018 (r330990) @@ -1438,9 +1438,9 @@ put_nvlist(zfs_cmd_t *zc, nvlist_t *nvl) } int -getzfsvfs_impl(objset_t *os, zfsvfs_t **zfvp) +getzfsvfs_impl(objset_t *os, vfs_t **vfsp) { - vfs_t *vfsp; + zfsvfs_t *zfvp; int error = 0; if (dmu_objset_type(os) != DMU_OST_ZFS) { @@ -1448,9 +1448,10 @@ getzfsvfs_impl(objset_t *os, zfsvfs_t **zfvp) } mutex_enter(&os->os_user_ptr_lock); - *zfvp = dmu_objset_get_user(os); - if (*zfvp) { - vfs_ref((*zfvp)->z_vfs); + zfvp = dmu_objset_get_user(os); + if (zfvp) { + *vfsp = zfvp->z_vfs; + vfs_ref(zfvp->z_vfs); } else { error = SET_ERROR(ESRCH); } @@ -1458,57 +1459,31 @@ getzfsvfs_impl(objset_t *os, zfsvfs_t **zfvp) return (error); } -#ifdef illumos int getzfsvfs(const char *dsname, zfsvfs_t **zfvp) { objset_t *os; + vfs_t *vfsp; int error; error = dmu_objset_hold(dsname, FTAG, &os); if (error != 0) return (error); - - error = getzfsvfs_impl(os, zfvp); + error = getzfsvfs_impl(os, &vfsp); dmu_objset_rele(os, FTAG); - return (error); -} - -#else - -static int -getzfsvfs_ref(const char *dsname, zfsvfs_t **zfvp) -{ - objset_t *os; - int error; - - error = dmu_objset_hold(dsname, FTAG, &os); if (error != 0) return (error); - error = getzfsvfs_impl(os, zfvp); - dmu_objset_rele(os, FTAG); - return (error); -} - -int -getzfsvfs(const char *dsname, zfsvfs_t **zfvp) -{ - objset_t *os; - int error; - - error = getzfsvfs_ref(dsname, zfvp); - if (error != 0) - return (error); - error = vfs_busy((*zfvp)->z_vfs, 0); - vfs_rel((*zfvp)->z_vfs); + error = vfs_busy(vfsp, 0); + vfs_rel(vfsp); if (error != 0) { *zfvp = NULL; error = SET_ERROR(ESRCH); + } else { + *zfvp = vfsp->vfs_data; } return (error); } -#endif /* * Find a zfsvfs_t for a mounted filesystem, or create our own, in which @@ -3572,7 +3547,7 @@ zfs_unmount_snap(const char *snapname) if (strchr(snapname, '@') == NULL) return; - int err = getzfsvfs_ref(snapname, &zfsvfs); + int err = getzfsvfs(snapname, &zfsvfs); if (err != 0) { ASSERT3P(zfsvfs, ==, NULL); return; @@ -3594,6 +3569,8 @@ zfs_unmount_snap(const char *snapname) #ifdef illumos (void) dounmount(vfsp, MS_FORCE, kcred); #else + vfs_ref(vfsp); + vfs_unbusy(vfsp); (void) dounmount(vfsp, MS_FORCE, curthread); #endif } From owner-svn-src-all@freebsd.org Thu Mar 15 12:05:18 2018 Return-Path: Delivered-To: svn-src-all@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 BB454F4C106; Thu, 15 Mar 2018 12:05:18 +0000 (UTC) (envelope-from avg@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 6C41B7D53A; Thu, 15 Mar 2018 12:05:18 +0000 (UTC) (envelope-from avg@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 62EDB15E08; Thu, 15 Mar 2018 12:05:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FC5IHG040478; Thu, 15 Mar 2018 12:05:18 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FC5I0l040474; Thu, 15 Mar 2018 12:05:18 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151205.w2FC5I0l040474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 12:05:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330991 - in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 330991 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 12:05:19 -0000 Author: avg Date: Thu Mar 15 12:05:17 2018 New Revision: 330991 URL: https://svnweb.freebsd.org/changeset/base/330991 Log: MFC r329363: read-behind / read-ahead support for zfs_getpages() Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Thu Mar 15 11:06:04 2018 (r330990) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Thu Mar 15 12:05:17 2018 (r330991) @@ -1518,6 +1518,188 @@ dmu_write_pages(objset_t *os, uint64_t object, uint64_ dmu_buf_rele_array(dbp, numbufs, FTAG); return (err); } + +int +dmu_read_pages(objset_t *os, uint64_t object, vm_page_t *ma, int count, + int *rbehind, int *rahead, int last_size) +{ + struct sf_buf *sf; + vm_object_t vmobj; + vm_page_t m; + dmu_buf_t **dbp; + dmu_buf_t *db; + caddr_t va; + int numbufs, i; + int bufoff, pgoff, tocpy; + int mi, di; + int err; + + ASSERT3U(ma[0]->pindex + count - 1, ==, ma[count - 1]->pindex); + ASSERT(last_size <= PAGE_SIZE); + + err = dmu_buf_hold_array(os, object, IDX_TO_OFF(ma[0]->pindex), + IDX_TO_OFF(count - 1) + last_size, TRUE, FTAG, &numbufs, &dbp); + if (err != 0) + return (err); + +#ifdef DEBUG + IMPLY(last_size < PAGE_SIZE, *rahead == 0); + if (dbp[0]->db_offset != 0 || numbufs > 1) { + for (i = 0; i < numbufs; i++) { + ASSERT(ISP2(dbp[i]->db_size)); + ASSERT((dbp[i]->db_offset % dbp[i]->db_size) == 0); + ASSERT3U(dbp[i]->db_size, ==, dbp[0]->db_size); + } + } +#endif + + vmobj = ma[0]->object; + zfs_vmobject_wlock(vmobj); + + db = dbp[0]; + for (i = 0; i < *rbehind; i++) { + m = vm_page_grab(vmobj, ma[0]->pindex - 1 - i, + VM_ALLOC_NORMAL | VM_ALLOC_NOWAIT | VM_ALLOC_NOBUSY); + if (m == NULL) + break; + if (m->valid != 0) { + ASSERT3U(m->valid, ==, VM_PAGE_BITS_ALL); + break; + } + ASSERT(m->dirty == 0); + ASSERT(!pmap_page_is_mapped(m)); + + ASSERT(db->db_size > PAGE_SIZE); + bufoff = IDX_TO_OFF(m->pindex) % db->db_size; + va = zfs_map_page(m, &sf); + bcopy((char *)db->db_data + bufoff, va, PAGESIZE); + zfs_unmap_page(sf); + m->valid = VM_PAGE_BITS_ALL; + vm_page_lock(m); + if ((m->busy_lock & VPB_BIT_WAITERS) != 0) + vm_page_activate(m); + else + vm_page_deactivate(m); + vm_page_unlock(m); + } + *rbehind = i; + + bufoff = IDX_TO_OFF(ma[0]->pindex) % db->db_size; + pgoff = 0; + for (mi = 0, di = 0; mi < count && di < numbufs; ) { + if (pgoff == 0) { + m = ma[mi]; + vm_page_assert_xbusied(m); + ASSERT(m->valid == 0); + ASSERT(m->dirty == 0); + ASSERT(!pmap_page_is_mapped(m)); + va = zfs_map_page(m, &sf); + } + if (bufoff == 0) + db = dbp[di]; + + ASSERT3U(IDX_TO_OFF(m->pindex) + pgoff, ==, + db->db_offset + bufoff); + + /* + * We do not need to clamp the copy size by the file + * size as the last block is zero-filled beyond the + * end of file anyway. + */ + tocpy = MIN(db->db_size - bufoff, PAGESIZE - pgoff); + bcopy((char *)db->db_data + bufoff, va + pgoff, tocpy); + + pgoff += tocpy; + ASSERT(pgoff <= PAGESIZE); + if (pgoff == PAGESIZE) { + zfs_unmap_page(sf); + m->valid = VM_PAGE_BITS_ALL; + ASSERT(mi < count); + mi++; + pgoff = 0; + } + + bufoff += tocpy; + ASSERT(bufoff <= db->db_size); + if (bufoff == db->db_size) { + ASSERT(di < numbufs); + di++; + bufoff = 0; + } + } + +#ifdef DEBUG + /* + * Three possibilities: + * - last requested page ends at a buffer boundary and , thus, + * all pages and buffers have been iterated; + * - all requested pages are filled, but the last buffer + * has not been exhausted; + * the read-ahead is possible only in this case; + * - all buffers have been read, but the last page has not been + * fully filled; + * this is only possible if the file has only a single buffer + * with a size that is not a multiple of the page size. + */ + if (mi == count) { + ASSERT(di >= numbufs - 1); + IMPLY(*rahead != 0, di == numbufs - 1); + IMPLY(*rahead != 0, bufoff != 0); + ASSERT(pgoff == 0); + } + if (di == numbufs) { + ASSERT(mi >= count - 1); + ASSERT(*rahead == 0); + IMPLY(pgoff == 0, mi == count); + if (pgoff != 0) { + ASSERT(mi == count - 1); + ASSERT((dbp[0]->db_size & PAGE_MASK) != 0); + } + } +#endif + if (pgoff != 0) { + bzero(va + pgoff, PAGESIZE - pgoff); + zfs_unmap_page(sf); + m->valid = VM_PAGE_BITS_ALL; + } + + for (i = 0; i < *rahead; i++) { + m = vm_page_grab(vmobj, ma[count - 1]->pindex + 1 + i, + VM_ALLOC_NORMAL | VM_ALLOC_NOWAIT | VM_ALLOC_NOBUSY); + if (m == NULL) + break; + if (m->valid != 0) { + ASSERT3U(m->valid, ==, VM_PAGE_BITS_ALL); + break; + } + ASSERT(m->dirty == 0); + ASSERT(!pmap_page_is_mapped(m)); + + ASSERT(db->db_size > PAGE_SIZE); + bufoff = IDX_TO_OFF(m->pindex) % db->db_size; + tocpy = MIN(db->db_size - bufoff, PAGESIZE); + va = zfs_map_page(m, &sf); + bcopy((char *)db->db_data + bufoff, va, tocpy); + if (tocpy < PAGESIZE) { + ASSERT(i == *rahead - 1); + ASSERT((db->db_size & PAGE_MASK) != 0); + bzero(va + tocpy, PAGESIZE - tocpy); + } + zfs_unmap_page(sf); + m->valid = VM_PAGE_BITS_ALL; + vm_page_lock(m); + if ((m->busy_lock & VPB_BIT_WAITERS) != 0) + vm_page_activate(m); + else + vm_page_deactivate(m); + vm_page_unlock(m); + } + *rahead = i; + zfs_vmobject_wunlock(vmobj); + + dmu_buf_rele_array(dbp, numbufs, FTAG); + return (0); +} #endif /* illumos */ #endif /* _KERNEL */ Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu Mar 15 11:06:04 2018 (r330990) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu Mar 15 12:05:17 2018 (r330991) @@ -753,6 +753,8 @@ int dmu_write_pages(objset_t *os, uint64_t object, uin #else int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, struct vm_page **ppa, dmu_tx_t *tx); +int dmu_read_pages(objset_t *os, uint64_t object, vm_page_t *ma, int count, + int *rbehind, int *rahead, int last_size); #endif #endif struct arc_buf *dmu_request_arcbuf(dmu_buf_t *handle, int size); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Mar 15 11:06:04 2018 (r330990) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Mar 15 12:05:17 2018 (r330991) @@ -4515,81 +4515,85 @@ zfs_setsecattr(vnode_t *vp, vsecattr_t *vsecp, int fla } static int -zfs_getpages(struct vnode *vp, vm_page_t *m, int count, int *rbehind, +zfs_getpages(struct vnode *vp, vm_page_t *ma, int count, int *rbehind, int *rahead) { znode_t *zp = VTOZ(vp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; objset_t *os = zp->z_zfsvfs->z_os; - vm_page_t mlast; + rl_t *rl; vm_object_t object; - caddr_t va; - struct sf_buf *sf; - off_t startoff, endoff; - int i, error; - vm_pindex_t reqstart, reqend; - int lsize, size; + off_t start, end, obj_size; + uint_t blksz; + int pgsin_b, pgsin_a; + int error; - object = m[0]->object; - error = 0; - ZFS_ENTER(zfsvfs); ZFS_VERIFY_ZP(zp); - zfs_vmobject_wlock(object); - if (m[count - 1]->valid != 0 && --count == 0) { - zfs_vmobject_wunlock(object); - goto out; + start = IDX_TO_OFF(ma[0]->pindex); + end = IDX_TO_OFF(ma[count - 1]->pindex + 1); + + /* + * Lock a range covering all required and optional pages. + * Note that we need to handle the case of the block size growing. + */ + for (;;) { + blksz = zp->z_blksz; + rl = zfs_range_lock(zp, rounddown(start, blksz), + roundup(end, blksz) - rounddown(start, blksz), RL_READER); + if (blksz == zp->z_blksz) + break; + zfs_range_unlock(rl); } - mlast = m[count - 1]; - - if (IDX_TO_OFF(mlast->pindex) >= - object->un_pager.vnp.vnp_size) { - zfs_vmobject_wunlock(object); + object = ma[0]->object; + zfs_vmobject_wlock(object); + obj_size = object->un_pager.vnp.vnp_size; + zfs_vmobject_wunlock(object); + if (IDX_TO_OFF(ma[count - 1]->pindex) >= obj_size) { + zfs_range_unlock(rl); ZFS_EXIT(zfsvfs); return (zfs_vm_pagerret_bad); } - PCPU_INC(cnt.v_vnodein); - PCPU_ADD(cnt.v_vnodepgsin, count); + pgsin_b = 0; + if (rbehind != NULL) { + pgsin_b = OFF_TO_IDX(start - rounddown(start, blksz)); + pgsin_b = MIN(*rbehind, pgsin_b); + } - lsize = PAGE_SIZE; - if (IDX_TO_OFF(mlast->pindex) + lsize > object->un_pager.vnp.vnp_size) - lsize = object->un_pager.vnp.vnp_size - - IDX_TO_OFF(mlast->pindex); - zfs_vmobject_wunlock(object); - - for (i = 0; i < count; i++) { - size = PAGE_SIZE; - if (i == count - 1) - size = lsize; - va = zfs_map_page(m[i], &sf); - error = dmu_read(os, zp->z_id, IDX_TO_OFF(m[i]->pindex), - size, va, DMU_READ_PREFETCH); - if (size != PAGE_SIZE) - bzero(va + size, PAGE_SIZE - size); - zfs_unmap_page(sf); - if (error != 0) - goto out; + pgsin_a = 0; + if (rahead != NULL) { + pgsin_a = OFF_TO_IDX(roundup(end, blksz) - end); + if (end + IDX_TO_OFF(pgsin_a) >= obj_size) + pgsin_a = OFF_TO_IDX(round_page(obj_size) - end); + pgsin_a = MIN(*rahead, pgsin_a); } - zfs_vmobject_wlock(object); - for (i = 0; i < count; i++) - m[i]->valid = VM_PAGE_BITS_ALL; - zfs_vmobject_wunlock(object); + /* + * NB: we need to pass the exact byte size of the data that we expect + * to read after accounting for the file size. This is required because + * ZFS will panic if we request DMU to read beyond the end of the last + * allocated block. + */ + error = dmu_read_pages(os, zp->z_id, ma, count, &pgsin_b, &pgsin_a, + MIN(end, obj_size) - (end - PAGE_SIZE)); -out: + zfs_range_unlock(rl); ZFS_ACCESSTIME_STAMP(zfsvfs, zp); ZFS_EXIT(zfsvfs); - if (error == 0) { - if (rbehind) - *rbehind = 0; - if (rahead) - *rahead = 0; - return (zfs_vm_pagerret_ok); - } else + + if (error != 0) return (zfs_vm_pagerret_error); + + PCPU_INC(cnt.v_vnodein); + PCPU_ADD(cnt.v_vnodepgsin, count + pgsin_b + pgsin_a); + if (rbehind != NULL) + *rbehind = pgsin_b; + if (rahead != NULL) + *rahead = pgsin_a; + return (zfs_vm_pagerret_ok); } static int From owner-svn-src-all@freebsd.org Thu Mar 15 12:35:23 2018 Return-Path: Delivered-To: svn-src-all@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 7C463F4E2F7; Thu, 15 Mar 2018 12:35:23 +0000 (UTC) (envelope-from avg@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 2832C7E53E; Thu, 15 Mar 2018 12:35:23 +0000 (UTC) (envelope-from avg@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 1BD551628E; Thu, 15 Mar 2018 12:35:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FCZM10055374; Thu, 15 Mar 2018 12:35:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FCZM14055373; Thu, 15 Mar 2018 12:35:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151235.w2FCZM14055373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 12:35:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330992 - head/tests/sys/cddl/zfs/include X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/tests/sys/cddl/zfs/include X-SVN-Commit-Revision: 330992 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 12:35:23 -0000 Author: avg Date: Thu Mar 15 12:35:22 2018 New Revision: 330992 URL: https://svnweb.freebsd.org/changeset/base/330992 Log: zfs test suite: fix a typo, da0 vs $disk Modified: head/tests/sys/cddl/zfs/include/libtest.kshlib Modified: head/tests/sys/cddl/zfs/include/libtest.kshlib ============================================================================== --- head/tests/sys/cddl/zfs/include/libtest.kshlib Thu Mar 15 12:05:17 2018 (r330991) +++ head/tests/sys/cddl/zfs/include/libtest.kshlib Thu Mar 15 12:35:22 2018 (r330992) @@ -678,7 +678,7 @@ function set_partition # { typeset disk=$1 - diskinfo da0 | awk '{print $3}' + diskinfo $disk | awk '{print $3}' } function get_available_disk_size # From owner-svn-src-all@freebsd.org Thu Mar 15 12:40:44 2018 Return-Path: Delivered-To: svn-src-all@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 44DCFF4E8EE; Thu, 15 Mar 2018 12:40:44 +0000 (UTC) (envelope-from avg@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 EC34D7E8DB; Thu, 15 Mar 2018 12:40:43 +0000 (UTC) (envelope-from avg@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 CE65D162A4; Thu, 15 Mar 2018 12:40:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FCehmP055698; Thu, 15 Mar 2018 12:40:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FCehPa055697; Thu, 15 Mar 2018 12:40:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151240.w2FCehPa055697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 12:40:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330993 - head/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy X-SVN-Commit-Revision: 330993 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 12:40:44 -0000 Author: avg Date: Thu Mar 15 12:40:43 2018 New Revision: 330993 URL: https://svnweb.freebsd.org/changeset/base/330993 Log: zfs test suite: align zfs_destroy_005_neg: with upstream The change is to account for a different order in which the recursive destroy may be attempted. If we first try a dataset that can be destroyed then it will be destroyed, but if we first try a dataset that cannot be destroyed then we will not attempt to destroy the other dataset. Modified: head/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/zfs_destroy_005_neg.ksh Modified: head/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/zfs_destroy_005_neg.ksh ============================================================================== --- head/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/zfs_destroy_005_neg.ksh Thu Mar 15 12:35:22 2018 (r330992) +++ head/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/zfs_destroy_005_neg.ksh Thu Mar 15 12:40:43 2018 (r330993) @@ -121,10 +121,30 @@ negative_test "-r -rf" "$CTR $FS $VOL" typeset mtpt_dir=$(get_prop mountpoint $FS) make_dir_busy $mtpt_dir negative_test "-R -rR" $CTR -check_dataset datasetexists $CTR $FS $VOL $VOLSNAP $VOLCLONE -log_must datasetnonexists $FSSNAP $FSCLONE # +# Checking the outcome of the test above is tricky, because the order in +# which datasets are destroyed is not deterministic. Both $FS and $VOL are +# busy, and the remaining datasets will be different depending on whether we +# tried (and failed) to delete $FS or $VOL first. + +# The following datasets will exist independent of the order +check_dataset datasetexists $CTR $FS $VOL + +if datasetexists $VOLSNAP && datasetnonexists $FSSNAP; then + # The recursive destroy failed on $FS + check_dataset datasetnonexists $FSSNAP $FSCLONE + check_dataset datasetexists $VOLSNAP $VOLCLONE +elif datasetexists $FSSNAP && datasetnonexists $VOLSNAP; then + # The recursive destroy failed on $VOL + check_dataset datasetnonexists $VOLSNAP $VOLCLONE + check_dataset datasetexists $FSSNAP $FSCLONE +else + log_must zfs list -rtall + log_fail "Unexpected datasets remaining" +fi + +# # Create the clones for test environment, then verify 'zfs destroy $FS' # failed without '-f'. # @@ -148,7 +168,17 @@ if is_global_zone; then make_dir_busy $TESTDIR1 negative_test "-R -rR" $CTR log_must datasetexists $CTR $VOL - log_must datasetnonexists $FS $FSSNAP $FSCLONE $VOLSNAP $VOLCLONE + log_must datasetnonexists $VOLSNAP $VOLCLONE + + # Here again, the non-determinism of destroy order is a factor. $FS, + # $FSSNAP and $FSCLONE will still exist here iff we attempted to destroy + # $VOL (and failed) first. So check that either all of the datasets are + # present, or they're all gone. + if datasetexists $FS; then + check_dataset datasetexists $FS $FSSNAP $FSCLONE + else + check_dataset datasetnonexists $FS $FSSNAP $FSCLONE + fi # # Create the clones for test environment and make the volume busy. From owner-svn-src-all@freebsd.org Thu Mar 15 12:42:20 2018 Return-Path: Delivered-To: svn-src-all@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 2D056F4EBC1; Thu, 15 Mar 2018 12:42:20 +0000 (UTC) (envelope-from avg@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 D06517EC90; Thu, 15 Mar 2018 12:42:19 +0000 (UTC) (envelope-from avg@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 CB50A163F7; Thu, 15 Mar 2018 12:42:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FCgJKq060159; Thu, 15 Mar 2018 12:42:19 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FCgJvG060158; Thu, 15 Mar 2018 12:42:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151242.w2FCgJvG060158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 12:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330994 - head/tests/sys/cddl/zfs/tests/hotplug X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/tests/sys/cddl/zfs/tests/hotplug X-SVN-Commit-Revision: 330994 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 12:42:20 -0000 Author: avg Date: Thu Mar 15 12:42:19 2018 New Revision: 330994 URL: https://svnweb.freebsd.org/changeset/base/330994 Log: zfs test suite: destroy old gnops before creating new ones Modified: head/tests/sys/cddl/zfs/tests/hotplug/setup.ksh Modified: head/tests/sys/cddl/zfs/tests/hotplug/setup.ksh ============================================================================== --- head/tests/sys/cddl/zfs/tests/hotplug/setup.ksh Thu Mar 15 12:40:43 2018 (r330993) +++ head/tests/sys/cddl/zfs/tests/hotplug/setup.ksh Thu Mar 15 12:42:19 2018 (r330994) @@ -31,5 +31,6 @@ . $STF_SUITE/tests/hotplug/hotplug.kshlib +log_must destroy_gnops $ALL_DISKS log_must create_gnops $ALL_DISKS log_pass From owner-svn-src-all@freebsd.org Thu Mar 15 12:44:14 2018 Return-Path: Delivered-To: svn-src-all@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 E70D0F4EE64; Thu, 15 Mar 2018 12:44:13 +0000 (UTC) (envelope-from avg@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 993147EE8F; Thu, 15 Mar 2018 12:44:13 +0000 (UTC) (envelope-from avg@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 9415F1640B; Thu, 15 Mar 2018 12:44:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FCiDsl060383; Thu, 15 Mar 2018 12:44:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FCiDS8060382; Thu, 15 Mar 2018 12:44:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151244.w2FCiDS8060382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 12:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330995 - head/tests/sys/cddl/zfs/tests/slog X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/tests/sys/cddl/zfs/tests/slog X-SVN-Commit-Revision: 330995 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 12:44:14 -0000 Author: avg Date: Thu Mar 15 12:44:13 2018 New Revision: 330995 URL: https://svnweb.freebsd.org/changeset/base/330995 Log: zfs test suite: fix a typo, TESTPOOL vs TESTPOOL2 Modified: head/tests/sys/cddl/zfs/tests/slog/slog.kshlib Modified: head/tests/sys/cddl/zfs/tests/slog/slog.kshlib ============================================================================== --- head/tests/sys/cddl/zfs/tests/slog/slog.kshlib Thu Mar 15 12:42:19 2018 (r330994) +++ head/tests/sys/cddl/zfs/tests/slog/slog.kshlib Thu Mar 15 12:44:13 2018 (r330995) @@ -34,7 +34,7 @@ function cleanup { poolexists $TESTPOOL && log_must $ZPOOL status $TESTPOOL - poolexists $TESTPOOL && log_must $ZPOOL status $TESTPOOL2 + poolexists $TESTPOOL2 && log_must $ZPOOL status $TESTPOOL2 destroy_pool $TESTPOOL destroy_pool $TESTPOOL2 } From owner-svn-src-all@freebsd.org Thu Mar 15 12:45:48 2018 Return-Path: Delivered-To: svn-src-all@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 159E7F4EFD3; Thu, 15 Mar 2018 12:45:48 +0000 (UTC) (envelope-from meyser@xenet.de) Received: from server1.xenet.de (server1.xenet.de [213.221.94.201]) by mx1.freebsd.org (Postfix) with ESMTP id 88F697F0E0; Thu, 15 Mar 2018 12:45:46 +0000 (UTC) (envelope-from meyser@xenet.de) Received: from [10.0.0.68] (xenet.gate.xenet.de [213.221.94.32]) (authenticated bits=0) by server1.xenet.de (8.12.5/8.12.5) with ESMTP id w2FCPrNY012339; Thu, 15 Mar 2018 13:25:53 +0100 (CET) (envelope-from meyser@xenet.de) Subject: Re: svn commit: r330886 - head/share/examples To: Devin Teske , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803132337.w2DNbXDi025717@repo.freebsd.org> From: Matthias Meyser Organization: XeNET GmbH, Clausthal-Zellerfeld Message-ID: Date: Thu, 15 Mar 2018 13:25:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <201803132337.w2DNbXDi025717@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE-1901 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 12:45:48 -0000 Am 14.03.2018 um 00:37 schrieb Devin Teske: > Author: dteske > Date: Tue Mar 13 23:37:33 2018 > New Revision: 330886 > URL: https://svnweb.freebsd.org/changeset/base/330886 > > Log: > Install files added in SVN's r295373, r295457, r295542 > > Reported by: woodsb02 > MFC after: 3 days > X-MFC to: stable/11 PR: 214994 (2016) is missing https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214994 Please change to fixed > > Modified: > head/share/examples/Makefile > > Modified: head/share/examples/Makefile > ============================================================================== > --- head/share/examples/Makefile Tue Mar 13 23:36:15 2018 (r330885) > +++ head/share/examples/Makefile Tue Mar 13 23:37:33 2018 (r330886) > @@ -76,6 +76,12 @@ XFILES= BSD_daemon/FreeBSD.pfa \ > indent/indent.pro \ > ipfw/change_rules.sh \ > jails/README \ > + jails/VIMAGE \ > + jails/jail.xxx.conf \ > + jails/jib \ > + jails/jng \ > + jails/rc.conf.jails \ > + jails/rcjail.xxx.conf \ > kld/Makefile \ > kld/cdev/Makefile \ > kld/cdev/README \ > -- Matthias Meyser | XeNET GmbH Tel.: +49-5323-9489050 | 38678 Clausthal-Zellerfeld, Marktstrasse 40 Fax: +49-5323-9489059 | Registergericht: Amtsgericht Braunschweig HRB 110823 Email: Meyser@xenet.de | Geschaeftsfuehrer: Matthias Meyser From owner-svn-src-all@freebsd.org Thu Mar 15 12:47:35 2018 Return-Path: Delivered-To: svn-src-all@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 7CF21F4F239; Thu, 15 Mar 2018 12:47:35 +0000 (UTC) (envelope-from avg@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 27A257F2C4; Thu, 15 Mar 2018 12:47:35 +0000 (UTC) (envelope-from avg@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 087E116410; Thu, 15 Mar 2018 12:47:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FClYUt060566; Thu, 15 Mar 2018 12:47:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FClYZe060563; Thu, 15 Mar 2018 12:47:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151247.w2FClYZe060563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 12:47:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330996 - in head/tests/sys/cddl/zfs: include tests/cache tests/cli_root/zpool_add X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/tests/sys/cddl/zfs: include tests/cache tests/cli_root/zpool_add X-SVN-Commit-Revision: 330996 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 12:47:35 -0000 Author: avg Date: Thu Mar 15 12:47:34 2018 New Revision: 330996 URL: https://svnweb.freebsd.org/changeset/base/330996 Log: zfs test suite: support device paths with intermediate directories The code assumed that disks (devices) used for testing are always named like /dev/foo, but there is no reason for that restriction and we can easily support paths like /dev/stripe/bar. Modified: head/tests/sys/cddl/zfs/include/libtest.kshlib head/tests/sys/cddl/zfs/tests/cache/cache.kshlib head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add.kshlib Modified: head/tests/sys/cddl/zfs/include/libtest.kshlib ============================================================================== --- head/tests/sys/cddl/zfs/include/libtest.kshlib Thu Mar 15 12:44:13 2018 (r330995) +++ head/tests/sys/cddl/zfs/include/libtest.kshlib Thu Mar 15 12:47:34 2018 (r330996) @@ -640,7 +640,7 @@ function wipe_partition_table # [/dev/null 2>&1; then + if gpart list ${diskname#/dev/} >/dev/null 2>&1; then wait_for 5 1 $GPART destroy -F $diskname else log_note "No GPT partitions detected on $diskname" Modified: head/tests/sys/cddl/zfs/tests/cache/cache.kshlib ============================================================================== --- head/tests/sys/cddl/zfs/tests/cache/cache.kshlib Thu Mar 15 12:44:13 2018 (r330995) +++ head/tests/sys/cddl/zfs/tests/cache/cache.kshlib Thu Mar 15 12:47:34 2018 (r330996) @@ -90,9 +90,7 @@ function verify_cache_device # Zpool status returns on the device name sans the /dev, so # if the device contains /dev/ remove it. - if [[ $device =~ "^/dev/" ]]; then - device=`basename ${device}` - fi + device=${device#"/dev/"} if [[ $WRAPPER == *"smi"* ]]; then $ECHO $device | $EGREP "^c[0-F]+([td][0-F]+)+$" > /dev/null 2>&1 Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add.kshlib ============================================================================== --- head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add.kshlib Thu Mar 15 12:44:13 2018 (r330995) +++ head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add.kshlib Thu Mar 15 12:47:34 2018 (r330996) @@ -55,9 +55,7 @@ function iscontained for vdev in $@; do # remove /dev/dsk in vdev if there is - $ECHO $vdev | $GREP "^/dev/" >/dev/null 2>&1 - (( $? == 0 )) && \ - vdev=${vdev##*/} + vdev=${vdev#/dev/} $ZPOOL status "$pool" | $AWK '$1 == vdevname {exit 1}' \ vdevname=$vdev >/dev/null 2>&1 From owner-svn-src-all@freebsd.org Thu Mar 15 12:56:25 2018 Return-Path: Delivered-To: svn-src-all@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 11B78F4FB8E; Thu, 15 Mar 2018 12:56:25 +0000 (UTC) (envelope-from emaste@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 B02797F8A2; Thu, 15 Mar 2018 12:56:24 +0000 (UTC) (envelope-from emaste@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 8F513165A4; Thu, 15 Mar 2018 12:56:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FCuOJE065653; Thu, 15 Mar 2018 12:56:24 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FCuM6n065635; Thu, 15 Mar 2018 12:56:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803151256.w2FCuM6n065635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Mar 2018 12:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330997 - in stable/11/sys: amd64/linux amd64/linux32 compat/linux i386/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/11/sys: amd64/linux amd64/linux32 compat/linux i386/linux X-SVN-Commit-Revision: 330997 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 12:56:25 -0000 Author: emaste Date: Thu Mar 15 12:56:22 2018 New Revision: 330997 URL: https://svnweb.freebsd.org/changeset/base/330997 Log: MFC r329370, r330239: Rationalize license text on Linuxolator files Many licenses on Linuxolator files contained small variations from the standard FreeBSD license text. To avoid license proliferation switch to the standard 2-clause FreeBSD license for those files where I have permission from each of the listed copyright holders. Approved by: dchagin, kan, marcel, rdivacky, sos Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/amd64/linux/linux.h stable/11/sys/amd64/linux/linux_dummy.c stable/11/sys/amd64/linux32/linux32_dummy.c stable/11/sys/compat/linux/linux_emul.c stable/11/sys/compat/linux/linux_emul.h stable/11/sys/compat/linux/linux_file.c stable/11/sys/compat/linux/linux_ioctl.c stable/11/sys/compat/linux/linux_ipc.c stable/11/sys/compat/linux/linux_mib.c stable/11/sys/compat/linux/linux_signal.c stable/11/sys/compat/linux/linux_socket.c stable/11/sys/compat/linux/linux_stats.c stable/11/sys/compat/linux/linux_sysctl.c stable/11/sys/i386/linux/imgact_linux.c stable/11/sys/i386/linux/linux_dummy.c stable/11/sys/i386/linux/linux_machdep.c stable/11/sys/i386/linux/linux_ptrace.c stable/11/sys/i386/linux/linux_sysvec.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/linux/linux.h ============================================================================== --- stable/11/sys/amd64/linux/linux.h Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/amd64/linux/linux.h Thu Mar 15 12:56:22 2018 (r330997) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2013 Dmitry Chagin * Copyright (c) 1994-1996 Søren Schmidt * All rights reserved. @@ -7,24 +9,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * 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$ */ Modified: stable/11/sys/amd64/linux/linux_dummy.c ============================================================================== --- stable/11/sys/amd64/linux/linux_dummy.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/amd64/linux/linux_dummy.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2013 Dmitry Chagin * All rights reserved. * @@ -6,22 +8,22 @@ * 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 - * in this position and unchanged. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: stable/11/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- stable/11/sys/amd64/linux32/linux32_dummy.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/amd64/linux32/linux32_dummy.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 1994-1995 Søren Schmidt * All rights reserved. @@ -8,24 +8,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: stable/11/sys/compat/linux/linux_emul.c ============================================================================== --- stable/11/sys/compat/linux/linux_emul.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/compat/linux/linux_emul.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2006 Roman Divacky * Copyright (c) 2013 Dmitry Chagin * All rights reserved. @@ -7,24 +9,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: stable/11/sys/compat/linux/linux_emul.h ============================================================================== --- stable/11/sys/compat/linux/linux_emul.h Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/compat/linux/linux_emul.h Thu Mar 15 12:56:22 2018 (r330997) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2006 Roman Divacky * Copyright (c) 2013 Dmitry Chagin * All rights reserved. @@ -7,24 +9,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * 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$ */ Modified: stable/11/sys/compat/linux/linux_file.c ============================================================================== --- stable/11/sys/compat/linux/linux_file.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/compat/linux/linux_file.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 1994-1995 Søren Schmidt * All rights reserved. * @@ -6,24 +8,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: stable/11/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/11/sys/compat/linux/linux_ioctl.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/compat/linux/linux_ioctl.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 1994-1995 Søren Schmidt * All rights reserved. * @@ -6,24 +8,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include "opt_compat.h" Modified: stable/11/sys/compat/linux/linux_ipc.c ============================================================================== --- stable/11/sys/compat/linux/linux_ipc.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/compat/linux/linux_ipc.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 1994-1995 Søren Schmidt * All rights reserved. * @@ -6,24 +8,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: stable/11/sys/compat/linux/linux_mib.c ============================================================================== --- stable/11/sys/compat/linux/linux_mib.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/compat/linux/linux_mib.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 1999 Marcel Moolenaar * All rights reserved. * @@ -6,24 +8,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: stable/11/sys/compat/linux/linux_signal.c ============================================================================== --- stable/11/sys/compat/linux/linux_signal.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/compat/linux/linux_signal.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (c) 1994-1995 Søren Schmidt * All rights reserved. * @@ -6,24 +8,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: stable/11/sys/compat/linux/linux_socket.c ============================================================================== --- stable/11/sys/compat/linux/linux_socket.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/compat/linux/linux_socket.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 1995 Søren Schmidt * All rights reserved. * @@ -6,24 +8,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: stable/11/sys/compat/linux/linux_stats.c ============================================================================== --- stable/11/sys/compat/linux/linux_stats.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/compat/linux/linux_stats.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 1994-1995 Søren Schmidt * All rights reserved. * @@ -6,24 +8,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: stable/11/sys/compat/linux/linux_sysctl.c ============================================================================== --- stable/11/sys/compat/linux/linux_sysctl.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/compat/linux/linux_sysctl.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2001 Marcel Moolenaar * All rights reserved. * @@ -6,24 +8,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: stable/11/sys/i386/linux/imgact_linux.c ============================================================================== --- stable/11/sys/i386/linux/imgact_linux.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/i386/linux/imgact_linux.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 1994-1996 Søren Schmidt * All rights reserved. @@ -11,24 +11,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: stable/11/sys/i386/linux/linux_dummy.c ============================================================================== --- stable/11/sys/i386/linux/linux_dummy.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/i386/linux/linux_dummy.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 1994-1995 Søren Schmidt * All rights reserved. @@ -8,24 +8,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: stable/11/sys/i386/linux/linux_machdep.c ============================================================================== --- stable/11/sys/i386/linux/linux_machdep.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/i386/linux/linux_machdep.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2000 Marcel Moolenaar * All rights reserved. @@ -8,24 +8,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: stable/11/sys/i386/linux/linux_ptrace.c ============================================================================== --- stable/11/sys/i386/linux/linux_ptrace.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/i386/linux/linux_ptrace.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2001 Alexander Kabaev * All rights reserved. @@ -8,24 +8,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include Modified: stable/11/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/11/sys/i386/linux/linux_sysvec.c Thu Mar 15 12:47:34 2018 (r330996) +++ stable/11/sys/i386/linux/linux_sysvec.c Thu Mar 15 12:56:22 2018 (r330997) @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 1994-1996 Søren Schmidt * All rights reserved. @@ -8,24 +8,22 @@ * 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 - * in this position and unchanged. + * 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include From owner-svn-src-all@freebsd.org Thu Mar 15 12:59:16 2018 Return-Path: Delivered-To: svn-src-all@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 00FEDF4FE68; Thu, 15 Mar 2018 12:59:16 +0000 (UTC) (envelope-from emaste@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 A75287FAAA; Thu, 15 Mar 2018 12:59:15 +0000 (UTC) (envelope-from emaste@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 A206F165A9; Thu, 15 Mar 2018 12:59:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FCxFrG065799; Thu, 15 Mar 2018 12:59:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FCxF0H065798; Thu, 15 Mar 2018 12:59:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803151259.w2FCxF0H065798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Mar 2018 12:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330998 - stable/11/share/man/man8 X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/share/man/man8 X-SVN-Commit-Revision: 330998 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 12:59:16 -0000 Author: emaste Date: Thu Mar 15 12:59:15 2018 New Revision: 330998 URL: https://svnweb.freebsd.org/changeset/base/330998 Log: MFC r328395: Install uefi.8 also on arm64 Our standard boot method for arm64 is via UEFI, so install the man page that describes the boot process. Sponsored by: The FreeBSD Foundation Modified: stable/11/share/man/man8/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man8/Makefile ============================================================================== --- stable/11/share/man/man8/Makefile Thu Mar 15 12:56:22 2018 (r330997) +++ stable/11/share/man/man8/Makefile Thu Mar 15 12:59:15 2018 (r330998) @@ -35,7 +35,7 @@ MLINKS+=yp.8 NIS.8 \ yp.8 YP.8 .endif -.if ${MACHINE_CPUARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" _uefi.8= uefi.8 .endif From owner-svn-src-all@freebsd.org Thu Mar 15 13:46:29 2018 Return-Path: Delivered-To: svn-src-all@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 714EAF534BB; Thu, 15 Mar 2018 13:46:29 +0000 (UTC) (envelope-from hrs@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 274C581D17; Thu, 15 Mar 2018 13:46:29 +0000 (UTC) (envelope-from hrs@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 223A716D39; Thu, 15 Mar 2018 13:46:29 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FDkTCs091601; Thu, 15 Mar 2018 13:46:29 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FDkStM091599; Thu, 15 Mar 2018 13:46:28 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201803151346.w2FDkStM091599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 15 Mar 2018 13:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331000 - head/lib/libc/net X-SVN-Group: head X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: head/lib/libc/net X-SVN-Commit-Revision: 331000 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 13:46:29 -0000 Author: hrs Date: Thu Mar 15 13:46:28 2018 New Revision: 331000 URL: https://svnweb.freebsd.org/changeset/base/331000 Log: Make getnameinfo(3) salen requirement less strict and document details of salen in getnameinfo(3) manual page. getnameinfo(3) returned EAI_FAIL when salen was not equal to the length corresponding to the value specified by sa->sa_family. However, POSIX or RFC 3493 does not require it and RFC 4038 Sec.6.2.3 shows an example passing sizeof(struct sockaddr_storage) to salen. This change makes the requirement less strict by accepting salen up to sizeof(struct sockaddr_storage). It also includes two more changes: one is to fix return values because both SUSv4 and RFC 3493 require EAI_FAMILY when the address length is invalid, another is to fix sa_len dependency in PF_LOCAL. Pointed out by: Christophe Beauval Reviewed by: ae Differential Revision: https://reviews.freebsd.org/D14585 Modified: head/lib/libc/net/getnameinfo.3 head/lib/libc/net/getnameinfo.c Modified: head/lib/libc/net/getnameinfo.3 ============================================================================== --- head/lib/libc/net/getnameinfo.3 Thu Mar 15 13:07:15 2018 (r330999) +++ head/lib/libc/net/getnameinfo.3 Thu Mar 15 13:46:28 2018 (r331000) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 28, 2016 +.Dd March 15, 2018 .Dt GETNAMEINFO 3 .Os .Sh NAME @@ -80,6 +80,20 @@ or UNIX-domain respectively that is .Fa salen bytes long. +If +.Fa salen +is shorter than the length corresponding to the specified +address family or longer than +.Fn sizeof "struct sockaddr_storage" , +it returns +.Er EAI_FAMILY . +Note that +.Va sa->sa_len +should be consistent with +.Fa salen +though the value of +.Va sa->sa_len +is not directly used in this function. .Pp The host and service names associated with .Fa sa Modified: head/lib/libc/net/getnameinfo.c ============================================================================== --- head/lib/libc/net/getnameinfo.c Thu Mar 15 13:07:15 2018 (r330999) +++ head/lib/libc/net/getnameinfo.c Thu Mar 15 13:46:28 2018 (r331000) @@ -124,26 +124,36 @@ getnameinfo(const struct sockaddr *sa, socklen_t salen afd = find_afd(sa->sa_family); if (afd == NULL) return (EAI_FAMILY); + /* + * getnameinfo() accepts an salen of sizeof(struct sockaddr_storage) + * at maximum as shown in RFC 4038 Sec.6.2.3. + */ + if (salen > sizeof(struct sockaddr_storage)) + return (EAI_FAMILY); + switch (sa->sa_family) { case PF_LOCAL: /* - * PF_LOCAL uses variable sa->sa_len depending on the + * PF_LOCAL uses variable salen depending on the * content length of sun_path. Require 1 byte in * sun_path at least. */ - if (salen > afd->a_socklen || - salen <= afd->a_socklen - + if (salen <= afd->a_socklen - sizeofmember(struct sockaddr_un, sun_path)) - return (EAI_FAIL); + return (EAI_FAMILY); + else if (salen > afd->a_socklen) + salen = afd->a_socklen; break; case PF_LINK: if (salen <= afd->a_socklen - sizeofmember(struct sockaddr_dl, sdl_data)) - return (EAI_FAIL); + return (EAI_FAMILY); break; default: - if (salen != afd->a_socklen) - return (EAI_FAIL); + if (salen < afd->a_socklen) + return (EAI_FAMILY); + else + salen = afd->a_socklen; break; } @@ -517,7 +527,7 @@ getnameinfo_un(const struct afd *afd, if (serv != NULL && servlen > 0) *serv = '\0'; if (host != NULL && hostlen > 0) { - pathlen = sa->sa_len - afd->a_off; + pathlen = salen - afd->a_off; if (pathlen + 1 > hostlen) { *host = '\0'; From owner-svn-src-all@freebsd.org Thu Mar 15 14:23:32 2018 Return-Path: Delivered-To: svn-src-all@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 16C1EF55ED6; Thu, 15 Mar 2018 14:23:32 +0000 (UTC) (envelope-from avg@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 B65AF834AC; Thu, 15 Mar 2018 14:23:31 +0000 (UTC) (envelope-from avg@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 AC54817364; Thu, 15 Mar 2018 14:23:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FENVdX011483; Thu, 15 Mar 2018 14:23:31 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FENVFw011481; Thu, 15 Mar 2018 14:23:31 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151423.w2FENVFw011481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 14:23:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331001 - head/tests/sys/cddl/zfs/tests/cli_root/zpool_export X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/tests/sys/cddl/zfs/tests/cli_root/zpool_export X-SVN-Commit-Revision: 331001 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 14:23:32 -0000 Author: avg Date: Thu Mar 15 14:23:31 2018 New Revision: 331001 URL: https://svnweb.freebsd.org/changeset/base/331001 Log: zfs test suite: move definition of DISK to the cfg file in zpool_export The variable is used not only by the setup script but also by the atf test bodies. Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_export/setup.ksh head/tests/sys/cddl/zfs/tests/cli_root/zpool_export/zpool_export.cfg Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_export/setup.ksh ============================================================================== --- head/tests/sys/cddl/zfs/tests/cli_root/zpool_export/setup.ksh Thu Mar 15 13:46:28 2018 (r331000) +++ head/tests/sys/cddl/zfs/tests/cli_root/zpool_export/setup.ksh Thu Mar 15 14:23:31 2018 (r331001) @@ -31,6 +31,4 @@ . $STF_SUITE/include/libtest.kshlib -DISK=${DISKS%% *} - default_setup $DISK Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_export/zpool_export.cfg ============================================================================== --- head/tests/sys/cddl/zfs/tests/cli_root/zpool_export/zpool_export.cfg Thu Mar 15 13:46:28 2018 (r331000) +++ head/tests/sys/cddl/zfs/tests/cli_root/zpool_export/zpool_export.cfg Thu Mar 15 14:23:31 2018 (r331001) @@ -30,3 +30,5 @@ # . $STF_SUITE/tests/cli_root/cli.cfg + +export DISK=${DISKS%% *} From owner-svn-src-all@freebsd.org Thu Mar 15 14:35:47 2018 Return-Path: Delivered-To: svn-src-all@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 06F2CF56A62; Thu, 15 Mar 2018 14:35:47 +0000 (UTC) (envelope-from avg@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 A1D4083C59; Thu, 15 Mar 2018 14:35:46 +0000 (UTC) (envelope-from avg@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 9CD75174E3; Thu, 15 Mar 2018 14:35:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FEZkn2016289; Thu, 15 Mar 2018 14:35:46 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FEZk8b016287; Thu, 15 Mar 2018 14:35:46 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151435.w2FEZk8b016287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 14:35:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331002 - head/tests/sys/cddl/zfs/tests/cli_root/zpool_get X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/tests/sys/cddl/zfs/tests/cli_root/zpool_get X-SVN-Commit-Revision: 331002 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 14:35:47 -0000 Author: avg Date: Thu Mar 15 14:35:46 2018 New Revision: 331002 URL: https://svnweb.freebsd.org/changeset/base/331002 Log: zfs test suite: move definition of DISK to the cfg file in zpool_get The variable is used not only by the setup script but also by the atf test bodies. This should have been in r331001. Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/setup.ksh head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get.cfg Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/setup.ksh ============================================================================== --- head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/setup.ksh Thu Mar 15 14:23:31 2018 (r331001) +++ head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/setup.ksh Thu Mar 15 14:35:46 2018 (r331002) @@ -32,6 +32,4 @@ . ${STF_SUITE}/include/libtest.kshlib verify_runnable "both" -DISK=${DISKS%% *} - default_setup $DISK Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get.cfg ============================================================================== --- head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get.cfg Thu Mar 15 14:23:31 2018 (r331001) +++ head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get.cfg Thu Mar 15 14:35:46 2018 (r331002) @@ -69,3 +69,5 @@ typeset -a properties=( "feature@skein" # "feature@edonr" Edonr is not yet implemented on FreeBSD ) + +export DISK=${DISKS%% *} From owner-svn-src-all@freebsd.org Thu Mar 15 14:41:10 2018 Return-Path: Delivered-To: svn-src-all@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 F1FD0F570FA; Thu, 15 Mar 2018 14:41:09 +0000 (UTC) (envelope-from avg@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 A84DC83F97; Thu, 15 Mar 2018 14:41:09 +0000 (UTC) (envelope-from avg@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 A354C1761F; Thu, 15 Mar 2018 14:41:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FEf9eX017317; Thu, 15 Mar 2018 14:41:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FEf9oo017316; Thu, 15 Mar 2018 14:41:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151441.w2FEf9oo017316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 14:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331003 - head/tests/sys/cddl/zfs/tests/cli_root/zpool_get X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/tests/sys/cddl/zfs/tests/cli_root/zpool_get X-SVN-Commit-Revision: 331003 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 14:41:10 -0000 Author: avg Date: Thu Mar 15 14:41:09 2018 New Revision: 331003 URL: https://svnweb.freebsd.org/changeset/base/331003 Log: zfs test suite: add new pool properties / features to the zpool_get list Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get.cfg Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get.cfg ============================================================================== --- head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get.cfg Thu Mar 15 14:35:46 2018 (r331002) +++ head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get.cfg Thu Mar 15 14:41:09 2018 (r331003) @@ -53,6 +53,7 @@ typeset -a properties=( "freeing" "fragmentation" "leaked" + "bootsize" "feature@async_destroy" "feature@empty_bpobj" "feature@lz4_compress" @@ -68,6 +69,8 @@ typeset -a properties=( "feature@sha512" "feature@skein" # "feature@edonr" Edonr is not yet implemented on FreeBSD + "feature@device_removal" + "feature@obsolete_counts" ) export DISK=${DISKS%% *} From owner-svn-src-all@freebsd.org Thu Mar 15 14:47:54 2018 Return-Path: Delivered-To: svn-src-all@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 C2BF4F578D6; Thu, 15 Mar 2018 14:47:54 +0000 (UTC) (envelope-from avg@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 726BB84630; Thu, 15 Mar 2018 14:47:54 +0000 (UTC) (envelope-from avg@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 67B5C17677; Thu, 15 Mar 2018 14:47:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FElsNK021539; Thu, 15 Mar 2018 14:47:54 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FEls3r021537; Thu, 15 Mar 2018 14:47:54 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201803151447.w2FEls3r021537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 15 Mar 2018 14:47:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331004 - head/tests/sys/cddl/zfs/tests/cli_root/zpool_history X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/tests/sys/cddl/zfs/tests/cli_root/zpool_history X-SVN-Commit-Revision: 331004 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 14:47:54 -0000 Author: avg Date: Thu Mar 15 14:47:53 2018 New Revision: 331004 URL: https://svnweb.freebsd.org/changeset/base/331004 Log: zfs test suite: move definition of DISK to the cfg file in zpool_get The variable is used not only by the setup script but also by the atf test bodies. Another one that should have been in r331001. Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_history/setup.ksh head/tests/sys/cddl/zfs/tests/cli_root/zpool_history/zpool_history.cfg Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_history/setup.ksh ============================================================================== --- head/tests/sys/cddl/zfs/tests/cli_root/zpool_history/setup.ksh Thu Mar 15 14:41:09 2018 (r331003) +++ head/tests/sys/cddl/zfs/tests/cli_root/zpool_history/setup.ksh Thu Mar 15 14:47:53 2018 (r331004) @@ -31,5 +31,4 @@ . $STF_SUITE/include/libtest.kshlib -DISK=${DISKS%% *} default_container_volume_setup $DISK Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_history/zpool_history.cfg ============================================================================== --- head/tests/sys/cddl/zfs/tests/cli_root/zpool_history/zpool_history.cfg Thu Mar 15 14:41:09 2018 (r331003) +++ head/tests/sys/cddl/zfs/tests/cli_root/zpool_history/zpool_history.cfg Thu Mar 15 14:47:53 2018 (r331004) @@ -28,3 +28,5 @@ # . $STF_SUITE/tests/cli_root/cli.cfg + +export DISK=${DISKS%% *} From owner-svn-src-all@freebsd.org Thu Mar 15 15:05:26 2018 Return-Path: Delivered-To: svn-src-all@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 BE42DF58C0E; Thu, 15 Mar 2018 15:05:26 +0000 (UTC) (envelope-from bapt@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 72B908532A; Thu, 15 Mar 2018 15:05:26 +0000 (UTC) (envelope-from bapt@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 5398A17979; Thu, 15 Mar 2018 15:05:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FF5QV2031524; Thu, 15 Mar 2018 15:05:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FF5QBC031523; Thu, 15 Mar 2018 15:05:26 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201803151505.w2FF5QBC031523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 15 Mar 2018 15:05:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331005 - head/share/termcap X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/share/termcap X-SVN-Commit-Revision: 331005 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 15:05:27 -0000 Author: bapt Date: Thu Mar 15 15:05:26 2018 New Revision: 331005 URL: https://svnweb.freebsd.org/changeset/base/331005 Log: Fix tab vs space indentation MFC after: 3 days Modified: head/share/termcap/termcap Modified: head/share/termcap/termcap ============================================================================== --- head/share/termcap/termcap Thu Mar 15 14:47:53 2018 (r331004) +++ head/share/termcap/termcap Thu Mar 15 15:05:26 2018 (r331005) @@ -4664,24 +4664,24 @@ Eterm|Eterm Terminal Emulator (X11 Window System):\ # Termcap for xterm-termite xterm-termite|VTE-based terminal:\ - :NP:am:hs:mi:ms:ut:xn:\ - :Co#256:co#80:it#8:li#24:pa#32767:\ - :@7=\EOF:@8=\EOM:AB=\E[48;5;%dm:AF=\E[38;5;%dm:AL=\E[%dL:\ - :DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:F1=\E[23~:F2=\E[24~:\ - :IC=\E[%d@:K2=\EOE:Km=\E[M:LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:\ - :SA=\E[?7h:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ZH=\E[3m:\ - :ZR=\E[23m:al=\E[L:bl=^G:bt=\E[Z:cb=\E[1K:cd=\E[J:ce=\E[K:\ - :ch=\E[%i%dG:cl=\E[H\E[J:cm=\E[%i%d;%dH:cr=^M:\ - :cs=\E[%i%d;%dr:cv=\E[%i%dd:dc=\E[P:dl=\E[M:do=^J:\ - :ds=\E]2;\007:ec=\E[%dX:ei=\E[4l:fs=^G:ho=\E[H:im=\E[4h:\ - :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\ - :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:kB=\E[Z:kD=\E[3~:\ - :kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:kd=\EOB:ke=\E[?1l:\ - :kh=\EOH:kl=\EOD:kr=\EOC:ks=\E[?1h:ku=\EOA:le=^H:md=\E[1m:\ - :me=\E[m:mr=\E[7m:nd=\E[C:op=\E[39;49m:r1=\Ec:rc=\E8:\ - :sc=\E7:se=\E[27m:sf=^J:so=\E[7m:sr=\EM:ta=^I:te=\E[?1049l:\ - :ti=\E[?1049h:ts=\E]2;:u6=\E[%i%d;%dR:u7=\E[6n:ue=\E[24m:\ - :up=\E[A:us=\E[4m:ve=\E[?25h:vi=\E[?25l: + :NP:am:hs:mi:ms:ut:xn:\ + :Co#256:co#80:it#8:li#24:pa#32767:\ + :@7=\EOF:@8=\EOM:AB=\E[48;5;%dm:AF=\E[38;5;%dm:AL=\E[%dL:\ + :DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:F1=\E[23~:F2=\E[24~:\ + :IC=\E[%d@:K2=\EOE:Km=\E[M:LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:\ + :SA=\E[?7h:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ZH=\E[3m:\ + :ZR=\E[23m:al=\E[L:bl=^G:bt=\E[Z:cb=\E[1K:cd=\E[J:ce=\E[K:\ + :ch=\E[%i%dG:cl=\E[H\E[J:cm=\E[%i%d;%dH:cr=^M:\ + :cs=\E[%i%d;%dr:cv=\E[%i%dd:dc=\E[P:dl=\E[M:do=^J:\ + :ds=\E]2;\007:ec=\E[%dX:ei=\E[4l:fs=^G:ho=\E[H:im=\E[4h:\ + :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\ + :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:kB=\E[Z:kD=\E[3~:\ + :kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:kd=\EOB:ke=\E[?1l:\ + :kh=\EOH:kl=\EOD:kr=\EOC:ks=\E[?1h:ku=\EOA:le=^H:md=\E[1m:\ + :me=\E[m:mr=\E[7m:nd=\E[C:op=\E[39;49m:r1=\Ec:rc=\E8:\ + :sc=\E7:se=\E[27m:sf=^J:so=\E[7m:sr=\EM:ta=^I:te=\E[?1049l:\ + :ti=\E[?1049h:ts=\E]2;:u6=\E[%i%d;%dR:u7=\E[6n:ue=\E[24m:\ + :up=\E[A:us=\E[4m:ve=\E[?25h:vi=\E[?25l: # # END OF TERMCAP From owner-svn-src-all@freebsd.org Thu Mar 15 15:13:17 2018 Return-Path: Delivered-To: svn-src-all@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 DF55EF59493; Thu, 15 Mar 2018 15:13:17 +0000 (UTC) (envelope-from bapt@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 913CD85AA0; Thu, 15 Mar 2018 15:13:17 +0000 (UTC) (envelope-from bapt@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 8C17317B0C; Thu, 15 Mar 2018 15:13:17 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FFDHHC036589; Thu, 15 Mar 2018 15:13:17 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FFDH1x036588; Thu, 15 Mar 2018 15:13:17 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201803151513.w2FFDH1x036588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 15 Mar 2018 15:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331006 - head/share/termcap X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/share/termcap X-SVN-Commit-Revision: 331006 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 15:13:18 -0000 Author: bapt Date: Thu Mar 15 15:13:17 2018 New Revision: 331006 URL: https://svnweb.freebsd.org/changeset/base/331006 Log: Add termcap entries for the st terminal (https://st.sucksless.org) MFC after: 3 days Modified: head/share/termcap/termcap Modified: head/share/termcap/termcap ============================================================================== --- head/share/termcap/termcap Thu Mar 15 15:05:26 2018 (r331005) +++ head/share/termcap/termcap Thu Mar 15 15:13:17 2018 (r331006) @@ -4683,6 +4683,43 @@ xterm-termite|VTE-based terminal:\ :ti=\E[?1049h:ts=\E]2;:u6=\E[%i%d;%dR:u7=\E[6n:ue=\E[24m:\ :up=\E[A:us=\E[4m:ve=\E[?25h:vi=\E[?25l: +# Termcap for st terminal taken from the st-0.8 sources +st|simpleterm:\ + :am:hs:mi:ms:xn:\ + :co#80:it#8:li#24:\ + :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\ + :K1=\E[1~:K2=\EOu:K3=\E[5~:K4=\E[4~:K5=\E[6~:LE=\E[%dD:\ + :RI=\E[%dC:SF=\E[%dS:UP=\E[%dA:ae=\E(B:al=\E[L:as=\E(0:\ + :bl=^G:bt=\E[Z:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\ + :cm=\E[%i%d;%dH:cr=\r:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\ + :dl=\E[M:do=\n:ec=\E[%dX:ei=\E[4l:fs=^G:ho=\E[H:im=\E[4h:\ + :is=\E[4l\E>\E[?1034l:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\ + :k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:\ + :kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:kd=\EOB:\ + :ke=\E[?1l\E>:kh=\E[1~:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\ + :ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:me=\E[0m:mh=\E[2m:\ + :mr=\E[7m:nd=\E[C:rc=\E8:sc=\E7:se=\E[27m:sf=\n:so=\E[7m:\ + :sr=\EM:st=\EH:ta=^I:te=\E[?1049l:ti=\E[?1049h:ts=\E]0;:\ + :ue=\E[24m:up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:\ + :ve=\E[?12l\E[?25h:vi=\E[?25l:vs=\E[?25h: + +st-256color|simpleterm with 256 colors:\ + :cc:\ + :Co#256:pa#32767:\ + :AB=\E[48;5;%dm:AF=\E[38;5;%dm:\ + :..Ic=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\:\ + :oc=\E]104\007:tc=st: + +st-meta|simpleterm with meta key:\ + :km:\ + :is=\E[4l\E>\E[?1034h:mm=\E[?1034h:mo=\E[?1034l:\ + :rs=\E[4l\E>\E[?1034h:tc=st: + +st-meta-256color|simpleterm with meta key and 256 colors:\ + :km:\ + :is=\E[4l\E>\E[?1034h:mm=\E[?1034h:mo=\E[?1034l:\ + :rs=\E[4l\E>\E[?1034h:tc=st-256color: + # # END OF TERMCAP # ------------------------ From owner-svn-src-all@freebsd.org Thu Mar 15 15:14:14 2018 Return-Path: Delivered-To: svn-src-all@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 9CAEEF59589; Thu, 15 Mar 2018 15:14:14 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.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 3E4CC85BE8; Thu, 15 Mar 2018 15:14:14 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=62684 helo=[10.0.0.100]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1ewSGb-000MLU-5X; Thu, 15 Mar 2018 12:45:57 +0000 From: Devin Teske Message-Id: Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r330886 - head/share/examples Date: Thu, 15 Mar 2018 07:46:01 -0700 In-Reply-To: Cc: Devin Teske , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Matthias Meyser References: <201803132337.w2DNbXDi025717@repo.freebsd.org> X-Mailer: Apple Mail (2.3273) Sender: devin@shxd.cx Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 15:14:14 -0000 > On Mar 15, 2018, at 5:25 AM, Matthias Meyser wrote: >=20 > Am 14.03.2018 um 00:37 schrieb Devin Teske: >> Author: dteske >> Date: Tue Mar 13 23:37:33 2018 >> New Revision: 330886 >> URL: https://svnweb.freebsd.org/changeset/base/330886 = >> Log: >> Install files added in SVN's r295373, r295457, r295542 >> Reported by: woodsb02 >> MFC after: 3 days >> X-MFC to: stable/11 >=20 > PR: 214994 (2016) is missing >=20 > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214994 = >=20 > Please change to fixed >=20 Thanks. --=20 Devin= From owner-svn-src-all@freebsd.org Thu Mar 15 15:19:27 2018 Return-Path: Delivered-To: svn-src-all@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 C3C91F59B25; Thu, 15 Mar 2018 15:19:27 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 303C2860C6; Thu, 15 Mar 2018 15:19:26 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f48.google.com with SMTP id a22-v6so10733856lfg.9; Thu, 15 Mar 2018 08:19:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5Pz+o7WPKO+WG/fsLNkmNrFKXL6LkmepzuJlGEL5pUI=; b=GtLXyiDDZdhoOHkQiwsYfTuZGRoS4DxzPktsUo40xaCrJsNv7nJKpSu9uBWRRiguh1 /jiUxMktpO4b+CaM2bbWfGEf5RcXq/J5hsTYjR9a8fvADCUj/BDPHI6j9ipyfKzo6O5M AlhPaJMvH0xw6/uu4QM/YvxhaKu+FSc51QShqlV6cxGjzJQUDgjCUefgwqfMGwIxNqCK 3Bb3W/yti0AlNz5ORRcgUu6qDvR67EHS0XP06IBY9zrMIKq5OXjJ7ggeGbqCx3ZXb1vq Fs3Rha9jTDodVTO3bqCaSIILpAUqWrYQwkSDF3FGYeKXKKSrnJ7mzfvtoJUrfGCIwnkl YnqA== X-Gm-Message-State: AElRT7G0iCjXE7IbBzrXD/z1qHX2I80gBbfYwRgmZjvRASvx2Djz34gZ yuBVnPtN8T2B5BpJUY4JA0XRdQ0/ X-Google-Smtp-Source: AG47ELv2RTLcpebruohTp5cRkJyfINxEQXgRAZ7I4/ZlMBPqU7Me8sCP/EE7iJPvFjSp+jocyt+eSw== X-Received: by 2002:a19:e48e:: with SMTP id x14-v6mr6839739lfi.115.1521127164675; Thu, 15 Mar 2018 08:19:24 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id v4sm1106154lje.53.2018.03.15.08.19.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Mar 2018 08:19:23 -0700 (PDT) Subject: Re: svn commit: r331006 - head/share/termcap To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803151513.w2FFDH1x036588@repo.freebsd.org> From: Andriy Gapon Message-ID: Date: Thu, 15 Mar 2018 17:19:22 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <201803151513.w2FFDH1x036588@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 15:19:27 -0000 On 15/03/2018 17:13, Baptiste Daroussin wrote: > Add termcap entries for the st terminal (https://st.sucksless.org) Just in case anyone else got curious, the correct URL is https://st.suckless.org -- Andriy Gapon From owner-svn-src-all@freebsd.org Thu Mar 15 15:20:49 2018 Return-Path: Delivered-To: svn-src-all@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 C146EF59C80; Thu, 15 Mar 2018 15:20:49 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 71B3186281; Thu, 15 Mar 2018 15:20:49 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 68D2FAB67; Thu, 15 Mar 2018 15:20:49 +0000 (UTC) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id 354C16B3D7; Thu, 15 Mar 2018 16:20:49 +0100 (CET) Date: Thu, 15 Mar 2018 16:20:49 +0100 From: Baptiste Daroussin To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r331006 - head/share/termcap Message-ID: <20180315152049.qakrhrr23tm5nist@ivaldir.net> References: <201803151513.w2FFDH1x036588@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="g5aadzweaip7jshd" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180223 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 15:20:49 -0000 --g5aadzweaip7jshd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 15, 2018 at 05:19:22PM +0200, Andriy Gapon wrote: > On 15/03/2018 17:13, Baptiste Daroussin wrote: > > Add termcap entries for the st terminal (https://st.sucksless.org) >=20 > Just in case anyone else got curious, the correct URL is https://st.suckl= ess.org Thanks and sorry for the typo Bapt --g5aadzweaip7jshd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlqqj1EACgkQY4mL3PG3 PlpGJg/+LHjWGQ6jxgOaIXzYdPA0dWKw7zDus5eih9glxlfRJb+T0y8IUNOreV4e RSPACrr/FHDP7BKvhy5SQc9ktCjGnfQaPMVcqBM2VS7w482gO3k7yyaRPsPett93 Bs+o21MD09v50i/Xe09knd/qdsIp9kLfaA3OWf/nUPJq6eoqDaEyaL0m8kfHJzym yvGycbH5NxjTQmqYTGL5ACJwKol9ABa3z4VANuGzq8KlSW73sGDp0HgOl+nd8zTr lOynB/9YX7o9tXd3u82w13gSy2TDyUsIVYBDgoFfU1ZoKusRxD8AZP2ADobbdCjx OAnuIfX4NZuanuHj5R0yd/Pdqndurl2isTyMdd6ZW//Gk5mDW1/DpMKDR4R8BRKh z6M/0e7Hpqo9eHg6qUrJzOPC531gH1zqqKM7ku/8wtlzAWKBanjpTyFFocRM6xpO +BPSeB+ptKlxrDOs2+/s0fRMwVCdR71/J6GNUVhR5lsNtI8L41abGM7tyMsfdMuE QAhO8ALwJ/kWoNXGnIacDFjzgxFq3i134PlIF55qWLpzIUQUlJMbYiEEHcVZ1u3p BJFZOFA5y/5jH4BPLITdjBUI0/pA/8kUBlioDplUOFjEAlfpY4b/CtJy9D4jl2uH nFh/noZxnDS/uqXkCDUw+Wf7k4Cd0VFvwsr9YlWeVz4QKrZIOaw= =qXKI -----END PGP SIGNATURE----- --g5aadzweaip7jshd-- From owner-svn-src-all@freebsd.org Thu Mar 15 15:33:58 2018 Return-Path: Delivered-To: svn-src-all@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 D2EDFF5ADA4; Thu, 15 Mar 2018 15:33:58 +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 3AB7A86D74; Thu, 15 Mar 2018 15:33:57 +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 w2FFXmc0093663; Thu, 15 Mar 2018 08:33:48 -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 w2FFXkS9093662; Thu, 15 Mar 2018 08:33:46 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803151533.w2FFXkS9093662@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330972 - stable/11/share/misc In-Reply-To: To: Andriy Gapon Date: Thu, 15 Mar 2018 08:33:46 -0700 (PDT) CC: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 15:33:59 -0000 > On 15/03/2018 10:30, Eitan Adler wrote: > > Author: eadler > > Date: Thu Mar 15 08:30:05 2018 > > New Revision: 330972 > > URL: https://svnweb.freebsd.org/changeset/base/330972 > > > > Log: > > MFC r303063,r311852,r311930,r317040,r320506,r321301,r325162,r326759,r329004,: > > I have never seen things like these MFC-ed before... > Should we be really doing them? Yes, imho. And the reasons may seem odd to sum, but here is my spin on this: It should not of been Eitan who did the MFC. Second, this simple document MFC is excellent training ground for a new commiter to learn how to do a MFC. Everyone should know how to do an MFC and it seems we have many (me included when I returned as my experiece was all with cvs, not svn) who do not know how to do this operation. If they mess up this simple text file it has a very low risk, and then they can learn how to do a revert and recommit! Maybe we should even add to the end of the commiters "these are the things you should do as a new committer" the merging of your info into to all supported/active releases. Which is a good opportunity for teaching how to do svn sparse checkouts as you really do not want to pull all of stable/10 out just to commit to 1 file. This file is an excellent opportunity for training, lets USE IT! Thanks, > > Add myself (stevek) as a src committer and mentor (sjg) to committers-src.dot > > > > Approved by: sjg (mentor) ... -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Mar 15 15:40:08 2018 Return-Path: Delivered-To: svn-src-all@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 2DBC2F5B400; Thu, 15 Mar 2018 15:40:08 +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 515B3870AD; Thu, 15 Mar 2018 15:40:07 +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 w2FFe5ZL093684; Thu, 15 Mar 2018 08:40:05 -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 w2FFe5tA093683; Thu, 15 Mar 2018 08:40:05 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803151540.w2FFe5tA093683@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330972 - stable/11/share/misc In-Reply-To: To: Eitan Adler Date: Thu, 15 Mar 2018 08:40:05 -0700 (PDT) CC: Andriy Gapon , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 15:40:08 -0000 > On 15 March 2018 at 01:40, Andriy Gapon wrote: > > On 15/03/2018 10:30, Eitan Adler wrote: > >> Author: eadler > >> Date: Thu Mar 15 08:30:05 2018 > >> New Revision: 330972 > >> URL: https://svnweb.freebsd.org/changeset/base/330972 > >> > >> Log: > >> MFC r303063,r311852,r311930,r317040,r320506,r321301,r325162,r326759,r329004,: > > > > I have never seen things like these MFC-ed before... > > Should we be really doing them? > > I don't see any reason not to. I don't expect people to do them, > though it might be interesting to add it as a teaching tool. I would very much like to see this. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Mar 15 15:46:20 2018 Return-Path: Delivered-To: svn-src-all@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 71E26F5BD11 for ; Thu, 15 Mar 2018 15:46:20 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8156876B0 for ; Thu, 15 Mar 2018 15:46:19 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: de39461f-2867-11e8-b951-f99fef315fd9 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id de39461f-2867-11e8-b951-f99fef315fd9; Thu, 15 Mar 2018 15:45:21 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w2FFkF4L025941; Thu, 15 Mar 2018 09:46:15 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1521128775.99081.34.camel@freebsd.org> Subject: Re: svn commit: r330972 - stable/11/share/misc From: Ian Lepore To: rgrimes@freebsd.org, Andriy Gapon Cc: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Date: Thu, 15 Mar 2018 09:46:15 -0600 In-Reply-To: <201803151533.w2FFXkS9093662@pdx.rh.CN85.dnsmgr.net> References: <201803151533.w2FFXkS9093662@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 15:46:20 -0000 On Thu, 2018-03-15 at 08:33 -0700, Rodney W. Grimes wrote: > > > > On 15/03/2018 10:30, Eitan Adler wrote: > > > > > > Author: eadler > > > Date: Thu Mar 15 08:30:05 2018 > > > New Revision: 330972 > > > URL: https://svnweb.freebsd.org/changeset/base/330972 > > > > > > Log: > > >   MFC r303063,r311852,r311930,r317040,r320506,r321301,r325162,r326759,r329004,: > > I have never seen things like these MFC-ed before... > > Should we be really doing them? > Yes, imho.  And the reasons may seem odd to sum, but here is my spin on this: > > It should not of been Eitan who did the MFC. > > Second, this simple document MFC is excellent training ground for a new > commiter to learn how to do a MFC.  Everyone should know how to do an MFC > and it seems we have many (me included when I returned as my experiece was > all with cvs, not svn) who do not know how to do this operation. > > If they mess up this simple text file it has a very low risk, and then > they can learn how to do a revert and recommit! > > Maybe we should even add to the end of the commiters "these are the > things you should do as a new committer" the merging of your info > into to all supported/active releases.  Which is a good opportunity > for teaching how to do svn sparse checkouts as you really do not > want to pull all of stable/10 out just to commit to 1 file. > > This file is an excellent opportunity for training, lets USE IT! > > Thanks, I agree completely with all of this. It bothers me how many committers have the attitude that handling MFCs is not part of being a committer. While I stop short of any kind of inflexible rule requiring all committers to attend to their own MFCs, anything we can do to encourage it and make it part of the culture is a good thing. -- Ian From owner-svn-src-all@freebsd.org Thu Mar 15 15:52:24 2018 Return-Path: Delivered-To: svn-src-all@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 8A866F5C514; Thu, 15 Mar 2018 15:52:24 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-lf0-x242.google.com (mail-lf0-x242.google.com [IPv6:2a00:1450:4010:c07::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F040287E12; Thu, 15 Mar 2018 15:52:23 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-lf0-x242.google.com with SMTP id w16-v6so10871811lfc.13; Thu, 15 Mar 2018 08:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=hZMPXlrF/l2Xn0Kw/3MKMmrbhZI9MJ8EkTqYJIaM7l4=; b=LjDWiaPx8+DQk242XiK95Xt8gwTn0+uYnMKskaBq5ZCqJABO+PocRLp3n9mmY+T4+T VJjbEnOBaR33uLuhimOkEOLaUg01DTwymFx4TG5LadY/ghgYdkNtLc5yzIMaGlt2AlTP 0cfe4atjTxvHMx7I05V+adQQ7ulCaXy5QYZ8HZhzFVavavGa7n4eMpgQna8fqOzONVhl 7g724VKccL1Hgijr3JhZ3rtueDK8OzTpFqlfZxHIxlK1jqjEBMlGOKMiFrIAwBiyVyI2 watUyYuOLELi/xtIrKEkrl1x5Fh630XtPfpDkIWsze4wlz3r2C17zM5Sss94/ejCOxFC FkPw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alumni-cwru-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=hZMPXlrF/l2Xn0Kw/3MKMmrbhZI9MJ8EkTqYJIaM7l4=; b=HaLsoDBWJEgC05ug3sLKLg+C1bQgZFfWtPACXHuuDlIsAR3p+sikCsoA8eZ8naDCOH ta/QmjYIhe0goInkovgyGp2HRxtRz3ZOL4DNNOjP8GE4DyYugQqJPs7iKAqmmh9g1Qeb ux2MnGkKRiA7UDsRBXnPiZ9RsmGWB/ClttROEqv4ACg+fymbpli/JAvW/PHQvn3Kq+BJ y+cK2te3LSgNFO0iB9LNL+a8HnvyCiDI8xKOVXn+XpEMvvXYYMdoKTzEFSQNxWSgQAte 4BPNBXtRhOAz1rAbPXzlLlZ57Ns3n5l63koVfsQqU+ZfV2QkMZohriY3YHM1R6EBi8zx ZTZA== 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=hZMPXlrF/l2Xn0Kw/3MKMmrbhZI9MJ8EkTqYJIaM7l4=; b=SoIJXLtxPhFQnD7Go0hnygvHTRdkZR3Y4e1q8b0DFw9jp+lnLAQTswdsM3/OJ53tIL yZOJt4M7PLObN+noc3d2FU+Z0zuJ06/K/96lV0EyIX8PIctmQVfj9yL+XKK0JNIKKM2+ UxHptzkht3DBmN5y6wfYoGBqYYlIZZbtR1rhkGyA2poNhDMagl1/j4Ufy3WL8EvkQlsZ 0bD+JsJLqTcnE5JXvimq3lSLJEwbE51i/vzlZLdwzeE/6J2kHlz+eNG1FRm2Fwh+gHYy pnwaLieD2yGj/1WRrkxyoeup75bOBBsGxw95j9Ui28AfWRHweee/kScaW2dinO2sJqEa bA/g== X-Gm-Message-State: AElRT7FvdkOMuFAH9oLWSSU6ZrGOejCPdZllGt4q1ds1QaNLSQSyXigu LMv5njm+qjZH60b4SbXm2CKtnDG1qYx0uPyb9iPkwA== X-Google-Smtp-Source: AG47ELsBQtzlRqbiMJd2Og23GlaOFa9OCmhT2vUW+GQ5tX2L0A63FST7EMjMZxZSH+7Cv9pcQQM5zHgNbmuJ+tEzo6E= X-Received: by 2002:a19:114f:: with SMTP id g76-v6mr7043553lfi.0.1521129142118; Thu, 15 Mar 2018 08:52:22 -0700 (PDT) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.46.85.26 with HTTP; Thu, 15 Mar 2018 08:52:21 -0700 (PDT) In-Reply-To: <1521128775.99081.34.camel@freebsd.org> References: <201803151533.w2FFXkS9093662@pdx.rh.CN85.dnsmgr.net> <1521128775.99081.34.camel@freebsd.org> From: Justin Hibbits Date: Thu, 15 Mar 2018 10:52:21 -0500 X-Google-Sender-Auth: sK99jXz1sW4s2QeQxn-h5H_BOCo Message-ID: Subject: Re: svn commit: r330972 - stable/11/share/misc To: Ian Lepore Cc: rgrimes@freebsd.org, Andriy Gapon , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 15:52:24 -0000 On Thu, Mar 15, 2018 at 10:46 AM, Ian Lepore wrote: > I agree completely with all of this. It bothers me how many committers > have the attitude that handling MFCs is not part of being a committer. Never attribute to arrogance that which can adequately be explained by sheer laziness ;) - Justin (guilty of marking changes as MFC after, and ignoring them for far too long) From owner-svn-src-all@freebsd.org Thu Mar 15 16:02:23 2018 Return-Path: Delivered-To: svn-src-all@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 BEB85F5D020 for ; Thu, 15 Mar 2018 16:02:23 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 428F6686B3 for ; Thu, 15 Mar 2018 16:02:22 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 2865a7b5-286a-11e8-bb8e-b35b57339d60 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.ore.mailhop.org (Halon) with ESMTPSA id 2865a7b5-286a-11e8-bb8e-b35b57339d60; Thu, 15 Mar 2018 16:01:45 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w2FG2Fce026008; Thu, 15 Mar 2018 10:02:15 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1521129735.99081.39.camel@freebsd.org> Subject: Re: svn commit: r330972 - stable/11/share/misc From: Ian Lepore To: Justin Hibbits Cc: rgrimes@freebsd.org, Andriy Gapon , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Date: Thu, 15 Mar 2018 10:02:15 -0600 In-Reply-To: References: <201803151533.w2FFXkS9093662@pdx.rh.CN85.dnsmgr.net> <1521128775.99081.34.camel@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 16:02:23 -0000 On Thu, 2018-03-15 at 10:52 -0500, Justin Hibbits wrote: > On Thu, Mar 15, 2018 at 10:46 AM, Ian Lepore wrote: > > > > I agree completely with all of this.  It bothers me how many > > committers > > have the attitude that handling MFCs is not part of being a > > committer. > Never attribute to arrogance that which can adequately be explained > by > sheer laziness ;) > > - Justin (guilty of marking changes as MFC after, and ignoring them > for far too long) > Laziness and procrastination I understand -- I own a lovely glass house in that neighborhood.  I tend to put off MFCs for way too long then every few months have to spend a whole weekend catching up. -- Ian From owner-svn-src-all@freebsd.org Thu Mar 15 16:14:58 2018 Return-Path: Delivered-To: svn-src-all@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 76CBAF5DF01; Thu, 15 Mar 2018 16:14:58 +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 C523569054; Thu, 15 Mar 2018 16:14:57 +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 w2FGEtg2093806; Thu, 15 Mar 2018 09:14:55 -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 w2FGEttu093805; Thu, 15 Mar 2018 09:14:55 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803151614.w2FGEttu093805@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330972 - stable/11/share/misc In-Reply-To: <1521129735.99081.39.camel@freebsd.org> To: Ian Lepore Date: Thu, 15 Mar 2018 09:14:55 -0700 (PDT) CC: Justin Hibbits , rgrimes@freebsd.org, Andriy Gapon , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 16:14:58 -0000 > On Thu, 2018-03-15 at 10:52 -0500, Justin Hibbits wrote: > > On Thu, Mar 15, 2018 at 10:46 AM, Ian Lepore wrote: > > > > > > I agree completely with all of this.??It bothers me how many > > > committers > > > have the attitude that handling MFCs is not part of being a > > > committer. > > Never attribute to arrogance that which can adequately be explained > > by > > sheer laziness ;) > > > > - Justin (guilty of marking changes as MFC after, and ignoring them > > for far too long) > > > > Laziness and procrastination I understand -- I own a lovely glass house > in that neighborhood. ?I tend to put off MFCs for way too long then > every few months have to spend a whole weekend catching up. MFC: 1 week (by pool|self) #defaults to self if missing There is already a very nice tracking tool for outstanding MFC's, if we added a bit of smarts in its parser, and created a pool of MFC commiters (Eitan seems to have started one :-)) those who do not want to do there own MFC work could pass the hat. There is the issue that if sizeof(pool) gets to small things shall surely fall off the end. Perhaps at 2 x the timeout on the MFC send a reminder back to the orignal commiter stating the MFC has not happened and is now at 2x timeout? I am guessing, but not certain, eadler is working off a list from svn mergeinfo --show-revs eligible, having that list updated/annoted with "Do note merge: reason" would help the @pool above, and also help with when things are marked MFC, but found later they should not be. Also, I know it has pitfalls and mistakes are gona happen, but I feel a MFC: {never,breaks abi,ugly hack} marking would also help the project with some of this. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Mar 15 16:17:03 2018 Return-Path: Delivered-To: svn-src-all@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 7CD1EF5E151; Thu, 15 Mar 2018 16:17:03 +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 2BDB069270; Thu, 15 Mar 2018 16:17:03 +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 25AEC18455; Thu, 15 Mar 2018 16:17:03 +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 w2FGH2Xx067264; Thu, 15 Mar 2018 16:17:02 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FGH2MT067263; Thu, 15 Mar 2018 16:17:02 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803151617.w2FGH2MT067263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 15 Mar 2018 16:17:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331007 - head/sys/crypto/aesni X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/crypto/aesni X-SVN-Commit-Revision: 331007 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 16:17:03 -0000 Author: cem Date: Thu Mar 15 16:17:02 2018 New Revision: 331007 URL: https://svnweb.freebsd.org/changeset/base/331007 Log: aesni(4): Stylistic/comment enhancements Improve clarity of a comment and style(9) some areas. No functional change. Reported by: markj (on review of a mostly-copied driver) Sponsored by: Dell EMC Isilon Modified: head/sys/crypto/aesni/aesni.c Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Thu Mar 15 15:13:17 2018 (r331006) +++ head/sys/crypto/aesni/aesni.c Thu Mar 15 16:17:02 2018 (r331007) @@ -327,8 +327,8 @@ unhandled: return (EINVAL); } /* - * Free sessions goes first, so if first session is used, we need to - * allocate one. + * Free sessions are inserted at the head of the list. So if the first + * session is used, none are free and we must allocate a new one. */ ses = TAILQ_FIRST(&sc->sessions); if (ses == NULL || ses->used) { @@ -403,11 +403,13 @@ aesni_freesession(device_t dev, uint64_t tid) static int aesni_process(device_t dev, struct cryptop *crp, int hint __unused) { - struct aesni_softc *sc = device_get_softc(dev); - struct aesni_session *ses = NULL; + struct aesni_softc *sc; + struct aesni_session *ses; struct cryptodesc *crd, *enccrd, *authcrd; int error, needauth; + sc = device_get_softc(dev); + ses = NULL; error = 0; enccrd = NULL; authcrd = NULL; @@ -538,7 +540,7 @@ static device_method_t aesni_methods[] = { DEVMETHOD(cryptodev_freesession, aesni_freesession), DEVMETHOD(cryptodev_process, aesni_process), - {0, 0}, + DEVMETHOD_END }; static driver_t aesni_driver = { From owner-svn-src-all@freebsd.org Thu Mar 15 16:20:31 2018 Return-Path: Delivered-To: svn-src-all@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 89ACBF5E579 for ; Thu, 15 Mar 2018 16:20:31 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 AFE7569632 for ; Thu, 15 Mar 2018 16:20:30 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: b3619877-286c-11e8-bb8e-b35b57339d60 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.ore.mailhop.org (Halon) with ESMTPSA id b3619877-286c-11e8-bb8e-b35b57339d60; Thu, 15 Mar 2018 16:19:57 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w2FGKRGP026047; Thu, 15 Mar 2018 10:20:27 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1521130827.99081.43.camel@freebsd.org> Subject: Re: svn commit: r330972 - stable/11/share/misc From: Ian Lepore To: rgrimes@freebsd.org Cc: Justin Hibbits , Andriy Gapon , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Date: Thu, 15 Mar 2018 10:20:27 -0600 In-Reply-To: <201803151614.w2FGEttu093805@pdx.rh.CN85.dnsmgr.net> References: <201803151614.w2FGEttu093805@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 16:20:31 -0000 On Thu, 2018-03-15 at 09:14 -0700, Rodney W. Grimes wrote: > > > > On Thu, 2018-03-15 at 10:52 -0500, Justin Hibbits wrote: > > > > > > On Thu, Mar 15, 2018 at 10:46 AM, Ian Lepore > > > wrote: > > > > > > > > > > > > I agree completely with all of this.??It bothers me how many > > > > committers > > > > have the attitude that handling MFCs is not part of being a > > > > committer. > > > Never attribute to arrogance that which can adequately be > > > explained > > > by > > > sheer laziness ;) > > > > > > - Justin (guilty of marking changes as MFC after, and ignoring > > > them > > > for far too long) > > > > > Laziness and procrastination I understand -- I own a lovely glass > > house > > in that neighborhood. ?I tend to put off MFCs for way too long then > > every few months have to spend a whole weekend catching up. > MFC: 1 week (by pool|self) #defaults to self if missing > > There is already a very nice tracking tool for outstanding MFC's, > if we added a bit of smarts in its parser, and created a pool of > MFC commiters (Eitan seems to have started one :-)) those who > do not want to do there own MFC work could pass the hat. If you're talking about the MFC after: field in commits, I don't use it. I have about zero tolerance for being nagged by anybody about anything, and that goes double for robots nagging me with spam mail. The MFC tool that works well for me is gonzo's MFCTracker site [*] that doesn't require extra markup in the commit messages. [*] https://mfc.kernelnomicon.org/6/ -- Ian From owner-svn-src-all@freebsd.org Thu Mar 15 16:31:49 2018 Return-Path: Delivered-To: svn-src-all@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 D51BCF5F24F for ; Thu, 15 Mar 2018 16:31:48 +0000 (UTC) (envelope-from wlosh@bsdimp.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 G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C5A2C6A132 for ; Thu, 15 Mar 2018 16:31:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-wm0-x243.google.com with SMTP id h21so11594472wmd.1 for ; Thu, 15 Mar 2018 09:31: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=Mx1qOvA1P73kXtoOC5mQE+whGK/Ju2xANEJDSIOi1bs=; b=D4F8ZWvJBTzyUVxK6HTSF1Y2+DEhnFH52o1XBZWqd+u2DlnBXJsKWD7PDaOsWvwhK2 4wu8e42HfybrcLcogq2tsAKn3WfLMM4CGV/OG0L0buQbdd9EXZMNh1u77m/wkmq9/qUz ce1Z1bw7TLJ+qEjWKXmG2vluByQsytJ0YA4D1W5bOmfrf8XUTBaxLoW95+tu8eybiS5b +KaDKPcBZRCYLbrMGG4alBMUqTfDc8iY/aZtqnqJzlDufG9DEAy/ggppQIeyMAMYzNGs 60cYwEbHtjFdA/qXvuSir1a9h1JBEQpoTh/XZBFroLZ9bYI13L+BRZlA5PsX25aSEHzn SvVQ== 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=Mx1qOvA1P73kXtoOC5mQE+whGK/Ju2xANEJDSIOi1bs=; b=aZXv55g2W8rCpZkFeOq8cAGsG2WdwJvxvYGMltJc2qhAFtV4JwYdAqRjBjheXR0rbl nzGquPqbc+mSWI78QMU6Ng228xGmF8lWdl9wBDwzP4zuxCqmcH3FMfnSPObMbFfhWtiI zQ7z2n9GsaTUtHMmVNYfn81y/rxG/xkpire//IWFZqgmkKlT2phfLPfQUYRy4Vuz11rQ IGn1ejOAVPBpUZnsf+VXosMm1xFxmWA8RAbR1BQClpzRkkf6io8AjQCaKrXKCVEAlkcC BECbL/vWpB5cZQ6dx5iLesuAlYuRz8ttZmGQ8uYILavtpdBT/X3Q8AEt6MrGgSMb3sIF wkjA== X-Gm-Message-State: AElRT7FPm39m/MbKpXvaUBWKNbvnDTQIaJvP6MlaDHzx/eb7wfvNtU+D z7Cd7/GK+H8K/f3DhsWS5txKsmd1TzWuCCnJjAlCUA== X-Google-Smtp-Source: AG47ELtS6rIWpwiEjmeOkWzSLFZ3kWeY8mDCjCHuAq5jAgJUrg2hEL5KZLmGCyyQV7TTpNtFd7HaSJc3ztPhQYwSVmU= X-Received: by 10.80.139.70 with SMTP id l64mr9760403edl.149.1521131506609; Thu, 15 Mar 2018 09:31:46 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.80.147.165 with HTTP; Thu, 15 Mar 2018 09:31:46 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <1521130827.99081.43.camel@freebsd.org> References: <201803151614.w2FGEttu093805@pdx.rh.CN85.dnsmgr.net> <1521130827.99081.43.camel@freebsd.org> From: Warner Losh Date: Thu, 15 Mar 2018 10:31:46 -0600 X-Google-Sender-Auth: sfLzaG66ULsH8kbRDIzJBZcxLCk Message-ID: Subject: Re: svn commit: r330972 - stable/11/share/misc To: Ian Lepore Cc: "Rodney W. Grimes" , Justin Hibbits , Andriy Gapon , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 16:31:49 -0000 On Thu, Mar 15, 2018 at 10:20 AM, Ian Lepore wrote: > On Thu, 2018-03-15 at 09:14 -0700, Rodney W. Grimes wrote: > > > > > > On Thu, 2018-03-15 at 10:52 -0500, Justin Hibbits wrote: > > > > > > > > On Thu, Mar 15, 2018 at 10:46 AM, Ian Lepore > > > > wrote: > > > > > > > > > > > > > > > I agree completely with all of this.??It bothers me how many > > > > > committers > > > > > have the attitude that handling MFCs is not part of being a > > > > > committer. > > > > Never attribute to arrogance that which can adequately be > > > > explained > > > > by > > > > sheer laziness ;) > > > > > > > > - Justin (guilty of marking changes as MFC after, and ignoring > > > > them > > > > for far too long) > > > > > > > Laziness and procrastination I understand -- I own a lovely glass > > > house > > > in that neighborhood. ?I tend to put off MFCs for way too long then > > > every few months have to spend a whole weekend catching up. > > MFC: 1 week (by pool|self) #defaults to self if missing > > > > There is already a very nice tracking tool for outstanding MFC's, > > if we added a bit of smarts in its parser, and created a pool of > > MFC commiters (Eitan seems to have started one :-)) those who > > do not want to do there own MFC work could pass the hat. > > If you're talking about the MFC after: field in commits, I don't use > it. I have about zero tolerance for being nagged by anybody about > anything, and that goes double for robots nagging me with spam mail. > > The MFC tool that works well for me is gonzo's MFCTracker site [*] that > doesn't require extra markup in the commit messages. > I also have a MFC tool for git, but it's n From owner-svn-src-all@freebsd.org Thu Mar 15 16:36:20 2018 Return-Path: Delivered-To: svn-src-all@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 CF1F3F5F8CB for ; Thu, 15 Mar 2018 16:36:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5289F6A596 for ; Thu, 15 Mar 2018 16:36:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22f.google.com with SMTP id z143-v6so6983823itc.0 for ; Thu, 15 Mar 2018 09:36:19 -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=6k5fTZmJF1w4/Xnp3q5Yv57/T6w9kGFUBZqAwEfcNkI=; b=1QSWjh/F54XEjES5evUReNp7wbkT1g97mhpKAJLJ2ys/rvXVxoXP1RmVCHvURjkvwM St9uO8kM9n8jiryfCS7r7yHvTOo5RqCbAz8VL+2t8c8yk/ytDQ+iDufw5uWTFLIESHjW nB8oQSrgiufZh3E8ofahXE+UwjBIj7BkDKCXiAIRVaunyO2d6sfSiJVDgpLv3dsq3L8T noQWOKnW0650DCx0lgqsgAbjb3NByvex4Rc4tRlQqOYbWPSLBqRJNdtAmcGaprnUWod/ gsI9SCbAeX2KNxrCkik9HefxzfOYHxHTXNg0afYqbDTGGZeoElrJxKy/+5cScVWDGiG8 abaw== 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=6k5fTZmJF1w4/Xnp3q5Yv57/T6w9kGFUBZqAwEfcNkI=; b=OlTCcdeSwlom2Le8NruMhcBrPIsrXQ3yolT2G98SX0CautTk5fMVc/X2siBQXl6sTh ltZv/g3L/ngqqpH5BWUXoVaXXkTm1cKhKzJtT48b/2Aaxvw+bLvFURSCEb6dOTQDzWT7 +fQALFNG5QQ618k+VdqlXsLctuuUi16zEht2072MxkI3npn1CiTRHL1/LP2A56ryDrQc RydLkyuMOh51PsdFL2+QDcDqUKSzSItyKyCBEn1SCLEBLiDKqbVLXnNI7nTG4boCHxoE 7B/XkTNclTJ5Bv/zJdyposnoDdmxk4opdDe8ORTVQtpu/iaJKD8grO8PZYBfsD6d5URu 5oUQ== X-Gm-Message-State: AElRT7Ff6xYiTCloLXkAX+7LreOxh05CRhj1qVZxM04QqEYnYsy4X1nj DFiso0+dCY2QzzNRGyXPnyFrMjdCX9pHplYafrX7CQ== X-Google-Smtp-Source: AG47ELuLeBE9ab7eCsnrxhrLVWI6IzanLSeBhJVh70/PTtkvRIg9B62XJm8ztdSf7mQ0KlKfUoP9LoKZQS2tC06vkWU= X-Received: by 2002:a24:6f04:: with SMTP id x4-v6mr960371itb.51.1521131778492; Thu, 15 Mar 2018 09:36:18 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Thu, 15 Mar 2018 09:36:17 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201803151614.w2FGEttu093805@pdx.rh.CN85.dnsmgr.net> <1521130827.99081.43.camel@freebsd.org> From: Warner Losh Date: Thu, 15 Mar 2018 10:36:17 -0600 X-Google-Sender-Auth: 0WrTGQFRDFlpuiIYbENMKcIMmF8 Message-ID: Subject: Re: svn commit: r330972 - stable/11/share/misc To: Ian Lepore Cc: "Rodney W. Grimes" , Justin Hibbits , Andriy Gapon , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 16:36:20 -0000 On Thu, Mar 15, 2018 at 10:31 AM, Warner Losh wrote: > > > On Thu, Mar 15, 2018 at 10:20 AM, Ian Lepore wrote: > >> On Thu, 2018-03-15 at 09:14 -0700, Rodney W. Grimes wrote: >> > > >> > > On Thu, 2018-03-15 at 10:52 -0500, Justin Hibbits wrote: >> > > > >> > > > On Thu, Mar 15, 2018 at 10:46 AM, Ian Lepore >> > > > wrote: >> > > > > >> > > > > >> > > > > I agree completely with all of this.??It bothers me how many >> > > > > committers >> > > > > have the attitude that handling MFCs is not part of being a >> > > > > committer. >> > > > Never attribute to arrogance that which can adequately be >> > > > explained >> > > > by >> > > > sheer laziness ;) >> > > > >> > > > - Justin (guilty of marking changes as MFC after, and ignoring >> > > > them >> > > > for far too long) >> > > > >> > > Laziness and procrastination I understand -- I own a lovely glass >> > > house >> > > in that neighborhood. ?I tend to put off MFCs for way too long then >> > > every few months have to spend a whole weekend catching up. >> > MFC: 1 week (by pool|self) #defaults to self if missing >> > >> > There is already a very nice tracking tool for outstanding MFC's, >> > if we added a bit of smarts in its parser, and created a pool of >> > MFC commiters (Eitan seems to have started one :-)) those who >> > do not want to do there own MFC work could pass the hat. >> >> If you're talking about the MFC after: field in commits, I don't use >> it. I have about zero tolerance for being nagged by anybody about >> anything, and that goes double for robots nagging me with spam mail. >> >> The MFC tool that works well for me is gonzo's MFCTracker site [*] that >> doesn't require extra markup in the commit messages. >> > > I also have a MFC tool for git, but it's n > [[ stupid track pad and too easy button pushes... ]] but it's not ready for prime time. It's useful if you have a list of things you want to MFC for playing them onto the stable branch so you can test before committing to svn stable. It shows the big issues with moving to git as the source of truth, though. We have way too much traffic in the repo to have git cherry to produce any kind of reasonable output (too many changes, can't restrict to a subset of the tree, no way to check prior commits to files affected, etc), and the git cherry-pick command relies a bit too much on the merge magic, so it doesn't record merges (there is no merge-info in git). However, I could dust off the tool and fix up the rough edges if there's any interest at all. Kyle Evans used it to MFC my crazy src/stand stuff... Warner From owner-svn-src-all@freebsd.org Thu Mar 15 16:37:44 2018 Return-Path: Delivered-To: svn-src-all@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 684CCF5FACA; Thu, 15 Mar 2018 16:37:44 +0000 (UTC) (envelope-from brooks@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 0E7A26A7D7; Thu, 15 Mar 2018 16:37:44 +0000 (UTC) (envelope-from brooks@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 0967E18793; Thu, 15 Mar 2018 16:37:44 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FGbhsn077487; Thu, 15 Mar 2018 16:37:43 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FGbhvr077486; Thu, 15 Mar 2018 16:37:43 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803151637.w2FGbhvr077486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 15 Mar 2018 16:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331008 - head/sys/dev/md X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/dev/md X-SVN-Commit-Revision: 331008 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 16:37:44 -0000 Author: brooks Date: Thu Mar 15 16:37:43 2018 New Revision: 331008 URL: https://svnweb.freebsd.org/changeset/base/331008 Log: Restore the behavior of returning the total number of units by unconditionally incrementing i in the loop; Reported by: cem MFC with: r330880 Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14685 Modified: head/sys/dev/md/md.c Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Thu Mar 15 16:17:02 2018 (r331007) +++ head/sys/dev/md/md.c Thu Mar 15 16:37:43 2018 (r331008) @@ -1765,7 +1765,8 @@ err_after_new: i = 1; LIST_FOREACH(sc, &md_softc_list, list) { if (i < MDNPAD - 1) - mdio->md_pad[i++] = sc->unit; + mdio->md_pad[i] = sc->unit; + i++; } mdio->md_pad[MIN(i, MDNPAD - 1)] = -1; mdio->md_pad[0] = i - 1; From owner-svn-src-all@freebsd.org Thu Mar 15 16:54:42 2018 Return-Path: Delivered-To: svn-src-all@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 6EAB0F60E7D; Thu, 15 Mar 2018 16:54:42 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E50D56B4C6; Thu, 15 Mar 2018 16:54:41 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f68.google.com with SMTP id t132-v6so11229331lfe.2; Thu, 15 Mar 2018 09:54:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XEzKTrnYWBUPUgdvJQajh/uttlxWRKGHJbVZKLt2hRA=; b=aBG8418fjKTewKjs6ewQpfKatRASIM+CFqSfqdlYHeCY6pDrq7fIuTk1ewn7XXELqX O2HwCc8WzdmjFS3zqelx4jT9MKGAUKqRaNhT55cVZD7mLfaE0qVdwhxIljiaEni/pvR1 4MCG+QDT4dTKo67iLXImIkAQiCiX8PWcJh6k/+0/kzWLzxWOciEhacE1L/JFzG4wROVt msTOewBHnbIW/tx3ADUNNxceAlg9tj2kzgSkt5UbtANeyfVmGamtkQAZqhmTSWjBKp8o 7EJMzEdv7llFdlp8T+NSk0aSfy2yf8w2nNu3ph2QaDh2Ow4Evi7w/n+eKBO8vJnUBgxR C47A== X-Gm-Message-State: AElRT7FFfUdJXERnt4pEGUoqmUyPRyhszDr28xNOtxQmFwjFFiycsT3B W9g+Ezx3JqKA6lcWUXo3o3fpK2jGrCc= X-Google-Smtp-Source: AG47ELsi/lgCi4FniqLqI6eFEIPYE9pCsK3tWzadzWR4MFy59xY4D4iVEOLuAnApxP4Zk4DVoycWzw== X-Received: by 2002:a19:57c1:: with SMTP id l184-v6mr6597099lfb.2.1521131326601; Thu, 15 Mar 2018 09:28:46 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id g23sm1199504ljg.4.2018.03.15.09.28.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Mar 2018 09:28:45 -0700 (PDT) Subject: Re: svn commit: r330972 - stable/11/share/misc To: Ian Lepore , rgrimes@freebsd.org Cc: Justin Hibbits , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org References: <201803151614.w2FGEttu093805@pdx.rh.CN85.dnsmgr.net> <1521130827.99081.43.camel@freebsd.org> From: Andriy Gapon Message-ID: Date: Thu, 15 Mar 2018 18:28:44 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1521130827.99081.43.camel@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 16:54:42 -0000 On 15/03/2018 18:20, Ian Lepore wrote: > The MFC tool that works well for me is gonzo's MFCTracker site [*] that > doesn't require extra markup in the commit messages. > > [*] https://mfc.kernelnomicon.org/6/ But it's much more convenient to use with the "markup". Try it :-) P.S. > I have about zero tolerance for being nagged by anybody about anything That's a true spirit! P.P.S. I didn't intend this to be a thread about all things MFC. My comment was only about commiters*.dot files. -- Andriy Gapon From owner-svn-src-all@freebsd.org Thu Mar 15 17:07:20 2018 Return-Path: Delivered-To: svn-src-all@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 EABAFF61BAA for ; Thu, 15 Mar 2018 17:07:19 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yw0-x230.google.com (mail-yw0-x230.google.com [IPv6:2607:f8b0:4002:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A11C6BCA3 for ; Thu, 15 Mar 2018 17:07:19 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yw0-x230.google.com with SMTP id k40so5072752ywh.12 for ; Thu, 15 Mar 2018 10:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=l7fxNEd3HOQFnX5HCyI8s04AFz9z2LOsq8OoyAZK3zo=; b=W/wbAJxYpsHo0ANYRTEVOGMiSDZ1ivjaJHhAgEMxRW6C7luHdsvtp7jxWxiKPdP8sh K/XUsCrouxpNfXleFXvxl/BmHjdqKtbvMUJIkSHvNxPkkT/QKuarR5Xy6Ab/sHBeM13g Z+usECEuLmQAEvO8U9WhezQ/mOP1JSzdNCYCEk8aX6DhG7AskGViEvsicauivkKtF9oO hpBDsikXAuMi8KzeXxr8GIaAA2JabepHmrgnkSzfY5/diV2xS8bSHSN6NpmP1vQWokxC TOaeYpP8Q0HVDPjWAzRY4lP5KJrkkwamWtmk4qnJdjrInlfDBn71GE+l4jtV5bLSHbZn eOaA== 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=l7fxNEd3HOQFnX5HCyI8s04AFz9z2LOsq8OoyAZK3zo=; b=dDV36AsNrh/TtwqdMb9vTzoJ5H49mT3zk5ViEFiOWEH1rwofHO0CNkYZy5f2dLVOEQ P9Rs46P3bH6s/Klo5zIqQlCKMWqiHfO92bVxSaapyLvn0ce8OtYnm92B6H1seWsiWUbc /R37yy78xKJMH4FuZ+yfnDkS1XMxaqqS9JU/+5I56yfMZPuAVlyyaY3l8/BxWJobgEjr Hj3R4av0o5CUHSISy0qkm5gNpPqR2wEZfC/c1OcEfGBltsKzE20eXNpFEju0f1ehzx/J X2vjn62hRX1SvGVlobdF7xhCJC/eUlrqNmVwC07UAk9RMRf8szGR9MoXlX34q4uMWjO7 Yc/Q== X-Gm-Message-State: AElRT7FwqiHQCG9fDBW6bNL5ghALWn46dLRaqV2rH1NVu80mSr9rX2XJ eoXpY9q+tAB11fc1p/1ZpWPvMuvnkvwb5xmJ3da19g== X-Google-Smtp-Source: AG47ELtpNx/O2x1Tu+U4gqw356LLeeO51rRt2KJYPZDhbD9rkdqvYIJWEpxwl3R2caY/h8b6k5FnKMfeurnmC3aC0v4= X-Received: by 2002:a25:5047:: with SMTP id e68-v6mr6284286ybb.165.1521133636160; Thu, 15 Mar 2018 10:07:16 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:3492:0:0:0:0:0 with HTTP; Thu, 15 Mar 2018 10:07:15 -0700 (PDT) In-Reply-To: References: <201803151614.w2FGEttu093805@pdx.rh.CN85.dnsmgr.net> <1521130827.99081.43.camel@freebsd.org> From: Oliver Pinter Date: Thu, 15 Mar 2018 18:07:15 +0100 Message-ID: Subject: Re: svn commit: r330972 - stable/11/share/misc To: Warner Losh Cc: Ian Lepore , src-committers , Eitan Adler , Justin Hibbits , "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-stable-11@freebsd.org" , Andriy Gapon , "Rodney W. Grimes" X-Mailman-Approved-At: Thu, 15 Mar 2018 17:24:47 +0000 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 17:07:20 -0000 On Thursday, March 15, 2018, Warner Losh wrote: > On Thu, Mar 15, 2018 at 10:31 AM, Warner Losh wrote: > > > > > > > On Thu, Mar 15, 2018 at 10:20 AM, Ian Lepore wrote: > > > >> On Thu, 2018-03-15 at 09:14 -0700, Rodney W. Grimes wrote: > >> > > > >> > > On Thu, 2018-03-15 at 10:52 -0500, Justin Hibbits wrote: > >> > > > > >> > > > On Thu, Mar 15, 2018 at 10:46 AM, Ian Lepore > >> > > > wrote: > >> > > > > > >> > > > > > >> > > > > I agree completely with all of this.??It bothers me how many > >> > > > > committers > >> > > > > have the attitude that handling MFCs is not part of being a > >> > > > > committer. > >> > > > Never attribute to arrogance that which can adequately be > >> > > > explained > >> > > > by > >> > > > sheer laziness ;) > >> > > > > >> > > > - Justin (guilty of marking changes as MFC after, and ignoring > >> > > > them > >> > > > for far too long) > >> > > > > >> > > Laziness and procrastination I understand -- I own a lovely glass > >> > > house > >> > > in that neighborhood. ?I tend to put off MFCs for way too long then > >> > > every few months have to spend a whole weekend catching up. > >> > MFC: 1 week (by pool|self) #defaults to self if missing > >> > > >> > There is already a very nice tracking tool for outstanding MFC's, > >> > if we added a bit of smarts in its parser, and created a pool of > >> > MFC commiters (Eitan seems to have started one :-)) those who > >> > do not want to do there own MFC work could pass the hat. > >> > >> If you're talking about the MFC after: field in commits, I don't use > >> it. I have about zero tolerance for being nagged by anybody about > >> anything, and that goes double for robots nagging me with spam mail. > >> > >> The MFC tool that works well for me is gonzo's MFCTracker site [*] that > >> doesn't require extra markup in the commit messages. > >> > > > > I also have a MFC tool for git, but it's n > > > > [[ stupid track pad and too easy button pushes... ]] > > but it's not ready for prime time. It's useful if you have a list of things > you want to MFC for playing them onto the stable branch so you can test > before committing to svn stable. It shows the big issues with moving to git > as the source of truth, though. We have way too much traffic in the repo to > have git cherry to produce any kind of reasonable output (too many changes, > can't restrict to a subset of the tree, no way to check prior commits to > files affected, etc), and the git cherry-pick command relies a bit too much > on the merge magic, so it doesn't record merges (there is no merge-info in > git). > > However, I could dust off the tool and fix up the rough edges if there's > any interest at all. Kyle Evans used it to MFC my crazy src/stand stuff... > > I use this script to merge / cherry-pick changes from master: https://github.com/opntr/opBSD-ng-tools/blob/master/git/opBSD_mfc.sh > Warner > _______________________________________________ > svn-src-stable-11@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11 > To unsubscribe, send any mail to " > svn-src-stable-11-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Thu Mar 15 17:25:49 2018 Return-Path: Delivered-To: svn-src-all@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 70304313 for ; Thu, 15 Mar 2018 17:25:49 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF7616CFD0 for ; Thu, 15 Mar 2018 17:25:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22a.google.com with SMTP id e30so9498521ioc.3 for ; Thu, 15 Mar 2018 10:25:48 -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=ezllr7eDiRUizNMTgjavroMASuo7yOtes/hxla0Sh7c=; b=dyTDfeSZ8uPTxRI//GN3qDij5aN1diUbXdmehOGIYl+39zLY8U7pWnDbT3nBpXOFMj kPB/uTyJun3hGxHx/t2mo2VUUIMeqgtg8jJasvircRa+ZN7IF94r7bbpCwk/3mnGextb yayndZRtEtQ4rpu2kUnnQcL/5WxJz7m1PioOtfumvS+ZKOhRtT0oDX5qx9P4flD3vUO3 jfZM2ykwkr7DT6+E6UaW1F6uG/wUc9seAwj5YkhLetyjQmraFeXr/eK+Y1EwYzTX+Tsr T8iMGRVAC+hDC1GbJ1TOiTNKorCEJAMTQFx1dhrI7LvxJz6mFJXMjKFeC6dmF27non2h p6xQ== 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=ezllr7eDiRUizNMTgjavroMASuo7yOtes/hxla0Sh7c=; b=XvMMvuKyvxtl99UiwDmcQHNeyYONtyDTGrj+70gptKfmxK/DbFWwJf0ATeyI6OxQ8u 7IeK9ZnB5lMXS8QCjVeGc7fZf0WjF3PztzPMVsNhvMH7+ap/5akIplte4va6LFFXSlXa OCT1f9sKBrTulqJxY5gOglHWdsj4cXUFbU+MPdYL+P9V3dJmuYLfiyAFHis7oQE27xHV liS/rmbjKK/Rku8HXE6EPav2KdxLpvEN65DCUN9Go27NJscpxtI4pp97DM0tjOoLHHlD HXmVdvKOZnMkLiMW96AOURj8tCAg9S+Cndr3WzNm74KoPgMsIy6aiKsk2s6kthdMWihS 0YhA== X-Gm-Message-State: AElRT7FdMGH5aqaZJHkrdTJzIqp1NtQzBP+Wry/EqMP3Y7W1ZfGvn6Ws FzsqCO3pg4F5eYqNlt+kTyBZfItI/AjdltjTju8F9A== X-Google-Smtp-Source: AG47ELsyopP9E/nCFlhXl7ZrZg/77kUCQSom+4372/3BabOiJkmRZz7fa8ynmcZQt65x2sOxHmVIQDM5A4i7upnIoyk= X-Received: by 10.107.142.79 with SMTP id q76mr9729167iod.299.1521134748195; Thu, 15 Mar 2018 10:25:48 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Thu, 15 Mar 2018 10:25:47 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <201803151723.w2FHNJ5a094121@pdx.rh.CN85.dnsmgr.net> References: <201803151723.w2FHNJ5a094121@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Thu, 15 Mar 2018 11:25:47 -0600 X-Google-Sender-Auth: 7rUPyhDgdhxV6UwbdoDE9FWSxD0 Message-ID: Subject: Re: svn commit: r330972 - stable/11/share/misc To: "Rodney W. Grimes" Cc: Ian Lepore , Justin Hibbits , Andriy Gapon , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 17:25:49 -0000 On Thu, Mar 15, 2018 at 11:23 AM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > On Thu, Mar 15, 2018 at 10:31 AM, Warner Losh wrote: > > > > > > > > > > > On Thu, Mar 15, 2018 at 10:20 AM, Ian Lepore wrote: > > > > > >> On Thu, 2018-03-15 at 09:14 -0700, Rodney W. Grimes wrote: > > >> > > > > >> > > On Thu, 2018-03-15 at 10:52 -0500, Justin Hibbits wrote: > > >> > > > > > >> > > > On Thu, Mar 15, 2018 at 10:46 AM, Ian Lepore > > >> > > > wrote: > > >> > > > > > > >> > > > > > > >> > > > > I agree completely with all of this.??It bothers me how many > > >> > > > > committers > > >> > > > > have the attitude that handling MFCs is not part of being a > > >> > > > > committer. > > >> > > > Never attribute to arrogance that which can adequately be > > >> > > > explained > > >> > > > by > > >> > > > sheer laziness ;) > > >> > > > > > >> > > > - Justin (guilty of marking changes as MFC after, and ignoring > > >> > > > them > > >> > > > for far too long) > > >> > > > > > >> > > Laziness and procrastination I understand -- I own a lovely glass > > >> > > house > > >> > > in that neighborhood. ?I tend to put off MFCs for way too long > then > > >> > > every few months have to spend a whole weekend catching up. > > >> > MFC: 1 week (by pool|self) #defaults to self if missing > > >> > > > >> > There is already a very nice tracking tool for outstanding MFC's, > > >> > if we added a bit of smarts in its parser, and created a pool of > > >> > MFC commiters (Eitan seems to have started one :-)) those who > > >> > do not want to do there own MFC work could pass the hat. > > >> > > >> If you're talking about the MFC after: field in commits, I don't use > > >> it. I have about zero tolerance for being nagged by anybody about > > >> anything, and that goes double for robots nagging me with spam mail. > > >> > > >> The MFC tool that works well for me is gonzo's MFCTracker site [*] > that > > >> doesn't require extra markup in the commit messages. > > >> > > > > > > I also have a MFC tool for git, but it's n > > > > > > > [[ stupid track pad and too easy button pushes... ]] > > I close my lid and lay a standard 104 keyboard on top, and a nice > mouse beside and just ignore the bad HID that is a laptop. > > > but it's not ready for prime time. It's useful if you have a list of > things > > you want to MFC for playing them onto the stable branch so you can test > > before committing to svn stable. It shows the big issues with moving to > git > > as the source of truth, though. We have way too much traffic in the repo > to > > have git cherry to produce any kind of reasonable output (too many > changes, > > can't restrict to a subset of the tree, no way to check prior commits to > > files affected, etc), and the git cherry-pick command relies a bit too > much > > on the merge magic, so it doesn't record merges (there is no merge-info > in > > git). > > > > However, I could dust off the tool and fix up the rough edges if there's > > any interest at all. Kyle Evans used it to MFC my crazy src/stand > stuff... > > This tool might be interesting for use when things get complicted > like the stand code, or I think there was also a huge churn in > Adrians wifi code that it may be useful for, but it sounds like > it might be overkill for 90% of our needs. > > I shall ask, do you think it would be possible to re-implement > this tool around svn? > No. That makes no sense. Sorry. The whole point of doing it in git was so you could throw away all the failed attempts and use git's commit curation tools (eg git rebase -i) to preen whatever you're going to eventually commit. At most, it might make sense to create a script that would do the MFC as a patch + git merge --record-only. Warner From owner-svn-src-all@freebsd.org Thu Mar 15 17:36:14 2018 Return-Path: Delivered-To: svn-src-all@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 7D640FC8; Thu, 15 Mar 2018 17:36:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 309F96D764; Thu, 15 Mar 2018 17:36:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 26D4D190F4; Thu, 15 Mar 2018 17:36:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FHaDnW007603; Thu, 15 Mar 2018 17:36:13 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FHaDtL007601; Thu, 15 Mar 2018 17:36:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201803151736.w2FHaDtL007601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 15 Mar 2018 17:36:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331013 - head/sys/cam/ctl X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/cam/ctl X-SVN-Commit-Revision: 331013 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 17:36:14 -0000 Author: trasz Date: Thu Mar 15 17:36:13 2018 New Revision: 331013 URL: https://svnweb.freebsd.org/changeset/base/331013 Log: Fix iSCSI target crash on session reinstation. The crash scenario goes like this: there's a thread waiting on "reinstate"; because it doesn't update the timeout counter it gets terminated by the callout; at this point the maintenance thread starts the termination routine. The first thread finishes waiting, proceeds to icl_conn_handoff(), and drops the refcount, which allows the maintenance thread to free its resources. At this point another thread receives a PDU. Boom. PR: 222898, 219866 Reported by: Eugene M. Zheganin Tested by: Eugene M. Zheganin Reviewed by: mav@ (earlier version) MFC after: 2 weeks Sponsored by: playkey.net Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_frontend_iscsi.h Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Thu Mar 15 17:15:40 2018 (r331012) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Thu Mar 15 17:36:13 2018 (r331013) @@ -1164,11 +1164,11 @@ cfiscsi_maintenance_thread(void *arg) for (;;) { CFISCSI_SESSION_LOCK(cs); - if (cs->cs_terminating == false) + if (cs->cs_terminating == false || cs->cs_handoff_in_progress) cv_wait(&cs->cs_maintenance_cv, &cs->cs_lock); CFISCSI_SESSION_UNLOCK(cs); - if (cs->cs_terminating) { + if (cs->cs_terminating && cs->cs_handoff_in_progress == false) { /* * We used to wait up to 30 seconds to deliver queued @@ -1196,8 +1196,6 @@ static void cfiscsi_session_terminate(struct cfiscsi_session *cs) { - if (cs->cs_terminating) - return; cs->cs_terminating = true; cv_signal(&cs->cs_maintenance_cv); #ifdef ICL_KERNEL_PROXY @@ -1268,6 +1266,13 @@ cfiscsi_session_new(struct cfiscsi_softc *softc, const cv_init(&cs->cs_login_cv, "cfiscsi_login"); #endif + /* + * The purpose of this is to avoid racing with session shutdown. + * Otherwise we could have the maintenance thread call icl_conn_close() + * before we call icl_conn_handoff(). + */ + cs->cs_handoff_in_progress = true; + cs->cs_conn = icl_new_conn(offload, false, "cfiscsi", &cs->cs_lock); if (cs->cs_conn == NULL) { free(cs, M_CFISCSI); @@ -1378,8 +1383,18 @@ cfiscsi_accept(struct socket *so, struct sockaddr *sa, icl_conn_handoff_sock(cs->cs_conn, so); cs->cs_initiator_sa = sa; cs->cs_portal_id = portal_id; + cs->cs_handoff_in_progress = false; cs->cs_waiting_for_ctld = true; cv_signal(&cfiscsi_softc.accept_cv); + + CFISCSI_SESSION_LOCK(cs); + /* + * Wake up the maintenance thread if we got scheduled for termination + * somewhere between cfiscsi_session_new() and icl_conn_handoff_sock(). + */ + if (cs->cs_terminating) + cfiscsi_session_terminate(cs); + CFISCSI_SESSION_UNLOCK(cs); } #endif @@ -1559,6 +1574,7 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi *ci) mtx_lock(&softc->lock); if (ct->ct_online == 0) { mtx_unlock(&softc->lock); + cs->cs_handoff_in_progress = false; cfiscsi_session_terminate(cs); cfiscsi_target_release(ct); ci->status = CTL_ISCSI_ERROR; @@ -1569,7 +1585,6 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi *ci) cs->cs_target = ct; mtx_unlock(&softc->lock); - refcount_acquire(&cs->cs_outstanding_ctl_pdus); restart: if (!cs->cs_terminating) { mtx_lock(&softc->lock); @@ -1606,8 +1621,8 @@ restart: #endif error = icl_conn_handoff(cs->cs_conn, cihp->socket); if (error != 0) { + cs->cs_handoff_in_progress = false; cfiscsi_session_terminate(cs); - refcount_release(&cs->cs_outstanding_ctl_pdus); ci->status = CTL_ISCSI_ERROR; snprintf(ci->error_str, sizeof(ci->error_str), "%s: icl_conn_handoff failed with error %d", @@ -1632,7 +1647,16 @@ restart: } #endif - refcount_release(&cs->cs_outstanding_ctl_pdus); + CFISCSI_SESSION_LOCK(cs); + cs->cs_handoff_in_progress = false; + + /* + * Wake up the maintenance thread if we got scheduled for termination. + */ + if (cs->cs_terminating) + cfiscsi_session_terminate(cs); + CFISCSI_SESSION_UNLOCK(cs); + ci->status = CTL_ISCSI_OK; } Modified: head/sys/cam/ctl/ctl_frontend_iscsi.h ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.h Thu Mar 15 17:15:40 2018 (r331012) +++ head/sys/cam/ctl/ctl_frontend_iscsi.h Thu Mar 15 17:36:13 2018 (r331013) @@ -85,6 +85,7 @@ struct cfiscsi_session { int cs_timeout; struct cv cs_maintenance_cv; bool cs_terminating; + bool cs_handoff_in_progress; bool cs_tasks_aborted; int cs_max_recv_data_segment_length; int cs_max_send_data_segment_length; From owner-svn-src-all@freebsd.org Thu Mar 15 17:36:28 2018 Return-Path: Delivered-To: svn-src-all@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 3AACF6025; Thu, 15 Mar 2018 17:36:28 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6155D6D861; Thu, 15 Mar 2018 17:36:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with ESMTPA id wWnYeZK8QXziTwWnZei9HL; Thu, 15 Mar 2018 11:36:19 -0600 X-Authority-Analysis: v=2.3 cv=X6B81lbe c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=v2DPQv5-lfwA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=bv4Z-FHaAAAA:8 a=qQeljrTBNnxzgZAFw7cA:9 a=xIPd13a_dRHXZBvS:21 a=jPbXoLXlZ7r4KP9S:21 a=wPNLvfGTeEIA:10 a=1V1iMJZxNW4oD5Zb:21 a=rFk3XwGbeTd1j9CN:21 a=WnoPvAod8PKmeGBM:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=1OByGr4bXvbdRoVEmkj7:22 Received: from [25.168.250.70] (S0106d4ca6d8943b0.gv.shawcable.net [70.66.132.207]) by spqr.komquats.com (Postfix) with ESMTPSA id DDF046F7; Thu, 15 Mar 2018 10:35:58 -0700 (PDT) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r330972 - stable/11/share/misc Date: Thu, 15 Mar 2018 10:36:05 -0700 To: Ian Lepore , "rgrimes@freebsd.org" CC: Justin Hibbits , Andriy Gapon , Eitan Adler , src-committers , "svn-src-all@freebsd.org" , "svn-src-stable@freebsd.org" , "svn-src-stable-11@freebsd.org" Message-Id: <20180315173558.DDF046F7@spqr.komquats.com> X-CMAE-Envelope: MS4wfCRJRAIt+J9yCQaGtO9qqtXyvhNEC1oQZfQBIsYjtB3kf8grRN9Fx/LtW0rbVldEkPKc/reNkg6/D0ayRk0TgQkuNeFngDNkqCvT2cbpmw4n3Lic25I8 +c8DWy/YX0gAhzH7KqZRkQ+dHTdRTicyt5FfuXHVW/+V+mnmwj9i/i9nQskrkpp1VdjXKxyjhQ1WvIzy0QVXa9f6lWF2vB7tWm91bHsqZY+fIxUJiv8lMjGZ CBw08wt5QNAP0HzI5C2YEnbRld8wnV3fzh8yS1B28oIvkbjlzHUw05dnA2V5NbC6GkGEtq8cK0KdR7cxFVCIq78VlwTNVjZD0utLalsQG61vXL8G+vdeFSUa LsCPULSz22sGewwZSUd5PGW65as9LYUayfOqGUP+eV22c2IrK9hCNuInWmHH0CUl6QbGnrv3R65VrW4AnHFBuqZGhWfAtPg7oaeL6ZHCBQAjEla8sVmQAVVq igj5RERw8efbUkE9R1QUcueCUipfjMWmQiBOaQ== Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 17:36:28 -0000 I happen to like Max's MFC emails. To visit some website on occasion to che= ck is a PITA. I've been through this many times at $JOB. Rather than receiv= e notifications in one place, my inbox, having to visit multiple websites t= o check work queues is pointless. I prefer receiving an interrupt rather th= an having to poll. Polling is inefficient use of my time. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. Also, this old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- -----Original Message----- From: Ian Lepore Sent: 15/03/2018 09:20 To: rgrimes@freebsd.org Cc: Justin Hibbits; Andriy Gapon; Eitan Adler; src-committers; svn-src-all@= freebsd.org; svn-src-stable@freebsd.org; svn-src-stable-11@freebsd.org Subject: Re: svn commit: r330972 - stable/11/share/misc On Thu, 2018-03-15 at 09:14 -0700, Rodney W. Grimes wrote: > >=20 > > On Thu, 2018-03-15 at 10:52 -0500, Justin Hibbits wrote: > > >=20 > > > On Thu, Mar 15, 2018 at 10:46 AM, Ian Lepore > > > wrote: > > > >=20 > > > >=20 > > > > I agree completely with all of this.??It bothers me how many > > > > committers > > > > have the attitude that handling MFCs is not part of being a > > > > committer. > > > Never attribute to arrogance that which can adequately be > > > explained > > > by > > > sheer laziness ;) > > >=20 > > > - Justin (guilty of marking changes as MFC after, and ignoring > > > them > > > for far too long) > > >=20 > > Laziness and procrastination I understand -- I own a lovely glass > > house > > in that neighborhood. ?I tend to put off MFCs for way too long then > > every few months have to spend a whole weekend catching up. > MFC: 1 week (by pool|self) #defaults to self if missing >=20 > There is already a very nice tracking tool for outstanding MFC's, > if we added a bit of smarts in its parser, and created a pool of > MFC commiters (Eitan seems to have started one :-)) those who > do not want to do there own MFC work could pass the hat. If you're talking about the MFC after: field in commits, I don't use it. I have about zero tolerance for being nagged by anybody about anything, and that goes double for robots nagging me with spam mail. The MFC tool that works well for me is gonzo's MFCTracker site [*] that doesn't require extra markup in the commit messages. [*]=A0https://mfc.kernelnomicon.org/6/ -- Ian From owner-svn-src-all@freebsd.org Thu Mar 15 18:12:56 2018 Return-Path: Delivered-To: svn-src-all@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 89D96F3FA01; Thu, 15 Mar 2018 18:12:56 +0000 (UTC) (envelope-from brooks@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 37F1C7006C; Thu, 15 Mar 2018 18:12:56 +0000 (UTC) (envelope-from brooks@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 32BC51972E; Thu, 15 Mar 2018 18:12:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FICuSX029192; Thu, 15 Mar 2018 18:12:56 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FICuYG029191; Thu, 15 Mar 2018 18:12:56 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803151812.w2FICuYG029191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 15 Mar 2018 18:12:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331014 - head/sys/dev/md X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/dev/md X-SVN-Commit-Revision: 331014 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 18:12:57 -0000 Author: brooks Date: Thu Mar 15 18:12:55 2018 New Revision: 331014 URL: https://svnweb.freebsd.org/changeset/base/331014 Log: Move implementation of ioctls into kern_*() functions. Move locks from outside ioctl to the individual implementations. This is the first step of changing the implementations to act on a kernel-internal request struct rather than on struct md_ioctl and to removing the use of kern_ioctl in mountroot. Reviewed by: cem, kib, markj (prior version) Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14700 Modified: head/sys/dev/md/md.c Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Thu Mar 15 17:36:13 2018 (r331013) +++ head/sys/dev/md/md.c Thu Mar 15 18:12:55 2018 (r331014) @@ -1607,13 +1607,253 @@ mdcreate_null(struct md_s *sc, struct md_ioctl *mdio, } static int -xmdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) +kern_mdattach_locked(struct thread *td, struct md_ioctl *mdio) { - struct md_ioctl *mdio; struct md_s *sc; - int error, i; unsigned sectsize; + int error, i; + sx_assert(&md_sx, SA_XLOCKED); + + switch (mdio->md_type) { + case MD_MALLOC: + case MD_PRELOAD: + case MD_VNODE: + case MD_SWAP: + case MD_NULL: + break; + default: + return (EINVAL); + } + if (mdio->md_sectorsize == 0) + sectsize = DEV_BSIZE; + else + sectsize = mdio->md_sectorsize; + if (sectsize > MAXPHYS || mdio->md_mediasize < sectsize) + return (EINVAL); + if (mdio->md_options & MD_AUTOUNIT) + sc = mdnew(-1, &error, mdio->md_type); + else { + if (mdio->md_unit > INT_MAX) + return (EINVAL); + sc = mdnew(mdio->md_unit, &error, mdio->md_type); + } + if (sc == NULL) + return (error); + if (mdio->md_label != NULL) + error = copyinstr(mdio->md_label, sc->label, + sizeof(sc->label), NULL); + if (error != 0) + goto err_after_new; + if (mdio->md_options & MD_AUTOUNIT) + mdio->md_unit = sc->unit; + sc->mediasize = mdio->md_mediasize; + sc->sectorsize = sectsize; + error = EDOOFUS; + switch (sc->type) { + case MD_MALLOC: + sc->start = mdstart_malloc; + error = mdcreate_malloc(sc, mdio); + break; + case MD_PRELOAD: + /* + * We disallow attaching preloaded memory disks via + * ioctl. Preloaded memory disks are automatically + * attached in g_md_init(). + */ + error = EOPNOTSUPP; + break; + case MD_VNODE: + sc->start = mdstart_vnode; + error = mdcreate_vnode(sc, mdio, td); + break; + case MD_SWAP: + sc->start = mdstart_swap; + error = mdcreate_swap(sc, mdio, td); + break; + case MD_NULL: + sc->start = mdstart_null; + error = mdcreate_null(sc, mdio, td); + break; + } +err_after_new: + if (error != 0) { + mddestroy(sc, td); + return (error); + } + + /* Prune off any residual fractional sector */ + i = sc->mediasize % sc->sectorsize; + sc->mediasize -= i; + + mdinit(sc); + return (0); +} + +static int +kern_mdattach(struct thread *td, struct md_ioctl *mdio) +{ + int error; + + sx_xlock(&md_sx); + error = kern_mdattach_locked(td, mdio); + sx_xunlock(&md_sx); + return (error); +} + +static int +kern_mddetach_locked(struct thread *td, struct md_ioctl *mdio) +{ + struct md_s *sc; + + sx_assert(&md_sx, SA_XLOCKED); + + if (mdio->md_mediasize != 0 || + (mdio->md_options & ~MD_FORCE) != 0) + return (EINVAL); + + sc = mdfind(mdio->md_unit); + if (sc == NULL) + return (ENOENT); + if (sc->opencount != 0 && !(sc->flags & MD_FORCE) && + !(mdio->md_options & MD_FORCE)) + return (EBUSY); + return (mddestroy(sc, td)); +} + +static int +kern_mddetach(struct thread *td, struct md_ioctl *mdio) +{ + int error; + + sx_xlock(&md_sx); + error = kern_mddetach_locked(td, mdio); + sx_xunlock(&md_sx); + return (error); +} + +static int +kern_mdresize_locked(struct md_ioctl *mdio) +{ + struct md_s *sc; + + sx_assert(&md_sx, SA_XLOCKED); + + if ((mdio->md_options & ~(MD_FORCE | MD_RESERVE)) != 0) + return (EINVAL); + + sc = mdfind(mdio->md_unit); + if (sc == NULL) + return (ENOENT); + if (mdio->md_mediasize < sc->sectorsize) + return (EINVAL); + if (mdio->md_mediasize < sc->mediasize && + !(sc->flags & MD_FORCE) && + !(mdio->md_options & MD_FORCE)) + return (EBUSY); + return (mdresize(sc, mdio)); +} + +static int +kern_mdresize(struct md_ioctl *mdio) +{ + int error; + + sx_xlock(&md_sx); + error = kern_mdresize_locked(mdio); + sx_xunlock(&md_sx); + return (error); +} + +static int +kern_mdquery_locked(struct md_ioctl *mdio) +{ + struct md_s *sc; + int error; + + sx_assert(&md_sx, SA_XLOCKED); + + sc = mdfind(mdio->md_unit); + if (sc == NULL) + return (ENOENT); + mdio->md_type = sc->type; + mdio->md_options = sc->flags; + mdio->md_mediasize = sc->mediasize; + mdio->md_sectorsize = sc->sectorsize; + error = 0; + if (mdio->md_label != NULL) { + error = copyout(sc->label, mdio->md_label, + strlen(sc->label) + 1); + if (error != 0) + return (error); + } + if (sc->type == MD_VNODE || + (sc->type == MD_PRELOAD && mdio->md_file != NULL)) + error = copyout(sc->file, mdio->md_file, + strlen(sc->file) + 1); + return (error); +} + +static int +kern_mdquery(struct md_ioctl *mdio) +{ + int error; + + sx_xlock(&md_sx); + error = kern_mdquery_locked(mdio); + sx_xunlock(&md_sx); + return (error); +} + +static int +kern_mdlist_locked(struct md_ioctl *mdio) +{ + struct md_s *sc; + int i; + + sx_assert(&md_sx, SA_XLOCKED); + + /* + * Write the number of md devices to mdio->md_pad[0]. + * Write the unit number of the first (MDNPAD - 2) units + * to mdio->md_pad[1::(MDNPAD - 2)] and terminate the + * list with -1. + * + * XXX: There is currently no mechanism to retrieve unit + * numbers for more than (MDNPAD - 2) units. + * + * XXX: Due to the use of LIST_INSERT_HEAD in mdnew(), the + * list of visible unit numbers not stable. + */ + i = 1; + LIST_FOREACH(sc, &md_softc_list, list) { + if (i < MDNPAD - 1) + mdio->md_pad[i] = sc->unit; + i++; + } + mdio->md_pad[MIN(i, MDNPAD - 1)] = -1; + mdio->md_pad[0] = i - 1; + return (0); +} + +static int +kern_mdlist(struct md_ioctl *mdio) +{ + int error; + + sx_xlock(&md_sx); + error = kern_mdlist_locked(mdio); + sx_xunlock(&md_sx); + return (error); +} + +static int +mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, + struct thread *td) +{ + struct md_ioctl *mdio; + int error; + if (md_debug) printf("mdctlioctl(%s %lx %p %x %p)\n", devtoname(dev), cmd, addr, flags, td); @@ -1632,158 +1872,24 @@ xmdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr error = 0; switch (cmd) { case MDIOCATTACH: - switch (mdio->md_type) { - case MD_MALLOC: - case MD_PRELOAD: - case MD_VNODE: - case MD_SWAP: - case MD_NULL: - break; - default: - return (EINVAL); - } - if (mdio->md_sectorsize == 0) - sectsize = DEV_BSIZE; - else - sectsize = mdio->md_sectorsize; - if (sectsize > MAXPHYS || mdio->md_mediasize < sectsize) - return (EINVAL); - if (mdio->md_options & MD_AUTOUNIT) - sc = mdnew(-1, &error, mdio->md_type); - else { - if (mdio->md_unit > INT_MAX) - return (EINVAL); - sc = mdnew(mdio->md_unit, &error, mdio->md_type); - } - if (sc == NULL) - return (error); - if (mdio->md_label != NULL) - error = copyinstr(mdio->md_label, sc->label, - sizeof(sc->label), NULL); - if (error != 0) - goto err_after_new; - if (mdio->md_options & MD_AUTOUNIT) - mdio->md_unit = sc->unit; - sc->mediasize = mdio->md_mediasize; - sc->sectorsize = sectsize; - error = EDOOFUS; - switch (sc->type) { - case MD_MALLOC: - sc->start = mdstart_malloc; - error = mdcreate_malloc(sc, mdio); - break; - case MD_PRELOAD: - /* - * We disallow attaching preloaded memory disks via - * ioctl. Preloaded memory disks are automatically - * attached in g_md_init(). - */ - error = EOPNOTSUPP; - break; - case MD_VNODE: - sc->start = mdstart_vnode; - error = mdcreate_vnode(sc, mdio, td); - break; - case MD_SWAP: - sc->start = mdstart_swap; - error = mdcreate_swap(sc, mdio, td); - break; - case MD_NULL: - sc->start = mdstart_null; - error = mdcreate_null(sc, mdio, td); - break; - } -err_after_new: - if (error != 0) { - mddestroy(sc, td); - return (error); - } - - /* Prune off any residual fractional sector */ - i = sc->mediasize % sc->sectorsize; - sc->mediasize -= i; - - mdinit(sc); - return (0); + error = kern_mdattach(td, mdio); + break; case MDIOCDETACH: - if (mdio->md_mediasize != 0 || - (mdio->md_options & ~MD_FORCE) != 0) - return (EINVAL); - - sc = mdfind(mdio->md_unit); - if (sc == NULL) - return (ENOENT); - if (sc->opencount != 0 && !(sc->flags & MD_FORCE) && - !(mdio->md_options & MD_FORCE)) - return (EBUSY); - return (mddestroy(sc, td)); + error = kern_mddetach(td, mdio); + break; case MDIOCRESIZE: - if ((mdio->md_options & ~(MD_FORCE | MD_RESERVE)) != 0) - return (EINVAL); - - sc = mdfind(mdio->md_unit); - if (sc == NULL) - return (ENOENT); - if (mdio->md_mediasize < sc->sectorsize) - return (EINVAL); - if (mdio->md_mediasize < sc->mediasize && - !(sc->flags & MD_FORCE) && - !(mdio->md_options & MD_FORCE)) - return (EBUSY); - return (mdresize(sc, mdio)); + error = kern_mdresize(mdio); + break; case MDIOCQUERY: - sc = mdfind(mdio->md_unit); - if (sc == NULL) - return (ENOENT); - mdio->md_type = sc->type; - mdio->md_options = sc->flags; - mdio->md_mediasize = sc->mediasize; - mdio->md_sectorsize = sc->sectorsize; - error = 0; - if (mdio->md_label != NULL) { - error = copyout(sc->label, mdio->md_label, - strlen(sc->label) + 1); - } - if (sc->type == MD_VNODE || - (sc->type == MD_PRELOAD && mdio->md_file != NULL)) - error = copyout(sc->file, mdio->md_file, - strlen(sc->file) + 1); - return (error); + error = kern_mdquery(mdio); + break; case MDIOCLIST: - /* - * Write the number of md devices to mdio->md_pad[0]. - * Write the unit number of the first (MDNPAD - 2) units - * to mdio->md_pad[1::(MDNPAD - 2)] and terminate the - * list with -1. - * - * XXX: There is currently no mechanism to retrieve unit - * numbers for more than (MDNPAD - 2) units. - * - * XXX: Due to the use of LIST_INSERT_HEAD in mdnew(), the - * list of visible unit numbers not stable. - */ - i = 1; - LIST_FOREACH(sc, &md_softc_list, list) { - if (i < MDNPAD - 1) - mdio->md_pad[i] = sc->unit; - i++; - } - mdio->md_pad[MIN(i, MDNPAD - 1)] = -1; - mdio->md_pad[0] = i - 1; - return (0); + error = kern_mdlist(mdio); + break; default: - return (ENOIOCTL); + error = ENOIOCTL; }; -} -static int -mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) -{ - int error; - - sx_xlock(&md_sx); - error = xmdctlioctl(dev, cmd, addr, flags, td); - sx_xunlock(&md_sx); return (error); } From owner-svn-src-all@freebsd.org Thu Mar 15 18:29:57 2018 Return-Path: Delivered-To: svn-src-all@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 4F8C6F41F76; Thu, 15 Mar 2018 18:29:57 +0000 (UTC) (envelope-from dab@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 EAF3670B7D; Thu, 15 Mar 2018 18:29:56 +0000 (UTC) (envelope-from dab@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 DEC3D198E1; Thu, 15 Mar 2018 18:29:56 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FITurc034740; Thu, 15 Mar 2018 18:29:56 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FITu8s034739; Thu, 15 Mar 2018 18:29:56 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201803151829.w2FITu8s034739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Thu, 15 Mar 2018 18:29:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331015 - head/etc/rc.d X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/etc/rc.d X-SVN-Commit-Revision: 331015 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 18:29:57 -0000 Author: dab Date: Thu Mar 15 18:29:56 2018 New Revision: 331015 URL: https://svnweb.freebsd.org/changeset/base/331015 Log: Modify rc.d/fsck to handle new status from fsck/fsck_ffs r328013 introduced a new error code from fsck_ffs that indicates that it could not completely fix the file system; this happens when it prints the message PLEASE RERUN FSCK. However, this status can happen when fsck is run in "preen" mode and the rc.d/fsck script does not handle that error code. Modify rc.d/fsck so that if "fsck -p" ("preen") returns the new status code (16) it will run "fsck -y", as it currently does for a status code of 8 (the "standard error exit"). Reported by: markj Reviewed by: mckusick, markj, ian, rgrimes MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D14679 Modified: head/etc/rc.d/fsck Modified: head/etc/rc.d/fsck ============================================================================== --- head/etc/rc.d/fsck Thu Mar 15 18:12:55 2018 (r331014) +++ head/etc/rc.d/fsck Thu Mar 15 18:29:56 2018 (r331015) @@ -57,7 +57,7 @@ fsck_start() echo "Reboot failed; help!" stop_boot ;; - 8) + 8|16) if checkyesno fsck_y_enable; then echo "File system preen failed, trying fsck -y ${fsck_y_flags}" fsck -y ${fsck_y_flags} From owner-svn-src-all@freebsd.org Thu Mar 15 18:46:59 2018 Return-Path: Delivered-To: svn-src-all@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 F10D0F46485; Thu, 15 Mar 2018 18:46:58 +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 73EF371739; Thu, 15 Mar 2018 18:46:57 +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 w2FIksEo094471; Thu, 15 Mar 2018 11:46:54 -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 w2FIkr5u094470; Thu, 15 Mar 2018 11:46:53 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803151846.w2FIkr5u094470@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r331015 - head/etc/rc.d In-Reply-To: <201803151829.w2FITu8s034739@repo.freebsd.org> To: David Bright Date: Thu, 15 Mar 2018 11:46:53 -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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 18:46:59 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: dab > Date: Thu Mar 15 18:29:56 2018 > New Revision: 331015 > URL: https://svnweb.freebsd.org/changeset/base/331015 > > Log: > Modify rc.d/fsck to handle new status from fsck/fsck_ffs > > r328013 introduced a new error code from fsck_ffs that indicates that > it could not completely fix the file system; this happens when it > prints the message PLEASE RERUN FSCK. However, this status can happen > when fsck is run in "preen" mode and the rc.d/fsck script does not > handle that error code. Modify rc.d/fsck so that if "fsck -p" > ("preen") returns the new status code (16) it will run "fsck -y", as > it currently does for a status code of 8 (the "standard error exit"). It will run "fsck -y" IFF fsck_y_enable is set to yes, otherwise it drops to single user as it does for error 8. > Reported by: markj > Reviewed by: mckusick, markj, ian, rgrimes > MFC after: 3 days > Sponsored by: Dell EMC > Differential Revision: https://reviews.freebsd.org/D14679 > > Modified: > head/etc/rc.d/fsck > > Modified: head/etc/rc.d/fsck > ============================================================================== > --- head/etc/rc.d/fsck Thu Mar 15 18:12:55 2018 (r331014) > +++ head/etc/rc.d/fsck Thu Mar 15 18:29:56 2018 (r331015) > @@ -57,7 +57,7 @@ fsck_start() > echo "Reboot failed; help!" > stop_boot > ;; > - 8) > + 8|16) > if checkyesno fsck_y_enable; then > echo "File system preen failed, trying fsck -y ${fsck_y_flags}" > fsck -y ${fsck_y_flags} > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Mar 15 19:03:54 2018 Return-Path: Delivered-To: svn-src-all@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 A7FD0F49BD1; Thu, 15 Mar 2018 19:03:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59537722D5; Thu, 15 Mar 2018 19:03:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5426319F1E; Thu, 15 Mar 2018 19:03:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FJ3sBF054405; Thu, 15 Mar 2018 19:03:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FJ3s6A054404; Thu, 15 Mar 2018 19:03:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201803151903.w2FJ3s6A054404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 15 Mar 2018 19:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331016 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 331016 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 19:03:54 -0000 Author: markj Date: Thu Mar 15 19:03:54 2018 New Revision: 331016 URL: https://svnweb.freebsd.org/changeset/base/331016 Log: Add a space between a section number and a following comma. Fix some nits from igor while here. MFC after: 3 days Modified: head/lib/libc/sys/sendfile.2 Modified: head/lib/libc/sys/sendfile.2 ============================================================================== --- head/lib/libc/sys/sendfile.2 Thu Mar 15 18:29:56 2018 (r331015) +++ head/lib/libc/sys/sendfile.2 Thu Mar 15 19:03:54 2018 (r331016) @@ -129,8 +129,8 @@ Starting with .Nm sending files off the .Xr ffs 7 -filesystem doesn't block on I/O -(see +filesystem does not block on I/O +(see .Sx IMPLEMENTATION NOTES ), so the condition no longer applies. However, it is safe if an application utilizes @@ -140,8 +140,8 @@ and on performs the same action as it did in older .Fx -versions, e.g. -.Xr aio_read 2, +versions, e.g., +.Xr aio_read 2 , .Xr read 2 or .Nm @@ -210,7 +210,7 @@ The .Fx implementation of .Fn sendfile -doesn't block on disk I/O when it sends a file off the +does not block on disk I/O when it sends a file off the .Xr ffs 7 filesystem. The syscall returns success before the actual I/O completes, and data From owner-svn-src-all@freebsd.org Thu Mar 15 17:23:27 2018 Return-Path: Delivered-To: svn-src-all@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 52C79F62FAB; Thu, 15 Mar 2018 17:23:27 +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 DBEAC6CD39; Thu, 15 Mar 2018 17:23:26 +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 w2FHNKIH094122; Thu, 15 Mar 2018 10:23:20 -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 w2FHNJ5a094121; Thu, 15 Mar 2018 10:23:19 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803151723.w2FHNJ5a094121@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330972 - stable/11/share/misc In-Reply-To: To: Warner Losh Date: Thu, 15 Mar 2018 10:23:19 -0700 (PDT) CC: Ian Lepore , "Rodney W. Grimes" , Justin Hibbits , Andriy Gapon , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-Mailman-Approved-At: Thu, 15 Mar 2018 19:05:01 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 17:23:27 -0000 > On Thu, Mar 15, 2018 at 10:31 AM, Warner Losh wrote: > > > > > > > On Thu, Mar 15, 2018 at 10:20 AM, Ian Lepore wrote: > > > >> On Thu, 2018-03-15 at 09:14 -0700, Rodney W. Grimes wrote: > >> > > > >> > > On Thu, 2018-03-15 at 10:52 -0500, Justin Hibbits wrote: > >> > > > > >> > > > On Thu, Mar 15, 2018 at 10:46 AM, Ian Lepore > >> > > > wrote: > >> > > > > > >> > > > > > >> > > > > I agree completely with all of this.??It bothers me how many > >> > > > > committers > >> > > > > have the attitude that handling MFCs is not part of being a > >> > > > > committer. > >> > > > Never attribute to arrogance that which can adequately be > >> > > > explained > >> > > > by > >> > > > sheer laziness ;) > >> > > > > >> > > > - Justin (guilty of marking changes as MFC after, and ignoring > >> > > > them > >> > > > for far too long) > >> > > > > >> > > Laziness and procrastination I understand -- I own a lovely glass > >> > > house > >> > > in that neighborhood. ?I tend to put off MFCs for way too long then > >> > > every few months have to spend a whole weekend catching up. > >> > MFC: 1 week (by pool|self) #defaults to self if missing > >> > > >> > There is already a very nice tracking tool for outstanding MFC's, > >> > if we added a bit of smarts in its parser, and created a pool of > >> > MFC commiters (Eitan seems to have started one :-)) those who > >> > do not want to do there own MFC work could pass the hat. > >> > >> If you're talking about the MFC after: field in commits, I don't use > >> it. I have about zero tolerance for being nagged by anybody about > >> anything, and that goes double for robots nagging me with spam mail. > >> > >> The MFC tool that works well for me is gonzo's MFCTracker site [*] that > >> doesn't require extra markup in the commit messages. > >> > > > > I also have a MFC tool for git, but it's n > > > > [[ stupid track pad and too easy button pushes... ]] I close my lid and lay a standard 104 keyboard on top, and a nice mouse beside and just ignore the bad HID that is a laptop. > but it's not ready for prime time. It's useful if you have a list of things > you want to MFC for playing them onto the stable branch so you can test > before committing to svn stable. It shows the big issues with moving to git > as the source of truth, though. We have way too much traffic in the repo to > have git cherry to produce any kind of reasonable output (too many changes, > can't restrict to a subset of the tree, no way to check prior commits to > files affected, etc), and the git cherry-pick command relies a bit too much > on the merge magic, so it doesn't record merges (there is no merge-info in > git). > > However, I could dust off the tool and fix up the rough edges if there's > any interest at all. Kyle Evans used it to MFC my crazy src/stand stuff... This tool might be interesting for use when things get complicted like the stand code, or I think there was also a huge churn in Adrians wifi code that it may be useful for, but it sounds like it might be overkill for 90% of our needs. I shall ask, do you think it would be possible to re-implement this tool around svn? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Mar 15 17:23:35 2018 Return-Path: Delivered-To: svn-src-all@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 739D92C for ; Thu, 15 Mar 2018 17:23:35 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 817396CE1F for ; Thu, 15 Mar 2018 17:23:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22f.google.com with SMTP id u5-v6so10133902itc.1 for ; Thu, 15 Mar 2018 10:23: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=CwV+qZjHw27uCHSzvj9+6K6a6eH6pjkAtY9bY+1MrpA=; b=P04QxGKtrJwuHS43j/mFpK+jBXZ4OTuMe7VBPqg95IBylTHzoKLMgOmZKCmcO2eNvh 7ACY2EzC7rEP/2lSoA1QErtD/VG+B9flnMxY8ZKBGabj1IpFK7P5hfTD/Bw15q2ySafa AQZ/viHH5p3ovtYt0rc3SAtyeseVwr0Ruh/laacc3mlAlzrZkkyMzAy3Yn2Tkcv9f7IF 4c+W9atJNniyA4xQieUIWEjfZ09l3jUXGeHcvjKghkIZbYma6utrWLPeWzxD292Vlrem UTkuQibd43ij4g5akFu84H9PvOoNiyIiZQQ70/QR3/G8UNIncj/wgzmWc6Bc5fWUub80 TUow== 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=CwV+qZjHw27uCHSzvj9+6K6a6eH6pjkAtY9bY+1MrpA=; b=aVNuSuyUYQXWDPgeDr48vC2QE3UiCBvIt/+7xsSoTSkEvGBL7iicfbksgzZINGX79s TXqclvfGCDGOHBDlfjsInQGpEjfzNBxyiYnqCs+tY/oN3jdRHKrrVv69oq1on2P4tH63 0kAsOeXG73m+z0ZZOMFcpeQz813pApNH2KtsJi+bVNKCHl2oz3WRiK70OKpXHqXLKODW ccwsv0pXn0stPdr3wKmh/NF7iYFEdJ6WBa/ffFmwNK6FwUGmmrYQpaxHW61D/K8UKt4S rD9lwADzgHSbDlRTYJGGXUy5Qliww1tBkRM86Ca/sSgYUVvAXEWWfFl6W+kpDX+kOXPL MM6w== X-Gm-Message-State: AElRT7F/+/hmX9+ufFpoYDVah84VZZrsSXuSPJ0hqkZqWQlBTFbgLsfA XYMzpGkuunz4rSPccvy3G5DftBkpBuqzceTcDjM+cA== X-Google-Smtp-Source: AG47ELsa74maVx/lFU5vLUa544SqfPNvPPyULhJfeEDzhWZfYs4dK/zzqIPp8ssCs4WvstzlUciQvGvwtCqDm955gQk= X-Received: by 10.36.66.134 with SMTP id i128mr2171393itb.73.1521134612742; Thu, 15 Mar 2018 10:23:32 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Thu, 15 Mar 2018 10:23:31 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201803151614.w2FGEttu093805@pdx.rh.CN85.dnsmgr.net> <1521130827.99081.43.camel@freebsd.org> From: Warner Losh Date: Thu, 15 Mar 2018 11:23:31 -0600 X-Google-Sender-Auth: btlF0CUDO6ZcKUhFhxgPRKcqHpU Message-ID: Subject: Re: svn commit: r330972 - stable/11/share/misc To: Oliver Pinter Cc: Ian Lepore , src-committers , Eitan Adler , Justin Hibbits , "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-stable-11@freebsd.org" , Andriy Gapon , "Rodney W. Grimes" X-Mailman-Approved-At: Thu, 15 Mar 2018 19:05:25 +0000 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 17:23:35 -0000 On Thu, Mar 15, 2018 at 11:07 AM, Oliver Pinter < oliver.pinter@hardenedbsd.org> wrote: > > > On Thursday, March 15, 2018, Warner Losh wrote: > >> On Thu, Mar 15, 2018 at 10:31 AM, Warner Losh wrote: >> >> > >> > >> > On Thu, Mar 15, 2018 at 10:20 AM, Ian Lepore wrote: >> > >> >> On Thu, 2018-03-15 at 09:14 -0700, Rodney W. Grimes wrote: >> >> > > >> >> > > On Thu, 2018-03-15 at 10:52 -0500, Justin Hibbits wrote: >> >> > > > >> >> > > > On Thu, Mar 15, 2018 at 10:46 AM, Ian Lepore >> >> > > > wrote: >> >> > > > > >> >> > > > > >> >> > > > > I agree completely with all of this.??It bothers me how many >> >> > > > > committers >> >> > > > > have the attitude that handling MFCs is not part of being a >> >> > > > > committer. >> >> > > > Never attribute to arrogance that which can adequately be >> >> > > > explained >> >> > > > by >> >> > > > sheer laziness ;) >> >> > > > >> >> > > > - Justin (guilty of marking changes as MFC after, and ignoring >> >> > > > them >> >> > > > for far too long) >> >> > > > >> >> > > Laziness and procrastination I understand -- I own a lovely glass >> >> > > house >> >> > > in that neighborhood. ?I tend to put off MFCs for way too long then >> >> > > every few months have to spend a whole weekend catching up. >> >> > MFC: 1 week (by pool|self) #defaults to self if missing >> >> > >> >> > There is already a very nice tracking tool for outstanding MFC's, >> >> > if we added a bit of smarts in its parser, and created a pool of >> >> > MFC commiters (Eitan seems to have started one :-)) those who >> >> > do not want to do there own MFC work could pass the hat. >> >> >> >> If you're talking about the MFC after: field in commits, I don't use >> >> it. I have about zero tolerance for being nagged by anybody about >> >> anything, and that goes double for robots nagging me with spam mail. >> >> >> >> The MFC tool that works well for me is gonzo's MFCTracker site [*] that >> >> doesn't require extra markup in the commit messages. >> >> >> > >> > I also have a MFC tool for git, but it's n >> > >> >> [[ stupid track pad and too easy button pushes... ]] >> >> but it's not ready for prime time. It's useful if you have a list of >> things >> you want to MFC for playing them onto the stable branch so you can test >> before committing to svn stable. It shows the big issues with moving to >> git >> as the source of truth, though. We have way too much traffic in the repo >> to >> have git cherry to produce any kind of reasonable output (too many >> changes, >> can't restrict to a subset of the tree, no way to check prior commits to >> files affected, etc), and the git cherry-pick command relies a bit too >> much >> on the merge magic, so it doesn't record merges (there is no merge-info in >> git). >> >> However, I could dust off the tool and fix up the rough edges if there's >> any interest at all. Kyle Evans used it to MFC my crazy src/stand stuff... >> >> > I use this script to merge / cherry-pick changes from master: > https://github.com/opntr/opBSD-ng-tools/blob/master/git/opBSD_mfc.sh > Nice. My own script is at https://people.freebsd.org/~imp/git-mfc though it could learn a thing or two from yours in some ways (mine is driven not by git has, but by svn #). Not, this is a quick-rehash of a script we use internally to cherry pick stuff to the Netflix oca firmware, so there's some stale comments in it that point to internal docs. I'll have to rework it with the git show trick. Warner From owner-svn-src-all@freebsd.org Thu Mar 15 19:08:37 2018 Return-Path: Delivered-To: svn-src-all@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 BBBFDF4A276; Thu, 15 Mar 2018 19:08:37 +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 64B5272667; Thu, 15 Mar 2018 19:08:37 +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 5F5FB19F25; Thu, 15 Mar 2018 19:08:37 +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 w2FJ8boe054647; Thu, 15 Mar 2018 19:08:37 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FJ8XWk054609; Thu, 15 Mar 2018 19:08:33 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803151908.w2FJ8XWk054609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 15 Mar 2018 19:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331017 - in stable/11/sys: amd64/amd64 arm/arm arm64/arm64 cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs dev/drm dev/drm2 fs/msdos... X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/sys: amd64/amd64 arm/arm arm64/arm64 cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs dev/drm dev/drm2 fs/msdosfs kern mips/include mips... X-SVN-Commit-Revision: 331017 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 19:08:38 -0000 Author: kevans Date: Thu Mar 15 19:08:33 2018 New Revision: 331017 URL: https://svnweb.freebsd.org/changeset/base/331017 Log: MFC r317055,r317056 (glebius): Include sys/vmmeter.h as included r317055: All these files need sys/vmmeter.h, but now they got it implicitly included via sys/pcpu.h. r317056: Typo! Modified: stable/11/sys/amd64/amd64/efirt.c stable/11/sys/amd64/amd64/minidump_machdep.c stable/11/sys/amd64/amd64/uma_machdep.c stable/11/sys/arm/arm/intr.c stable/11/sys/arm/arm/machdep.c stable/11/sys/arm/arm/trap-v4.c stable/11/sys/arm/arm/trap-v6.c stable/11/sys/arm/arm/undefined.c stable/11/sys/arm64/arm64/minidump_machdep.c stable/11/sys/arm64/arm64/uma_machdep.c stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c stable/11/sys/cddl/compat/opensolaris/sys/kmem.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/11/sys/dev/drm/drmP.h stable/11/sys/dev/drm2/drmP.h stable/11/sys/fs/msdosfs/msdosfs_denode.c stable/11/sys/fs/msdosfs/msdosfs_vnops.c stable/11/sys/kern/kern_mib.c stable/11/sys/kern/kern_thread.c stable/11/sys/kern/subr_intr.c stable/11/sys/kern/subr_syscall.c stable/11/sys/mips/include/intr_machdep.h stable/11/sys/mips/mips/minidump_machdep.c stable/11/sys/mips/mips/uma_machdep.c stable/11/sys/ofed/drivers/infiniband/core/umem.c stable/11/sys/powerpc/powerpc/uma_machdep.c stable/11/sys/sparc64/sparc64/intr_machdep.c stable/11/sys/sparc64/sparc64/machdep.c stable/11/sys/sparc64/sparc64/mem.c stable/11/sys/ufs/ffs/ffs_balloc.c stable/11/sys/ufs/ffs/ffs_vfsops.c stable/11/sys/vm/device_pager.c stable/11/sys/vm/memguard.c stable/11/sys/vm/sg_pager.c stable/11/sys/vm/vm_reserv.c stable/11/sys/x86/x86/intr_machdep.c stable/11/sys/x86/xen/xenpv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/efirt.c ============================================================================== --- stable/11/sys/amd64/amd64/efirt.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/amd64/amd64/efirt.c Thu Mar 15 19:08:33 2018 (r331017) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/11/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/minidump_machdep.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/amd64/amd64/minidump_machdep.c Thu Mar 15 19:08:33 2018 (r331017) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/11/sys/amd64/amd64/uma_machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/uma_machdep.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/amd64/amd64/uma_machdep.c Thu Mar 15 19:08:33 2018 (r331017) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/11/sys/arm/arm/intr.c ============================================================================== --- stable/11/sys/arm/arm/intr.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/arm/arm/intr.c Thu Mar 15 19:08:33 2018 (r331017) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/11/sys/arm/arm/machdep.c ============================================================================== --- stable/11/sys/arm/arm/machdep.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/arm/arm/machdep.c Thu Mar 15 19:08:33 2018 (r331017) @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/11/sys/arm/arm/trap-v4.c ============================================================================== --- stable/11/sys/arm/arm/trap-v4.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/arm/arm/trap-v4.c Thu Mar 15 19:08:33 2018 (r331017) @@ -87,6 +87,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/11/sys/arm/arm/trap-v6.c ============================================================================== --- stable/11/sys/arm/arm/trap-v6.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/arm/arm/trap-v6.c Thu Mar 15 19:08:33 2018 (r331017) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef KTRACE #include #include Modified: stable/11/sys/arm/arm/undefined.c ============================================================================== --- stable/11/sys/arm/arm/undefined.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/arm/arm/undefined.c Thu Mar 15 19:08:33 2018 (r331017) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef KDB #include #endif Modified: stable/11/sys/arm64/arm64/minidump_machdep.c ============================================================================== --- stable/11/sys/arm64/arm64/minidump_machdep.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/arm64/arm64/minidump_machdep.c Thu Mar 15 19:08:33 2018 (r331017) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/11/sys/arm64/arm64/uma_machdep.c ============================================================================== --- stable/11/sys/arm64/arm64/uma_machdep.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/arm64/arm64/uma_machdep.c Thu Mar 15 19:08:33 2018 (r331017) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c ============================================================================== --- stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Thu Mar 15 19:08:33 2018 (r331017) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/11/sys/cddl/compat/opensolaris/sys/kmem.h ============================================================================== --- stable/11/sys/cddl/compat/opensolaris/sys/kmem.h Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/cddl/compat/opensolaris/sys/kmem.h Thu Mar 15 19:08:33 2018 (r331017) @@ -33,6 +33,7 @@ #include #include #include +#include #include #include Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Mar 15 19:08:33 2018 (r331017) @@ -74,6 +74,7 @@ #include #include #include +#include #include #include Modified: stable/11/sys/dev/drm/drmP.h ============================================================================== --- stable/11/sys/dev/drm/drmP.h Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/dev/drm/drmP.h Thu Mar 15 19:08:33 2018 (r331017) @@ -65,6 +65,7 @@ struct drm_file; #include #include #include +#include #include #include #include Modified: stable/11/sys/dev/drm2/drmP.h ============================================================================== --- stable/11/sys/dev/drm2/drmP.h Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/dev/drm2/drmP.h Thu Mar 15 19:08:33 2018 (r331017) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/11/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- stable/11/sys/fs/msdosfs/msdosfs_denode.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/fs/msdosfs/msdosfs_denode.c Thu Mar 15 19:08:33 2018 (r331017) @@ -55,6 +55,7 @@ #include #include #include +#include #include #include Modified: stable/11/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- stable/11/sys/fs/msdosfs/msdosfs_vnops.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/fs/msdosfs/msdosfs_vnops.c Thu Mar 15 19:08:33 2018 (r331017) @@ -64,6 +64,7 @@ #include #include #include +#include #include #include Modified: stable/11/sys/kern/kern_mib.c ============================================================================== --- stable/11/sys/kern/kern_mib.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/kern/kern_mib.c Thu Mar 15 19:08:33 2018 (r331017) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/11/sys/kern/kern_thread.c ============================================================================== --- stable/11/sys/kern/kern_thread.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/kern/kern_thread.c Thu Mar 15 19:08:33 2018 (r331017) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef HWPMC_HOOKS #include Modified: stable/11/sys/kern/subr_intr.c ============================================================================== --- stable/11/sys/kern/subr_intr.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/kern/subr_intr.c Thu Mar 15 19:08:33 2018 (r331017) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef HWPMC_HOOKS #include #endif Modified: stable/11/sys/kern/subr_syscall.c ============================================================================== --- stable/11/sys/kern/subr_syscall.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/kern/subr_syscall.c Thu Mar 15 19:08:33 2018 (r331017) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #ifdef KTRACE #include #include Modified: stable/11/sys/mips/include/intr_machdep.h ============================================================================== --- stable/11/sys/mips/include/intr_machdep.h Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/mips/include/intr_machdep.h Thu Mar 15 19:08:33 2018 (r331017) @@ -31,6 +31,7 @@ #ifndef _MACHINE_INTR_MACHDEP_H_ #define _MACHINE_INTR_MACHDEP_H_ +#include #include #if defined(CPU_RMI) || defined(CPU_NLM) Modified: stable/11/sys/mips/mips/minidump_machdep.c ============================================================================== --- stable/11/sys/mips/mips/minidump_machdep.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/mips/mips/minidump_machdep.c Thu Mar 15 19:08:33 2018 (r331017) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/11/sys/mips/mips/uma_machdep.c ============================================================================== --- stable/11/sys/mips/mips/uma_machdep.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/mips/mips/uma_machdep.c Thu Mar 15 19:08:33 2018 (r331017) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/11/sys/ofed/drivers/infiniband/core/umem.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/umem.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/ofed/drivers/infiniband/core/umem.c Thu Mar 15 19:08:33 2018 (r331017) @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include "uverbs.h" Modified: stable/11/sys/powerpc/powerpc/uma_machdep.c ============================================================================== --- stable/11/sys/powerpc/powerpc/uma_machdep.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/powerpc/powerpc/uma_machdep.c Thu Mar 15 19:08:33 2018 (r331017) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/11/sys/sparc64/sparc64/intr_machdep.c ============================================================================== --- stable/11/sys/sparc64/sparc64/intr_machdep.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/sparc64/sparc64/intr_machdep.c Thu Mar 15 19:08:33 2018 (r331017) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/11/sys/sparc64/sparc64/machdep.c ============================================================================== --- stable/11/sys/sparc64/sparc64/machdep.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/sparc64/sparc64/machdep.c Thu Mar 15 19:08:33 2018 (r331017) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include Modified: stable/11/sys/sparc64/sparc64/mem.c ============================================================================== --- stable/11/sys/sparc64/sparc64/mem.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/sparc64/sparc64/mem.c Thu Mar 15 19:08:33 2018 (r331017) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/11/sys/ufs/ffs/ffs_balloc.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_balloc.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/ufs/ffs/ffs_balloc.c Thu Mar 15 19:08:33 2018 (r331017) @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/11/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_vfsops.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/ufs/ffs/ffs_vfsops.c Thu Mar 15 19:08:33 2018 (r331017) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include Modified: stable/11/sys/vm/device_pager.c ============================================================================== --- stable/11/sys/vm/device_pager.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/vm/device_pager.c Thu Mar 15 19:08:33 2018 (r331017) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/11/sys/vm/memguard.c ============================================================================== --- stable/11/sys/vm/memguard.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/vm/memguard.c Thu Mar 15 19:08:33 2018 (r331017) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/11/sys/vm/sg_pager.c ============================================================================== --- stable/11/sys/vm/sg_pager.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/vm/sg_pager.c Thu Mar 15 19:08:33 2018 (r331017) @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + #include #include #include Modified: stable/11/sys/vm/vm_reserv.c ============================================================================== --- stable/11/sys/vm/vm_reserv.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/vm/vm_reserv.c Thu Mar 15 19:08:33 2018 (r331017) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/11/sys/x86/x86/intr_machdep.c ============================================================================== --- stable/11/sys/x86/x86/intr_machdep.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/x86/x86/intr_machdep.c Thu Mar 15 19:08:33 2018 (r331017) @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include Modified: stable/11/sys/x86/xen/xenpv.c ============================================================================== --- stable/11/sys/x86/xen/xenpv.c Thu Mar 15 19:03:54 2018 (r331016) +++ stable/11/sys/x86/xen/xenpv.c Thu Mar 15 19:08:33 2018 (r331017) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-all@freebsd.org Thu Mar 15 19:23:08 2018 Return-Path: Delivered-To: svn-src-all@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 6B69DF4B667; Thu, 15 Mar 2018 19:23:08 +0000 (UTC) (envelope-from jeff@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 222557340D; Thu, 15 Mar 2018 19:23:08 +0000 (UTC) (envelope-from jeff@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 1CC831A21F; Thu, 15 Mar 2018 19:23:08 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FJN7TA064586; Thu, 15 Mar 2018 19:23:07 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FJN7G7064582; Thu, 15 Mar 2018 19:23:07 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201803151923.w2FJN7G7064582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Thu, 15 Mar 2018 19:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331018 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 331018 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 19:23:08 -0000 Author: jeff Date: Thu Mar 15 19:23:07 2018 New Revision: 331018 URL: https://svnweb.freebsd.org/changeset/base/331018 Log: Eliminate pageout wakeup races. Take another step towards lockless vmd_free_count manipulation. Reduce the scope of the free lock by using a pageout lock to synchronize sleep and wakeup. Only trigger the pageout daemon on transitions between states. Drive all wakeup operations directly as side-effects from freeing memory rather than requiring an additional function call. Reviewed by: markj, kib Tested by: pho Sponsored by: Netflix, Dell/EMC Isilon Differential Revision: https://reviews.freebsd.org/D14612 Modified: head/sys/vm/vm_page.c head/sys/vm/vm_pageout.c head/sys/vm/vm_pagequeue.h head/sys/vm/vm_reserv.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Mar 15 19:08:33 2018 (r331017) +++ head/sys/vm/vm_page.c Thu Mar 15 19:23:07 2018 (r331018) @@ -139,14 +139,15 @@ extern int vmem_startup_count(void); struct vm_domain vm_dom[MAXMEMDOM]; struct mtx_padalign __exclusive_cache_line pa_lock[PA_LOCK_COUNT]; + struct mtx_padalign __exclusive_cache_line vm_domainset_lock; +/* The following fields are protected by the domainset lock. */ domainset_t __exclusive_cache_line vm_min_domains; domainset_t __exclusive_cache_line vm_severe_domains; static int vm_min_waiters; static int vm_severe_waiters; static int vm_pageproc_waiters; - /* * bogus page -- for I/O to/from partially complete buffers, * or for paging into sparsely invalid regions. @@ -184,7 +185,6 @@ static void vm_page_insert_radixdone(vm_page_t m, vm_o vm_page_t mpred); static int vm_page_reclaim_run(int req_class, int domain, u_long npages, vm_page_t m_run, vm_paddr_t high); -static void vm_domain_free_wakeup(struct vm_domain *); static int vm_domain_alloc_fail(struct vm_domain *vmd, vm_object_t object, int req); @@ -430,6 +430,7 @@ vm_page_domain_init(int domain) MTX_DEF | MTX_DUPOK); } mtx_init(&vmd->vmd_free_mtx, "vm page free queue", NULL, MTX_DEF); + mtx_init(&vmd->vmd_pageout_mtx, "vm pageout lock", NULL, MTX_DEF); snprintf(vmd->vmd_name, sizeof(vmd->vmd_name), "%d", domain); } @@ -731,8 +732,8 @@ vm_page_startup(vm_offset_t vaddr) vmd = VM_DOMAIN(seg->domain); vm_domain_free_lock(vmd); vm_phys_free_contig(m, pagecount); - vm_domain_freecnt_adj(vmd, (int)pagecount); vm_domain_free_unlock(vmd); + vm_domain_freecnt_inc(vmd, pagecount); vm_cnt.v_page_count += (u_int)pagecount; vmd = VM_DOMAIN(seg->domain); @@ -1694,7 +1695,6 @@ vm_page_alloc_domain_after(vm_object_t object, vm_pind struct vm_domain *vmd; vm_page_t m; int flags; - u_int free_count; KASSERT((object != NULL) == ((req & VM_ALLOC_NOOBJ) == 0) && (object != NULL || (req & VM_ALLOC_SBUSY) == 0) && @@ -1747,6 +1747,9 @@ again: #endif } } + if (m != NULL) + vm_domain_freecnt_dec(vmd, 1); + vm_domain_free_unlock(vmd); if (m == NULL) { /* * Not allocatable, give up. @@ -1760,15 +1763,7 @@ again: * At this point we had better have found a good page. */ KASSERT(m != NULL, ("missing page")); - free_count = vm_domain_freecnt_adj(vmd, -1); - vm_domain_free_unlock(vmd); - /* - * Don't wakeup too often - wakeup the pageout daemon when - * we would be nearly out of memory. - */ - if (vm_paging_needed(vmd, free_count)) - pagedaemon_wakeup(vmd->vmd_domain); #if VM_NRESERVLEVEL > 0 found: #endif @@ -1804,7 +1799,6 @@ found: if (object != NULL) { if (vm_page_insert_after(m, object, pindex, mpred)) { - pagedaemon_wakeup(domain); if (req & VM_ALLOC_WIRED) { vm_wire_sub(1); m->wire_count = 0; @@ -1961,13 +1955,14 @@ retry: goto retry; #endif } + if (m_ret != NULL) + vm_domain_freecnt_dec(vmd, npages); + vm_domain_free_unlock(vmd); if (m_ret == NULL) { if (vm_domain_alloc_fail(vmd, object, req)) goto again; return (NULL); } - vm_domain_freecnt_adj(vmd, -npages); - vm_domain_free_unlock(vmd); #if VM_NRESERVLEVEL > 0 found: #endif @@ -2006,7 +2001,6 @@ found: m->oflags = oflags; if (object != NULL) { if (vm_page_insert_after(m, object, pindex, mpred)) { - pagedaemon_wakeup(domain); if ((req & VM_ALLOC_WIRED) != 0) vm_wire_sub(npages); KASSERT(m->object == NULL, @@ -2035,9 +2029,6 @@ found: pmap_page_set_memattr(m, memattr); pindex++; } - vmd = VM_DOMAIN(domain); - if (vm_paging_needed(vmd, vmd->vmd_free_count)) - pagedaemon_wakeup(domain); return (m_ret); } @@ -2100,7 +2091,7 @@ vm_page_alloc_freelist_domain(int domain, int freelist { struct vm_domain *vmd; vm_page_t m; - u_int flags, free_count; + u_int flags; /* * Do not allocate reserved pages unless the req has asked for it. @@ -2111,13 +2102,14 @@ again: if (vm_domain_available(vmd, req, 1)) m = vm_phys_alloc_freelist_pages(domain, freelist, VM_FREEPOOL_DIRECT, 0); + if (m != NULL) + vm_domain_freecnt_dec(vmd, 1); + vm_domain_free_unlock(vmd); if (m == NULL) { if (vm_domain_alloc_fail(vmd, NULL, req)) goto again; return (NULL); } - free_count = vm_domain_freecnt_adj(vmd, -1); - vm_domain_free_unlock(vmd); vm_page_alloc_check(m); /* @@ -2138,8 +2130,6 @@ again: } /* Unmanaged pages don't use "act_count". */ m->oflags = VPO_UNMANAGED; - if (vm_paging_needed(vmd, free_count)) - pagedaemon_wakeup(domain); return (m); } @@ -2539,15 +2529,19 @@ unlock: if (m_mtx != NULL) mtx_unlock(m_mtx); if ((m = SLIST_FIRST(&free)) != NULL) { + int cnt; + vmd = VM_DOMAIN(domain); + cnt = 0; vm_domain_free_lock(vmd); do { MPASS(vm_phys_domain(m) == domain); SLIST_REMOVE_HEAD(&free, plinks.s.ss); vm_page_free_phys(vmd, m); + cnt++; } while ((m = SLIST_FIRST(&free)) != NULL); - vm_domain_free_wakeup(vmd); vm_domain_free_unlock(vmd); + vm_domain_freecnt_inc(vmd, cnt); } return (error); } @@ -2710,7 +2704,7 @@ vm_domain_set(struct vm_domain *vmd) /* * Clear the domain from the appropriate page level domainset. */ -static void +void vm_domain_clear(struct vm_domain *vmd) { @@ -2731,6 +2725,22 @@ vm_domain_clear(struct vm_domain *vmd) wakeup(&vm_severe_domains); } } + + /* + * If pageout daemon needs pages, then tell it that there are + * some free. + */ + if (vmd->vmd_pageout_pages_needed && + vmd->vmd_free_count >= vmd->vmd_pageout_free_min) { + wakeup(&vmd->vmd_pageout_pages_needed); + vmd->vmd_pageout_pages_needed = 0; + } + + /* See comments in vm_wait_doms(). */ + if (vm_pageproc_waiters) { + vm_pageproc_waiters = 0; + wakeup(&vm_pageproc_waiters); + } mtx_unlock(&vm_domainset_lock); } @@ -2769,7 +2779,7 @@ u_int vm_wait_count(void) { - return (vm_severe_waiters + vm_min_waiters); + return (vm_severe_waiters + vm_min_waiters + vm_pageproc_waiters); } static void @@ -2787,9 +2797,8 @@ vm_wait_doms(const domainset_t *wdoms) if (curproc == pageproc) { mtx_lock(&vm_domainset_lock); vm_pageproc_waiters++; - msleep(&vm_pageproc_waiters, &vm_domainset_lock, PVM, + msleep(&vm_pageproc_waiters, &vm_domainset_lock, PVM | PDROP, "pageprocwait", 1); - mtx_unlock(&vm_domainset_lock); } else { /* * XXX Ideally we would wait only until the allocation could @@ -2819,14 +2828,17 @@ vm_wait_domain(int domain) domainset_t wdom; vmd = VM_DOMAIN(domain); - vm_domain_free_assert_locked(vmd); + vm_domain_free_assert_unlocked(vmd); if (curproc == pageproc) { - vmd->vmd_pageout_pages_needed = 1; - msleep(&vmd->vmd_pageout_pages_needed, - vm_domain_free_lockptr(vmd), PDROP | PSWP, "VMWait", 0); + mtx_lock(&vm_domainset_lock); + if (vmd->vmd_free_count < vmd->vmd_pageout_free_min) { + vmd->vmd_pageout_pages_needed = 1; + msleep(&vmd->vmd_pageout_pages_needed, + &vm_domainset_lock, PDROP | PSWP, "VMWait", 0); + } else + mtx_unlock(&vm_domainset_lock); } else { - vm_domain_free_unlock(vmd); if (pageproc == NULL) panic("vm_wait in early boot"); DOMAINSET_ZERO(&wdom); @@ -2876,7 +2888,7 @@ static int vm_domain_alloc_fail(struct vm_domain *vmd, vm_object_t object, int req) { - vm_domain_free_assert_locked(vmd); + vm_domain_free_assert_unlocked(vmd); atomic_add_int(&vmd->vmd_pageout_deficit, max((u_int)req >> VM_ALLOC_COUNT_SHIFT, 1)); @@ -2888,10 +2900,8 @@ vm_domain_alloc_fail(struct vm_domain *vmd, vm_object_ VM_OBJECT_WLOCK(object); if (req & VM_ALLOC_WAITOK) return (EAGAIN); - } else { - vm_domain_free_unlock(vmd); - pagedaemon_wakeup(vmd->vmd_domain); } + return (0); } @@ -3063,46 +3073,6 @@ vm_page_activate(vm_page_t m) } /* - * vm_domain_free_wakeup: - * - * Helper routine for vm_page_free_toq(). This routine is called - * when a page is added to the free queues. - * - * The page queues must be locked. - */ -static void -vm_domain_free_wakeup(struct vm_domain *vmd) -{ - - vm_domain_free_assert_locked(vmd); - - /* - * if pageout daemon needs pages, then tell it that there are - * some free. - */ - if (vmd->vmd_pageout_pages_needed && - vmd->vmd_free_count >= vmd->vmd_pageout_free_min) { - wakeup(&vmd->vmd_pageout_pages_needed); - vmd->vmd_pageout_pages_needed = 0; - } - /* - * wakeup processes that are waiting on memory if we hit a - * high water mark. And wakeup scheduler process if we have - * lots of memory. this process will swapin processes. - */ - if ((vmd->vmd_minset && !vm_paging_min(vmd)) || - (vmd->vmd_severeset && !vm_paging_severe(vmd))) - vm_domain_clear(vmd); - - /* See comments in vm_wait(); */ - if (vm_pageproc_waiters) { - vm_pageproc_waiters = 0; - wakeup(&vm_pageproc_waiters); - } - -} - -/* * vm_page_free_prep: * * Prepares the given page to be put on the free list, @@ -3183,7 +3153,8 @@ vm_page_free_prep(vm_page_t m, bool pagequeue_locked) /* * Insert the page into the physical memory allocator's free page - * queues. This is the last step to free a page. + * queues. This is the last step to free a page. The caller is + * responsible for adjusting the free page count. */ static void vm_page_free_phys(struct vm_domain *vmd, vm_page_t m) @@ -3191,7 +3162,6 @@ vm_page_free_phys(struct vm_domain *vmd, vm_page_t m) vm_domain_free_assert_locked(vmd); - vm_domain_freecnt_adj(vmd, 1); #if VM_NRESERVLEVEL > 0 if (!vm_reserv_free_page(m)) #endif @@ -3203,24 +3173,28 @@ vm_page_free_phys_pglist(struct pglist *tq) { struct vm_domain *vmd; vm_page_t m; + int cnt; if (TAILQ_EMPTY(tq)) return; vmd = NULL; + cnt = 0; TAILQ_FOREACH(m, tq, listq) { if (vmd != vm_pagequeue_domain(m)) { if (vmd != NULL) { - vm_domain_free_wakeup(vmd); vm_domain_free_unlock(vmd); + vm_domain_freecnt_inc(vmd, cnt); + cnt = 0; } vmd = vm_pagequeue_domain(m); vm_domain_free_lock(vmd); } vm_page_free_phys(vmd, m); + cnt++; } if (vmd != NULL) { - vm_domain_free_wakeup(vmd); vm_domain_free_unlock(vmd); + vm_domain_freecnt_inc(vmd, cnt); } } @@ -3243,8 +3217,8 @@ vm_page_free_toq(vm_page_t m) vmd = vm_pagequeue_domain(m); vm_domain_free_lock(vmd); vm_page_free_phys(vmd, m); - vm_domain_free_wakeup(vmd); vm_domain_free_unlock(vmd); + vm_domain_freecnt_inc(vmd, 1); } /* Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Thu Mar 15 19:08:33 2018 (r331017) +++ head/sys/vm/vm_pageout.c Thu Mar 15 19:23:07 2018 (r331018) @@ -1790,7 +1790,13 @@ vm_pageout_worker(void *arg) * The pageout daemon worker is never done, so loop forever. */ while (TRUE) { - vm_domain_free_lock(vmd); + vm_domain_pageout_lock(vmd); + /* + * We need to clear wanted before we check the limits. This + * prevents races with wakers who will check wanted after they + * reach the limit. + */ + atomic_store_int(&vmd->vmd_pageout_wanted, 0); /* * Might the page daemon need to run again? @@ -1801,7 +1807,7 @@ vm_pageout_worker(void *arg) * we have performed a level >= 1 (page reclamation) * scan, then sleep a bit and try again. */ - vm_domain_free_unlock(vmd); + vm_domain_pageout_unlock(vmd); if (pass > 1) pause("pwait", hz / VM_INACT_SCAN_RATE); } else { @@ -1809,12 +1815,18 @@ vm_pageout_worker(void *arg) * No, sleep until the next wakeup or until pages * need to have their reference stats updated. */ - vmd->vmd_pageout_wanted = false; if (mtx_sleep(&vmd->vmd_pageout_wanted, - vm_domain_free_lockptr(vmd), PDROP | PVM, + vm_domain_pageout_lockptr(vmd), PDROP | PVM, "psleep", hz / VM_INACT_SCAN_RATE) == 0) VM_CNT_INC(v_pdwakeups); } + /* Prevent spurious wakeups by ensuring that wanted is set. */ + atomic_store_int(&vmd->vmd_pageout_wanted, 1); + + /* + * Use the controller to calculate how many pages to free in + * this interval. + */ shortage = pidctrl_daemon(&vmd->vmd_pid, vmd->vmd_free_count); if (shortage && pass == 0) pass = 1; @@ -1970,10 +1982,14 @@ pagedaemon_wakeup(int domain) struct vm_domain *vmd; vmd = VM_DOMAIN(domain); - vm_domain_free_assert_unlocked(vmd); + vm_domain_pageout_assert_unlocked(vmd); + if (curproc == pageproc) + return; - if (!vmd->vmd_pageout_wanted && curthread->td_proc != pageproc) { - vmd->vmd_pageout_wanted = true; + if (atomic_fetchadd_int(&vmd->vmd_pageout_wanted, 1) == 0) { + vm_domain_pageout_lock(vmd); + atomic_store_int(&vmd->vmd_pageout_wanted, 1); wakeup(&vmd->vmd_pageout_wanted); + vm_domain_pageout_unlock(vmd); } } Modified: head/sys/vm/vm_pagequeue.h ============================================================================== --- head/sys/vm/vm_pagequeue.h Thu Mar 15 19:08:33 2018 (r331017) +++ head/sys/vm/vm_pagequeue.h Thu Mar 15 19:23:07 2018 (r331018) @@ -76,17 +76,31 @@ struct vm_pagequeue { #include struct sysctl_oid; +/* + * One vm_domain per-numa domain. Contains pagequeues, free page structures, + * and accounting. + * + * Lock Key: + * f vmd_free_mtx + * p vmd_pageout_mtx + * d vm_domainset_lock + * a atomic + * c const after boot +*/ struct vm_domain { struct vm_pagequeue vmd_pagequeues[PQ_COUNT]; struct mtx_padalign vmd_free_mtx; - struct vmem *vmd_kernel_arena; - u_int vmd_domain; /* Domain number. */ - u_int vmd_page_count; - long vmd_segs; /* bitmask of the segments */ + struct mtx_padalign vmd_pageout_mtx; + struct vmem *vmd_kernel_arena; /* (c) per-domain kva arena. */ + u_int vmd_domain; /* (c) Domain number. */ + u_int vmd_page_count; /* (c) Total page count. */ + long vmd_segs; /* (c) bitmask of the segments */ + u_int __aligned(CACHE_LINE_SIZE) vmd_free_count; /* (a,f) free page count */ + u_int vmd_pageout_deficit; /* (a) Estimated number of pages deficit */ + uint8_t vmd_pad[CACHE_LINE_SIZE - (sizeof(u_int) * 2)]; - /* Paging control variables, locked by domain_free_mtx. */ + /* Paging control variables, used within single threaded page daemon. */ struct pidctrl vmd_pid; /* Pageout controller. */ - u_int vmd_free_count; boolean_t vmd_oom; int vmd_oom_seq; int vmd_last_active_scan; @@ -94,11 +108,10 @@ struct vm_domain { struct vm_page vmd_marker; /* marker for pagedaemon private use */ struct vm_page vmd_inacthead; /* marker for LRU-defeating insertions */ - int vmd_pageout_pages_needed; /* page daemon waiting for pages? */ - int vmd_pageout_deficit; /* Estimated number of pages deficit */ - bool vmd_pageout_wanted; /* pageout daemon wait channel */ - bool vmd_minset; /* Are we in vm_min_domains? */ - bool vmd_severeset; /* Are we in vm_severe_domains? */ + int vmd_pageout_wanted; /* (a, p) pageout daemon wait channel */ + int vmd_pageout_pages_needed; /* (d) page daemon waiting for pages? */ + bool vmd_minset; /* (d) Are we in vm_min_domains? */ + bool vmd_severeset; /* (d) Are we in vm_severe_domains? */ int vmd_inactq_scans; enum { VM_LAUNDRY_IDLE = 0, @@ -142,6 +155,17 @@ extern struct vm_domain vm_dom[MAXMEMDOM]; #define vm_domain_free_unlock(d) \ mtx_unlock(vm_domain_free_lockptr((d))) +#define vm_domain_pageout_lockptr(d) \ + (&(d)->vmd_pageout_mtx) +#define vm_domain_pageout_assert_locked(n) \ + mtx_assert(vm_domain_pageout_lockptr((n)), MA_OWNED) +#define vm_domain_pageout_assert_unlocked(n) \ + mtx_assert(vm_domain_pageout_lockptr((n)), MA_NOTOWNED) +#define vm_domain_pageout_lock(d) \ + mtx_lock(vm_domain_pageout_lockptr((d))) +#define vm_domain_pageout_unlock(d) \ + mtx_unlock(vm_domain_pageout_lockptr((d))) + static __inline void vm_pagequeue_cnt_add(struct vm_pagequeue *pq, int addend) { @@ -155,6 +179,7 @@ vm_pagequeue_cnt_add(struct vm_pagequeue *pq, int adde #define vm_pagequeue_cnt_dec(pq) vm_pagequeue_cnt_add((pq), -1) void vm_domain_set(struct vm_domain *vmd); +void vm_domain_clear(struct vm_domain *vmd); int vm_domain_available(struct vm_domain *vmd, int req, int npages); /* @@ -221,18 +246,40 @@ vm_laundry_target(struct vm_domain *vmd) return (vm_paging_target(vmd)); } -static inline u_int -vm_domain_freecnt_adj(struct vm_domain *vmd, int adj) +void pagedaemon_wakeup(int domain); + +static inline void +vm_domain_freecnt_inc(struct vm_domain *vmd, int adj) { - u_int ret; + u_int old, new; - vm_domain_free_assert_locked(vmd); - ret = vmd->vmd_free_count += adj; - if ((!vmd->vmd_minset && vm_paging_min(vmd)) || - (!vmd->vmd_severeset && vm_paging_severe(vmd))) - vm_domain_set(vmd); + old = atomic_fetchadd_int(&vmd->vmd_free_count, adj); + new = old + adj; + /* + * Only update bitsets on transitions. Notice we short-circuit the + * rest of the checks if we're above min already. + */ + if (old < vmd->vmd_free_min && (new >= vmd->vmd_free_min || + (old < vmd->vmd_free_severe && new >= vmd->vmd_free_severe) || + (old < vmd->vmd_pageout_free_min && + new >= vmd->vmd_pageout_free_min))) + vm_domain_clear(vmd); +} - return (ret); +static inline void +vm_domain_freecnt_dec(struct vm_domain *vmd, int adj) +{ + u_int old, new; + + old = atomic_fetchadd_int(&vmd->vmd_free_count, -adj); + new = old - adj; + KASSERT(new >= 0, ("vm_domain_freecnt_dec: free count underflow")); + if (vm_paging_needed(vmd, new) && !vm_paging_needed(vmd, old)) + pagedaemon_wakeup(vmd->vmd_domain); + /* Only update bitsets on transitions. */ + if ((old >= vmd->vmd_free_min && new < vmd->vmd_free_min) || + (old >= vmd->vmd_free_severe && new < vmd->vmd_free_severe)) + vm_domain_set(vmd); } Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Thu Mar 15 19:08:33 2018 (r331017) +++ head/sys/vm/vm_reserv.c Thu Mar 15 19:23:07 2018 (r331018) @@ -593,7 +593,7 @@ vm_reserv_extend_contig(int req, vm_object_t object, v } for (i = 0; i < npages; i++) vm_reserv_populate(rv, index + i); - vm_domain_freecnt_adj(vmd, -npages); + vm_domain_freecnt_dec(vmd, npages); out: vm_domain_free_unlock(vmd); return (m); @@ -789,7 +789,7 @@ vm_reserv_extend(int req, vm_object_t object, vm_pinde struct vm_domain *vmd; vm_page_t m, msucc; vm_reserv_t rv; - int index, free_count; + int index; VM_OBJECT_ASSERT_WLOCKED(object); @@ -822,13 +822,9 @@ vm_reserv_extend(int req, vm_object_t object, vm_pinde m = NULL; if (m != NULL) { vm_reserv_populate(rv, index); - free_count = vm_domain_freecnt_adj(vmd, -1); - } else - free_count = vmd->vmd_free_count; + vm_domain_freecnt_dec(vmd, 1); + } vm_domain_free_unlock(vmd); - - if (vm_paging_needed(vmd, free_count)) - pagedaemon_wakeup(domain); return (m); } From owner-svn-src-all@freebsd.org Thu Mar 15 19:31:40 2018 Return-Path: Delivered-To: svn-src-all@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 B8B33F4C026; Thu, 15 Mar 2018 19:31: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 6A55F73A1E; Thu, 15 Mar 2018 19:31: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 64F581A37A; Thu, 15 Mar 2018 19:31: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 w2FJVed2068707; Thu, 15 Mar 2018 19:31:40 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FJVdW4068699; Thu, 15 Mar 2018 19:31:39 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803151931.w2FJVdW4068699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 15 Mar 2018 19:31:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331019 - in stable/11/sys: amd64/amd64 amd64/include conf dev/efidev modules/efirt sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/sys: amd64/amd64 amd64/include conf dev/efidev modules/efirt sys X-SVN-Commit-Revision: 331019 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 19:31:41 -0000 Author: kevans Date: Thu Mar 15 19:31:39 2018 New Revision: 331019 URL: https://svnweb.freebsd.org/changeset/base/331019 Log: MFC r322278,324177: EFIRT Improvements r322278 (imp): Fail to open efirt device when no EFI on system. libefivar expects opening /dev/efi to indicate if the we can make efi runtime calls. With a null routine, it was always succeeding leading efi_variables_supported() to return the wrong value. Only succeed if we have an efi_runtime table. Also, while I'm hear, out of an abundance of caution, add a likely redundant check to make sure efi_systbl is not NULL before dereferencing it. I know it can't be NULL if efi_cfgtbl is non-NULL, but the compiler doesn't. r324177 (andrew): To prepare for adding EFI runtime services support on arm64 move the machine independent parts of the existing code to a new file that can be shared between amd64 and arm64. Care has been taken to ensure that the MFC of r324177 did not clobber cherry-picked MFC's. Added: stable/11/sys/amd64/amd64/efirt_machdep.c (contents, props changed) - copied, changed from r324177, head/sys/amd64/amd64/efirt_machdep.c - copied unchanged from r324177, head/sys/dev/efidev/efirt.c Directory Properties: stable/11/sys/dev/efidev/efirt.c (props changed) Deleted: stable/11/sys/amd64/amd64/efirt.c Modified: stable/11/sys/amd64/include/efi.h stable/11/sys/conf/files stable/11/sys/conf/files.amd64 stable/11/sys/dev/efidev/efidev.c stable/11/sys/modules/efirt/Makefile stable/11/sys/sys/efi.h Directory Properties: stable/11/ (props changed) Copied and modified: stable/11/sys/amd64/amd64/efirt_machdep.c (from r324177, head/sys/amd64/amd64/efirt_machdep.c) ============================================================================== --- head/sys/amd64/amd64/efirt_machdep.c Sun Oct 1 19:52:47 2017 (r324177, copy source) +++ stable/11/sys/amd64/amd64/efirt_machdep.c Thu Mar 15 19:31:39 2018 (r331019) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); static pml4_entry_t *efi_pml4; static vm_object_t obj_1t1_pt; static vm_page_t efi_pml4_page; +static vm_pindex_t efi_1t1_idx; void efi_destroy_1t1_map(void) @@ -85,10 +86,10 @@ efi_destroy_1t1_map(void) } static vm_page_t -efi_1t1_page(vm_pindex_t idx) +efi_1t1_page(void) { - return (vm_page_grab(obj_1t1_pt, idx, VM_ALLOC_NOBUSY | + return (vm_page_grab(obj_1t1_pt, efi_1t1_idx++, VM_ALLOC_NOBUSY | VM_ALLOC_WIRED | VM_ALLOC_ZERO)); } @@ -106,7 +107,7 @@ efi_1t1_pte(vm_offset_t va) pml4_idx = pmap_pml4e_index(va); pml4e = &efi_pml4[pml4_idx]; if (*pml4e == 0) { - m = efi_1t1_page(1 + pml4_idx); + m = efi_1t1_page(); mphys = VM_PAGE_TO_PHYS(m); *pml4e = mphys | X86_PG_RW | X86_PG_V; } else { @@ -117,7 +118,7 @@ efi_1t1_pte(vm_offset_t va) pdp_idx = pmap_pdpe_index(va); pdpe += pdp_idx; if (*pdpe == 0) { - m = efi_1t1_page(1 + NPML4EPG + (pml4_idx + 1) * (pdp_idx + 1)); + m = efi_1t1_page(); mphys = VM_PAGE_TO_PHYS(m); *pdpe = mphys | X86_PG_RW | X86_PG_V; } else { @@ -128,8 +129,7 @@ efi_1t1_pte(vm_offset_t va) pd_idx = pmap_pde_index(va); pde += pd_idx; if (*pde == 0) { - m = efi_1t1_page(1 + NPML4EPG + NPML4EPG * NPDPEPG + - (pml4_idx + 1) * (pdp_idx + 1) * (pd_idx + 1)); + m = efi_1t1_page(); mphys = VM_PAGE_TO_PHYS(m); *pde = mphys | X86_PG_RW | X86_PG_V; } else { @@ -155,8 +155,9 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int obj_1t1_pt = vm_pager_allocate(OBJT_PHYS, NULL, ptoa(1 + NPML4EPG + NPML4EPG * NPDPEPG + NPML4EPG * NPDPEPG * NPDEPG), VM_PROT_ALL, 0, NULL); + efi_1t1_idx = 0; VM_OBJECT_WLOCK(obj_1t1_pt); - efi_pml4_page = efi_1t1_page(0); + efi_pml4_page = efi_1t1_page(); VM_OBJECT_WUNLOCK(obj_1t1_pt); efi_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(efi_pml4_page)); pmap_pinit_pml4(efi_pml4_page); Modified: stable/11/sys/amd64/include/efi.h ============================================================================== --- stable/11/sys/amd64/include/efi.h Thu Mar 15 19:23:07 2018 (r331018) +++ stable/11/sys/amd64/include/efi.h Thu Mar 15 19:31:39 2018 (r331019) @@ -32,6 +32,8 @@ #ifndef __AMD64_INCLUDE_EFI_H_ #define __AMD64_INCLUDE_EFI_H_ +#include + /* * XXX: from gcc 6.2 manual: * Note, the ms_abi attribute for Microsoft Windows 64-bit targets @@ -45,21 +47,8 @@ #define EFIABI_ATTR __attribute__((ms_abi)) #endif -#ifdef _KERNEL -struct uuid; -struct efi_tm; - -int efi_get_table(struct uuid *uuid, void **ptr); -int efi_get_time(struct efi_tm *tm); -int efi_get_time_locked(struct efi_tm *tm); -int efi_reset_system(void); -int efi_set_time(struct efi_tm *tm); -int efi_set_time_locked(struct efi_tm *tm); -int efi_var_get(uint16_t *name, struct uuid *vendor, uint32_t *attrib, - size_t *datasize, void *data); -int efi_var_nextname(size_t *namesize, uint16_t *name, struct uuid *vendor); -int efi_var_set(uint16_t *name, struct uuid *vendor, uint32_t attrib, - size_t datasize, void *data); -#endif +#define EFI_TIME_LOCK() mtx_lock(&atrtc_time_lock); +#define EFI_TIME_UNLOCK() mtx_unlock(&atrtc_time_lock); +#define EFI_TIME_OWNED() mtx_assert(&atrtc_time_lock, MA_OWNED); #endif /* __AMD64_INCLUDE_EFI_H_ */ Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Thu Mar 15 19:23:07 2018 (r331018) +++ stable/11/sys/conf/files Thu Mar 15 19:31:39 2018 (r331019) @@ -1584,6 +1584,7 @@ dev/ed/if_ed_rtl80x9.c optional ed dev/ed/if_ed_pccard.c optional ed pccard dev/ed/if_ed_pci.c optional ed pci dev/efidev/efidev.c optional efirt +dev/efidev/efirt.c optional efirt dev/eisa/eisa_if.m standard dev/eisa/eisaconf.c optional eisa dev/e1000/if_em.c optional em \ Modified: stable/11/sys/conf/files.amd64 ============================================================================== --- stable/11/sys/conf/files.amd64 Thu Mar 15 19:23:07 2018 (r331018) +++ stable/11/sys/conf/files.amd64 Thu Mar 15 19:31:39 2018 (r331019) @@ -133,7 +133,7 @@ amd64/amd64/cpu_switch.S standard amd64/amd64/db_disasm.c optional ddb amd64/amd64/db_interface.c optional ddb amd64/amd64/db_trace.c optional ddb -amd64/amd64/efirt.c optional efirt +amd64/amd64/efirt_machdep.c optional efirt amd64/amd64/elf_machdep.c standard amd64/amd64/exception.S standard amd64/amd64/fpu.c standard Modified: stable/11/sys/dev/efidev/efidev.c ============================================================================== --- stable/11/sys/dev/efidev/efidev.c Thu Mar 15 19:23:07 2018 (r331018) +++ stable/11/sys/dev/efidev/efidev.c Thu Mar 15 19:31:39 2018 (r331019) @@ -39,14 +39,27 @@ __FBSDID("$FreeBSD$"); #include #include +static d_open_t efidev_open; static d_ioctl_t efidev_ioctl; static struct cdevsw efi_cdevsw = { .d_name = "efi", .d_version = D_VERSION, + .d_open = efidev_open, .d_ioctl = efidev_ioctl, }; +static int +efidev_open(struct cdev *dev __unused, int oflags __unused, + int devtype __unused, struct thread *td __unused) +{ + /* + * Only return success when we have an actual runtime to call. + */ + + return efi_rt_ok(); +} + static int efidev_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr, int flags __unused, struct thread *td __unused) Copied: stable/11/sys/dev/efidev/efirt.c (from r324177, head/sys/dev/efidev/efirt.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/dev/efidev/efirt.c Thu Mar 15 19:31:39 2018 (r331019, copy of r324177, head/sys/dev/efidev/efirt.c) @@ -0,0 +1,388 @@ +/*- + * Copyright (c) 2004 Marcel Moolenaar + * Copyright (c) 2001 Doug Rabson + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +static struct efi_systbl *efi_systbl; +static struct efi_cfgtbl *efi_cfgtbl; +static struct efi_rt *efi_runtime; + +static int efi_status2err[25] = { + 0, /* EFI_SUCCESS */ + ENOEXEC, /* EFI_LOAD_ERROR */ + EINVAL, /* EFI_INVALID_PARAMETER */ + ENOSYS, /* EFI_UNSUPPORTED */ + EMSGSIZE, /* EFI_BAD_BUFFER_SIZE */ + EOVERFLOW, /* EFI_BUFFER_TOO_SMALL */ + EBUSY, /* EFI_NOT_READY */ + EIO, /* EFI_DEVICE_ERROR */ + EROFS, /* EFI_WRITE_PROTECTED */ + EAGAIN, /* EFI_OUT_OF_RESOURCES */ + EIO, /* EFI_VOLUME_CORRUPTED */ + ENOSPC, /* EFI_VOLUME_FULL */ + ENXIO, /* EFI_NO_MEDIA */ + ESTALE, /* EFI_MEDIA_CHANGED */ + ENOENT, /* EFI_NOT_FOUND */ + EACCES, /* EFI_ACCESS_DENIED */ + ETIMEDOUT, /* EFI_NO_RESPONSE */ + EADDRNOTAVAIL, /* EFI_NO_MAPPING */ + ETIMEDOUT, /* EFI_TIMEOUT */ + EDOOFUS, /* EFI_NOT_STARTED */ + EALREADY, /* EFI_ALREADY_STARTED */ + ECANCELED, /* EFI_ABORTED */ + EPROTO, /* EFI_ICMP_ERROR */ + EPROTO, /* EFI_TFTP_ERROR */ + EPROTO /* EFI_PROTOCOL_ERROR */ +}; + +static int +efi_status_to_errno(efi_status status) +{ + u_long code; + + code = status & 0x3ffffffffffffffful; + return (code < nitems(efi_status2err) ? efi_status2err[code] : EDOOFUS); +} + +static struct mtx efi_lock; + +static int +efi_init(void) +{ + struct efi_map_header *efihdr; + struct efi_md *map; + caddr_t kmdp; + size_t efisz; + + mtx_init(&efi_lock, "efi", NULL, MTX_DEF); + + if (efi_systbl_phys == 0) { + if (bootverbose) + printf("EFI systbl not available\n"); + return (0); + } + efi_systbl = (struct efi_systbl *)PHYS_TO_DMAP(efi_systbl_phys); + if (efi_systbl->st_hdr.th_sig != EFI_SYSTBL_SIG) { + efi_systbl = NULL; + if (bootverbose) + printf("EFI systbl signature invalid\n"); + return (0); + } + efi_cfgtbl = (efi_systbl->st_cfgtbl == 0) ? NULL : + (struct efi_cfgtbl *)efi_systbl->st_cfgtbl; + if (efi_cfgtbl == NULL) { + if (bootverbose) + printf("EFI config table is not present\n"); + } + + kmdp = preload_search_by_type("elf kernel"); + if (kmdp == NULL) + kmdp = preload_search_by_type("elf64 kernel"); + efihdr = (struct efi_map_header *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_EFI_MAP); + if (efihdr == NULL) { + if (bootverbose) + printf("EFI map is not present\n"); + return (0); + } + efisz = (sizeof(struct efi_map_header) + 0xf) & ~0xf; + map = (struct efi_md *)((uint8_t *)efihdr + efisz); + if (efihdr->descriptor_size == 0) + return (ENOMEM); + + if (!efi_create_1t1_map(map, efihdr->memory_size / + efihdr->descriptor_size, efihdr->descriptor_size)) { + if (bootverbose) + printf("EFI cannot create runtime map\n"); + return (ENOMEM); + } + + efi_runtime = (efi_systbl->st_rt == 0) ? NULL : + (struct efi_rt *)efi_systbl->st_rt; + if (efi_runtime == NULL) { + if (bootverbose) + printf("EFI runtime services table is not present\n"); + efi_destroy_1t1_map(); + return (ENXIO); + } + + return (0); +} + +static void +efi_uninit(void) +{ + + efi_destroy_1t1_map(); + + efi_systbl = NULL; + efi_cfgtbl = NULL; + efi_runtime = NULL; + + mtx_destroy(&efi_lock); +} + +int +efi_rt_ok(void) +{ + + if (efi_runtime == NULL) + return (ENXIO); + return (0); +} + +static int +efi_enter(void) +{ + struct thread *td; + pmap_t curpmap; + int error; + + if (efi_runtime == NULL) + return (ENXIO); + td = curthread; + curpmap = &td->td_proc->p_vmspace->vm_pmap; + PMAP_LOCK(curpmap); + mtx_lock(&efi_lock); + error = fpu_kern_enter(td, NULL, FPU_KERN_NOCTX); + if (error != 0) { + PMAP_UNLOCK(curpmap); + return (error); + } + + return (efi_arch_enter()); +} + +static void +efi_leave(void) +{ + struct thread *td; + pmap_t curpmap; + + efi_arch_leave(); + + curpmap = &curproc->p_vmspace->vm_pmap; + td = curthread; + fpu_kern_leave(td, NULL); + mtx_unlock(&efi_lock); + PMAP_UNLOCK(curpmap); +} + +int +efi_get_table(struct uuid *uuid, void **ptr) +{ + struct efi_cfgtbl *ct; + u_long count; + + if (efi_cfgtbl == NULL || efi_systbl == NULL) + return (ENXIO); + count = efi_systbl->st_entries; + ct = efi_cfgtbl; + while (count--) { + if (!bcmp(&ct->ct_uuid, uuid, sizeof(*uuid))) { + *ptr = (void *)PHYS_TO_DMAP(ct->ct_data); + return (0); + } + ct++; + } + return (ENOENT); +} + +static int +efi_get_time_locked(struct efi_tm *tm) +{ + efi_status status; + int error; + + EFI_TIME_OWNED() + error = efi_enter(); + if (error != 0) + return (error); + status = efi_runtime->rt_gettime(tm, NULL); + efi_leave(); + error = efi_status_to_errno(status); + return (error); +} + +int +efi_get_time(struct efi_tm *tm) +{ + int error; + + if (efi_runtime == NULL) + return (ENXIO); + EFI_TIME_LOCK() + error = efi_get_time_locked(tm); + EFI_TIME_UNLOCK() + return (error); +} + +int +efi_reset_system(void) +{ + int error; + + error = efi_enter(); + if (error != 0) + return (error); + efi_runtime->rt_reset(EFI_RESET_WARM, 0, 0, NULL); + efi_leave(); + return (EIO); +} + +static int +efi_set_time_locked(struct efi_tm *tm) +{ + efi_status status; + int error; + + EFI_TIME_OWNED(); + error = efi_enter(); + if (error != 0) + return (error); + status = efi_runtime->rt_settime(tm); + efi_leave(); + error = efi_status_to_errno(status); + return (error); +} + +int +efi_set_time(struct efi_tm *tm) +{ + int error; + + if (efi_runtime == NULL) + return (ENXIO); + EFI_TIME_LOCK() + error = efi_set_time_locked(tm); + EFI_TIME_UNLOCK() + return (error); +} + +int +efi_var_get(efi_char *name, struct uuid *vendor, uint32_t *attrib, + size_t *datasize, void *data) +{ + efi_status status; + int error; + + error = efi_enter(); + if (error != 0) + return (error); + status = efi_runtime->rt_getvar(name, vendor, attrib, datasize, data); + efi_leave(); + error = efi_status_to_errno(status); + return (error); +} + +int +efi_var_nextname(size_t *namesize, efi_char *name, struct uuid *vendor) +{ + efi_status status; + int error; + + error = efi_enter(); + if (error != 0) + return (error); + status = efi_runtime->rt_scanvar(namesize, name, vendor); + efi_leave(); + error = efi_status_to_errno(status); + return (error); +} + +int +efi_var_set(efi_char *name, struct uuid *vendor, uint32_t attrib, + size_t datasize, void *data) +{ + efi_status status; + int error; + + error = efi_enter(); + if (error != 0) + return (error); + status = efi_runtime->rt_setvar(name, vendor, attrib, datasize, data); + efi_leave(); + error = efi_status_to_errno(status); + return (error); +} + +static int +efirt_modevents(module_t m, int event, void *arg __unused) +{ + + switch (event) { + case MOD_LOAD: + return (efi_init()); + + case MOD_UNLOAD: + efi_uninit(); + return (0); + + case MOD_SHUTDOWN: + return (0); + + default: + return (EOPNOTSUPP); + } +} + +static moduledata_t efirt_moddata = { + .name = "efirt", + .evhand = efirt_modevents, + .priv = NULL, +}; +DECLARE_MODULE(efirt, efirt_moddata, SI_SUB_VM_CONF, SI_ORDER_ANY); +MODULE_VERSION(efirt, 1); Modified: stable/11/sys/modules/efirt/Makefile ============================================================================== --- stable/11/sys/modules/efirt/Makefile Thu Mar 15 19:23:07 2018 (r331018) +++ stable/11/sys/modules/efirt/Makefile Thu Mar 15 19:31:39 2018 (r331019) @@ -4,7 +4,7 @@ .PATH: ${SRCTOP}/sys/dev/efidev KMOD= efirt -SRCS= efirt.c efidev.c +SRCS= efirt.c efirt_machdep.c efidev.c SRCS+= device_if.h bus_if.h .include Modified: stable/11/sys/sys/efi.h ============================================================================== --- stable/11/sys/sys/efi.h Thu Mar 15 19:23:07 2018 (r331018) +++ stable/11/sys/sys/efi.h Thu Mar 15 19:31:39 2018 (r331019) @@ -168,6 +168,25 @@ struct efi_systbl { }; extern vm_paddr_t efi_systbl_phys; + +/* Internal MD EFI functions */ +int efi_arch_enter(void); +void efi_arch_leave(void); +bool efi_create_1t1_map(struct efi_md *, int, int); +void efi_destroy_1t1_map(void); + +/* Public MI EFI functions */ +int efi_rt_ok(void); +int efi_get_table(struct uuid *uuid, void **ptr); +int efi_get_time(struct efi_tm *tm); +int efi_reset_system(void); +int efi_set_time(struct efi_tm *tm); +int efi_var_get(uint16_t *name, struct uuid *vendor, uint32_t *attrib, + size_t *datasize, void *data); +int efi_var_nextname(size_t *namesize, uint16_t *name, struct uuid *vendor); +int efi_var_set(uint16_t *name, struct uuid *vendor, uint32_t attrib, + size_t datasize, void *data); + #endif /* _KERNEL */ #endif /* _SYS_EFI_H_ */ From owner-svn-src-all@freebsd.org Thu Mar 15 19:41:27 2018 Return-Path: Delivered-To: svn-src-all@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 3A018F4CD01; Thu, 15 Mar 2018 19:41:27 +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 E0B5F74236; Thu, 15 Mar 2018 19:41:26 +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 DB3791A4F6; Thu, 15 Mar 2018 19:41:26 +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 w2FJfQ2Q072994; Thu, 15 Mar 2018 19:41:26 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FJfQJd072993; Thu, 15 Mar 2018 19:41:26 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803151941.w2FJfQJd072993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 15 Mar 2018 19:41:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331021 - stable/11/sys/dev/efidev X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/dev/efidev X-SVN-Commit-Revision: 331021 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 19:41:27 -0000 Author: kevans Date: Thu Mar 15 19:41:26 2018 New Revision: 331021 URL: https://svnweb.freebsd.org/changeset/base/331021 Log: r322279: Don't create /dev/efi without EFI runtime Turns out to be even simpler to just not create /dev/efi if we don't have a efi runtime. Modified: stable/11/sys/dev/efidev/efidev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/efidev/efidev.c ============================================================================== --- stable/11/sys/dev/efidev/efidev.c Thu Mar 15 19:32:33 2018 (r331020) +++ stable/11/sys/dev/efidev/efidev.c Thu Mar 15 19:41:26 2018 (r331021) @@ -39,28 +39,15 @@ __FBSDID("$FreeBSD$"); #include #include -static d_open_t efidev_open; static d_ioctl_t efidev_ioctl; static struct cdevsw efi_cdevsw = { .d_name = "efi", .d_version = D_VERSION, - .d_open = efidev_open, .d_ioctl = efidev_ioctl, }; static int -efidev_open(struct cdev *dev __unused, int oflags __unused, - int devtype __unused, struct thread *td __unused) -{ - /* - * Only return success when we have an actual runtime to call. - */ - - return efi_rt_ok(); -} - -static int efidev_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr, int flags __unused, struct thread *td __unused) { @@ -195,6 +182,11 @@ efidev_modevents(module_t m, int event, void *arg __un switch (event) { case MOD_LOAD: + /* + * If we have no efi environment, then don't create the device. + */ + if (efi_rt_ok() != 0) + return (0); make_dev_args_init(&mda); mda.mda_flags = MAKEDEV_WAITOK | MAKEDEV_CHECKNAME; mda.mda_devsw = &efi_cdevsw; From owner-svn-src-all@freebsd.org Thu Mar 15 19:56:45 2018 Return-Path: Delivered-To: svn-src-all@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 A4B72F4E282; Thu, 15 Mar 2018 19:56:45 +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 56DC274F42; Thu, 15 Mar 2018 19:56:45 +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 51A431A6D7; Thu, 15 Mar 2018 19:56:45 +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 w2FJujHc080205; Thu, 15 Mar 2018 19:56:45 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FJuiOU080199; Thu, 15 Mar 2018 19:56:44 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803151956.w2FJuiOU080199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 15 Mar 2018 19:56:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331022 - in stable/11/sys: arm64/arm64 arm64/include conf modules X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/sys: arm64/arm64 arm64/include conf modules X-SVN-Commit-Revision: 331022 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 19:56:45 -0000 Author: kevans Date: Thu Mar 15 19:56:44 2018 New Revision: 331022 URL: https://svnweb.freebsd.org/changeset/base/331022 Log: MFC r324495: Support the EFI Runtime Services on arm64. As with amd64 we use the 1:1 mapping. This uses the new common code shared with amd64. The RTC should only be accessed via EFI. There is no locking around it as the spec only has this as a requirement for the PC-AT CMOS device. NOTE: r326311's changes to arm64/efirt_machdep.c have been hand-applied to this import of efirt_machdep.c due to r326311 having already been merged. Added: stable/11/sys/arm64/arm64/efirt_machdep.c - copied, changed from r324495, head/sys/arm64/arm64/efirt_machdep.c Modified: stable/11/sys/arm64/arm64/machdep.c stable/11/sys/arm64/include/efi.h stable/11/sys/conf/files.arm64 stable/11/sys/conf/options.arm64 stable/11/sys/modules/Makefile Directory Properties: stable/11/ (props changed) Copied and modified: stable/11/sys/arm64/arm64/efirt_machdep.c (from r324495, head/sys/arm64/arm64/efirt_machdep.c) ============================================================================== --- head/sys/arm64/arm64/efirt_machdep.c Tue Oct 10 13:05:26 2017 (r324495, copy source) +++ stable/11/sys/arm64/arm64/efirt_machdep.c Thu Mar 15 19:56:44 2018 (r331022) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); static vm_object_t obj_1t1_pt; static vm_page_t efi_l0_page; static pd_entry_t *efi_l0; +static vm_pindex_t efi_1t1_idx; void efi_destroy_1t1_map(void) @@ -86,10 +87,10 @@ efi_destroy_1t1_map(void) } static vm_page_t -efi_1t1_page(vm_pindex_t idx) +efi_1t1_page(void) { - return (vm_page_grab(obj_1t1_pt, idx, VM_ALLOC_NOBUSY | + return (vm_page_grab(obj_1t1_pt, efi_1t1_idx++, VM_ALLOC_NOBUSY | VM_ALLOC_WIRED | VM_ALLOC_ZERO)); } @@ -105,7 +106,7 @@ efi_1t1_l3(vm_offset_t va) l0_idx = pmap_l0_index(va); l0 = &efi_l0[l0_idx]; if (*l0 == 0) { - m = efi_1t1_page(1 + l0_idx); + m = efi_1t1_page(); mphys = VM_PAGE_TO_PHYS(m); *l0 = mphys | L0_TABLE; } else { @@ -116,7 +117,7 @@ efi_1t1_l3(vm_offset_t va) l1_idx = pmap_l1_index(va); l1 += l1_idx; if (*l1 == 0) { - m = efi_1t1_page(1 + L0_ENTRIES + (l0_idx + 1) * (l1_idx + 1)); + m = efi_1t1_page(); mphys = VM_PAGE_TO_PHYS(m); *l1 = mphys | L1_TABLE; } else { @@ -127,8 +128,7 @@ efi_1t1_l3(vm_offset_t va) l2_idx = pmap_l2_index(va); l2 += l2_idx; if (*l2 == 0) { - m = efi_1t1_page(1 + L0_ENTRIES + L0_ENTRIES * Ln_ENTRIES + - (l0_idx + 1) * (l1_idx + 1) * (l2_idx + 1)); + m = efi_1t1_page(); mphys = VM_PAGE_TO_PHYS(m); *l2 = mphys | L2_TABLE; } else { @@ -160,7 +160,8 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int L0_ENTRIES * Ln_ENTRIES * Ln_ENTRIES * Ln_ENTRIES, VM_PROT_ALL, 0, NULL); VM_OBJECT_WLOCK(obj_1t1_pt); - efi_l0_page = efi_1t1_page(0); + efi_1t1_idx = 0; + efi_l0_page = efi_1t1_page(); VM_OBJECT_WUNLOCK(obj_1t1_pt); efi_l0 = (pd_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(efi_l0_page)); bzero(efi_l0, L0_ENTRIES * sizeof(*efi_l0)); Modified: stable/11/sys/arm64/arm64/machdep.c ============================================================================== --- stable/11/sys/arm64/arm64/machdep.c Thu Mar 15 19:41:26 2018 (r331021) +++ stable/11/sys/arm64/arm64/machdep.c Thu Mar 15 19:56:44 2018 (r331022) @@ -111,6 +111,12 @@ int64_t idcache_line_size; /* The minimum cache line s int64_t dczva_line_size; /* The size of cache line the dc zva zeroes */ int has_pan; +/* + * Physical address of the EFI System Table. Stashed from the metadata hints + * passed into the kernel and used by the EFI code to call runtime services. + */ +vm_paddr_t efi_systbl_phys; + /* pagezero_* implementations are provided in support.S */ void pagezero_simple(void *); void pagezero_cache(void *); @@ -910,6 +916,8 @@ initarm(struct arm64_bootparams *abp) #ifdef FDT try_load_dtb(kmdp); #endif + + efi_systbl_phys = MD_FETCH(kmdp, MODINFOMD_FW_HANDLE, vm_paddr_t); /* Find the address to start allocating from */ lastaddr = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t); Modified: stable/11/sys/arm64/include/efi.h ============================================================================== --- stable/11/sys/arm64/include/efi.h Thu Mar 15 19:41:26 2018 (r331021) +++ stable/11/sys/arm64/include/efi.h Thu Mar 15 19:56:44 2018 (r331022) @@ -1,6 +1,32 @@ /*- - * This file is in the public domain since it's just boilerplate. + * Copyright (c) 2017 Andrew Turner + * All rights reserved. * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * 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$ */ @@ -8,5 +34,11 @@ #define __ARM64_INCLUDE_EFI_H_ #define EFIABI_ATTR + +#ifdef _KERNEL +#define EFI_TIME_LOCK() +#define EFI_TIME_UNLOCK() +#define EFI_TIME_OWNED() +#endif #endif /* __ARM64_INCLUDE_EFI_H_ */ Modified: stable/11/sys/conf/files.arm64 ============================================================================== --- stable/11/sys/conf/files.arm64 Thu Mar 15 19:41:26 2018 (r331021) +++ stable/11/sys/conf/files.arm64 Thu Mar 15 19:56:44 2018 (r331022) @@ -35,6 +35,7 @@ arm64/arm64/db_trace.c optional ddb arm64/arm64/debug_monitor.c optional ddb arm64/arm64/disassem.c optional ddb arm64/arm64/dump_machdep.c standard +arm64/arm64/efirt_machdep.c optional efirt arm64/arm64/elf_machdep.c standard arm64/arm64/exception.S standard arm64/arm64/gicv3_its.c optional intrng Modified: stable/11/sys/conf/options.arm64 ============================================================================== --- stable/11/sys/conf/options.arm64 Thu Mar 15 19:41:26 2018 (r331021) +++ stable/11/sys/conf/options.arm64 Thu Mar 15 19:56:44 2018 (r331022) @@ -7,6 +7,10 @@ SOCDEV_VA opt_global.h THUNDERX_PASS_1_1_ERRATA opt_global.h VFP opt_global.h +# EFI Runtime services support +EFIRT opt_efirt.h + +# Devices DEV_PSCI opt_platform.h # SoC Support Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Thu Mar 15 19:41:26 2018 (r331021) +++ stable/11/sys/modules/Makefile Thu Mar 15 19:56:44 2018 (r331022) @@ -560,6 +560,7 @@ _cxgb= cxgb .endif .if ${MACHINE_CPUARCH} == "aarch64" +_efirt= efirt _em= em _igb= igb .endif From owner-svn-src-all@freebsd.org Thu Mar 15 19:58:17 2018 Return-Path: Delivered-To: svn-src-all@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 0EE38F4E4F9 for ; Thu, 15 Mar 2018 19:58:17 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yw0-x22a.google.com (mail-yw0-x22a.google.com [IPv6:2607:f8b0:4002:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 21F1575104 for ; Thu, 15 Mar 2018 19:58:16 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yw0-x22a.google.com with SMTP id x17so5480352ywj.1 for ; Thu, 15 Mar 2018 12:58:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+hW73opUtP+J1jMUz1VqsGdiFD7KPLYktSf73o1nk6M=; b=JH4nC21PvK6P0zMdYL9iNp+NgfXWjalSnEsGzC4Mtr8Gj/M/TEKlreKHkiDAfCxZkc 1TOJQ4DxosRX6usLqDs6lq/nf6JlLywkOUWNd6rDUt1FBmFaBlT+7eUUhe16ve9OPe4K H0YeK0hxaxgBeyDhb2pgZ7QqjuktK+5WJvklYchWvB5f+L/zkobqTo5UDQFvf82P+uPT +hbqK1M+kGElJE9OVVndUa1E7QUrmnuqaNbJEhTf0FUqa7lzLPxdZPJFAWgD3w1PVs3J E9XUsjOnPp4Qc1phS5zex7Ul7M67Vt9YVml8XGORY7J/tMjgE3m9racwGQY4sqvO4L9t Wrcg== 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=+hW73opUtP+J1jMUz1VqsGdiFD7KPLYktSf73o1nk6M=; b=RKRhi02HYt+UgYBGkfcEoilglbfUw8FrNrVurE+h9y2Lsh9CgkLT5rR2HBpFKbXvbE sHRlb15BVOGv5Yb9KtgGXi+U6obYTIYX4KxBWW7393UX0tDIFqtZKvJXIcjyKsun8gou R6juyYzd2s0xoQ+GGJDRf1hHOUFmq7Mcvrs1dwaW3Iptwmawe9UTzD9s9TFuGpC4mx0B +i1Y3N/9v/iILXE9NvBl/3vPGwL+auokV3rKkh2UrYJEdPwPEDUzlCqboO9wcEf2nV5i IQAqSAr6UcNlsh6WtPCxBP4AGXFTJ0Ob/kKvk54RpJ9aDStiIAsLZuK0p72NwW8dM4ZI Fozg== X-Gm-Message-State: AElRT7HZT4mNbNfyqnwd2g5Vny9OArr1l03hGnu6lR+G7KGzWcWeLtEz VcFWB16DwTGo03f+EBBpE5pV/b5+0SB0LdJguUSagA== X-Google-Smtp-Source: AG47ELukw46aE76UoG72ZtrVwglc5S54d4cYrhUFpvLQy+7hTC3DtHxXe2UOD81Ok2ldmIEZ+R4CApJZgY+FpJSEPa0= X-Received: by 10.129.162.84 with SMTP id z81mr6710723ywg.377.1521143895485; Thu, 15 Mar 2018 12:58:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:3492:0:0:0:0:0 with HTTP; Thu, 15 Mar 2018 12:58:15 -0700 (PDT) In-Reply-To: <201803151941.w2FJfQJd072993@repo.freebsd.org> References: <201803151941.w2FJfQJd072993@repo.freebsd.org> From: Oliver Pinter Date: Thu, 15 Mar 2018 20:58:15 +0100 Message-ID: Subject: Re: svn commit: r331021 - stable/11/sys/dev/efidev To: Kyle Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 19:58:17 -0000 On 3/15/18, Kyle Evans wrote: > Author: kevans > Date: Thu Mar 15 19:41:26 2018 > New Revision: 331021 > URL: https://svnweb.freebsd.org/changeset/base/331021 > > Log: > r322279: Don't create /dev/efi without EFI runtime Hi! Is this an MFC or a direct commit to 11-stable? > > Turns out to be even simpler to just not create /dev/efi if we don't > have a efi runtime. > > Modified: > stable/11/sys/dev/efidev/efidev.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/sys/dev/efidev/efidev.c > ============================================================================== > --- stable/11/sys/dev/efidev/efidev.c Thu Mar 15 19:32:33 2018 (r331020) > +++ stable/11/sys/dev/efidev/efidev.c Thu Mar 15 19:41:26 2018 (r331021) > @@ -39,28 +39,15 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -static d_open_t efidev_open; > static d_ioctl_t efidev_ioctl; > > static struct cdevsw efi_cdevsw = { > .d_name = "efi", > .d_version = D_VERSION, > - .d_open = efidev_open, > .d_ioctl = efidev_ioctl, > }; > > static int > -efidev_open(struct cdev *dev __unused, int oflags __unused, > - int devtype __unused, struct thread *td __unused) > -{ > - /* > - * Only return success when we have an actual runtime to call. > - */ > - > - return efi_rt_ok(); > -} > - > -static int > efidev_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr, > int flags __unused, struct thread *td __unused) > { > @@ -195,6 +182,11 @@ efidev_modevents(module_t m, int event, void *arg __un > > switch (event) { > case MOD_LOAD: > + /* > + * If we have no efi environment, then don't create the device. > + */ > + if (efi_rt_ok() != 0) > + return (0); > make_dev_args_init(&mda); > mda.mda_flags = MAKEDEV_WAITOK | MAKEDEV_CHECKNAME; > mda.mda_devsw = &efi_cdevsw; > _______________________________________________ > svn-src-stable-11@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11 > To unsubscribe, send any mail to > "svn-src-stable-11-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Thu Mar 15 20:00:41 2018 Return-Path: Delivered-To: svn-src-all@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 D3485F4E76E; Thu, 15 Mar 2018 20:00:41 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6164975323; Thu, 15 Mar 2018 20:00:41 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-lf0-f45.google.com with SMTP id x205-v6so12055355lfa.0; Thu, 15 Mar 2018 13:00:41 -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:in-reply-to:references:from:date :message-id:subject:to:cc; bh=z81zzIcCYKMF35JDsLA1p7Yq+i7uk7U8OUUZ8LaLw8M=; b=b50XDuZcoaryJBU2IKxAvvYsF8QGsNlCDihw/UGVK3JADcRay8VOnySbo3oGoG7P35 sU1nrFLgWUL9CibmAhh+re1JjHyNRtoWZ7sBqMfva7YvcEwhfbF288fKHHlH4Z6e5tzv pf53Mc1pJi1d5wxRWnNToy2X+zi//4PNVdi/OG0JxwU4QsfVETkfiTOnIRIzC14/7Cbt SMonIVw4ri34+Lq7LlPbZY7z46n5POBDYX8NLSDyWFBx0s6FDcHgB59yGZFGAk52YW4q l9gHXd1VEskJGlX7hiE8GqeD6I6p67wZI4CALko/6E84Oia/LDgYPfxdbtximfuBbIrt OV6Q== X-Gm-Message-State: AElRT7G41dbjWiNT26ExnOjp1Hqz30i1ZQJ9eyeybDqkkM+fugT/6H9f pLjnbzVbwg7bWk9/qItxgWLuXcFVFao= X-Google-Smtp-Source: AG47ELtlMr8KsGCzY/vVh+go4OCOd0xZj9g1hQl4TcJizl8Oeh7+cEFgyLu84nt9J1HZ2XtO0TvNHw== X-Received: by 10.46.46.8 with SMTP id u8mr3127899lju.110.1521144033325; Thu, 15 Mar 2018 13:00:33 -0700 (PDT) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com. [209.85.215.51]) by smtp.gmail.com with ESMTPSA id b67-v6sm1357504lfh.26.2018.03.15.13.00.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Mar 2018 13:00:33 -0700 (PDT) Received: by mail-lf0-f51.google.com with SMTP id y19-v6so12052262lfd.4; Thu, 15 Mar 2018 13:00:33 -0700 (PDT) X-Received: by 10.46.83.87 with SMTP id t23mr7438244ljd.38.1521144032990; Thu, 15 Mar 2018 13:00:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.54.1 with HTTP; Thu, 15 Mar 2018 13:00:12 -0700 (PDT) In-Reply-To: References: <201803151941.w2FJfQJd072993@repo.freebsd.org> From: Kyle Evans Date: Thu, 15 Mar 2018 15:00:12 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r331021 - stable/11/sys/dev/efidev To: Oliver Pinter Cc: Kyle Evans , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 20:00:42 -0000 On Thu, Mar 15, 2018 at 2:58 PM, Oliver Pinter wrote: > On 3/15/18, Kyle Evans wrote: >> Author: kevans >> Date: Thu Mar 15 19:41:26 2018 >> New Revision: 331021 >> URL: https://svnweb.freebsd.org/changeset/base/331021 >> >> Log: >> r322279: Don't create /dev/efi without EFI runtime > Hi! > > Is this an MFC or a direct commit to 11-stable? > Whoops, sorry, I did indeed drop the MFC prefix. Should read: "MFC r322279: Don't create /dev/efi without EFI runtime" From owner-svn-src-all@freebsd.org Thu Mar 15 20:09:26 2018 Return-Path: Delivered-To: svn-src-all@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 26239F4F3AD; Thu, 15 Mar 2018 20:09:26 +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 CB4A575B97; Thu, 15 Mar 2018 20:09: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 AC9291A858; Thu, 15 Mar 2018 20:09: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 w2FK9Psw085214; Thu, 15 Mar 2018 20:09:25 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FK9PXg085209; Thu, 15 Mar 2018 20:09:25 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803152009.w2FK9PXg085209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 15 Mar 2018 20:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331023 - in stable/11/sys: arm64/arm64 arm64/include conf modules X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/sys: arm64/arm64 arm64/include conf modules X-SVN-Commit-Revision: 331023 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 20:09:26 -0000 Author: kevans Date: Thu Mar 15 20:09:24 2018 New Revision: 331023 URL: https://svnweb.freebsd.org/changeset/base/331023 Log: Revert r331022: MFC of EFI Runtime Service support on aarch64 Apologies; this is NOT an MFC'able change. It requires a good number of pcb changes that would break KBI. Pointy hat to: me Deleted: stable/11/sys/arm64/arm64/efirt_machdep.c Modified: stable/11/sys/arm64/arm64/machdep.c stable/11/sys/arm64/include/efi.h stable/11/sys/conf/files.arm64 stable/11/sys/conf/options.arm64 stable/11/sys/modules/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/machdep.c ============================================================================== --- stable/11/sys/arm64/arm64/machdep.c Thu Mar 15 19:56:44 2018 (r331022) +++ stable/11/sys/arm64/arm64/machdep.c Thu Mar 15 20:09:24 2018 (r331023) @@ -111,12 +111,6 @@ int64_t idcache_line_size; /* The minimum cache line s int64_t dczva_line_size; /* The size of cache line the dc zva zeroes */ int has_pan; -/* - * Physical address of the EFI System Table. Stashed from the metadata hints - * passed into the kernel and used by the EFI code to call runtime services. - */ -vm_paddr_t efi_systbl_phys; - /* pagezero_* implementations are provided in support.S */ void pagezero_simple(void *); void pagezero_cache(void *); @@ -916,8 +910,6 @@ initarm(struct arm64_bootparams *abp) #ifdef FDT try_load_dtb(kmdp); #endif - - efi_systbl_phys = MD_FETCH(kmdp, MODINFOMD_FW_HANDLE, vm_paddr_t); /* Find the address to start allocating from */ lastaddr = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t); Modified: stable/11/sys/arm64/include/efi.h ============================================================================== --- stable/11/sys/arm64/include/efi.h Thu Mar 15 19:56:44 2018 (r331022) +++ stable/11/sys/arm64/include/efi.h Thu Mar 15 20:09:24 2018 (r331023) @@ -1,32 +1,6 @@ /*- - * Copyright (c) 2017 Andrew Turner - * All rights reserved. + * This file is in the public domain since it's just boilerplate. * - * This software was developed by SRI International and the University of - * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 - * ("CTSRD"), as part of the DARPA CRASH research programme. - * - * 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$ */ @@ -34,11 +8,5 @@ #define __ARM64_INCLUDE_EFI_H_ #define EFIABI_ATTR - -#ifdef _KERNEL -#define EFI_TIME_LOCK() -#define EFI_TIME_UNLOCK() -#define EFI_TIME_OWNED() -#endif #endif /* __ARM64_INCLUDE_EFI_H_ */ Modified: stable/11/sys/conf/files.arm64 ============================================================================== --- stable/11/sys/conf/files.arm64 Thu Mar 15 19:56:44 2018 (r331022) +++ stable/11/sys/conf/files.arm64 Thu Mar 15 20:09:24 2018 (r331023) @@ -35,7 +35,6 @@ arm64/arm64/db_trace.c optional ddb arm64/arm64/debug_monitor.c optional ddb arm64/arm64/disassem.c optional ddb arm64/arm64/dump_machdep.c standard -arm64/arm64/efirt_machdep.c optional efirt arm64/arm64/elf_machdep.c standard arm64/arm64/exception.S standard arm64/arm64/gicv3_its.c optional intrng Modified: stable/11/sys/conf/options.arm64 ============================================================================== --- stable/11/sys/conf/options.arm64 Thu Mar 15 19:56:44 2018 (r331022) +++ stable/11/sys/conf/options.arm64 Thu Mar 15 20:09:24 2018 (r331023) @@ -7,10 +7,6 @@ SOCDEV_VA opt_global.h THUNDERX_PASS_1_1_ERRATA opt_global.h VFP opt_global.h -# EFI Runtime services support -EFIRT opt_efirt.h - -# Devices DEV_PSCI opt_platform.h # SoC Support Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Thu Mar 15 19:56:44 2018 (r331022) +++ stable/11/sys/modules/Makefile Thu Mar 15 20:09:24 2018 (r331023) @@ -560,7 +560,6 @@ _cxgb= cxgb .endif .if ${MACHINE_CPUARCH} == "aarch64" -_efirt= efirt _em= em _igb= igb .endif From owner-svn-src-all@freebsd.org Thu Mar 15 20:29:49 2018 Return-Path: Delivered-To: svn-src-all@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 42F84F50CB8; Thu, 15 Mar 2018 20:29:49 +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 E892C76A7B; Thu, 15 Mar 2018 20:29:48 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C95071AB82; Thu, 15 Mar 2018 20:29:48 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FKTmVc095398; Thu, 15 Mar 2018 20:29:48 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FKTmEG095395; Thu, 15 Mar 2018 20:29:48 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803152029.w2FKTmEG095395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 15 Mar 2018 20:29:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331025 - in stable/11/sys: conf dev/efidev modules/efirt X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/sys: conf dev/efidev modules/efirt X-SVN-Commit-Revision: 331025 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 20:29:49 -0000 Author: kevans Date: Thu Mar 15 20:29:48 2018 New Revision: 331025 URL: https://svnweb.freebsd.org/changeset/base/331025 Log: MFC (partially) r326066, r326121: Add an EFI RTC Driver This is effectively a direct commit to stable/11 to avoid the arm64 bits, as those are unfortunately not able to MFC'd. MFC r326066: Add a driver for the EFI RTC. This uses the EFI Runtime Services to query the system time. MFC r326121: Zero struct efi_tm before setting the needed values. We don't use the dst or timezone fields so ensure these are set. Added: stable/11/sys/dev/efidev/efirtc.c - copied, changed from r326066, head/sys/dev/efidev/efirtc.c Modified: stable/11/sys/conf/files stable/11/sys/modules/efirt/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Thu Mar 15 20:25:06 2018 (r331024) +++ stable/11/sys/conf/files Thu Mar 15 20:29:48 2018 (r331025) @@ -1585,6 +1585,7 @@ dev/ed/if_ed_pccard.c optional ed pccard dev/ed/if_ed_pci.c optional ed pci dev/efidev/efidev.c optional efirt dev/efidev/efirt.c optional efirt +dev/efidev/efirtc.c optional efirt dev/eisa/eisa_if.m standard dev/eisa/eisaconf.c optional eisa dev/e1000/if_em.c optional em \ Copied and modified: stable/11/sys/dev/efidev/efirtc.c (from r326066, head/sys/dev/efidev/efirtc.c) ============================================================================== --- head/sys/dev/efidev/efirtc.c Tue Nov 21 17:23:16 2017 (r326066, copy source) +++ stable/11/sys/dev/efidev/efirtc.c Thu Mar 15 20:29:48 2018 (r331025) @@ -116,6 +116,7 @@ efirtc_settime(device_t dev, struct timespec *ts) clock_ts_to_ct(ts, &ct); + bzero(&tm, sizeof(tm)); tm.tm_sec = ct.sec; tm.tm_min = ct.min; tm.tm_hour = ct.hour; Modified: stable/11/sys/modules/efirt/Makefile ============================================================================== --- stable/11/sys/modules/efirt/Makefile Thu Mar 15 20:25:06 2018 (r331024) +++ stable/11/sys/modules/efirt/Makefile Thu Mar 15 20:29:48 2018 (r331025) @@ -5,6 +5,7 @@ KMOD= efirt SRCS= efirt.c efirt_machdep.c efidev.c -SRCS+= device_if.h bus_if.h +SRCS+= efirtc.c +SRCS+= device_if.h bus_if.h clock_if.h .include From owner-svn-src-all@freebsd.org Thu Mar 15 20:40:28 2018 Return-Path: Delivered-To: svn-src-all@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 1CA36F51A5B; Thu, 15 Mar 2018 20:40:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C06D0773D9; Thu, 15 Mar 2018 20:40:27 +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 BB4571AD10; Thu, 15 Mar 2018 20:40:27 +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 w2FKeR7g000647; Thu, 15 Mar 2018 20:40:27 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FKeR82000646; Thu, 15 Mar 2018 20:40:27 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803152040.w2FKeR82000646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 15 Mar 2018 20:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331026 - stable/11/sys/amd64/include X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/amd64/include X-SVN-Commit-Revision: 331026 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 20:40:28 -0000 Author: kevans Date: Thu Mar 15 20:40:27 2018 New Revision: 331026 URL: https://svnweb.freebsd.org/changeset/base/331026 Log: MFC r324191: Hide kernel stuff from userspace. Modified: stable/11/sys/amd64/include/efi.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/include/efi.h ============================================================================== --- stable/11/sys/amd64/include/efi.h Thu Mar 15 20:29:48 2018 (r331025) +++ stable/11/sys/amd64/include/efi.h Thu Mar 15 20:40:27 2018 (r331026) @@ -32,8 +32,6 @@ #ifndef __AMD64_INCLUDE_EFI_H_ #define __AMD64_INCLUDE_EFI_H_ -#include - /* * XXX: from gcc 6.2 manual: * Note, the ms_abi attribute for Microsoft Windows 64-bit targets @@ -47,8 +45,12 @@ #define EFIABI_ATTR __attribute__((ms_abi)) #endif +#ifdef _KERNEL +#include + #define EFI_TIME_LOCK() mtx_lock(&atrtc_time_lock); #define EFI_TIME_UNLOCK() mtx_unlock(&atrtc_time_lock); #define EFI_TIME_OWNED() mtx_assert(&atrtc_time_lock, MA_OWNED); +#endif #endif /* __AMD64_INCLUDE_EFI_H_ */ From owner-svn-src-all@freebsd.org Thu Mar 15 20:43:22 2018 Return-Path: Delivered-To: svn-src-all@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 D23C7F51F22; Thu, 15 Mar 2018 20:43: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 8502B77850; Thu, 15 Mar 2018 20:43: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 7F7101AE89; Thu, 15 Mar 2018 20:43: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 w2FKhM98005152; Thu, 15 Mar 2018 20:43:22 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FKhMjv005151; Thu, 15 Mar 2018 20:43:22 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803152043.w2FKhMjv005151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 15 Mar 2018 20:43:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331027 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 331027 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 20:43:23 -0000 Author: kevans Date: Thu Mar 15 20:43:22 2018 New Revision: 331027 URL: https://svnweb.freebsd.org/changeset/base/331027 Log: Record-only merge of r330780, r330783 r330780: Eliminate atrtc_time_lock, and use atrtc_lock for efirtc locking. r330783: Revert r330780, it was improperly tested and results in taking a spin mutex before acquiring sleep mutexes. Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-all@freebsd.org Thu Mar 15 20:46:35 2018 Return-Path: Delivered-To: svn-src-all@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 4155AF52261; Thu, 15 Mar 2018 20:46:35 +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 E88A077A60; Thu, 15 Mar 2018 20:46: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 E38101AE8F; Thu, 15 Mar 2018 20:46:34 +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 w2FKkY0V005360; Thu, 15 Mar 2018 20:46:34 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FKkYwl005358; Thu, 15 Mar 2018 20:46:34 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201803152046.w2FKkYwl005358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 15 Mar 2018 20:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331028 - in stable/11/sys: dev/efidev sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/sys: dev/efidev sys X-SVN-Commit-Revision: 331028 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 20:46:35 -0000 Author: kevans Date: Thu Mar 15 20:46:34 2018 New Revision: 331028 URL: https://svnweb.freebsd.org/changeset/base/331028 Log: MFC r330257: Add a function to retrieve the EFI realtime clock capabilities. Modified: stable/11/sys/dev/efidev/efirt.c stable/11/sys/sys/efi.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/efidev/efirt.c ============================================================================== --- stable/11/sys/dev/efidev/efirt.c Thu Mar 15 20:43:22 2018 (r331027) +++ stable/11/sys/dev/efidev/efirt.c Thu Mar 15 20:46:34 2018 (r331028) @@ -242,7 +242,7 @@ efi_get_table(struct uuid *uuid, void **ptr) } static int -efi_get_time_locked(struct efi_tm *tm) +efi_get_time_locked(struct efi_tm *tm, struct efi_tmcap *tmcap) { efi_status status; int error; @@ -251,7 +251,7 @@ efi_get_time_locked(struct efi_tm *tm) error = efi_enter(); if (error != 0) return (error); - status = efi_runtime->rt_gettime(tm, NULL); + status = efi_runtime->rt_gettime(tm, tmcap); efi_leave(); error = efi_status_to_errno(status); return (error); @@ -265,7 +265,21 @@ efi_get_time(struct efi_tm *tm) if (efi_runtime == NULL) return (ENXIO); EFI_TIME_LOCK() - error = efi_get_time_locked(tm); + error = efi_get_time_locked(tm, NULL); + EFI_TIME_UNLOCK() + return (error); +} + +int +efi_get_time_capabilities(struct efi_tmcap *tmcap) +{ + struct efi_tm dummy; + int error; + + if (efi_runtime == NULL) + return (ENXIO); + EFI_TIME_LOCK() + error = efi_get_time_locked(&dummy, tmcap); EFI_TIME_UNLOCK() return (error); } Modified: stable/11/sys/sys/efi.h ============================================================================== --- stable/11/sys/sys/efi.h Thu Mar 15 20:43:22 2018 (r331027) +++ stable/11/sys/sys/efi.h Thu Mar 15 20:46:34 2018 (r331028) @@ -179,6 +179,7 @@ void efi_destroy_1t1_map(void); int efi_rt_ok(void); int efi_get_table(struct uuid *uuid, void **ptr); int efi_get_time(struct efi_tm *tm); +int efi_get_time_capabilities(struct efi_tmcap *tmcap); int efi_reset_system(void); int efi_set_time(struct efi_tm *tm); int efi_var_get(uint16_t *name, struct uuid *vendor, uint32_t *attrib, From owner-svn-src-all@freebsd.org Thu Mar 15 21:31:20 2018 Return-Path: Delivered-To: svn-src-all@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 7C1E1F55763; Thu, 15 Mar 2018 21:31:20 +0000 (UTC) (envelope-from brooks@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 32BD779F51; Thu, 15 Mar 2018 21:31:20 +0000 (UTC) (envelope-from brooks@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 2DBF91B611; Thu, 15 Mar 2018 21:31:20 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FLVKhS027593; Thu, 15 Mar 2018 21:31:20 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FLVKsw027592; Thu, 15 Mar 2018 21:31:20 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803152131.w2FLVKsw027592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 15 Mar 2018 21:31:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331029 - head X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 331029 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 21:31:20 -0000 Author: brooks Date: Thu Mar 15 21:31:19 2018 New Revision: 331029 URL: https://svnweb.freebsd.org/changeset/base/331029 Log: Finish removal of dataacq.h (r330716) and pcaudioio.h (r330766). Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Mar 15 20:46:34 2018 (r331028) +++ head/ObsoleteFiles.inc Thu Mar 15 21:31:19 2018 (r331029) @@ -38,6 +38,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20180311: remove sys/sys/i386/include/pcaudioio.h +.if ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/machine/pcaudioio.h +.endif +# 20180310: remove sys/sys/dataacq.h +OLD_FILES+=usr/include/sys/dataacq.h # 20180306: remove DTrace scripts made obsolete by dwatch(1) OLD_FILES+=usr/share/dtrace/watch_execve OLD_FILES+=usr/share/dtrace/watch_kill From owner-svn-src-all@freebsd.org Thu Mar 15 21:38:39 2018 Return-Path: Delivered-To: svn-src-all@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 4ED1EF560FA; Thu, 15 Mar 2018 21:38:39 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB5BF7A6E1; Thu, 15 Mar 2018 21:38:38 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-lf0-f43.google.com with SMTP id y19-v6so12413557lfd.4; Thu, 15 Mar 2018 14:38:38 -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:in-reply-to:references:from:date :message-id:subject:to:cc; bh=WqExMa9mnswUv/rFUClpX/LtPSXl2Cm7ottgKQ4QAKU=; b=D2FGMyb7niNI8uWH9bwwObciUbBKbKgpxzI3x0SyHByN7qhozCaEAj6Zq0/MMU8dPn f9W/JwVFSpTFpCD2Krqzyc9I04WDeWxfSCLGnam6ZIXfwsGVgORTCDfCKBdCRothgHZd ha8deS2CFvBw4w5cqUX077WTkuKIZFHmQ9z3hiYkIDvj0u1I3iX/LTeVe0NuctWJbguB mUXQ1hDeNExh40ysbMg7XAp8N8RNXM8GBo2uHbrVnRYRS1RsG7JEO6dCDFi8bsPi8big vCv2maumW5DXeNacr7gtkz63MnJwrBHbuQ1MNNC+0yKaI9HR9vpmKwCBEZDP8KGXkRSF OjwA== X-Gm-Message-State: AElRT7HrZPL+70eAGZRywMJK45OvyVdngSX7uDNrpopmyyUXijexqUzQ hN/hMjCqAXHA64H228vMSF1waz0qOok= X-Google-Smtp-Source: AG47ELvCQYC7geUqr13waump5jGH2181YYb3o1BALPfgjKxYtFWN4TLgfzRkGaqpieN2bUGYOL6cRg== X-Received: by 2002:a19:4d46:: with SMTP id a67-v6mr7763933lfb.36.1521149569349; Thu, 15 Mar 2018 14:32:49 -0700 (PDT) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com. [209.85.215.46]) by smtp.gmail.com with ESMTPSA id l5sm1276055lje.58.2018.03.15.14.32.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Mar 2018 14:32:49 -0700 (PDT) Received: by mail-lf0-f46.google.com with SMTP id f75-v6so12362772lfg.6; Thu, 15 Mar 2018 14:32:49 -0700 (PDT) X-Received: by 10.46.114.26 with SMTP id n26mr7535840ljc.74.1521149569036; Thu, 15 Mar 2018 14:32:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.54.1 with HTTP; Thu, 15 Mar 2018 14:32:28 -0700 (PDT) In-Reply-To: <201803151923.w2FJN7G7064582@repo.freebsd.org> References: <201803151923.w2FJN7G7064582@repo.freebsd.org> From: Kyle Evans Date: Thu, 15 Mar 2018 16:32:28 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r331018 - head/sys/vm To: Jeff Roberson Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 21:38:39 -0000 On Thu, Mar 15, 2018 at 2:23 PM, Jeff Roberson wrote: > Author: jeff > Date: Thu Mar 15 19:23:07 2018 > New Revision: 331018 > URL: https://svnweb.freebsd.org/changeset/base/331018 > > Log: > Eliminate pageout wakeup races. Take another step towards lockless > vmd_free_count manipulation. Reduce the scope of the free lock by > using a pageout lock to synchronize sleep and wakeup. Only trigger > the pageout daemon on transitions between states. Drive all wakeup > operations directly as side-effects from freeing memory rather than > requiring an additional function call. > > Reviewed by: markj, kib > Tested by: pho > Sponsored by: Netflix, Dell/EMC Isilon > Differential Revision: https://reviews.freebsd.org/D14612 > Hey, Just a heads up: this broke the GCC builds [1] with the following (excerpt): 20:00:47 /usr/src/sys/vm/vm_pagequeue.h:249: warning: redundant redeclaration of 'pagedaemon_wakeup' [-Wredundant-decls] 20:00:47 /usr/src/sys/vm/vm_pageout.h:98: warning: previous declaration of 'pagedaemon_wakeup' was here Thanks, Kyle Evans [1] https://ci.freebsd.org/job/FreeBSD-head-mips64-build/1108/console From owner-svn-src-all@freebsd.org Thu Mar 15 21:42:49 2018 Return-Path: Delivered-To: svn-src-all@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 977EDF566CB; Thu, 15 Mar 2018 21:42:49 +0000 (UTC) (envelope-from brooks@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 400A87ACA1; Thu, 15 Mar 2018 21:42:49 +0000 (UTC) (envelope-from brooks@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 3ACB01B7E6; Thu, 15 Mar 2018 21:42:49 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FLgnbL036607; Thu, 15 Mar 2018 21:42:49 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FLgngd036606; Thu, 15 Mar 2018 21:42:49 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803152142.w2FLgngd036606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 15 Mar 2018 21:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331030 - head/sys/dev/md X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/dev/md X-SVN-Commit-Revision: 331030 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 21:42:50 -0000 Author: brooks Date: Thu Mar 15 21:42:49 2018 New Revision: 331030 URL: https://svnweb.freebsd.org/changeset/base/331030 Log: Add a request structure and make the implementation use it. This allows compatibility translation to take place on the stack (md_ioctl is too big) and is more suitable as a public interface within the kernel than the kern_ioctl interface. Except for the initialization of the md_req from the md_ioctl (including detection of kernel md_file pointers) and the updating of the md_ioctl prior to return, this is a mechanical replacment of md_ioctl and mdio with md_req and mdr. Reviewed by: markj, cem, kib (assorted versions) Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14704 Modified: head/sys/dev/md/md.c Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Thu Mar 15 21:31:19 2018 (r331029) +++ head/sys/dev/md/md.c Thu Mar 15 21:42:49 2018 (r331030) @@ -114,6 +114,21 @@ #define MD_NSECT (10000 * 2) #endif +struct md_req { + unsigned md_unit; /* unit number */ + enum md_types md_type; /* type of disk */ + off_t md_mediasize; /* size of disk in bytes */ + unsigned md_sectorsize; /* sectorsize */ + unsigned md_options; /* options */ + int md_fwheads; /* firmware heads */ + int md_fwsectors; /* firmware sectors */ + char *md_file; /* pathname of file to mount */ + enum uio_seg md_file_seg; /* location of md_file */ + char *md_label; /* label of the device (userspace) */ + int *md_units; /* pointer to units array (kernel) */ + size_t md_units_nitems; /* items in md_units array */ +}; + static MALLOC_DEFINE(M_MD, "md_disk", "Memory Disk"); static MALLOC_DEFINE(M_MDSECT, "md_sectors", "Memory Disk Sectors"); @@ -1285,29 +1300,29 @@ mdinit(struct md_s *sc) } static int -mdcreate_malloc(struct md_s *sc, struct md_ioctl *mdio) +mdcreate_malloc(struct md_s *sc, struct md_req *mdr) { uintptr_t sp; int error; off_t u; error = 0; - if (mdio->md_options & ~(MD_AUTOUNIT | MD_COMPRESS | MD_RESERVE)) + if (mdr->md_options & ~(MD_AUTOUNIT | MD_COMPRESS | MD_RESERVE)) return (EINVAL); - if (mdio->md_sectorsize != 0 && !powerof2(mdio->md_sectorsize)) + if (mdr->md_sectorsize != 0 && !powerof2(mdr->md_sectorsize)) return (EINVAL); /* Compression doesn't make sense if we have reserved space */ - if (mdio->md_options & MD_RESERVE) - mdio->md_options &= ~MD_COMPRESS; - if (mdio->md_fwsectors != 0) - sc->fwsectors = mdio->md_fwsectors; - if (mdio->md_fwheads != 0) - sc->fwheads = mdio->md_fwheads; - sc->flags = mdio->md_options & (MD_COMPRESS | MD_FORCE); + if (mdr->md_options & MD_RESERVE) + mdr->md_options &= ~MD_COMPRESS; + if (mdr->md_fwsectors != 0) + sc->fwsectors = mdr->md_fwsectors; + if (mdr->md_fwheads != 0) + sc->fwheads = mdr->md_fwheads; + sc->flags = mdr->md_options & (MD_COMPRESS | MD_FORCE); sc->indir = dimension(sc->mediasize / sc->sectorsize); sc->uma = uma_zcreate(sc->name, sc->sectorsize, NULL, NULL, NULL, NULL, 0x1ff, 0); - if (mdio->md_options & MD_RESERVE) { + if (mdr->md_options & MD_RESERVE) { off_t nsectors; nsectors = sc->mediasize / sc->sectorsize; @@ -1368,19 +1383,15 @@ mdsetcred(struct md_s *sc, struct ucred *cred) } static int -mdcreate_vnode(struct md_s *sc, struct md_ioctl *mdio, struct thread *td) +mdcreate_vnode(struct md_s *sc, struct md_req *mdr, struct thread *td) { struct vattr vattr; struct nameidata nd; char *fname; int error, flags; - /* - * Kernel-originated requests must have the filename appended - * to the mdio structure to protect against malicious software. - */ - fname = mdio->md_file; - if ((void *)fname != (void *)(mdio + 1)) { + fname = mdr->md_file; + if (mdr->md_file_seg == UIO_USERSPACE) { error = copyinstr(fname, sc->file, sizeof(sc->file), NULL); if (error != 0) return (error); @@ -1391,8 +1402,8 @@ mdcreate_vnode(struct md_s *sc, struct md_ioctl *mdio, * If the user specified that this is a read only device, don't * set the FWRITE mask before trying to open the backing store. */ - flags = FREAD | ((mdio->md_options & MD_READONLY) ? 0 : FWRITE) \ - | ((mdio->md_options & MD_VERIFY) ? O_VERIFY : 0); + flags = FREAD | ((mdr->md_options & MD_READONLY) ? 0 : FWRITE) \ + | ((mdr->md_options & MD_VERIFY) ? O_VERIFY : 0); NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, sc->file, td); error = vn_open(&nd, &flags, 0, NULL); if (error != 0) @@ -1416,13 +1427,13 @@ mdcreate_vnode(struct md_s *sc, struct md_ioctl *mdio, nd.ni_vp->v_vflag |= VV_MD; VOP_UNLOCK(nd.ni_vp, 0); - if (mdio->md_fwsectors != 0) - sc->fwsectors = mdio->md_fwsectors; - if (mdio->md_fwheads != 0) - sc->fwheads = mdio->md_fwheads; + if (mdr->md_fwsectors != 0) + sc->fwsectors = mdr->md_fwsectors; + if (mdr->md_fwheads != 0) + sc->fwheads = mdr->md_fwheads; snprintf(sc->ident, sizeof(sc->ident), "MD-DEV%ju-INO%ju", (uintmax_t)vattr.va_fsid, (uintmax_t)vattr.va_fileid); - sc->flags = mdio->md_options & (MD_FORCE | MD_ASYNC | MD_VERIFY); + sc->flags = mdr->md_options & (MD_FORCE | MD_ASYNC | MD_VERIFY); if (!(flags & FWRITE)) sc->flags |= MD_READONLY; sc->vnode = nd.ni_vp; @@ -1488,7 +1499,7 @@ mddestroy(struct md_s *sc, struct thread *td) } static int -mdresize(struct md_s *sc, struct md_ioctl *mdio) +mdresize(struct md_s *sc, struct md_req *mdr) { int error, res; vm_pindex_t oldpages, newpages; @@ -1498,11 +1509,11 @@ mdresize(struct md_s *sc, struct md_ioctl *mdio) case MD_NULL: break; case MD_SWAP: - if (mdio->md_mediasize <= 0 || - (mdio->md_mediasize % PAGE_SIZE) != 0) + if (mdr->md_mediasize <= 0 || + (mdr->md_mediasize % PAGE_SIZE) != 0) return (EDOM); oldpages = OFF_TO_IDX(round_page(sc->mediasize)); - newpages = OFF_TO_IDX(round_page(mdio->md_mediasize)); + newpages = OFF_TO_IDX(round_page(mdr->md_mediasize)); if (newpages < oldpages) { VM_OBJECT_WLOCK(sc->object); vm_object_page_remove(sc->object, newpages, 0, 0); @@ -1518,7 +1529,7 @@ mdresize(struct md_s *sc, struct md_ioctl *mdio) oldpages), sc->cred); if (!res) return (ENOMEM); - if ((mdio->md_options & MD_RESERVE) || + if ((mdr->md_options & MD_RESERVE) || (sc->flags & MD_RESERVE)) { error = swap_pager_reserve(sc->object, oldpages, newpages - oldpages); @@ -1539,7 +1550,7 @@ mdresize(struct md_s *sc, struct md_ioctl *mdio) return (EOPNOTSUPP); } - sc->mediasize = mdio->md_mediasize; + sc->mediasize = mdr->md_mediasize; g_topology_lock(); g_resize_provider(sc->pp, sc->mediasize); g_topology_unlock(); @@ -1547,7 +1558,7 @@ mdresize(struct md_s *sc, struct md_ioctl *mdio) } static int -mdcreate_swap(struct md_s *sc, struct md_ioctl *mdio, struct thread *td) +mdcreate_swap(struct md_s *sc, struct md_req *mdr, struct thread *td) { vm_ooffset_t npage; int error; @@ -1565,19 +1576,19 @@ mdcreate_swap(struct md_s *sc, struct md_ioctl *mdio, * Note the truncation. */ - if ((mdio->md_options & MD_VERIFY) != 0) + if ((mdr->md_options & MD_VERIFY) != 0) return (EINVAL); - npage = mdio->md_mediasize / PAGE_SIZE; - if (mdio->md_fwsectors != 0) - sc->fwsectors = mdio->md_fwsectors; - if (mdio->md_fwheads != 0) - sc->fwheads = mdio->md_fwheads; + npage = mdr->md_mediasize / PAGE_SIZE; + if (mdr->md_fwsectors != 0) + sc->fwsectors = mdr->md_fwsectors; + if (mdr->md_fwheads != 0) + sc->fwheads = mdr->md_fwheads; sc->object = vm_pager_allocate(OBJT_SWAP, NULL, PAGE_SIZE * npage, VM_PROT_DEFAULT, 0, td->td_ucred); if (sc->object == NULL) return (ENOMEM); - sc->flags = mdio->md_options & (MD_FORCE | MD_RESERVE); - if (mdio->md_options & MD_RESERVE) { + sc->flags = mdr->md_options & (MD_FORCE | MD_RESERVE); + if (mdr->md_options & MD_RESERVE) { if (swap_pager_reserve(sc->object, 0, npage) < 0) { error = EDOM; goto finish; @@ -1593,7 +1604,7 @@ mdcreate_swap(struct md_s *sc, struct md_ioctl *mdio, } static int -mdcreate_null(struct md_s *sc, struct md_ioctl *mdio, struct thread *td) +mdcreate_null(struct md_s *sc, struct md_req *mdr, struct thread *td) { /* @@ -1607,7 +1618,7 @@ mdcreate_null(struct md_s *sc, struct md_ioctl *mdio, } static int -kern_mdattach_locked(struct thread *td, struct md_ioctl *mdio) +kern_mdattach_locked(struct thread *td, struct md_req *mdr) { struct md_s *sc; unsigned sectsize; @@ -1615,7 +1626,7 @@ kern_mdattach_locked(struct thread *td, struct md_ioct sx_assert(&md_sx, SA_XLOCKED); - switch (mdio->md_type) { + switch (mdr->md_type) { case MD_MALLOC: case MD_PRELOAD: case MD_VNODE: @@ -1625,35 +1636,35 @@ kern_mdattach_locked(struct thread *td, struct md_ioct default: return (EINVAL); } - if (mdio->md_sectorsize == 0) + if (mdr->md_sectorsize == 0) sectsize = DEV_BSIZE; else - sectsize = mdio->md_sectorsize; - if (sectsize > MAXPHYS || mdio->md_mediasize < sectsize) + sectsize = mdr->md_sectorsize; + if (sectsize > MAXPHYS || mdr->md_mediasize < sectsize) return (EINVAL); - if (mdio->md_options & MD_AUTOUNIT) - sc = mdnew(-1, &error, mdio->md_type); + if (mdr->md_options & MD_AUTOUNIT) + sc = mdnew(-1, &error, mdr->md_type); else { - if (mdio->md_unit > INT_MAX) + if (mdr->md_unit > INT_MAX) return (EINVAL); - sc = mdnew(mdio->md_unit, &error, mdio->md_type); + sc = mdnew(mdr->md_unit, &error, mdr->md_type); } if (sc == NULL) return (error); - if (mdio->md_label != NULL) - error = copyinstr(mdio->md_label, sc->label, + if (mdr->md_label != NULL) + error = copyinstr(mdr->md_label, sc->label, sizeof(sc->label), NULL); if (error != 0) goto err_after_new; - if (mdio->md_options & MD_AUTOUNIT) - mdio->md_unit = sc->unit; - sc->mediasize = mdio->md_mediasize; + if (mdr->md_options & MD_AUTOUNIT) + mdr->md_unit = sc->unit; + sc->mediasize = mdr->md_mediasize; sc->sectorsize = sectsize; error = EDOOFUS; switch (sc->type) { case MD_MALLOC: sc->start = mdstart_malloc; - error = mdcreate_malloc(sc, mdio); + error = mdcreate_malloc(sc, mdr); break; case MD_PRELOAD: /* @@ -1665,15 +1676,15 @@ kern_mdattach_locked(struct thread *td, struct md_ioct break; case MD_VNODE: sc->start = mdstart_vnode; - error = mdcreate_vnode(sc, mdio, td); + error = mdcreate_vnode(sc, mdr, td); break; case MD_SWAP: sc->start = mdstart_swap; - error = mdcreate_swap(sc, mdio, td); + error = mdcreate_swap(sc, mdr, td); break; case MD_NULL: sc->start = mdstart_null; - error = mdcreate_null(sc, mdio, td); + error = mdcreate_null(sc, mdr, td); break; } err_after_new: @@ -1691,122 +1702,122 @@ err_after_new: } static int -kern_mdattach(struct thread *td, struct md_ioctl *mdio) +kern_mdattach(struct thread *td, struct md_req *mdr) { int error; sx_xlock(&md_sx); - error = kern_mdattach_locked(td, mdio); + error = kern_mdattach_locked(td, mdr); sx_xunlock(&md_sx); return (error); } static int -kern_mddetach_locked(struct thread *td, struct md_ioctl *mdio) +kern_mddetach_locked(struct thread *td, struct md_req *mdr) { struct md_s *sc; sx_assert(&md_sx, SA_XLOCKED); - if (mdio->md_mediasize != 0 || - (mdio->md_options & ~MD_FORCE) != 0) + if (mdr->md_mediasize != 0 || + (mdr->md_options & ~MD_FORCE) != 0) return (EINVAL); - sc = mdfind(mdio->md_unit); + sc = mdfind(mdr->md_unit); if (sc == NULL) return (ENOENT); if (sc->opencount != 0 && !(sc->flags & MD_FORCE) && - !(mdio->md_options & MD_FORCE)) + !(mdr->md_options & MD_FORCE)) return (EBUSY); return (mddestroy(sc, td)); } static int -kern_mddetach(struct thread *td, struct md_ioctl *mdio) +kern_mddetach(struct thread *td, struct md_req *mdr) { int error; sx_xlock(&md_sx); - error = kern_mddetach_locked(td, mdio); + error = kern_mddetach_locked(td, mdr); sx_xunlock(&md_sx); return (error); } static int -kern_mdresize_locked(struct md_ioctl *mdio) +kern_mdresize_locked(struct md_req *mdr) { struct md_s *sc; sx_assert(&md_sx, SA_XLOCKED); - if ((mdio->md_options & ~(MD_FORCE | MD_RESERVE)) != 0) + if ((mdr->md_options & ~(MD_FORCE | MD_RESERVE)) != 0) return (EINVAL); - sc = mdfind(mdio->md_unit); + sc = mdfind(mdr->md_unit); if (sc == NULL) return (ENOENT); - if (mdio->md_mediasize < sc->sectorsize) + if (mdr->md_mediasize < sc->sectorsize) return (EINVAL); - if (mdio->md_mediasize < sc->mediasize && + if (mdr->md_mediasize < sc->mediasize && !(sc->flags & MD_FORCE) && - !(mdio->md_options & MD_FORCE)) + !(mdr->md_options & MD_FORCE)) return (EBUSY); - return (mdresize(sc, mdio)); + return (mdresize(sc, mdr)); } static int -kern_mdresize(struct md_ioctl *mdio) +kern_mdresize(struct md_req *mdr) { int error; sx_xlock(&md_sx); - error = kern_mdresize_locked(mdio); + error = kern_mdresize_locked(mdr); sx_xunlock(&md_sx); return (error); } static int -kern_mdquery_locked(struct md_ioctl *mdio) +kern_mdquery_locked(struct md_req *mdr) { struct md_s *sc; int error; sx_assert(&md_sx, SA_XLOCKED); - sc = mdfind(mdio->md_unit); + sc = mdfind(mdr->md_unit); if (sc == NULL) return (ENOENT); - mdio->md_type = sc->type; - mdio->md_options = sc->flags; - mdio->md_mediasize = sc->mediasize; - mdio->md_sectorsize = sc->sectorsize; + mdr->md_type = sc->type; + mdr->md_options = sc->flags; + mdr->md_mediasize = sc->mediasize; + mdr->md_sectorsize = sc->sectorsize; error = 0; - if (mdio->md_label != NULL) { - error = copyout(sc->label, mdio->md_label, + if (mdr->md_label != NULL) { + error = copyout(sc->label, mdr->md_label, strlen(sc->label) + 1); if (error != 0) return (error); } if (sc->type == MD_VNODE || - (sc->type == MD_PRELOAD && mdio->md_file != NULL)) - error = copyout(sc->file, mdio->md_file, + (sc->type == MD_PRELOAD && mdr->md_file != NULL)) + error = copyout(sc->file, mdr->md_file, strlen(sc->file) + 1); return (error); } static int -kern_mdquery(struct md_ioctl *mdio) +kern_mdquery(struct md_req *mdr) { int error; sx_xlock(&md_sx); - error = kern_mdquery_locked(mdio); + error = kern_mdquery_locked(mdr); sx_xunlock(&md_sx); return (error); } static int -kern_mdlist_locked(struct md_ioctl *mdio) +kern_mdlist_locked(struct md_req *mdr) { struct md_s *sc; int i; @@ -1814,9 +1825,9 @@ kern_mdlist_locked(struct md_ioctl *mdio) sx_assert(&md_sx, SA_XLOCKED); /* - * Write the number of md devices to mdio->md_pad[0]. - * Write the unit number of the first (MDNPAD - 2) units - * to mdio->md_pad[1::(MDNPAD - 2)] and terminate the + * Write the number of md devices to mdr->md_units[0]. + * Write the unit number of the first (mdr->md_units_nitems - 2) + * units to mdr->md_units[1::(mdr->md_units - 2)] and terminate the * list with -1. * * XXX: There is currently no mechanism to retrieve unit @@ -1827,22 +1838,22 @@ kern_mdlist_locked(struct md_ioctl *mdio) */ i = 1; LIST_FOREACH(sc, &md_softc_list, list) { - if (i < MDNPAD - 1) - mdio->md_pad[i] = sc->unit; + if (i < mdr->md_units_nitems - 1) + mdr->md_units[i] = sc->unit; i++; } - mdio->md_pad[MIN(i, MDNPAD - 1)] = -1; - mdio->md_pad[0] = i - 1; + mdr->md_units[MIN(i, mdr->md_units_nitems - 1)] = -1; + mdr->md_units[0] = i - 1; return (0); } static int -kern_mdlist(struct md_ioctl *mdio) +kern_mdlist(struct md_req *mdr) { int error; sx_xlock(&md_sx); - error = kern_mdlist_locked(mdio); + error = kern_mdlist_locked(mdr); sx_xunlock(&md_sx); return (error); } @@ -1851,6 +1862,7 @@ static int mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) { + struct md_req mdr; struct md_ioctl *mdio; int error; @@ -1858,37 +1870,67 @@ mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, printf("mdctlioctl(%s %lx %p %x %p)\n", devtoname(dev), cmd, addr, flags, td); - mdio = (struct md_ioctl *)addr; - if (mdio->md_version != MDIOVERSION) - return (EINVAL); + switch (cmd) { + case MDIOCATTACH: + case MDIOCDETACH: + case MDIOCRESIZE: + case MDIOCQUERY: + case MDIOCLIST: + mdio = (struct md_ioctl *)addr; + if (mdio->md_version != MDIOVERSION) + return (EINVAL); + mdr.md_unit = mdio->md_unit; + mdr.md_type = mdio->md_type; + mdr.md_mediasize = mdio->md_mediasize; + mdr.md_sectorsize = mdio->md_sectorsize; + mdr.md_options = mdio->md_options; + mdr.md_fwheads = mdio->md_fwheads; + mdr.md_fwsectors = mdio->md_fwsectors; + mdr.md_file = mdio->md_file; + /* If the file is adjacent to the md_ioctl it's in kernel. */ + if ((void *)mdio->md_file == (void *)(mdio + 1)) + mdr.md_file_seg = UIO_SYSSPACE; + else + mdr.md_file_seg = UIO_USERSPACE; + mdr.md_label = mdio->md_label; + mdr.md_units = &mdio->md_pad[0]; + mdr.md_units_nitems = nitems(mdio->md_pad); + break; + } - /* - * We assert the version number in the individual ioctl - * handlers instead of out here because (a) it is possible we - * may add another ioctl in the future which doesn't read an - * mdio, and (b) the correct return value for an unknown ioctl - * is ENOIOCTL, not EINVAL. - */ error = 0; switch (cmd) { case MDIOCATTACH: - error = kern_mdattach(td, mdio); + error = kern_mdattach(td, &mdr); break; case MDIOCDETACH: - error = kern_mddetach(td, mdio); + error = kern_mddetach(td, &mdr); break; case MDIOCRESIZE: - error = kern_mdresize(mdio); + error = kern_mdresize(&mdr); break; case MDIOCQUERY: - error = kern_mdquery(mdio); + error = kern_mdquery(&mdr); break; case MDIOCLIST: - error = kern_mdlist(mdio); + error = kern_mdlist(&mdr); break; default: error = ENOIOCTL; - }; + } + + switch (cmd) { + case MDIOCATTACH: + case MDIOCQUERY: + mdio->md_unit = mdr.md_unit; + mdio->md_type = mdr.md_type; + mdio->md_mediasize = mdr.md_mediasize; + mdio->md_sectorsize = mdr.md_sectorsize; + mdio->md_options = mdr.md_options; + mdio->md_fwheads = mdr.md_fwheads; + mdio->md_fwsectors = mdr.md_fwsectors; + break; + } return (error); } From owner-svn-src-all@freebsd.org Thu Mar 15 22:42:29 2018 Return-Path: Delivered-To: svn-src-all@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 798DEF5A960; Thu, 15 Mar 2018 22:42:29 +0000 (UTC) (envelope-from marius@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 2BB487D230; Thu, 15 Mar 2018 22:42:29 +0000 (UTC) (envelope-from marius@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 269851C13B; Thu, 15 Mar 2018 22:42:29 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FMgTvm066852; Thu, 15 Mar 2018 22:42:29 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FMgTfW066851; Thu, 15 Mar 2018 22:42:29 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201803152242.w2FMgTfW066851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 15 Mar 2018 22:42:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r331031 - stable/10 X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10 X-SVN-Commit-Revision: 331031 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 22:42:29 -0000 Author: marius Date: Thu Mar 15 22:42:28 2018 New Revision: 331031 URL: https://svnweb.freebsd.org/changeset/base/331031 Log: MFC: r287805 Unconditionally build CTF tools in the bootstrap-tools phase of the build. Stale CTF tools are a frequent source of DTrace issues, and they compile quickly enough that the increase in build time is negligible. Apart from what's described in the original commit message above, this change also fixes building GENERIC kernels, i. e. kernel configurations having "makeoptions WITH_CTF=1", when the host world has been built with WITHOUT_CDDL. Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Thu Mar 15 21:42:49 2018 (r331030) +++ stable/10/Makefile.inc1 Thu Mar 15 22:42:28 2018 (r331031) @@ -1371,11 +1371,9 @@ ${_bt}-usr.bin/clang/clang-tblgen: ${_bt}-lib/clang/li ${_bt}-usr.bin/clang/tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport .endif -# dtrace tools are required for older bootstrap env and cross-build -.if ${MK_CDDL} != "no" && \ - ((${BOOTSTRAPPING} < 1000034 && \ - !(${BOOTSTRAPPING} >= 901505 && ${BOOTSTRAPPING} < 999999)) \ - || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH})) +# Rebuild ctfconvert and ctfmerge to avoid difficult-to-diagnose failures +# resulting from missing bug fixes or ELF Toolchain updates. +.if ${MK_CDDL} != "no" _dtrace_tools= cddl/lib/libctf lib/libelf \ lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge From owner-svn-src-all@freebsd.org Thu Mar 15 22:51:11 2018 Return-Path: Delivered-To: svn-src-all@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 31493F5B25D; Thu, 15 Mar 2018 22:51:11 +0000 (UTC) (envelope-from marius@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 D45617D74B; Thu, 15 Mar 2018 22:51:10 +0000 (UTC) (envelope-from marius@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 CB2381C176; Thu, 15 Mar 2018 22:51:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FMpA7D068741; Thu, 15 Mar 2018 22:51:10 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FMpAuS068740; Thu, 15 Mar 2018 22:51:10 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201803152251.w2FMpAuS068740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 15 Mar 2018 22:51:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331032 - stable/11/sys/dev/sdhci X-SVN-Group: stable-11 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/11/sys/dev/sdhci X-SVN-Commit-Revision: 331032 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 22:51:11 -0000 Author: marius Date: Thu Mar 15 22:51:10 2018 New Revision: 331032 URL: https://svnweb.freebsd.org/changeset/base/331032 Log: MFC: r327315 Add quirks for Intel Denverton eMMC 5.0 controllers. Modified: stable/11/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- stable/11/sys/dev/sdhci/sdhci_pci.c Thu Mar 15 22:42:28 2018 (r331031) +++ stable/11/sys/dev/sdhci/sdhci_pci.c Thu Mar 15 22:51:10 2018 (r331032) @@ -120,6 +120,12 @@ static const struct sdhci_device { SDHCI_QUIRK_MMC_DDR52 | SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, + { 0x19db8086, 0xffff, "Intel Denverton eMMC 5.0 Controller", + SDHCI_QUIRK_INTEL_POWER_UP_RESET | + SDHCI_QUIRK_WAIT_WHILE_BUSY | + SDHCI_QUIRK_MMC_DDR52 | + SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 | + SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { 0x22948086, 0xffff, "Intel Braswell eMMC 4.5.1 Controller", SDHCI_QUIRK_DATA_TIMEOUT_1MHZ | SDHCI_QUIRK_INTEL_POWER_UP_RESET | From owner-svn-src-all@freebsd.org Thu Mar 15 22:51:14 2018 Return-Path: Delivered-To: svn-src-all@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 1CCA2F5B2A3; Thu, 15 Mar 2018 22:51:14 +0000 (UTC) (envelope-from marius@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 BFD5D7D755; Thu, 15 Mar 2018 22:51:13 +0000 (UTC) (envelope-from marius@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 BAD5C1C17A; Thu, 15 Mar 2018 22:51:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FMpDaR068788; Thu, 15 Mar 2018 22:51:13 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FMpDG5068787; Thu, 15 Mar 2018 22:51:13 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201803152251.w2FMpDG5068787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 15 Mar 2018 22:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r331033 - stable/10/sys/dev/sdhci X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10/sys/dev/sdhci X-SVN-Commit-Revision: 331033 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 22:51:14 -0000 Author: marius Date: Thu Mar 15 22:51:13 2018 New Revision: 331033 URL: https://svnweb.freebsd.org/changeset/base/331033 Log: MFC: r327315 Add quirks for Intel Denverton eMMC 5.0 controllers. Modified: stable/10/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_pci.c Thu Mar 15 22:51:10 2018 (r331032) +++ stable/10/sys/dev/sdhci/sdhci_pci.c Thu Mar 15 22:51:13 2018 (r331033) @@ -118,6 +118,12 @@ static const struct sdhci_device { SDHCI_QUIRK_MMC_DDR52 | SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, + { 0x19db8086, 0xffff, "Intel Denverton eMMC 5.0 Controller", + SDHCI_QUIRK_INTEL_POWER_UP_RESET | + SDHCI_QUIRK_WAIT_WHILE_BUSY | + SDHCI_QUIRK_MMC_DDR52 | + SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 | + SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { 0x22948086, 0xffff, "Intel Braswell eMMC 4.5.1 Controller", SDHCI_QUIRK_DATA_TIMEOUT_1MHZ | SDHCI_QUIRK_INTEL_POWER_UP_RESET | From owner-svn-src-all@freebsd.org Thu Mar 15 22:58:34 2018 Return-Path: Delivered-To: svn-src-all@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 AEAC4F5BA6D; Thu, 15 Mar 2018 22:58:34 +0000 (UTC) (envelope-from marius@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 62B9B7DCC7; Thu, 15 Mar 2018 22:58:34 +0000 (UTC) (envelope-from marius@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 5D9981C2CD; Thu, 15 Mar 2018 22:58:34 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FMwYjq072041; Thu, 15 Mar 2018 22:58:34 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FMwYP7072040; Thu, 15 Mar 2018 22:58:34 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201803152258.w2FMwYP7072040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 15 Mar 2018 22:58:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r331035 - stable/10/sys/dev/sdhci X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10/sys/dev/sdhci X-SVN-Commit-Revision: 331035 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 22:58:35 -0000 Author: marius Date: Thu Mar 15 22:58:34 2018 New Revision: 331035 URL: https://svnweb.freebsd.org/changeset/base/331035 Log: MFC: r327339, r327924 - There is no need to keep the tuning error and re-tuning interrupts enabled (though, no interrupt generation enabled for them) all the time as soon as (re-)tuning is supported; only enable them and let them generate interrupts when actually using (re-)tuning. - Also disable all interrupts except SDHCI_INT_DATA_AVAIL ones while executing tuning and not just their signaling. - Set the tuning error and re-tuning interrupt enable bits based on the SDHCI_TUNING_ENABLED rather than the SDHCI_TUNING_SUPPORTED flag, i. e. only when (re-)tuning is actually used. Currently, this change makes no net difference, though. Modified: stable/10/sys/dev/sdhci/sdhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.c Thu Mar 15 22:58:31 2018 (r331034) +++ stable/10/sys/dev/sdhci/sdhci.c Thu Mar 15 22:58:34 2018 (r331035) @@ -254,7 +254,7 @@ sdhci_tuning_intmask(struct sdhci_slot *slot) uint32_t intmask; intmask = 0; - if (slot->opt & SDHCI_TUNING_SUPPORTED) { + if (slot->opt & SDHCI_TUNING_ENABLED) { intmask |= SDHCI_INT_TUNEERR; if (slot->retune_mode == SDHCI_RETUNE_MODE_2 || slot->retune_mode == SDHCI_RETUNE_MODE_3) @@ -282,7 +282,7 @@ sdhci_init(struct sdhci_slot *slot) slot->intmask |= SDHCI_INT_CARD_REMOVE | SDHCI_INT_CARD_INSERT; } - WR4(slot, SDHCI_INT_ENABLE, slot->intmask | sdhci_tuning_intmask(slot)); + WR4(slot, SDHCI_INT_ENABLE, slot->intmask); WR4(slot, SDHCI_SIGNAL_ENABLE, slot->intmask); } @@ -574,6 +574,7 @@ sdhci_card_task(void *arg, int pending __unused) d = slot->dev; slot->dev = NULL; slot->intmask &= ~sdhci_tuning_intmask(slot); + WR4(slot, SDHCI_INT_ENABLE, slot->intmask); WR4(slot, SDHCI_SIGNAL_ENABLE, slot->intmask); slot->opt &= ~SDHCI_TUNING_ENABLED; SDHCI_UNLOCK(slot); @@ -1250,6 +1251,7 @@ sdhci_generic_tune(device_t brdev __unused, device_t r if (err == 0) { slot->opt |= SDHCI_TUNING_ENABLED; slot->intmask |= sdhci_tuning_intmask(slot); + WR4(slot, SDHCI_INT_ENABLE, slot->intmask); WR4(slot, SDHCI_SIGNAL_ENABLE, slot->intmask); if (slot->retune_ticks) { callout_reset(&slot->retune_callout, slot->retune_ticks, @@ -1318,6 +1320,7 @@ sdhci_exec_tuning(struct sdhci_slot *slot, bool reset) */ intmask = slot->intmask; slot->intmask = SDHCI_INT_DATA_AVAIL; + WR4(slot, SDHCI_INT_ENABLE, SDHCI_INT_DATA_AVAIL); WR4(slot, SDHCI_SIGNAL_ENABLE, SDHCI_INT_DATA_AVAIL); hostctrl2 = RD2(slot, SDHCI_HOST_CONTROL2); @@ -1348,8 +1351,17 @@ sdhci_exec_tuning(struct sdhci_slot *slot, bool reset) DELAY(1000); } + /* + * Restore DMA usage and interrupts. + * Note that the interrupt aggregation code might have cleared + * SDHCI_INT_DMA_END and/or SDHCI_INT_RESPONSE in slot->intmask + * and SDHCI_SIGNAL_ENABLE respectively so ensure SDHCI_INT_ENABLE + * doesn't lose these. + */ slot->opt = opt; slot->intmask = intmask; + WR4(slot, SDHCI_INT_ENABLE, intmask | SDHCI_INT_DMA_END | + SDHCI_INT_RESPONSE); WR4(slot, SDHCI_SIGNAL_ENABLE, intmask); if ((hostctrl2 & (SDHCI_CTRL2_EXEC_TUNING | From owner-svn-src-all@freebsd.org Thu Mar 15 22:58:31 2018 Return-Path: Delivered-To: svn-src-all@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 A3EDAF5BA3E; Thu, 15 Mar 2018 22:58:31 +0000 (UTC) (envelope-from marius@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 56E047DCBC; Thu, 15 Mar 2018 22:58:31 +0000 (UTC) (envelope-from marius@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 51A191C2CC; Thu, 15 Mar 2018 22:58:31 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FMwVwO071991; Thu, 15 Mar 2018 22:58:31 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FMwVms071990; Thu, 15 Mar 2018 22:58:31 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201803152258.w2FMwVms071990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 15 Mar 2018 22:58:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331034 - stable/11/sys/dev/sdhci X-SVN-Group: stable-11 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/11/sys/dev/sdhci X-SVN-Commit-Revision: 331034 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 22:58:31 -0000 Author: marius Date: Thu Mar 15 22:58:31 2018 New Revision: 331034 URL: https://svnweb.freebsd.org/changeset/base/331034 Log: MFC: r327339, r327924 - There is no need to keep the tuning error and re-tuning interrupts enabled (though, no interrupt generation enabled for them) all the time as soon as (re-)tuning is supported; only enable them and let them generate interrupts when actually using (re-)tuning. - Also disable all interrupts except SDHCI_INT_DATA_AVAIL ones while executing tuning and not just their signaling. - Set the tuning error and re-tuning interrupt enable bits based on the SDHCI_TUNING_ENABLED rather than the SDHCI_TUNING_SUPPORTED flag, i. e. only when (re-)tuning is actually used. Currently, this change makes no net difference, though. Modified: stable/11/sys/dev/sdhci/sdhci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/11/sys/dev/sdhci/sdhci.c Thu Mar 15 22:51:13 2018 (r331033) +++ stable/11/sys/dev/sdhci/sdhci.c Thu Mar 15 22:58:31 2018 (r331034) @@ -255,7 +255,7 @@ sdhci_tuning_intmask(struct sdhci_slot *slot) uint32_t intmask; intmask = 0; - if (slot->opt & SDHCI_TUNING_SUPPORTED) { + if (slot->opt & SDHCI_TUNING_ENABLED) { intmask |= SDHCI_INT_TUNEERR; if (slot->retune_mode == SDHCI_RETUNE_MODE_2 || slot->retune_mode == SDHCI_RETUNE_MODE_3) @@ -283,7 +283,7 @@ sdhci_init(struct sdhci_slot *slot) slot->intmask |= SDHCI_INT_CARD_REMOVE | SDHCI_INT_CARD_INSERT; } - WR4(slot, SDHCI_INT_ENABLE, slot->intmask | sdhci_tuning_intmask(slot)); + WR4(slot, SDHCI_INT_ENABLE, slot->intmask); WR4(slot, SDHCI_SIGNAL_ENABLE, slot->intmask); } @@ -575,6 +575,7 @@ sdhci_card_task(void *arg, int pending __unused) d = slot->dev; slot->dev = NULL; slot->intmask &= ~sdhci_tuning_intmask(slot); + WR4(slot, SDHCI_INT_ENABLE, slot->intmask); WR4(slot, SDHCI_SIGNAL_ENABLE, slot->intmask); slot->opt &= ~SDHCI_TUNING_ENABLED; SDHCI_UNLOCK(slot); @@ -1251,6 +1252,7 @@ sdhci_generic_tune(device_t brdev __unused, device_t r if (err == 0) { slot->opt |= SDHCI_TUNING_ENABLED; slot->intmask |= sdhci_tuning_intmask(slot); + WR4(slot, SDHCI_INT_ENABLE, slot->intmask); WR4(slot, SDHCI_SIGNAL_ENABLE, slot->intmask); if (slot->retune_ticks) { callout_reset(&slot->retune_callout, slot->retune_ticks, @@ -1319,6 +1321,7 @@ sdhci_exec_tuning(struct sdhci_slot *slot, bool reset) */ intmask = slot->intmask; slot->intmask = SDHCI_INT_DATA_AVAIL; + WR4(slot, SDHCI_INT_ENABLE, SDHCI_INT_DATA_AVAIL); WR4(slot, SDHCI_SIGNAL_ENABLE, SDHCI_INT_DATA_AVAIL); hostctrl2 = RD2(slot, SDHCI_HOST_CONTROL2); @@ -1349,8 +1352,17 @@ sdhci_exec_tuning(struct sdhci_slot *slot, bool reset) DELAY(1000); } + /* + * Restore DMA usage and interrupts. + * Note that the interrupt aggregation code might have cleared + * SDHCI_INT_DMA_END and/or SDHCI_INT_RESPONSE in slot->intmask + * and SDHCI_SIGNAL_ENABLE respectively so ensure SDHCI_INT_ENABLE + * doesn't lose these. + */ slot->opt = opt; slot->intmask = intmask; + WR4(slot, SDHCI_INT_ENABLE, intmask | SDHCI_INT_DMA_END | + SDHCI_INT_RESPONSE); WR4(slot, SDHCI_SIGNAL_ENABLE, intmask); if ((hostctrl2 & (SDHCI_CTRL2_EXEC_TUNING | From owner-svn-src-all@freebsd.org Thu Mar 15 23:01:01 2018 Return-Path: Delivered-To: svn-src-all@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 E1394F5BD8F; Thu, 15 Mar 2018 23:01:00 +0000 (UTC) (envelope-from marius@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 979D17E0EB; Thu, 15 Mar 2018 23:01:00 +0000 (UTC) (envelope-from marius@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 9293D1C2F2; Thu, 15 Mar 2018 23:01:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FN100p072260; Thu, 15 Mar 2018 23:01:00 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FN101m072259; Thu, 15 Mar 2018 23:01:00 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201803152301.w2FN101m072259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 15 Mar 2018 23:01:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331036 - stable/11/sys/dev/mmc X-SVN-Group: stable-11 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/11/sys/dev/mmc X-SVN-Commit-Revision: 331036 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 23:01:01 -0000 Author: marius Date: Thu Mar 15 23:01:00 2018 New Revision: 331036 URL: https://svnweb.freebsd.org/changeset/base/331036 Log: MFC: r327355, r327926 - Don't allow userland to switch partitions; it's next to impossible to recover from that, especially when something goes wrong. - When userland changes EXT_CSD, update the kernel copy before using relevant EXT_CSD bits in mmcsd_switch_part(). Modified: stable/11/sys/dev/mmc/mmcsd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mmc/mmcsd.c ============================================================================== --- stable/11/sys/dev/mmc/mmcsd.c Thu Mar 15 22:58:34 2018 (r331035) +++ stable/11/sys/dev/mmc/mmcsd.c Thu Mar 15 23:01:00 2018 (r331036) @@ -916,6 +916,16 @@ mmcsd_ioctl_cmd(struct mmcsd_part *part, struct mmc_io default: break; } + /* + * No partition switching in userland; it's almost impossible + * to recover from that, especially if things go wrong. + */ + if (cmd.opcode == MMC_SWITCH_FUNC && dp != NULL && + (((uint8_t *)dp)[EXT_CSD_PART_CONFIG] & + EXT_CSD_PART_CONFIG_ACC_MASK) != part->type) { + err = EINVAL; + goto out; + } } dev = sc->dev; mmcbus = sc->mmcbus; @@ -936,7 +946,7 @@ mmcsd_ioctl_cmd(struct mmcsd_part *part, struct mmc_io if (part->type == EXT_CSD_PART_CONFIG_ACC_RPMB) { /* * If the request went to the RPMB partition, try to ensure - * that the command actually has completed ... + * that the command actually has completed. */ retries = MMCSD_CMD_RETRIES; do { @@ -948,13 +958,6 @@ mmcsd_ioctl_cmd(struct mmcsd_part *part, struct mmc_io break; DELAY(1000); } while (retries-- > 0); - -switch_back: - /* ... and always switch back to the default partition. */ - err = mmcsd_switch_part(mmcbus, dev, rca, - EXT_CSD_PART_CONFIG_ACC_DEFAULT); - if (err != MMC_ERR_NONE) - goto release; } /* * If EXT_CSD was changed, our copy is outdated now. Specifically, @@ -963,6 +966,17 @@ switch_back: */ if (cmd.opcode == MMC_SWITCH_FUNC) { err = mmc_send_ext_csd(mmcbus, dev, sc->ext_csd); + if (err != MMC_ERR_NONE) + goto release; + } +switch_back: + if (part->type == EXT_CSD_PART_CONFIG_ACC_RPMB) { + /* + * If the request went to the RPMB partition, always switch + * back to the default partition (see mmcsd_switch_part()). + */ + err = mmcsd_switch_part(mmcbus, dev, rca, + EXT_CSD_PART_CONFIG_ACC_DEFAULT); if (err != MMC_ERR_NONE) goto release; } From owner-svn-src-all@freebsd.org Thu Mar 15 23:01:08 2018 Return-Path: Delivered-To: svn-src-all@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 EBB64F5BDC4; Thu, 15 Mar 2018 23:01:07 +0000 (UTC) (envelope-from marius@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 027467E13F; Thu, 15 Mar 2018 23:01:04 +0000 (UTC) (envelope-from marius@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 BCF9B1C2F7; Thu, 15 Mar 2018 23:01:04 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FN14vq073094; Thu, 15 Mar 2018 23:01:04 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FN14Hs073093; Thu, 15 Mar 2018 23:01:04 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201803152301.w2FN14Hs073093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 15 Mar 2018 23:01:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r331037 - stable/10/sys/dev/mmc X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10/sys/dev/mmc X-SVN-Commit-Revision: 331037 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 23:01:08 -0000 Author: marius Date: Thu Mar 15 23:01:04 2018 New Revision: 331037 URL: https://svnweb.freebsd.org/changeset/base/331037 Log: MFC: r327355, r327926 - Don't allow userland to switch partitions; it's next to impossible to recover from that, especially when something goes wrong. - When userland changes EXT_CSD, update the kernel copy before using relevant EXT_CSD bits in mmcsd_switch_part(). Modified: stable/10/sys/dev/mmc/mmcsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mmc/mmcsd.c ============================================================================== --- stable/10/sys/dev/mmc/mmcsd.c Thu Mar 15 23:01:00 2018 (r331036) +++ stable/10/sys/dev/mmc/mmcsd.c Thu Mar 15 23:01:04 2018 (r331037) @@ -914,6 +914,16 @@ mmcsd_ioctl_cmd(struct mmcsd_part *part, struct mmc_io default: break; } + /* + * No partition switching in userland; it's almost impossible + * to recover from that, especially if things go wrong. + */ + if (cmd.opcode == MMC_SWITCH_FUNC && dp != NULL && + (((uint8_t *)dp)[EXT_CSD_PART_CONFIG] & + EXT_CSD_PART_CONFIG_ACC_MASK) != part->type) { + err = EINVAL; + goto out; + } } dev = sc->dev; mmcbus = sc->mmcbus; @@ -934,7 +944,7 @@ mmcsd_ioctl_cmd(struct mmcsd_part *part, struct mmc_io if (part->type == EXT_CSD_PART_CONFIG_ACC_RPMB) { /* * If the request went to the RPMB partition, try to ensure - * that the command actually has completed ... + * that the command actually has completed. */ retries = MMCSD_CMD_RETRIES; do { @@ -946,13 +956,6 @@ mmcsd_ioctl_cmd(struct mmcsd_part *part, struct mmc_io break; DELAY(1000); } while (retries-- > 0); - -switch_back: - /* ... and always switch back to the default partition. */ - err = mmcsd_switch_part(mmcbus, dev, rca, - EXT_CSD_PART_CONFIG_ACC_DEFAULT); - if (err != MMC_ERR_NONE) - goto release; } /* * If EXT_CSD was changed, our copy is outdated now. Specifically, @@ -961,6 +964,17 @@ switch_back: */ if (cmd.opcode == MMC_SWITCH_FUNC) { err = mmc_send_ext_csd(mmcbus, dev, sc->ext_csd); + if (err != MMC_ERR_NONE) + goto release; + } +switch_back: + if (part->type == EXT_CSD_PART_CONFIG_ACC_RPMB) { + /* + * If the request went to the RPMB partition, always switch + * back to the default partition (see mmcsd_switch_part()). + */ + err = mmcsd_switch_part(mmcbus, dev, rca, + EXT_CSD_PART_CONFIG_ACC_DEFAULT); if (err != MMC_ERR_NONE) goto release; } From owner-svn-src-all@freebsd.org Thu Mar 15 23:02:50 2018 Return-Path: Delivered-To: svn-src-all@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 0CD11F5C132; Thu, 15 Mar 2018 23:02:50 +0000 (UTC) (envelope-from marius@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 B32487E5FB; Thu, 15 Mar 2018 23:02:49 +0000 (UTC) (envelope-from marius@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 AE13B1C465; Thu, 15 Mar 2018 23:02:49 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FN2nUv076766; Thu, 15 Mar 2018 23:02:49 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FN2nn9076765; Thu, 15 Mar 2018 23:02:49 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201803152302.w2FN2nn9076765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 15 Mar 2018 23:02:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331038 - stable/11/sys/dev/mmc X-SVN-Group: stable-11 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/11/sys/dev/mmc X-SVN-Commit-Revision: 331038 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 23:02:50 -0000 Author: marius Date: Thu Mar 15 23:02:49 2018 New Revision: 331038 URL: https://svnweb.freebsd.org/changeset/base/331038 Log: MFC: r327929 Use the correct revision specifier (EXT_CSD revision rather than system specification version) for deciding whether the EXT_CSD register includes the EXT_CSD_GEN_CMD6_TIME field. Submitted by: Masanobu SAITOH Modified: stable/11/sys/dev/mmc/mmc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mmc/mmc.c ============================================================================== --- stable/11/sys/dev/mmc/mmc.c Thu Mar 15 23:01:04 2018 (r331037) +++ stable/11/sys/dev/mmc/mmc.c Thu Mar 15 23:02:49 2018 (r331038) @@ -1871,7 +1871,7 @@ mmc_discover_cards(struct mmc_softc *sc) * units of 10 ms), defaulting to 500 ms. */ ivar->cmd6_time = 500 * 1000; - if (ivar->csd.spec_vers >= 6) + if (ivar->raw_ext_csd[EXT_CSD_REV] >= 6) ivar->cmd6_time = 10 * ivar->raw_ext_csd[EXT_CSD_GEN_CMD6_TIME]; /* Handle HC erase sector size. */ From owner-svn-src-all@freebsd.org Thu Mar 15 23:02:53 2018 Return-Path: Delivered-To: svn-src-all@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 1197BF5C163; Thu, 15 Mar 2018 23:02:53 +0000 (UTC) (envelope-from marius@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 AB25C7E60F; Thu, 15 Mar 2018 23:02:52 +0000 (UTC) (envelope-from marius@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 A3AE21C466; Thu, 15 Mar 2018 23:02:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FN2qDM076815; Thu, 15 Mar 2018 23:02:52 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FN2qBB076814; Thu, 15 Mar 2018 23:02:52 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201803152302.w2FN2qBB076814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 15 Mar 2018 23:02:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r331039 - stable/10/sys/dev/mmc X-SVN-Group: stable-10 X-SVN-Commit-Author: marius X-SVN-Commit-Paths: stable/10/sys/dev/mmc X-SVN-Commit-Revision: 331039 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 23:02:53 -0000 Author: marius Date: Thu Mar 15 23:02:52 2018 New Revision: 331039 URL: https://svnweb.freebsd.org/changeset/base/331039 Log: MFC: r327929 Use the correct revision specifier (EXT_CSD revision rather than system specification version) for deciding whether the EXT_CSD register includes the EXT_CSD_GEN_CMD6_TIME field. Submitted by: Masanobu SAITOH Modified: stable/10/sys/dev/mmc/mmc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mmc/mmc.c ============================================================================== --- stable/10/sys/dev/mmc/mmc.c Thu Mar 15 23:02:49 2018 (r331038) +++ stable/10/sys/dev/mmc/mmc.c Thu Mar 15 23:02:52 2018 (r331039) @@ -1870,7 +1870,7 @@ mmc_discover_cards(struct mmc_softc *sc) * units of 10 ms), defaulting to 500 ms. */ ivar->cmd6_time = 500 * 1000; - if (ivar->csd.spec_vers >= 6) + if (ivar->raw_ext_csd[EXT_CSD_REV] >= 6) ivar->cmd6_time = 10 * ivar->raw_ext_csd[EXT_CSD_GEN_CMD6_TIME]; /* Handle HC erase sector size. */ From owner-svn-src-all@freebsd.org Thu Mar 15 23:32:29 2018 Return-Path: Delivered-To: svn-src-all@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 E12D8F5E0A6; Thu, 15 Mar 2018 23:32:29 +0000 (UTC) (envelope-from avos@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 B8F497F950; Thu, 15 Mar 2018 23:32:29 +0000 (UTC) (envelope-from avos@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 B402D1C909; Thu, 15 Mar 2018 23:32:29 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2FNWT5e091679; Thu, 15 Mar 2018 23:32:29 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2FNWT88091678; Thu, 15 Mar 2018 23:32:29 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201803152332.w2FNWT88091678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 15 Mar 2018 23:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331040 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 331040 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 23:32:30 -0000 Author: avos Date: Thu Mar 15 23:32:29 2018 New Revision: 331040 URL: https://svnweb.freebsd.org/changeset/base/331040 Log: Correct comment for IFM_IEEE80211_VHT media variant. Modified: head/sys/net/if_media.h Modified: head/sys/net/if_media.h ============================================================================== --- head/sys/net/if_media.h Thu Mar 15 23:02:52 2018 (r331039) +++ head/sys/net/if_media.h Thu Mar 15 23:32:29 2018 (r331040) @@ -270,7 +270,7 @@ uint64_t ifmedia_baudrate(int); #define IFM_IEEE80211_OFDM27 23 /* OFDM 27Mbps */ /* NB: not enough bits to express MCS fully */ #define IFM_IEEE80211_MCS 24 /* HT MCS rate */ -#define IFM_IEEE80211_VHT 25 /* HT MCS rate */ +#define IFM_IEEE80211_VHT 25 /* VHT MCS rate */ #define IFM_IEEE80211_ADHOC 0x00000100 /* Operate in Adhoc mode */ #define IFM_IEEE80211_HOSTAP 0x00000200 /* Operate in Host AP mode */ From owner-svn-src-all@freebsd.org Fri Mar 16 00:09:16 2018 Return-Path: Delivered-To: svn-src-all@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 A8BA1F60A3E; Fri, 16 Mar 2018 00:09:16 +0000 (UTC) (envelope-from avos@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 57B8780F8F; Fri, 16 Mar 2018 00:09:16 +0000 (UTC) (envelope-from avos@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 52B5D1CDE0; Fri, 16 Mar 2018 00:09:16 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2G09GRR007313; Fri, 16 Mar 2018 00:09:16 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2G09GbV007312; Fri, 16 Mar 2018 00:09:16 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201803160009.w2G09GbV007312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 16 Mar 2018 00:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331041 - head/sys/dev/usb/wlan X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/dev/usb/wlan X-SVN-Commit-Revision: 331041 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 00:09:16 -0000 Author: avos Date: Fri Mar 16 00:09:16 2018 New Revision: 331041 URL: https://svnweb.freebsd.org/changeset/base/331041 Log: urtw(4): provide names for some commonly used rate indices + drop now-unused urtw_rate2rtl() Modified: head/sys/dev/usb/wlan/if_urtw.c Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Thu Mar 15 23:32:29 2018 (r331040) +++ head/sys/dev/usb/wlan/if_urtw.c Fri Mar 16 00:09:16 2018 (r331041) @@ -65,6 +65,12 @@ __FBSDID("$FreeBSD$"); #include #include +/* copy some rate indices from if_rtwn_ridx.h */ +#define URTW_RIDX_CCK5 2 +#define URTW_RIDX_CCK11 3 +#define URTW_RIDX_OFDM6 4 +#define URTW_RIDX_OFDM24 8 + static SYSCTL_NODE(_hw_usb, OID_AUTO, urtw, CTLFLAG_RW, 0, "USB Realtek 8187L"); #ifdef URTW_DEBUG int urtw_debug = 0; @@ -682,7 +688,6 @@ static void urtw_ledtask(void *, int); static void urtw_watchdog(void *); static void urtw_set_multi(void *); static int urtw_isbmode(uint16_t); -static uint16_t urtw_rate2rtl(uint32_t); static uint16_t urtw_rtl2rate(uint32_t); static usb_error_t urtw_set_rate(struct urtw_softc *); static usb_error_t urtw_update_msr(struct urtw_softc *); @@ -866,7 +871,7 @@ urtw_attach(device_t dev) sc->sc_rts_retry = URTW_DEFAULT_RTS_RETRY; sc->sc_tx_retry = URTW_DEFAULT_TX_RETRY; - sc->sc_currate = 3; + sc->sc_currate = URTW_RIDX_CCK11; sc->sc_preamble_mode = urtw_preamble_mode; ic->ic_softc = sc; @@ -1766,8 +1771,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_ flags |= URTW_TX_FLAG_CTS; if (rtsenable) { flags |= URTW_TX_FLAG_RTS; - flags |= (urtw_rate2rtl(11) & 0xf) << - URTW_TX_FLAG_RTSRATE_SHIFT; + flags |= URTW_RIDX_CCK5 << URTW_TX_FLAG_RTSRATE_SHIFT; tx->rtsdur = rtsdur; } tx->flag = htole32(flags); @@ -1788,7 +1792,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_ flags |= URTW_TX_FLAG_RTS; tx->rtsdur = rtsdur; } - flags |= (urtw_rate2rtl(11) & 0xf) << URTW_TX_FLAG_RTSRATE_SHIFT; + flags |= URTW_RIDX_CCK5 << URTW_TX_FLAG_RTSRATE_SHIFT; tx->flag = htole32(flags); tx->retry = 3; /* CW minimum */ tx->retry |= 7 << 4; /* CW maximum */ @@ -1908,9 +1912,9 @@ urtw_set_rate(struct urtw_softc *sc) uint16_t data; usb_error_t error; - basic_rate = urtw_rate2rtl(48); - min_rr_rate = urtw_rate2rtl(12); - max_rr_rate = urtw_rate2rtl(48); + basic_rate = URTW_RIDX_OFDM24; + min_rr_rate = URTW_RIDX_OFDM6; + max_rr_rate = URTW_RIDX_OFDM24; urtw_write8_m(sc, URTW_RESP_RATE, max_rr_rate << URTW_RESP_MAX_RATE_SHIFT | @@ -1925,19 +1929,6 @@ urtw_set_rate(struct urtw_softc *sc) urtw_write16_m(sc, URTW_BRSR, data); fail: return (error); -} - -static uint16_t -urtw_rate2rtl(uint32_t rate) -{ - unsigned int i; - - for (i = 0; i < nitems(urtw_ratetable); i++) { - if (rate == urtw_ratetable[i].reg) - return urtw_ratetable[i].val; - } - - return (3); } static uint16_t From owner-svn-src-all@freebsd.org Fri Mar 16 00:38:11 2018 Return-Path: Delivered-To: svn-src-all@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 3A32CF62740; Fri, 16 Mar 2018 00:38:11 +0000 (UTC) (envelope-from avos@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 E27A181F6C; Fri, 16 Mar 2018 00:38:10 +0000 (UTC) (envelope-from avos@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 DD6851D2C9; Fri, 16 Mar 2018 00:38:10 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2G0cAqE022137; Fri, 16 Mar 2018 00:38:10 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2G0cAAT022135; Fri, 16 Mar 2018 00:38:10 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201803160038.w2G0cAAT022135@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 16 Mar 2018 00:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331042 - head/sys/dev/usb/wlan X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/dev/usb/wlan X-SVN-Commit-Revision: 331042 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 00:38:11 -0000 Author: avos Date: Fri Mar 16 00:38:10 2018 New Revision: 331042 URL: https://svnweb.freebsd.org/changeset/base/331042 Log: urtw(4), zyd(4): reduce code verbosity. No functional change intended. Modified: head/sys/dev/usb/wlan/if_urtw.c head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Fri Mar 16 00:09:16 2018 (r331041) +++ head/sys/dev/usb/wlan/if_urtw.c Fri Mar 16 00:38:10 2018 (r331042) @@ -1661,14 +1661,17 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_ sc->sc_xfer[URTW_8187B_BULK_TX_VO] }; struct usb_xfer *xfer; - int dur = 0, rtsdur = 0, rtsenable = 0, ctsenable = 0, rate, - pkttime = 0, txdur = 0, isshort = 0, xferlen; + int dur = 0, rtsdur = 0, rtsenable = 0, ctsenable = 0, rate, type, + pkttime = 0, txdur = 0, isshort = 0, xferlen, ismcast; uint16_t acktime, rtstime, ctstime; uint32_t flags; usb_error_t error; URTW_ASSERT_LOCKED(sc); + ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); + type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; + /* * Software crypto. */ @@ -1697,13 +1700,13 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_ ieee80211_radiotap_tx(vap, m0); } - if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_MGT || - (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_CTL || + if (type == IEEE80211_FC0_TYPE_MGT || + type == IEEE80211_FC0_TYPE_CTL || (m0->m_flags & M_EAPOL) != 0) { rate = tp->mgmtrate; } else { /* for data frames */ - if (IEEE80211_IS_MULTICAST(wh->i_addr1)) + if (ismcast) rate = tp->mcastrate; else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) rate = tp->ucastrate; @@ -1713,7 +1716,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_ sc->sc_stats.txrates[sc->sc_currate]++; - if (IEEE80211_IS_MULTICAST(wh->i_addr1)) + if (ismcast) txdur = pkttime = urtw_compute_txtime(m0->m_pkthdr.len + IEEE80211_CRC_LEN, rate, 0, 0); else { @@ -1776,8 +1779,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_ } tx->flag = htole32(flags); tx->txdur = txdur; - if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == - IEEE80211_FC0_TYPE_MGT && + if (type == IEEE80211_FC0_TYPE_MGT && (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == IEEE80211_FC0_SUBTYPE_PROBE_RESP) tx->retry = 1; @@ -1805,7 +1807,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_ data->m = m0; if (sc->sc_flags & URTW_RTL8187B) { - switch (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) { + switch (type) { case IEEE80211_FC0_TYPE_CTL: case IEEE80211_FC0_TYPE_MGT: xfer = sc->sc_xfer[URTW_8187B_BULK_TX_EP12]; Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Fri Mar 16 00:09:16 2018 (r331041) +++ head/sys/dev/usb/wlan/if_zyd.c Fri Mar 16 00:38:10 2018 (r331042) @@ -2443,7 +2443,7 @@ zyd_tx_start(struct zyd_softc *sc, struct mbuf *m0, st struct ieee80211_frame *wh; const struct ieee80211_txparam *tp = ni->ni_txparms; struct ieee80211_key *k; - int rate, totlen; + int rate, totlen, type, ismcast; static const uint8_t ratediv[] = ZYD_TX_RATEDIV; uint8_t phy; uint16_t pktlen; @@ -2454,13 +2454,16 @@ zyd_tx_start(struct zyd_softc *sc, struct mbuf *m0, st STAILQ_REMOVE_HEAD(&sc->tx_free, next); sc->tx_nfree--; - if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_MGT || - (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_CTL || + ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); + type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; + + if (type == IEEE80211_FC0_TYPE_MGT || + type == IEEE80211_FC0_TYPE_CTL || (m0->m_flags & M_EAPOL) != 0) { rate = tp->mgmtrate; } else { /* for data frames */ - if (IEEE80211_IS_MULTICAST(wh->i_addr1)) + if (ismcast) rate = tp->mcastrate; else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) rate = tp->ucastrate; @@ -2498,7 +2501,7 @@ zyd_tx_start(struct zyd_softc *sc, struct mbuf *m0, st desc->len = htole16(totlen); desc->flags = ZYD_TX_FLAG_BACKOFF; - if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { + if (!ismcast) { /* multicast frames are not sent at OFDM rates in 802.11b/g */ if (totlen > vap->iv_rtsthreshold) { desc->flags |= ZYD_TX_FLAG_RTS; From owner-svn-src-all@freebsd.org Fri Mar 16 01:03:11 2018 Return-Path: Delivered-To: svn-src-all@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 2B551F64701; Fri, 16 Mar 2018 01:03:11 +0000 (UTC) (envelope-from avos@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 D0F938306B; Fri, 16 Mar 2018 01:03:10 +0000 (UTC) (envelope-from avos@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 CACFE1D762; Fri, 16 Mar 2018 01:03:10 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2G13Ads036570; Fri, 16 Mar 2018 01:03:10 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2G13AH7036566; Fri, 16 Mar 2018 01:03:10 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201803160103.w2G13AH7036566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 16 Mar 2018 01:03:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331043 - in head/sys/dev/rtwn: . rtl8188e rtl8192c rtl8812a X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in head/sys/dev/rtwn: . rtl8188e rtl8192c rtl8812a X-SVN-Commit-Revision: 331043 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 01:03:11 -0000 Author: avos Date: Fri Mar 16 01:03:10 2018 New Revision: 331043 URL: https://svnweb.freebsd.org/changeset/base/331043 Log: rtwn(4): de-hardcode ('h/w rate index' - 'corresponding MCS index') constant Modified: head/sys/dev/rtwn/if_rtwn_ridx.h head/sys/dev/rtwn/rtl8188e/r88e_rx.c head/sys/dev/rtwn/rtl8192c/r92c_rx.c head/sys/dev/rtwn/rtl8812a/r12a_rx.c Modified: head/sys/dev/rtwn/if_rtwn_ridx.h ============================================================================== --- head/sys/dev/rtwn/if_rtwn_ridx.h Fri Mar 16 00:38:10 2018 (r331042) +++ head/sys/dev/rtwn/if_rtwn_ridx.h Fri Mar 16 01:03:10 2018 (r331043) @@ -36,8 +36,10 @@ #define RTWN_RIDX_OFDM36 9 #define RTWN_RIDX_OFDM48 10 #define RTWN_RIDX_OFDM54 11 -#define RTWN_RIDX_HT_MCS(i) (12 + (i)) +#define RTWN_RIDX_HT_MCS_SHIFT 12 +#define RTWN_RIDX_HT_MCS(i) (RTWN_RIDX_HT_MCS_SHIFT + (i)) + #define RTWN_RIDX_COUNT 28 #define RTWN_RIDX_UNKNOWN (uint8_t)-1 @@ -53,8 +55,7 @@ static __inline uint8_t rate2ridx(uint8_t rate) { if (rate & IEEE80211_RATE_MCS) { - /* 11n rates start at idx 12 */ - return ((rate & 0xf) + 12); + return ((rate & 0xf) + RTWN_RIDX_HT_MCS_SHIFT); } switch (rate) { /* 11g */ Modified: head/sys/dev/rtwn/rtl8188e/r88e_rx.c ============================================================================== --- head/sys/dev/rtwn/rtl8188e/r88e_rx.c Fri Mar 16 00:38:10 2018 (r331042) +++ head/sys/dev/rtwn/rtl8188e/r88e_rx.c Fri Mar 16 01:03:10 2018 (r331043) @@ -108,7 +108,8 @@ r88e_ratectl_tx_complete(struct rtwn_softc *sc, uint8_ txs.long_retries = ntries; if (rpt->final_rate > RTWN_RIDX_OFDM54) { /* MCS */ txs.final_rate = - (rpt->final_rate - 12) | IEEE80211_RATE_MCS; + rpt->final_rate - RTWN_RIDX_HT_MCS_SHIFT; + txs.final_rate |= IEEE80211_RATE_MCS; } else txs.final_rate = ridx2rate[rpt->final_rate]; if (rpt->rptb1 & R88E_RPTB1_PKT_OK) Modified: head/sys/dev/rtwn/rtl8192c/r92c_rx.c ============================================================================== --- head/sys/dev/rtwn/rtl8192c/r92c_rx.c Fri Mar 16 00:38:10 2018 (r331042) +++ head/sys/dev/rtwn/rtl8192c/r92c_rx.c Fri Mar 16 01:03:10 2018 (r331043) @@ -140,7 +140,8 @@ r92c_get_rx_stats(struct rtwn_softc *sc, struct ieee80 else rxs->c_pktflags |= IEEE80211_RX_F_OFDM; } else { /* MCS0~15. */ - rxs->c_rate = IEEE80211_RATE_MCS | (rate - 12); + rxs->c_rate = + IEEE80211_RATE_MCS | (rate - RTWN_RIDX_HT_MCS_SHIFT); rxs->c_pktflags |= IEEE80211_RX_F_HT; } } Modified: head/sys/dev/rtwn/rtl8812a/r12a_rx.c ============================================================================== --- head/sys/dev/rtwn/rtl8812a/r12a_rx.c Fri Mar 16 00:38:10 2018 (r331042) +++ head/sys/dev/rtwn/rtl8812a/r12a_rx.c Fri Mar 16 01:03:10 2018 (r331043) @@ -115,7 +115,8 @@ r12a_ratectl_tx_complete(struct rtwn_softc *sc, uint8_ txs.long_retries = ntries; if (rpt->final_rate > RTWN_RIDX_OFDM54) { /* MCS */ txs.final_rate = - (rpt->final_rate - 12) | IEEE80211_RATE_MCS; + rpt->final_rate - RTWN_RIDX_HT_MCS_SHIFT; + txs.final_rate |= IEEE80211_RATE_MCS; } else txs.final_rate = ridx2rate[rpt->final_rate]; if (rpt->txrptb0 & R12A_TXRPTB0_RETRY_OVER) @@ -310,7 +311,8 @@ r12a_get_rx_stats(struct rtwn_softc *sc, struct ieee80 rxs->c_pktflags |= IEEE80211_RX_F_OFDM; } else { /* MCS0~15. */ /* TODO: VHT rates */ - rxs->c_rate = IEEE80211_RATE_MCS | (rate - 12); + rxs->c_rate = + IEEE80211_RATE_MCS | (rate - RTWN_RIDX_HT_MCS_SHIFT); rxs->c_pktflags |= IEEE80211_RX_F_HT; } From owner-svn-src-all@freebsd.org Fri Mar 16 02:44:19 2018 Return-Path: Delivered-To: svn-src-all@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 C1E11F4371F; Fri, 16 Mar 2018 02:44:19 +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 7261686CE2; Fri, 16 Mar 2018 02:44:19 +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 67D5B1E684; Fri, 16 Mar 2018 02:44:19 +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 w2G2iJFn086184; Fri, 16 Mar 2018 02:44:19 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2G2iIfl086176; Fri, 16 Mar 2018 02:44:18 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803160244.w2G2iIfl086176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 16 Mar 2018 02:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331044 - in stable/11/sys: cam/ata cam/scsi dev/bhnd/siba dev/sdhci dev/usb dev/usb/quirk X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/sys: cam/ata cam/scsi dev/bhnd/siba dev/sdhci dev/usb dev/usb/quirk X-SVN-Commit-Revision: 331044 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 02:44:20 -0000 Author: eadler Date: Fri Mar 16 02:44:18 2018 New Revision: 331044 URL: https://svnweb.freebsd.org/changeset/base/331044 Log: MFC r305373,r312344,r318095,r319117,r320948,r320953,r328528: siba(4): Add missing bhnd_device/bhnd_device_quirk table terminator entries. This resulted in an over-read on siba chipsets that failed to match the existing entries. r312344 | sbruno | 2017-01-17 14:52:48 +0000 (Tue, 17 Jan 2017) | 7 lines Add 4k quirk for Micron 5100 and Intel S3610 SSDs r318095 | loos | 2017-05-09 19:01:57 +0000 (Tue, 09 May 2017) | 9 lines Add a new SDHCI quirk, SDHCI_QUIRK_BROKEN_AUTO_STOP, to workaround controllers that do not support or have broken ACMD12 implementations. r319117 | wma | 2017-05-29 09:22:53 +0000 (Mon, 29 May 2017) | 16 lines Introduce Genesys GL3224 quirks The Genesys chip is failing when issueing READ_CAP(16) command. Force a quirk to disable it and use READ_CAP(10) instead. Also, depending on used firmware, GL3224 can be recognized either as 'storage device' or 'mass storage class' - enable both variants in scsi_quirk_table. r320948 | sbruno | 2017-07-13 15:33:08 +0000 (Thu, 13 Jul 2017) | 6 lines Add 4K quirks for Samsung 750 EVO SSD r320953 | sbruno | 2017-07-13 16:56:26 +0000 (Thu, 13 Jul 2017) | 5 lines Add 4k and NCQ_TRIM_BROKEN quirks for Samsung 845 SSDs. r328528 | ian | 2018-01-29 03:24:02 +0000 (Mon, 29 Jan 2018) | 3 lines Add a NO_GETMAXLUN quirk for the JMicron JMS567 USB to SATA bridge, to prevent lengthy timeout pauses while probing/attaching drives. Modified: stable/11/sys/cam/ata/ata_da.c stable/11/sys/cam/scsi/scsi_da.c stable/11/sys/cam/scsi/scsi_xpt.c stable/11/sys/dev/bhnd/siba/siba_bhndb.c stable/11/sys/dev/sdhci/sdhci.c stable/11/sys/dev/sdhci/sdhci.h stable/11/sys/dev/usb/quirk/usb_quirk.c stable/11/sys/dev/usb/usbdevs Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ata/ata_da.c ============================================================================== --- stable/11/sys/cam/ata/ata_da.c Fri Mar 16 01:03:10 2018 (r331043) +++ stable/11/sys/cam/ata/ata_da.c Fri Mar 16 02:44:18 2018 (r331044) @@ -513,6 +513,14 @@ static struct ada_quirk_entry ada_quirk_table[] = }, { /* + * Intel S3610 Series SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "INTEL SSDSC2BX*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* * Intel X25-M Series SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ @@ -569,6 +577,14 @@ static struct ada_quirk_entry ada_quirk_table[] = }, { /* + * Micron 5100 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Micron 5100 MTFDDAK*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* * OCZ Agility 2 SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ @@ -617,6 +633,14 @@ static struct ada_quirk_entry ada_quirk_table[] = }, { /* + * Samsung 750 SSDs + * 4k optimised, NCQ TRIM seems to work + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Samsung SSD 750*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* * Samsung 830 Series SSDs * 4k optimised, NCQ TRIM Broken (normal TRIM is fine) */ @@ -629,6 +653,14 @@ static struct ada_quirk_entry ada_quirk_table[] = * 4k optimised, NCQ TRIM Broken (normal TRIM is fine) */ { T_DIRECT, SIP_MEDIA_FIXED, "*", "Samsung SSD 840*", "*" }, + /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN + }, + { + /* + * Samsung 845 SSDs + * 4k optimised, NCQ TRIM Broken (normal TRIM is fine) + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Samsung SSD 845*", "*" }, /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN }, { Modified: stable/11/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_da.c Fri Mar 16 01:03:10 2018 (r331043) +++ stable/11/sys/cam/scsi/scsi_da.c Fri Mar 16 02:44:18 2018 (r331044) @@ -682,6 +682,13 @@ static struct da_quirk_entry da_quirk_table[] = }, { /* + * Genesys GL3224 + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "Generic*", "STORAGE DEVICE*", + "120?"}, /*quirks*/ DA_Q_NO_SYNC_CACHE | DA_Q_4K | DA_Q_NO_RC16 + }, + { + /* * Genesys 6-in-1 Card Reader * PR: usb/94647 */ @@ -836,6 +843,11 @@ static struct da_quirk_entry da_quirk_table[] = /*quirks*/DA_Q_4K }, { + /* Micron Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Micron 5100 MTFDDAK*", "*" }, + /*quirks*/DA_Q_4K + }, + { /* Samsung Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "SAMSUNG HD155UI*", "*" }, /*quirks*/DA_Q_4K @@ -1158,6 +1170,14 @@ static struct da_quirk_entry da_quirk_table[] = }, { /* + * Intel S3610 Series SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "INTEL SSDSC2BX*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* * Intel X25-M Series SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ @@ -1238,6 +1258,14 @@ static struct da_quirk_entry da_quirk_table[] = }, { /* + * Samsung 750 Series SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Samsung SSD 750*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* * Samsung 830 Series SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ @@ -1250,6 +1278,14 @@ static struct da_quirk_entry da_quirk_table[] = * 4k optimised & trim only works in 4k requests + 4k aligned */ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Samsung SSD 840*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* + * Samsung 845 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Samsung SSD 845*", "*" }, /*quirks*/DA_Q_4K }, { Modified: stable/11/sys/cam/scsi/scsi_xpt.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_xpt.c Fri Mar 16 01:03:10 2018 (r331043) +++ stable/11/sys/cam/scsi/scsi_xpt.c Fri Mar 16 02:44:18 2018 (r331044) @@ -547,6 +547,14 @@ static struct scsi_quirk_entry scsi_quirk_table[] = CAM_QUIRK_NORPTLUNS, /*mintags*/2, /*maxtags*/255 }, { + { T_DIRECT, SIP_MEDIA_REMOVABLE, "Generic", "STORAGE DEVICE*", "120?" }, + CAM_QUIRK_NORPTLUNS, /*mintags*/2, /*maxtags*/255 + }, + { + { T_DIRECT, SIP_MEDIA_REMOVABLE, "Generic", "MassStorageClass", "1533" }, + CAM_QUIRK_NORPTLUNS, /*mintags*/2, /*maxtags*/255 + }, + { /* Default tagged queuing parameters for all devices */ { T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED, Modified: stable/11/sys/dev/bhnd/siba/siba_bhndb.c ============================================================================== --- stable/11/sys/dev/bhnd/siba/siba_bhndb.c Fri Mar 16 01:03:10 2018 (r331043) +++ stable/11/sys/dev/bhnd/siba/siba_bhndb.c Fri Mar 16 02:44:18 2018 (r331044) @@ -71,10 +71,12 @@ enum { static struct bhnd_device_quirk bridge_quirks[] = { BHND_CHIP_QUIRK(4311, HWREV_EQ(2), SIBA_QUIRK_PCIE_D11_SB_TIMEOUT), BHND_CHIP_QUIRK(4312, HWREV_EQ(0), SIBA_QUIRK_PCIE_D11_SB_TIMEOUT), + BHND_DEVICE_QUIRK_END }; static struct bhnd_device bridge_devs[] = { BHND_DEVICE(BCM, PCI, NULL, bridge_quirks), + BHND_DEVICE_END }; static int Modified: stable/11/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/11/sys/dev/sdhci/sdhci.c Fri Mar 16 01:03:10 2018 (r331043) +++ stable/11/sys/dev/sdhci/sdhci.c Fri Mar 16 02:44:18 2018 (r331044) @@ -1439,7 +1439,7 @@ sdhci_set_transfer_mode(struct sdhci_slot *slot, struc mode |= SDHCI_TRNS_MULTI; if (data->flags & MMC_DATA_READ) mode |= SDHCI_TRNS_READ; - if (slot->req->stop) + if (slot->req->stop && !(slot->quirks & SDHCI_QUIRK_BROKEN_AUTO_STOP)) mode |= SDHCI_TRNS_ACMD12; if (slot->flags & SDHCI_USE_DMA) mode |= SDHCI_TRNS_DMA; @@ -1695,7 +1695,8 @@ sdhci_finish_data(struct sdhci_slot *slot) slot->intmask |= SDHCI_INT_RESPONSE); } /* Unload rest of data from DMA buffer. */ - if (!slot->data_done && (slot->flags & SDHCI_USE_DMA)) { + if (!slot->data_done && (slot->flags & SDHCI_USE_DMA) && + slot->curcmd->data != NULL) { if (data->flags & MMC_DATA_READ) { left = data->len - slot->offset; bus_dmamap_sync(slot->dmatag, slot->dmamap, @@ -1735,17 +1736,18 @@ sdhci_start(struct sdhci_slot *slot) sdhci_start_command(slot, req->cmd); return; } -/* We don't need this until using Auto-CMD12 feature - if (!(slot->flags & STOP_STARTED) && req->stop) { + if ((slot->quirks & SDHCI_QUIRK_BROKEN_AUTO_STOP) && + !(slot->flags & STOP_STARTED) && req->stop) { slot->flags |= STOP_STARTED; sdhci_start_command(slot, req->stop); return; } -*/ if (__predict_false(sdhci_debug > 1)) slot_printf(slot, "result: %d\n", req->cmd->error); if (!req->cmd->error && - (slot->quirks & SDHCI_QUIRK_RESET_AFTER_REQUEST)) { + ((slot->curcmd == req->stop && + (slot->quirks & SDHCI_QUIRK_BROKEN_AUTO_STOP)) || + (slot->quirks & SDHCI_QUIRK_RESET_AFTER_REQUEST))) { sdhci_reset(slot, SDHCI_RESET_CMD); sdhci_reset(slot, SDHCI_RESET_DATA); } Modified: stable/11/sys/dev/sdhci/sdhci.h ============================================================================== --- stable/11/sys/dev/sdhci/sdhci.h Fri Mar 16 01:03:10 2018 (r331043) +++ stable/11/sys/dev/sdhci/sdhci.h Fri Mar 16 02:44:18 2018 (r331044) @@ -89,6 +89,8 @@ #define SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 (1 << 26) /* Controller support for SDHCI_CTRL2_PRESET_VALUE is broken. */ #define SDHCI_QUIRK_PRESET_VALUE_BROKEN (1 << 27) +/* Controller does not support or the support for ACMD12 is broken. */ +#define SDHCI_QUIRK_BROKEN_AUTO_STOP (1 << 28) /* * Controller registers Modified: stable/11/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/11/sys/dev/usb/quirk/usb_quirk.c Fri Mar 16 01:03:10 2018 (r331043) +++ stable/11/sys/dev/usb/quirk/usb_quirk.c Fri Mar 16 02:44:18 2018 (r331044) @@ -247,6 +247,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(IOMEGA, ZIP100, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_TEST_UNIT_READY), /* XXX ZIP drives can also use ATAPI */ + USB_QUIRK(JMICRON, JMS567, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN), USB_QUIRK(JMICRON, JM20337, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE), Modified: stable/11/sys/dev/usb/usbdevs ============================================================================== --- stable/11/sys/dev/usb/usbdevs Fri Mar 16 01:03:10 2018 (r331043) +++ stable/11/sys/dev/usb/usbdevs Fri Mar 16 02:44:18 2018 (r331044) @@ -2548,6 +2548,7 @@ product JATON EDA 0x5704 Ethernet product JETI SPC1201 0x04b2 FTDI compatible adapter /* JMicron products */ +product JMICRON JMS567 0x0567 USB to SATA 6.0Gb/s bridge product JMICRON JM20336 0x2336 USB to SATA Bridge product JMICRON JM20337 0x2338 USB to ATA/ATAPI Bridge From owner-svn-src-all@freebsd.org Fri Mar 16 02:46:09 2018 Return-Path: Delivered-To: svn-src-all@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 071B6F4396F; Fri, 16 Mar 2018 02:46:09 +0000 (UTC) (envelope-from ian@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 AD42186E71; Fri, 16 Mar 2018 02:46:08 +0000 (UTC) (envelope-from ian@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 A82571E687; Fri, 16 Mar 2018 02:46:08 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2G2k8jA086295; Fri, 16 Mar 2018 02:46:08 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2G2k8n8086294; Fri, 16 Mar 2018 02:46:08 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803160246.w2G2k8n8086294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 16 Mar 2018 02:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331045 - head/sys/modules/imx/imx_spi X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/modules/imx/imx_spi X-SVN-Commit-Revision: 331045 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 02:46:09 -0000 Author: ian Date: Fri Mar 16 02:46:08 2018 New Revision: 331045 URL: https://svnweb.freebsd.org/changeset/base/331045 Log: Add required interface header. Reported by: andreast@ Modified: head/sys/modules/imx/imx_spi/Makefile Modified: head/sys/modules/imx/imx_spi/Makefile ============================================================================== --- head/sys/modules/imx/imx_spi/Makefile Fri Mar 16 02:44:18 2018 (r331044) +++ head/sys/modules/imx/imx_spi/Makefile Fri Mar 16 02:46:08 2018 (r331045) @@ -9,6 +9,7 @@ SRCS= imx_spi.c SRCS+= \ bus_if.h \ device_if.h \ + gpio_if.h \ ofw_bus_if.h \ opt_platform.h \ spibus_if.h \ From owner-svn-src-all@freebsd.org Fri Mar 16 05:23:49 2018 Return-Path: Delivered-To: svn-src-all@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 A097FF51B54; Fri, 16 Mar 2018 05:23:49 +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 48F5D6C372; Fri, 16 Mar 2018 05:23: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 43F841FF0B; Fri, 16 Mar 2018 05:23: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 w2G5NnHW066217; Fri, 16 Mar 2018 05:23:49 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2G5NnPs066215; Fri, 16 Mar 2018 05:23:49 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803160523.w2G5NnPs066215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 16 Mar 2018 05:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331046 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 331046 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 05:23:50 -0000 Author: imp Date: Fri Mar 16 05:23:48 2018 New Revision: 331046 URL: https://svnweb.freebsd.org/changeset/base/331046 Log: Try polling the qpairs on timeout. On some systems, we're getting timeouts when we use multiple queues on drives that work perfectly well on other systems. On a hunch, Jim Harris suggested I poll the completion queue when we get a timeout. This patch polls the completion queue if no fatal status was indicated. If it had pending I/O, we complete that request and return. Otherwise, if aborts are enabled and no fatal status, we abort the command and return. Otherwise we reset the card. This may clear up the problem, or we may see it result in lots of timeouts and a performance problem. Either way, we'll know the next step. We may also need to pay attention to the fatal status bit of the controller. PR: 211713 Suggested by: Jim Harris Sponsored by: Netflix Modified: head/sys/dev/nvme/nvme_private.h head/sys/dev/nvme/nvme_qpair.c Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Fri Mar 16 02:46:08 2018 (r331045) +++ head/sys/dev/nvme/nvme_private.h Fri Mar 16 05:23:48 2018 (r331046) @@ -426,7 +426,7 @@ int nvme_qpair_construct(struct nvme_qpair *qpair, uin struct nvme_controller *ctrlr); void nvme_qpair_submit_tracker(struct nvme_qpair *qpair, struct nvme_tracker *tr); -void nvme_qpair_process_completions(struct nvme_qpair *qpair); +bool nvme_qpair_process_completions(struct nvme_qpair *qpair); void nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req); void nvme_qpair_reset(struct nvme_qpair *qpair); Modified: head/sys/dev/nvme/nvme_qpair.c ============================================================================== --- head/sys/dev/nvme/nvme_qpair.c Fri Mar 16 02:46:08 2018 (r331045) +++ head/sys/dev/nvme/nvme_qpair.c Fri Mar 16 05:23:48 2018 (r331046) @@ -469,11 +469,12 @@ nvme_qpair_manual_complete_request(struct nvme_qpair * nvme_free_request(req); } -void +bool nvme_qpair_process_completions(struct nvme_qpair *qpair) { struct nvme_tracker *tr; struct nvme_completion cpl; + int done = 0; qpair->num_intr_handler_calls++; @@ -484,7 +485,7 @@ nvme_qpair_process_completions(struct nvme_qpair *qpai * associated with this interrupt will get retried when the * reset is complete. */ - return; + return (false); while (1) { cpl = qpair->cpl[qpair->cq_head]; @@ -500,6 +501,7 @@ nvme_qpair_process_completions(struct nvme_qpair *qpai if (tr != NULL) { nvme_qpair_complete_tracker(qpair, tr, &cpl, TRUE); qpair->sq_head = cpl.sqhd; + done++; } else { nvme_printf(qpair->ctrlr, "cpl does not map to outstanding cmd\n"); @@ -516,6 +518,7 @@ nvme_qpair_process_completions(struct nvme_qpair *qpai nvme_mmio_write_4(qpair->ctrlr, doorbell[qpair->id].cq_hdbl, qpair->cq_head); } + return (done != 0); } static void @@ -770,19 +773,30 @@ nvme_timeout(void *arg) uint32_t csts; uint8_t cfs; - /* Read csts to get value of cfs - controller fatal status. */ + /* + * Read csts to get value of cfs - controller fatal status. + * If no fatal status, try to call the completion routine, and + * if completes transactions, report a missed interrupt and + * return (this may need to be rate limited). Otherwise, if + * aborts are enabled and the controller is not reporting + * fatal status, abort the command. Otherwise, just reset the + * controller and hope for the best. + */ csts = nvme_mmio_read_4(ctrlr, csts); - cfs = (csts >> NVME_CSTS_REG_CFS_SHIFT) & NVME_CSTS_REG_CFS_MASK; + if (cfs == 0 && nvme_qpair_process_completions(qpair)) { + nvme_printf(ctrlr, "Missing interrupt\n"); + return; + } if (ctrlr->enable_aborts && cfs == 0) { - /* - * If aborts are enabled, only use them if the controller is - * not reporting fatal status. - */ + nvme_printf(ctrlr, "Aborting command due to a timeout.\n"); nvme_ctrlr_cmd_abort(ctrlr, tr->cid, qpair->id, nvme_abort_complete, tr); - } else + } else { + nvme_printf(ctrlr, "Resetting controller due to a timeout%s.\n", + cfs ? " and fatal error status" : ""); nvme_ctrlr_reset(ctrlr); + } } void From owner-svn-src-all@freebsd.org Fri Mar 16 05:29:32 2018 Return-Path: Delivered-To: svn-src-all@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 D9754F521BD; Fri, 16 Mar 2018 05:29:31 +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 877536C7EB; Fri, 16 Mar 2018 05:29:31 +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 7D75C1FF0F; Fri, 16 Mar 2018 05:29:31 +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 w2G5TVPA066711; Fri, 16 Mar 2018 05:29:31 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2G5TVgh066709; Fri, 16 Mar 2018 05:29:31 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803160529.w2G5TVgh066709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 16 Mar 2018 05:29:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331047 - stable/11/usr.bin/patch X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/patch X-SVN-Commit-Revision: 331047 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 05:29:32 -0000 Author: eadler Date: Fri Mar 16 05:29:30 2018 New Revision: 331047 URL: https://svnweb.freebsd.org/changeset/base/331047 Log: MFC r311106,r311109,r311110,r320579,r327063,r327064,: patch(1): replace strnlen() with a simpler strlen(). patch(1): add support for git generated diffs. patch: rejname[] is also -r option buffer, and should be PATH_MAX. patch: further cleanup to git-style diffs. Modified: stable/11/usr.bin/patch/patch.c stable/11/usr.bin/patch/pch.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/patch/patch.c ============================================================================== --- stable/11/usr.bin/patch/patch.c Fri Mar 16 05:23:48 2018 (r331046) +++ stable/11/usr.bin/patch/patch.c Fri Mar 16 05:29:30 2018 (r331047) @@ -112,7 +112,7 @@ static bool reverse_flag_specified = false; static bool Vflag = false; /* buffer holding the name of the rejected patch file. */ -static char rejname[NAME_MAX + 1]; +static char rejname[PATH_MAX]; /* how many input lines have been irretractibly output */ static LINENUM last_frozen_line = 0; @@ -749,10 +749,10 @@ rej_line(int ch, LINENUM i) size_t len; const char *line = pfetch(i); - len = strnlen(line, USHRT_MAX); + len = strlen(line); fprintf(rejfp, "%c%s", ch, line); - if (len == 0 || line[len-1] != '\n') { + if (len == 0 || line[len - 1] != '\n') { if (len >= USHRT_MAX) fprintf(rejfp, "\n\\ Line too long\n"); else Modified: stable/11/usr.bin/patch/pch.c ============================================================================== --- stable/11/usr.bin/patch/pch.c Fri Mar 16 05:23:48 2018 (r331046) +++ stable/11/usr.bin/patch/pch.c Fri Mar 16 05:29:30 2018 (r331047) @@ -264,6 +264,7 @@ intuit_diff_type(void) char *s, *t; int indent, retval; struct file_name names[MAX_FILE]; + int piece_of_git = 0; memset(names, 0, sizeof(names)); ok_to_create_file = false; @@ -308,14 +309,22 @@ intuit_diff_type(void) if (!stars_last_line && strnEQ(s, "*** ", 4)) names[OLD_FILE].path = fetchname(s + 4, &names[OLD_FILE].exists, strippath); - else if (strnEQ(s, "--- ", 4)) - names[NEW_FILE].path = fetchname(s + 4, + else if (strnEQ(s, "--- ", 4)) { + size_t off = 4; + if (piece_of_git && strippath == 957 && + strnEQ(s, "--- a/", 6)) + off = 6; + names[NEW_FILE].path = fetchname(s + off, &names[NEW_FILE].exists, strippath); - else if (strnEQ(s, "+++ ", 4)) + } else if (strnEQ(s, "+++ ", 4)) { /* pretend it is the old name */ - names[OLD_FILE].path = fetchname(s + 4, + size_t off = 4; + if (piece_of_git && strippath == 957 && + strnEQ(s, "+++ b/", 6)) + off = 6; + names[OLD_FILE].path = fetchname(s + off, &names[OLD_FILE].exists, strippath); - else if (strnEQ(s, "Index:", 6)) + } else if (strnEQ(s, "Index:", 6)) names[INDEX_FILE].path = fetchname(s + 6, &names[INDEX_FILE].exists, strippath); else if (strnEQ(s, "Prereq:", 7)) { @@ -330,6 +339,9 @@ intuit_diff_type(void) free(revision); revision = NULL; } + } else if (strnEQ(s, "diff --git a/", 13)) { + /* Git-style diffs. */ + piece_of_git = 1; } else if (strnEQ(s, "==== ", 5)) { /* Perforce-style diffs. */ if ((t = strstr(s + 5, " - ")) != NULL) From owner-svn-src-all@freebsd.org Fri Mar 16 05:38:35 2018 Return-Path: Delivered-To: svn-src-all@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 BDEC1F52BDC for ; Fri, 16 Mar 2018 05:38:35 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61A716CE18 for ; Fri, 16 Mar 2018 05:38:35 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x22c.google.com with SMTP id z82so3258969ywd.9 for ; Thu, 15 Mar 2018 22:38:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RQ7NNk95QbXFTYSl0PTb0rap+c8sllx6vxa+goE5hPw=; b=kK+ozeaBy78Gig90/JkPirHSdM1XyYgj3+mYCh/FdiTqjRXGBv5f4uZsEWXyuFWSGP /KFNfRJ7oVwnOXKVfkjzQZbiAG6SGSklTm6U9Z4hnl5NE6w4Pel+Q2E6BZITAsleAYyS aShmoYd2d1AhDrBCOpQWf3evWO9sS1oetGLKc= 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=RQ7NNk95QbXFTYSl0PTb0rap+c8sllx6vxa+goE5hPw=; b=qcjWYgDtqK/khHvsTT+ICvBVoaQky9HwgsQhIlQueiiIzkJM/SPz5/ltA0oNbVQW/r s8HzwPujnslSyG5TX5fV+dftqYCaDObL8hepJ9P1EDKx5QQlNZKqhOmhqCL8QbS/L1LJ FIwbPpXfR7fNbxd/p7ya9zjhPHkl79bAuz4BnhFTBZ5a+DIzHdWz78qHqzEvSaSypArd VLvKwmURVx1GO6ujOMfdnzHJ9d7Mi4GZzMJZktBMOCAHeUzCz3nJU6pFtQaBm0LrOcLp PcfHvszjhh76A915sgvJb6FOBaP2JsPgC1NbNI+KbIJA8fnoznIpuPEdKSRWxMOUnCmj wakw== X-Gm-Message-State: AElRT7FYcpG0IT8iLIHUHY3pbVHW+80fBtOkvxCmeJWc70fEtFfGNdgg ArVEXz4o1chyg9xwq20gJkLY5uwaw2kgPThqDEppyg== X-Google-Smtp-Source: AG47ELvigL+RweZhjbYT2kOFbSqIGxAGoGvYe7A7BkkRkyBM4ElXXJs6dyowvNM1ONiNdUwmHeNK2Gdwtgkpi/XkPhA= X-Received: by 2002:a25:ae5b:: with SMTP id g27-v6mr258693ybe.87.1521178714648; Thu, 15 Mar 2018 22:38:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Thu, 15 Mar 2018 22:38:04 -0700 (PDT) In-Reply-To: <201607201659.u6KGxaNs010929@repo.freebsd.org> References: <201607201659.u6KGxaNs010929@repo.freebsd.org> From: Eitan Adler Date: Thu, 15 Mar 2018 22:38:04 -0700 Message-ID: Subject: Re: svn commit: r303099 - head/sys/kern To: "Conrad E. Meyer" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 05:38:35 -0000 On 20 July 2016 at 09:59, Conrad E. Meyer wrote: > Author: cem > Date: Wed Jul 20 16:59:36 2016 > New Revision: 303099 > URL: https://svnweb.freebsd.org/changeset/base/303099 > > Log: > Extend ELF coredump to support more than 65535 segments r303099, r303105, r303114, r308177 Is this and related safe to MFC? If so did I miss any ? -- Eitan Adler From owner-svn-src-all@freebsd.org Fri Mar 16 07:05:10 2018 Return-Path: Delivered-To: svn-src-all@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 8CA80F55B09; Fri, 16 Mar 2018 07:05:10 +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 2D6826F7A5; Fri, 16 Mar 2018 07:05:10 +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 1DEBE20E15; Fri, 16 Mar 2018 07:05:10 +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 w2G759ld016778; Fri, 16 Mar 2018 07:05:09 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2G759Ie016777; Fri, 16 Mar 2018 07:05:09 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803160705.w2G759Ie016777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 16 Mar 2018 07:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331048 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 331048 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 07:05:10 -0000 Author: cem Date: Fri Mar 16 07:05:09 2018 New Revision: 331048 URL: https://svnweb.freebsd.org/changeset/base/331048 Log: Fix GCC build: Remove redundant pagedaemon_wakeup declaration Introduced in r331018. Reported by: kevans Sponsored by: Dell EMC Isilon Modified: head/sys/vm/vm_pageout.h Modified: head/sys/vm/vm_pageout.h ============================================================================== --- head/sys/vm/vm_pageout.h Fri Mar 16 05:29:30 2018 (r331047) +++ head/sys/vm/vm_pageout.h Fri Mar 16 07:05:09 2018 (r331048) @@ -95,7 +95,6 @@ extern int vm_pageout_page_count; * Signal pageout-daemon and wait for it. */ -void pagedaemon_wakeup(int domain); void vm_wait(vm_object_t obj); void vm_waitpfault(void); void vm_wait_domain(int domain); From owner-svn-src-all@freebsd.org Fri Mar 16 07:11:54 2018 Return-Path: Delivered-To: svn-src-all@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 B9D48F560A2; Fri, 16 Mar 2018 07:11:54 +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 6E3556FBD1; Fri, 16 Mar 2018 07:11:54 +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 6916020F64; Fri, 16 Mar 2018 07:11:54 +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 w2G7BsYt021502; Fri, 16 Mar 2018 07:11:54 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2G7Bs4Z021500; Fri, 16 Mar 2018 07:11:54 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803160711.w2G7Bs4Z021500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 16 Mar 2018 07:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331049 - in head/sys: conf crypto/chacha20 modules modules/chacha20 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: conf crypto/chacha20 modules modules/chacha20 X-SVN-Commit-Revision: 331049 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 07:11:54 -0000 Author: cem Date: Fri Mar 16 07:11:53 2018 New Revision: 331049 URL: https://svnweb.freebsd.org/changeset/base/331049 Log: Garbage collect unused chacha20 code Two copies of chacha20 were imported into the tree on Apr 15 2017 (r316982) and Apr 16 2017 (r317015). Only the latter is actually used by anything, so just go ahead and garbage collect the unused version while it's still only in CURRENT. I'm not making any judgement on which implementation is better. If I pulled the wrong one, feel free to swap the existing implementation out and replace it with the other code (conforming to the API that actually gets used in randomdev, of course). We only need one generic implementation. Sponsored by: Dell EMC Isilon Deleted: head/sys/crypto/chacha20/chacha20.c head/sys/crypto/chacha20/chacha20.h head/sys/modules/chacha20/ Modified: head/sys/conf/files head/sys/modules/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Mar 16 07:05:09 2018 (r331048) +++ head/sys/conf/files Fri Mar 16 07:11:53 2018 (r331049) @@ -652,7 +652,6 @@ crypto/blowfish/bf_ecb.c optional ipsec | ipsec_suppor crypto/blowfish/bf_skey.c optional crypto | ipsec | ipsec_support crypto/camellia/camellia.c optional crypto | ipsec | ipsec_support crypto/camellia/camellia-api.c optional crypto | ipsec | ipsec_support -crypto/chacha20/chacha20.c optional chacha20 crypto/des/des_ecb.c optional crypto | ipsec | ipsec_support | netsmb crypto/des/des_setkey.c optional crypto | ipsec | ipsec_support | netsmb crypto/rc4/rc4.c optional netgraph_mppc_encryption | kgssapi Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Mar 16 07:05:09 2018 (r331048) +++ head/sys/modules/Makefile Fri Mar 16 07:11:53 2018 (r331049) @@ -86,7 +86,6 @@ SUBDIR= \ cd9660_iconv \ ${_ce} \ ${_cfi} \ - chacha20 \ ${_chromebook_platform} \ ${_ciss} \ cloudabi \ From owner-svn-src-all@freebsd.org Fri Mar 16 07:25:30 2018 Return-Path: Delivered-To: svn-src-all@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 6071DF56D83; Fri, 16 Mar 2018 07:25:30 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id D6FDA70597; Fri, 16 Mar 2018 07:25:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id D9EA442CB97; Fri, 16 Mar 2018 18:25:21 +1100 (AEDT) Date: Fri, 16 Mar 2018 18:25:21 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: rgrimes@freebsd.org cc: Andriy Gapon , Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r330972 - stable/11/share/misc In-Reply-To: <201803151533.w2FFXkS9093662@pdx.rh.CN85.dnsmgr.net> Message-ID: <20180316181800.B904@besplex.bde.org> References: <201803151533.w2FFXkS9093662@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cIaQihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=SU4yJ5IgCYpL9l0rCCQA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 07:25:30 -0000 On Thu, 15 Mar 2018, Rodney W. Grimes wrote: >> On 15/03/2018 10:30, Eitan Adler wrote: >>> ... >>> Log: >>> MFC r303063,r311852,r311930,r317040,r320506,r321301,r325162,r326759,r329004,: >> I have never seen things like these MFC-ed before... >> Should we be really doing them? > > Yes, imho. And the reasons may seem odd to sum, but here is my spin on this: > ... > Maybe we should even add to the end of the commiters "these are the > things you should do as a new committer" the merging of your info > into to all supported/active releases. Which is a good opportunity > for teaching how to do svn sparse checkouts as you really do not > want to pull all of stable/10 out just to commit to 1 file. Actually, it is necessary to check out everything to MFC to 1 file. Sparse checkouts only work for committing to head. They break mergeinfo for MFCs. Or so I was told when I MFCed with a sparse checkout. This is my excuse for not MFC'ing anything. Bruce From owner-svn-src-all@freebsd.org Fri Mar 16 08:39:38 2018 Return-Path: Delivered-To: svn-src-all@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 6C6E8F5B547; Fri, 16 Mar 2018 08:39:38 +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 1476972E98; Fri, 16 Mar 2018 08:39:38 +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 E39D421BAA; Fri, 16 Mar 2018 08:39:37 +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 w2G8dbRm062704; Fri, 16 Mar 2018 08:39:37 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2G8dbm8062703; Fri, 16 Mar 2018 08:39:37 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803160839.w2G8dbm8062703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 16 Mar 2018 08:39:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331050 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 331050 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 08:39:38 -0000 Author: eadler Date: Fri Mar 16 08:39:37 2018 New Revision: 331050 URL: https://svnweb.freebsd.org/changeset/base/331050 Log: MFC r303041,r303320,r305905,r310087,r310346,r319368,r321879,r321923,r321979,r327554,r329124,r329210,: organizations.dot - misc changes Modified: stable/11/share/misc/organization.dot Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/organization.dot ============================================================================== --- stable/11/share/misc/organization.dot Fri Mar 16 07:11:53 2018 (r331049) +++ stable/11/share/misc/organization.dot Fri Mar 16 08:39:37 2018 (r331050) @@ -28,15 +28,15 @@ _misc [label="Miscellaneous Hats"] core [label="Core Team\ncore@FreeBSD.org\nallanjude, bapt, bcr,\nbenno, emaste, gnn,\nhrs, jhb, kmoore"] coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\nmatthew"] doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] -doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] +doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs,\nwblock"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] -portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nantoine, bapt, bdrewery,\nerwin, mat, swills,\nmiwi"] +portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nadamw, antoine, bapt, bdrewery\nfeld, mat, rene, swills"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\nrene"] -re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"] -secteam [label="Security Team\nsecteam@FreeBSD.org\ndelphij,\ndes, gavin, gjb,\nglebius, remko"] -portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\ndelphij, eadler, feld, jgh, junovitch, miwi, rea, sbz, simon, swills, zi"] +re [label="Primary Release Engineering Team\nre@FreeBSD.org\ngjb, kib,\nbdrewery, blackend,\nrgrimes, delphij,\nhrs, glebius,\nmarius, rwatson"] +secteam [label="Security Team\nsecteam@FreeBSD.org\nbenno, delphij,\ndes, emaste,\ngjb, gordon,\nremko"] +portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\ndelphij, amdmi3, eadler, feld, jgh, rea, riggs, sbz, simon, swills, zi"] secteamsecretary [label="Security Team Secretary\nsecteam-secretary@FreeBSD.org\nremko"] -securityofficer [label="Security Officer Team\nsecurity-officer@FreeBSD.org\ncperciva, simon, nectar"] +securityofficer [label="Security Officer Team\nsecurity-officer@FreeBSD.org\nbenno, delphij,\ndes, emaste,\ngjb, gordon,\nremko"] srccommitters [label="Src Committers\nsrc-committers@FreeBSD.org"] # Admin teams go here alphabetically sorted @@ -44,18 +44,18 @@ srccommitters [label="Src Committers\nsrc-committers@F accounts [label="Accounts Team\naccounts@FreeBSD.org\nmarkm, simon, kensmith,\ndhw"] backups [label="Backup Administrators\nbackups@FreeBSD.org\nsimon, kensmith,\ndhw"] bugmeister [label="Bugmeister Team\nbugmeister@FreeBSD.org\neadler, gavin, gonzo"] -clusteradm [label="Cluster Administrators\nclusteradm@FreeBSD.org\nbrd, simon, ps,\nkensmith, peter"] +clusteradm [label="Cluster Administrators\nclusteradm@FreeBSD.org\nallanjude, brd,\ndhw, gavin,\ngjb, peter,\nsbruno, simon,\nzi"] dnsadm [label="DNS Administrators\ndnsadm@FreeBSD.org\nbillf, dg, ps,\nkensmith, peter"] mirroradmin [label="FTP/WWW Mirror Site Coordinators\nmirror-admin@FreeBSD.org\nkuriyama, kensmith"] perforceadmin [label="Perforce Repository Administrators\nperforce-admin@FreeBSD.org\nscottl, kensmith, gordon,\nrwatson, peter, dhw"] -postmaster [label="Postmaster Team\npostmaster@FreeBSD.org\njmb, brd, sahil, dhw"] +postmaster [label="Postmaster Team\npostmaster@FreeBSD.org\ndhw, ler, pi, rea, remko, zi"] refadm [label="Reference Systems Administrators\nrefadm@FreeBSD.org\njake, billf, markm, simon,\nobrien, ps, kensmith,\npeter, dhw"] -webmaster [label="Webmaster Team\nwebmaster@FreeBSD.org\nnik, kuriyama, simon,\njesusr, wosch"] +webmaster [label="Webmaster Team\nwebmaster@FreeBSD.org\ngjb, wblock, blackend,\ngabor, hrs, wosch"] # Misc hats go here alphabetically sorted -donations [label="Donations Team\ndonations@FreeBSD.org\ngjb, wilko, gahr, pgolluci,\nobrien, trhodes, ds,\nrwatson"] -marketing [label="Marketing Team\nmarketing@FreeBSD.org\nSteven Beedle, Denise Ebery, deb,\njkoshy, Dru Lavigne, mwlucas, imp,\nKris Moore, murray, mattt,\nJeremy C. Reed, rwatson"] +donations [label="Donations Team\ndonations@FreeBSD.org\nwilko, gahr, pgolluci,\nobrien, trhodes, ds,\nrwatson"] +marketing [label="Marketing Team\nmarketing@FreeBSD.org\nSteven Beedle, Denise Ebery, deb,\njkoshy, dru, mwlucas, imp,\nKris Moore, murray, mattt,\nJeremy C. Reed, rwatson"] vendorrelations [label="Vendor Relations\nvendor-relations@FreeBSD.org\ncore, FreeBSD Foundation"] # Here are the team relationships. From owner-svn-src-all@freebsd.org Fri Mar 16 08:44:44 2018 Return-Path: Delivered-To: svn-src-all@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 BECD3F5BADE; Fri, 16 Mar 2018 08:44:44 +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 7167F734C0; Fri, 16 Mar 2018 08:44:44 +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 67DA921D36; Fri, 16 Mar 2018 08:44:44 +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 w2G8iie3067445; Fri, 16 Mar 2018 08:44:44 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2G8iiu7067444; Fri, 16 Mar 2018 08:44:44 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803160844.w2G8iiu7067444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 16 Mar 2018 08:44:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331051 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 331051 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 08:44:44 -0000 Author: eadler Date: Fri Mar 16 08:44:44 2018 New Revision: 331051 URL: https://svnweb.freebsd.org/changeset/base/331051 Log: MFC r327344: locale: add cnr (Montenegrin) See https://www.loc.gov/standards/iso639-2/php/code_changes.php Modified: stable/11/share/misc/iso639 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/iso639 ============================================================================== --- stable/11/share/misc/iso639 Fri Mar 16 08:39:37 2018 (r331050) +++ stable/11/share/misc/iso639 Fri Mar 16 08:44:44 2018 (r331051) @@ -127,6 +127,7 @@ cu chu chu Church Slavic; Old Slavonic; Church Slavoni cv chv chv Chuvash chy chy Cheyenne cmc cmc Chamic languages + cnr cnr Montenegrin cop cop Coptic kw cor cor Cornish co cos cos Corsican From owner-svn-src-all@freebsd.org Fri Mar 16 08:45:29 2018 Return-Path: Delivered-To: svn-src-all@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 F4074F5BB7B; Fri, 16 Mar 2018 08:45:28 +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 A973B735F3; Fri, 16 Mar 2018 08:45:28 +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 A446621D37; Fri, 16 Mar 2018 08:45:28 +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 w2G8jSod067523; Fri, 16 Mar 2018 08:45:28 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2G8jSeH067522; Fri, 16 Mar 2018 08:45:28 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803160845.w2G8jSeH067522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 16 Mar 2018 08:45:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331052 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 331052 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 08:45:29 -0000 Author: eadler Date: Fri Mar 16 08:45:28 2018 New Revision: 331052 URL: https://svnweb.freebsd.org/changeset/base/331052 Log: MFC r330940: Update to 2018-03-06 Modified: stable/11/share/misc/pci_vendors Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/pci_vendors ============================================================================== --- stable/11/share/misc/pci_vendors Fri Mar 16 08:44:44 2018 (r331051) +++ stable/11/share/misc/pci_vendors Fri Mar 16 08:45:28 2018 (r331052) @@ -1,9 +1,10 @@ # $FreeBSD$ +# # List of PCI ID's # -# Version: 2018.02.15 -# Date: 2018-02-15 03:15:01 +# Version: 2018.03.06 +# Date: 2018-03-06 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -26,6 +27,17 @@ 0010 Allied Telesis, Inc (Wrong ID) # This is a relabelled RTL-8139 8139 AT-2500TX V3 Ethernet +0014 Loongson Technology LLC + 7a02 APB (Advanced Peripheral Bus) Controller + 7a03 Gigabit Ethernet Controller + 7a04 OTG USB Controller + 7a05 Vivante GPU (Graphics Processing Unit) + 7a06 DC (Display Controller) + 7a07 HDA (High Definition Audio) Controller + 7a08 SATA AHCI Controller + 7a0f DMA (Direct Memory Access) Controller + 7a14 EHCI USB Controller + 7a24 OHCI USB Controller 001c PEAK-System Technik GmbH 0001 PCAN-PCI CAN-Bus controller 001c 0004 2 Channel CAN Bus SJC1000 @@ -753,7 +765,9 @@ 131b Kaveri [Radeon R4 Graphics] 131c Kaveri [Radeon R7 Graphics] 131d Kaveri [Radeon R6 Graphics] - 15dd Vega [Radeon Vega 8 Mobile] + 15dd Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] + 103c 83c6 Radeon Vega 8 Mobile + 1458 d000 Radeon RX Vega 11 15ff Vega [Radeon Vega 28 Mobile] 1714 BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series] 103c 168b ProBook 4535s @@ -1601,10 +1615,12 @@ 103c 2100 FirePro M4100 6602 Mars 6603 Mars - 6604 Opal XT [Radeon R7 M265] + 6604 Opal XT [Radeon R7 M265/M365X/M465] 103c 8006 FirePro M4170 + 103c 814f Litho XT [Radeon R7 M365X] + 103c 82aa Litho XT [Radeon R7 M465] 17aa 3643 Radeon R7 A360 - 6605 Opal PRO [Radeon R7 M260] + 6605 Opal PRO [Radeon R7 M260X] 103c 2259 FirePro M4150 6606 Mars XTX [Radeon HD 8790M] 1028 0684 FirePro W4170M @@ -1679,6 +1695,7 @@ 103c 80be Radeon R5 M330 103c 8136 Radeon R5 M330 103c 8329 Radeon R7 M520 + 17aa 3633 Radeon R5 A330 17aa 3804 Radeon R5 M330 17aa 3809 Radeon R5 M330 17aa 381a Radeon R5 M430 @@ -2298,8 +2315,11 @@ 1043 04fb Radeon RX 480 1043 04fd Radeon RX 480 8GB 1458 22f0 Radeon RX 570 + 1458 22f7 Radeon RX 570 Gaming 4G 1462 3411 Radeon RX 470 1462 3413 Radeon RX 480 + 1462 3416 Radeon RX 570 + 1462 3418 Radeon RX 580 Armor 4G OC 148c 2372 Radeon RX 480 148c 2373 Radeon RX 470 1682 9470 Radeon RX 470 @@ -2334,7 +2354,14 @@ 106b 0179 Radeon Pro 560 1642 1727 Polaris 21 XL [Radeon RX 560D] 1682 956d Polaris 21 XL [Radeon RX 560D] - 67ff Baffin [Radeon RX 560] + 67ff Baffin [Radeon RX 550 640SP / RX 560] + 1002 0b04 Radeon RX 560 + 1043 04bc Radeon RX 560 + 1458 22ed Radeon RX 560 + 148c 2381 Radeon RX 560 + 1682 9560 Radeon RX 560 + 1da2 e348 Radeon RX 560 + 1da2 e367 Radeon RX 550 640SP 6800 Wimbledon XT [Radeon HD 7970M] 1002 0124 Radeon HD 7970M 8086 2110 Radeon HD 7970M @@ -2349,7 +2376,9 @@ 6808 Pitcairn XT GL [FirePro W7000] 1002 0310 FirePro S7000 1002 0420 Radeon Sky 500 + 103c 030c MED-X7000 13cc 3d25 MXRT-7500 + 15c3 030c MED-X7000 6809 Pitcairn LE GL [FirePro W5000] 13cc 3d23 MXRT-5500 13cc 3d24 MXRT-5550 @@ -2411,8 +2440,6 @@ 682d Chelsea XT GL [FirePro M4000] 682f Chelsea LP [Radeon HD 7730M] 103c 1851 Radeon HD 7750M - 6830 Cape Verde [Radeon HD 7800M Series] - 6831 Cape Verde [AMD Radeon HD 7700M Series] 6835 Cape Verde PRX [Radeon R9 255 OEM] 6837 Cape Verde LE [Radeon HD 7730/8730] 1462 2796 Radeon HD 8730 @@ -3026,6 +3053,7 @@ 103c 2269 Radeon R7 M260 103c 22c6 Radeon R7 M260 103c 22c8 Radeon R7 M260 + 103c 2b45 Radeon R7 A360 103c 808c Radeon R7 M260 103c 8099 Radeon R7 M360 103c 80b5 Radeon R7 M360 @@ -3062,7 +3090,8 @@ 148c 9380 Radeon R9 380 # Make naming scheme consistent 174b e308 Radeon R9 380 Nitro 4G D5 - 694c Vega [Radeon RX Vega M] + 694c Polaris 22 [Radeon RX Vega M GH] + 694e Polaris 22 [Radeon RX Vega M GL] 6980 Polaris12 6981 Polaris12 6985 Lexa XT [Radeon PRO WX 3100] @@ -3351,11 +3380,13 @@ 9553 RV710/M92 [Mobility Radeon HD 4530/4570/545v] 1025 015e Mobility Radeon HD 4570 1025 017d Mobility Radeon HD 4570 - 1025 0205 Mobility Radeon HD 4570 + 1025 0205 Mobility Radeon HD 4570 / 545v 1025 0206 Mobility Radeon HD 4570 1025 0237 Mobility Radeon HD 4570 - 1028 02be Mobility Radeon HD 4570 + 1028 02be Mobility Radeon HD 4570 / 545v 1028 02e8 Mobility Radeon HD 4530 + 103c 143c Mobility Radeon HD 545v + 103c 1446 Mobility Radeon HD 545v 103c 3624 Mobility Radeon HD 4530 103c 3628 Mobility Radeon HD 4530 103c 3636 Mobility Radeon HD 4530 @@ -3363,6 +3394,12 @@ 1043 1b42 Mobility Radeon HD 4570 104d 9056 Mobility Radeon HD 4570 1179 ff82 Satellite L505-13T GPU (Mobility Radeon HD 5145) + 144d c07f Mobility Radeon HD 545v + 144d c571 Mobility Radeon HD 545v + 1462 1006 Mobility Radeon HD 545v + 17aa 2129 Mobility Radeon HD 545v + 17aa 215b Mobility Radeon HD 545v + 17aa 21bb Mobility Radeon HD 545v 9555 RV710/M92 [Mobility Radeon HD 4350/4550] 103c 1411 ProBook 4720s GPU (Mobility Radeon HD 4350) 9557 RV711 GL [FirePro RG220] @@ -3409,7 +3446,7 @@ 95c6 RV620 LE [Radeon HD 3450 AGP] 95c9 RV620 LE [Radeon HD 3450 PCI] 95cc RV620 GL [FirePro V3700] - 95cd RV620 [FirePro 2450] + 95cd RV620 GL [FirePro 2450] 95cf RV620 GL [FirePro 2260] 960f RS780 HDMI Audio [Radeon 3000/3100 / HD 3200/3300] 9610 RS780 [Radeon HD 3200] @@ -3485,7 +3522,19 @@ 985d Mullins 985e Mullins 985f Mullins - 9874 Carrizo + 9874 Wani [Radeon R5/R6/R7 Graphics] + 1002 1871 Radeon R5 Graphics + 1002 1e20 Radeon R7 Graphics + 1028 06bd Radeon R6 Graphics + 103c 2b44 Radeon R6 Graphics + 103c 8221 Radeon R5 Graphics + 103c 8223 Radeon R5 Graphics + 103c 8238 Radeon R7 Graphics + 103c 8353 Radeon R7 Graphics + 1458 d000 Radeon R7 Graphics + 17aa 5113 Radeon R6 Graphics + 17aa 5116 Radeon R6 Graphics + 17aa 5118 Radeon R5 Graphics 9900 Trinity [Radeon HD 7660G] 103c 1985 Pavilion 17-e163sg Notebook PC # AMD A10-5800K CPU @@ -9871,7 +9920,7 @@ 0863 C79 [GeForce 9400M] 106b 00aa MacBook5,1 0864 C79 [GeForce 9300] - 0865 C79 [GeForce 9300/ION] + 0865 C79 [GeForce 9300 / ION] 0866 C79 [GeForce 9400M G] 106b 00b1 GeForce 9400M 0867 C79 [GeForce 9400] @@ -9895,12 +9944,12 @@ 1043 1c12 GeForce G102M 1043 1c52 GeForce G205M 0874 C79 [ION] - 0876 ION VGA [GeForce 9400M] + 0876 C79 [GeForce 9400M / ION] 087a C79 [GeForce 9400] - 087d ION VGA + 087d C79 [ION] 19da a123 IONITX-F-E - 087e ION LE VGA - 087f ION LE VGA + 087e C79 [ION LE] + 087f C79 [ION LE] 08a0 MCP89 [GeForce 320M] 08a2 MCP89 [GeForce 320M] 08a3 MCP89 [GeForce 320M] @@ -9931,6 +9980,7 @@ 0a64 GT218 [ION] 0a65 GT218 [GeForce 210] 1043 8334 EN210 SILENT + 1458 36a9 GV-N210D3-1GI (rev. 6.0/6.1) 1462 8094 N210 [Geforce 210] PCIe graphics adapter 0a66 GT218 [GeForce 310] 0a67 GT218 [GeForce 315] @@ -9941,7 +9991,7 @@ 1028 040b Latitude E6510 17aa 2142 ThinkPad T410 0a6e GT218M [GeForce 305M] - 0a6f GT218 [ION] + 0a6f GT218M [ION] 0a70 GT218M [GeForce 310M] 0a71 GT218M [GeForce 305M] 0a72 GT218M [GeForce 310M] @@ -9949,7 +9999,7 @@ 0a74 GT218M [GeForce G210M] 1b0a 903a GeForce G210 0a75 GT218M [GeForce 310M] - 0a76 GT218 [ION 2] + 0a76 GT218M [ION 2] 0a78 GT218GL [Quadro FX 380 LP] 0a7a GT218M [GeForce 315M] 104d 907e GeForce 315M @@ -10869,6 +10919,7 @@ 1288 GK208B [GeForce GT 720] 1289 GK208 [GeForce GT 710] 128b GK208B [GeForce GT 710] + 1043 85f7 GT710-SL-1GD5 1290 GK208M [GeForce GT 730M] 103c 2afa GeForce GT 730A 103c 2b04 GeForce GT 730A @@ -11040,6 +11091,7 @@ 1bb7 GP104GLM [Quadro P4000 Mobile] 1462 11e9 Quadro P4000 Max-Q 1bb8 GP104GLM [Quadro P3000 Mobile] + 1bbb GP104GLM [Quadro P3200 Mobile] 1bc7 GP104 [P104-101] 1be0 GP104M [GeForce GTX 1080 Mobile] 1028 07c0 GeForce GTX 1080 Max-Q @@ -11079,6 +11131,8 @@ 1cb6 GP107GL [Quadro P620] 1d01 GP108 [GeForce GT 1030] 1d10 GP108M [GeForce MX150] + 1d12 GP108M [GeForce MX150] + 1d72 1701 Mi Notebook Pro [GeForce MX150] 1d33 GP108GL [Quadro P500] 1d81 GV100 [TITAN V] 1db1 GV100GL [Tesla V100 SXM2] @@ -11424,6 +11478,7 @@ 8821 RTL8821AE 802.11ac PCIe Wireless Network Adapter b723 RTL8723BE PCIe Wireless Network Adapter 10ec 8739 Dell Wireless 1801 + b822 RTL8822BE 802.11a/b/g/n/ac WiFi adapter c821 RTL8821CE 802.11ac PCIe Wireless Network Adapter 10ed Ascii Corporation 7310 V7310 @@ -13354,6 +13409,7 @@ 0102 Extended IDE Controller 0103 EX-IDE Type-B 010f NVMe Controller + 0115 XG4 NVMe SSD Controller 0404 DVD Decoder card 0406 Tecra Video Capture device 0407 DVD Decoder card (Version 2) @@ -13482,6 +13538,7 @@ 1028 01d7 XPS M1210 1028 01f3 Inspiron 1420 1028 022f Inspiron 1525 + 103c 1521 HP EliteBook 8540w 103c 30b5 Presario V3242AU 103c 30b7 Presario V6133CL 103c 30cc Pavilion dv6700 @@ -13533,6 +13590,7 @@ 1028 01f5 Inspiron 1501 1028 024f Latitude e6500 103c 03b5 Presario V3242AU + 103c 1521 HP EliteBook 8540w 103c 30b7 Presario V6133CL 103c 30cf Pavilion dv9500/9600/9700 series 1183 0843 Alienware Aurora m9700 @@ -15032,7 +15090,7 @@ 12a2 Newgen Systems Corporation 12a3 Lucent Technologies 8105 T8105 H100 Digital Switch -12a4 NTT Electronics Technology Company +12a4 NTT Electronics Corporation 12a5 Vision Dynamics Ltd. 12a6 Scalable Networks, Inc. 12a7 AMO GmbH @@ -18684,6 +18742,7 @@ 15b3 0026 ConnectX-3 IB FDR Dual Port Mezzanine Card 15b3 0028 ConnectX-3 VPI Dual QSFP+ Port QDR Infiniband 40Gb/s or 10Gb Ethernet 15b3 0059 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Mezzanine Card + 15b3 0064 ConnectX-3 EN 10/40 GbE Single Port QSFP+ Adapter (MCX313A-BCBT) 15b3 0065 ConnectX-3 VPI IB FDR/40 GbE Dual Port QSFP+ Adapter 15b3 0066 ConnectX-3 IB FDR10 Dual Port Mezzanine Card 15b3 0067 ConnectX-3 VPI IB FDR/40 GbE Single Port QSFP+ Adapter @@ -18731,9 +18790,10 @@ 15b3 0050 ConnectX-4 100 GbE Dual Port QSFP28 Adapter 1014 MT27700 Family [ConnectX-4 Virtual Function] 1015 MT27710 Family [ConnectX-4 Lx] + 15b3 0001 ConnectX-4 Lx EN network interface card, 25GbE single-port SFP28, PCIe3.0 x8, tall bracket, ROHS R6 + 15b3 0003 Stand-up ConnectX-4 Lx EN, 25GbE dual-port SFP28, PCIe3.0 x8, MCX4121A-ACAT 15b3 0004 ConnectX-4 Lx Stand-up dual-port 10GbE MCX4121A-XCAT 15b3 0005 Mellanox Technologies ConnectX-4 Lx Stand-up single-port 40GbE MCX4131A-BCAT - 15b3 0016 ConnectX-4 Lx 25 GbE Dual Port SFP28 Adapter 15b3 0020 MCX4411A-ACQN, ConnectX-4 Lx EN OCP, 1x25Gb 15b3 0021 MCX4421A-ACQN ConnectX-4 Lx EN OCP,2x25G 15b3 0025 ConnectX-4 Lx 25 GbE Dual Port SFP28 rNDC @@ -20665,6 +20725,7 @@ 5808 DDRdrive X8 dd52 DDRdrive X1-30 19e5 Huawei Technologies Co., Ltd. + 1710 iBMA Virtual Network Adapter 1711 Hi1710 [iBMC Intelligent Management system chip w/VGA support] 19e7 NET (Network Equipment Technologies) 1001 STIX DSP Card @@ -20717,12 +20778,15 @@ 0200 TILE-Gx processor 0201 TILE-Gx Processor Virtual Function 2000 TILE-Gx PCI Express Root Port -1a4a SLAC National Accelerator Lab PPA-REG +1a4a SLAC National Accelerator Lab TID-AIR 1000 MCOR Power Supply Controller 1010 AMC EVR - Stockholm Timing Board 2000 PGPCard - 4 Lane 2001 PGPCard - 8 Lane Plus EVR 2010 PCI-Express EVR +# PC-260-101-03 + 2020 PGP-GEN3 PCIe + 2030 data_dev 1a51 Hectronic AB 1a55 Rohde & Schwarz DVS GmbH 0010 SDStationOEM @@ -21246,6 +21310,7 @@ 100e AR-ARKA-FX1 [Arkville 64B DPDK Data Mover] 1d6c 2001 DPDK-Aware Virtual Function [Arkville VF] 4200 A5PL-E1-10GETI [10 GbE Ethernet Traffic Instrument] +1d72 Xiaomi 1d78 DERA 1d7c Aerotech, Inc. 1d87 Fuzhou Rockchip Electronics Co., Ltd From owner-svn-src-all@freebsd.org Fri Mar 16 12:12:42 2018 Return-Path: Delivered-To: svn-src-all@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 63540F495F4; Fri, 16 Mar 2018 12:12:42 +0000 (UTC) (envelope-from emaste@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 1A20F7B8B8; Fri, 16 Mar 2018 12:12:42 +0000 (UTC) (envelope-from emaste@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 1516B23D51; Fri, 16 Mar 2018 12:12:42 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GCCf5X073068; Fri, 16 Mar 2018 12:12:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GCCfK6073067; Fri, 16 Mar 2018 12:12:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803161212.w2GCCfK6073067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Mar 2018 12:12:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331053 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 331053 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 12:12:42 -0000 Author: emaste Date: Fri Mar 16 12:12:41 2018 New Revision: 331053 URL: https://svnweb.freebsd.org/changeset/base/331053 Log: ANSIfy i386/vm86.c Modified: head/sys/i386/i386/vm86.c Modified: head/sys/i386/i386/vm86.c ============================================================================== --- head/sys/i386/i386/vm86.c Fri Mar 16 08:45:28 2018 (r331052) +++ head/sys/i386/i386/vm86.c Fri Mar 16 12:12:41 2018 (r331053) @@ -130,8 +130,7 @@ POPL(struct vm86frame *vmf) } int -vm86_emulate(vmf) - struct vm86frame *vmf; +vm86_emulate(struct vm86frame *vmf) { struct vm86_kernel *vm86; caddr_t addr; @@ -588,10 +587,7 @@ vm86_intcall(int intnum, struct vm86frame *vmf) * caller's cs:ip routine. */ int -vm86_datacall(intnum, vmf, vmc) - int intnum; - struct vm86frame *vmf; - struct vm86context *vmc; +vm86_datacall(int intnum, struct vm86frame *vmf, struct vm86context *vmc) { pt_entry_t *pte = (pt_entry_t *)vm86paddr; vm_paddr_t page; @@ -636,11 +632,8 @@ vm86_getaddr(struct vm86context *vmc, u_short sel, u_s } int -vm86_getptr(vmc, kva, sel, off) - struct vm86context *vmc; - vm_offset_t kva; - u_short *sel; - u_short *off; +vm86_getptr(struct vm86context *vmc, vm_offset_t kva, u_short *sel, + u_short *off) { int i; @@ -655,9 +648,7 @@ vm86_getptr(vmc, kva, sel, off) } int -vm86_sysarch(td, args) - struct thread *td; - char *args; +vm86_sysarch(struct thread *td, char *args) { int error = 0; struct i386_vm86_args ua; From owner-svn-src-all@freebsd.org Fri Mar 16 13:33:43 2018 Return-Path: Delivered-To: svn-src-all@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 6CDD3F4F919; Fri, 16 Mar 2018 13:33:43 +0000 (UTC) (envelope-from emaste@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 09EE77ED58; Fri, 16 Mar 2018 13:33:43 +0000 (UTC) (envelope-from emaste@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 04D3B2493D; Fri, 16 Mar 2018 13:33:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GDXgFD014109; Fri, 16 Mar 2018 13:33:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GDXg14014108; Fri, 16 Mar 2018 13:33:42 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803161333.w2GDXg14014108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Mar 2018 13:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331054 - head/sys/modules/sgx X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/modules/sgx X-SVN-Commit-Revision: 331054 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 13:33:43 -0000 Author: emaste Date: Fri Mar 16 13:33:42 2018 New Revision: 331054 URL: https://svnweb.freebsd.org/changeset/base/331054 Log: Move assym.s to DPSRC in sgx module assym.s is only to be included by other .s files, and should not actually be assembled by itself. Modified: head/sys/modules/sgx/Makefile Modified: head/sys/modules/sgx/Makefile ============================================================================== --- head/sys/modules/sgx/Makefile Fri Mar 16 12:12:41 2018 (r331053) +++ head/sys/modules/sgx/Makefile Fri Mar 16 13:33:42 2018 (r331054) @@ -3,8 +3,9 @@ .PATH: ${SRCTOP}/sys/amd64/sgx KMOD= sgx -SRCS= sgx.c sgxvar.h assym.s sgx_support.S +SRCS= sgx.c sgxvar.h sgx_support.S SRCS+= opt_compat.h opt_hwpmc_hooks.h opt_kstack_pages.h +DPSRCS= assym.s sgx_support.o: assym.s ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ From owner-svn-src-all@freebsd.org Fri Mar 16 14:05:46 2018 Return-Path: Delivered-To: svn-src-all@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 8676DF51B11; Fri, 16 Mar 2018 14:05:46 +0000 (UTC) (envelope-from ume@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 38A8480193; Fri, 16 Mar 2018 14:05:46 +0000 (UTC) (envelope-from ume@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 2EECF24E1F; Fri, 16 Mar 2018 14:05:46 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GE5kNR028875; Fri, 16 Mar 2018 14:05:46 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GE5knH028874; Fri, 16 Mar 2018 14:05:46 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201803161405.w2GE5knH028874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Fri, 16 Mar 2018 14:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331055 - stable/11/sys/fs/fdescfs X-SVN-Group: stable-11 X-SVN-Commit-Author: ume X-SVN-Commit-Paths: stable/11/sys/fs/fdescfs X-SVN-Commit-Revision: 331055 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 14:05:46 -0000 Author: ume Date: Fri Mar 16 14:05:45 2018 New Revision: 331055 URL: https://svnweb.freebsd.org/changeset/base/331055 Log: MFC r330681: Fix Bad file descriptor error. Modified: stable/11/sys/fs/fdescfs/fdesc_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/fdescfs/fdesc_vnops.c ============================================================================== --- stable/11/sys/fs/fdescfs/fdesc_vnops.c Fri Mar 16 13:33:42 2018 (r331054) +++ stable/11/sys/fs/fdescfs/fdesc_vnops.c Fri Mar 16 14:05:45 2018 (r331055) @@ -415,6 +415,8 @@ fdesc_pathconf(struct vop_pathconf_args *ap) *ap->a_retval = 1; return (0); default: + if (VTOFDESC(vp)->fd_type == Froot) + return (vop_stdpathconf(ap)); vref(vp); VOP_UNLOCK(vp, 0); error = kern_fpathconf(curthread, VTOFDESC(vp)->fd_fd, From owner-svn-src-all@freebsd.org Fri Mar 16 14:34:03 2018 Return-Path: Delivered-To: svn-src-all@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 42112F53719; Fri, 16 Mar 2018 14:34:03 +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 BE8BB813ED; Fri, 16 Mar 2018 14:34:01 +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 w2GEXsrS098132; Fri, 16 Mar 2018 07:33:54 -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 w2GEXsbP098131; Fri, 16 Mar 2018 07:33:54 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803161433.w2GEXsbP098131@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330972 - stable/11/share/misc In-Reply-To: <20180316181800.B904@besplex.bde.org> To: Bruce Evans Date: Fri, 16 Mar 2018 07:33:54 -0700 (PDT) CC: rgrimes@freebsd.org, Andriy Gapon , Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 14:34:03 -0000 > On Thu, 15 Mar 2018, Rodney W. Grimes wrote: > > >> On 15/03/2018 10:30, Eitan Adler wrote: > >>> ... > >>> Log: > >>> MFC r303063,r311852,r311930,r317040,r320506,r321301,r325162,r326759,r329004,: > >> I have never seen things like these MFC-ed before... > >> Should we be really doing them? > > > > Yes, imho. And the reasons may seem odd to sum, but here is my spin on this: > > ... > > Maybe we should even add to the end of the commiters "these are the > > things you should do as a new committer" the merging of your info > > into to all supported/active releases. Which is a good opportunity > > for teaching how to do svn sparse checkouts as you really do not > > want to pull all of stable/10 out just to commit to 1 file. > > Actually, it is necessary to check out everything to MFC to 1 file. > Sparse checkouts only work for committing to head. They break mergeinfo > for MFCs. Or so I was told when I MFCed with a sparse checkout. This is > my excuse for not MFC'ing anything. The procedure for a branch is harder, you can do sparse, you just have to do the tree one level at a time in sparse mode until you get to the leaf you want to commit at. Then you do the merge at the top of the sparse tree, then commit: (Recent example done to help someone with there first MFC:) #!/bin/sh mkdir ~/svnwork.r328011 cd ~/svnwork.r328011 svn checkout svn+ssh://repo.freebsd.org/base --depth immediates cd base/stable && svn update --set-depth=immediates cd 11 && svn update --set-depth=immediates cd sys && svn update --set-depth=immediates cd amd64 && svn update --set-depth=infinity cd ~/svnwork.r328011/base/stable/11 svn merge -c r328011,r329162 ^/head svn diff >~/svnwork.r328011/diff.OUT You now no longer have that excuse :-) -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Mar 16 14:46:40 2018 Return-Path: Delivered-To: svn-src-all@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 D43D1F544DB; Fri, 16 Mar 2018 14:46:39 +0000 (UTC) (envelope-from emaste@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 8125B81BDC; Fri, 16 Mar 2018 14:46:39 +0000 (UTC) (envelope-from emaste@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 7588625446; Fri, 16 Mar 2018 14:46:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GEkd4c049155; Fri, 16 Mar 2018 14:46:39 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GEkcLa049146; Fri, 16 Mar 2018 14:46:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803161446.w2GEkcLa049146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Mar 2018 14:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331056 - in head/sys: amd64/linux amd64/linux32 compat/linux conf i386/linux modules/linux modules/linux_common X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 compat/linux conf i386/linux modules/linux modules/linux_common X-SVN-Commit-Revision: 331056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 14:46:40 -0000 Author: emaste Date: Fri Mar 16 14:46:38 2018 New Revision: 331056 URL: https://svnweb.freebsd.org/changeset/base/331056 Log: Share a single bsd-linux errno table across MD consumers Three copies of the linuxulator linux_sysvec.c contained identical BSD to Linux errno translation tables, and future work to support other architectures will also use the same table. Move the table to a common file to be used by all. Make it 'const int' to place it in .rodata. (Some existing Linux architectures use MD errno values, but x86 and Arm share the generic set.) This change should introduce no functional change; a followup will add missing errno values. MFC after: 3 weeks Sponsored by: Turing Robotic Industries Inc. Differential Revision: https://reviews.freebsd.org/D14665 Added: head/sys/compat/linux/linux_errno.c (contents, props changed) Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/compat/linux/linux_emul.h head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/i386/linux/linux_sysvec.c head/sys/modules/linux/Makefile head/sys/modules/linux_common/Makefile Modified: head/sys/amd64/linux/linux_sysvec.c ============================================================================== --- head/sys/amd64/linux/linux_sysvec.c Fri Mar 16 14:05:45 2018 (r331055) +++ head/sys/amd64/linux/linux_sysvec.c Fri Mar 16 14:46:38 2018 (r331056) @@ -130,26 +130,6 @@ static void linux_exec_setregs(struct thread *td, stru u_long stack); static int linux_vsyscall(struct thread *td); -/* - * Linux syscalls return negative errno's, we do positive and map them - * Reference: - * FreeBSD: src/sys/sys/errno.h - * Linux: linux-2.6.17.8/include/asm-generic/errno-base.h - * linux-2.6.17.8/include/asm-generic/errno.h - */ -static int bsd_to_linux_errno[ELAST + 1] = { - -0, -1, -2, -3, -4, -5, -6, -7, -8, -9, - -10, -35, -12, -13, -14, -15, -16, -17, -18, -19, - -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, - -30, -31, -32, -33, -34, -11,-115,-114, -88, -89, - -90, -91, -92, -93, -94, -95, -96, -97, -98, -99, - -100,-101,-102,-103,-104,-105,-106,-107,-108,-109, - -110,-111, -40, -36,-112,-113, -39, -11, -87,-122, - -116, -66, -6, -6, -6, -6, -6, -37, -38, -9, - -6, -6, -43, -42, -75,-125, -84, -61, -16, -74, - -72, -67, -71 -}; - #define LINUX_T_UNKNOWN 255 static int _bsd_to_linux_trapcode[] = { LINUX_T_UNKNOWN, /* 0 */ @@ -774,7 +754,7 @@ struct sysentvec elf_linux_sysvec = { .sv_table = linux_sysent, .sv_mask = 0, .sv_errsize = ELAST + 1, - .sv_errtbl = bsd_to_linux_errno, + .sv_errtbl = bsd_to_linux_errno_generic, .sv_transtrap = translate_traps, .sv_fixup = elf_linux_fixup, .sv_sendsig = linux_rt_sendsig, Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Fri Mar 16 14:05:45 2018 (r331055) +++ head/sys/amd64/linux32/linux32_sysvec.c Fri Mar 16 14:46:38 2018 (r331056) @@ -131,26 +131,6 @@ static bool linux32_trans_osrel(const Elf_Note *note, static void linux_vdso_install(void *param); static void linux_vdso_deinstall(void *param); -/* - * Linux syscalls return negative errno's, we do positive and map them - * Reference: - * FreeBSD: src/sys/sys/errno.h - * Linux: linux-2.6.17.8/include/asm-generic/errno-base.h - * linux-2.6.17.8/include/asm-generic/errno.h - */ -static int bsd_to_linux_errno[ELAST + 1] = { - -0, -1, -2, -3, -4, -5, -6, -7, -8, -9, - -10, -35, -12, -13, -14, -15, -16, -17, -18, -19, - -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, - -30, -31, -32, -33, -34, -11,-115,-114, -88, -89, - -90, -91, -92, -93, -94, -95, -96, -97, -98, -99, - -100,-101,-102,-103,-104,-105,-106,-107,-108,-109, - -110,-111, -40, -36,-112,-113, -39, -11, -87,-122, - -116, -66, -6, -6, -6, -6, -6, -37, -38, -9, - -6, -6, -43, -42, -75,-125, -84, -61, -16, -74, - -72, -67, -71 -}; - #define LINUX_T_UNKNOWN 255 static int _bsd_to_linux_trapcode[] = { LINUX_T_UNKNOWN, /* 0 */ @@ -973,7 +953,7 @@ struct sysentvec elf_linux_sysvec = { .sv_table = linux32_sysent, .sv_mask = 0, .sv_errsize = ELAST + 1, - .sv_errtbl = bsd_to_linux_errno, + .sv_errtbl = bsd_to_linux_errno_generic, .sv_transtrap = translate_traps, .sv_fixup = elf_linux_fixup, .sv_sendsig = linux_sendsig, Modified: head/sys/compat/linux/linux_emul.h ============================================================================== --- head/sys/compat/linux/linux_emul.h Fri Mar 16 14:05:45 2018 (r331055) +++ head/sys/compat/linux/linux_emul.h Fri Mar 16 14:46:38 2018 (r331056) @@ -77,4 +77,6 @@ struct linux_pemuldata { struct linux_pemuldata *pem_find(struct proc *); +extern const int bsd_to_linux_errno_generic[]; + #endif /* !_LINUX_EMUL_H_ */ Added: head/sys/compat/linux/linux_errno.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linux/linux_errno.c Fri Mar 16 14:46:38 2018 (r331056) @@ -0,0 +1,143 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 1994-1996 Søren Schmidt + * 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 + +/* + * Linux syscalls return negative errno's, we do positive and map them + * Reference: + * FreeBSD: src/sys/sys/errno.h + * Linux: linux-2.6.17.8/include/asm-generic/errno-base.h + * linux-2.6.17.8/include/asm-generic/errno.h + */ +const int bsd_to_linux_errno_generic[ELAST + 1] = { + -0, + -1, + -2, + -3, + -4, + -5, + -6, + -7, + -8, + -9, + + -10, + -35, /* EDEADLK */ + -12, + -13, + -14, + -15, + -16, + -17, + -18, + -19, + + -20, + -21, + -22, + -23, + -24, + -25, + -26, + -27, + -28, + -29, + + -30, + -31, + -32, + -33, + -34, + -11, /* EAGAIN */ + -115, + -114, + -88, + -89, + + -90, + -91, + -92, + -93, + -94, + -95, + -96, + -97, + -98, + -99, + + -100, + -101, + -102, + -103, + -104, + -105, + -106, + -107, + -108, + -109, + + -110, + -111, + -40, + -36, + -112, + -113, + -39, + -11, + -87, + -122, + + -116, + -66, + -6, /* EBADRPC -> ENXIO */ + -6, /* ERPCMISMATCH -> ENXIO */ + -6, /* EPROGUNAVAIL -> ENXIO */ + -6, /* EPROGMISMATCH -> ENXIO */ + -6, /* EPROCUNAVAIL -> ENXIO */ + -37, + -38, + -9, + + -6, /* EAUTH -> ENXIO */ + -6, /* ENEEDAUTH -> ENXIO */ + -43, + -42, + -75, + -125, + -84, + -61, + -16, /* EDOOFUS -> EBUSY */ + -74, + + -72, + -67, + -71, +}; Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Fri Mar 16 14:05:45 2018 (r331055) +++ head/sys/conf/files.amd64 Fri Mar 16 14:46:38 2018 (r331056) @@ -616,6 +616,7 @@ amd64/linux32/linux32_support.s optional compat_linux3 amd64/linux32/linux32_sysent.c optional compat_linux32 amd64/linux32/linux32_sysvec.c optional compat_linux32 compat/linux/linux_emul.c optional compat_linux32 +compat/linux/linux_errno.c optional compat_linux32 compat/linux/linux_file.c optional compat_linux32 compat/linux/linux_fork.c optional compat_linux32 compat/linux/linux_futex.c optional compat_linux32 Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Fri Mar 16 14:05:45 2018 (r331055) +++ head/sys/conf/files.i386 Fri Mar 16 14:46:38 2018 (r331056) @@ -88,6 +88,7 @@ compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs compat/linux/linux_event.c optional compat_linux compat/linux/linux_emul.c optional compat_linux +compat/linux/linux_errno.c optional compat_linux compat/linux/linux_file.c optional compat_linux compat/linux/linux_fork.c optional compat_linux compat/linux/linux_futex.c optional compat_linux Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Fri Mar 16 14:05:45 2018 (r331055) +++ head/sys/i386/linux/linux_sysvec.c Fri Mar 16 14:46:38 2018 (r331056) @@ -126,26 +126,6 @@ static eventhandler_tag linux_exit_tag; static eventhandler_tag linux_exec_tag; static eventhandler_tag linux_thread_dtor_tag; -/* - * Linux syscalls return negative errno's, we do positive and map them - * Reference: - * FreeBSD: src/sys/sys/errno.h - * Linux: linux-2.6.17.8/include/asm-generic/errno-base.h - * linux-2.6.17.8/include/asm-generic/errno.h - */ -static int bsd_to_linux_errno[ELAST + 1] = { - -0, -1, -2, -3, -4, -5, -6, -7, -8, -9, - -10, -35, -12, -13, -14, -15, -16, -17, -18, -19, - -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, - -30, -31, -32, -33, -34, -11,-115,-114, -88, -89, - -90, -91, -92, -93, -94, -95, -96, -97, -98, -99, - -100,-101,-102,-103,-104,-105,-106,-107,-108,-109, - -110,-111, -40, -36,-112,-113, -39, -11, -87,-122, - -116, -66, -6, -6, -6, -6, -6, -37, -38, -9, - -6, -6, -43, -42, -75,-125, -84, -61, -16, -74, - -72, -67, -71 -}; - #define LINUX_T_UNKNOWN 255 static int _bsd_to_linux_trapcode[] = { LINUX_T_UNKNOWN, /* 0 */ @@ -913,7 +893,7 @@ struct sysentvec linux_sysvec = { .sv_table = linux_sysent, .sv_mask = 0, .sv_errsize = ELAST + 1, - .sv_errtbl = bsd_to_linux_errno, + .sv_errtbl = bsd_to_linux_errno_generic, .sv_transtrap = translate_traps, .sv_fixup = linux_fixup, .sv_sendsig = linux_sendsig, @@ -950,7 +930,7 @@ struct sysentvec elf_linux_sysvec = { .sv_table = linux_sysent, .sv_mask = 0, .sv_errsize = ELAST + 1, - .sv_errtbl = bsd_to_linux_errno, + .sv_errtbl = bsd_to_linux_errno_generic, .sv_transtrap = translate_traps, .sv_fixup = elf_linux_fixup, .sv_sendsig = linux_sendsig, Modified: head/sys/modules/linux/Makefile ============================================================================== --- head/sys/modules/linux/Makefile Fri Mar 16 14:05:45 2018 (r331055) +++ head/sys/modules/linux/Makefile Fri Mar 16 14:46:38 2018 (r331056) @@ -31,7 +31,7 @@ OBJS= ${VDSO}.so .if ${MACHINE_CPUARCH} == "i386" SRCS+= linux_ptrace.c imgact_linux.c linux_util.c linux_mib.c linux_mmap.c \ - linux_emul.c opt_cpu.h linux.c + linux_emul.c linux_errno.c opt_cpu.h linux.c .endif .if ${MACHINE_CPUARCH} == "i386" Modified: head/sys/modules/linux_common/Makefile ============================================================================== --- head/sys/modules/linux_common/Makefile Fri Mar 16 14:05:45 2018 (r331055) +++ head/sys/modules/linux_common/Makefile Fri Mar 16 14:46:38 2018 (r331056) @@ -4,9 +4,11 @@ KMOD= linux_common SRCS= linux_common.c linux_mib.c linux_mmap.c linux_util.c linux_emul.c \ + linux_errno.c \ linux.c opt_compat.h device_if.h vnode_if.h bus_if.h EXPORT_SYMS= +EXPORT_SYMS+= bsd_to_linux_errno_generic EXPORT_SYMS+= linux_emul_path EXPORT_SYMS+= linux_ioctl_register_handler EXPORT_SYMS+= linux_ioctl_unregister_handler From owner-svn-src-all@freebsd.org Fri Mar 16 14:51:48 2018 Return-Path: Delivered-To: svn-src-all@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 20878F54C1B; Fri, 16 Mar 2018 14:51:48 +0000 (UTC) (envelope-from emaste@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 66ECC82252; Fri, 16 Mar 2018 14:51:47 +0000 (UTC) (envelope-from emaste@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 61E3C255A7; Fri, 16 Mar 2018 14:51:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GEpl4Z053142; Fri, 16 Mar 2018 14:51:47 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GEpl3T053141; Fri, 16 Mar 2018 14:51:47 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803161451.w2GEpl3T053141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Mar 2018 14:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331057 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 331057 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 14:51:48 -0000 Author: emaste Date: Fri Mar 16 14:51:47 2018 New Revision: 331057 URL: https://svnweb.freebsd.org/changeset/base/331057 Log: linux_errno.c: add newer errno values Also introduce a static assert to ensure the list is kept up to date. Sponsored by: Turing Robotic Industries Inc. Modified: head/sys/compat/linux/linux_errno.c Modified: head/sys/compat/linux/linux_errno.c ============================================================================== --- head/sys/compat/linux/linux_errno.c Fri Mar 16 14:46:38 2018 (r331056) +++ head/sys/compat/linux/linux_errno.c Fri Mar 16 14:51:47 2018 (r331057) @@ -28,14 +28,15 @@ * $FreeBSD$ */ +#include #include /* * Linux syscalls return negative errno's, we do positive and map them * Reference: * FreeBSD: src/sys/sys/errno.h - * Linux: linux-2.6.17.8/include/asm-generic/errno-base.h - * linux-2.6.17.8/include/asm-generic/errno.h + * Linux: include/uapi/asm-generic/errno-base.h + * include/uapi/asm-generic/errno.h */ const int bsd_to_linux_errno_generic[ELAST + 1] = { -0, @@ -140,4 +141,11 @@ const int bsd_to_linux_errno_generic[ELAST + 1] = { -72, -67, -71, + -1, /* ENOTCAPABLE -> EPERM */ + -1, /* ECAPMODE -> EPERM */ + -131, /* ENOTRECOVERABLE */ + -130, /* EOWNERDEAD */ }; + +_Static_assert(ELAST == 96, + "missing errno entries in bsd_to_linux_errno_generic"); From owner-svn-src-all@freebsd.org Fri Mar 16 15:04:14 2018 Return-Path: Delivered-To: svn-src-all@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 64717F558E1; Fri, 16 Mar 2018 15:04:14 +0000 (UTC) (envelope-from eugen@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 18161829E9; Fri, 16 Mar 2018 15:04:14 +0000 (UTC) (envelope-from eugen@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 0EC472577C; Fri, 16 Mar 2018 15:04:14 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GF4EnJ059333; Fri, 16 Mar 2018 15:04:14 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GF4Dhf059330; Fri, 16 Mar 2018 15:04:13 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201803161504.w2GF4Dhf059330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 16 Mar 2018 15:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331058 - in stable/11: share/man/man4 sys/netgraph X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/netgraph X-SVN-Commit-Revision: 331058 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 15:04:14 -0000 Author: eugen Date: Fri Mar 16 15:04:13 2018 New Revision: 331058 URL: https://svnweb.freebsd.org/changeset/base/331058 Log: MFC r329279: add support for user-supplied Host-Uniq tag to ng_pppoe(4). Submitted by: ale Approved by: avg (mentor), mav (mentor) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D9270 Modified: stable/11/share/man/man4/ng_pppoe.4 stable/11/sys/netgraph/ng_pppoe.c stable/11/sys/netgraph/ng_pppoe.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/ng_pppoe.4 ============================================================================== --- stable/11/share/man/man4/ng_pppoe.4 Fri Mar 16 14:51:47 2018 (r331057) +++ stable/11/share/man/man4/ng_pppoe.4 Fri Mar 16 15:04:13 2018 (r331058) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $ .\" -.Dd September 15, 2015 +.Dd February 14, 2018 .Dt NG_PPPOE 4 .Os .Sh NAME @@ -104,12 +104,33 @@ the state machine as a client. It must be newly created and a service name can be given as an argument. It is legal to specify a zero-length service name, this is common on some DSL setups. -It is possible to request a connection to a specific -access concentrator by its name using the "AC-Name\\Service-Name" syntax. -A session request packet will be broadcasted on the Ethernet. +It is possible to request a connection to a specific access concentrator, +and/or set a specific Host-Uniq tag, required by some Internet providers, +using the +.Qq Li [AC-Name\\][Host-Uniq|]Service-Name +syntax. +To set a binary Host-Uniq, it must be encoded as a hexadecimal lowercase +string and prefixed with +.Qq Li 0x , +for example +.Qq Li 0x6d792d746167 +is equivalent to +.Qq Li my-tag . +A session request packet will be broadcast on the Ethernet. This command uses the .Dv ngpppoe_init_data structure shown below. +For example, this init data argument can be used to +connect to +.Qq Li my-isp +service with +.Qq Li my-host +uniq tag, accepting only +.Qq Li remote-ac +as access concentrator: +.Bd -literal -offset indent +"remote-ac\\my-host|my-isp" +.Ed .It Dv NGM_PPPOE_LISTEN Pq Ic pppoe_listen Tell a nominated newly created hook that its session should enter the state machine as a server listener. @@ -258,7 +279,41 @@ struct ngpppoe_maxp { uint16_t data; }; .Ed +.It Dv NGM_PPPOE_SEND_HURL Pq Ic send_hurl +Tell a nominated hook with an active session to send a PADM message with +a HURL tag. +The argument is the URL to be delivered to the client: +.Bd -literal -offset indent +ngctl msg fxp0:orphans send_hurl '{ hook="myHook" data="http://example.net/cpe" }' +.Ed +.It Dv NGM_PPPOE_SEND_MOTM Pq Ic send_motm +Tell a nominated hook with an active session to send a PADM message with +a MOTM tag. +The argument is the message to be delivered to the client: +.Bd -literal -offset indent +ngctl msg fxp0:orphans send_motm '{ hook="myHook" data="Welcome aboard" }' +.Ed .El +.Pp +The two commands above use the same ngpppoe_init_data structure described +above. +.Bl -tag -width 3n +.It Dv NGM_PPPOE_HURL +This command is sent to the node that started this session when a PADM +message with a HURL tag is received, and contains a URL that the host can +pass to a web browser for presentation to the user. +.It Dv NGM_PPPOE_MOTM +This command is sent to the node that started this session when a PADM +message with a MOTM tag is received, and contains a Message Of The +Minute that the host can display to the user. +.El +.Pp +The two commands above use a common data structure: +.Bd -literal -offset 4n +struct ngpppoe_padm { + char msg[PPPOE_PADM_VALUE_SIZE]; +}; +.Ed .Sh SHUTDOWN This node shuts down upon receipt of a .Dv NGM_SHUTDOWN Modified: stable/11/sys/netgraph/ng_pppoe.c ============================================================================== --- stable/11/sys/netgraph/ng_pppoe.c Fri Mar 16 14:51:47 2018 (r331057) +++ stable/11/sys/netgraph/ng_pppoe.c Fri Mar 16 15:04:13 2018 (r331058) @@ -175,6 +175,20 @@ static const struct ng_cmdlist ng_pppoe_cmds[] = { &ng_parse_uint16_type, NULL }, + { + NGM_PPPOE_COOKIE, + NGM_PPPOE_SEND_HURL, + "send_hurl", + &ngpppoe_init_data_state_type, + NULL + }, + { + NGM_PPPOE_COOKIE, + NGM_PPPOE_SEND_MOTM, + "send_motm", + &ngpppoe_init_data_state_type, + NULL + }, { 0 } }; @@ -226,9 +240,11 @@ struct sess_neg { const struct pppoe_tag *tags[NUMTAGS]; u_int service_len; u_int ac_name_len; + u_int host_uniq_len; struct datatag service; struct datatag ac_name; + struct datatag host_uniq; }; typedef struct sess_neg *negp; @@ -589,22 +605,47 @@ static hook_p pppoe_finduniq(node_p node, const struct pppoe_tag *tag) { hook_p hook = NULL; - union uniq uniq; + sessp sp; - bcopy(tag + 1, uniq.bytes, sizeof(void *)); /* Cycle through all known hooks. */ LIST_FOREACH(hook, &node->nd_hooks, hk_hooks) { /* Skip any nonsession hook. */ if (NG_HOOK_PRIVATE(hook) == NULL) continue; - if (uniq.pointer == NG_HOOK_PRIVATE(hook)) + sp = NG_HOOK_PRIVATE(hook); + /* Skip already connected sessions. */ + if (sp->neg == NULL) + continue; + if (sp->neg->host_uniq_len == ntohs(tag->tag_len) && + bcmp(sp->neg->host_uniq.data, (const char *)(tag + 1), + sp->neg->host_uniq_len) == 0) break; } - CTR3(KTR_NET, "%20s: matched %p for %p", __func__, hook, uniq.pointer); + CTR3(KTR_NET, "%20s: matched %p for %p", __func__, hook, sp); return (hook); } +static hook_p +pppoe_findcookie(node_p node, const struct pppoe_tag *tag) +{ + hook_p hook = NULL; + union uniq cookie; + + bcopy(tag + 1, cookie.bytes, sizeof(void *)); + /* Cycle through all known hooks. */ + LIST_FOREACH(hook, &node->nd_hooks, hk_hooks) { + /* Skip any nonsession hook. */ + if (NG_HOOK_PRIVATE(hook) == NULL) + continue; + if (cookie.pointer == NG_HOOK_PRIVATE(hook)) + break; + } + CTR3(KTR_NET, "%20s: matched %p for %p", __func__, hook, cookie.pointer); + + return (hook); +} + /************************************************************************** * Start of Netgraph entrypoints. * **************************************************************************/ @@ -744,17 +785,29 @@ ng_pppoe_rcvmsg(node_p node, item_p item, hook_p lasth case NGM_PPPOE_LISTEN: case NGM_PPPOE_OFFER: case NGM_PPPOE_SERVICE: + case NGM_PPPOE_SEND_HURL: + case NGM_PPPOE_SEND_MOTM: ourmsg = (struct ngpppoe_init_data *)msg->data; if (msg->header.arglen < sizeof(*ourmsg)) { log(LOG_ERR, "ng_pppoe[%x]: init data too " "small\n", node->nd_ID); LEAVE(EMSGSIZE); } - if (msg->header.arglen - sizeof(*ourmsg) > - PPPOE_SERVICE_NAME_SIZE) { - log(LOG_ERR, "ng_pppoe[%x]: service name " - "too big\n", node->nd_ID); - LEAVE(EMSGSIZE); + if (msg->header.cmd == NGM_PPPOE_SEND_HURL || + msg->header.cmd == NGM_PPPOE_SEND_MOTM) { + if (msg->header.arglen - sizeof(*ourmsg) > + PPPOE_PADM_VALUE_SIZE) { + log(LOG_ERR, "ng_pppoe[%x]: message " + "too big\n", node->nd_ID); + LEAVE(EMSGSIZE); + } + } else { + if (msg->header.arglen - sizeof(*ourmsg) > + PPPOE_SERVICE_NAME_SIZE) { + log(LOG_ERR, "ng_pppoe[%x]: service name " + "too big\n", node->nd_ID); + LEAVE(EMSGSIZE); + } } if (msg->header.arglen - sizeof(*ourmsg) < ourmsg->data_len) { @@ -794,6 +847,20 @@ ng_pppoe_rcvmsg(node_p node, item_p item, hook_p lasth if (msg->header.cmd == NGM_PPPOE_SERVICE) break; + /* + * PADM messages are set up on active sessions. + */ + if (msg->header.cmd == NGM_PPPOE_SEND_HURL || + msg->header.cmd == NGM_PPPOE_SEND_MOTM) { + if (sp->state != PPPOE_NEWCONNECTED && + sp->state != PPPOE_CONNECTED) { + log(LOG_NOTICE, "ng_pppoe[%x]: session is not " + "active\n", node->nd_ID); + LEAVE(EISCONN); + } + break; + } + if (sp->state != PPPOE_SNONE) { log(LOG_NOTICE, "ng_pppoe[%x]: Session already " "active\n", node->nd_ID); @@ -848,12 +915,15 @@ ng_pppoe_rcvmsg(node_p node, item_p item, hook_p lasth * Check the hook exists and is Uninitialised. * Send a PADI request, and start the timeout logic. * Store the originator of this message so we can send - * a success of fail message to them later. + * a success or fail message to them later. * Move the session to SINIT. * Set up the session to the correct state and * start it. */ - int i, acnlen = 0, acnsep = 0, srvlen; + int acnpos, acnlen = 0, acnsep = 0; + int hupos, hulen = 0, husep = 0; + int i, srvpos, srvlen; + acnpos = 0; for (i = 0; i < ourmsg->data_len; i++) { if (ourmsg->data[i] == '\\') { acnlen = i; @@ -861,15 +931,56 @@ ng_pppoe_rcvmsg(node_p node, item_p item, hook_p lasth break; } } - srvlen = ourmsg->data_len - acnlen - acnsep; + hupos = acnlen + acnsep; + for (i = hupos; i < ourmsg->data_len; i++) { + if (ourmsg->data[i] == '|') { + hulen = i - hupos; + husep = 1; + break; + } + } + srvpos = hupos + hulen + husep; + srvlen = ourmsg->data_len - srvpos; - bcopy(ourmsg->data, neg->ac_name.data, acnlen); + bcopy(ourmsg->data + acnpos, neg->ac_name.data, acnlen); neg->ac_name_len = acnlen; + neg->host_uniq.hdr.tag_type = PTT_HOST_UNIQ; + if (hulen == 0) { + /* Not provided, generate one */ + neg->host_uniq.hdr.tag_len = htons(sizeof(sp)); + bcopy(&sp, neg->host_uniq.data, sizeof(sp)); + neg->host_uniq_len = sizeof(sp); + } else if (hulen > 2 && ourmsg->data[hupos] == '0' && + ourmsg->data[hupos + 1] == 'x' && hulen % 2 == 0) { + /* Hex encoded */ + static const char hexdig[16] = "0123456789abcdef"; + int j; + + neg->host_uniq.hdr.tag_len = htons((uint16_t)(hulen / 2 - 1)); + for (i = 0; i < hulen - 2; i++) { + for (j = 0; + j < 16 && + ourmsg->data[hupos + 2 + i] != hexdig[j]; + j++); + if (j == 16) + LEAVE(EINVAL); + if (i % 2 == 0) + neg->host_uniq.data[i / 2] = j << 4; + else + neg->host_uniq.data[i / 2] |= j; + } + neg->host_uniq_len = hulen / 2 - 1; + } else { + /* Plain string */ + neg->host_uniq.hdr.tag_len = htons((uint16_t)hulen); + bcopy(ourmsg->data + hupos, neg->host_uniq.data, hulen); + neg->host_uniq_len = hulen; + } + neg->service.hdr.tag_type = PTT_SRV_NAME; neg->service.hdr.tag_len = htons((uint16_t)srvlen); - bcopy(ourmsg->data + acnlen + acnsep, - neg->service.data, srvlen); + bcopy(ourmsg->data + srvpos, neg->service.data, srvlen); neg->service_len = srvlen; pppoe_start(sp); break; @@ -879,7 +990,7 @@ ng_pppoe_rcvmsg(node_p node, item_p item, hook_p lasth * Check the hook exists and is Uninitialised. * Install the service matching string. * Store the originator of this message so we can send - * a success of fail message to them later. + * a success or fail message to them later. * Move the hook to 'LISTENING' */ neg->service.hdr.tag_type = PTT_SRV_NAME; @@ -1019,6 +1130,92 @@ ng_pppoe_rcvmsg(node_p node, item_p item, hook_p lasth privp->max_payload.hdr.tag_len = htons(sizeof(uint16_t)); privp->max_payload.data = htons(*((uint16_t *)msg->data)); break; + case NGM_PPPOE_SEND_HURL: + { + struct mbuf *m; + + /* Generate a packet of that type. */ + m = m_gethdr(M_NOWAIT, MT_DATA); + if (m == NULL) + log(LOG_NOTICE, "ng_pppoe[%x]: session out of " + "mbufs\n", node->nd_ID); + else { + struct pppoe_full_hdr *wh; + struct pppoe_tag *tag; + int error = 0; + + wh = mtod(m, struct pppoe_full_hdr *); + bcopy(&sp->pkt_hdr, wh, sizeof(*wh)); + + /* Revert the stored header to DISC/PADM mode. */ + wh->ph.code = PADM_CODE; + /* + * Configure ethertype depending on what + * was used during sessions stage. + */ + if (wh->eh.ether_type == + ETHERTYPE_PPPOE_3COM_SESS) + wh->eh.ether_type = ETHERTYPE_PPPOE_3COM_DISC; + else + wh->eh.ether_type = ETHERTYPE_PPPOE_DISC; + /* + * Add PADM message and adjust sizes. + */ + tag = (void *)(&wh->ph + 1); + tag->tag_type = PTT_HURL; + tag->tag_len = htons(ourmsg->data_len); + strncpy((char *)(tag + 1), ourmsg->data, ourmsg->data_len); + m->m_pkthdr.len = m->m_len = sizeof(*wh) + sizeof(*tag) + + ourmsg->data_len; + wh->ph.length = htons(sizeof(*tag) + ourmsg->data_len); + NG_SEND_DATA_ONLY(error, + privp->ethernet_hook, m); + } + break; + } + case NGM_PPPOE_SEND_MOTM: + { + struct mbuf *m; + + /* Generate a packet of that type. */ + m = m_gethdr(M_NOWAIT, MT_DATA); + if (m == NULL) + log(LOG_NOTICE, "ng_pppoe[%x]: session out of " + "mbufs\n", node->nd_ID); + else { + struct pppoe_full_hdr *wh; + struct pppoe_tag *tag; + int error = 0; + + wh = mtod(m, struct pppoe_full_hdr *); + bcopy(&sp->pkt_hdr, wh, sizeof(*wh)); + + /* Revert the stored header to DISC/PADM mode. */ + wh->ph.code = PADM_CODE; + /* + * Configure ethertype depending on what + * was used during sessions stage. + */ + if (wh->eh.ether_type == + ETHERTYPE_PPPOE_3COM_SESS) + wh->eh.ether_type = ETHERTYPE_PPPOE_3COM_DISC; + else + wh->eh.ether_type = ETHERTYPE_PPPOE_DISC; + /* + * Add PADM message and adjust sizes. + */ + tag = (void *)(&wh->ph + 1); + tag->tag_type = PTT_MOTM; + tag->tag_len = htons(ourmsg->data_len); + strncpy((char *)(tag + 1), ourmsg->data, ourmsg->data_len); + m->m_pkthdr.len = m->m_len = sizeof(*wh) + sizeof(*tag) + + ourmsg->data_len; + wh->ph.length = htons(sizeof(*tag) + ourmsg->data_len); + NG_SEND_DATA_ONLY(error, + privp->ethernet_hook, m); + } + break; + } default: LEAVE(EINVAL); } @@ -1061,10 +1258,6 @@ pppoe_start(sessp sp) node_p node = NG_HOOK_NODE(hook); priv_p privp = NG_NODE_PRIVATE(node); negp neg = sp->neg; - struct { - struct pppoe_tag hdr; - union uniq data; - } __packed uniqtag; struct mbuf *m0; int error; @@ -1080,11 +1273,8 @@ pppoe_start(sessp sp) memcpy((void *)&neg->pkt->pkt_header.eh, &privp->eh, sizeof(struct ether_header)); neg->pkt->pkt_header.ph.code = PADI_CODE; - uniqtag.hdr.tag_type = PTT_HOST_UNIQ; - uniqtag.hdr.tag_len = htons((u_int16_t)sizeof(uniqtag.data)); - uniqtag.data.pointer = sp; init_tags(sp); - insert_tag(sp, &uniqtag.hdr); + insert_tag(sp, &neg->host_uniq.hdr); insert_tag(sp, &neg->service.hdr); if (privp->max_payload.data != 0) insert_tag(sp, &privp->max_payload.hdr); @@ -1163,6 +1353,52 @@ send_maxp(sessp sp, const struct pppoe_tag *tag) return (error); } +static int +send_hurl(sessp sp, const struct pppoe_tag *tag) +{ + int error, tlen; + struct ng_mesg *msg; + struct ngpppoe_padm *padm; + + CTR2(KTR_NET, "%20s: called %d", __func__, sp->Session_ID); + + NG_MKMESSAGE(msg, NGM_PPPOE_COOKIE, NGM_PPPOE_HURL, + sizeof(struct ngpppoe_padm), M_NOWAIT); + if (msg == NULL) + return (ENOMEM); + + padm = (struct ngpppoe_padm *)msg->data; + tlen = min(PPPOE_PADM_VALUE_SIZE - 1, ntohs(tag->tag_len)); + strncpy(padm->msg, (const char *)(tag + 1), tlen); + padm->msg[tlen] = '\0'; + NG_SEND_MSG_ID(error, NG_HOOK_NODE(sp->hook), msg, sp->creator, 0); + + return (error); +} + +static int +send_motm(sessp sp, const struct pppoe_tag *tag) +{ + int error, tlen; + struct ng_mesg *msg; + struct ngpppoe_padm *padm; + + CTR2(KTR_NET, "%20s: called %d", __func__, sp->Session_ID); + + NG_MKMESSAGE(msg, NGM_PPPOE_COOKIE, NGM_PPPOE_MOTM, + sizeof(struct ngpppoe_padm), M_NOWAIT); + if (msg == NULL) + return (ENOMEM); + + padm = (struct ngpppoe_padm *)msg->data; + tlen = min(PPPOE_PADM_VALUE_SIZE - 1, ntohs(tag->tag_len)); + strncpy(padm->msg, (const char *)(tag + 1), tlen); + padm->msg[tlen] = '\0'; + NG_SEND_MSG_ID(error, NG_HOOK_NODE(sp->hook), msg, sp->creator, 0); + + return (error); +} + /* * Receive data from session hook and do something with it. */ @@ -1320,6 +1556,7 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item) const priv_p privp = NG_NODE_PRIVATE(node); sessp sp; const struct pppoe_tag *utag = NULL, *tag = NULL; + const struct pppoe_tag sntag = { PTT_SRV_NAME, 0 }; const struct pppoe_full_hdr *wh; const struct pppoe_hdr *ph; negp neg = NULL; @@ -1409,11 +1646,8 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item) * processing. */ tag = get_tag(ph, PTT_SRV_NAME); - if (tag == NULL) { - CTR1(KTR_NET, "%20s: PADI w/o Service-Name", - __func__); - LEAVE(ENETUNREACH); - } + if (tag == NULL) + tag = &sntag; /* * First, try to match Service-Name against our @@ -1438,8 +1672,7 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item) * For now simply accept the first we receive. */ utag = get_tag(ph, PTT_HOST_UNIQ); - if ((utag == NULL) || - (ntohs(utag->tag_len) != sizeof(sp))) { + if (utag == NULL) { log(LOG_NOTICE, "ng_pppoe[%x]: no host " "unique field\n", node->nd_ID); LEAVE(ENETUNREACH); @@ -1529,7 +1762,7 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item) LEAVE(ENETUNREACH); } - sendhook = pppoe_finduniq(node, utag); + sendhook = pppoe_findcookie(node, utag); if (sendhook == NULL) LEAVE(ENETUNREACH); @@ -1605,8 +1838,7 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item) * set us into Session mode. */ utag = get_tag(ph, PTT_HOST_UNIQ); - if ((utag == NULL) || - (ntohs(utag->tag_len) != sizeof(sp))) { + if (utag == NULL) { LEAVE (ENETUNREACH); } sendhook = pppoe_finduniq(node, utag); @@ -1659,6 +1891,19 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item) /* Disconnect that hook. */ ng_rmhook_self(sp->hook); break; + case PADM_CODE: + /* + * We are a client: + * find matching peer/session combination. + */ + sp = pppoe_findsession(privp, wh); + if (sp == NULL) + LEAVE (ENETUNREACH); + if ((tag = get_tag(ph, PTT_HURL))) + send_hurl(sp, tag); + if ((tag = get_tag(ph, PTT_MOTM))) + send_motm(sp, tag); + break; default: LEAVE(EPFNOSUPPORT); } @@ -1781,7 +2026,7 @@ ng_pppoe_disconnect(hook_p hook) struct mbuf *m; /* Generate a packet of that type. */ - MGETHDR(m, M_NOWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) log(LOG_NOTICE, "ng_pppoe[%x]: session out of " "mbufs\n", node->nd_ID); @@ -1791,8 +2036,6 @@ ng_pppoe_disconnect(hook_p hook) int msglen = strlen(SIGNOFF); int error = 0; - m->m_pkthdr.rcvif = NULL; - m->m_pkthdr.len = m->m_len = sizeof(*wh); wh = mtod(m, struct pppoe_full_hdr *); bcopy(&sp->pkt_hdr, wh, sizeof(*wh)); @@ -1815,8 +2058,8 @@ ng_pppoe_disconnect(hook_p hook) tag->tag_type = PTT_GEN_ERR; tag->tag_len = htons((u_int16_t)msglen); strncpy((char *)(tag + 1), SIGNOFF, msglen); - m->m_pkthdr.len = (m->m_len += sizeof(*tag) + - msglen); + m->m_pkthdr.len = m->m_len = sizeof(*wh) + sizeof(*tag) + + msglen; wh->ph.length = htons(sizeof(*tag) + msglen); NG_SEND_DATA_ONLY(error, privp->ethernet_hook, m); @@ -1933,6 +2176,8 @@ scan_tags(sessp sp, const struct pppoe_hdr* ph) case PTT_SYS_ERR: case PTT_GEN_ERR: case PTT_MAX_PAYL: + case PTT_HURL: + case PTT_MOTM: break; } pt = (const struct pppoe_tag*)ptn; Modified: stable/11/sys/netgraph/ng_pppoe.h ============================================================================== --- stable/11/sys/netgraph/ng_pppoe.h Fri Mar 16 14:51:47 2018 (r331057) +++ stable/11/sys/netgraph/ng_pppoe.h Fri Mar 16 15:04:13 2018 (r331058) @@ -52,8 +52,10 @@ #define NGM_PPPOE_COOKIE 1089893072 #define NGM_PPPOE_SETMAXP_COOKIE 1441624322 +#define NGM_PPPOE_PADM_COOKIE 1488405822 #define PPPOE_SERVICE_NAME_SIZE 64 /* for now */ +#define PPPOE_PADM_VALUE_SIZE 128 /* for now */ /* Hook names */ #define NG_PPPOE_HOOK_ETHERNET "ethernet" @@ -84,7 +86,11 @@ enum cmd { NGM_PPPOE_SETMODE = 12, /* set to standard or compat modes */ NGM_PPPOE_GETMODE = 13, /* see current mode */ NGM_PPPOE_SETENADDR = 14, /* set Ethernet address */ - NGM_PPPOE_SETMAXP = 15 /* Set PPP-Max-Payload value */ + NGM_PPPOE_SETMAXP = 15, /* Set PPP-Max-Payload value */ + NGM_PPPOE_SEND_HURL = 16, /* Send PADM HURL message */ + NGM_PPPOE_HURL = 17, /* HURL for informational purposes */ + NGM_PPPOE_SEND_MOTM = 18, /* Send PADM MOTM message */ + NGM_PPPOE_MOTM = 19 /* MOTM for informational purposes */ }; /*********************** @@ -157,6 +163,13 @@ struct ngpppoe_maxp { uint16_t data; }; +/* + * This structure is used to send PADM messages from server to client. + */ +struct ngpppoe_padm { + char msg[PPPOE_PADM_VALUE_SIZE]; +}; + /******************************************************************** * Constants and definitions specific to pppoe ********************************************************************/ @@ -171,6 +184,7 @@ struct ngpppoe_maxp { #define PADR_CODE 0x19 #define PADS_CODE 0x65 #define PADT_CODE 0xa7 +#define PADM_CODE 0xd3 /* Tag identifiers */ #if BYTE_ORDER == BIG_ENDIAN @@ -181,6 +195,8 @@ struct ngpppoe_maxp { #define PTT_AC_COOKIE (0x0104) #define PTT_VENDOR (0x0105) #define PTT_RELAY_SID (0x0110) +#define PTT_HURL (0x0111) /* PPPoE Extensions (CARREL) */ +#define PTT_MOTM (0x0112) /* PPPoE Extensions (CARREL) */ #define PTT_MAX_PAYL (0x0120) /* PPP-Max-Payload (RFC4638) */ #define PTT_SRV_ERR (0x0201) #define PTT_SYS_ERR (0x0202) @@ -198,6 +214,8 @@ struct ngpppoe_maxp { #define PTT_AC_COOKIE (0x0401) #define PTT_VENDOR (0x0501) #define PTT_RELAY_SID (0x1001) +#define PTT_HURL (0x1101) /* PPPoE Extensions (CARREL) */ +#define PTT_MOTM (0x1201) /* PPPoE Extensions (CARREL) */ #define PTT_MAX_PAYL (0x2001) /* PPP-Max-Payload (RFC4638) */ #define PTT_SRV_ERR (0x0102) #define PTT_SYS_ERR (0x0202) From owner-svn-src-all@freebsd.org Fri Mar 16 15:10:14 2018 Return-Path: Delivered-To: svn-src-all@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 38D76F55EC8; Fri, 16 Mar 2018 15:10:14 +0000 (UTC) (envelope-from eugen@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 DA50582C79; Fri, 16 Mar 2018 15:10:13 +0000 (UTC) (envelope-from eugen@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 D0CF325781; Fri, 16 Mar 2018 15:10:13 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GFADsW059599; Fri, 16 Mar 2018 15:10:13 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GFADcC059596; Fri, 16 Mar 2018 15:10:13 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201803161510.w2GFADcC059596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 16 Mar 2018 15:10:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r331059 - in stable/10: share/man/man4 sys/netgraph X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in stable/10: share/man/man4 sys/netgraph X-SVN-Commit-Revision: 331059 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 15:10:14 -0000 Author: eugen Date: Fri Mar 16 15:10:13 2018 New Revision: 331059 URL: https://svnweb.freebsd.org/changeset/base/331059 Log: MFC r329279: add support for user-supplied Host-Uniq tag to ng_pppoe(4). Submitted by: ale Approved by: mav (mentor) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D9270 Modified: stable/10/share/man/man4/ng_pppoe.4 stable/10/sys/netgraph/ng_pppoe.c stable/10/sys/netgraph/ng_pppoe.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/ng_pppoe.4 ============================================================================== --- stable/10/share/man/man4/ng_pppoe.4 Fri Mar 16 15:04:13 2018 (r331058) +++ stable/10/share/man/man4/ng_pppoe.4 Fri Mar 16 15:10:13 2018 (r331059) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $ .\" -.Dd September 15, 2015 +.Dd February 14, 2018 .Dt NG_PPPOE 4 .Os .Sh NAME @@ -104,12 +104,33 @@ the state machine as a client. It must be newly created and a service name can be given as an argument. It is legal to specify a zero-length service name, this is common on some DSL setups. -It is possible to request a connection to a specific -access concentrator by its name using the "AC-Name\\Service-Name" syntax. -A session request packet will be broadcasted on the Ethernet. +It is possible to request a connection to a specific access concentrator, +and/or set a specific Host-Uniq tag, required by some Internet providers, +using the +.Qq Li [AC-Name\\][Host-Uniq|]Service-Name +syntax. +To set a binary Host-Uniq, it must be encoded as a hexadecimal lowercase +string and prefixed with +.Qq Li 0x , +for example +.Qq Li 0x6d792d746167 +is equivalent to +.Qq Li my-tag . +A session request packet will be broadcast on the Ethernet. This command uses the .Dv ngpppoe_init_data structure shown below. +For example, this init data argument can be used to +connect to +.Qq Li my-isp +service with +.Qq Li my-host +uniq tag, accepting only +.Qq Li remote-ac +as access concentrator: +.Bd -literal -offset indent +"remote-ac\\my-host|my-isp" +.Ed .It Dv NGM_PPPOE_LISTEN Pq Ic pppoe_listen Tell a nominated newly created hook that its session should enter the state machine as a server listener. @@ -258,7 +279,41 @@ struct ngpppoe_maxp { uint16_t data; }; .Ed +.It Dv NGM_PPPOE_SEND_HURL Pq Ic send_hurl +Tell a nominated hook with an active session to send a PADM message with +a HURL tag. +The argument is the URL to be delivered to the client: +.Bd -literal -offset indent +ngctl msg fxp0:orphans send_hurl '{ hook="myHook" data="http://example.net/cpe" }' +.Ed +.It Dv NGM_PPPOE_SEND_MOTM Pq Ic send_motm +Tell a nominated hook with an active session to send a PADM message with +a MOTM tag. +The argument is the message to be delivered to the client: +.Bd -literal -offset indent +ngctl msg fxp0:orphans send_motm '{ hook="myHook" data="Welcome aboard" }' +.Ed .El +.Pp +The two commands above use the same ngpppoe_init_data structure described +above. +.Bl -tag -width 3n +.It Dv NGM_PPPOE_HURL +This command is sent to the node that started this session when a PADM +message with a HURL tag is received, and contains a URL that the host can +pass to a web browser for presentation to the user. +.It Dv NGM_PPPOE_MOTM +This command is sent to the node that started this session when a PADM +message with a MOTM tag is received, and contains a Message Of The +Minute that the host can display to the user. +.El +.Pp +The two commands above use a common data structure: +.Bd -literal -offset 4n +struct ngpppoe_padm { + char msg[PPPOE_PADM_VALUE_SIZE]; +}; +.Ed .Sh SHUTDOWN This node shuts down upon receipt of a .Dv NGM_SHUTDOWN Modified: stable/10/sys/netgraph/ng_pppoe.c ============================================================================== --- stable/10/sys/netgraph/ng_pppoe.c Fri Mar 16 15:04:13 2018 (r331058) +++ stable/10/sys/netgraph/ng_pppoe.c Fri Mar 16 15:10:13 2018 (r331059) @@ -175,6 +175,20 @@ static const struct ng_cmdlist ng_pppoe_cmds[] = { &ng_parse_uint16_type, NULL }, + { + NGM_PPPOE_COOKIE, + NGM_PPPOE_SEND_HURL, + "send_hurl", + &ngpppoe_init_data_state_type, + NULL + }, + { + NGM_PPPOE_COOKIE, + NGM_PPPOE_SEND_MOTM, + "send_motm", + &ngpppoe_init_data_state_type, + NULL + }, { 0 } }; @@ -226,9 +240,11 @@ struct sess_neg { const struct pppoe_tag *tags[NUMTAGS]; u_int service_len; u_int ac_name_len; + u_int host_uniq_len; struct datatag service; struct datatag ac_name; + struct datatag host_uniq; }; typedef struct sess_neg *negp; @@ -589,22 +605,47 @@ static hook_p pppoe_finduniq(node_p node, const struct pppoe_tag *tag) { hook_p hook = NULL; - union uniq uniq; + sessp sp; - bcopy(tag + 1, uniq.bytes, sizeof(void *)); /* Cycle through all known hooks. */ LIST_FOREACH(hook, &node->nd_hooks, hk_hooks) { /* Skip any nonsession hook. */ if (NG_HOOK_PRIVATE(hook) == NULL) continue; - if (uniq.pointer == NG_HOOK_PRIVATE(hook)) + sp = NG_HOOK_PRIVATE(hook); + /* Skip already connected sessions. */ + if (sp->neg == NULL) + continue; + if (sp->neg->host_uniq_len == ntohs(tag->tag_len) && + bcmp(sp->neg->host_uniq.data, (const char *)(tag + 1), + sp->neg->host_uniq_len) == 0) break; } - CTR3(KTR_NET, "%20s: matched %p for %p", __func__, hook, uniq.pointer); + CTR3(KTR_NET, "%20s: matched %p for %p", __func__, hook, sp); return (hook); } +static hook_p +pppoe_findcookie(node_p node, const struct pppoe_tag *tag) +{ + hook_p hook = NULL; + union uniq cookie; + + bcopy(tag + 1, cookie.bytes, sizeof(void *)); + /* Cycle through all known hooks. */ + LIST_FOREACH(hook, &node->nd_hooks, hk_hooks) { + /* Skip any nonsession hook. */ + if (NG_HOOK_PRIVATE(hook) == NULL) + continue; + if (cookie.pointer == NG_HOOK_PRIVATE(hook)) + break; + } + CTR3(KTR_NET, "%20s: matched %p for %p", __func__, hook, cookie.pointer); + + return (hook); +} + /************************************************************************** * Start of Netgraph entrypoints. * **************************************************************************/ @@ -744,17 +785,29 @@ ng_pppoe_rcvmsg(node_p node, item_p item, hook_p lasth case NGM_PPPOE_LISTEN: case NGM_PPPOE_OFFER: case NGM_PPPOE_SERVICE: + case NGM_PPPOE_SEND_HURL: + case NGM_PPPOE_SEND_MOTM: ourmsg = (struct ngpppoe_init_data *)msg->data; if (msg->header.arglen < sizeof(*ourmsg)) { log(LOG_ERR, "ng_pppoe[%x]: init data too " "small\n", node->nd_ID); LEAVE(EMSGSIZE); } - if (msg->header.arglen - sizeof(*ourmsg) > - PPPOE_SERVICE_NAME_SIZE) { - log(LOG_ERR, "ng_pppoe[%x]: service name " - "too big\n", node->nd_ID); - LEAVE(EMSGSIZE); + if (msg->header.cmd == NGM_PPPOE_SEND_HURL || + msg->header.cmd == NGM_PPPOE_SEND_MOTM) { + if (msg->header.arglen - sizeof(*ourmsg) > + PPPOE_PADM_VALUE_SIZE) { + log(LOG_ERR, "ng_pppoe[%x]: message " + "too big\n", node->nd_ID); + LEAVE(EMSGSIZE); + } + } else { + if (msg->header.arglen - sizeof(*ourmsg) > + PPPOE_SERVICE_NAME_SIZE) { + log(LOG_ERR, "ng_pppoe[%x]: service name " + "too big\n", node->nd_ID); + LEAVE(EMSGSIZE); + } } if (msg->header.arglen - sizeof(*ourmsg) < ourmsg->data_len) { @@ -794,6 +847,20 @@ ng_pppoe_rcvmsg(node_p node, item_p item, hook_p lasth if (msg->header.cmd == NGM_PPPOE_SERVICE) break; + /* + * PADM messages are set up on active sessions. + */ + if (msg->header.cmd == NGM_PPPOE_SEND_HURL || + msg->header.cmd == NGM_PPPOE_SEND_MOTM) { + if (sp->state != PPPOE_NEWCONNECTED && + sp->state != PPPOE_CONNECTED) { + log(LOG_NOTICE, "ng_pppoe[%x]: session is not " + "active\n", node->nd_ID); + LEAVE(EISCONN); + } + break; + } + if (sp->state != PPPOE_SNONE) { log(LOG_NOTICE, "ng_pppoe[%x]: Session already " "active\n", node->nd_ID); @@ -848,12 +915,15 @@ ng_pppoe_rcvmsg(node_p node, item_p item, hook_p lasth * Check the hook exists and is Uninitialised. * Send a PADI request, and start the timeout logic. * Store the originator of this message so we can send - * a success of fail message to them later. + * a success or fail message to them later. * Move the session to SINIT. * Set up the session to the correct state and * start it. */ - int i, acnlen = 0, acnsep = 0, srvlen; + int acnpos, acnlen = 0, acnsep = 0; + int hupos, hulen = 0, husep = 0; + int i, srvpos, srvlen; + acnpos = 0; for (i = 0; i < ourmsg->data_len; i++) { if (ourmsg->data[i] == '\\') { acnlen = i; @@ -861,15 +931,56 @@ ng_pppoe_rcvmsg(node_p node, item_p item, hook_p lasth break; } } - srvlen = ourmsg->data_len - acnlen - acnsep; + hupos = acnlen + acnsep; + for (i = hupos; i < ourmsg->data_len; i++) { + if (ourmsg->data[i] == '|') { + hulen = i - hupos; + husep = 1; + break; + } + } + srvpos = hupos + hulen + husep; + srvlen = ourmsg->data_len - srvpos; - bcopy(ourmsg->data, neg->ac_name.data, acnlen); + bcopy(ourmsg->data + acnpos, neg->ac_name.data, acnlen); neg->ac_name_len = acnlen; + neg->host_uniq.hdr.tag_type = PTT_HOST_UNIQ; + if (hulen == 0) { + /* Not provided, generate one */ + neg->host_uniq.hdr.tag_len = htons(sizeof(sp)); + bcopy(&sp, neg->host_uniq.data, sizeof(sp)); + neg->host_uniq_len = sizeof(sp); + } else if (hulen > 2 && ourmsg->data[hupos] == '0' && + ourmsg->data[hupos + 1] == 'x' && hulen % 2 == 0) { + /* Hex encoded */ + static const char hexdig[16] = "0123456789abcdef"; + int j; + + neg->host_uniq.hdr.tag_len = htons((uint16_t)(hulen / 2 - 1)); + for (i = 0; i < hulen - 2; i++) { + for (j = 0; + j < 16 && + ourmsg->data[hupos + 2 + i] != hexdig[j]; + j++); + if (j == 16) + LEAVE(EINVAL); + if (i % 2 == 0) + neg->host_uniq.data[i / 2] = j << 4; + else + neg->host_uniq.data[i / 2] |= j; + } + neg->host_uniq_len = hulen / 2 - 1; + } else { + /* Plain string */ + neg->host_uniq.hdr.tag_len = htons((uint16_t)hulen); + bcopy(ourmsg->data + hupos, neg->host_uniq.data, hulen); + neg->host_uniq_len = hulen; + } + neg->service.hdr.tag_type = PTT_SRV_NAME; neg->service.hdr.tag_len = htons((uint16_t)srvlen); - bcopy(ourmsg->data + acnlen + acnsep, - neg->service.data, srvlen); + bcopy(ourmsg->data + srvpos, neg->service.data, srvlen); neg->service_len = srvlen; pppoe_start(sp); break; @@ -879,7 +990,7 @@ ng_pppoe_rcvmsg(node_p node, item_p item, hook_p lasth * Check the hook exists and is Uninitialised. * Install the service matching string. * Store the originator of this message so we can send - * a success of fail message to them later. + * a success or fail message to them later. * Move the hook to 'LISTENING' */ neg->service.hdr.tag_type = PTT_SRV_NAME; @@ -1019,6 +1130,92 @@ ng_pppoe_rcvmsg(node_p node, item_p item, hook_p lasth privp->max_payload.hdr.tag_len = htons(sizeof(uint16_t)); privp->max_payload.data = htons(*((uint16_t *)msg->data)); break; + case NGM_PPPOE_SEND_HURL: + { + struct mbuf *m; + + /* Generate a packet of that type. */ + m = m_gethdr(M_NOWAIT, MT_DATA); + if (m == NULL) + log(LOG_NOTICE, "ng_pppoe[%x]: session out of " + "mbufs\n", node->nd_ID); + else { + struct pppoe_full_hdr *wh; + struct pppoe_tag *tag; + int error = 0; + + wh = mtod(m, struct pppoe_full_hdr *); + bcopy(&sp->pkt_hdr, wh, sizeof(*wh)); + + /* Revert the stored header to DISC/PADM mode. */ + wh->ph.code = PADM_CODE; + /* + * Configure ethertype depending on what + * was used during sessions stage. + */ + if (wh->eh.ether_type == + ETHERTYPE_PPPOE_3COM_SESS) + wh->eh.ether_type = ETHERTYPE_PPPOE_3COM_DISC; + else + wh->eh.ether_type = ETHERTYPE_PPPOE_DISC; + /* + * Add PADM message and adjust sizes. + */ + tag = (void *)(&wh->ph + 1); + tag->tag_type = PTT_HURL; + tag->tag_len = htons(ourmsg->data_len); + strncpy((char *)(tag + 1), ourmsg->data, ourmsg->data_len); + m->m_pkthdr.len = m->m_len = sizeof(*wh) + sizeof(*tag) + + ourmsg->data_len; + wh->ph.length = htons(sizeof(*tag) + ourmsg->data_len); + NG_SEND_DATA_ONLY(error, + privp->ethernet_hook, m); + } + break; + } + case NGM_PPPOE_SEND_MOTM: + { + struct mbuf *m; + + /* Generate a packet of that type. */ + m = m_gethdr(M_NOWAIT, MT_DATA); + if (m == NULL) + log(LOG_NOTICE, "ng_pppoe[%x]: session out of " + "mbufs\n", node->nd_ID); + else { + struct pppoe_full_hdr *wh; + struct pppoe_tag *tag; + int error = 0; + + wh = mtod(m, struct pppoe_full_hdr *); + bcopy(&sp->pkt_hdr, wh, sizeof(*wh)); + + /* Revert the stored header to DISC/PADM mode. */ + wh->ph.code = PADM_CODE; + /* + * Configure ethertype depending on what + * was used during sessions stage. + */ + if (wh->eh.ether_type == + ETHERTYPE_PPPOE_3COM_SESS) + wh->eh.ether_type = ETHERTYPE_PPPOE_3COM_DISC; + else + wh->eh.ether_type = ETHERTYPE_PPPOE_DISC; + /* + * Add PADM message and adjust sizes. + */ + tag = (void *)(&wh->ph + 1); + tag->tag_type = PTT_MOTM; + tag->tag_len = htons(ourmsg->data_len); + strncpy((char *)(tag + 1), ourmsg->data, ourmsg->data_len); + m->m_pkthdr.len = m->m_len = sizeof(*wh) + sizeof(*tag) + + ourmsg->data_len; + wh->ph.length = htons(sizeof(*tag) + ourmsg->data_len); + NG_SEND_DATA_ONLY(error, + privp->ethernet_hook, m); + } + break; + } default: LEAVE(EINVAL); } @@ -1061,10 +1258,6 @@ pppoe_start(sessp sp) node_p node = NG_HOOK_NODE(hook); priv_p privp = NG_NODE_PRIVATE(node); negp neg = sp->neg; - struct { - struct pppoe_tag hdr; - union uniq data; - } __packed uniqtag; struct mbuf *m0; int error; @@ -1080,11 +1273,8 @@ pppoe_start(sessp sp) memcpy((void *)&neg->pkt->pkt_header.eh, &privp->eh, sizeof(struct ether_header)); neg->pkt->pkt_header.ph.code = PADI_CODE; - uniqtag.hdr.tag_type = PTT_HOST_UNIQ; - uniqtag.hdr.tag_len = htons((u_int16_t)sizeof(uniqtag.data)); - uniqtag.data.pointer = sp; init_tags(sp); - insert_tag(sp, &uniqtag.hdr); + insert_tag(sp, &neg->host_uniq.hdr); insert_tag(sp, &neg->service.hdr); if (privp->max_payload.data != 0) insert_tag(sp, &privp->max_payload.hdr); @@ -1163,6 +1353,52 @@ send_maxp(sessp sp, const struct pppoe_tag *tag) return (error); } +static int +send_hurl(sessp sp, const struct pppoe_tag *tag) +{ + int error, tlen; + struct ng_mesg *msg; + struct ngpppoe_padm *padm; + + CTR2(KTR_NET, "%20s: called %d", __func__, sp->Session_ID); + + NG_MKMESSAGE(msg, NGM_PPPOE_COOKIE, NGM_PPPOE_HURL, + sizeof(struct ngpppoe_padm), M_NOWAIT); + if (msg == NULL) + return (ENOMEM); + + padm = (struct ngpppoe_padm *)msg->data; + tlen = min(PPPOE_PADM_VALUE_SIZE - 1, ntohs(tag->tag_len)); + strncpy(padm->msg, (const char *)(tag + 1), tlen); + padm->msg[tlen] = '\0'; + NG_SEND_MSG_ID(error, NG_HOOK_NODE(sp->hook), msg, sp->creator, 0); + + return (error); +} + +static int +send_motm(sessp sp, const struct pppoe_tag *tag) +{ + int error, tlen; + struct ng_mesg *msg; + struct ngpppoe_padm *padm; + + CTR2(KTR_NET, "%20s: called %d", __func__, sp->Session_ID); + + NG_MKMESSAGE(msg, NGM_PPPOE_COOKIE, NGM_PPPOE_MOTM, + sizeof(struct ngpppoe_padm), M_NOWAIT); + if (msg == NULL) + return (ENOMEM); + + padm = (struct ngpppoe_padm *)msg->data; + tlen = min(PPPOE_PADM_VALUE_SIZE - 1, ntohs(tag->tag_len)); + strncpy(padm->msg, (const char *)(tag + 1), tlen); + padm->msg[tlen] = '\0'; + NG_SEND_MSG_ID(error, NG_HOOK_NODE(sp->hook), msg, sp->creator, 0); + + return (error); +} + /* * Receive data from session hook and do something with it. */ @@ -1320,6 +1556,7 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item) const priv_p privp = NG_NODE_PRIVATE(node); sessp sp; const struct pppoe_tag *utag = NULL, *tag = NULL; + const struct pppoe_tag sntag = { PTT_SRV_NAME, 0 }; const struct pppoe_full_hdr *wh; const struct pppoe_hdr *ph; negp neg = NULL; @@ -1409,11 +1646,8 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item) * processing. */ tag = get_tag(ph, PTT_SRV_NAME); - if (tag == NULL) { - CTR1(KTR_NET, "%20s: PADI w/o Service-Name", - __func__); - LEAVE(ENETUNREACH); - } + if (tag == NULL) + tag = &sntag; /* * First, try to match Service-Name against our @@ -1438,8 +1672,7 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item) * For now simply accept the first we receive. */ utag = get_tag(ph, PTT_HOST_UNIQ); - if ((utag == NULL) || - (ntohs(utag->tag_len) != sizeof(sp))) { + if (utag == NULL) { log(LOG_NOTICE, "ng_pppoe[%x]: no host " "unique field\n", node->nd_ID); LEAVE(ENETUNREACH); @@ -1529,7 +1762,7 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item) LEAVE(ENETUNREACH); } - sendhook = pppoe_finduniq(node, utag); + sendhook = pppoe_findcookie(node, utag); if (sendhook == NULL) LEAVE(ENETUNREACH); @@ -1605,8 +1838,7 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item) * set us into Session mode. */ utag = get_tag(ph, PTT_HOST_UNIQ); - if ((utag == NULL) || - (ntohs(utag->tag_len) != sizeof(sp))) { + if (utag == NULL) { LEAVE (ENETUNREACH); } sendhook = pppoe_finduniq(node, utag); @@ -1659,6 +1891,19 @@ ng_pppoe_rcvdata_ether(hook_p hook, item_p item) /* Disconnect that hook. */ ng_rmhook_self(sp->hook); break; + case PADM_CODE: + /* + * We are a client: + * find matching peer/session combination. + */ + sp = pppoe_findsession(privp, wh); + if (sp == NULL) + LEAVE (ENETUNREACH); + if ((tag = get_tag(ph, PTT_HURL))) + send_hurl(sp, tag); + if ((tag = get_tag(ph, PTT_MOTM))) + send_motm(sp, tag); + break; default: LEAVE(EPFNOSUPPORT); } @@ -1781,7 +2026,7 @@ ng_pppoe_disconnect(hook_p hook) struct mbuf *m; /* Generate a packet of that type. */ - MGETHDR(m, M_NOWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) log(LOG_NOTICE, "ng_pppoe[%x]: session out of " "mbufs\n", node->nd_ID); @@ -1791,8 +2036,6 @@ ng_pppoe_disconnect(hook_p hook) int msglen = strlen(SIGNOFF); int error = 0; - m->m_pkthdr.rcvif = NULL; - m->m_pkthdr.len = m->m_len = sizeof(*wh); wh = mtod(m, struct pppoe_full_hdr *); bcopy(&sp->pkt_hdr, wh, sizeof(*wh)); @@ -1815,8 +2058,8 @@ ng_pppoe_disconnect(hook_p hook) tag->tag_type = PTT_GEN_ERR; tag->tag_len = htons((u_int16_t)msglen); strncpy((char *)(tag + 1), SIGNOFF, msglen); - m->m_pkthdr.len = (m->m_len += sizeof(*tag) + - msglen); + m->m_pkthdr.len = m->m_len = sizeof(*wh) + sizeof(*tag) + + msglen; wh->ph.length = htons(sizeof(*tag) + msglen); NG_SEND_DATA_ONLY(error, privp->ethernet_hook, m); @@ -1933,6 +2176,8 @@ scan_tags(sessp sp, const struct pppoe_hdr* ph) case PTT_SYS_ERR: case PTT_GEN_ERR: case PTT_MAX_PAYL: + case PTT_HURL: + case PTT_MOTM: break; } pt = (const struct pppoe_tag*)ptn; Modified: stable/10/sys/netgraph/ng_pppoe.h ============================================================================== --- stable/10/sys/netgraph/ng_pppoe.h Fri Mar 16 15:04:13 2018 (r331058) +++ stable/10/sys/netgraph/ng_pppoe.h Fri Mar 16 15:10:13 2018 (r331059) @@ -52,8 +52,10 @@ #define NGM_PPPOE_COOKIE 1089893072 #define NGM_PPPOE_SETMAXP_COOKIE 1441624322 +#define NGM_PPPOE_PADM_COOKIE 1488405822 #define PPPOE_SERVICE_NAME_SIZE 64 /* for now */ +#define PPPOE_PADM_VALUE_SIZE 128 /* for now */ /* Hook names */ #define NG_PPPOE_HOOK_ETHERNET "ethernet" @@ -84,7 +86,11 @@ enum cmd { NGM_PPPOE_SETMODE = 12, /* set to standard or compat modes */ NGM_PPPOE_GETMODE = 13, /* see current mode */ NGM_PPPOE_SETENADDR = 14, /* set Ethernet address */ - NGM_PPPOE_SETMAXP = 15 /* Set PPP-Max-Payload value */ + NGM_PPPOE_SETMAXP = 15, /* Set PPP-Max-Payload value */ + NGM_PPPOE_SEND_HURL = 16, /* Send PADM HURL message */ + NGM_PPPOE_HURL = 17, /* HURL for informational purposes */ + NGM_PPPOE_SEND_MOTM = 18, /* Send PADM MOTM message */ + NGM_PPPOE_MOTM = 19 /* MOTM for informational purposes */ }; /*********************** @@ -157,6 +163,13 @@ struct ngpppoe_maxp { uint16_t data; }; +/* + * This structure is used to send PADM messages from server to client. + */ +struct ngpppoe_padm { + char msg[PPPOE_PADM_VALUE_SIZE]; +}; + /******************************************************************** * Constants and definitions specific to pppoe ********************************************************************/ @@ -171,6 +184,7 @@ struct ngpppoe_maxp { #define PADR_CODE 0x19 #define PADS_CODE 0x65 #define PADT_CODE 0xa7 +#define PADM_CODE 0xd3 /* Tag identifiers */ #if BYTE_ORDER == BIG_ENDIAN @@ -181,6 +195,8 @@ struct ngpppoe_maxp { #define PTT_AC_COOKIE (0x0104) #define PTT_VENDOR (0x0105) #define PTT_RELAY_SID (0x0110) +#define PTT_HURL (0x0111) /* PPPoE Extensions (CARREL) */ +#define PTT_MOTM (0x0112) /* PPPoE Extensions (CARREL) */ #define PTT_MAX_PAYL (0x0120) /* PPP-Max-Payload (RFC4638) */ #define PTT_SRV_ERR (0x0201) #define PTT_SYS_ERR (0x0202) @@ -198,6 +214,8 @@ struct ngpppoe_maxp { #define PTT_AC_COOKIE (0x0401) #define PTT_VENDOR (0x0501) #define PTT_RELAY_SID (0x1001) +#define PTT_HURL (0x1101) /* PPPoE Extensions (CARREL) */ +#define PTT_MOTM (0x1201) /* PPPoE Extensions (CARREL) */ #define PTT_MAX_PAYL (0x2001) /* PPP-Max-Payload (RFC4638) */ #define PTT_SRV_ERR (0x0102) #define PTT_SYS_ERR (0x0202) From owner-svn-src-all@freebsd.org Fri Mar 16 15:15:26 2018 Return-Path: Delivered-To: svn-src-all@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 34E9BF56489; Fri, 16 Mar 2018 15:15:26 +0000 (UTC) (envelope-from emaste@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 D91868314D; Fri, 16 Mar 2018 15:15:25 +0000 (UTC) (envelope-from emaste@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 D018F258F3; Fri, 16 Mar 2018 15:15:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GFFP4Q064174; Fri, 16 Mar 2018 15:15:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GFFPdF064173; Fri, 16 Mar 2018 15:15:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803161515.w2GFFPdF064173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Mar 2018 15:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331060 - head/lib/libsysdecode X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libsysdecode X-SVN-Commit-Revision: 331060 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 15:15:26 -0000 Author: emaste Date: Fri Mar 16 15:15:25 2018 New Revision: 331060 URL: https://svnweb.freebsd.org/changeset/base/331060 Log: Chase r331057 in libsysdecode erno table Modified: head/lib/libsysdecode/errno.c Modified: head/lib/libsysdecode/errno.c ============================================================================== --- head/lib/libsysdecode/errno.c Fri Mar 16 15:10:13 2018 (r331059) +++ head/lib/libsysdecode/errno.c Fri Mar 16 15:15:25 2018 (r331060) @@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$"); * Linux syscalls return negative errno's, we do positive and map them * Reference: * FreeBSD: src/sys/sys/errno.h - * Linux: linux-2.6.17.8/include/asm-generic/errno-base.h - * linux-2.6.17.8/include/asm-generic/errno.h + * Linux: include/uapi/asm-generic/errno-base.h + * include/uapi/asm-generic/errno.h */ static int bsd_to_linux_errno[ELAST + 1] = { -0, -1, -2, -3, -4, -5, -6, -7, -8, -9, @@ -54,7 +54,7 @@ static int bsd_to_linux_errno[ELAST + 1] = { -110,-111, -40, -36,-112,-113, -39, -11, -87,-122, -116, -66, -6, -6, -6, -6, -6, -37, -38, -9, -6, -6, -43, -42, -75,-125, -84, -61, -16, -74, - -72, -67, -71 + -72, -67, -71, -1, -1, -131, -130 }; #endif From owner-svn-src-all@freebsd.org Fri Mar 16 15:26:08 2018 Return-Path: Delivered-To: svn-src-all@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 5D7D9F5727B; Fri, 16 Mar 2018 15:26:08 +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 0C5AE84A68; Fri, 16 Mar 2018 15:26:08 +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 0561325A95; Fri, 16 Mar 2018 15:26:08 +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 w2GFQ7HW071566; Fri, 16 Mar 2018 15:26:07 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GFQ7gR071565; Fri, 16 Mar 2018 15:26:07 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201803161526.w2GFQ7gR071565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 16 Mar 2018 15:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331061 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 331061 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 15:26:08 -0000 Author: tuexen Date: Fri Mar 16 15:26:07 2018 New Revision: 331061 URL: https://svnweb.freebsd.org/changeset/base/331061 Log: Set the inp_vflag consistently for accepted TCP/IPv6 connections when net.inet6.ip6.v6only=0. Without this patch, the inp_vflag would have INP_IPV4 and the INP_IPV6 flags for accepted TCP/IPv6 connections if the sysctl variable net.inet6.ip6.v6only is 0. This resulted in netstat to report the source and destination addresses as IPv4 addresses, even they are IPv6 addresses. PR: 226421 Reviewed by: bz, hiren, kib MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D13514 Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Fri Mar 16 15:15:25 2018 (r331060) +++ head/sys/netinet/tcp_syncache.c Fri Mar 16 15:26:07 2018 (r331061) @@ -695,6 +695,8 @@ syncache_socket(struct syncache *sc, struct socket *ls inp->inp_inc.inc_flags = sc->sc_inc.inc_flags; #ifdef INET6 if (sc->sc_inc.inc_flags & INC_ISIPV6) { + inp->inp_vflag &= ~INP_IPV4; + inp->inp_vflag |= INP_IPV6; inp->in6p_laddr = sc->sc_inc.inc6_laddr; } else { inp->inp_vflag &= ~INP_IPV6; From owner-svn-src-all@freebsd.org Fri Mar 16 16:06:26 2018 Return-Path: Delivered-To: svn-src-all@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 96B22F5A207; Fri, 16 Mar 2018 16:06:26 +0000 (UTC) (envelope-from ian@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 49BD486902; Fri, 16 Mar 2018 16:06:26 +0000 (UTC) (envelope-from ian@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 44AE9260B1; Fri, 16 Mar 2018 16:06:26 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GG6QEL091705; Fri, 16 Mar 2018 16:06:26 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GG6QCJ091704; Fri, 16 Mar 2018 16:06:26 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803161606.w2GG6QCJ091704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 16 Mar 2018 16:06:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331063 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 331063 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 16:06:26 -0000 Author: ian Date: Fri Mar 16 16:06:25 2018 New Revision: 331063 URL: https://svnweb.freebsd.org/changeset/base/331063 Log: Add the header file needed for the recently-added call to pagedaemon_wakeup(). Modified: head/sys/arm/arm/pmap-v4.c Modified: head/sys/arm/arm/pmap-v4.c ============================================================================== --- head/sys/arm/arm/pmap-v4.c Fri Mar 16 16:04:06 2018 (r331062) +++ head/sys/arm/arm/pmap-v4.c Fri Mar 16 16:06:25 2018 (r331063) @@ -168,6 +168,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-all@freebsd.org Fri Mar 16 16:14:21 2018 Return-Path: Delivered-To: svn-src-all@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 E3719F5AC09; Fri, 16 Mar 2018 16:14:20 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f176.google.com (mail-io0-f176.google.com [209.85.223.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8216F8717D; Fri, 16 Mar 2018 16:14:20 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f176.google.com with SMTP id e7so2773820iof.2; Fri, 16 Mar 2018 09:14:20 -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=Jt98sQBX2I0PDA8TyvsZOVu4EwAmXNqm6709//+n6Ic=; b=E4IdyS31pLrC6UoLeqRaVNfxklP8ITlcSzqt1IQoa7/KSV9Vwd2viA3smb1mWZZ7VF RNlXsvY2gsjOiMJVEfLWVSoqA9MMcS1Zn61WPVRznyqItlyhSBLi0G5BFsrZdnX6twA9 OKWWaK+QQUa0Hyzwg0XPmPsoG7U3CCcoFZLi0+wf4pC4ZzjQ0p9Y6u3CIvw9QTbGsdLp LO5XW75EldPLodiG53XU7jZtI83h/kc7XMHBh1oGSjew0dZSEfeUeygpB3OxiaE5EKDV 7XklxaXnQvmdmd/yzpYusxCYfh7rOwqsCh1K8U/fLcpu0uLIF1F7yXxtAqUOmVOVQBzv hqJw== X-Gm-Message-State: AElRT7HVe15uY9DDk81HvYkUjhCZQkOZSzcXXYBUKx2F+QeyC8qXL0Ex TnovfbKsy/I03HmmXp2HHV2ai50D X-Google-Smtp-Source: AG47ELssIS2ZNGpXDygx5u3vRoV9NXTzWQvPivi69SDAGajcCLjas5EvjfZdt8l9xWJSP/yfRY8QOw== X-Received: by 10.107.36.204 with SMTP id k195mr2408542iok.131.1521216534914; Fri, 16 Mar 2018 09:08:54 -0700 (PDT) Received: from mail-it0-f54.google.com (mail-it0-f54.google.com. [209.85.214.54]) by smtp.gmail.com with ESMTPSA id c101sm2675834ioj.33.2018.03.16.09.08.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:08:54 -0700 (PDT) Received: by mail-it0-f54.google.com with SMTP id r10-v6so2407633iti.3; Fri, 16 Mar 2018 09:08:54 -0700 (PDT) X-Received: by 2002:a24:5053:: with SMTP id m80-v6mr2928483itb.58.1521216534632; Fri, 16 Mar 2018 09:08:54 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.153.132 with HTTP; Fri, 16 Mar 2018 09:08:54 -0700 (PDT) In-Reply-To: <201803161606.w2GG6QCJ091704@repo.freebsd.org> References: <201803161606.w2GG6QCJ091704@repo.freebsd.org> From: Conrad Meyer Date: Fri, 16 Mar 2018 09:08:54 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r331063 - head/sys/arm/arm To: Ian Lepore Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 16:14:21 -0000 I probably broke this with r331048 -- sorry. I build-tested amd64 only. Apologies, Conrad On Fri, Mar 16, 2018 at 9:06 AM, Ian Lepore wrote: > Author: ian > Date: Fri Mar 16 16:06:25 2018 > New Revision: 331063 > URL: https://svnweb.freebsd.org/changeset/base/331063 > > Log: > Add the header file needed for the recently-added call to pagedaemon_wakeup(). > > Modified: > head/sys/arm/arm/pmap-v4.c > > Modified: head/sys/arm/arm/pmap-v4.c > ============================================================================== > --- head/sys/arm/arm/pmap-v4.c Fri Mar 16 16:04:06 2018 (r331062) > +++ head/sys/arm/arm/pmap-v4.c Fri Mar 16 16:06:25 2018 (r331063) > @@ -168,6 +168,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > > #include > From owner-svn-src-all@freebsd.org Fri Mar 16 16:23:27 2018 Return-Path: Delivered-To: svn-src-all@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 C6604F5B6E3 for ; Fri, 16 Mar 2018 16:23:27 +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 3537787978 for ; Fri, 16 Mar 2018 16:23:27 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 59e17a8f-2936-11e8-91c6-33ffc249f3e8 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 59e17a8f-2936-11e8-91c6-33ffc249f3e8; Fri, 16 Mar 2018 16:23:26 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w2GGNK8T029045; Fri, 16 Mar 2018 10:23:20 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1521217400.99081.57.camel@freebsd.org> Subject: Re: svn commit: r331063 - head/sys/arm/arm From: Ian Lepore To: cem@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 16 Mar 2018 10:23:20 -0600 In-Reply-To: References: <201803161606.w2GG6QCJ091704@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 16:23:28 -0000 On Fri, 2018-03-16 at 09:08 -0700, Conrad Meyer wrote: > I probably broke this with r331048 -- sorry.  I build-tested amd64 > only. > > Apologies, > Conrad > No big deal.  It was apparently the only arch missing the file; I was running a lintkernels build and this is the only one that failed. -- Ian > On Fri, Mar 16, 2018 at 9:06 AM, Ian Lepore wrote: > > > > Author: ian > > Date: Fri Mar 16 16:06:25 2018 > > New Revision: 331063 > > URL: https://svnweb.freebsd.org/changeset/base/331063 From owner-svn-src-all@freebsd.org Fri Mar 16 16:56:57 2018 Return-Path: Delivered-To: svn-src-all@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 BB1A2F5DBC5; Fri, 16 Mar 2018 16:56:57 +0000 (UTC) (envelope-from krion@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 5E866694DA; Fri, 16 Mar 2018 16:56:57 +0000 (UTC) (envelope-from krion@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 468D026833; Fri, 16 Mar 2018 16:56:57 +0000 (UTC) (envelope-from krion@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GGuv3M016659; Fri, 16 Mar 2018 16:56:57 GMT (envelope-from krion@FreeBSD.org) Received: (from krion@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GGuvOv016658; Fri, 16 Mar 2018 16:56:57 GMT (envelope-from krion@FreeBSD.org) Message-Id: <201803161656.w2GGuvOv016658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: krion set sender to krion@FreeBSD.org using -f From: Kirill Ponomarev Date: Fri, 16 Mar 2018 16:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331064 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: krion X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 331064 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 16:56:57 -0000 Author: krion (ports committer) Date: Fri Mar 16 16:56:56 2018 New Revision: 331064 URL: https://svnweb.freebsd.org/changeset/base/331064 Log: Extend SSID maximum string length to 32 chars to support longer SSID names. Approved by: adrian Differential Revision: https://reviews.freebsd.org/D14710 Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Fri Mar 16 16:06:25 2018 (r331063) +++ head/sbin/ifconfig/ifieee80211.c Fri Mar 16 16:56:56 2018 (r331064) @@ -3503,7 +3503,7 @@ list_scan(int s) getchaninfo(s); - ssidmax = verbose ? IEEE80211_NWID_LEN : 14; + ssidmax = verbose ? IEEE80211_NWID_LEN : 32; printf("%-*.*s %-17.17s %4s %4s %-7s %3s %4s\n" , ssidmax, ssidmax, "SSID/MESH ID" , "BSSID" From owner-svn-src-all@freebsd.org Fri Mar 16 17:29:23 2018 Return-Path: Delivered-To: svn-src-all@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 BAC0FF5FF74; Fri, 16 Mar 2018 17:29:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 396FA6AB83; Fri, 16 Mar 2018 17:29:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 0D32942D1F1; Sat, 17 Mar 2018 04:29:21 +1100 (AEDT) Date: Sat, 17 Mar 2018 04:29:20 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ian Lepore cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r331063 - head/sys/arm/arm In-Reply-To: <201803161606.w2GG6QCJ091704@repo.freebsd.org> Message-ID: <20180317041629.Y23257@besplex.bde.org> References: <201803161606.w2GG6QCJ091704@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=s2U_WbHignoRvRs-tPAA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 17:29:23 -0000 On Fri, 16 Mar 2018, Ian Lepore wrote: > Log: > Add the header file needed for the recently-added call to pagedaemon_wakeup(). > > Modified: > head/sys/arm/arm/pmap-v4.c > > Modified: head/sys/arm/arm/pmap-v4.c > ============================================================================== > --- head/sys/arm/arm/pmap-v4.c Fri Mar 16 16:04:06 2018 (r331062) > +++ head/sys/arm/arm/pmap-v4.c Fri Mar 16 16:06:25 2018 (r331063) > @@ -168,6 +168,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > > #include It used to be in the correct header (vm/vm_pageout.h). Another bug in this function is its name. It is missing a vm_ prefix. It was the only name in vm_pageout.h with this bug (macros there have a prefix of VM_; variables and functions have a prefix of vm_). vm_pagequeue.h was almost as clean. It is now polluted by: - nested include of sys/pidcontrol.h - prototype for this function - call to this function. Bruce From owner-svn-src-all@freebsd.org Fri Mar 16 17:50:44 2018 Return-Path: Delivered-To: svn-src-all@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 C1431F61477; Fri, 16 Mar 2018 17:50:44 +0000 (UTC) (envelope-from dim@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 6F3536BD2B; Fri, 16 Mar 2018 17:50:44 +0000 (UTC) (envelope-from dim@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 6A02726FBB; Fri, 16 Mar 2018 17:50:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GHoinO042216; Fri, 16 Mar 2018 17:50:44 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GHoiwb042214; Fri, 16 Mar 2018 17:50:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803161750.w2GHoiwb042214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 16 Mar 2018 17:50:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331065 - in head/contrib/llvm/lib: Analysis IR X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/contrib/llvm/lib: Analysis IR X-SVN-Commit-Revision: 331065 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 17:50:45 -0000 Author: dim Date: Fri Mar 16 17:50:44 2018 New Revision: 331065 URL: https://svnweb.freebsd.org/changeset/base/331065 Log: Pull in r327638 from upstream llvm trunk (by Matthew Simpson): [ConstantFolding, InstSimplify] Handle more vector GEPs This patch addresses some additional cases where the compiler crashes upon encountering vector GEPs. This should fix PR36116. Differential Revision: https://reviews.llvm.org/D44219 Reference: https://bugs.llvm.org/show_bug.cgi?id=36116 This fixes an assertion when building the emulators/snes9x port. Reported by: jbeich PR: 225471 MFC after: 3 months X-MFC-With: r327952 Modified: head/contrib/llvm/lib/Analysis/InstructionSimplify.cpp head/contrib/llvm/lib/IR/ConstantFold.cpp Modified: head/contrib/llvm/lib/Analysis/InstructionSimplify.cpp ============================================================================== --- head/contrib/llvm/lib/Analysis/InstructionSimplify.cpp Fri Mar 16 16:56:56 2018 (r331064) +++ head/contrib/llvm/lib/Analysis/InstructionSimplify.cpp Fri Mar 16 17:50:44 2018 (r331065) @@ -3697,7 +3697,7 @@ static Value *SimplifyGEPInst(Type *SrcTy, ArrayRef P. - if (match(Ops[1], m_Zero())) + if (match(Ops[1], m_Zero()) && Ops[0]->getType() == GEPTy) return Ops[0]; Type *Ty = SrcTy; @@ -3706,7 +3706,7 @@ static Value *SimplifyGEPInst(Type *SrcTy, ArrayRef P if P points to a type of zero size. - if (TyAllocSize == 0) + if (TyAllocSize == 0 && Ops[0]->getType() == GEPTy) return Ops[0]; // The following transforms are only safe if the ptrtoint cast Modified: head/contrib/llvm/lib/IR/ConstantFold.cpp ============================================================================== --- head/contrib/llvm/lib/IR/ConstantFold.cpp Fri Mar 16 16:56:56 2018 (r331064) +++ head/contrib/llvm/lib/IR/ConstantFold.cpp Fri Mar 16 17:50:44 2018 (r331065) @@ -2018,8 +2018,16 @@ static bool isInBoundsIndices(ArrayRef Idxs) // If the first index is one and all the rest are zero, it's in bounds, // by the one-past-the-end rule. - if (!cast(Idxs[0])->isOne()) - return false; + if (auto *CI = dyn_cast(Idxs[0])) { + if (!CI->isOne()) + return false; + } else { + auto *CV = cast(Idxs[0]); + CI = dyn_cast_or_null(CV->getSplatValue()); + if (!CI || !CI->isOne()) + return false; + } + for (unsigned i = 1, e = Idxs.size(); i != e; ++i) if (!cast(Idxs[i])->isNullValue()) return false; @@ -2049,15 +2057,18 @@ Constant *llvm::ConstantFoldGetElementPtr(Type *Pointe ArrayRef Idxs) { if (Idxs.empty()) return C; - if (isa(C)) { - Type *GEPTy = GetElementPtrInst::getGEPReturnType( - C, makeArrayRef((Value * const *)Idxs.data(), Idxs.size())); + Type *GEPTy = GetElementPtrInst::getGEPReturnType( + C, makeArrayRef((Value *const *)Idxs.data(), Idxs.size())); + + if (isa(C)) return UndefValue::get(GEPTy); - } Constant *Idx0 = cast(Idxs[0]); if (Idxs.size() == 1 && (Idx0->isNullValue() || isa(Idx0))) - return C; + return GEPTy->isVectorTy() && !C->getType()->isVectorTy() + ? ConstantVector::getSplat( + cast(GEPTy)->getNumElements(), C) + : C; if (C->isNullValue()) { bool isNull = true; From owner-svn-src-all@freebsd.org Fri Mar 16 18:04:14 2018 Return-Path: Delivered-To: svn-src-all@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 68405F62295; Fri, 16 Mar 2018 18:04:14 +0000 (UTC) (envelope-from dim@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 1B00A6C72D; Fri, 16 Mar 2018 18:04:14 +0000 (UTC) (envelope-from dim@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 15F15272B3; Fri, 16 Mar 2018 18:04:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GI4D8S052405; Fri, 16 Mar 2018 18:04:13 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GI4Di5052404; Fri, 16 Mar 2018 18:04:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803161804.w2GI4Di5052404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 16 Mar 2018 18:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331066 - head/contrib/llvm/tools/clang/lib/CodeGen X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm/tools/clang/lib/CodeGen X-SVN-Commit-Revision: 331066 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 18:04:14 -0000 Author: dim Date: Fri Mar 16 18:04:13 2018 New Revision: 331066 URL: https://svnweb.freebsd.org/changeset/base/331066 Log: Pull in r321999 from upstream clang trunk (by Ivan A. Kosarev): [CodeGen] Fix TBAA info for accesses to members of base classes Resolves: Bug 35724 - regression (r315984): fatal error: error in backend: Broken function found (Did not see access type in access path!) https://bugs.llvm.org/show_bug.cgi?id=35724 Differential Revision: https://reviews.llvm.org/D41547 This fixes "Did not see access type in access path" fatal errors when building the devel/gdb port (version 8.1). Reported by: jbeich PR: 226658 MFC after: 3 months X-MFC-With: r327952 Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp Fri Mar 16 17:50:44 2018 (r331065) +++ head/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp Fri Mar 16 18:04:13 2018 (r331066) @@ -1034,8 +1034,12 @@ Address CodeGenFunction::EmitPointerWithAlignment(cons // Derived-to-base conversions. case CK_UncheckedDerivedToBase: case CK_DerivedToBase: { - Address Addr = EmitPointerWithAlignment(CE->getSubExpr(), BaseInfo, - TBAAInfo); + // TODO: Support accesses to members of base classes in TBAA. For now, we + // conservatively pretend that the complete object is of the base class + // type. + if (TBAAInfo) + *TBAAInfo = CGM.getTBAAAccessInfo(E->getType()); + Address Addr = EmitPointerWithAlignment(CE->getSubExpr(), BaseInfo); auto Derived = CE->getSubExpr()->getType()->getPointeeCXXRecordDecl(); return GetAddressOfBaseClass(Addr, Derived, CE->path_begin(), CE->path_end(), From owner-svn-src-all@freebsd.org Fri Mar 16 18:12:50 2018 Return-Path: Delivered-To: svn-src-all@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 ABD93F62D42; Fri, 16 Mar 2018 18:12: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 5EE9E6D1B0; Fri, 16 Mar 2018 18:12:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59DAF2742C; Fri, 16 Mar 2018 18:12:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GICoFf057286; Fri, 16 Mar 2018 18:12:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GICoYV057285; Fri, 16 Mar 2018 18:12:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803161812.w2GICoYV057285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 16 Mar 2018 18:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331067 - head/stand/efi/boot1 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/boot1 X-SVN-Commit-Revision: 331067 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 18:12:50 -0000 Author: imp Date: Fri Mar 16 18:12:50 2018 New Revision: 331067 URL: https://svnweb.freebsd.org/changeset/base/331067 Log: Only print boot order / boot current if we can get the variables from the loader. Some UEFI implementations don't return all of them. Sponsored by: Netflix Modified: head/stand/efi/boot1/boot1.c Modified: head/stand/efi/boot1/boot1.c ============================================================================== --- head/stand/efi/boot1/boot1.c Fri Mar 16 18:04:13 2018 (r331066) +++ head/stand/efi/boot1/boot1.c Fri Mar 16 18:12:50 2018 (r331067) @@ -467,16 +467,18 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) boot_current = 0; sz = sizeof(boot_current); - efi_global_getenv("BootCurrent", &boot_current, &sz); - printf(" BootCurrent: %04x\n", boot_current); + if (efi_global_getenv("BootCurrent", &boot_current, &sz) == EFI_SUCCESS) { + printf(" BootCurrent: %04x\n", boot_current); - sz = sizeof(boot_order); - efi_global_getenv("BootOrder", &boot_order, &sz); - printf(" BootOrder:"); - for (i = 0; i < sz / sizeof(boot_order[0]); i++) - printf(" %04x%s", boot_order[i], - boot_order[i] == boot_current ? "[*]" : ""); - printf("\n"); + sz = sizeof(boot_order); + if (efi_global_getenv("BootOrder", &boot_order, &sz) == EFI_SUCCESS) { + printf(" BootOrder:"); + for (i = 0; i < sz / sizeof(boot_order[0]); i++) + printf(" %04x%s", boot_order[i], + boot_order[i] == boot_current ? "[*]" : ""); + printf("\n"); + } + } #ifdef TEST_FAILURE /* From owner-svn-src-all@freebsd.org Fri Mar 16 18:16:28 2018 Return-Path: Delivered-To: svn-src-all@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 E969EF63191; Fri, 16 Mar 2018 18:16:27 +0000 (UTC) (envelope-from ian@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 958FC6D6AE; Fri, 16 Mar 2018 18:16:27 +0000 (UTC) (envelope-from ian@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 9067827435; Fri, 16 Mar 2018 18:16:27 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GIGRPQ057464; Fri, 16 Mar 2018 18:16:27 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GIGR3h057463; Fri, 16 Mar 2018 18:16:27 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803161816.w2GIGR3h057463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 16 Mar 2018 18:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331068 - head/sys/dev/efidev X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/efidev X-SVN-Commit-Revision: 331068 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 18:16:28 -0000 Author: ian Date: Fri Mar 16 18:16:27 2018 New Revision: 331068 URL: https://svnweb.freebsd.org/changeset/base/331068 Log: Use EFI RTC capabilities info when registering, add bootverbose diagnostics. Make some small improvements to the efirtc driver by obtaining the clock capabilities (resolution and whether the sub-second counters are reset) and using the info when registering the clock. When the hardware zeroes out the subsecond info on clock-set, schedule clock updates to happen just before top-of-second, so that the RTC time is closely in-sync with kernel time. Also, in the identify() routine, always add the driver if EFI runtime services are available, then decide in probe() whether to attach the driver or not. If not attaching and bootverbose is on, say why. All of this is basically to avoid "silent failure" -- if someone thinks there should be an efi rtc and it's not attaching, at least they can set bootverbose and maybe get a clue from the output. Differential Revision: https://reviews.freebsd.org/D14565 (timed out) Modified: head/sys/dev/efidev/efirtc.c Modified: head/sys/dev/efidev/efirtc.c ============================================================================== --- head/sys/dev/efidev/efirtc.c Fri Mar 16 18:12:50 2018 (r331067) +++ head/sys/dev/efidev/efirtc.c Fri Mar 16 18:16:27 2018 (r331068) @@ -41,21 +41,20 @@ __FBSDID("$FreeBSD$"); #include "clock_if.h" +static bool efirtc_zeroes_subseconds; +static struct timespec efirtc_resadj; + +static const u_int us_per_s = 1000000; +static const u_int ns_per_s = 1000000000; +static const u_int ns_per_us = 1000; + static void efirtc_identify(driver_t *driver, device_t parent) { - struct efi_tm tm; - int error; - /* - * Check if we can read the time. This will stop us attaching when - * there is no EFI Runtime support, or the gettime function is - * unimplemented, e.g. on some builds of U-Boot. - */ - error = efi_get_time(&tm); - if (error != 0) + /* Don't add the driver unless we have working runtime services. */ + if (efi_rt_ok() != 0) return; - if (device_find_child(parent, "efirtc", -1) != NULL) return; if (BUS_ADD_CHILD(parent, 0, "efirtc", -1) == NULL) @@ -65,16 +64,58 @@ efirtc_identify(driver_t *driver, device_t parent) static int efirtc_probe(device_t dev) { + struct efi_tm tm; + int error; - device_quiet(dev); - return (0); + /* + * Check whether we can read the time. This will stop us from attaching + * when there is EFI Runtime support but the gettime function is + * unimplemented, e.g. on some builds of U-Boot. + */ + if ((error = efi_get_time(&tm)) != 0) { + if (bootverbose) + device_printf(dev, "cannot read EFI realtime clock\n"); + return (error); + } + device_set_desc(dev, "EFI Realtime Clock"); + return (BUS_PROBE_DEFAULT); } static int efirtc_attach(device_t dev) { + struct efi_tmcap tmcap; + long res; + int error; - clock_register(dev, 1000000); + bzero(&tmcap, sizeof(tmcap)); + if ((error = efi_get_time_capabilities(&tmcap)) != 0) { + device_printf(dev, "cannot get EFI time capabilities"); + return (error); + } + + /* Translate resolution in Hz to tick length in usec. */ + if (tmcap.tc_res == 0) + res = us_per_s; /* 0 is insane, assume 1 Hz. */ + else if (tmcap.tc_res > us_per_s) + res = 1; /* 1us is the best we can represent */ + else + res = us_per_s / tmcap.tc_res; + + /* Clock rounding adjustment is 1/2 of resolution, in nsec. */ + efirtc_resadj.tv_nsec = (res * ns_per_us) / 2; + + /* Does the clock zero the subseconds when time is set? */ + efirtc_zeroes_subseconds = tmcap.tc_stz; + + /* + * Register. If the clock zeroes out the subseconds when it's set, + * schedule the SetTime calls to happen just before top-of-second. + */ + clock_register_flags(dev, res, CLOCKF_SETTIME_NO_ADJ); + if (efirtc_zeroes_subseconds) + clock_schedule(dev, ns_per_s - ns_per_us); + return (0); } @@ -105,6 +146,7 @@ efirtc_gettime(device_t dev, struct timespec *ts) ct.year = tm.tm_year; ct.nsec = tm.tm_nsec; + clock_dbgprint_ct(dev, CLOCK_DBG_READ, &ct); return (clock_ct_to_ts(&ct, ts)); } @@ -114,7 +156,17 @@ efirtc_settime(device_t dev, struct timespec *ts) struct clocktime ct; struct efi_tm tm; + /* + * We request a timespec with no resolution-adjustment so that we can + * apply it ourselves based on whether or not the clock zeroes the + * sub-second part of the time when setting the time. + */ + ts->tv_sec -= utc_offset(); + if (!efirtc_zeroes_subseconds) + timespecadd(ts, &efirtc_resadj); + clock_ts_to_ct(ts, &ct); + clock_dbgprint_ct(dev, CLOCK_DBG_WRITE, &ct); bzero(&tm, sizeof(tm)); tm.tm_sec = ct.sec; From owner-svn-src-all@freebsd.org Fri Mar 16 18:16:34 2018 Return-Path: Delivered-To: svn-src-all@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 AD909F631CC; Fri, 16 Mar 2018 18:16:34 +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 7CA2B6D763; Fri, 16 Mar 2018 18:16:33 +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 6F3A827436; Fri, 16 Mar 2018 18:16:32 +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 w2GIGVjw057514; Fri, 16 Mar 2018 18:16:31 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GIGVgs057513; Fri, 16 Mar 2018 18:16:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803161816.w2GIGVgs057513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 16 Mar 2018 18:16:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331069 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 331069 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 18:16:34 -0000 Author: imp Date: Fri Mar 16 18:16:31 2018 New Revision: 331069 URL: https://svnweb.freebsd.org/changeset/base/331069 Log: Make not getting BootOrder a warning, not a fatal error when printing. Sponsored by: Netflix Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Fri Mar 16 18:16:27 2018 (r331068) +++ head/usr.sbin/efibootmgr/efibootmgr.c Fri Mar 16 18:16:31 2018 (r331069) @@ -285,8 +285,10 @@ print_order(void) uint8_t *data; size_t size, i; - if (efi_get_variable(EFI_GLOBAL_GUID, "BootOrder", &data, &size, &attrs) < 0) - errx(1, "Couldn't get value for BootOrder\n"); + if (efi_get_variable(EFI_GLOBAL_GUID, "BootOrder", &data, &size, &attrs) < 0) { + printf("BootOrder : Couldn't get value for BootOrder\n"); + return; + } if (size % 2 == 1) errx(1, "Bad BootOrder variable: odd length"); From owner-svn-src-all@freebsd.org Fri Mar 16 18:50:27 2018 Return-Path: Delivered-To: svn-src-all@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 A6303B9; Fri, 16 Mar 2018 18:50:27 +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 5A2596EB99; Fri, 16 Mar 2018 18:50:27 +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 3AF2A278D9; Fri, 16 Mar 2018 18:50:27 +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 w2GIoRak072912; Fri, 16 Mar 2018 18:50:27 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GIoRoE072911; Fri, 16 Mar 2018 18:50:27 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803161850.w2GIoRoE072911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 16 Mar 2018 18:50:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331070 - head/sys/dev/random X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/random X-SVN-Commit-Revision: 331070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 18:50:27 -0000 Author: cem Date: Fri Mar 16 18:50:26 2018 New Revision: 331070 URL: https://svnweb.freebsd.org/changeset/base/331070 Log: random(4): Poll for signals during large reads Occasionally poll for signals during large reads of the /dev/u?random devices. This allows cancellation via SIGINT of accidental invocations of very large reads. (A 2GB /dev/random read, which takes about 10 seconds on my 2017 AMD Zen processor, can be aborted.) I believe this behavior was intended since 2014 (r273997), just not fully implemented. This is motivated by a potential getrandom(2) interface that may not explicitly forbid extremely large reads on 64-bit platforms -- even larger than the 2GB limit imposed on devfs I/O by default. Such reads, if they are to be allowed, should be cancellable by the user or administrator. Reviewed by: delphij Approved by: secteam (delphij) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D14684 Modified: head/sys/dev/random/randomdev.c Modified: head/sys/dev/random/randomdev.c ============================================================================== --- head/sys/dev/random/randomdev.c Fri Mar 16 18:16:31 2018 (r331069) +++ head/sys/dev/random/randomdev.c Fri Mar 16 18:50:26 2018 (r331070) @@ -130,7 +130,13 @@ READ_RANDOM_UIO(struct uio *uio, bool nonblock) uint8_t *random_buf; int error, spamcount; ssize_t read_len, total_read, c; + /* 16 MiB takes about 0.08 s CPU time on my 2017 AMD Zen CPU */ +#define SIGCHK_PERIOD (16 * 1024 * 1024) + const size_t sigchk_period = SIGCHK_PERIOD; + CTASSERT(SIGCHK_PERIOD % PAGE_SIZE == 0); +#undef SIGCHK_PERIOD + random_buf = malloc(PAGE_SIZE, M_ENTROPY, M_WAITOK); p_random_alg_context->ra_pre_read(); error = 0; @@ -167,11 +173,22 @@ READ_RANDOM_UIO(struct uio *uio, bool nonblock) read_len = MIN(read_len, PAGE_SIZE); p_random_alg_context->ra_read(random_buf, read_len); c = MIN(uio->uio_resid, read_len); + /* + * uiomove() may yield the CPU before each 'c' bytes + * (up to PAGE_SIZE) are copied out. + */ error = uiomove(random_buf, c, uio); total_read += c; + /* + * Poll for signals every few MBs to avoid very long + * uninterruptible syscalls. + */ + if (error == 0 && uio->uio_resid != 0 && + total_read % sigchk_period == 0) + error = tsleep_sbt(&random_alg_context, PCATCH, + "randrd", SBT_1NS, 0, C_HARDCLOCK); } - if (total_read != uio->uio_resid && (error == ERESTART || error == EINTR)) - /* Return partial read, not error. */ + if (error == ERESTART || error == EINTR) error = 0; } free(random_buf, M_ENTROPY); From owner-svn-src-all@freebsd.org Fri Mar 16 20:43:41 2018 Return-Path: Delivered-To: svn-src-all@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 4CD21F4C186; Fri, 16 Mar 2018 20:43:41 +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 E75BB736B2; Fri, 16 Mar 2018 20:43:40 +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 E2424B72; Fri, 16 Mar 2018 20:43:40 +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 w2GKhel2032655; Fri, 16 Mar 2018 20:43:40 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GKheIG032654; Fri, 16 Mar 2018 20:43:40 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803162043.w2GKheIG032654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 16 Mar 2018 20:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331073 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Commit-Revision: 331073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 20:43:41 -0000 Author: cem Date: Fri Mar 16 20:43:40 2018 New Revision: 331073 URL: https://svnweb.freebsd.org/changeset/base/331073 Log: libdtrace: Eliminate a minor UB by fully initializing parameter struct The dtt_flags value is dereferenced by dt_type_pointer() and must be initialized first. Reported by: Coverity Sponsored by: Dell EMC Isilon Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Fri Mar 16 20:04:52 2018 (r331072) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Fri Mar 16 20:43:40 2018 (r331073) @@ -3069,9 +3069,10 @@ dt_cook_op1(dt_node_t *dnp, uint_t idflags) "cannot take address of bit-field\n"); } - dtt.dtt_object = NULL; - dtt.dtt_ctfp = cp->dn_ctfp; - dtt.dtt_type = cp->dn_type; + dtt = (dtrace_typeinfo_t){ + .dtt_ctfp = cp->dn_ctfp, + .dtt_type = cp->dn_type, + }; if (dt_type_pointer(&dtt) == -1) { xyerror(D_TYPE_ERR, "cannot find type for \"&\": %s*\n", From owner-svn-src-all@freebsd.org Fri Mar 16 20:59:57 2018 Return-Path: Delivered-To: svn-src-all@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 22DF8F4D2E1; Fri, 16 Mar 2018 20:59:57 +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 BF524740BA; Fri, 16 Mar 2018 20:59:56 +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 B6165CF4; Fri, 16 Mar 2018 20:59:56 +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 w2GKxuQh037884; Fri, 16 Mar 2018 20:59:56 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GKxup1037883; Fri, 16 Mar 2018 20:59:56 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803162059.w2GKxup1037883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 16 Mar 2018 20:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331074 - head/contrib/telnet/telnetd X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/contrib/telnet/telnetd X-SVN-Commit-Revision: 331074 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 20:59:57 -0000 Author: cem Date: Fri Mar 16 20:59:56 2018 New Revision: 331074 URL: https://svnweb.freebsd.org/changeset/base/331074 Log: telnetd(8): Fix dereference of uninitialized value 'IF' Reported by: Coverity Sponsored by: Dell EMC Isilon Modified: head/contrib/telnet/telnetd/telnetd.c Modified: head/contrib/telnet/telnetd/telnetd.c ============================================================================== --- head/contrib/telnet/telnetd/telnetd.c Fri Mar 16 20:43:40 2018 (r331073) +++ head/contrib/telnet/telnetd/telnetd.c Fri Mar 16 20:59:56 2018 (r331074) @@ -925,7 +925,7 @@ telnet(int f, int p, char *host) edithost(HE, host_name); if (hostinfo && *IM) putf(IM, ptyibuf2); - if (IF && if_fd != -1) { + if (if_fd != -1) { if (fstat(if_fd, &statbuf) != -1 && statbuf.st_size > 0) { if_buf = (char *) mmap (0, statbuf.st_size, PROT_READ, 0, if_fd, 0); From owner-svn-src-all@freebsd.org Fri Mar 16 21:03:54 2018 Return-Path: Delivered-To: svn-src-all@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 B05CDF4D862; Fri, 16 Mar 2018 21:03:54 +0000 (UTC) (envelope-from dteske@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 5CDCF74748; Fri, 16 Mar 2018 21:03:54 +0000 (UTC) (envelope-from dteske@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 57D71E6E; Fri, 16 Mar 2018 21:03:54 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GL3s8v042720; Fri, 16 Mar 2018 21:03:54 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GL3sfV042719; Fri, 16 Mar 2018 21:03:54 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201803162103.w2GL3sfV042719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Fri, 16 Mar 2018 21:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331075 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 331075 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 21:03:54 -0000 Author: dteske Date: Fri Mar 16 21:03:54 2018 New Revision: 331075 URL: https://svnweb.freebsd.org/changeset/base/331075 Log: Add myself to committers-ports.dot Reviewed by: imp Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D14688 Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Fri Mar 16 20:59:56 2018 (r331074) +++ head/share/misc/committers-ports.dot Fri Mar 16 21:03:54 2018 (r331075) @@ -93,6 +93,7 @@ delphij [label="Xin Li\ndelphij@FreeBSD.org\n2006/05/0 demon [label="Dmitry Sivachenko\ndemon@FreeBSD.org\n2000/11/13"] dhn [label="Dennis Herrmann\ndhn@FreeBSD.org\n2009/03/03"] dryice [label="Dryice Dong Liu\ndryice@FreeBSD.org\n2006/12/25"] +dteske [label="Devin Teske\ndteske@FreeBSD.org\n2018/03/01"] dumbbell [label="Jean-Sebastien Pedron\ndumbbell@FreeBSD.org\n2017/01/10"] dvl [label="Dan Langille\ndvl@FreeBSD.org\n2014/08/10"] eadler [label="Eitan Adler\neadler@FreeBSD.org\n2011/08/17"] @@ -433,6 +434,8 @@ glewis -> jkim ijliao -> leeym +imp -> dteske + itetcu -> ak itetcu -> araujo itetcu -> dryice @@ -507,6 +510,7 @@ makc -> jhale makc -> rakuco mat -> bmah +mat -> dteske mat -> dvl mat -> gordon mat -> mmokhi From owner-svn-src-all@freebsd.org Fri Mar 16 21:10:36 2018 Return-Path: Delivered-To: svn-src-all@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 D58DCF4E087; Fri, 16 Mar 2018 21:10:36 +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 8351975053; Fri, 16 Mar 2018 21:10:36 +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 7E5C0E8A; Fri, 16 Mar 2018 21:10:36 +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 w2GLAaVk043861; Fri, 16 Mar 2018 21:10:36 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GLAa4j043860; Fri, 16 Mar 2018 21:10:36 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803162110.w2GLAa4j043860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 16 Mar 2018 21:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331076 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Commit-Revision: 331076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 21:10:37 -0000 Author: cem Date: Fri Mar 16 21:10:36 2018 New Revision: 331076 URL: https://svnweb.freebsd.org/changeset/base/331076 Log: libdtrace: Fix another uninitialized dtt_flags UB Like r331073, eliminate a UB by fully initializing the struct with a designated initializer. Note that the similar src_dtt is not fully used, so a similar treatment was not absolutely required. I chose to leave it alone. It wouldn't hurt to do the same thing, though. Reported by: Coverity Sponsored by: Dell EMC Isilon Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c Fri Mar 16 21:03:54 2018 (r331075) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c Fri Mar 16 21:10:36 2018 (r331076) @@ -343,9 +343,11 @@ out: src_dtt.dtt_ctfp = src_ctfp; src_dtt.dtt_type = src_type; - dst_dtt.dtt_object = dt_module_lookup_by_ctf(dtp, dst_ctfp)->dm_name; - dst_dtt.dtt_ctfp = dst_ctfp; - dst_dtt.dtt_type = dst_type; + dst_dtt = (dtrace_typeinfo_t){ + .dtt_object = dt_module_lookup_by_ctf(dtp, dst_ctfp)->dm_name, + .dtt_ctfp = dst_ctfp, + .dtt_type = dst_type, + }; return (dt_xlator_create(dtp, &src_dtt, &dst_dtt, NULL, NULL, NULL)); } From owner-svn-src-all@freebsd.org Fri Mar 16 22:23:05 2018 Return-Path: Delivered-To: svn-src-all@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 6E580F52818; Fri, 16 Mar 2018 22:23:05 +0000 (UTC) (envelope-from brooks@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 1D32977EF5; Fri, 16 Mar 2018 22:23:05 +0000 (UTC) (envelope-from brooks@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 17CE41A97; Fri, 16 Mar 2018 22:23:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GMN4dU083690; Fri, 16 Mar 2018 22:23:04 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GMN4np083689; Fri, 16 Mar 2018 22:23:04 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803162223.w2GMN4np083689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 16 Mar 2018 22:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331077 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 331077 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 22:23:05 -0000 Author: brooks Date: Fri Mar 16 22:23:04 2018 New Revision: 331077 URL: https://svnweb.freebsd.org/changeset/base/331077 Log: Add _IOC_NEWLEN() and _IOC_NEWTYPE() macros. These macros take an existing ioctl(2) command and replace the length with the specified length or length of the specified type respectively. These can be used to define commands for 32-bit compatibility with fewer opportunities for cut-and-paste errors then a whole new definition. Reviewed by: cem, kib Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14706 Modified: head/sys/sys/ioccom.h Modified: head/sys/sys/ioccom.h ============================================================================== --- head/sys/sys/ioccom.h Fri Mar 16 21:10:36 2018 (r331076) +++ head/sys/sys/ioccom.h Fri Mar 16 22:23:04 2018 (r331077) @@ -61,6 +61,10 @@ #define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t)) /* this should be _IORW, but stdio got there first */ #define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t)) +/* Replace length/type in an ioctl command. */ +#define _IOC_NEWLEN(ioc, len) \ + (((~(IOCPARM_MASK << 16)) & (ioc)) | (((len) & IOCPARM_MASK) << 16)) +#define _IOC_NEWTYPE(ioc, type) _IOC_NEWLEN((ioc), sizeof(type)) #ifdef _KERNEL From owner-svn-src-all@freebsd.org Fri Mar 16 22:25:34 2018 Return-Path: Delivered-To: svn-src-all@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 80C67F52A21; Fri, 16 Mar 2018 22:25:34 +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 2E6D2780D9; Fri, 16 Mar 2018 22:25:34 +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 2905F1AA2; Fri, 16 Mar 2018 22:25:34 +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 w2GMPXI2083815; Fri, 16 Mar 2018 22:25:33 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GMPXWV083814; Fri, 16 Mar 2018 22:25:33 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803162225.w2GMPXWV083814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 16 Mar 2018 22:25:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331078 - head/contrib/elftoolchain/nm X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/contrib/elftoolchain/nm X-SVN-Commit-Revision: 331078 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 22:25:34 -0000 Author: cem Date: Fri Mar 16 22:25:33 2018 New Revision: 331078 URL: https://svnweb.freebsd.org/changeset/base/331078 Log: elftoolchain nm(1): Initialize allocated memory before use In out of memory scenarios (where one of these allocations failed but other(s) did not), nm(1) could reference the uninitialized value of these allocations (undefined behavior). Always initialize any successful allocations as the most expedient resolution of the issue. However, I would encourage upstream elftoolchain contributors to clean up the error path to just abort immediately, rather than proceeding sloppily when one allocation fails. Reported by: Coverity Sponsored by: Dell EMC Isilon Modified: head/contrib/elftoolchain/nm/nm.c Modified: head/contrib/elftoolchain/nm/nm.c ============================================================================== --- head/contrib/elftoolchain/nm/nm.c Fri Mar 16 22:23:04 2018 (r331077) +++ head/contrib/elftoolchain/nm/nm.c Fri Mar 16 22:25:33 2018 (r331078) @@ -1310,14 +1310,17 @@ read_elf(Elf *elf, const char *filename, Elf_Kind kind line_info = malloc(sizeof(struct line_info_head)); func_info = malloc(sizeof(struct func_info_head)); var_info = malloc(sizeof(struct var_info_head)); + if (line_info != NULL) + SLIST_INIT(line_info); + if (func_info != NULL) + SLIST_INIT(func_info); + if (var_info != NULL) + SLIST_INIT(var_info); if (line_info == NULL || func_info == NULL || var_info == NULL) { warn("malloc"); (void) dwarf_finish(dbg, &de); goto process_sym; } - SLIST_INIT(line_info); - SLIST_INIT(func_info); - SLIST_INIT(var_info); while ((ret = dwarf_next_cu_header(dbg, NULL, NULL, NULL, NULL, NULL, &de)) == DW_DLV_OK) { From owner-svn-src-all@freebsd.org Fri Mar 16 23:34:45 2018 Return-Path: Delivered-To: svn-src-all@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 C3DA8F56C8F for ; Fri, 16 Mar 2018 23:34:45 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yw0-x22a.google.com (mail-yw0-x22a.google.com [IPv6:2607:f8b0:4002:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00DB57A50C for ; Fri, 16 Mar 2018 23:34:44 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yw0-x22a.google.com with SMTP id y64so8059837ywa.3 for ; Fri, 16 Mar 2018 16:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=N/xFMSRkY7StWcNKBv/8LYsrqkEU6kdqkLvZDosoN1U=; b=dmMl2e1SUzo2YgQIBQEcN0G/h7R0tSLrasHjCaz3AM82/IAObpsQsKZ9Fe1d++0sHN SUyv1aYzP3nM3yKuiwZafsF88XqXFekloi59fBOjPNRmrNPQrvjUMAHLJLvWmksKV9BD TbzeuCGjbZ8OjVvvDfcaSEpoy5sAzd6aLtaFOVIHG701CMiaUZ6j/SRwJ2ak3eAwioqJ LWQPMk5bCQHnmOIQlQTvrYG9CVz0Q7vhx45IEywDX6bmDNazlGUdTrMU83kDClgpvYIe fqwHvAdTTHIs9yYHTjetOKU9ebCxemUE8mKm13Dr1D+2dOYsSj0kRoEMMpj+pTIM6OF8 WaiQ== 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=N/xFMSRkY7StWcNKBv/8LYsrqkEU6kdqkLvZDosoN1U=; b=mSrX1wlzrJf7u5zimQf7046b3dRgCK990d5k5bc/WFMSzsdw/2FI5/nSJIFFb2IIXk 1hL50ccrciVIoMwL+vkNWjKYR3DssH1GQ2G2Pq16ZHfTHlsr2Msdzctd4rmB7ycf9w7F GL69Z1v9NVN0yaMvuFcecWg1hx7hkONF3xh1yo6f3x1IfAQyTvjNtkcBbfLZws+N02ld g1fHSwoCknppB7A64HMxBkCtvMgWz9K7K5GyFsZOLv4q9FI0boZw67GsLq/+ku+1YkeB NEGt3tiG0/MSkYrxkE0oqegMmyEZSPVumOPuHERj3rc4DG/BAKZTRwoBiSAH8Z5q1YuY Lqzw== X-Gm-Message-State: AElRT7FK70XNXwYqzxM+nbgYwJRhYbtIj36UwW9PfTOyBjaM8gHGQhEz xgcijvF7pGHx4x7TedYj7cdvr/wMr0P1fHFhAASPxQ== X-Google-Smtp-Source: AG47ELsHls/LbWx8ib3PRqz1qUHWC9QbofG/n/46X/N663DbNeqgy+FPPkav/JQ/n+ZJewhUMMDYQtUnIAveouCUH8g= X-Received: by 2002:a25:cb8b:: with SMTP id b133-v6mr2458390ybg.29.1521243284251; Fri, 16 Mar 2018 16:34:44 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:3492:0:0:0:0:0 with HTTP; Fri, 16 Mar 2018 16:34:43 -0700 (PDT) In-Reply-To: <201803161433.w2GEXsbP098131@pdx.rh.CN85.dnsmgr.net> References: <20180316181800.B904@besplex.bde.org> <201803161433.w2GEXsbP098131@pdx.rh.CN85.dnsmgr.net> From: Oliver Pinter Date: Sat, 17 Mar 2018 00:34:43 +0100 Message-ID: Subject: Re: svn commit: r330972 - stable/11/share/misc To: rgrimes@freebsd.org Cc: Bruce Evans , src-committers@freebsd.org, Eitan Adler , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-11@freebsd.org, Andriy Gapon Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 23:34:46 -0000 On 3/16/18, Rodney W. Grimes wrote: >> On Thu, 15 Mar 2018, Rodney W. Grimes wrote: >> >> >> On 15/03/2018 10:30, Eitan Adler wrote: >> >>> ... >> >>> Log: >> >>> MFC >> >>> r303063,r311852,r311930,r317040,r320506,r321301,r325162,r326759,r329004,: >> >> I have never seen things like these MFC-ed before... >> >> Should we be really doing them? >> > >> > Yes, imho. And the reasons may seem odd to sum, but here is my spin on >> > this: >> > ... >> > Maybe we should even add to the end of the commiters "these are the >> > things you should do as a new committer" the merging of your info >> > into to all supported/active releases. Which is a good opportunity >> > for teaching how to do svn sparse checkouts as you really do not >> > want to pull all of stable/10 out just to commit to 1 file. >> >> Actually, it is necessary to check out everything to MFC to 1 file. >> Sparse checkouts only work for committing to head. They break mergeinfo >> for MFCs. Or so I was told when I MFCed with a sparse checkout. This is >> my excuse for not MFC'ing anything. > > The procedure for a branch is harder, you can do sparse, you just > have to do the tree one level at a time in sparse mode until you > get to the leaf you want to commit at. > > Then you do the merge at the top of the sparse tree, > then commit: > > (Recent example done to help someone with there first MFC:) > > #!/bin/sh > mkdir ~/svnwork.r328011 > cd ~/svnwork.r328011 > svn checkout svn+ssh://repo.freebsd.org/base --depth immediates > > cd base/stable && svn update --set-depth=immediates > cd 11 && svn update --set-depth=immediates > cd sys && svn update --set-depth=immediates > cd amd64 && svn update --set-depth=infinity > > cd ~/svnwork.r328011/base/stable/11 > svn merge -c r328011,r329162 ^/head > svn diff >~/svnwork.r328011/diff.OUT > > > You now no longer have that excuse :-) wow, this looks like a brutal overhead... :-\ If I want to pull up a specific file to a specific version with git, I have two options: a) a proper way a.0) git checkout target_branch a.1) git log origin_branch -- path/file a.2) collect the commit ids from the above command a.3) foreach i ( collected ids ) git cherry-pick $i b) the lazy mode b.0) git checkout target_branch b.1) git show target_branch:./path/file > ./path/file b.2) git commit -a the b.1) point will be a git show id:./path/file > ./path/file too, where the id is an exact git commit id > > -- > Rod Grimes > rgrimes@freebsd.org > _______________________________________________ > svn-src-stable-11@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11 > To unsubscribe, send any mail to > "svn-src-stable-11-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Fri Mar 16 23:34:45 2018 Return-Path: Delivered-To: svn-src-all@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 5B34AF56C86; Fri, 16 Mar 2018 23:34:45 +0000 (UTC) (envelope-from lidl@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 0B6237A50F; Fri, 16 Mar 2018 23:34:45 +0000 (UTC) (envelope-from lidl@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 ED0FA250E; Fri, 16 Mar 2018 23:34:44 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GNYiZi018648; Fri, 16 Mar 2018 23:34:44 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GNYiPu018645; Fri, 16 Mar 2018 23:34:44 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201803162334.w2GNYiPu018645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 16 Mar 2018 23:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331079 - in stable/11/contrib/blacklist: bin libexec X-SVN-Group: stable-11 X-SVN-Commit-Author: lidl X-SVN-Commit-Paths: in stable/11/contrib/blacklist: bin libexec X-SVN-Commit-Revision: 331079 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 23:34:45 -0000 Author: lidl Date: Fri Mar 16 23:34:44 2018 New Revision: 331079 URL: https://svnweb.freebsd.org/changeset/base/331079 Log: MFC r328861: improve blacklist-helper shell script Modified: stable/11/contrib/blacklist/bin/blacklistd.8 stable/11/contrib/blacklist/bin/blacklistd.c stable/11/contrib/blacklist/libexec/blacklistd-helper Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/blacklist/bin/blacklistd.8 ============================================================================== --- stable/11/contrib/blacklist/bin/blacklistd.8 Fri Mar 16 22:25:33 2018 (r331078) +++ stable/11/contrib/blacklist/bin/blacklistd.8 Fri Mar 16 23:34:44 2018 (r331079) @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 7, 2016 +.Dd Dec 6, 2017 .Dt BLACKLISTD 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nd block and release ports on demand to avoid DoS abuse .Sh SYNOPSIS .Nm -.Op Fl dfrv +.Op Fl Bdfrv .Op Fl C Ar controlprog .Op Fl c Ar configfile .Op Fl D Ar dbfile @@ -154,6 +154,8 @@ The Berkeley DB file where .Nm stores its state, usually .Pa /var/run/blacklistd.db . +.It Fl B +Disable processing of bad-usernames. .It Fl d Normally, .Nm Modified: stable/11/contrib/blacklist/bin/blacklistd.c ============================================================================== --- stable/11/contrib/blacklist/bin/blacklistd.c Fri Mar 16 22:25:33 2018 (r331078) +++ stable/11/contrib/blacklist/bin/blacklistd.c Fri Mar 16 23:34:44 2018 (r331079) @@ -76,6 +76,7 @@ static DB *state; static const char *dbfile = _PATH_BLSTATE; static sig_atomic_t readconf; static sig_atomic_t done; +static int Bflag; static int vflag; static void @@ -164,12 +165,85 @@ getremoteaddress(bl_info_t *bi, struct sockaddr_storag return 0; } +static const char *badnames_email[] = { + "info", + "root", + "admin", + "support", + "webmaster", + "sales", + "postmaster", + "marketing", + "administrator", + "default", + "noreply", + "ftpuser", + "backup", + "webadmin", + "security", + NULL +}; + +static const char *badnames_ssh[] = { + "admin", + "support", + "pi", + "info", + "root", + "guest", + "webmaster", + "ubnt", + "abuse", + "default", + "apache", + "nginx", + "cisco", + "administrator", + "ftpuser", + "supervisor", + "mysql", + "postgres", + "oracle", + "security", + "nagios", + "webadmin", + "usuario", + "uucp", + "PlcmSpIp", + " 0101", + NULL +}; + +static int +lookup_username(int proto, int port, const char *username) +{ + int i; + const char **names; + + if (proto != IPPROTO_TCP) + return 0; + + if (port == 22) + names = badnames_ssh; + else if (port == 25 || port == 587) + names = badnames_email; + else + return 0; + + for (i = 0; names[i] != NULL; i++) { + if (strcmp(username, names[i]) == 0) + return 1; + } + return 0; +} + static void process(bl_t bl) { struct sockaddr_storage rss; socklen_t rsl; char rbuf[BUFSIZ]; + int runadd, rundelete; bl_info_t *bi; struct conf c; struct dbinfo dbi; @@ -213,59 +287,74 @@ process(bl_t bl) fmttime(b2, sizeof(b2), ts.tv_sec)); } + runadd = rundelete = 0; + switch (bi->bi_type) { case BL_ABUSE: /* * If the application has signaled abusive behavior, - * set the number of fails to be one less than the - * configured limit. Fallthrough to the normal BL_ADD - * processing, which will increment the failure count - * to the threshhold, and block the abusive address. + * set the number of fails to be the configured limit. */ if (c.c_nfail != -1) - dbi.count = c.c_nfail - 1; - /*FALLTHROUGH*/ - case BL_ADD: - dbi.count++; - dbi.last = ts.tv_sec; - if (dbi.id[0]) { - /* - * We should not be getting this since the rule - * should have blocked the address. A possible - * explanation is that someone removed that rule, - * and another would be that we got another attempt - * before we added the rule. In anycase, we remove - * and re-add the rule because we don't want to add - * it twice, because then we'd lose track of it. - */ - (*lfun)(LOG_DEBUG, "rule exists %s", dbi.id); - (void)run_change("rem", &c, dbi.id, 0); - dbi.id[0] = '\0'; - } - if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { - int res = run_change("add", &c, dbi.id, sizeof(dbi.id)); - if (res == -1) - goto out; - sockaddr_snprintf(rbuf, sizeof(rbuf), "%a", - (void *)&rss); - (*lfun)(LOG_INFO, - "blocked %s/%d:%d for %d seconds", - rbuf, c.c_lmask, c.c_port, c.c_duration); - - } + dbi.count = c.c_nfail; + rundelete = 1; + runadd = 1; break; case BL_DELETE: if (dbi.last == 0) goto out; dbi.count = 0; dbi.last = 0; + rundelete = 1; break; case BL_BADUSER: - /* ignore for now */ + (*lfun)(LOG_DEBUG, "BL_BADUSER: username %s", bi->bi_msg); + dbi.count--; + if (Bflag == 0 && lookup_username(c.c_proto, c.c_port, bi->bi_msg) == 1) { + dbi.count = c.c_nfail - 1; + (*lfun)(LOG_DEBUG, "BL_BADUSER: found %s on list (port: %d)", bi->bi_msg, c.c_port); + } + /* FALLTHROUGH */ + case BL_ADD: + dbi.count++; + dbi.last = ts.tv_sec; + if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { + rundelete = 1; + runadd = 1; + } break; default: (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); } + + if (rundelete && c.c_duration != -1) { + /* + * We should not be getting this since the rule + * should have blocked the address. A possible + * explanation is that someone removed that rule, + * and another would be that we got another attempt + * before we added the rule. In anycase, we remove + * and re-add the rule because we don't want to add + * it twice, because then we'd lose track of it. + */ + if (dbi.id[0]) { + (*lfun)(LOG_INFO, "rule exists %s", dbi.id); + (void)run_change("rem", &c, dbi.id, 0); + dbi.id[0] = '\0'; + } + } + if (runadd) { + int res = run_change("add", &c, dbi.id, sizeof(dbi.id)); + if (res == -1) + goto out; + sockaddr_snprintf(rbuf, sizeof(rbuf), "%a", + (void *)&rss); + (*lfun)(LOG_INFO, + "blocked %s/%d:%d for %d seconds", + rbuf, c.c_lmask, c.c_port, c.c_duration); + } + + /* persist the data */ state_put(state, &c, &dbi); out: @@ -404,13 +493,16 @@ rules_restore(void) struct conf c; struct dbinfo dbi; unsigned int f; + static int addremove; for (f = 1; state_iterate(state, &c, &dbi, f) == 1; f = 0) { if (dbi.id[0] == '\0') continue; (void)run_change("rem", &c, dbi.id, 0); (void)run_change("add", &c, dbi.id, sizeof(dbi.id)); + addremove++; } + (*lfun)(LOG_INFO, "removed and re-added %d addresses", addremove); } int @@ -429,8 +521,11 @@ main(int argc, char *argv[]) restore = 0; tout = 0; flags = O_RDWR|O_EXCL|O_CLOEXEC; - while ((c = getopt(argc, argv, "C:c:D:dfP:rR:s:t:v")) != -1) { + while ((c = getopt(argc, argv, "BC:c:D:dfP:rR:s:t:v")) != -1) { switch (c) { + case 'B': + Bflag++; + break; case 'C': controlprog = optarg; break; Modified: stable/11/contrib/blacklist/libexec/blacklistd-helper ============================================================================== --- stable/11/contrib/blacklist/libexec/blacklistd-helper Fri Mar 16 22:25:33 2018 (r331078) +++ stable/11/contrib/blacklist/libexec/blacklistd-helper Fri Mar 16 23:34:44 2018 (r331079) @@ -80,8 +80,8 @@ add) echo "block in quick $proto from to any $port" | \ /sbin/pfctl -a "$2/$6" -f - # insert $ip/$mask into per-protocol/port anchored table - /sbin/pfctl -a "$2/$6" -t "port$6" -T add "$addr/$mask" && \ - echo OK + /sbin/pfctl -qa "$2/$6" -t "port$6" -T add "$addr/$mask" && \ + /sbin/pfctl -q -k $addr && echo OK ;; esac ;; @@ -101,7 +101,7 @@ rem) /sbin/npfctl rule "$2" rem-id "$7" ;; pf) - /sbin/pfctl -a "$2/$6" -t "port$6" -T delete "$addr/$mask" && \ + /sbin/pfctl -qa "$2/$6" -t "port$6" -T delete "$addr/$mask" && \ echo OK ;; esac @@ -118,7 +118,13 @@ flush) /sbin/npfctl rule "$2" flush ;; pf) - /sbin/pfctl -a "$2/$6" -t "port$6" -T flush && echo OK + # dynamically determine which anchors exist + anchors=$(/sbin/pfctl -a $2 -s Anchors) + for anchor in $anchors; do + /sbin/pfctl -a $anchor -t "port${anchor##*/}" -T flush + /sbin/pfctl -a $anchor -F rules + done + echo OK ;; esac ;; From owner-svn-src-all@freebsd.org Fri Mar 16 23:39:50 2018 Return-Path: Delivered-To: svn-src-all@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 B9C8CF57109; Fri, 16 Mar 2018 23:39:50 +0000 (UTC) (envelope-from lidl@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 6ADDF7A870; Fri, 16 Mar 2018 23:39:50 +0000 (UTC) (envelope-from lidl@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 56A862510; Fri, 16 Mar 2018 23:39:50 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2GNdoi8018874; Fri, 16 Mar 2018 23:39:50 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2GNdnjd018871; Fri, 16 Mar 2018 23:39:49 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201803162339.w2GNdnjd018871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 16 Mar 2018 23:39:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331080 - in stable/11/contrib/blacklist: bin libexec X-SVN-Group: stable-11 X-SVN-Commit-Author: lidl X-SVN-Commit-Paths: in stable/11/contrib/blacklist: bin libexec X-SVN-Commit-Revision: 331080 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 23:39:51 -0000 Author: lidl Date: Fri Mar 16 23:39:49 2018 New Revision: 331080 URL: https://svnweb.freebsd.org/changeset/base/331080 Log: Revert attempted MFC. It included unwanted changes. Modified: stable/11/contrib/blacklist/bin/blacklistd.8 stable/11/contrib/blacklist/bin/blacklistd.c stable/11/contrib/blacklist/libexec/blacklistd-helper Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/blacklist/bin/blacklistd.8 ============================================================================== --- stable/11/contrib/blacklist/bin/blacklistd.8 Fri Mar 16 23:34:44 2018 (r331079) +++ stable/11/contrib/blacklist/bin/blacklistd.8 Fri Mar 16 23:39:49 2018 (r331080) @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd Dec 6, 2017 +.Dd June 7, 2016 .Dt BLACKLISTD 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nd block and release ports on demand to avoid DoS abuse .Sh SYNOPSIS .Nm -.Op Fl Bdfrv +.Op Fl dfrv .Op Fl C Ar controlprog .Op Fl c Ar configfile .Op Fl D Ar dbfile @@ -154,8 +154,6 @@ The Berkeley DB file where .Nm stores its state, usually .Pa /var/run/blacklistd.db . -.It Fl B -Disable processing of bad-usernames. .It Fl d Normally, .Nm Modified: stable/11/contrib/blacklist/bin/blacklistd.c ============================================================================== --- stable/11/contrib/blacklist/bin/blacklistd.c Fri Mar 16 23:34:44 2018 (r331079) +++ stable/11/contrib/blacklist/bin/blacklistd.c Fri Mar 16 23:39:49 2018 (r331080) @@ -76,7 +76,6 @@ static DB *state; static const char *dbfile = _PATH_BLSTATE; static sig_atomic_t readconf; static sig_atomic_t done; -static int Bflag; static int vflag; static void @@ -165,85 +164,12 @@ getremoteaddress(bl_info_t *bi, struct sockaddr_storag return 0; } -static const char *badnames_email[] = { - "info", - "root", - "admin", - "support", - "webmaster", - "sales", - "postmaster", - "marketing", - "administrator", - "default", - "noreply", - "ftpuser", - "backup", - "webadmin", - "security", - NULL -}; - -static const char *badnames_ssh[] = { - "admin", - "support", - "pi", - "info", - "root", - "guest", - "webmaster", - "ubnt", - "abuse", - "default", - "apache", - "nginx", - "cisco", - "administrator", - "ftpuser", - "supervisor", - "mysql", - "postgres", - "oracle", - "security", - "nagios", - "webadmin", - "usuario", - "uucp", - "PlcmSpIp", - " 0101", - NULL -}; - -static int -lookup_username(int proto, int port, const char *username) -{ - int i; - const char **names; - - if (proto != IPPROTO_TCP) - return 0; - - if (port == 22) - names = badnames_ssh; - else if (port == 25 || port == 587) - names = badnames_email; - else - return 0; - - for (i = 0; names[i] != NULL; i++) { - if (strcmp(username, names[i]) == 0) - return 1; - } - return 0; -} - static void process(bl_t bl) { struct sockaddr_storage rss; socklen_t rsl; char rbuf[BUFSIZ]; - int runadd, rundelete; bl_info_t *bi; struct conf c; struct dbinfo dbi; @@ -287,74 +213,59 @@ process(bl_t bl) fmttime(b2, sizeof(b2), ts.tv_sec)); } - runadd = rundelete = 0; - switch (bi->bi_type) { case BL_ABUSE: /* * If the application has signaled abusive behavior, - * set the number of fails to be the configured limit. + * set the number of fails to be one less than the + * configured limit. Fallthrough to the normal BL_ADD + * processing, which will increment the failure count + * to the threshhold, and block the abusive address. */ if (c.c_nfail != -1) - dbi.count = c.c_nfail; - rundelete = 1; - runadd = 1; + dbi.count = c.c_nfail - 1; + /*FALLTHROUGH*/ + case BL_ADD: + dbi.count++; + dbi.last = ts.tv_sec; + if (dbi.id[0]) { + /* + * We should not be getting this since the rule + * should have blocked the address. A possible + * explanation is that someone removed that rule, + * and another would be that we got another attempt + * before we added the rule. In anycase, we remove + * and re-add the rule because we don't want to add + * it twice, because then we'd lose track of it. + */ + (*lfun)(LOG_DEBUG, "rule exists %s", dbi.id); + (void)run_change("rem", &c, dbi.id, 0); + dbi.id[0] = '\0'; + } + if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { + int res = run_change("add", &c, dbi.id, sizeof(dbi.id)); + if (res == -1) + goto out; + sockaddr_snprintf(rbuf, sizeof(rbuf), "%a", + (void *)&rss); + (*lfun)(LOG_INFO, + "blocked %s/%d:%d for %d seconds", + rbuf, c.c_lmask, c.c_port, c.c_duration); + + } break; case BL_DELETE: if (dbi.last == 0) goto out; dbi.count = 0; dbi.last = 0; - rundelete = 1; break; case BL_BADUSER: - (*lfun)(LOG_DEBUG, "BL_BADUSER: username %s", bi->bi_msg); - dbi.count--; - if (Bflag == 0 && lookup_username(c.c_proto, c.c_port, bi->bi_msg) == 1) { - dbi.count = c.c_nfail - 1; - (*lfun)(LOG_DEBUG, "BL_BADUSER: found %s on list (port: %d)", bi->bi_msg, c.c_port); - } - /* FALLTHROUGH */ - case BL_ADD: - dbi.count++; - dbi.last = ts.tv_sec; - if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { - rundelete = 1; - runadd = 1; - } + /* ignore for now */ break; default: (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); } - - if (rundelete && c.c_duration != -1) { - /* - * We should not be getting this since the rule - * should have blocked the address. A possible - * explanation is that someone removed that rule, - * and another would be that we got another attempt - * before we added the rule. In anycase, we remove - * and re-add the rule because we don't want to add - * it twice, because then we'd lose track of it. - */ - if (dbi.id[0]) { - (*lfun)(LOG_INFO, "rule exists %s", dbi.id); - (void)run_change("rem", &c, dbi.id, 0); - dbi.id[0] = '\0'; - } - } - if (runadd) { - int res = run_change("add", &c, dbi.id, sizeof(dbi.id)); - if (res == -1) - goto out; - sockaddr_snprintf(rbuf, sizeof(rbuf), "%a", - (void *)&rss); - (*lfun)(LOG_INFO, - "blocked %s/%d:%d for %d seconds", - rbuf, c.c_lmask, c.c_port, c.c_duration); - } - - /* persist the data */ state_put(state, &c, &dbi); out: @@ -493,16 +404,13 @@ rules_restore(void) struct conf c; struct dbinfo dbi; unsigned int f; - static int addremove; for (f = 1; state_iterate(state, &c, &dbi, f) == 1; f = 0) { if (dbi.id[0] == '\0') continue; (void)run_change("rem", &c, dbi.id, 0); (void)run_change("add", &c, dbi.id, sizeof(dbi.id)); - addremove++; } - (*lfun)(LOG_INFO, "removed and re-added %d addresses", addremove); } int @@ -521,11 +429,8 @@ main(int argc, char *argv[]) restore = 0; tout = 0; flags = O_RDWR|O_EXCL|O_CLOEXEC; - while ((c = getopt(argc, argv, "BC:c:D:dfP:rR:s:t:v")) != -1) { + while ((c = getopt(argc, argv, "C:c:D:dfP:rR:s:t:v")) != -1) { switch (c) { - case 'B': - Bflag++; - break; case 'C': controlprog = optarg; break; Modified: stable/11/contrib/blacklist/libexec/blacklistd-helper ============================================================================== --- stable/11/contrib/blacklist/libexec/blacklistd-helper Fri Mar 16 23:34:44 2018 (r331079) +++ stable/11/contrib/blacklist/libexec/blacklistd-helper Fri Mar 16 23:39:49 2018 (r331080) @@ -80,8 +80,8 @@ add) echo "block in quick $proto from to any $port" | \ /sbin/pfctl -a "$2/$6" -f - # insert $ip/$mask into per-protocol/port anchored table - /sbin/pfctl -qa "$2/$6" -t "port$6" -T add "$addr/$mask" && \ - /sbin/pfctl -q -k $addr && echo OK + /sbin/pfctl -a "$2/$6" -t "port$6" -T add "$addr/$mask" && \ + echo OK ;; esac ;; @@ -101,7 +101,7 @@ rem) /sbin/npfctl rule "$2" rem-id "$7" ;; pf) - /sbin/pfctl -qa "$2/$6" -t "port$6" -T delete "$addr/$mask" && \ + /sbin/pfctl -a "$2/$6" -t "port$6" -T delete "$addr/$mask" && \ echo OK ;; esac @@ -118,13 +118,7 @@ flush) /sbin/npfctl rule "$2" flush ;; pf) - # dynamically determine which anchors exist - anchors=$(/sbin/pfctl -a $2 -s Anchors) - for anchor in $anchors; do - /sbin/pfctl -a $anchor -t "port${anchor##*/}" -T flush - /sbin/pfctl -a $anchor -F rules - done - echo OK + /sbin/pfctl -a "$2/$6" -t "port$6" -T flush && echo OK ;; esac ;; From owner-svn-src-all@freebsd.org Fri Mar 16 23:54:52 2018 Return-Path: Delivered-To: svn-src-all@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 3D5C7F58118; Fri, 16 Mar 2018 23:54:52 +0000 (UTC) (envelope-from srs0=0tss=gg=sigsegv.be=kristof@codepro.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB2397B26E; Fri, 16 Mar 2018 23:54:51 +0000 (UTC) (envelope-from srs0=0tss=gg=sigsegv.be=kristof@codepro.be) Received: from [10.0.2.164] (ptr-8ripyyhkqcx2a97vzlt.18120a2.ip6.access.telenet.be [IPv6:2a02:1811:2419:4e02:d0f6:472b:f1e:1101]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 7E8712704D; Sat, 17 Mar 2018 00:54:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sigsegv.be; s=mail; t=1521244489; bh=wlw7Sll/wYwSzOPzvd0/Mtcg+lUBp2GhcNU1lQ/22R4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jp4TBGl+jUOyZM4E1rXlcuPmcj7ddwjZIdjZFxnEr28XqsxXqNOCTJOGD4A2XCmXB wq2YFdrYdUc6ZOi2r0326RQaccrNZFjhJfGNpEHTHlJtsDnXv8MpmJ1R8JDZt0Zgpp dW34mwRgKewquadzrTh96p8TBUXr5MqVXmJpuevU= From: "Kristof Provost" To: "Kirill Ponomarev" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r331064 - head/sbin/ifconfig Date: Sat, 17 Mar 2018 00:54:46 +0100 X-Mailer: MailMate (2.0BETAr6106) Message-ID: <90FB9B8F-DF2E-49E5-BD86-197CE3B312A4@sigsegv.be> In-Reply-To: <201803161656.w2GGuvOv016658@repo.freebsd.org> References: <201803161656.w2GGuvOv016658@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 23:54:52 -0000 On 16 Mar 2018, at 17:56, Kirill Ponomarev wrote: > Author: krion (ports committer) > Date: Fri Mar 16 16:56:56 2018 > New Revision: 331064 > URL: https://svnweb.freebsd.org/changeset/base/331064 > > Log: > Extend SSID maximum string length to 32 chars to support longer SSID > names. > > Approved by: adrian > Differential Revision: https://reviews.freebsd.org/D14710 > > Modified: > head/sbin/ifconfig/ifieee80211.c > > Modified: head/sbin/ifconfig/ifieee80211.c > ============================================================================== > --- head/sbin/ifconfig/ifieee80211.c Fri Mar 16 16:06:25 > 2018 (r331063) > +++ head/sbin/ifconfig/ifieee80211.c Fri Mar 16 16:56:56 > 2018 (r331064) > @@ -3503,7 +3503,7 @@ list_scan(int s) > > getchaninfo(s); > > - ssidmax = verbose ? IEEE80211_NWID_LEN : 14; > + ssidmax = verbose ? IEEE80211_NWID_LEN : 32; IEEE80211_NWID_LEN is 32, so this says ‘verbose ? 32 : 32’ now. > printf("%-*.*s %-17.17s %4s %4s %-7s %3s %4s\n" > , ssidmax, ssidmax, "SSID/MESH ID" > , "BSSID" Regards, Kristof From owner-svn-src-all@freebsd.org Sat Mar 17 00:19:40 2018 Return-Path: Delivered-To: svn-src-all@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 151F0F5992C; Sat, 17 Mar 2018 00:19:40 +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 5F8EC7BE44; Sat, 17 Mar 2018 00:19:38 +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 w2H05gER099919; Fri, 16 Mar 2018 17:05:42 -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 w2H05gcV099918; Fri, 16 Mar 2018 17:05:42 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803170005.w2H05gcV099918@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330972 - stable/11/share/misc In-Reply-To: To: Oliver Pinter Date: Fri, 16 Mar 2018 17:05:42 -0700 (PDT) CC: rgrimes@freebsd.org, Bruce Evans , src-committers@freebsd.org, Eitan Adler , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-11@freebsd.org, Andriy Gapon 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 00:19:40 -0000 > On 3/16/18, Rodney W. Grimes wrote: > >> On Thu, 15 Mar 2018, Rodney W. Grimes wrote: > >> > >> >> On 15/03/2018 10:30, Eitan Adler wrote: > >> >>> ... > >> >>> Log: > >> >>> MFC > >> >>> r303063,r311852,r311930,r317040,r320506,r321301,r325162,r326759,r329004,: > >> >> I have never seen things like these MFC-ed before... > >> >> Should we be really doing them? > >> > > >> > Yes, imho. And the reasons may seem odd to sum, but here is my spin on > >> > this: > >> > ... > >> > Maybe we should even add to the end of the commiters "these are the > >> > things you should do as a new committer" the merging of your info > >> > into to all supported/active releases. Which is a good opportunity > >> > for teaching how to do svn sparse checkouts as you really do not > >> > want to pull all of stable/10 out just to commit to 1 file. > >> > >> Actually, it is necessary to check out everything to MFC to 1 file. > >> Sparse checkouts only work for committing to head. They break mergeinfo > >> for MFCs. Or so I was told when I MFCed with a sparse checkout. This is > >> my excuse for not MFC'ing anything. > > > > The procedure for a branch is harder, you can do sparse, you just > > have to do the tree one level at a time in sparse mode until you > > get to the leaf you want to commit at. > > > > Then you do the merge at the top of the sparse tree, > > then commit: > > > > (Recent example done to help someone with there first MFC:) > > > > #!/bin/sh > > mkdir ~/svnwork.r328011 > > cd ~/svnwork.r328011 > > svn checkout svn+ssh://repo.freebsd.org/base --depth immediates > > > > cd base/stable && svn update --set-depth=immediates > > cd 11 && svn update --set-depth=immediates > > cd sys && svn update --set-depth=immediates > > cd amd64 && svn update --set-depth=infinity > > > > cd ~/svnwork.r328011/base/stable/11 > > svn merge -c r328011,r329162 ^/head > > svn diff >~/svnwork.r328011/diff.OUT > > > > > > You now no longer have that excuse :-) > > wow, this looks like a brutal overhead... :-\ > > If I want to pull up a specific file to a specific version with git, I > have two options: > a) a proper way > a.0) git checkout target_branch How long did this take, and how many files does find . -type f | wc -l return? > a.1) git log origin_branch -- path/file > a.2) collect the commit ids from the above command > a.3) foreach i ( collected ids ) git cherry-pick $i > > b) the lazy mode > b.0) git checkout target_branch How long did this take, and how many files does find . -type f | wc -l return? > b.1) git show target_branch:./path/file > ./path/file > b.2) git commit -a > > the b.1) point will be a git show id:./path/file > ./path/file too, > where the id is an exact git commit id The above "painful" method runs in a few seconds and produces only a handful of files in ~svwnwork.r328011 Have missed the sparseness aspect? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Sat Mar 17 01:27:56 2018 Return-Path: Delivered-To: svn-src-all@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 0D338F5DF8B; Sat, 17 Mar 2018 01:27:56 +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 581E07E393; Sat, 17 Mar 2018 01:27:55 +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 AF720396A; Sat, 17 Mar 2018 01:27:54 +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 w2H1RssK072822; Sat, 17 Mar 2018 01:27:54 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2H1RsmT072821; Sat, 17 Mar 2018 01:27:54 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803170127.w2H1RsmT072821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 17 Mar 2018 01:27:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331081 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 331081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 01:27:56 -0000 Author: eadler Date: Sat Mar 17 01:27:54 2018 New Revision: 331081 URL: https://svnweb.freebsd.org/changeset/base/331081 Log: MFC r326959: arc lint: ignore /tests/ in chmod shell scripts in scripts don't need to be chmod +x to work. In fact most are not. Of the tests I found from a simple search: 65 are chmod +x 84 are chmod -x simply disable the check for test shell scripts. Modified: stable/11/.arclint Directory Properties: stable/11/ (props changed) Modified: stable/11/.arclint ============================================================================== --- stable/11/.arclint Fri Mar 16 23:39:49 2018 (r331080) +++ stable/11/.arclint Sat Mar 17 01:27:54 2018 (r331081) @@ -9,7 +9,8 @@ "type": "spelling" }, "chmod": { - "type": "chmod" + "type": "chmod", + "exclude": "(/tests/)" }, "merge-conflict": { "type": "merge-conflict" From owner-svn-src-all@freebsd.org Sat Mar 17 01:40:10 2018 Return-Path: Delivered-To: svn-src-all@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 63C7EF5EDBB; Sat, 17 Mar 2018 01:40:10 +0000 (UTC) (envelope-from emaste@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 0DDB67EBB3; Sat, 17 Mar 2018 01:40:10 +0000 (UTC) (envelope-from emaste@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 056313BF0; Sat, 17 Mar 2018 01:40:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2H1e9Re078194; Sat, 17 Mar 2018 01:40:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2H1e9ci078192; Sat, 17 Mar 2018 01:40:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803170140.w2H1e9ci078192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 17 Mar 2018 01:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331082 - in head/sys/x86: isa x86 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys/x86: isa x86 X-SVN-Commit-Revision: 331082 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 01:40:10 -0000 Author: emaste Date: Sat Mar 17 01:40:09 2018 New Revision: 331082 URL: https://svnweb.freebsd.org/changeset/base/331082 Log: ANSIfy sys/x86 Modified: head/sys/x86/isa/isa_dma.c head/sys/x86/x86/autoconf.c Modified: head/sys/x86/isa/isa_dma.c ============================================================================== --- head/sys/x86/isa/isa_dma.c Sat Mar 17 01:27:54 2018 (r331081) +++ head/sys/x86/isa/isa_dma.c Sat Mar 17 01:40:09 2018 (r331082) @@ -146,8 +146,7 @@ isa_dma_init(int chan, u_int bouncebufsize, int flag) * in open() or during its initialization. */ int -isa_dma_acquire(chan) - int chan; +isa_dma_acquire(int chan) { #ifdef DIAGNOSTIC if (chan & ~VALID_DMA_MASK) @@ -172,8 +171,7 @@ isa_dma_acquire(chan) * during close() or during its shutdown. */ void -isa_dma_release(chan) - int chan; +isa_dma_release(int chan) { #ifdef DIAGNOSTIC if (chan & ~VALID_DMA_MASK) @@ -207,8 +205,7 @@ isa_dma_release(chan) * external dma control by a board. */ void -isa_dmacascade(chan) - int chan; +isa_dmacascade(int chan) { #ifdef DIAGNOSTIC if (chan & ~VALID_DMA_MASK) Modified: head/sys/x86/x86/autoconf.c ============================================================================== --- head/sys/x86/x86/autoconf.c Sat Mar 17 01:27:54 2018 (r331081) +++ head/sys/x86/x86/autoconf.c Sat Mar 17 01:40:09 2018 (r331082) @@ -87,8 +87,7 @@ SYSINIT(configure3, SI_SUB_CONFIGURE, SI_ORDER_ANY, co * Determine i/o configuration for a machine. */ static void -configure_first(dummy) - void *dummy; +configure_first(void *dummy) { /* nexus0 is the top of the x86 device tree */ @@ -96,8 +95,7 @@ configure_first(dummy) } static void -configure(dummy) - void *dummy; +configure(void *dummy) { /* initialize new bus architecture */ @@ -114,8 +112,7 @@ configure(dummy) } static void -configure_final(dummy) - void *dummy; +configure_final(void *dummy) { cninit_finish(); From owner-svn-src-all@freebsd.org Sat Mar 17 01:48:30 2018 Return-Path: Delivered-To: svn-src-all@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 2D5E7F5F7D0; Sat, 17 Mar 2018 01:48:30 +0000 (UTC) (envelope-from emaste@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 CF18A7F26D; Sat, 17 Mar 2018 01:48:29 +0000 (UTC) (envelope-from emaste@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 C99AB3DA0; Sat, 17 Mar 2018 01:48:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2H1mTOJ083016; Sat, 17 Mar 2018 01:48:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2H1mR46082991; Sat, 17 Mar 2018 01:48:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803170148.w2H1mR46082991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 17 Mar 2018 01:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331083 - in head: lib/libufs sbin/dump sbin/fsck_ffs sbin/fsdb sbin/newfs sbin/quotacheck sbin/restore sbin/tunefs stand/libsa sys/fs/ext2fs sys/fs/nandfs sys/ufs/ffs sys/ufs/ufs usr.s... X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: lib/libufs sbin/dump sbin/fsck_ffs sbin/fsdb sbin/newfs sbin/quotacheck sbin/restore sbin/tunefs stand/libsa sys/fs/ext2fs sys/fs/nandfs sys/ufs/ffs sys/ufs/ufs usr.sbin/quot X-SVN-Commit-Revision: 331083 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 01:48:30 -0000 Author: emaste Date: Sat Mar 17 01:48:27 2018 New Revision: 331083 URL: https://svnweb.freebsd.org/changeset/base/331083 Log: Prefix UFS symbols with UFS_ to reduce namespace pollution Followup to r313780. Also prefix ext2's and nandfs's versions with EXT2_ and NANDFS_. Reported by: kib Reviewed by: kib, mckusick Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9623 Modified: head/lib/libufs/inode.c head/sbin/dump/main.c head/sbin/dump/traverse.c head/sbin/fsck_ffs/dir.c head/sbin/fsck_ffs/fsutil.c head/sbin/fsck_ffs/inode.c head/sbin/fsck_ffs/pass1.c head/sbin/fsck_ffs/pass2.c head/sbin/fsck_ffs/suj.c head/sbin/fsdb/fsdb.c head/sbin/fsdb/fsdbutil.c head/sbin/newfs/mkfs.c head/sbin/quotacheck/quotacheck.c head/sbin/restore/dirs.c head/sbin/restore/interactive.c head/sbin/restore/tape.c head/sbin/tunefs/tunefs.c head/stand/libsa/nandfs.c head/stand/libsa/ufs.c head/sys/fs/ext2fs/ext2_alloc.c head/sys/fs/ext2fs/ext2_dinode.h head/sys/fs/ext2fs/ext2_lookup.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/ext2fs/inode.h head/sys/fs/nandfs/nandfs.h head/sys/fs/nandfs/nandfs_vnops.c head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_vnops.c head/sys/ufs/ffs/softdep.h head/sys/ufs/ufs/dinode.h head/sys/ufs/ufs/inode.h head/sys/ufs/ufs/ufs_lookup.c head/sys/ufs/ufs/ufs_vnops.c head/usr.sbin/quot/quot.c Modified: head/lib/libufs/inode.c ============================================================================== --- head/lib/libufs/inode.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/lib/libufs/inode.c Sat Mar 17 01:48:27 2018 (r331083) @@ -81,12 +81,12 @@ getino(struct uufsd *disk, void **dino, ino_t inode, i gotit: switch (disk->d_ufs) { case 1: dp1 = &((struct ufs1_dinode *)inoblock)[inode - min]; - *mode = dp1->di_mode & IFMT; + *mode = dp1->di_mode & UFS_IFMT; *dino = dp1; return (0); case 2: dp2 = &((struct ufs2_dinode *)inoblock)[inode - min]; - *mode = dp2->di_mode & IFMT; + *mode = dp2->di_mode & UFS_IFMT; *dino = dp2; return (0); default: Modified: head/sbin/dump/main.c ============================================================================== --- head/sbin/dump/main.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/dump/main.c Sat Mar 17 01:48:27 2018 (r331083) @@ -550,7 +550,7 @@ main(int argc, char *argv[]) * Skip directory inodes deleted and maybe reallocated */ dp = getinode(ino, &mode); - if (mode != IFDIR) + if (mode != UFS_IFDIR) continue; (void)dumpino(dp, ino); } @@ -569,7 +569,7 @@ main(int argc, char *argv[]) * Skip inodes deleted and reallocated as directories. */ dp = getinode(ino, &mode); - if (mode == IFDIR) + if (mode == UFS_IFDIR) continue; (void)dumpino(dp, ino); } Modified: head/sbin/dump/traverse.c ============================================================================== --- head/sbin/dump/traverse.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/dump/traverse.c Sat Mar 17 01:48:27 2018 (r331083) @@ -195,7 +195,7 @@ mapfiles(ino_t maxino, long *tapesize) for (i = 0; i < inosused; i++, ino++) { if (ino < UFS_ROOTINO || (dp = getinode(ino, &mode)) == NULL || - (mode & IFMT) == 0) + (mode & UFS_IFMT) == 0) continue; if (ino >= maxino) { msg("Skipping inode %ju >= maxino %ju\n", @@ -209,19 +209,19 @@ mapfiles(ino_t maxino, long *tapesize) * (this is used in mapdirs()). */ SETINO(ino, usedinomap); - if (mode == IFDIR) + if (mode == UFS_IFDIR) SETINO(ino, dumpdirmap); if (WANTTODUMP(dp)) { SETINO(ino, dumpinomap); - if (mode != IFREG && - mode != IFDIR && - mode != IFLNK) + if (mode != UFS_IFREG && + mode != UFS_IFDIR && + mode != UFS_IFLNK) *tapesize += 1; else *tapesize += blockest(dp); continue; } - if (mode == IFDIR) { + if (mode == UFS_IFDIR) { if (!nonodump && (DIP(dp, di_flags) & UF_NODUMP)) CLRINO(ino, usedinomap); @@ -429,7 +429,7 @@ searchdir( * Add back to dumpdirmap and remove from usedinomap * to propagate nodump. */ - if (mode == IFDIR) { + if (mode == UFS_IFDIR) { SETINO(dp->d_ino, dumpdirmap); CLRINO(dp->d_ino, usedinomap); ret |= HASSUBDIRS; @@ -554,7 +554,7 @@ dumpino(union dinode *dp, ino_t ino) default: msg("Warning: undefined file type 0%o\n", - DIP(dp, di_mode) & IFMT); + DIP(dp, di_mode) & UFS_IFMT); return; } if (DIP(dp, di_size) > UFS_NDADDR * sblock->fs_bsize) { @@ -890,11 +890,11 @@ getinode(ino_t inum, int *modep) gotit: if (sblock->fs_magic == FS_UFS1_MAGIC) { dp1 = &((struct ufs1_dinode *)inoblock)[inum - minino]; - *modep = (dp1->di_mode & IFMT); + *modep = (dp1->di_mode & UFS_IFMT); return ((union dinode *)dp1); } dp2 = &((struct ufs2_dinode *)inoblock)[inum - minino]; - *modep = (dp2->di_mode & IFMT); + *modep = (dp2->di_mode & UFS_IFMT); return ((union dinode *)dp2); } Modified: head/sbin/fsck_ffs/dir.c ============================================================================== --- head/sbin/fsck_ffs/dir.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/fsck_ffs/dir.c Sat Mar 17 01:48:27 2018 (r331083) @@ -264,7 +264,7 @@ fileerror(ino_t cwd, ino_t ino, const char *errmesg) dp = ginode(ino); if (ftypeok(dp)) pfatal("%s=%s\n", - (DIP(dp, di_mode) & IFMT) == IFDIR ? "DIR" : "FILE", + (DIP(dp, di_mode) & UFS_IFMT) == UFS_IFDIR ? "DIR" : "FILE", pathbuf); else pfatal("NAME=%s\n", pathbuf); @@ -308,7 +308,8 @@ adjust(struct inodesc *idesc, int lcnt) } if (lcnt != 0) { pwarn("LINK COUNT %s", (lfdir == idesc->id_number) ? lfname : - ((DIP(dp, di_mode) & IFMT) == IFDIR ? "DIR" : "FILE")); + ((DIP(dp, di_mode) & UFS_IFMT) == UFS_IFDIR ? + "DIR" : "FILE")); pinode(idesc->id_number); printf(" COUNT %d SHOULD BE %d", DIP(dp, di_nlink), DIP(dp, di_nlink) - lcnt); @@ -388,7 +389,7 @@ linkup(ino_t orphan, ino_t parentdir, char *name) memset(&idesc, 0, sizeof(struct inodesc)); dp = ginode(orphan); - lostdir = (DIP(dp, di_mode) & IFMT) == IFDIR; + lostdir = (DIP(dp, di_mode) & UFS_IFMT) == UFS_IFDIR; pwarn("UNREF %s ", lostdir ? "DIR" : "FILE"); pinode(orphan); if (preen && DIP(dp, di_size) == 0) @@ -436,7 +437,7 @@ linkup(ino_t orphan, ino_t parentdir, char *name) } } dp = ginode(lfdir); - if ((DIP(dp, di_mode) & IFMT) != IFDIR) { + if ((DIP(dp, di_mode) & UFS_IFMT) != UFS_IFDIR) { pfatal("lost+found IS NOT A DIRECTORY"); if (reply("REALLOCATE") == 0) return (0); @@ -615,7 +616,7 @@ allocdir(ino_t parent, ino_t request, int mode) struct inoinfo *inp; struct dirtemplate *dirp; - ino = allocino(request, IFDIR|mode); + ino = allocino(request, UFS_IFDIR|mode); dirp = &dirhead; dirp->dot_ino = ino; dirp->dotdot_ino = parent; Modified: head/sbin/fsck_ffs/fsutil.c ============================================================================== --- head/sbin/fsck_ffs/fsutil.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/fsck_ffs/fsutil.c Sat Mar 17 01:48:27 2018 (r331083) @@ -100,15 +100,15 @@ fsutilinit(void) int ftypeok(union dinode *dp) { - switch (DIP(dp, di_mode) & IFMT) { + switch (DIP(dp, di_mode) & UFS_IFMT) { - case IFDIR: - case IFREG: - case IFBLK: - case IFCHR: - case IFLNK: - case IFSOCK: - case IFIFO: + case UFS_IFDIR: + case UFS_IFREG: + case UFS_IFBLK: + case UFS_IFCHR: + case UFS_IFLNK: + case UFS_IFSOCK: + case UFS_IFIFO: return (1); default: Modified: head/sbin/fsck_ffs/inode.c ============================================================================== --- head/sbin/fsck_ffs/inode.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/fsck_ffs/inode.c Sat Mar 17 01:48:27 2018 (r331083) @@ -71,8 +71,8 @@ ckinode(union dinode *dp, struct inodesc *idesc) idesc->id_lbn = -1; idesc->id_entryno = 0; idesc->id_filesize = DIP(dp, di_size); - mode = DIP(dp, di_mode) & IFMT; - if (mode == IFBLK || mode == IFCHR || (mode == IFLNK && + mode = DIP(dp, di_mode) & UFS_IFMT; + if (mode == UFS_IFBLK || mode == UFS_IFCHR || (mode == UFS_IFLNK && DIP(dp, di_size) < (unsigned)sblock.fs_maxsymlinklen)) return (KEEPON); if (sblock.fs_magic == FS_UFS1_MAGIC) @@ -347,7 +347,7 @@ getnextinode(ino_t inumber, int rebuildcg) * Try to determine if we have reached the end of the * allocated inodes. */ - mode = DIP(dp, di_mode) & IFMT; + mode = DIP(dp, di_mode) & UFS_IFMT; if (mode == 0) { if (memcmp(dp->dp2.di_db, ufs2_zino.di_db, UFS_NDADDR * sizeof(ufs2_daddr_t)) || @@ -362,9 +362,9 @@ getnextinode(ino_t inumber, int rebuildcg) ndb = howmany(DIP(dp, di_size), sblock.fs_bsize); if (ndb < 0) return (NULL); - if (mode == IFBLK || mode == IFCHR) + if (mode == UFS_IFBLK || mode == UFS_IFCHR) ndb++; - if (mode == IFLNK) { + if (mode == UFS_IFLNK) { /* * Fake ndb value so direct/indirect block checks below * will detect any garbage after symlink string. @@ -533,7 +533,7 @@ clri(struct inodesc *idesc, const char *type, int flag dp = ginode(idesc->id_number); if (flag == 1) { pwarn("%s %s", type, - (DIP(dp, di_mode) & IFMT) == IFDIR ? "DIR" : "FILE"); + (DIP(dp, di_mode) & UFS_IFMT) == UFS_IFDIR ? "DIR":"FILE"); pinode(idesc->id_number); } if (preen || reply("CLEAR") == 1) { @@ -681,13 +681,13 @@ allocino(ino_t request, int type) return (0); setbit(cg_inosused(cgp), ino % sblock.fs_ipg); cgp->cg_cs.cs_nifree--; - switch (type & IFMT) { - case IFDIR: + switch (type & UFS_IFMT) { + case UFS_IFDIR: inoinfo(ino)->ino_state = DSTATE; cgp->cg_cs.cs_ndir++; break; - case IFREG: - case IFLNK: + case UFS_IFREG: + case UFS_IFLNK: inoinfo(ino)->ino_state = FSTATE; break; default: Modified: head/sbin/fsck_ffs/pass1.c ============================================================================== --- head/sbin/fsck_ffs/pass1.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/fsck_ffs/pass1.c Sat Mar 17 01:48:27 2018 (r331083) @@ -251,7 +251,7 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r if ((dp = getnextinode(inumber, rebuildcg)) == NULL) return (0); - mode = DIP(dp, di_mode) & IFMT; + mode = DIP(dp, di_mode) & UFS_IFMT; if (mode == 0) { if ((sblock.fs_magic == FS_UFS1_MAGIC && (memcmp(dp->dp1.di_db, ufs1_zino.di_db, @@ -284,25 +284,25 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r kernmaxfilesize = sblock.fs_maxfilesize; if (DIP(dp, di_size) > kernmaxfilesize || DIP(dp, di_size) > sblock.fs_maxfilesize || - (mode == IFDIR && DIP(dp, di_size) > MAXDIRSIZE)) { + (mode == UFS_IFDIR && DIP(dp, di_size) > MAXDIRSIZE)) { if (debug) printf("bad size %ju:", (uintmax_t)DIP(dp, di_size)); goto unknown; } - if (!preen && mode == IFMT && reply("HOLD BAD BLOCK") == 1) { + if (!preen && mode == UFS_IFMT && reply("HOLD BAD BLOCK") == 1) { dp = ginode(inumber); DIP_SET(dp, di_size, sblock.fs_fsize); - DIP_SET(dp, di_mode, IFREG|0600); + DIP_SET(dp, di_mode, UFS_IFREG|0600); inodirty(); } - if ((mode == IFBLK || mode == IFCHR || mode == IFIFO || - mode == IFSOCK) && DIP(dp, di_size) != 0) { + if ((mode == UFS_IFBLK || mode == UFS_IFCHR || mode == UFS_IFIFO || + mode == UFS_IFSOCK) && DIP(dp, di_size) != 0) { if (debug) printf("bad special-file size %ju:", (uintmax_t)DIP(dp, di_size)); goto unknown; } - if ((mode == IFBLK || mode == IFCHR) && + if ((mode == UFS_IFBLK || mode == UFS_IFCHR) && (dev_t)DIP(dp, di_rdev) == NODEV) { if (debug) printf("bad special-file rdev NODEV:"); @@ -315,9 +315,9 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r (uintmax_t)DIP(dp, di_size), (uintmax_t)ndb); goto unknown; } - if (mode == IFBLK || mode == IFCHR) + if (mode == UFS_IFBLK || mode == UFS_IFCHR) ndb++; - if (mode == IFLNK) { + if (mode == UFS_IFLNK) { /* * Fake ndb value so direct/indirect block checks below * will detect any garbage after symlink string. @@ -357,7 +357,7 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r goto unknown; n_files++; inoinfo(inumber)->ino_linkcnt = DIP(dp, di_nlink); - if (mode == IFDIR) { + if (mode == UFS_IFDIR) { if (DIP(dp, di_size) == 0) inoinfo(inumber)->ino_state = DCLEAR; else if (DIP(dp, di_nlink) <= 0) Modified: head/sbin/fsck_ffs/pass2.c ============================================================================== --- head/sbin/fsck_ffs/pass2.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/fsck_ffs/pass2.c Sat Mar 17 01:48:27 2018 (r331083) @@ -112,8 +112,8 @@ pass2(void) exit(EEXIT); } dp = ginode(UFS_ROOTINO); - DIP_SET(dp, di_mode, DIP(dp, di_mode) & ~IFMT); - DIP_SET(dp, di_mode, DIP(dp, di_mode) | IFDIR); + DIP_SET(dp, di_mode, DIP(dp, di_mode) & ~UFS_IFMT); + DIP_SET(dp, di_mode, DIP(dp, di_mode) | UFS_IFDIR); inodirty(); break; @@ -184,7 +184,7 @@ pass2(void) } dp = &dino; memset(dp, 0, sizeof(struct ufs2_dinode)); - DIP_SET(dp, di_mode, IFDIR); + DIP_SET(dp, di_mode, UFS_IFDIR); DIP_SET(dp, di_size, inp->i_isize); for (i = 0; i < MIN(inp->i_numblks, UFS_NDADDR); i++) DIP_SET(dp, di_db[i], inp->i_blks[i]); @@ -478,7 +478,8 @@ again: break; dp = ginode(dirp->d_ino); inoinfo(dirp->d_ino)->ino_state = - (DIP(dp, di_mode) & IFMT) == IFDIR ? DSTATE : FSTATE; + (DIP(dp, di_mode) & UFS_IFMT) == UFS_IFDIR ? + DSTATE : FSTATE; inoinfo(dirp->d_ino)->ino_linkcnt = DIP(dp, di_nlink); goto again; Modified: head/sbin/fsck_ffs/suj.c ============================================================================== --- head/sbin/fsck_ffs/suj.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/fsck_ffs/suj.c Sat Mar 17 01:48:27 2018 (r331083) @@ -605,7 +605,7 @@ ino_free(ino_t ino, int mode) if (ino < cgp->cg_irotor) cgp->cg_irotor = ino; cgp->cg_cs.cs_nifree++; - if ((mode & IFMT) == IFDIR) { + if ((mode & UFS_IFMT) == UFS_IFDIR) { freedir++; cgp->cg_cs.cs_ndir--; } @@ -748,7 +748,7 @@ ino_blkatoff(union dinode *ip, ino_t ino, ufs_lbn_t lb /* * Now direct and indirect. */ - if (DIP(ip, di_mode) == IFLNK && + if (DIP(ip, di_mode) == UFS_IFLNK && DIP(ip, di_size) < fs->fs_maxsymlinklen) return (0); if (lbn >= 0 && lbn < UFS_NDADDR) { @@ -853,7 +853,7 @@ ino_isat(ino_t parent, off_t diroff, ino_t child, int *isdot = 0; dip = ino_read(parent); *mode = DIP(dip, di_mode); - if ((*mode & IFMT) != IFDIR) { + if ((*mode & UFS_IFMT) != UFS_IFDIR) { if (debug) { /* * This can happen if the parent inode @@ -1013,7 +1013,7 @@ ino_visit(union dinode *ip, ino_t ino, ino_visitor vis int i; size = DIP(ip, di_size); - mode = DIP(ip, di_mode) & IFMT; + mode = DIP(ip, di_mode) & UFS_IFMT; fragcnt = 0; if ((flags & VISIT_EXT) && fs->fs_magic == FS_UFS2_MAGIC && ip->dp2.di_extsize) { @@ -1027,8 +1027,8 @@ ino_visit(union dinode *ip, ino_t ino, ino_visitor vis } } /* Skip datablocks for short links and devices. */ - if (mode == IFBLK || mode == IFCHR || - (mode == IFLNK && size < fs->fs_maxsymlinklen)) + if (mode == UFS_IFBLK || mode == UFS_IFCHR || + (mode == UFS_IFLNK && size < fs->fs_maxsymlinklen)) return (fragcnt); for (i = 0; i < UFS_NDADDR; i++) { if (DIP(ip, di_db[i]) == 0) @@ -1265,7 +1265,7 @@ ino_reclaim(union dinode *ip, ino_t ino, int mode) (uintmax_t)ino, DIP(ip, di_nlink), DIP(ip, di_mode)); /* We are freeing an inode or directory. */ - if ((DIP(ip, di_mode) & IFMT) == IFDIR) + if ((DIP(ip, di_mode) & UFS_IFMT) == UFS_IFDIR) ino_visit(ip, ino, ino_free_children, 0); DIP_SET(ip, di_nlink, 0); ino_visit(ip, ino, blk_free_visit, VISIT_EXT | VISIT_INDIR); @@ -1300,7 +1300,7 @@ ino_decr(ino_t ino) if (mode == 0) err_suj("Inode %d has a link of %d with 0 mode\n", ino, nlink); nlink--; - if ((mode & IFMT) == IFDIR) + if ((mode & UFS_IFMT) == UFS_IFDIR) reqlink = 2; else reqlink = 1; @@ -1335,13 +1335,13 @@ ino_adjust(struct suj_ino *sino) nlink = sino->si_nlink; ino = sino->si_ino; - mode = sino->si_mode & IFMT; + mode = sino->si_mode & UFS_IFMT; /* * If it's a directory with no dot links, it was truncated before * the name was cleared. We need to clear the dirent that * points at it. */ - if (mode == IFDIR && nlink == 1 && sino->si_dotlinks == 0) { + if (mode == UFS_IFDIR && nlink == 1 && sino->si_dotlinks == 0) { sino->si_nlink = nlink = 0; TAILQ_FOREACH(srec, &sino->si_recs, sr_next) { rrec = (struct jrefrec *)srec->sr_rec; @@ -1358,7 +1358,7 @@ ino_adjust(struct suj_ino *sino) * If it's a directory with no real names pointing to it go ahead * and truncate it. This will free any children. */ - if (mode == IFDIR && nlink - sino->si_dotlinks == 0) { + if (mode == UFS_IFDIR && nlink - sino->si_dotlinks == 0) { sino->si_nlink = nlink = 0; /* * Mark any .. links so they know not to free this inode @@ -1374,7 +1374,7 @@ ino_adjust(struct suj_ino *sino) } } ip = ino_read(ino); - mode = DIP(ip, di_mode) & IFMT; + mode = DIP(ip, di_mode) & UFS_IFMT; if (nlink > UFS_LINK_MAX) err_suj("ino %ju nlink manipulation error, new %ju, old %d\n", (uintmax_t)ino, (uintmax_t)nlink, DIP(ip, di_nlink)); @@ -1393,7 +1393,7 @@ ino_adjust(struct suj_ino *sino) if (mode != sino->si_mode && debug) printf("ino %ju, mode %o != %o\n", (uintmax_t)ino, mode, sino->si_mode); - if ((mode & IFMT) == IFDIR) + if ((mode & UFS_IFMT) == UFS_IFDIR) reqlink = 2; else reqlink = 1; @@ -1506,15 +1506,15 @@ ino_trunc(ino_t ino, off_t size) int mode; ip = ino_read(ino); - mode = DIP(ip, di_mode) & IFMT; + mode = DIP(ip, di_mode) & UFS_IFMT; cursize = DIP(ip, di_size); if (debug) printf("Truncating ino %ju, mode %o to size %jd from size %jd\n", (uintmax_t)ino, mode, size, cursize); /* Skip datablocks for short links and devices. */ - if (mode == 0 || mode == IFBLK || mode == IFCHR || - (mode == IFLNK && cursize < fs->fs_maxsymlinklen)) + if (mode == 0 || mode == UFS_IFBLK || mode == UFS_IFCHR || + (mode == UFS_IFLNK && cursize < fs->fs_maxsymlinklen)) return; /* Don't extend. */ if (size > cursize) @@ -1587,7 +1587,7 @@ ino_trunc(ino_t ino, off_t size) * uninitialized space later. */ off = blkoff(fs, size); - if (off && DIP(ip, di_mode) != IFDIR) { + if (off && DIP(ip, di_mode) != UFS_IFDIR) { uint8_t *buf; long clrsize; @@ -1635,7 +1635,7 @@ ino_check(struct suj_ino *sino) rrec = (struct jrefrec *)srec->sr_rec; isat = ino_isat(rrec->jr_parent, rrec->jr_diroff, rrec->jr_ino, &mode, &isdot); - if (isat && (mode & IFMT) != (rrec->jr_mode & IFMT)) + if (isat && (mode & UFS_IFMT) != (rrec->jr_mode & UFS_IFMT)) err_suj("Inode mode/directory type mismatch %o != %o\n", mode, rrec->jr_mode); if (debug) @@ -1646,7 +1646,7 @@ ino_check(struct suj_ino *sino) (uintmax_t)rrec->jr_parent, (uintmax_t)rrec->jr_diroff, rrec->jr_mode, isat, isdot); - mode = rrec->jr_mode & IFMT; + mode = rrec->jr_mode & UFS_IFMT; if (rrec->jr_op == JOP_REMREF) removes++; newlinks += isat; @@ -1915,7 +1915,7 @@ ino_unlinked(void) fs->fs_sujfree = 0; while (ino != 0) { ip = ino_read(ino); - mode = DIP(ip, di_mode) & IFMT; + mode = DIP(ip, di_mode) & UFS_IFMT; inon = DIP(ip, di_freelink); DIP_SET(ip, di_freelink, 0); /* @@ -2371,7 +2371,7 @@ suj_verifyino(union dinode *ip) return (-1); } - if (DIP(ip, di_mode) != (IFREG | IREAD)) { + if (DIP(ip, di_mode) != (UFS_IFREG | UFS_IREAD)) { printf("Invalid mode %o for journal inode %ju\n", DIP(ip, di_mode), (uintmax_t)sujino); return (-1); Modified: head/sbin/fsdb/fsdb.c ============================================================================== --- head/sbin/fsdb/fsdb.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/fsdb/fsdb.c Sat Mar 17 01:48:27 2018 (r331083) @@ -512,14 +512,14 @@ CMDFUNCSTART(findblk) /* Get on-disk inode aka dinode. */ curinum = inum; curinode = ginode(inum); - /* Find IFLNK dinode with allocated data blocks. */ - switch (DIP(curinode, di_mode) & IFMT) { - case IFDIR: - case IFREG: + /* Find UFS_IFLNK dinode with allocated data blocks. */ + switch (DIP(curinode, di_mode) & UFS_IFMT) { + case UFS_IFDIR: + case UFS_IFREG: if (DIP(curinode, di_blocks) == 0) continue; break; - case IFLNK: + case UFS_IFLNK: { uint64_t size = DIP(curinode, di_size); if (size > 0 && size < sblock.fs_maxsymlinklen && @@ -889,10 +889,10 @@ struct typemap { const char *typename; int typebits; } typenamemap[] = { - {"file", IFREG}, - {"dir", IFDIR}, - {"socket", IFSOCK}, - {"fifo", IFIFO}, + {"file", UFS_IFREG}, + {"dir", UFS_IFDIR}, + {"socket", UFS_IFSOCK}, + {"fifo", UFS_IFIFO}, }; CMDFUNCSTART(newtype) @@ -902,7 +902,7 @@ CMDFUNCSTART(newtype) if (!checkactive()) return 1; - type = DIP(curinode, di_mode) & IFMT; + type = DIP(curinode, di_mode) & UFS_IFMT; for (tp = typenamemap; tp < &typenamemap[nitems(typenamemap)]; tp++) { @@ -917,7 +917,7 @@ CMDFUNCSTART(newtype) warnx("try one of `file', `dir', `socket', `fifo'"); return 1; } - DIP_SET(curinode, di_mode, DIP(curinode, di_mode) & ~IFMT); + DIP_SET(curinode, di_mode, DIP(curinode, di_mode) & ~UFS_IFMT); DIP_SET(curinode, di_mode, DIP(curinode, di_mode) | type); inodirty(); printactive(0); Modified: head/sbin/fsdb/fsdbutil.c ============================================================================== --- head/sbin/fsdb/fsdbutil.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/fsdb/fsdbutil.c Sat Mar 17 01:48:27 2018 (r331083) @@ -120,20 +120,20 @@ printstat(const char *cp, ino_t inum, union dinode *dp time_t t; printf("%s: ", cp); - switch (DIP(dp, di_mode) & IFMT) { - case IFDIR: + switch (DIP(dp, di_mode) & UFS_IFMT) { + case UFS_IFDIR: puts("directory"); break; - case IFREG: + case UFS_IFREG: puts("regular file"); break; - case IFBLK: + case UFS_IFBLK: printf("block special (%#jx)", (uintmax_t)DIP(dp, di_rdev)); break; - case IFCHR: + case UFS_IFCHR: printf("character special (%#jx)", DIP(dp, di_rdev)); break; - case IFLNK: + case UFS_IFLNK: fputs("symlink",stdout); if (DIP(dp, di_size) > 0 && DIP(dp, di_size) < sblock.fs_maxsymlinklen && @@ -147,10 +147,10 @@ printstat(const char *cp, ino_t inum, union dinode *dp putchar('\n'); } break; - case IFSOCK: + case UFS_IFSOCK: puts("socket"); break; - case IFIFO: + case UFS_IFIFO: puts("fifo"); break; } @@ -338,7 +338,7 @@ checkactivedir(void) warnx("no current inode\n"); return 0; } - if ((DIP(curinode, di_mode) & IFMT) != IFDIR) { + if ((DIP(curinode, di_mode) & UFS_IFMT) != UFS_IFDIR) { warnx("inode %ju not a directory", (uintmax_t)curinum); return 0; } @@ -350,14 +350,14 @@ printactive(int doblocks) { if (!checkactive()) return 1; - switch (DIP(curinode, di_mode) & IFMT) { - case IFDIR: - case IFREG: - case IFBLK: - case IFCHR: - case IFLNK: - case IFSOCK: - case IFIFO: + switch (DIP(curinode, di_mode) & UFS_IFMT) { + case UFS_IFDIR: + case UFS_IFREG: + case UFS_IFBLK: + case UFS_IFCHR: + case UFS_IFLNK: + case UFS_IFSOCK: + case UFS_IFIFO: if (doblocks) printblocks(curinum, curinode); else @@ -368,7 +368,7 @@ printactive(int doblocks) break; default: printf("current inode %ju: screwy itype 0%o (mode 0%o)?\n", - (uintmax_t)curinum, DIP(curinode, di_mode) & IFMT, + (uintmax_t)curinum, DIP(curinode, di_mode) & UFS_IFMT, DIP(curinode, di_mode)); break; } Modified: head/sbin/newfs/mkfs.c ============================================================================== --- head/sbin/newfs/mkfs.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/newfs/mkfs.c Sat Mar 17 01:48:27 2018 (r331083) @@ -883,7 +883,7 @@ fsinit(time_t utime) /* * create the root directory */ - node.dp1.di_mode = IFDIR | UMASK; + node.dp1.di_mode = UFS_IFDIR | UMASK; node.dp1.di_nlink = entries; node.dp1.di_size = makedir(root_dir, entries); node.dp1.di_db[0] = alloc(sblock.fs_fsize, node.dp1.di_mode); @@ -919,7 +919,7 @@ fsinit(time_t utime) /* * create the root directory */ - node.dp2.di_mode = IFDIR | UMASK; + node.dp2.di_mode = UFS_IFDIR | UMASK; node.dp2.di_nlink = entries; node.dp2.di_size = makedir(root_dir, entries); node.dp2.di_db[0] = alloc(sblock.fs_fsize, node.dp2.di_mode); @@ -1002,7 +1002,7 @@ goth: acg.cg_cs.cs_nbfree--; sblock.fs_cstotal.cs_nbfree--; fscs[0].cs_nbfree--; - if (mode & IFDIR) { + if (mode & UFS_IFDIR) { acg.cg_cs.cs_ndir++; sblock.fs_cstotal.cs_ndir++; fscs[0].cs_ndir++; Modified: head/sbin/quotacheck/quotacheck.c ============================================================================== --- head/sbin/quotacheck/quotacheck.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/quotacheck/quotacheck.c Sat Mar 17 01:48:27 2018 (r331083) @@ -370,7 +370,7 @@ chkquota(char *specname, struct quotafile *qfu, struct for (i = 0; i < inosused; i++, ino++) { if ((dp = getnextinode(ino)) == NULL || ino < UFS_ROOTINO || - (mode = DIP(dp, di_mode) & IFMT) == 0) + (mode = DIP(dp, di_mode) & UFS_IFMT) == 0) continue; /* * XXX: Do not account for UIDs or GIDs that appear @@ -405,16 +405,16 @@ chkquota(char *specname, struct quotafile *qfu, struct fup = addid((u_long)DIP(dp, di_gid), GRPQUOTA, (char *)0, mntpt); fup->fu_curinodes++; - if (mode == IFREG || mode == IFDIR || - mode == IFLNK) + if (mode == UFS_IFREG || mode == UFS_IFDIR || + mode == UFS_IFLNK) fup->fu_curblocks += DIP(dp, di_blocks); } if (qfu) { fup = addid((u_long)DIP(dp, di_uid), USRQUOTA, (char *)0, mntpt); fup->fu_curinodes++; - if (mode == IFREG || mode == IFDIR || - mode == IFLNK) + if (mode == UFS_IFREG || mode == UFS_IFDIR || + mode == UFS_IFLNK) fup->fu_curblocks += DIP(dp, di_blocks); } } Modified: head/sbin/restore/dirs.c ============================================================================== --- head/sbin/restore/dirs.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/restore/dirs.c Sat Mar 17 01:48:27 2018 (r331083) @@ -178,7 +178,7 @@ extractdirs(int genmode) for (;;) { curfile.name = ""; curfile.action = USING; - if (curfile.mode == 0 || (curfile.mode & IFMT) != IFDIR) + if (curfile.mode == 0 || (curfile.mode & UFS_IFMT) != UFS_IFDIR) break; itp = allocinotab(&curfile, seekpt); getfile(putdir, putdirattrs, xtrnull); @@ -205,7 +205,7 @@ void skipdirs(void) { - while (curfile.ino && (curfile.mode & IFMT) == IFDIR) { + while (curfile.ino && (curfile.mode & UFS_IFMT) == UFS_IFDIR) { skipfile(); } } Modified: head/sbin/restore/interactive.c ============================================================================== --- head/sbin/restore/interactive.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/restore/interactive.c Sat Mar 17 01:48:27 2018 (r331083) @@ -741,9 +741,9 @@ glob_stat(const char *name, struct stat *stp) (!vflag && dp->d_ino == UFS_WINO)) return (-1); if (inodetype(dp->d_ino) == NODE) - stp->st_mode = IFDIR; + stp->st_mode = UFS_IFDIR; else - stp->st_mode = IFREG; + stp->st_mode = UFS_IFREG; return (0); } Modified: head/sbin/restore/tape.c ============================================================================== --- head/sbin/restore/tape.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/restore/tape.c Sat Mar 17 01:48:27 2018 (r331083) @@ -592,19 +592,19 @@ extractfile(char *name) gid = curfile.gid; mode = curfile.mode; flags = curfile.file_flags; - switch (mode & IFMT) { + switch (mode & UFS_IFMT) { default: fprintf(stderr, "%s: unknown file mode 0%o\n", name, mode); skipfile(); return (FAIL); - case IFSOCK: + case UFS_IFSOCK: vprintf(stdout, "skipped socket %s\n", name); skipfile(); return (GOOD); - case IFDIR: + case UFS_IFDIR: if (mflag) { ep = lookupname(name); if (ep == NULL || ep->e_flags & EXTRACT) @@ -615,7 +615,7 @@ extractfile(char *name) vprintf(stdout, "extract file %s\n", name); return (genliteraldir(name, curfile.ino)); - case IFLNK: + case UFS_IFLNK: lnkbuf[0] = '\0'; pathlen = 0; buf = setupextattr(extsize); @@ -639,7 +639,7 @@ extractfile(char *name) } return (FAIL); - case IFIFO: + case UFS_IFIFO: vprintf(stdout, "extract fifo %s\n", name); if (Nflag) { skipfile(); @@ -667,8 +667,8 @@ extractfile(char *name) (void) chflags(name, flags); return (GOOD); - case IFCHR: - case IFBLK: + case UFS_IFCHR: + case UFS_IFBLK: vprintf(stdout, "extract special file %s\n", name); if (Nflag) { skipfile(); @@ -676,7 +676,7 @@ extractfile(char *name) } if (uflag) (void) unlink(name); - if (mknod(name, (mode & (IFCHR | IFBLK)) | 0600, + if (mknod(name, (mode & (UFS_IFCHR | UFS_IFBLK)) | 0600, (int)curfile.rdev) < 0) { fprintf(stderr, "%s: cannot create special file: %s\n", name, strerror(errno)); @@ -697,7 +697,7 @@ extractfile(char *name) (void) chflags(name, flags); return (GOOD); - case IFREG: + case UFS_IFREG: vprintf(stdout, "extract file %s\n", name); if (Nflag) { skipfile(); Modified: head/sbin/tunefs/tunefs.c ============================================================================== --- head/sbin/tunefs/tunefs.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sbin/tunefs/tunefs.c Sat Mar 17 01:48:27 2018 (r331083) @@ -1021,7 +1021,7 @@ journal_alloc(int64_t size) if (sblock.fs_magic == FS_UFS1_MAGIC) { bzero(dp1, sizeof(*dp1)); dp1->di_size = size; - dp1->di_mode = IFREG | IREAD; + dp1->di_mode = UFS_IFREG | UFS_IREAD; dp1->di_nlink = 1; dp1->di_flags = SF_IMMUTABLE | SF_NOUNLINK | UF_NODUMP; dp1->di_atime = utime; @@ -1030,7 +1030,7 @@ journal_alloc(int64_t size) } else { bzero(dp2, sizeof(*dp2)); dp2->di_size = size; - dp2->di_mode = IFREG | IREAD; + dp2->di_mode = UFS_IFREG | UFS_IREAD; dp2->di_nlink = 1; dp2->di_flags = SF_IMMUTABLE | SF_NOUNLINK | UF_NODUMP; dp2->di_atime = utime; Modified: head/stand/libsa/nandfs.c ============================================================================== --- head/stand/libsa/nandfs.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/stand/libsa/nandfs.c Sat Mar 17 01:48:27 2018 (r331083) @@ -654,7 +654,7 @@ nandfs_lookup_path(struct nandfs *fs, const char *path while ((strp = strsep(&lpath, "/")) != NULL) { if (*strp == '\0') continue; - if ((node->inode->i_mode & IFMT) != IFDIR) { + if ((node->inode->i_mode & NANDFS_IFMT) != NANDFS_IFDIR) { nandfs_free_node(node); node = NULL; goto out; @@ -710,7 +710,7 @@ nandfs_lookup_path(struct nandfs *fs, const char *path NANDFS_DEBUG("%s: %.*s has mode %o\n", __func__, dirent->name_len, dirent->name, node->inode->i_mode); - if ((node->inode->i_mode & IFMT) == IFLNK) { + if ((node->inode->i_mode & NANDFS_IFMT) == NANDFS_IFLNK) { NANDFS_DEBUG("%s: %.*s is symlink\n", __func__, dirent->name_len, dirent->name); link_len = node->inode->i_size; Modified: head/stand/libsa/ufs.c ============================================================================== --- head/stand/libsa/ufs.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/stand/libsa/ufs.c Sat Mar 17 01:48:27 2018 (r331083) @@ -557,7 +557,7 @@ ufs_open(upath, f) /* * Check that current node is a directory. */ - if ((DIP(fp, di_mode) & IFMT) != IFDIR) { + if ((DIP(fp, di_mode) & UFS_IFMT) != UFS_IFDIR) { rc = ENOTDIR; goto out; } @@ -599,7 +599,7 @@ ufs_open(upath, f) /* * Check for symbolic link. */ - if ((DIP(fp, di_mode) & IFMT) == IFLNK) { + if ((DIP(fp, di_mode) & UFS_IFMT) == UFS_IFLNK) { int link_len = DIP(fp, di_size); int len; Modified: head/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- head/sys/fs/ext2fs/ext2_alloc.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sys/fs/ext2fs/ext2_alloc.c Sat Mar 17 01:48:27 2018 (r331083) @@ -393,7 +393,7 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred * ext2_dirpref else obtain it using ino_to_cg. The preferred inode is * always the next inode. */ - if ((mode & IFMT) == IFDIR) { + if ((mode & EXT2_IFMT) == EXT2_IFDIR) { cg = ext2_dirpref(pip); if (fs->e2fs_contigdirs[cg] < 255) fs->e2fs_contigdirs[cg]++; @@ -1290,7 +1290,7 @@ gotit: e2fs_gd_get_i_unused(&fs->e2fs_gd[cg]) - 1); fs->e2fs->e2fs_ficount--; fs->e2fs_fmod = 1; - if ((mode & IFMT) == IFDIR) { + if ((mode & EXT2_IFMT) == EXT2_IFDIR) { e2fs_gd_set_ndirs(&fs->e2fs_gd[cg], e2fs_gd_get_ndirs(&fs->e2fs_gd[cg]) + 1); fs->e2fs_total_dir++; @@ -1395,7 +1395,7 @@ ext2_vfree(struct vnode *pvp, ino_t ino, int mode) EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_METADATA_CKSUM)) e2fs_gd_set_i_unused(&fs->e2fs_gd[cg], e2fs_gd_get_i_unused(&fs->e2fs_gd[cg]) + 1); - if ((mode & IFMT) == IFDIR) { + if ((mode & EXT2_IFMT) == EXT2_IFDIR) { e2fs_gd_set_ndirs(&fs->e2fs_gd[cg], e2fs_gd_get_ndirs(&fs->e2fs_gd[cg]) - 1); fs->e2fs_total_dir--; Modified: head/sys/fs/ext2fs/ext2_dinode.h ============================================================================== --- head/sys/fs/ext2fs/ext2_dinode.h Sat Mar 17 01:40:09 2018 (r331082) +++ head/sys/fs/ext2fs/ext2_dinode.h Sat Mar 17 01:48:27 2018 (r331083) @@ -105,7 +105,7 @@ * Structure of an inode on the disk */ struct ext2fs_dinode { - uint16_t e2di_mode; /* 0: IFMT, permissions; see below. */ + uint16_t e2di_mode; /* 0: EXT2_IFMT, permissions; below.*/ uint16_t e2di_uid; /* 2: Owner UID */ uint32_t e2di_size; /* 4: Size (in bytes) */ uint32_t e2di_atime; /* 8: Access time */ Modified: head/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- head/sys/fs/ext2fs/ext2_lookup.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sys/fs/ext2fs/ext2_lookup.c Sat Mar 17 01:48:27 2018 (r331083) @@ -591,7 +591,7 @@ found: * may not delete it (unless she's root). This * implements append-only directories. */ - if ((dp->i_mode & ISVTX) && + if ((dp->i_mode & EXT2_ISVTX) && cred->cr_uid != 0 && cred->cr_uid != dp->i_uid && VTOI(tdp)->i_uid != cred->cr_uid) { Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Sat Mar 17 01:40:09 2018 (r331082) +++ head/sys/fs/ext2fs/ext2_vnops.c Sat Mar 17 01:48:27 2018 (r331083) @@ -352,7 +352,7 @@ ext2_getattr(struct vop_getattr_args *ap) */ vap->va_fsid = dev2udev(ip->i_devvp->v_rdev); vap->va_fileid = ip->i_number; - vap->va_mode = ip->i_mode & ~IFMT; + vap->va_mode = ip->i_mode & ~EXT2_IFMT; vap->va_nlink = ip->i_nlink; vap->va_uid = ip->i_uid; vap->va_gid = ip->i_gid; @@ -534,7 +534,7 @@ ext2_chmod(struct vnode *vp, int mode, struct ucred *c if (error) return (EFTYPE); } - if (!groupmember(ip->i_gid, cred) && (mode & ISGID)) { + if (!groupmember(ip->i_gid, cred) && (mode & EXT2_ISGID)) { error = priv_check_cred(cred, PRIV_VFS_SETGID, 0); if (error) return (error); @@ -584,9 +584,10 @@ ext2_chown(struct vnode *vp, uid_t uid, gid_t gid, str ip->i_gid = gid; ip->i_uid = uid; ip->i_flag |= IN_CHANGE; - if ((ip->i_mode & (ISUID | ISGID)) && (ouid != uid || ogid != gid)) { + if ((ip->i_mode & (EXT2_ISUID | EXT2_ISGID)) && + (ouid != uid || ogid != gid)) { if (priv_check_cred(cred, PRIV_VFS_RETAINSUGID, 0) != 0) - ip->i_mode &= ~(ISUID | ISGID); + ip->i_mode &= ~(EXT2_ISUID | EXT2_ISGID); } return (0); } @@ -843,7 +844,7 @@ abortit: error = EPERM; goto abortit; } - if ((ip->i_mode & IFMT) == IFDIR) { + if ((ip->i_mode & EXT2_IFMT) == EXT2_IFDIR) { /* * Avoid ".", "..", and aliases of "." for obvious reasons. */ @@ -974,7 +975,7 @@ abortit: * to it. Also, ensure source and target are compatible * (both directories, or both not directories). */ - if ((xp->i_mode & IFMT) == IFDIR) { + if ((xp->i_mode & EXT2_IFMT) == EXT2_IFDIR) { if (!ext2_dirempty(xp, dp->i_number, tcnp->cn_cred)) { error = ENOTEMPTY; goto bad; @@ -1318,7 +1319,7 @@ ext2_mkdir(struct vop_mkdir_args *ap) goto out; } dmode = vap->va_mode & 0777; - dmode |= IFDIR; + dmode |= EXT2_IFDIR; /* * Must simulate part of ext2_makeinode here to acquire the inode, * but not have it entered in the parent directory. The entry is @@ -1341,8 +1342,8 @@ ext2_mkdir(struct vop_mkdir_args *ap) * 'give it away' so that the SUID is still forced on. */ if ((dvp->v_mount->mnt_flag & MNT_SUIDDIR) && - (dp->i_mode & ISUID) && dp->i_uid) { - dmode |= ISUID; + (dp->i_mode & EXT2_ISUID) && dp->i_uid) { + dmode |= EXT2_ISUID; ip->i_uid = dp->i_uid; } else { ip->i_uid = cnp->cn_cred->cr_uid; @@ -1521,7 +1522,7 @@ ext2_symlink(struct vop_symlink_args *ap) struct inode *ip; int len, error; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Mar 17 01:57:14 2018 Return-Path: Delivered-To: svn-src-all@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 1F0E5F600AD; Sat, 17 Mar 2018 01:57:14 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (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 B7C7E7FA1C; Sat, 17 Mar 2018 01:57:13 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.254.254.65] (senat1-01.HML3.ScaleEngine.net [209.51.186.5]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 85656147C0; Sat, 17 Mar 2018 01:57:07 +0000 (UTC) Subject: Re: svn commit: r331064 - head/sbin/ifconfig To: Kirill Ponomarev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803161656.w2GGuvOv016658@repo.freebsd.org> <90FB9B8F-DF2E-49E5-BD86-197CE3B312A4@sigsegv.be> From: Allan Jude Message-ID: <645c3f81-6b43-2426-bfc9-ade4bfdb382a@freebsd.org> Date: Fri, 16 Mar 2018 21:56:59 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <90FB9B8F-DF2E-49E5-BD86-197CE3B312A4@sigsegv.be> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 01:57:14 -0000 On 2018-03-16 19:54, Kristof Provost wrote: > On 16 Mar 2018, at 17:56, Kirill Ponomarev wrote: >> Author: krion (ports committer) >> Date: Fri Mar 16 16:56:56 2018 >> New Revision: 331064 >> URL: https://svnweb.freebsd.org/changeset/base/331064 >> >> Log: >>   Extend SSID maximum string length to 32 chars to support longer SSID >>   names. >> >>   Approved by:    adrian >>   Differential Revision:    https://reviews.freebsd.org/D14710 >> >> Modified: >>   head/sbin/ifconfig/ifieee80211.c >> >> Modified: head/sbin/ifconfig/ifieee80211.c >> ============================================================================== >> >> --- head/sbin/ifconfig/ifieee80211.c    Fri Mar 16 16:06:25 2018    >> (r331063) >> +++ head/sbin/ifconfig/ifieee80211.c    Fri Mar 16 16:56:56 2018    >> (r331064) >> @@ -3503,7 +3503,7 @@ list_scan(int s) >> >>      getchaninfo(s); >> >> -    ssidmax = verbose ? IEEE80211_NWID_LEN : 14; >> +    ssidmax = verbose ? IEEE80211_NWID_LEN : 32; > > IEEE80211_NWID_LEN is 32, so this says ‘verbose ? 32 : 32’ now. > >>      printf("%-*.*s  %-17.17s  %4s %4s   %-7s  %3s %4s\n" >>          , ssidmax, ssidmax, "SSID/MESH ID" >>          , "BSSID" > > Regards, > Kristof > It seems like what you were looking for was just 'ifconfig -v scan' I think the reason it is limited to 14, is so that it will fit in 80 col wide terminals in non-verbose mode. -- Allan Jude From owner-svn-src-all@freebsd.org Sat Mar 17 03:00:25 2018 Return-Path: Delivered-To: svn-src-all@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 0F583F63013; Sat, 17 Mar 2018 03:00:25 +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 B0BF181BDB; Sat, 17 Mar 2018 03:00:24 +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 A9DF44A54; Sat, 17 Mar 2018 03:00:24 +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 w2H30ODX017784; Sat, 17 Mar 2018 03:00:24 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2H30OLP017783; Sat, 17 Mar 2018 03:00:24 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803170300.w2H30OLP017783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 17 Mar 2018 03:00:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331084 - stable/11/bin/dd X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/bin/dd X-SVN-Commit-Revision: 331084 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 03:00:25 -0000 Author: eadler Date: Sat Mar 17 03:00:24 2018 New Revision: 331084 URL: https://svnweb.freebsd.org/changeset/base/331084 Log: MFC r328427: dd(1): Use a local swapbytes() function. swab(3) has restrict qualifiers for src and dst. Avoid relying on undefined overlapping swab behavior. Obtained From: OpenBSD Modified: stable/11/bin/dd/dd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/dd/dd.c ============================================================================== --- stable/11/bin/dd/dd.c Sat Mar 17 01:48:27 2018 (r331083) +++ stable/11/bin/dd/dd.c Sat Mar 17 03:00:24 2018 (r331084) @@ -303,6 +303,21 @@ speed_limit(void) } static void +swapbytes(void *v, size_t len) +{ + unsigned char *p = v; + unsigned char t; + + while (len > 1) { + t = p[0]; + p[0] = p[1]; + p[1] = t; + p += 2; + len -= 2; + } +} + +static void dd_in(void) { ssize_t n; @@ -402,7 +417,7 @@ dd_in(void) ++st.swab; --n; } - swab(in.dbp, in.dbp, (size_t)n); + swapbytes(in.dbp, (size_t)n); } in.dbp += in.dbrcnt; From owner-svn-src-all@freebsd.org Sat Mar 17 03:07:28 2018 Return-Path: Delivered-To: svn-src-all@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 EAACFF636B9; Sat, 17 Mar 2018 03:07:27 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pl0-x22a.google.com (mail-pl0-x22a.google.com [IPv6:2607:f8b0:400e:c01::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5AA078246E; Sat, 17 Mar 2018 03:07:27 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pl0-x22a.google.com with SMTP id 61-v6so6978063plf.3; Fri, 16 Mar 2018 20:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9euALLbL3igT39wyNzrDr5QSDaKfCqbtZQE2P5EmXEc=; b=ULiyx9Pq0ofmLJRKuXBYx54KC8cAQRVjEXTPSTPIgjl6MA2CaXQv8mjAbNKXepqW7u EaGfCogzX/6d+k8Lonq43BUn5WUsOdtOhtDiwLryxUKlHLWAtmcI7bwYrHk0XLQtU0T6 VLjiABH/dTfUY6caVVwdEotVTxmEhEFS8YaWtNgTSxo0nfkVq5SvUKW3YrdwS3e8ksrJ qiqs1GLUjzufquXgwzXxiHK5+u6OX7ok+djROBN3SVUgWCW5j18fm5jnfU67kEv86GHc paQZCVEFZNUXddDUTVrPDaL6bR60UBmmb3Q4SWdjllrLw7Z8m3qDqDz1Ab0Ldi65opfp Z0uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=9euALLbL3igT39wyNzrDr5QSDaKfCqbtZQE2P5EmXEc=; b=BgbYax82WheicFztBcD5Zpq80Gs5CxOuJrPCva2WgdyyVoUDj/c+HZB8Rl/W4DoHot 584SPxdjc7k98d+D1RGQUCbOAwcrHTJtz1k2gY1MvU4yHIook28ZFSv5Fl1+veKE08rt Hn56IkzE5jieNfFNlUo8uVjW8Str4JagC6kqdpCebhUD7vymSmpanu6P29u/pL6MVNqs 1+ZeYnGQ5ch5hp86vhA5fxLyoejrQeePQsQ+a69WNlG0SZ9MHVbAIUBpvCOqd8H2s94l BJtA4Yqqg+LuKYH8r+vmEmuOT+ud2linqv4r8Goru55s9D+VyCXjwjd8lasLaLosz+Ll iqGA== X-Gm-Message-State: AElRT7EkjXwPMl3UeedSfuNlcF5Irb2e6H5+B67piwXIJWkfgr/+l9A+ urH7vrYME0spz+ZSdgxn1zAJzRiV X-Google-Smtp-Source: AG47ELvMbKpz4jFFxpu7NG8R9ek6y7LTUwdtYAOKaUhpCxQn5F7G4uAxtgGmi+WUyAJN3W5s5UpPVQ== X-Received: by 2002:a17:902:bcc6:: with SMTP id o6-v6mr4290866pls.16.1521256046170; Fri, 16 Mar 2018 20:07:26 -0700 (PDT) Received: from [192.168.1.105] (152.94.214.218.sta.wbroadband.net.au. [218.214.94.152]) by smtp.gmail.com with ESMTPSA id t28sm18772098pfk.138.2018.03.16.20.07.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 20:07:25 -0700 (PDT) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: svn commit: r330952 - head/sys/kern To: Alan Somers Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Ravi Pokala , src-committers References: <201803142211.w2EMBjVd010880@repo.freebsd.org> <7219A600-5C72-43D6-9E8B-7BBC1D097AF2@mac.com> From: Kubilay Kocak Message-ID: Date: Sat, 17 Mar 2018 14:07:21 +1100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-AU Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 03:07:28 -0000 On 15/03/2018 9:56 am, Alan Somers wrote: > Well, you _would_ be able to, except the public instance has been down for > 3 weeks :( > https://scan.coverity.com/ Coverity Scan is back up as of this (17/03) morning (UTC+11). Anyone with an account should have received the email notification below with instructions to reset their passwords: -------- As you may be aware, there recently was an interruption in the availability of the Coverity Scan service. In February 2018, we discovered that servers used for the Coverity Scan service were accessed by an unauthorized third-party. The access appears to have started earlier in the month. We suspect that the access was to utilize our computing power for cryptocurrency mining. We have not found evidence that database files or artifacts uploaded by the open source community users of the Coverity Scan service were accessed. We retained a well-known computer forensics company to assist us in our investigation. We have closed the method of access, and the Coverity Scan service is again available as a free service to the open source community. The Coverity Scan service data is backed up frequently, and Coverity Scan service data will be restored. We regret any inconvenience caused by the downtime of the Coverity Scan service. We take our commitment to the Open Source community seriously. To that end, we are asking that all Coverity Scan users reset their passwords to regain access to the service. We are continually assessing and improving our systems and practices in this environment, and will work with the Coverity Scan Service community in this effort. Please note that the servers in question were not connected to any other Synopsys computer networks. This should have no impact on customers of our commercial products, and this event did not put any Synopsys corporate data or intellectual property at risk. Note: If you previously signed in to Coverity SCAN using Github, you need not establish a password at this time, but will need to re-authorize with Github the next time you sign in. > On Wed, Mar 14, 2018 at 4:46 PM, Conrad Meyer wrote: > >> I believe they didn't come from the public FreeBSD Coverity instance, >> and I don't think ID numbers are portable between instances. You >> might be able to look up similar issues in the public instance, >> though. >> >> Best, >> Conrad >> >> On Wed, Mar 14, 2018 at 3:20 PM, Ravi Pokala wrote: >>> -----Original Message----- >>> From: on behalf of Conrad Meyer >> >>> Date: 2018-03-14, Wednesday at 15:11 >>> To: , , < >> svn-src-head@freebsd.org> >>> Subject: svn commit: r330952 - head/sys/kern >>> >>>> Author: cem >>>> Date: Wed Mar 14 22:11:45 2018 >>>> New Revision: 330952 >>>> URL: https://svnweb.freebsd.org/changeset/base/330952 >>>> >>>> Log: >>>> vfs_bio.c: Apply cleanups motivated by Coverity analysis >>> >>> What's the Coverity ID? >>> >>> Thanks, >>> >>> Ravi (rpokala@) >>> >>> >>> >> >> > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Sat Mar 17 05:04:39 2018 Return-Path: Delivered-To: svn-src-all@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 7BABCF32875; Sat, 17 Mar 2018 05:04:39 +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 1FBA586E5F; Sat, 17 Mar 2018 05:04:39 +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 14F96602B; Sat, 17 Mar 2018 05:04:39 +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 w2H54cK5084124; Sat, 17 Mar 2018 05:04:38 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2H54cOJ084123; Sat, 17 Mar 2018 05:04:38 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803170504.w2H54cOJ084123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 17 Mar 2018 05:04:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331086 - stable/11/sbin/devd X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sbin/devd X-SVN-Commit-Revision: 331086 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 05:04:39 -0000 Author: eadler Date: Sat Mar 17 05:04:38 2018 New Revision: 331086 URL: https://svnweb.freebsd.org/changeset/base/331086 Log: MFC r328430,r328431: devd: minor nits - mark usage as noreturn Modified: stable/11/sbin/devd/devd.cc Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/devd/devd.cc ============================================================================== --- stable/11/sbin/devd/devd.cc Sat Mar 17 05:00:07 2018 (r331085) +++ stable/11/sbin/devd/devd.cc Sat Mar 17 05:04:38 2018 (r331086) @@ -161,7 +161,7 @@ static const char *configfile = CF; static void devdlog(int priority, const char* message, ...) __printflike(2, 3); static void event_loop(void); -static void usage(void); +static void usage(void) __dead2; template void delete_and_clear(vector &v) From owner-svn-src-all@freebsd.org Sat Mar 17 05:00:08 2018 Return-Path: Delivered-To: svn-src-all@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 532CCF325E8; Sat, 17 Mar 2018 05:00:08 +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 05D5686B0C; Sat, 17 Mar 2018 05:00:08 +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 00BAA5EB2; Sat, 17 Mar 2018 05:00:08 +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 w2H507lG079170; Sat, 17 Mar 2018 05:00:07 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2H507qv079168; Sat, 17 Mar 2018 05:00:07 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803170500.w2H507qv079168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 17 Mar 2018 05:00:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331085 - stable/11/share/examples/kld/cdev/module X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/share/examples/kld/cdev/module X-SVN-Commit-Revision: 331085 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 05:00:08 -0000 Author: eadler Date: Sat Mar 17 05:00:07 2018 New Revision: 331085 URL: https://svnweb.freebsd.org/changeset/base/331085 Log: MFC r328428: example cdev: use make_dev_s Make use of make_dev_s in the example cdev. While here, fix warnings. Modified: stable/11/share/examples/kld/cdev/module/cdev.c stable/11/share/examples/kld/cdev/module/cdevmod.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/examples/kld/cdev/module/cdev.c ============================================================================== --- stable/11/share/examples/kld/cdev/module/cdev.c Sat Mar 17 03:00:24 2018 (r331084) +++ stable/11/share/examples/kld/cdev/module/cdev.c Sat Mar 17 05:00:07 2018 (r331085) @@ -102,7 +102,7 @@ mydev_open(struct cdev *dev, int flag, int otyp, struc { struct proc *procp = td->td_proc; - printf("mydev_open: dev_t=%d, flag=%x, otyp=%x, procp=%p\n", + printf("mydev_open: dev_t=%lu, flag=%x, otyp=%x, procp=%p\n", dev2udev(dev), flag, otyp, procp); memset(&buf, '\0', 513); len = 0; @@ -114,7 +114,7 @@ mydev_close(struct cdev *dev, int flag, int otyp, stru { struct proc *procp = td->td_proc; - printf("mydev_close: dev_t=%d, flag=%x, otyp=%x, procp=%p\n", + printf("mydev_close: dev_t=%lu, flag=%x, otyp=%x, procp=%p\n", dev2udev(dev), flag, otyp, procp); return (0); } @@ -126,7 +126,7 @@ mydev_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int error = 0; struct proc *procp = td->td_proc; - printf("mydev_ioctl: dev_t=%d, cmd=%lx, arg=%p, mode=%x procp=%p\n", + printf("mydev_ioctl: dev_t=%lu, cmd=%lx, arg=%p, mode=%x procp=%p\n", dev2udev(dev), cmd, arg, mode, procp); switch(cmd) { @@ -150,7 +150,7 @@ mydev_write(struct cdev *dev, struct uio *uio, int iof { int err = 0; - printf("mydev_write: dev_t=%d, uio=%p, ioflag=%d\n", + printf("mydev_write: dev_t=%lu, uio=%p, ioflag=%d\n", dev2udev(dev), uio, ioflag); err = copyinstr(uio->uio_iov->iov_base, &buf, 512, &len); @@ -170,7 +170,7 @@ mydev_read(struct cdev *dev, struct uio *uio, int iofl { int err = 0; - printf("mydev_read: dev_t=%d, uio=%p, ioflag=%d\n", + printf("mydev_read: dev_t=%lu, uio=%p, ioflag=%d\n", dev2udev(dev), uio, ioflag); if (len <= 0) { Modified: stable/11/share/examples/kld/cdev/module/cdevmod.c ============================================================================== --- stable/11/share/examples/kld/cdev/module/cdevmod.c Sat Mar 17 03:00:24 2018 (r331084) +++ stable/11/share/examples/kld/cdev/module/cdevmod.c Sat Mar 17 05:00:07 2018 (r331085) @@ -107,6 +107,7 @@ static int cdev_load(module_t mod, int cmd, void *arg) { int err = 0; + struct make_dev_args mda; switch (cmd) { case MOD_LOAD: @@ -118,8 +119,14 @@ cdev_load(module_t mod, int cmd, void *arg) printf("Copyright (c) 1998\n"); printf("Rajesh Vaidheeswarran\n"); printf("All rights reserved\n"); - sdev = make_dev(&my_devsw, 0, UID_ROOT, GID_WHEEL, 0600, "cdev"); - break; /* Success*/ + + make_dev_args_init(&mda); + mda.mda_devsw = &my_devsw; + mda.mda_uid = UID_ROOT; + mda.mda_gid = GID_WHEEL; + mda.mda_mode = 0600; + err = make_dev_s(&mda, &sdev, "cdev"); + break; case MOD_UNLOAD: printf("Unloaded kld character device driver\n"); From owner-svn-src-all@freebsd.org Sat Mar 17 06:05:34 2018 Return-Path: Delivered-To: svn-src-all@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 17A1AF46B5E; Sat, 17 Mar 2018 06: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 B1EA968E26; Sat, 17 Mar 2018 06:05:33 +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 A98C66996; Sat, 17 Mar 2018 06:05:33 +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 w2H65XSN014019; Sat, 17 Mar 2018 06:05:33 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2H65X2X014018; Sat, 17 Mar 2018 06:05:33 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803170605.w2H65X2X014018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 17 Mar 2018 06:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331089 - stable/11/share/man/man3 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/share/man/man3 X-SVN-Commit-Revision: 331089 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 06:05:34 -0000 Author: eadler Date: Sat Mar 17 06:05:33 2018 New Revision: 331089 URL: https://svnweb.freebsd.org/changeset/base/331089 Log: MFC r328831: pthread: adding missing header to man page Modified: stable/11/share/man/man3/pthread_join.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man3/pthread_join.3 ============================================================================== --- stable/11/share/man/man3/pthread_join.3 Sat Mar 17 05:43:26 2018 (r331088) +++ stable/11/share/man/man3/pthread_join.3 Sat Mar 17 06:05:33 2018 (r331089) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 23, 2010 +.Dd February 3, 2018 .Dt PTHREAD_JOIN 3 .Os .Sh NAME @@ -43,6 +43,7 @@ .In pthread.h .Ft int .Fn pthread_join "pthread_t thread" "void **value_ptr" +.In pthread_np.h .Ft int .Fn pthread_timedjoin_np "pthread_t thread" "void **value_ptr" "const struct timespec *abstime" .Sh DESCRIPTION From owner-svn-src-all@freebsd.org Sat Mar 17 05:36:52 2018 Return-Path: Delivered-To: svn-src-all@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 8E863F41E45; Sat, 17 Mar 2018 05:36:52 +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 2FBD887D55; Sat, 17 Mar 2018 05:36:52 +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 24E2164FD; Sat, 17 Mar 2018 05:36:52 +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 w2H5aql3099181; Sat, 17 Mar 2018 05:36:52 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2H5aqSX099180; Sat, 17 Mar 2018 05:36:52 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803170536.w2H5aqSX099180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 17 Mar 2018 05:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331087 - stable/11/lib/libc/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/lib/libc/sys X-SVN-Commit-Revision: 331087 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 05:36:52 -0000 Author: eadler Date: Sat Mar 17 05:36:51 2018 New Revision: 331087 URL: https://svnweb.freebsd.org/changeset/base/331087 Log: MFC r328959: fsync.2: Cross-reference fsync(1) Modified: stable/11/lib/libc/sys/fsync.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/fsync.2 ============================================================================== --- stable/11/lib/libc/sys/fsync.2 Sat Mar 17 05:04:38 2018 (r331086) +++ stable/11/lib/libc/sys/fsync.2 Sat Mar 17 05:36:51 2018 (r331087) @@ -34,7 +34,7 @@ .\" @(#)fsync.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 24, 2017 +.Dd February 6, 2018 .Dt FSYNC 2 .Os .Sh NAME @@ -108,6 +108,7 @@ refers to a socket, not to a file. An I/O error occurred while reading from or writing to the file system. .El .Sh SEE ALSO +.Xr fsync 1 , .Xr sync 2 , .Xr syncer 4 , .Xr sync 8 From owner-svn-src-all@freebsd.org Sat Mar 17 05:43:26 2018 Return-Path: Delivered-To: svn-src-all@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 D2A7BF434BF; Sat, 17 Mar 2018 05:43:26 +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 7884268227; Sat, 17 Mar 2018 05:43:26 +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 71371667B; Sat, 17 Mar 2018 05:43:26 +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 w2H5hQQC004339; Sat, 17 Mar 2018 05:43:26 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2H5hQAa004338; Sat, 17 Mar 2018 05:43:26 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803170543.w2H5hQAa004338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 17 Mar 2018 05:43:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331088 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 331088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 05:43:27 -0000 Author: eadler Date: Sat Mar 17 05:43:26 2018 New Revision: 331088 URL: https://svnweb.freebsd.org/changeset/base/331088 Log: MFC r328839: Add the ThinkPad X1 (sandybridge) to the bsdinstall blacklist Reviewed by: AllanJude (for mfc) Modified: stable/11/usr.sbin/bsdinstall/scripts/auto Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/auto Sat Mar 17 05:36:51 2018 (r331087) +++ stable/11/usr.sbin/bsdinstall/scripts/auto Sat Mar 17 05:43:26 2018 (r331088) @@ -182,7 +182,7 @@ if f_interactive; then case "$sys_maker" in "LENOVO") case "$sys_version" in - "ThinkPad X220"|"ThinkPad T420"|"ThinkPad T520"|"ThinkPad W520") + "ThinkPad X220"|"ThinkPad T420"|"ThinkPad T520"|"ThinkPad W520"|"ThinkPad X1") dialog_workaround "$msg_lenovo_fix" retval=$? f_dprintf "lenovofix_prompt=[%s]" "$retval" From owner-svn-src-all@freebsd.org Sat Mar 17 06:31:26 2018 Return-Path: Delivered-To: svn-src-all@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 1166DF49F02; Sat, 17 Mar 2018 06:31:26 +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 D336F69B26; Sat, 17 Mar 2018 06:31:24 +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 8A2B96D09; Sat, 17 Mar 2018 06:31:24 +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 w2H6VO8B029831; Sat, 17 Mar 2018 06:31:24 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2H6VOwZ029829; Sat, 17 Mar 2018 06:31:24 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803170631.w2H6VOwZ029829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 17 Mar 2018 06:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331090 - stable/11/usr.sbin/timed/timed X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.sbin/timed/timed X-SVN-Commit-Revision: 331090 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 06:31:26 -0000 Author: eadler Date: Sat Mar 17 06:31:24 2018 New Revision: 331090 URL: https://svnweb.freebsd.org/changeset/base/331090 Log: MFC r327941: timed: slave is an infinite loop, mark it as such Modified: stable/11/usr.sbin/timed/timed/extern.h stable/11/usr.sbin/timed/timed/slave.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/timed/timed/extern.h ============================================================================== --- stable/11/usr.sbin/timed/timed/extern.h Sat Mar 17 06:05:33 2018 (r331089) +++ stable/11/usr.sbin/timed/timed/extern.h Sat Mar 17 06:31:24 2018 (r331090) @@ -77,7 +77,7 @@ void print(struct tsp *, struct sockaddr_in *); void prthp(clock_t); void rmnetmachs(struct netinfo *); void setstatus(void); -int slave(void); +void slave(void) __dead2; void slaveack(void); void spreadtime(void); void suppress(struct sockaddr_in *, char *, struct netinfo *); Modified: stable/11/usr.sbin/timed/timed/slave.c ============================================================================== --- stable/11/usr.sbin/timed/timed/slave.c Sat Mar 17 06:05:33 2018 (r331089) +++ stable/11/usr.sbin/timed/timed/slave.c Sat Mar 17 06:31:24 2018 (r331090) @@ -56,7 +56,7 @@ static void schgdate(struct tsp *, char *); static void setmaster(struct tsp *); static void answerdelay(void); -int +void slave(void) { int tries; From owner-svn-src-all@freebsd.org Sat Mar 17 06:44:39 2018 Return-Path: Delivered-To: svn-src-all@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 C5621F4ABBE; Sat, 17 Mar 2018 06:44:39 +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 792A16A697; Sat, 17 Mar 2018 06:44:39 +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 7428E6FD2; Sat, 17 Mar 2018 06:44:39 +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 w2H6idQv038517; Sat, 17 Mar 2018 06:44:39 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2H6idOH038516; Sat, 17 Mar 2018 06:44:39 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803170644.w2H6idOH038516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 17 Mar 2018 06:44:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331092 - stable/11/sys/dev/flash X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/flash X-SVN-Commit-Revision: 331092 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 06:44:39 -0000 Author: eadler Date: Sat Mar 17 06:44:39 2018 New Revision: 331092 URL: https://svnweb.freebsd.org/changeset/base/331092 Log: MFC r317870: [mx25l] add new device ids. Modified: stable/11/sys/dev/flash/mx25l.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/flash/mx25l.c ============================================================================== --- stable/11/sys/dev/flash/mx25l.c Sat Mar 17 06:36:39 2018 (r331091) +++ stable/11/sys/dev/flash/mx25l.c Sat Mar 17 06:44:39 2018 (r331092) @@ -112,7 +112,9 @@ struct mx25l_flash_ident flash_devices[] = { { "en25f32", 0x1c, 0x3116, 64 * 1024, 64, FL_NONE }, { "en25p32", 0x1c, 0x2016, 64 * 1024, 64, FL_NONE }, { "en25p64", 0x1c, 0x2017, 64 * 1024, 128, FL_NONE }, + { "en25q32", 0x1c, 0x3016, 64 * 1024, 64, FL_NONE }, { "en25q64", 0x1c, 0x3017, 64 * 1024, 128, FL_ERASE_4K }, + { "m25p32", 0x20, 0x2016, 64 * 1024, 64, FL_NONE }, { "m25p64", 0x20, 0x2017, 64 * 1024, 128, FL_NONE }, { "mx25ll32", 0xc2, 0x2016, 64 * 1024, 64, FL_NONE }, { "mx25ll64", 0xc2, 0x2017, 64 * 1024, 128, FL_NONE }, From owner-svn-src-all@freebsd.org Sat Mar 17 07:04:42 2018 Return-Path: Delivered-To: svn-src-all@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 41DF0F4BB52; Sat, 17 Mar 2018 07:04:42 +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 D16996B309; Sat, 17 Mar 2018 07:04:41 +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 C692972FB; Sat, 17 Mar 2018 07:04:41 +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 w2H74fPK048430; Sat, 17 Mar 2018 07:04:41 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2H74fJj048429; Sat, 17 Mar 2018 07:04:41 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803170704.w2H74fJj048429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 17 Mar 2018 07:04:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331093 - stable/11/tools/tools X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/tools/tools X-SVN-Commit-Revision: 331093 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 07:04:42 -0000 Author: eadler Date: Sat Mar 17 07:04:41 2018 New Revision: 331093 URL: https://svnweb.freebsd.org/changeset/base/331093 Log: MFC r328509: tools: remove note about diffburst. Said tool was removed in 1999 in r51579 Modified: stable/11/tools/tools/README Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/README ============================================================================== --- stable/11/tools/tools/README Sat Mar 17 06:44:39 2018 (r331092) +++ stable/11/tools/tools/README Sat Mar 17 07:04:41 2018 (r331093) @@ -16,8 +16,6 @@ commitsdb A tool for reconstructing commit history usi crypto Test and exercise tools related to the crypto framework cxgbetool A tool for the cxgbe(4) driver. cxgbtool A tool for the cxgb(4) driver. -diffburst OBSOLETE: equivalent functionality is available via split -p. - For example: "split -p ^diff < patchfile". See split(1). drm Tools specific to the DRM/KMS device drivers. editing Editor modes and the like to help editing FreeBSD code. epfe Extract printing filter examples from printing.sgml. From owner-svn-src-all@freebsd.org Sat Mar 17 06:36:40 2018 Return-Path: Delivered-To: svn-src-all@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 9999DF4A450; Sat, 17 Mar 2018 06:36:40 +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 47C5669FF8; Sat, 17 Mar 2018 06:36:40 +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 427EF6E56; Sat, 17 Mar 2018 06:36:40 +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 w2H6aeIU032936; Sat, 17 Mar 2018 06:36:40 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2H6aehq032935; Sat, 17 Mar 2018 06:36:40 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803170636.w2H6aehq032935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 17 Mar 2018 06:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331091 - stable/11/sys/dev/ata/chipsets X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/sys/dev/ata/chipsets X-SVN-Commit-Revision: 331091 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 06:36:40 -0000 Author: eadler Date: Sat Mar 17 06:36:39 2018 New Revision: 331091 URL: https://svnweb.freebsd.org/changeset/base/331091 Log: MFC r326387: Fix typo Modified: stable/11/sys/dev/ata/chipsets/ata-micron.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ata/chipsets/ata-micron.c ============================================================================== --- stable/11/sys/dev/ata/chipsets/ata-micron.c Sat Mar 17 06:31:24 2018 (r331090) +++ stable/11/sys/dev/ata/chipsets/ata-micron.c Sat Mar 17 06:36:39 2018 (r331091) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include /* - * Cenatek chipset support functions + * Micron chipset support functions */ static int ata_micron_probe(device_t dev) From owner-svn-src-all@freebsd.org Sat Mar 17 07:07:26 2018 Return-Path: Delivered-To: svn-src-all@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 597F8F4BCD8; Sat, 17 Mar 2018 07:07:26 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (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 B10516B54A; Sat, 17 Mar 2018 07:07:25 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([77.179.222.246]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M1FAK-1edDbR2TUW-00tGnK; Sat, 17 Mar 2018 08:07:17 +0100 Date: Sat, 17 Mar 2018 08:06:49 +0100 From: "O. Hartmann" To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r331083 - in head: lib/libufs sbin/dump sbin/fsck_ffs sbin/fsdb sbin/newfs sbin/quotacheck sbin/restore sbin/tunefs stand/libsa sys/fs/ext2fs sys/fs/nandfs sys/ufs/ffs sys/ufs/ufs usr.s... Message-ID: <20180317080716.35306ccf@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201803170148.w2H1mR46082991@repo.freebsd.org> References: <201803170148.w2H1mR46082991@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/Gv+EGY8gAgcusfzMloOHe2C"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:HNh+6k1/ECjfnOXs26LbmOP4NubdtSKk6TFX+ptAoGcm9SzVk/t USnxt6783uNRmMNcFC50SjEgoBM6Sg+G3HtS2M2lssf3dgBm2YfQGwapU00Nl6BYEsjAa4n w1Mkj/r5fV0T7McgEsCgMOMy7bf3FvVEAUq3v0r0rRg5sa49f+8aVHaqoipxVSzxcnvbJYl lRYqLmINHQWQI+eGDjk8w== X-UI-Out-Filterresults: notjunk:1;V01:K0:tUkaxB2j27w=:lYbAxKWU0oOUgl+V6SUqCm 5/4dKBpHbIAQlPKHXIwqhQB0kf0al1idn/1hD3gmiNpXLjDQgw4PO6qdIh1EN4h9+sKm1JIXO 6jwpY+NTkDKCwnaAr/KoUz930qQkRsTESjoleRZGm+XVZHLhcd6xvhc3ZxgqgI2hPOR4t7oCq UJgAKCMgtnpwpFZsotu1xJqHQIYqv4flC0U0/ENByXRm/rRcxKLD6gCOmpJSbdaEq5aGssIqT ZM5HwUdzWm5U9MEY5BVkFYuPpCSypXRoJjbwjy+OKRNzpmxrK48kVyc38mHnJr/FPuBFkOU6T dHgI+Nj/1TBEPYyIBGB6c2tP5lYRPJ4eRpkEYyBW0M5f2e+vXY5oNDEeacSvadJcy5rEwYz3Y QROMuF1MRkAsuvvFg8xcMv3wAv+dzBLwUMcKC/EpDGiiErQYxagU97Cng90FFEgmVno1aIio7 tqqAwRqkuBwkh2rBic1Xj360BZa83IHxsFwxEF9c77fw8Z5mgvvmu+MJTuY65zTh/8T++4tAw HzWNE2f03lvxON8dbVv5NnVlcVVVsMN/O4o1VKziGdy/D/Tu0PDsdirmCjeF2HCDwLSWx55cL X71Ambv3uOvAbElWrr3jo0nb4JCgk5BdwmoW/EgeCovZSQndtpxdKPkqGb4zIG4zwAE3qc6JG S9BvBYTZ5l94sS18qmOBySA4+k6MNjBmwTBg2shOL+kpBAwS6XF8SSJZMHUO3oNhQAR2XLZnz lnbMuII56D4B3H9GJhczVG7MyHmN/I+Zrii1xGxMU2pjhzSwXHzZDUCEBQYz2mYoSmiP4wtmj 1Cj6+Dm34oVANj5kkNPdJTFwsdg1w== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 07:07:26 -0000 --Sig_/Gv+EGY8gAgcusfzMloOHe2C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Sat, 17 Mar 2018 01:48:27 +0000 (UTC) Ed Maste schrieb: > Author: emaste > Date: Sat Mar 17 01:48:27 2018 > New Revision: 331083 > URL: https://svnweb.freebsd.org/changeset/base/331083 >=20 > Log: > Prefix UFS symbols with UFS_ to reduce namespace pollution > =20 > Followup to r313780. Also prefix ext2's and nandfs's versions with > EXT2_ and NANDFS_. > =20 > Reported by: kib > Reviewed by: kib, mckusick > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D9623 >=20 > Modified: > head/lib/libufs/inode.c > head/sbin/dump/main.c > head/sbin/dump/traverse.c > head/sbin/fsck_ffs/dir.c > head/sbin/fsck_ffs/fsutil.c > head/sbin/fsck_ffs/inode.c > head/sbin/fsck_ffs/pass1.c > head/sbin/fsck_ffs/pass2.c > head/sbin/fsck_ffs/suj.c > head/sbin/fsdb/fsdb.c > head/sbin/fsdb/fsdbutil.c > head/sbin/newfs/mkfs.c > head/sbin/quotacheck/quotacheck.c > head/sbin/restore/dirs.c > head/sbin/restore/interactive.c > head/sbin/restore/tape.c > head/sbin/tunefs/tunefs.c > head/stand/libsa/nandfs.c > head/stand/libsa/ufs.c > head/sys/fs/ext2fs/ext2_alloc.c > head/sys/fs/ext2fs/ext2_dinode.h > head/sys/fs/ext2fs/ext2_lookup.c > head/sys/fs/ext2fs/ext2_vnops.c > head/sys/fs/ext2fs/inode.h > head/sys/fs/nandfs/nandfs.h > head/sys/fs/nandfs/nandfs_vnops.c > head/sys/ufs/ffs/ffs_alloc.c > head/sys/ufs/ffs/ffs_softdep.c > head/sys/ufs/ffs/ffs_vnops.c > head/sys/ufs/ffs/softdep.h > head/sys/ufs/ufs/dinode.h > head/sys/ufs/ufs/inode.h > head/sys/ufs/ufs/ufs_lookup.c > head/sys/ufs/ufs/ufs_vnops.c > head/usr.sbin/quot/quot.c >=20 > Modified: head/lib/libufs/inode.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/lib/libufs/inode.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/lib/libufs/inode.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -81,12 +81,12 @@ getino(struct uufsd *disk, void **dino, ino_t inode, i > gotit: switch (disk->d_ufs) { > case 1: > dp1 =3D &((struct ufs1_dinode *)inoblock)[inode - min]; > - *mode =3D dp1->di_mode & IFMT; > + *mode =3D dp1->di_mode & UFS_IFMT; > *dino =3D dp1; > return (0); > case 2: > dp2 =3D &((struct ufs2_dinode *)inoblock)[inode - min]; > - *mode =3D dp2->di_mode & IFMT; > + *mode =3D dp2->di_mode & UFS_IFMT; > *dino =3D dp2; > return (0); > default: >=20 > Modified: head/sbin/dump/main.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/sbin/dump/main.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/dump/main.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -550,7 +550,7 @@ main(int argc, char *argv[]) > * Skip directory inodes deleted and maybe reallocated > */ > dp =3D getinode(ino, &mode); > - if (mode !=3D IFDIR) > + if (mode !=3D UFS_IFDIR) > continue; > (void)dumpino(dp, ino); > } > @@ -569,7 +569,7 @@ main(int argc, char *argv[]) > * Skip inodes deleted and reallocated as directories. > */ > dp =3D getinode(ino, &mode); > - if (mode =3D=3D IFDIR) > + if (mode =3D=3D UFS_IFDIR) > continue; > (void)dumpino(dp, ino); > } >=20 > Modified: head/sbin/dump/traverse.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/sbin/dump/traverse.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/dump/traverse.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -195,7 +195,7 @@ mapfiles(ino_t maxino, long *tapesize) > for (i =3D 0; i < inosused; i++, ino++) { > if (ino < UFS_ROOTINO || > (dp =3D getinode(ino, &mode)) =3D=3D NULL || > - (mode & IFMT) =3D=3D 0) > + (mode & UFS_IFMT) =3D=3D 0) > continue; > if (ino >=3D maxino) { > msg("Skipping inode %ju >=3D maxino %ju\n", > @@ -209,19 +209,19 @@ mapfiles(ino_t maxino, long *tapesize) > * (this is used in mapdirs()). > */ > SETINO(ino, usedinomap); > - if (mode =3D=3D IFDIR) > + if (mode =3D=3D UFS_IFDIR) > SETINO(ino, dumpdirmap); > if (WANTTODUMP(dp)) { > SETINO(ino, dumpinomap); > - if (mode !=3D IFREG && > - mode !=3D IFDIR && > - mode !=3D IFLNK) > + if (mode !=3D UFS_IFREG && > + mode !=3D UFS_IFDIR && > + mode !=3D UFS_IFLNK) > *tapesize +=3D 1; > else > *tapesize +=3D blockest(dp); > continue; > } > - if (mode =3D=3D IFDIR) { > + if (mode =3D=3D UFS_IFDIR) { > if (!nonodump && > (DIP(dp, di_flags) & UF_NODUMP)) > CLRINO(ino, usedinomap); > @@ -429,7 +429,7 @@ searchdir( > * Add back to dumpdirmap and remove from usedinomap > * to propagate nodump. > */ > - if (mode =3D=3D IFDIR) { > + if (mode =3D=3D UFS_IFDIR) { > SETINO(dp->d_ino, dumpdirmap); > CLRINO(dp->d_ino, usedinomap); > ret |=3D HASSUBDIRS; > @@ -554,7 +554,7 @@ dumpino(union dinode *dp, ino_t ino) > =20 > default: > msg("Warning: undefined file type 0%o\n", > - DIP(dp, di_mode) & IFMT); > + DIP(dp, di_mode) & UFS_IFMT); > return; > } > if (DIP(dp, di_size) > UFS_NDADDR * sblock->fs_bsize) { > @@ -890,11 +890,11 @@ getinode(ino_t inum, int *modep) > gotit: > if (sblock->fs_magic =3D=3D FS_UFS1_MAGIC) { > dp1 =3D &((struct ufs1_dinode *)inoblock)[inum - minino]; > - *modep =3D (dp1->di_mode & IFMT); > + *modep =3D (dp1->di_mode & UFS_IFMT); > return ((union dinode *)dp1); > } > dp2 =3D &((struct ufs2_dinode *)inoblock)[inum - minino]; > - *modep =3D (dp2->di_mode & IFMT); > + *modep =3D (dp2->di_mode & UFS_IFMT); > return ((union dinode *)dp2); > } > =20 >=20 > Modified: head/sbin/fsck_ffs/dir.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/sbin/fsck_ffs/dir.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/fsck_ffs/dir.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -264,7 +264,7 @@ fileerror(ino_t cwd, ino_t ino, const char *errmesg) > dp =3D ginode(ino); > if (ftypeok(dp)) > pfatal("%s=3D%s\n", > - (DIP(dp, di_mode) & IFMT) =3D=3D IFDIR ? "DIR" : "FILE", > + (DIP(dp, di_mode) & UFS_IFMT) =3D=3D UFS_IFDIR ? "DIR" : "FILE", > pathbuf); > else > pfatal("NAME=3D%s\n", pathbuf); > @@ -308,7 +308,8 @@ adjust(struct inodesc *idesc, int lcnt) > } > if (lcnt !=3D 0) { > pwarn("LINK COUNT %s", (lfdir =3D=3D idesc->id_number) ? lfname : > - ((DIP(dp, di_mode) & IFMT) =3D=3D IFDIR ? "DIR" : "FILE")); > + ((DIP(dp, di_mode) & UFS_IFMT) =3D=3D UFS_IFDIR ? > + "DIR" : "FILE")); > pinode(idesc->id_number); > printf(" COUNT %d SHOULD BE %d", > DIP(dp, di_nlink), DIP(dp, di_nlink) - lcnt); > @@ -388,7 +389,7 @@ linkup(ino_t orphan, ino_t parentdir, char *name) > =20 > memset(&idesc, 0, sizeof(struct inodesc)); > dp =3D ginode(orphan); > - lostdir =3D (DIP(dp, di_mode) & IFMT) =3D=3D IFDIR; > + lostdir =3D (DIP(dp, di_mode) & UFS_IFMT) =3D=3D UFS_IFDIR; > pwarn("UNREF %s ", lostdir ? "DIR" : "FILE"); > pinode(orphan); > if (preen && DIP(dp, di_size) =3D=3D 0) > @@ -436,7 +437,7 @@ linkup(ino_t orphan, ino_t parentdir, char *name) > } > } > dp =3D ginode(lfdir); > - if ((DIP(dp, di_mode) & IFMT) !=3D IFDIR) { > + if ((DIP(dp, di_mode) & UFS_IFMT) !=3D UFS_IFDIR) { > pfatal("lost+found IS NOT A DIRECTORY"); > if (reply("REALLOCATE") =3D=3D 0) > return (0); > @@ -615,7 +616,7 @@ allocdir(ino_t parent, ino_t request, int mode) > struct inoinfo *inp; > struct dirtemplate *dirp; > =20 > - ino =3D allocino(request, IFDIR|mode); > + ino =3D allocino(request, UFS_IFDIR|mode); > dirp =3D &dirhead; > dirp->dot_ino =3D ino; > dirp->dotdot_ino =3D parent; >=20 > Modified: head/sbin/fsck_ffs/fsutil.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/sbin/fsck_ffs/fsutil.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/fsck_ffs/fsutil.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -100,15 +100,15 @@ fsutilinit(void) > int > ftypeok(union dinode *dp) > { > - switch (DIP(dp, di_mode) & IFMT) { > + switch (DIP(dp, di_mode) & UFS_IFMT) { > =20 > - case IFDIR: > - case IFREG: > - case IFBLK: > - case IFCHR: > - case IFLNK: > - case IFSOCK: > - case IFIFO: > + case UFS_IFDIR: > + case UFS_IFREG: > + case UFS_IFBLK: > + case UFS_IFCHR: > + case UFS_IFLNK: > + case UFS_IFSOCK: > + case UFS_IFIFO: > return (1); > =20 > default: >=20 > Modified: head/sbin/fsck_ffs/inode.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/sbin/fsck_ffs/inode.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/fsck_ffs/inode.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -71,8 +71,8 @@ ckinode(union dinode *dp, struct inodesc *idesc) > idesc->id_lbn =3D -1; > idesc->id_entryno =3D 0; > idesc->id_filesize =3D DIP(dp, di_size); > - mode =3D DIP(dp, di_mode) & IFMT; > - if (mode =3D=3D IFBLK || mode =3D=3D IFCHR || (mode =3D=3D IFLNK && > + mode =3D DIP(dp, di_mode) & UFS_IFMT; > + if (mode =3D=3D UFS_IFBLK || mode =3D=3D UFS_IFCHR || (mode =3D=3D UFS_= IFLNK && > DIP(dp, di_size) < (unsigned)sblock.fs_maxsymlinklen)) > return (KEEPON); > if (sblock.fs_magic =3D=3D FS_UFS1_MAGIC) > @@ -347,7 +347,7 @@ getnextinode(ino_t inumber, int rebuildcg) > * Try to determine if we have reached the end of the > * allocated inodes. > */ > - mode =3D DIP(dp, di_mode) & IFMT; > + mode =3D DIP(dp, di_mode) & UFS_IFMT; > if (mode =3D=3D 0) { > if (memcmp(dp->dp2.di_db, ufs2_zino.di_db, > UFS_NDADDR * sizeof(ufs2_daddr_t)) || > @@ -362,9 +362,9 @@ getnextinode(ino_t inumber, int rebuildcg) > ndb =3D howmany(DIP(dp, di_size), sblock.fs_bsize); > if (ndb < 0) > return (NULL); > - if (mode =3D=3D IFBLK || mode =3D=3D IFCHR) > + if (mode =3D=3D UFS_IFBLK || mode =3D=3D UFS_IFCHR) > ndb++; > - if (mode =3D=3D IFLNK) { > + if (mode =3D=3D UFS_IFLNK) { > /* > * Fake ndb value so direct/indirect block checks below > * will detect any garbage after symlink string. > @@ -533,7 +533,7 @@ clri(struct inodesc *idesc, const char *type, int flag > dp =3D ginode(idesc->id_number); > if (flag =3D=3D 1) { > pwarn("%s %s", type, > - (DIP(dp, di_mode) & IFMT) =3D=3D IFDIR ? "DIR" : "FILE"); > + (DIP(dp, di_mode) & UFS_IFMT) =3D=3D UFS_IFDIR ? "DIR":"FILE"); > pinode(idesc->id_number); > } > if (preen || reply("CLEAR") =3D=3D 1) { > @@ -681,13 +681,13 @@ allocino(ino_t request, int type) > return (0); > setbit(cg_inosused(cgp), ino % sblock.fs_ipg); > cgp->cg_cs.cs_nifree--; > - switch (type & IFMT) { > - case IFDIR: > + switch (type & UFS_IFMT) { > + case UFS_IFDIR: > inoinfo(ino)->ino_state =3D DSTATE; > cgp->cg_cs.cs_ndir++; > break; > - case IFREG: > - case IFLNK: > + case UFS_IFREG: > + case UFS_IFLNK: > inoinfo(ino)->ino_state =3D FSTATE; > break; > default: >=20 > Modified: head/sbin/fsck_ffs/pass1.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/sbin/fsck_ffs/pass1.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/fsck_ffs/pass1.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -251,7 +251,7 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r > =20 > if ((dp =3D getnextinode(inumber, rebuildcg)) =3D=3D NULL) > return (0); > - mode =3D DIP(dp, di_mode) & IFMT; > + mode =3D DIP(dp, di_mode) & UFS_IFMT; > if (mode =3D=3D 0) { > if ((sblock.fs_magic =3D=3D FS_UFS1_MAGIC && > (memcmp(dp->dp1.di_db, ufs1_zino.di_db, > @@ -284,25 +284,25 @@ checkinode(ino_t inumber, struct inodesc *idesc, in= t r > kernmaxfilesize =3D sblock.fs_maxfilesize; > if (DIP(dp, di_size) > kernmaxfilesize || > DIP(dp, di_size) > sblock.fs_maxfilesize || > - (mode =3D=3D IFDIR && DIP(dp, di_size) > MAXDIRSIZE)) { > + (mode =3D=3D UFS_IFDIR && DIP(dp, di_size) > MAXDIRSIZE)) { > if (debug) > printf("bad size %ju:", (uintmax_t)DIP(dp, di_size)); > goto unknown; > } > - if (!preen && mode =3D=3D IFMT && reply("HOLD BAD BLOCK") =3D=3D 1) { > + if (!preen && mode =3D=3D UFS_IFMT && reply("HOLD BAD BLOCK") =3D=3D 1)= { > dp =3D ginode(inumber); > DIP_SET(dp, di_size, sblock.fs_fsize); > - DIP_SET(dp, di_mode, IFREG|0600); > + DIP_SET(dp, di_mode, UFS_IFREG|0600); > inodirty(); > } > - if ((mode =3D=3D IFBLK || mode =3D=3D IFCHR || mode =3D=3D IFIFO || > - mode =3D=3D IFSOCK) && DIP(dp, di_size) !=3D 0) { > + if ((mode =3D=3D UFS_IFBLK || mode =3D=3D UFS_IFCHR || mode =3D=3D UFS_= IFIFO || > + mode =3D=3D UFS_IFSOCK) && DIP(dp, di_size) !=3D 0) { > if (debug) > printf("bad special-file size %ju:", > (uintmax_t)DIP(dp, di_size)); > goto unknown; > } > - if ((mode =3D=3D IFBLK || mode =3D=3D IFCHR) && > + if ((mode =3D=3D UFS_IFBLK || mode =3D=3D UFS_IFCHR) && > (dev_t)DIP(dp, di_rdev) =3D=3D NODEV) { > if (debug) > printf("bad special-file rdev NODEV:"); > @@ -315,9 +315,9 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r > (uintmax_t)DIP(dp, di_size), (uintmax_t)ndb); > goto unknown; > } > - if (mode =3D=3D IFBLK || mode =3D=3D IFCHR) > + if (mode =3D=3D UFS_IFBLK || mode =3D=3D UFS_IFCHR) > ndb++; > - if (mode =3D=3D IFLNK) { > + if (mode =3D=3D UFS_IFLNK) { > /* > * Fake ndb value so direct/indirect block checks below > * will detect any garbage after symlink string. > @@ -357,7 +357,7 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r > goto unknown; > n_files++; > inoinfo(inumber)->ino_linkcnt =3D DIP(dp, di_nlink); > - if (mode =3D=3D IFDIR) { > + if (mode =3D=3D UFS_IFDIR) { > if (DIP(dp, di_size) =3D=3D 0) > inoinfo(inumber)->ino_state =3D DCLEAR; > else if (DIP(dp, di_nlink) <=3D 0) >=20 > Modified: head/sbin/fsck_ffs/pass2.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/sbin/fsck_ffs/pass2.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/fsck_ffs/pass2.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -112,8 +112,8 @@ pass2(void) > exit(EEXIT); > } > dp =3D ginode(UFS_ROOTINO); > - DIP_SET(dp, di_mode, DIP(dp, di_mode) & ~IFMT); > - DIP_SET(dp, di_mode, DIP(dp, di_mode) | IFDIR); > + DIP_SET(dp, di_mode, DIP(dp, di_mode) & ~UFS_IFMT); > + DIP_SET(dp, di_mode, DIP(dp, di_mode) | UFS_IFDIR); > inodirty(); > break; > =20 > @@ -184,7 +184,7 @@ pass2(void) > } > dp =3D &dino; > memset(dp, 0, sizeof(struct ufs2_dinode)); > - DIP_SET(dp, di_mode, IFDIR); > + DIP_SET(dp, di_mode, UFS_IFDIR); > DIP_SET(dp, di_size, inp->i_isize); > for (i =3D 0; i < MIN(inp->i_numblks, UFS_NDADDR); i++) > DIP_SET(dp, di_db[i], inp->i_blks[i]); > @@ -478,7 +478,8 @@ again: > break; > dp =3D ginode(dirp->d_ino); > inoinfo(dirp->d_ino)->ino_state =3D > - (DIP(dp, di_mode) & IFMT) =3D=3D IFDIR ? DSTATE : FSTATE; > + (DIP(dp, di_mode) & UFS_IFMT) =3D=3D UFS_IFDIR ? > + DSTATE : FSTATE; > inoinfo(dirp->d_ino)->ino_linkcnt =3D DIP(dp, di_nlink); > goto again; > =20 >=20 > Modified: head/sbin/fsck_ffs/suj.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/sbin/fsck_ffs/suj.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/fsck_ffs/suj.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -605,7 +605,7 @@ ino_free(ino_t ino, int mode) > if (ino < cgp->cg_irotor) > cgp->cg_irotor =3D ino; > cgp->cg_cs.cs_nifree++; > - if ((mode & IFMT) =3D=3D IFDIR) { > + if ((mode & UFS_IFMT) =3D=3D UFS_IFDIR) { > freedir++; > cgp->cg_cs.cs_ndir--; > } > @@ -748,7 +748,7 @@ ino_blkatoff(union dinode *ip, ino_t ino, ufs_lbn_t lb > /* > * Now direct and indirect. > */ > - if (DIP(ip, di_mode) =3D=3D IFLNK && > + if (DIP(ip, di_mode) =3D=3D UFS_IFLNK && > DIP(ip, di_size) < fs->fs_maxsymlinklen) > return (0); > if (lbn >=3D 0 && lbn < UFS_NDADDR) { > @@ -853,7 +853,7 @@ ino_isat(ino_t parent, off_t diroff, ino_t child, int= =20 > *isdot =3D 0; > dip =3D ino_read(parent); > *mode =3D DIP(dip, di_mode); > - if ((*mode & IFMT) !=3D IFDIR) { > + if ((*mode & UFS_IFMT) !=3D UFS_IFDIR) { > if (debug) { > /* > * This can happen if the parent inode > @@ -1013,7 +1013,7 @@ ino_visit(union dinode *ip, ino_t ino, ino_visitor = vis > int i; > =20 > size =3D DIP(ip, di_size); > - mode =3D DIP(ip, di_mode) & IFMT; > + mode =3D DIP(ip, di_mode) & UFS_IFMT; > fragcnt =3D 0; > if ((flags & VISIT_EXT) && > fs->fs_magic =3D=3D FS_UFS2_MAGIC && ip->dp2.di_extsize) { > @@ -1027,8 +1027,8 @@ ino_visit(union dinode *ip, ino_t ino, ino_visitor = vis > } > } > /* Skip datablocks for short links and devices. */ > - if (mode =3D=3D IFBLK || mode =3D=3D IFCHR || > - (mode =3D=3D IFLNK && size < fs->fs_maxsymlinklen)) > + if (mode =3D=3D UFS_IFBLK || mode =3D=3D UFS_IFCHR || > + (mode =3D=3D UFS_IFLNK && size < fs->fs_maxsymlinklen)) > return (fragcnt); > for (i =3D 0; i < UFS_NDADDR; i++) { > if (DIP(ip, di_db[i]) =3D=3D 0) > @@ -1265,7 +1265,7 @@ ino_reclaim(union dinode *ip, ino_t ino, int mode) > (uintmax_t)ino, DIP(ip, di_nlink), DIP(ip, di_mode)); > =20 > /* We are freeing an inode or directory. */ > - if ((DIP(ip, di_mode) & IFMT) =3D=3D IFDIR) > + if ((DIP(ip, di_mode) & UFS_IFMT) =3D=3D UFS_IFDIR) > ino_visit(ip, ino, ino_free_children, 0); > DIP_SET(ip, di_nlink, 0); > ino_visit(ip, ino, blk_free_visit, VISIT_EXT | VISIT_INDIR); > @@ -1300,7 +1300,7 @@ ino_decr(ino_t ino) > if (mode =3D=3D 0) > err_suj("Inode %d has a link of %d with 0 mode\n", ino, nlink); > nlink--; > - if ((mode & IFMT) =3D=3D IFDIR) > + if ((mode & UFS_IFMT) =3D=3D UFS_IFDIR) > reqlink =3D 2; > else > reqlink =3D 1; > @@ -1335,13 +1335,13 @@ ino_adjust(struct suj_ino *sino) > =20 > nlink =3D sino->si_nlink; > ino =3D sino->si_ino; > - mode =3D sino->si_mode & IFMT; > + mode =3D sino->si_mode & UFS_IFMT; > /* > * If it's a directory with no dot links, it was truncated before > * the name was cleared. We need to clear the dirent that > * points at it. > */ > - if (mode =3D=3D IFDIR && nlink =3D=3D 1 && sino->si_dotlinks =3D=3D 0) { > + if (mode =3D=3D UFS_IFDIR && nlink =3D=3D 1 && sino->si_dotlinks =3D=3D= 0) { > sino->si_nlink =3D nlink =3D 0; > TAILQ_FOREACH(srec, &sino->si_recs, sr_next) { > rrec =3D (struct jrefrec *)srec->sr_rec; > @@ -1358,7 +1358,7 @@ ino_adjust(struct suj_ino *sino) > * If it's a directory with no real names pointing to it go ahead > * and truncate it. This will free any children. > */ > - if (mode =3D=3D IFDIR && nlink - sino->si_dotlinks =3D=3D 0) { > + if (mode =3D=3D UFS_IFDIR && nlink - sino->si_dotlinks =3D=3D 0) { > sino->si_nlink =3D nlink =3D 0; > /* > * Mark any .. links so they know not to free this inode > @@ -1374,7 +1374,7 @@ ino_adjust(struct suj_ino *sino) > } > } > ip =3D ino_read(ino); > - mode =3D DIP(ip, di_mode) & IFMT; > + mode =3D DIP(ip, di_mode) & UFS_IFMT; > if (nlink > UFS_LINK_MAX) > err_suj("ino %ju nlink manipulation error, new %ju, old %d\n", > (uintmax_t)ino, (uintmax_t)nlink, DIP(ip, di_nlink)); > @@ -1393,7 +1393,7 @@ ino_adjust(struct suj_ino *sino) > if (mode !=3D sino->si_mode && debug) > printf("ino %ju, mode %o !=3D %o\n", > (uintmax_t)ino, mode, sino->si_mode); > - if ((mode & IFMT) =3D=3D IFDIR) > + if ((mode & UFS_IFMT) =3D=3D UFS_IFDIR) > reqlink =3D 2; > else > reqlink =3D 1; > @@ -1506,15 +1506,15 @@ ino_trunc(ino_t ino, off_t size) > int mode; > =20 > ip =3D ino_read(ino); > - mode =3D DIP(ip, di_mode) & IFMT; > + mode =3D DIP(ip, di_mode) & UFS_IFMT; > cursize =3D DIP(ip, di_size); > if (debug) > printf("Truncating ino %ju, mode %o to size %jd from size %jd\n", > (uintmax_t)ino, mode, size, cursize); > =20 > /* Skip datablocks for short links and devices. */ > - if (mode =3D=3D 0 || mode =3D=3D IFBLK || mode =3D=3D IFCHR || > - (mode =3D=3D IFLNK && cursize < fs->fs_maxsymlinklen)) > + if (mode =3D=3D 0 || mode =3D=3D UFS_IFBLK || mode =3D=3D UFS_IFCHR || > + (mode =3D=3D UFS_IFLNK && cursize < fs->fs_maxsymlinklen)) > return; > /* Don't extend. */ > if (size > cursize) > @@ -1587,7 +1587,7 @@ ino_trunc(ino_t ino, off_t size) > * uninitialized space later. > */ > off =3D blkoff(fs, size); > - if (off && DIP(ip, di_mode) !=3D IFDIR) { > + if (off && DIP(ip, di_mode) !=3D UFS_IFDIR) { > uint8_t *buf; > long clrsize; > =20 > @@ -1635,7 +1635,7 @@ ino_check(struct suj_ino *sino) > rrec =3D (struct jrefrec *)srec->sr_rec; > isat =3D ino_isat(rrec->jr_parent, rrec->jr_diroff, > rrec->jr_ino, &mode, &isdot); > - if (isat && (mode & IFMT) !=3D (rrec->jr_mode & IFMT)) > + if (isat && (mode & UFS_IFMT) !=3D (rrec->jr_mode & UFS_IFMT)) > err_suj("Inode mode/directory type mismatch %o !=3D %o\n", > mode, rrec->jr_mode); > if (debug) > @@ -1646,7 +1646,7 @@ ino_check(struct suj_ino *sino) > (uintmax_t)rrec->jr_parent, > (uintmax_t)rrec->jr_diroff, > rrec->jr_mode, isat, isdot); > - mode =3D rrec->jr_mode & IFMT; > + mode =3D rrec->jr_mode & UFS_IFMT; > if (rrec->jr_op =3D=3D JOP_REMREF) > removes++; > newlinks +=3D isat; > @@ -1915,7 +1915,7 @@ ino_unlinked(void) > fs->fs_sujfree =3D 0; > while (ino !=3D 0) { > ip =3D ino_read(ino); > - mode =3D DIP(ip, di_mode) & IFMT; > + mode =3D DIP(ip, di_mode) & UFS_IFMT; > inon =3D DIP(ip, di_freelink); > DIP_SET(ip, di_freelink, 0); > /* > @@ -2371,7 +2371,7 @@ suj_verifyino(union dinode *ip) > return (-1); > } > =20 > - if (DIP(ip, di_mode) !=3D (IFREG | IREAD)) { > + if (DIP(ip, di_mode) !=3D (UFS_IFREG | UFS_IREAD)) { > printf("Invalid mode %o for journal inode %ju\n", > DIP(ip, di_mode), (uintmax_t)sujino); > return (-1); >=20 > Modified: head/sbin/fsdb/fsdb.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/sbin/fsdb/fsdb.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/fsdb/fsdb.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -512,14 +512,14 @@ CMDFUNCSTART(findblk) > /* Get on-disk inode aka dinode. */ > curinum =3D inum; > curinode =3D ginode(inum); > - /* Find IFLNK dinode with allocated data blocks. */ > - switch (DIP(curinode, di_mode) & IFMT) { > - case IFDIR: > - case IFREG: > + /* Find UFS_IFLNK dinode with allocated data blocks. */ > + switch (DIP(curinode, di_mode) & UFS_IFMT) { > + case UFS_IFDIR: > + case UFS_IFREG: > if (DIP(curinode, di_blocks) =3D=3D 0) > continue; > break; > - case IFLNK: > + case UFS_IFLNK: > { > uint64_t size =3D DIP(curinode, di_size); > if (size > 0 && size < sblock.fs_maxsymlinklen && > @@ -889,10 +889,10 @@ struct typemap { > const char *typename; > int typebits; > } typenamemap[] =3D { > - {"file", IFREG}, > - {"dir", IFDIR}, > - {"socket", IFSOCK}, > - {"fifo", IFIFO}, > + {"file", UFS_IFREG}, > + {"dir", UFS_IFDIR}, > + {"socket", UFS_IFSOCK}, > + {"fifo", UFS_IFIFO}, > }; > =20 > CMDFUNCSTART(newtype) > @@ -902,7 +902,7 @@ CMDFUNCSTART(newtype) > =20 > if (!checkactive()) > return 1; > - type =3D DIP(curinode, di_mode) & IFMT; > + type =3D DIP(curinode, di_mode) & UFS_IFMT; > for (tp =3D typenamemap; > tp < &typenamemap[nitems(typenamemap)]; > tp++) { > @@ -917,7 +917,7 @@ CMDFUNCSTART(newtype) > warnx("try one of `file', `dir', `socket', `fifo'"); > return 1; > } > - DIP_SET(curinode, di_mode, DIP(curinode, di_mode) & ~IFMT); > + DIP_SET(curinode, di_mode, DIP(curinode, di_mode) & ~UFS_IFMT); > DIP_SET(curinode, di_mode, DIP(curinode, di_mode) | type); > inodirty(); > printactive(0); >=20 > Modified: head/sbin/fsdb/fsdbutil.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/sbin/fsdb/fsdbutil.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/fsdb/fsdbutil.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -120,20 +120,20 @@ printstat(const char *cp, ino_t inum, union dinode = *dp > time_t t; > =20 > printf("%s: ", cp); > - switch (DIP(dp, di_mode) & IFMT) { > - case IFDIR: > + switch (DIP(dp, di_mode) & UFS_IFMT) { > + case UFS_IFDIR: > puts("directory"); > break; > - case IFREG: > + case UFS_IFREG: > puts("regular file"); > break; > - case IFBLK: > + case UFS_IFBLK: > printf("block special (%#jx)", (uintmax_t)DIP(dp, di_rdev)); > break; > - case IFCHR: > + case UFS_IFCHR: > printf("character special (%#jx)", DIP(dp, di_rdev)); > break; > - case IFLNK: > + case UFS_IFLNK: > fputs("symlink",stdout); > if (DIP(dp, di_size) > 0 && > DIP(dp, di_size) < sblock.fs_maxsymlinklen && > @@ -147,10 +147,10 @@ printstat(const char *cp, ino_t inum, union dinode = *dp > putchar('\n'); > } > break; > - case IFSOCK: > + case UFS_IFSOCK: > puts("socket"); > break; > - case IFIFO: > + case UFS_IFIFO: > puts("fifo"); > break; > } > @@ -338,7 +338,7 @@ checkactivedir(void) > warnx("no current inode\n"); > return 0; > } > - if ((DIP(curinode, di_mode) & IFMT) !=3D IFDIR) { > + if ((DIP(curinode, di_mode) & UFS_IFMT) !=3D UFS_IFDIR) { > warnx("inode %ju not a directory", (uintmax_t)curinum); > return 0; > } > @@ -350,14 +350,14 @@ printactive(int doblocks) > { > if (!checkactive()) > return 1; > - switch (DIP(curinode, di_mode) & IFMT) { > - case IFDIR: > - case IFREG: > - case IFBLK: > - case IFCHR: > - case IFLNK: > - case IFSOCK: > - case IFIFO: > + switch (DIP(curinode, di_mode) & UFS_IFMT) { > + case UFS_IFDIR: > + case UFS_IFREG: > + case UFS_IFBLK: > + case UFS_IFCHR: > + case UFS_IFLNK: > + case UFS_IFSOCK: > + case UFS_IFIFO: > if (doblocks) > printblocks(curinum, curinode); > else > @@ -368,7 +368,7 @@ printactive(int doblocks) > break; > default: > printf("current inode %ju: screwy itype 0%o (mode 0%o)?\n", > - (uintmax_t)curinum, DIP(curinode, di_mode) & IFMT, > + (uintmax_t)curinum, DIP(curinode, di_mode) & UFS_IFMT, > DIP(curinode, di_mode)); > break; > } >=20 > Modified: head/sbin/newfs/mkfs.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/sbin/newfs/mkfs.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/newfs/mkfs.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -883,7 +883,7 @@ fsinit(time_t utime) > /* > * create the root directory > */ > - node.dp1.di_mode =3D IFDIR | UMASK; > + node.dp1.di_mode =3D UFS_IFDIR | UMASK; > node.dp1.di_nlink =3D entries; > node.dp1.di_size =3D makedir(root_dir, entries); > node.dp1.di_db[0] =3D alloc(sblock.fs_fsize, node.dp1.di_mode); > @@ -919,7 +919,7 @@ fsinit(time_t utime) > /* > * create the root directory > */ > - node.dp2.di_mode =3D IFDIR | UMASK; > + node.dp2.di_mode =3D UFS_IFDIR | UMASK; > node.dp2.di_nlink =3D entries; > node.dp2.di_size =3D makedir(root_dir, entries); > node.dp2.di_db[0] =3D alloc(sblock.fs_fsize, node.dp2.di_mode); > @@ -1002,7 +1002,7 @@ goth: > acg.cg_cs.cs_nbfree--; > sblock.fs_cstotal.cs_nbfree--; > fscs[0].cs_nbfree--; > - if (mode & IFDIR) { > + if (mode & UFS_IFDIR) { > acg.cg_cs.cs_ndir++; > sblock.fs_cstotal.cs_ndir++; > fscs[0].cs_ndir++; >=20 > Modified: head/sbin/quotacheck/quotacheck.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/sbin/quotacheck/quotacheck.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/quotacheck/quotacheck.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -370,7 +370,7 @@ chkquota(char *specname, struct quotafile *qfu, struct > for (i =3D 0; i < inosused; i++, ino++) { > if ((dp =3D getnextinode(ino)) =3D=3D NULL || > ino < UFS_ROOTINO || > - (mode =3D DIP(dp, di_mode) & IFMT) =3D=3D 0) > + (mode =3D DIP(dp, di_mode) & UFS_IFMT) =3D=3D 0) > continue; > /* > * XXX: Do not account for UIDs or GIDs that appear > @@ -405,16 +405,16 @@ chkquota(char *specname, struct quotafile *qfu, str= uct > fup =3D addid((u_long)DIP(dp, di_gid), GRPQUOTA, > (char *)0, mntpt); > fup->fu_curinodes++; > - if (mode =3D=3D IFREG || mode =3D=3D IFDIR || > - mode =3D=3D IFLNK) > + if (mode =3D=3D UFS_IFREG || mode =3D=3D UFS_IFDIR || > + mode =3D=3D UFS_IFLNK) > fup->fu_curblocks +=3D DIP(dp, di_blocks); > } > if (qfu) { > fup =3D addid((u_long)DIP(dp, di_uid), USRQUOTA, > (char *)0, mntpt); > fup->fu_curinodes++; > - if (mode =3D=3D IFREG || mode =3D=3D IFDIR || > - mode =3D=3D IFLNK) > + if (mode =3D=3D UFS_IFREG || mode =3D=3D UFS_IFDIR || > + mode =3D=3D UFS_IFLNK) > fup->fu_curblocks +=3D DIP(dp, di_blocks); > } > } >=20 > Modified: head/sbin/restore/dirs.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/sbin/restore/dirs.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/restore/dirs.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -178,7 +178,7 @@ extractdirs(int genmode) > for (;;) { > curfile.name =3D ""; > curfile.action =3D USING; > - if (curfile.mode =3D=3D 0 || (curfile.mode & IFMT) !=3D IFDIR) > + if (curfile.mode =3D=3D 0 || (curfile.mode & UFS_IFMT) !=3D UFS_IFDIR) > break; > itp =3D allocinotab(&curfile, seekpt); > getfile(putdir, putdirattrs, xtrnull); > @@ -205,7 +205,7 @@ void > skipdirs(void) > { > =20 > - while (curfile.ino && (curfile.mode & IFMT) =3D=3D IFDIR) { > + while (curfile.ino && (curfile.mode & UFS_IFMT) =3D=3D UFS_IFDIR) { > skipfile(); > } > } >=20 > Modified: head/sbin/restore/interactive.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/sbin/restore/interactive.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/restore/interactive.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -741,9 +741,9 @@ glob_stat(const char *name, struct stat *stp) > (!vflag && dp->d_ino =3D=3D UFS_WINO)) > return (-1); > if (inodetype(dp->d_ino) =3D=3D NODE) > - stp->st_mode =3D IFDIR; > + stp->st_mode =3D UFS_IFDIR; > else > - stp->st_mode =3D IFREG; > + stp->st_mode =3D UFS_IFREG; > return (0); > } > =20 >=20 > Modified: head/sbin/restore/tape.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/sbin/restore/tape.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/restore/tape.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -592,19 +592,19 @@ extractfile(char *name) > gid =3D curfile.gid; > mode =3D curfile.mode; > flags =3D curfile.file_flags; > - switch (mode & IFMT) { > + switch (mode & UFS_IFMT) { > =20 > default: > fprintf(stderr, "%s: unknown file mode 0%o\n", name, mode); > skipfile(); > return (FAIL); > =20 > - case IFSOCK: > + case UFS_IFSOCK: > vprintf(stdout, "skipped socket %s\n", name); > skipfile(); > return (GOOD); > =20 > - case IFDIR: > + case UFS_IFDIR: > if (mflag) { > ep =3D lookupname(name); > if (ep =3D=3D NULL || ep->e_flags & EXTRACT) > @@ -615,7 +615,7 @@ extractfile(char *name) > vprintf(stdout, "extract file %s\n", name); > return (genliteraldir(name, curfile.ino)); > =20 > - case IFLNK: > + case UFS_IFLNK: > lnkbuf[0] =3D '\0'; > pathlen =3D 0; > buf =3D setupextattr(extsize); > @@ -639,7 +639,7 @@ extractfile(char *name) > } > return (FAIL); > =20 > - case IFIFO: > + case UFS_IFIFO: > vprintf(stdout, "extract fifo %s\n", name); > if (Nflag) { > skipfile(); > @@ -667,8 +667,8 @@ extractfile(char *name) > (void) chflags(name, flags); > return (GOOD); > =20 > - case IFCHR: > - case IFBLK: > + case UFS_IFCHR: > + case UFS_IFBLK: > vprintf(stdout, "extract special file %s\n", name); > if (Nflag) { > skipfile(); > @@ -676,7 +676,7 @@ extractfile(char *name) > } > if (uflag) > (void) unlink(name); > - if (mknod(name, (mode & (IFCHR | IFBLK)) | 0600, > + if (mknod(name, (mode & (UFS_IFCHR | UFS_IFBLK)) | 0600, > (int)curfile.rdev) < 0) { > fprintf(stderr, "%s: cannot create special file: %s\n", > name, strerror(errno)); > @@ -697,7 +697,7 @@ extractfile(char *name) > (void) chflags(name, flags); > return (GOOD); > =20 > - case IFREG: > + case UFS_IFREG: > vprintf(stdout, "extract file %s\n", name); > if (Nflag) { > skipfile(); >=20 > Modified: head/sbin/tunefs/tunefs.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/sbin/tunefs/tunefs.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sbin/tunefs/tunefs.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -1021,7 +1021,7 @@ journal_alloc(int64_t size) > if (sblock.fs_magic =3D=3D FS_UFS1_MAGIC) { > bzero(dp1, sizeof(*dp1)); > dp1->di_size =3D size; > - dp1->di_mode =3D IFREG | IREAD; > + dp1->di_mode =3D UFS_IFREG | UFS_IREAD; > dp1->di_nlink =3D 1; > dp1->di_flags =3D SF_IMMUTABLE | SF_NOUNLINK | UF_NODUMP; > dp1->di_atime =3D utime; > @@ -1030,7 +1030,7 @@ journal_alloc(int64_t size) > } else { > bzero(dp2, sizeof(*dp2)); > dp2->di_size =3D size; > - dp2->di_mode =3D IFREG | IREAD; > + dp2->di_mode =3D UFS_IFREG | UFS_IREAD; > dp2->di_nlink =3D 1; > dp2->di_flags =3D SF_IMMUTABLE | SF_NOUNLINK | UF_NODUMP; > dp2->di_atime =3D utime; >=20 > Modified: head/stand/libsa/nandfs.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/stand/libsa/nandfs.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/stand/libsa/nandfs.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -654,7 +654,7 @@ nandfs_lookup_path(struct nandfs *fs, const char *path > while ((strp =3D strsep(&lpath, "/")) !=3D NULL) { > if (*strp =3D=3D '\0') > continue; > - if ((node->inode->i_mode & IFMT) !=3D IFDIR) { > + if ((node->inode->i_mode & NANDFS_IFMT) !=3D NANDFS_IFDIR) { > nandfs_free_node(node); > node =3D NULL; > goto out; > @@ -710,7 +710,7 @@ nandfs_lookup_path(struct nandfs *fs, const char *path > NANDFS_DEBUG("%s: %.*s has mode %o\n", __func__, > dirent->name_len, dirent->name, node->inode->i_mode); > =20 > - if ((node->inode->i_mode & IFMT) =3D=3D IFLNK) { > + if ((node->inode->i_mode & NANDFS_IFMT) =3D=3D NANDFS_IFLNK) { > NANDFS_DEBUG("%s: %.*s is symlink\n", > __func__, dirent->name_len, dirent->name); > link_len =3D node->inode->i_size; >=20 > Modified: head/stand/libsa/ufs.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/stand/libsa/ufs.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/stand/libsa/ufs.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -557,7 +557,7 @@ ufs_open(upath, f) > /* > * Check that current node is a directory. > */ > - if ((DIP(fp, di_mode) & IFMT) !=3D IFDIR) { > + if ((DIP(fp, di_mode) & UFS_IFMT) !=3D UFS_IFDIR) { > rc =3D ENOTDIR; > goto out; > } > @@ -599,7 +599,7 @@ ufs_open(upath, f) > /* > * Check for symbolic link. > */ > - if ((DIP(fp, di_mode) & IFMT) =3D=3D IFLNK) { > + if ((DIP(fp, di_mode) & UFS_IFMT) =3D=3D UFS_IFLNK) { > int link_len =3D DIP(fp, di_size); > int len; > =20 >=20 > Modified: head/sys/fs/ext2fs/ext2_alloc.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/fs/ext2fs/ext2_alloc.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sys/fs/ext2fs/ext2_alloc.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -393,7 +393,7 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred= =20 > * ext2_dirpref else obtain it using ino_to_cg. The preferred inode is > * always the next inode. > */ > - if ((mode & IFMT) =3D=3D IFDIR) { > + if ((mode & EXT2_IFMT) =3D=3D EXT2_IFDIR) { > cg =3D ext2_dirpref(pip); > if (fs->e2fs_contigdirs[cg] < 255) > fs->e2fs_contigdirs[cg]++; > @@ -1290,7 +1290,7 @@ gotit: > e2fs_gd_get_i_unused(&fs->e2fs_gd[cg]) - 1); > fs->e2fs->e2fs_ficount--; > fs->e2fs_fmod =3D 1; > - if ((mode & IFMT) =3D=3D IFDIR) { > + if ((mode & EXT2_IFMT) =3D=3D EXT2_IFDIR) { > e2fs_gd_set_ndirs(&fs->e2fs_gd[cg], > e2fs_gd_get_ndirs(&fs->e2fs_gd[cg]) + 1); > fs->e2fs_total_dir++; > @@ -1395,7 +1395,7 @@ ext2_vfree(struct vnode *pvp, ino_t ino, int mode) > EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_METADATA_CKSUM)) > e2fs_gd_set_i_unused(&fs->e2fs_gd[cg], > e2fs_gd_get_i_unused(&fs->e2fs_gd[cg]) + 1); > - if ((mode & IFMT) =3D=3D IFDIR) { > + if ((mode & EXT2_IFMT) =3D=3D EXT2_IFDIR) { > e2fs_gd_set_ndirs(&fs->e2fs_gd[cg], > e2fs_gd_get_ndirs(&fs->e2fs_gd[cg]) - 1); > fs->e2fs_total_dir--; >=20 > Modified: head/sys/fs/ext2fs/ext2_dinode.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/fs/ext2fs/ext2_dinode.h Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sys/fs/ext2fs/ext2_dinode.h Sat Mar 17 01:48:27 2018 (r331083) > @@ -105,7 +105,7 @@ > * Structure of an inode on the disk > */ > struct ext2fs_dinode { > - uint16_t e2di_mode; /* 0: IFMT, permissions; see below. */ > + uint16_t e2di_mode; /* 0: EXT2_IFMT, permissions; below.*/ > uint16_t e2di_uid; /* 2: Owner UID */ > uint32_t e2di_size; /* 4: Size (in bytes) */ > uint32_t e2di_atime; /* 8: Access time */ >=20 > Modified: head/sys/fs/ext2fs/ext2_lookup.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/fs/ext2fs/ext2_lookup.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sys/fs/ext2fs/ext2_lookup.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -591,7 +591,7 @@ found: > * may not delete it (unless she's root). This > * implements append-only directories. > */ > - if ((dp->i_mode & ISVTX) && > + if ((dp->i_mode & EXT2_ISVTX) && > cred->cr_uid !=3D 0 && > cred->cr_uid !=3D dp->i_uid && > VTOI(tdp)->i_uid !=3D cred->cr_uid) { >=20 > Modified: head/sys/fs/ext2fs/ext2_vnops.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/fs/ext2fs/ext2_vnops.c Sat Mar 17 01:40:09 2018 (r331082) > +++ head/sys/fs/ext2fs/ext2_vnops.c Sat Mar 17 01:48:27 2018 (r331083) > @@ -352,7 +352,7 @@ ext2_getattr(struct vop_getattr_args *ap) > */ > vap->va_fsid =3D dev2udev(ip->i_devvp->v_rdev); > vap->va_fileid =3D ip->i_number; > - vap->va_mode =3D ip->i_mode & ~IFMT; > + vap->va_mode =3D ip->i_mode & ~EXT2_IFMT; > vap->va_nlink =3D ip->i_nlink; > vap->va_uid =3D ip->i_uid; > vap->va_gid =3D ip->i_gid; > @@ -534,7 +534,7 @@ ext2_chmod(struct vnode *vp, int mode, struct ucred *c > if (error) > return (EFTYPE); > } > - if (!groupmember(ip->i_gid, cred) && (mode & ISGID)) { > + if (!groupmember(ip->i_gid, cred) && (mode & EXT2_ISGID)) { > error =3D priv_check_cred(cred, PRIV_VFS_SETGID, 0); > if (error) > return (error); > @@ -584,9 +584,10 @@ ext2_chown(struct vnode *vp, uid_t uid, gid_t gid, s= tr > ip->i_gid =3D gid; > ip->i_uid =3D uid; > ip->i_flag |=3D IN_CHANGE; > - if ((ip->i_mode & (ISUID | ISGID)) && (ouid !=3D uid || ogid !=3D gid))= { > + if ((ip->i_mode & (EXT2_ISUID | EXT2_ISGID)) && > + (ouid !=3D uid || ogid !=3D gid)) { > if (priv_check_cred(cred, PRIV_VFS_RETAINSUGID, 0) !=3D 0) > - ip->i_mode &=3D ~(ISUID | ISGID); > + ip->i_mode &=3D ~(EXT2_ISUID | EXT2_ISGID); > } > return (0); > } > @@ -843,7 +844,7 @@ abortit: > error =3D EPERM; > goto abortit; > } > - if ((ip->i_mode & IFMT) =3D=3D IFDIR) { > + if ((ip->i_mode & EXT2_IFMT) =3D=3D EXT2_IFDIR) { > /* > * Avoid ".", "..", and aliases of "." for obvious reasons. > */ > @@ -974,7 +975,7 @@ abortit: > * to it. Also, ensure source and target are compatible > * (both directories, or both not directories). > */ > - if ((xp->i_mode & IFMT) =3D=3D IFDIR) { > + if ((xp->i_mode & EXT2_IFMT) =3D=3D EXT2_IFDIR) { > if (!ext2_dirempty(xp, dp->i_number, tcnp->cn_cred)) { > error =3D ENOTEMPTY; > goto bad; > @@ -1318,7 +1319,7 @@ ext2_mkdir(struct vop_mkdir_args *ap) > goto out; > } > dmode =3D vap->va_mode & 0777; > - dmode |=3D IFDIR; > + dmode |=3D EXT2_IFDIR; > /* > * Must simulate part of ext2_makeinode here to acquire the inode, > * but not have it entered in the parent directory. The entry is > @@ -1341,8 +1342,8 @@ ext2_mkdir(struct vop_mkdir_args *ap) > * 'give it away' so that the SUID is still forced on. > */ > if ((dvp->v_mount->mnt_flag & MNT_SUIDDIR) && > - (dp->i_mode & ISUID) && dp->i_uid) { > - dmode |=3D ISUID; > + (dp->i_mode & EXT2_ISUID) && dp->i_uid) { > + dmode |=3D EXT2_ISUID; > ip->i_uid =3D dp->i_uid; > } else { > ip->i_uid =3D cnp->cn_cred->cr_uid; > @@ -1521,7 +1522,7 @@ ext2_symlink(struct vop_symlink_args *ap) > struct inode *ip; > int len, error; >=20 > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" This commit breaks buildworld with error Building /usr/obj/usr/src/amd64.amd64/stand/libsa/nandfs.o --- all_subdir_sbin --- ERROR: ctfmerge: No ctf sections found to merge --- all_subdir_stand --- --- nandfs.o --- /usr/src/stand/libsa/nandfs.c:657:30: error: use of undeclared identifier '= NANDFS_IFMT' if ((node->inode->i_mode & NANDFS_IFMT) !=3D NANDFS_IFDIR) { ^ /usr/src/stand/libsa/nandfs.c:657:46: error: use of undeclared identifier '= NANDFS_IFDIR' if ((node->inode->i_mode & NANDFS_IFMT) !=3D NANDFS_IFDIR) { ^ /usr/src/stand/libsa/nandfs.c:713:30: error: use of undeclared identifier '= NANDFS_IFMT' if ((node->inode->i_mode & NANDFS_IFMT) =3D=3D NANDFS_IFLNK= ) { ^ /usr/src/stand/libsa/nandfs.c:713:46: error: use of undeclared identifier '= NANDFS_IFLNK' if ((node->inode->i_mode & NANDFS_IFMT) =3D=3D NANDFS_IFLNK= ) { ^ 4 errors generated. Kind regards, O. Hartmann --=20 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 Abs.= 4 BDSG). --Sig_/Gv+EGY8gAgcusfzMloOHe2C Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWqy+pAAKCRDS528fyFhY lLg6Af9HQFbQazOmViK2C36LFCh4F03LThhHJAkeQJCLJncIGQMgL+BqtyKhzXJV 6Ym28twjM87xTShb4fvvv5abXyRLAgCcn+ScnVjskQLsvpieY40khsrqQkYese8D UOK2xy4gp0omrCGXhWSf0TsJc5eN5OIMZwD33p6r8YomOMhzDA8a =rXOQ -----END PGP SIGNATURE----- --Sig_/Gv+EGY8gAgcusfzMloOHe2C-- From owner-svn-src-all@freebsd.org Sat Mar 17 07:23:51 2018 Return-Path: Delivered-To: svn-src-all@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 23CF0F4CEED; Sat, 17 Mar 2018 07:23:51 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 8C2C56C063; Sat, 17 Mar 2018 07:23:50 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id AD98E107F7C; Sat, 17 Mar 2018 18:23:40 +1100 (AEDT) Date: Sat, 17 Mar 2018 18:23:39 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ed Maste cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r331083 - in head: lib/libufs sbin/dump sbin/fsck_ffs sbin/fsdb sbin/newfs sbin/quotacheck sbin/restore sbin/tunefs stand/libsa sys/fs/ext2fs sys/fs/nandfs sys/ufs/ffs sys/ufs/ufs usr.s... In-Reply-To: <201803170148.w2H1mR46082991@repo.freebsd.org> Message-ID: <20180317161131.W962@besplex.bde.org> References: <201803170148.w2H1mR46082991@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=OiG0oiQOHz3uAAuwjYQA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 07:23:51 -0000 On Sat, 17 Mar 2018, Ed Maste wrote: > Log: > Prefix UFS symbols with UFS_ to reduce namespace pollution > > Followup to r313780. Also prefix ext2's and nandfs's versions with > EXT2_ and NANDFS_. S_IFMT is already MI. So this churnge is mostly wrong unless file systems do the identity translations from their "internal" IFMT to S_IFMT, etc., everywhere, but they mostly don't. Using IFMT, etc., was correct under the assumption that IFMT is just an old spelling of S_IFMT. Now it is assumed that FOOFS_IFMT is just a new spelling of S_IFMT. There are many more logically different translations that have to be physically the identity to work. UFS_IFMT is a wrong spelling for ffs. If ffs were actually different from ufs, then there would be different file systems layered under ufs (or is it different file systems layered under ffs?). ext2fs needs a separate set of mode macros less than ffs, since it has less trivial translation layer that converts from the on-disk inode to the in-core inode. Translations are less confusing for file flags since they are only the identity for ffs. All file systems use the MI SF_* and convert to that if necessary. ffs assumes that SF_* match its disk encoding and will never change. ext2fs has to do nontrivial translations of file flags and does this at low levels so that upper levels can just use SF_* like ffs, except with no assumptions. File modes should be handled similarly. IFMT is then just a better (shorter) spelling of S_IFMT like it used to be. Bruce From owner-svn-src-all@freebsd.org Sat Mar 17 11:41:08 2018 Return-Path: Delivered-To: svn-src-all@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 D0379F5FCB8; Sat, 17 Mar 2018 11:41:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F5AB772B4; Sat, 17 Mar 2018 11:41:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61AD111F11; Sat, 17 Mar 2018 11:41:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HBf7K8090208; Sat, 17 Mar 2018 11:41:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HBf6f9090203; Sat, 17 Mar 2018 11:41:06 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201803171141.w2HBf6f9090203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 17 Mar 2018 11:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331094 - in head: lib/libmd share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head: lib/libmd share/man/man9 X-SVN-Commit-Revision: 331094 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 11:41:08 -0000 Author: trasz Date: Sat Mar 17 11:41:06 2018 New Revision: 331094 URL: https://svnweb.freebsd.org/changeset/base/331094 Log: Fix formatting errors that resulted in apropos(1) output looking weird. MFC after: 2 weeks Modified: head/lib/libmd/sha512.3 head/share/man/man9/cnv.9 head/share/man/man9/owll.9 head/share/man/man9/rwlock.9 head/share/man/man9/zone.9 Modified: head/lib/libmd/sha512.3 ============================================================================== --- head/lib/libmd/sha512.3 Sat Mar 17 07:04:41 2018 (r331093) +++ head/lib/libmd/sha512.3 Sat Mar 17 11:41:06 2018 (r331094) @@ -26,7 +26,7 @@ .Nm SHA384_End , .Nm SHA384_File , .Nm SHA384_FileChunk , -.Nm SHA384_Data, +.Nm SHA384_Data , .Nm SHA512_256_Init , .Nm SHA512_256_Update , .Nm SHA512_256_Final , Modified: head/share/man/man9/cnv.9 ============================================================================== --- head/share/man/man9/cnv.9 Sat Mar 17 07:04:41 2018 (r331093) +++ head/share/man/man9/cnv.9 Sat Mar 17 11:41:06 2018 (r331094) @@ -29,9 +29,9 @@ .Dt CNV 9 .Os .Sh NAME -.Nm cnvlist_get, -.Nm cnvlist_take, -.Nm cnvlist_free, +.Nm cnvlist_get , +.Nm cnvlist_take , +.Nm cnvlist_free .Nd "API for managing name/value pairs by cookie." .Sh LIBRARY .Lb libnv Modified: head/share/man/man9/owll.9 ============================================================================== --- head/share/man/man9/owll.9 Sat Mar 17 07:04:41 2018 (r331093) +++ head/share/man/man9/owll.9 Sat Mar 17 11:41:06 2018 (r331094) @@ -29,9 +29,9 @@ .Os .Sh NAME .Nm owll -.Nm OWLL_WRITE_ONE, -.Nm OWLL_WRITE_ZERO, -.Nm OWLL_READ_DATA, +.Nm OWLL_WRITE_ONE , +.Nm OWLL_WRITE_ZERO , +.Nm OWLL_READ_DATA , .Nm OWLL_REASET_AND_PRESENCE .Nd Dallas Semiconductor 1-Wire Link Layer Interface .Sh SYNOPSIS Modified: head/share/man/man9/rwlock.9 ============================================================================== --- head/share/man/man9/rwlock.9 Sat Mar 17 07:04:41 2018 (r331093) +++ head/share/man/man9/rwlock.9 Sat Mar 17 11:41:06 2018 (r331094) @@ -30,7 +30,7 @@ .Sh NAME .Nm rwlock , .Nm rw_init , -.Nm rw_init_flags, +.Nm rw_init_flags , .Nm rw_destroy , .Nm rw_rlock , .Nm rw_wlock , Modified: head/share/man/man9/zone.9 ============================================================================== --- head/share/man/man9/zone.9 Sat Mar 17 07:04:41 2018 (r331093) +++ head/share/man/man9/zone.9 Sat Mar 17 11:41:06 2018 (r331094) @@ -35,10 +35,10 @@ .Nm uma_zfree , .Nm uma_zfree_arg , .Nm uma_zdestroy , -.Nm uma_zone_set_max, -.Nm uma_zone_get_max, -.Nm uma_zone_get_cur, -.Nm uma_zone_set_warning, +.Nm uma_zone_set_max , +.Nm uma_zone_get_max , +.Nm uma_zone_get_cur , +.Nm uma_zone_set_warning , .Nm uma_zone_set_maxaction .Nd zone allocator .Sh SYNOPSIS From owner-svn-src-all@freebsd.org Sat Mar 17 12:59:58 2018 Return-Path: Delivered-To: svn-src-all@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 0A1FE32E; Sat, 17 Mar 2018 12:59:58 +0000 (UTC) (envelope-from emaste@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 A96E47AAEC; Sat, 17 Mar 2018 12:59:57 +0000 (UTC) (envelope-from emaste@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 A26A112A76; Sat, 17 Mar 2018 12:59:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HCxvS4028083; Sat, 17 Mar 2018 12:59:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HCxtwJ028059; Sat, 17 Mar 2018 12:59:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803171259.w2HCxtwJ028059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 17 Mar 2018 12:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331095 - in head: lib/libufs sbin/dump sbin/fsck_ffs sbin/fsdb sbin/newfs sbin/quotacheck sbin/restore sbin/tunefs stand/libsa sys/fs/ext2fs sys/fs/nandfs sys/ufs/ffs sys/ufs/ufs usr.s... X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: lib/libufs sbin/dump sbin/fsck_ffs sbin/fsdb sbin/newfs sbin/quotacheck sbin/restore sbin/tunefs stand/libsa sys/fs/ext2fs sys/fs/nandfs sys/ufs/ffs sys/ufs/ufs usr.sbin/quot X-SVN-Commit-Revision: 331095 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 12:59:58 -0000 Author: emaste Date: Sat Mar 17 12:59:55 2018 New Revision: 331095 URL: https://svnweb.freebsd.org/changeset/base/331095 Log: Revert r313780 (UFS_ prefix) Modified: head/lib/libufs/inode.c head/sbin/dump/main.c head/sbin/dump/traverse.c head/sbin/fsck_ffs/dir.c head/sbin/fsck_ffs/fsutil.c head/sbin/fsck_ffs/inode.c head/sbin/fsck_ffs/pass1.c head/sbin/fsck_ffs/pass2.c head/sbin/fsck_ffs/suj.c head/sbin/fsdb/fsdb.c head/sbin/fsdb/fsdbutil.c head/sbin/newfs/mkfs.c head/sbin/quotacheck/quotacheck.c head/sbin/restore/dirs.c head/sbin/restore/interactive.c head/sbin/restore/tape.c head/sbin/tunefs/tunefs.c head/stand/libsa/nandfs.c head/stand/libsa/ufs.c head/sys/fs/ext2fs/ext2_alloc.c head/sys/fs/ext2fs/ext2_dinode.h head/sys/fs/ext2fs/ext2_lookup.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/ext2fs/inode.h head/sys/fs/nandfs/nandfs.h head/sys/fs/nandfs/nandfs_vnops.c head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_vnops.c head/sys/ufs/ffs/softdep.h head/sys/ufs/ufs/dinode.h head/sys/ufs/ufs/inode.h head/sys/ufs/ufs/ufs_lookup.c head/sys/ufs/ufs/ufs_vnops.c head/usr.sbin/quot/quot.c Modified: head/lib/libufs/inode.c ============================================================================== --- head/lib/libufs/inode.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/lib/libufs/inode.c Sat Mar 17 12:59:55 2018 (r331095) @@ -81,12 +81,12 @@ getino(struct uufsd *disk, void **dino, ino_t inode, i gotit: switch (disk->d_ufs) { case 1: dp1 = &((struct ufs1_dinode *)inoblock)[inode - min]; - *mode = dp1->di_mode & UFS_IFMT; + *mode = dp1->di_mode & IFMT; *dino = dp1; return (0); case 2: dp2 = &((struct ufs2_dinode *)inoblock)[inode - min]; - *mode = dp2->di_mode & UFS_IFMT; + *mode = dp2->di_mode & IFMT; *dino = dp2; return (0); default: Modified: head/sbin/dump/main.c ============================================================================== --- head/sbin/dump/main.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/dump/main.c Sat Mar 17 12:59:55 2018 (r331095) @@ -550,7 +550,7 @@ main(int argc, char *argv[]) * Skip directory inodes deleted and maybe reallocated */ dp = getinode(ino, &mode); - if (mode != UFS_IFDIR) + if (mode != IFDIR) continue; (void)dumpino(dp, ino); } @@ -569,7 +569,7 @@ main(int argc, char *argv[]) * Skip inodes deleted and reallocated as directories. */ dp = getinode(ino, &mode); - if (mode == UFS_IFDIR) + if (mode == IFDIR) continue; (void)dumpino(dp, ino); } Modified: head/sbin/dump/traverse.c ============================================================================== --- head/sbin/dump/traverse.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/dump/traverse.c Sat Mar 17 12:59:55 2018 (r331095) @@ -195,7 +195,7 @@ mapfiles(ino_t maxino, long *tapesize) for (i = 0; i < inosused; i++, ino++) { if (ino < UFS_ROOTINO || (dp = getinode(ino, &mode)) == NULL || - (mode & UFS_IFMT) == 0) + (mode & IFMT) == 0) continue; if (ino >= maxino) { msg("Skipping inode %ju >= maxino %ju\n", @@ -209,19 +209,19 @@ mapfiles(ino_t maxino, long *tapesize) * (this is used in mapdirs()). */ SETINO(ino, usedinomap); - if (mode == UFS_IFDIR) + if (mode == IFDIR) SETINO(ino, dumpdirmap); if (WANTTODUMP(dp)) { SETINO(ino, dumpinomap); - if (mode != UFS_IFREG && - mode != UFS_IFDIR && - mode != UFS_IFLNK) + if (mode != IFREG && + mode != IFDIR && + mode != IFLNK) *tapesize += 1; else *tapesize += blockest(dp); continue; } - if (mode == UFS_IFDIR) { + if (mode == IFDIR) { if (!nonodump && (DIP(dp, di_flags) & UF_NODUMP)) CLRINO(ino, usedinomap); @@ -429,7 +429,7 @@ searchdir( * Add back to dumpdirmap and remove from usedinomap * to propagate nodump. */ - if (mode == UFS_IFDIR) { + if (mode == IFDIR) { SETINO(dp->d_ino, dumpdirmap); CLRINO(dp->d_ino, usedinomap); ret |= HASSUBDIRS; @@ -554,7 +554,7 @@ dumpino(union dinode *dp, ino_t ino) default: msg("Warning: undefined file type 0%o\n", - DIP(dp, di_mode) & UFS_IFMT); + DIP(dp, di_mode) & IFMT); return; } if (DIP(dp, di_size) > UFS_NDADDR * sblock->fs_bsize) { @@ -890,11 +890,11 @@ getinode(ino_t inum, int *modep) gotit: if (sblock->fs_magic == FS_UFS1_MAGIC) { dp1 = &((struct ufs1_dinode *)inoblock)[inum - minino]; - *modep = (dp1->di_mode & UFS_IFMT); + *modep = (dp1->di_mode & IFMT); return ((union dinode *)dp1); } dp2 = &((struct ufs2_dinode *)inoblock)[inum - minino]; - *modep = (dp2->di_mode & UFS_IFMT); + *modep = (dp2->di_mode & IFMT); return ((union dinode *)dp2); } Modified: head/sbin/fsck_ffs/dir.c ============================================================================== --- head/sbin/fsck_ffs/dir.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/fsck_ffs/dir.c Sat Mar 17 12:59:55 2018 (r331095) @@ -264,7 +264,7 @@ fileerror(ino_t cwd, ino_t ino, const char *errmesg) dp = ginode(ino); if (ftypeok(dp)) pfatal("%s=%s\n", - (DIP(dp, di_mode) & UFS_IFMT) == UFS_IFDIR ? "DIR" : "FILE", + (DIP(dp, di_mode) & IFMT) == IFDIR ? "DIR" : "FILE", pathbuf); else pfatal("NAME=%s\n", pathbuf); @@ -308,8 +308,7 @@ adjust(struct inodesc *idesc, int lcnt) } if (lcnt != 0) { pwarn("LINK COUNT %s", (lfdir == idesc->id_number) ? lfname : - ((DIP(dp, di_mode) & UFS_IFMT) == UFS_IFDIR ? - "DIR" : "FILE")); + ((DIP(dp, di_mode) & IFMT) == IFDIR ? "DIR" : "FILE")); pinode(idesc->id_number); printf(" COUNT %d SHOULD BE %d", DIP(dp, di_nlink), DIP(dp, di_nlink) - lcnt); @@ -389,7 +388,7 @@ linkup(ino_t orphan, ino_t parentdir, char *name) memset(&idesc, 0, sizeof(struct inodesc)); dp = ginode(orphan); - lostdir = (DIP(dp, di_mode) & UFS_IFMT) == UFS_IFDIR; + lostdir = (DIP(dp, di_mode) & IFMT) == IFDIR; pwarn("UNREF %s ", lostdir ? "DIR" : "FILE"); pinode(orphan); if (preen && DIP(dp, di_size) == 0) @@ -437,7 +436,7 @@ linkup(ino_t orphan, ino_t parentdir, char *name) } } dp = ginode(lfdir); - if ((DIP(dp, di_mode) & UFS_IFMT) != UFS_IFDIR) { + if ((DIP(dp, di_mode) & IFMT) != IFDIR) { pfatal("lost+found IS NOT A DIRECTORY"); if (reply("REALLOCATE") == 0) return (0); @@ -616,7 +615,7 @@ allocdir(ino_t parent, ino_t request, int mode) struct inoinfo *inp; struct dirtemplate *dirp; - ino = allocino(request, UFS_IFDIR|mode); + ino = allocino(request, IFDIR|mode); dirp = &dirhead; dirp->dot_ino = ino; dirp->dotdot_ino = parent; Modified: head/sbin/fsck_ffs/fsutil.c ============================================================================== --- head/sbin/fsck_ffs/fsutil.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/fsck_ffs/fsutil.c Sat Mar 17 12:59:55 2018 (r331095) @@ -100,15 +100,15 @@ fsutilinit(void) int ftypeok(union dinode *dp) { - switch (DIP(dp, di_mode) & UFS_IFMT) { + switch (DIP(dp, di_mode) & IFMT) { - case UFS_IFDIR: - case UFS_IFREG: - case UFS_IFBLK: - case UFS_IFCHR: - case UFS_IFLNK: - case UFS_IFSOCK: - case UFS_IFIFO: + case IFDIR: + case IFREG: + case IFBLK: + case IFCHR: + case IFLNK: + case IFSOCK: + case IFIFO: return (1); default: Modified: head/sbin/fsck_ffs/inode.c ============================================================================== --- head/sbin/fsck_ffs/inode.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/fsck_ffs/inode.c Sat Mar 17 12:59:55 2018 (r331095) @@ -71,8 +71,8 @@ ckinode(union dinode *dp, struct inodesc *idesc) idesc->id_lbn = -1; idesc->id_entryno = 0; idesc->id_filesize = DIP(dp, di_size); - mode = DIP(dp, di_mode) & UFS_IFMT; - if (mode == UFS_IFBLK || mode == UFS_IFCHR || (mode == UFS_IFLNK && + mode = DIP(dp, di_mode) & IFMT; + if (mode == IFBLK || mode == IFCHR || (mode == IFLNK && DIP(dp, di_size) < (unsigned)sblock.fs_maxsymlinklen)) return (KEEPON); if (sblock.fs_magic == FS_UFS1_MAGIC) @@ -347,7 +347,7 @@ getnextinode(ino_t inumber, int rebuildcg) * Try to determine if we have reached the end of the * allocated inodes. */ - mode = DIP(dp, di_mode) & UFS_IFMT; + mode = DIP(dp, di_mode) & IFMT; if (mode == 0) { if (memcmp(dp->dp2.di_db, ufs2_zino.di_db, UFS_NDADDR * sizeof(ufs2_daddr_t)) || @@ -362,9 +362,9 @@ getnextinode(ino_t inumber, int rebuildcg) ndb = howmany(DIP(dp, di_size), sblock.fs_bsize); if (ndb < 0) return (NULL); - if (mode == UFS_IFBLK || mode == UFS_IFCHR) + if (mode == IFBLK || mode == IFCHR) ndb++; - if (mode == UFS_IFLNK) { + if (mode == IFLNK) { /* * Fake ndb value so direct/indirect block checks below * will detect any garbage after symlink string. @@ -533,7 +533,7 @@ clri(struct inodesc *idesc, const char *type, int flag dp = ginode(idesc->id_number); if (flag == 1) { pwarn("%s %s", type, - (DIP(dp, di_mode) & UFS_IFMT) == UFS_IFDIR ? "DIR":"FILE"); + (DIP(dp, di_mode) & IFMT) == IFDIR ? "DIR" : "FILE"); pinode(idesc->id_number); } if (preen || reply("CLEAR") == 1) { @@ -681,13 +681,13 @@ allocino(ino_t request, int type) return (0); setbit(cg_inosused(cgp), ino % sblock.fs_ipg); cgp->cg_cs.cs_nifree--; - switch (type & UFS_IFMT) { - case UFS_IFDIR: + switch (type & IFMT) { + case IFDIR: inoinfo(ino)->ino_state = DSTATE; cgp->cg_cs.cs_ndir++; break; - case UFS_IFREG: - case UFS_IFLNK: + case IFREG: + case IFLNK: inoinfo(ino)->ino_state = FSTATE; break; default: Modified: head/sbin/fsck_ffs/pass1.c ============================================================================== --- head/sbin/fsck_ffs/pass1.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/fsck_ffs/pass1.c Sat Mar 17 12:59:55 2018 (r331095) @@ -251,7 +251,7 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r if ((dp = getnextinode(inumber, rebuildcg)) == NULL) return (0); - mode = DIP(dp, di_mode) & UFS_IFMT; + mode = DIP(dp, di_mode) & IFMT; if (mode == 0) { if ((sblock.fs_magic == FS_UFS1_MAGIC && (memcmp(dp->dp1.di_db, ufs1_zino.di_db, @@ -284,25 +284,25 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r kernmaxfilesize = sblock.fs_maxfilesize; if (DIP(dp, di_size) > kernmaxfilesize || DIP(dp, di_size) > sblock.fs_maxfilesize || - (mode == UFS_IFDIR && DIP(dp, di_size) > MAXDIRSIZE)) { + (mode == IFDIR && DIP(dp, di_size) > MAXDIRSIZE)) { if (debug) printf("bad size %ju:", (uintmax_t)DIP(dp, di_size)); goto unknown; } - if (!preen && mode == UFS_IFMT && reply("HOLD BAD BLOCK") == 1) { + if (!preen && mode == IFMT && reply("HOLD BAD BLOCK") == 1) { dp = ginode(inumber); DIP_SET(dp, di_size, sblock.fs_fsize); - DIP_SET(dp, di_mode, UFS_IFREG|0600); + DIP_SET(dp, di_mode, IFREG|0600); inodirty(); } - if ((mode == UFS_IFBLK || mode == UFS_IFCHR || mode == UFS_IFIFO || - mode == UFS_IFSOCK) && DIP(dp, di_size) != 0) { + if ((mode == IFBLK || mode == IFCHR || mode == IFIFO || + mode == IFSOCK) && DIP(dp, di_size) != 0) { if (debug) printf("bad special-file size %ju:", (uintmax_t)DIP(dp, di_size)); goto unknown; } - if ((mode == UFS_IFBLK || mode == UFS_IFCHR) && + if ((mode == IFBLK || mode == IFCHR) && (dev_t)DIP(dp, di_rdev) == NODEV) { if (debug) printf("bad special-file rdev NODEV:"); @@ -315,9 +315,9 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r (uintmax_t)DIP(dp, di_size), (uintmax_t)ndb); goto unknown; } - if (mode == UFS_IFBLK || mode == UFS_IFCHR) + if (mode == IFBLK || mode == IFCHR) ndb++; - if (mode == UFS_IFLNK) { + if (mode == IFLNK) { /* * Fake ndb value so direct/indirect block checks below * will detect any garbage after symlink string. @@ -357,7 +357,7 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r goto unknown; n_files++; inoinfo(inumber)->ino_linkcnt = DIP(dp, di_nlink); - if (mode == UFS_IFDIR) { + if (mode == IFDIR) { if (DIP(dp, di_size) == 0) inoinfo(inumber)->ino_state = DCLEAR; else if (DIP(dp, di_nlink) <= 0) Modified: head/sbin/fsck_ffs/pass2.c ============================================================================== --- head/sbin/fsck_ffs/pass2.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/fsck_ffs/pass2.c Sat Mar 17 12:59:55 2018 (r331095) @@ -112,8 +112,8 @@ pass2(void) exit(EEXIT); } dp = ginode(UFS_ROOTINO); - DIP_SET(dp, di_mode, DIP(dp, di_mode) & ~UFS_IFMT); - DIP_SET(dp, di_mode, DIP(dp, di_mode) | UFS_IFDIR); + DIP_SET(dp, di_mode, DIP(dp, di_mode) & ~IFMT); + DIP_SET(dp, di_mode, DIP(dp, di_mode) | IFDIR); inodirty(); break; @@ -184,7 +184,7 @@ pass2(void) } dp = &dino; memset(dp, 0, sizeof(struct ufs2_dinode)); - DIP_SET(dp, di_mode, UFS_IFDIR); + DIP_SET(dp, di_mode, IFDIR); DIP_SET(dp, di_size, inp->i_isize); for (i = 0; i < MIN(inp->i_numblks, UFS_NDADDR); i++) DIP_SET(dp, di_db[i], inp->i_blks[i]); @@ -478,8 +478,7 @@ again: break; dp = ginode(dirp->d_ino); inoinfo(dirp->d_ino)->ino_state = - (DIP(dp, di_mode) & UFS_IFMT) == UFS_IFDIR ? - DSTATE : FSTATE; + (DIP(dp, di_mode) & IFMT) == IFDIR ? DSTATE : FSTATE; inoinfo(dirp->d_ino)->ino_linkcnt = DIP(dp, di_nlink); goto again; Modified: head/sbin/fsck_ffs/suj.c ============================================================================== --- head/sbin/fsck_ffs/suj.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/fsck_ffs/suj.c Sat Mar 17 12:59:55 2018 (r331095) @@ -605,7 +605,7 @@ ino_free(ino_t ino, int mode) if (ino < cgp->cg_irotor) cgp->cg_irotor = ino; cgp->cg_cs.cs_nifree++; - if ((mode & UFS_IFMT) == UFS_IFDIR) { + if ((mode & IFMT) == IFDIR) { freedir++; cgp->cg_cs.cs_ndir--; } @@ -748,7 +748,7 @@ ino_blkatoff(union dinode *ip, ino_t ino, ufs_lbn_t lb /* * Now direct and indirect. */ - if (DIP(ip, di_mode) == UFS_IFLNK && + if (DIP(ip, di_mode) == IFLNK && DIP(ip, di_size) < fs->fs_maxsymlinklen) return (0); if (lbn >= 0 && lbn < UFS_NDADDR) { @@ -853,7 +853,7 @@ ino_isat(ino_t parent, off_t diroff, ino_t child, int *isdot = 0; dip = ino_read(parent); *mode = DIP(dip, di_mode); - if ((*mode & UFS_IFMT) != UFS_IFDIR) { + if ((*mode & IFMT) != IFDIR) { if (debug) { /* * This can happen if the parent inode @@ -1013,7 +1013,7 @@ ino_visit(union dinode *ip, ino_t ino, ino_visitor vis int i; size = DIP(ip, di_size); - mode = DIP(ip, di_mode) & UFS_IFMT; + mode = DIP(ip, di_mode) & IFMT; fragcnt = 0; if ((flags & VISIT_EXT) && fs->fs_magic == FS_UFS2_MAGIC && ip->dp2.di_extsize) { @@ -1027,8 +1027,8 @@ ino_visit(union dinode *ip, ino_t ino, ino_visitor vis } } /* Skip datablocks for short links and devices. */ - if (mode == UFS_IFBLK || mode == UFS_IFCHR || - (mode == UFS_IFLNK && size < fs->fs_maxsymlinklen)) + if (mode == IFBLK || mode == IFCHR || + (mode == IFLNK && size < fs->fs_maxsymlinklen)) return (fragcnt); for (i = 0; i < UFS_NDADDR; i++) { if (DIP(ip, di_db[i]) == 0) @@ -1265,7 +1265,7 @@ ino_reclaim(union dinode *ip, ino_t ino, int mode) (uintmax_t)ino, DIP(ip, di_nlink), DIP(ip, di_mode)); /* We are freeing an inode or directory. */ - if ((DIP(ip, di_mode) & UFS_IFMT) == UFS_IFDIR) + if ((DIP(ip, di_mode) & IFMT) == IFDIR) ino_visit(ip, ino, ino_free_children, 0); DIP_SET(ip, di_nlink, 0); ino_visit(ip, ino, blk_free_visit, VISIT_EXT | VISIT_INDIR); @@ -1300,7 +1300,7 @@ ino_decr(ino_t ino) if (mode == 0) err_suj("Inode %d has a link of %d with 0 mode\n", ino, nlink); nlink--; - if ((mode & UFS_IFMT) == UFS_IFDIR) + if ((mode & IFMT) == IFDIR) reqlink = 2; else reqlink = 1; @@ -1335,13 +1335,13 @@ ino_adjust(struct suj_ino *sino) nlink = sino->si_nlink; ino = sino->si_ino; - mode = sino->si_mode & UFS_IFMT; + mode = sino->si_mode & IFMT; /* * If it's a directory with no dot links, it was truncated before * the name was cleared. We need to clear the dirent that * points at it. */ - if (mode == UFS_IFDIR && nlink == 1 && sino->si_dotlinks == 0) { + if (mode == IFDIR && nlink == 1 && sino->si_dotlinks == 0) { sino->si_nlink = nlink = 0; TAILQ_FOREACH(srec, &sino->si_recs, sr_next) { rrec = (struct jrefrec *)srec->sr_rec; @@ -1358,7 +1358,7 @@ ino_adjust(struct suj_ino *sino) * If it's a directory with no real names pointing to it go ahead * and truncate it. This will free any children. */ - if (mode == UFS_IFDIR && nlink - sino->si_dotlinks == 0) { + if (mode == IFDIR && nlink - sino->si_dotlinks == 0) { sino->si_nlink = nlink = 0; /* * Mark any .. links so they know not to free this inode @@ -1374,7 +1374,7 @@ ino_adjust(struct suj_ino *sino) } } ip = ino_read(ino); - mode = DIP(ip, di_mode) & UFS_IFMT; + mode = DIP(ip, di_mode) & IFMT; if (nlink > UFS_LINK_MAX) err_suj("ino %ju nlink manipulation error, new %ju, old %d\n", (uintmax_t)ino, (uintmax_t)nlink, DIP(ip, di_nlink)); @@ -1393,7 +1393,7 @@ ino_adjust(struct suj_ino *sino) if (mode != sino->si_mode && debug) printf("ino %ju, mode %o != %o\n", (uintmax_t)ino, mode, sino->si_mode); - if ((mode & UFS_IFMT) == UFS_IFDIR) + if ((mode & IFMT) == IFDIR) reqlink = 2; else reqlink = 1; @@ -1506,15 +1506,15 @@ ino_trunc(ino_t ino, off_t size) int mode; ip = ino_read(ino); - mode = DIP(ip, di_mode) & UFS_IFMT; + mode = DIP(ip, di_mode) & IFMT; cursize = DIP(ip, di_size); if (debug) printf("Truncating ino %ju, mode %o to size %jd from size %jd\n", (uintmax_t)ino, mode, size, cursize); /* Skip datablocks for short links and devices. */ - if (mode == 0 || mode == UFS_IFBLK || mode == UFS_IFCHR || - (mode == UFS_IFLNK && cursize < fs->fs_maxsymlinklen)) + if (mode == 0 || mode == IFBLK || mode == IFCHR || + (mode == IFLNK && cursize < fs->fs_maxsymlinklen)) return; /* Don't extend. */ if (size > cursize) @@ -1587,7 +1587,7 @@ ino_trunc(ino_t ino, off_t size) * uninitialized space later. */ off = blkoff(fs, size); - if (off && DIP(ip, di_mode) != UFS_IFDIR) { + if (off && DIP(ip, di_mode) != IFDIR) { uint8_t *buf; long clrsize; @@ -1635,7 +1635,7 @@ ino_check(struct suj_ino *sino) rrec = (struct jrefrec *)srec->sr_rec; isat = ino_isat(rrec->jr_parent, rrec->jr_diroff, rrec->jr_ino, &mode, &isdot); - if (isat && (mode & UFS_IFMT) != (rrec->jr_mode & UFS_IFMT)) + if (isat && (mode & IFMT) != (rrec->jr_mode & IFMT)) err_suj("Inode mode/directory type mismatch %o != %o\n", mode, rrec->jr_mode); if (debug) @@ -1646,7 +1646,7 @@ ino_check(struct suj_ino *sino) (uintmax_t)rrec->jr_parent, (uintmax_t)rrec->jr_diroff, rrec->jr_mode, isat, isdot); - mode = rrec->jr_mode & UFS_IFMT; + mode = rrec->jr_mode & IFMT; if (rrec->jr_op == JOP_REMREF) removes++; newlinks += isat; @@ -1915,7 +1915,7 @@ ino_unlinked(void) fs->fs_sujfree = 0; while (ino != 0) { ip = ino_read(ino); - mode = DIP(ip, di_mode) & UFS_IFMT; + mode = DIP(ip, di_mode) & IFMT; inon = DIP(ip, di_freelink); DIP_SET(ip, di_freelink, 0); /* @@ -2371,7 +2371,7 @@ suj_verifyino(union dinode *ip) return (-1); } - if (DIP(ip, di_mode) != (UFS_IFREG | UFS_IREAD)) { + if (DIP(ip, di_mode) != (IFREG | IREAD)) { printf("Invalid mode %o for journal inode %ju\n", DIP(ip, di_mode), (uintmax_t)sujino); return (-1); Modified: head/sbin/fsdb/fsdb.c ============================================================================== --- head/sbin/fsdb/fsdb.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/fsdb/fsdb.c Sat Mar 17 12:59:55 2018 (r331095) @@ -512,14 +512,14 @@ CMDFUNCSTART(findblk) /* Get on-disk inode aka dinode. */ curinum = inum; curinode = ginode(inum); - /* Find UFS_IFLNK dinode with allocated data blocks. */ - switch (DIP(curinode, di_mode) & UFS_IFMT) { - case UFS_IFDIR: - case UFS_IFREG: + /* Find IFLNK dinode with allocated data blocks. */ + switch (DIP(curinode, di_mode) & IFMT) { + case IFDIR: + case IFREG: if (DIP(curinode, di_blocks) == 0) continue; break; - case UFS_IFLNK: + case IFLNK: { uint64_t size = DIP(curinode, di_size); if (size > 0 && size < sblock.fs_maxsymlinklen && @@ -889,10 +889,10 @@ struct typemap { const char *typename; int typebits; } typenamemap[] = { - {"file", UFS_IFREG}, - {"dir", UFS_IFDIR}, - {"socket", UFS_IFSOCK}, - {"fifo", UFS_IFIFO}, + {"file", IFREG}, + {"dir", IFDIR}, + {"socket", IFSOCK}, + {"fifo", IFIFO}, }; CMDFUNCSTART(newtype) @@ -902,7 +902,7 @@ CMDFUNCSTART(newtype) if (!checkactive()) return 1; - type = DIP(curinode, di_mode) & UFS_IFMT; + type = DIP(curinode, di_mode) & IFMT; for (tp = typenamemap; tp < &typenamemap[nitems(typenamemap)]; tp++) { @@ -917,7 +917,7 @@ CMDFUNCSTART(newtype) warnx("try one of `file', `dir', `socket', `fifo'"); return 1; } - DIP_SET(curinode, di_mode, DIP(curinode, di_mode) & ~UFS_IFMT); + DIP_SET(curinode, di_mode, DIP(curinode, di_mode) & ~IFMT); DIP_SET(curinode, di_mode, DIP(curinode, di_mode) | type); inodirty(); printactive(0); Modified: head/sbin/fsdb/fsdbutil.c ============================================================================== --- head/sbin/fsdb/fsdbutil.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/fsdb/fsdbutil.c Sat Mar 17 12:59:55 2018 (r331095) @@ -120,20 +120,20 @@ printstat(const char *cp, ino_t inum, union dinode *dp time_t t; printf("%s: ", cp); - switch (DIP(dp, di_mode) & UFS_IFMT) { - case UFS_IFDIR: + switch (DIP(dp, di_mode) & IFMT) { + case IFDIR: puts("directory"); break; - case UFS_IFREG: + case IFREG: puts("regular file"); break; - case UFS_IFBLK: + case IFBLK: printf("block special (%#jx)", (uintmax_t)DIP(dp, di_rdev)); break; - case UFS_IFCHR: + case IFCHR: printf("character special (%#jx)", DIP(dp, di_rdev)); break; - case UFS_IFLNK: + case IFLNK: fputs("symlink",stdout); if (DIP(dp, di_size) > 0 && DIP(dp, di_size) < sblock.fs_maxsymlinklen && @@ -147,10 +147,10 @@ printstat(const char *cp, ino_t inum, union dinode *dp putchar('\n'); } break; - case UFS_IFSOCK: + case IFSOCK: puts("socket"); break; - case UFS_IFIFO: + case IFIFO: puts("fifo"); break; } @@ -338,7 +338,7 @@ checkactivedir(void) warnx("no current inode\n"); return 0; } - if ((DIP(curinode, di_mode) & UFS_IFMT) != UFS_IFDIR) { + if ((DIP(curinode, di_mode) & IFMT) != IFDIR) { warnx("inode %ju not a directory", (uintmax_t)curinum); return 0; } @@ -350,14 +350,14 @@ printactive(int doblocks) { if (!checkactive()) return 1; - switch (DIP(curinode, di_mode) & UFS_IFMT) { - case UFS_IFDIR: - case UFS_IFREG: - case UFS_IFBLK: - case UFS_IFCHR: - case UFS_IFLNK: - case UFS_IFSOCK: - case UFS_IFIFO: + switch (DIP(curinode, di_mode) & IFMT) { + case IFDIR: + case IFREG: + case IFBLK: + case IFCHR: + case IFLNK: + case IFSOCK: + case IFIFO: if (doblocks) printblocks(curinum, curinode); else @@ -368,7 +368,7 @@ printactive(int doblocks) break; default: printf("current inode %ju: screwy itype 0%o (mode 0%o)?\n", - (uintmax_t)curinum, DIP(curinode, di_mode) & UFS_IFMT, + (uintmax_t)curinum, DIP(curinode, di_mode) & IFMT, DIP(curinode, di_mode)); break; } Modified: head/sbin/newfs/mkfs.c ============================================================================== --- head/sbin/newfs/mkfs.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/newfs/mkfs.c Sat Mar 17 12:59:55 2018 (r331095) @@ -883,7 +883,7 @@ fsinit(time_t utime) /* * create the root directory */ - node.dp1.di_mode = UFS_IFDIR | UMASK; + node.dp1.di_mode = IFDIR | UMASK; node.dp1.di_nlink = entries; node.dp1.di_size = makedir(root_dir, entries); node.dp1.di_db[0] = alloc(sblock.fs_fsize, node.dp1.di_mode); @@ -919,7 +919,7 @@ fsinit(time_t utime) /* * create the root directory */ - node.dp2.di_mode = UFS_IFDIR | UMASK; + node.dp2.di_mode = IFDIR | UMASK; node.dp2.di_nlink = entries; node.dp2.di_size = makedir(root_dir, entries); node.dp2.di_db[0] = alloc(sblock.fs_fsize, node.dp2.di_mode); @@ -1002,7 +1002,7 @@ goth: acg.cg_cs.cs_nbfree--; sblock.fs_cstotal.cs_nbfree--; fscs[0].cs_nbfree--; - if (mode & UFS_IFDIR) { + if (mode & IFDIR) { acg.cg_cs.cs_ndir++; sblock.fs_cstotal.cs_ndir++; fscs[0].cs_ndir++; Modified: head/sbin/quotacheck/quotacheck.c ============================================================================== --- head/sbin/quotacheck/quotacheck.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/quotacheck/quotacheck.c Sat Mar 17 12:59:55 2018 (r331095) @@ -370,7 +370,7 @@ chkquota(char *specname, struct quotafile *qfu, struct for (i = 0; i < inosused; i++, ino++) { if ((dp = getnextinode(ino)) == NULL || ino < UFS_ROOTINO || - (mode = DIP(dp, di_mode) & UFS_IFMT) == 0) + (mode = DIP(dp, di_mode) & IFMT) == 0) continue; /* * XXX: Do not account for UIDs or GIDs that appear @@ -405,16 +405,16 @@ chkquota(char *specname, struct quotafile *qfu, struct fup = addid((u_long)DIP(dp, di_gid), GRPQUOTA, (char *)0, mntpt); fup->fu_curinodes++; - if (mode == UFS_IFREG || mode == UFS_IFDIR || - mode == UFS_IFLNK) + if (mode == IFREG || mode == IFDIR || + mode == IFLNK) fup->fu_curblocks += DIP(dp, di_blocks); } if (qfu) { fup = addid((u_long)DIP(dp, di_uid), USRQUOTA, (char *)0, mntpt); fup->fu_curinodes++; - if (mode == UFS_IFREG || mode == UFS_IFDIR || - mode == UFS_IFLNK) + if (mode == IFREG || mode == IFDIR || + mode == IFLNK) fup->fu_curblocks += DIP(dp, di_blocks); } } Modified: head/sbin/restore/dirs.c ============================================================================== --- head/sbin/restore/dirs.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/restore/dirs.c Sat Mar 17 12:59:55 2018 (r331095) @@ -178,7 +178,7 @@ extractdirs(int genmode) for (;;) { curfile.name = ""; curfile.action = USING; - if (curfile.mode == 0 || (curfile.mode & UFS_IFMT) != UFS_IFDIR) + if (curfile.mode == 0 || (curfile.mode & IFMT) != IFDIR) break; itp = allocinotab(&curfile, seekpt); getfile(putdir, putdirattrs, xtrnull); @@ -205,7 +205,7 @@ void skipdirs(void) { - while (curfile.ino && (curfile.mode & UFS_IFMT) == UFS_IFDIR) { + while (curfile.ino && (curfile.mode & IFMT) == IFDIR) { skipfile(); } } Modified: head/sbin/restore/interactive.c ============================================================================== --- head/sbin/restore/interactive.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/restore/interactive.c Sat Mar 17 12:59:55 2018 (r331095) @@ -741,9 +741,9 @@ glob_stat(const char *name, struct stat *stp) (!vflag && dp->d_ino == UFS_WINO)) return (-1); if (inodetype(dp->d_ino) == NODE) - stp->st_mode = UFS_IFDIR; + stp->st_mode = IFDIR; else - stp->st_mode = UFS_IFREG; + stp->st_mode = IFREG; return (0); } Modified: head/sbin/restore/tape.c ============================================================================== --- head/sbin/restore/tape.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/restore/tape.c Sat Mar 17 12:59:55 2018 (r331095) @@ -592,19 +592,19 @@ extractfile(char *name) gid = curfile.gid; mode = curfile.mode; flags = curfile.file_flags; - switch (mode & UFS_IFMT) { + switch (mode & IFMT) { default: fprintf(stderr, "%s: unknown file mode 0%o\n", name, mode); skipfile(); return (FAIL); - case UFS_IFSOCK: + case IFSOCK: vprintf(stdout, "skipped socket %s\n", name); skipfile(); return (GOOD); - case UFS_IFDIR: + case IFDIR: if (mflag) { ep = lookupname(name); if (ep == NULL || ep->e_flags & EXTRACT) @@ -615,7 +615,7 @@ extractfile(char *name) vprintf(stdout, "extract file %s\n", name); return (genliteraldir(name, curfile.ino)); - case UFS_IFLNK: + case IFLNK: lnkbuf[0] = '\0'; pathlen = 0; buf = setupextattr(extsize); @@ -639,7 +639,7 @@ extractfile(char *name) } return (FAIL); - case UFS_IFIFO: + case IFIFO: vprintf(stdout, "extract fifo %s\n", name); if (Nflag) { skipfile(); @@ -667,8 +667,8 @@ extractfile(char *name) (void) chflags(name, flags); return (GOOD); - case UFS_IFCHR: - case UFS_IFBLK: + case IFCHR: + case IFBLK: vprintf(stdout, "extract special file %s\n", name); if (Nflag) { skipfile(); @@ -676,7 +676,7 @@ extractfile(char *name) } if (uflag) (void) unlink(name); - if (mknod(name, (mode & (UFS_IFCHR | UFS_IFBLK)) | 0600, + if (mknod(name, (mode & (IFCHR | IFBLK)) | 0600, (int)curfile.rdev) < 0) { fprintf(stderr, "%s: cannot create special file: %s\n", name, strerror(errno)); @@ -697,7 +697,7 @@ extractfile(char *name) (void) chflags(name, flags); return (GOOD); - case UFS_IFREG: + case IFREG: vprintf(stdout, "extract file %s\n", name); if (Nflag) { skipfile(); Modified: head/sbin/tunefs/tunefs.c ============================================================================== --- head/sbin/tunefs/tunefs.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sbin/tunefs/tunefs.c Sat Mar 17 12:59:55 2018 (r331095) @@ -1021,7 +1021,7 @@ journal_alloc(int64_t size) if (sblock.fs_magic == FS_UFS1_MAGIC) { bzero(dp1, sizeof(*dp1)); dp1->di_size = size; - dp1->di_mode = UFS_IFREG | UFS_IREAD; + dp1->di_mode = IFREG | IREAD; dp1->di_nlink = 1; dp1->di_flags = SF_IMMUTABLE | SF_NOUNLINK | UF_NODUMP; dp1->di_atime = utime; @@ -1030,7 +1030,7 @@ journal_alloc(int64_t size) } else { bzero(dp2, sizeof(*dp2)); dp2->di_size = size; - dp2->di_mode = UFS_IFREG | UFS_IREAD; + dp2->di_mode = IFREG | IREAD; dp2->di_nlink = 1; dp2->di_flags = SF_IMMUTABLE | SF_NOUNLINK | UF_NODUMP; dp2->di_atime = utime; Modified: head/stand/libsa/nandfs.c ============================================================================== --- head/stand/libsa/nandfs.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/stand/libsa/nandfs.c Sat Mar 17 12:59:55 2018 (r331095) @@ -654,7 +654,7 @@ nandfs_lookup_path(struct nandfs *fs, const char *path while ((strp = strsep(&lpath, "/")) != NULL) { if (*strp == '\0') continue; - if ((node->inode->i_mode & NANDFS_IFMT) != NANDFS_IFDIR) { + if ((node->inode->i_mode & IFMT) != IFDIR) { nandfs_free_node(node); node = NULL; goto out; @@ -710,7 +710,7 @@ nandfs_lookup_path(struct nandfs *fs, const char *path NANDFS_DEBUG("%s: %.*s has mode %o\n", __func__, dirent->name_len, dirent->name, node->inode->i_mode); - if ((node->inode->i_mode & NANDFS_IFMT) == NANDFS_IFLNK) { + if ((node->inode->i_mode & IFMT) == IFLNK) { NANDFS_DEBUG("%s: %.*s is symlink\n", __func__, dirent->name_len, dirent->name); link_len = node->inode->i_size; Modified: head/stand/libsa/ufs.c ============================================================================== --- head/stand/libsa/ufs.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/stand/libsa/ufs.c Sat Mar 17 12:59:55 2018 (r331095) @@ -557,7 +557,7 @@ ufs_open(upath, f) /* * Check that current node is a directory. */ - if ((DIP(fp, di_mode) & UFS_IFMT) != UFS_IFDIR) { + if ((DIP(fp, di_mode) & IFMT) != IFDIR) { rc = ENOTDIR; goto out; } @@ -599,7 +599,7 @@ ufs_open(upath, f) /* * Check for symbolic link. */ - if ((DIP(fp, di_mode) & UFS_IFMT) == UFS_IFLNK) { + if ((DIP(fp, di_mode) & IFMT) == IFLNK) { int link_len = DIP(fp, di_size); int len; Modified: head/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- head/sys/fs/ext2fs/ext2_alloc.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sys/fs/ext2fs/ext2_alloc.c Sat Mar 17 12:59:55 2018 (r331095) @@ -393,7 +393,7 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred * ext2_dirpref else obtain it using ino_to_cg. The preferred inode is * always the next inode. */ - if ((mode & EXT2_IFMT) == EXT2_IFDIR) { + if ((mode & IFMT) == IFDIR) { cg = ext2_dirpref(pip); if (fs->e2fs_contigdirs[cg] < 255) fs->e2fs_contigdirs[cg]++; @@ -1290,7 +1290,7 @@ gotit: e2fs_gd_get_i_unused(&fs->e2fs_gd[cg]) - 1); fs->e2fs->e2fs_ficount--; fs->e2fs_fmod = 1; - if ((mode & EXT2_IFMT) == EXT2_IFDIR) { + if ((mode & IFMT) == IFDIR) { e2fs_gd_set_ndirs(&fs->e2fs_gd[cg], e2fs_gd_get_ndirs(&fs->e2fs_gd[cg]) + 1); fs->e2fs_total_dir++; @@ -1395,7 +1395,7 @@ ext2_vfree(struct vnode *pvp, ino_t ino, int mode) EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_METADATA_CKSUM)) e2fs_gd_set_i_unused(&fs->e2fs_gd[cg], e2fs_gd_get_i_unused(&fs->e2fs_gd[cg]) + 1); - if ((mode & EXT2_IFMT) == EXT2_IFDIR) { + if ((mode & IFMT) == IFDIR) { e2fs_gd_set_ndirs(&fs->e2fs_gd[cg], e2fs_gd_get_ndirs(&fs->e2fs_gd[cg]) - 1); fs->e2fs_total_dir--; Modified: head/sys/fs/ext2fs/ext2_dinode.h ============================================================================== --- head/sys/fs/ext2fs/ext2_dinode.h Sat Mar 17 11:41:06 2018 (r331094) +++ head/sys/fs/ext2fs/ext2_dinode.h Sat Mar 17 12:59:55 2018 (r331095) @@ -105,7 +105,7 @@ * Structure of an inode on the disk */ struct ext2fs_dinode { - uint16_t e2di_mode; /* 0: EXT2_IFMT, permissions; below.*/ + uint16_t e2di_mode; /* 0: IFMT, permissions; see below. */ uint16_t e2di_uid; /* 2: Owner UID */ uint32_t e2di_size; /* 4: Size (in bytes) */ uint32_t e2di_atime; /* 8: Access time */ Modified: head/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- head/sys/fs/ext2fs/ext2_lookup.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sys/fs/ext2fs/ext2_lookup.c Sat Mar 17 12:59:55 2018 (r331095) @@ -591,7 +591,7 @@ found: * may not delete it (unless she's root). This * implements append-only directories. */ - if ((dp->i_mode & EXT2_ISVTX) && + if ((dp->i_mode & ISVTX) && cred->cr_uid != 0 && cred->cr_uid != dp->i_uid && VTOI(tdp)->i_uid != cred->cr_uid) { Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Sat Mar 17 11:41:06 2018 (r331094) +++ head/sys/fs/ext2fs/ext2_vnops.c Sat Mar 17 12:59:55 2018 (r331095) @@ -352,7 +352,7 @@ ext2_getattr(struct vop_getattr_args *ap) */ vap->va_fsid = dev2udev(ip->i_devvp->v_rdev); vap->va_fileid = ip->i_number; - vap->va_mode = ip->i_mode & ~EXT2_IFMT; + vap->va_mode = ip->i_mode & ~IFMT; vap->va_nlink = ip->i_nlink; vap->va_uid = ip->i_uid; vap->va_gid = ip->i_gid; @@ -534,7 +534,7 @@ ext2_chmod(struct vnode *vp, int mode, struct ucred *c if (error) return (EFTYPE); } - if (!groupmember(ip->i_gid, cred) && (mode & EXT2_ISGID)) { + if (!groupmember(ip->i_gid, cred) && (mode & ISGID)) { error = priv_check_cred(cred, PRIV_VFS_SETGID, 0); if (error) return (error); @@ -584,10 +584,9 @@ ext2_chown(struct vnode *vp, uid_t uid, gid_t gid, str ip->i_gid = gid; ip->i_uid = uid; ip->i_flag |= IN_CHANGE; - if ((ip->i_mode & (EXT2_ISUID | EXT2_ISGID)) && - (ouid != uid || ogid != gid)) { + if ((ip->i_mode & (ISUID | ISGID)) && (ouid != uid || ogid != gid)) { if (priv_check_cred(cred, PRIV_VFS_RETAINSUGID, 0) != 0) - ip->i_mode &= ~(EXT2_ISUID | EXT2_ISGID); + ip->i_mode &= ~(ISUID | ISGID); } return (0); } @@ -844,7 +843,7 @@ abortit: error = EPERM; goto abortit; } - if ((ip->i_mode & EXT2_IFMT) == EXT2_IFDIR) { + if ((ip->i_mode & IFMT) == IFDIR) { /* * Avoid ".", "..", and aliases of "." for obvious reasons. */ @@ -975,7 +974,7 @@ abortit: * to it. Also, ensure source and target are compatible * (both directories, or both not directories). */ - if ((xp->i_mode & EXT2_IFMT) == EXT2_IFDIR) { + if ((xp->i_mode & IFMT) == IFDIR) { if (!ext2_dirempty(xp, dp->i_number, tcnp->cn_cred)) { error = ENOTEMPTY; goto bad; @@ -1319,7 +1318,7 @@ ext2_mkdir(struct vop_mkdir_args *ap) goto out; } dmode = vap->va_mode & 0777; - dmode |= EXT2_IFDIR; + dmode |= IFDIR; /* * Must simulate part of ext2_makeinode here to acquire the inode, * but not have it entered in the parent directory. The entry is @@ -1342,8 +1341,8 @@ ext2_mkdir(struct vop_mkdir_args *ap) * 'give it away' so that the SUID is still forced on. */ if ((dvp->v_mount->mnt_flag & MNT_SUIDDIR) && - (dp->i_mode & EXT2_ISUID) && dp->i_uid) { - dmode |= EXT2_ISUID; + (dp->i_mode & ISUID) && dp->i_uid) { + dmode |= ISUID; ip->i_uid = dp->i_uid; } else { ip->i_uid = cnp->cn_cred->cr_uid; @@ -1522,7 +1521,7 @@ ext2_symlink(struct vop_symlink_args *ap) struct inode *ip; int len, error; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Mar 17 14:50:21 2018 Return-Path: Delivered-To: svn-src-all@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 7A6B7F4F39B; Sat, 17 Mar 2018 14:50:21 +0000 (UTC) (envelope-from emaste@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 2112E7F482; Sat, 17 Mar 2018 14:50:21 +0000 (UTC) (envelope-from emaste@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 1620C13BBA; Sat, 17 Mar 2018 14:50:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HEoKXB083689; Sat, 17 Mar 2018 14:50:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HEoKXK083688; Sat, 17 Mar 2018 14:50:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201803171450.w2HEoKXK083688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 17 Mar 2018 14:50:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331096 - head/sys/modules/hyperv/vmbus X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/modules/hyperv/vmbus X-SVN-Commit-Revision: 331096 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 14:50:21 -0000 Author: emaste Date: Sat Mar 17 14:50:20 2018 New Revision: 331096 URL: https://svnweb.freebsd.org/changeset/base/331096 Log: Move assym.s to DPSRCS in vmbus module assym.s is only to be included by other .s files, and should not actually be assembled by itself. Modified: head/sys/modules/hyperv/vmbus/Makefile Modified: head/sys/modules/hyperv/vmbus/Makefile ============================================================================== --- head/sys/modules/hyperv/vmbus/Makefile Sat Mar 17 12:59:55 2018 (r331095) +++ head/sys/modules/hyperv/vmbus/Makefile Sat Mar 17 14:50:20 2018 (r331096) @@ -13,6 +13,7 @@ SRCS= hyperv.c \ vmbus_et.c \ vmbus_if.c \ vmbus_res.c \ + vmbus_vector.S \ vmbus_xact.c SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h pci_if.h pcib_if.h vmbus_if.h @@ -22,8 +23,7 @@ SRCS+= opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h SRCS+= opt_apic.h .endif -SRCS+= assym.s \ - vmbus_vector.S +DPSRCS+= assym.s vmbus_vector.o: ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ From owner-svn-src-all@freebsd.org Sat Mar 17 16:04:07 2018 Return-Path: Delivered-To: svn-src-all@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 468FCF548D5; Sat, 17 Mar 2018 16:04:07 +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 EEA5F82296; Sat, 17 Mar 2018 16:04:06 +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 E981114866; Sat, 17 Mar 2018 16:04:06 +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 w2HG46i2024373; Sat, 17 Mar 2018 16:04:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HG46RM024372; Sat, 17 Mar 2018 16:04:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803171604.w2HG46RM024372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Mar 2018 16:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331097 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 331097 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 16:04:07 -0000 Author: imp Date: Sat Mar 17 16:04:06 2018 New Revision: 331097 URL: https://svnweb.freebsd.org/changeset/base/331097 Log: Only take out the periph lock when we're modifying the flags of the softc for an async unit attention. CAM locks, sometimes, the periph lock and other times does not. We were taking the lock always and running into lock recursion issues on a non-recursive lock. Now we take it selectively. It's not clear why xpt takes the lock selectively before calling us, though, and that's still under investigation. Reported by: avg PR: 226510 (same panic, differnt circumstances) Sponsored by: Netflix Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Sat Mar 17 14:50:20 2018 (r331096) +++ head/sys/cam/scsi/scsi_da.c Sat Mar 17 16:04:06 2018 (r331097) @@ -2039,26 +2039,30 @@ daasync(void *callback_arg, u_int32_t code, * Handle all UNIT ATTENTIONs except our own, * as they will be handled by daerror(). */ - cam_periph_lock(periph); if (xpt_path_periph(ccb->ccb_h.path) != periph && scsi_extract_sense_ccb(ccb, &error_code, &sense_key, &asc, &ascq)) { if (asc == 0x2A && ascq == 0x09) { xpt_print(ccb->ccb_h.path, "Capacity data has changed\n"); + cam_periph_lock(periph); softc->flags &= ~DA_FLAG_PROBED; + cam_periph_unlock(periph); dareprobe(periph); } else if (asc == 0x28 && ascq == 0x00) { + cam_periph_lock(periph); softc->flags &= ~DA_FLAG_PROBED; + cam_periph_unlock(periph); disk_media_changed(softc->disk, M_NOWAIT); } else if (asc == 0x3F && ascq == 0x03) { xpt_print(ccb->ccb_h.path, "INQUIRY data has changed\n"); + cam_periph_lock(periph); softc->flags &= ~DA_FLAG_PROBED; + cam_periph_unlock(periph); dareprobe(periph); } } - cam_periph_unlock(periph); break; } case AC_SCSI_AEN: From owner-svn-src-all@freebsd.org Sat Mar 17 17:05:49 2018 Return-Path: Delivered-To: svn-src-all@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 A4FE8F58EBB; Sat, 17 Mar 2018 17:05:49 +0000 (UTC) (envelope-from melifaro@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 5092484756; Sat, 17 Mar 2018 17:05:49 +0000 (UTC) (envelope-from melifaro@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 47FFF151B5; Sat, 17 Mar 2018 17:05:49 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HH5nCO054262; Sat, 17 Mar 2018 17:05:49 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HH5mk1054256; Sat, 17 Mar 2018 17:05:48 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201803171705.w2HH5mk1054256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 17 Mar 2018 17:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331098 - in head/sys: net netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: net netinet netinet6 X-SVN-Commit-Revision: 331098 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 17:05:50 -0000 Author: melifaro Date: Sat Mar 17 17:05:48 2018 New Revision: 331098 URL: https://svnweb.freebsd.org/changeset/base/331098 Log: Fix outgoing TCP/UDP packet drop on arp/ndp entry expiration. Current arp/nd code relies on the feedback from the datapath indicating that the entry is still used. This mechanism is incorporated into the arpresolve()/nd6_resolve() routines. After the inpcb route cache introduction, the packet path for the locally-originated packets changed, passing cached lle pointer to the ether_output() directly. This resulted in the arp/ndp entry expire each time exactly after the configured max_age interval. During the small window between the ARP/NDP request and reply from the router, most of the packets got lost. Fix this behaviour by plugging datapath notification code to the packet path used by route cache. Unify the notification code by using single inlined function with the per-AF callbacks. Reported by: sthaug at nethelp.no Reviewed by: ae MFC after: 2 weeks Modified: head/sys/net/if_ethersubr.c head/sys/net/if_llatbl.h head/sys/netinet/if_ether.c head/sys/netinet/in.c head/sys/netinet6/in6.c Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Sat Mar 17 16:04:06 2018 (r331097) +++ head/sys/net/if_ethersubr.c Sat Mar 17 17:05:48 2018 (r331098) @@ -311,7 +311,13 @@ ether_output(struct ifnet *ifp, struct mbuf *m, if (lle == NULL) { /* if we lookup, keep cache */ addref = 1; - } + } else + /* + * Notify LLE code that + * the entry was used + * by datapath. + */ + llentry_mark_used(lle); } if (lle != NULL) { phdr = lle->r_linkdata; Modified: head/sys/net/if_llatbl.h ============================================================================== --- head/sys/net/if_llatbl.h Sat Mar 17 16:04:06 2018 (r331097) +++ head/sys/net/if_llatbl.h Sat Mar 17 17:05:48 2018 (r331098) @@ -149,6 +149,7 @@ typedef void (llt_fill_sa_entry_t)(const struct llentr typedef void (llt_free_tbl_t)(struct lltable *); typedef void (llt_link_entry_t)(struct lltable *, struct llentry *); typedef void (llt_unlink_entry_t)(struct llentry *); +typedef void (llt_mark_used_t)(struct llentry *); typedef int (llt_foreach_cb_t)(struct lltable *, struct llentry *, void *); typedef int (llt_foreach_entry_t)(struct lltable *, llt_foreach_cb_t *, void *); @@ -173,6 +174,7 @@ struct lltable { llt_unlink_entry_t *llt_unlink_entry; llt_fill_sa_entry_t *llt_fill_sa_entry; llt_free_tbl_t *llt_free_tbl; + llt_mark_used_t *llt_mark_used; }; MALLOC_DECLARE(M_LLTABLE); @@ -245,6 +247,19 @@ lla_lookup(struct lltable *llt, u_int flags, const str { return (llt->llt_lookup(llt, flags, l3addr)); +} + +/* + * Notify the LLE code that the entry was used by datapath. + */ +static __inline void +llentry_mark_used(struct llentry *lle) +{ + + if (lle->r_skip_req == 0) + return; + if ((lle->r_flags & RLLE_VALID) != 0) + lle->lle_tbl->llt_mark_used(lle); } int lla_rt_output(struct rt_msghdr *, struct rt_addrinfo *); Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Sat Mar 17 16:04:06 2018 (r331097) +++ head/sys/netinet/if_ether.c Sat Mar 17 17:05:48 2018 (r331098) @@ -504,12 +504,8 @@ arpresolve_full(struct ifnet *ifp, int is_gw, int flag } bcopy(lladdr, desten, ll_len); - /* Check if we have feedback request from arptimer() */ - if (la->r_skip_req != 0) { - LLE_REQ_LOCK(la); - la->r_skip_req = 0; /* Notify that entry was used */ - LLE_REQ_UNLOCK(la); - } + /* Notify LLE code that the entry was used by datapath */ + llentry_mark_used(la); if (pflags != NULL) *pflags = la->la_flags & (LLE_VALID|LLE_IFADDR); if (plle) { @@ -640,12 +636,8 @@ arpresolve(struct ifnet *ifp, int is_gw, struct mbuf * bcopy(la->r_linkdata, desten, la->r_hdrlen); if (pflags != NULL) *pflags = LLE_VALID | (la->r_flags & RLLE_IFADDR); - /* Check if we have feedback request from arptimer() */ - if (la->r_skip_req != 0) { - LLE_REQ_LOCK(la); - la->r_skip_req = 0; /* Notify that entry was used */ - LLE_REQ_UNLOCK(la); - } + /* Notify the LLE handling code that the entry was used. */ + llentry_mark_used(la); if (plle) { LLE_ADDREF(la); *plle = la; Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Sat Mar 17 16:04:06 2018 (r331097) +++ head/sys/netinet/in.c Sat Mar 17 17:05:48 2018 (r331098) @@ -1068,6 +1068,19 @@ in_lltable_destroy_lle_unlocked(struct llentry *lle) } /* + * Called by the datapath to indicate that + * the entry was used. + */ +static void +in_lltable_mark_used(struct llentry *lle) +{ + + LLE_REQ_LOCK(lle); + lle->r_skip_req = 0; + LLE_REQ_UNLOCK(lle); +} + +/* * Called by LLE_FREE_LOCKED when number of references * drops to zero. */ @@ -1470,6 +1483,7 @@ in_lltattach(struct ifnet *ifp) llt->llt_fill_sa_entry = in_lltable_fill_sa_entry; llt->llt_free_entry = in_lltable_free_entry; llt->llt_match_prefix = in_lltable_match_prefix; + llt->llt_mark_used = in_lltable_mark_used; lltable_link(llt); return (llt); Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Sat Mar 17 16:04:06 2018 (r331097) +++ head/sys/netinet6/in6.c Sat Mar 17 17:05:48 2018 (r331098) @@ -2148,6 +2148,25 @@ in6_lltable_rtcheck(struct ifnet *ifp, return 0; } +/* + * Called by the datapath to indicate that the entry was used. + */ +static void +in6_lltable_mark_used(struct llentry *lle) +{ + + LLE_REQ_LOCK(lle); + lle->r_skip_req = 0; + + /* + * Set the hit time so the callback function + * can determine the remaining time before + * transiting to the DELAY state. + */ + lle->lle_hittime = time_uptime; + LLE_REQ_UNLOCK(lle); +} + static inline uint32_t in6_lltable_hash_dst(const struct in6_addr *dst, uint32_t hsize) { @@ -2380,6 +2399,7 @@ in6_lltattach(struct ifnet *ifp) llt->llt_fill_sa_entry = in6_lltable_fill_sa_entry; llt->llt_free_entry = in6_lltable_free_entry; llt->llt_match_prefix = in6_lltable_match_prefix; + llt->llt_mark_used = in6_lltable_mark_used; lltable_link(llt); return (llt); From owner-svn-src-all@freebsd.org Sat Mar 17 17:18:29 2018 Return-Path: Delivered-To: svn-src-all@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 C5342F59E64; Sat, 17 Mar 2018 17:18: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 6BD22850ED; Sat, 17 Mar 2018 17:18: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 5F90E15356; Sat, 17 Mar 2018 17:18: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 w2HHITkf059677; Sat, 17 Mar 2018 17:18:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HHITua059676; Sat, 17 Mar 2018 17:18:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803171718.w2HHITua059676@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Mar 2018 17:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331099 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 331099 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 17:18:29 -0000 Author: imp Date: Sat Mar 17 17:18:29 2018 New Revision: 331099 URL: https://svnweb.freebsd.org/changeset/base/331099 Log: Add EFI to kernel options. Some parts of MI modules will soon depend on whether EFI is available or not. Add EFI to the list of kernel options so we can use it in the modules build. Modified: head/sys/conf/kern.opts.mk Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Sat Mar 17 17:05:48 2018 (r331098) +++ head/sys/conf/kern.opts.mk Sat Mar 17 17:18:29 2018 (r331099) @@ -30,6 +30,7 @@ __DEFAULT_YES_OPTIONS = \ CDDL \ CRYPT \ CUSE \ + EFI \ FORMAT_EXTENSIONS \ INET \ INET6 \ @@ -89,6 +90,11 @@ BROKEN_OPTIONS+= OFED # Things that don't work based on toolchain support. .if ${MACHINE} != "i386" && ${MACHINE} != "amd64" BROKEN_OPTIONS+= KERNEL_RETPOLINE +.endif + +# EFI doesn't exist on mips, powerpc, sparc or riscv. +.if ${MACHINE:Mmips} || ${MACHINE:Mpowerpc} || ${MACHINE:Msparc64} || ${MACHINE:Mriscv} +BROKEN_OPTIONS+=EFI .endif # expanded inline from bsd.mkopt.mk to avoid share/mk dependency From owner-svn-src-all@freebsd.org Sat Mar 17 17:18:38 2018 Return-Path: Delivered-To: svn-src-all@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 E7EE8F59E8D; Sat, 17 Mar 2018 17:18:37 +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 7043F851C6; Sat, 17 Mar 2018 17:18:37 +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 69E0C15357; Sat, 17 Mar 2018 17:18:37 +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 w2HHIbPW059731; Sat, 17 Mar 2018 17:18:37 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HHIbEw059730; Sat, 17 Mar 2018 17:18:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803171718.w2HHIbEw059730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Mar 2018 17:18:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331100 - head/sys/modules/netgraph/checksum X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/modules/netgraph/checksum X-SVN-Commit-Revision: 331100 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 17:18:38 -0000 Author: imp Date: Sat Mar 17 17:18:37 2018 New Revision: 331100 URL: https://svnweb.freebsd.org/changeset/base/331100 Log: Remove commented out code to generate opt_inet*.h. That's handled automatically by kern.opts.mk now. Include that instead. Modified: head/sys/modules/netgraph/checksum/Makefile Modified: head/sys/modules/netgraph/checksum/Makefile ============================================================================== --- head/sys/modules/netgraph/checksum/Makefile Sat Mar 17 17:18:29 2018 (r331099) +++ head/sys/modules/netgraph/checksum/Makefile Sat Mar 17 17:18:37 2018 (r331100) @@ -1,20 +1,9 @@ # $FreeBSD$ -.include +SYSDIR?=${SRCTOP}/sys +.include "${SYSDIR}/conf/kern.opts.mk" KMOD= ng_checksum SRCS= ng_checksum.c opt_inet.h opt_inet6.h - -#.if !defined(KERNBUILDDIR) -# -#.if ${MK_INET_SUPPORT} != "no" -#opt_inet.h: -# echo "#define INET 1" > ${.TARGET} -#.endif -#.if ${MK_INET6_SUPPORT} != "no" -#opt_inet6.h: -# echo "#define INET6 1" > ${.TARGET} -#.endif -#.endif .include From owner-svn-src-all@freebsd.org Sat Mar 17 17:18:44 2018 Return-Path: Delivered-To: svn-src-all@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 5AEAEF59EBD; Sat, 17 Mar 2018 17:18:44 +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 BFD848524D; Sat, 17 Mar 2018 17:18:42 +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 07DD515358; Sat, 17 Mar 2018 17:18:42 +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 w2HHIfpE059784; Sat, 17 Mar 2018 17:18:41 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HHIffP059783; Sat, 17 Mar 2018 17:18:41 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803171718.w2HHIffP059783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Mar 2018 17:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331101 - head/sys/modules/netmap X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/modules/netmap X-SVN-Commit-Revision: 331101 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 17:18:45 -0000 Author: imp Date: Sat Mar 17 17:18:41 2018 New Revision: 331101 URL: https://svnweb.freebsd.org/changeset/base/331101 Log: Use FreeBSD-current conventions for building options rather than FreeBSD 10 conventions: inlude kern.opts.mk. Modified: head/sys/modules/netmap/Makefile Modified: head/sys/modules/netmap/Makefile ============================================================================== --- head/sys/modules/netmap/Makefile Sat Mar 17 17:18:37 2018 (r331100) +++ head/sys/modules/netmap/Makefile Sat Mar 17 17:18:41 2018 (r331101) @@ -3,12 +3,12 @@ # Compile netmap as a module, useful if you want a netmap bridge # or loadable drivers. -.include # FreeBSD 10 and earlier -# .include "${SYSDIR}/conf/kern.opts.mk" +SYSDIR?=${SRCTOP}/sys +.include "${SYSDIR}/conf/kern.opts.mk" -.PATH: ${SRCTOP}/sys/dev/netmap -.PATH.h: ${SRCTOP}/sys/net -CFLAGS += -I${SRCTOP}/sys/ -D INET +.PATH: ${SYSDIR}/dev/netmap +.PATH.h: ${SYSDIR}/net +CFLAGS += -I${SYSDIR}/ -D INET KMOD = netmap SRCS = device_if.h bus_if.h pci_if.h opt_netmap.h SRCS += netmap.c netmap.h netmap_kern.h From owner-svn-src-all@freebsd.org Sat Mar 17 17:18:49 2018 Return-Path: Delivered-To: svn-src-all@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 6EDA7F59EEE; Sat, 17 Mar 2018 17:18:48 +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 9EC9B852B9; Sat, 17 Mar 2018 17:18:46 +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 981A11535A; Sat, 17 Mar 2018 17:18:46 +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 w2HHIkGs059836; Sat, 17 Mar 2018 17:18:46 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HHIkZQ059835; Sat, 17 Mar 2018 17:18:46 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201803171718.w2HHIkZQ059835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Mar 2018 17:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331102 - head/sys/modules/iser X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/modules/iser X-SVN-Commit-Revision: 331102 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 17:18:49 -0000 Author: imp Date: Sat Mar 17 17:18:46 2018 New Revision: 331102 URL: https://svnweb.freebsd.org/changeset/base/331102 Log: Use kern.opts.mk instead of bsd.own.mk (which includes src.opts.mk) here. Modified: head/sys/modules/iser/Makefile Modified: head/sys/modules/iser/Makefile ============================================================================== --- head/sys/modules/iser/Makefile Sat Mar 17 17:18:41 2018 (r331101) +++ head/sys/modules/iser/Makefile Sat Mar 17 17:18:46 2018 (r331102) @@ -1,8 +1,9 @@ # $FreeBSD$ -.PATH: ${SRCTOP}/sys/dev/iser/ +SYSDIR?=${SRCTOP}/sys +.include "${SYSDIR}/conf/kern.opts.mk" -.include +.PATH: ${SYSDIR}/dev/iser/ KMOD= iser @@ -18,7 +19,7 @@ SRCS+= bus_if.h SRCS+= device_if.h SRCS+= icl_conn_if.h -CFLAGS+= -I${SRCTOP}/sys/ +CFLAGS+= -I${SYSDIR}/ CFLAGS+= -I${SYSDIR}/ofed/include CFLAGS+= -I${SYSDIR}/ofed/include/uapi CFLAGS+= -I${SYSDIR}/compat/linuxkpi/common/include From owner-svn-src-all@freebsd.org Sat Mar 17 17:48:21 2018 Return-Path: Delivered-To: svn-src-all@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 CE5ADF5C0BC; Sat, 17 Mar 2018 17:48:21 +0000 (UTC) (envelope-from asomers@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 7D2FA868F5; Sat, 17 Mar 2018 17:48:21 +0000 (UTC) (envelope-from asomers@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 781E2157F1; Sat, 17 Mar 2018 17:48:21 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HHmLeg074611; Sat, 17 Mar 2018 17:48:21 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HHmLFj074610; Sat, 17 Mar 2018 17:48:21 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803171748.w2HHmLFj074610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 17 Mar 2018 17:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331103 - head/tests/sys/aio X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/aio X-SVN-Commit-Revision: 331103 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 17:48:22 -0000 Author: asomers Date: Sat Mar 17 17:48:21 2018 New Revision: 331103 URL: https://svnweb.freebsd.org/changeset/base/331103 Log: aio: add an ATF test case for aio_fsync error conditions Modified: head/tests/sys/aio/aio_test.c Modified: head/tests/sys/aio/aio_test.c ============================================================================== --- head/tests/sys/aio/aio_test.c Sat Mar 17 17:18:46 2018 (r331102) +++ head/tests/sys/aio/aio_test.c Sat Mar 17 17:48:21 2018 (r331103) @@ -1040,6 +1040,42 @@ ATF_TC_BODY(aio_socket_short_write_cancel, tc) close(s[0]); } +/* + * test aio_fsync's behavior with bad inputs + */ +ATF_TC_WITHOUT_HEAD(aio_fsync_errors); +ATF_TC_BODY(aio_fsync_errors, tc) +{ + int fd; + struct aiocb iocb; + + ATF_REQUIRE_KERNEL_MODULE("aio"); + ATF_REQUIRE_UNSAFE_AIO(); + + fd = open(FILE_PATHNAME, O_RDWR | O_CREAT, 0600); + ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); + unlink(FILE_PATHNAME); + + /* aio_fsync should return EINVAL unless op is O_SYNC */ + memset(&iocb, 0, sizeof(iocb)); + iocb.aio_fildes = fd; + ATF_CHECK_EQ(-1, aio_fsync(666, &iocb)); + ATF_CHECK_EQ(EINVAL, errno); + + /* aio_fsync should return EBADF if fd is not a valid descriptor */ + memset(&iocb, 0, sizeof(iocb)); + iocb.aio_fildes = 666; + ATF_CHECK_EQ(-1, aio_fsync(O_SYNC, &iocb)); + ATF_CHECK_EQ(EBADF, errno); + + /* aio_fsync should return EINVAL if sigev_notify is invalid */ + memset(&iocb, 0, sizeof(iocb)); + iocb.aio_fildes = fd; + iocb.aio_sigevent.sigev_notify = 666; + ATF_CHECK_EQ(-1, aio_fsync(666, &iocb)); + ATF_CHECK_EQ(EINVAL, errno); +} + /* * This test just performs a basic test of aio_fsync(). */ @@ -1153,6 +1189,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, md_suspend); ATF_TP_ADD_TC(tp, md_thread); ATF_TP_ADD_TC(tp, md_waitcomplete); + ATF_TP_ADD_TC(tp, aio_fsync_errors); ATF_TP_ADD_TC(tp, aio_fsync_test); ATF_TP_ADD_TC(tp, aio_large_read_test); ATF_TP_ADD_TC(tp, aio_socket_two_reads); From owner-svn-src-all@freebsd.org Sat Mar 17 17:52:47 2018 Return-Path: Delivered-To: svn-src-all@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 C7BACF5C71F; Sat, 17 Mar 2018 17:52:47 +0000 (UTC) (envelope-from asomers@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 7933586F4F; Sat, 17 Mar 2018 17:52:47 +0000 (UTC) (envelope-from asomers@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 737631598E; Sat, 17 Mar 2018 17:52:47 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HHqlLg079477; Sat, 17 Mar 2018 17:52:47 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HHqldu079476; Sat, 17 Mar 2018 17:52:47 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803171752.w2HHqldu079476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 17 Mar 2018 17:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331104 - head/tests/sys/aio X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/aio X-SVN-Commit-Revision: 331104 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 17:52:48 -0000 Author: asomers Date: Sat Mar 17 17:52:47 2018 New Revision: 331104 URL: https://svnweb.freebsd.org/changeset/base/331104 Log: aio_kqueue_test: fix the build when DEBUG=1 Also, make the debug output more verbose Modified: head/tests/sys/aio/aio_kqueue_test.c Modified: head/tests/sys/aio/aio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/aio_kqueue_test.c Sat Mar 17 17:48:21 2018 (r331103) +++ head/tests/sys/aio/aio_kqueue_test.c Sat Mar 17 17:52:47 2018 (r331104) @@ -170,18 +170,25 @@ main (int argc, char *argv[]) kq_iocb = kq_returned.udata; #ifdef DEBUG printf("kevent %d %d errno %d return.ident %p " - "return.data %p return.udata %p %p\n", + "return.data %p return.udata %p %p" + " filter %d flags %#x fflags %#x\n", i, result, error, (void*)kq_returned.ident, (void*)kq_returned.data, kq_returned.udata, - kq_iocb); + kq_iocb, + kq_returned.filter, + kq_returned.flags, + kq_returned.fflags); + if (result > 0) + printf("\tsigev_notify_kevent_flags %#x\n", + ((struct aiocb*)(kq_returned.ident))->aio_sigevent.sigev_notify_kevent_flags); #endif if (kq_iocb) break; #ifdef DEBUG - printf("Try again left %d out of %lu %d\n", + printf("Try again left %d out of %d %d\n", pending, max_queue_per_proc, cancel); #endif } From owner-svn-src-all@freebsd.org Sat Mar 17 17:56:09 2018 Return-Path: Delivered-To: svn-src-all@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 3B40EF5CA79; Sat, 17 Mar 2018 17:56:09 +0000 (UTC) (envelope-from asomers@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 DD11487139; Sat, 17 Mar 2018 17:56:08 +0000 (UTC) (envelope-from asomers@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 D7E4115991; Sat, 17 Mar 2018 17:56:08 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HHu8xj079647; Sat, 17 Mar 2018 17:56:08 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HHu871079646; Sat, 17 Mar 2018 17:56:08 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201803171756.w2HHu871079646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 17 Mar 2018 17:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331105 - head/sys/security/audit X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sys/security/audit X-SVN-Commit-Revision: 331105 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 17:56:09 -0000 Author: asomers Date: Sat Mar 17 17:56:08 2018 New Revision: 331105 URL: https://svnweb.freebsd.org/changeset/base/331105 Log: audit(4): fix a typo in a comment no functional change Modified: head/sys/security/audit/audit_bsm_klib.c Modified: head/sys/security/audit/audit_bsm_klib.c ============================================================================== --- head/sys/security/audit/audit_bsm_klib.c Sat Mar 17 17:52:47 2018 (r331104) +++ head/sys/security/audit/audit_bsm_klib.c Sat Mar 17 17:56:08 2018 (r331105) @@ -119,7 +119,7 @@ static const int aue_shmsys[] = { static const int aue_shmsys_count = sizeof(aue_shmsys) / sizeof(int); /* - * Check whether an event is aditable by comparing the mask of classes this + * Check whether an event is auditable by comparing the mask of classes this * event is part of against the given mask. */ int From owner-svn-src-all@freebsd.org Sat Mar 17 18:14:50 2018 Return-Path: Delivered-To: svn-src-all@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 DB942F5DF27; Sat, 17 Mar 2018 18:14:49 +0000 (UTC) (envelope-from jeff@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 81DC187E28; Sat, 17 Mar 2018 18:14:49 +0000 (UTC) (envelope-from jeff@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 7C1EF15C88; Sat, 17 Mar 2018 18:14:49 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HIEnrf089639; Sat, 17 Mar 2018 18:14:49 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HIEnn9089638; Sat, 17 Mar 2018 18:14:49 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201803171814.w2HIEnn9089638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Sat, 17 Mar 2018 18:14:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331106 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 331106 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 18:14:50 -0000 Author: jeff Date: Sat Mar 17 18:14:49 2018 New Revision: 331106 URL: https://svnweb.freebsd.org/changeset/base/331106 Log: Move the dirty queues inside the per-domain structure. This resolves a bug where we had not hit global dirty limits but a single queue was starved for space by dirty buffers. A single buf_daemon is maintained for now. Add a bd_speedup() when we are low on bufspace. This can happen due to SUJ keeping many bufs locked until a cg block is written. Document this with a comment. Fix sysctls to work with per-domain variables. Add more ddb debugging. Reported by: pho Reviewed by: kib Tested by: pho Sponsored by: Netflix, Dell/EMC Isilon Differential Revision: https://reviews.freebsd.org/D14705 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sat Mar 17 17:56:08 2018 (r331105) +++ head/sys/kern/vfs_bio.c Sat Mar 17 18:14:49 2018 (r331106) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -100,6 +101,52 @@ struct buf_ops buf_ops_bio = { .bop_bdflush = bufbdflush, }; +struct bufqueue { + struct mtx_padalign bq_lock; + TAILQ_HEAD(, buf) bq_queue; + uint8_t bq_index; + uint16_t bq_subqueue; + int bq_len; +} __aligned(CACHE_LINE_SIZE); + +#define BQ_LOCKPTR(bq) (&(bq)->bq_lock) +#define BQ_LOCK(bq) mtx_lock(BQ_LOCKPTR((bq))) +#define BQ_UNLOCK(bq) mtx_unlock(BQ_LOCKPTR((bq))) +#define BQ_ASSERT_LOCKED(bq) mtx_assert(BQ_LOCKPTR((bq)), MA_OWNED) + +struct bufdomain { + struct bufqueue bd_subq[MAXCPU + 1]; /* Per-cpu sub queues + global */ + struct bufqueue bd_dirtyq; + struct bufqueue *bd_cleanq; + struct mtx_padalign bd_run_lock; + /* Constants */ + long bd_maxbufspace; + long bd_hibufspace; + long bd_lobufspace; + long bd_bufspacethresh; + int bd_hifreebuffers; + int bd_lofreebuffers; + int bd_hidirtybuffers; + int bd_lodirtybuffers; + int bd_dirtybufthresh; + int bd_lim; + /* atomics */ + int bd_wanted; + int __aligned(CACHE_LINE_SIZE) bd_numdirtybuffers; + int __aligned(CACHE_LINE_SIZE) bd_running; + long __aligned(CACHE_LINE_SIZE) bd_bufspace; + int __aligned(CACHE_LINE_SIZE) bd_freebuffers; +} __aligned(CACHE_LINE_SIZE); + +#define BD_LOCKPTR(bd) (&(bd)->bd_cleanq->bq_lock) +#define BD_LOCK(bd) mtx_lock(BD_LOCKPTR((bd))) +#define BD_UNLOCK(bd) mtx_unlock(BD_LOCKPTR((bd))) +#define BD_ASSERT_LOCKED(bd) mtx_assert(BD_LOCKPTR((bd)), MA_OWNED) +#define BD_RUN_LOCKPTR(bd) (&(bd)->bd_run_lock) +#define BD_RUN_LOCK(bd) mtx_lock(BD_RUN_LOCKPTR((bd))) +#define BD_RUN_UNLOCK(bd) mtx_unlock(BD_RUN_LOCKPTR((bd))) +#define BD_DOMAIN(bd) (bd - bdomain) + static struct buf *buf; /* buffer header pool */ extern struct buf *swbuf; /* Swap buffer header pool. */ caddr_t unmapped_buf; @@ -123,8 +170,8 @@ static int vfs_bio_clcheck(struct vnode *vp, int size, daddr_t lblkno, daddr_t blkno); static void breada(struct vnode *, daddr_t *, int *, int, struct ucred *, int, void (*)(struct buf *)); -static int buf_flush(struct vnode *vp, int); -static int flushbufqueues(struct vnode *, int, int); +static int buf_flush(struct vnode *vp, struct bufdomain *, int); +static int flushbufqueues(struct vnode *, struct bufdomain *, int, int); static void buf_daemon(void); static __inline void bd_wakeup(void); static int sysctl_runningspace(SYSCTL_HANDLER_ARGS); @@ -133,6 +180,16 @@ static void bufkva_free(struct buf *); static int buf_import(void *, void **, int, int, int); static void buf_release(void *, void **, int); static void maxbcachebuf_adjust(void); +static inline struct bufdomain *bufdomain(struct buf *); +static void bq_remove(struct bufqueue *bq, struct buf *bp); +static void bq_insert(struct bufqueue *bq, struct buf *bp, bool unlock); +static int buf_recycle(struct bufdomain *, bool kva); +static void bq_init(struct bufqueue *bq, int qindex, int cpu, + const char *lockname); +static void bd_init(struct bufdomain *bd); +static int bd_flushall(struct bufdomain *bd); +static int sysctl_bufdomain_long(SYSCTL_HANDLER_ARGS); +static int sysctl_bufdomain_int(SYSCTL_HANDLER_ARGS); static int sysctl_bufspace(SYSCTL_HANDLER_ARGS); int vmiodirenable = TRUE; @@ -147,7 +204,9 @@ static counter_u64_t bufkvaspace; SYSCTL_COUNTER_U64(_vfs, OID_AUTO, bufkvaspace, CTLFLAG_RD, &bufkvaspace, "Kernel virtual memory used for buffers"); static long maxbufspace; -SYSCTL_LONG(_vfs, OID_AUTO, maxbufspace, CTLFLAG_RW, &maxbufspace, 0, +SYSCTL_PROC(_vfs, OID_AUTO, maxbufspace, + CTLTYPE_LONG|CTLFLAG_MPSAFE|CTLFLAG_RW, &maxbufspace, + __offsetof(struct bufdomain, bd_maxbufspace), sysctl_bufdomain_long, "L", "Maximum allowed value of bufspace (including metadata)"); static long bufmallocspace; SYSCTL_LONG(_vfs, OID_AUTO, bufmallocspace, CTLFLAG_RD, &bufmallocspace, 0, @@ -156,14 +215,20 @@ static long maxbufmallocspace; SYSCTL_LONG(_vfs, OID_AUTO, maxmallocbufspace, CTLFLAG_RW, &maxbufmallocspace, 0, "Maximum amount of malloced memory for buffers"); static long lobufspace; -SYSCTL_LONG(_vfs, OID_AUTO, lobufspace, CTLFLAG_RW, &lobufspace, 0, +SYSCTL_PROC(_vfs, OID_AUTO, lobufspace, + CTLTYPE_LONG|CTLFLAG_MPSAFE|CTLFLAG_RW, &lobufspace, + __offsetof(struct bufdomain, bd_lobufspace), sysctl_bufdomain_long, "L", "Minimum amount of buffers we want to have"); long hibufspace; -SYSCTL_LONG(_vfs, OID_AUTO, hibufspace, CTLFLAG_RW, &hibufspace, 0, +SYSCTL_PROC(_vfs, OID_AUTO, hibufspace, + CTLTYPE_LONG|CTLFLAG_MPSAFE|CTLFLAG_RW, &hibufspace, + __offsetof(struct bufdomain, bd_hibufspace), sysctl_bufdomain_long, "L", "Maximum allowed value of bufspace (excluding metadata)"); long bufspacethresh; -SYSCTL_LONG(_vfs, OID_AUTO, bufspacethresh, CTLFLAG_RW, &bufspacethresh, - 0, "Bufspace consumed before waking the daemon to free some"); +SYSCTL_PROC(_vfs, OID_AUTO, bufspacethresh, + CTLTYPE_LONG|CTLFLAG_MPSAFE|CTLFLAG_RW, &bufspacethresh, + __offsetof(struct bufdomain, bd_bufspacethresh), sysctl_bufdomain_long, "L", + "Bufspace consumed before waking the daemon to free some"); static counter_u64_t buffreekvacnt; SYSCTL_COUNTER_U64(_vfs, OID_AUTO, buffreekvacnt, CTLFLAG_RW, &buffreekvacnt, "Number of times we have freed the KVA space from some buffer"); @@ -190,26 +255,37 @@ SYSCTL_INT(_vfs, OID_AUTO, altbufferflushes, CTLFLAG_R static int recursiveflushes; SYSCTL_INT(_vfs, OID_AUTO, recursiveflushes, CTLFLAG_RW, &recursiveflushes, 0, "Number of flushes skipped due to being recursive"); -static int numdirtybuffers; -SYSCTL_INT(_vfs, OID_AUTO, numdirtybuffers, CTLFLAG_RD, &numdirtybuffers, 0, +static int sysctl_numdirtybuffers(SYSCTL_HANDLER_ARGS); +SYSCTL_PROC(_vfs, OID_AUTO, numdirtybuffers, + CTLTYPE_INT|CTLFLAG_MPSAFE|CTLFLAG_RD, NULL, 0, sysctl_numdirtybuffers, "I", "Number of buffers that are dirty (has unwritten changes) at the moment"); static int lodirtybuffers; -SYSCTL_INT(_vfs, OID_AUTO, lodirtybuffers, CTLFLAG_RW, &lodirtybuffers, 0, +SYSCTL_PROC(_vfs, OID_AUTO, lodirtybuffers, + CTLTYPE_LONG|CTLFLAG_MPSAFE|CTLFLAG_RW, &lodirtybuffers, + __offsetof(struct bufdomain, bd_lodirtybuffers), sysctl_bufdomain_int, "L", "How many buffers we want to have free before bufdaemon can sleep"); static int hidirtybuffers; -SYSCTL_INT(_vfs, OID_AUTO, hidirtybuffers, CTLFLAG_RW, &hidirtybuffers, 0, +SYSCTL_PROC(_vfs, OID_AUTO, hidirtybuffers, + CTLTYPE_LONG|CTLFLAG_MPSAFE|CTLFLAG_RW, &hidirtybuffers, + __offsetof(struct bufdomain, bd_hidirtybuffers), sysctl_bufdomain_int, "L", "When the number of dirty buffers is considered severe"); int dirtybufthresh; -SYSCTL_INT(_vfs, OID_AUTO, dirtybufthresh, CTLFLAG_RW, &dirtybufthresh, - 0, "Number of bdwrite to bawrite conversions to clear dirty buffers"); +SYSCTL_PROC(_vfs, OID_AUTO, dirtybufthresh, + CTLTYPE_LONG|CTLFLAG_MPSAFE|CTLFLAG_RW, &dirtybufthresh, + __offsetof(struct bufdomain, bd_dirtybufthresh), sysctl_bufdomain_int, "L", + "Number of bdwrite to bawrite conversions to clear dirty buffers"); static int numfreebuffers; SYSCTL_INT(_vfs, OID_AUTO, numfreebuffers, CTLFLAG_RD, &numfreebuffers, 0, "Number of free buffers"); static int lofreebuffers; -SYSCTL_INT(_vfs, OID_AUTO, lofreebuffers, CTLFLAG_RW, &lofreebuffers, 0, +SYSCTL_PROC(_vfs, OID_AUTO, lofreebuffers, + CTLTYPE_LONG|CTLFLAG_MPSAFE|CTLFLAG_RW, &lofreebuffers, + __offsetof(struct bufdomain, bd_lofreebuffers), sysctl_bufdomain_int, "L", "Target number of free buffers"); static int hifreebuffers; -SYSCTL_INT(_vfs, OID_AUTO, hifreebuffers, CTLFLAG_RW, &hifreebuffers, 0, +SYSCTL_PROC(_vfs, OID_AUTO, hifreebuffers, + CTLTYPE_LONG|CTLFLAG_MPSAFE|CTLFLAG_RW, &hifreebuffers, + __offsetof(struct bufdomain, bd_hifreebuffers), sysctl_bufdomain_int, "L", "Threshold for clean buffer recycling"); static counter_u64_t getnewbufcalls; SYSCTL_COUNTER_U64(_vfs, OID_AUTO, getnewbufcalls, CTLFLAG_RD, @@ -294,66 +370,19 @@ static int bdirtywait; #define QUEUE_CLEAN 3 /* non-B_DELWRI buffers */ #define QUEUE_SENTINEL 4 /* not an queue index, but mark for sentinel */ -struct bufqueue { - struct mtx_padalign bq_lock; - TAILQ_HEAD(, buf) bq_queue; - uint8_t bq_index; - uint16_t bq_subqueue; - int bq_len; -} __aligned(CACHE_LINE_SIZE); +/* Maximum number of buffer domains. */ +#define BUF_DOMAINS 8 -#define BQ_LOCKPTR(bq) (&(bq)->bq_lock) -#define BQ_LOCK(bq) mtx_lock(BQ_LOCKPTR((bq))) -#define BQ_UNLOCK(bq) mtx_unlock(BQ_LOCKPTR((bq))) -#define BQ_ASSERT_LOCKED(bq) mtx_assert(BQ_LOCKPTR((bq)), MA_OWNED) +struct bufdomainset bdlodirty; /* Domains > lodirty */ +struct bufdomainset bdhidirty; /* Domains > hidirty */ -struct bufqueue __exclusive_cache_line bqempty; -struct bufqueue __exclusive_cache_line bqdirty; - -struct bufdomain { - struct bufqueue bd_subq[MAXCPU + 1]; /* Per-cpu sub queues + global */ - struct bufqueue *bd_cleanq; - struct mtx_padalign bd_run_lock; - /* Constants */ - long bd_maxbufspace; - long bd_hibufspace; - long bd_lobufspace; - long bd_bufspacethresh; - int bd_hifreebuffers; - int bd_lofreebuffers; - int bd_lim; - /* atomics */ - int bd_wanted; - int __aligned(CACHE_LINE_SIZE) bd_running; - long __aligned(CACHE_LINE_SIZE) bd_bufspace; - int __aligned(CACHE_LINE_SIZE) bd_freebuffers; -} __aligned(CACHE_LINE_SIZE); - -#define BD_LOCKPTR(bd) (&(bd)->bd_cleanq->bq_lock) -#define BD_LOCK(bd) mtx_lock(BD_LOCKPTR((bd))) -#define BD_UNLOCK(bd) mtx_unlock(BD_LOCKPTR((bd))) -#define BD_ASSERT_LOCKED(bd) mtx_assert(BD_LOCKPTR((bd)), MA_OWNED) -#define BD_RUN_LOCKPTR(bd) (&(bd)->bd_run_lock) -#define BD_RUN_LOCK(bd) mtx_lock(BD_RUN_LOCKPTR((bd))) -#define BD_RUN_UNLOCK(bd) mtx_unlock(BD_RUN_LOCKPTR((bd))) -#define BD_DOMAIN(bd) (bd - bdclean) - -/* Maximum number of clean buffer domains. */ -#define CLEAN_DOMAINS 8 - /* Configured number of clean queues. */ -static int __read_mostly clean_domains; +static int __read_mostly buf_domains; -struct bufdomain __exclusive_cache_line bdclean[CLEAN_DOMAINS]; +BITSET_DEFINE(bufdomainset, BUF_DOMAINS); +struct bufdomain __exclusive_cache_line bdomain[BUF_DOMAINS]; +struct bufqueue __exclusive_cache_line bqempty; -static void bq_remove(struct bufqueue *bq, struct buf *bp); -static void bq_insert(struct bufqueue *bq, struct buf *bp, bool unlock); -static int buf_recycle(struct bufdomain *, bool kva); -static void bq_init(struct bufqueue *bq, int qindex, int cpu, - const char *lockname); -static void bd_init(struct bufdomain *bd); -static int bd_flushall(struct bufdomain *bd); - /* * per-cpu empty buffer cache. */ @@ -393,6 +422,44 @@ sysctl_runningspace(SYSCTL_HANDLER_ARGS) return (error); } +static int +sysctl_bufdomain_int(SYSCTL_HANDLER_ARGS) +{ + int error; + int value; + int i; + + value = *(int *)arg1; + error = sysctl_handle_int(oidp, &value, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + *(int *)arg1 = value; + for (i = 0; i < buf_domains; i++) + *(int *)(((uintptr_t)&bdomain[i]) + arg2) = + value / buf_domains; + + return (error); +} + +static int +sysctl_bufdomain_long(SYSCTL_HANDLER_ARGS) +{ + long value; + int error; + int i; + + value = *(long *)arg1; + error = sysctl_handle_long(oidp, &value, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + *(long *)arg1 = value; + for (i = 0; i < buf_domains; i++) + *(long *)(((uintptr_t)&bdomain[i]) + arg2) = + value / buf_domains; + + return (error); +} + #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) static int @@ -403,8 +470,8 @@ sysctl_bufspace(SYSCTL_HANDLER_ARGS) int i; lvalue = 0; - for (i = 0; i < clean_domains; i++) - lvalue += bdclean[i].bd_bufspace; + for (i = 0; i < buf_domains; i++) + lvalue += bdomain[i].bd_bufspace; if (sizeof(int) == sizeof(long) || req->oldlen >= sizeof(long)) return (sysctl_handle_long(oidp, &lvalue, 0, req)); if (lvalue > INT_MAX) @@ -421,12 +488,24 @@ sysctl_bufspace(SYSCTL_HANDLER_ARGS) int i; lvalue = 0; - for (i = 0; i < clean_domains; i++) - lvalue += bdclean[i].bd_bufspace; + for (i = 0; i < buf_domains; i++) + lvalue += bdomain[i].bd_bufspace; return (sysctl_handle_long(oidp, &lvalue, 0, req)); } #endif +static int +sysctl_numdirtybuffers(SYSCTL_HANDLER_ARGS) +{ + int value; + int i; + + value = 0; + for (i = 0; i < buf_domains; i++) + value += bdomain[i].bd_numdirtybuffers; + return (sysctl_handle_int(oidp, &value, 0, req)); +} + /* * bdirtywakeup: * @@ -444,18 +523,59 @@ bdirtywakeup(void) } /* + * bd_clear: + * + * Clear a domain from the appropriate bitsets when dirtybuffers + * is decremented. + */ +static void +bd_clear(struct bufdomain *bd) +{ + + mtx_lock(&bdirtylock); + if (bd->bd_numdirtybuffers <= bd->bd_lodirtybuffers) + BIT_CLR(BUF_DOMAINS, BD_DOMAIN(bd), &bdlodirty); + if (bd->bd_numdirtybuffers <= bd->bd_hidirtybuffers) + BIT_CLR(BUF_DOMAINS, BD_DOMAIN(bd), &bdhidirty); + mtx_unlock(&bdirtylock); +} + +/* + * bd_set: + * + * Set a domain in the appropriate bitsets when dirtybuffers + * is incremented. + */ +static void +bd_set(struct bufdomain *bd) +{ + + mtx_lock(&bdirtylock); + if (bd->bd_numdirtybuffers > bd->bd_lodirtybuffers) + BIT_SET(BUF_DOMAINS, BD_DOMAIN(bd), &bdlodirty); + if (bd->bd_numdirtybuffers > bd->bd_hidirtybuffers) + BIT_SET(BUF_DOMAINS, BD_DOMAIN(bd), &bdhidirty); + mtx_unlock(&bdirtylock); +} + +/* * bdirtysub: * * Decrement the numdirtybuffers count by one and wakeup any * threads blocked in bwillwrite(). */ static void -bdirtysub(void) +bdirtysub(struct buf *bp) { + struct bufdomain *bd; + int num; - if (atomic_fetchadd_int(&numdirtybuffers, -1) == - (lodirtybuffers + hidirtybuffers) / 2) + bd = bufdomain(bp); + num = atomic_fetchadd_int(&bd->bd_numdirtybuffers, -1); + if (num == (bd->bd_lodirtybuffers + bd->bd_hidirtybuffers) / 2) bdirtywakeup(); + if (num == bd->bd_lodirtybuffers || num == bd->bd_hidirtybuffers) + bd_clear(bd); } /* @@ -465,16 +585,21 @@ bdirtysub(void) * daemon if needed. */ static void -bdirtyadd(void) +bdirtyadd(struct buf *bp) { + struct bufdomain *bd; + int num; /* * Only do the wakeup once as we cross the boundary. The * buf daemon will keep running until the condition clears. */ - if (atomic_fetchadd_int(&numdirtybuffers, 1) == - (lodirtybuffers + hidirtybuffers) / 2) + bd = bufdomain(bp); + num = atomic_fetchadd_int(&bd->bd_numdirtybuffers, 1); + if (num == (bd->bd_lodirtybuffers + bd->bd_hidirtybuffers) / 2) bd_wakeup(); + if (num == bd->bd_lodirtybuffers || num == bd->bd_hidirtybuffers) + bd_set(bd); } /* @@ -539,11 +664,11 @@ bufspace_adjust(struct buf *bp, int bufsize) KASSERT((bp->b_flags & B_MALLOC) == 0, ("bufspace_adjust: malloc buf %p", bp)); - bd = &bdclean[bp->b_domain]; + bd = bufdomain(bp); diff = bufsize - bp->b_bufsize; if (diff < 0) { atomic_subtract_long(&bd->bd_bufspace, -diff); - } else { + } else if (diff > 0) { space = atomic_fetchadd_long(&bd->bd_bufspace, diff); /* Wake up the daemon on the transition. */ if (space < bd->bd_bufspacethresh && @@ -638,7 +763,7 @@ bufspace_wait(struct bufdomain *bd, struct vnode *vp, * recursion. */ td->td_pflags |= TDP_BUFNEED | TDP_NORUNNINGBUF; - fl = buf_flush(vp, flushbufqtarget); + fl = buf_flush(vp, bd, flushbufqtarget); td->td_pflags &= norunbuf; BD_LOCK(bd); if (fl != 0) @@ -700,6 +825,15 @@ bufspace_daemon(void *arg) if (buf_recycle(bd, false) != 0) { if (bd_flushall(bd)) continue; + /* + * Speedup dirty if we've run out of clean + * buffers. This is possible in particular + * because softdep may held many bufs locked + * pending writes to other bufs which are + * marked for delayed write, exhausting + * clean space until they are written. + */ + bd_speedup(); BD_LOCK(bd); if (bd->bd_wanted) { msleep(&bd->bd_wanted, BD_LOCKPTR(bd), @@ -1025,7 +1159,6 @@ bufinit(void) ("maxbcachebuf (%d) must be >= MAXBSIZE (%d)\n", maxbcachebuf, MAXBSIZE)); bq_init(&bqempty, QUEUE_EMPTY, -1, "bufq empty lock"); - bq_init(&bqdirty, QUEUE_DIRTY, -1, "bufq dirty lock"); mtx_init(&rbreqlock, "runningbufspace lock", NULL, MTX_DEF); mtx_init(&bdlock, "buffer daemon lock", NULL, MTX_DEF); mtx_init(&bdirtylock, "dirty buf lock", NULL, MTX_DEF); @@ -1093,7 +1226,6 @@ bufinit(void) */ hidirtybuffers = nbuf / 4 + 20; dirtybufthresh = hidirtybuffers * 9 / 10; - numdirtybuffers = 0; /* * To support extreme low-memory systems, make sure hidirtybuffers * cannot eat up all available buffer space. This occurs when our @@ -1128,22 +1260,26 @@ bufinit(void) * One queue per-256mb up to the max. More queues gives better * concurrency but less accurate LRU. */ - clean_domains = MIN(howmany(maxbufspace, 256*1024*1024), CLEAN_DOMAINS); - for (i = 0 ; i < clean_domains; i++) { + buf_domains = MIN(howmany(maxbufspace, 256*1024*1024), BUF_DOMAINS); + for (i = 0 ; i < buf_domains; i++) { struct bufdomain *bd; - bd = &bdclean[i]; + bd = &bdomain[i]; bd_init(bd); - bd->bd_freebuffers = nbuf / clean_domains; - bd->bd_hifreebuffers = hifreebuffers / clean_domains; - bd->bd_lofreebuffers = lofreebuffers / clean_domains; + bd->bd_freebuffers = nbuf / buf_domains; + bd->bd_hifreebuffers = hifreebuffers / buf_domains; + bd->bd_lofreebuffers = lofreebuffers / buf_domains; bd->bd_bufspace = 0; - bd->bd_maxbufspace = maxbufspace / clean_domains; - bd->bd_hibufspace = hibufspace / clean_domains; - bd->bd_lobufspace = lobufspace / clean_domains; - bd->bd_bufspacethresh = bufspacethresh / clean_domains; + bd->bd_maxbufspace = maxbufspace / buf_domains; + bd->bd_hibufspace = hibufspace / buf_domains; + bd->bd_lobufspace = lobufspace / buf_domains; + bd->bd_bufspacethresh = bufspacethresh / buf_domains; + bd->bd_numdirtybuffers = 0; + bd->bd_hidirtybuffers = hidirtybuffers / buf_domains; + bd->bd_lodirtybuffers = lodirtybuffers / buf_domains; + bd->bd_dirtybufthresh = dirtybufthresh / buf_domains; /* Don't allow more than 2% of bufs in the per-cpu caches. */ - bd->bd_lim = nbuf / clean_domains / 50 / mp_ncpus; + bd->bd_lim = nbuf / buf_domains / 50 / mp_ncpus; } getnewbufcalls = counter_u64_alloc(M_WAITOK); getnewbufrestarts = counter_u64_alloc(M_WAITOK); @@ -1327,6 +1463,13 @@ bpmap_qenter(struct buf *bp) (vm_offset_t)(bp->b_offset & PAGE_MASK)); } +static inline struct bufdomain * +bufdomain(struct buf *bp) +{ + + return (&bdomain[bp->b_domain]); +} + static struct bufqueue * bufqueue(struct buf *bp) { @@ -1339,9 +1482,9 @@ bufqueue(struct buf *bp) case QUEUE_EMPTY: return (&bqempty); case QUEUE_DIRTY: - return (&bqdirty); + return (&bufdomain(bp)->bd_dirtyq); case QUEUE_CLEAN: - return (&bdclean[bp->b_domain].bd_subq[bp->b_subqueue]); + return (&bufdomain(bp)->bd_subq[bp->b_subqueue]); default: break; } @@ -1404,14 +1547,14 @@ binsfree(struct buf *bp, int qindex) bq_remove(bq, bp); BQ_UNLOCK(bq); } + bd = bufdomain(bp); if (qindex == QUEUE_CLEAN) { - bd = &bdclean[bp->b_domain]; if (bd->bd_lim != 0) bq = &bd->bd_subq[PCPU_GET(cpuid)]; else bq = bd->bd_cleanq; } else - bq = &bqdirty; + bq = &bd->bd_dirtyq; bq_insert(bq, bp, true); } @@ -1439,7 +1582,7 @@ buf_free(struct buf *bp) if (!LIST_EMPTY(&bp->b_dep)) buf_deallocate(bp); bufkva_free(bp); - atomic_add_int(&bdclean[bp->b_domain].bd_freebuffers, 1); + atomic_add_int(&bufdomain(bp)->bd_freebuffers, 1); BUF_UNLOCK(bp); uma_zfree(buf_zone, bp); } @@ -1715,9 +1858,10 @@ bd_init(struct bufdomain *bd) int domain; int i; - domain = bd - bdclean; + domain = bd - bdomain; bd->bd_cleanq = &bd->bd_subq[mp_maxid + 1]; bq_init(bd->bd_cleanq, QUEUE_CLEAN, mp_maxid + 1, "bufq clean lock"); + bq_init(&bd->bd_dirtyq, QUEUE_DIRTY, -1, "bufq dirty lock"); for (i = 0; i <= mp_maxid; i++) bq_init(&bd->bd_subq[i], QUEUE_CLEAN, i, "bufq clean subqueue lock"); @@ -1809,7 +1953,7 @@ bq_insert(struct bufqueue *bq, struct buf *bp, bool un if (bp->b_qindex != QUEUE_NONE) panic("bq_insert: free buffer %p onto another queue?", bp); - bd = &bdclean[bp->b_domain]; + bd = bufdomain(bp); if (bp->b_flags & B_AGE) { /* Place this buf directly on the real queue. */ if (bq->bq_index == QUEUE_CLEAN) @@ -1926,8 +2070,8 @@ bufkva_reclaim(vmem_t *vmem, int flags) done = false; for (i = 0; i < 5; i++) { - for (q = 0; q < clean_domains; q++) - if (buf_recycle(&bdclean[q], true) != 0) + for (q = 0; q < buf_domains; q++) + if (buf_recycle(&bdomain[q], true) != 0) done = true; if (done) break; @@ -2319,7 +2463,7 @@ bdirty(struct buf *bp) if ((bp->b_flags & B_DELWRI) == 0) { bp->b_flags |= /* XXX B_DONE | */ B_DELWRI; reassignbuf(bp); - bdirtyadd(); + bdirtyadd(bp); } } @@ -2347,7 +2491,7 @@ bundirty(struct buf *bp) if (bp->b_flags & B_DELWRI) { bp->b_flags &= ~B_DELWRI; reassignbuf(bp); - bdirtysub(); + bdirtysub(bp); } /* * Since it is now being written, we can clear its deferred write flag. @@ -2419,9 +2563,9 @@ void bwillwrite(void) { - if (numdirtybuffers >= hidirtybuffers) { + if (buf_dirty_count_severe()) { mtx_lock(&bdirtylock); - while (numdirtybuffers >= hidirtybuffers) { + while (buf_dirty_count_severe()) { bdirtywait = 1; msleep(&bdirtywait, &bdirtylock, (PRIBIO + 4), "flswai", 0); @@ -2437,7 +2581,7 @@ int buf_dirty_count_severe(void) { - return(numdirtybuffers >= hidirtybuffers); + return (!BIT_EMPTY(BUF_DOMAINS, &bdhidirty)); } /* @@ -2523,7 +2667,7 @@ brelse(struct buf *bp) if (!LIST_EMPTY(&bp->b_dep)) buf_deallocate(bp); if (bp->b_flags & B_DELWRI) - bdirtysub(); + bdirtysub(bp); bp->b_flags &= ~(B_DELWRI | B_CACHE); if ((bp->b_flags & B_VMIO) == 0) { allocbuf(bp, 0); @@ -3138,9 +3282,9 @@ getnewbuf(struct vnode *vp, int slpflag, int slptimeo, else metadata = false; if (vp == NULL) - bd = &bdclean[0]; + bd = &bdomain[0]; else - bd = &bdclean[vp->v_bufobj.bo_domain]; + bd = &bdomain[vp->v_bufobj.bo_domain]; counter_u64_add(getnewbufcalls, 1); reserved = false; @@ -3186,11 +3330,11 @@ static struct kproc_desc buf_kp = { SYSINIT(bufdaemon, SI_SUB_KTHREAD_BUF, SI_ORDER_FIRST, kproc_start, &buf_kp); static int -buf_flush(struct vnode *vp, int target) +buf_flush(struct vnode *vp, struct bufdomain *bd, int target) { int flushed; - flushed = flushbufqueues(vp, target, 0); + flushed = flushbufqueues(vp, bd, target, 0); if (flushed == 0) { /* * Could not find any buffers without rollback @@ -3199,7 +3343,7 @@ buf_flush(struct vnode *vp, int target) */ if (vp != NULL && target > 2) target /= 2; - flushbufqueues(vp, target, 1); + flushbufqueues(vp, bd, target, 1); } return (flushed); } @@ -3207,6 +3351,8 @@ buf_flush(struct vnode *vp, int target) static void buf_daemon() { + struct bufdomain *bd; + int speedupreq; int lodirty; int i; @@ -3219,11 +3365,11 @@ buf_daemon() /* * Start the buf clean daemons as children threads. */ - for (i = 0 ; i < clean_domains; i++) { + for (i = 0 ; i < buf_domains; i++) { int error; error = kthread_add((void (*)(void *))bufspace_daemon, - &bdclean[i], curproc, NULL, 0, 0, "bufspacedaemon-%d", i); + &bdomain[i], curproc, NULL, 0, 0, "bufspacedaemon-%d", i); if (error) panic("error %d spawning bufspace daemon", error); } @@ -3238,20 +3384,30 @@ buf_daemon() mtx_unlock(&bdlock); kproc_suspend_check(bufdaemonproc); - lodirty = lodirtybuffers; - if (bd_speedupreq) { - lodirty = numdirtybuffers / 2; - bd_speedupreq = 0; - } + /* - * Do the flush. Limit the amount of in-transit I/O we - * allow to build up, otherwise we would completely saturate - * the I/O system. + * Save speedupreq for this pass and reset to capture new + * requests. */ - while (numdirtybuffers > lodirty) { - if (buf_flush(NULL, numdirtybuffers - lodirty) == 0) - break; - kern_yield(PRI_USER); + speedupreq = bd_speedupreq; + bd_speedupreq = 0; + + /* + * Flush each domain sequentially according to its level and + * the speedup request. + */ + for (i = 0; i < buf_domains; i++) { + bd = &bdomain[i]; + if (speedupreq) + lodirty = bd->bd_numdirtybuffers / 2; + else + lodirty = bd->bd_lodirtybuffers; + while (bd->bd_numdirtybuffers > lodirty) { + if (buf_flush(NULL, bd, + bd->bd_numdirtybuffers - lodirty) == 0) + break; + kern_yield(PRI_USER); + } } /* @@ -3265,7 +3421,7 @@ buf_daemon() * to avoid endless loops on unlockable buffers. */ mtx_lock(&bdlock); - if (numdirtybuffers <= lodirtybuffers) { + if (!BIT_EMPTY(BUF_DOMAINS, &bdlodirty)) { /* * We reached our low water mark, reset the * request and sleep until we are needed again. @@ -3304,7 +3460,8 @@ SYSCTL_INT(_vfs, OID_AUTO, flushwithdeps, CTLFLAG_RW, 0, "Number of buffers flushed with dependecies that require rollbacks"); static int -flushbufqueues(struct vnode *lvp, int target, int flushdeps) +flushbufqueues(struct vnode *lvp, struct bufdomain *bd, int target, + int flushdeps) { struct bufqueue *bq; struct buf *sentinel; @@ -3317,7 +3474,7 @@ flushbufqueues(struct vnode *lvp, int target, int flus bool unlock; flushed = 0; - bq = &bqdirty; + bq = &bd->bd_dirtyq; bp = NULL; sentinel = malloc(sizeof(struct buf), M_TEMP, M_WAITOK | M_ZERO); sentinel->b_qindex = QUEUE_SENTINEL; @@ -3653,7 +3810,7 @@ bp_unmapped_get_kva(struct buf *bp, daddr_t blkno, int panic("GB_NOWAIT_BD and GB_UNMAPPED %p", bp); } counter_u64_add(mappingrestarts, 1); - bufspace_wait(&bdclean[bp->b_domain], bp->b_vp, gbflags, 0, 0); + bufspace_wait(bufdomain(bp), bp->b_vp, gbflags, 0, 0); } has_addr: if (need_mapping) { @@ -3851,7 +4008,7 @@ loop: */ if (flags & GB_NOCREAT) return NULL; - if (bdclean[bo->bo_domain].bd_freebuffers == 0 && + if (bdomain[bo->bo_domain].bd_freebuffers == 0 && TD_IS_IDLETHREAD(curthread)) return NULL; @@ -3908,7 +4065,7 @@ loop: if (gbincore(bo, blkno)) { BO_UNLOCK(bo); bp->b_flags |= B_INVAL; - bufspace_release(&bdclean[bp->b_domain], maxsize); + bufspace_release(bufdomain(bp), maxsize); brelse(bp); goto loop; } @@ -3943,7 +4100,7 @@ loop: } allocbuf(bp, size); - bufspace_release(&bdclean[bp->b_domain], maxsize); + bufspace_release(bufdomain(bp), maxsize); bp->b_flags &= ~B_DONE; } CTR4(KTR_BUF, "getblk(%p, %ld, %d) = %p", vp, (long)blkno, size, bp); @@ -3972,7 +4129,7 @@ geteblk(int size, int flags) return (NULL); } allocbuf(bp, size); - bufspace_release(&bdclean[bp->b_domain], maxsize); + bufspace_release(bufdomain(bp), maxsize); bp->b_flags |= B_INVAL; /* b_dep cleared by getnewbuf() */ BUF_ASSERT_HELD(bp); return (bp); @@ -4841,7 +4998,7 @@ bufobj_init(struct bufobj *bo, void *private) static volatile int bufobj_cleanq; bo->bo_domain = - atomic_fetchadd_int(&bufobj_cleanq, 1) % clean_domains; + atomic_fetchadd_int(&bufobj_cleanq, 1) % buf_domains; rw_init(BO_LOCKPTR(bo), "bufobj interlock"); bo->bo_private = private; TAILQ_INIT(&bo->bo_clean.bv_hd); @@ -5164,6 +5321,7 @@ DB_SHOW_COMMAND(buffer, db_show_buffer) } db_printf("\n"); } + BUF_LOCKPRINTINFO(bp); #if defined(FULL_BUF_TRACKING) db_printf("b_io_tracking: b_io_tcnt = %u\n", bp->b_io_tcnt); @@ -5178,19 +5336,19 @@ DB_SHOW_COMMAND(buffer, db_show_buffer) db_printf("b_io_tracking: %s\n", bp->b_io_tracking); #endif db_printf(" "); - BUF_LOCKPRINTINFO(bp); } DB_SHOW_COMMAND(bufqueues, bufqueues) { struct bufdomain *bd; - int i, j; + struct buf *bp; + long total; + int i, j, cnt; db_printf("bqempty: %d\n", bqempty.bq_len); - db_printf("bqdirty: %d\n", bqdirty.bq_len); - for (i = 0; i < clean_domains; i++) { - bd = &bdclean[i]; + for (i = 0; i < buf_domains; i++) { + bd = &bdomain[i]; db_printf("Buf domain %d\n", i); db_printf("\tfreebufs\t%d\n", bd->bd_freebuffers); db_printf("\tlofreebufs\t%d\n", bd->bd_lofreebuffers); @@ -5202,13 +5360,43 @@ DB_SHOW_COMMAND(bufqueues, bufqueues) db_printf("\tlobufspace\t%ld\n", bd->bd_lobufspace); db_printf("\tbufspacethresh\t%ld\n", bd->bd_bufspacethresh); db_printf("\n"); - db_printf("\tcleanq count\t%d\n", bd->bd_cleanq->bq_len); + db_printf("\tnumdirtybuffers\t%d\n", bd->bd_numdirtybuffers); + db_printf("\tlodirtybuffers\t%d\n", bd->bd_lodirtybuffers); + db_printf("\thidirtybuffers\t%d\n", bd->bd_hidirtybuffers); + db_printf("\tdirtybufthresh\t%d\n", bd->bd_dirtybufthresh); + db_printf("\n"); + total = 0; + TAILQ_FOREACH(bp, &bd->bd_cleanq->bq_queue, b_freelist) + total += bp->b_bufsize; + db_printf("\tcleanq count\t%d (%ld)\n", + bd->bd_cleanq->bq_len, total); + total = 0; + TAILQ_FOREACH(bp, &bd->bd_dirtyq.bq_queue, b_freelist) + total += bp->b_bufsize; + db_printf("\tdirtyq count\t%d (%ld)\n", + bd->bd_dirtyq.bq_len, total); db_printf("\twakeup\t\t%d\n", bd->bd_wanted); db_printf("\tlim\t\t%d\n", bd->bd_lim); db_printf("\tCPU "); for (j = 0; j <= mp_maxid; j++) db_printf("%d, ", bd->bd_subq[j].bq_len); db_printf("\n"); + cnt = 0; + total = 0; + for (j = 0; j < nbuf; j++) + if (buf[j].b_domain == i && BUF_ISLOCKED(&buf[j])) { + cnt++; + total += buf[j].b_bufsize; + } + db_printf("\tLocked buffers: %d space %ld\n", cnt, total); + cnt = 0; + total = 0; + for (j = 0; j < nbuf; j++) + if (buf[j].b_domain == i) { + cnt++; + total += buf[j].b_bufsize; + } + db_printf("\tTotal buffers: %d space %ld\n", cnt, total); } } From owner-svn-src-all@freebsd.org Sat Mar 17 18:55:47 2018 Return-Path: Delivered-To: svn-src-all@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 8D34FF6087D; Sat, 17 Mar 2018 18:55:47 +0000 (UTC) (envelope-from dim@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 23473699A9; Sat, 17 Mar 2018 18:55:47 +0000 (UTC) (envelope-from dim@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 1B9F41628E; Sat, 17 Mar 2018 18:55:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HItkLH010299; Sat, 17 Mar 2018 18:55:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HItkpb010298; Sat, 17 Mar 2018 18:55:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803171855.w2HItkpb010298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 17 Mar 2018 18:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331107 - stable/11/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/11/sys/net X-SVN-Commit-Revision: 331107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 18:55:48 -0000 Author: dim Date: Sat Mar 17 18:55:46 2018 New Revision: 331107 URL: https://svnweb.freebsd.org/changeset/base/331107 Log: Repair obvious mismerge in r330897, resulting in misleading gcc error messages like "sys/net/if_fddisubr.c:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '-' token". Modified: stable/11/sys/net/if_fddisubr.c Modified: stable/11/sys/net/if_fddisubr.c ============================================================================== --- stable/11/sys/net/if_fddisubr.c Sat Mar 17 18:14:49 2018 (r331106) +++ stable/11/sys/net/if_fddisubr.c Sat Mar 17 18:55:46 2018 (r331107) @@ -1,6 +1,6 @@ +/*- * SPDX-License-Identifier: BSD-4-Clause * -/*- * Copyright (c) 1995, 1996 * Matt Thomas . All rights reserved. * Copyright (c) 1982, 1989, 1993 From owner-svn-src-all@freebsd.org Sat Mar 17 19:04:36 2018 Return-Path: Delivered-To: svn-src-all@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 B6A75F6122E; Sat, 17 Mar 2018 19:04:36 +0000 (UTC) (envelope-from dim@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 683836A09E; Sat, 17 Mar 2018 19:04:36 +0000 (UTC) (envelope-from dim@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 6323A1640D; Sat, 17 Mar 2018 19:04:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HJ4agS015159; Sat, 17 Mar 2018 19:04:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HJ4aSX015158; Sat, 17 Mar 2018 19:04:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803171904.w2HJ4aSX015158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 17 Mar 2018 19:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331108 - stable/11/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/11/sys/net80211 X-SVN-Commit-Revision: 331108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 19:04:36 -0000 Author: dim Date: Sat Mar 17 19:04:36 2018 New Revision: 331108 URL: https://svnweb.freebsd.org/changeset/base/331108 Log: Revert r330471 (MFC of r311861), since it results in compile errors like: sys/net80211/ieee80211_tdma.c:179: error: 'IEEE80211_MODE_VHT_2GHZ' undeclared (first use in this function) sys/net80211/ieee80211_tdma.c:180: error: 'IEEE80211_MODE_VHT_5GHZ' undeclared (first use in this function) The IEEE80211_MODE_VHT_2GHZ and IEEE80211_MODE_VHT_5GHZ enum values are defined in r310147, but that commit cannot be MFCd as-is, because it likely breaks ABI. Modified: stable/11/sys/net80211/ieee80211_tdma.c Modified: stable/11/sys/net80211/ieee80211_tdma.c ============================================================================== --- stable/11/sys/net80211/ieee80211_tdma.c Sat Mar 17 18:55:46 2018 (r331107) +++ stable/11/sys/net80211/ieee80211_tdma.c Sat Mar 17 19:04:36 2018 (r331108) @@ -176,8 +176,6 @@ ieee80211_tdma_vattach(struct ieee80211vap *vap) settxparms(vap, IEEE80211_MODE_11NG, TDMA_TXRATE_11NG_DEFAULT); settxparms(vap, IEEE80211_MODE_HALF, TDMA_TXRATE_HALF_DEFAULT); settxparms(vap, IEEE80211_MODE_QUARTER, TDMA_TXRATE_QUARTER_DEFAULT); - settxparms(vap, IEEE80211_MODE_VHT_2GHZ, TDMA_TXRATE_11NG_DEFAULT); - settxparms(vap, IEEE80211_MODE_VHT_5GHZ, TDMA_TXRATE_11NA_DEFAULT); setackpolicy(vap->iv_ic, 1); /* disable ACK's */ From owner-svn-src-all@freebsd.org Sat Mar 17 19:26:34 2018 Return-Path: Delivered-To: svn-src-all@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 23B3EF62988; Sat, 17 Mar 2018 19:26:34 +0000 (UTC) (envelope-from mjg@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 B51016ACA8; Sat, 17 Mar 2018 19:26:33 +0000 (UTC) (envelope-from mjg@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 AA25E1671D; Sat, 17 Mar 2018 19:26:33 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HJQXZb025199; Sat, 17 Mar 2018 19:26:33 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HJQXpv025196; Sat, 17 Mar 2018 19:26:33 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201803171926.w2HJQXpv025196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 17 Mar 2018 19:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331109 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 331109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 19:26:34 -0000 Author: mjg Date: Sat Mar 17 19:26:33 2018 New Revision: 331109 URL: https://svnweb.freebsd.org/changeset/base/331109 Log: locks: slightly depessimize lockstat The slow path is always taken when lockstat is enabled. This induces rdtsc (or other) calls to get the cycle count even when there was no contention. Still go to the slow path to not mess with the fast path, but avoid the heavy lifting unless necessary. This reduces sys and real time during -j 80 buildkernel: before: 3651.84s user 1105.59s system 5394% cpu 1:28.18 total after: 3685.99s user 975.74s system 5450% cpu 1:25.53 total disabled: 3697.96s user 411.13s system 5261% cpu 1:18.10 total So note this is still a significant hit. LOCK_PROFILING results are not affected. Modified: head/sys/kern/kern_mutex.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sat Mar 17 19:04:36 2018 (r331108) +++ head/sys/kern/kern_mutex.c Sat Mar 17 19:26:33 2018 (r331109) @@ -491,8 +491,25 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) int doing_lockprof; #endif + td = curthread; tid = (uintptr_t)td; + m = mtxlock2mtx(c); + +#ifdef KDTRACE_HOOKS + if (LOCKSTAT_PROFILE_ENABLED(adaptive__acquire)) { + while (v == MTX_UNOWNED) { + if (_mtx_obtain_lock_fetch(m, &v, tid)) + goto out_lockstat; + } + doing_lockprof = 1; + all_time -= lockstat_nsecs(&m->lock_object); + } +#endif +#ifdef LOCK_PROFILING + doing_lockprof = 1; +#endif + if (SCHEDULER_STOPPED_TD(td)) return; @@ -501,7 +518,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) #elif defined(KDTRACE_HOOKS) lock_delay_arg_init(&lda, NULL); #endif - m = mtxlock2mtx(c); + if (__predict_false(v == MTX_UNOWNED)) v = MTX_READ_VALUE(m); @@ -532,13 +549,6 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) CTR4(KTR_LOCK, "_mtx_lock_sleep: %s contested (lock=%p) at %s:%d", m->lock_object.lo_name, (void *)m->mtx_lock, file, line); -#ifdef LOCK_PROFILING - doing_lockprof = 1; -#elif defined(KDTRACE_HOOKS) - doing_lockprof = lockstat_enabled; - if (__predict_false(doing_lockprof)) - all_time -= lockstat_nsecs(&m->lock_object); -#endif for (;;) { if (v == MTX_UNOWNED) { @@ -660,10 +670,6 @@ retry_turnstile: #endif #ifdef KDTRACE_HOOKS all_time += lockstat_nsecs(&m->lock_object); -#endif - LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(adaptive__acquire, m, contested, - waittime, file, line); -#ifdef KDTRACE_HOOKS if (sleep_time) LOCKSTAT_RECORD1(adaptive__block, m, sleep_time); @@ -672,7 +678,10 @@ retry_turnstile: */ if (lda.spin_cnt > sleep_cnt) LOCKSTAT_RECORD1(adaptive__spin, m, all_time - sleep_time); +out_lockstat: #endif + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(adaptive__acquire, m, contested, + waittime, file, line); } #ifdef SMP @@ -708,6 +717,20 @@ _mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t tid = (uintptr_t)curthread; m = mtxlock2mtx(c); +#ifdef KDTRACE_HOOKS + if (LOCKSTAT_PROFILE_ENABLED(adaptive__acquire)) { + while (v == MTX_UNOWNED) { + if (_mtx_obtain_lock_fetch(m, &v, tid)) + goto out_lockstat; + } + doing_lockprof = 1; + spin_time -= lockstat_nsecs(&m->lock_object); + } +#endif +#ifdef LOCK_PROFILING + doing_lockprof = 1; +#endif + if (__predict_false(v == MTX_UNOWNED)) v = MTX_READ_VALUE(m); @@ -730,13 +753,7 @@ _mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t PMC_SOFT_CALL( , , lock, failed); #endif lock_profile_obtain_lock_failed(&m->lock_object, &contested, &waittime); -#ifdef LOCK_PROFILING - doing_lockprof = 1; -#elif defined(KDTRACE_HOOKS) - doing_lockprof = lockstat_enabled; - if (__predict_false(doing_lockprof)) - spin_time -= lockstat_nsecs(&m->lock_object); -#endif + for (;;) { if (v == MTX_UNOWNED) { if (_mtx_obtain_lock_fetch(m, &v, tid)) @@ -767,13 +784,12 @@ _mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t #endif #ifdef KDTRACE_HOOKS spin_time += lockstat_nsecs(&m->lock_object); -#endif - LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, m, - contested, waittime, file, line); -#ifdef KDTRACE_HOOKS if (lda.spin_cnt != 0) LOCKSTAT_RECORD1(spin__spin, m, spin_time); +out_lockstat: #endif + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, m, + contested, waittime, file, line); } #endif /* SMP */ Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Sat Mar 17 19:04:36 2018 (r331108) +++ head/sys/kern/kern_rwlock.c Sat Mar 17 19:26:33 2018 (r331109) @@ -438,9 +438,23 @@ __rw_rlock_hard(struct rwlock *rw, struct thread *td, #endif #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) uintptr_t state; - int doing_lockprof; + int doing_lockprof = 0; #endif +#ifdef KDTRACE_HOOKS + if (LOCKSTAT_PROFILE_ENABLED(rw__acquire)) { + if (__rw_rlock_try(rw, td, &v, false LOCK_FILE_LINE_ARG)) + goto out_lockstat; + doing_lockprof = 1; + all_time -= lockstat_nsecs(&rw->lock_object); + state = v; + } +#endif +#ifdef LOCK_PROFILING + doing_lockprof = 1; + state = v; +#endif + if (SCHEDULER_STOPPED()) return; @@ -456,17 +470,6 @@ __rw_rlock_hard(struct rwlock *rw, struct thread *td, lock_profile_obtain_lock_failed(&rw->lock_object, &contested, &waittime); -#ifdef LOCK_PROFILING - doing_lockprof = 1; - state = v; -#elif defined(KDTRACE_HOOKS) - doing_lockprof = lockstat_enabled; - if (__predict_false(doing_lockprof)) { - all_time -= lockstat_nsecs(&rw->lock_object); - state = v; - } -#endif - for (;;) { if (__rw_rlock_try(rw, td, &v, false LOCK_FILE_LINE_ARG)) break; @@ -615,6 +618,7 @@ retry_ts: LOCKSTAT_RECORD4(rw__spin, rw, all_time - sleep_time, LOCKSTAT_READER, (state & RW_LOCK_READ) == 0, (state & RW_LOCK_READ) == 0 ? 0 : RW_READERS(state)); +out_lockstat: #endif /* * TODO: acquire "owner of record" here. Here be turnstile dragons @@ -892,10 +896,28 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC #endif #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) uintptr_t state; - int doing_lockprof; + int doing_lockprof = 0; #endif tid = (uintptr_t)curthread; + rw = rwlock2rw(c); + +#ifdef KDTRACE_HOOKS + if (LOCKSTAT_PROFILE_ENABLED(rw__acquire)) { + while (v == RW_UNLOCKED) { + if (_rw_write_lock_fetch(rw, &v, tid)) + goto out_lockstat; + } + doing_lockprof = 1; + all_time -= lockstat_nsecs(&rw->lock_object); + state = v; + } +#endif +#ifdef LOCK_PROFILING + doing_lockprof = 1; + state = v; +#endif + if (SCHEDULER_STOPPED()) return; @@ -904,7 +926,6 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC #elif defined(KDTRACE_HOOKS) lock_delay_arg_init(&lda, NULL); #endif - rw = rwlock2rw(c); if (__predict_false(v == RW_UNLOCKED)) v = RW_READ_VALUE(rw); @@ -929,17 +950,6 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC lock_profile_obtain_lock_failed(&rw->lock_object, &contested, &waittime); -#ifdef LOCK_PROFILING - doing_lockprof = 1; - state = v; -#elif defined(KDTRACE_HOOKS) - doing_lockprof = lockstat_enabled; - if (__predict_false(doing_lockprof)) { - all_time -= lockstat_nsecs(&rw->lock_object); - state = v; - } -#endif - for (;;) { if (v == RW_UNLOCKED) { if (_rw_write_lock_fetch(rw, &v, tid)) @@ -1101,6 +1111,7 @@ retry_ts: LOCKSTAT_RECORD4(rw__spin, rw, all_time - sleep_time, LOCKSTAT_WRITER, (state & RW_LOCK_READ) == 0, (state & RW_LOCK_READ) == 0 ? 0 : RW_READERS(state)); +out_lockstat: #endif LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(rw__acquire, rw, contested, waittime, file, line, LOCKSTAT_WRITER); Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sat Mar 17 19:04:36 2018 (r331108) +++ head/sys/kern/kern_sx.c Sat Mar 17 19:26:33 2018 (r331109) @@ -565,6 +565,23 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO int extra_work = 0; tid = (uintptr_t)curthread; + +#ifdef KDTRACE_HOOKS + if (LOCKSTAT_PROFILE_ENABLED(sx__acquire)) { + while (x == SX_LOCK_UNLOCKED) { + if (atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, tid)) + goto out_lockstat; + } + extra_work = 1; + all_time -= lockstat_nsecs(&sx->lock_object); + state = x; + } +#endif +#ifdef LOCK_PROFILING + extra_work = 1; + state = x; +#endif + if (SCHEDULER_STOPPED()) return (0); @@ -603,16 +620,6 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO lock_profile_obtain_lock_failed(&sx->lock_object, &contested, &waittime); -#ifdef LOCK_PROFILING - extra_work = 1; - state = x; -#elif defined(KDTRACE_HOOKS) - extra_work = lockstat_enabled; - if (__predict_false(extra_work)) { - all_time -= lockstat_nsecs(&sx->lock_object); - state = x; - } -#endif #ifndef INVARIANTS GIANT_SAVE(extra_work); #endif @@ -800,6 +807,7 @@ retry_sleepq: LOCKSTAT_RECORD4(sx__spin, sx, all_time - sleep_time, LOCKSTAT_WRITER, (state & SX_LOCK_SHARED) == 0, (state & SX_LOCK_SHARED) == 0 ? 0 : SX_SHARERS(state)); +out_lockstat: #endif if (!error) LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, @@ -932,6 +940,20 @@ _sx_slock_hard(struct sx *sx, int opts, uintptr_t x LO #endif int extra_work = 0; +#ifdef KDTRACE_HOOKS + if (LOCKSTAT_PROFILE_ENABLED(sx__acquire)) { + if (__sx_slock_try(sx, &x LOCK_FILE_LINE_ARG)) + goto out_lockstat; + extra_work = 1; + all_time -= lockstat_nsecs(&sx->lock_object); + state = x; + } +#endif +#ifdef LOCK_PROFILING + extra_work = 1; + state = x; +#endif + if (SCHEDULER_STOPPED()) return (0); @@ -951,16 +973,6 @@ _sx_slock_hard(struct sx *sx, int opts, uintptr_t x LO lock_profile_obtain_lock_failed(&sx->lock_object, &contested, &waittime); -#ifdef LOCK_PROFILING - extra_work = 1; - state = x; -#elif defined(KDTRACE_HOOKS) - extra_work = lockstat_enabled; - if (__predict_false(extra_work)) { - all_time -= lockstat_nsecs(&sx->lock_object); - state = x; - } -#endif #ifndef INVARIANTS GIANT_SAVE(extra_work); #endif @@ -1102,6 +1114,7 @@ retry_sleepq: LOCKSTAT_RECORD4(sx__spin, sx, all_time - sleep_time, LOCKSTAT_READER, (state & SX_LOCK_SHARED) == 0, (state & SX_LOCK_SHARED) == 0 ? 0 : SX_SHARERS(state)); +out_lockstat: #endif if (error == 0) { LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(sx__acquire, sx, From owner-svn-src-all@freebsd.org Sat Mar 17 20:17:36 2018 Return-Path: Delivered-To: svn-src-all@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 8AB22F65CA8; Sat, 17 Mar 2018 20:17:36 +0000 (UTC) (envelope-from dim@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 401196CCED; Sat, 17 Mar 2018 20:17:36 +0000 (UTC) (envelope-from dim@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 2274016E97; Sat, 17 Mar 2018 20:17:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HKHaSq050221; Sat, 17 Mar 2018 20:17:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HKHaFJ050220; Sat, 17 Mar 2018 20:17:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201803172017.w2HKHaFJ050220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 17 Mar 2018 20:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331110 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 331110 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 20:17:36 -0000 Author: dim Date: Sat Mar 17 20:17:35 2018 New Revision: 331110 URL: https://svnweb.freebsd.org/changeset/base/331110 Log: Follow-up to r331108 by also recording the reversal of r311861 in svn:mergeinfo. Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-all@freebsd.org Sat Mar 17 20:20:31 2018 Return-Path: Delivered-To: svn-src-all@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 3C4ACF65F12; Sat, 17 Mar 2018 20:20:31 +0000 (UTC) (envelope-from bryanv@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 E186B6CED8; Sat, 17 Mar 2018 20:20:30 +0000 (UTC) (envelope-from bryanv@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 DB17816EAC; Sat, 17 Mar 2018 20:20:30 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HKKUKG050408; Sat, 17 Mar 2018 20:20:30 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HKKU8Q050401; Sat, 17 Mar 2018 20:20:30 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201803172020.w2HKKU8Q050401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Sat, 17 Mar 2018 20:20:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331111 - in stable/11: share/man/man9 sys/dev/pci X-SVN-Group: stable-11 X-SVN-Commit-Author: bryanv X-SVN-Commit-Paths: in stable/11: share/man/man9 sys/dev/pci X-SVN-Commit-Revision: 331111 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 20:20:31 -0000 Author: bryanv Date: Sat Mar 17 20:20:29 2018 New Revision: 331111 URL: https://svnweb.freebsd.org/changeset/base/331111 Log: MFC r329598: Add PCI methods to iterate over the PCI capabilities VirtIO V1 provides configuration in multiple VENDOR capabilities so this allows all of the configuration to be discovered. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D14325 Modified: stable/11/share/man/man9/pci.9 stable/11/sys/dev/pci/hostb_pci.c stable/11/sys/dev/pci/pci.c stable/11/sys/dev/pci/pci_if.m stable/11/sys/dev/pci/pci_private.h stable/11/sys/dev/pci/pcivar.h stable/11/sys/dev/pci/vga_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/pci.9 ============================================================================== --- stable/11/share/man/man9/pci.9 Sat Mar 17 20:17:35 2018 (r331110) +++ stable/11/share/man/man9/pci.9 Sat Mar 17 20:20:29 2018 (r331111) @@ -42,6 +42,9 @@ .Nm pci_find_device , .Nm pci_find_extcap , .Nm pci_find_htcap , +.Nm pci_find_next_cap , +.Nm pci_find_next_extcap , +.Nm pci_find_next_htcap , .Nm pci_find_pcie_root_port , .Nm pci_get_id , .Nm pci_get_max_payload , @@ -100,6 +103,12 @@ .Fn pci_find_extcap "device_t dev" "int capability" "int *capreg" .Ft int .Fn pci_find_htcap "device_t dev" "int capability" "int *capreg" +.Ft int +.Fn pci_find_next_cap "device_t dev" "int capability" "int start" "int *capreg" +.Ft int +.Fn pci_find_next_extcap "device_t dev" "int capability" "int start" "int *capreg" +.Ft int +.Fn pci_find_next_htcap "device_t dev" "int capability" "int start" "int *capreg" .Ft device_t .Fn pci_find_pcie_root_port "device_t dev" .Ft int @@ -330,6 +339,22 @@ returns zero. If the capability is not found or the device does not support capabilities, .Fn pci_find_cap returns an error. +The +.Fn pci_find_next_cap +function is used to locate the next instance of a PCI capability +register set for the device +.Fa dev . +The +.Fa start +should be the +.Fa *capreg +returned by a prior +.Fn pci_find_cap +or +.Fn pci_find_next_cap . +When no more instances are located +.Fn pci_find_next_cap +returns an error. .Pp The .Fn pci_find_extcap @@ -352,6 +377,22 @@ If the extended capability is not found or the device PCI-express device, .Fn pci_find_extcap returns an error. +The +.Fn pci_find_next_extcap +function is used to locate the next instance of a PCI-express +extended capability register set for the device +.Fa dev . +The +.Fa start +should be the +.Fa *capreg +returned by a prior +.Fn pci_find_extcap +or +.Fn pci_find_next_extcap . +When no more instances are located +.Fn pci_find_next_extcap +returns an error. .Pp The .Fn pci_find_htcap @@ -372,6 +413,22 @@ and returns zero. If the capability is not found or the device is not a HyperTransport device, .Fn pci_find_htcap +returns an error. +The +.Fn pci_find_next_htcap +function is used to locate the next instance of a HyperTransport capability +register set for the device +.Fa dev . +The +.Fa start +should be the +.Fa *capreg +returned by a prior +.Fn pci_find_htcap +or +.Fn pci_find_next_htcap . +When no more instances are located +.Fn pci_find_next_htcap returns an error. .Pp The Modified: stable/11/sys/dev/pci/hostb_pci.c ============================================================================== --- stable/11/sys/dev/pci/hostb_pci.c Sat Mar 17 20:17:35 2018 (r331110) +++ stable/11/sys/dev/pci/hostb_pci.c Sat Mar 17 20:20:29 2018 (r331111) @@ -207,6 +207,14 @@ pci_hostb_find_cap(device_t dev, device_t child, int c } static int +pci_hostb_find_next_cap(device_t dev, device_t child, int capability, + int start, int *capreg) +{ + + return (pci_find_next_cap(dev, capability, start, capreg)); +} + +static int pci_hostb_find_extcap(device_t dev, device_t child, int capability, int *capreg) { @@ -215,6 +223,14 @@ pci_hostb_find_extcap(device_t dev, device_t child, in } static int +pci_hostb_find_next_extcap(device_t dev, device_t child, int capability, + int start, int *capreg) +{ + + return (pci_find_next_extcap(dev, capability, start, capreg)); +} + +static int pci_hostb_find_htcap(device_t dev, device_t child, int capability, int *capreg) { @@ -222,6 +238,14 @@ pci_hostb_find_htcap(device_t dev, device_t child, int return (pci_find_htcap(dev, capability, capreg)); } +static int +pci_hostb_find_next_htcap(device_t dev, device_t child, int capability, + int start, int *capreg) +{ + + return (pci_find_next_htcap(dev, capability, start, capreg)); +} + static device_method_t pci_hostb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, pci_hostb_probe), @@ -252,8 +276,11 @@ static device_method_t pci_hostb_methods[] = { DEVMETHOD(pci_set_powerstate, pci_hostb_set_powerstate), DEVMETHOD(pci_assign_interrupt, pci_hostb_assign_interrupt), DEVMETHOD(pci_find_cap, pci_hostb_find_cap), + DEVMETHOD(pci_find_next_cap, pci_hostb_find_next_cap), DEVMETHOD(pci_find_extcap, pci_hostb_find_extcap), + DEVMETHOD(pci_find_next_extcap, pci_hostb_find_next_extcap), DEVMETHOD(pci_find_htcap, pci_hostb_find_htcap), + DEVMETHOD(pci_find_next_htcap, pci_hostb_find_next_htcap), { 0, 0 } }; Modified: stable/11/sys/dev/pci/pci.c ============================================================================== --- stable/11/sys/dev/pci/pci.c Sat Mar 17 20:17:35 2018 (r331110) +++ stable/11/sys/dev/pci/pci.c Sat Mar 17 20:20:29 2018 (r331111) @@ -180,8 +180,11 @@ static device_method_t pci_methods[] = { DEVMETHOD(pci_set_powerstate, pci_set_powerstate_method), DEVMETHOD(pci_assign_interrupt, pci_assign_interrupt_method), DEVMETHOD(pci_find_cap, pci_find_cap_method), + DEVMETHOD(pci_find_next_cap, pci_find_next_cap_method), DEVMETHOD(pci_find_extcap, pci_find_extcap_method), + DEVMETHOD(pci_find_next_extcap, pci_find_next_extcap_method), DEVMETHOD(pci_find_htcap, pci_find_htcap_method), + DEVMETHOD(pci_find_next_htcap, pci_find_next_htcap_method), DEVMETHOD(pci_alloc_msi, pci_alloc_msi_method), DEVMETHOD(pci_alloc_msix, pci_alloc_msix_method), DEVMETHOD(pci_enable_msi, pci_enable_msi_method), @@ -1374,7 +1377,7 @@ pci_find_htcap_method(device_t dev, device_t child, in * Traverse the capabilities list checking each HT capability * to see if it matches the requested HT capability. */ - while (ptr != 0) { + for (;;) { val = pci_read_config(child, ptr + PCIR_HT_COMMAND, 2); if (capability == PCIM_HTCAP_SLAVE || capability == PCIM_HTCAP_HOST) @@ -1388,13 +1391,51 @@ pci_find_htcap_method(device_t dev, device_t child, in } /* Skip to the next HT capability. */ - while (ptr != 0) { - ptr = pci_read_config(child, ptr + PCICAP_NEXTPTR, 1); - if (pci_read_config(child, ptr + PCICAP_ID, 1) == - PCIY_HT) - break; + if (pci_find_next_cap(child, PCIY_HT, ptr, &ptr) != 0) + break; + } + + return (ENOENT); +} + +/* + * Find the next requested HyperTransport capability after start and return + * the offset in configuration space via the pointer provided. The function + * returns 0 on success and an error code otherwise. + */ +int +pci_find_next_htcap_method(device_t dev, device_t child, int capability, + int start, int *capreg) +{ + int ptr; + uint16_t val; + + KASSERT(pci_read_config(child, start + PCICAP_ID, 1) == PCIY_HT, + ("start capability is not HyperTransport capability")); + ptr = start; + + /* + * Traverse the capabilities list checking each HT capability + * to see if it matches the requested HT capability. + */ + for (;;) { + /* Skip to the next HT capability. */ + if (pci_find_next_cap(child, PCIY_HT, ptr, &ptr) != 0) + break; + + val = pci_read_config(child, ptr + PCIR_HT_COMMAND, 2); + if (capability == PCIM_HTCAP_SLAVE || + capability == PCIM_HTCAP_HOST) + val &= 0xe000; + else + val &= PCIM_HTCMD_CAP_MASK; + if (val == capability) { + if (capreg != NULL) + *capreg = ptr; + return (0); } } + return (ENOENT); } @@ -1409,8 +1450,8 @@ pci_find_cap_method(device_t dev, device_t child, int { struct pci_devinfo *dinfo = device_get_ivars(child); pcicfgregs *cfg = &dinfo->cfg; - u_int32_t status; - u_int8_t ptr; + uint32_t status; + uint8_t ptr; /* * Check the CAP_LIST bit of the PCI status register first. @@ -1452,6 +1493,33 @@ pci_find_cap_method(device_t dev, device_t child, int } /* + * Find the next requested capability after start and return the offset in + * configuration space via the pointer provided. The function returns + * 0 on success and an error code otherwise. + */ +int +pci_find_next_cap_method(device_t dev, device_t child, int capability, + int start, int *capreg) +{ + uint8_t ptr; + + KASSERT(pci_read_config(child, start + PCICAP_ID, 1) == capability, + ("start capability is not expected capability")); + + ptr = pci_read_config(child, start + PCICAP_NEXTPTR, 1); + while (ptr != 0) { + if (pci_read_config(child, ptr + PCICAP_ID, 1) == capability) { + if (capreg != NULL) + *capreg = ptr; + return (0); + } + ptr = pci_read_config(child, ptr + PCICAP_NEXTPTR, 1); + } + + return (ENOENT); +} + +/* * Find the requested extended capability and return the offset in * configuration space via the pointer provided. The function returns * 0 on success and an error code otherwise. @@ -1483,6 +1551,41 @@ pci_find_extcap_method(device_t dev, device_t child, i if (ptr == 0) break; ecap = pci_read_config(child, ptr, 4); + } + + return (ENOENT); +} + +/* + * Find the next requested extended capability after start and return the + * offset in configuration space via the pointer provided. The function + * returns 0 on success and an error code otherwise. + */ +int +pci_find_next_extcap_method(device_t dev, device_t child, int capability, + int start, int *capreg) +{ + struct pci_devinfo *dinfo = device_get_ivars(child); + pcicfgregs *cfg = &dinfo->cfg; + uint32_t ecap; + uint16_t ptr; + + /* Only supported for PCI-express devices. */ + if (cfg->pcie.pcie_location == 0) + return (ENXIO); + + ecap = pci_read_config(child, start, 4); + KASSERT(PCI_EXTCAP_ID(ecap) == capability, + ("start extended capability is not expected capability")); + ptr = PCI_EXTCAP_NEXTPTR(ecap); + while (ptr != 0) { + ecap = pci_read_config(child, ptr, 4); + if (PCI_EXTCAP_ID(ecap) == capability) { + if (capreg != NULL) + *capreg = ptr; + return (0); + } + ptr = PCI_EXTCAP_NEXTPTR(ecap); } return (ENOENT); Modified: stable/11/sys/dev/pci/pci_if.m ============================================================================== --- stable/11/sys/dev/pci/pci_if.m Sat Mar 17 20:17:35 2018 (r331110) +++ stable/11/sys/dev/pci/pci_if.m Sat Mar 17 20:20:29 2018 (r331111) @@ -144,6 +144,14 @@ METHOD int find_cap { int *capreg; }; +METHOD int find_next_cap { + device_t dev; + device_t child; + int capability; + int start; + int *capreg; +}; + METHOD int find_extcap { device_t dev; device_t child; @@ -151,10 +159,26 @@ METHOD int find_extcap { int *capreg; }; +METHOD int find_next_extcap { + device_t dev; + device_t child; + int capability; + int start; + int *capreg; +}; + METHOD int find_htcap { device_t dev; device_t child; int capability; + int *capreg; +}; + +METHOD int find_next_htcap { + device_t dev; + device_t child; + int capability; + int start; int *capreg; }; Modified: stable/11/sys/dev/pci/pci_private.h ============================================================================== --- stable/11/sys/dev/pci/pci_private.h Sat Mar 17 20:17:35 2018 (r331110) +++ stable/11/sys/dev/pci/pci_private.h Sat Mar 17 20:20:29 2018 (r331111) @@ -90,10 +90,16 @@ int pci_enable_io_method(device_t dev, device_t child int pci_disable_io_method(device_t dev, device_t child, int space); int pci_find_cap_method(device_t dev, device_t child, int capability, int *capreg); +int pci_find_next_cap_method(device_t dev, device_t child, + int capability, int start, int *capreg); int pci_find_extcap_method(device_t dev, device_t child, int capability, int *capreg); +int pci_find_next_extcap_method(device_t dev, device_t child, + int capability, int start, int *capreg); int pci_find_htcap_method(device_t dev, device_t child, int capability, int *capreg); +int pci_find_next_htcap_method(device_t dev, device_t child, + int capability, int start, int *capreg); int pci_alloc_msi_method(device_t dev, device_t child, int *count); int pci_alloc_msix_method(device_t dev, device_t child, int *count); void pci_enable_msi_method(device_t dev, device_t child, Modified: stable/11/sys/dev/pci/pcivar.h ============================================================================== --- stable/11/sys/dev/pci/pcivar.h Sat Mar 17 20:17:35 2018 (r331110) +++ stable/11/sys/dev/pci/pcivar.h Sat Mar 17 20:20:29 2018 (r331111) @@ -468,15 +468,36 @@ pci_find_cap(device_t dev, int capability, int *capreg } static __inline int +pci_find_next_cap(device_t dev, int capability, int start, int *capreg) +{ + return (PCI_FIND_NEXT_CAP(device_get_parent(dev), dev, capability, start, + capreg)); +} + +static __inline int pci_find_extcap(device_t dev, int capability, int *capreg) { return (PCI_FIND_EXTCAP(device_get_parent(dev), dev, capability, capreg)); } static __inline int +pci_find_next_extcap(device_t dev, int capability, int start, int *capreg) +{ + return (PCI_FIND_NEXT_EXTCAP(device_get_parent(dev), dev, capability, + start, capreg)); +} + +static __inline int pci_find_htcap(device_t dev, int capability, int *capreg) { return (PCI_FIND_HTCAP(device_get_parent(dev), dev, capability, capreg)); +} + +static __inline int +pci_find_next_htcap(device_t dev, int capability, int start, int *capreg) +{ + return (PCI_FIND_NEXT_HTCAP(device_get_parent(dev), dev, capability, + start, capreg)); } static __inline int Modified: stable/11/sys/dev/pci/vga_pci.c ============================================================================== --- stable/11/sys/dev/pci/vga_pci.c Sat Mar 17 20:17:35 2018 (r331110) +++ stable/11/sys/dev/pci/vga_pci.c Sat Mar 17 20:20:29 2018 (r331111) @@ -497,6 +497,14 @@ vga_pci_find_cap(device_t dev, device_t child, int cap } static int +vga_pci_find_next_cap(device_t dev, device_t child, int capability, + int start, int *capreg) +{ + + return (pci_find_next_cap(dev, capability, start, capreg)); +} + +static int vga_pci_find_extcap(device_t dev, device_t child, int capability, int *capreg) { @@ -505,6 +513,14 @@ vga_pci_find_extcap(device_t dev, device_t child, int } static int +vga_pci_find_next_extcap(device_t dev, device_t child, int capability, + int start, int *capreg) +{ + + return (pci_find_next_extcap(dev, capability, start, capreg)); +} + +static int vga_pci_find_htcap(device_t dev, device_t child, int capability, int *capreg) { @@ -513,6 +529,14 @@ vga_pci_find_htcap(device_t dev, device_t child, int c } static int +vga_pci_find_next_htcap(device_t dev, device_t child, int capability, + int start, int *capreg) +{ + + return (pci_find_next_htcap(dev, capability, start, capreg)); +} + +static int vga_pci_alloc_msi(device_t dev, device_t child, int *count) { struct vga_pci_softc *sc; @@ -622,8 +646,11 @@ static device_method_t vga_pci_methods[] = { DEVMETHOD(pci_set_powerstate, vga_pci_set_powerstate), DEVMETHOD(pci_assign_interrupt, vga_pci_assign_interrupt), DEVMETHOD(pci_find_cap, vga_pci_find_cap), + DEVMETHOD(pci_find_next_cap, vga_pci_find_next_cap), DEVMETHOD(pci_find_extcap, vga_pci_find_extcap), + DEVMETHOD(pci_find_next_extcap, vga_pci_find_next_extcap), DEVMETHOD(pci_find_htcap, vga_pci_find_htcap), + DEVMETHOD(pci_find_next_htcap, vga_pci_find_next_htcap), DEVMETHOD(pci_alloc_msi, vga_pci_alloc_msi), DEVMETHOD(pci_alloc_msix, vga_pci_alloc_msix), DEVMETHOD(pci_remap_msix, vga_pci_remap_msix), From owner-svn-src-all@freebsd.org Sat Mar 17 20:37:03 2018 Return-Path: Delivered-To: svn-src-all@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 44290F66F8D; Sat, 17 Mar 2018 20:37:03 +0000 (UTC) (envelope-from bryanv@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 D98476D955; Sat, 17 Mar 2018 20:37:02 +0000 (UTC) (envelope-from bryanv@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 CE6D2171C1; Sat, 17 Mar 2018 20:37:02 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HKb2KT060526; Sat, 17 Mar 2018 20:37:02 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HKb2PG060520; Sat, 17 Mar 2018 20:37:02 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201803172037.w2HKb2PG060520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Sat, 17 Mar 2018 20:37:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331112 - stable/11/sys/dev/virtio X-SVN-Group: stable-11 X-SVN-Commit-Author: bryanv X-SVN-Commit-Paths: stable/11/sys/dev/virtio X-SVN-Commit-Revision: 331112 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 20:37:03 -0000 Author: bryanv Date: Sat Mar 17 20:37:01 2018 New Revision: 331112 URL: https://svnweb.freebsd.org/changeset/base/331112 Log: MFC r327958, r329601, r329602: Sync VirtIO IDs with Linux Add VirtIO bus config_generation method Add more virtqueue getter methods Modified: stable/11/sys/dev/virtio/virtio.c stable/11/sys/dev/virtio/virtio.h stable/11/sys/dev/virtio/virtio_bus_if.m stable/11/sys/dev/virtio/virtio_ids.h stable/11/sys/dev/virtio/virtqueue.c stable/11/sys/dev/virtio/virtqueue.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/virtio/virtio.c ============================================================================== --- stable/11/sys/dev/virtio/virtio.c Sat Mar 17 20:20:29 2018 (r331111) +++ stable/11/sys/dev/virtio/virtio.c Sat Mar 17 20:37:01 2018 (r331112) @@ -54,14 +54,21 @@ static struct virtio_ident { uint16_t devid; const char *name; } virtio_ident_table[] = { - { VIRTIO_ID_NETWORK, "Network" }, - { VIRTIO_ID_BLOCK, "Block" }, - { VIRTIO_ID_CONSOLE, "Console" }, - { VIRTIO_ID_ENTROPY, "Entropy" }, - { VIRTIO_ID_BALLOON, "Balloon" }, - { VIRTIO_ID_IOMEMORY, "IOMemory" }, - { VIRTIO_ID_SCSI, "SCSI" }, - { VIRTIO_ID_9P, "9P Transport" }, + { VIRTIO_ID_NETWORK, "Network" }, + { VIRTIO_ID_BLOCK, "Block" }, + { VIRTIO_ID_CONSOLE, "Console" }, + { VIRTIO_ID_ENTROPY, "Entropy" }, + { VIRTIO_ID_BALLOON, "Balloon" }, + { VIRTIO_ID_IOMEMORY, "IOMemory" }, + { VIRTIO_ID_RPMSG, "Remote Processor Messaging" }, + { VIRTIO_ID_SCSI, "SCSI" }, + { VIRTIO_ID_9P, "9P Transport" }, + { VIRTIO_ID_RPROC_SERIAL, "Remote Processor Serial" }, + { VIRTIO_ID_CAIF, "CAIF" }, + { VIRTIO_ID_GPU, "GPU" }, + { VIRTIO_ID_INPUT, "Input" }, + { VIRTIO_ID_VSOCK, "VSOCK Transport" }, + { VIRTIO_ID_CRYPTO, "Crypto" }, { 0, NULL } }; @@ -231,6 +238,13 @@ virtio_reinit_complete(device_t dev) { VIRTIO_BUS_REINIT_COMPLETE(device_get_parent(dev)); +} + +int +virtio_config_generation(device_t dev) +{ + + return (VIRTIO_BUS_CONFIG_GENERATION(device_get_parent(dev))); } void Modified: stable/11/sys/dev/virtio/virtio.h ============================================================================== --- stable/11/sys/dev/virtio/virtio.h Sat Mar 17 20:20:29 2018 (r331111) +++ stable/11/sys/dev/virtio/virtio.h Sat Mar 17 20:37:01 2018 (r331112) @@ -78,6 +78,7 @@ int virtio_alloc_virtqueues(device_t dev, int flags, int virtio_setup_intr(device_t dev, enum intr_type type); int virtio_with_feature(device_t dev, uint64_t feature); void virtio_stop(device_t dev); +int virtio_config_generation(device_t dev); int virtio_reinit(device_t dev, uint64_t features); void virtio_reinit_complete(device_t dev); Modified: stable/11/sys/dev/virtio/virtio_bus_if.m ============================================================================== --- stable/11/sys/dev/virtio/virtio_bus_if.m Sat Mar 17 20:20:29 2018 (r331111) +++ stable/11/sys/dev/virtio/virtio_bus_if.m Sat Mar 17 20:37:01 2018 (r331112) @@ -34,6 +34,14 @@ HEADER { struct vq_alloc_info; }; +CODE { + static int + virtio_bus_default_config_generation(device_t dev) + { + return (0); + } +}; + METHOD uint64_t negotiate_features { device_t dev; uint64_t child_features; @@ -73,6 +81,10 @@ METHOD void notify_vq { device_t dev; uint16_t queue; }; + +METHOD int config_generation { + device_t dev; +} DEFAULT virtio_bus_default_config_generation; METHOD void read_device_config { device_t dev; Modified: stable/11/sys/dev/virtio/virtio_ids.h ============================================================================== --- stable/11/sys/dev/virtio/virtio_ids.h Sat Mar 17 20:20:29 2018 (r331111) +++ stable/11/sys/dev/virtio/virtio_ids.h Sat Mar 17 20:37:01 2018 (r331112) @@ -32,13 +32,20 @@ #define _VIRTIO_IDS_H_ /* VirtIO device IDs. */ -#define VIRTIO_ID_NETWORK 0x01 -#define VIRTIO_ID_BLOCK 0x02 -#define VIRTIO_ID_CONSOLE 0x03 -#define VIRTIO_ID_ENTROPY 0x04 -#define VIRTIO_ID_BALLOON 0x05 -#define VIRTIO_ID_IOMEMORY 0x06 -#define VIRTIO_ID_SCSI 0x08 -#define VIRTIO_ID_9P 0x09 +#define VIRTIO_ID_NETWORK 1 +#define VIRTIO_ID_BLOCK 2 +#define VIRTIO_ID_CONSOLE 3 +#define VIRTIO_ID_ENTROPY 4 +#define VIRTIO_ID_BALLOON 5 +#define VIRTIO_ID_IOMEMORY 6 +#define VIRTIO_ID_RPMSG 7 +#define VIRTIO_ID_SCSI 8 +#define VIRTIO_ID_9P 9 +#define VIRTIO_ID_RPROC_SERIAL 11 +#define VIRTIO_ID_CAIF 12 +#define VIRTIO_ID_GPU 16 +#define VIRTIO_ID_INPUT 18 +#define VIRTIO_ID_VSOCK 19 +#define VIRTIO_ID_CRYPTO 20 #endif /* _VIRTIO_IDS_H_ */ Modified: stable/11/sys/dev/virtio/virtqueue.c ============================================================================== --- stable/11/sys/dev/virtio/virtqueue.c Sat Mar 17 20:20:29 2018 (r331111) +++ stable/11/sys/dev/virtio/virtqueue.c Sat Mar 17 20:37:01 2018 (r331112) @@ -369,6 +369,33 @@ virtqueue_paddr(struct virtqueue *vq) return (vtophys(vq->vq_ring_mem)); } +vm_paddr_t +virtqueue_desc_paddr(struct virtqueue *vq) +{ + + return (vtophys(vq->vq_ring.desc)); +} + +vm_paddr_t +virtqueue_avail_paddr(struct virtqueue *vq) +{ + + return (vtophys(vq->vq_ring.avail)); +} + +vm_paddr_t +virtqueue_used_paddr(struct virtqueue *vq) +{ + + return (vtophys(vq->vq_ring.used)); +} + +uint16_t +virtqueue_index(struct virtqueue *vq) +{ + return (vq->vq_queue_index); +} + int virtqueue_size(struct virtqueue *vq) { Modified: stable/11/sys/dev/virtio/virtqueue.h ============================================================================== --- stable/11/sys/dev/virtio/virtqueue.h Sat Mar 17 20:20:29 2018 (r331111) +++ stable/11/sys/dev/virtio/virtqueue.h Sat Mar 17 20:37:01 2018 (r331112) @@ -84,7 +84,11 @@ void virtqueue_disable_intr(struct virtqueue *vq); /* Get physical address of the virtqueue ring. */ vm_paddr_t virtqueue_paddr(struct virtqueue *vq); +vm_paddr_t virtqueue_desc_paddr(struct virtqueue *vq); +vm_paddr_t virtqueue_avail_paddr(struct virtqueue *vq); +vm_paddr_t virtqueue_used_paddr(struct virtqueue *vq); +uint16_t virtqueue_index(struct virtqueue *vq); int virtqueue_full(struct virtqueue *vq); int virtqueue_empty(struct virtqueue *vq); int virtqueue_size(struct virtqueue *vq); From owner-svn-src-all@freebsd.org Sat Mar 17 21:49:19 2018 Return-Path: Delivered-To: svn-src-all@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 E1839F436D0; Sat, 17 Mar 2018 21:49:18 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x22a.google.com (mail-lf0-x22a.google.com [IPv6:2a00:1450:4010:c07::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4379A70135; Sat, 17 Mar 2018 21:49:18 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x22a.google.com with SMTP id y2-v6so18096524lfc.5; Sat, 17 Mar 2018 14:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=5/zxi4EdGbNR/sXiHUm93xASxSq4vP4/NGujnaM2yjQ=; b=Hy9REzRk3+PAaqKSz6OpZeEWjWbp6SC/mkSpFdd1FFpWQxInquOKRB2xc3SxKgRoLj Fx1ReQ7+cdYTm8zChg1oAciEcu1aAKiBxlnI+W4GKdyukXLs50xdnblS80lecdHZGSQt cn6kn6zTTscqKtIvjFbDMxKvlGn5ZovAHCL3qug5vtjIcN5NUZGjQD+lN2LWOF7Jgoyj v1xPJzCkfp74ALT8CXQw6mXwE0Y7qaVClFobrkl29CKqfoQDAGue65NXMjGVXtmoXTzj wW6yLi5GlxON7/i9ZbUMCNrnYXFqW1Iud6jM6ASKLVuGV4y4Vt8jZM0/xQjrZ7KPf7bX ms/w== 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=5/zxi4EdGbNR/sXiHUm93xASxSq4vP4/NGujnaM2yjQ=; b=SxOPQPKZwMaghpJMC0S4QmtPdfdK/FCdrMDSmCHHKv52i0bvjVyzcExZ+SoQLsLb1j MyDynLKLsVAVQ0vhG6AqIuU66/5M8/inxJ0aZ0VxjU32eH/L4x8OPHfJJoMw/uE8jGaB BtNPOYoJRRjPY1WNuTgh9l2rRTtTTBZNyw+S06OzFiWH6xTDQZ9Qgv9S//+OmuqZvIlc kfRZHN8L68iLy4SLtOZnjKcQiS3s3W6WTu5RApLnK6cY9lwJEEECJ30IsC1K5KcCAZhM JH6eMVKXpc0iNnd6tn9sQKJKpp46MBsXNJRlPoZemUTyxKZqrakSboDJ3xSLgQp4DKjy Y8cw== X-Gm-Message-State: AElRT7HweBB9dfqGRLzrIOnKHwIT5+cd9jnjkpjROjCyu8QIhLCOrscZ 4BY+jrwCX5/feWCst/PNgX2yJjYSH786CTUiesJMWA== X-Google-Smtp-Source: AG47ELvIVchc5WSry7MFkInrNqdWl0nGMTEl/VDb6V/FMtcHec5N5n6Lt0TipneGf26DunAuuDgnTLvC7nWX3nhjFZg= X-Received: by 10.46.86.204 with SMTP id k73mr4453433lje.16.1521323356349; Sat, 17 Mar 2018 14:49:16 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.3.226 with HTTP; Sat, 17 Mar 2018 14:49:15 -0700 (PDT) In-Reply-To: <201803140300.w2E30HmE024745@repo.freebsd.org> References: <201803140300.w2E30HmE024745@repo.freebsd.org> From: Alan Somers Date: Sat, 17 Mar 2018 15:49:15 -0600 X-Google-Sender-Auth: U2udXk8kVtSxcqeCwjiAV0ffgVQ Message-ID: Subject: Re: svn commit: r330894 - in head/sys/contrib/zstd: . contrib/meson doc doc/images lib lib/common lib/compress lib/decompress lib/deprecated lib/dictBuilder lib/legacy programs tests zlibWrapper zlibWr... 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.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 21:49:19 -0000 On Tue, Mar 13, 2018 at 9:00 PM, Conrad Meyer wrote: > Author: cem > Date: Wed Mar 14 03:00:17 2018 > New Revision: 330894 > URL: https://svnweb.freebsd.org/changeset/base/330894 > > Log: > Update to Zstandard 1.3.3 > > Includes patch to conditionalize use of __builtin_clz(ll) on > __has_builtin(). > The issue is tracked upstream at https://github.com/facebook/ > zstd/pull/884 . > Otherwise, these are vanilla Zstandard 1.3.3 files. > > Note that the 1.3.4 release should be due out soon. > > Sponsored by: Dell EMC Isilon > > I think this broke the build on RISC-V. Could you please take a look? https://ci.freebsd.org/job/FreeBSD-head-riscv64-build/7028/console From owner-svn-src-all@freebsd.org Sat Mar 17 21:58:42 2018 Return-Path: Delivered-To: svn-src-all@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 BC6E0F461D6; Sat, 17 Mar 2018 21:58:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 55CF0707EF; Sat, 17 Mar 2018 21:58:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4336517DCD; Sat, 17 Mar 2018 21:58:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2HLwg5j000608; Sat, 17 Mar 2018 21:58:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2HLwgbu000607; Sat, 17 Mar 2018 21:58:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201803172158.w2HLwgbu000607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 17 Mar 2018 21:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331113 - head/sbin/savecore X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sbin/savecore X-SVN-Commit-Revision: 331113 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 21:58:42 -0000 Author: trasz Date: Sat Mar 17 21:58:41 2018 New Revision: 331113 URL: https://svnweb.freebsd.org/changeset/base/331113 Log: Xr crashinfo(8) from savecore(8). MFC after: 2 weeks Modified: head/sbin/savecore/savecore.8 Modified: head/sbin/savecore/savecore.8 ============================================================================== --- head/sbin/savecore/savecore.8 Sat Mar 17 20:37:01 2018 (r331112) +++ head/sbin/savecore/savecore.8 Sat Mar 17 21:58:41 2018 (r331113) @@ -174,6 +174,7 @@ is meant to be called near the end of the initializati .Xr xo_parse_args 3 , .Xr textdump 4 , .Xr tar 5 , +.Xr crashinfo 8 , .Xr decryptcore 8 , .Xr dumpon 8 , .Xr syslogd 8 From owner-svn-src-all@freebsd.org Sat Mar 17 22:40:01 2018 Return-Path: Delivered-To: svn-src-all@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 3A9ACF4AFB0; Sat, 17 Mar 2018 22:40:01 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f42.google.com (mail-it0-f42.google.com [209.85.214.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CF99171C0E; Sat, 17 Mar 2018 22:40:00 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f42.google.com with SMTP id g7-v6so6128005itf.1; Sat, 17 Mar 2018 15:40:00 -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=NWixXrH87Cd7UgLyQLLFJh5uPVdXyrLj04unO2pCRXI=; b=lcLUdbT3RxoG0T79g/Tuxj2kIheLBrw3tLNyAh/1F2xVLjSVl/iFPexKKi/hqnXDdf R/s3cpCkt/sLlC2EJ9jGGyNJN/j6aQujyiIAC6PAn/eGwViIyBuw4qG/KDKMXl/Ko+FO hQ0aZHPIcltkyzthPqwZtw0SSlCAatGJWVNE6W3Ix5Lsn5ar9J3vN74EeVTwHTrI4pUd Nud6NYhFExve16qbXS6kCjYa5MoP1QViwma0vxJHRz/GiI3Nx4p+GnTGEUocgbVQGtJV YPwIzAjX5qrgBxHs85snv+dqqV/q668YOYpTbocxaMy6s3VqO8f3YOoBbbYScH4C7TYN CFjQ== X-Gm-Message-State: AElRT7FupS0EDaJ2sL8JtBjt0ZPnnSMQxMW/gmY/FsaBxLyZtkvk+1+F h5cJw1gAMH7i5h4WjRR2kX8PkoPJ X-Google-Smtp-Source: AG47ELvqAXG9xihwdsEdm+FFPl3Yf8Vfv3VTWJx6xqYrNn+548agiCsOi4G9QIzng4lTECGi9Exqpw== X-Received: by 2002:a24:5447:: with SMTP id t68-v6mr510304ita.67.1521326067656; Sat, 17 Mar 2018 15:34:27 -0700 (PDT) Received: from mail-io0-f179.google.com (mail-io0-f179.google.com. [209.85.223.179]) by smtp.gmail.com with ESMTPSA id v23sm6536979iov.57.2018.03.17.15.34.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Mar 2018 15:34:27 -0700 (PDT) Received: by mail-io0-f179.google.com with SMTP id h23so16575682iob.11; Sat, 17 Mar 2018 15:34:27 -0700 (PDT) X-Received: by 10.107.34.80 with SMTP id i77mr6651103ioi.220.1521326067251; Sat, 17 Mar 2018 15:34:27 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.153.132 with HTTP; Sat, 17 Mar 2018 15:34:26 -0700 (PDT) In-Reply-To: References: <201803140300.w2E30HmE024745@repo.freebsd.org> From: Conrad Meyer Date: Sat, 17 Mar 2018 15:34:26 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r330894 - in head/sys/contrib/zstd: . contrib/meson doc doc/images lib lib/common lib/compress lib/decompress lib/deprecated lib/dictBuilder lib/legacy programs tests zlibWrapper zlibWr... To: Alan Somers Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 22:40:01 -0000 Thanks for letting me know. I'll be able to take a look this weekend. Best, Conrad On Sat, Mar 17, 2018 at 2:49 PM, Alan Somers wrote: > On Tue, Mar 13, 2018 at 9:00 PM, Conrad Meyer wrote: >> >> Author: cem >> Date: Wed Mar 14 03:00:17 2018 >> New Revision: 330894 >> URL: https://svnweb.freebsd.org/changeset/base/330894 >> >> Log: >> Update to Zstandard 1.3.3 >> >> Includes patch to conditionalize use of __builtin_clz(ll) on >> __has_builtin(). >> The issue is tracked upstream at >> https://github.com/facebook/zstd/pull/884 . >> Otherwise, these are vanilla Zstandard 1.3.3 files. >> >> Note that the 1.3.4 release should be due out soon. >> >> Sponsored by: Dell EMC Isilon >> > > I think this broke the build on RISC-V. Could you please take a look? > > https://ci.freebsd.org/job/FreeBSD-head-riscv64-build/7028/console >