From owner-svn-src-all@freebsd.org Sun Aug 23 04:16:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E18713B0896; Sun, 23 Aug 2020 04:16:21 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZ24j5d2Tz4Dvr; Sun, 23 Aug 2020 04:16:21 +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 A51B3216A3; Sun, 23 Aug 2020 04:16:21 +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 07N4GLXN004603; Sun, 23 Aug 2020 04:16:21 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07N4GK1F004599; Sun, 23 Aug 2020 04:16:20 GMT (envelope-from np@FreeBSD.org) Message-Id: <202008230416.07N4GK1F004599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 23 Aug 2020 04:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364497 - in head/sys/dev/cxgbe: . common X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head/sys/dev/cxgbe: . common X-SVN-Commit-Revision: 364497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 04:16:21 -0000 Author: np Date: Sun Aug 23 04:16:20 2020 New Revision: 364497 URL: https://svnweb.freebsd.org/changeset/base/364497 Log: cxgbe(4): Use large clusters for TOE rx queues when TOE+TLS is enabled. Rx is more efficient within the chip when the receive buffer size matches the TLS PDU size. MFC after: 3 days Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D26127 Modified: head/sys/dev/cxgbe/common/common.h head/sys/dev/cxgbe/common/t4_hw.c head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/common/common.h ============================================================================== --- head/sys/dev/cxgbe/common/common.h Sat Aug 22 22:56:50 2020 (r364496) +++ head/sys/dev/cxgbe/common/common.h Sun Aug 23 04:16:20 2020 (r364497) @@ -246,6 +246,8 @@ struct tp_params { uint32_t vlan_pri_map; uint32_t ingress_config; + uint32_t max_rx_pdu; + uint32_t max_tx_pdu; uint64_t hash_filter_mask; __be16 err_vec_mask; Modified: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Sat Aug 22 22:56:50 2020 (r364496) +++ head/sys/dev/cxgbe/common/t4_hw.c Sun Aug 23 04:16:20 2020 (r364497) @@ -9614,7 +9614,7 @@ static void read_filter_mode_and_ingress_config(struct int t4_init_tp_params(struct adapter *adap, bool sleep_ok) { int chan; - u32 v; + u32 tx_len, rx_len, r, v; struct tp_params *tpp = &adap->params.tp; v = t4_read_reg(adap, A_TP_TIMER_RESOLUTION); @@ -9640,6 +9640,21 @@ int t4_init_tp_params(struct adapter *adap, bool sleep htobe16(V_T6_COMPR_RXERR_VEC(M_T6_COMPR_RXERR_VEC)); } } + + rx_len = t4_read_reg(adap, A_TP_PMM_RX_PAGE_SIZE); + tx_len = t4_read_reg(adap, A_TP_PMM_TX_PAGE_SIZE); + + r = t4_read_reg(adap, A_TP_PARA_REG2); + rx_len = min(rx_len, G_MAXRXDATA(r)); + tx_len = min(tx_len, G_MAXRXDATA(r)); + + r = t4_read_reg(adap, A_TP_PARA_REG7); + v = min(G_PMMAXXFERLEN0(r), G_PMMAXXFERLEN1(r)); + rx_len = min(rx_len, v); + tx_len = min(tx_len, v); + + tpp->max_tx_pdu = tx_len; + tpp->max_rx_pdu = rx_len; return 0; } Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Sat Aug 22 22:56:50 2020 (r364496) +++ head/sys/dev/cxgbe/t4_main.c Sun Aug 23 04:16:20 2020 (r364497) @@ -736,6 +736,7 @@ static int sysctl_ulprx_la(SYSCTL_HANDLER_ARGS); static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); static int sysctl_cpus(SYSCTL_HANDLER_ARGS); #ifdef TCP_OFFLOAD +static int sysctl_tls(SYSCTL_HANDLER_ARGS); 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); @@ -6607,8 +6608,9 @@ t4_sysctls(struct adapter *sc) 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", CTLTYPE_INT | + CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, sysctl_tls, "I", + "Inline TLS allowed"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tls_rx_ports", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, @@ -9699,6 +9701,37 @@ sysctl_cpus(SYSCTL_HANDLER_ARGS) } #ifdef TCP_OFFLOAD +static int +sysctl_tls(SYSCTL_HANDLER_ARGS) +{ + struct adapter *sc = arg1; + int i, j, v, rc; + struct vi_info *vi; + + v = sc->tt.tls; + rc = sysctl_handle_int(oidp, &v, 0, req); + if (rc != 0 || req->newptr == NULL) + return (rc); + + if (v != 0 && !(sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS)) + return (ENOTSUP); + + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4stls"); + if (rc) + return (rc); + sc->tt.tls = !!v; + for_each_port(sc, i) { + for_each_vi(sc->port[i], j, vi) { + if (vi->flags & VI_INIT_DONE) + t4_update_fl_bufsize(vi->ifp); + } + } + end_synchronized_op(sc, 0); + + return (0); + +} + static int sysctl_tls_rx_ports(SYSCTL_HANDLER_ARGS) { Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Sat Aug 22 22:56:50 2020 (r364496) +++ head/sys/dev/cxgbe/t4_sge.c Sun Aug 23 04:16:20 2020 (r364497) @@ -1032,14 +1032,19 @@ t4_teardown_adapter_queues(struct adapter *sc) return (0); } -/* Maximum payload that can be delivered with a single iq descriptor */ +/* Maximum payload that could arrive with a single iq descriptor. */ static inline int -mtu_to_max_payload(struct adapter *sc, int mtu) +max_rx_payload(struct adapter *sc, struct ifnet *ifp, const bool ofld) { + int maxp; /* large enough even when hw VLAN extraction is disabled */ - return (sc->params.sge.fl_pktshift + ETHER_HDR_LEN + - ETHER_VLAN_ENCAP_LEN + mtu); + maxp = sc->params.sge.fl_pktshift + ETHER_HDR_LEN + + ETHER_VLAN_ENCAP_LEN + ifp->if_mtu; + if (ofld && sc->tt.tls && sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS && + maxp < sc->params.tp.max_rx_pdu) + maxp = sc->params.tp.max_rx_pdu; + return (maxp); } int @@ -1065,7 +1070,7 @@ t4_setup_vi_queues(struct vi_info *vi) struct ifnet *ifp = vi->ifp; struct sysctl_oid *oid = device_get_sysctl_tree(vi->dev); struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid); - int maxp, mtu = ifp->if_mtu; + int maxp; /* Interrupt vector to start from (when using multiple vectors) */ intr_idx = vi->first_intr; @@ -1109,7 +1114,7 @@ t4_setup_vi_queues(struct vi_info *vi) * Allocate rx queues first because a default iqid is required when * creating a tx queue. */ - maxp = mtu_to_max_payload(sc, mtu); + maxp = max_rx_payload(sc, ifp, false); oid = SYSCTL_ADD_NODE(&vi->ctx, children, OID_AUTO, "rxq", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "rx queues"); for_each_rxq(vi, i, rxq) { @@ -1131,6 +1136,7 @@ t4_setup_vi_queues(struct vi_info *vi) intr_idx = saved_idx + max(vi->nrxq, vi->nnmrxq); #endif #ifdef TCP_OFFLOAD + maxp = max_rx_payload(sc, ifp, true); oid = SYSCTL_ADD_NODE(&vi->ctx, children, OID_AUTO, "ofld_rxq", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "rx queues for offloaded TCP connections"); for_each_ofld_rxq(vi, i, ofld_rxq) { @@ -2144,9 +2150,9 @@ t4_update_fl_bufsize(struct ifnet *ifp) struct sge_ofld_rxq *ofld_rxq; #endif struct sge_fl *fl; - int i, maxp, mtu = ifp->if_mtu; + int i, maxp; - maxp = mtu_to_max_payload(sc, mtu); + maxp = max_rx_payload(sc, ifp, false); for_each_rxq(vi, i, rxq) { fl = &rxq->fl; @@ -2156,6 +2162,7 @@ t4_update_fl_bufsize(struct ifnet *ifp) FL_UNLOCK(fl); } #ifdef TCP_OFFLOAD + maxp = max_rx_payload(sc, ifp, true); for_each_ofld_rxq(vi, i, ofld_rxq) { fl = &ofld_rxq->fl; From owner-svn-src-all@freebsd.org Sun Aug 23 11:05:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CFEF3B9ADA; Sun, 23 Aug 2020 11:05:27 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZC8l0jrSz4YFZ; Sun, 23 Aug 2020 11:05:27 +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 EC50925EE7; Sun, 23 Aug 2020 11:05:26 +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 07NB5QuA055997; Sun, 23 Aug 2020 11:05:26 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NB5QO0055996; Sun, 23 Aug 2020 11:05:26 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008231105.07NB5QO0055996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 23 Aug 2020 11:05:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364499 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364499 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 11:05:27 -0000 Author: mjg Date: Sun Aug 23 11:05:26 2020 New Revision: 364499 URL: https://svnweb.freebsd.org/changeset/base/364499 Log: vfs: mark freevnode as noinline Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Aug 23 06:56:28 2020 (r364498) +++ head/sys/kern/vfs_subr.c Sun Aug 23 11:05:26 2020 (r364499) @@ -1756,7 +1756,7 @@ getnewvnode_drop_reserve(void) } } -static void +static void __noinline freevnode(struct vnode *vp) { struct bufobj *bo; From owner-svn-src-all@freebsd.org Sun Aug 23 11:07:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 264BD3B9DD9; Sun, 23 Aug 2020 11:07:00 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZCBX0HB0z4Y2g; Sun, 23 Aug 2020 11:07:00 +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 E12F425EE9; Sun, 23 Aug 2020 11:06:59 +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 07NB6xxW056111; Sun, 23 Aug 2020 11:06:59 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NB6xUu056110; Sun, 23 Aug 2020 11:06:59 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008231106.07NB6xUu056110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 23 Aug 2020 11:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364500 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 364500 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 11:07:00 -0000 Author: mjg Date: Sun Aug 23 11:06:59 2020 New Revision: 364500 URL: https://svnweb.freebsd.org/changeset/base/364500 Log: libc: hide alphasort_thunk behind I_AM_SCANDIR_B Should unbreak gcc build as reported by tinderbox: lib/libc/gen/scandir.c:59:12: warning: 'alphasort_thunk' declared 'static' but never defined [-Wunused-function] Modified: head/lib/libc/gen/scandir.c Modified: head/lib/libc/gen/scandir.c ============================================================================== --- head/lib/libc/gen/scandir.c Sun Aug 23 11:05:26 2020 (r364499) +++ head/lib/libc/gen/scandir.c Sun Aug 23 11:06:59 2020 (r364500) @@ -56,7 +56,9 @@ void qsort_b(void *, size_t, size_t, void *); #define SELECT(x) select(x) #endif +#ifndef I_AM_SCANDIR_B static int alphasort_thunk(void *thunk, const void *p1, const void *p2); +#endif int #ifdef I_AM_SCANDIR_B From owner-svn-src-all@freebsd.org Sun Aug 23 17:34:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F172E3C2E98; Sun, 23 Aug 2020 17:34:21 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZMnT65V1z3cwN; Sun, 23 Aug 2020 17:34:21 +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 B4757ABBD; Sun, 23 Aug 2020 17:34:21 +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 07NHYL7v094388; Sun, 23 Aug 2020 17:34:21 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NHYLrs094387; Sun, 23 Aug 2020 17:34:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008231734.07NHYLrs094387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 23 Aug 2020 17:34:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364501 - in stable/12/sys: amd64/acpica i386/acpica X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: amd64/acpica i386/acpica X-SVN-Commit-Revision: 364501 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 17:34:22 -0000 Author: markj Date: Sun Aug 23 17:34:21 2020 New Revision: 364501 URL: https://svnweb.freebsd.org/changeset/base/364501 Log: MFC r364411: Use pmap_mapbios() to map ACPI tables on amd64 and i386. PR: 248746 Modified: stable/12/sys/amd64/acpica/acpi_machdep.c stable/12/sys/i386/acpica/acpi_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/acpica/acpi_machdep.c ============================================================================== --- stable/12/sys/amd64/acpica/acpi_machdep.c Sun Aug 23 11:06:59 2020 (r364500) +++ stable/12/sys/amd64/acpica/acpi_machdep.c Sun Aug 23 17:34:21 2020 (r364501) @@ -91,91 +91,29 @@ acpi_machdep_quirks(int *quirks) } /* - * Support for mapping ACPI tables during early boot. Currently this - * uses the crashdump map to map each table. However, the crashdump - * map is created in pmap_bootstrap() right after the direct map, so - * we should be able to just use pmap_mapbios() here instead. - * - * This makes the following assumptions about how we use this KVA: - * pages 0 and 1 are used to map in the header of each table found via - * the RSDT or XSDT and pages 2 to n are used to map in the RSDT or - * XSDT. This has to use 2 pages for the table headers in case a - * header spans a page boundary. - * - * XXX: We don't ensure the table fits in the available address space - * in the crashdump map. + * Map a table. First map the header to determine the table length and then map + * the entire table. */ - -/* - * Map some memory using the crashdump map. 'offset' is an offset in - * pages into the crashdump map to use for the start of the mapping. - */ static void * -table_map(vm_paddr_t pa, int offset, vm_offset_t length) +map_table(vm_paddr_t pa, const char *sig) { - vm_offset_t va, off; - void *data; - - off = pa & PAGE_MASK; - length = round_page(length + off); - pa = pa & PG_FRAME; - va = (vm_offset_t)pmap_kenter_temporary(pa, offset) + - (offset * PAGE_SIZE); - data = (void *)(va + off); - length -= PAGE_SIZE; - while (length > 0) { - va += PAGE_SIZE; - pa += PAGE_SIZE; - length -= PAGE_SIZE; - pmap_kenter(va, pa); - invlpg(va); - } - return (data); -} - -/* Unmap memory previously mapped with table_map(). */ -static void -table_unmap(void *data, vm_offset_t length) -{ - vm_offset_t va, off; - - va = (vm_offset_t)data; - off = va & PAGE_MASK; - length = round_page(length + off); - va &= ~PAGE_MASK; - while (length > 0) { - pmap_kremove(va); - invlpg(va); - va += PAGE_SIZE; - length -= PAGE_SIZE; - } -} - -/* - * Map a table at a given offset into the crashdump map. It first - * maps the header to determine the table length and then maps the - * entire table. - */ -static void * -map_table(vm_paddr_t pa, int offset, const char *sig) -{ ACPI_TABLE_HEADER *header; vm_offset_t length; void *table; - header = table_map(pa, offset, sizeof(ACPI_TABLE_HEADER)); + header = pmap_mapbios(pa, sizeof(ACPI_TABLE_HEADER)); if (strncmp(header->Signature, sig, ACPI_NAMESEG_SIZE) != 0) { - table_unmap(header, sizeof(ACPI_TABLE_HEADER)); + pmap_unmapbios((vm_offset_t)header, sizeof(ACPI_TABLE_HEADER)); return (NULL); } length = header->Length; - table_unmap(header, sizeof(ACPI_TABLE_HEADER)); - table = table_map(pa, offset, length); + pmap_unmapbios((vm_offset_t)header, sizeof(ACPI_TABLE_HEADER)); + table = pmap_mapbios(pa, length); if (ACPI_FAILURE(AcpiTbChecksum(table, length))) { if (bootverbose) printf("ACPI: Failed checksum for table %s\n", sig); #if (ACPI_CHECKSUM_ABORT) - table_unmap(table, length); + pmap_unmapbios((vm_offset_t)table, length); return (NULL); #endif } @@ -190,24 +128,15 @@ static int probe_table(vm_paddr_t address, const char *sig) { ACPI_TABLE_HEADER *table; + int ret; - table = table_map(address, 0, sizeof(ACPI_TABLE_HEADER)); - if (table == NULL) { - if (bootverbose) - printf("ACPI: Failed to map table at 0x%jx\n", - (uintmax_t)address); - return (0); - } + table = pmap_mapbios(address, sizeof(ACPI_TABLE_HEADER)); + ret = strncmp(table->Signature, sig, ACPI_NAMESEG_SIZE) == 0; if (bootverbose) printf("Table '%.4s' at 0x%jx\n", table->Signature, (uintmax_t)address); - - if (strncmp(table->Signature, sig, ACPI_NAMESEG_SIZE) != 0) { - table_unmap(table, sizeof(ACPI_TABLE_HEADER)); - return (0); - } - table_unmap(table, sizeof(ACPI_TABLE_HEADER)); - return (1); + pmap_unmapbios((vm_offset_t)table, sizeof(ACPI_TABLE_HEADER)); + return (ret); } /* @@ -218,7 +147,7 @@ void * acpi_map_table(vm_paddr_t pa, const char *sig) { - return (map_table(pa, 0, sig)); + return (map_table(pa, sig)); } /* Unmap a table previously mapped via acpi_map_table(). */ @@ -228,7 +157,7 @@ acpi_unmap_table(void *table) ACPI_TABLE_HEADER *header; header = (ACPI_TABLE_HEADER *)table; - table_unmap(table, header->Length); + pmap_unmapbios((vm_offset_t)table, header->Length); } /* @@ -265,9 +194,7 @@ acpi_find_table(const char *sig) /* * For ACPI >= 2.0, use the XSDT if it is available. - * Otherwise, use the RSDT. We map the XSDT or RSDT at page 2 - * in the crashdump area. Pages 0 and 1 are used to map in the - * headers of candidate ACPI tables. + * Otherwise, use the RSDT. */ addr = 0; if (rsdp->Revision >= 2 && rsdp->XsdtPhysicalAddress != 0) { @@ -281,7 +208,7 @@ acpi_find_table(const char *sig) printf("ACPI: RSDP failed extended checksum\n"); return (0); } - xsdt = map_table(rsdp->XsdtPhysicalAddress, 2, ACPI_SIG_XSDT); + xsdt = map_table(rsdp->XsdtPhysicalAddress, ACPI_SIG_XSDT); if (xsdt == NULL) { if (bootverbose) printf("ACPI: Failed to map XSDT\n"); @@ -296,7 +223,7 @@ acpi_find_table(const char *sig) } acpi_unmap_table(xsdt); } else { - rsdt = map_table(rsdp->RsdtPhysicalAddress, 2, ACPI_SIG_RSDT); + rsdt = map_table(rsdp->RsdtPhysicalAddress, ACPI_SIG_RSDT); if (rsdt == NULL) { if (bootverbose) printf("ACPI: Failed to map RSDT\n"); @@ -324,7 +251,7 @@ acpi_find_table(const char *sig) * Verify that we can map the full table and that its checksum is * correct, etc. */ - table = map_table(addr, 0, sig); + table = map_table(addr, sig); if (table == NULL) return (0); acpi_unmap_table(table); Modified: stable/12/sys/i386/acpica/acpi_machdep.c ============================================================================== --- stable/12/sys/i386/acpica/acpi_machdep.c Sun Aug 23 11:06:59 2020 (r364500) +++ stable/12/sys/i386/acpica/acpi_machdep.c Sun Aug 23 17:34:21 2020 (r364501) @@ -109,89 +109,29 @@ acpi_machdep_quirks(int *quirks) } /* - * Support for mapping ACPI tables during early boot. This abuses the - * crashdump map because the kernel cannot allocate KVA in - * pmap_mapbios() when this is used. This makes the following - * assumptions about how we use this KVA: pages 0 and 1 are used to - * map in the header of each table found via the RSDT or XSDT and - * pages 2 to n are used to map in the RSDT or XSDT. This has to use - * 2 pages for the table headers in case a header spans a page - * boundary. - * - * XXX: We don't ensure the table fits in the available address space - * in the crashdump map. + * Map a table. First map the header to determine the table length and then map + * the entire table. */ - -/* - * Map some memory using the crashdump map. 'offset' is an offset in - * pages into the crashdump map to use for the start of the mapping. - */ static void * -table_map(vm_paddr_t pa, int offset, vm_offset_t length) +map_table(vm_paddr_t pa, const char *sig) { - vm_offset_t va, off; - void *data; - - off = pa & PAGE_MASK; - length = round_page(length + off); - pa = pa & PG_FRAME; - va = (vm_offset_t)pmap_kenter_temporary(pa, offset) + - (offset * PAGE_SIZE); - data = (void *)(va + off); - length -= PAGE_SIZE; - while (length > 0) { - va += PAGE_SIZE; - pa += PAGE_SIZE; - length -= PAGE_SIZE; - pmap_kenter(va, pa); - invlpg(va); - } - return (data); -} - -/* Unmap memory previously mapped with table_map(). */ -static void -table_unmap(void *data, vm_offset_t length) -{ - vm_offset_t va, off; - - va = (vm_offset_t)data; - off = va & PAGE_MASK; - length = round_page(length + off); - va &= ~PAGE_MASK; - while (length > 0) { - pmap_kremove(va); - invlpg(va); - va += PAGE_SIZE; - length -= PAGE_SIZE; - } -} - -/* - * Map a table at a given offset into the crashdump map. It first - * maps the header to determine the table length and then maps the - * entire table. - */ -static void * -map_table(vm_paddr_t pa, int offset, const char *sig) -{ ACPI_TABLE_HEADER *header; vm_offset_t length; void *table; - header = table_map(pa, offset, sizeof(ACPI_TABLE_HEADER)); + header = pmap_mapbios(pa, sizeof(ACPI_TABLE_HEADER)); if (strncmp(header->Signature, sig, ACPI_NAMESEG_SIZE) != 0) { - table_unmap(header, sizeof(ACPI_TABLE_HEADER)); + pmap_unmapbios((vm_offset_t)header, sizeof(ACPI_TABLE_HEADER)); return (NULL); } length = header->Length; - table_unmap(header, sizeof(ACPI_TABLE_HEADER)); - table = table_map(pa, offset, length); + pmap_unmapbios((vm_offset_t)header, sizeof(ACPI_TABLE_HEADER)); + table = pmap_mapbios(pa, length); if (ACPI_FAILURE(AcpiTbChecksum(table, length))) { if (bootverbose) printf("ACPI: Failed checksum for table %s\n", sig); #if (ACPI_CHECKSUM_ABORT) - table_unmap(table, length); + pmap_unmapbios((vm_offset_t)table, length); return (NULL); #endif } @@ -206,24 +146,15 @@ static int probe_table(vm_paddr_t address, const char *sig) { ACPI_TABLE_HEADER *table; + int ret; - table = table_map(address, 0, sizeof(ACPI_TABLE_HEADER)); - if (table == NULL) { - if (bootverbose) - printf("ACPI: Failed to map table at 0x%jx\n", - (uintmax_t)address); - return (0); - } + table = pmap_mapbios(address, sizeof(ACPI_TABLE_HEADER)); if (bootverbose) printf("Table '%.4s' at 0x%jx\n", table->Signature, (uintmax_t)address); - - if (strncmp(table->Signature, sig, ACPI_NAMESEG_SIZE) != 0) { - table_unmap(table, sizeof(ACPI_TABLE_HEADER)); - return (0); - } - table_unmap(table, sizeof(ACPI_TABLE_HEADER)); - return (1); + ret = strncmp(table->Signature, sig, ACPI_NAMESEG_SIZE) == 0; + pmap_unmapbios((vm_offset_t)table, sizeof(ACPI_TABLE_HEADER)); + return (ret); } /* @@ -234,7 +165,7 @@ void * acpi_map_table(vm_paddr_t pa, const char *sig) { - return (map_table(pa, 0, sig)); + return (map_table(pa, sig)); } /* Unmap a table previously mapped via acpi_map_table(). */ @@ -244,7 +175,7 @@ acpi_unmap_table(void *table) ACPI_TABLE_HEADER *header; header = (ACPI_TABLE_HEADER *)table; - table_unmap(table, header->Length); + pmap_unmapbios((vm_offset_t)table, header->Length); } /* @@ -281,9 +212,7 @@ acpi_find_table(const char *sig) /* * For ACPI >= 2.0, use the XSDT if it is available. - * Otherwise, use the RSDT. We map the XSDT or RSDT at page 2 - * in the crashdump area. Pages 0 and 1 are used to map in the - * headers of candidate ACPI tables. + * Otherwise, use the RSDT. */ addr = 0; if (rsdp->Revision >= 2 && rsdp->XsdtPhysicalAddress != 0) { @@ -297,7 +226,7 @@ acpi_find_table(const char *sig) printf("ACPI: RSDP failed extended checksum\n"); return (0); } - xsdt = map_table(rsdp->XsdtPhysicalAddress, 2, ACPI_SIG_XSDT); + xsdt = map_table(rsdp->XsdtPhysicalAddress, ACPI_SIG_XSDT); if (xsdt == NULL) { if (bootverbose) printf("ACPI: Failed to map XSDT\n"); @@ -312,7 +241,7 @@ acpi_find_table(const char *sig) } acpi_unmap_table(xsdt); } else { - rsdt = map_table(rsdp->RsdtPhysicalAddress, 2, ACPI_SIG_RSDT); + rsdt = map_table(rsdp->RsdtPhysicalAddress, ACPI_SIG_RSDT); if (rsdt == NULL) { if (bootverbose) printf("ACPI: Failed to map RSDT\n"); @@ -340,7 +269,7 @@ acpi_find_table(const char *sig) * Verify that we can map the full table and that its checksum is * correct, etc. */ - table = map_table(addr, 0, sig); + table = map_table(addr, sig); if (table == NULL) return (0); acpi_unmap_table(table); From owner-svn-src-all@freebsd.org Sun Aug 23 17:46:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 525EA3C32AB; Sun, 23 Aug 2020 17:46:11 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZN37189fz3dm1; Sun, 23 Aug 2020 17:46:11 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A867AC70; Sun, 23 Aug 2020 17:46:11 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07NHkApe000966; Sun, 23 Aug 2020 17:46:10 GMT (envelope-from leres@FreeBSD.org) Received: (from leres@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NHkANZ000963; Sun, 23 Aug 2020 17:46:10 GMT (envelope-from leres@FreeBSD.org) Message-Id: <202008231746.07NHkANZ000963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: leres set sender to leres@FreeBSD.org using -f From: Craig Leres Date: Sun, 23 Aug 2020 17:46:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364502 - in stable/12: contrib/netbsd-tests/usr.bin/grep usr.bin/grep X-SVN-Group: stable-12 X-SVN-Commit-Author: leres X-SVN-Commit-Paths: in stable/12: contrib/netbsd-tests/usr.bin/grep usr.bin/grep X-SVN-Commit-Revision: 364502 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 17:46:11 -0000 Author: leres (ports committer) Date: Sun Aug 23 17:46:10 2020 New Revision: 364502 URL: https://svnweb.freebsd.org/changeset/base/364502 Log: MFC r363381: Fix some regressions with the zgrep(1) wrapper. PR: 247126 Modified: stable/12/contrib/netbsd-tests/usr.bin/grep/t_grep.sh (contents, props changed) stable/12/usr.bin/grep/zgrep.1 stable/12/usr.bin/grep/zgrep.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/netbsd-tests/usr.bin/grep/t_grep.sh ============================================================================== --- stable/12/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Sun Aug 23 17:34:21 2020 (r364501) +++ stable/12/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Sun Aug 23 17:46:10 2020 (r364502) @@ -214,6 +214,89 @@ zgrep_body() atf_check -o file:"$(atf_get_srcdir)/d_zgrep.out" zgrep -h line d_input.gz } +atf_test_case zgrep_combined_flags +zgrep_combined_flags_head() +{ + atf_set "descr" "Checks for zgrep wrapper problems with combined flags (PR 247126)" +} +zgrep_combined_flags_body() +{ + atf_expect_fail "known but unsolved zgrep wrapper script regression" + + echo 'foo bar' > test + + atf_check -o inline:"foo bar\n" zgrep -we foo test + # Avoid hang on reading from stdin in the failure case + atf_check -o inline:"foo bar\n" zgrep -wefoo test < /dev/null +} + +atf_test_case zgrep_eflag +zgrep_eflag_head() +{ + atf_set "descr" "Checks for zgrep wrapper problems with -e PATTERN (PR 247126)" +} +zgrep_eflag_body() +{ + echo 'foo bar' > test + + # Avoid hang on reading from stdin in the failure case + atf_check -o inline:"foo bar\n" zgrep -e 'foo bar' test < /dev/null + atf_check -o inline:"foo bar\n" zgrep --regexp='foo bar' test < /dev/null +} + +atf_test_case zgrep_fflag +zgrep_fflag_head() +{ + atf_set "descr" "Checks for zgrep wrapper problems with -f FILE (PR 247126)" +} +zgrep_fflag_body() +{ + echo foo > pattern + echo foobar > test + + # Avoid hang on reading from stdin in the failure case + atf_check -o inline:"foobar\n" zgrep -f pattern test test + + atf_check -o inline:"foobar\n" zgrep -e foo --ignore-case < test +} + +atf_test_case zgrep_multiple_eflags +zgrep_multiple_eflags_head() +{ + atf_set "descr" "Checks for zgrep wrapper problems with multiple -e flags (PR 247126)" +} +zgrep_multiple_eflags_body() +{ + atf_expect_fail "known but unsolved zgrep wrapper script regression" + + echo foobar > test + + atf_check -o inline:"foobar\n" zgrep -e foo -e xxx test +} + +atf_test_case zgrep_empty_eflag +zgrep_empty_eflag_head() +{ + atf_set "descr" "Checks for zgrep wrapper problems with empty -e flags pattern (PR 247126)" +} +zgrep_empty_eflag_body() +{ + echo foobar > test + + atf_check -o inline:"foobar\n" zgrep -e '' test +} + atf_test_case nonexistent nonexistent_head() { @@ -826,6 +909,12 @@ atf_init_test_cases() atf_add_test_case file_exp atf_add_test_case egrep atf_add_test_case zgrep + atf_add_test_case zgrep_combined_flags + atf_add_test_case zgrep_eflag + atf_add_test_case zgrep_empty_eflag + atf_add_test_case zgrep_fflag + atf_add_test_case zgrep_long_eflag + atf_add_test_case zgrep_multiple_eflags atf_add_test_case nonexistent atf_add_test_case context2 # Begin FreeBSD Modified: stable/12/usr.bin/grep/zgrep.1 ============================================================================== --- stable/12/usr.bin/grep/zgrep.1 Sun Aug 23 17:34:21 2020 (r364501) +++ stable/12/usr.bin/grep/zgrep.1 Sun Aug 23 17:46:10 2020 (r364502) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 21, 2018 +.Dd July 20, 2020 .Dt ZGREP 1 .Os .Sh NAME @@ -86,9 +86,29 @@ to read compressed files. .Sh SEE ALSO .Xr bzip2 1 , .Xr grep 1 , -.Xr xz 1 +.Xr gzip 1 , +.Xr xz 1 , +.Xr zstd 1 .Sh AUTHORS This version of the .Nm utility was written by .An Thomas Klausner Aq Mt wiz@NetBSD.org . +.Sh BUGS +.Xr zgrep 1 +does not handle flags that take arguments if there is no whitespace +between the flag and the argument, for example: +.Pp +.Dl "zgrep -enfs /etc/rpc" +.Pp +When more than one +.Fl e +flag is used matching +should occur for any of the patterns (similar to multiple patterns +supplied in a file with the +.Fl f +flag). +.Xr zgrep 1 +only matches the last +.Fl e +pattern. Modified: stable/12/usr.bin/grep/zgrep.sh ============================================================================== --- stable/12/usr.bin/grep/zgrep.sh Sun Aug 23 17:34:21 2020 (r364501) +++ stable/12/usr.bin/grep/zgrep.sh Sun Aug 23 17:46:10 2020 (r364502) @@ -29,6 +29,7 @@ grep=grep zcat=zstdcat endofopts=0 +pattern_file=0 pattern_found=0 grep_args="" hyphen=0 @@ -75,29 +76,46 @@ while [ $# -gt 0 -a ${endofopts} -eq 0 ] do case $1 in # from GNU grep-2.5.1 -- keep in sync! - -[ABCDXdefm]) + --) + shift + endofopts=1 + ;; + --file=*) + pattern_file=1 + grep_args="${grep_args} ${1}" + shift + ;; + --regexp=*) + pattern="${1#--regexp=}" + pattern_found=1 + shift + ;; + --*) + grep_args="${grep_args} $1" + shift + ;; + -*[ABCDXdefm]) if [ $# -lt 2 ] then echo "${prg}: missing argument for $1 flag" >&2 exit 1 fi case $1 in - -e) + -*e) pattern="$2" pattern_found=1 shift 2 - break + continue ;; + -*f) + pattern_file=1 + ;; *) ;; esac grep_args="${grep_args} $1 $2" shift 2 ;; - --) - shift - endofopts=1 - ;; -) hyphen=1 shift @@ -125,7 +143,7 @@ do done # if no -e option was found, take next argument as grep-pattern -if [ ${pattern_found} -lt 1 ] +if [ ${pattern_file} -eq 0 -a ${pattern_found} -eq 0 ] then if [ $# -ge 1 ]; then pattern="$1" @@ -136,6 +154,7 @@ then echo "${prg}: missing pattern" >&2 exit 1 fi + pattern_found=1 fi ret=0 @@ -143,15 +162,24 @@ ret=0 if [ $# -lt 1 ] then # ... on stdin - ${cattool} ${catargs} - | ${grep} ${grep_args} -- "${pattern}" - || ret=$? + if [ ${pattern_file} -eq 0 ]; then + ${cattool} ${catargs} - | ${grep} ${grep_args} -- "${pattern}" - || ret=$? + else + ${cattool} ${catargs} - | ${grep} ${grep_args} -- - || ret=$? + fi else # ... on all files given on the command line if [ ${silent} -lt 1 -a $# -gt 1 ]; then grep_args="-H ${grep_args}" fi for file; do - ${cattool} ${catargs} -- "${file}" | - ${grep} --label="${file}" ${grep_args} -- "${pattern}" - || ret=$? + if [ ${pattern_file} -eq 0 ]; then + ${cattool} ${catargs} -- "${file}" | + ${grep} --label="${file}" ${grep_args} -- "${pattern}" - || ret=$? + else + ${cattool} ${catargs} -- "${file}" | + ${grep} --label="${file}" ${grep_args} -- - || ret=$? + fi done fi From owner-svn-src-all@freebsd.org Sun Aug 23 19:19:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B20DD3C5456; Sun, 23 Aug 2020 19:19:01 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQ6F4H67z40hB; Sun, 23 Aug 2020 19:19:01 +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 76090C318; Sun, 23 Aug 2020 19:19:01 +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 07NJJ15c056256; Sun, 23 Aug 2020 19:19:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJJ17O056255; Sun, 23 Aug 2020 19:19:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008231919.07NJJ17O056255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 19:19:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364503 - stable/12/sys/amd64/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/amd64/linux X-SVN-Commit-Revision: 364503 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:19:01 -0000 Author: trasz Date: Sun Aug 23 19:19:00 2020 New Revision: 364503 URL: https://svnweb.freebsd.org/changeset/base/364503 Log: MFC r347231: Support PTRACE_GETREGSET w/ NT_PRSTATUS in Linux ptrace(2). While Linux strace(1) doesn't strictly require it - it has a fallback to PTRACE_GETREGS - it's a newer interface, so we better support it before the old one is deprecated. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_ptrace.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_ptrace.c ============================================================================== --- stable/12/sys/amd64/linux/linux_ptrace.c Sun Aug 23 17:46:10 2020 (r364502) +++ stable/12/sys/amd64/linux/linux_ptrace.c Sun Aug 23 19:19:00 2020 (r364503) @@ -131,6 +131,36 @@ struct linux_pt_reg { l_ulong ss; }; +struct linux_pt_regset { + l_ulong r15; + l_ulong r14; + l_ulong r13; + l_ulong r12; + l_ulong rbp; + l_ulong rbx; + l_ulong r11; + l_ulong r10; + l_ulong r9; + l_ulong r8; + l_ulong rax; + l_ulong rcx; + l_ulong rdx; + l_ulong rsi; + l_ulong rdi; + l_ulong orig_rax; + l_ulong rip; + l_ulong cs; + l_ulong eflags; + l_ulong rsp; + l_ulong ss; + l_ulong fs_base; + l_ulong gs_base; + l_ulong ds; + l_ulong es; + l_ulong fs; + l_ulong gs; +}; + /* * Translate amd64 ptrace registers between Linux and FreeBSD formats. * The translation is pretty straighforward, for all registers but @@ -164,6 +194,40 @@ map_regs_to_linux(struct reg *b_reg, struct linux_pt_r } static void +map_regs_to_linux_regset(struct reg *b_reg, unsigned long fs_base, + unsigned long gs_base, struct linux_pt_regset *l_regset) +{ + + l_regset->r15 = b_reg->r_r15; + l_regset->r14 = b_reg->r_r14; + l_regset->r13 = b_reg->r_r13; + l_regset->r12 = b_reg->r_r12; + l_regset->rbp = b_reg->r_rbp; + l_regset->rbx = b_reg->r_rbx; + l_regset->r11 = b_reg->r_r11; + l_regset->r10 = b_reg->r_r10; + l_regset->r9 = b_reg->r_r9; + l_regset->r8 = b_reg->r_r8; + l_regset->rax = b_reg->r_rax; + l_regset->rcx = b_reg->r_rcx; + l_regset->rdx = b_reg->r_rdx; + l_regset->rsi = b_reg->r_rsi; + l_regset->rdi = b_reg->r_rdi; + l_regset->orig_rax = b_reg->r_rax; + l_regset->rip = b_reg->r_rip; + l_regset->cs = b_reg->r_cs; + l_regset->eflags = b_reg->r_rflags; + l_regset->rsp = b_reg->r_rsp; + l_regset->ss = b_reg->r_ss; + l_regset->fs_base = fs_base; + l_regset->gs_base = gs_base; + l_regset->ds = b_reg->r_ds; + l_regset->es = b_reg->r_es; + l_regset->fs = b_reg->r_fs; + l_regset->gs = b_reg->r_gs; +} + +static void map_regs_from_linux(struct reg *b_reg, struct linux_pt_reg *l_reg) { b_reg->r_r15 = l_reg->r15; @@ -306,14 +370,75 @@ linux_ptrace_setregs(struct thread *td, pid_t pid, voi } static int +linux_ptrace_getregset_prstatus(struct thread *td, pid_t pid, l_ulong data) +{ + struct ptrace_lwpinfo lwpinfo; + struct reg b_reg; + struct linux_pt_regset l_regset; + struct iovec iov; + struct pcb *pcb; + unsigned long fsbase, gsbase; + size_t len; + int error; + + error = copyin((const void *)data, &iov, sizeof(iov)); + if (error != 0) { + printf("%s: copyin error %d\n", __func__, error); + return (error); + } + + error = kern_ptrace(td, PT_GETREGS, pid, &b_reg, 0); + if (error != 0) + return (error); + + pcb = td->td_pcb; + if (td == curthread) + update_pcb_bases(pcb); + fsbase = pcb->pcb_fsbase; + gsbase = pcb->pcb_gsbase; + + map_regs_to_linux_regset(&b_reg, fsbase, gsbase, &l_regset); + + /* + * The strace(1) utility depends on RAX being set to -ENOSYS + * on syscall entry; otherwise it loops printing those: + * + * [ Process PID=928 runs in 64 bit mode. ] + * [ Process PID=928 runs in x32 mode. ] + */ + error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo)); + if (error != 0) { + printf("%s: PT_LWPINFO failed with error %d\n", + __func__, error); + return (error); + } + if (lwpinfo.pl_flags & PL_FLAG_SCE) + l_regset.rax = -38; // XXX: Don't hardcode? + + len = MIN(iov.iov_len, sizeof(l_regset)); + error = copyout(&l_regset, (void *)iov.iov_base, len); + if (error != 0) { + printf("%s: copyout error %d\n", __func__, error); + return (error); + } + + iov.iov_len -= len; + error = copyout(&iov, (void *)data, sizeof(iov)); + if (error != 0) { + printf("%s: iov copyout error %d\n", __func__, error); + return (error); + } + + return (error); +} + +static int linux_ptrace_getregset(struct thread *td, pid_t pid, l_ulong addr, l_ulong data) { switch (addr) { case LINUX_NT_PRSTATUS: - printf("%s: NT_PRSTATUS not implemented; returning EINVAL\n", - __func__); - return (EINVAL); + return (linux_ptrace_getregset_prstatus(td, pid, data)); default: printf("%s: PTRACE_GETREGSET request %ld not implemented; " "returning EINVAL\n", __func__, addr); From owner-svn-src-all@freebsd.org Sun Aug 23 19:20:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 43FDC3C53B1; Sun, 23 Aug 2020 19:20:39 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQ8718Mdz40wx; Sun, 23 Aug 2020 19:20:39 +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 E6313C1A7; Sun, 23 Aug 2020 19:20:38 +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 07NJKco0056413; Sun, 23 Aug 2020 19:20:38 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJKcD8056412; Sun, 23 Aug 2020 19:20:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008231920.07NJKcD8056412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 19:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364504 - stable/12/sys/amd64/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/amd64/linux X-SVN-Commit-Revision: 364504 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:20:39 -0000 Author: trasz Date: Sun Aug 23 19:20:38 2020 New Revision: 364504 URL: https://svnweb.freebsd.org/changeset/base/364504 Log: MFC r347580: Fix handling of r10 in Linux ptrace(2). This fixes decoding of the 'flags' argument to mmap(2) with Linux strace(1). Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_ptrace.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_ptrace.c ============================================================================== --- stable/12/sys/amd64/linux/linux_ptrace.c Sun Aug 23 19:19:00 2020 (r364503) +++ stable/12/sys/amd64/linux/linux_ptrace.c Sun Aug 23 19:20:38 2020 (r364504) @@ -338,18 +338,27 @@ linux_ptrace_getregs(struct thread *td, pid_t pid, voi map_regs_to_linux(&b_reg, &l_reg); - /* - * The strace(1) utility depends on RAX being set to -ENOSYS - * on syscall entry. - */ error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo)); if (error != 0) { printf("%s: PT_LWPINFO failed with error %d\n", __func__, error); return (error); } - if (lwpinfo.pl_flags & PL_FLAG_SCE) - l_reg.rax = -38; // XXX: Don't hardcode? + if (lwpinfo.pl_flags & PL_FLAG_SCE) { + /* + * The strace(1) utility depends on RAX being set to -ENOSYS + * on syscall entry; otherwise it loops printing those: + * + * [ Process PID=928 runs in 64 bit mode. ] + * [ Process PID=928 runs in x32 mode. ] + */ + l_reg.rax = -38; /* -ENOSYS */ + /* + * Undo the mangling done in exception.S:fast_syscall_common(). + */ + l_reg.r10 = l_reg.rcx; + } + error = copyout(&l_reg, (void *)data, sizeof(l_reg)); return (error); } @@ -399,21 +408,27 @@ linux_ptrace_getregset_prstatus(struct thread *td, pid map_regs_to_linux_regset(&b_reg, fsbase, gsbase, &l_regset); - /* - * The strace(1) utility depends on RAX being set to -ENOSYS - * on syscall entry; otherwise it loops printing those: - * - * [ Process PID=928 runs in 64 bit mode. ] - * [ Process PID=928 runs in x32 mode. ] - */ error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo)); if (error != 0) { printf("%s: PT_LWPINFO failed with error %d\n", __func__, error); return (error); } - if (lwpinfo.pl_flags & PL_FLAG_SCE) - l_regset.rax = -38; // XXX: Don't hardcode? + if (lwpinfo.pl_flags & PL_FLAG_SCE) { + /* + * The strace(1) utility depends on RAX being set to -ENOSYS + * on syscall entry; otherwise it loops printing those: + * + * [ Process PID=928 runs in 64 bit mode. ] + * [ Process PID=928 runs in x32 mode. ] + */ + l_regset.rax = -38; /* -ENOSYS */ + + /* + * Undo the mangling done in exception.S:fast_syscall_common(). + */ + l_regset.r10 = l_regset.rcx; + } len = MIN(iov.iov_len, sizeof(l_regset)); error = copyout(&l_regset, (void *)iov.iov_base, len); From owner-svn-src-all@freebsd.org Sun Aug 23 19:22:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BEE8A3C53DB; Sun, 23 Aug 2020 19:22:43 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQBW4Z5dz41RS; Sun, 23 Aug 2020 19:22:43 +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 80F5BC22B; Sun, 23 Aug 2020 19:22:43 +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 07NJMh2f062233; Sun, 23 Aug 2020 19:22:43 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJMgM8062229; Sun, 23 Aug 2020 19:22:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008231922.07NJMgM8062229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 19:22:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364505 - in stable/12/sys: amd64/linux compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux compat/linux X-SVN-Commit-Revision: 364505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:22:43 -0000 Author: trasz Date: Sun Aug 23 19:22:42 2020 New Revision: 364505 URL: https://svnweb.freebsd.org/changeset/base/364505 Log: MFC r347971: Implement PTRACE_O_TRACESYSGOOD. This makes Linux strace(1) work. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_ptrace.c stable/12/sys/compat/linux/linux_emul.h stable/12/sys/compat/linux/linux_misc.c stable/12/sys/compat/linux/linux_misc.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_ptrace.c ============================================================================== --- stable/12/sys/amd64/linux/linux_ptrace.c Sun Aug 23 19:20:38 2020 (r364504) +++ stable/12/sys/amd64/linux/linux_ptrace.c Sun Aug 23 19:22:42 2020 (r364505) @@ -34,8 +34,10 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include +#include #include #include @@ -43,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #define LINUX_PTRACE_TRACEME 0 @@ -107,6 +111,37 @@ map_signum(int lsig, int *bsigp) return (0); } +int +linux_ptrace_status(struct thread *td, pid_t pid, int status) +{ + struct ptrace_lwpinfo lwpinfo; + struct linux_pemuldata *pem; + register_t saved_retval; + int error; + + saved_retval = td->td_retval[0]; + error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo)); + td->td_retval[0] = saved_retval; + if (error != 0) { + printf("%s: PT_LWPINFO failed with error %d\n", __func__, error); + return (status); + } + + pem = pem_find(td->td_proc); + KASSERT(pem != NULL, ("%s: proc emuldata not found.\n", __func__)); + + LINUX_PEM_SLOCK(pem); + if ((pem->ptrace_flags & LINUX_PTRACE_O_TRACESYSGOOD) && + lwpinfo.pl_flags & PL_FLAG_SCE) + status |= (LINUX_SIGTRAP | 0x80) << 8; + if ((pem->ptrace_flags & LINUX_PTRACE_O_TRACESYSGOOD) && + lwpinfo.pl_flags & PL_FLAG_SCX) + status |= (LINUX_SIGTRAP | 0x80) << 8; + LINUX_PEM_SUNLOCK(pem); + + return (status); +} + struct linux_pt_reg { l_ulong r15; l_ulong r14; @@ -279,6 +314,7 @@ linux_ptrace_peek(struct thread *td, pid_t pid, void * static int linux_ptrace_setoptions(struct thread *td, pid_t pid, l_ulong data) { + struct linux_pemuldata *pem; int mask; mask = 0; @@ -290,15 +326,20 @@ linux_ptrace_setoptions(struct thread *td, pid_t pid, return (EINVAL); } + pem = pem_find(td->td_proc); + KASSERT(pem != NULL, ("%s: proc emuldata not found.\n", __func__)); + /* * PTRACE_O_EXITKILL is ignored, we do that by default. */ + LINUX_PEM_XLOCK(pem); if (data & LINUX_PTRACE_O_TRACESYSGOOD) { - printf("%s: PTRACE_O_TRACESYSGOOD not implemented; " - "returning EINVAL\n", __func__); - return (EINVAL); + pem->ptrace_flags |= LINUX_PTRACE_O_TRACESYSGOOD; + } else { + pem->ptrace_flags &= ~LINUX_PTRACE_O_TRACESYSGOOD; } + LINUX_PEM_XUNLOCK(pem); if (data & LINUX_PTRACE_O_TRACEFORK) mask |= PTRACE_FORK; Modified: stable/12/sys/compat/linux/linux_emul.h ============================================================================== --- stable/12/sys/compat/linux/linux_emul.h Sun Aug 23 19:20:38 2020 (r364504) +++ stable/12/sys/compat/linux/linux_emul.h Sun Aug 23 19:22:42 2020 (r364505) @@ -32,6 +32,8 @@ #ifndef _LINUX_EMUL_H_ #define _LINUX_EMUL_H_ +struct image_params; + /* * modeled after similar structure in NetBSD * this will be extended as we need more functionality @@ -68,6 +70,7 @@ struct linux_pemuldata { struct sx pem_sx; /* lock for this struct */ void *epoll; /* epoll data */ uint32_t persona; /* process execution domain */ + uint32_t ptrace_flags; /* used by ptrace(2) */ }; #define LINUX_PEM_XLOCK(p) sx_xlock(&(p)->pem_sx) Modified: stable/12/sys/compat/linux/linux_misc.c ============================================================================== --- stable/12/sys/compat/linux/linux_misc.c Sun Aug 23 19:20:38 2020 (r364504) +++ stable/12/sys/compat/linux/linux_misc.c Sun Aug 23 19:22:42 2020 (r364505) @@ -984,27 +984,53 @@ linux_futimesat(struct thread *td, struct linux_futime } #endif -int -linux_common_wait(struct thread *td, int pid, int *status, - int options, struct rusage *ru) +static int +linux_common_wait(struct thread *td, int pid, int *statusp, + int options, struct __wrusage *wrup) { - int error, tmpstat; + siginfo_t siginfo; + idtype_t idtype; + id_t id; + int error, status, tmpstat; - error = kern_wait(td, pid, &tmpstat, options, ru); + if (pid == WAIT_ANY) { + idtype = P_ALL; + id = 0; + } else if (pid < 0) { + idtype = P_PGID; + id = (id_t)-pid; + } else { + idtype = P_PID; + id = (id_t)pid; + } + + /* + * For backward compatibility we implicitly add flags WEXITED + * and WTRAPPED here. + */ + options |= WEXITED | WTRAPPED; + error = kern_wait6(td, idtype, id, &status, options, wrup, &siginfo); if (error) return (error); - if (status) { - tmpstat &= 0xffff; - if (WIFSIGNALED(tmpstat)) + if (statusp) { + tmpstat = status & 0xffff; + if (WIFSIGNALED(tmpstat)) { tmpstat = (tmpstat & 0xffffff80) | bsd_to_linux_signal(WTERMSIG(tmpstat)); - else if (WIFSTOPPED(tmpstat)) + } else if (WIFSTOPPED(tmpstat)) { tmpstat = (tmpstat & 0xffff00ff) | (bsd_to_linux_signal(WSTOPSIG(tmpstat)) << 8); - else if (WIFCONTINUED(tmpstat)) +#if defined(__amd64__) && !defined(COMPAT_LINUX32) + if (WSTOPSIG(status) == SIGTRAP) { + tmpstat = linux_ptrace_status(td, + siginfo.si_pid, tmpstat); + } +#endif + } else if (WIFCONTINUED(tmpstat)) { tmpstat = 0xffff; - error = copyout(&tmpstat, status, sizeof(int)); + } + error = copyout(&tmpstat, statusp, sizeof(int)); } return (error); @@ -1035,7 +1061,7 @@ int linux_wait4(struct thread *td, struct linux_wait4_args *args) { int error, options; - struct rusage ru, *rup; + struct __wrusage wru, *wrup; #ifdef DEBUG if (ldebug(wait4)) @@ -1051,14 +1077,14 @@ linux_wait4(struct thread *td, struct linux_wait4_args linux_to_bsd_waitopts(args->options, &options); if (args->rusage != NULL) - rup = &ru; + wrup = &wru; else - rup = NULL; - error = linux_common_wait(td, args->pid, args->status, options, rup); + wrup = NULL; + error = linux_common_wait(td, args->pid, args->status, options, wrup); if (error != 0) return (error); if (args->rusage != NULL) - error = linux_copyout_rusage(&ru, args->rusage); + error = linux_copyout_rusage(&wru.wru_self, args->rusage); return (error); } Modified: stable/12/sys/compat/linux/linux_misc.h ============================================================================== --- stable/12/sys/compat/linux/linux_misc.h Sun Aug 23 19:20:38 2020 (r364504) +++ stable/12/sys/compat/linux/linux_misc.h Sun Aug 23 19:22:42 2020 (r364505) @@ -149,8 +149,9 @@ extern int stclohz; #define LINUX_GRND_NONBLOCK 0x0001 #define LINUX_GRND_RANDOM 0x0002 -int linux_common_wait(struct thread *td, int pid, int *status, - int options, struct rusage *ru); +#if defined(__amd64__) && !defined(COMPAT_LINUX32) +int linux_ptrace_status(struct thread *td, int pid, int status); +#endif void linux_to_bsd_waitopts(int options, int *bsdopts); int linux_set_upcall_kse(struct thread *td, register_t stack); int linux_set_cloned_tls(struct thread *td, void *desc); From owner-svn-src-all@freebsd.org Sun Aug 23 19:25:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 572683C5638; Sun, 23 Aug 2020 19:25:20 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQFX1ch9z41kX; Sun, 23 Aug 2020 19:25:20 +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 1AAEAC44B; Sun, 23 Aug 2020 19:25:20 +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 07NJPJja062426; Sun, 23 Aug 2020 19:25:19 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJPJeu062425; Sun, 23 Aug 2020 19:25:19 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008231925.07NJPJeu062425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 19:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364506 - stable/12/sys/amd64/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/amd64/linux X-SVN-Commit-Revision: 364506 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:25:20 -0000 Author: trasz Date: Sun Aug 23 19:25:19 2020 New Revision: 364506 URL: https://svnweb.freebsd.org/changeset/base/364506 Log: MFC r348049: Make linux_ptrace() use linux_msg() instead of printf(). Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_ptrace.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_ptrace.c ============================================================================== --- stable/12/sys/amd64/linux/linux_ptrace.c Sun Aug 23 19:22:42 2020 (r364505) +++ stable/12/sys/amd64/linux/linux_ptrace.c Sun Aug 23 19:25:19 2020 (r364506) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define LINUX_PTRACE_TRACEME 0 #define LINUX_PTRACE_PEEKTEXT 1 @@ -123,7 +124,7 @@ linux_ptrace_status(struct thread *td, pid_t pid, int error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo)); td->td_retval[0] = saved_retval; if (error != 0) { - printf("%s: PT_LWPINFO failed with error %d\n", __func__, error); + linux_msg(td, "PT_LWPINFO failed with error %d", error); return (status); } @@ -320,9 +321,9 @@ linux_ptrace_setoptions(struct thread *td, pid_t pid, mask = 0; if (data & ~LINUX_PTRACE_O_MASK) { - printf("%s: unknown ptrace option %lx set; " - "returning EINVAL\n", - __func__, data & ~LINUX_PTRACE_O_MASK); + linux_msg(td, "unknown ptrace option %lx set; " + "returning EINVAL", + data & ~LINUX_PTRACE_O_MASK); return (EINVAL); } @@ -357,8 +358,8 @@ linux_ptrace_setoptions(struct thread *td, pid_t pid, mask |= PTRACE_VFORK; /* XXX: Close enough? */ if (data & LINUX_PTRACE_O_TRACEEXIT) { - printf("%s: PTRACE_O_TRACEEXIT not implemented; " - "returning EINVAL\n", __func__); + linux_msg(td, "PTRACE_O_TRACEEXIT not implemented; " + "returning EINVAL"); return (EINVAL); } @@ -381,7 +382,7 @@ linux_ptrace_getregs(struct thread *td, pid_t pid, voi error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo)); if (error != 0) { - printf("%s: PT_LWPINFO failed with error %d\n", __func__, error); + linux_msg(td, "PT_LWPINFO failed with error %d", error); return (error); } if (lwpinfo.pl_flags & PL_FLAG_SCE) { @@ -433,7 +434,7 @@ linux_ptrace_getregset_prstatus(struct thread *td, pid error = copyin((const void *)data, &iov, sizeof(iov)); if (error != 0) { - printf("%s: copyin error %d\n", __func__, error); + linux_msg(td, "copyin error %d", error); return (error); } @@ -451,8 +452,7 @@ linux_ptrace_getregset_prstatus(struct thread *td, pid error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo)); if (error != 0) { - printf("%s: PT_LWPINFO failed with error %d\n", - __func__, error); + linux_msg(td, "PT_LWPINFO failed with error %d", error); return (error); } if (lwpinfo.pl_flags & PL_FLAG_SCE) { @@ -474,14 +474,14 @@ linux_ptrace_getregset_prstatus(struct thread *td, pid len = MIN(iov.iov_len, sizeof(l_regset)); error = copyout(&l_regset, (void *)iov.iov_base, len); if (error != 0) { - printf("%s: copyout error %d\n", __func__, error); + linux_msg(td, "copyout error %d", error); return (error); } iov.iov_len -= len; error = copyout(&iov, (void *)data, sizeof(iov)); if (error != 0) { - printf("%s: iov copyout error %d\n", __func__, error); + linux_msg(td, "iov copyout error %d", error); return (error); } @@ -496,8 +496,8 @@ linux_ptrace_getregset(struct thread *td, pid_t pid, l case LINUX_NT_PRSTATUS: return (linux_ptrace_getregset_prstatus(td, pid, data)); default: - printf("%s: PTRACE_GETREGSET request %ld not implemented; " - "returning EINVAL\n", __func__, addr); + linux_msg(td, "PTRACE_GETREGSET request %ld not implemented; " + "returning EINVAL", addr); return (EINVAL); } } @@ -506,7 +506,7 @@ static int linux_ptrace_seize(struct thread *td, pid_t pid, l_ulong addr, l_ulong data) { - printf("%s: PTRACE_SEIZE not implemented; returning EINVAL\n", __func__); + linux_msg(td, "PTRACE_SEIZE not implemented; returning EINVAL"); return (EINVAL); } @@ -587,8 +587,8 @@ linux_ptrace(struct thread *td, struct linux_ptrace_ar error = linux_ptrace_seize(td, pid, uap->addr, uap->data); break; default: - printf("%s: ptrace(%ld, ...) not implemented; returning EINVAL\n", - __func__, uap->req); + linux_msg(td, "ptrace(%ld, ...) not implemented; " + "returning EINVAL", uap->req); error = EINVAL; break; } From owner-svn-src-all@freebsd.org Sun Aug 23 19:26:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A29DC3C588E; Sun, 23 Aug 2020 19:26:47 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQHC3nJSz41Yy; Sun, 23 Aug 2020 19:26:47 +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 65023C5C8; Sun, 23 Aug 2020 19:26:47 +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 07NJQlbk062545; Sun, 23 Aug 2020 19:26:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJQlDU062544; Sun, 23 Aug 2020 19:26:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008231926.07NJQlDU062544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 19:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364507 - stable/12/sys/amd64/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/amd64/linux X-SVN-Commit-Revision: 364507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:26:47 -0000 Author: trasz Date: Sun Aug 23 19:26:46 2020 New Revision: 364507 URL: https://svnweb.freebsd.org/changeset/base/364507 Log: MFC r349747: Implement PTRACE_GETSIGINFO. This makes Linux strace(1) quieter in some cases (strace -f man id > /dev/null). Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_ptrace.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_ptrace.c ============================================================================== --- stable/12/sys/amd64/linux/linux_ptrace.c Sun Aug 23 19:25:19 2020 (r364506) +++ stable/12/sys/amd64/linux/linux_ptrace.c Sun Aug 23 19:26:46 2020 (r364507) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #define LINUX_PTRACE_DETACH 17 #define LINUX_PTRACE_SYSCALL 24 #define LINUX_PTRACE_SETOPTIONS 0x4200 +#define LINUX_PTRACE_GETSIGINFO 0x4202 #define LINUX_PTRACE_GETREGSET 0x4204 #define LINUX_PTRACE_SEIZE 0x4206 @@ -367,6 +368,31 @@ linux_ptrace_setoptions(struct thread *td, pid_t pid, } static int +linux_ptrace_getsiginfo(struct thread *td, pid_t pid, l_ulong data) +{ + struct ptrace_lwpinfo lwpinfo; + l_siginfo_t l_siginfo; + int error, sig; + + error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo)); + if (error != 0) { + linux_msg(td, "PT_LWPINFO failed with error %d", error); + return (error); + } + + if ((lwpinfo.pl_flags & PL_FLAG_SI) == 0) { + error = EINVAL; + linux_msg(td, "no PL_FLAG_SI, returning %d", error); + return (error); + } + + sig = bsd_to_linux_signal(lwpinfo.pl_siginfo.si_signo); + siginfo_to_lsiginfo(&lwpinfo.pl_siginfo, &l_siginfo, sig); + error = copyout(&l_siginfo, (void *)data, sizeof(l_siginfo)); + return (error); +} + +static int linux_ptrace_getregs(struct thread *td, pid_t pid, void *data) { struct ptrace_lwpinfo lwpinfo; @@ -579,6 +605,9 @@ linux_ptrace(struct thread *td, struct linux_ptrace_ar break; case LINUX_PTRACE_SETOPTIONS: error = linux_ptrace_setoptions(td, pid, uap->data); + break; + case LINUX_PTRACE_GETSIGINFO: + error = linux_ptrace_getsiginfo(td, pid, uap->data); break; case LINUX_PTRACE_GETREGSET: error = linux_ptrace_getregset(td, pid, uap->addr, uap->data); From owner-svn-src-all@freebsd.org Sun Aug 23 19:28:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CFCB3C5A02; Sun, 23 Aug 2020 19:28:10 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQJp2CyWz41Zj; Sun, 23 Aug 2020 19:28:10 +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 15511C523; Sun, 23 Aug 2020 19:28:10 +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 07NJS9IL062664; Sun, 23 Aug 2020 19:28:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJS96o062663; Sun, 23 Aug 2020 19:28:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008231928.07NJS96o062663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 19:28:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364508 - stable/12/sys/amd64/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/amd64/linux X-SVN-Commit-Revision: 364508 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:28:10 -0000 Author: trasz Date: Sun Aug 23 19:28:09 2020 New Revision: 364508 URL: https://svnweb.freebsd.org/changeset/base/364508 Log: MFC r349748: Add support for PTRACE_O_TRACEEXIT to linuxulator ptrace(2). This fixes strace 4.25 from Ubuntu 19.04. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_ptrace.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_ptrace.c ============================================================================== --- stable/12/sys/amd64/linux/linux_ptrace.c Sun Aug 23 19:26:46 2020 (r364507) +++ stable/12/sys/amd64/linux/linux_ptrace.c Sun Aug 23 19:28:09 2020 (r364508) @@ -72,6 +72,8 @@ __FBSDID("$FreeBSD$"); #define LINUX_PTRACE_GETREGSET 0x4204 #define LINUX_PTRACE_SEIZE 0x4206 +#define LINUX_PTRACE_EVENT_EXIT 6 + #define LINUX_PTRACE_O_TRACESYSGOOD 1 #define LINUX_PTRACE_O_TRACEFORK 2 #define LINUX_PTRACE_O_TRACEVFORK 4 @@ -139,6 +141,9 @@ linux_ptrace_status(struct thread *td, pid_t pid, int if ((pem->ptrace_flags & LINUX_PTRACE_O_TRACESYSGOOD) && lwpinfo.pl_flags & PL_FLAG_SCX) status |= (LINUX_SIGTRAP | 0x80) << 8; + if ((pem->ptrace_flags & LINUX_PTRACE_O_TRACEEXIT) && + lwpinfo.pl_flags & PL_FLAG_EXITED) + status |= (LINUX_SIGTRAP | LINUX_PTRACE_EVENT_EXIT << 8) << 8; LINUX_PEM_SUNLOCK(pem); return (status); @@ -359,9 +364,9 @@ linux_ptrace_setoptions(struct thread *td, pid_t pid, mask |= PTRACE_VFORK; /* XXX: Close enough? */ if (data & LINUX_PTRACE_O_TRACEEXIT) { - linux_msg(td, "PTRACE_O_TRACEEXIT not implemented; " - "returning EINVAL"); - return (EINVAL); + pem->ptrace_flags |= LINUX_PTRACE_O_TRACEEXIT; + } else { + pem->ptrace_flags &= ~LINUX_PTRACE_O_TRACEEXIT; } return (kern_ptrace(td, PT_SET_EVENT_MASK, pid, &mask, sizeof(mask))); From owner-svn-src-all@freebsd.org Sun Aug 23 19:30:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10B833C5A93; Sun, 23 Aug 2020 19:30:07 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQM26khzz427g; Sun, 23 Aug 2020 19:30:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA741C44E; Sun, 23 Aug 2020 19:30:06 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07NJU6bi062850; Sun, 23 Aug 2020 19:30:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJU6Ug062849; Sun, 23 Aug 2020 19:30:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008231930.07NJU6Ug062849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 23 Aug 2020 19:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364509 - head/sys/netgraph/bluetooth/drivers/ubt X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/netgraph/bluetooth/drivers/ubt X-SVN-Commit-Revision: 364509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:30:07 -0000 Author: markj Date: Sun Aug 23 19:30:06 2020 New Revision: 364509 URL: https://svnweb.freebsd.org/changeset/base/364509 Log: ng_ubt: Add a device ID. PR: 248838 Submitted by: Andrey Zholos MFC after: 1 week Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c ============================================================================== --- head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Sun Aug 23 19:28:09 2020 (r364508) +++ head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Sun Aug 23 19:30:06 2020 (r364509) @@ -508,6 +508,7 @@ static const STRUCT_USB_HOST_ID ubt_devs[] = { USB_VPI(USB_VENDOR_LITEON, 0x2003, 0) }, { USB_VPI(USB_VENDOR_FOXCONN, 0xe042, 0) }, { USB_VPI(USB_VENDOR_DELL, 0x8197, 0) }, + { USB_VPI(USB_VENDOR_BELKIN, 0x065a, 0) }, }; /* From owner-svn-src-all@freebsd.org Sun Aug 23 19:30:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 435713C5A99; Sun, 23 Aug 2020 19:30:15 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQMB2nmrz41xP; Sun, 23 Aug 2020 19:30:13 +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 43DF8C4BF; Sun, 23 Aug 2020 19:30:13 +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 07NJUDqU062913; Sun, 23 Aug 2020 19:30:13 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJUD6e062912; Sun, 23 Aug 2020 19:30:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008231930.07NJUD6e062912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 19:30:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364510 - stable/12/sys/amd64/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/amd64/linux X-SVN-Commit-Revision: 364510 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:30:17 -0000 Author: trasz Date: Sun Aug 23 19:30:12 2020 New Revision: 364510 URL: https://svnweb.freebsd.org/changeset/base/364510 Log: MFC r351821: Improve debugging output. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_ptrace.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_ptrace.c ============================================================================== --- stable/12/sys/amd64/linux/linux_ptrace.c Sun Aug 23 19:30:06 2020 (r364509) +++ stable/12/sys/amd64/linux/linux_ptrace.c Sun Aug 23 19:30:12 2020 (r364510) @@ -319,6 +319,22 @@ linux_ptrace_peek(struct thread *td, pid_t pid, void * } static int +linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data) +{ + + linux_msg(td, "PTRACE_PEEKUSER not implemented; returning EINVAL"); + return (EINVAL); +} + +static int +linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data) +{ + + linux_msg(td, "PTRACE_POKEUSER not implemented; returning EINVAL"); + return (EINVAL); +} + +static int linux_ptrace_setoptions(struct thread *td, pid_t pid, l_ulong data) { struct linux_pemuldata *pem; @@ -566,11 +582,17 @@ linux_ptrace(struct thread *td, struct linux_ptrace_ar error = linux_ptrace_peek(td, pid, (void *)(uap->addr + 4), (void *)(uap->data + 4)); break; + case LINUX_PTRACE_PEEKUSER: + error = linux_ptrace_peekuser(td, pid, addr, (void *)uap->data); + break; case LINUX_PTRACE_POKETEXT: error = kern_ptrace(td, PT_WRITE_I, pid, addr, uap->data); break; case LINUX_PTRACE_POKEDATA: error = kern_ptrace(td, PT_WRITE_D, pid, addr, uap->data); + break; + case LINUX_PTRACE_POKEUSER: + error = linux_ptrace_pokeuser(td, pid, addr, (void *)uap->data); break; case LINUX_PTRACE_CONT: error = map_signum(uap->data, &sig); From owner-svn-src-all@freebsd.org Sun Aug 23 19:41:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 30DAE3C67C6; Sun, 23 Aug 2020 19:41:22 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQc06kBxz46g1; Sun, 23 Aug 2020 19:41:18 +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 B11EEC780; Sun, 23 Aug 2020 19:41:17 +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 07NJfHKA079237; Sun, 23 Aug 2020 19:41:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJfGfW079232; Sun, 23 Aug 2020 19:41:16 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008231941.07NJfGfW079232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 19:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364511 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 364511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:41:22 -0000 Author: trasz Date: Sun Aug 23 19:41:16 2020 New Revision: 364511 URL: https://svnweb.freebsd.org/changeset/base/364511 Log: MFC r352208 by emaste: make linux_renameat2 args consistent with linux_renameat Use 'dfd' consistently for a directory fd. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/syscalls.master stable/12/sys/amd64/linux32/syscalls.master stable/12/sys/arm64/linux/syscalls.master stable/12/sys/i386/linux/syscalls.master Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/syscalls.master ============================================================================== --- stable/12/sys/amd64/linux/syscalls.master Sun Aug 23 19:30:12 2020 (r364510) +++ stable/12/sys/amd64/linux/syscalls.master Sun Aug 23 19:41:16 2020 (r364511) @@ -551,8 +551,8 @@ 315 AUE_NULL STD { int linux_sched_getattr(l_pid_t pid, \ void *attr, l_uint size, l_uint flags); } ; Linux 3.15: -316 AUE_NULL STD { int linux_renameat2(l_int oldfd, \ - const char *oldname, l_int newfd, \ +316 AUE_NULL STD { int linux_renameat2(l_int olddfd, \ + const char *oldname, l_int newdfd, \ const char *newname, unsigned int flags); } ; Linux 3.17: 317 AUE_NULL STD { int linux_seccomp(l_uint op, l_uint flags, \ Modified: stable/12/sys/amd64/linux32/syscalls.master ============================================================================== --- stable/12/sys/amd64/linux32/syscalls.master Sun Aug 23 19:30:12 2020 (r364510) +++ stable/12/sys/amd64/linux32/syscalls.master Sun Aug 23 19:41:16 2020 (r364511) @@ -614,8 +614,8 @@ 352 AUE_NULL STD { int linux_sched_getattr(l_pid_t pid, \ void *attr, l_uint size, l_uint flags); } ; Linux 3.15: -353 AUE_NULL STD { int linux_renameat2(l_int oldfd, \ - const char *oldname, l_int newfd, \ +353 AUE_NULL STD { int linux_renameat2(l_int olddfd, \ + const char *oldname, l_int newdfd, \ const char *newname, unsigned int flags); } ; Linux 3.17: 354 AUE_NULL STD { int linux_seccomp(l_uint op, l_uint flags, \ Modified: stable/12/sys/arm64/linux/syscalls.master ============================================================================== --- stable/12/sys/arm64/linux/syscalls.master Sun Aug 23 19:30:12 2020 (r364510) +++ stable/12/sys/arm64/linux/syscalls.master Sun Aug 23 19:41:16 2020 (r364511) @@ -1464,9 +1464,9 @@ } 276 AUE_NULL STD { int linux_renameat2( - l_int oldfd, + l_int olddfd, const char *oldname, - l_int newfd, + l_int newdfd, const char *newname, unsigned int flags ); Modified: stable/12/sys/i386/linux/syscalls.master ============================================================================== --- stable/12/sys/i386/linux/syscalls.master Sun Aug 23 19:30:12 2020 (r364510) +++ stable/12/sys/i386/linux/syscalls.master Sun Aug 23 19:41:16 2020 (r364511) @@ -620,8 +620,8 @@ 352 AUE_NULL STD { int linux_sched_getattr(l_pid_t pid, \ void *attr, l_uint size, l_uint flags); } ; Linux 3.15: -353 AUE_NULL STD { int linux_renameat2(l_int oldfd, \ - const char *oldname, l_int newfd, \ +353 AUE_NULL STD { int linux_renameat2(l_int olddfd, \ + const char *oldname, l_int newdfd, \ const char *newname, unsigned int flags); } ; Linux 3.17: 354 AUE_NULL STD { int linux_seccomp(l_uint op, l_uint flags, \ From owner-svn-src-all@freebsd.org Sun Aug 23 19:42:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 06D143C68AB; Sun, 23 Aug 2020 19:42:52 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQdl1mm0z47Zv; Sun, 23 Aug 2020 19:42:50 +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 363DDC896; Sun, 23 Aug 2020 19:42:50 +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 07NJgnEf086218; Sun, 23 Aug 2020 19:42:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJgm5v086211; Sun, 23 Aug 2020 19:42:48 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008231942.07NJgm5v086211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 19:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364512 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 364512 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:42:53 -0000 Author: trasz Date: Sun Aug 23 19:42:48 2020 New Revision: 364512 URL: https://svnweb.freebsd.org/changeset/base/364512 Log: MFC r352209 by emaste: regen linuxulator sysent after r352208 Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_proto.h stable/12/sys/amd64/linux/linux_systrace_args.c stable/12/sys/amd64/linux32/linux32_proto.h stable/12/sys/amd64/linux32/linux32_systrace_args.c stable/12/sys/arm64/linux/linux_proto.h stable/12/sys/arm64/linux/linux_systrace_args.c stable/12/sys/i386/linux/linux_proto.h stable/12/sys/i386/linux/linux_systrace_args.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_proto.h ============================================================================== --- stable/12/sys/amd64/linux/linux_proto.h Sun Aug 23 19:41:16 2020 (r364511) +++ stable/12/sys/amd64/linux/linux_proto.h Sun Aug 23 19:42:48 2020 (r364512) @@ -1128,9 +1128,9 @@ struct linux_sched_getattr_args { char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_renameat2_args { - char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; + char olddfd_l_[PADL_(l_int)]; l_int olddfd; char olddfd_r_[PADR_(l_int)]; char oldname_l_[PADL_(const char *)]; const char * oldname; char oldname_r_[PADR_(const char *)]; - char newfd_l_[PADL_(l_int)]; l_int newfd; char newfd_r_[PADR_(l_int)]; + char newdfd_l_[PADL_(l_int)]; l_int newdfd; char newdfd_r_[PADR_(l_int)]; char newname_l_[PADL_(const char *)]; const char * newname; char newname_r_[PADR_(const char *)]; char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; }; Modified: stable/12/sys/amd64/linux/linux_systrace_args.c ============================================================================== --- stable/12/sys/amd64/linux/linux_systrace_args.c Sun Aug 23 19:41:16 2020 (r364511) +++ stable/12/sys/amd64/linux/linux_systrace_args.c Sun Aug 23 19:42:48 2020 (r364512) @@ -2302,9 +2302,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_renameat2 */ case 316: { struct linux_renameat2_args *p = params; - iarg[0] = p->oldfd; /* l_int */ + iarg[0] = p->olddfd; /* l_int */ uarg[1] = (intptr_t) p->oldname; /* const char * */ - iarg[2] = p->newfd; /* l_int */ + iarg[2] = p->newdfd; /* l_int */ uarg[3] = (intptr_t) p->newname; /* const char * */ uarg[4] = p->flags; /* unsigned int */ *n_args = 5; Modified: stable/12/sys/amd64/linux32/linux32_proto.h ============================================================================== --- stable/12/sys/amd64/linux32/linux32_proto.h Sun Aug 23 19:41:16 2020 (r364511) +++ stable/12/sys/amd64/linux32/linux32_proto.h Sun Aug 23 19:42:48 2020 (r364512) @@ -1213,9 +1213,9 @@ struct linux_sched_getattr_args { char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_renameat2_args { - char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; + char olddfd_l_[PADL_(l_int)]; l_int olddfd; char olddfd_r_[PADR_(l_int)]; char oldname_l_[PADL_(const char *)]; const char * oldname; char oldname_r_[PADR_(const char *)]; - char newfd_l_[PADL_(l_int)]; l_int newfd; char newfd_r_[PADR_(l_int)]; + char newdfd_l_[PADL_(l_int)]; l_int newdfd; char newdfd_r_[PADR_(l_int)]; char newname_l_[PADL_(const char *)]; const char * newname; char newname_r_[PADR_(const char *)]; char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; }; Modified: stable/12/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_systrace_args.c Sun Aug 23 19:41:16 2020 (r364511) +++ stable/12/sys/amd64/linux32/linux32_systrace_args.c Sun Aug 23 19:42:48 2020 (r364512) @@ -2440,9 +2440,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_renameat2 */ case 353: { struct linux_renameat2_args *p = params; - iarg[0] = p->oldfd; /* l_int */ + iarg[0] = p->olddfd; /* l_int */ uarg[1] = (intptr_t) p->oldname; /* const char * */ - iarg[2] = p->newfd; /* l_int */ + iarg[2] = p->newdfd; /* l_int */ uarg[3] = (intptr_t) p->newname; /* const char * */ uarg[4] = p->flags; /* unsigned int */ *n_args = 5; Modified: stable/12/sys/arm64/linux/linux_proto.h ============================================================================== --- stable/12/sys/arm64/linux/linux_proto.h Sun Aug 23 19:41:16 2020 (r364511) +++ stable/12/sys/arm64/linux/linux_proto.h Sun Aug 23 19:42:48 2020 (r364512) @@ -974,9 +974,9 @@ struct linux_sched_getattr_args { char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_renameat2_args { - char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; + char olddfd_l_[PADL_(l_int)]; l_int olddfd; char olddfd_r_[PADR_(l_int)]; char oldname_l_[PADL_(const char *)]; const char * oldname; char oldname_r_[PADR_(const char *)]; - char newfd_l_[PADL_(l_int)]; l_int newfd; char newfd_r_[PADR_(l_int)]; + char newdfd_l_[PADL_(l_int)]; l_int newdfd; char newdfd_r_[PADR_(l_int)]; char newname_l_[PADL_(const char *)]; const char * newname; char newname_r_[PADR_(const char *)]; char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; }; Modified: stable/12/sys/arm64/linux/linux_systrace_args.c ============================================================================== --- stable/12/sys/arm64/linux/linux_systrace_args.c Sun Aug 23 19:41:16 2020 (r364511) +++ stable/12/sys/arm64/linux/linux_systrace_args.c Sun Aug 23 19:42:48 2020 (r364512) @@ -1977,9 +1977,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_renameat2 */ case 276: { struct linux_renameat2_args *p = params; - iarg[0] = p->oldfd; /* l_int */ + iarg[0] = p->olddfd; /* l_int */ uarg[1] = (intptr_t) p->oldname; /* const char * */ - iarg[2] = p->newfd; /* l_int */ + iarg[2] = p->newdfd; /* l_int */ uarg[3] = (intptr_t) p->newname; /* const char * */ uarg[4] = p->flags; /* unsigned int */ *n_args = 5; Modified: stable/12/sys/i386/linux/linux_proto.h ============================================================================== --- stable/12/sys/i386/linux/linux_proto.h Sun Aug 23 19:41:16 2020 (r364511) +++ stable/12/sys/i386/linux/linux_proto.h Sun Aug 23 19:42:48 2020 (r364512) @@ -1220,9 +1220,9 @@ struct linux_sched_getattr_args { char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_renameat2_args { - char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; + char olddfd_l_[PADL_(l_int)]; l_int olddfd; char olddfd_r_[PADR_(l_int)]; char oldname_l_[PADL_(const char *)]; const char * oldname; char oldname_r_[PADR_(const char *)]; - char newfd_l_[PADL_(l_int)]; l_int newfd; char newfd_r_[PADR_(l_int)]; + char newdfd_l_[PADL_(l_int)]; l_int newdfd; char newdfd_r_[PADR_(l_int)]; char newname_l_[PADL_(const char *)]; const char * newname; char newname_r_[PADR_(const char *)]; char flags_l_[PADL_(unsigned int)]; unsigned int flags; char flags_r_[PADR_(unsigned int)]; }; Modified: stable/12/sys/i386/linux/linux_systrace_args.c ============================================================================== --- stable/12/sys/i386/linux/linux_systrace_args.c Sun Aug 23 19:41:16 2020 (r364511) +++ stable/12/sys/i386/linux/linux_systrace_args.c Sun Aug 23 19:42:48 2020 (r364512) @@ -2505,9 +2505,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg /* linux_renameat2 */ case 353: { struct linux_renameat2_args *p = params; - iarg[0] = p->oldfd; /* l_int */ + iarg[0] = p->olddfd; /* l_int */ uarg[1] = (intptr_t) p->oldname; /* const char * */ - iarg[2] = p->newfd; /* l_int */ + iarg[2] = p->newdfd; /* l_int */ uarg[3] = (intptr_t) p->newname; /* const char * */ uarg[4] = p->flags; /* unsigned int */ *n_args = 5; From owner-svn-src-all@freebsd.org Sun Aug 23 19:44:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3CE43C68E8; Sun, 23 Aug 2020 19:44:35 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQgk17Cmz49l6; Sun, 23 Aug 2020 19:44:33 +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 46700C917; Sun, 23 Aug 2020 19:44:31 +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 07NJiVUW088281; Sun, 23 Aug 2020 19:44:31 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJiUfY088169; Sun, 23 Aug 2020 19:44:30 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008231944.07NJiUfY088169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 19:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364514 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Commit-Revision: 364514 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:44:35 -0000 Author: trasz Date: Sun Aug 23 19:44:29 2020 New Revision: 364514 URL: https://svnweb.freebsd.org/changeset/base/364514 Log: MFC r352210 by emaste: linux: add trivial renameat2 implementation Just return EINVAL if flags != 0. The Linux man page documents one case of EINVAL as "The filesystem does not support one of the flags in flags." After r351723 userland binaries will try using new system calls. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_dummy.c stable/12/sys/amd64/linux32/linux32_dummy.c stable/12/sys/arm64/linux/linux_dummy.c stable/12/sys/compat/linux/linux_file.c stable/12/sys/i386/linux/linux_dummy.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/amd64/linux/linux_dummy.c Sun Aug 23 19:43:47 2020 (r364513) +++ stable/12/sys/amd64/linux/linux_dummy.c Sun Aug 23 19:44:29 2020 (r364514) @@ -129,8 +129,6 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.14: */ -DUMMY(renameat2); /* Linux 3.15: */ DUMMY(seccomp); DUMMY(memfd_create); Modified: stable/12/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_dummy.c Sun Aug 23 19:43:47 2020 (r364513) +++ stable/12/sys/amd64/linux32/linux32_dummy.c Sun Aug 23 19:44:29 2020 (r364514) @@ -136,8 +136,6 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.14: */ -DUMMY(renameat2); /* Linux 3.15: */ DUMMY(seccomp); DUMMY(memfd_create); Modified: stable/12/sys/arm64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/arm64/linux/linux_dummy.c Sun Aug 23 19:43:47 2020 (r364513) +++ stable/12/sys/arm64/linux/linux_dummy.c Sun Aug 23 19:44:29 2020 (r364514) @@ -129,8 +129,6 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.14: */ -DUMMY(renameat2); /* Linux 3.15: */ DUMMY(seccomp); DUMMY(memfd_create); Modified: stable/12/sys/compat/linux/linux_file.c ============================================================================== --- stable/12/sys/compat/linux/linux_file.c Sun Aug 23 19:43:47 2020 (r364513) +++ stable/12/sys/compat/linux/linux_file.c Sun Aug 23 19:44:29 2020 (r364514) @@ -774,8 +774,28 @@ linux_rename(struct thread *td, struct linux_rename_ar int linux_renameat(struct thread *td, struct linux_renameat_args *args) { + struct linux_renameat2_args renameat2_args = { + .olddfd = args->olddfd, + .oldname = args->oldname, + .newdfd = args->newdfd, + .newname = args->newname, + .flags = 0 + }; + + return (linux_renameat2(td, &renameat2_args)); +} + +int +linux_renameat2(struct thread *td, struct linux_renameat2_args *args) +{ char *from, *to; int error, olddfd, newdfd; + + if (args->flags != 0) { + linux_msg(td, "renameat2 unsupported flags 0x%x\n", + args->flags); + return (EINVAL); + } olddfd = (args->olddfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->olddfd; newdfd = (args->newdfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->newdfd; Modified: stable/12/sys/i386/linux/linux_dummy.c ============================================================================== --- stable/12/sys/i386/linux/linux_dummy.c Sun Aug 23 19:43:47 2020 (r364513) +++ stable/12/sys/i386/linux/linux_dummy.c Sun Aug 23 19:44:29 2020 (r364514) @@ -133,8 +133,6 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.14: */ -DUMMY(renameat2); -/* Linux 3.15: */ DUMMY(seccomp); DUMMY(memfd_create); /* Linux 3.18: */ From owner-svn-src-all@freebsd.org Sun Aug 23 19:43:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F9E53C6B23; Sun, 23 Aug 2020 19:43:50 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQfs2PRKz49FD; Sun, 23 Aug 2020 19:43:49 +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 87E80C98F; Sun, 23 Aug 2020 19:43:48 +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 07NJhmRC087125; Sun, 23 Aug 2020 19:43:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJhmcX087123; Sun, 23 Aug 2020 19:43:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202008231943.07NJhmcX087123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 23 Aug 2020 19:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364513 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 364513 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:43:52 -0000 Author: kib Date: Sun Aug 23 19:43:47 2020 New Revision: 364513 URL: https://svnweb.freebsd.org/changeset/base/364513 Log: kern_sharedpage.c: Add exec_sysvec_init_secondary() helper. It allows a sysent to share existing usermode data in shared page with other sysent, assuming ABI differences are not in the layout of the page. Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25273 Modified: head/sys/kern/kern_sharedpage.c head/sys/sys/sysent.h Modified: head/sys/kern/kern_sharedpage.c ============================================================================== --- head/sys/kern/kern_sharedpage.c Sun Aug 23 19:42:48 2020 (r364512) +++ head/sys/kern/kern_sharedpage.c Sun Aug 23 19:43:47 2020 (r364513) @@ -288,3 +288,21 @@ exec_sysvec_init(void *param) #endif } } + +void +exec_sysvec_init_secondary(struct sysentvec *sv, struct sysentvec *sv2) +{ + MPASS((sv2->sv_flags & SV_ABI_MASK) == (sv->sv_flags & SV_ABI_MASK)); + MPASS((sv2->sv_flags & SV_TIMEKEEP) == (sv->sv_flags & SV_TIMEKEEP)); + MPASS((sv2->sv_flags & SV_SHP) != 0 && (sv->sv_flags & SV_SHP) != 0); + + sv2->sv_shared_page_obj = sv->sv_shared_page_obj; + sv2->sv_sigcode_base = sv2->sv_shared_page_base + + (sv->sv_sigcode_base - sv->sv_shared_page_base); + if ((sv2->sv_flags & SV_ABI_MASK) != SV_ABI_FREEBSD) + return; + if ((sv2->sv_flags & SV_TIMEKEEP) != 0) { + sv2->sv_timekeep_base = sv2->sv_shared_page_base + + (sv->sv_timekeep_base - sv->sv_shared_page_base); + } +} Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Sun Aug 23 19:42:48 2020 (r364512) +++ head/sys/sys/sysent.h Sun Aug 23 19:43:47 2020 (r364513) @@ -321,6 +321,7 @@ int shared_page_alloc(int size, int align); int shared_page_fill(int size, int align, const void *data); void shared_page_write(int base, int size, const void *data); void exec_sysvec_init(void *param); +void exec_sysvec_init_secondary(struct sysentvec *sv, struct sysentvec *sv2); void exec_inittk(void); #define INIT_SYSENTVEC(name, sv) \ From owner-svn-src-all@freebsd.org Sun Aug 23 19:46:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C3663C6E36; Sun, 23 Aug 2020 19:46:02 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQjM4b45z4Chn; Sun, 23 Aug 2020 19:45:58 +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 39C93C89E; Sun, 23 Aug 2020 19:45:57 +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 07NJjvHI090476; Sun, 23 Aug 2020 19:45:57 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJjuOA090472; Sun, 23 Aug 2020 19:45:56 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008231945.07NJjuOA090472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 19:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364515 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 364515 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:46:02 -0000 Author: trasz Date: Sun Aug 23 19:45:56 2020 New Revision: 364515 URL: https://svnweb.freebsd.org/changeset/base/364515 Log: MFC r352221 by emaste: linuxulator: seccomp syscall first appeared in Linux 3.17 Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_dummy.c stable/12/sys/amd64/linux32/linux32_dummy.c stable/12/sys/arm64/linux/linux_dummy.c stable/12/sys/i386/linux/linux_dummy.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/amd64/linux/linux_dummy.c Sun Aug 23 19:44:29 2020 (r364514) +++ stable/12/sys/amd64/linux/linux_dummy.c Sun Aug 23 19:45:56 2020 (r364515) @@ -130,9 +130,10 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.15: */ -DUMMY(seccomp); DUMMY(memfd_create); DUMMY(kexec_file_load); +/* Linux 3.17: */ +DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); /* Linux 3.19: */ Modified: stable/12/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_dummy.c Sun Aug 23 19:44:29 2020 (r364514) +++ stable/12/sys/amd64/linux32/linux32_dummy.c Sun Aug 23 19:45:56 2020 (r364515) @@ -137,8 +137,9 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.15: */ -DUMMY(seccomp); DUMMY(memfd_create); +/* Linux 3.17: */ +DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); /* Linux 3.19: */ Modified: stable/12/sys/arm64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/arm64/linux/linux_dummy.c Sun Aug 23 19:44:29 2020 (r364514) +++ stable/12/sys/arm64/linux/linux_dummy.c Sun Aug 23 19:45:56 2020 (r364515) @@ -130,8 +130,9 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.15: */ -DUMMY(seccomp); DUMMY(memfd_create); +/* Linux 3.17: */ +DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); /* Linux 3.19: */ Modified: stable/12/sys/i386/linux/linux_dummy.c ============================================================================== --- stable/12/sys/i386/linux/linux_dummy.c Sun Aug 23 19:44:29 2020 (r364514) +++ stable/12/sys/i386/linux/linux_dummy.c Sun Aug 23 19:45:56 2020 (r364515) @@ -133,8 +133,9 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.14: */ -DUMMY(seccomp); DUMMY(memfd_create); +/* Linux 3.17: */ +DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); /* Linux 3.19: */ From owner-svn-src-all@freebsd.org Sun Aug 23 19:47:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D41953C703F; Sun, 23 Aug 2020 19:47:15 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQkp5Fqnz4DJd; Sun, 23 Aug 2020 19:47: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 3E0EBC920; Sun, 23 Aug 2020 19:47:11 +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 07NJlBQi092574; Sun, 23 Aug 2020 19:47:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJlAb6092567; Sun, 23 Aug 2020 19:47:10 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008231947.07NJlAb6092567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 19:47:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364516 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 364516 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:47:16 -0000 Author: trasz Date: Sun Aug 23 19:47:10 2020 New Revision: 364516 URL: https://svnweb.freebsd.org/changeset/base/364516 Log: MFC r352222 by emaste: linuxulator: memfd_create first appeared in Linux 3.17 Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_dummy.c stable/12/sys/amd64/linux32/linux32_dummy.c stable/12/sys/arm64/linux/linux_dummy.c stable/12/sys/i386/linux/linux_dummy.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/amd64/linux/linux_dummy.c Sun Aug 23 19:45:56 2020 (r364515) +++ stable/12/sys/amd64/linux/linux_dummy.c Sun Aug 23 19:47:10 2020 (r364516) @@ -130,9 +130,9 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.15: */ -DUMMY(memfd_create); DUMMY(kexec_file_load); /* Linux 3.17: */ +DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); Modified: stable/12/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_dummy.c Sun Aug 23 19:45:56 2020 (r364515) +++ stable/12/sys/amd64/linux32/linux32_dummy.c Sun Aug 23 19:47:10 2020 (r364516) @@ -136,9 +136,8 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.15: */ -DUMMY(memfd_create); /* Linux 3.17: */ +DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); Modified: stable/12/sys/arm64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/arm64/linux/linux_dummy.c Sun Aug 23 19:45:56 2020 (r364515) +++ stable/12/sys/arm64/linux/linux_dummy.c Sun Aug 23 19:47:10 2020 (r364516) @@ -129,9 +129,8 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.15: */ -DUMMY(memfd_create); /* Linux 3.17: */ +DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); Modified: stable/12/sys/i386/linux/linux_dummy.c ============================================================================== --- stable/12/sys/i386/linux/linux_dummy.c Sun Aug 23 19:45:56 2020 (r364515) +++ stable/12/sys/i386/linux/linux_dummy.c Sun Aug 23 19:47:10 2020 (r364516) @@ -132,9 +132,8 @@ DUMMY(kcmp); DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.14: */ -DUMMY(memfd_create); /* Linux 3.17: */ +DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); From owner-svn-src-all@freebsd.org Sun Aug 23 19:47:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9AE63C6F71; Sun, 23 Aug 2020 19:47:34 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQl80tQpz4DbC; Sun, 23 Aug 2020 19:47:32 +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 776D4C1FA; Sun, 23 Aug 2020 19:47:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07NJlSdt092842; Sun, 23 Aug 2020 19:47:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJlS9u092840; Sun, 23 Aug 2020 19:47:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202008231947.07NJlS9u092840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 23 Aug 2020 19:47:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364517 - in head: sys/sys usr.bin/elfctl X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: sys/sys usr.bin/elfctl X-SVN-Commit-Revision: 364517 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:47:35 -0000 Author: kib Date: Sun Aug 23 19:47:27 2020 New Revision: 364517 URL: https://svnweb.freebsd.org/changeset/base/364517 Log: Reserve FreeBSD ELF feature control bit LA48 to control VA layout on amd64. Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25273 Modified: head/sys/sys/elf_common.h head/usr.bin/elfctl/elfctl.c Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Sun Aug 23 19:47:10 2020 (r364516) +++ head/sys/sys/elf_common.h Sun Aug 23 19:47:27 2020 (r364517) @@ -796,6 +796,7 @@ typedef struct { #define NT_FREEBSD_FCTL_PROTMAX_DISABLE 0x00000002 #define NT_FREEBSD_FCTL_STKGAP_DISABLE 0x00000004 #define NT_FREEBSD_FCTL_WXNEEDED 0x00000008 +#define NT_FREEBSD_FCTL_LA48 0x00000010 /* Values for n_type. Used in core files. */ #define NT_PRSTATUS 1 /* Process status. */ Modified: head/usr.bin/elfctl/elfctl.c ============================================================================== --- head/usr.bin/elfctl/elfctl.c Sun Aug 23 19:47:10 2020 (r364516) +++ head/usr.bin/elfctl/elfctl.c Sun Aug 23 19:47:27 2020 (r364517) @@ -67,6 +67,7 @@ static struct ControlFeatures featurelist[] = { "Disable implicit PROT_MAX" }, { "stackgap", NT_FREEBSD_FCTL_STKGAP_DISABLE, "Disable stack gap" }, { "wxneeded", NT_FREEBSD_FCTL_WXNEEDED, "Requires W+X mappings" }, + { "la48", NT_FREEBSD_FCTL_LA48, "amd64: Limit user VA to 48bit" }, }; static struct option long_opts[] = { From owner-svn-src-all@freebsd.org Sun Aug 23 19:54:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 682403C7C4A; Sun, 23 Aug 2020 19:54:08 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZQtl1B45z4JkN; Sun, 23 Aug 2020 19:54: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 570D8C8C4; Sun, 23 Aug 2020 19:54:04 +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 07NJs4l6002956; Sun, 23 Aug 2020 19:54:04 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJs3jK002949; Sun, 23 Aug 2020 19:54:03 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008231954.07NJs3jK002949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 19:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364518 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 364518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:54:08 -0000 Author: trasz Date: Sun Aug 23 19:54:03 2020 New Revision: 364518 URL: https://svnweb.freebsd.org/changeset/base/364518 Log: MFC r352224 by emaste: Update comments and ordering in linux*_dummy.c - sort alphabetically - getcpu arrived in Linux 2.6.19 - fanotify_* arrived in 2.6.36 Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_dummy.c stable/12/sys/amd64/linux32/linux32_dummy.c stable/12/sys/arm64/linux/linux_dummy.c stable/12/sys/i386/linux/linux_dummy.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/amd64/linux/linux_dummy.c Sun Aug 23 19:47:27 2020 (r364517) +++ stable/12/sys/amd64/linux/linux_dummy.c Sun Aug 23 19:54:03 2020 (r364518) @@ -103,6 +103,8 @@ DUMMY(tee); DUMMY(vmsplice); /* Linux 2.6.18: */ DUMMY(move_pages); +/* Linux 2.6.19: */ +DUMMY(getcpu); /* Linux 2.6.22: */ DUMMY(signalfd); /* Linux 2.6.27: */ @@ -110,7 +112,7 @@ DUMMY(signalfd4); DUMMY(inotify_init1); /* Linux 2.6.31: */ DUMMY(perf_event_open); -/* Linux 2.6.38: */ +/* Linux 2.6.36: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); /* Linux 2.6.39: */ @@ -119,7 +121,6 @@ DUMMY(open_by_handle_at); DUMMY(clock_adjtime); /* Linux 3.0: */ DUMMY(setns); -DUMMY(getcpu); /* Linux 3.2: */ DUMMY(process_vm_readv); DUMMY(process_vm_writev); Modified: stable/12/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_dummy.c Sun Aug 23 19:47:27 2020 (r364517) +++ stable/12/sys/amd64/linux32/linux32_dummy.c Sun Aug 23 19:54:03 2020 (r364518) @@ -118,7 +118,7 @@ DUMMY(signalfd4); DUMMY(inotify_init1); /* Linux 2.6.31: */ DUMMY(perf_event_open); -/* Linux 2.6.33: */ +/* Linux 2.6.36: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); /* Linux 2.6.39: */ Modified: stable/12/sys/arm64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/arm64/linux/linux_dummy.c Sun Aug 23 19:47:27 2020 (r364517) +++ stable/12/sys/arm64/linux/linux_dummy.c Sun Aug 23 19:54:03 2020 (r364518) @@ -105,12 +105,14 @@ DUMMY(tee); DUMMY(vmsplice); /* Linux 2.6.18: */ DUMMY(move_pages); +/* Linux 2.6.19: */ +DUMMY(getcpu); /* Linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); /* Linux 2.6.31: */ DUMMY(perf_event_open); -/* Linux 2.6.38: */ +/* Linux 2.6.36: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); /* Linux 2.6.39: */ @@ -119,7 +121,6 @@ DUMMY(open_by_handle_at); DUMMY(clock_adjtime); /* Linux 3.0: */ DUMMY(setns); -DUMMY(getcpu); /* Linux 3.2: */ DUMMY(process_vm_readv); DUMMY(process_vm_writev); Modified: stable/12/sys/i386/linux/linux_dummy.c ============================================================================== --- stable/12/sys/i386/linux/linux_dummy.c Sun Aug 23 19:47:27 2020 (r364517) +++ stable/12/sys/i386/linux/linux_dummy.c Sun Aug 23 19:54:03 2020 (r364518) @@ -114,7 +114,7 @@ DUMMY(signalfd4); DUMMY(inotify_init1); /* Linux 2.6.31: */ DUMMY(perf_event_open); -/* Linux 2.6.33: */ +/* Linux 2.6.36: */ DUMMY(fanotify_init); DUMMY(fanotify_mark); /* Linux 2.6.39: */ From owner-svn-src-all@freebsd.org Sun Aug 23 19:59:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB8573C825C; Sun, 23 Aug 2020 19:59: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZR1B1D77z4NMx; Sun, 23 Aug 2020 19:59:41 +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 2101BC961; Sun, 23 Aug 2020 19:59:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07NJxd4P003336; Sun, 23 Aug 2020 19:59:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NJxcLT003328; Sun, 23 Aug 2020 19:59:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008231959.07NJxcLT003328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 19:59:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364519 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Commit-Revision: 364519 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 19:59:43 -0000 Author: trasz Date: Sun Aug 23 19:59:38 2020 New Revision: 364519 URL: https://svnweb.freebsd.org/changeset/base/364519 Log: MFC r356177: Implement Linux syslog(2) syscall; just enough to make Linux dmesg(8) utility work. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_dummy.c stable/12/sys/amd64/linux32/linux32_dummy.c stable/12/sys/arm64/linux/linux_dummy.c stable/12/sys/compat/linux/linux_misc.c stable/12/sys/compat/linux/linux_misc.h stable/12/sys/i386/linux/linux_dummy.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/amd64/linux/linux_dummy.c Sun Aug 23 19:54:03 2020 (r364518) +++ stable/12/sys/amd64/linux/linux_dummy.c Sun Aug 23 19:59:38 2020 (r364519) @@ -60,7 +60,6 @@ UNIMPLEMENTED(uselib); UNIMPLEMENTED(vserver); DUMMY(sendfile); -DUMMY(syslog); DUMMY(setfsuid); DUMMY(setfsgid); DUMMY(sysfs); Modified: stable/12/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_dummy.c Sun Aug 23 19:54:03 2020 (r364518) +++ stable/12/sys/amd64/linux32/linux32_dummy.c Sun Aug 23 19:59:38 2020 (r364519) @@ -63,7 +63,6 @@ UNIMPLEMENTED(vserver); DUMMY(stime); DUMMY(olduname); -DUMMY(syslog); DUMMY(uname); DUMMY(vhangup); DUMMY(swapoff); Modified: stable/12/sys/arm64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/arm64/linux/linux_dummy.c Sun Aug 23 19:54:03 2020 (r364518) +++ stable/12/sys/arm64/linux/linux_dummy.c Sun Aug 23 19:59:38 2020 (r364519) @@ -65,7 +65,6 @@ UNIMPLEMENTED(uselib); UNIMPLEMENTED(vserver); DUMMY(sendfile); -DUMMY(syslog); DUMMY(setfsuid); DUMMY(setfsgid); DUMMY(vhangup); Modified: stable/12/sys/compat/linux/linux_misc.c ============================================================================== --- stable/12/sys/compat/linux/linux_misc.c Sun Aug 23 19:54:03 2020 (r364518) +++ stable/12/sys/compat/linux/linux_misc.c Sun Aug 23 19:59:38 2020 (r364519) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2626,4 +2627,67 @@ linux_mincore(struct thread *td, struct linux_mincore_ if (args->start & PAGE_MASK) return (EINVAL); return (kern_mincore(td, args->start, args->len, args->vec)); +} + +#define SYSLOG_TAG "<6>" + +int +linux_syslog(struct thread *td, struct linux_syslog_args *args) +{ + char buf[128], *src, *dst; + u_int seq; + int buflen, error; + + if (args->type != LINUX_SYSLOG_ACTION_READ_ALL) { + linux_msg(td, "syslog unsupported type 0x%x", args->type); + return (EINVAL); + } + + if (args->len < 6) { + td->td_retval[0] = 0; + return (0); + } + + error = priv_check(td, PRIV_MSGBUF); + if (error) + return (error); + + mtx_lock(&msgbuf_lock); + msgbuf_peekbytes(msgbufp, NULL, 0, &seq); + mtx_unlock(&msgbuf_lock); + + dst = args->buf; + error = copyout(&SYSLOG_TAG, dst, sizeof(SYSLOG_TAG)); + /* The -1 is to skip the trailing '\0'. */ + dst += sizeof(SYSLOG_TAG) - 1; + + while (error == 0) { + mtx_lock(&msgbuf_lock); + buflen = msgbuf_peekbytes(msgbufp, buf, sizeof(buf), &seq); + mtx_unlock(&msgbuf_lock); + + if (buflen == 0) + break; + + for (src = buf; src < buf + buflen && error == 0; src++) { + if (*src == '\0') + continue; + + if (dst >= args->buf + args->len) + goto out; + + error = copyout(src, dst, 1); + dst++; + + if (*src == '\n' && *(src + 1) != '<' && + dst + sizeof(SYSLOG_TAG) < args->buf + args->len) { + error = copyout(&SYSLOG_TAG, + dst, sizeof(SYSLOG_TAG)); + dst += sizeof(SYSLOG_TAG) - 1; + } + } + } +out: + td->td_retval[0] = dst - args->buf; + return (error); } Modified: stable/12/sys/compat/linux/linux_misc.h ============================================================================== --- stable/12/sys/compat/linux/linux_misc.h Sun Aug 23 19:54:03 2020 (r364518) +++ stable/12/sys/compat/linux/linux_misc.h Sun Aug 23 19:59:38 2020 (r364519) @@ -149,6 +149,9 @@ extern int stclohz; #define LINUX_GRND_NONBLOCK 0x0001 #define LINUX_GRND_RANDOM 0x0002 +/* Linux syslog flags */ +#define LINUX_SYSLOG_ACTION_READ_ALL 3 + #if defined(__amd64__) && !defined(COMPAT_LINUX32) int linux_ptrace_status(struct thread *td, int pid, int status); #endif Modified: stable/12/sys/i386/linux/linux_dummy.c ============================================================================== --- stable/12/sys/i386/linux/linux_dummy.c Sun Aug 23 19:54:03 2020 (r364518) +++ stable/12/sys/i386/linux/linux_dummy.c Sun Aug 23 19:59:38 2020 (r364519) @@ -64,7 +64,6 @@ UNIMPLEMENTED(vserver); DUMMY(stime); DUMMY(fstat); DUMMY(olduname); -DUMMY(syslog); DUMMY(uname); DUMMY(vhangup); DUMMY(vm86old); From owner-svn-src-all@freebsd.org Sun Aug 23 20:05:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF1BE3C8AF0; Sun, 23 Aug 2020 20:05:24 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZR7l63Jtz4PhF; Sun, 23 Aug 2020 20:05:23 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (c-73-92-37-32.hsd1.ca.comcast.net [73.92.37.32]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id 07NK5FcX021848 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 23 Aug 2020 13:05:15 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r364465 - in head/sys: conf net net/route To: "Alexander V. Chernikov" , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <202008212134.07LLYq3K071532@repo.freebsd.org> <51571598049078@mail.yandex.ru> From: Julian Elischer Message-ID: <89fc3874-eead-7756-d53e-c4dbb64adece@freebsd.org> Date: Sun, 23 Aug 2020 13:05:09 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <51571598049078@mail.yandex.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 4BZR7l63Jtz4PhF X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:36236, ipnet:204.109.60.0/22, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:05:24 -0000 On 8/21/20 3:32 PM, Alexander V. Chernikov wrote: > 21.08.2020, 23:21, "Julian Elischer" : >> On 8/21/20 2:34 PM, Alexander V. Chernikov wrote: >>>  Author: melifaro >>>  Date: Fri Aug 21 21:34:52 2020 >>>  New Revision: 364465 >>>  URL: https://svnweb.freebsd.org/changeset/base/364465 >>> >>>  Log: >>>     Make net.fibs growable. >>> >>>     Allow to dynamically grow the amount of fibs in each vnet. >>> >>>     This change alters current behavior. Currently, if one defines >>>      ROUTETABLES > 1 in the kernel config, each vnet will be created >>>      with the number of fibs defined in the kernel config. >>>      After this commit vnets will be created with fibs=1. >>> >>>     Dynamic net.fibs is not compatible with net.add_addr_allfibs. >>>      The plan is to deprecate the latter and make >>>      net.add_addr_allfibs=0 default behaviour. >> For a while, setting it to 1 should be very noisy. > You mean that kernel should print warning when creating VNET && original net.fibs value is > 1 ? doing what you will soon be unable to do should warn you that you need to get ready to change your software to do it another way. From owner-svn-src-all@freebsd.org Sun Aug 23 20:05:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A6163C8CBA; Sun, 23 Aug 2020 20:05:36 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZR800QjSz4Pj3; Sun, 23 Aug 2020 20:05:36 +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 E56F4CD8D; Sun, 23 Aug 2020 20:05:35 +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 07NK5ZnF009201; Sun, 23 Aug 2020 20:05:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NK5Zi0009200; Sun, 23 Aug 2020 20:05:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202008232005.07NK5Zi0009200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 23 Aug 2020 20:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364520 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 364520 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:05:36 -0000 Author: kib Date: Sun Aug 23 20:05:35 2020 New Revision: 364520 URL: https://svnweb.freebsd.org/changeset/base/364520 Log: Style. Modified: head/sys/arm64/arm64/elf32_machdep.c Modified: head/sys/arm64/arm64/elf32_machdep.c ============================================================================== --- head/sys/arm64/arm64/elf32_machdep.c Sun Aug 23 19:59:38 2020 (r364519) +++ head/sys/arm64/arm64/elf32_machdep.c Sun Aug 23 20:05:35 2020 (r364520) @@ -66,7 +66,7 @@ extern int sz_aarch32_sigcode; static int freebsd32_fetch_syscall_args(struct thread *td); static void freebsd32_setregs(struct thread *td, struct image_params *imgp, - u_long stack); + u_long stack); static void freebsd32_set_syscall_retval(struct thread *, int); static boolean_t elf32_arm_abi_supported(struct image_params *); From owner-svn-src-all@freebsd.org Sun Aug 23 20:06:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 919873C8BD0; Sun, 23 Aug 2020 20:06:56 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZR9X3NJnz4PxP; Sun, 23 Aug 2020 20:06:56 +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 5776BC763; Sun, 23 Aug 2020 20:06:56 +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 07NK6u9i009319; Sun, 23 Aug 2020 20:06:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NK6tjk009313; Sun, 23 Aug 2020 20:06:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202008232006.07NK6tjk009313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 23 Aug 2020 20:06:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364521 - in head/sys: arm/arm arm64/arm64 kern powerpc/powerpc sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: arm/arm arm64/arm64 kern powerpc/powerpc sys X-SVN-Commit-Revision: 364521 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:06:56 -0000 Author: kib Date: Sun Aug 23 20:06:55 2020 New Revision: 364521 URL: https://svnweb.freebsd.org/changeset/base/364521 Log: Pass pointers to info parsed from notes, to brandinfo->header_supported filter. Currently, we parse notes for the values of ELF FreeBSD feature flags and osrel. Knowing these values, or knowing that image does not carry the note if pointers are NULL, is useful to decide which ABI variant (brand) we want to activate for the image. Right now this is only a plumbing change Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25273 Modified: head/sys/arm/arm/elf_machdep.c head/sys/arm64/arm64/elf32_machdep.c head/sys/kern/imgact_elf.c head/sys/powerpc/powerpc/elf64_machdep.c head/sys/sys/imgact_elf.h Modified: head/sys/arm/arm/elf_machdep.c ============================================================================== --- head/sys/arm/arm/elf_machdep.c Sun Aug 23 20:05:35 2020 (r364520) +++ head/sys/arm/arm/elf_machdep.c Sun Aug 23 20:06:55 2020 (r364521) @@ -56,7 +56,8 @@ __FBSDID("$FreeBSD$"); #include "opt_global.h" /* for OPT_KDTRACE_HOOKS */ #include "opt_stack.h" /* for OPT_STACK */ -static boolean_t elf32_arm_abi_supported(struct image_params *); +static boolean_t elf32_arm_abi_supported(struct image_params *, int32_t *, + uint32_t *); u_long elf_hwcap; u_long elf_hwcap2; @@ -121,7 +122,8 @@ SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, &freebsd_brand_info); static boolean_t -elf32_arm_abi_supported(struct image_params *imgp) +elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, + uint32_t *fctl0 __unused) { const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; Modified: head/sys/arm64/arm64/elf32_machdep.c ============================================================================== --- head/sys/arm64/arm64/elf32_machdep.c Sun Aug 23 20:05:35 2020 (r364520) +++ head/sys/arm64/arm64/elf32_machdep.c Sun Aug 23 20:06:55 2020 (r364521) @@ -69,7 +69,8 @@ static void freebsd32_setregs(struct thread *td, struc u_long stack); static void freebsd32_set_syscall_retval(struct thread *, int); -static boolean_t elf32_arm_abi_supported(struct image_params *); +static boolean_t elf32_arm_abi_supported(struct image_params *, int32_t *, + uint32_t *); extern void freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask); @@ -126,7 +127,8 @@ SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t)elf32_insert_brand_entry, &freebsd32_brand_info); static boolean_t -elf32_arm_abi_supported(struct image_params *imgp) +elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, + uint32_t *fctl0 __unused) { const Elf32_Ehdr *hdr; Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Sun Aug 23 20:05:35 2020 (r364520) +++ head/sys/kern/imgact_elf.c Sun Aug 23 20:06:55 2020 (r364521) @@ -97,7 +97,8 @@ static bool __elfN(freebsd_trans_osrel)(const Elf_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, uint32_t *fctl0); + Elf_Brandnote *checknote, int32_t *osrel, boolean_t *has_fctl0, + uint32_t *fctl0); static vm_prot_t __elfN(trans_prot)(Elf_Word); static Elf_Word __elfN(untrans_prot)(vm_prot_t); @@ -309,7 +310,7 @@ __elfN(get_brandinfo)(struct image_params *imgp, const { const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; Elf_Brandinfo *bi, *bi_m; - boolean_t ret; + boolean_t ret, has_fctl0; int i, interp_name_len; interp_name_len = interp != NULL ? strlen(interp) + 1 : 0; @@ -331,11 +332,16 @@ __elfN(get_brandinfo)(struct image_params *imgp, const continue; if (hdr->e_machine == bi->machine && (bi->flags & (BI_BRAND_NOTE|BI_BRAND_NOTE_MANDATORY)) != 0) { + has_fctl0 = false; + *fctl0 = 0; + *osrel = 0; ret = __elfN(check_note)(imgp, bi->brand_note, osrel, - fctl0); + &has_fctl0, fctl0); /* Give brand a chance to veto check_note's guess */ - if (ret && bi->header_supported) - ret = bi->header_supported(imgp); + if (ret && bi->header_supported) { + ret = bi->header_supported(imgp, osrel, + has_fctl0 ? fctl0 : NULL); + } /* * If note checker claimed the binary, but the * interpreter path in the image does not @@ -374,7 +380,7 @@ __elfN(get_brandinfo)(struct image_params *imgp, const bi->compat_3_brand) == 0))) { /* Looks good, but give brand a chance to veto */ if (bi->header_supported == NULL || - bi->header_supported(imgp)) { + bi->header_supported(imgp, NULL, NULL)) { /* * Again, prefer strictly matching * interpreter path. @@ -402,7 +408,7 @@ __elfN(get_brandinfo)(struct image_params *imgp, const bi->header_supported == NULL) continue; if (hdr->e_machine == bi->machine) { - ret = bi->header_supported(imgp); + ret = bi->header_supported(imgp, NULL, NULL); if (ret) return (bi); } @@ -422,7 +428,7 @@ __elfN(get_brandinfo)(struct image_params *imgp, const strlen(bi->interp_path) + 1 == interp_name_len && strncmp(interp, bi->interp_path, interp_name_len) == 0 && (bi->header_supported == NULL || - bi->header_supported(imgp))) + bi->header_supported(imgp, NULL, NULL))) return (bi); } } @@ -436,7 +442,7 @@ __elfN(get_brandinfo)(struct image_params *imgp, const if (hdr->e_machine == bi->machine && __elfN(fallback_brand) == bi->brand && (bi->header_supported == NULL || - bi->header_supported(imgp))) + bi->header_supported(imgp, NULL, NULL))) return (bi); } return (NULL); @@ -2657,6 +2663,7 @@ static Elf_Note fctl_note = { }; struct fctl_cb_arg { + boolean_t *has_fctl0; uint32_t *fctl0; }; @@ -2671,6 +2678,7 @@ note_fctl_cb(const Elf_Note *note, void *arg0, boolean p = (uintptr_t)(note + 1); p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE); desc = (const Elf32_Word *)p; + *arg->has_fctl0 = TRUE; *arg->fctl0 = desc[0]; return (TRUE); } @@ -2683,7 +2691,7 @@ note_fctl_cb(const Elf_Note *note, void *arg0, boolean */ static boolean_t __elfN(check_note)(struct image_params *imgp, Elf_Brandnote *brandnote, - int32_t *osrel, uint32_t *fctl0) + int32_t *osrel, boolean_t *has_fctl0, uint32_t *fctl0) { const Elf_Phdr *phdr; const Elf_Ehdr *hdr; @@ -2695,6 +2703,7 @@ __elfN(check_note)(struct image_params *imgp, Elf_Bran phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); b_arg.brandnote = brandnote; b_arg.osrel = osrel; + f_arg.has_fctl0 = has_fctl0; f_arg.fctl0 = fctl0; for (i = 0; i < hdr->e_phnum; i++) { Modified: head/sys/powerpc/powerpc/elf64_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/elf64_machdep.c Sun Aug 23 20:05:35 2020 (r364520) +++ head/sys/powerpc/powerpc/elf64_machdep.c Sun Aug 23 20:06:55 2020 (r364521) @@ -135,8 +135,10 @@ struct sysentvec elf64_freebsd_sysvec_v2 = { }; INIT_SYSENTVEC(elf64_sysvec_v2, &elf64_freebsd_sysvec_v2); -static boolean_t ppc64_elfv1_header_match(struct image_params *params); -static boolean_t ppc64_elfv2_header_match(struct image_params *params); +static boolean_t ppc64_elfv1_header_match(struct image_params *params, + int32_t *, uint32_t *); +static boolean_t ppc64_elfv2_header_match(struct image_params *params, + int32_t *, uint32_t *); static Elf64_Brandinfo freebsd_brand_info_elfv1 = { .brand = ELFOSABI_FREEBSD, @@ -192,7 +194,8 @@ SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, void elf_reloc_self(Elf_Dyn *dynp, Elf_Addr relocbase); static boolean_t -ppc64_elfv1_header_match(struct image_params *params) +ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused, + uint32_t *fctl0 __unused) { const Elf64_Ehdr *hdr = (const Elf64_Ehdr *)params->image_header; int abi = (hdr->e_flags & 3); @@ -201,7 +204,8 @@ ppc64_elfv1_header_match(struct image_params *params) } static boolean_t -ppc64_elfv2_header_match(struct image_params *params) +ppc64_elfv2_header_match(struct image_params *params, int32_t *osrel __unused, + uint32_t *fctl0 __unused) { const Elf64_Ehdr *hdr = (const Elf64_Ehdr *)params->image_header; int abi = (hdr->e_flags & 3); Modified: head/sys/sys/imgact_elf.h ============================================================================== --- head/sys/sys/imgact_elf.h Sun Aug 23 20:05:35 2020 (r364520) +++ head/sys/sys/imgact_elf.h Sun Aug 23 20:06:55 2020 (r364521) @@ -87,7 +87,8 @@ typedef struct { const char *interp_newpath; int flags; Elf_Brandnote *brand_note; - boolean_t (*header_supported)(struct image_params *); + boolean_t (*header_supported)(struct image_params *, + int32_t *, uint32_t *); #define BI_CAN_EXEC_DYN 0x0001 #define BI_BRAND_NOTE 0x0002 /* May have note.ABI-tag section. */ #define BI_BRAND_NOTE_MANDATORY 0x0004 /* Must have note.ABI-tag section. */ From owner-svn-src-all@freebsd.org Sun Aug 23 20:08:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 106DB3C8F23; Sun, 23 Aug 2020 20:08:06 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZRBs6ksSz4Q8Q; Sun, 23 Aug 2020 20:08:05 +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 CB678CD8E; Sun, 23 Aug 2020 20:08:05 +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 07NK85on009441; Sun, 23 Aug 2020 20:08:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NK859v009440; Sun, 23 Aug 2020 20:08:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202008232008.07NK859v009440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 23 Aug 2020 20:08:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364522 - head/sys/x86/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/include X-SVN-Commit-Revision: 364522 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:08:06 -0000 Author: kib Date: Sun Aug 23 20:08:05 2020 New Revision: 364522 URL: https://svnweb.freebsd.org/changeset/base/364522 Log: Add definition for CR4.LA57 bit. Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25273 Modified: head/sys/x86/include/specialreg.h Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Sun Aug 23 20:06:55 2020 (r364521) +++ head/sys/x86/include/specialreg.h Sun Aug 23 20:08:05 2020 (r364522) @@ -72,6 +72,7 @@ #define CR4_FXSR 0x00000200 /* Fast FPU save/restore used by OS */ #define CR4_XMM 0x00000400 /* enable SIMD/MMX2 to use except 16 */ #define CR4_UMIP 0x00000800 /* User Mode Instruction Prevention */ +#define CR4_LA57 0x00001000 /* Enable 5-level paging */ #define CR4_VMXE 0x00002000 /* enable VMX operation (Intel-specific) */ #define CR4_FSGSBASE 0x00010000 /* Enable FS/GS BASE accessing instructions */ #define CR4_PCIDE 0x00020000 /* Enable Context ID */ From owner-svn-src-all@freebsd.org Sun Aug 23 20:08:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 016BB3C8FAB; Sun, 23 Aug 2020 20:08:50 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZRCj6DLbz4QQF; Sun, 23 Aug 2020 20:08:49 +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 B91AACAC3; Sun, 23 Aug 2020 20:08:49 +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 07NK8nT8009537; Sun, 23 Aug 2020 20:08:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NK8n3U009535; Sun, 23 Aug 2020 20:08:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232008.07NK8n3U009535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 20:08:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364523 - in stable/12/sys: amd64/linux32 i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux32 i386/linux X-SVN-Commit-Revision: 364523 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:08:50 -0000 Author: trasz Date: Sun Aug 23 20:08:49 2020 New Revision: 364523 URL: https://svnweb.freebsd.org/changeset/base/364523 Log: MFC r356229: Fix definitions for Linux getcpu(2). Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux32/syscalls.master stable/12/sys/i386/linux/syscalls.master Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux32/syscalls.master ============================================================================== --- stable/12/sys/amd64/linux32/syscalls.master Sun Aug 23 20:08:05 2020 (r364522) +++ stable/12/sys/amd64/linux32/syscalls.master Sun Aug 23 20:08:49 2020 (r364523) @@ -533,7 +533,8 @@ ; Linux 2.6.18: 317 AUE_NULL STD { int linux_move_pages(void); } ; Linux 2.6.19: -318 AUE_NULL STD { int linux_getcpu(void); } +318 AUE_NULL STD { int linux_getcpu(l_uint *cpu, l_uint *node, \ + void *cache); } 319 AUE_NULL STD { int linux_epoll_pwait(l_int epfd, struct epoll_event *events, \ l_int maxevents, l_int timeout, l_sigset_t *mask, \ l_size_t sigsetsize); } Modified: stable/12/sys/i386/linux/syscalls.master ============================================================================== --- stable/12/sys/i386/linux/syscalls.master Sun Aug 23 20:08:05 2020 (r364522) +++ stable/12/sys/i386/linux/syscalls.master Sun Aug 23 20:08:49 2020 (r364523) @@ -540,7 +540,8 @@ ; Linux 2.6.18: 317 AUE_NULL STD { int linux_move_pages(void); } ; Linux 2.6.19: -318 AUE_NULL STD { int linux_getcpu(void); } +318 AUE_NULL STD { int linux_getcpu(l_uint *cpu, l_uint *node, \ + void *cache); } 319 AUE_NULL STD { int linux_epoll_pwait(l_int epfd, struct epoll_event *events, \ l_int maxevents, l_int timeout, l_sigset_t *mask, \ l_size_t sigsetsize); } From owner-svn-src-all@freebsd.org Sun Aug 23 20:10:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAA2E3C8DF8; Sun, 23 Aug 2020 20:10:12 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZRFJ53mYz4QR3; Sun, 23 Aug 2020 20:10:12 +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 91A92CD22; Sun, 23 Aug 2020 20:10:12 +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 07NKACdL009701; Sun, 23 Aug 2020 20:10:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NKABi8009695; Sun, 23 Aug 2020 20:10:11 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232010.07NKABi8009695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 20:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364524 - in stable/12/sys: amd64/linux32 i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux32 i386/linux X-SVN-Commit-Revision: 364524 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:10:12 -0000 Author: trasz Date: Sun Aug 23 20:10:10 2020 New Revision: 364524 URL: https://svnweb.freebsd.org/changeset/base/364524 Log: MFC r356231: Regen after r356229. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux32/linux32_proto.h stable/12/sys/amd64/linux32/linux32_sysent.c stable/12/sys/amd64/linux32/linux32_systrace_args.c stable/12/sys/i386/linux/linux_proto.h stable/12/sys/i386/linux/linux_sysent.c stable/12/sys/i386/linux/linux_systrace_args.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux32/linux32_proto.h ============================================================================== --- stable/12/sys/amd64/linux32/linux32_proto.h Sun Aug 23 20:08:49 2020 (r364523) +++ stable/12/sys/amd64/linux32/linux32_proto.h Sun Aug 23 20:10:10 2020 (r364524) @@ -1044,7 +1044,9 @@ struct linux_move_pages_args { register_t dummy; }; struct linux_getcpu_args { - register_t dummy; + char cpu_l_[PADL_(l_uint *)]; l_uint * cpu; char cpu_r_[PADR_(l_uint *)]; + char node_l_[PADL_(l_uint *)]; l_uint * node; char node_r_[PADR_(l_uint *)]; + char cache_l_[PADL_(void *)]; void * cache; char cache_r_[PADR_(void *)]; }; struct linux_epoll_pwait_args { char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; Modified: stable/12/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_sysent.c Sun Aug 23 20:08:49 2020 (r364523) +++ stable/12/sys/amd64/linux32/linux32_sysent.c Sun Aug 23 20:10:10 2020 (r364524) @@ -335,7 +335,7 @@ struct sysent linux32_sysent[] = { { 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 315 = linux_tee */ { 0, (sy_call_t *)linux_vmsplice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 316 = linux_vmsplice */ { 0, (sy_call_t *)linux_move_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 317 = linux_move_pages */ - { 0, (sy_call_t *)linux_getcpu, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 318 = linux_getcpu */ + { AS(linux_getcpu_args), (sy_call_t *)linux_getcpu, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 318 = linux_getcpu */ { AS(linux_epoll_pwait_args), (sy_call_t *)linux_epoll_pwait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 319 = linux_epoll_pwait */ { AS(linux_utimensat_args), (sy_call_t *)linux_utimensat, AUE_FUTIMESAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 320 = linux_utimensat */ { 0, (sy_call_t *)linux_signalfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 321 = linux_signalfd */ Modified: stable/12/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_systrace_args.c Sun Aug 23 20:08:49 2020 (r364523) +++ stable/12/sys/amd64/linux32/linux32_systrace_args.c Sun Aug 23 20:10:10 2020 (r364524) @@ -2152,7 +2152,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg } /* linux_getcpu */ case 318: { - *n_args = 0; + struct linux_getcpu_args *p = params; + uarg[0] = (intptr_t) p->cpu; /* l_uint * */ + uarg[1] = (intptr_t) p->node; /* l_uint * */ + uarg[2] = (intptr_t) p->cache; /* void * */ + *n_args = 3; break; } /* linux_epoll_pwait */ @@ -6235,6 +6239,19 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; /* linux_getcpu */ case 318: + switch(ndx) { + case 0: + p = "userland l_uint *"; + break; + case 1: + p = "userland l_uint *"; + break; + case 2: + p = "userland void *"; + break; + default: + break; + }; break; /* linux_epoll_pwait */ case 319: @@ -8730,6 +8747,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char * case 317: /* linux_getcpu */ case 318: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_epoll_pwait */ case 319: if (ndx == 0 || ndx == 1) Modified: stable/12/sys/i386/linux/linux_proto.h ============================================================================== --- stable/12/sys/i386/linux/linux_proto.h Sun Aug 23 20:08:49 2020 (r364523) +++ stable/12/sys/i386/linux/linux_proto.h Sun Aug 23 20:10:10 2020 (r364524) @@ -1053,7 +1053,9 @@ struct linux_move_pages_args { register_t dummy; }; struct linux_getcpu_args { - register_t dummy; + char cpu_l_[PADL_(l_uint *)]; l_uint * cpu; char cpu_r_[PADR_(l_uint *)]; + char node_l_[PADL_(l_uint *)]; l_uint * node; char node_r_[PADR_(l_uint *)]; + char cache_l_[PADL_(void *)]; void * cache; char cache_r_[PADR_(void *)]; }; struct linux_epoll_pwait_args { char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; Modified: stable/12/sys/i386/linux/linux_sysent.c ============================================================================== --- stable/12/sys/i386/linux/linux_sysent.c Sun Aug 23 20:08:49 2020 (r364523) +++ stable/12/sys/i386/linux/linux_sysent.c Sun Aug 23 20:10:10 2020 (r364524) @@ -335,7 +335,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 315 = linux_tee */ { 0, (sy_call_t *)linux_vmsplice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 316 = linux_vmsplice */ { 0, (sy_call_t *)linux_move_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 317 = linux_move_pages */ - { 0, (sy_call_t *)linux_getcpu, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 318 = linux_getcpu */ + { AS(linux_getcpu_args), (sy_call_t *)linux_getcpu, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 318 = linux_getcpu */ { AS(linux_epoll_pwait_args), (sy_call_t *)linux_epoll_pwait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 319 = linux_epoll_pwait */ { AS(linux_utimensat_args), (sy_call_t *)linux_utimensat, AUE_FUTIMESAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 320 = linux_utimensat */ { 0, (sy_call_t *)linux_signalfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 321 = linux_signalfd */ Modified: stable/12/sys/i386/linux/linux_systrace_args.c ============================================================================== --- stable/12/sys/i386/linux/linux_systrace_args.c Sun Aug 23 20:08:49 2020 (r364523) +++ stable/12/sys/i386/linux/linux_systrace_args.c Sun Aug 23 20:10:10 2020 (r364524) @@ -2219,7 +2219,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg } /* linux_getcpu */ case 318: { - *n_args = 0; + struct linux_getcpu_args *p = params; + uarg[0] = (intptr_t) p->cpu; /* l_uint * */ + uarg[1] = (intptr_t) p->node; /* l_uint * */ + uarg[2] = (intptr_t) p->cache; /* void * */ + *n_args = 3; break; } /* linux_epoll_pwait */ @@ -6428,6 +6432,19 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; /* linux_getcpu */ case 318: + switch(ndx) { + case 0: + p = "userland l_uint *"; + break; + case 1: + p = "userland l_uint *"; + break; + case 2: + p = "userland void *"; + break; + default: + break; + }; break; /* linux_epoll_pwait */ case 319: @@ -8964,6 +8981,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char * case 317: /* linux_getcpu */ case 318: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_epoll_pwait */ case 319: if (ndx == 0 || ndx == 1) From owner-svn-src-all@freebsd.org Sun Aug 23 20:12:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3857D3C912A; Sun, 23 Aug 2020 20:12:09 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZRHY0pCRz4Qtl; Sun, 23 Aug 2020 20:12:09 +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 F358DCF9B; Sun, 23 Aug 2020 20:12:08 +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 07NKC8JJ014693; Sun, 23 Aug 2020 20:12:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NKC8wi014687; Sun, 23 Aug 2020 20:12:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232012.07NKC8wi014687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 20:12:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364525 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Commit-Revision: 364525 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:12:09 -0000 Author: trasz Date: Sun Aug 23 20:12:07 2020 New Revision: 364525 URL: https://svnweb.freebsd.org/changeset/base/364525 Log: MFC r356241: Add basic getcpu(2) support to linuxulator. The purpose of this syscall is to query the CPU number and the NUMA domain the calling thread is currently running on. The third argument is ignored. It doesn't do anything regarding scheduling - it's literally just a way to query the current state, without any guarantees you won't get rescheduled an opcode later. This unbreaks Java from CentOS 8 (java-11-openjdk-11.0.5.10-0.el8_0.x86_64). Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_dummy.c stable/12/sys/amd64/linux32/linux32_dummy.c stable/12/sys/arm64/linux/linux_dummy.c stable/12/sys/compat/linux/linux_misc.c stable/12/sys/i386/linux/linux_dummy.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/amd64/linux/linux_dummy.c Sun Aug 23 20:10:10 2020 (r364524) +++ stable/12/sys/amd64/linux/linux_dummy.c Sun Aug 23 20:12:07 2020 (r364525) @@ -102,8 +102,6 @@ DUMMY(tee); DUMMY(vmsplice); /* Linux 2.6.18: */ DUMMY(move_pages); -/* Linux 2.6.19: */ -DUMMY(getcpu); /* Linux 2.6.22: */ DUMMY(signalfd); /* Linux 2.6.27: */ Modified: stable/12/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_dummy.c Sun Aug 23 20:10:10 2020 (r364524) +++ stable/12/sys/amd64/linux32/linux32_dummy.c Sun Aug 23 20:12:07 2020 (r364525) @@ -108,8 +108,6 @@ DUMMY(tee); DUMMY(vmsplice); /* Linux 2.6.18: */ DUMMY(move_pages); -/* Linux 2.6.19: */ -DUMMY(getcpu); /* Linux 2.6.22: */ DUMMY(signalfd); /* Linux 2.6.27: */ Modified: stable/12/sys/arm64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/arm64/linux/linux_dummy.c Sun Aug 23 20:10:10 2020 (r364524) +++ stable/12/sys/arm64/linux/linux_dummy.c Sun Aug 23 20:12:07 2020 (r364525) @@ -104,8 +104,6 @@ DUMMY(tee); DUMMY(vmsplice); /* Linux 2.6.18: */ DUMMY(move_pages); -/* Linux 2.6.19: */ -DUMMY(getcpu); /* Linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); Modified: stable/12/sys/compat/linux/linux_misc.c ============================================================================== --- stable/12/sys/compat/linux/linux_misc.c Sun Aug 23 20:10:10 2020 (r364524) +++ stable/12/sys/compat/linux/linux_misc.c Sun Aug 23 20:12:07 2020 (r364525) @@ -2691,3 +2691,19 @@ out: td->td_retval[0] = dst - args->buf; return (error); } + +int +linux_getcpu(struct thread *td, struct linux_getcpu_args *args) +{ + int cpu, error, node; + + cpu = td->td_oncpu; /* Make sure it doesn't change during copyout(9) */ + error = 0; + node = 0; /* XXX: Fake NUMA node 0 for now */ + + if (args->cpu != NULL) + error = copyout(&cpu, args->cpu, sizeof(l_int)); + if (args->node != NULL) + error = copyout(&node, args->node, sizeof(l_int)); + return (error); +} Modified: stable/12/sys/i386/linux/linux_dummy.c ============================================================================== --- stable/12/sys/i386/linux/linux_dummy.c Sun Aug 23 20:10:10 2020 (r364524) +++ stable/12/sys/i386/linux/linux_dummy.c Sun Aug 23 20:12:07 2020 (r364525) @@ -104,8 +104,6 @@ DUMMY(tee); DUMMY(vmsplice); /* Linux 2.6.18: */ DUMMY(move_pages); -/* Linux 2.6.19: */ -DUMMY(getcpu); /* Linux 2.6.22: */ DUMMY(signalfd); /* Linux 2.6.27: */ From owner-svn-src-all@freebsd.org Sun Aug 23 20:14:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 741AB3C92FE; Sun, 23 Aug 2020 20:14:59 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZRLq2v12z4R25; Sun, 23 Aug 2020 20:14:59 +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 4243BCBBD; Sun, 23 Aug 2020 20:14:59 +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 07NKExIQ015849; Sun, 23 Aug 2020 20:14:59 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NKEvJV015842; Sun, 23 Aug 2020 20:14:57 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232014.07NKEvJV015842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 20:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364526 - stable/12/sys/amd64/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/amd64/linux X-SVN-Commit-Revision: 364526 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:14:59 -0000 Author: trasz Date: Sun Aug 23 20:14:57 2020 New Revision: 364526 URL: https://svnweb.freebsd.org/changeset/base/364526 Log: MFC r357503: Add missing linux(4) syscall entries. This fixes missing debug messages for some of the unimplemented syscalls, in particular the AIO-related ones. MFC r357504: Regen after r357503. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_dummy.c stable/12/sys/amd64/linux/linux_proto.h stable/12/sys/amd64/linux/linux_syscall.h stable/12/sys/amd64/linux/linux_syscalls.c stable/12/sys/amd64/linux/linux_sysent.c stable/12/sys/amd64/linux/linux_systrace_args.c stable/12/sys/amd64/linux/syscalls.master Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/amd64/linux/linux_dummy.c Sun Aug 23 20:12:07 2020 (r364525) +++ stable/12/sys/amd64/linux/linux_dummy.c Sun Aug 23 20:14:57 2020 (r364526) @@ -53,9 +53,9 @@ UNIMPLEMENTED(getpmsg); UNIMPLEMENTED(nfsservctl); /* Added in Linux 2.2 removed in 3.1. */ UNIMPLEMENTED(putpmsg); UNIMPLEMENTED(query_module); /* Added in Linux 2.2 removed in 2.6. */ +UNIMPLEMENTED(tuxcall); UNIMPLEMENTED(security); UNIMPLEMENTED(set_thread_area); -UNIMPLEMENTED(tuxcall); UNIMPLEMENTED(uselib); UNIMPLEMENTED(vserver); @@ -64,14 +64,23 @@ DUMMY(setfsuid); DUMMY(setfsgid); DUMMY(sysfs); DUMMY(vhangup); +DUMMY(modify_ldt); DUMMY(pivot_root); DUMMY(adjtimex); DUMMY(swapoff); DUMMY(init_module); +DUMMY(ioperm); DUMMY(delete_module); DUMMY(quotactl); +DUMMY(readahead); +DUMMY(io_setup); +DUMMY(io_destroy); +DUMMY(io_getevents); +DUMMY(io_submit); +DUMMY(io_cancel); DUMMY(lookup_dcookie); DUMMY(remap_file_pages); +DUMMY(restart_syscall); DUMMY(semtimedop); DUMMY(mbind); DUMMY(get_mempolicy); Modified: stable/12/sys/amd64/linux/linux_proto.h ============================================================================== --- stable/12/sys/amd64/linux/linux_proto.h Sun Aug 23 20:12:07 2020 (r364525) +++ stable/12/sys/amd64/linux/linux_proto.h Sun Aug 23 20:14:57 2020 (r364526) @@ -551,6 +551,9 @@ struct linux_sched_rr_get_interval_args { struct linux_vhangup_args { register_t dummy; }; +struct linux_modify_ldt_args { + register_t dummy; +}; struct linux_pivot_root_args { register_t dummy; }; @@ -606,6 +609,9 @@ struct linux_setdomainname_args { struct linux_iopl_args { char level_l_[PADL_(l_uint)]; l_uint level; char level_r_[PADR_(l_uint)]; }; +struct linux_ioperm_args { + register_t dummy; +}; struct linux_init_module_args { register_t dummy; }; @@ -618,6 +624,9 @@ struct linux_quotactl_args { struct linux_gettid_args { register_t dummy; }; +struct linux_readahead_args { + register_t dummy; +}; struct linux_setxattr_args { register_t dummy; }; @@ -679,6 +688,21 @@ struct linux_sched_getaffinity_args { char len_l_[PADL_(l_uint)]; l_uint len; char len_r_[PADR_(l_uint)]; char user_mask_ptr_l_[PADL_(l_ulong *)]; l_ulong * user_mask_ptr; char user_mask_ptr_r_[PADR_(l_ulong *)]; }; +struct linux_io_setup_args { + register_t dummy; +}; +struct linux_io_destroy_args { + register_t dummy; +}; +struct linux_io_getevents_args { + register_t dummy; +}; +struct linux_io_submit_args { + register_t dummy; +}; +struct linux_io_cancel_args { + register_t dummy; +}; struct linux_lookup_dcookie_args { register_t dummy; }; @@ -696,6 +720,9 @@ struct linux_getdents64_args { struct linux_set_tid_address_args { char tidptr_l_[PADL_(l_int *)]; l_int * tidptr; char tidptr_r_[PADR_(l_int *)]; }; +struct linux_restart_syscall_args { + register_t dummy; +}; struct linux_semtimedop_args { register_t dummy; }; @@ -1360,6 +1387,7 @@ int linux_sched_get_priority_max(struct thread *, stru int linux_sched_get_priority_min(struct thread *, struct linux_sched_get_priority_min_args *); int linux_sched_rr_get_interval(struct thread *, struct linux_sched_rr_get_interval_args *); int linux_vhangup(struct thread *, struct linux_vhangup_args *); +int linux_modify_ldt(struct thread *, struct linux_modify_ldt_args *); int linux_pivot_root(struct thread *, struct linux_pivot_root_args *); int linux_sysctl(struct thread *, struct linux_sysctl_args *); int linux_prctl(struct thread *, struct linux_prctl_args *); @@ -1373,10 +1401,12 @@ int linux_reboot(struct thread *, struct linux_reboot_ int linux_sethostname(struct thread *, struct linux_sethostname_args *); int linux_setdomainname(struct thread *, struct linux_setdomainname_args *); int linux_iopl(struct thread *, struct linux_iopl_args *); +int linux_ioperm(struct thread *, struct linux_ioperm_args *); int linux_init_module(struct thread *, struct linux_init_module_args *); int linux_delete_module(struct thread *, struct linux_delete_module_args *); int linux_quotactl(struct thread *, struct linux_quotactl_args *); int linux_gettid(struct thread *, struct linux_gettid_args *); +int linux_readahead(struct thread *, struct linux_readahead_args *); int linux_setxattr(struct thread *, struct linux_setxattr_args *); int linux_lsetxattr(struct thread *, struct linux_lsetxattr_args *); int linux_fsetxattr(struct thread *, struct linux_fsetxattr_args *); @@ -1394,11 +1424,17 @@ int linux_time(struct thread *, struct linux_time_args int linux_sys_futex(struct thread *, struct linux_sys_futex_args *); int linux_sched_setaffinity(struct thread *, struct linux_sched_setaffinity_args *); int linux_sched_getaffinity(struct thread *, struct linux_sched_getaffinity_args *); +int linux_io_setup(struct thread *, struct linux_io_setup_args *); +int linux_io_destroy(struct thread *, struct linux_io_destroy_args *); +int linux_io_getevents(struct thread *, struct linux_io_getevents_args *); +int linux_io_submit(struct thread *, struct linux_io_submit_args *); +int linux_io_cancel(struct thread *, struct linux_io_cancel_args *); int linux_lookup_dcookie(struct thread *, struct linux_lookup_dcookie_args *); int linux_epoll_create(struct thread *, struct linux_epoll_create_args *); int linux_remap_file_pages(struct thread *, struct linux_remap_file_pages_args *); int linux_getdents64(struct thread *, struct linux_getdents64_args *); int linux_set_tid_address(struct thread *, struct linux_set_tid_address_args *); +int linux_restart_syscall(struct thread *, struct linux_restart_syscall_args *); int linux_semtimedop(struct thread *, struct linux_semtimedop_args *); int linux_fadvise64(struct thread *, struct linux_fadvise64_args *); int linux_timer_create(struct thread *, struct linux_timer_create_args *); @@ -1674,6 +1710,7 @@ int linux_io_uring_register(struct thread *, struct li #define LINUX_SYS_AUE_linux_sched_get_priority_min AUE_SCHED_GET_PRIORITY_MIN #define LINUX_SYS_AUE_linux_sched_rr_get_interval AUE_SCHED_RR_GET_INTERVAL #define LINUX_SYS_AUE_linux_vhangup AUE_NULL +#define LINUX_SYS_AUE_linux_modify_ldt AUE_NULL #define LINUX_SYS_AUE_linux_pivot_root AUE_PIVOT_ROOT #define LINUX_SYS_AUE_linux_sysctl AUE_SYSCTL #define LINUX_SYS_AUE_linux_prctl AUE_PRCTL @@ -1687,10 +1724,12 @@ int linux_io_uring_register(struct thread *, struct li #define LINUX_SYS_AUE_linux_sethostname AUE_SYSCTL #define LINUX_SYS_AUE_linux_setdomainname AUE_SYSCTL #define LINUX_SYS_AUE_linux_iopl AUE_NULL +#define LINUX_SYS_AUE_linux_ioperm AUE_NULL #define LINUX_SYS_AUE_linux_init_module AUE_NULL #define LINUX_SYS_AUE_linux_delete_module AUE_NULL #define LINUX_SYS_AUE_linux_quotactl AUE_QUOTACTL #define LINUX_SYS_AUE_linux_gettid AUE_NULL +#define LINUX_SYS_AUE_linux_readahead AUE_NULL #define LINUX_SYS_AUE_linux_setxattr AUE_NULL #define LINUX_SYS_AUE_linux_lsetxattr AUE_NULL #define LINUX_SYS_AUE_linux_fsetxattr AUE_NULL @@ -1708,11 +1747,17 @@ int linux_io_uring_register(struct thread *, struct li #define LINUX_SYS_AUE_linux_sys_futex AUE_NULL #define LINUX_SYS_AUE_linux_sched_setaffinity AUE_NULL #define LINUX_SYS_AUE_linux_sched_getaffinity AUE_NULL +#define LINUX_SYS_AUE_linux_io_setup AUE_NULL +#define LINUX_SYS_AUE_linux_io_destroy AUE_NULL +#define LINUX_SYS_AUE_linux_io_getevents AUE_NULL +#define LINUX_SYS_AUE_linux_io_submit AUE_NULL +#define LINUX_SYS_AUE_linux_io_cancel AUE_NULL #define LINUX_SYS_AUE_linux_lookup_dcookie AUE_NULL #define LINUX_SYS_AUE_linux_epoll_create AUE_NULL #define LINUX_SYS_AUE_linux_remap_file_pages AUE_NULL #define LINUX_SYS_AUE_linux_getdents64 AUE_GETDIRENTRIES #define LINUX_SYS_AUE_linux_set_tid_address AUE_NULL +#define LINUX_SYS_AUE_linux_restart_syscall AUE_NULL #define LINUX_SYS_AUE_linux_semtimedop AUE_NULL #define LINUX_SYS_AUE_linux_fadvise64 AUE_NULL #define LINUX_SYS_AUE_linux_timer_create AUE_NULL Modified: stable/12/sys/amd64/linux/linux_syscall.h ============================================================================== --- stable/12/sys/amd64/linux/linux_syscall.h Sun Aug 23 20:12:07 2020 (r364525) +++ stable/12/sys/amd64/linux/linux_syscall.h Sun Aug 23 20:14:57 2020 (r364526) @@ -158,6 +158,7 @@ #define LINUX_SYS_mlockall 151 #define LINUX_SYS_munlockall 152 #define LINUX_SYS_linux_vhangup 153 +#define LINUX_SYS_linux_modify_ldt 154 #define LINUX_SYS_linux_pivot_root 155 #define LINUX_SYS_linux_sysctl 156 #define LINUX_SYS_linux_prctl 157 @@ -176,10 +177,12 @@ #define LINUX_SYS_linux_sethostname 170 #define LINUX_SYS_linux_setdomainname 171 #define LINUX_SYS_linux_iopl 172 +#define LINUX_SYS_linux_ioperm 173 #define LINUX_SYS_linux_init_module 175 #define LINUX_SYS_linux_delete_module 176 #define LINUX_SYS_linux_quotactl 179 #define LINUX_SYS_linux_gettid 186 +#define LINUX_SYS_linux_readahead 187 #define LINUX_SYS_linux_setxattr 188 #define LINUX_SYS_linux_lsetxattr 189 #define LINUX_SYS_linux_fsetxattr 190 @@ -197,11 +200,17 @@ #define LINUX_SYS_linux_sys_futex 202 #define LINUX_SYS_linux_sched_setaffinity 203 #define LINUX_SYS_linux_sched_getaffinity 204 +#define LINUX_SYS_linux_io_setup 206 +#define LINUX_SYS_linux_io_destroy 207 +#define LINUX_SYS_linux_io_getevents 208 +#define LINUX_SYS_linux_io_submit 209 +#define LINUX_SYS_linux_io_cancel 210 #define LINUX_SYS_linux_lookup_dcookie 212 #define LINUX_SYS_linux_epoll_create 213 #define LINUX_SYS_linux_remap_file_pages 216 #define LINUX_SYS_linux_getdents64 217 #define LINUX_SYS_linux_set_tid_address 218 +#define LINUX_SYS_linux_restart_syscall 219 #define LINUX_SYS_linux_semtimedop 220 #define LINUX_SYS_linux_fadvise64 221 #define LINUX_SYS_linux_timer_create 222 Modified: stable/12/sys/amd64/linux/linux_syscalls.c ============================================================================== --- stable/12/sys/amd64/linux/linux_syscalls.c Sun Aug 23 20:12:07 2020 (r364525) +++ stable/12/sys/amd64/linux/linux_syscalls.c Sun Aug 23 20:14:57 2020 (r364526) @@ -161,7 +161,7 @@ const char *linux_syscallnames[] = { "mlockall", /* 151 = mlockall */ "munlockall", /* 152 = munlockall */ "linux_vhangup", /* 153 = linux_vhangup */ - "#154", /* 154 = modify_ldt */ + "linux_modify_ldt", /* 154 = linux_modify_ldt */ "linux_pivot_root", /* 155 = linux_pivot_root */ "linux_sysctl", /* 156 = linux_sysctl */ "linux_prctl", /* 157 = linux_prctl */ @@ -180,7 +180,7 @@ const char *linux_syscallnames[] = { "linux_sethostname", /* 170 = linux_sethostname */ "linux_setdomainname", /* 171 = linux_setdomainname */ "linux_iopl", /* 172 = linux_iopl */ - "#173", /* 173 = ioperm */ + "linux_ioperm", /* 173 = linux_ioperm */ "#174", /* 174 = create_module */ "linux_init_module", /* 175 = linux_init_module */ "linux_delete_module", /* 176 = linux_delete_module */ @@ -194,7 +194,7 @@ const char *linux_syscallnames[] = { "#184", /* 184 = tuxcall */ "#185", /* 185 = security */ "linux_gettid", /* 186 = linux_gettid */ - "#187", /* 187 = linux_readahead */ + "linux_readahead", /* 187 = linux_readahead */ "linux_setxattr", /* 188 = linux_setxattr */ "linux_lsetxattr", /* 189 = linux_lsetxattr */ "linux_fsetxattr", /* 190 = linux_fsetxattr */ @@ -213,11 +213,11 @@ const char *linux_syscallnames[] = { "linux_sched_setaffinity", /* 203 = linux_sched_setaffinity */ "linux_sched_getaffinity", /* 204 = linux_sched_getaffinity */ "#205", /* 205 = set_thread_area */ - "#206", /* 206 = linux_io_setup */ - "#207", /* 207 = linux_io_destroy */ - "#208", /* 208 = linux_io_getevents */ - "#209", /* 209 = linux_io_submit */ - "#210", /* 210 = linux_io_cancel */ + "linux_io_setup", /* 206 = linux_io_setup */ + "linux_io_destroy", /* 207 = linux_io_destroy */ + "linux_io_getevents", /* 208 = linux_io_getevents */ + "linux_io_submit", /* 209 = linux_io_submit */ + "linux_io_cancel", /* 210 = linux_io_cancel */ "#211", /* 211 = get_thread_area */ "linux_lookup_dcookie", /* 212 = linux_lookup_dcookie */ "linux_epoll_create", /* 213 = linux_epoll_create */ @@ -226,7 +226,7 @@ const char *linux_syscallnames[] = { "linux_remap_file_pages", /* 216 = linux_remap_file_pages */ "linux_getdents64", /* 217 = linux_getdents64 */ "linux_set_tid_address", /* 218 = linux_set_tid_address */ - "#219", /* 219 = restart_syscall */ + "linux_restart_syscall", /* 219 = linux_restart_syscall */ "linux_semtimedop", /* 220 = linux_semtimedop */ "linux_fadvise64", /* 221 = linux_fadvise64 */ "linux_timer_create", /* 222 = linux_timer_create */ Modified: stable/12/sys/amd64/linux/linux_sysent.c ============================================================================== --- stable/12/sys/amd64/linux/linux_sysent.c Sun Aug 23 20:12:07 2020 (r364525) +++ stable/12/sys/amd64/linux/linux_sysent.c Sun Aug 23 20:14:57 2020 (r364526) @@ -171,7 +171,7 @@ struct sysent linux_sysent[] = { { AS(mlockall_args), (sy_call_t *)sys_mlockall, AUE_MLOCKALL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 151 = mlockall */ { 0, (sy_call_t *)sys_munlockall, AUE_MUNLOCKALL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 152 = munlockall */ { 0, (sy_call_t *)linux_vhangup, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 153 = linux_vhangup */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 154 = modify_ldt */ + { 0, (sy_call_t *)linux_modify_ldt, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 154 = linux_modify_ldt */ { 0, (sy_call_t *)linux_pivot_root, AUE_PIVOT_ROOT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 155 = linux_pivot_root */ { AS(linux_sysctl_args), (sy_call_t *)linux_sysctl, AUE_SYSCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 156 = linux_sysctl */ { AS(linux_prctl_args), (sy_call_t *)linux_prctl, AUE_PRCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 157 = linux_prctl */ @@ -190,7 +190,7 @@ struct sysent linux_sysent[] = { { AS(linux_sethostname_args), (sy_call_t *)linux_sethostname, AUE_SYSCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 170 = linux_sethostname */ { AS(linux_setdomainname_args), (sy_call_t *)linux_setdomainname, AUE_SYSCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 171 = linux_setdomainname */ { AS(linux_iopl_args), (sy_call_t *)linux_iopl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 172 = linux_iopl */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 173 = ioperm */ + { 0, (sy_call_t *)linux_ioperm, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 173 = linux_ioperm */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 174 = create_module */ { 0, (sy_call_t *)linux_init_module, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 175 = linux_init_module */ { 0, (sy_call_t *)linux_delete_module, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 176 = linux_delete_module */ @@ -204,7 +204,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 184 = tuxcall */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 185 = security */ { 0, (sy_call_t *)linux_gettid, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 186 = linux_gettid */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 187 = linux_readahead */ + { 0, (sy_call_t *)linux_readahead, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 187 = linux_readahead */ { 0, (sy_call_t *)linux_setxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 188 = linux_setxattr */ { 0, (sy_call_t *)linux_lsetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 189 = linux_lsetxattr */ { 0, (sy_call_t *)linux_fsetxattr, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 190 = linux_fsetxattr */ @@ -223,11 +223,11 @@ struct sysent linux_sysent[] = { { AS(linux_sched_setaffinity_args), (sy_call_t *)linux_sched_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 203 = linux_sched_setaffinity */ { AS(linux_sched_getaffinity_args), (sy_call_t *)linux_sched_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 204 = linux_sched_getaffinity */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 205 = set_thread_area */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 206 = linux_io_setup */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 207 = linux_io_destroy */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 208 = linux_io_getevents */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 209 = linux_io_submit */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 210 = linux_io_cancel */ + { 0, (sy_call_t *)linux_io_setup, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 206 = linux_io_setup */ + { 0, (sy_call_t *)linux_io_destroy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 207 = linux_io_destroy */ + { 0, (sy_call_t *)linux_io_getevents, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 208 = linux_io_getevents */ + { 0, (sy_call_t *)linux_io_submit, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 209 = linux_io_submit */ + { 0, (sy_call_t *)linux_io_cancel, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 210 = linux_io_cancel */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 211 = get_thread_area */ { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 212 = linux_lookup_dcookie */ { AS(linux_epoll_create_args), (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 213 = linux_epoll_create */ @@ -236,7 +236,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 216 = linux_remap_file_pages */ { AS(linux_getdents64_args), (sy_call_t *)linux_getdents64, AUE_GETDIRENTRIES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 217 = linux_getdents64 */ { AS(linux_set_tid_address_args), (sy_call_t *)linux_set_tid_address, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 218 = linux_set_tid_address */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 219 = restart_syscall */ + { 0, (sy_call_t *)linux_restart_syscall, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 219 = linux_restart_syscall */ { 0, (sy_call_t *)linux_semtimedop, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 220 = linux_semtimedop */ { AS(linux_fadvise64_args), (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 221 = linux_fadvise64 */ { AS(linux_timer_create_args), (sy_call_t *)linux_timer_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 222 = linux_timer_create */ Modified: stable/12/sys/amd64/linux/linux_systrace_args.c ============================================================================== --- stable/12/sys/amd64/linux/linux_systrace_args.c Sun Aug 23 20:12:07 2020 (r364525) +++ stable/12/sys/amd64/linux/linux_systrace_args.c Sun Aug 23 20:14:57 2020 (r364526) @@ -1261,6 +1261,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 0; break; } + /* linux_modify_ldt */ + case 154: { + *n_args = 0; + break; + } /* linux_pivot_root */ case 155: { *n_args = 0; @@ -1396,6 +1401,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 1; break; } + /* linux_ioperm */ + case 173: { + *n_args = 0; + break; + } /* linux_init_module */ case 175: { *n_args = 0; @@ -1416,6 +1426,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 0; break; } + /* linux_readahead */ + case 187: { + *n_args = 0; + break; + } /* linux_setxattr */ case 188: { *n_args = 0; @@ -1521,6 +1536,31 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 3; break; } + /* linux_io_setup */ + case 206: { + *n_args = 0; + break; + } + /* linux_io_destroy */ + case 207: { + *n_args = 0; + break; + } + /* linux_io_getevents */ + case 208: { + *n_args = 0; + break; + } + /* linux_io_submit */ + case 209: { + *n_args = 0; + break; + } + /* linux_io_cancel */ + case 210: { + *n_args = 0; + break; + } /* linux_lookup_dcookie */ case 212: { *n_args = 0; @@ -1554,6 +1594,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 1; break; } + /* linux_restart_syscall */ + case 219: { + *n_args = 0; + break; + } /* linux_semtimedop */ case 220: { *n_args = 0; @@ -4559,6 +4604,9 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d /* linux_vhangup */ case 153: break; + /* linux_modify_ldt */ + case 154: + break; /* linux_pivot_root */ case 155: break; @@ -4762,6 +4810,9 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; + /* linux_ioperm */ + case 173: + break; /* linux_init_module */ case 175: break; @@ -4774,6 +4825,9 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d /* linux_gettid */ case 186: break; + /* linux_readahead */ + case 187: + break; /* linux_setxattr */ case 188: break; @@ -4890,6 +4944,21 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; + /* linux_io_setup */ + case 206: + break; + /* linux_io_destroy */ + case 207: + break; + /* linux_io_getevents */ + case 208: + break; + /* linux_io_submit */ + case 209: + break; + /* linux_io_cancel */ + case 210: + break; /* linux_lookup_dcookie */ case 212: break; @@ -4932,6 +5001,9 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; + /* linux_restart_syscall */ + case 219: + break; /* linux_semtimedop */ case 220: break; @@ -7163,6 +7235,8 @@ systrace_return_setargdesc(int sysnum, int ndx, char * case 152: /* linux_vhangup */ case 153: + /* linux_modify_ldt */ + case 154: /* linux_pivot_root */ case 155: /* linux_sysctl */ @@ -7241,6 +7315,8 @@ systrace_return_setargdesc(int sysnum, int ndx, char * if (ndx == 0 || ndx == 1) p = "int"; break; + /* linux_ioperm */ + case 173: /* linux_init_module */ case 175: /* linux_delete_module */ @@ -7249,6 +7325,8 @@ systrace_return_setargdesc(int sysnum, int ndx, char * case 179: /* linux_gettid */ case 186: + /* linux_readahead */ + case 187: /* linux_setxattr */ case 188: /* linux_lsetxattr */ @@ -7298,6 +7376,16 @@ systrace_return_setargdesc(int sysnum, int ndx, char * if (ndx == 0 || ndx == 1) p = "int"; break; + /* linux_io_setup */ + case 206: + /* linux_io_destroy */ + case 207: + /* linux_io_getevents */ + case 208: + /* linux_io_submit */ + case 209: + /* linux_io_cancel */ + case 210: /* linux_lookup_dcookie */ case 212: /* linux_epoll_create */ @@ -7317,6 +7405,8 @@ systrace_return_setargdesc(int sysnum, int ndx, char * if (ndx == 0 || ndx == 1) p = "int"; break; + /* linux_restart_syscall */ + case 219: /* linux_semtimedop */ case 220: /* linux_fadvise64 */ Modified: stable/12/sys/amd64/linux/syscalls.master ============================================================================== --- stable/12/sys/amd64/linux/syscalls.master Sun Aug 23 20:12:07 2020 (r364525) +++ stable/12/sys/amd64/linux/syscalls.master Sun Aug 23 20:14:57 2020 (r364526) @@ -304,7 +304,7 @@ 151 AUE_MLOCKALL NOPROTO { int mlockall(int how); } 152 AUE_MUNLOCKALL NOPROTO { int munlockall(void); } 153 AUE_NULL STD { int linux_vhangup(void); } -154 AUE_NULL UNIMPL modify_ldt +154 AUE_NULL STD { int linux_modify_ldt(void); } 155 AUE_PIVOT_ROOT STD { int linux_pivot_root(void); } 156 AUE_SYSCTL STD { int linux_sysctl( \ struct l___sysctl_args *args); } @@ -332,7 +332,7 @@ 171 AUE_SYSCTL STD { int linux_setdomainname(char *name, \ l_int len); } 172 AUE_NULL STD { int linux_iopl(l_uint level); } -173 AUE_NULL UNIMPL ioperm +173 AUE_NULL STD { int linux_ioperm(void); } 174 AUE_NULL UNIMPL create_module 175 AUE_NULL STD { int linux_init_module(void); } 176 AUE_NULL STD { int linux_delete_module(void); } @@ -346,7 +346,7 @@ 184 AUE_NULL UNIMPL tuxcall 185 AUE_NULL UNIMPL security 186 AUE_NULL STD { int linux_gettid(void); } -187 AUE_NULL UNIMPL linux_readahead +187 AUE_NULL STD { int linux_readahead(void); } 188 AUE_NULL STD { int linux_setxattr(void); } 189 AUE_NULL STD { int linux_lsetxattr(void); } 190 AUE_NULL STD { int linux_fsetxattr(void); } @@ -368,11 +368,11 @@ 204 AUE_NULL STD { int linux_sched_getaffinity(l_pid_t pid, l_uint len, \ l_ulong *user_mask_ptr); } 205 AUE_NULL UNIMPL set_thread_area -206 AUE_NULL UNIMPL linux_io_setup -207 AUE_NULL UNIMPL linux_io_destroy -208 AUE_NULL UNIMPL linux_io_getevents -209 AUE_NULL UNIMPL linux_io_submit -210 AUE_NULL UNIMPL linux_io_cancel +206 AUE_NULL STD { int linux_io_setup(void); } +207 AUE_NULL STD { int linux_io_destroy(void); } +208 AUE_NULL STD { int linux_io_getevents(void); } +209 AUE_NULL STD { int linux_io_submit(void); } +210 AUE_NULL STD { int linux_io_cancel(void); } 211 AUE_NULL UNIMPL get_thread_area 212 AUE_NULL STD { int linux_lookup_dcookie(void); } 213 AUE_NULL STD { int linux_epoll_create(l_int size); } @@ -382,7 +382,7 @@ 217 AUE_GETDIRENTRIES STD { int linux_getdents64(l_uint fd, \ void *dirent, l_uint count); } 218 AUE_NULL STD { int linux_set_tid_address(l_int *tidptr); } -219 AUE_NULL UNIMPL restart_syscall +219 AUE_NULL STD { int linux_restart_syscall(void); } 220 AUE_NULL STD { int linux_semtimedop(void); } 221 AUE_NULL STD { int linux_fadvise64(l_int fd, l_loff_t offset, \ l_size_t len, l_int advice); } From owner-svn-src-all@freebsd.org Sun Aug 23 20:19:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A75853C91E7; Sun, 23 Aug 2020 20:19:06 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZRRZ3ztnz4RLQ; Sun, 23 Aug 2020 20:19:06 +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 53058CFA1; Sun, 23 Aug 2020 20:19:06 +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 07NKJ6E3016128; Sun, 23 Aug 2020 20:19:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NKJ53S016121; Sun, 23 Aug 2020 20:19:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202008232019.07NKJ53S016121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 23 Aug 2020 20:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364527 - in head/sys: amd64/amd64 amd64/include amd64/linux amd64/vmm/amd amd64/vmm/intel cddl/dev/dtrace/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 amd64/include amd64/linux amd64/vmm/amd amd64/vmm/intel cddl/dev/dtrace/amd64 X-SVN-Commit-Revision: 364527 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:19:06 -0000 Author: kib Date: Sun Aug 23 20:19:04 2020 New Revision: 364527 URL: https://svnweb.freebsd.org/changeset/base/364527 Log: amd64 pmap: LA57 AKA 5-level paging Since LA57 was moved to the main SDM document with revision 072, it seems that we should have a support for it, and silicons are coming. This patch makes pmap support both LA48 and LA57 hardware. The selection of page table level is done at startup, kernel always receives control from loader with 4-level paging. It is not clear how UEFI spec would adapt LA57, for instance it could hand out control in LA57 mode sometimes. To switch from LA48 to LA57 requires turning off long mode, requesting LA57 in CR4, then re-entering long mode. This is somewhat delicate and done in pmap_bootstrap_la57(). AP startup in LA57 mode is much easier, we only need to toggle a bit in CR4 and load right value in CR3. I decided to not change kernel map for now. Single PML5 entry is created that points to the existing kernel_pml4 (KML4Phys) page, and a pml5 entry to create our recursive mapping for vtopte()/vtopde(). This decision is motivated by the fact that we cannot overcommit for KVA, so large space there is unusable until machines start providing wider physical memory addressing. Another reason is that I do not want to break our fragile autotuning, so the KVA expansion is not included into this first step. Nice side effect is that minidumps are compatible. On the other hand, (very) large address space is definitely immediately useful for some userspace applications. For userspace, numbering of pte entries (or page table pages) is always done for 5-level structures even if we operate in 4-level mode. The pmap_is_la57() function is added to report the mode of the specified pmap, this is done not to allow simultaneous 4-/5-levels (which is not allowed by hw), but to accomodate for EPT which has separate level control and in principle might not allow 5-leve EPT despite x86 paging supports it. Anyway, it does not seems critical to have 5-level EPT support now. Tested by: pho (LA48 hardware) Reviewed by: alc Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25273 Modified: head/sys/amd64/amd64/elf_machdep.c head/sys/amd64/amd64/genassym.c head/sys/amd64/amd64/locore.S head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/amd64/mpboot.S head/sys/amd64/amd64/pmap.c head/sys/amd64/include/md_var.h head/sys/amd64/include/param.h head/sys/amd64/include/pmap.h head/sys/amd64/include/proc.h head/sys/amd64/include/vmparam.h head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/vmm/amd/svm.c head/sys/amd64/vmm/intel/vmx.c head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Modified: head/sys/amd64/amd64/elf_machdep.c ============================================================================== --- head/sys/amd64/amd64/elf_machdep.c Sun Aug 23 20:14:57 2020 (r364526) +++ head/sys/amd64/amd64/elf_machdep.c Sun Aug 23 20:19:04 2020 (r364527) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include -struct sysentvec elf64_freebsd_sysvec = { +struct sysentvec elf64_freebsd_sysvec_la48 = { .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, .sv_errsize = 0, @@ -64,9 +64,9 @@ struct sysentvec elf64_freebsd_sysvec = { .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, - .sv_maxuser = VM_MAXUSER_ADDRESS, - .sv_usrstack = USRSTACK, - .sv_psstrings = PS_STRINGS, + .sv_maxuser = VM_MAXUSER_ADDRESS_LA48, + .sv_usrstack = USRSTACK_LA48, + .sv_psstrings = PS_STRINGS_LA48, .sv_stackprot = VM_PROT_ALL, .sv_copyout_auxargs = __elfN(freebsd_copyout_auxargs), .sv_copyout_strings = exec_copyout_strings, @@ -78,15 +78,65 @@ struct sysentvec elf64_freebsd_sysvec = { .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, - .sv_shared_page_base = SHAREDPAGE, + .sv_shared_page_base = SHAREDPAGE_LA48, .sv_shared_page_len = PAGE_SIZE, .sv_schedtail = NULL, .sv_thread_detach = NULL, .sv_trap = NULL, .sv_stackgap = elf64_stackgap, }; -INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec); +struct sysentvec elf64_freebsd_sysvec_la57 = { + .sv_size = SYS_MAXSYSCALL, + .sv_table = sysent, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = __elfN(freebsd_fixup), + .sv_sendsig = sendsig, + .sv_sigcode = sigcode, + .sv_szsigcode = &szsigcode, + .sv_name = "FreeBSD ELF64", + .sv_coredump = __elfN(coredump), + .sv_imgact_try = NULL, + .sv_minsigstksz = MINSIGSTKSZ, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS_LA57, + .sv_usrstack = USRSTACK_LA57, + .sv_psstrings = PS_STRINGS_LA57, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_auxargs = __elfN(freebsd_copyout_auxargs), + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL, + .sv_flags = SV_ABI_FREEBSD | SV_ASLR | SV_LP64 | SV_SHP | + SV_TIMEKEEP, + .sv_set_syscall_retval = cpu_set_syscall_retval, + .sv_fetch_syscall_args = cpu_fetch_syscall_args, + .sv_syscallnames = syscallnames, + .sv_shared_page_base = SHAREDPAGE_LA57, + .sv_shared_page_len = PAGE_SIZE, + .sv_schedtail = NULL, + .sv_thread_detach = NULL, + .sv_trap = NULL, + .sv_stackgap = elf64_stackgap, +}; + +static void +amd64_init_sysvecs(void *arg) +{ + amd64_lower_shared_page(&elf64_freebsd_sysvec_la48); + if (la57) { + exec_sysvec_init(&elf64_freebsd_sysvec_la57); + exec_sysvec_init_secondary(&elf64_freebsd_sysvec_la57, + &elf64_freebsd_sysvec_la48); + } else { + exec_sysvec_init(&elf64_freebsd_sysvec_la48); + } +} +SYSINIT(elf64_sysvec, SI_SUB_EXEC, SI_ORDER_ANY, amd64_init_sysvecs, NULL); + void amd64_lower_shared_page(struct sysentvec *sv) { @@ -98,29 +148,57 @@ amd64_lower_shared_page(struct sysentvec *sv) } } -/* - * Do this fixup before INIT_SYSENTVEC (SI_ORDER_ANY) because the latter - * uses the value of sv_shared_page_base. - */ -SYSINIT(elf64_sysvec_fixup, SI_SUB_EXEC, SI_ORDER_FIRST, - (sysinit_cfunc_t) amd64_lower_shared_page, - &elf64_freebsd_sysvec); +static boolean_t +freebsd_brand_info_la57_img_compat(struct image_params *imgp, + int32_t *osrel __unused, uint32_t *fctl0) +{ + if ((imgp->proc->p_md.md_flags & P_MD_LA57) != 0) + return (TRUE); + if (fctl0 == NULL || (*fctl0 & NT_FREEBSD_FCTL_LA48) != 0) + return (FALSE); + if ((imgp->proc->p_md.md_flags & P_MD_LA48) != 0) + return (FALSE); + return (TRUE); +} -static Elf64_Brandinfo freebsd_brand_info = { +static Elf64_Brandinfo freebsd_brand_info_la48 = { .brand = ELFOSABI_FREEBSD, .machine = EM_X86_64, .compat_3_brand = "FreeBSD", .emul_path = NULL, .interp_path = "/libexec/ld-elf.so.1", - .sysvec = &elf64_freebsd_sysvec, + .sysvec = &elf64_freebsd_sysvec_la48, .interp_newpath = NULL, .brand_note = &elf64_freebsd_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE, }; +static Elf64_Brandinfo freebsd_brand_info_la57 = { + .brand = ELFOSABI_FREEBSD, + .machine = EM_X86_64, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/libexec/ld-elf.so.1", + .sysvec = &elf64_freebsd_sysvec_la57, + .interp_newpath = NULL, + .brand_note = &elf64_freebsd_brandnote, + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE, + .header_supported = freebsd_brand_info_la57_img_compat, +}; + +static void +sysinit_register_elf64_brand_entries(void *arg __unused) +{ + /* + * _57 must go first so it can either claim the image or hand + * it to _48. + */ + if (la57) + elf64_insert_brand_entry(&freebsd_brand_info_la57); + elf64_insert_brand_entry(&freebsd_brand_info_la48); +} SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST, - (sysinit_cfunc_t) elf64_insert_brand_entry, - &freebsd_brand_info); + sysinit_register_elf64_brand_entries, NULL); static Elf64_Brandinfo freebsd_brand_oinfo = { .brand = ELFOSABI_FREEBSD, @@ -128,15 +206,14 @@ static Elf64_Brandinfo freebsd_brand_oinfo = { .compat_3_brand = "FreeBSD", .emul_path = NULL, .interp_path = "/usr/libexec/ld-elf.so.1", - .sysvec = &elf64_freebsd_sysvec, + .sysvec = &elf64_freebsd_sysvec_la48, .interp_newpath = NULL, .brand_note = &elf64_freebsd_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE }; SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, - (sysinit_cfunc_t) elf64_insert_brand_entry, - &freebsd_brand_oinfo); + (sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_oinfo); static Elf64_Brandinfo kfreebsd_brand_info = { .brand = ELFOSABI_FREEBSD, @@ -144,15 +221,14 @@ static Elf64_Brandinfo kfreebsd_brand_info = { .compat_3_brand = "FreeBSD", .emul_path = NULL, .interp_path = "/lib/ld-kfreebsd-x86-64.so.1", - .sysvec = &elf64_freebsd_sysvec, + .sysvec = &elf64_freebsd_sysvec_la48, .interp_newpath = NULL, .brand_note = &elf64_kfreebsd_brandnote, .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE_MANDATORY }; SYSINIT(kelf64, SI_SUB_EXEC, SI_ORDER_ANY, - (sysinit_cfunc_t) elf64_insert_brand_entry, - &kfreebsd_brand_info); + (sysinit_cfunc_t)elf64_insert_brand_entry, &kfreebsd_brand_info); void elf64_dump_thread(struct thread *td, void *dst, size_t *off) Modified: head/sys/amd64/amd64/genassym.c ============================================================================== --- head/sys/amd64/amd64/genassym.c Sun Aug 23 20:14:57 2020 (r364526) +++ head/sys/amd64/amd64/genassym.c Sun Aug 23 20:19:04 2020 (r364527) @@ -99,11 +99,10 @@ ASSYM(TDP_KTHREAD, TDP_KTHREAD); ASSYM(PAGE_SIZE, PAGE_SIZE); ASSYM(NPTEPG, NPTEPG); ASSYM(NPDEPG, NPDEPG); -ASSYM(addr_PTmap, addr_PTmap); -ASSYM(addr_PDmap, addr_PDmap); -ASSYM(addr_PDPmap, addr_PDPmap); -ASSYM(addr_PML4map, addr_PML4map); -ASSYM(addr_PML4pml4e, addr_PML4pml4e); +ASSYM(addr_P4Tmap, addr_P4Tmap); +ASSYM(addr_P4Dmap, addr_P4Dmap); +ASSYM(addr_P5Tmap, addr_P5Tmap); +ASSYM(addr_P5Dmap, addr_P5Dmap); ASSYM(PDESIZE, sizeof(pd_entry_t)); ASSYM(PTESIZE, sizeof(pt_entry_t)); ASSYM(PAGE_SHIFT, PAGE_SHIFT); Modified: head/sys/amd64/amd64/locore.S ============================================================================== --- head/sys/amd64/amd64/locore.S Sun Aug 23 20:14:57 2020 (r364526) +++ head/sys/amd64/amd64/locore.S Sun Aug 23 20:19:04 2020 (r364527) @@ -36,13 +36,8 @@ /* * Compiled KERNBASE location */ - .globl kernbase,loc_PTmap,loc_PDmap,loc_PDPmap,loc_PML4map,loc_PML4pml4e,dmapbase,dmapend + .globl kernbase, loc_PTmap, loc_PDmap, loc_PDPmap, dmapbase, dmapend .set kernbase,KERNBASE - .set loc_PTmap,addr_PTmap - .set loc_PDmap,addr_PDmap - .set loc_PDPmap,addr_PDPmap - .set loc_PML4map,addr_PML4map - .set loc_PML4pml4e,addr_PML4pml4e .set dmapbase,DMAP_MIN_ADDRESS .set dmapend,DMAP_MAX_ADDRESS @@ -81,6 +76,62 @@ NON_GPROF_ENTRY(btext) call mi_startup /* autoconfiguration, mountroot etc */ 0: hlt jmp 0b + +/* la57_trampoline(%rdi pml5) */ +NON_GPROF_ENTRY(la57_trampoline) + movq %rsp,%r11 + movq %rbx,%r10 + leaq la57_trampoline_end(%rip),%rsp + + movq %cr0,%rdx + lgdtq la57_trampoline_gdt_desc(%rip) + + pushq $(2<<3) + leaq l1(%rip),%rax + leaq l2(%rip),%rbx + + pushq %rax + lretq + .code32 + +l1: movl $(3<<3),%eax + movl %eax,%ss + + movl %edx,%eax + andl $~CR0_PG,%eax + movl %eax,%cr0 + + movl %cr4,%eax + orl $CR4_LA57,%eax + movl %eax,%cr4 + + movl %edi,%cr3 + movl %edx,%cr0 + + pushl $(1<<3) + pushl %ebx + lretl + .code64 + +l2: movq %r11,%rsp + movq %r10,%rbx + retq + .p2align 4,0 +NON_GPROF_ENTRY(la57_trampoline_gdt_desc) + .word la57_trampoline_end - la57_trampoline_gdt + .long 0 /* filled by pmap_bootstrap_la57 */ + .p2align 4,0 +NON_GPROF_ENTRY(la57_trampoline_gdt) + .long 0x00000000 /* null desc */ + .long 0x00000000 + .long 0x00000000 /* 64bit code */ + .long 0x00209800 + .long 0x0000ffff /* 32bit code */ + .long 0x00cf9b00 + .long 0x0000ffff /* universal data */ + .long 0x00cf9300 + .dcb.l 16,0 +NON_GPROF_ENTRY(la57_trampoline_end) .bss ALIGN_DATA /* just to be sure */ Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Sun Aug 23 20:14:57 2020 (r364526) +++ head/sys/amd64/amd64/mp_machdep.c Sun Aug 23 20:19:04 2020 (r364527) @@ -96,7 +96,7 @@ __FBSDID("$FreeBSD$"); #define GiB(v) (v ## ULL << 30) -#define AP_BOOTPT_SZ (PAGE_SIZE * 3) +#define AP_BOOTPT_SZ (PAGE_SIZE * 4) /* Temporary variables for init_secondary() */ char *doublefault_stack; @@ -104,6 +104,8 @@ char *mce_stack; char *nmi_stack; char *dbg_stack; +extern u_int mptramp_la57; + /* * Local data and functions. */ @@ -240,6 +242,8 @@ cpu_mp_start(void) assign_cpu_ids(); + mptramp_la57 = la57; + /* Start each Application Processor */ init_ops.start_all_aps(); @@ -395,9 +399,9 @@ mp_realloc_pcpu(int cpuid, int domain) int native_start_all_aps(void) { - u_int64_t *pt4, *pt3, *pt2; + u_int64_t *pt5, *pt4, *pt3, *pt2; u_int32_t mpbioswarmvec; - int apic_id, cpu, domain, i; + int apic_id, cpu, domain, i, xo; u_char mpbiosreason; mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN); @@ -406,18 +410,38 @@ native_start_all_aps(void) bcopy(mptramp_start, (void *)PHYS_TO_DMAP(boot_address), bootMP_size); /* Locate the page tables, they'll be below the trampoline */ - pt4 = (uint64_t *)PHYS_TO_DMAP(mptramp_pagetables); + if (la57) { + pt5 = (uint64_t *)PHYS_TO_DMAP(mptramp_pagetables); + xo = 1; + } else { + xo = 0; + } + pt4 = (uint64_t *)PHYS_TO_DMAP(mptramp_pagetables + xo * PAGE_SIZE); pt3 = pt4 + (PAGE_SIZE) / sizeof(u_int64_t); pt2 = pt3 + (PAGE_SIZE) / sizeof(u_int64_t); /* Create the initial 1GB replicated page tables */ for (i = 0; i < 512; i++) { - /* Each slot of the level 4 pages points to the same level 3 page */ - pt4[i] = (u_int64_t)(uintptr_t)(mptramp_pagetables + PAGE_SIZE); + if (la57) { + pt5[i] = (u_int64_t)(uintptr_t)(mptramp_pagetables + + PAGE_SIZE); + pt5[i] |= PG_V | PG_RW | PG_U; + } + + /* + * Each slot of the level 4 pages points to the same + * level 3 page. + */ + pt4[i] = (u_int64_t)(uintptr_t)(mptramp_pagetables + + (xo + 1) * PAGE_SIZE); pt4[i] |= PG_V | PG_RW | PG_U; - /* Each slot of the level 3 pages points to the same level 2 page */ - pt3[i] = (u_int64_t)(uintptr_t)(mptramp_pagetables + (2 * PAGE_SIZE)); + /* + * Each slot of the level 3 pages points to the same + * level 2 page. + */ + pt3[i] = (u_int64_t)(uintptr_t)(mptramp_pagetables + + ((xo + 2) * PAGE_SIZE)); pt3[i] |= PG_V | PG_RW | PG_U; /* The level 2 page slots are mapped with 2MB pages for 1GB. */ Modified: head/sys/amd64/amd64/mpboot.S ============================================================================== --- head/sys/amd64/amd64/mpboot.S Sun Aug 23 20:14:57 2020 (r364526) +++ head/sys/amd64/amd64/mpboot.S Sun Aug 23 20:19:04 2020 (r364527) @@ -90,10 +90,16 @@ protmode: mov $bootdata-gdt, %eax mov %ax, %ds - /* Turn on the PAE bit for when paging is enabled */ + /* + * Turn on the PAE bit and optionally the LA57 bit for when paging + * is later enabled. + */ mov %cr4, %eax orl $CR4_PAE, %eax - mov %eax, %cr4 + cmpb $0, mptramp_la57-mptramp_start(%ebx) + je 1f + orl $CR4_LA57, %eax +1: mov %eax, %cr4 /* * Enable EFER.LME so that we get long mode when all the prereqs are @@ -132,9 +138,9 @@ protmode: /* * At this point paging is enabled, and we are in "compatibility" mode. * We do another far jump to reload %cs with the 64 bit selector. - * %cr3 points to a 4-level page table page. + * %cr3 points to a 4- or 5-level page table. * We cannot yet jump all the way to the kernel because we can only - * specify a 32 bit linear address. So, yet another trampoline. + * specify a 32 bit linear address. So, we use yet another trampoline. * * The following instruction is: * ljmp $kernelcode-gdt, $tramp_64-mptramp_start @@ -209,6 +215,11 @@ gdtend: mptramp_pagetables: .long 0 + /* 5-level paging ? */ + .globl mptramp_la57 +mptramp_la57: + .long 0 + /* * The pseudo descriptor for lgdt to use. */ @@ -251,8 +262,12 @@ entry_64: * Load a real %cr3 that has all the direct map stuff and switches * off the 1GB replicated mirror. Load a stack pointer and jump * into AP startup code in C. - */ + */ + cmpl $0, la57 + jne 2f movq KPML4phys, %rax - movq %rax, %cr3 + jmp 3f +2: movq KPML5phys, %rax +3: movq %rax, %cr3 movq bootSTK, %rsp jmp init_secondary Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sun Aug 23 20:14:57 2020 (r364526) +++ head/sys/amd64/amd64/pmap.c Sun Aug 23 20:19:04 2020 (r364527) @@ -398,6 +398,19 @@ static int pg_ps_enabled = 1; SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &pg_ps_enabled, 0, "Are large page mappings enabled?"); +int __read_frequently la57 = 0; +SYSCTL_INT(_vm_pmap, OID_AUTO, la57, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &la57, 0, + "5-level paging for host is enabled"); + +static bool +pmap_is_la57(pmap_t pmap) +{ + if (pmap->pm_type == PT_X86) + return (la57); + return (false); /* XXXKIB handle EPT */ +} + #define PAT_INDEX_SIZE 8 static int pat_index[PAT_INDEX_SIZE]; /* cache mode to PAT index conversion */ @@ -405,7 +418,10 @@ static u_int64_t KPTphys; /* phys addr of kernel level static u_int64_t KPDphys; /* phys addr of kernel level 2 */ u_int64_t KPDPphys; /* phys addr of kernel level 3 */ u_int64_t KPML4phys; /* phys addr of kernel level 4 */ +u_int64_t KPML5phys; /* phys addr of kernel level 5, + if supported */ +static pml4_entry_t *kernel_pml4; static u_int64_t DMPDphys; /* phys addr of direct mapped level 2 */ static u_int64_t DMPDPphys; /* phys addr of direct mapped level 3 */ static int ndmpdpphys; /* number of DMPDPphys pages */ @@ -1257,7 +1273,7 @@ static void pmap_update_pde(pmap_t pmap, vm_offset_t v static void pmap_update_pde_invalidate(pmap_t, vm_offset_t va, pd_entry_t pde); static vm_page_t _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, - struct rwlock **lockp); + struct rwlock **lockp, vm_offset_t va); static pd_entry_t *pmap_alloc_pde(pmap_t pmap, vm_offset_t va, vm_page_t *pdpgp, struct rwlock **lockp); static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, @@ -1271,22 +1287,87 @@ static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry /* Inline functions */ /********************/ -/* Return a non-clipped PD index for a given VA */ +/* + * Return a non-clipped indexes for a given VA, which are page table + * pages indexes at the corresponding level. + */ static __inline vm_pindex_t pmap_pde_pindex(vm_offset_t va) { return (va >> PDRSHIFT); } +static __inline vm_pindex_t +pmap_pdpe_pindex(vm_offset_t va) +{ + return (NUPDE + (va >> PDPSHIFT)); +} +static __inline vm_pindex_t +pmap_pml4e_pindex(vm_offset_t va) +{ + return (NUPDE + NUPDPE + (va >> PML4SHIFT)); +} + +static __inline vm_pindex_t +pmap_pml5e_pindex(vm_offset_t va) +{ + return (NUPDE + NUPDPE + NUPML4E + (va >> PML5SHIFT)); +} + +static __inline pml4_entry_t * +pmap_pml5e(pmap_t pmap, vm_offset_t va) +{ + + MPASS(pmap_is_la57(pmap)); + return (&pmap->pm_pmltop[pmap_pml5e_index(va)]); +} + +static __inline pml4_entry_t * +pmap_pml5e_u(pmap_t pmap, vm_offset_t va) +{ + + MPASS(pmap_is_la57(pmap)); + return (&pmap->pm_pmltopu[pmap_pml5e_index(va)]); +} + +static __inline pml4_entry_t * +pmap_pml5e_to_pml4e(pml5_entry_t *pml5e, vm_offset_t va) +{ + pml4_entry_t *pml4e; + + /* XXX MPASS(pmap_is_la57(pmap); */ + pml4e = (pml4_entry_t *)PHYS_TO_DMAP(*pml5e & PG_FRAME); + return (&pml4e[pmap_pml4e_index(va)]); +} + /* Return a pointer to the PML4 slot that corresponds to a VA */ static __inline pml4_entry_t * pmap_pml4e(pmap_t pmap, vm_offset_t va) { + pml5_entry_t *pml5e; + pml4_entry_t *pml4e; + pt_entry_t PG_V; - return (&pmap->pm_pml4[pmap_pml4e_index(va)]); + if (pmap_is_la57(pmap)) { + pml5e = pmap_pml5e(pmap, va); + PG_V = pmap_valid_bit(pmap); + if ((*pml5e & PG_V) == 0) + return (NULL); + pml4e = (pml4_entry_t *)PHYS_TO_DMAP(*pml5e & PG_FRAME); + } else { + pml4e = pmap->pm_pmltop; + } + return (&pml4e[pmap_pml4e_index(va)]); } +static __inline pml4_entry_t * +pmap_pml4e_u(pmap_t pmap, vm_offset_t va) +{ + MPASS(!pmap_is_la57(pmap)); + return (&pmap->pm_pmltopu[pmap_pml4e_index(va)]); +} + /* Return a pointer to the PDP slot that corresponds to a VA */ static __inline pdp_entry_t * pmap_pml4e_to_pdpe(pml4_entry_t *pml4e, vm_offset_t va) @@ -1306,7 +1387,7 @@ pmap_pdpe(pmap_t pmap, vm_offset_t va) PG_V = pmap_valid_bit(pmap); pml4e = pmap_pml4e(pmap, va); - if ((*pml4e & PG_V) == 0) + if (pml4e == NULL || (*pml4e & PG_V) == 0) return (NULL); return (pmap_pml4e_to_pdpe(pml4e, va)); } @@ -1387,21 +1468,37 @@ pmap_resident_count_dec(pmap_t pmap, int count) PMAP_INLINE pt_entry_t * vtopte(vm_offset_t va) { - u_int64_t mask = ((1ul << (NPTEPGSHIFT + NPDEPGSHIFT + NPDPEPGSHIFT + NPML4EPGSHIFT)) - 1); + u_int64_t mask; KASSERT(va >= VM_MAXUSER_ADDRESS, ("vtopte on a uva/gpa 0x%0lx", va)); - return (PTmap + ((va >> PAGE_SHIFT) & mask)); + if (la57) { + mask = ((1ul << (NPTEPGSHIFT + NPDEPGSHIFT + NPDPEPGSHIFT + + NPML4EPGSHIFT + NPML5EPGSHIFT)) - 1); + return (P5Tmap + ((va >> PAGE_SHIFT) & mask)); + } else { + mask = ((1ul << (NPTEPGSHIFT + NPDEPGSHIFT + NPDPEPGSHIFT + + NPML4EPGSHIFT)) - 1); + return (P4Tmap + ((va >> PAGE_SHIFT) & mask)); + } } static __inline pd_entry_t * vtopde(vm_offset_t va) { - u_int64_t mask = ((1ul << (NPDEPGSHIFT + NPDPEPGSHIFT + NPML4EPGSHIFT)) - 1); + u_int64_t mask; KASSERT(va >= VM_MAXUSER_ADDRESS, ("vtopde on a uva/gpa 0x%0lx", va)); - return (PDmap + ((va >> PDRSHIFT) & mask)); + if (la57) { + mask = ((1ul << (NPDEPGSHIFT + NPDPEPGSHIFT + + NPML4EPGSHIFT + NPML5EPGSHIFT)) - 1); + return (P5Dmap + ((va >> PDRSHIFT) & mask)); + } else { + mask = ((1ul << (NPDEPGSHIFT + NPDPEPGSHIFT + + NPML4EPGSHIFT)) - 1); + return (P4Dmap + ((va >> PDRSHIFT) & mask)); + } } static u_int64_t @@ -1658,6 +1755,8 @@ create_pagetables(vm_paddr_t *firstaddr) p4_p[KPML4BASE + i] = KPDPphys + ptoa(i); p4_p[KPML4BASE + i] |= X86_PG_RW | X86_PG_V; } + + kernel_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(KPML4phys); } /* @@ -1730,7 +1829,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) * later unmapped (using pmap_remove()) and freed. */ PMAP_LOCK_INIT(kernel_pmap); - kernel_pmap->pm_pml4 = (pdp_entry_t *)PHYS_TO_DMAP(KPML4phys); + kernel_pmap->pm_pmltop = kernel_pml4; kernel_pmap->pm_cr3 = KPML4phys; kernel_pmap->pm_ucr3 = PMAP_NO_CR3; CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ @@ -1891,6 +1990,148 @@ pmap_init_pat(void) load_cr4(cr4); } +extern const char la57_trampoline[], la57_trampoline_gdt_desc[], + la57_trampoline_gdt[], la57_trampoline_end[]; + +static void +pmap_bootstrap_la57(void *arg __unused) +{ + char *v_code; + pml5_entry_t *v_pml5; + pml4_entry_t *v_pml4; + pdp_entry_t *v_pdp; + pd_entry_t *v_pd; + pt_entry_t *v_pt; + vm_page_t m_code, m_pml4, m_pdp, m_pd, m_pt, m_pml5; + void (*la57_tramp)(uint64_t pml5); + struct region_descriptor r_gdt; + + if ((cpu_stdext_feature2 & CPUID_STDEXT2_LA57) == 0) + return; + if (!TUNABLE_INT_FETCH("vm.pmap.la57", &la57)) + la57 = 1; + if (!la57) + return; + + r_gdt.rd_limit = NGDT * sizeof(struct user_segment_descriptor) - 1; + r_gdt.rd_base = (long)__pcpu[0].pc_gdt; + + m_code = vm_page_alloc_contig(NULL, 0, + VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | VM_ALLOC_ZERO | VM_ALLOC_NOOBJ, + 1, 0, (1ULL << 32), PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + if ((m_code->flags & PG_ZERO) == 0) + pmap_zero_page(m_code); + v_code = (char *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m_code)); + m_pml5 = vm_page_alloc_contig(NULL, 0, + VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | VM_ALLOC_ZERO | VM_ALLOC_NOOBJ, + 1, 0, (1ULL << 32), PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + if ((m_pml5->flags & PG_ZERO) == 0) + pmap_zero_page(m_pml5); + KPML5phys = VM_PAGE_TO_PHYS(m_pml5); + v_pml5 = (pml5_entry_t *)PHYS_TO_DMAP(KPML5phys); + m_pml4 = vm_page_alloc_contig(NULL, 0, + VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | VM_ALLOC_ZERO | VM_ALLOC_NOOBJ, + 1, 0, (1ULL << 32), PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + if ((m_pml4->flags & PG_ZERO) == 0) + pmap_zero_page(m_pml4); + v_pml4 = (pdp_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m_pml4)); + m_pdp = vm_page_alloc_contig(NULL, 0, + VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | VM_ALLOC_ZERO | VM_ALLOC_NOOBJ, + 1, 0, (1ULL << 32), PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + if ((m_pdp->flags & PG_ZERO) == 0) + pmap_zero_page(m_pdp); + v_pdp = (pdp_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m_pdp)); + m_pd = vm_page_alloc_contig(NULL, 0, + VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | VM_ALLOC_ZERO | VM_ALLOC_NOOBJ, + 1, 0, (1ULL << 32), PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + if ((m_pd->flags & PG_ZERO) == 0) + pmap_zero_page(m_pd); + v_pd = (pdp_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m_pd)); + m_pt = vm_page_alloc_contig(NULL, 0, + VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY | VM_ALLOC_ZERO | VM_ALLOC_NOOBJ, + 1, 0, (1ULL << 32), PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + if ((m_pt->flags & PG_ZERO) == 0) + pmap_zero_page(m_pt); + v_pt = (pt_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m_pt)); + + /* + * Map m_code 1:1, it appears below 4G in KVA due to physical + * address being below 4G. Since kernel KVA is in upper half, + * the pml4e should be zero and free for temporary use. + */ + kernel_pmap->pm_pmltop[pmap_pml4e_index(VM_PAGE_TO_PHYS(m_code))] = + VM_PAGE_TO_PHYS(m_pdp) | X86_PG_V | X86_PG_RW | X86_PG_A | + X86_PG_M; + v_pdp[pmap_pdpe_index(VM_PAGE_TO_PHYS(m_code))] = + VM_PAGE_TO_PHYS(m_pd) | X86_PG_V | X86_PG_RW | X86_PG_A | + X86_PG_M; + v_pd[pmap_pde_index(VM_PAGE_TO_PHYS(m_code))] = + VM_PAGE_TO_PHYS(m_pt) | X86_PG_V | X86_PG_RW | X86_PG_A | + X86_PG_M; + v_pt[pmap_pte_index(VM_PAGE_TO_PHYS(m_code))] = + VM_PAGE_TO_PHYS(m_code) | X86_PG_V | X86_PG_RW | X86_PG_A | + X86_PG_M; + + /* + * Add pml5 entry at top of KVA pointing to existing pml4 table, + * entering all existing kernel mappings into level 5 table. + */ + v_pml5[pmap_pml5e_index(UPT_MAX_ADDRESS)] = KPML4phys | X86_PG_V | + X86_PG_RW | X86_PG_A | X86_PG_M | pg_g; + + /* + * Add pml5 entry for 1:1 trampoline mapping after LA57 is turned on. + */ + v_pml5[pmap_pml5e_index(VM_PAGE_TO_PHYS(m_code))] = + VM_PAGE_TO_PHYS(m_pml4) | X86_PG_V | X86_PG_RW | X86_PG_A | + X86_PG_M; + v_pml4[pmap_pml4e_index(VM_PAGE_TO_PHYS(m_code))] = + VM_PAGE_TO_PHYS(m_pdp) | X86_PG_V | X86_PG_RW | X86_PG_A | + X86_PG_M; + + /* + * Copy and call the 48->57 trampoline, hope we return there, alive. + */ + bcopy(la57_trampoline, v_code, la57_trampoline_end - la57_trampoline); + *(u_long *)(v_code + 2 + (la57_trampoline_gdt_desc - la57_trampoline)) = + la57_trampoline_gdt - la57_trampoline + VM_PAGE_TO_PHYS(m_code); + la57_tramp = (void (*)(uint64_t))VM_PAGE_TO_PHYS(m_code); + la57_tramp(KPML5phys); + + /* + * gdt was necessary reset, switch back to our gdt. + */ + lgdt(&r_gdt); + wrmsr(MSR_GSBASE, (uint64_t)&__pcpu[0]); + load_ds(_udatasel); + load_es(_udatasel); + load_fs(_ufssel); + ssdtosyssd(&gdt_segs[GPROC0_SEL], + (struct system_segment_descriptor *)&__pcpu[0].pc_gdt[GPROC0_SEL]); + ltr(GSEL(GPROC0_SEL, SEL_KPL)); + + /* + * Now unmap the trampoline, and free the pages. + * Clear pml5 entry used for 1:1 trampoline mapping. + */ + pte_clear(&v_pml5[pmap_pml5e_index(VM_PAGE_TO_PHYS(m_code))]); + invlpg((vm_offset_t)v_code); + vm_page_free(m_code); + vm_page_free(m_pdp); + vm_page_free(m_pd); + vm_page_free(m_pt); + + /* + * Recursively map PML5 to itself in order to get PTmap and + * PDmap. + */ + v_pml5[PML5PML5I] = KPML5phys | X86_PG_RW | X86_PG_V | pg_nx; + + kernel_pmap->pm_cr3 = KPML5phys; + kernel_pmap->pm_pmltop = v_pml5; +} +SYSINIT(la57, SI_SUB_KMEM, SI_ORDER_ANY, pmap_bootstrap_la57, NULL); + /* * Initialize a vm_page's machine-dependent fields. */ @@ -2190,7 +2431,8 @@ pmap_init(void) } for (i = 0; i < lm_ents; i++) { m = pmap_large_map_getptp_unlocked(); - kernel_pmap->pm_pml4[LMSPML4I + i] = X86_PG_V | + /* XXXKIB la57 */ + kernel_pml4[LMSPML4I + i] = X86_PG_V | X86_PG_RW | X86_PG_A | X86_PG_M | pg_nx | VM_PAGE_TO_PHYS(m); } @@ -3566,44 +3808,57 @@ pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t static void _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free) { + pml5_entry_t *pml5; + pml4_entry_t *pml4; + pdp_entry_t *pdp; + pd_entry_t *pd; + vm_page_t pdpg, pdppg, pml4pg; PMAP_LOCK_ASSERT(pmap, MA_OWNED); + /* * unmap the page table page */ - if (m->pindex >= NUPDE + NUPDPE) { + if (m->pindex >= NUPDE + NUPDPE + NUPML4E) { + /* PML4 page */ + MPASS(pmap_is_la57(pmap)); + pml5 = pmap_pml5e(pmap, va); + *pml5 = 0; + if (pmap->pm_pmltopu != NULL && va <= VM_MAXUSER_ADDRESS) { + pml5 = pmap_pml5e_u(pmap, va); + *pml5 = 0; + } + } else if (m->pindex >= NUPDE + NUPDPE) { /* PDP page */ - pml4_entry_t *pml4; pml4 = pmap_pml4e(pmap, va); *pml4 = 0; - if (pmap->pm_pml4u != NULL && va <= VM_MAXUSER_ADDRESS) { - pml4 = &pmap->pm_pml4u[pmap_pml4e_index(va)]; + if (!pmap_is_la57(pmap) && pmap->pm_pmltopu != NULL && + va <= VM_MAXUSER_ADDRESS) { + pml4 = pmap_pml4e_u(pmap, va); *pml4 = 0; } } else if (m->pindex >= NUPDE) { /* PD page */ - pdp_entry_t *pdp; pdp = pmap_pdpe(pmap, va); *pdp = 0; } else { /* PTE page */ - pd_entry_t *pd; pd = pmap_pde(pmap, va); *pd = 0; } pmap_resident_count_dec(pmap, 1); if (m->pindex < NUPDE) { /* We just released a PT, unhold the matching PD */ - vm_page_t pdpg; - pdpg = PHYS_TO_VM_PAGE(*pmap_pdpe(pmap, va) & PG_FRAME); pmap_unwire_ptp(pmap, va, pdpg, free); } else if (m->pindex < NUPDE + NUPDPE) { /* We just released a PD, unhold the matching PDP */ - vm_page_t pdppg; - pdppg = PHYS_TO_VM_PAGE(*pmap_pml4e(pmap, va) & PG_FRAME); pmap_unwire_ptp(pmap, va, pdppg, free); + } else if (m->pindex < NUPDE + NUPDPE + NUPML4E && pmap_is_la57(pmap)) { + /* We just released a PDP, unhold the matching PML4 */ + pml4pg = PHYS_TO_VM_PAGE(*pmap_pml5e(pmap, va) & PG_FRAME); + pmap_unwire_ptp(pmap, va, pml4pg, free); } /* @@ -3659,9 +3914,9 @@ pmap_pinit0(pmap_t pmap) int i; PMAP_LOCK_INIT(pmap); - pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(KPML4phys); - pmap->pm_pml4u = NULL; - pmap->pm_cr3 = KPML4phys; + pmap->pm_pmltop = kernel_pmap->pm_pmltop; + pmap->pm_pmltopu = NULL; + pmap->pm_cr3 = kernel_pmap->pm_cr3; /* hack to keep pmap_pti_pcid_invalidate() alive */ pmap->pm_ucr3 = PMAP_NO_CR3; pmap->pm_root.rt_root = 0; @@ -3714,20 +3969,61 @@ pmap_pinit_pml4(vm_page_t pml4pg) /* install large map entries if configured */ for (i = 0; i < lm_ents; i++) - pm_pml4[LMSPML4I + i] = kernel_pmap->pm_pml4[LMSPML4I + i]; + pm_pml4[LMSPML4I + i] = kernel_pmap->pm_pmltop[LMSPML4I + i]; } +void +pmap_pinit_pml5(vm_page_t pml5pg) +{ + pml5_entry_t *pm_pml5; + + pm_pml5 = (pml5_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml5pg)); + + /* + * Add pml5 entry at top of KVA pointing to existing pml4 table, + * entering all existing kernel mappings into level 5 table. + */ + pm_pml5[pmap_pml5e_index(UPT_MAX_ADDRESS)] = KPML4phys | X86_PG_V | + X86_PG_RW | X86_PG_A | X86_PG_M | pg_g | + pmap_cache_bits(kernel_pmap, VM_MEMATTR_DEFAULT, FALSE); + + /* + * Install self-referential address mapping entry. + */ + pm_pml5[PML5PML5I] = VM_PAGE_TO_PHYS(pml5pg) | + X86_PG_RW | X86_PG_V | X86_PG_M | X86_PG_A | + pmap_cache_bits(kernel_pmap, VM_MEMATTR_DEFAULT, FALSE); +} + static void -pmap_pinit_pml4_pti(vm_page_t pml4pg) +pmap_pinit_pml4_pti(vm_page_t pml4pgu) { - pml4_entry_t *pm_pml4; + pml4_entry_t *pm_pml4u; int i; - pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml4pg)); + pm_pml4u = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml4pgu)); for (i = 0; i < NPML4EPG; i++) - pm_pml4[i] = pti_pml4[i]; + pm_pml4u[i] = pti_pml4[i]; } +static void +pmap_pinit_pml5_pti(vm_page_t pml5pgu) +{ + pml5_entry_t *pm_pml5u; + + pm_pml5u = (pml5_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml5pgu)); + + /* + * Add pml5 entry at top of KVA pointing to existing pml4 pti + * table, entering all kernel mappings needed for usermode + * into level 5 table. + */ + pm_pml5u[pmap_pml5e_index(UPT_MAX_ADDRESS)] = + pmap_kextract((vm_offset_t)pti_pml4) | + X86_PG_V | X86_PG_RW | X86_PG_A | X86_PG_M | pg_g | + pmap_cache_bits(kernel_pmap, VM_MEMATTR_DEFAULT, FALSE); +} + /* * Initialize a preallocated and zeroed pmap structure, * such as one in a vmspace structure. @@ -3735,29 +4031,30 @@ pmap_pinit_pml4_pti(vm_page_t pml4pg) int pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, int flags) { - vm_page_t pml4pg, pml4pgu; - vm_paddr_t pml4phys; + vm_page_t pmltop_pg, pmltop_pgu; + vm_paddr_t pmltop_phys; int i; /* * allocate the page directory page */ - pml4pg = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | + pmltop_pg = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_WAITOK); - pml4phys = VM_PAGE_TO_PHYS(pml4pg); - pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(pml4phys); + pmltop_phys = VM_PAGE_TO_PHYS(pmltop_pg); + pmap->pm_pmltop = (pml5_entry_t *)PHYS_TO_DMAP(pmltop_phys); + CPU_FOREACH(i) { pmap->pm_pcids[i].pm_pcid = PMAP_PCID_NONE; pmap->pm_pcids[i].pm_gen = 0; } pmap->pm_cr3 = PMAP_NO_CR3; /* initialize to an invalid value */ pmap->pm_ucr3 = PMAP_NO_CR3; - pmap->pm_pml4u = NULL; + pmap->pm_pmltopu = NULL; pmap->pm_type = pm_type; - if ((pml4pg->flags & PG_ZERO) == 0) - pagezero(pmap->pm_pml4); + if ((pmltop_pg->flags & PG_ZERO) == 0) + pagezero(pmap->pm_pmltop); /* * Do not install the host kernel mappings in the nested page @@ -3766,15 +4063,21 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, i * Install minimal kernel mappings in PTI case. */ if (pm_type == PT_X86) { - pmap->pm_cr3 = pml4phys; - pmap_pinit_pml4(pml4pg); + pmap->pm_cr3 = pmltop_phys; + if (pmap_is_la57(pmap)) + pmap_pinit_pml5(pmltop_pg); + else + pmap_pinit_pml4(pmltop_pg); if ((curproc->p_md.md_flags & P_MD_KPTI) != 0) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Aug 23 20:20:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8FC13C9519; Sun, 23 Aug 2020 20:20: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZRSt5qwrz4RRn; Sun, 23 Aug 2020 20:20: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 AC9DACE2C; Sun, 23 Aug 2020 20:20: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 07NKKEYK016286; Sun, 23 Aug 2020 20:20:14 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NKKEVE016284; Sun, 23 Aug 2020 20:20:14 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232020.07NKKEVE016284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 20:20:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364528 - in stable/12/share/man: man4 man5 X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/share/man: man4 man5 X-SVN-Commit-Revision: 364528 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:20:15 -0000 Author: trasz Date: Sun Aug 23 20:20:13 2020 New Revision: 364528 URL: https://svnweb.freebsd.org/changeset/base/364528 Log: MFC r354691: Improve Linuxulator man pages to better reflect the current state, and add some missing Xrs. Sponsored by: The FreeBSD Foundation Modified: stable/12/share/man/man4/linux.4 stable/12/share/man/man5/linprocfs.5 stable/12/share/man/man5/linsysfs.5 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/linux.4 ============================================================================== --- stable/12/share/man/man4/linux.4 Sun Aug 23 20:19:04 2020 (r364527) +++ stable/12/share/man/man4/linux.4 Sun Aug 23 20:20:13 2020 (r364528) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 1, 2017 +.Dd November 13, 2019 .Dt LINUX 4 .Os .Sh NAME @@ -52,10 +52,10 @@ linux_load="YES" .Sh DESCRIPTION The .Nm -module provides limited -Linux ABI (application binary interface) compatibility -for userland applications. -The module provides the following significant facilities: +module provides limited Linux ABI (application binary interface) compatibility, +making it possible to run many unmodified Linux applications and libraries +without the need for virtualization or emulation. +Some of the facilities provided are: .Bl -bullet .It An image activator @@ -66,76 +66,61 @@ executable images Special signal handling for activated images .It Linux to native system call translation +.It +Linux-specific system calls .El .Pp -It is important to note that the Linux ABI support -it not provided through an emulator. -Rather, a true (albeit limited) ABI implementation is provided. +Note that dynamically linked Linux executables +will require a suitable environment in +.Pa /compat/linux . +This includes native Linux shared libraries, and Linux-specific virtual +filesystems. +To set it up, install the +.Pa emulators/linux_base-c7 +port or the linux_base-c7 +package, and add the following line to the +.Xr rc.conf 5 +file: .Pp -The following +.Dl linux_enable="YES" +.Pp +To avoid mounting Linux-specific filesystems at startup, also add the following +line: +.Pp +.Dl linux_mounts_enable="NO" +.Sh SYSCTL VARIABLES +The following variables are available as both .Xr sysctl 8 -tunable variables are available: -.Bl -tag -width compat.linux.oss_version -.It compat.linux.osname +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va compat.linux.osname Linux kernel operating system name. -.It compat.linux.osrelease +.It Va compat.linux.osrelease Linux kernel operating system release. Changing this to something else is discouraged on non-development systems, because it may change the way Linux programs work. Recent versions of GNU libc are known to use different syscalls depending on the value of this sysctl. -.It compat.linux.oss_version +.It Va compat.linux.oss_version Linux Open Sound System version. -.El -.Pp -The -.Nm -module can be linked into the kernel statically with the -.Dv COMPAT_LINUX -kernel configuration option -or loaded as required. -The following command will load the module -if it is neither linked into the kernel -nor already loaded as a module: -.Bd -literal -offset indent -if ! kldstat -v | grep -E 'linux(aout|elf)' > /dev/null; then - kldload linux > /dev/null 2>&1 -fi -.Ed -.Pp -Note that dynamically linked Linux executables -will require a suitable environment in -.Pa /compat/linux . -Specifically, the Linux run-time linker's hints files -should be correctly initialized. -For this reason, it is common to execute the following commands -to prepare the system to correctly run Linux executables: -.Bd -literal -offset indent -if [ -x /compat/linux/sbin/ldconfig ]; then - /compat/linux/sbin/ldconfig -r /compat/linux -fi -.Ed -.Pp -For information on loading the -.Nm -kernel loadable module automatically on system startup, -see -.Xr rc.conf 5 . -This information applies -regardless of whether the -.Nm -module is statically linked into the kernel -or loaded as a module. .Sh FILES -.Bl -tag -width /compat/linux/dev/fd -compact +.Bl -tag -width /compat/linux/dev/shm -compact .It Pa /compat/linux minimal Linux run-time environment .It Pa /compat/linux/dev/fd -limited Linux file-descriptor file system +file-descriptor file system, see +.Xr fdescfs 5 +.It Pa /compat/linux/dev/shm +in-memory file system, see +.Xr tmpfs 5 .It Pa /compat/linux/proc -limited Linux process file system +Linux process file system, see +.Xr linprocfs 5 .It Pa /compat/linux/sys -limited Linux system file system +Linux kernel objects file system, see +.Xr linsysfs 5 .El .Sh SEE ALSO .Xr brandelf 1 , @@ -143,7 +128,11 @@ limited Linux system file system .Xr elf 5 , .Xr fdescfs 5 , .Xr linprocfs 5 , -.Xr linsysfs 5 +.Xr linsysfs 5 , +.Xr tmpfs 5 .Sh HISTORY Linux ABI support first appeared in .Fx 2.1 . +.Sh BUGS +Support for some of the Linux-specific system calls and system call arguments +is missing. Modified: stable/12/share/man/man5/linprocfs.5 ============================================================================== --- stable/12/share/man/man5/linprocfs.5 Sun Aug 23 20:19:04 2020 (r364527) +++ stable/12/share/man/man5/linprocfs.5 Sun Aug 23 20:20:13 2020 (r364528) @@ -2,7 +2,7 @@ .\" Written by Garrett Wollman .\" This file is in the public domain. .\" -.Dd August 10, 1994 +.Dd November 13, 2019 .Dt LINPROCFS 5 .Os .Sh NAME @@ -75,6 +75,7 @@ file system on .Sh SEE ALSO .Xr mount 2 , .Xr unmount 2 , +.Xr linux 4 , .Xr procfs 5 , .Xr pseudofs 9 .Sh HISTORY Modified: stable/12/share/man/man5/linsysfs.5 ============================================================================== --- stable/12/share/man/man5/linsysfs.5 Sun Aug 23 20:19:04 2020 (r364527) +++ stable/12/share/man/man5/linsysfs.5 Sun Aug 23 20:20:13 2020 (r364528) @@ -3,12 +3,12 @@ .\" .\" $FreeBSD$ .\" -.Dd February 5, 2007 +.Dd November 13, 2019 .Dt LINSYSFS 5 .Os .Sh NAME .Nm linsysfs -.Nd Linux system file system +.Nd Linux kernel objects file system .Sh SYNOPSIS .Bd -literal linsys /compat/linux/sys linsysfs rw 0 0 @@ -76,6 +76,7 @@ is a mount point. .Sh SEE ALSO .Xr nmount 2 , .Xr unmount 2 , +.Xr linux 4 , .Xr linprocfs 5 , .Xr pseudofs 9 .Sh HISTORY From owner-svn-src-all@freebsd.org Sun Aug 23 20:25:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC3913C980D; Sun, 23 Aug 2020 20:25:11 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZRZb5Rf3z4RbZ; Sun, 23 Aug 2020 20:25:11 +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 9DA61D119; Sun, 23 Aug 2020 20:25:11 +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 07NKPBb1021996; Sun, 23 Aug 2020 20:25:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NKPAso021989; Sun, 23 Aug 2020 20:25:10 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232025.07NKPAso021989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 20:25:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364529 - in stable/12: share/man/man4 sys/amd64/linux sys/amd64/linux32 sys/arm64/linux sys/compat/linux sys/i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/amd64/linux sys/amd64/linux32 sys/arm64/linux sys/compat/linux sys/i386/linux X-SVN-Commit-Revision: 364529 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:25:11 -0000 Author: trasz Date: Sun Aug 23 20:25:10 2020 New Revision: 364529 URL: https://svnweb.freebsd.org/changeset/base/364529 Log: MFC r355818: Add compat.linux.emul_path, so it can be set to something other than "/compat/linux". Useful when you have several compat directories with different Linux versions and you don't want to clash with files installed by linux-c7 packages. Sponsored by: The FreeBSD Foundation Modified: stable/12/share/man/man4/linux.4 stable/12/sys/amd64/linux/linux_sysvec.c stable/12/sys/amd64/linux32/linux32_sysvec.c stable/12/sys/arm64/linux/linux_sysvec.c stable/12/sys/compat/linux/linux_util.c stable/12/sys/compat/linux/linux_util.h stable/12/sys/i386/linux/linux_sysvec.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/linux.4 ============================================================================== --- stable/12/share/man/man4/linux.4 Sun Aug 23 20:20:13 2020 (r364528) +++ stable/12/share/man/man4/linux.4 Sun Aug 23 20:25:10 2020 (r364529) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 13, 2019 +.Dd December 16, 2019 .Dt LINUX 4 .Os .Sh NAME @@ -95,6 +95,10 @@ variables and .Xr loader 8 tunables: .Bl -tag -width indent +.It Va compat.linux.emul_path +Path to the Linux run-time environment. +Defaults to +.Pa /compat/linux . .It Va compat.linux.osname Linux kernel operating system name. .It Va compat.linux.osrelease Modified: stable/12/sys/amd64/linux/linux_sysvec.c ============================================================================== --- stable/12/sys/amd64/linux/linux_sysvec.c Sun Aug 23 20:20:13 2020 (r364528) +++ stable/12/sys/amd64/linux/linux_sysvec.c Sun Aug 23 20:25:10 2020 (r364529) @@ -826,7 +826,7 @@ static Elf64_Brandinfo linux_glibc2brand = { .brand = ELFOSABI_LINUX, .machine = EM_X86_64, .compat_3_brand = "Linux", - .emul_path = "/compat/linux", + .emul_path = linux_emul_path, .interp_path = "/lib64/ld-linux-x86-64.so.2", .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, @@ -838,7 +838,7 @@ static Elf64_Brandinfo linux_glibc2brandshort = { .brand = ELFOSABI_LINUX, .machine = EM_X86_64, .compat_3_brand = "Linux", - .emul_path = "/compat/linux", + .emul_path = linux_emul_path, .interp_path = "/lib64/ld-linux.so.2", .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, @@ -850,7 +850,7 @@ static Elf64_Brandinfo linux_muslbrand = { .brand = ELFOSABI_LINUX, .machine = EM_X86_64, .compat_3_brand = "Linux", - .emul_path = "/compat/linux", + .emul_path = linux_emul_path, .interp_path = "/lib/ld-musl-x86_64.so.1", .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, Modified: stable/12/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_sysvec.c Sun Aug 23 20:20:13 2020 (r364528) +++ stable/12/sys/amd64/linux32/linux32_sysvec.c Sun Aug 23 20:25:10 2020 (r364529) @@ -1016,7 +1016,7 @@ static Elf32_Brandinfo linux_brand = { .brand = ELFOSABI_LINUX, .machine = EM_386, .compat_3_brand = "Linux", - .emul_path = "/compat/linux", + .emul_path = linux_emul_path, .interp_path = "/lib/ld-linux.so.1", .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, @@ -1028,7 +1028,7 @@ static Elf32_Brandinfo linux_glibc2brand = { .brand = ELFOSABI_LINUX, .machine = EM_386, .compat_3_brand = "Linux", - .emul_path = "/compat/linux", + .emul_path = linux_emul_path, .interp_path = "/lib/ld-linux.so.2", .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, @@ -1040,7 +1040,7 @@ static Elf32_Brandinfo linux_muslbrand = { .brand = ELFOSABI_LINUX, .machine = EM_386, .compat_3_brand = "Linux", - .emul_path = "/compat/linux", + .emul_path = linux_emul_path, .interp_path = "/lib/ld-musl-i386.so.1", .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, Modified: stable/12/sys/arm64/linux/linux_sysvec.c ============================================================================== --- stable/12/sys/arm64/linux/linux_sysvec.c Sun Aug 23 20:20:13 2020 (r364528) +++ stable/12/sys/arm64/linux/linux_sysvec.c Sun Aug 23 20:25:10 2020 (r364529) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include MODULE_VERSION(linux64elf, 1); @@ -472,7 +473,7 @@ static Elf64_Brandinfo linux_glibc2brand = { .brand = ELFOSABI_LINUX, .machine = EM_AARCH64, .compat_3_brand = "Linux", - .emul_path = "/compat/linux", + .emul_path = linux_emul_path, .interp_path = "/lib64/ld-linux-x86-64.so.2", .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, Modified: stable/12/sys/compat/linux/linux_util.c ============================================================================== --- stable/12/sys/compat/linux/linux_util.c Sun Aug 23 20:20:13 2020 (r364528) +++ stable/12/sys/compat/linux/linux_util.c Sun Aug 23 20:25:10 2020 (r364529) @@ -46,11 +46,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include MALLOC_DEFINE(M_LINUX, "linux", "Linux mode structures"); @@ -58,7 +60,11 @@ MALLOC_DEFINE(M_EPOLL, "lepoll", "Linux events structu MALLOC_DEFINE(M_FUTEX, "futex", "Linux futexes"); MALLOC_DEFINE(M_FUTEX_WP, "futex wp", "Linux futex waiting proc"); -const char linux_emul_path[] = "/compat/linux"; +char linux_emul_path[MAXPATHLEN] = "/compat/linux"; + +SYSCTL_STRING(_compat_linux, OID_AUTO, emul_path, CTLFLAG_RWTUN, + linux_emul_path, sizeof(linux_emul_path), + "Linux runtime environment path"); /* * Search an alternate path before passing pathname arguments on to Modified: stable/12/sys/compat/linux/linux_util.h ============================================================================== --- stable/12/sys/compat/linux/linux_util.h Sun Aug 23 20:20:13 2020 (r364528) +++ stable/12/sys/compat/linux/linux_util.h Sun Aug 23 20:25:10 2020 (r364529) @@ -50,7 +50,7 @@ MALLOC_DECLARE(M_EPOLL); MALLOC_DECLARE(M_FUTEX); MALLOC_DECLARE(M_FUTEX_WP); -extern const char linux_emul_path[]; +extern char linux_emul_path[]; int linux_emul_convpath(struct thread *, const char *, enum uio_seg, char **, int, int); Modified: stable/12/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/12/sys/i386/linux/linux_sysvec.c Sun Aug 23 20:20:13 2020 (r364528) +++ stable/12/sys/i386/linux/linux_sysvec.c Sun Aug 23 20:25:10 2020 (r364529) @@ -990,7 +990,7 @@ static Elf32_Brandinfo linux_brand = { .brand = ELFOSABI_LINUX, .machine = EM_386, .compat_3_brand = "Linux", - .emul_path = "/compat/linux", + .emul_path = linux_emul_path, .interp_path = "/lib/ld-linux.so.1", .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, @@ -1002,7 +1002,7 @@ static Elf32_Brandinfo linux_glibc2brand = { .brand = ELFOSABI_LINUX, .machine = EM_386, .compat_3_brand = "Linux", - .emul_path = "/compat/linux", + .emul_path = linux_emul_path, .interp_path = "/lib/ld-linux.so.2", .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, @@ -1014,7 +1014,7 @@ static Elf32_Brandinfo linux_muslbrand = { .brand = ELFOSABI_LINUX, .machine = EM_386, .compat_3_brand = "Linux", - .emul_path = "/compat/linux", + .emul_path = linux_emul_path, .interp_path = "/lib/ld-musl-i386.so.1", .sysvec = &elf_linux_sysvec, .interp_newpath = NULL, From owner-svn-src-all@freebsd.org Sun Aug 23 20:32:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 580B83C9659; Sun, 23 Aug 2020 20:32:14 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZRkk1dVzz4S5r; Sun, 23 Aug 2020 20:32:14 +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 027EACE79; Sun, 23 Aug 2020 20:32:14 +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 07NKWDhp028081; Sun, 23 Aug 2020 20:32:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NKWDWZ028079; Sun, 23 Aug 2020 20:32:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202008232032.07NKWDWZ028079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 23 Aug 2020 20:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364530 - in head/sys: amd64/amd64 x86/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 x86/include X-SVN-Commit-Revision: 364530 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:32:14 -0000 Author: kib Date: Sun Aug 23 20:32:13 2020 New Revision: 364530 URL: https://svnweb.freebsd.org/changeset/base/364530 Log: Add amd64 procctl(2) ops to manage forced LA48/LA57 VA after exec. Tested by: pho (LA48 hardware) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25273 Modified: head/sys/amd64/amd64/vm_machdep.c head/sys/x86/include/procctl.h Modified: head/sys/amd64/amd64/vm_machdep.c ============================================================================== --- head/sys/amd64/amd64/vm_machdep.c Sun Aug 23 20:25:10 2020 (r364529) +++ head/sys/amd64/amd64/vm_machdep.c Sun Aug 23 20:32:13 2020 (r364530) @@ -377,23 +377,69 @@ cpu_exec_vmspace_reuse(struct proc *p, vm_map_t map) } static void -cpu_procctl_kpti(struct proc *p, int com, int *val) +cpu_procctl_kpti_ctl(struct proc *p, int val) { - if (com == PROC_KPTI_CTL) { - if (pti && *val == PROC_KPTI_CTL_ENABLE_ON_EXEC) - p->p_md.md_flags |= P_MD_KPTI; - if (*val == PROC_KPTI_CTL_DISABLE_ON_EXEC) - p->p_md.md_flags &= ~P_MD_KPTI; - } else /* PROC_KPTI_STATUS */ { - *val = (p->p_md.md_flags & P_MD_KPTI) != 0 ? - PROC_KPTI_CTL_ENABLE_ON_EXEC: - PROC_KPTI_CTL_DISABLE_ON_EXEC; - if (vmspace_pmap(p->p_vmspace)->pm_ucr3 != PMAP_NO_CR3) - *val |= PROC_KPTI_STATUS_ACTIVE; + if (pti && val == PROC_KPTI_CTL_ENABLE_ON_EXEC) + p->p_md.md_flags |= P_MD_KPTI; + if (val == PROC_KPTI_CTL_DISABLE_ON_EXEC) + p->p_md.md_flags &= ~P_MD_KPTI; +} + +static void +cpu_procctl_kpti_status(struct proc *p, int *val) +{ + *val = (p->p_md.md_flags & P_MD_KPTI) != 0 ? + PROC_KPTI_CTL_ENABLE_ON_EXEC: + PROC_KPTI_CTL_DISABLE_ON_EXEC; + if (vmspace_pmap(p->p_vmspace)->pm_ucr3 != PMAP_NO_CR3) + *val |= PROC_KPTI_STATUS_ACTIVE; +} + +static int +cpu_procctl_la_ctl(struct proc *p, int val) +{ + int error; + + error = 0; + switch (val) { + case PROC_LA_CTL_LA48_ON_EXEC: + p->p_md.md_flags |= P_MD_LA48; + p->p_md.md_flags &= ~P_MD_LA57; + break; + case PROC_LA_CTL_LA57_ON_EXEC: + if (la57) { + p->p_md.md_flags &= ~P_MD_LA48; + p->p_md.md_flags |= P_MD_LA57; + } else { + error = ENOTSUP; + } + break; + case PROC_LA_CTL_DEFAULT_ON_EXEC: + p->p_md.md_flags &= ~(P_MD_LA48 | P_MD_LA57); + break; } + return (error); } +static void +cpu_procctl_la_status(struct proc *p, int *val) +{ + int res; + + if ((p->p_md.md_flags & P_MD_LA48) != 0) + res = PROC_LA_CTL_LA48_ON_EXEC; + else if ((p->p_md.md_flags & P_MD_LA57) != 0) + res = PROC_LA_CTL_LA57_ON_EXEC; + else + res = PROC_LA_CTL_DEFAULT_ON_EXEC; + if (p->p_sysent->sv_maxuser == VM_MAXUSER_ADDRESS_LA48) + res |= PROC_LA_STATUS_LA48; + else + res |= PROC_LA_STATUS_LA57; + *val = res; +} + int cpu_procctl(struct thread *td, int idtype, id_t id, int com, void *data) { @@ -403,6 +449,8 @@ cpu_procctl(struct thread *td, int idtype, id_t id, in switch (com) { case PROC_KPTI_CTL: case PROC_KPTI_STATUS: + case PROC_LA_CTL: + case PROC_LA_STATUS: if (idtype != P_PID) { error = EINVAL; break; @@ -412,22 +460,45 @@ cpu_procctl(struct thread *td, int idtype, id_t id, in error = priv_check(td, PRIV_IO); if (error != 0) break; + } + if (com == PROC_KPTI_CTL || com == PROC_LA_CTL) { error = copyin(data, &val, sizeof(val)); if (error != 0) break; - if (val != PROC_KPTI_CTL_ENABLE_ON_EXEC && - val != PROC_KPTI_CTL_DISABLE_ON_EXEC) { - error = EINVAL; - break; - } } + if (com == PROC_KPTI_CTL && + val != PROC_KPTI_CTL_ENABLE_ON_EXEC && + val != PROC_KPTI_CTL_DISABLE_ON_EXEC) { + error = EINVAL; + break; + } + if (com == PROC_LA_CTL && + val != PROC_LA_CTL_LA48_ON_EXEC && + val != PROC_LA_CTL_LA57_ON_EXEC && + val != PROC_LA_CTL_DEFAULT_ON_EXEC) { + error = EINVAL; + break; + } error = pget(id, PGET_CANSEE | PGET_NOTWEXIT | PGET_NOTID, &p); - if (error == 0) { - cpu_procctl_kpti(p, com, &val); - PROC_UNLOCK(p); - if (com == PROC_KPTI_STATUS) - error = copyout(&val, data, sizeof(val)); + if (error != 0) + break; + switch (com) { + case PROC_KPTI_CTL: + cpu_procctl_kpti_ctl(p, val); + break; + case PROC_KPTI_STATUS: + cpu_procctl_kpti_status(p, &val); + break; + case PROC_LA_CTL: + error = cpu_procctl_la_ctl(p, val); + break; + case PROC_LA_STATUS: + cpu_procctl_la_status(p, &val); + break; } + PROC_UNLOCK(p); + if (com == PROC_KPTI_STATUS || com == PROC_LA_STATUS) + error = copyout(&val, data, sizeof(val)); break; default: error = EINVAL; Modified: head/sys/x86/include/procctl.h ============================================================================== --- head/sys/x86/include/procctl.h Sun Aug 23 20:25:10 2020 (r364529) +++ head/sys/x86/include/procctl.h Sun Aug 23 20:32:13 2020 (r364530) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2019 The FreeBSD Foundation + * Copyright (c) 2019,2020 The FreeBSD Foundation * * Portions of this software were developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. @@ -35,9 +35,18 @@ #define PROC_KPTI_CTL (PROC_PROCCTL_MD_MIN + 0) #define PROC_KPTI_STATUS (PROC_PROCCTL_MD_MIN + 1) +#define PROC_LA_CTL (PROC_PROCCTL_MD_MIN + 2) +#define PROC_LA_STATUS (PROC_PROCCTL_MD_MIN + 3) #define PROC_KPTI_CTL_ENABLE_ON_EXEC 1 #define PROC_KPTI_CTL_DISABLE_ON_EXEC 2 #define PROC_KPTI_STATUS_ACTIVE 0x80000000 + +#define PROC_LA_CTL_LA48_ON_EXEC 1 +#define PROC_LA_CTL_LA57_ON_EXEC 2 +#define PROC_LA_CTL_DEFAULT_ON_EXEC 3 + +#define PROC_LA_STATUS_LA48 0x01000000 +#define PROC_LA_STATUS_LA57 0x02000000 #endif From owner-svn-src-all@freebsd.org Sun Aug 23 20:37:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9CAEB3C9A54; Sun, 23 Aug 2020 20:37:22 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZRrf3Z0Jz4SZH; Sun, 23 Aug 2020 20:37:22 +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 5C807CD71; Sun, 23 Aug 2020 20:37:22 +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 07NKbMrZ028603; Sun, 23 Aug 2020 20:37:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NKbLou028599; Sun, 23 Aug 2020 20:37:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202008232037.07NKbLou028599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 23 Aug 2020 20:37:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364531 - in head: sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel usr.sbin/bhyve X-SVN-Commit-Revision: 364531 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:37:22 -0000 Author: kib Date: Sun Aug 23 20:37:21 2020 New Revision: 364531 URL: https://svnweb.freebsd.org/changeset/base/364531 Log: Add bhyve support for LA57 guest mode. Noted and reviewed by: grehan Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25273 Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/vmm_instruction_emul.c head/usr.sbin/bhyve/gdb.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Sun Aug 23 20:32:13 2020 (r364530) +++ head/sys/amd64/include/vmm.h Sun Aug 23 20:37:21 2020 (r364531) @@ -522,6 +522,7 @@ enum vm_paging_mode { PAGING_MODE_32, PAGING_MODE_PAE, PAGING_MODE_64, + PAGING_MODE_64_LA57, }; struct vm_guest_paging { Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Sun Aug 23 20:32:13 2020 (r364530) +++ head/sys/amd64/vmm/intel/vmx.c Sun Aug 23 20:37:21 2020 (r364531) @@ -1940,14 +1940,18 @@ vmx_cpu_mode(void) static enum vm_paging_mode vmx_paging_mode(void) { + uint64_t cr4; if (!(vmcs_read(VMCS_GUEST_CR0) & CR0_PG)) return (PAGING_MODE_FLAT); - if (!(vmcs_read(VMCS_GUEST_CR4) & CR4_PAE)) + cr4 = vmcs_read(VMCS_GUEST_CR4); + if (!(cr4 & CR4_PAE)) return (PAGING_MODE_32); - if (vmcs_read(VMCS_GUEST_IA32_EFER) & EFER_LME) - return (PAGING_MODE_64); - else + if (vmcs_read(VMCS_GUEST_IA32_EFER) & EFER_LME) { + if (!(cr4 & CR4_LA57)) + return (PAGING_MODE_64); + return (PAGING_MODE_64_LA57); + } else return (PAGING_MODE_PAE); } Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Sun Aug 23 20:32:13 2020 (r364530) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Sun Aug 23 20:37:21 2020 (r364531) @@ -2189,8 +2189,12 @@ restart: ptpphys = pte; nlevels = 2; - } else + } else if (paging->paging_mode == PAGING_MODE_64_LA57) { + nlevels = 5; + } else { nlevels = 4; + } + while (--nlevels >= 0) { /* Zero out the lower 12 bits and the upper 12 bits */ ptpphys >>= 12; ptpphys <<= 24; ptpphys >>= 12; Modified: head/usr.sbin/bhyve/gdb.c ============================================================================== --- head/usr.sbin/bhyve/gdb.c Sun Aug 23 20:32:13 2020 (r364530) +++ head/usr.sbin/bhyve/gdb.c Sun Aug 23 20:37:21 2020 (r364531) @@ -251,7 +251,8 @@ guest_paging_info(int vcpu, struct vm_guest_paging *pa else if (!(regs[2] & CR4_PAE)) paging->paging_mode = PAGING_MODE_32; else if (regs[3] & EFER_LME) - paging->paging_mode = PAGING_MODE_64; + paging->paging_mode = (regs[2] & CR4_LA57) ? + PAGING_MODE_64_LA57 : PAGING_MODE_64; else paging->paging_mode = PAGING_MODE_PAE; return (0); From owner-svn-src-all@freebsd.org Sun Aug 23 20:38:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E32523C9C3E; Sun, 23 Aug 2020 20:38:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZRsZ5mT6z4SY5; Sun, 23 Aug 2020 20:38: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 AAEA2D140; Sun, 23 Aug 2020 20:38: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 07NKcAjg028684; Sun, 23 Aug 2020 20:38:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NKcAxR028683; Sun, 23 Aug 2020 20:38:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008232038.07NKcAxR028683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 23 Aug 2020 20:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364532 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364532 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:38:11 -0000 Author: imp Date: Sun Aug 23 20:38:10 2020 New Revision: 364532 URL: https://svnweb.freebsd.org/changeset/base/364532 Log: Fix another minor style glitch. Pull { to the end of the struct line rather than having them on their own line. Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Sun Aug 23 20:37:21 2020 (r364531) +++ head/sys/kern/subr_bus.c Sun Aug 23 20:38:10 2020 (r364532) @@ -392,16 +392,14 @@ static struct cdevsw dev_cdevsw = { .d_name = "devctl", }; -struct dev_event_info -{ +struct dev_event_info { char *dei_data; STAILQ_ENTRY(dev_event_info) dei_link; }; STAILQ_HEAD(devq, dev_event_info); -static struct dev_softc -{ +static struct dev_softc { int inuse; int nonblock; int queued; From owner-svn-src-all@freebsd.org Sun Aug 23 20:40:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E975D3C9C5E; Sun, 23 Aug 2020 20:40:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZRwM5xWWz4Sls; Sun, 23 Aug 2020 20:40:35 +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 AE480D142; Sun, 23 Aug 2020 20:40:35 +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 07NKeZKc030818; Sun, 23 Aug 2020 20:40:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NKeZP2030797; Sun, 23 Aug 2020 20:40:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202008232040.07NKeZP2030797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 23 Aug 2020 20:40:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364533 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 364533 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:40:36 -0000 Author: kib Date: Sun Aug 23 20:40:35 2020 New Revision: 364533 URL: https://svnweb.freebsd.org/changeset/base/364533 Log: amd64: Handle 5-level paging for efirt calls. Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25273 Modified: head/sys/amd64/amd64/efirt_machdep.c Modified: head/sys/amd64/amd64/efirt_machdep.c ============================================================================== --- head/sys/amd64/amd64/efirt_machdep.c Sun Aug 23 20:38:10 2020 (r364532) +++ head/sys/amd64/amd64/efirt_machdep.c Sun Aug 23 20:40:35 2020 (r364533) @@ -61,9 +61,10 @@ __FBSDID("$FreeBSD$"); #include #include +static pml5_entry_t *efi_pml5; static pml4_entry_t *efi_pml4; static vm_object_t obj_1t1_pt; -static vm_page_t efi_pml4_page; +static vm_page_t efi_pmltop_page; static vm_pindex_t efi_1t1_idx; void @@ -82,7 +83,8 @@ efi_destroy_1t1_map(void) obj_1t1_pt = NULL; efi_pml4 = NULL; - efi_pml4_page = NULL; + efi_pml5 = NULL; + efi_pmltop_page = NULL; } /* @@ -109,22 +111,38 @@ efi_1t1_page(void) static pt_entry_t * efi_1t1_pte(vm_offset_t va) { + pml5_entry_t *pml5e; pml4_entry_t *pml4e; pdp_entry_t *pdpe; pd_entry_t *pde; pt_entry_t *pte; vm_page_t m; - vm_pindex_t pml4_idx, pdp_idx, pd_idx; + vm_pindex_t pml5_idx, pml4_idx, pdp_idx, pd_idx; vm_paddr_t mphys; pml4_idx = pmap_pml4e_index(va); - pml4e = &efi_pml4[pml4_idx]; + if (la57) { + pml5_idx = pmap_pml5e_index(va); + pml5e = &efi_pml5[pml5_idx]; + if (*pml5e == 0) { + m = efi_1t1_page(); + mphys = VM_PAGE_TO_PHYS(m); + *pml5e = mphys | X86_PG_RW | X86_PG_V; + } else { + mphys = *pml5e & PG_FRAME; + } + pml4e = (pml4_entry_t *)PHYS_TO_DMAP(mphys); + pml4e = &pml4e[pml4_idx]; + } else { + pml4e = &efi_pml4[pml4_idx]; + } + if (*pml4e == 0) { m = efi_1t1_page(); mphys = VM_PAGE_TO_PHYS(m); *pml4e = mphys | X86_PG_RW | X86_PG_V; } else { - mphys = *pml4e & ~PAGE_MASK; + mphys = *pml4e & PG_FRAME; } pdpe = (pdp_entry_t *)PHYS_TO_DMAP(mphys); @@ -135,7 +153,7 @@ efi_1t1_pte(vm_offset_t va) mphys = VM_PAGE_TO_PHYS(m); *pdpe = mphys | X86_PG_RW | X86_PG_V; } else { - mphys = *pdpe & ~PAGE_MASK; + mphys = *pdpe & PG_FRAME; } pde = (pd_entry_t *)PHYS_TO_DMAP(mphys); @@ -146,7 +164,7 @@ efi_1t1_pte(vm_offset_t va) mphys = VM_PAGE_TO_PHYS(m); *pde = mphys | X86_PG_RW | X86_PG_V; } else { - mphys = *pde & ~PAGE_MASK; + mphys = *pde & PG_FRAME; } pte = (pt_entry_t *)PHYS_TO_DMAP(mphys); @@ -161,6 +179,7 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int { struct efi_md *p; pt_entry_t *pte; + void *pml; vm_offset_t va; uint64_t idx; int bits, i, mode; @@ -170,10 +189,16 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int VM_PROT_ALL, 0, NULL); efi_1t1_idx = 0; VM_OBJECT_WLOCK(obj_1t1_pt); - efi_pml4_page = efi_1t1_page(); + efi_pmltop_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); + pml = (void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(efi_pmltop_page)); + if (la57) { + efi_pml5 = pml; + pmap_pinit_pml5(efi_pmltop_page); + } else { + efi_pml4 = pml; + pmap_pinit_pml4(efi_pmltop_page); + } for (i = 0, p = map; i < ndesc; i++, p = efi_next_descriptor(p, descsz)) { @@ -279,7 +304,7 @@ efi_arch_enter(void) if (pmap_pcid_enabled && !invpcid_works) PCPU_SET(curpmap, NULL); - load_cr3(VM_PAGE_TO_PHYS(efi_pml4_page) | (pmap_pcid_enabled ? + load_cr3(VM_PAGE_TO_PHYS(efi_pmltop_page) | (pmap_pcid_enabled ? curpmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid : 0)); /* * If PCID is enabled, the clear CR3_PCID_SAVE bit in the loaded %cr3 From owner-svn-src-all@freebsd.org Sun Aug 23 20:43:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F8EB3C9F18; Sun, 23 Aug 2020 20:43: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZRzc0PRFz4TLZ; Sun, 23 Aug 2020 20:43: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 CB18AD58D; Sun, 23 Aug 2020 20:43:23 +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 07NKhNHN034720; Sun, 23 Aug 2020 20:43:23 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NKhN2N034718; Sun, 23 Aug 2020 20:43:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202008232043.07NKhN2N034718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 23 Aug 2020 20:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364534 - in head/sys: amd64/acpica amd64/amd64 x86/acpica X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/acpica amd64/amd64 x86/acpica X-SVN-Commit-Revision: 364534 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:43:24 -0000 Author: kib Date: Sun Aug 23 20:43:23 2020 New Revision: 364534 URL: https://svnweb.freebsd.org/changeset/base/364534 Log: amd64: Handle 5-level paging on wakeup. We can switch into long mode directly with LA57 enabled. Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25273 Modified: head/sys/amd64/acpica/acpi_wakecode.S head/sys/amd64/amd64/cpu_switch.S head/sys/x86/acpica/acpi_wakeup.c Modified: head/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- head/sys/amd64/acpica/acpi_wakecode.S Sun Aug 23 20:40:35 2020 (r364533) +++ head/sys/amd64/acpica/acpi_wakecode.S Sun Aug 23 20:43:23 2020 (r364534) @@ -148,10 +148,18 @@ wakeup_32: mov $bootdata32 - bootgdt, %eax mov %ax, %ds - /* Turn on the PAE bit for when paging is enabled */ + /* + * Turn on the PAE bit and optionally the LA57 bit for when paging + * is later enabled. + */ mov %cr4, %eax orl $CR4_PAE, %eax - mov %eax, %cr4 + leal wakeup_pagetables - wakeup_start(%ebx), %ecx + movl (%ecx), %ecx + testl $0x1, %ecx + je 1f + orl $CR4_LA57, %eax +1: mov %eax, %cr4 /* * Enable EFER.LME so that we get long mode when all the prereqs are @@ -174,6 +182,7 @@ wakeup_32: */ leal wakeup_pagetables - wakeup_start(%ebx), %eax movl (%eax), %eax + andl $~0x1, %eax mov %eax, %cr3 /* Modified: head/sys/amd64/amd64/cpu_switch.S ============================================================================== --- head/sys/amd64/amd64/cpu_switch.S Sun Aug 23 20:40:35 2020 (r364533) +++ head/sys/amd64/amd64/cpu_switch.S Sun Aug 23 20:43:23 2020 (r364534) @@ -382,8 +382,11 @@ END(savectx) * Resuming processor state from pcb. */ ENTRY(resumectx) - /* Switch to KPML4phys. */ + /* Switch to KPML5/4phys. */ movq KPML4phys,%rax + movq KPML5phys,%rcx + cmpl $0, la57 + cmovne %rcx, %rax movq %rax,%cr3 /* Force kernel segment registers. */ Modified: head/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- head/sys/x86/acpica/acpi_wakeup.c Sun Aug 23 20:40:35 2020 (r364533) +++ head/sys/x86/acpica/acpi_wakeup.c Sun Aug 23 20:43:23 2020 (r364534) @@ -99,7 +99,7 @@ static void acpi_wakeup_cpus(struct acpi_softc *); #endif #ifdef __amd64__ -#define ACPI_WAKEPAGES 4 +#define ACPI_WAKEPAGES 5 #else #define ACPI_WAKEPAGES 1 #endif @@ -414,8 +414,8 @@ acpi_install_wakeup_handler(struct acpi_softc *sc) static void *wakeaddr; void *wakepages[ACPI_WAKEPAGES]; #ifdef __amd64__ - uint64_t *pt4, *pt3, *pt2; - vm_paddr_t pt4pa, pt3pa, pt2pa; + uint64_t *pt5, *pt4, *pt3, *pt2; + vm_paddr_t pt5pa, pt4pa, pt3pa, pt2pa; int i; #endif @@ -430,6 +430,10 @@ acpi_install_wakeup_handler(struct acpi_softc *sc) sc->acpi_wakephys = vtophys(wakeaddr); #ifdef __amd64__ + if (la57) { + pt5 = wakepages[4]; + pt5pa = vtophys(pt5); + } pt4 = wakepages[1]; pt3 = wakepages[2]; pt2 = wakepages[3]; @@ -448,7 +452,8 @@ acpi_install_wakeup_handler(struct acpi_softc *sc) #ifdef __amd64__ WAKECODE_FIXUP((wakeup_sw64 + 1), uint32_t, sc->acpi_wakephys + wakeup_64); - WAKECODE_FIXUP(wakeup_pagetables, uint32_t, pt4pa); + WAKECODE_FIXUP(wakeup_pagetables, uint32_t, la57 ? (pt5pa | 0x1) : + pt4pa); #endif /* Save pointers to some global data. */ @@ -457,7 +462,12 @@ acpi_install_wakeup_handler(struct acpi_softc *sc) WAKECODE_FIXUP(wakeup_cr3, register_t, pmap_get_kcr3()); #else /* __amd64__ */ /* Create the initial 1GB replicated page tables */ - for (i = 0; i < 512; i++) { + for (i = 0; i < NPTEPG; i++) { + if (la57) { + pt5[i] = (uint64_t)pt4pa; + pt5[i] |= PG_V | PG_RW | PG_U; + } + /* * Each slot of the level 4 pages points * to the same level 3 page @@ -473,7 +483,7 @@ acpi_install_wakeup_handler(struct acpi_softc *sc) pt3[i] |= PG_V | PG_RW | PG_U; /* The level 2 page slots are mapped with 2MB pages for 1GB. */ - pt2[i] = i * (2 * 1024 * 1024); + pt2[i] = i * NBPDR; pt2[i] |= PG_V | PG_RW | PG_PS | PG_U; } #endif /* !__amd64__ */ From owner-svn-src-all@freebsd.org Sun Aug 23 20:44:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F9633C9FB6; Sun, 23 Aug 2020 20:44:16 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZS0c0zT2z4TDm; Sun, 23 Aug 2020 20:44:16 +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 04CBED39B; Sun, 23 Aug 2020 20:44:16 +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 07NKiFH8034830; Sun, 23 Aug 2020 20:44:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NKiF4h034829; Sun, 23 Aug 2020 20:44:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202008232044.07NKiF4h034829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 23 Aug 2020 20:44:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364535 - head/usr.bin/proccontrol X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/usr.bin/proccontrol X-SVN-Commit-Revision: 364535 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 20:44:16 -0000 Author: kib Date: Sun Aug 23 20:44:15 2020 New Revision: 364535 URL: https://svnweb.freebsd.org/changeset/base/364535 Log: procctl(8): usermode bits to force LA58/LA57 on exec. Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25273 Modified: head/usr.bin/proccontrol/proccontrol.1 head/usr.bin/proccontrol/proccontrol.c Modified: head/usr.bin/proccontrol/proccontrol.1 ============================================================================== --- head/usr.bin/proccontrol/proccontrol.1 Sun Aug 23 20:43:23 2020 (r364534) +++ head/usr.bin/proccontrol/proccontrol.1 Sun Aug 23 20:44:15 2020 (r364535) @@ -71,6 +71,9 @@ Controls the implicit PROT_MAX application for .Xr mmap 2 . .It Ar kpti Controls the KPTI enable, AMD64 only. +.It Ar la48 +Control limiting usermode process address space to 48 bits of address, +AMD64 only, on machines capable of 57-bit addressing. .El .Pp The Modified: head/usr.bin/proccontrol/proccontrol.c ============================================================================== --- head/usr.bin/proccontrol/proccontrol.c Sun Aug 23 20:43:23 2020 (r364534) +++ head/usr.bin/proccontrol/proccontrol.c Sun Aug 23 20:44:15 2020 (r364535) @@ -48,6 +48,10 @@ enum { #ifdef PROC_KPTI_CTL MODE_KPTI, #endif +#ifdef PROC_LA_CTL + MODE_LA57, + MODE_LA48, +#endif }; static pid_t @@ -69,13 +73,18 @@ str2pid(const char *str) #else #define KPTI_USAGE #endif +#ifdef PROC_LA_CTL +#define LA_USAGE "|la48|la57" +#else +#define LA_USAGE +#endif static void __dead2 usage(void) { fprintf(stderr, "Usage: proccontrol -m (aslr|protmax|trace|trapcap|" - "stackgap"KPTI_USAGE") [-q] " + "stackgap"KPTI_USAGE LA_USAGE") [-q] " "[-s (enable|disable)] [-p pid | command]\n"); exit(1); } @@ -108,6 +117,12 @@ main(int argc, char *argv[]) else if (strcmp(optarg, "kpti") == 0) mode = MODE_KPTI; #endif +#ifdef PROC_LA_CTL + else if (strcmp(optarg, "la57") == 0) + mode = MODE_LA57; + else if (strcmp(optarg, "la48") == 0) + mode = MODE_LA48; +#endif else usage(); break; @@ -164,6 +179,12 @@ main(int argc, char *argv[]) error = procctl(P_PID, pid, PROC_KPTI_STATUS, &arg); break; #endif +#ifdef PROC_LA_CTL + case MODE_LA57: + case MODE_LA48: + error = procctl(P_PID, pid, PROC_LA_STATUS, &arg); + break; +#endif default: usage(); break; @@ -259,6 +280,27 @@ main(int argc, char *argv[]) printf(", not active\n"); break; #endif +#ifdef PROC_LA_CTL + case MODE_LA57: + case MODE_LA48: + switch (arg & ~(PROC_LA_STATUS_LA48 | + PROC_LA_STATUS_LA57)) { + case PROC_LA_CTL_LA48_ON_EXEC: + printf("la48 on exec"); + break; + case PROC_LA_CTL_LA57_ON_EXEC: + printf("la57 on exec"); + break; + case PROC_LA_CTL_DEFAULT_ON_EXEC: + printf("default on exec"); + break; + } + if ((arg & PROC_LA_STATUS_LA48) != 0) + printf(", la48 active\n"); + else if ((arg & PROC_LA_STATUS_LA57) != 0) + printf(", la57 active\n"); + break; +#endif } } else { switch (mode) { @@ -293,6 +335,18 @@ main(int argc, char *argv[]) arg = enable ? PROC_KPTI_CTL_ENABLE_ON_EXEC : PROC_KPTI_CTL_DISABLE_ON_EXEC; error = procctl(P_PID, pid, PROC_KPTI_CTL, &arg); + break; +#endif +#ifdef PROC_LA_CTL + case MODE_LA57: + arg = enable ? PROC_LA_CTL_LA57_ON_EXEC : + PROC_LA_CTL_DEFAULT_ON_EXEC; + error = procctl(P_PID, pid, PROC_LA_CTL, &arg); + break; + case MODE_LA48: + arg = enable ? PROC_LA_CTL_LA48_ON_EXEC : + PROC_LA_CTL_DEFAULT_ON_EXEC; + error = procctl(P_PID, pid, PROC_LA_CTL, &arg); break; #endif default: From owner-svn-src-all@freebsd.org Sun Aug 23 21:01:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2CF303CA956; Sun, 23 Aug 2020 21:01:57 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZSP10TSPz4Vs7; Sun, 23 Aug 2020 21:01:57 +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 E7BA4D7B6; Sun, 23 Aug 2020 21:01:56 +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 07NL1uML044680; Sun, 23 Aug 2020 21:01:56 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NL1uGb044678; Sun, 23 Aug 2020 21:01:56 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232101.07NL1uGb044678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364536 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:01:57 -0000 Author: tuexen Date: Sun Aug 23 21:01:56 2020 New Revision: 364536 URL: https://svnweb.freebsd.org/changeset/base/364536 Log: MFC r357197: Fix build issues for the userland stack on 32-bit platforms. Modified: stable/12/sys/netinet/sctp_asconf.c stable/12/sys/netinet/sctp_output.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_asconf.c ============================================================================== --- stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 20:44:15 2020 (r364535) +++ stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 21:01:56 2020 (r364536) @@ -105,7 +105,7 @@ sctp_asconf_error_response(uint32_t id, uint16_t cause struct mbuf *m_reply = NULL; struct sctp_asconf_paramhdr *aph; struct sctp_error_cause *error; - size_t buf_len; + uint32_t buf_len; uint16_t i, param_length, cause_length, padding_length; uint8_t *tlv; Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Sun Aug 23 20:44:15 2020 (r364535) +++ stable/12/sys/netinet/sctp_output.c Sun Aug 23 21:01:56 2020 (r364536) @@ -6885,7 +6885,7 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, /* There is another. */ return (EBUSY); } - if (uio->uio_resid > SCTP_BASE_SYSCTL(sctp_sendall_limit)) { + if (uio->uio_resid > (ssize_t)SCTP_BASE_SYSCTL(sctp_sendall_limit)) { /* You must not be larger than the limit! */ return (EMSGSIZE); } From owner-svn-src-all@freebsd.org Sun Aug 23 21:04:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF7553CAD7A; Sun, 23 Aug 2020 21:04:23 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZSRq5Zsxz4W6C; Sun, 23 Aug 2020 21:04:23 +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 9FA3AD92A; Sun, 23 Aug 2020 21:04:23 +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 07NL4N63047419; Sun, 23 Aug 2020 21:04:23 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NL4Njx047417; Sun, 23 Aug 2020 21:04:23 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232104.07NL4Njx047417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364537 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:04:23 -0000 Author: tuexen Date: Sun Aug 23 21:04:22 2020 New Revision: 364537 URL: https://svnweb.freebsd.org/changeset/base/364537 Log: MFC r357500: Improve numbering of debug information. Modified: stable/12/sys/netinet/sctp_constants.h stable/12/sys/netinet/sctp_indata.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_constants.h ============================================================================== --- stable/12/sys/netinet/sctp_constants.h Sun Aug 23 21:01:56 2020 (r364536) +++ stable/12/sys/netinet/sctp_constants.h Sun Aug 23 21:04:22 2020 (r364537) @@ -807,7 +807,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_LOC_33 0x00000021 #define SCTP_LOC_34 0x00000022 #define SCTP_LOC_35 0x00000023 - +#define SCTP_LOC_36 0x00000024 /* Free assoc codes */ #define SCTP_NORMAL_PROC 0 Modified: stable/12/sys/netinet/sctp_indata.c ============================================================================== --- stable/12/sys/netinet/sctp_indata.c Sun Aug 23 21:01:56 2020 (r364536) +++ stable/12/sys/netinet/sctp_indata.c Sun Aug 23 21:04:22 2020 (r364537) @@ -1754,7 +1754,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc * Need to send an abort since we had a empty data chunk. */ op_err = sctp_generate_no_user_data_cause(tsn); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_14; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_15; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); @@ -1892,7 +1892,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc snprintf(msg, sizeof(msg), "Reassembly problem (MID=%8.8x)", mid); err_out: op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_15; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); @@ -2041,7 +2041,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc (uint16_t)mid); } op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_17; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); @@ -2613,7 +2613,7 @@ sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap) if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_17); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_18); } sctp_send_shutdown(stcb, ((stcb->asoc.alternate) ? stcb->asoc.alternate : stcb->asoc.primary_destination)); @@ -2766,7 +2766,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o snprintf(msg, sizeof(msg), "%s", "I-DATA chunk received when DATA was negotiated"); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_18; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_20; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); return (2); } @@ -2777,7 +2777,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o snprintf(msg, sizeof(msg), "%s", "DATA chunk received when I-DATA was negotiated"); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_21; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); return (2); } @@ -2802,7 +2802,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o ch->chunk_type == SCTP_DATA ? "DATA" : "I-DATA", chk_length); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_20; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_22; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); return (2); } @@ -2891,7 +2891,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o snprintf(msg, sizeof(msg), "Chunk of length %u", chk_length); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_20; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_23; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); return (2); } @@ -4041,7 +4041,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32 snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal than TSN %8.8x", cumack, send_s); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_21; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } @@ -4237,7 +4237,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32 net->dest_state &= ~SCTP_ADDR_PF; sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_22); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); asoc->cc_functions.sctp_cwnd_update_exit_pf(stcb, net); /* Done with this net */ @@ -4315,7 +4315,7 @@ again: } else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_23); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_26); } } } @@ -4368,7 +4368,7 @@ again: *abort_now = 1; /* XXX */ op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_27; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } @@ -4578,7 +4578,7 @@ hopeless_peer: snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal than TSN %8.8x", cum_ack, send_s); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_28; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } @@ -4610,7 +4610,7 @@ hopeless_peer: /* stop any timers */ TAILQ_FOREACH(net, &asoc->nets, sctp_next) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_26); + stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_29); net->partial_bytes_acked = 0; net->flight_size = 0; } @@ -4810,14 +4810,14 @@ hopeless_peer: if (net->new_pseudo_cumack) sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_27); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_30); } } else { if (accum_moved) { TAILQ_FOREACH(net, &asoc->nets, sctp_next) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_28); + stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_31); } } } @@ -5000,7 +5000,7 @@ hopeless_peer: net->dest_state &= ~SCTP_ADDR_PF; sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_29); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_32); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); asoc->cc_functions.sctp_cwnd_update_exit_pf(stcb, net); /* Done with this net */ @@ -5025,7 +5025,7 @@ hopeless_peer: /* stop all timers */ sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_30); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_33); net->flight_size = 0; net->partial_bytes_acked = 0; } @@ -5063,7 +5063,7 @@ hopeless_peer: *abort_now = 1; /* XXX */ op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_34; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } @@ -5212,7 +5212,7 @@ again: } else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_32); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_35); } } } @@ -5618,7 +5618,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, "New cum ack %8.8x too high, highest TSN %8.8x", new_cum_tsn, asoc->highest_tsn_inside_map); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_33; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_36; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } From owner-svn-src-all@freebsd.org Sun Aug 23 21:04:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 386253CAE75; Sun, 23 Aug 2020 21:04:36 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZSS40jRqz4W6s; Sun, 23 Aug 2020 21:04:36 +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 C6987DA86; Sun, 23 Aug 2020 21:04:35 +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 07NL4ZtJ047482; Sun, 23 Aug 2020 21:04:35 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NL4ZqD047481; Sun, 23 Aug 2020 21:04:35 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008232104.07NL4ZqD047481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 23 Aug 2020 21:04:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364538 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:04:36 -0000 Author: mjg Date: Sun Aug 23 21:04:35 2020 New Revision: 364538 URL: https://svnweb.freebsd.org/changeset/base/364538 Log: vfs: factor away doomed vnode handling into vdropl_final Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Aug 23 21:04:22 2020 (r364537) +++ head/sys/kern/vfs_subr.c Sun Aug 23 21:04:35 2020 (r364538) @@ -3437,6 +3437,33 @@ vdrop_deactivate(struct vnode *vp) vdbatch_enqueue(vp); } +static void __noinline +vdropl_final(struct vnode *vp) +{ + + ASSERT_VI_LOCKED(vp, __func__); + VNPASS(VN_IS_DOOMED(vp), vp); + /* + * Set the VHOLD_NO_SMR flag. + * + * We may be racing against vhold_smr. If they win we can just pretend + * we never got this far, they will vdrop later. + */ + if (__predict_false(!atomic_cmpset_int(&vp->v_holdcnt, 0, VHOLD_NO_SMR))) { + vn_freevnodes_inc(); + VI_UNLOCK(vp); + /* + * We lost the aforementioned race. Any subsequent access is + * invalid as they might have managed to vdropl on their own. + */ + return; + } + /* + * Don't bump freevnodes as this one is going away. + */ + freevnode(vp); +} + void vdrop(struct vnode *vp) { @@ -3469,25 +3496,7 @@ vdropl(struct vnode *vp) */ return; } - /* - * Set the VHOLD_NO_SMR flag. - * - * We may be racing against vhold_smr. If they win we can just pretend - * we never got this far, they will vdrop later. - */ - if (__predict_false(!atomic_cmpset_int(&vp->v_holdcnt, 0, VHOLD_NO_SMR))) { - vn_freevnodes_inc(); - VI_UNLOCK(vp); - /* - * We lost the aforementioned race. Any subsequent access is - * invalid as they might have managed to vdropl on their own. - */ - return; - } - /* - * Don't bump freevnodes as this one is going away. - */ - freevnode(vp); + vdropl_final(vp); } /* From owner-svn-src-all@freebsd.org Sun Aug 23 21:05:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4DB623CAF7E; Sun, 23 Aug 2020 21:05:07 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZSSg1QVTz4WRJ; Sun, 23 Aug 2020 21:05:07 +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 14720DA87; Sun, 23 Aug 2020 21:05:07 +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 07NL56Yh047578; Sun, 23 Aug 2020 21:05:06 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NL56l5047577; Sun, 23 Aug 2020 21:05:06 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008232105.07NL56l5047577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 23 Aug 2020 21:05:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364539 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364539 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:05:07 -0000 Author: mjg Date: Sun Aug 23 21:05:06 2020 New Revision: 364539 URL: https://svnweb.freebsd.org/changeset/base/364539 Log: vfs: support denying access in vaccess_vexec_smr Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Aug 23 21:04:35 2020 (r364538) +++ head/sys/kern/vfs_subr.c Sun Aug 23 21:05:06 2020 (r364539) @@ -5041,8 +5041,6 @@ vn_isdisk(struct vnode *vp) /* * VOP_FPLOOKUP_VEXEC routines are subject to special circumstances, see * the comment above cache_fplookup for details. - * - * We never deny as priv_check_cred calls are not yet supported, see vaccess. */ int vaccess_vexec_smr(mode_t file_mode, uid_t file_uid, gid_t file_gid, struct ucred *cred) @@ -5054,20 +5052,32 @@ vaccess_vexec_smr(mode_t file_mode, uid_t file_uid, gi if (cred->cr_uid == file_uid) { if (file_mode & S_IXUSR) return (0); - return (EAGAIN); + goto out_error; } /* Otherwise, check the groups (first match) */ if (groupmember(file_gid, cred)) { if (file_mode & S_IXGRP) return (0); - return (EAGAIN); + goto out_error; } /* Otherwise, check everyone else. */ if (file_mode & S_IXOTH) return (0); - return (EAGAIN); +out_error: + /* + * Permission check failed. + * + * vaccess() calls priv_check_cred which in turn can descent into MAC + * modules overriding this result. It's quite unclear what semantics + * are allowed for them to operate, thus for safety we don't call them + * from within the SMR section. This also means if any such modules + * are present, we have to let the regular lookup decide. + */ + if (__predict_false(mac_priv_check_fp_flag || mac_priv_grant_fp_flag)) + return (EAGAIN); + return (EACCES); } /* From owner-svn-src-all@freebsd.org Sun Aug 23 21:05:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 085D63CB198; Sun, 23 Aug 2020 21:05:40 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZSTH6WnLz4WYL; Sun, 23 Aug 2020 21:05:39 +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 C402FDA12; Sun, 23 Aug 2020 21:05:39 +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 07NL5dNd047652; Sun, 23 Aug 2020 21:05:39 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NL5dKx047651; Sun, 23 Aug 2020 21:05:39 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008232105.07NL5dKx047651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 23 Aug 2020 21:05:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364540 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 364540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:05:40 -0000 Author: mjg Date: Sun Aug 23 21:05:39 2020 New Revision: 364540 URL: https://svnweb.freebsd.org/changeset/base/364540 Log: vfs: convert nameiop into an enum While here change the field size from long to int and move it into the gap next to cn_flags. Shrinks struct componentname from 64 to 56 bytes on amd64. Modified: head/sys/kern/vfs_lookup.c head/sys/sys/namei.h Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Sun Aug 23 21:05:06 2020 (r364539) +++ head/sys/kern/vfs_lookup.c Sun Aug 23 21:05:39 2020 (r364540) @@ -484,10 +484,6 @@ namei(struct nameidata *ndp) td = cnp->cn_thread; ndp->ni_cnd.cn_cred = ndp->ni_cnd.cn_thread->td_ucred; KASSERT(cnp->cn_cred && td->td_proc, ("namei: bad cred/proc")); - KASSERT((cnp->cn_nameiop & (~OPMASK)) == 0, - ("namei: nameiop contaminated with flags")); - KASSERT((cnp->cn_flags & OPMASK) == 0, - ("namei: flags contaminated with nameiops")); KASSERT((cnp->cn_flags & NAMEI_INTERNAL_FLAGS) == 0, ("namei: unexpected flags: %" PRIx64 "\n", cnp->cn_flags & NAMEI_INTERNAL_FLAGS)); Modified: head/sys/sys/namei.h ============================================================================== --- head/sys/sys/namei.h Sun Aug 23 21:05:06 2020 (r364539) +++ head/sys/sys/namei.h Sun Aug 23 21:05:39 2020 (r364540) @@ -40,14 +40,16 @@ #include #include +enum nameiop { LOOKUP, CREATE, DELETE, RENAME }; + struct componentname { /* * Arguments to lookup. */ - u_long cn_nameiop; /* namei operation */ u_int64_t cn_flags; /* flags to namei */ struct thread *cn_thread;/* thread requesting lookup */ struct ucred *cn_cred; /* credentials */ + enum nameiop cn_nameiop; /* namei operation */ int cn_lkflags; /* Lock flags LK_EXCLUSIVE or LK_SHARED */ /* * Shared between lookup and commit routines. @@ -115,13 +117,10 @@ int cache_fplookup(struct nameidata *ndp, enum cache_f struct pwd **pwdp); /* - * namei operations + * Flags for namei. + * + * If modifying the list make sure to check whether NDVALIDATE needs updating. */ -#define LOOKUP 0 /* perform name lookup only */ -#define CREATE 1 /* setup for file creation */ -#define DELETE 2 /* setup for file deletion */ -#define RENAME 3 /* setup for file renaming */ -#define OPMASK 3 /* mask for operation */ /* * namei operational modifier flags, stored in ni_cnd.flags */ From owner-svn-src-all@freebsd.org Sun Aug 23 21:05:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A707E3CB0BD; Sun, 23 Aug 2020 21:05:55 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZSTb40rqz4WWY; Sun, 23 Aug 2020 21:05:55 +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 6E3F5DA89; Sun, 23 Aug 2020 21:05:55 +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 07NL5tUQ047717; Sun, 23 Aug 2020 21:05:55 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NL5sWt047714; Sun, 23 Aug 2020 21:05:54 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232105.07NL5sWt047714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364541 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:05:55 -0000 Author: tuexen Date: Sun Aug 23 21:05:54 2020 New Revision: 364541 URL: https://svnweb.freebsd.org/changeset/base/364541 Log: MFC r357501: Remove unused timer. Modified: stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctp_structs.h stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 21:05:39 2020 (r364540) +++ stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 21:05:54 2020 (r364541) @@ -2743,7 +2743,6 @@ sctp_move_pcb_and_assoc(struct sctp_inpcb *old_inp, st stcb->asoc.strreset_timer.ep = (void *)new_inp; stcb->asoc.shut_guard_timer.ep = (void *)new_inp; stcb->asoc.autoclose_timer.ep = (void *)new_inp; - stcb->asoc.delayed_event_timer.ep = (void *)new_inp; stcb->asoc.delete_prim_timer.ep = (void *)new_inp; /* now what about the nets? */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { @@ -4404,7 +4403,6 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockadd SCTP_OS_TIMER_INIT(&asoc->asconf_timer.timer); SCTP_OS_TIMER_INIT(&asoc->shut_guard_timer.timer); SCTP_OS_TIMER_INIT(&asoc->autoclose_timer.timer); - SCTP_OS_TIMER_INIT(&asoc->delayed_event_timer.timer); SCTP_OS_TIMER_INIT(&asoc->delete_prim_timer.timer); LIST_INSERT_HEAD(&inp->sctp_asoc_list, stcb, sctp_tcblist); @@ -4778,8 +4776,6 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc asoc->autoclose_timer.self = NULL; (void)SCTP_OS_TIMER_STOP(&asoc->shut_guard_timer.timer); asoc->shut_guard_timer.self = NULL; - (void)SCTP_OS_TIMER_STOP(&asoc->delayed_event_timer.timer); - asoc->delayed_event_timer.self = NULL; /* Mobility adaptation */ (void)SCTP_OS_TIMER_STOP(&asoc->delete_prim_timer.timer); asoc->delete_prim_timer.self = NULL; @@ -4964,7 +4960,6 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc (void)SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer); (void)SCTP_OS_TIMER_STOP(&asoc->shut_guard_timer.timer); (void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->delayed_event_timer.timer); TAILQ_FOREACH(net, &asoc->nets, sctp_next) { (void)SCTP_OS_TIMER_STOP(&net->rxt_timer.timer); (void)SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer); Modified: stable/12/sys/netinet/sctp_structs.h ============================================================================== --- stable/12/sys/netinet/sctp_structs.h Sun Aug 23 21:05:39 2020 (r364540) +++ stable/12/sys/netinet/sctp_structs.h Sun Aug 23 21:05:54 2020 (r364541) @@ -806,7 +806,6 @@ struct sctp_association { struct sctp_timer strreset_timer; /* stream reset */ struct sctp_timer shut_guard_timer; /* shutdown guard */ struct sctp_timer autoclose_timer; /* automatic close timer */ - struct sctp_timer delayed_event_timer; /* timer for delayed events */ struct sctp_timer delete_prim_timer; /* deleting primary dst */ /* list of restricted local addresses */ Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 21:05:39 2020 (r364540) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 21:05:54 2020 (r364541) @@ -789,7 +789,6 @@ sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb) (void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer); (void)SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer); (void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->delayed_event_timer.timer); TAILQ_FOREACH(net, &asoc->nets, sctp_next) { (void)SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer); (void)SCTP_OS_TIMER_STOP(&net->hb_timer.timer); From owner-svn-src-all@freebsd.org Sun Aug 23 21:06:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7EFAD3CB25F; Sun, 23 Aug 2020 21:06:42 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZSVV2PmHz4WqG; Sun, 23 Aug 2020 21:06:42 +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 36375D454; Sun, 23 Aug 2020 21:06:42 +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 07NL6giR047821; Sun, 23 Aug 2020 21:06:42 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NL6f4V047820; Sun, 23 Aug 2020 21:06:41 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008232106.07NL6f4V047820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 23 Aug 2020 21:06:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364542 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 364542 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:06:42 -0000 Author: mjg Date: Sun Aug 23 21:06:41 2020 New Revision: 364542 URL: https://svnweb.freebsd.org/changeset/base/364542 Log: vfs: validate ndp state after the lookup The intent is to remove known-to-be-nops NDFREE calls after many lookups. Modified: head/sys/kern/vfs_lookup.c head/sys/sys/namei.h Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Sun Aug 23 21:05:54 2020 (r364541) +++ head/sys/kern/vfs_lookup.c Sun Aug 23 21:06:41 2020 (r364542) @@ -482,6 +482,15 @@ namei(struct nameidata *ndp) cnp = &ndp->ni_cnd; td = cnp->cn_thread; +#ifdef INVARIANTS + /* + * For NDVALIDATE. + * + * While NDINIT may seem like a more natural place to do it, there are + * callers which directly modify flags past invoking init. + */ + cnp->cn_origflags = cnp->cn_flags; +#endif ndp->ni_cnd.cn_cred = ndp->ni_cnd.cn_thread->td_ucred; KASSERT(cnp->cn_cred && td->td_proc, ("namei: bad cred/proc")); KASSERT((cnp->cn_flags & NAMEI_INTERNAL_FLAGS) == 0, @@ -542,6 +551,8 @@ namei(struct nameidata *ndp) __assert_unreachable(); break; case CACHE_FPL_STATUS_HANDLED: + if (error == 0) + NDVALIDATE(ndp); return (error); case CACHE_FPL_STATUS_PARTIAL: TAILQ_INIT(&ndp->ni_cap_tracker); @@ -584,6 +595,8 @@ namei(struct nameidata *ndp) SDT_PROBE3(vfs, namei, lookup, return, error, (error == 0 ? ndp->ni_vp : NULL), false); pwd_drop(pwd); + if (error == 0) + NDVALIDATE(ndp); return (error); } if (ndp->ni_loopcnt++ >= MAXSYMLINKS) { @@ -1432,6 +1445,68 @@ void ndp->ni_startdir = NULL; } } + +#ifdef INVARIANTS +/* + * Validate the final state of ndp after the lookup. + * + * Historically filesystems were allowed to modify cn_flags. Most notably they + * can add SAVENAME to the request, resulting in HASBUF and pushing subsequent + * clean up to the consumer. In practice this seems to only concern != LOOKUP + * operations. + * + * As a step towards stricter API contract this routine validates the state to + * clean up. Note validation is a work in progress with the intent of becoming + * stricter over time. + */ +#define NDMODIFYINGFLAGS (LOCKLEAF | LOCKPARENT | WANTPARENT | SAVENAME | SAVESTART | HASBUF) +void +NDVALIDATE(struct nameidata *ndp) +{ + struct componentname *cnp; + u_int64_t used, orig; + + cnp = &ndp->ni_cnd; + orig = cnp->cn_origflags; + used = cnp->cn_flags; + switch (cnp->cn_nameiop) { + case LOOKUP: + /* + * For plain lookup we require strict conformance -- nothing + * to clean up if it was not requested by the caller. + */ + orig &= NDMODIFYINGFLAGS; + used &= NDMODIFYINGFLAGS; + if ((orig & (SAVENAME | SAVESTART)) != 0) + orig |= HASBUF; + if (orig != used) { + goto out_mismatch; + } + break; + case CREATE: + case DELETE: + case RENAME: + /* + * Some filesystems set SAVENAME to provoke HASBUF, accomodate + * for it until it gets fixed. + */ + orig &= NDMODIFYINGFLAGS; + orig |= (SAVENAME | HASBUF); + used &= NDMODIFYINGFLAGS; + used |= (SAVENAME | HASBUF); + if (orig != used) { + goto out_mismatch; + } + break; + } + return; +out_mismatch: + panic("%s: mismatched flags for op %d: added %" PRIx64 ", " + "removed %" PRIx64" (%" PRIx64" != %" PRIx64"; stored %" PRIx64" != %" PRIx64")", + __func__, cnp->cn_nameiop, used & ~orig, orig &~ used, + orig, used, cnp->cn_origflags, cnp->cn_flags); +} +#endif /* * Determine if there is a suitable alternate filename under the specified Modified: head/sys/sys/namei.h ============================================================================== --- head/sys/sys/namei.h Sun Aug 23 21:05:54 2020 (r364541) +++ head/sys/sys/namei.h Sun Aug 23 21:06:41 2020 (r364542) @@ -46,6 +46,7 @@ struct componentname { /* * Arguments to lookup. */ + u_int64_t cn_origflags; /* flags to namei */ u_int64_t cn_flags; /* flags to namei */ struct thread *cn_thread;/* thread requesting lookup */ struct ucred *cn_cred; /* credentials */ @@ -250,6 +251,12 @@ void NDFREE(struct nameidata *, const u_int); else \ NDFREE(_ndp, flags); \ } while (0) + +#ifdef INVARIANTS +void NDVALIDATE(struct nameidata *); +#else +#define NDVALIDATE(ndp) do { } while (0) +#endif int namei(struct nameidata *ndp); int lookup(struct nameidata *ndp); From owner-svn-src-all@freebsd.org Sun Aug 23 21:07:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36CD23CB41A; Sun, 23 Aug 2020 21:07:41 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZSWd0mfTz4X6k; Sun, 23 Aug 2020 21:07:41 +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 F1DD9D3ED; Sun, 23 Aug 2020 21:07:40 +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 07NL7eES047945; Sun, 23 Aug 2020 21:07:40 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NL7dGF047940; Sun, 23 Aug 2020 21:07:39 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232107.07NL7dGF047940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364543 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364543 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:07:41 -0000 Author: tuexen Date: Sun Aug 23 21:07:39 2020 New Revision: 364543 URL: https://svnweb.freebsd.org/changeset/base/364543 Log: MFC r357705: Cleanup timer handling. Modified: stable/12/sys/netinet/sctp_indata.c stable/12/sys/netinet/sctp_output.c stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctputil.c stable/12/sys/netinet/sctputil.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_indata.c ============================================================================== --- stable/12/sys/netinet/sctp_indata.c Sun Aug 23 21:06:41 2020 (r364542) +++ stable/12/sys/netinet/sctp_indata.c Sun Aug 23 21:07:39 2020 (r364543) @@ -2663,7 +2663,8 @@ sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap) * is pending, we got our first packet OR * there are gaps or duplicates. */ - (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_INDATA + SCTP_LOC_19); sctp_send_sack(stcb, SCTP_SO_NOT_LOCKED); } } else { Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Sun Aug 23 21:06:41 2020 (r364542) +++ stable/12/sys/netinet/sctp_output.c Sun Aug 23 21:07:39 2020 (r364543) @@ -10074,7 +10074,8 @@ do_it_again: */ if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { sctp_send_sack(stcb, so_locked); - (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_3); } while (asoc->sent_queue_retran_cnt) { /*- @@ -10603,7 +10604,7 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked if (stcb->asoc.delayed_ack) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, - SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_3); + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_4); sctp_timer_start(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL); } else { @@ -10672,7 +10673,7 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked if (stcb->asoc.delayed_ack) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, - SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_4); + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_5); sctp_timer_start(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL); } else { @@ -12834,7 +12835,7 @@ sctp_lower_sosend(struct socket *so, if (control) { if (sctp_process_cmsgs_for_init(stcb, control, &error)) { sctp_free_assoc(inp, stcb, SCTP_PCBFREE_FORCE, - SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_5); + SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_6); hold_tcblock = 0; stcb = NULL; goto out_unlocked; Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 21:06:41 2020 (r364542) +++ stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 21:07:39 2020 (r364543) @@ -3544,7 +3544,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, } if (cnt) { /* Ok we have someone out there that will kill us */ - (void)SCTP_OS_TIMER_STOP(&inp->sctp_ep.signature_change.timer); #ifdef SCTP_LOG_CLOSING sctp_log_closing(inp, NULL, 3); #endif @@ -3563,7 +3562,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, if ((inp->refcount) || (being_refed) || (inp->sctp_flags & SCTP_PCB_FLAGS_CLOSE_IP)) { - (void)SCTP_OS_TIMER_STOP(&inp->sctp_ep.signature_change.timer); #ifdef SCTP_LOG_CLOSING sctp_log_closing(inp, NULL, 4); #endif @@ -4758,35 +4756,8 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc return (0); } } - /* now clean up any other timers */ - (void)SCTP_OS_TIMER_STOP(&asoc->dack_timer.timer); - asoc->dack_timer.self = NULL; - (void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer); - /*- - * For stream reset we don't blast this unless - * it is a str-reset timer, it might be the - * free-asoc timer which we DON'T want to - * disturb. - */ - if (asoc->strreset_timer.type == SCTP_TIMER_TYPE_STRRESET) - asoc->strreset_timer.self = NULL; - (void)SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer); - asoc->asconf_timer.self = NULL; - (void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer); - asoc->autoclose_timer.self = NULL; - (void)SCTP_OS_TIMER_STOP(&asoc->shut_guard_timer.timer); - asoc->shut_guard_timer.self = NULL; - /* Mobility adaptation */ - (void)SCTP_OS_TIMER_STOP(&asoc->delete_prim_timer.timer); - asoc->delete_prim_timer.self = NULL; - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - (void)SCTP_OS_TIMER_STOP(&net->rxt_timer.timer); - net->rxt_timer.self = NULL; - (void)SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer); - net->pmtu_timer.self = NULL; - (void)SCTP_OS_TIMER_STOP(&net->hb_timer.timer); - net->hb_timer.self = NULL; - } + /* Now clean up any other timers */ + sctp_stop_association_timers(stcb, false); /* Now the read queue needs to be cleaned up (only once) */ if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0) { SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_ABOUT_TO_BE_FREED); @@ -4954,19 +4925,8 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc /* * Now restop the timers to be sure this is paranoia at is finest! */ - (void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->dack_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->shut_guard_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer); - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - (void)SCTP_OS_TIMER_STOP(&net->rxt_timer.timer); - (void)SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer); - (void)SCTP_OS_TIMER_STOP(&net->hb_timer.timer); - } + sctp_stop_association_timers(stcb, true); - asoc->strreset_timer.type = SCTP_TIMER_TYPE_NONE; /* * The chunk lists and such SHOULD be empty but we check them just * in case. @@ -7030,7 +6990,8 @@ sctp_drain_mbufs(struct sctp_tcb *stcb) * asoc->highest_tsn_inside_map? */ asoc->last_revoke_count = cnt; - (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, + SCTP_FROM_SCTP_PCB + SCTP_LOC_16); /* sa_ignore NO_NULL_CHK */ sctp_send_sack(stcb, SCTP_SO_NOT_LOCKED); sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_DRAIN, SCTP_SO_NOT_LOCKED); Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 21:06:41 2020 (r364542) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 21:07:39 2020 (r364543) @@ -780,18 +780,66 @@ sctp_audit_log(uint8_t ev, uint8_t fd) void sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb) { - struct sctp_association *asoc; + struct sctp_inpcb *inp; struct sctp_nets *net; - asoc = &stcb->asoc; + inp = stcb->sctp_ep; - (void)SCTP_OS_TIMER_STOP(&asoc->dack_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer); - (void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer); - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - (void)SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer); - (void)SCTP_OS_TIMER_STOP(&net->hb_timer.timer); + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_12); + sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_13); + sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_14); + sctp_timer_stop(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_15); + TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { + sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_16); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_17); + } +} + +void +sctp_stop_association_timers(struct sctp_tcb *stcb, bool stop_assoc_kill_timer) +{ + struct sctp_inpcb *inp; + struct sctp_nets *net; + + inp = stcb->sctp_ep; + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_18); + sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_19); + if (stop_assoc_kill_timer) { + sctp_timer_stop(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_20); + } + sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_21); + sctp_timer_stop(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_22); + sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWNGUARD, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_23); + /* Mobility adaptation */ + sctp_timer_stop(SCTP_TIMER_TYPE_PRIM_DELETED, inp, stcb, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_24); + TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { + sctp_timer_stop(SCTP_TIMER_TYPE_SEND, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_25); + sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_26); + sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_27); + sctp_timer_stop(SCTP_TIMER_TYPE_COOKIE, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_28); + sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWNACK, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_29); + sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_30); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, + SCTP_FROM_SCTPUTIL + SCTP_LOC_31); } } Modified: stable/12/sys/netinet/sctputil.h ============================================================================== --- stable/12/sys/netinet/sctputil.h Sun Aug 23 21:06:41 2020 (r364542) +++ stable/12/sys/netinet/sctputil.h Sun Aug 23 21:07:39 2020 (r364543) @@ -164,6 +164,9 @@ sctp_pull_off_control_to_new_inp(struct sctp_inpcb *ol void sctp_stop_timers_for_shutdown(struct sctp_tcb *); +/* Stop all timers for association and remote addresses. */ +void sctp_stop_association_timers(struct sctp_tcb *, bool); + void sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) From owner-svn-src-all@freebsd.org Sun Aug 23 21:10:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D9DDE3CB3F5; Sun, 23 Aug 2020 21:10:24 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZSZm5QV0z4X3s; Sun, 23 Aug 2020 21:10:24 +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 9D885D99B; Sun, 23 Aug 2020 21:10:24 +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 07NLAOxY048221; Sun, 23 Aug 2020 21:10:24 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLAOHA048219; Sun, 23 Aug 2020 21:10:24 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232110.07NLAOHA048219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:10:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364544 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:10:24 -0000 Author: tuexen Date: Sun Aug 23 21:10:24 2020 New Revision: 364544 URL: https://svnweb.freebsd.org/changeset/base/364544 Log: MFC r357708: Stop the PMTU and HB timer when removing a net, not when freeing it. Modified: stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctp_var.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 21:07:39 2020 (r364543) +++ stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 21:10:24 2020 (r364544) @@ -4422,8 +4422,10 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockadd void sctp_remove_net(struct sctp_tcb *stcb, struct sctp_nets *net) { + struct sctp_inpcb *inp; struct sctp_association *asoc; + inp = stcb->sctp_ep; asoc = &stcb->asoc; asoc->numnets--; TAILQ_REMOVE(&asoc->nets, net, sctp_next); @@ -4471,6 +4473,10 @@ out: sctp_free_remote_addr(stcb->asoc.alternate); stcb->asoc.alternate = NULL; } + sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, + SCTP_FROM_SCTP_PCB + SCTP_LOC_9); + sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, + SCTP_FROM_SCTP_PCB + SCTP_LOC_10); sctp_free_remote_addr(net); } @@ -6991,7 +6997,7 @@ sctp_drain_mbufs(struct sctp_tcb *stcb) */ asoc->last_revoke_count = cnt; sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, - SCTP_FROM_SCTP_PCB + SCTP_LOC_16); + SCTP_FROM_SCTP_PCB + SCTP_LOC_11); /* sa_ignore NO_NULL_CHK */ sctp_send_sack(stcb, SCTP_SO_NOT_LOCKED); sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_DRAIN, SCTP_SO_NOT_LOCKED); Modified: stable/12/sys/netinet/sctp_var.h ============================================================================== --- stable/12/sys/netinet/sctp_var.h Sun Aug 23 21:07:39 2020 (r364543) +++ stable/12/sys/netinet/sctp_var.h Sun Aug 23 21:10:24 2020 (r364544) @@ -187,8 +187,6 @@ extern struct pr_usrreqs sctp_usrreqs; if ((__net)) { \ if (SCTP_DECREMENT_AND_CHECK_REFCOUNT(&(__net)->ref_count)) { \ (void)SCTP_OS_TIMER_STOP(&(__net)->rxt_timer.timer); \ - (void)SCTP_OS_TIMER_STOP(&(__net)->pmtu_timer.timer); \ - (void)SCTP_OS_TIMER_STOP(&(__net)->hb_timer.timer); \ if ((__net)->ro.ro_rt) { \ RTFREE((__net)->ro.ro_rt); \ (__net)->ro.ro_rt = NULL; \ From owner-svn-src-all@freebsd.org Sun Aug 23 21:12:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AB903CB7B3; Sun, 23 Aug 2020 21:12:38 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZSdL2FDLz4XZT; Sun, 23 Aug 2020 21:12:38 +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 31561DAB5; Sun, 23 Aug 2020 21:12:38 +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 07NLCcbG054018; Sun, 23 Aug 2020 21:12:38 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLCbKM054016; Sun, 23 Aug 2020 21:12:37 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232112.07NLCbKM054016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364545 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364545 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:12:38 -0000 Author: tuexen Date: Sun Aug 23 21:12:37 2020 New Revision: 364545 URL: https://svnweb.freebsd.org/changeset/base/364545 Log: MFC r357768: Don't start an SCTP timer using a net, which has been removed. Modified: stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 21:10:24 2020 (r364544) +++ stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 21:12:37 2020 (r364545) @@ -4477,6 +4477,7 @@ out: SCTP_FROM_SCTP_PCB + SCTP_LOC_9); sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, SCTP_FROM_SCTP_PCB + SCTP_LOC_10); + net->dest_state |= SCTP_ADDR_BEING_DELETED; sctp_free_remote_addr(net); } Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 21:10:24 2020 (r364544) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 21:12:37 2020 (r364545) @@ -2050,6 +2050,10 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s if (stcb) { SCTP_TCB_LOCK_ASSERT(stcb); } + /* Don't restart timer on net that's been removed. */ + if (net != NULL && (net->dest_state & SCTP_ADDR_BEING_DELETED)) { + return; + } switch (t_type) { case SCTP_TIMER_TYPE_ADDR_WQ: /* Only 1 tick away :-) */ From owner-svn-src-all@freebsd.org Sun Aug 23 21:19:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5ED913CB671; Sun, 23 Aug 2020 21:19:18 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZSn21pN1z4Xvg; Sun, 23 Aug 2020 21:19:18 +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 22244DA34; Sun, 23 Aug 2020 21:19:18 +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 07NLJHja054436; Sun, 23 Aug 2020 21:19:17 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLJH0C054435; Sun, 23 Aug 2020 21:19:17 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232119.07NLJH0C054435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364546 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364546 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:19:18 -0000 Author: tuexen Date: Sun Aug 23 21:19:17 2020 New Revision: 364546 URL: https://svnweb.freebsd.org/changeset/base/364546 Log: MFC r357830: Don't panic under INVARIANTS when we can't allocate memory for storing a vtag in time wait. This issue was found by running syzkaller. Modified: stable/12/sys/netinet/sctp_pcb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 21:12:37 2020 (r364545) +++ stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 21:19:17 2020 (r364546) @@ -4631,9 +4631,6 @@ sctp_add_vtag_to_timewait(uint32_t tag, uint32_t time, SCTP_MALLOC(twait_block, struct sctp_tagblock *, sizeof(struct sctp_tagblock), SCTP_M_TIMW); if (twait_block == NULL) { -#ifdef INVARIANTS - panic("Can not alloc tagblock"); -#endif return; } memset(twait_block, 0, sizeof(struct sctp_tagblock)); From owner-svn-src-all@freebsd.org Sun Aug 23 21:22:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A19C43CBC8B; Sun, 23 Aug 2020 21:22:14 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZSrQ3sS5z4Y4v; Sun, 23 Aug 2020 21:22:14 +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 6838DDAD6; Sun, 23 Aug 2020 21:22:14 +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 07NLMEfY059484; Sun, 23 Aug 2020 21:22:14 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLMEbO059483; Sun, 23 Aug 2020 21:22:14 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232122.07NLMEbO059483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364547 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:22:14 -0000 Author: tuexen Date: Sun Aug 23 21:22:13 2020 New Revision: 364547 URL: https://svnweb.freebsd.org/changeset/base/364547 Log: MFC r358028: Fix the non-default stream schedulers such that do not interleave user messages when it is now allowed. Thanks to Christian Wright for reporting the issue for the userland stack and providing a fix for the priority scheduler. Modified: stable/12/sys/netinet/sctp_ss_functions.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_ss_functions.c ============================================================================== --- stable/12/sys/netinet/sctp_ss_functions.c Sun Aug 23 21:19:17 2020 (r364546) +++ stable/12/sys/netinet/sctp_ss_functions.c Sun Aug 23 21:22:13 2020 (r364547) @@ -517,6 +517,9 @@ sctp_ss_prio_select(struct sctp_tcb *stcb SCTP_UNUSED, { struct sctp_stream_out *strq, *strqt, *strqn; + if (asoc->ss_data.locked_on_sending) { + return (asoc->ss_data.locked_on_sending); + } strqt = asoc->ss_data.last_out_stream; prio_again: /* Find the next stream to use */ @@ -694,6 +697,9 @@ sctp_ss_fb_select(struct sctp_tcb *stcb SCTP_UNUSED, s { struct sctp_stream_out *strq = NULL, *strqt; + if (asoc->ss_data.locked_on_sending) { + return (asoc->ss_data.locked_on_sending); + } if (asoc->ss_data.last_out_stream == NULL || TAILQ_FIRST(&asoc->ss_data.out.wheel) == TAILQ_LAST(&asoc->ss_data.out.wheel, sctpwheel_listhead)) { strqt = TAILQ_FIRST(&asoc->ss_data.out.wheel); @@ -900,6 +906,9 @@ sctp_ss_fcfs_select(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_stream_out *strq; struct sctp_stream_queue_pending *sp; + if (asoc->ss_data.locked_on_sending) { + return (asoc->ss_data.locked_on_sending); + } sp = TAILQ_FIRST(&asoc->ss_data.out.list); default_again: if (sp != NULL) { From owner-svn-src-all@freebsd.org Sun Aug 23 21:23:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6232A3CBB49; Sun, 23 Aug 2020 21:23:46 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZStB1x1Dz4Y5f; Sun, 23 Aug 2020 21:23:46 +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 262FDDD1E; Sun, 23 Aug 2020 21:23:46 +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 07NLNkxd060348; Sun, 23 Aug 2020 21:23:46 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLNkWn060347; Sun, 23 Aug 2020 21:23:46 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232123.07NLNkWn060347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364548 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364548 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:23:46 -0000 Author: tuexen Date: Sun Aug 23 21:23:45 2020 New Revision: 364548 URL: https://svnweb.freebsd.org/changeset/base/364548 Log: MFC r358080: Remove unused function. Modified: stable/12/sys/netinet/sctp_bsd_addr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_bsd_addr.c ============================================================================== --- stable/12/sys/netinet/sctp_bsd_addr.c Sun Aug 23 21:22:13 2020 (r364547) +++ stable/12/sys/netinet/sctp_bsd_addr.c Sun Aug 23 21:23:45 2020 (r364548) @@ -362,23 +362,6 @@ sctp_addr_change_event_handler(void *arg __unused, str sctp_addr_change(ifa, cmd); } -void - sctp_add_or_del_interfaces(int (*pred) (struct ifnet *), int add){ - struct ifnet *ifn; - struct ifaddr *ifa; - - IFNET_RLOCK(); - CK_STAILQ_FOREACH(ifn, &MODULE_GLOBAL(ifnet), if_link) { - if (!(*pred) (ifn)) { - continue; - } - CK_STAILQ_FOREACH(ifa, &ifn->if_addrhead, ifa_link) { - sctp_addr_change(ifa, add ? RTM_ADD : RTM_DELETE); - } - } - IFNET_RUNLOCK(); -} - struct mbuf * sctp_get_mbuf_for_msg(unsigned int space_needed, int want_header, int how, int allonebuf, int type) From owner-svn-src-all@freebsd.org Sun Aug 23 21:27:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 137123CBF64; Sun, 23 Aug 2020 21:27:55 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZSyy6kkcz4YWQ; Sun, 23 Aug 2020 21:27:54 +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 CB1B4DBDA; Sun, 23 Aug 2020 21:27:54 +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 07NLRs3K060602; Sun, 23 Aug 2020 21:27:54 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLRs1X060601; Sun, 23 Aug 2020 21:27:54 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232127.07NLRs1X060601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:27:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364549 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364549 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:27:55 -0000 Author: tuexen Date: Sun Aug 23 21:27:54 2020 New Revision: 364549 URL: https://svnweb.freebsd.org/changeset/base/364549 Log: MFC r358169: Remove an unused timer type. Modified: stable/12/sys/netinet/sctp_constants.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_constants.h ============================================================================== --- stable/12/sys/netinet/sctp_constants.h Sun Aug 23 21:23:45 2020 (r364548) +++ stable/12/sys/netinet/sctp_constants.h Sun Aug 23 21:27:54 2020 (r364549) @@ -543,14 +543,13 @@ __FBSDID("$FreeBSD$"); #define SCTP_TIMER_TYPE_ASCONF 10 #define SCTP_TIMER_TYPE_SHUTDOWNGUARD 11 #define SCTP_TIMER_TYPE_AUTOCLOSE 12 -#define SCTP_TIMER_TYPE_EVENTWAKE 13 -#define SCTP_TIMER_TYPE_STRRESET 14 -#define SCTP_TIMER_TYPE_INPKILL 15 -#define SCTP_TIMER_TYPE_ASOCKILL 16 -#define SCTP_TIMER_TYPE_ADDR_WQ 17 -#define SCTP_TIMER_TYPE_PRIM_DELETED 18 +#define SCTP_TIMER_TYPE_STRRESET 13 +#define SCTP_TIMER_TYPE_INPKILL 14 +#define SCTP_TIMER_TYPE_ASOCKILL 15 +#define SCTP_TIMER_TYPE_ADDR_WQ 16 +#define SCTP_TIMER_TYPE_PRIM_DELETED 17 /* add new timers here - and increment LAST */ -#define SCTP_TIMER_TYPE_LAST 19 +#define SCTP_TIMER_TYPE_LAST 18 #define SCTP_IS_TIMER_TYPE_VALID(t) (((t) > SCTP_TIMER_TYPE_NONE) && \ ((t) < SCTP_TIMER_TYPE_LAST)) From owner-svn-src-all@freebsd.org Sun Aug 23 21:35:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 51BDC3CBDD6; Sun, 23 Aug 2020 21:35:24 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZT7c1WqXz4Yq5; Sun, 23 Aug 2020 21:35:24 +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 1747DDBF3; Sun, 23 Aug 2020 21:35:24 +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 07NLZND3066746; Sun, 23 Aug 2020 21:35:23 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLZNfF066745; Sun, 23 Aug 2020 21:35:23 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232135.07NLZNfF066745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364550 - in stable/12: lib/libc/sys sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in stable/12: lib/libc/sys sys/kern X-SVN-Commit-Revision: 364550 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:35:24 -0000 Author: tuexen Date: Sun Aug 23 21:35:23 2020 New Revision: 364550 URL: https://svnweb.freebsd.org/changeset/base/364550 Log: MFC r358965: sendfile() does currently not support SCTP sockets. Therefore, fail the call. Manually fix a compile issue. Modified: stable/12/lib/libc/sys/sendfile.2 stable/12/sys/kern/kern_sendfile.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/sendfile.2 ============================================================================== --- stable/12/lib/libc/sys/sendfile.2 Sun Aug 23 21:27:54 2020 (r364549) +++ stable/12/lib/libc/sys/sendfile.2 Sun Aug 23 21:35:23 2020 (r364550) @@ -414,3 +414,12 @@ to .Er EFAULT , if provided an invalid address for .Fa sbytes . +The +.Fn sendfile +system call does not support SCTP sockets, +it will return +.Dv -1 +and set +.Va errno +to +.Er EINVAL. Modified: stable/12/sys/kern/kern_sendfile.c ============================================================================== --- stable/12/sys/kern/kern_sendfile.c Sun Aug 23 21:27:54 2020 (r364549) +++ stable/12/sys/kern/kern_sendfile.c Sun Aug 23 21:35:23 2020 (r364550) @@ -53,6 +53,8 @@ __FBSDID("$FreeBSD$"); #include +#include + #include #include @@ -507,6 +509,12 @@ sendfile_getsock(struct thread *td, int s, struct file return (error); *so = (*sock_fp)->f_data; if ((*so)->so_type != SOCK_STREAM) + return (EINVAL); + /* + * SCTP one-to-one style sockets currently don't work with + * sendfile(). So indicate EINVAL for now. + */ + if ((*so)->so_proto->pr_protocol == IPPROTO_SCTP) return (EINVAL); if (SOLISTENING(*so)) return (ENOTCONN); From owner-svn-src-all@freebsd.org Sun Aug 23 21:37:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 11F833CC0BC; Sun, 23 Aug 2020 21:37:21 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZT9r6dpQz4ZBd; Sun, 23 Aug 2020 21:37:20 +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 C6F0FE004; Sun, 23 Aug 2020 21:37:20 +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 07NLbKXO066885; Sun, 23 Aug 2020 21:37:20 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLbKC6066884; Sun, 23 Aug 2020 21:37:20 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202008232137.07NLbKC6066884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sun, 23 Aug 2020 21:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364551 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 364551 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:37:21 -0000 Author: bz Date: Sun Aug 23 21:37:20 2020 New Revision: 364551 URL: https://svnweb.freebsd.org/changeset/base/364551 Log: net80211: set_vht_extchan() reverse order to always return best In set_vht_extchan() the checks are performed in the order of VHT20/40/80. That means if a channel has a lower and higheer VHT flag set we would return the lower first. We normally do not set more than one VHT flag so this change is supposed to be a NOP but follows the logical thinking order of returning the best first. Also we nowhere assert a single VHT flag so make sure we'll not be stuck with VHT20 when we could do more. While here add the debugging printfs for VHT160 and VHT80P80 which still need doing once we deal with a driver at that level. Reviewed by: adrian, gnn MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") Differential Revision: https://reviews.freebsd.org/D26088 Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Sun Aug 23 21:35:23 2020 (r364550) +++ head/sys/net80211/ieee80211.c Sun Aug 23 21:37:20 2020 (r364551) @@ -1168,23 +1168,17 @@ set_vht_extchan(struct ieee80211_channel *c) { int i; - if (! IEEE80211_IS_CHAN_VHT(c)) { + if (! IEEE80211_IS_CHAN_VHT(c)) return (0); - } - if (IEEE80211_IS_CHAN_VHT20(c)) { - c->ic_vht_ch_freq1 = c->ic_ieee; - return (1); + if (IEEE80211_IS_CHAN_VHT80P80(c)) { + printf("%s: TODO VHT80+80 channel (ieee=%d, flags=0x%08x)\n", + __func__, c->ic_ieee, c->ic_flags); } - if (IEEE80211_IS_CHAN_VHT40(c)) { - if (IEEE80211_IS_CHAN_HT40U(c)) - c->ic_vht_ch_freq1 = c->ic_ieee + 2; - else if (IEEE80211_IS_CHAN_HT40D(c)) - c->ic_vht_ch_freq1 = c->ic_ieee - 2; - else - return (0); - return (1); + if (IEEE80211_IS_CHAN_VHT160(c)) { + printf("%s: TODO VHT160 channel (ieee=%d, flags=0x%08x)\n", + __func__, c->ic_ieee, c->ic_flags); } if (IEEE80211_IS_CHAN_VHT80(c)) { @@ -1206,6 +1200,21 @@ set_vht_extchan(struct ieee80211_channel *c) } } return (0); + } + + if (IEEE80211_IS_CHAN_VHT40(c)) { + if (IEEE80211_IS_CHAN_HT40U(c)) + c->ic_vht_ch_freq1 = c->ic_ieee + 2; + else if (IEEE80211_IS_CHAN_HT40D(c)) + c->ic_vht_ch_freq1 = c->ic_ieee - 2; + else + return (0); + return (1); + } + + if (IEEE80211_IS_CHAN_VHT20(c)) { + c->ic_vht_ch_freq1 = c->ic_ieee; + return (1); } printf("%s: unknown VHT channel type (ieee=%d, flags=0x%08x)\n", From owner-svn-src-all@freebsd.org Sun Aug 23 21:38:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 04EAB3CBDF1; Sun, 23 Aug 2020 21:38:50 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTCY6j2Mz4ZLv; Sun, 23 Aug 2020 21:38:49 +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 C91A5DA7C; Sun, 23 Aug 2020 21:38:49 +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 07NLcn6O067012; Sun, 23 Aug 2020 21:38:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLcmsM067003; Sun, 23 Aug 2020 21:38:48 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232138.07NLcmsM067003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 21:38:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364552 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux conf i386/linux modules/linux64 X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux amd64/linux32 arm64/linux conf i386/linux modules/linux64 X-SVN-Commit-Revision: 364552 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:38:50 -0000 Author: trasz Date: Sun Aug 23 21:38:48 2020 New Revision: 364552 URL: https://svnweb.freebsd.org/changeset/base/364552 Log: MFC r350451 by emaste: linuxulator: rename linux_locore.s to .asm It is assembled using "${CC} -x assembler-with-cpp", which by convention (bsd.suffixes.mk) uses the .asm extension. This is a portion of the review referenced below (D18344). That review also renamed linux_support.s to .S, but that is a functional change (using the compiler's integrated assembler instead of as) and will be revisited separately. Sponsored by: The FreeBSD Foundation Added: stable/12/sys/amd64/linux/linux_locore.asm - copied unchanged from r350451, head/sys/amd64/linux/linux_locore.asm stable/12/sys/amd64/linux32/linux32_locore.asm - copied unchanged from r350451, head/sys/amd64/linux32/linux32_locore.asm stable/12/sys/arm64/linux/linux_locore.asm - copied unchanged from r350451, head/sys/arm64/linux/linux_locore.asm stable/12/sys/i386/linux/linux_locore.asm - copied unchanged from r350451, head/sys/i386/linux/linux_locore.asm Deleted: stable/12/sys/amd64/linux/linux_locore.s stable/12/sys/amd64/linux32/linux32_locore.s stable/12/sys/arm64/linux/linux_locore.s stable/12/sys/i386/linux/linux_locore.s Modified: stable/12/sys/conf/files.amd64 stable/12/sys/conf/files.i386 stable/12/sys/modules/linux64/Makefile Directory Properties: stable/12/ (props changed) Copied: stable/12/sys/amd64/linux/linux_locore.asm (from r350451, head/sys/amd64/linux/linux_locore.asm) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/amd64/linux/linux_locore.asm Sun Aug 23 21:38:48 2020 (r364552, copy of r350451, head/sys/amd64/linux/linux_locore.asm) @@ -0,0 +1,108 @@ +/* $FreeBSD$ */ + +#include "linux_assym.h" /* system definitions */ +#include /* miscellaneous asm macros */ + +#include /* system call numbers */ + + .data + + .globl linux_platform +linux_platform: + .asciz "x86_64" + + + .text +/* + * To avoid excess stack frame the signal trampoline code emulates + * the 'call' instruction. + */ +NON_GPROF_ENTRY(linux_rt_sigcode) + movq %rsp, %rbx /* preserve sigframe */ + call .getip +.getip: + popq %rax + add $.startrtsigcode-.getip, %rax /* ret address */ + pushq %rax + jmp *LINUX_RT_SIGF_HANDLER(%rbx) +.startrtsigcode: + movq $LINUX_SYS_linux_rt_sigreturn,%rax /* linux_rt_sigreturn() */ + syscall /* enter kernel with args */ + hlt +.endrtsigcode: +0: jmp 0b + +NON_GPROF_ENTRY(__vdso_clock_gettime) + movq $LINUX_SYS_linux_clock_gettime,%rax + syscall + ret +.weak clock_gettime +.set clock_gettime, __vdso_clock_gettime + +NON_GPROF_ENTRY(__vdso_time) + movq $LINUX_SYS_linux_time,%rax + syscall + ret +.weak time +.set time, __vdso_time + +NON_GPROF_ENTRY(__vdso_gettimeofday) + movq $LINUX_SYS_gettimeofday,%rax + syscall + ret +.weak gettimeofday +.set gettimeofday, __vdso_gettimeofday + +NON_GPROF_ENTRY(__vdso_getcpu) + movq $-38,%rax /* not implemented */ + ret +.weak getcpu +.set getcpu, __vdso_getcpu + +#if 0 + .section .note.Linux, "a",@note + .long 2f - 1f /* namesz */ + .balign 4 + .long 4f - 3f /* descsz */ + .long 0 +1: + .asciz "Linux" +2: + .balign 4 +3: + .long LINUX_VERSION_CODE +4: + .balign 4 + .previous +#endif + + .section .eh_frame,"a",@progbits +.LSTARTFRAMEDLSI0: + .long .LENDCIEDLSI0-.LSTARTCIEDLSI0 +.LSTARTCIEDLSI0: + .long 0 /* CIE ID */ + .byte 1 /* Version number */ + .string "zR" /* NULL-terminated + * augmentation string + */ + .uleb128 1 /* Code alignment factor */ + .sleb128 -4 /* Data alignment factor */ + .byte 8 /* Return address register column */ + .uleb128 1 /* Augmentation value length */ + .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */ + .byte 0x0c /* DW_CFA_def_cfa */ + .uleb128 4 + .uleb128 4 + .byte 0x88 /* DW_CFA_offset, column 0x8 */ + .uleb128 1 + .align 4 +.LENDCIEDLSI0: + .long .LENDFDEDLSI0-.LSTARTFDEDLSI0 /* Length FDE */ +.LSTARTFDEDLSI0: + .long .LSTARTFDEDLSI0-.LSTARTFRAMEDLSI0 /* CIE pointer */ + .long .startrtsigcode-. /* PC-relative start address */ + .long .endrtsigcode-.startrtsigcode + .uleb128 0 + .align 4 +.LENDFDEDLSI0: + .previous Copied: stable/12/sys/amd64/linux32/linux32_locore.asm (from r350451, head/sys/amd64/linux32/linux32_locore.asm) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/amd64/linux32/linux32_locore.asm Sun Aug 23 21:38:48 2020 (r364552, copy of r350451, head/sys/amd64/linux32/linux32_locore.asm) @@ -0,0 +1,156 @@ +/* $FreeBSD$ */ + +#include "linux32_assym.h" /* system definitions */ +#include /* miscellaneous asm macros */ + +#include /* system call numbers */ + +.data + + .globl linux_platform +linux_platform: + .asciz "i686" + +.text +.code32 + +/* + * To avoid excess stack frame the signal trampoline code emulates + * the 'call' instruction. + */ +NON_GPROF_ENTRY(linux32_sigcode) + movl %esp, %ebx /* preserve sigframe */ + call .getip0 +.getip0: + popl %eax + add $.startsigcode-.getip0, %eax /* ret address */ + push %eax + jmp *LINUX_SIGF_HANDLER(%ebx) +.startsigcode: + popl %eax + movl $LINUX32_SYS_linux_sigreturn,%eax /* linux_sigreturn() */ + int $0x80 /* enter kernel with args */ +.endsigcode: +0: jmp 0b + +NON_GPROF_ENTRY(linux32_rt_sigcode) + leal LINUX_RT_SIGF_UC(%esp),%ebx /* linux ucp */ + leal LINUX_RT_SIGF_SC(%ebx),%ecx /* linux sigcontext */ + movl %esp, %edi + call .getip1 +.getip1: + popl %eax + add $.startrtsigcode-.getip1, %eax /* ret address */ + push %eax + jmp *LINUX_RT_SIGF_HANDLER(%edi) +.startrtsigcode: + movl $LINUX32_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */ + int $0x80 /* enter kernel with args */ +.endrtsigcode: +0: jmp 0b + +NON_GPROF_ENTRY(linux32_vsyscall) +.startvsyscall: + int $0x80 + ret +.endvsyscall: + +#if 0 + .section .note.Linux, "a",@note + .long 2f - 1f /* namesz */ + .balign 4 + .long 4f - 3f /* descsz */ + .long 0 +1: + .asciz "Linux" +2: + .balign 4 +3: + .long LINUX_VERSION_CODE +4: + .balign 4 + .previous +#endif + +#define do_cfa_expr(offset) \ + .byte 0x0f; /* DW_CFA_def_cfa_expression */ \ + .uleb128 11f-10f; /* length */ \ +10: .byte 0x74; /* DW_OP_breg4 */ \ + .sleb128 offset; /* offset */ \ + .byte 0x06; /* DW_OP_deref */ \ +11: + + + /* CIE */ + .section .eh_frame,"a",@progbits +.LSTARTFRAMEDLSI1: + .long .LENDCIEDLSI1-.LSTARTCIEDLSI1 +.LSTARTCIEDLSI1: + .long 0 /* CIE ID */ + .byte 1 /* Version number */ + .string "zRS" /* NULL-terminated + * augmentation string + */ + .uleb128 1 /* Code alignment factor */ + .sleb128 -4 /* Data alignment factor */ + .byte 8 /* Return address + * register column + */ + .uleb128 1 /* Augmentation value length */ + .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */ + .byte 0 /* DW_CFA_nop */ + .align 4 +.LENDCIEDLSI1: + + /* FDE */ + .long .LENDFDEDLSI1-.LSTARTFDEDLSI1 /* Length FDE */ +.LSTARTFDEDLSI1: + .long .LSTARTFDEDLSI1-.LSTARTFRAMEDLSI1 /* CIE pointer */ + .long .startsigcode-. /* PC-relative start address */ + .long .endsigcode-.startsigcode + .uleb128 0 /* Augmentation */ + do_cfa_expr(LINUX_SIGF_SC-8) + .align 4 +.LENDFDEDLSI1: + + .long .LENDFDEDLSI2-.LSTARTFDEDLSI2 /* Length FDE */ +.LSTARTFDEDLSI2: + .long .LSTARTFDEDLSI2-.LSTARTFRAMEDLSI1 /* CIE pointer */ + .long .startrtsigcode-. /* PC-relative start address */ + .long .endrtsigcode-.startrtsigcode + .uleb128 0 /* Augmentation */ + do_cfa_expr(LINUX_RT_SIGF_SC-4+LINUX_SC_ESP) + .align 4 +.LENDFDEDLSI2: + .previous + + .section .eh_frame,"a",@progbits +.LSTARTFRAMEDLSI2: + .long .LENDCIEDLSI2-.LSTARTCIEDLSI2 +.LSTARTCIEDLSI2: + .long 0 /* CIE ID */ + .byte 1 /* Version number */ + .string "zR" /* NULL-terminated + * augmentation string + */ + .uleb128 1 /* Code alignment factor */ + .sleb128 -4 /* Data alignment factor */ + .byte 8 /* Return address register column */ + .uleb128 1 /* Augmentation value length */ + .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */ + .byte 0x0c /* DW_CFA_def_cfa */ + .uleb128 4 + .uleb128 4 + .byte 0x88 /* DW_CFA_offset, column 0x8 */ + .uleb128 1 + .align 4 +.LENDCIEDLSI2: + .long .LENDFDEDLSI3-.LSTARTFDEDLSI3 /* Length FDE */ +.LSTARTFDEDLSI3: + .long .LSTARTFDEDLSI3-.LSTARTFRAMEDLSI2 /* CIE pointer */ + .long .startvsyscall-. /* PC-relative start address */ + .long .endvsyscall-.startvsyscall + .uleb128 0 + .align 4 +.LENDFDEDLSI3: + .previous Copied: stable/12/sys/arm64/linux/linux_locore.asm (from r350451, head/sys/arm64/linux/linux_locore.asm) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm64/linux/linux_locore.asm Sun Aug 23 21:38:48 2020 (r364552, copy of r350451, head/sys/arm64/linux/linux_locore.asm) @@ -0,0 +1,58 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 2018 Turing Robotic Industries Inc. + * + * 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$ + */ + +/* + * arm64 Linux VDSO implementation. + */ + +#include + + .data + + .globl linux_platform +linux_platform: + .asciz "arm64" + + .text + +ENTRY(__kernel_rt_sigreturn) + brk #0 /* LINUXTODO: implement __kernel_rt_sigreturn */ + ret + +ENTRY(__kernel_gettimeofday) + brk #0 /* LINUXTODO: implement __kernel_gettimeofday */ + ret + +ENTRY(__kernel_clock_gettime) + brk #0 /* LINUXTODO: implement __kernel_clock_gettime */ + ret + +ENTRY(__kernel_clock_getres) + brk #0 /* LINUXTODO: implement __kernel_clock_getres */ + ret Modified: stable/12/sys/conf/files.amd64 ============================================================================== --- stable/12/sys/conf/files.amd64 Sun Aug 23 21:37:20 2020 (r364551) +++ stable/12/sys/conf/files.amd64 Sun Aug 23 21:38:48 2020 (r364552) @@ -45,7 +45,7 @@ linux32_assym.h optional compat_linux32 \ clean "linux32_assym.h" # linux32_locore.o optional compat_linux32 \ - dependency "linux32_assym.h $S/amd64/linux32/linux32_locore.s" \ + dependency "linux32_assym.h $S/amd64/linux32/linux32_locore.asm" \ compile-with "${CC} -x assembler-with-cpp -DLOCORE -m32 -shared -s -pipe -I. -I$S ${WERROR} -Wall -fPIC -fno-common -nostdinc -nostdlib -Wl,-T$S/amd64/linux32/linux32_vdso.lds.s -Wl,-soname=linux32_vdso.so,--eh-frame-hdr,-warn-common ${.IMPSRC} -o ${.TARGET}" \ no-obj no-implicit-rule \ clean "linux32_locore.o" Modified: stable/12/sys/conf/files.i386 ============================================================================== --- stable/12/sys/conf/files.i386 Sun Aug 23 21:37:20 2020 (r364551) +++ stable/12/sys/conf/files.i386 Sun Aug 23 21:38:48 2020 (r364552) @@ -32,7 +32,7 @@ linux_assym.h optional compat_linux \ clean "linux_assym.h" # linux_locore.o optional compat_linux \ - dependency "linux_assym.h $S/i386/linux/linux_locore.s" \ + dependency "linux_assym.h $S/i386/linux/linux_locore.asm" \ compile-with "${CC} -x assembler-with-cpp -DLOCORE -shared -s -pipe -I. -I$S ${WERROR} -Wall -fPIC -fno-common -nostdinc -nostdlib -Wl,-T$S/i386/linux/linux_vdso.lds.s -Wl,-soname=linux_vdso.so,--eh-frame-hdr,-warn-common ${.IMPSRC} -o ${.TARGET}" \ no-obj no-implicit-rule \ clean "linux_locore.o" Copied: stable/12/sys/i386/linux/linux_locore.asm (from r350451, head/sys/i386/linux/linux_locore.asm) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/i386/linux/linux_locore.asm Sun Aug 23 21:38:48 2020 (r364552, copy of r350451, head/sys/i386/linux/linux_locore.asm) @@ -0,0 +1,149 @@ +/* $FreeBSD$ */ + +#include "linux_assym.h" /* system definitions */ +#include /* miscellaneous asm macros */ + +#include /* system call numbers */ + +#include "assym.inc" + +/* + * To avoid excess stack frame the signal trampoline code emulates + * the 'call' instruction. + */ +NON_GPROF_ENTRY(linux_sigcode) + movl %esp, %ebx /* preserve sigframe */ + call .getip0 +.getip0: + popl %eax + add $.startsigcode-.getip0, %eax /* ret address */ + push %eax + jmp *LINUX_SIGF_HANDLER(%ebx) +.startsigcode: + popl %eax /* gcc unwind code need this */ + movl $LINUX_SYS_linux_sigreturn,%eax /* linux_sigreturn() */ + int $0x80 /* enter kernel with args */ +.endsigcode: +0: jmp 0b + +NON_GPROF_ENTRY(linux_rt_sigcode) + leal LINUX_RT_SIGF_UC(%esp),%ebx /* linux ucp */ + leal LINUX_RT_SIGF_SC(%ebx),%ecx /* linux sigcontext */ + movl %esp, %edi + call .getip1 +.getip1: + popl %eax + add $.startrtsigcode-.getip1, %eax /* ret address */ + push %eax + jmp *LINUX_RT_SIGF_HANDLER(%edi) +.startrtsigcode: + movl $LINUX_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */ + int $0x80 /* enter kernel with args */ +.endrtsigcode: +0: jmp 0b + +NON_GPROF_ENTRY(linux_vsyscall) +.startvsyscall: + int $0x80 + ret +.endvsyscall: + +#if 0 + .section .note.Linux, "a",@note + .long 2f - 1f /* namesz */ + .balign 4 + .long 4f - 3f /* descsz */ + .long 0 +1: + .asciz "Linux" +2: + .balign 4 +3: + .long LINUX_VERSION_CODE +4: + .balign 4 + .previous +#endif + +#define do_cfa_expr(offset) \ + .byte 0x0f; /* DW_CFA_def_cfa_expression */ \ + .uleb128 11f-10f; /* length */ \ +10: .byte 0x74; /* DW_OP_breg4 */ \ + .sleb128 offset; /* offset */ \ + .byte 0x06; /* DW_OP_deref */ \ +11: + + + /* CIE */ + .section .eh_frame,"a",@progbits +.LSTARTFRAMEDLSI1: + .long .LENDCIEDLSI1-.LSTARTCIEDLSI1 +.LSTARTCIEDLSI1: + .long 0 /* CIE ID */ + .byte 1 /* Version number */ + .string "zRS" /* NULL-terminated + * augmentation string + */ + .uleb128 1 /* Code alignment factor */ + .sleb128 -4 /* Data alignment factor */ + .byte 8 /* Return address + * register column + */ + .uleb128 1 /* Augmentation value length */ + .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */ + .byte 0 /* DW_CFA_nop */ + .align 4 +.LENDCIEDLSI1: + + /* FDE */ + .long .LENDFDEDLSI1-.LSTARTFDEDLSI1 /* Length FDE */ +.LSTARTFDEDLSI1: + .long .LSTARTFDEDLSI1-.LSTARTFRAMEDLSI1 /* CIE pointer */ + .long .startsigcode-. /* PC-relative start address */ + .long .endsigcode-.startsigcode + .uleb128 0 /* Augmentation */ + do_cfa_expr(LINUX_SIGF_SC-8) + .align 4 +.LENDFDEDLSI1: + + .long .LENDFDEDLSI2-.LSTARTFDEDLSI2 /* Length FDE */ +.LSTARTFDEDLSI2: + .long .LSTARTFDEDLSI2-.LSTARTFRAMEDLSI1 /* CIE pointer */ + .long .startrtsigcode-. /* PC-relative start address */ + .long .endrtsigcode-.startrtsigcode + .uleb128 0 /* Augmentation */ + do_cfa_expr(LINUX_RT_SIGF_SC-4+LINUX_SC_ESP) + .align 4 +.LENDFDEDLSI2: + .previous + + .section .eh_frame,"a",@progbits +.LSTARTFRAMEDLSI2: + .long .LENDCIEDLSI2-.LSTARTCIEDLSI2 +.LSTARTCIEDLSI2: + .long 0 /* CIE ID */ + .byte 1 /* Version number */ + .string "zR" /* NULL-terminated + * augmentation string + */ + .uleb128 1 /* Code alignment factor */ + .sleb128 -4 /* Data alignment factor */ + .byte 8 /* Return address register column */ + .uleb128 1 /* Augmentation value length */ + .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */ + .byte 0x0c /* DW_CFA_def_cfa */ + .uleb128 4 + .uleb128 4 + .byte 0x88 /* DW_CFA_offset, column 0x8 */ + .uleb128 1 + .align 4 +.LENDCIEDLSI2: + .long .LENDFDEDLSI3-.LSTARTFDEDLSI3 /* Length FDE */ +.LSTARTFDEDLSI3: + .long .LSTARTFDEDLSI3-.LSTARTFRAMEDLSI2 /* CIE pointer */ + .long .startvsyscall-. /* PC-relative start address */ + .long .endvsyscall-.startvsyscall + .uleb128 0 + .align 4 +.LENDFDEDLSI3: + .previous Modified: stable/12/sys/modules/linux64/Makefile ============================================================================== --- stable/12/sys/modules/linux64/Makefile Sun Aug 23 21:37:20 2020 (r364551) +++ stable/12/sys/modules/linux64/Makefile Sun Aug 23 21:38:48 2020 (r364552) @@ -29,7 +29,7 @@ OBJS= ${VDSO}.so linux_assym.h: linux_genassym.o sh ${SYSDIR}/kern/genassym.sh linux_genassym.o > ${.TARGET} -linux_locore.o: linux_locore.s linux_assym.h +linux_locore.o: linux_locore.asm linux_assym.h ${CC} -x assembler-with-cpp -DLOCORE -shared -mcmodel=small \ -pipe -I. -I${SYSDIR} ${WERROR} -Wall -fno-common -fPIC -nostdinc \ -Wl,-T${SRCTOP}/sys/${MACHINE}/linux/${VDSO}.lds.s \ From owner-svn-src-all@freebsd.org Sun Aug 23 21:42:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 17E8C3CC513; Sun, 23 Aug 2020 21:42:24 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTHg6wDtz4Znp; Sun, 23 Aug 2020 21:42:23 +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 B7DBDE02A; Sun, 23 Aug 2020 21:42:23 +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 07NLgNTe073019; Sun, 23 Aug 2020 21:42:23 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLgNKi073018; Sun, 23 Aug 2020 21:42:23 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202008232142.07NLgNKi073018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sun, 23 Aug 2020 21:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364553 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 364553 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:42:24 -0000 Author: bz Date: Sun Aug 23 21:42:23 2020 New Revision: 364553 URL: https://svnweb.freebsd.org/changeset/base/364553 Log: net80211: improve media information for VHT5GHZ Improve ieee80211_media_setup(), media2mode(), and ieee80211_rate2media() for VHT5GHZ at least. Reviewed by: adrian, gnn MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") Differential Revision: https://reviews.freebsd.org/D26089 Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Sun Aug 23 21:38:48 2020 (r364552) +++ head/sys/net80211/ieee80211.c Sun Aug 23 21:42:23 2020 (r364553) @@ -1920,12 +1920,18 @@ ieee80211_media_setup(struct ieee80211com *ic, /* * Add VHT media. + * XXX-BZ skip "VHT_2GHZ" for now. */ - for (; mode <= IEEE80211_MODE_VHT_5GHZ; mode++) { + for (mode = IEEE80211_MODE_VHT_5GHZ; mode <= IEEE80211_MODE_VHT_5GHZ; + mode++) { if (isclr(ic->ic_modecaps, mode)) continue; addmedia(media, caps, addsta, mode, IFM_AUTO); addmedia(media, caps, addsta, mode, IFM_IEEE80211_VHT); + } + if (isset(ic->ic_modecaps, IEEE80211_MODE_VHT_5GHZ)) { + addmedia(media, caps, addsta, + IEEE80211_MODE_AUTO, IFM_IEEE80211_VHT); /* XXX TODO: VHT maxrate */ } @@ -2044,6 +2050,12 @@ media2mode(const struct ifmedia_entry *ime, uint32_t f case IFM_IEEE80211_11NG: *mode = IEEE80211_MODE_11NG; break; + case IFM_IEEE80211_VHT2G: + *mode = IEEE80211_MODE_VHT_2GHZ; + break; + case IFM_IEEE80211_VHT5G: + *mode = IEEE80211_MODE_VHT_5GHZ; + break; case IFM_AUTO: *mode = IEEE80211_MODE_AUTO; break; @@ -2387,12 +2399,36 @@ ieee80211_rate2media(struct ieee80211com *ic, int rate { 75, IFM_IEEE80211_MCS }, { 76, IFM_IEEE80211_MCS }, }; + static const struct ratemedia vhtrates[] = { + { 0, IFM_IEEE80211_VHT }, + { 1, IFM_IEEE80211_VHT }, + { 2, IFM_IEEE80211_VHT }, + { 3, IFM_IEEE80211_VHT }, + { 4, IFM_IEEE80211_VHT }, + { 5, IFM_IEEE80211_VHT }, + { 6, IFM_IEEE80211_VHT }, + { 7, IFM_IEEE80211_VHT }, + { 8, IFM_IEEE80211_VHT }, /* Optional. */ + { 9, IFM_IEEE80211_VHT }, /* Optional. */ +#if 0 + /* Some QCA and BRCM seem to support this; offspec. */ + { 10, IFM_IEEE80211_VHT }, + { 11, IFM_IEEE80211_VHT }, +#endif + }; int m; /* - * Check 11n rates first for match as an MCS. + * Check 11ac/11n rates first for match as an MCS. */ - if (mode == IEEE80211_MODE_11NA) { + if (mode == IEEE80211_MODE_VHT_5GHZ) { + if (rate & IFM_IEEE80211_VHT) { + rate &= ~IFM_IEEE80211_VHT; + m = findmedia(vhtrates, nitems(vhtrates), rate); + if (m != IFM_AUTO) + return (m | IFM_IEEE80211_VHT); + } + } else if (mode == IEEE80211_MODE_11NA) { if (rate & IEEE80211_RATE_MCS) { rate &= ~IEEE80211_RATE_MCS; m = findmedia(htrates, nitems(htrates), rate); From owner-svn-src-all@freebsd.org Sun Aug 23 21:44:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A7973CC36A; Sun, 23 Aug 2020 21:44:06 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTKf2BZDz4Zfv; Sun, 23 Aug 2020 21:44: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 2F57BDEBE; Sun, 23 Aug 2020 21:44: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 07NLi5xx073175; Sun, 23 Aug 2020 21:44:05 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLi5D2073174; Sun, 23 Aug 2020 21:44:05 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232144.07NLi5D2073174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 21:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364554 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:44:06 -0000 Author: trasz Date: Sun Aug 23 21:44:05 2020 New Revision: 364554 URL: https://svnweb.freebsd.org/changeset/base/364554 Log: MFC r352914 by kaktus: linux_renameat2: don't add extra \n on error. linux_msg() already adds \n at the end of all messages. Modified: stable/12/sys/compat/linux/linux_file.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_file.c ============================================================================== --- stable/12/sys/compat/linux/linux_file.c Sun Aug 23 21:42:23 2020 (r364553) +++ stable/12/sys/compat/linux/linux_file.c Sun Aug 23 21:44:05 2020 (r364554) @@ -792,7 +792,7 @@ linux_renameat2(struct thread *td, struct linux_rename int error, olddfd, newdfd; if (args->flags != 0) { - linux_msg(td, "renameat2 unsupported flags 0x%x\n", + linux_msg(td, "renameat2 unsupported flags 0x%x", args->flags); return (EINVAL); } From owner-svn-src-all@freebsd.org Sun Aug 23 21:46:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D747E3CC4B1; Sun, 23 Aug 2020 21:46:49 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTNn4skQz4Zx1; Sun, 23 Aug 2020 21:46:49 +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 700F3E0A4; Sun, 23 Aug 2020 21:46:49 +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 07NLkniW073357; Sun, 23 Aug 2020 21:46:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLkmJN073354; Sun, 23 Aug 2020 21:46:48 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232146.07NLkmJN073354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 21:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364555 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:46:49 -0000 Author: trasz Date: Sun Aug 23 21:46:48 2020 New Revision: 364555 URL: https://svnweb.freebsd.org/changeset/base/364555 Log: MFC r353724 by yuripv: linux: provide just one instance of futex_list Move futex_list definition to linux.c which is included once in linux.ko (i386) and in linux_common.ko (amd64 and aarch64) allowing 32/64 bit linux programs to access the same futexes in the latter case. PR: 240989 Modified: stable/12/sys/compat/linux/linux.c stable/12/sys/compat/linux/linux.h stable/12/sys/compat/linux/linux_futex.c stable/12/sys/compat/linux/linux_futex.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux.c ============================================================================== --- stable/12/sys/compat/linux/linux.c Sun Aug 23 21:44:05 2020 (r364554) +++ stable/12/sys/compat/linux/linux.c Sun Aug 23 21:46:48 2020 (r364555) @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include +struct futex_list futex_list; + CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ); static int bsd_to_linux_sigtbl[LINUX_SIGTBLSZ] = { Modified: stable/12/sys/compat/linux/linux.h ============================================================================== --- stable/12/sys/compat/linux/linux.h Sun Aug 23 21:44:05 2020 (r364554) +++ stable/12/sys/compat/linux/linux.h Sun Aug 23 21:46:48 2020 (r364555) @@ -129,4 +129,6 @@ void bsd_to_linux_sigset(sigset_t *, l_sigset_t *); int linux_to_bsd_signal(int sig); int bsd_to_linux_signal(int sig); +extern LIST_HEAD(futex_list, futex) futex_list; + #endif /* _LINUX_MI_H_ */ Modified: stable/12/sys/compat/linux/linux_futex.c ============================================================================== --- stable/12/sys/compat/linux/linux_futex.c Sun Aug 23 21:44:05 2020 (r364554) +++ stable/12/sys/compat/linux/linux_futex.c Sun Aug 23 21:46:48 2020 (r364555) @@ -207,8 +207,6 @@ struct futex { TAILQ_HEAD(lf_waiting_proc, waiting_proc) f_waiting_proc; }; -struct futex_list futex_list; - #define FUTEX_LOCK(f) mtx_lock(&(f)->f_lck) #define FUTEX_LOCKED(f) mtx_owned(&(f)->f_lck) #define FUTEX_UNLOCK(f) mtx_unlock(&(f)->f_lck) Modified: stable/12/sys/compat/linux/linux_futex.h ============================================================================== --- stable/12/sys/compat/linux/linux_futex.h Sun Aug 23 21:44:05 2020 (r364554) +++ stable/12/sys/compat/linux/linux_futex.h Sun Aug 23 21:46:48 2020 (r364555) @@ -38,7 +38,6 @@ #ifndef _LINUX_FUTEX_H #define _LINUX_FUTEX_H -extern LIST_HEAD(futex_list, futex) futex_list; extern struct mtx futex_mtx; #define LINUX_FUTEX_WAIT 0 From owner-svn-src-all@freebsd.org Sun Aug 23 21:48:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B1B893CC5D0; Sun, 23 Aug 2020 21:48:59 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTRH4Gxyz4b4D; Sun, 23 Aug 2020 21:48:59 +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 76190DEC7; Sun, 23 Aug 2020 21:48:59 +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 07NLmxdZ073534; Sun, 23 Aug 2020 21:48:59 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLmvZj073523; Sun, 23 Aug 2020 21:48:57 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232148.07NLmvZj073523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 21:48:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364556 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Commit-Revision: 364556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:48:59 -0000 Author: trasz Date: Sun Aug 23 21:48:57 2020 New Revision: 364556 URL: https://svnweb.freebsd.org/changeset/base/364556 Log: MFC r353725 by yuripv: linux: futex_mtx should follow futex_list Move futex_mtx to linux_common.ko for amd64 and aarch64 along with respective list/mutex init/destroy. PR: 240989 Reported by: Alex S Modified: stable/12/sys/amd64/linux/linux_sysvec.c stable/12/sys/amd64/linux32/linux32_sysvec.c stable/12/sys/arm64/linux/linux_sysvec.c stable/12/sys/compat/linux/linux.c stable/12/sys/compat/linux/linux.h stable/12/sys/compat/linux/linux_common.c stable/12/sys/compat/linux/linux_futex.c stable/12/sys/compat/linux/linux_futex.h stable/12/sys/i386/linux/linux_sysvec.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_sysvec.c ============================================================================== --- stable/12/sys/amd64/linux/linux_sysvec.c Sun Aug 23 21:46:48 2020 (r364555) +++ stable/12/sys/amd64/linux/linux_sysvec.c Sun Aug 23 21:48:57 2020 (r364556) @@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -883,8 +882,6 @@ linux64_elf_modevent(module_t mod, int type, void *dat if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux_ioctl_register_handler(*lihp); - LIST_INIT(&futex_list); - mtx_init(&futex_mtx, "ftllk64", NULL, MTX_DEF); stclohz = (stathz ? stathz : hz); if (bootverbose) printf("Linux x86-64 ELF exec handler installed\n"); @@ -905,7 +902,6 @@ linux64_elf_modevent(module_t mod, int type, void *dat if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux_ioctl_unregister_handler(*lihp); - mtx_destroy(&futex_mtx); if (bootverbose) printf("Linux ELF exec handler removed\n"); } else Modified: stable/12/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_sysvec.c Sun Aug 23 21:46:48 2020 (r364555) +++ stable/12/sys/amd64/linux32/linux32_sysvec.c Sun Aug 23 21:48:57 2020 (r364556) @@ -81,7 +81,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -1073,8 +1072,6 @@ linux_elf_modevent(module_t mod, int type, void *data) if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux32_ioctl_register_handler(*lihp); - LIST_INIT(&futex_list); - mtx_init(&futex_mtx, "ftllk", NULL, MTX_DEF); stclohz = (stathz ? stathz : hz); if (bootverbose) printf("Linux ELF exec handler installed\n"); @@ -1095,7 +1092,6 @@ linux_elf_modevent(module_t mod, int type, void *data) if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux32_ioctl_unregister_handler(*lihp); - mtx_destroy(&futex_mtx); if (bootverbose) printf("Linux ELF exec handler removed\n"); } else Modified: stable/12/sys/arm64/linux/linux_sysvec.c ============================================================================== --- stable/12/sys/arm64/linux/linux_sysvec.c Sun Aug 23 21:46:48 2020 (r364555) +++ stable/12/sys/arm64/linux/linux_sysvec.c Sun Aug 23 21:48:57 2020 (r364556) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -503,8 +502,6 @@ linux64_elf_modevent(module_t mod, int type, void *dat if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux_ioctl_register_handler(*lihp); - LIST_INIT(&futex_list); - mtx_init(&futex_mtx, "ftllk64", NULL, MTX_DEF); stclohz = (stathz ? stathz : hz); if (bootverbose) printf("Linux arm64 ELF exec handler installed\n"); @@ -524,7 +521,6 @@ linux64_elf_modevent(module_t mod, int type, void *dat if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux_ioctl_unregister_handler(*lihp); - mtx_destroy(&futex_mtx); if (bootverbose) printf("Linux ELF exec handler removed\n"); } else Modified: stable/12/sys/compat/linux/linux.c ============================================================================== --- stable/12/sys/compat/linux/linux.c Sun Aug 23 21:46:48 2020 (r364555) +++ stable/12/sys/compat/linux/linux.c Sun Aug 23 21:48:57 2020 (r364556) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include struct futex_list futex_list; +struct mtx futex_mtx; /* protects the futex list */ CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ); Modified: stable/12/sys/compat/linux/linux.h ============================================================================== --- stable/12/sys/compat/linux/linux.h Sun Aug 23 21:46:48 2020 (r364555) +++ stable/12/sys/compat/linux/linux.h Sun Aug 23 21:48:57 2020 (r364556) @@ -130,5 +130,6 @@ int linux_to_bsd_signal(int sig); int bsd_to_linux_signal(int sig); extern LIST_HEAD(futex_list, futex) futex_list; +extern struct mtx futex_mtx; #endif /* _LINUX_MI_H_ */ Modified: stable/12/sys/compat/linux/linux_common.c ============================================================================== --- stable/12/sys/compat/linux/linux_common.c Sun Aug 23 21:46:48 2020 (r364555) +++ stable/12/sys/compat/linux/linux_common.c Sun Aug 23 21:48:57 2020 (r364556) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -76,11 +77,14 @@ linux_common_modevent(module_t mod, int type, void *da linux_thread_dtor, NULL, EVENTHANDLER_PRI_ANY); SET_FOREACH(ldhp, linux_device_handler_set) linux_device_register_handler(*ldhp); + LIST_INIT(&futex_list); + mtx_init(&futex_mtx, "ftllk", NULL, MTX_DEF); break; case MOD_UNLOAD: linux_osd_jail_deregister(); SET_FOREACH(ldhp, linux_device_handler_set) linux_device_unregister_handler(*ldhp); + mtx_destroy(&futex_mtx); EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag); EVENTHANDLER_DEREGISTER(process_exec, linux_exec_tag); EVENTHANDLER_DEREGISTER(thread_dtor, linux_thread_dtor_tag); Modified: stable/12/sys/compat/linux/linux_futex.c ============================================================================== --- stable/12/sys/compat/linux/linux_futex.c Sun Aug 23 21:46:48 2020 (r364555) +++ stable/12/sys/compat/linux/linux_futex.c Sun Aug 23 21:48:57 2020 (r364556) @@ -224,7 +224,6 @@ struct futex { #define FUTEX_ASSERT_LOCKED(f) mtx_assert(&(f)->f_lck, MA_OWNED) #define FUTEX_ASSERT_UNLOCKED(f) mtx_assert(&(f)->f_lck, MA_NOTOWNED) -struct mtx futex_mtx; /* protects the futex list */ #define FUTEXES_LOCK do { \ mtx_lock(&futex_mtx); \ LIN_SDT_PROBE1(locks, futex_mtx, \ Modified: stable/12/sys/compat/linux/linux_futex.h ============================================================================== --- stable/12/sys/compat/linux/linux_futex.h Sun Aug 23 21:46:48 2020 (r364555) +++ stable/12/sys/compat/linux/linux_futex.h Sun Aug 23 21:48:57 2020 (r364556) @@ -38,8 +38,6 @@ #ifndef _LINUX_FUTEX_H #define _LINUX_FUTEX_H -extern struct mtx futex_mtx; - #define LINUX_FUTEX_WAIT 0 #define LINUX_FUTEX_WAKE 1 #define LINUX_FUTEX_FD 2 /* unused */ Modified: stable/12/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/12/sys/i386/linux/linux_sysvec.c Sun Aug 23 21:46:48 2020 (r364555) +++ stable/12/sys/i386/linux/linux_sysvec.c Sun Aug 23 21:48:57 2020 (r364556) @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-all@freebsd.org Sun Aug 23 21:52:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BBBA53CC85C; Sun, 23 Aug 2020 21:52:54 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTWp4Xvvz4bV5; Sun, 23 Aug 2020 21:52:54 +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 7F6D6E158; Sun, 23 Aug 2020 21:52:54 +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 07NLqs2Z079205; Sun, 23 Aug 2020 21:52:54 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLqsTA079204; Sun, 23 Aug 2020 21:52:54 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232152.07NLqsTA079204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364557 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364557 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:52:54 -0000 Author: tuexen Date: Sun Aug 23 21:52:54 2020 New Revision: 364557 URL: https://svnweb.freebsd.org/changeset/base/364557 Log: MFC r359048: Handle the timers in a consistent sequence according to the definition of the timer type. Just a cleanup, no functional change intended. Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 21:48:57 2020 (r364556) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 21:52:54 2020 (r364557) @@ -1733,9 +1733,6 @@ sctp_timeout_handler(void *t) /* call the handler for the appropriate timer type */ switch (type) { - case SCTP_TIMER_TYPE_ADDR_WQ: - sctp_handle_addr_wq(); - break; case SCTP_TIMER_TYPE_SEND: if ((stcb == NULL) || (inp == NULL)) { break; @@ -1900,28 +1897,6 @@ sctp_timeout_handler(void *t) #endif sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SHUT_ACK_TMR, SCTP_SO_NOT_LOCKED); break; - case SCTP_TIMER_TYPE_SHUTDOWNGUARD: - if ((stcb == NULL) || (inp == NULL)) { - break; - } - SCTP_STAT_INCR(sctps_timoshutdownguard); - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), - "Shutdown guard timer expired"); - sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); - /* no need to unlock on tcb its gone */ - goto out_decr; - - case SCTP_TIMER_TYPE_STRRESET: - if ((stcb == NULL) || (inp == NULL)) { - break; - } - if (sctp_strreset_timer(inp, stcb, net)) { - /* no need to unlock on tcb its gone */ - goto out_decr; - } - SCTP_STAT_INCR(sctps_timostrmrst); - sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_STRRST_TMR, SCTP_SO_NOT_LOCKED); - break; case SCTP_TIMER_TYPE_ASCONF: if ((stcb == NULL) || (inp == NULL)) { break; @@ -1936,13 +1911,16 @@ sctp_timeout_handler(void *t) #endif sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_ASCONF_TMR, SCTP_SO_NOT_LOCKED); break; - case SCTP_TIMER_TYPE_PRIM_DELETED: + case SCTP_TIMER_TYPE_SHUTDOWNGUARD: if ((stcb == NULL) || (inp == NULL)) { break; } - sctp_delete_prim_timer(inp, stcb, net); - SCTP_STAT_INCR(sctps_timodelprim); - break; + SCTP_STAT_INCR(sctps_timoshutdownguard); + op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + "Shutdown guard timer expired"); + sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); + /* no need to unlock on tcb its gone */ + goto out_decr; case SCTP_TIMER_TYPE_AUTOCLOSE: if ((stcb == NULL) || (inp == NULL)) { @@ -1953,6 +1931,33 @@ sctp_timeout_handler(void *t) sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_AUTOCLOSE_TMR, SCTP_SO_NOT_LOCKED); did_output = 0; break; + case SCTP_TIMER_TYPE_STRRESET: + if ((stcb == NULL) || (inp == NULL)) { + break; + } + if (sctp_strreset_timer(inp, stcb, net)) { + /* no need to unlock on tcb its gone */ + goto out_decr; + } + SCTP_STAT_INCR(sctps_timostrmrst); + sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_STRRST_TMR, SCTP_SO_NOT_LOCKED); + break; + case SCTP_TIMER_TYPE_INPKILL: + SCTP_STAT_INCR(sctps_timoinpkill); + if (inp == NULL) { + break; + } + /* + * special case, take away our increment since WE are the + * killer + */ + SCTP_INP_DECR_REF(inp); + sctp_timer_stop(SCTP_TIMER_TYPE_INPKILL, inp, NULL, NULL, + SCTP_FROM_SCTPUTIL + SCTP_LOC_3); + sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, + SCTP_CALLED_FROM_INPKILL_TIMER); + inp = NULL; + goto out_no_decr; case SCTP_TIMER_TYPE_ASOCKILL: if ((stcb == NULL) || (inp == NULL)) { break; @@ -1981,22 +1986,16 @@ sctp_timeout_handler(void *t) */ stcb = NULL; goto out_no_decr; - case SCTP_TIMER_TYPE_INPKILL: - SCTP_STAT_INCR(sctps_timoinpkill); - if (inp == NULL) { + case SCTP_TIMER_TYPE_ADDR_WQ: + sctp_handle_addr_wq(); + break; + case SCTP_TIMER_TYPE_PRIM_DELETED: + if ((stcb == NULL) || (inp == NULL)) { break; } - /* - * special case, take away our increment since WE are the - * killer - */ - SCTP_INP_DECR_REF(inp); - sctp_timer_stop(SCTP_TIMER_TYPE_INPKILL, inp, NULL, NULL, - SCTP_FROM_SCTPUTIL + SCTP_LOC_3); - sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, - SCTP_CALLED_FROM_INPKILL_TIMER); - inp = NULL; - goto out_no_decr; + sctp_delete_prim_timer(inp, stcb, net); + SCTP_STAT_INCR(sctps_timodelprim); + break; default: SCTPDBG(SCTP_DEBUG_TIMER1, "sctp_timeout_handler:unknown timer %d\n", type); @@ -2055,11 +2054,6 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s return; } switch (t_type) { - case SCTP_TIMER_TYPE_ADDR_WQ: - /* Only 1 tick away :-) */ - tmr = &SCTP_BASE_INFO(addr_wq_timer); - to_ticks = SCTP_ADDRESS_TICK_DELAY; - break; case SCTP_TIMER_TYPE_SEND: /* Here we use the RTO timer */ { @@ -2179,22 +2173,6 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s tmr = &inp->sctp_ep.signature_change; to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_SIGNATURE]; break; - case SCTP_TIMER_TYPE_ASOCKILL: - if (stcb == NULL) { - return; - } - tmr = &stcb->asoc.strreset_timer; - to_ticks = MSEC_TO_TICKS(SCTP_ASOC_KILL_TIMEOUT); - break; - case SCTP_TIMER_TYPE_INPKILL: - /* - * The inp is setup to die. We re-use the signature_chage - * timer since that has stopped and we are in the GONE - * state. - */ - tmr = &inp->sctp_ep.signature_change; - to_ticks = MSEC_TO_TICKS(SCTP_INP_KILL_TIMEOUT); - break; case SCTP_TIMER_TYPE_PATHMTURAISE: /* * Here we use the value found in the EP for PMTU ususually @@ -2221,6 +2199,21 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &net->rxt_timer; break; + case SCTP_TIMER_TYPE_ASCONF: + /* + * Here the timer comes from the stcb but its value is from + * the net's RTO. + */ + if ((stcb == NULL) || (net == NULL)) { + return; + } + if (net->RTO == 0) { + to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + } else { + to_ticks = MSEC_TO_TICKS(net->RTO); + } + tmr = &stcb->asoc.asconf_timer; + break; case SCTP_TIMER_TYPE_SHUTDOWNGUARD: /* * Here we use the endpoints shutdown guard timer usually @@ -2236,6 +2229,20 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &stcb->asoc.shut_guard_timer; break; + case SCTP_TIMER_TYPE_AUTOCLOSE: + if (stcb == NULL) { + return; + } + if (stcb->asoc.sctp_autoclose_ticks == 0) { + /* + * Really an error since stcb is NOT set to + * autoclose + */ + return; + } + to_ticks = stcb->asoc.sctp_autoclose_ticks; + tmr = &stcb->asoc.autoclose_timer; + break; case SCTP_TIMER_TYPE_STRRESET: /* * Here the timer comes from the stcb but its value is from @@ -2251,21 +2258,27 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &stcb->asoc.strreset_timer; break; - case SCTP_TIMER_TYPE_ASCONF: + case SCTP_TIMER_TYPE_INPKILL: /* - * Here the timer comes from the stcb but its value is from - * the net's RTO. + * The inp is setup to die. We re-use the signature_chage + * timer since that has stopped and we are in the GONE + * state. */ - if ((stcb == NULL) || (net == NULL)) { + tmr = &inp->sctp_ep.signature_change; + to_ticks = MSEC_TO_TICKS(SCTP_INP_KILL_TIMEOUT); + break; + case SCTP_TIMER_TYPE_ASOCKILL: + if (stcb == NULL) { return; } - if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); - } else { - to_ticks = MSEC_TO_TICKS(net->RTO); - } - tmr = &stcb->asoc.asconf_timer; + tmr = &stcb->asoc.strreset_timer; + to_ticks = MSEC_TO_TICKS(SCTP_ASOC_KILL_TIMEOUT); break; + case SCTP_TIMER_TYPE_ADDR_WQ: + /* Only 1 tick away :-) */ + tmr = &SCTP_BASE_INFO(addr_wq_timer); + to_ticks = SCTP_ADDRESS_TICK_DELAY; + break; case SCTP_TIMER_TYPE_PRIM_DELETED: if ((stcb == NULL) || (net != NULL)) { return; @@ -2273,20 +2286,6 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); tmr = &stcb->asoc.delete_prim_timer; break; - case SCTP_TIMER_TYPE_AUTOCLOSE: - if (stcb == NULL) { - return; - } - if (stcb->asoc.sctp_autoclose_ticks == 0) { - /* - * Really an error since stcb is NOT set to - * autoclose - */ - return; - } - to_ticks = stcb->asoc.sctp_autoclose_ticks; - tmr = &stcb->asoc.autoclose_timer; - break; default: SCTPDBG(SCTP_DEBUG_TIMER1, "%s: Unknown timer type %d\n", __func__, t_type); @@ -2336,9 +2335,6 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, st SCTP_TCB_LOCK_ASSERT(stcb); } switch (t_type) { - case SCTP_TIMER_TYPE_ADDR_WQ: - tmr = &SCTP_BASE_INFO(addr_wq_timer); - break; case SCTP_TIMER_TYPE_SEND: if ((stcb == NULL) || (net == NULL)) { return; @@ -2383,24 +2379,6 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, st * must assure that we do not kill it by accident. */ break; - case SCTP_TIMER_TYPE_ASOCKILL: - /* - * Stop the asoc kill timer. - */ - if (stcb == NULL) { - return; - } - tmr = &stcb->asoc.strreset_timer; - break; - - case SCTP_TIMER_TYPE_INPKILL: - /* - * The inp is setup to die. We re-use the signature_chage - * timer since that has stopped and we are in the GONE - * state. - */ - tmr = &inp->sctp_ep.signature_change; - break; case SCTP_TIMER_TYPE_PATHMTURAISE: if ((stcb == NULL) || (net == NULL)) { return; @@ -2413,35 +2391,55 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, st } tmr = &net->rxt_timer; break; + case SCTP_TIMER_TYPE_ASCONF: + if (stcb == NULL) { + return; + } + tmr = &stcb->asoc.asconf_timer; + break; case SCTP_TIMER_TYPE_SHUTDOWNGUARD: if (stcb == NULL) { return; } tmr = &stcb->asoc.shut_guard_timer; break; - case SCTP_TIMER_TYPE_STRRESET: + case SCTP_TIMER_TYPE_AUTOCLOSE: if (stcb == NULL) { return; } - tmr = &stcb->asoc.strreset_timer; + tmr = &stcb->asoc.autoclose_timer; break; - case SCTP_TIMER_TYPE_ASCONF: + case SCTP_TIMER_TYPE_STRRESET: if (stcb == NULL) { return; } - tmr = &stcb->asoc.asconf_timer; + tmr = &stcb->asoc.strreset_timer; break; - case SCTP_TIMER_TYPE_PRIM_DELETED: + case SCTP_TIMER_TYPE_INPKILL: + /* + * The inp is setup to die. We re-use the signature_chage + * timer since that has stopped and we are in the GONE + * state. + */ + tmr = &inp->sctp_ep.signature_change; + break; + case SCTP_TIMER_TYPE_ASOCKILL: + /* + * Stop the asoc kill timer. + */ if (stcb == NULL) { return; } - tmr = &stcb->asoc.delete_prim_timer; + tmr = &stcb->asoc.strreset_timer; break; - case SCTP_TIMER_TYPE_AUTOCLOSE: + case SCTP_TIMER_TYPE_ADDR_WQ: + tmr = &SCTP_BASE_INFO(addr_wq_timer); + break; + case SCTP_TIMER_TYPE_PRIM_DELETED: if (stcb == NULL) { return; } - tmr = &stcb->asoc.autoclose_timer; + tmr = &stcb->asoc.delete_prim_timer; break; default: SCTPDBG(SCTP_DEBUG_TIMER1, "%s: Unknown timer type %d\n", From owner-svn-src-all@freebsd.org Sun Aug 23 21:55:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FC943CC8C9; Sun, 23 Aug 2020 21:55:35 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTZt6dKMz4bjj; Sun, 23 Aug 2020 21:55:34 +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 C3C44DDFC; Sun, 23 Aug 2020 21:55:34 +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 07NLtYA9079428; Sun, 23 Aug 2020 21:55:34 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLtYns079427; Sun, 23 Aug 2020 21:55:34 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232155.07NLtYns079427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364558 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:55:35 -0000 Author: tuexen Date: Sun Aug 23 21:55:34 2020 New Revision: 364558 URL: https://svnweb.freebsd.org/changeset/base/364558 Log: MFC r359131: The MTU candidates MUST be a multiple of 4, so make them so. Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 21:52:54 2020 (r364557) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 21:55:34 2020 (r364558) @@ -862,7 +862,7 @@ static uint32_t sctp_mtu_sizes[] = { 2048, 4352, 4464, - 8166, + 8168, 17912, 32000, 65532 From owner-svn-src-all@freebsd.org Sun Aug 23 21:57:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 824933CCAB8; Sun, 23 Aug 2020 21:57:25 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTd12Ymvz4bqS; Sun, 23 Aug 2020 21:57:25 +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 3B379E265; Sun, 23 Aug 2020 21:57:25 +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 07NLvPNa079568; Sun, 23 Aug 2020 21:57:25 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLvOKi079565; Sun, 23 Aug 2020 21:57:24 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232157.07NLvOKi079565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364559 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:57:25 -0000 Author: tuexen Date: Sun Aug 23 21:57:24 2020 New Revision: 364559 URL: https://svnweb.freebsd.org/changeset/base/364559 Log: MFC r359151:: Cleanup the stream reset and asconf timer. Modified: stable/12/sys/netinet/sctp_timer.c stable/12/sys/netinet/sctp_timer.h stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_timer.c ============================================================================== --- stable/12/sys/netinet/sctp_timer.c Sun Aug 23 21:55:34 2020 (r364558) +++ stable/12/sys/netinet/sctp_timer.c Sun Aug 23 21:57:24 2020 (r364559) @@ -1103,10 +1103,9 @@ sctp_cookie_timer(struct sctp_inpcb *inp, } int -sctp_strreset_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, - struct sctp_nets *net) +sctp_strreset_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb) { - struct sctp_nets *alt; + struct sctp_nets *alt, *net; struct sctp_tmit_chunk *strrst = NULL, *chk = NULL; if (stcb->asoc.stream_reset_outstanding == 0) { @@ -1117,9 +1116,9 @@ sctp_strreset_timer(struct sctp_inpcb *inp, struct sct if (strrst == NULL) { return (0); } + net = strrst->whoTo; /* do threshold management */ - if (sctp_threshold_management(inp, stcb, strrst->whoTo, - stcb->asoc.max_send_times)) { + if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { /* Assoc is over */ return (1); } @@ -1127,9 +1126,8 @@ sctp_strreset_timer(struct sctp_inpcb *inp, struct sct * Cleared threshold management, now lets backoff the address and * select an alternate */ - sctp_backoff_on_timeout(stcb, strrst->whoTo, 1, 0, 0); - alt = sctp_find_alternate_net(stcb, strrst->whoTo, 0); - sctp_free_remote_addr(strrst->whoTo); + sctp_backoff_on_timeout(stcb, net, 1, 0, 0); + alt = sctp_find_alternate_net(stcb, net, 0); strrst->whoTo = alt; atomic_add_int(&alt->ref_count, 1); @@ -1154,6 +1152,8 @@ sctp_strreset_timer(struct sctp_inpcb *inp, struct sct */ sctp_move_chunks_from_net(stcb, net); } + sctp_free_remote_addr(net); + /* mark the retran info */ if (strrst->sent != SCTP_DATAGRAM_RESEND) sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); @@ -1161,7 +1161,7 @@ sctp_strreset_timer(struct sctp_inpcb *inp, struct sct strrst->flags |= CHUNK_FLAGS_FRAGMENT_OK; /* restart the timer */ - sctp_timer_start(SCTP_TIMER_TYPE_STRRESET, inp, stcb, strrst->whoTo); + sctp_timer_start(SCTP_TIMER_TYPE_STRRESET, inp, stcb, alt); return (0); } @@ -1186,8 +1186,9 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_ if (asconf == NULL) { return (0); } + net = asconf->whoTo; /* do threshold management */ - if (sctp_threshold_management(inp, stcb, asconf->whoTo, + if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { /* Assoc is over */ return (1); @@ -1208,10 +1209,9 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_ * cleared threshold management, so now backoff the net and * select an alternate */ - sctp_backoff_on_timeout(stcb, asconf->whoTo, 1, 0, 0); - alt = sctp_find_alternate_net(stcb, asconf->whoTo, 0); + sctp_backoff_on_timeout(stcb, net, 1, 0, 0); + alt = sctp_find_alternate_net(stcb, net, 0); if (asconf->whoTo != alt) { - sctp_free_remote_addr(asconf->whoTo); asconf->whoTo = alt; atomic_add_int(&alt->ref_count, 1); } @@ -1248,6 +1248,8 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_ */ sctp_move_chunks_from_net(stcb, net); } + sctp_free_remote_addr(net); + /* mark the retran info */ if (asconf->sent != SCTP_DATAGRAM_RESEND) sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); Modified: stable/12/sys/netinet/sctp_timer.h ============================================================================== --- stable/12/sys/netinet/sctp_timer.h Sun Aug 23 21:55:34 2020 (r364558) +++ stable/12/sys/netinet/sctp_timer.h Sun Aug 23 21:57:24 2020 (r364559) @@ -50,12 +50,15 @@ sctp_find_alternate_net(struct sctp_tcb *, int sctp_t3rxt_timer(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *); + int sctp_t1init_timer(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *); + int sctp_shutdown_timer(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *); + int sctp_heartbeat_timer(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *); @@ -72,8 +75,7 @@ int sctp_shutdownack_timer(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *); int -sctp_strreset_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, - struct sctp_nets *net); + sctp_strreset_timer(struct sctp_inpcb *, struct sctp_tcb *); int sctp_asconf_timer(struct sctp_inpcb *, struct sctp_tcb *, Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 21:55:34 2020 (r364558) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 21:57:24 2020 (r364559) @@ -1935,7 +1935,7 @@ sctp_timeout_handler(void *t) if ((stcb == NULL) || (inp == NULL)) { break; } - if (sctp_strreset_timer(inp, stcb, net)) { + if (sctp_strreset_timer(inp, stcb)) { /* no need to unlock on tcb its gone */ goto out_decr; } From owner-svn-src-all@freebsd.org Sun Aug 23 21:59:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 035AF3CC9DC; Sun, 23 Aug 2020 21:59:26 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTgK6DSsz4brF; Sun, 23 Aug 2020 21:59:25 +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 B9447DFD5; Sun, 23 Aug 2020 21:59:25 +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 07NLxPsU079743; Sun, 23 Aug 2020 21:59:25 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLxNP1079732; Sun, 23 Aug 2020 21:59:23 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232159.07NLxNP1079732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 21:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364560 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364560 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 21:59:26 -0000 Author: tuexen Date: Sun Aug 23 21:59:23 2020 New Revision: 364560 URL: https://svnweb.freebsd.org/changeset/base/364560 Log: MFC r359152: Consistently provide arguments for timer start and stop routines. This is another step in cleaning up timer handling. Modified: stable/12/sys/netinet/sctp_asconf.c stable/12/sys/netinet/sctp_asconf.h stable/12/sys/netinet/sctp_indata.c stable/12/sys/netinet/sctp_input.c stable/12/sys/netinet/sctp_output.c stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctp_timer.c stable/12/sys/netinet/sctp_usrreq.c stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_asconf.c ============================================================================== --- stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 21:57:24 2020 (r364559) +++ stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 21:59:23 2020 (r364560) @@ -939,12 +939,12 @@ sctp_addr_match(struct sctp_paramhdr *ph, struct socka * Cleanup for non-responded/OP ERR'd ASCONF */ void -sctp_asconf_cleanup(struct sctp_tcb *stcb, struct sctp_nets *net) +sctp_asconf_cleanup(struct sctp_tcb *stcb) { /* * clear out any existing asconfs going out */ - sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, stcb, net, + sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_ASCONF + SCTP_LOC_2); stcb->asoc.asconf_seq_out_acked = stcb->asoc.asconf_seq_out; /* remove the old ASCONF on our outbound queue */ @@ -1725,7 +1725,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, if (serial_num == asoc->asconf_seq_out - 1) { /* stop our timer */ - sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, stcb, net, + sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_ASCONF + SCTP_LOC_5); } Modified: stable/12/sys/netinet/sctp_asconf.h ============================================================================== --- stable/12/sys/netinet/sctp_asconf.h Sun Aug 23 21:57:24 2020 (r364559) +++ stable/12/sys/netinet/sctp_asconf.h Sun Aug 23 21:59:23 2020 (r364560) @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); /* * function prototypes */ -extern void sctp_asconf_cleanup(struct sctp_tcb *, struct sctp_nets *); +extern void sctp_asconf_cleanup(struct sctp_tcb *); extern struct mbuf *sctp_compose_asconf(struct sctp_tcb *, int *, int); Modified: stable/12/sys/netinet/sctp_indata.c ============================================================================== --- stable/12/sys/netinet/sctp_indata.c Sun Aug 23 21:57:24 2020 (r364559) +++ stable/12/sys/netinet/sctp_indata.c Sun Aug 23 21:59:23 2020 (r364560) @@ -4392,7 +4392,7 @@ again: sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, netp); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, netp); + stcb->sctp_ep, stcb, NULL); } else if ((SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_RECEIVED) && (asoc->stream_queue_cnt == 0)) { struct sctp_nets *netp; @@ -5087,7 +5087,7 @@ hopeless_peer: sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, netp); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, netp); + stcb->sctp_ep, stcb, NULL); return; } else if ((SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_RECEIVED) && (asoc->stream_queue_cnt == 0)) { Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Sun Aug 23 21:57:24 2020 (r364559) +++ stable/12/sys/netinet/sctp_input.c Sun Aug 23 21:59:23 2020 (r364560) @@ -826,7 +826,7 @@ sctp_handle_abort(struct sctp_abort_chunk *abort, error = 0; } /* stop any receive timers */ - sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, net, + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_INPUT + SCTP_LOC_7); /* notify user of the abort and clean up... */ sctp_abort_notification(stcb, 1, error, abort, SCTP_SO_NOT_LOCKED); @@ -1110,13 +1110,12 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chun } static void -sctp_process_unrecog_chunk(struct sctp_tcb *stcb, uint8_t chunk_type, - struct sctp_nets *net) +sctp_process_unrecog_chunk(struct sctp_tcb *stcb, uint8_t chunk_type) { switch (chunk_type) { case SCTP_ASCONF_ACK: case SCTP_ASCONF: - sctp_asconf_cleanup(stcb, net); + sctp_asconf_cleanup(stcb); break; case SCTP_IFORWARD_CUM_TSN: case SCTP_FORWARD_CUM_TSN: @@ -1294,7 +1293,7 @@ sctp_handle_error(struct sctp_chunkhdr *ch, struct sctp_error_unrecognized_chunk *unrec_chunk; unrec_chunk = (struct sctp_error_unrecognized_chunk *)cause; - sctp_process_unrecog_chunk(stcb, unrec_chunk->ch.chunk_type, net); + sctp_process_unrecog_chunk(stcb, unrec_chunk->ch.chunk_type); } break; case SCTP_CAUSE_UNRECOG_PARAM: @@ -1643,7 +1642,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, asoc->primary_destination); + stcb->sctp_ep, stcb, NULL); } SCTP_STAT_INCR_GAUGE32(sctps_currestab); sctp_stop_all_cookie_timers(stcb); @@ -1886,7 +1885,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, asoc->primary_destination); + stcb->sctp_ep, stcb, NULL); } sctp_stop_all_cookie_timers(stcb); sctp_toss_old_cookies(stcb, asoc); @@ -1956,7 +1955,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, asoc->primary_destination); + stcb->sctp_ep, stcb, NULL); } else if (SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_SENT) { /* move to OPEN state, if not in SHUTDOWN_SENT */ @@ -2352,7 +2351,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, asoc->primary_destination); + stcb->sctp_ep, stcb, NULL); } sctp_stop_all_cookie_timers(stcb); SCTP_STAT_INCR_COUNTER32(sctps_passiveestab); @@ -2980,7 +2979,7 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *c sctp_start_net_timers(stcb); if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, asoc->primary_destination); + stcb->sctp_ep, stcb, NULL); } /* update RTO */ @@ -3660,7 +3659,7 @@ sctp_clean_up_stream_reset(struct sctp_tcb *stcb) } asoc->str_reset = NULL; sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, stcb->sctp_ep, stcb, - chk->whoTo, SCTP_FROM_SCTP_INPUT + SCTP_LOC_28); + NULL, SCTP_FROM_SCTP_INPUT + SCTP_LOC_28); TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next); asoc->ctrl_queue_cnt--; if (chk->data) { Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Sun Aug 23 21:57:24 2020 (r364559) +++ stable/12/sys/netinet/sctp_output.c Sun Aug 23 21:59:23 2020 (r364560) @@ -6735,7 +6735,7 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct s sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, - asoc->primary_destination); + NULL); added_control = 1; do_chunk_output = 0; } @@ -6775,7 +6775,7 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct s goto no_chunk_output; } sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, - asoc->primary_destination); + NULL); } } @@ -8447,7 +8447,7 @@ again_one_more_time: /* turn off the timer */ if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, - inp, stcb, net, + inp, stcb, NULL, SCTP_FROM_SCTP_OUTPUT + SCTP_LOC_1); } } @@ -13570,7 +13570,7 @@ dataless_eof: sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, netp); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, - asoc->primary_destination); + NULL); } } else { /*- @@ -13620,7 +13620,7 @@ dataless_eof: goto out; } sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, - asoc->primary_destination); + NULL); sctp_feature_off(inp, SCTP_PCB_FLAGS_NODELAY); } } Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 21:57:24 2020 (r364559) +++ stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 21:59:23 2020 (r364560) @@ -3441,15 +3441,13 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, sctp_send_shutdown(asoc, netp); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, asoc->sctp_ep, asoc, netp); - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, asoc->sctp_ep, asoc, - asoc->asoc.primary_destination); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, asoc->sctp_ep, asoc, NULL); sctp_chunk_output(inp, asoc, SCTP_OUTPUT_FROM_SHUT_TMR, SCTP_SO_LOCKED); } } else { /* mark into shutdown pending */ SCTP_ADD_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING); - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, asoc->sctp_ep, asoc, - asoc->asoc.primary_destination); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, asoc->sctp_ep, asoc, NULL); if ((*asoc->asoc.ss_functions.sctp_ss_is_user_msgs_incomplete) (asoc, &asoc->asoc)) { SCTP_ADD_SUBSTATE(asoc, SCTP_STATE_PARTIAL_MSG_LEFT); } Modified: stable/12/sys/netinet/sctp_timer.c ============================================================================== --- stable/12/sys/netinet/sctp_timer.c Sun Aug 23 21:57:24 2020 (r364559) +++ stable/12/sys/netinet/sctp_timer.c Sun Aug 23 21:59:23 2020 (r364560) @@ -1202,7 +1202,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_ * and cleanup. */ SCTPDBG(SCTP_DEBUG_TIMER1, "asconf_timer: Peer has not responded to our repeated ASCONFs\n"); - sctp_asconf_cleanup(stcb, net); + sctp_asconf_cleanup(stcb); return (0); } /* Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Sun Aug 23 21:57:24 2020 (r364559) +++ stable/12/sys/netinet/sctp_usrreq.c Sun Aug 23 21:59:23 2020 (r364560) @@ -755,7 +755,7 @@ sctp_disconnect(struct socket *so) sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, netp); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, netp); + stcb->sctp_ep, stcb, NULL); sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_LOCKED); } } else { @@ -778,8 +778,7 @@ sctp_disconnect(struct socket *so) } SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_SHUTDOWN_PENDING); - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, - netp); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); if ((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc)) { SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_PARTIAL_MSG_LEFT); } @@ -978,7 +977,7 @@ sctp_shutdown(struct socket *so) return (0); } } - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, netp); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); /* * XXX: Why do this in the case where we have still data * queued? Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 21:57:24 2020 (r364559) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 21:59:23 2020 (r364560) @@ -1870,7 +1870,7 @@ sctp_timeout_handler(void *t) inp->sctp_ep.secret_key[secret][i] = sctp_select_initial_TSN(&inp->sctp_ep); } - sctp_timer_start(SCTP_TIMER_TYPE_NEWCOOKIE, inp, stcb, net); + sctp_timer_start(SCTP_TIMER_TYPE_NEWCOOKIE, inp, NULL, NULL); } did_output = 0; break; From owner-svn-src-all@freebsd.org Sun Aug 23 22:02:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8D043CCDCE; Sun, 23 Aug 2020 22:02:19 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTkg5wQRz4cB3; Sun, 23 Aug 2020 22:02:19 +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 AF9D9E172; Sun, 23 Aug 2020 22:02:19 +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 07NM2JiB084631; Sun, 23 Aug 2020 22:02:19 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NM2Juq084600; Sun, 23 Aug 2020 22:02:19 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232202.07NM2Juq084600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:02:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364561 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:02:20 -0000 Author: tuexen Date: Sun Aug 23 22:02:19 2020 New Revision: 364561 URL: https://svnweb.freebsd.org/changeset/base/364561 Log: MFC r359162: Remove a set, but unused variable. Modified: stable/12/sys/netinet/sctp_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Sun Aug 23 21:59:23 2020 (r364560) +++ stable/12/sys/netinet/sctp_usrreq.c Sun Aug 23 22:02:19 2020 (r364561) @@ -769,14 +769,6 @@ sctp_disconnect(struct socket *so) * we will allow user data to be sent first * and move to SHUTDOWN-PENDING */ - struct sctp_nets *netp; - - if (stcb->asoc.alternate) { - netp = stcb->asoc.alternate; - } else { - netp = stcb->asoc.primary_destination; - } - SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_SHUTDOWN_PENDING); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); if ((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc)) { From owner-svn-src-all@freebsd.org Sun Aug 23 22:04:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BB6DA3CCCCD; Sun, 23 Aug 2020 22:04:03 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTmg4W2lz4cJ3; Sun, 23 Aug 2020 22:04:03 +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 7DFDDE0E8; Sun, 23 Aug 2020 22:04:03 +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 07NM43IA085653; Sun, 23 Aug 2020 22:04:03 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NM42Fo085648; Sun, 23 Aug 2020 22:04:02 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232204.07NM42Fo085648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:04:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364562 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364562 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:04:03 -0000 Author: tuexen Date: Sun Aug 23 22:04:02 2020 New Revision: 364562 URL: https://svnweb.freebsd.org/changeset/base/364562 Log: MFC r359195: More timer cleanups, no functional change. Modified: stable/12/sys/netinet/sctp_asconf.c stable/12/sys/netinet/sctp_input.c stable/12/sys/netinet/sctp_timer.c stable/12/sys/netinet/sctp_timer.h stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_asconf.c ============================================================================== --- stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 22:02:19 2020 (r364561) +++ stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 22:04:02 2020 (r364562) @@ -585,8 +585,7 @@ sctp_process_asconf_set_primary(struct sockaddr *src, sctp_move_chunks_from_net(stcb, stcb->asoc.deleted_primary); } - sctp_delete_prim_timer(stcb->sctp_ep, stcb, - stcb->asoc.deleted_primary); + sctp_delete_prim_timer(stcb->sctp_ep, stcb); } } else { /* couldn't set the requested primary address! */ Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Sun Aug 23 22:02:19 2020 (r364561) +++ stable/12/sys/netinet/sctp_input.c Sun Aug 23 22:04:02 2020 (r364562) @@ -703,8 +703,7 @@ sctp_handle_heartbeat_ack(struct sctp_heartbeat_chunk sctp_move_chunks_from_net(stcb, stcb->asoc.deleted_primary); } - sctp_delete_prim_timer(stcb->sctp_ep, stcb, - stcb->asoc.deleted_primary); + sctp_delete_prim_timer(stcb->sctp_ep, stcb); } } } Modified: stable/12/sys/netinet/sctp_timer.c ============================================================================== --- stable/12/sys/netinet/sctp_timer.c Sun Aug 23 22:02:19 2020 (r364561) +++ stable/12/sys/netinet/sctp_timer.c Sun Aug 23 22:04:02 2020 (r364562) @@ -1264,8 +1264,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_ /* Mobility adaptation */ void -sctp_delete_prim_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, - struct sctp_nets *net SCTP_UNUSED) +sctp_delete_prim_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb) { if (stcb->asoc.deleted_primary == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "delete_prim_timer: deleted_primary is not stored...\n"); @@ -1521,9 +1520,7 @@ sctp_pathmtu_timer(struct sctp_inpcb *inp, } void -sctp_autoclose_timer(struct sctp_inpcb *inp, - struct sctp_tcb *stcb, - struct sctp_nets *net) +sctp_autoclose_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb) { struct timeval tn, *tim_touse; struct sctp_association *asoc; @@ -1562,7 +1559,7 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, */ if (SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_SENT) { /* only send SHUTDOWN 1st time thru */ - struct sctp_nets *netp; + struct sctp_nets *net; if ((SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) || (SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_RECEIVED)) { @@ -1571,17 +1568,15 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, SCTP_SET_STATE(stcb, SCTP_STATE_SHUTDOWN_SENT); sctp_stop_timers_for_shutdown(stcb); if (stcb->asoc.alternate) { - netp = stcb->asoc.alternate; + net = stcb->asoc.alternate; } else { - netp = stcb->asoc.primary_destination; + net = stcb->asoc.primary_destination; } - sctp_send_shutdown(stcb, netp); + sctp_send_shutdown(stcb, net); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, - stcb->sctp_ep, stcb, - netp); + stcb->sctp_ep, stcb, net); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, - netp); + stcb->sctp_ep, stcb, NULL); } } } else { @@ -1594,8 +1589,7 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, /* fool the timer startup to use the time left */ tmp = asoc->sctp_autoclose_ticks; asoc->sctp_autoclose_ticks -= ticks_gone_by; - sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, - net); + sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL); /* restore the real tick value */ asoc->sctp_autoclose_ticks = tmp; } Modified: stable/12/sys/netinet/sctp_timer.h ============================================================================== --- stable/12/sys/netinet/sctp_timer.h Sun Aug 23 22:02:19 2020 (r364561) +++ stable/12/sys/netinet/sctp_timer.h Sun Aug 23 22:04:02 2020 (r364562) @@ -43,9 +43,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_RTT_SHIFT 3 #define SCTP_RTT_VAR_SHIFT 2 -struct sctp_nets * -sctp_find_alternate_net(struct sctp_tcb *, - struct sctp_nets *, int mode); +struct sctp_nets *sctp_find_alternate_net(struct sctp_tcb *, struct sctp_nets *, int); int sctp_t3rxt_timer(struct sctp_inpcb *, struct sctp_tcb *, @@ -82,12 +80,10 @@ sctp_asconf_timer(struct sctp_inpcb *, struct sctp_tcb struct sctp_nets *); void -sctp_delete_prim_timer(struct sctp_inpcb *, struct sctp_tcb *, - struct sctp_nets *); + sctp_delete_prim_timer(struct sctp_inpcb *, struct sctp_tcb *); void -sctp_autoclose_timer(struct sctp_inpcb *, struct sctp_tcb *, - struct sctp_nets *net); + sctp_autoclose_timer(struct sctp_inpcb *, struct sctp_tcb *); void sctp_audit_retranmission_queue(struct sctp_association *); Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 22:02:19 2020 (r364561) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 22:04:02 2020 (r364562) @@ -1927,7 +1927,7 @@ sctp_timeout_handler(void *t) break; } SCTP_STAT_INCR(sctps_timoautoclose); - sctp_autoclose_timer(inp, stcb, net); + sctp_autoclose_timer(inp, stcb); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_AUTOCLOSE_TMR, SCTP_SO_NOT_LOCKED); did_output = 0; break; @@ -1993,7 +1993,7 @@ sctp_timeout_handler(void *t) if ((stcb == NULL) || (inp == NULL)) { break; } - sctp_delete_prim_timer(inp, stcb, net); + sctp_delete_prim_timer(inp, stcb); SCTP_STAT_INCR(sctps_timodelprim); break; default: From owner-svn-src-all@freebsd.org Sun Aug 23 22:05:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0182F3CCCEF; Sun, 23 Aug 2020 22:05:58 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTps6gsNz4cj6; Sun, 23 Aug 2020 22:05:57 +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 C8691E41C; Sun, 23 Aug 2020 22:05:57 +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 07NM5vLk085793; Sun, 23 Aug 2020 22:05:57 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NM5vw7085792; Sun, 23 Aug 2020 22:05:57 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232205.07NM5vw7085792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:05:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364563 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364563 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:05:58 -0000 Author: tuexen Date: Sun Aug 23 22:05:57 2020 New Revision: 364563 URL: https://svnweb.freebsd.org/changeset/base/364563 Log: MFC r359234: Cleanup the file and add two ASSERT variants for locks, which will be used shortly. Modified: stable/12/sys/netinet/sctp_lock_bsd.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_lock_bsd.h ============================================================================== --- stable/12/sys/netinet/sctp_lock_bsd.h Sun Aug 23 22:04:02 2020 (r364562) +++ stable/12/sys/netinet/sctp_lock_bsd.h Sun Aug 23 22:05:57 2020 (r364563) @@ -64,10 +64,6 @@ __FBSDID("$FreeBSD$"); * synchronize. So the CREATE_INP lock is also another one we must use * extreme caution in locking to make sure we don't hit a re-entrancy issue. * - * For non FreeBSD 5.x we provide a bunch of EMPTY lock macros so we can - * blatantly put locks everywhere and they reduce to nothing on - * NetBSD/OpenBSD and FreeBSD 4.x - * */ /* @@ -77,229 +73,275 @@ __FBSDID("$FreeBSD$"); * the SCTP_BASE_INFO() list's we will do a SCTP_INP_INFO_WLOCK(). */ -extern struct sctp_foo_stuff sctp_logoff[]; -extern int sctp_logoff_stuff; - #define SCTP_IPI_COUNT_INIT() #define SCTP_STATLOG_INIT_LOCK() +#define SCTP_STATLOG_DESTROY() #define SCTP_STATLOG_LOCK() #define SCTP_STATLOG_UNLOCK() -#define SCTP_STATLOG_DESTROY() -#define SCTP_INP_INFO_LOCK_DESTROY() do { \ - if(rw_wowned(&SCTP_BASE_INFO(ipi_ep_mtx))) { \ - rw_wunlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ - } \ - rw_destroy(&SCTP_BASE_INFO(ipi_ep_mtx)); \ - } while (0) +#define SCTP_INP_INFO_LOCK_INIT() do { \ + rw_init(&SCTP_BASE_INFO(ipi_ep_mtx), "sctp-info"); \ +} while (0) -#define SCTP_INP_INFO_LOCK_INIT() \ - rw_init(&SCTP_BASE_INFO(ipi_ep_mtx), "sctp-info"); +#define SCTP_INP_INFO_LOCK_DESTROY() do { \ + if (rw_wowned(&SCTP_BASE_INFO(ipi_ep_mtx))) { \ + rw_wunlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ + } \ + rw_destroy(&SCTP_BASE_INFO(ipi_ep_mtx)); \ +} while (0) +#define SCTP_INP_INFO_RLOCK() do { \ + rw_rlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ +} while (0) -#define SCTP_INP_INFO_RLOCK() do { \ - rw_rlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ +#define SCTP_INP_INFO_WLOCK() do { \ + rw_wlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ } while (0) -#define SCTP_MCORE_QLOCK_INIT(cpstr) do { \ - mtx_init(&(cpstr)->que_mtx, \ - "sctp-mcore_queue","queue_lock", \ - MTX_DEF|MTX_DUPOK); \ +#define SCTP_INP_INFO_RUNLOCK() do { \ + rw_runlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ } while (0) -#define SCTP_MCORE_QLOCK(cpstr) do { \ - mtx_lock(&(cpstr)->que_mtx); \ +#define SCTP_INP_INFO_WUNLOCK() do { \ + rw_wunlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ } while (0) -#define SCTP_MCORE_QUNLOCK(cpstr) do { \ - mtx_unlock(&(cpstr)->que_mtx); \ + +#define SCTP_MCORE_QLOCK_INIT(cpstr) do { \ + mtx_init(&(cpstr)->que_mtx, "sctp-mcore_queue","queue_lock", \ + MTX_DEF | MTX_DUPOK); \ } while (0) -#define SCTP_MCORE_QDESTROY(cpstr) do { \ - if(mtx_owned(&(cpstr)->core_mtx)) { \ - mtx_unlock(&(cpstr)->que_mtx); \ - } \ - mtx_destroy(&(cpstr)->que_mtx); \ +#define SCTP_MCORE_QDESTROY(cpstr) do { \ + if (mtx_owned(&(cpstr)->core_mtx)) { \ + mtx_unlock(&(cpstr)->que_mtx); \ + } \ + mtx_destroy(&(cpstr)->que_mtx); \ } while (0) +#define SCTP_MCORE_QLOCK(cpstr) do { \ + mtx_lock(&(cpstr)->que_mtx); \ +} while (0) -#define SCTP_MCORE_LOCK_INIT(cpstr) do { \ - mtx_init(&(cpstr)->core_mtx, \ - "sctp-cpulck","cpu_proc_lock", \ - MTX_DEF|MTX_DUPOK); \ +#define SCTP_MCORE_QUNLOCK(cpstr) do { \ + mtx_unlock(&(cpstr)->que_mtx); \ } while (0) -#define SCTP_MCORE_LOCK(cpstr) do { \ - mtx_lock(&(cpstr)->core_mtx); \ + +#define SCTP_MCORE_LOCK_INIT(cpstr) do { \ + mtx_init(&(cpstr)->core_mtx, "sctp-cpulck","cpu_proc_lock", \ + MTX_DEF | MTX_DUPOK); \ } while (0) -#define SCTP_MCORE_UNLOCK(cpstr) do { \ - mtx_unlock(&(cpstr)->core_mtx); \ +#define SCTP_MCORE_DESTROY(cpstr) do { \ + if (mtx_owned(&(cpstr)->core_mtx)) { \ + mtx_unlock(&(cpstr)->core_mtx); \ + } \ + mtx_destroy(&(cpstr)->core_mtx); \ } while (0) -#define SCTP_MCORE_DESTROY(cpstr) do { \ - if(mtx_owned(&(cpstr)->core_mtx)) { \ - mtx_unlock(&(cpstr)->core_mtx); \ - } \ - mtx_destroy(&(cpstr)->core_mtx); \ +#define SCTP_MCORE_LOCK(cpstr) do { \ + mtx_lock(&(cpstr)->core_mtx); \ } while (0) -#define SCTP_INP_INFO_WLOCK() do { \ - rw_wlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \ +#define SCTP_MCORE_UNLOCK(cpstr) do { \ + mtx_unlock(&(cpstr)->core_mtx); \ } while (0) -#define SCTP_INP_INFO_RUNLOCK() rw_runlock(&SCTP_BASE_INFO(ipi_ep_mtx)) -#define SCTP_INP_INFO_WUNLOCK() rw_wunlock(&SCTP_BASE_INFO(ipi_ep_mtx)) +#define SCTP_IPI_ADDR_INIT() do { \ + rw_init(&SCTP_BASE_INFO(ipi_addr_mtx), "sctp-addr"); \ +} while (0) +#define SCTP_IPI_ADDR_DESTROY() do { \ + if (rw_wowned(&SCTP_BASE_INFO(ipi_addr_mtx))) { \ + rw_wunlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ + } \ + rw_destroy(&SCTP_BASE_INFO(ipi_addr_mtx)); \ +} while (0) -#define SCTP_IPI_ADDR_INIT() \ - rw_init(&SCTP_BASE_INFO(ipi_addr_mtx), "sctp-addr") -#define SCTP_IPI_ADDR_DESTROY() do { \ - if(rw_wowned(&SCTP_BASE_INFO(ipi_addr_mtx))) { \ - rw_wunlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ - } \ - rw_destroy(&SCTP_BASE_INFO(ipi_addr_mtx)); \ - } while (0) #define SCTP_IPI_ADDR_RLOCK() do { \ - rw_rlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ + rw_rlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ } while (0) + #define SCTP_IPI_ADDR_WLOCK() do { \ - rw_wlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ + rw_wlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ } while (0) -#define SCTP_IPI_ADDR_RUNLOCK() rw_runlock(&SCTP_BASE_INFO(ipi_addr_mtx)) -#define SCTP_IPI_ADDR_WUNLOCK() rw_wunlock(&SCTP_BASE_INFO(ipi_addr_mtx)) +#define SCTP_IPI_ADDR_RUNLOCK() do { \ + rw_runlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ +} while (0) +#define SCTP_IPI_ADDR_WUNLOCK() do { \ + rw_wunlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ +} while (0) -#define SCTP_IPI_ITERATOR_WQ_INIT() \ - mtx_init(&sctp_it_ctl.ipi_iterator_wq_mtx, "sctp-it-wq", "sctp_it_wq", MTX_DEF) -#define SCTP_IPI_ITERATOR_WQ_DESTROY() \ - mtx_destroy(&sctp_it_ctl.ipi_iterator_wq_mtx) +#define SCTP_IPI_ITERATOR_WQ_INIT() do { \ + mtx_init(&sctp_it_ctl.ipi_iterator_wq_mtx, "sctp-it-wq", \ + "sctp_it_wq", MTX_DEF); \ +} while (0) -#define SCTP_IPI_ITERATOR_WQ_LOCK() do { \ - mtx_lock(&sctp_it_ctl.ipi_iterator_wq_mtx); \ +#define SCTP_IPI_ITERATOR_WQ_DESTROY() do { \ + mtx_destroy(&sctp_it_ctl.ipi_iterator_wq_mtx); \ } while (0) -#define SCTP_IPI_ITERATOR_WQ_UNLOCK() mtx_unlock(&sctp_it_ctl.ipi_iterator_wq_mtx) +#define SCTP_IPI_ITERATOR_WQ_LOCK() do { \ + mtx_lock(&sctp_it_ctl.ipi_iterator_wq_mtx); \ +} while (0) +#define SCTP_IPI_ITERATOR_WQ_UNLOCK() do { \ + mtx_unlock(&sctp_it_ctl.ipi_iterator_wq_mtx); \ +} while (0) -#define SCTP_IP_PKTLOG_INIT() \ - mtx_init(&SCTP_BASE_INFO(ipi_pktlog_mtx), "sctp-pktlog", "packetlog", MTX_DEF) +#define SCTP_IP_PKTLOG_INIT() do { \ + mtx_init(&SCTP_BASE_INFO(ipi_pktlog_mtx), "sctp-pktlog", \ + "packetlog", MTX_DEF); \ +} while (0) -#define SCTP_IP_PKTLOG_LOCK() do { \ - mtx_lock(&SCTP_BASE_INFO(ipi_pktlog_mtx)); \ +#define SCTP_IP_PKTLOG_DESTROY() do { \ + mtx_destroy(&SCTP_BASE_INFO(ipi_pktlog_mtx)); \ } while (0) -#define SCTP_IP_PKTLOG_UNLOCK() mtx_unlock(&SCTP_BASE_INFO(ipi_pktlog_mtx)) +#define SCTP_IP_PKTLOG_LOCK() do { \ + mtx_lock(&SCTP_BASE_INFO(ipi_pktlog_mtx)); \ +} while (0) -#define SCTP_IP_PKTLOG_DESTROY() \ - mtx_destroy(&SCTP_BASE_INFO(ipi_pktlog_mtx)) +#define SCTP_IP_PKTLOG_UNLOCK() do { \ + mtx_unlock(&SCTP_BASE_INFO(ipi_pktlog_mtx)); \ +} while (0) - - - /* * The INP locks we will use for locking an SCTP endpoint, so for example if * we want to change something at the endpoint level for example random_store * or cookie secrets we lock the INP level. */ -#define SCTP_INP_READ_INIT(_inp) \ - mtx_init(&(_inp)->inp_rdata_mtx, "sctp-read", "inpr", MTX_DEF | MTX_DUPOK) +#define SCTP_INP_READ_INIT(_inp) do { \ + mtx_init(&(_inp)->inp_rdata_mtx, "sctp-read", "inpr", \ + MTX_DEF | MTX_DUPOK); \ +} while (0) -#define SCTP_INP_READ_DESTROY(_inp) \ - mtx_destroy(&(_inp)->inp_rdata_mtx) +#define SCTP_INP_READ_DESTROY(_inp) do { \ + mtx_destroy(&(_inp)->inp_rdata_mtx); \ +} while (0) -#define SCTP_INP_READ_LOCK(_inp) do { \ - mtx_lock(&(_inp)->inp_rdata_mtx); \ +#define SCTP_INP_READ_LOCK(_inp) do { \ + mtx_lock(&(_inp)->inp_rdata_mtx); \ } while (0) +#define SCTP_INP_READ_UNLOCK(_inp) do { \ + mtx_unlock(&(_inp)->inp_rdata_mtx); \ +} while (0) -#define SCTP_INP_READ_UNLOCK(_inp) mtx_unlock(&(_inp)->inp_rdata_mtx) +#define SCTP_INP_LOCK_INIT(_inp) do { \ + mtx_init(&(_inp)->inp_mtx, "sctp-inp", "inp", \ + MTX_DEF | MTX_DUPOK); \ +} while (0) -#define SCTP_INP_LOCK_INIT(_inp) \ - mtx_init(&(_inp)->inp_mtx, "sctp-inp", "inp", MTX_DEF | MTX_DUPOK) -#define SCTP_ASOC_CREATE_LOCK_INIT(_inp) \ - mtx_init(&(_inp)->inp_create_mtx, "sctp-create", "inp_create", \ - MTX_DEF | MTX_DUPOK) +#define SCTP_INP_LOCK_DESTROY(_inp) do { \ + mtx_destroy(&(_inp)->inp_mtx); \ +} while (0) -#define SCTP_INP_LOCK_DESTROY(_inp) \ - mtx_destroy(&(_inp)->inp_mtx) +#define SCTP_INP_LOCK_CONTENDED(_inp) \ + ((_inp)->inp_mtx.mtx_lock & MTX_CONTESTED) -#define SCTP_INP_LOCK_CONTENDED(_inp) ((_inp)->inp_mtx.mtx_lock & MTX_CONTESTED) +#define SCTP_INP_READ_CONTENDED(_inp) \ + ((_inp)->inp_rdata_mtx.mtx_lock & MTX_CONTESTED) -#define SCTP_INP_READ_CONTENDED(_inp) ((_inp)->inp_rdata_mtx.mtx_lock & MTX_CONTESTED) - -#define SCTP_ASOC_CREATE_LOCK_CONTENDED(_inp) ((_inp)->inp_create_mtx.mtx_lock & MTX_CONTESTED) - - -#define SCTP_ASOC_CREATE_LOCK_DESTROY(_inp) \ - mtx_destroy(&(_inp)->inp_create_mtx) - - #ifdef SCTP_LOCK_LOGGING #define SCTP_INP_RLOCK(_inp) do { \ - if(SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) sctp_log_lock(_inp, (struct sctp_tcb *)NULL, SCTP_LOG_LOCK_INP);\ - mtx_lock(&(_inp)->inp_mtx); \ + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) \ + sctp_log_lock(_inp, NULL, SCTP_LOG_LOCK_INP); \ + mtx_lock(&(_inp)->inp_mtx); \ } while (0) #define SCTP_INP_WLOCK(_inp) do { \ - if(SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) sctp_log_lock(_inp, (struct sctp_tcb *)NULL, SCTP_LOG_LOCK_INP);\ - mtx_lock(&(_inp)->inp_mtx); \ + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) \ + sctp_log_lock(_inp, NULL, SCTP_LOG_LOCK_INP); \ + mtx_lock(&(_inp)->inp_mtx); \ } while (0) - #else - -#define SCTP_INP_RLOCK(_inp) do { \ - mtx_lock(&(_inp)->inp_mtx); \ +#define SCTP_INP_RLOCK(_inp) do { \ + mtx_lock(&(_inp)->inp_mtx); \ } while (0) -#define SCTP_INP_WLOCK(_inp) do { \ - mtx_lock(&(_inp)->inp_mtx); \ +#define SCTP_INP_WLOCK(_inp) do { \ + mtx_lock(&(_inp)->inp_mtx); \ } while (0) - #endif +#define SCTP_INP_RUNLOCK(_inp) do { \ + mtx_unlock(&(_inp)->inp_mtx); \ +} while (0) -#define SCTP_TCB_SEND_LOCK_INIT(_tcb) \ - mtx_init(&(_tcb)->tcb_send_mtx, "sctp-send-tcb", "tcbs", MTX_DEF | MTX_DUPOK) +#define SCTP_INP_WUNLOCK(_inp) do { \ + mtx_unlock(&(_inp)->inp_mtx); \ +} while (0) -#define SCTP_TCB_SEND_LOCK_DESTROY(_tcb) mtx_destroy(&(_tcb)->tcb_send_mtx) +#define SCTP_INP_RLOCK_ASSERT(_inp) do { \ + KASSERT(mtx_owned(&(_inp)->inp_mtx), \ + ("Don't own INP read lock")); \ +} while (0) -#define SCTP_TCB_SEND_LOCK(_tcb) do { \ - mtx_lock(&(_tcb)->tcb_send_mtx); \ +#define SCTP_INP_WLOCK_ASSERT(_inp) do { \ + KASSERT(mtx_owned(&(_inp)->inp_mtx), \ + ("Don't own INP write lock")); \ } while (0) -#define SCTP_TCB_SEND_UNLOCK(_tcb) mtx_unlock(&(_tcb)->tcb_send_mtx) - #define SCTP_INP_INCR_REF(_inp) atomic_add_int(&((_inp)->refcount), 1) #define SCTP_INP_DECR_REF(_inp) atomic_add_int(&((_inp)->refcount), -1) +#define SCTP_ASOC_CREATE_LOCK_INIT(_inp) do { \ + mtx_init(&(_inp)->inp_create_mtx, "sctp-create", "inp_create", \ + MTX_DEF | MTX_DUPOK); \ +} while (0) +#define SCTP_ASOC_CREATE_LOCK_DESTROY(_inp) do { \ + mtx_destroy(&(_inp)->inp_create_mtx); \ +} while (0) + #ifdef SCTP_LOCK_LOGGING -#define SCTP_ASOC_CREATE_LOCK(_inp) \ - do { \ - if(SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) sctp_log_lock(_inp, (struct sctp_tcb *)NULL, SCTP_LOG_LOCK_CREATE); \ - mtx_lock(&(_inp)->inp_create_mtx); \ - } while (0) +#define SCTP_ASOC_CREATE_LOCK(_inp) do { \ + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) \ + sctp_log_lock(_inp, NULL, SCTP_LOG_LOCK_CREATE); \ + mtx_lock(&(_inp)->inp_create_mtx); \ +} while (0) #else - -#define SCTP_ASOC_CREATE_LOCK(_inp) \ - do { \ - mtx_lock(&(_inp)->inp_create_mtx); \ - } while (0) +#define SCTP_ASOC_CREATE_LOCK(_inp) do { \ + mtx_lock(&(_inp)->inp_create_mtx); \ +} while (0) #endif -#define SCTP_INP_RUNLOCK(_inp) mtx_unlock(&(_inp)->inp_mtx) -#define SCTP_INP_WUNLOCK(_inp) mtx_unlock(&(_inp)->inp_mtx) -#define SCTP_ASOC_CREATE_UNLOCK(_inp) mtx_unlock(&(_inp)->inp_create_mtx) +#define SCTP_ASOC_CREATE_UNLOCK(_inp) do { \ + mtx_unlock(&(_inp)->inp_create_mtx); \ +} while (0) +#define SCTP_ASOC_CREATE_LOCK_CONTENDED(_inp) \ + ((_inp)->inp_create_mtx.mtx_lock & MTX_CONTESTED) + + +#define SCTP_TCB_SEND_LOCK_INIT(_tcb) do { \ + mtx_init(&(_tcb)->tcb_send_mtx, "sctp-send-tcb", "tcbs", \ + MTX_DEF | MTX_DUPOK); \ +} while (0) + +#define SCTP_TCB_SEND_LOCK_DESTROY(_tcb) do { \ + mtx_destroy(&(_tcb)->tcb_send_mtx); \ +} while (0) + +#define SCTP_TCB_SEND_LOCK(_tcb) do { \ + mtx_lock(&(_tcb)->tcb_send_mtx); \ +} while (0) + +#define SCTP_TCB_SEND_UNLOCK(_tcb) do { \ + mtx_unlock(&(_tcb)->tcb_send_mtx); \ +} while (0) + /* * For the majority of things (once we have found the association) we will * lock the actual association mutex. This will protect all the assoiciation @@ -308,168 +350,154 @@ extern int sctp_logoff_stuff; * extra SOCKBUF_LOCK(&so->so_rcv) even though the association is locked. */ -#define SCTP_TCB_LOCK_INIT(_tcb) \ - mtx_init(&(_tcb)->tcb_mtx, "sctp-tcb", "tcb", MTX_DEF | MTX_DUPOK) +#define SCTP_TCB_LOCK_INIT(_tcb) do { \ + mtx_init(&(_tcb)->tcb_mtx, "sctp-tcb", "tcb", \ + MTX_DEF | MTX_DUPOK); \ +} while (0) -#define SCTP_TCB_LOCK_DESTROY(_tcb) mtx_destroy(&(_tcb)->tcb_mtx) +#define SCTP_TCB_LOCK_DESTROY(_tcb) do { \ + mtx_destroy(&(_tcb)->tcb_mtx); \ +} while (0) #ifdef SCTP_LOCK_LOGGING -#define SCTP_TCB_LOCK(_tcb) do { \ - if(SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) sctp_log_lock(_tcb->sctp_ep, _tcb, SCTP_LOG_LOCK_TCB); \ - mtx_lock(&(_tcb)->tcb_mtx); \ +#define SCTP_TCB_LOCK(_tcb) do { \ + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOCK_LOGGING_ENABLE) \ + sctp_log_lock(_tcb->sctp_ep, _tcb, SCTP_LOG_LOCK_TCB); \ + mtx_lock(&(_tcb)->tcb_mtx); \ } while (0) - #else -#define SCTP_TCB_LOCK(_tcb) do { \ - mtx_lock(&(_tcb)->tcb_mtx); \ +#define SCTP_TCB_LOCK(_tcb) do { \ + mtx_lock(&(_tcb)->tcb_mtx); \ } while (0) #endif +#define SCTP_TCB_TRYLOCK(_tcb) \ + mtx_trylock(&(_tcb)->tcb_mtx) -#define SCTP_TCB_TRYLOCK(_tcb) mtx_trylock(&(_tcb)->tcb_mtx) +#define SCTP_TCB_UNLOCK(_tcb) do { \ + mtx_unlock(&(_tcb)->tcb_mtx); \ +} while (0) -#define SCTP_TCB_UNLOCK(_tcb) mtx_unlock(&(_tcb)->tcb_mtx) +#define SCTP_TCB_UNLOCK_IFOWNED(_tcb) do { \ + if (mtx_owned(&(_tcb)->tcb_mtx)) \ + mtx_unlock(&(_tcb)->tcb_mtx); \ +} while (0) -#define SCTP_TCB_UNLOCK_IFOWNED(_tcb) do { \ - if (mtx_owned(&(_tcb)->tcb_mtx)) \ - mtx_unlock(&(_tcb)->tcb_mtx); \ - } while (0) +#define SCTP_TCB_LOCK_ASSERT(_tcb) do { \ + KASSERT(mtx_owned(&(_tcb)->tcb_mtx), \ + ("Don't own TCB lock")); \ +} while (0) +#define SCTP_ITERATOR_LOCK_INIT() do { \ + mtx_init(&sctp_it_ctl.it_mtx, "sctp-it", "iterator", MTX_DEF); \ +} while (0) -#ifdef INVARIANTS -#define SCTP_TCB_LOCK_ASSERT(_tcb) do { \ - if (mtx_owned(&(_tcb)->tcb_mtx) == 0) \ - panic("Don't own TCB lock"); \ - } while (0) -#else -#define SCTP_TCB_LOCK_ASSERT(_tcb) -#endif +#define SCTP_ITERATOR_LOCK_DESTROY() do { \ + mtx_destroy(&sctp_it_ctl.it_mtx); \ +} while (0) -#define SCTP_ITERATOR_LOCK_INIT() \ - mtx_init(&sctp_it_ctl.it_mtx, "sctp-it", "iterator", MTX_DEF) - -#ifdef INVARIANTS #define SCTP_ITERATOR_LOCK() \ do { \ - if (mtx_owned(&sctp_it_ctl.it_mtx)) \ - panic("Iterator Lock"); \ + KASSERT(!mtx_owned(&sctp_it_ctl.it_mtx), \ + ("Own the iterator lock")); \ mtx_lock(&sctp_it_ctl.it_mtx); \ } while (0) -#else -#define SCTP_ITERATOR_LOCK() \ - do { \ - mtx_lock(&sctp_it_ctl.it_mtx); \ - } while (0) -#endif +#define SCTP_ITERATOR_UNLOCK() do { \ + mtx_unlock(&sctp_it_ctl.it_mtx); \ +} while (0) -#define SCTP_ITERATOR_UNLOCK() mtx_unlock(&sctp_it_ctl.it_mtx) -#define SCTP_ITERATOR_LOCK_DESTROY() mtx_destroy(&sctp_it_ctl.it_mtx) +#define SCTP_WQ_ADDR_INIT() do { \ + mtx_init(&SCTP_BASE_INFO(wq_addr_mtx), \ + "sctp-addr-wq","sctp_addr_wq", MTX_DEF); \ +} while (0) -#define SCTP_WQ_ADDR_INIT() do { \ - mtx_init(&SCTP_BASE_INFO(wq_addr_mtx), "sctp-addr-wq","sctp_addr_wq",MTX_DEF); \ - } while (0) +#define SCTP_WQ_ADDR_DESTROY() do { \ + if (mtx_owned(&SCTP_BASE_INFO(wq_addr_mtx))) { \ + mtx_unlock(&SCTP_BASE_INFO(wq_addr_mtx)); \ + } \ + mtx_destroy(&SCTP_BASE_INFO(wq_addr_mtx)); \ +} while (0) -#define SCTP_WQ_ADDR_DESTROY() do { \ - if(mtx_owned(&SCTP_BASE_INFO(wq_addr_mtx))) { \ - mtx_unlock(&SCTP_BASE_INFO(wq_addr_mtx)); \ - } \ - mtx_destroy(&SCTP_BASE_INFO(wq_addr_mtx)); \ - } while (0) +#define SCTP_WQ_ADDR_LOCK() do { \ + mtx_lock(&SCTP_BASE_INFO(wq_addr_mtx)); \ +} while (0) -#define SCTP_WQ_ADDR_LOCK() do { \ - mtx_lock(&SCTP_BASE_INFO(wq_addr_mtx)); \ +#define SCTP_WQ_ADDR_UNLOCK() do { \ + mtx_unlock(&SCTP_BASE_INFO(wq_addr_mtx)); \ } while (0) -#define SCTP_WQ_ADDR_UNLOCK() do { \ - mtx_unlock(&SCTP_BASE_INFO(wq_addr_mtx)); \ + +#define SCTP_WQ_ADDR_LOCK_ASSERT() do { \ + KASSERT(mtx_owned(&SCTP_BASE_INFO(wq_addr_mtx)), \ + ("Don't own the ADDR-WQ lock")); \ } while (0) +#define SCTP_INCR_EP_COUNT() do { \ + atomic_add_int(&SCTP_BASE_INFO(ipi_count_ep), 1); \ +} while (0) +#define SCTP_DECR_EP_COUNT() do { \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_ep), 1); \ +} while (0) -#define SCTP_INCR_EP_COUNT() \ - do { \ - atomic_add_int(&SCTP_BASE_INFO(ipi_count_ep), 1); \ - } while (0) +#define SCTP_INCR_ASOC_COUNT() do { \ + atomic_add_int(&SCTP_BASE_INFO(ipi_count_asoc), 1); \ +} while (0) -#define SCTP_DECR_EP_COUNT() \ - do { \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_ep), 1); \ - } while (0) +#define SCTP_DECR_ASOC_COUNT() do { \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_asoc), 1); \ +} while (0) -#define SCTP_INCR_ASOC_COUNT() \ - do { \ - atomic_add_int(&SCTP_BASE_INFO(ipi_count_asoc), 1); \ - } while (0) +#define SCTP_INCR_LADDR_COUNT() do { \ + atomic_add_int(&SCTP_BASE_INFO(ipi_count_laddr), 1); \ +} while (0) -#define SCTP_DECR_ASOC_COUNT() \ - do { \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_asoc), 1); \ - } while (0) +#define SCTP_DECR_LADDR_COUNT() do { \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_laddr), 1); \ +} while (0) -#define SCTP_INCR_LADDR_COUNT() \ - do { \ - atomic_add_int(&SCTP_BASE_INFO(ipi_count_laddr), 1); \ - } while (0) +#define SCTP_INCR_RADDR_COUNT() do { \ + atomic_add_int(&SCTP_BASE_INFO(ipi_count_raddr), 1); \ +} while (0) -#define SCTP_DECR_LADDR_COUNT() \ - do { \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_laddr), 1); \ - } while (0) +#define SCTP_DECR_RADDR_COUNT() do { \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_raddr),1); \ +} while (0) -#define SCTP_INCR_RADDR_COUNT() \ - do { \ - atomic_add_int(&SCTP_BASE_INFO(ipi_count_raddr), 1); \ - } while (0) +#define SCTP_INCR_CHK_COUNT() do { \ + atomic_add_int(&SCTP_BASE_INFO(ipi_count_chunk), 1); \ +} while (0) -#define SCTP_DECR_RADDR_COUNT() \ - do { \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_raddr),1); \ - } while (0) +#define SCTP_DECR_CHK_COUNT() do { \ + KASSERT(SCTP_BASE_INFO(ipi_count_chunk) > 0, \ + ("ipi_count_chunk would become negative")); \ + if (SCTP_BASE_INFO(ipi_count_chunk) != 0) \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_chunk), \ + 1); \ +} while (0) -#define SCTP_INCR_CHK_COUNT() \ - do { \ - atomic_add_int(&SCTP_BASE_INFO(ipi_count_chunk), 1); \ - } while (0) -#ifdef INVARIANTS -#define SCTP_DECR_CHK_COUNT() \ - do { \ - if(SCTP_BASE_INFO(ipi_count_chunk) == 0) \ - panic("chunk count to 0?"); \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_chunk), 1); \ - } while (0) -#else -#define SCTP_DECR_CHK_COUNT() \ - do { \ - if(SCTP_BASE_INFO(ipi_count_chunk) != 0) \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_chunk), 1); \ - } while (0) -#endif -#define SCTP_INCR_READQ_COUNT() \ - do { \ - atomic_add_int(&SCTP_BASE_INFO(ipi_count_readq),1); \ - } while (0) +#define SCTP_INCR_READQ_COUNT() do { \ + atomic_add_int(&SCTP_BASE_INFO(ipi_count_readq), 1); \ +} while (0) -#define SCTP_DECR_READQ_COUNT() \ - do { \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_readq), 1); \ - } while (0) +#define SCTP_DECR_READQ_COUNT() do { \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_readq), 1); \ +} while (0) -#define SCTP_INCR_STRMOQ_COUNT() \ - do { \ - atomic_add_int(&SCTP_BASE_INFO(ipi_count_strmoq), 1); \ - } while (0) +#define SCTP_INCR_STRMOQ_COUNT() do { \ + atomic_add_int(&SCTP_BASE_INFO(ipi_count_strmoq), 1); \ +} while (0) -#define SCTP_DECR_STRMOQ_COUNT() \ - do { \ - atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_strmoq), 1); \ - } while (0) +#define SCTP_DECR_STRMOQ_COUNT() do { \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_strmoq), 1); \ +} while (0) - #if defined(SCTP_SO_LOCK_TESTING) -#define SCTP_INP_SO(sctpinp) (sctpinp)->ip_inp.inp.inp_socket +#define SCTP_INP_SO(sctpinp) \ + (sctpinp)->ip_inp.inp.inp_socket #define SCTP_SOCKET_LOCK(so, refcnt) #define SCTP_SOCKET_UNLOCK(so, refcnt) #endif From owner-svn-src-all@freebsd.org Sun Aug 23 22:07:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6659A3CD083; Sun, 23 Aug 2020 22:07:50 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTs22TKzz4cgy; Sun, 23 Aug 2020 22:07:50 +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 378D6DEF5; Sun, 23 Aug 2020 22:07:50 +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 07NM7oSc085948; Sun, 23 Aug 2020 22:07:50 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NM7o3v085947; Sun, 23 Aug 2020 22:07:50 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232207.07NM7o3v085947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:07:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364564 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364564 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:07:50 -0000 Author: tuexen Date: Sun Aug 23 22:07:49 2020 New Revision: 364564 URL: https://svnweb.freebsd.org/changeset/base/364564 Log: MFC r359287: Another cleanup of the timer code. Also be more pedantic about the parameters of the timer start and stop routines. Several inconsistencies have been fixed in earlier commits. Now they will be catched when running an INVARIANTS system. Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 22:05:57 2020 (r364563) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 22:07:49 2020 (r364564) @@ -1598,9 +1598,35 @@ sctp_handle_addr_wq(void) } } +/*- + * The following table shows which pointers for the inp, stcb, or net are + * stored for each timer after it was started. + * + *|Name |Timer |inp |stcb|net | + *|-----------------------------|-----------------------------|----|----|----| + *|SCTP_TIMER_TYPE_SEND |net->rxt_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_INIT |net->rxt_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_RECV |stcb->asoc.dack_timer |Yes |Yes |No | + *|SCTP_TIMER_TYPE_SHUTDOWN |net->rxt_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_HEARTBEAT |net->hb_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_COOKIE |net->rxt_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_NEWCOOKIE |inp->sctp_ep.signature_change|Yes |No |No | + *|SCTP_TIMER_TYPE_PATHMTURAISE |net->pmtu_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_SHUTDOWNACK |net->rxt_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_ASCONF |stcb->asoc.asconf_timer |Yes |Yes |Yes | + *|SCTP_TIMER_TYPE_SHUTDOWNGUARD|stcb->asoc.shut_guard_timer |Yes |Yes |No | + *|SCTP_TIMER_TYPE_AUTOCLOSE |stcb->asoc.autoclose_timer |Yes |Yes |No | + *|SCTP_TIMER_TYPE_STRRESET |stcb->asoc.strreset_timer |Yes |Yes |No | + *|SCTP_TIMER_TYPE_INPKILL |inp->sctp_ep.signature_change|Yes |No |No | + *|SCTP_TIMER_TYPE_ASOCKILL |stcb->asoc.strreset_timer |Yes |Yes |No | + *|SCTP_TIMER_TYPE_ADDR_WQ |SCTP_BASE_INFO(addr_wq_timer)|No |No |No | + *|SCTP_TIMER_TYPE_PRIM_DELETED |stcb->asoc.delete_prim_timer |Yes |Yes |No | + */ + void sctp_timeout_handler(void *t) { + struct timeval tv; struct sctp_inpcb *inp; struct sctp_tcb *stcb; struct sctp_nets *net; @@ -1611,6 +1637,7 @@ sctp_timeout_handler(void *t) #endif int did_output; int type; + int i, secret; tmr = (struct sctp_timer *)t; inp = (struct sctp_inpcb *)tmr->ep; @@ -1625,48 +1652,31 @@ sctp_timeout_handler(void *t) #endif /* sanity checks... */ - if (tmr->self != (void *)tmr) { - /* - * SCTP_PRINTF("Stale SCTP timer fired (%p), ignoring...\n", - * (void *)tmr); - */ - CURVNET_RESTORE(); - return; - } + KASSERT(tmr->self == tmr, ("tmr->self corrupted")); + KASSERT(SCTP_IS_TIMER_TYPE_VALID(tmr->type), ("Invalid timer type %d", tmr->type)); + type = tmr->type; tmr->stopped_from = 0xa001; - if (!SCTP_IS_TIMER_TYPE_VALID(tmr->type)) { - /* - * SCTP_PRINTF("SCTP timer fired with invalid type: 0x%x\n", - * tmr->type); - */ - CURVNET_RESTORE(); - return; - } - tmr->stopped_from = 0xa002; - if ((tmr->type != SCTP_TIMER_TYPE_ADDR_WQ) && (inp == NULL)) { - CURVNET_RESTORE(); - return; - } - /* if this is an iterator timeout, get the struct and clear inp */ - tmr->stopped_from = 0xa003; if (inp) { SCTP_INP_INCR_REF(inp); if ((inp->sctp_socket == NULL) && - ((tmr->type != SCTP_TIMER_TYPE_INPKILL) && - (tmr->type != SCTP_TIMER_TYPE_INIT) && - (tmr->type != SCTP_TIMER_TYPE_SEND) && - (tmr->type != SCTP_TIMER_TYPE_RECV) && - (tmr->type != SCTP_TIMER_TYPE_HEARTBEAT) && - (tmr->type != SCTP_TIMER_TYPE_SHUTDOWN) && - (tmr->type != SCTP_TIMER_TYPE_SHUTDOWNACK) && - (tmr->type != SCTP_TIMER_TYPE_SHUTDOWNGUARD) && - (tmr->type != SCTP_TIMER_TYPE_ASOCKILL))) { + ((type != SCTP_TIMER_TYPE_INPKILL) && + (type != SCTP_TIMER_TYPE_INIT) && + (type != SCTP_TIMER_TYPE_SEND) && + (type != SCTP_TIMER_TYPE_RECV) && + (type != SCTP_TIMER_TYPE_HEARTBEAT) && + (type != SCTP_TIMER_TYPE_SHUTDOWN) && + (type != SCTP_TIMER_TYPE_SHUTDOWNACK) && + (type != SCTP_TIMER_TYPE_SHUTDOWNGUARD) && + (type != SCTP_TIMER_TYPE_ASOCKILL))) { SCTP_INP_DECR_REF(inp); CURVNET_RESTORE(); + SCTPDBG(SCTP_DEBUG_TIMER2, + "Timer type = %d handler exiting due to closed socket\n", + type); return; } } - tmr->stopped_from = 0xa004; + tmr->stopped_from = 0xa002; if (stcb) { atomic_add_int(&stcb->asoc.refcnt, 1); if (stcb->asoc.state == 0) { @@ -1675,11 +1685,13 @@ sctp_timeout_handler(void *t) SCTP_INP_DECR_REF(inp); } CURVNET_RESTORE(); + SCTPDBG(SCTP_DEBUG_TIMER2, + "Timer type = %d handler exiting due to CLOSED association\n", + type); return; } } - type = tmr->type; - tmr->stopped_from = 0xa005; + tmr->stopped_from = 0xa003; SCTPDBG(SCTP_DEBUG_TIMER1, "Timer type %d goes off\n", type); if (!SCTP_OS_TIMER_ACTIVE(&tmr->timer)) { if (inp) { @@ -1689,9 +1701,12 @@ sctp_timeout_handler(void *t) atomic_add_int(&stcb->asoc.refcnt, -1); } CURVNET_RESTORE(); + SCTPDBG(SCTP_DEBUG_TIMER2, + "Timer type = %d handler exiting due to not being active\n", + type); return; } - tmr->stopped_from = 0xa006; + tmr->stopped_from = 0xa004; if (stcb) { SCTP_TCB_LOCK(stcb); @@ -1704,12 +1719,13 @@ sctp_timeout_handler(void *t) SCTP_INP_DECR_REF(inp); } CURVNET_RESTORE(); + SCTPDBG(SCTP_DEBUG_TIMER2, + "Timer type = %d handler exiting due to CLOSED association\n", + type); return; } } else if (inp != NULL) { - if (type != SCTP_TIMER_TYPE_INPKILL) { - SCTP_INP_WLOCK(inp); - } + SCTP_INP_WLOCK(inp); } else { SCTP_WQ_ADDR_LOCK(); } @@ -1734,9 +1750,9 @@ sctp_timeout_handler(void *t) /* call the handler for the appropriate timer type */ switch (type) { case SCTP_TIMER_TYPE_SEND: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timodata); stcb->asoc.timodata++; stcb->asoc.num_send_timers_up--; @@ -1770,9 +1786,9 @@ sctp_timeout_handler(void *t) } break; case SCTP_TIMER_TYPE_INIT: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timoinit); stcb->asoc.timoinit++; if (sctp_t1init_timer(inp, stcb, net)) { @@ -1783,36 +1799,36 @@ sctp_timeout_handler(void *t) did_output = 0; break; case SCTP_TIMER_TYPE_RECV: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timosack); stcb->asoc.timosack++; sctp_send_sack(stcb, SCTP_SO_NOT_LOCKED); #ifdef SCTP_AUDITING_ENABLED - sctp_auditing(4, inp, stcb, net); + sctp_auditing(4, inp, stcb, NULL); #endif sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SACK_TMR, SCTP_SO_NOT_LOCKED); break; case SCTP_TIMER_TYPE_SHUTDOWN: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); + SCTP_STAT_INCR(sctps_timoshutdown); + stcb->asoc.timoshutdown++; if (sctp_shutdown_timer(inp, stcb, net)) { /* no need to unlock on tcb its gone */ goto out_decr; } - SCTP_STAT_INCR(sctps_timoshutdown); - stcb->asoc.timoshutdown++; #ifdef SCTP_AUDITING_ENABLED sctp_auditing(4, inp, stcb, net); #endif sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SHUT_TMR, SCTP_SO_NOT_LOCKED); break; case SCTP_TIMER_TYPE_HEARTBEAT: - if ((stcb == NULL) || (inp == NULL) || (net == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timoheartbeat); stcb->asoc.timoheartbeat++; if (sctp_heartbeat_timer(inp, stcb, net)) { @@ -1828,16 +1844,15 @@ sctp_timeout_handler(void *t) } break; case SCTP_TIMER_TYPE_COOKIE: - if ((stcb == NULL) || (inp == NULL)) { - break; - } - + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); + SCTP_STAT_INCR(sctps_timocookie); + stcb->asoc.timocookie++; if (sctp_cookie_timer(inp, stcb, net)) { /* no need to unlock on tcb its gone */ goto out_decr; } - SCTP_STAT_INCR(sctps_timocookie); - stcb->asoc.timocookie++; #ifdef SCTP_AUDITING_ENABLED sctp_auditing(4, inp, stcb, net); #endif @@ -1848,44 +1863,39 @@ sctp_timeout_handler(void *t) sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_NOT_LOCKED); break; case SCTP_TIMER_TYPE_NEWCOOKIE: - { - struct timeval tv; - int i, secret; - - if (inp == NULL) { - break; - } - SCTP_STAT_INCR(sctps_timosecret); - (void)SCTP_GETTIME_TIMEVAL(&tv); - inp->sctp_ep.time_of_secret_change = tv.tv_sec; - inp->sctp_ep.last_secret_number = - inp->sctp_ep.current_secret_number; - inp->sctp_ep.current_secret_number++; - if (inp->sctp_ep.current_secret_number >= - SCTP_HOW_MANY_SECRETS) { - inp->sctp_ep.current_secret_number = 0; - } - secret = (int)inp->sctp_ep.current_secret_number; - for (i = 0; i < SCTP_NUMBER_OF_SECRETS; i++) { - inp->sctp_ep.secret_key[secret][i] = - sctp_select_initial_TSN(&inp->sctp_ep); - } - sctp_timer_start(SCTP_TIMER_TYPE_NEWCOOKIE, inp, NULL, NULL); + KASSERT(inp != NULL && stcb == NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); + SCTP_STAT_INCR(sctps_timosecret); + (void)SCTP_GETTIME_TIMEVAL(&tv); + inp->sctp_ep.time_of_secret_change = tv.tv_sec; + inp->sctp_ep.last_secret_number = + inp->sctp_ep.current_secret_number; + inp->sctp_ep.current_secret_number++; + if (inp->sctp_ep.current_secret_number >= + SCTP_HOW_MANY_SECRETS) { + inp->sctp_ep.current_secret_number = 0; } + secret = (int)inp->sctp_ep.current_secret_number; + for (i = 0; i < SCTP_NUMBER_OF_SECRETS; i++) { + inp->sctp_ep.secret_key[secret][i] = + sctp_select_initial_TSN(&inp->sctp_ep); + } + sctp_timer_start(SCTP_TIMER_TYPE_NEWCOOKIE, inp, NULL, NULL); did_output = 0; break; case SCTP_TIMER_TYPE_PATHMTURAISE: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timopathmtu); sctp_pathmtu_timer(inp, stcb, net); did_output = 0; break; case SCTP_TIMER_TYPE_SHUTDOWNACK: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); if (sctp_shutdownack_timer(inp, stcb, net)) { /* no need to unlock on tcb its gone */ goto out_decr; @@ -1898,23 +1908,23 @@ sctp_timeout_handler(void *t) sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SHUT_ACK_TMR, SCTP_SO_NOT_LOCKED); break; case SCTP_TIMER_TYPE_ASCONF: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net != NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); + SCTP_STAT_INCR(sctps_timoasconf); if (sctp_asconf_timer(inp, stcb, net)) { /* no need to unlock on tcb its gone */ goto out_decr; } - SCTP_STAT_INCR(sctps_timoasconf); #ifdef SCTP_AUDITING_ENABLED sctp_auditing(4, inp, stcb, net); #endif sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_ASCONF_TMR, SCTP_SO_NOT_LOCKED); break; case SCTP_TIMER_TYPE_SHUTDOWNGUARD: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timoshutdownguard); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), "Shutdown guard timer expired"); @@ -1923,45 +1933,46 @@ sctp_timeout_handler(void *t) goto out_decr; case SCTP_TIMER_TYPE_AUTOCLOSE: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timoautoclose); sctp_autoclose_timer(inp, stcb); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_AUTOCLOSE_TMR, SCTP_SO_NOT_LOCKED); did_output = 0; break; case SCTP_TIMER_TYPE_STRRESET: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); + SCTP_STAT_INCR(sctps_timostrmrst); if (sctp_strreset_timer(inp, stcb)) { /* no need to unlock on tcb its gone */ goto out_decr; } - SCTP_STAT_INCR(sctps_timostrmrst); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_STRRST_TMR, SCTP_SO_NOT_LOCKED); break; case SCTP_TIMER_TYPE_INPKILL: + KASSERT(inp != NULL && stcb == NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timoinpkill); - if (inp == NULL) { - break; - } /* * special case, take away our increment since WE are the * killer */ - SCTP_INP_DECR_REF(inp); sctp_timer_stop(SCTP_TIMER_TYPE_INPKILL, inp, NULL, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_3); + SCTP_INP_DECR_REF(inp); + SCTP_INP_WUNLOCK(inp); sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, SCTP_CALLED_FROM_INPKILL_TIMER); inp = NULL; goto out_no_decr; case SCTP_TIMER_TYPE_ASOCKILL: - if ((stcb == NULL) || (inp == NULL)) { - break; - } + KASSERT(inp != NULL && stcb != NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timoassockill); /* Can we free it yet? */ SCTP_INP_DECR_REF(inp); @@ -1987,19 +1998,20 @@ sctp_timeout_handler(void *t) stcb = NULL; goto out_no_decr; case SCTP_TIMER_TYPE_ADDR_WQ: + KASSERT(inp == NULL && stcb == NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); sctp_handle_addr_wq(); break; case SCTP_TIMER_TYPE_PRIM_DELETED: - if ((stcb == NULL) || (inp == NULL)) { - break; - } - sctp_delete_prim_timer(inp, stcb); + KASSERT(inp != NULL && stcb != NULL && net == NULL, + ("timeout of type %d: inp = %p, stcb = %p, net = %p", + type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timodelprim); + sctp_delete_prim_timer(inp, stcb); break; default: - SCTPDBG(SCTP_DEBUG_TIMER1, "sctp_timeout_handler:unknown timer %d\n", - type); - break; + panic("Unknown timer type %d", type); } #ifdef SCTP_AUDITING_ENABLED sctp_audit_log(0xF1, (uint8_t)type); @@ -2031,53 +2043,104 @@ out_decr: } out_no_decr: - SCTPDBG(SCTP_DEBUG_TIMER1, "Timer now complete (type = %d)\n", type); + SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type = %d handler finished\n", type); CURVNET_RESTORE(); } +/*- + * The following table shows which parameters must be provided + * when calling sctp_timer_start(). For parameters not being + * provided, NULL must be used. + * + * |Name |inp |stcb|net | + * |-----------------------------|----|----|----| + * |SCTP_TIMER_TYPE_SEND |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_INIT |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_RECV |Yes |Yes |No | + * |SCTP_TIMER_TYPE_SHUTDOWN |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_HEARTBEAT |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_COOKIE |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_NEWCOOKIE |Yes |No |No | + * |SCTP_TIMER_TYPE_PATHMTURAISE |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_SHUTDOWNACK |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_ASCONF |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_SHUTDOWNGUARD|Yes |Yes |No | + * |SCTP_TIMER_TYPE_AUTOCLOSE |Yes |Yes |No | + * |SCTP_TIMER_TYPE_STRRESET |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_INPKILL |Yes |No |No | + * |SCTP_TIMER_TYPE_ASOCKILL |Yes |Yes |No | + * |SCTP_TIMER_TYPE_ADDR_WQ |No |No |No | + * |SCTP_TIMER_TYPE_PRIM_DELETED |Yes |Yes |No | + * + */ + void sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net) { - uint32_t to_ticks; struct sctp_timer *tmr; + uint32_t to_ticks; + uint32_t rndval, jitter; - if ((t_type != SCTP_TIMER_TYPE_ADDR_WQ) && (inp == NULL)) - return; - tmr = NULL; - if (stcb) { + to_ticks = 0; + if (stcb != NULL) { SCTP_TCB_LOCK_ASSERT(stcb); + } else if (inp != NULL) { + SCTP_INP_WLOCK_ASSERT(inp); + } else { + SCTP_WQ_ADDR_LOCK_ASSERT(); } - /* Don't restart timer on net that's been removed. */ - if (net != NULL && (net->dest_state & SCTP_ADDR_BEING_DELETED)) { - return; + if (stcb != NULL) { + /* + * Don't restart timer on association that's about to be + * killed. + */ + if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) && + (t_type != SCTP_TIMER_TYPE_ASOCKILL)) { + SCTPDBG(SCTP_DEBUG_TIMER2, + "timer type %d not started: inp=%p, stcb=%p, net=%p (stcb deleted).\n", + t_type, inp, stcb, net); + return; + } + /* Don't restart timer on net that's been removed. */ + if (net != NULL && (net->dest_state & SCTP_ADDR_BEING_DELETED)) { + SCTPDBG(SCTP_DEBUG_TIMER2, + "timer type %d not started: inp=%p, stcb=%p, net=%p (net deleted).\n", + t_type, inp, stcb, net); + return; + } } switch (t_type) { case SCTP_TIMER_TYPE_SEND: - /* Here we use the RTO timer */ - { - int rto_val; - - if ((stcb == NULL) || (net == NULL)) { - return; - } - tmr = &net->rxt_timer; - if (net->RTO == 0) { - rto_val = stcb->asoc.initial_rto; - } else { - rto_val = net->RTO; - } - to_ticks = MSEC_TO_TICKS(rto_val); + /* Here we use the RTO timer. */ + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else + return; +#endif } + tmr = &net->rxt_timer; + if (net->RTO == 0) { + to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + } else { + to_ticks = MSEC_TO_TICKS(net->RTO); + } break; case SCTP_TIMER_TYPE_INIT: /* * Here we use the INIT timer default usually about 1 - * minute. + * second. */ - if ((stcb == NULL) || (net == NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } tmr = &net->rxt_timer; if (net->RTO == 0) { @@ -2088,175 +2151,228 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s break; case SCTP_TIMER_TYPE_RECV: /* - * Here we use the Delayed-Ack timer value from the inp + * Here we use the Delayed-Ack timer value from the inp, * ususually about 200ms. */ - if (stcb == NULL) { + if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } tmr = &stcb->asoc.dack_timer; to_ticks = MSEC_TO_TICKS(stcb->asoc.delayed_ack); break; case SCTP_TIMER_TYPE_SHUTDOWN: /* Here we use the RTO of the destination. */ - if ((stcb == NULL) || (net == NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } + tmr = &net->rxt_timer; if (net->RTO == 0) { to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); } else { to_ticks = MSEC_TO_TICKS(net->RTO); } - tmr = &net->rxt_timer; break; case SCTP_TIMER_TYPE_HEARTBEAT: /* - * the net is used here so that we can add in the RTO. Even + * The net is used here so that we can add in the RTO. Even * though we use a different timer. We also add the HB timer * PLUS a random jitter. */ - if ((stcb == NULL) || (net == NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif + } + if ((net->dest_state & SCTP_ADDR_NOHB) && + !(net->dest_state & SCTP_ADDR_UNCONFIRMED)) { + SCTPDBG(SCTP_DEBUG_TIMER2, + "timer type %d not started: inp=%p, stcb=%p, net=%p.\n", + t_type, inp, stcb, net); + return; + } + tmr = &net->hb_timer; + if (net->RTO == 0) { + to_ticks = stcb->asoc.initial_rto; } else { - uint32_t rndval; - uint32_t jitter; - - if ((net->dest_state & SCTP_ADDR_NOHB) && - !(net->dest_state & SCTP_ADDR_UNCONFIRMED)) { - return; - } - if (net->RTO == 0) { - to_ticks = stcb->asoc.initial_rto; - } else { - to_ticks = net->RTO; - } - rndval = sctp_select_initial_TSN(&inp->sctp_ep); - jitter = rndval % to_ticks; - if (jitter >= (to_ticks >> 1)) { - to_ticks = to_ticks + (jitter - (to_ticks >> 1)); - } else { - to_ticks = to_ticks - jitter; - } - if (!(net->dest_state & SCTP_ADDR_UNCONFIRMED) && - !(net->dest_state & SCTP_ADDR_PF)) { - to_ticks += net->heart_beat_delay; - } - /* - * Now we must convert the to_ticks that are now in - * ms to ticks. - */ - to_ticks = MSEC_TO_TICKS(to_ticks); - tmr = &net->hb_timer; + to_ticks = net->RTO; } + rndval = sctp_select_initial_TSN(&inp->sctp_ep); + jitter = rndval % to_ticks; + if (jitter >= (to_ticks >> 1)) { + to_ticks = to_ticks + (jitter - (to_ticks >> 1)); + } else { + to_ticks = to_ticks - jitter; + } + if (!(net->dest_state & SCTP_ADDR_UNCONFIRMED) && + !(net->dest_state & SCTP_ADDR_PF)) { + to_ticks += net->heart_beat_delay; + } + /* + * Now we must convert the to_ticks that are now in ms to + * ticks. + */ + to_ticks = MSEC_TO_TICKS(to_ticks); break; case SCTP_TIMER_TYPE_COOKIE: /* * Here we can use the RTO timer from the network since one - * RTT was compelete. If a retran happened then we will be - * using the RTO initial value. + * RTT was complete. If a retransmission happened then we + * will be using the RTO initial value. */ - if ((stcb == NULL) || (net == NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } + tmr = &net->rxt_timer; if (net->RTO == 0) { to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); } else { to_ticks = MSEC_TO_TICKS(net->RTO); } - tmr = &net->rxt_timer; break; case SCTP_TIMER_TYPE_NEWCOOKIE: /* - * nothing needed but the endpoint here ususually about 60 + * Nothing needed but the endpoint here ususually about 60 * minutes. */ + if ((inp == NULL) || (stcb != NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else + return; +#endif + } tmr = &inp->sctp_ep.signature_change; to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_SIGNATURE]; break; case SCTP_TIMER_TYPE_PATHMTURAISE: /* - * Here we use the value found in the EP for PMTU ususually - * about 10 minutes. + * Here we use the value found in the EP for PMTUD, + * ususually about 10 minutes. */ - if ((stcb == NULL) || (net == NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } if (net->dest_state & SCTP_ADDR_NO_PMTUD) { + SCTPDBG(SCTP_DEBUG_TIMER2, + "timer type %d not started: inp=%p, stcb=%p, net=%p.\n", + t_type, inp, stcb, net); return; } - to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_PMTU]; tmr = &net->pmtu_timer; + to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_PMTU]; break; case SCTP_TIMER_TYPE_SHUTDOWNACK: - /* Here we use the RTO of the destination */ - if ((stcb == NULL) || (net == NULL)) { + /* Here we use the RTO of the destination. */ + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } + tmr = &net->rxt_timer; if (net->RTO == 0) { to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); } else { to_ticks = MSEC_TO_TICKS(net->RTO); } - tmr = &net->rxt_timer; break; case SCTP_TIMER_TYPE_ASCONF: /* * Here the timer comes from the stcb but its value is from * the net's RTO. */ - if ((stcb == NULL) || (net == NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } + tmr = &stcb->asoc.asconf_timer; if (net->RTO == 0) { to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); } else { to_ticks = MSEC_TO_TICKS(net->RTO); } - tmr = &stcb->asoc.asconf_timer; break; case SCTP_TIMER_TYPE_SHUTDOWNGUARD: /* * Here we use the endpoints shutdown guard timer usually * about 3 minutes. */ - if (stcb == NULL) { + if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } + tmr = &stcb->asoc.shut_guard_timer; if (inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN] == 0) { to_ticks = 5 * MSEC_TO_TICKS(stcb->asoc.maxrto); } else { to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN]; } - tmr = &stcb->asoc.shut_guard_timer; break; case SCTP_TIMER_TYPE_AUTOCLOSE: - if (stcb == NULL) { + if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } - if (stcb->asoc.sctp_autoclose_ticks == 0) { - /* - * Really an error since stcb is NOT set to - * autoclose - */ - return; - } - to_ticks = stcb->asoc.sctp_autoclose_ticks; tmr = &stcb->asoc.autoclose_timer; + to_ticks = stcb->asoc.sctp_autoclose_ticks; break; case SCTP_TIMER_TYPE_STRRESET: /* * Here the timer comes from the stcb but its value is from * the net's RTO. */ - if ((stcb == NULL) || (net == NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } + tmr = &stcb->asoc.strreset_timer; if (net->RTO == 0) { to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); } else { to_ticks = MSEC_TO_TICKS(net->RTO); } - tmr = &stcb->asoc.strreset_timer; break; case SCTP_TIMER_TYPE_INPKILL: /* @@ -2264,47 +2380,70 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s * timer since that has stopped and we are in the GONE * state. */ + if ((inp == NULL) || (stcb != NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else + return; +#endif + } tmr = &inp->sctp_ep.signature_change; to_ticks = MSEC_TO_TICKS(SCTP_INP_KILL_TIMEOUT); break; case SCTP_TIMER_TYPE_ASOCKILL: - if (stcb == NULL) { + if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } tmr = &stcb->asoc.strreset_timer; to_ticks = MSEC_TO_TICKS(SCTP_ASOC_KILL_TIMEOUT); break; case SCTP_TIMER_TYPE_ADDR_WQ: + if ((inp != NULL) || (stcb != NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else + return; +#endif + } /* Only 1 tick away :-) */ tmr = &SCTP_BASE_INFO(addr_wq_timer); to_ticks = SCTP_ADDRESS_TICK_DELAY; break; case SCTP_TIMER_TYPE_PRIM_DELETED: - if ((stcb == NULL) || (net != NULL)) { + if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { +#ifdef INVARIANTS + panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", + t_type, inp, stcb, net); +#else return; +#endif } - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); tmr = &stcb->asoc.delete_prim_timer; + to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); break; default: - SCTPDBG(SCTP_DEBUG_TIMER1, "%s: Unknown timer type %d\n", - __func__, t_type); - return; - break; + panic("Unknown timer type %d", t_type); } - if ((to_ticks <= 0) || (tmr == NULL)) { - SCTPDBG(SCTP_DEBUG_TIMER1, "%s: %d:software error to_ticks:%d tmr:%p not set ??\n", - __func__, t_type, to_ticks, (void *)tmr); - return; - } + KASSERT(tmr != NULL, ("tmr is NULL for timer type %d", t_type)); + KASSERT(to_ticks > 0, ("to_ticks == 0 for timer type %d", t_type)); if (SCTP_OS_TIMER_PENDING(&tmr->timer)) { /* - * we do NOT allow you to have it already running. if it is - * we leave the current one up unchanged + * We do NOT allow you to have it already running. If it is, + * we leave the current one up unchanged. */ + SCTPDBG(SCTP_DEBUG_TIMER2, + "timer type %d already running: inp=%p, stcb=%p, net=%p.\n", + t_type, inp, stcb, net); return; } - /* At this point we can proceed */ + /* At this point we can proceed. */ if (t_type == SCTP_TIMER_TYPE_SEND) { stcb->asoc.num_send_timers_up++; } @@ -2312,106 +2451,212 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s tmr->type = t_type; tmr->ep = (void *)inp; tmr->tcb = (void *)stcb; - tmr->net = (void *)net; + if (t_type == SCTP_TIMER_TYPE_STRRESET) { + tmr->net = NULL; + } else { + tmr->net = (void *)net; + } tmr->self = (void *)tmr; tmr->vnet = (void *)curvnet; tmr->ticks = sctp_get_tick_count(); - (void)SCTP_OS_TIMER_START(&tmr->timer, to_ticks, sctp_timeout_handler, tmr); + if (SCTP_OS_TIMER_START(&tmr->timer, to_ticks, sctp_timeout_handler, tmr) == 0) { + SCTPDBG(SCTP_DEBUG_TIMER2, + "timer type %d started: ticks=%u, inp=%p, stcb=%p, net=%p.\n", + t_type, to_ticks, inp, stcb, net); + } else { + /* + * This should not happen, since we checked for pending + * above. + */ + SCTPDBG(SCTP_DEBUG_TIMER2, + "timer type %d restarted: ticks=%u, inp=%p, stcb=%p, net=%p.\n", + t_type, to_ticks, inp, stcb, net); + } return; } +/*- + * The following table shows which parameters must be provided + * when calling sctp_timer_stop(). For parameters not being + * provided, NULL must be used. + * + * |Name |inp |stcb|net | + * |-----------------------------|----|----|----| + * |SCTP_TIMER_TYPE_SEND |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_INIT |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_RECV |Yes |Yes |No | + * |SCTP_TIMER_TYPE_SHUTDOWN |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_HEARTBEAT |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_COOKIE |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_NEWCOOKIE |Yes |No |No | + * |SCTP_TIMER_TYPE_PATHMTURAISE |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_SHUTDOWNACK |Yes |Yes |Yes | + * |SCTP_TIMER_TYPE_ASCONF |Yes |Yes |No | + * |SCTP_TIMER_TYPE_SHUTDOWNGUARD|Yes |Yes |No | + * |SCTP_TIMER_TYPE_AUTOCLOSE |Yes |Yes |No | *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Aug 23 22:09:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A3B43CD08D; Sun, 23 Aug 2020 22:09:21 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTtm6wrsz4ctp; Sun, 23 Aug 2020 22:09:20 +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 D11A1E393; Sun, 23 Aug 2020 22:09:20 +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 07NM9KIU086074; Sun, 23 Aug 2020 22:09:20 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NM9K5S086073; Sun, 23 Aug 2020 22:09:20 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232209.07NM9K5S086073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364565 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364565 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:09:21 -0000 Author: tuexen Date: Sun Aug 23 22:09:20 2020 New Revision: 364565 URL: https://svnweb.freebsd.org/changeset/base/364565 Log: MFC r359288: Only call panic when building with INVARIANTS. Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 22:07:49 2020 (r364564) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 22:09:20 2020 (r364565) @@ -2011,7 +2011,11 @@ sctp_timeout_handler(void *t) sctp_delete_prim_timer(inp, stcb); break; default: +#ifdef INVARIANTS panic("Unknown timer type %d", type); +#else + goto get_out; +#endif } #ifdef SCTP_AUDITING_ENABLED sctp_audit_log(0xF1, (uint8_t)type); @@ -2429,7 +2433,11 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); break; default: +#ifdef INVARIANTS panic("Unknown timer type %d", t_type); +#else + return; +#endif } KASSERT(tmr != NULL, ("tmr is NULL for timer type %d", t_type)); KASSERT(to_ticks > 0, ("to_ticks == 0 for timer type %d", t_type)); @@ -2710,7 +2718,11 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, st tmr = &stcb->asoc.delete_prim_timer; break; default: +#ifdef INVARIANTS panic("Unknown timer type %d", t_type); +#else + return; +#endif } KASSERT(tmr != NULL, ("tmr is NULL for timer type %d", t_type)); if ((tmr->type != SCTP_TIMER_TYPE_NONE) && From owner-svn-src-all@freebsd.org Sun Aug 23 22:12:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB85C3CD03B; Sun, 23 Aug 2020 22:12:55 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTyv5RChz4d4m; Sun, 23 Aug 2020 22:12:55 +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 9DBEEE88C; Sun, 23 Aug 2020 22:12:55 +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 07NMCtcI091900; Sun, 23 Aug 2020 22:12:55 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMCt5r091899; Sun, 23 Aug 2020 22:12:55 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232212.07NMCt5r091899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 22:12:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364566 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364566 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:12:55 -0000 Author: trasz Date: Sun Aug 23 22:12:55 2020 New Revision: 364566 URL: https://svnweb.freebsd.org/changeset/base/364566 Log: MFC r362052: Improve the warnings. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_futex.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_futex.c ============================================================================== --- stable/12/sys/compat/linux/linux_futex.c Sun Aug 23 22:09:20 2020 (r364565) +++ stable/12/sys/compat/linux/linux_futex.c Sun Aug 23 22:12:55 2020 (r364566) @@ -1010,9 +1010,7 @@ retry2: /* not yet implemented */ pem = pem_find(td->td_proc); if ((pem->flags & LINUX_XUNSUP_FUTEXPIOP) == 0) { - linux_msg(td, - "linux_sys_futex: " - "unsupported futex_pi op\n"); + linux_msg(td, "unsupported FUTEX_LOCK_PI"); pem->flags |= LINUX_XUNSUP_FUTEXPIOP; LIN_SDT_PROBE0(futex, linux_sys_futex, unimplemented_lock_pi); @@ -1024,9 +1022,7 @@ retry2: /* not yet implemented */ pem = pem_find(td->td_proc); if ((pem->flags & LINUX_XUNSUP_FUTEXPIOP) == 0) { - linux_msg(td, - "linux_sys_futex: " - "unsupported futex_pi op\n"); + linux_msg(td, "unsupported FUTEX_UNLOCK_PI"); pem->flags |= LINUX_XUNSUP_FUTEXPIOP; LIN_SDT_PROBE0(futex, linux_sys_futex, unimplemented_unlock_pi); @@ -1038,9 +1034,7 @@ retry2: /* not yet implemented */ pem = pem_find(td->td_proc); if ((pem->flags & LINUX_XUNSUP_FUTEXPIOP) == 0) { - linux_msg(td, - "linux_sys_futex: " - "unsupported futex_pi op\n"); + linux_msg(td, "unsupported FUTEX_TRYLOCK_PI"); pem->flags |= LINUX_XUNSUP_FUTEXPIOP; LIN_SDT_PROBE0(futex, linux_sys_futex, unimplemented_trylock_pi); @@ -1057,9 +1051,7 @@ retry2: */ pem = pem_find(td->td_proc); if ((pem->flags & LINUX_XDEPR_REQUEUEOP) == 0) { - linux_msg(td, - "linux_sys_futex: " - "unsupported futex_requeue op\n"); + linux_msg(td, "unsupported FUTEX_REQUEUE"); pem->flags |= LINUX_XDEPR_REQUEUEOP; LIN_SDT_PROBE0(futex, linux_sys_futex, deprecated_requeue); @@ -1072,9 +1064,7 @@ retry2: /* not yet implemented */ pem = pem_find(td->td_proc); if ((pem->flags & LINUX_XUNSUP_FUTEXPIOP) == 0) { - linux_msg(td, - "linux_sys_futex: " - "unsupported futex_pi op\n"); + linux_msg(td, "unsupported FUTEX_WAIT_REQUEUE_PI"); pem->flags |= LINUX_XUNSUP_FUTEXPIOP; LIN_SDT_PROBE0(futex, linux_sys_futex, unimplemented_wait_requeue_pi); @@ -1086,9 +1076,7 @@ retry2: /* not yet implemented */ pem = pem_find(td->td_proc); if ((pem->flags & LINUX_XUNSUP_FUTEXPIOP) == 0) { - linux_msg(td, - "linux_sys_futex: " - "unsupported futex_pi op\n"); + linux_msg(td, "unsupported FUTEX_CMP_REQUEUE_PI"); pem->flags |= LINUX_XUNSUP_FUTEXPIOP; LIN_SDT_PROBE0(futex, linux_sys_futex, unimplemented_cmp_requeue_pi); @@ -1097,8 +1085,7 @@ retry2: return (ENOSYS); default: - linux_msg(td, - "linux_sys_futex: unknown op %d\n", args->op); + linux_msg(td, "unsupported futex op %d\n", args->op); LIN_SDT_PROBE1(futex, linux_sys_futex, unknown_operation, args->op); LIN_SDT_PROBE1(futex, linux_sys_futex, return, ENOSYS); From owner-svn-src-all@freebsd.org Sun Aug 23 22:13:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78D6C3CCF6E; Sun, 23 Aug 2020 22:13:58 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZV062fwJz4dcr; Sun, 23 Aug 2020 22:13:58 +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 3EA1AE440; Sun, 23 Aug 2020 22:13:58 +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 07NMDwfd092020; Sun, 23 Aug 2020 22:13:58 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMDwMS092019; Sun, 23 Aug 2020 22:13:58 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232213.07NMDwMS092019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:13:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364567 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364567 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:13:58 -0000 Author: tuexen Date: Sun Aug 23 22:13:57 2020 New Revision: 364567 URL: https://svnweb.freebsd.org/changeset/base/364567 Log: MFC r359300: Don't restore the vnet too early in error cases. Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 22:12:55 2020 (r364566) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 22:13:57 2020 (r364567) @@ -1669,10 +1669,10 @@ sctp_timeout_handler(void *t) (type != SCTP_TIMER_TYPE_SHUTDOWNGUARD) && (type != SCTP_TIMER_TYPE_ASOCKILL))) { SCTP_INP_DECR_REF(inp); - CURVNET_RESTORE(); SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type = %d handler exiting due to closed socket\n", type); + CURVNET_RESTORE(); return; } } @@ -1684,10 +1684,10 @@ sctp_timeout_handler(void *t) if (inp) { SCTP_INP_DECR_REF(inp); } - CURVNET_RESTORE(); SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type = %d handler exiting due to CLOSED association\n", type); + CURVNET_RESTORE(); return; } } @@ -1700,10 +1700,10 @@ sctp_timeout_handler(void *t) if (stcb) { atomic_add_int(&stcb->asoc.refcnt, -1); } - CURVNET_RESTORE(); SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type = %d handler exiting due to not being active\n", type); + CURVNET_RESTORE(); return; } tmr->stopped_from = 0xa004; @@ -1718,10 +1718,10 @@ sctp_timeout_handler(void *t) if (inp) { SCTP_INP_DECR_REF(inp); } - CURVNET_RESTORE(); SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type = %d handler exiting due to CLOSED association\n", type); + CURVNET_RESTORE(); return; } } else if (inp != NULL) { From owner-svn-src-all@freebsd.org Sun Aug 23 22:16:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E142A3CD072; Sun, 23 Aug 2020 22:16:03 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZV2W5Mh5z4dYg; Sun, 23 Aug 2020 22:16:03 +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 9AE48E81C; Sun, 23 Aug 2020 22:16:03 +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 07NMG3ND092302; Sun, 23 Aug 2020 22:16:03 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMG3hB092301; Sun, 23 Aug 2020 22:16:03 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232216.07NMG3hB092301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364568 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364568 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:16:04 -0000 Author: tuexen Date: Sun Aug 23 22:16:03 2020 New Revision: 364568 URL: https://svnweb.freebsd.org/changeset/base/364568 Log: MFC r359301: Use consistent debug output. Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 22:13:57 2020 (r364567) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 22:16:03 2020 (r364568) @@ -1670,7 +1670,7 @@ sctp_timeout_handler(void *t) (type != SCTP_TIMER_TYPE_ASOCKILL))) { SCTP_INP_DECR_REF(inp); SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type = %d handler exiting due to closed socket\n", + "Timer type %d handler exiting due to closed socket.\n", type); CURVNET_RESTORE(); return; @@ -1685,7 +1685,7 @@ sctp_timeout_handler(void *t) SCTP_INP_DECR_REF(inp); } SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type = %d handler exiting due to CLOSED association\n", + "Timer type %d handler exiting due to CLOSED association.\n", type); CURVNET_RESTORE(); return; @@ -1701,7 +1701,7 @@ sctp_timeout_handler(void *t) atomic_add_int(&stcb->asoc.refcnt, -1); } SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type = %d handler exiting due to not being active\n", + "Timer type %d handler exiting due to not being active.\n", type); CURVNET_RESTORE(); return; @@ -1719,7 +1719,7 @@ sctp_timeout_handler(void *t) SCTP_INP_DECR_REF(inp); } SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type = %d handler exiting due to CLOSED association\n", + "Timer type %d handler exiting due to CLOSED association.\n", type); CURVNET_RESTORE(); return; @@ -2047,7 +2047,7 @@ out_decr: } out_no_decr: - SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type = %d handler finished\n", type); + SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d handler finished.\n", type); CURVNET_RESTORE(); } From owner-svn-src-all@freebsd.org Sun Aug 23 22:17:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7EE23CD707; Sun, 23 Aug 2020 22:17:29 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZV494XLzz4dmF; Sun, 23 Aug 2020 22:17:29 +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 80220E71D; Sun, 23 Aug 2020 22:17:29 +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 07NMHTqS092434; Sun, 23 Aug 2020 22:17:29 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMHTWw092433; Sun, 23 Aug 2020 22:17:29 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232217.07NMHTWw092433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364569 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:17:29 -0000 Author: tuexen Date: Sun Aug 23 22:17:29 2020 New Revision: 364569 URL: https://svnweb.freebsd.org/changeset/base/364569 Log: MFC r359305: Improve consistency in debug output. Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 22:16:03 2020 (r364568) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 22:17:29 2020 (r364569) @@ -1692,7 +1692,7 @@ sctp_timeout_handler(void *t) } } tmr->stopped_from = 0xa003; - SCTPDBG(SCTP_DEBUG_TIMER1, "Timer type %d goes off\n", type); + SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d goes off.\n", type); if (!SCTP_OS_TIMER_ACTIVE(&tmr->timer)) { if (inp) { SCTP_INP_DECR_REF(inp); @@ -1729,9 +1729,9 @@ sctp_timeout_handler(void *t) } else { SCTP_WQ_ADDR_LOCK(); } - /* record in stopped what t-o occurred */ - tmr->stopped_from = type; + /* Record in stopped_from which timeout occurred. */ + tmr->stopped_from = type; /* mark as being serviced now */ if (SCTP_OS_TIMER_PENDING(&tmr->timer)) { /* @@ -2103,14 +2103,14 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) && (t_type != SCTP_TIMER_TYPE_ASOCKILL)) { SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d not started: inp=%p, stcb=%p, net=%p (stcb deleted).\n", + "Timer type %d not started: inp=%p, stcb=%p, net=%p (stcb deleted).\n", t_type, inp, stcb, net); return; } /* Don't restart timer on net that's been removed. */ if (net != NULL && (net->dest_state & SCTP_ADDR_BEING_DELETED)) { SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d not started: inp=%p, stcb=%p, net=%p (net deleted).\n", + "Timer type %d not started: inp=%p, stcb=%p, net=%p (net deleted).\n", t_type, inp, stcb, net); return; } @@ -2203,7 +2203,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s if ((net->dest_state & SCTP_ADDR_NOHB) && !(net->dest_state & SCTP_ADDR_UNCONFIRMED)) { SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d not started: inp=%p, stcb=%p, net=%p.\n", + "Timer type %d not started: inp=%p, stcb=%p, net=%p.\n", t_type, inp, stcb, net); return; } @@ -2282,7 +2282,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } if (net->dest_state & SCTP_ADDR_NO_PMTUD) { SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d not started: inp=%p, stcb=%p, net=%p.\n", + "Timer type %d not started: inp=%p, stcb=%p, net=%p.\n", t_type, inp, stcb, net); return; } @@ -2447,7 +2447,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s * we leave the current one up unchanged. */ SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d already running: inp=%p, stcb=%p, net=%p.\n", + "Timer type %d already running: inp=%p, stcb=%p, net=%p.\n", t_type, inp, stcb, net); return; } @@ -2469,7 +2469,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s tmr->ticks = sctp_get_tick_count(); if (SCTP_OS_TIMER_START(&tmr->timer, to_ticks, sctp_timeout_handler, tmr) == 0) { SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d started: ticks=%u, inp=%p, stcb=%p, net=%p.\n", + "Timer type %d started: ticks=%u, inp=%p, stcb=%p, net=%p.\n", t_type, to_ticks, inp, stcb, net); } else { /* @@ -2477,7 +2477,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s * above. */ SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d restarted: ticks=%u, inp=%p, stcb=%p, net=%p.\n", + "Timer type %d restarted: ticks=%u, inp=%p, stcb=%p, net=%p.\n", t_type, to_ticks, inp, stcb, net); } return; @@ -2734,7 +2734,7 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, st * return. */ SCTPDBG(SCTP_DEBUG_TIMER2, - "shared timer type %d not running: inp=%p, stcb=%p, net=%p.\n", + "Shared timer type %d not running: inp=%p, stcb=%p, net=%p.\n", t_type, inp, stcb, net); return; } @@ -2758,14 +2758,14 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, st ("sctp_timer_stop of type %d: net = %p, tmr->net = %p", t_type, net, tmr->net)); SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d stopped: inp=%p, stcb=%p, net=%p.\n", + "Timer type %d stopped: inp=%p, stcb=%p, net=%p.\n", t_type, inp, stcb, net); tmr->ep = NULL; tmr->tcb = NULL; tmr->net = NULL; } else { SCTPDBG(SCTP_DEBUG_TIMER2, - "timer type %d not stopped: inp=%p, stcb=%p, net=%p.\n", + "Timer type %d not stopped: inp=%p, stcb=%p, net=%p.\n", t_type, inp, stcb, net); } return; From owner-svn-src-all@freebsd.org Sun Aug 23 22:19:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31B183CD79F; Sun, 23 Aug 2020 22:19:40 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZV6h0YFKz4f7S; Sun, 23 Aug 2020 22:19:40 +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 E6059E71E; Sun, 23 Aug 2020 22:19:39 +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 07NMJduT092595; Sun, 23 Aug 2020 22:19:39 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMJdVd092594; Sun, 23 Aug 2020 22:19:39 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232219.07NMJdVd092594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:19:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364570 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:19:40 -0000 Author: tuexen Date: Sun Aug 23 22:19:39 2020 New Revision: 364570 URL: https://svnweb.freebsd.org/changeset/base/364570 Log: MFC r359306: Remove an optimization, which was incorrect a couple of times and therefore doesn't seem worth to be there. In this case COOKIE where not retransmitted anymore, when the socket was already closed. Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 22:17:29 2020 (r364569) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 22:19:39 2020 (r364570) @@ -1655,28 +1655,10 @@ sctp_timeout_handler(void *t) KASSERT(tmr->self == tmr, ("tmr->self corrupted")); KASSERT(SCTP_IS_TIMER_TYPE_VALID(tmr->type), ("Invalid timer type %d", tmr->type)); type = tmr->type; - tmr->stopped_from = 0xa001; if (inp) { SCTP_INP_INCR_REF(inp); - if ((inp->sctp_socket == NULL) && - ((type != SCTP_TIMER_TYPE_INPKILL) && - (type != SCTP_TIMER_TYPE_INIT) && - (type != SCTP_TIMER_TYPE_SEND) && - (type != SCTP_TIMER_TYPE_RECV) && - (type != SCTP_TIMER_TYPE_HEARTBEAT) && - (type != SCTP_TIMER_TYPE_SHUTDOWN) && - (type != SCTP_TIMER_TYPE_SHUTDOWNACK) && - (type != SCTP_TIMER_TYPE_SHUTDOWNGUARD) && - (type != SCTP_TIMER_TYPE_ASOCKILL))) { - SCTP_INP_DECR_REF(inp); - SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type %d handler exiting due to closed socket.\n", - type); - CURVNET_RESTORE(); - return; - } } - tmr->stopped_from = 0xa002; + tmr->stopped_from = 0xa001; if (stcb) { atomic_add_int(&stcb->asoc.refcnt, 1); if (stcb->asoc.state == 0) { @@ -1691,7 +1673,7 @@ sctp_timeout_handler(void *t) return; } } - tmr->stopped_from = 0xa003; + tmr->stopped_from = 0xa002; SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d goes off.\n", type); if (!SCTP_OS_TIMER_ACTIVE(&tmr->timer)) { if (inp) { @@ -1706,8 +1688,8 @@ sctp_timeout_handler(void *t) CURVNET_RESTORE(); return; } - tmr->stopped_from = 0xa004; + tmr->stopped_from = 0xa003; if (stcb) { SCTP_TCB_LOCK(stcb); atomic_add_int(&stcb->asoc.refcnt, -1); From owner-svn-src-all@freebsd.org Sun Aug 23 22:21:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FE833CD637; Sun, 23 Aug 2020 22:21:37 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZV8x3pmyz4fC2; Sun, 23 Aug 2020 22:21:37 +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 66473E898; Sun, 23 Aug 2020 22:21:37 +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 07NMLbF1097557; Sun, 23 Aug 2020 22:21:37 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMLb3g097556; Sun, 23 Aug 2020 22:21:37 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232221.07NMLb3g097556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 22:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364571 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364571 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:21:37 -0000 Author: trasz Date: Sun Aug 23 22:21:36 2020 New Revision: 364571 URL: https://svnweb.freebsd.org/changeset/base/364571 Log: MFC r356172: Make Linux stat(2) et al distinguish between block and character devices. It's required for LTP, among other things. It's not complete, but good enough for now. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_stats.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_stats.c ============================================================================== --- stable/12/sys/compat/linux/linux_stats.c Sun Aug 23 22:19:39 2020 (r364570) +++ stable/12/sys/compat/linux/linux_stats.c Sun Aug 23 22:21:36 2020 (r364571) @@ -65,6 +65,11 @@ translate_vnhook_major_minor(struct vnode *vp, struct { int major, minor; + if (vn_isdisk(vp, NULL)) { + sb->st_mode &= ~S_IFMT; + sb->st_mode |= S_IFBLK; + } + if (vp->v_type == VCHR && vp->v_rdev != NULL && linux_driver_get_major_minor(devtoname(vp->v_rdev), &major, &minor) == 0) { @@ -114,6 +119,10 @@ translate_fd_major_minor(struct thread *td, int fd, st fget(td, fd, &cap_no_rights, &fp) != 0) return; vp = fp->f_vnode; + if (vp != NULL && vn_isdisk(vp, NULL)) { + buf->st_mode &= ~S_IFMT; + buf->st_mode |= S_IFBLK; + } if (vp != NULL && vp->v_rdev != NULL && linux_driver_get_major_minor(devtoname(vp->v_rdev), &major, &minor) == 0) { From owner-svn-src-all@freebsd.org Sun Aug 23 22:23:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B12113CD4FE; Sun, 23 Aug 2020 22:23:19 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZVBv4FFNz4fLh; Sun, 23 Aug 2020 22:23:19 +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 758F8E926; Sun, 23 Aug 2020 22:23:19 +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 07NMNJtO098716; Sun, 23 Aug 2020 22:23:19 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMNJv6098715; Sun, 23 Aug 2020 22:23:19 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232223.07NMNJv6098715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 22:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364572 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:23:19 -0000 Author: trasz Date: Sun Aug 23 22:23:19 2020 New Revision: 364572 URL: https://svnweb.freebsd.org/changeset/base/364572 Log: MFC r363093: Make linux stat(2) return the same st_dev for every devfs instance. The reason for this is to work around an idiosyncrasy of glibc getttynam(3) implementation: it checks whether st_dev returned for fd 0 is the same as st_dev returned for the target of /proc/self/fd/0 symlink, and with linux chroots having their own devfs instance, the check will fail if you chrooted into it. PR: kern/240767 Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_stats.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_stats.c ============================================================================== --- stable/12/sys/compat/linux/linux_stats.c Sun Aug 23 22:21:36 2020 (r364571) +++ stable/12/sys/compat/linux/linux_stats.c Sun Aug 23 22:23:19 2020 (r364572) @@ -70,6 +70,17 @@ translate_vnhook_major_minor(struct vnode *vp, struct sb->st_mode |= S_IFBLK; } + /* + * Return the same st_dev for every devfs instance. The reason + * for this is to work around an idiosyncrasy of glibc getttynam() + * implementation: it checks whether st_dev returned for fd 0 + * is the same as st_dev returned for the target of /proc/self/fd/0 + * symlink, and with linux chroots having their own devfs instance, + * the check will fail if you chroot into it. + */ + if (rootdevmp != NULL && vp->v_mount->mnt_vfc == rootdevmp->mnt_vfc) + sb->st_dev = rootdevmp->mnt_stat.f_fsid.val[0]; + if (vp->v_type == VCHR && vp->v_rdev != NULL && linux_driver_get_major_minor(devtoname(vp->v_rdev), &major, &minor) == 0) { @@ -110,6 +121,7 @@ translate_fd_major_minor(struct thread *td, int fd, st { struct file *fp; struct vnode *vp; + struct mount *mp; int major, minor; /* @@ -122,6 +134,12 @@ translate_fd_major_minor(struct thread *td, int fd, st if (vp != NULL && vn_isdisk(vp, NULL)) { buf->st_mode &= ~S_IFMT; buf->st_mode |= S_IFBLK; + } + if (vp != NULL && rootdevmp != NULL) { + mp = vp->v_mount; + __compiler_membar(); + if (mp != NULL && mp->mnt_vfc == rootdevmp->mnt_vfc) + buf->st_dev = rootdevmp->mnt_stat.f_fsid.val[0]; } if (vp != NULL && vp->v_rdev != NULL && linux_driver_get_major_minor(devtoname(vp->v_rdev), From owner-svn-src-all@freebsd.org Sun Aug 23 22:24:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 457C93CDAD1; Sun, 23 Aug 2020 22:24:49 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZVDc0nLDz4fm9; Sun, 23 Aug 2020 22:24:47 +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 A3D83E470; Sun, 23 Aug 2020 22:24:47 +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 07NMOlXi099008; Sun, 23 Aug 2020 22:24:47 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMOkrq099006; Sun, 23 Aug 2020 22:24:46 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232224.07NMOkrq099006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:24:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364573 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364573 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:24:49 -0000 Author: tuexen Date: Sun Aug 23 22:24:46 2020 New Revision: 364573 URL: https://svnweb.freebsd.org/changeset/base/364573 Log: MFC r359379: Some more uint32_t cleanups, no functional change. Modified: stable/12/sys/netinet/sctp_pcb.h stable/12/sys/netinet/sctp_structs.h stable/12/sys/netinet/sctp_timer.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_pcb.h ============================================================================== --- stable/12/sys/netinet/sctp_pcb.h Sun Aug 23 22:23:19 2020 (r364572) +++ stable/12/sys/netinet/sctp_pcb.h Sun Aug 23 22:24:46 2020 (r364573) @@ -273,11 +273,11 @@ struct sctp_pcb { uint32_t secret_key[SCTP_HOW_MANY_SECRETS][SCTP_NUMBER_OF_SECRETS]; unsigned int size_of_a_cookie; - unsigned int sctp_timeoutticks[SCTP_NUM_TMRS]; - unsigned int sctp_minrto; - unsigned int sctp_maxrto; - unsigned int initial_rto; - int initial_init_rto_max; + uint32_t sctp_timeoutticks[SCTP_NUM_TMRS]; + uint32_t sctp_minrto; + uint32_t sctp_maxrto; + uint32_t initial_rto; + uint32_t initial_init_rto_max; unsigned int sctp_sack_freq; uint32_t sctp_sws_sender; @@ -320,7 +320,7 @@ struct sctp_pcb { uint32_t def_cookie_life; /* defaults to 0 */ - int auto_close_time; + uint32_t auto_close_time; uint32_t initial_sequence_debug; uint32_t adaptation_layer_indicator; uint8_t adaptation_layer_indicator_provided; Modified: stable/12/sys/netinet/sctp_structs.h ============================================================================== --- stable/12/sys/netinet/sctp_structs.h Sun Aug 23 22:23:19 2020 (r364572) +++ stable/12/sys/netinet/sctp_structs.h Sun Aug 23 22:24:46 2020 (r364573) @@ -275,7 +275,7 @@ struct sctp_nets { int lastsa; int lastsv; uint64_t rtt; /* last measured rtt value in us */ - unsigned int RTO; + uint32_t RTO; /* This is used for SHUTDOWN/SHUTDOWN-ACK/SEND or INIT timers */ struct sctp_timer rxt_timer; @@ -1062,7 +1062,7 @@ struct sctp_association { uint32_t heart_beat_delay; /* autoclose */ - unsigned int sctp_autoclose_ticks; + uint32_t sctp_autoclose_ticks; /* how many preopen streams we have */ unsigned int pre_open_streams; @@ -1071,7 +1071,7 @@ struct sctp_association { unsigned int max_inbound_streams; /* the cookie life I award for any cookie, in seconds */ - unsigned int cookie_life; + uint32_t cookie_life; /* time to delay acks for */ unsigned int delayed_ack; unsigned int old_delayed_ack; @@ -1080,10 +1080,10 @@ struct sctp_association { unsigned int numduptsns; int dup_tsns[SCTP_MAX_DUP_TSNS]; - unsigned int initial_init_rto_max; /* initial RTO for INIT's */ - unsigned int initial_rto; /* initial send RTO */ - unsigned int minrto; /* per assoc RTO-MIN */ - unsigned int maxrto; /* per assoc RTO-MAX */ + uint32_t initial_init_rto_max; /* initial RTO for INIT's */ + uint32_t initial_rto; /* initial send RTO */ + uint32_t minrto; /* per assoc RTO-MIN */ + uint32_t maxrto; /* per assoc RTO-MAX */ /* authentication fields */ sctp_auth_chklist_t *local_auth_chunks; Modified: stable/12/sys/netinet/sctp_timer.c ============================================================================== --- stable/12/sys/netinet/sctp_timer.c Sun Aug 23 22:23:19 2020 (r364572) +++ stable/12/sys/netinet/sctp_timer.c Sun Aug 23 22:24:46 2020 (r364573) @@ -1524,10 +1524,10 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, struct sc { struct timeval tn, *tim_touse; struct sctp_association *asoc; - int ticks_gone_by; + uint32_t ticks_gone_by; (void)SCTP_GETTIME_TIMEVAL(&tn); - if (stcb->asoc.sctp_autoclose_ticks && + if (stcb->asoc.sctp_autoclose_ticks > 0 && sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE)) { /* Auto close is on */ asoc = &stcb->asoc; @@ -1539,9 +1539,8 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, struct sc tim_touse = &asoc->time_last_sent; } /* Now has long enough transpired to autoclose? */ - ticks_gone_by = SEC_TO_TICKS(tn.tv_sec - tim_touse->tv_sec); - if ((ticks_gone_by > 0) && - (ticks_gone_by >= (int)asoc->sctp_autoclose_ticks)) { + ticks_gone_by = SEC_TO_TICKS((uint32_t)(tn.tv_sec - tim_touse->tv_sec)); + if (ticks_gone_by >= asoc->sctp_autoclose_ticks) { /* * autoclose time has hit, call the output routine, * which should do nothing just to be SURE we don't @@ -1584,7 +1583,7 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, struct sc * No auto close at this time, reset t-o to check * later */ - int tmp; + uint32_t tmp; /* fool the timer startup to use the time left */ tmp = asoc->sctp_autoclose_ticks; From owner-svn-src-all@freebsd.org Sun Aug 23 22:26:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ABF2F3CDBE4; Sun, 23 Aug 2020 22:26:40 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZVGm4RLgz4ftY; Sun, 23 Aug 2020 22:26:40 +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 7B29FEA13; Sun, 23 Aug 2020 22:26:40 +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 07NMQe7G099170; Sun, 23 Aug 2020 22:26:40 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMQcFf099160; Sun, 23 Aug 2020 22:26:38 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232226.07NMQcFf099160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364574 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:26:40 -0000 Author: tuexen Date: Sun Aug 23 22:26:38 2020 New Revision: 364574 URL: https://svnweb.freebsd.org/changeset/base/364574 Log: MFC r359405: Handle integer overflows correctly when converting msecs and secs to ticks and vice versa. These issues were caught by recently added panic() calls on INVARIANTS systems. Modified: stable/12/sys/netinet/sctp_cc_functions.c stable/12/sys/netinet/sctp_constants.h stable/12/sys/netinet/sctp_input.c stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctp_timer.c stable/12/sys/netinet/sctp_usrreq.c stable/12/sys/netinet/sctputil.c stable/12/sys/netinet/sctputil.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_cc_functions.c ============================================================================== --- stable/12/sys/netinet/sctp_cc_functions.c Sun Aug 23 22:24:46 2020 (r364573) +++ stable/12/sys/netinet/sctp_cc_functions.c Sun Aug 23 22:26:38 2020 (r364574) @@ -1914,7 +1914,7 @@ measure_rtt(struct sctp_nets *net) if (net->fast_retran_ip == 0 && net->ssthresh < 0xFFFF && htcp_ccount(&net->cc_mod.htcp_ca) > 3) { if (net->cc_mod.htcp_ca.maxRTT < net->cc_mod.htcp_ca.minRTT) net->cc_mod.htcp_ca.maxRTT = net->cc_mod.htcp_ca.minRTT; - if (net->cc_mod.htcp_ca.maxRTT < srtt && srtt <= net->cc_mod.htcp_ca.maxRTT + MSEC_TO_TICKS(20)) + if (net->cc_mod.htcp_ca.maxRTT < srtt && srtt <= net->cc_mod.htcp_ca.maxRTT + sctp_msecs_to_ticks(20)) net->cc_mod.htcp_ca.maxRTT = srtt; } } @@ -1975,7 +1975,7 @@ htcp_beta_update(struct htcp *ca, uint32_t minRTT, uin } } - if (ca->modeswitch && minRTT > (uint32_t)MSEC_TO_TICKS(10) && maxRTT) { + if (ca->modeswitch && minRTT > sctp_msecs_to_ticks(10) && maxRTT) { ca->beta = (minRTT << 7) / maxRTT; if (ca->beta < BETA_MIN) ca->beta = BETA_MIN; Modified: stable/12/sys/netinet/sctp_constants.h ============================================================================== --- stable/12/sys/netinet/sctp_constants.h Sun Aug 23 22:24:46 2020 (r364573) +++ stable/12/sys/netinet/sctp_constants.h Sun Aug 23 22:26:38 2020 (r364574) @@ -577,16 +577,6 @@ __FBSDID("$FreeBSD$"); #define SCTP_ASOC_MAX_CHUNKS_ON_QUEUE 512 -/* The conversion from time to ticks and vice versa is done by rounding - * upwards. This way we can test in the code the time to be positive and - * know that this corresponds to a positive number of ticks. - */ -#define MSEC_TO_TICKS(x) ((hz == 1000) ? x : ((((x) * hz) + 999) / 1000)) -#define TICKS_TO_MSEC(x) ((hz == 1000) ? x : ((((x) * 1000) + (hz - 1)) / hz)) - -#define SEC_TO_TICKS(x) ((x) * hz) -#define TICKS_TO_SEC(x) (((x) + (hz - 1)) / hz) - /* * Basically the minimum amount of time before I do a early FR. Making this * value to low will cause duplicate retransmissions. Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Sun Aug 23 22:24:46 2020 (r364573) +++ stable/12/sys/netinet/sctp_input.c Sun Aug 23 22:26:38 2020 (r364574) @@ -2600,7 +2600,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in */ (void)SCTP_GETTIME_TIMEVAL(&now); /* Expire time is in Ticks, so we convert to seconds */ - time_expires.tv_sec = cookie->time_entered.tv_sec + TICKS_TO_SEC(cookie->cookie_life); + time_expires.tv_sec = cookie->time_entered.tv_sec + sctp_ticks_to_secs(cookie->cookie_life); time_expires.tv_usec = cookie->time_entered.tv_usec; if (timevalcmp(&now, &time_expires, >)) { /* cookie is stale! */ Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 22:24:46 2020 (r364573) +++ stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 22:26:38 2020 (r364574) @@ -2553,13 +2553,13 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) m = &inp->sctp_ep; /* setup the base timeout information */ - m->sctp_timeoutticks[SCTP_TIMER_SEND] = SEC_TO_TICKS(SCTP_SEND_SEC); /* needed ? */ - m->sctp_timeoutticks[SCTP_TIMER_INIT] = SEC_TO_TICKS(SCTP_INIT_SEC); /* needed ? */ - m->sctp_timeoutticks[SCTP_TIMER_RECV] = MSEC_TO_TICKS(SCTP_BASE_SYSCTL(sctp_delayed_sack_time_default)); - m->sctp_timeoutticks[SCTP_TIMER_HEARTBEAT] = MSEC_TO_TICKS(SCTP_BASE_SYSCTL(sctp_heartbeat_interval_default)); - m->sctp_timeoutticks[SCTP_TIMER_PMTU] = SEC_TO_TICKS(SCTP_BASE_SYSCTL(sctp_pmtu_raise_time_default)); - m->sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN] = SEC_TO_TICKS(SCTP_BASE_SYSCTL(sctp_shutdown_guard_time_default)); - m->sctp_timeoutticks[SCTP_TIMER_SIGNATURE] = SEC_TO_TICKS(SCTP_BASE_SYSCTL(sctp_secret_lifetime_default)); + m->sctp_timeoutticks[SCTP_TIMER_SEND] = sctp_secs_to_ticks(SCTP_SEND_SEC); /* needed ? */ + m->sctp_timeoutticks[SCTP_TIMER_INIT] = sctp_secs_to_ticks(SCTP_INIT_SEC); /* needed ? */ + m->sctp_timeoutticks[SCTP_TIMER_RECV] = sctp_msecs_to_ticks(SCTP_BASE_SYSCTL(sctp_delayed_sack_time_default)); + m->sctp_timeoutticks[SCTP_TIMER_HEARTBEAT] = sctp_msecs_to_ticks(SCTP_BASE_SYSCTL(sctp_heartbeat_interval_default)); + m->sctp_timeoutticks[SCTP_TIMER_PMTU] = sctp_secs_to_ticks(SCTP_BASE_SYSCTL(sctp_pmtu_raise_time_default)); + m->sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN] = sctp_secs_to_ticks(SCTP_BASE_SYSCTL(sctp_shutdown_guard_time_default)); + m->sctp_timeoutticks[SCTP_TIMER_SIGNATURE] = sctp_secs_to_ticks(SCTP_BASE_SYSCTL(sctp_secret_lifetime_default)); /* all max/min max are in ms */ m->sctp_maxrto = SCTP_BASE_SYSCTL(sctp_rto_max_default); m->sctp_minrto = SCTP_BASE_SYSCTL(sctp_rto_min_default); @@ -2607,7 +2607,7 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) sctp_timer_start(SCTP_TIMER_TYPE_NEWCOOKIE, inp, NULL, NULL); /* How long is a cookie good for ? */ - m->def_cookie_life = MSEC_TO_TICKS(SCTP_BASE_SYSCTL(sctp_valid_cookie_life_default)); + m->def_cookie_life = sctp_msecs_to_ticks(SCTP_BASE_SYSCTL(sctp_valid_cookie_life_default)); /* * Initialize authentication parameters */ Modified: stable/12/sys/netinet/sctp_timer.c ============================================================================== --- stable/12/sys/netinet/sctp_timer.c Sun Aug 23 22:24:46 2020 (r364573) +++ stable/12/sys/netinet/sctp_timer.c Sun Aug 23 22:26:38 2020 (r364574) @@ -1539,7 +1539,7 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, struct sc tim_touse = &asoc->time_last_sent; } /* Now has long enough transpired to autoclose? */ - ticks_gone_by = SEC_TO_TICKS((uint32_t)(tn.tv_sec - tim_touse->tv_sec)); + ticks_gone_by = sctp_secs_to_ticks((uint32_t)(tn.tv_sec - tim_touse->tv_sec)); if (ticks_gone_by >= asoc->sctp_autoclose_ticks) { /* * autoclose time has hit, call the output routine, Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Sun Aug 23 22:24:46 2020 (r364573) +++ stable/12/sys/netinet/sctp_usrreq.c Sun Aug 23 22:26:38 2020 (r364574) @@ -1581,7 +1581,7 @@ sctp_getopt(struct socket *so, int optname, void *optv break; case SCTP_AUTOCLOSE: if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE)) - val = TICKS_TO_SEC(inp->sctp_ep.auto_close_time); + val = sctp_ticks_to_secs(inp->sctp_ep.auto_close_time); else val = 0; break; @@ -1993,7 +1993,7 @@ flags_out: ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && (sack->sack_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); - sack->sack_delay = TICKS_TO_MSEC(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_RECV]); + sack->sack_delay = sctp_ticks_to_msecs(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_RECV]); sack->sack_freq = inp->sctp_ep.sctp_sack_freq; SCTP_INP_RUNLOCK(inp); } else { @@ -2474,7 +2474,7 @@ flags_out: /* Use endpoint defaults */ SCTP_INP_RLOCK(inp); paddrp->spp_pathmaxrxt = inp->sctp_ep.def_net_failure; - paddrp->spp_hbinterval = TICKS_TO_MSEC(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT]); + paddrp->spp_hbinterval = sctp_ticks_to_msecs(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT]); paddrp->spp_assoc_id = SCTP_FUTURE_ASSOC; /* get inp's default */ if (inp->sctp_ep.default_dscp & 0x01) { @@ -2746,7 +2746,7 @@ flags_out: SCTP_FIND_STCB(inp, stcb, sasoc->sasoc_assoc_id); if (stcb) { - sasoc->sasoc_cookie_life = TICKS_TO_MSEC(stcb->asoc.cookie_life); + sasoc->sasoc_cookie_life = sctp_ticks_to_msecs(stcb->asoc.cookie_life); sasoc->sasoc_asocmaxrxt = stcb->asoc.max_send_times; sasoc->sasoc_number_peer_destinations = stcb->asoc.numnets; sasoc->sasoc_peer_rwnd = stcb->asoc.peers_rwnd; @@ -2758,7 +2758,7 @@ flags_out: ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && (sasoc->sasoc_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); - sasoc->sasoc_cookie_life = TICKS_TO_MSEC(inp->sctp_ep.def_cookie_life); + sasoc->sasoc_cookie_life = sctp_ticks_to_msecs(inp->sctp_ep.def_cookie_life); sasoc->sasoc_asocmaxrxt = inp->sctp_ep.max_send_times; sasoc->sasoc_number_peer_destinations = 0; sasoc->sasoc_peer_rwnd = 0; @@ -3836,7 +3836,7 @@ sctp_setopt(struct socket *so, int optname, void *optv * The value is in ticks. Note this does not effect * old associations, only new ones. */ - inp->sctp_ep.auto_close_time = SEC_TO_TICKS(*mopt); + inp->sctp_ep.auto_close_time = sctp_secs_to_ticks(*mopt); break; } SCTP_INP_WLOCK(inp); @@ -4233,10 +4233,12 @@ sctp_setopt(struct socket *so, int optname, void *optv SCTP_CHECK_AND_CAST(sack, optval, struct sctp_sack_info, optsize); SCTP_FIND_STCB(inp, stcb, sack->sack_assoc_id); if (sack->sack_delay) { - if (sack->sack_delay > SCTP_MAX_SACK_DELAY) - sack->sack_delay = SCTP_MAX_SACK_DELAY; - if (MSEC_TO_TICKS(sack->sack_delay) < 1) { - sack->sack_delay = TICKS_TO_MSEC(1); + if (sack->sack_delay > SCTP_MAX_SACK_DELAY) { + error = EINVAL; + if (stcb != NULL) { + SCTP_TCB_UNLOCK(stcb); + } + break; } } if (stcb) { @@ -4255,7 +4257,7 @@ sctp_setopt(struct socket *so, int optname, void *optv (sack->sack_assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); if (sack->sack_delay) { - inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_RECV] = MSEC_TO_TICKS(sack->sack_delay); + inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_RECV] = sctp_msecs_to_ticks(sack->sack_delay); } if (sack->sack_freq) { inp->sctp_ep.sctp_sack_freq = sack->sack_freq; @@ -5618,14 +5620,14 @@ sctp_setopt(struct socket *so, int optname, void *optv else if (paddrp->spp_hbinterval != 0) { if (paddrp->spp_hbinterval > SCTP_MAX_HB_INTERVAL) paddrp->spp_hbinterval = SCTP_MAX_HB_INTERVAL; - inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT] = MSEC_TO_TICKS(paddrp->spp_hbinterval); + inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT] = sctp_msecs_to_ticks(paddrp->spp_hbinterval); } if (paddrp->spp_flags & SPP_HB_ENABLE) { if (paddrp->spp_flags & SPP_HB_TIME_IS_ZERO) { inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT] = 0; } else if (paddrp->spp_hbinterval) { - inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT] = MSEC_TO_TICKS(paddrp->spp_hbinterval); + inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT] = sctp_msecs_to_ticks(paddrp->spp_hbinterval); } sctp_feature_off(inp, SCTP_PCB_FLAGS_DONOT_HEARTBEAT); } else if (paddrp->spp_flags & SPP_HB_DISABLE) { @@ -5740,7 +5742,7 @@ sctp_setopt(struct socket *so, int optname, void *optv if (sasoc->sasoc_asocmaxrxt) stcb->asoc.max_send_times = sasoc->sasoc_asocmaxrxt; if (sasoc->sasoc_cookie_life) { - stcb->asoc.cookie_life = MSEC_TO_TICKS(sasoc->sasoc_cookie_life); + stcb->asoc.cookie_life = sctp_msecs_to_ticks(sasoc->sasoc_cookie_life); } SCTP_TCB_UNLOCK(stcb); } else { @@ -5752,7 +5754,7 @@ sctp_setopt(struct socket *so, int optname, void *optv if (sasoc->sasoc_asocmaxrxt) inp->sctp_ep.max_send_times = sasoc->sasoc_asocmaxrxt; if (sasoc->sasoc_cookie_life) { - inp->sctp_ep.def_cookie_life = MSEC_TO_TICKS(sasoc->sasoc_cookie_life); + inp->sctp_ep.def_cookie_life = sctp_msecs_to_ticks(sasoc->sasoc_cookie_life); } SCTP_INP_WUNLOCK(inp); } else { Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 22:24:46 2020 (r364573) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 22:26:38 2020 (r364574) @@ -773,6 +773,80 @@ sctp_audit_log(uint8_t ev, uint8_t fd) #endif /* + * The conversion from time to ticks and vice versa is done by rounding + * upwards. This way we can test in the code the time to be positive and + * know that this corresponds to a positive number of ticks. + */ + +uint32_t +sctp_msecs_to_ticks(uint32_t msecs) +{ + uint64_t temp; + uint32_t ticks; + + if (hz == 1000) { + ticks = msecs; + } else { + temp = (((uint64_t)msecs * hz) + 999) / 1000; + if (temp > UINT32_MAX) { + ticks = UINT32_MAX; + } else { + ticks = (uint32_t)temp; + } + } + return (ticks); +} + +uint32_t +sctp_ticks_to_msecs(uint32_t ticks) +{ + uint64_t temp; + uint32_t msecs; + + if (hz == 1000) { + msecs = ticks; + } else { + temp = (((uint64_t)ticks * 1000) + (hz - 1)) / hz; + if (temp > UINT32_MAX) { + msecs = UINT32_MAX; + } else { + msecs = (uint32_t)temp; + } + } + return (msecs); +} + +uint32_t +sctp_secs_to_ticks(uint32_t secs) +{ + uint64_t temp; + uint32_t ticks; + + temp = (uint64_t)secs * hz; + if (temp > UINT32_MAX) { + ticks = UINT32_MAX; + } else { + ticks = (uint32_t)temp; + } + return (ticks); +} + +uint32_t +sctp_ticks_to_secs(uint32_t ticks) +{ + uint64_t temp; + uint32_t secs; + + temp = ((uint64_t)ticks + (hz - 1)) / hz; + if (temp > UINT32_MAX) { + secs = UINT32_MAX; + } else { + secs = (uint32_t)temp; + } + return (secs); +} + +/* * sctp_stop_timers_for_shutdown() should be called * when entering the SHUTDOWN_SENT or SHUTDOWN_ACK_SENT * state to make sure that all timers are stopped. @@ -1065,7 +1139,7 @@ sctp_init_asoc(struct sctp_inpcb *inp, struct sctp_tcb SCTP_SET_STATE(stcb, SCTP_STATE_INUSE); asoc->max_burst = inp->sctp_ep.max_burst; asoc->fr_max_burst = inp->sctp_ep.fr_max_burst; - asoc->heart_beat_delay = TICKS_TO_MSEC(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT]); + asoc->heart_beat_delay = sctp_ticks_to_msecs(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT]); asoc->cookie_life = inp->sctp_ep.def_cookie_life; asoc->sctp_cmt_on_off = inp->sctp_cmt_on_off; asoc->ecn_supported = inp->ecn_supported; @@ -1151,7 +1225,7 @@ sctp_init_asoc(struct sctp_inpcb *inp, struct sctp_tcb asoc->context = inp->sctp_context; asoc->local_strreset_support = inp->local_strreset_support; asoc->def_send = inp->def_send; - asoc->delayed_ack = TICKS_TO_MSEC(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_RECV]); + asoc->delayed_ack = sctp_ticks_to_msecs(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_RECV]); asoc->sack_freq = inp->sctp_ep.sctp_sack_freq; asoc->pr_sctp_cnt = 0; asoc->total_output_queue_size = 0; @@ -2110,9 +2184,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &net->rxt_timer; if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); } else { - to_ticks = MSEC_TO_TICKS(net->RTO); + to_ticks = sctp_msecs_to_ticks(net->RTO); } break; case SCTP_TIMER_TYPE_INIT: @@ -2130,9 +2204,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &net->rxt_timer; if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); } else { - to_ticks = MSEC_TO_TICKS(net->RTO); + to_ticks = sctp_msecs_to_ticks(net->RTO); } break; case SCTP_TIMER_TYPE_RECV: @@ -2149,7 +2223,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s #endif } tmr = &stcb->asoc.dack_timer; - to_ticks = MSEC_TO_TICKS(stcb->asoc.delayed_ack); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.delayed_ack); break; case SCTP_TIMER_TYPE_SHUTDOWN: /* Here we use the RTO of the destination. */ @@ -2163,9 +2237,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &net->rxt_timer; if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); } else { - to_ticks = MSEC_TO_TICKS(net->RTO); + to_ticks = sctp_msecs_to_ticks(net->RTO); } break; case SCTP_TIMER_TYPE_HEARTBEAT: @@ -2210,7 +2284,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s * Now we must convert the to_ticks that are now in ms to * ticks. */ - to_ticks = MSEC_TO_TICKS(to_ticks); + to_ticks = sctp_msecs_to_ticks(to_ticks); break; case SCTP_TIMER_TYPE_COOKIE: /* @@ -2228,9 +2302,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &net->rxt_timer; if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); } else { - to_ticks = MSEC_TO_TICKS(net->RTO); + to_ticks = sctp_msecs_to_ticks(net->RTO); } break; case SCTP_TIMER_TYPE_NEWCOOKIE: @@ -2283,9 +2357,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &net->rxt_timer; if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); } else { - to_ticks = MSEC_TO_TICKS(net->RTO); + to_ticks = sctp_msecs_to_ticks(net->RTO); } break; case SCTP_TIMER_TYPE_ASCONF: @@ -2303,9 +2377,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &stcb->asoc.asconf_timer; if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); } else { - to_ticks = MSEC_TO_TICKS(net->RTO); + to_ticks = sctp_msecs_to_ticks(net->RTO); } break; case SCTP_TIMER_TYPE_SHUTDOWNGUARD: @@ -2323,7 +2397,11 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &stcb->asoc.shut_guard_timer; if (inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN] == 0) { - to_ticks = 5 * MSEC_TO_TICKS(stcb->asoc.maxrto); + if (stcb->asoc.maxrto < UINT32_MAX / 5) { + to_ticks = sctp_msecs_to_ticks(5 * stcb->asoc.maxrto); + } else { + to_ticks = sctp_msecs_to_ticks(UINT32_MAX); + } } else { to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN]; } @@ -2355,9 +2433,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s } tmr = &stcb->asoc.strreset_timer; if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); } else { - to_ticks = MSEC_TO_TICKS(net->RTO); + to_ticks = sctp_msecs_to_ticks(net->RTO); } break; case SCTP_TIMER_TYPE_INPKILL: @@ -2375,7 +2453,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s #endif } tmr = &inp->sctp_ep.signature_change; - to_ticks = MSEC_TO_TICKS(SCTP_INP_KILL_TIMEOUT); + to_ticks = sctp_msecs_to_ticks(SCTP_INP_KILL_TIMEOUT); break; case SCTP_TIMER_TYPE_ASOCKILL: if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { @@ -2387,7 +2465,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s #endif } tmr = &stcb->asoc.strreset_timer; - to_ticks = MSEC_TO_TICKS(SCTP_ASOC_KILL_TIMEOUT); + to_ticks = sctp_msecs_to_ticks(SCTP_ASOC_KILL_TIMEOUT); break; case SCTP_TIMER_TYPE_ADDR_WQ: if ((inp != NULL) || (stcb != NULL) || (net != NULL)) { @@ -2412,7 +2490,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s #endif } tmr = &stcb->asoc.delete_prim_timer; - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); + to_ticks = sctp_msecs_to_ticks(stcb->asoc.initial_rto); break; default: #ifdef INVARIANTS Modified: stable/12/sys/netinet/sctputil.h ============================================================================== --- stable/12/sys/netinet/sctputil.h Sun Aug 23 22:24:46 2020 (r364573) +++ stable/12/sys/netinet/sctputil.h Sun Aug 23 22:26:38 2020 (r364574) @@ -392,5 +392,10 @@ void sctp_hc_set_mtu(union sctp_sockstore *, uint16_t, uint32_t sctp_hc_get_mtu(union sctp_sockstore *, uint16_t); void sctp_set_state(struct sctp_tcb *, int); void sctp_add_substate(struct sctp_tcb *, int); +uint32_t sctp_ticks_to_msecs(uint32_t); +uint32_t sctp_msecs_to_ticks(uint32_t); +uint32_t sctp_ticks_to_secs(uint32_t); +uint32_t sctp_secs_to_ticks(uint32_t); + #endif /* _KERNEL */ #endif From owner-svn-src-all@freebsd.org Sun Aug 23 22:28:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB4ED3CDF95; Sun, 23 Aug 2020 22:28:19 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZVJg44X6z4g5T; Sun, 23 Aug 2020 22:28:19 +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 6F0ACE8B7; Sun, 23 Aug 2020 22:28:19 +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 07NMSJqt099306; Sun, 23 Aug 2020 22:28:19 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMSJSF099305; Sun, 23 Aug 2020 22:28:19 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232228.07NMSJSF099305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364575 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364575 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:28:19 -0000 Author: tuexen Date: Sun Aug 23 22:28:19 2020 New Revision: 364575 URL: https://svnweb.freebsd.org/changeset/base/364575 Log: MFC r359410: Small cleanup by using a variable just assigned. Modified: stable/12/sys/netinet/sctp_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Sun Aug 23 22:26:38 2020 (r364574) +++ stable/12/sys/netinet/sctp_usrreq.c Sun Aug 23 22:28:19 2020 (r364575) @@ -2639,8 +2639,8 @@ flags_out: net = stcb->asoc.primary_destination; if (net != NULL) { memcpy(&sstat->sstat_primary.spinfo_address, - &stcb->asoc.primary_destination->ro._l_addr, - ((struct sockaddr *)(&stcb->asoc.primary_destination->ro._l_addr))->sa_len); + &net->ro._l_addr, + ((struct sockaddr *)(&net->ro._l_addr))->sa_len); ((struct sockaddr_in *)&sstat->sstat_primary.spinfo_address)->sin_port = stcb->rport; /* * Again the user can get info from From owner-svn-src-all@freebsd.org Sun Aug 23 22:30:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1155F3CDD53; Sun, 23 Aug 2020 22:30:53 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZVMc6djjz3RNS; Sun, 23 Aug 2020 22:30:52 +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 C7A39E8BF; Sun, 23 Aug 2020 22:30:52 +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 07NMUq9s001219; Sun, 23 Aug 2020 22:30:52 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMUqdS001218; Sun, 23 Aug 2020 22:30:52 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232230.07NMUqdS001218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:30:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364576 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364576 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:30:53 -0000 Author: tuexen Date: Sun Aug 23 22:30:52 2020 New Revision: 364576 URL: https://svnweb.freebsd.org/changeset/base/364576 Log: MFC r359657: Do more argument validation under INVARIANTS when starting/stopping an SCTP timer. Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 22:28:19 2020 (r364575) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 22:30:52 2020 (r364576) @@ -1726,9 +1726,14 @@ sctp_timeout_handler(void *t) #endif /* sanity checks... */ - KASSERT(tmr->self == tmr, ("tmr->self corrupted")); - KASSERT(SCTP_IS_TIMER_TYPE_VALID(tmr->type), ("Invalid timer type %d", tmr->type)); + KASSERT(tmr->self == tmr, + ("sctp_timeout_handler: tmr->self corrupted")); + KASSERT(SCTP_IS_TIMER_TYPE_VALID(tmr->type), + ("sctp_timeout_handler: invalid timer type %d", tmr->type)); type = tmr->type; + KASSERT(stcb == NULL || stcb->sctp_ep == inp, + ("sctp_timeout_handler of type %d: inp = %p, stcb->sctp_ep %p", + type, stcb, stcb->sctp_ep)); if (inp) { SCTP_INP_INCR_REF(inp); } @@ -2142,6 +2147,9 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s uint32_t to_ticks; uint32_t rndval, jitter; + KASSERT(stcb == NULL || stcb->sctp_ep == inp, + ("sctp_timer_start of type %d: inp = %p, stcb->sctp_ep %p", + t_type, stcb, stcb->sctp_ep)); tmr = NULL; to_ticks = 0; if (stcb != NULL) { @@ -2576,6 +2584,9 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, st { struct sctp_timer *tmr; + KASSERT(stcb == NULL || stcb->sctp_ep == inp, + ("sctp_timer_stop of type %d: inp = %p, stcb->sctp_ep %p", + t_type, stcb, stcb->sctp_ep)); if (stcb != NULL) { SCTP_TCB_LOCK_ASSERT(stcb); } else if (inp != NULL) { From owner-svn-src-all@freebsd.org Sun Aug 23 22:34:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D18603CDCDB; Sun, 23 Aug 2020 22:34:15 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZVRW5Br9z3S5p; Sun, 23 Aug 2020 22:34:15 +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 917E3EB98; Sun, 23 Aug 2020 22:34:15 +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 07NMYFeh005273; Sun, 23 Aug 2020 22:34:15 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMYFoc005272; Sun, 23 Aug 2020 22:34:15 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232234.07NMYFoc005272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:34:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364577 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:34:15 -0000 Author: tuexen Date: Sun Aug 23 22:34:15 2020 New Revision: 364577 URL: https://svnweb.freebsd.org/changeset/base/364577 Log: MFC r360193: Improve input validation when processing AUTH chunks. Thanks to Natalie Silvanovich from Google for finding and reporting the issue found by her in the SCTP userland stack. Modified: stable/12/sys/netinet/sctp_input.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Sun Aug 23 22:30:52 2020 (r364576) +++ stable/12/sys/netinet/sctp_input.c Sun Aug 23 22:34:15 2020 (r364577) @@ -2273,8 +2273,11 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in if (auth_skipped) { struct sctp_auth_chunk *auth; - auth = (struct sctp_auth_chunk *) - sctp_m_getptr(m, auth_offset, auth_len, auth_chunk_buf); + if (auth_len <= SCTP_PARAM_BUFFER_SIZE) { + auth = (struct sctp_auth_chunk *)sctp_m_getptr(m, auth_offset, auth_len, auth_chunk_buf); + } else { + auth = NULL; + } if ((auth == NULL) || sctp_handle_auth(stcb, auth, m, auth_offset)) { /* auth HMAC failed, dump the assoc and packet */ SCTPDBG(SCTP_DEBUG_AUTH1, From owner-svn-src-all@freebsd.org Sun Aug 23 22:35:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E9A33CE034; Sun, 23 Aug 2020 22:35:53 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZVTP2K6nz3S86; Sun, 23 Aug 2020 22:35:53 +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 32A11EA3C; Sun, 23 Aug 2020 22:35:53 +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 07NMZrn5005413; Sun, 23 Aug 2020 22:35:53 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMZrO8005412; Sun, 23 Aug 2020 22:35:53 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232235.07NMZrO8005412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:35:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364578 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364578 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:35:53 -0000 Author: tuexen Date: Sun Aug 23 22:35:52 2020 New Revision: 364578 URL: https://svnweb.freebsd.org/changeset/base/364578 Log: MFC r360209: Improve input validation when processing AUTH chunks. Thanks to Natalie Silvanovich from Google for finding and reporting the issue found by her in the SCTP userland stack. Modified: stable/12/sys/netinet/sctp_input.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Sun Aug 23 22:34:15 2020 (r364577) +++ stable/12/sys/netinet/sctp_input.c Sun Aug 23 22:35:52 2020 (r364578) @@ -2094,7 +2094,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in int init_offset, initack_offset, initack_limit; int retval; int error = 0; - uint8_t auth_chunk_buf[SCTP_PARAM_BUFFER_SIZE]; + uint8_t auth_chunk_buf[SCTP_CHUNK_BUFFER_SIZE]; #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; @@ -2273,7 +2273,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in if (auth_skipped) { struct sctp_auth_chunk *auth; - if (auth_len <= SCTP_PARAM_BUFFER_SIZE) { + if (auth_len <= SCTP_CHUNK_BUFFER_SIZE) { auth = (struct sctp_auth_chunk *)sctp_m_getptr(m, auth_offset, auth_len, auth_chunk_buf); } else { auth = NULL; @@ -4670,11 +4670,13 @@ sctp_process_control(struct mbuf *m, int iphlen, int * if (auth_skipped && (stcb != NULL)) { struct sctp_auth_chunk *auth; - auth = (struct sctp_auth_chunk *) - sctp_m_getptr(m, auth_offset, - auth_len, chunk_buf); - got_auth = 1; - auth_skipped = 0; + if (auth_len <= SCTP_CHUNK_BUFFER_SIZE) { + auth = (struct sctp_auth_chunk *)sctp_m_getptr(m, auth_offset, auth_len, chunk_buf); + got_auth = 1; + auth_skipped = 0; + } else { + auth = NULL; + } if ((auth == NULL) || sctp_handle_auth(stcb, auth, m, auth_offset)) { /* auth HMAC failed so dump it */ From owner-svn-src-all@freebsd.org Sun Aug 23 22:39:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F1313CE1D1; Sun, 23 Aug 2020 22:39:07 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZVY71rHBz3SNt; Sun, 23 Aug 2020 22:39:07 +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 226DCEA3F; Sun, 23 Aug 2020 22:39:07 +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 07NMd7LB005599; Sun, 23 Aug 2020 22:39:07 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMd77j005598; Sun, 23 Aug 2020 22:39:07 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232239.07NMd77j005598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:39:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364579 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364579 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:39:07 -0000 Author: tuexen Date: Sun Aug 23 22:39:06 2020 New Revision: 364579 URL: https://svnweb.freebsd.org/changeset/base/364579 Log: MFC r360662: Fix the computation of the numbers of entries of the mapping array to look at when generating a SACK. This was wrong in case of sequence numbers wrap arounds. Thanks to Gwenael FOURRE for reporting the issue for the userland stack: https://github.com/sctplab/usrsctp/issues/462 Modified: stable/12/sys/netinet/sctp_output.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Sun Aug 23 22:35:52 2020 (r364578) +++ stable/12/sys/netinet/sctp_output.c Sun Aug 23 22:39:06 2020 (r364579) @@ -10719,7 +10719,7 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked if (highest_tsn > asoc->mapping_array_base_tsn) { siz = (((highest_tsn - asoc->mapping_array_base_tsn) + 1) + 7) / 8; } else { - siz = (((MAX_TSN - highest_tsn) + 1) + highest_tsn + 7) / 8; + siz = (((MAX_TSN - asoc->mapping_array_base_tsn) + 1) + highest_tsn + 7) / 8; } } else { sack = NULL; From owner-svn-src-all@freebsd.org Sun Aug 23 22:40:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 601613CE316; Sun, 23 Aug 2020 22:40:39 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZVZv1zqVz3SDF; Sun, 23 Aug 2020 22:40:39 +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 278AFE6C0; Sun, 23 Aug 2020 22:40:39 +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 07NMedai005756; Sun, 23 Aug 2020 22:40:39 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMedeb005755; Sun, 23 Aug 2020 22:40:39 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232240.07NMedeb005755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364580 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:40:39 -0000 Author: tuexen Date: Sun Aug 23 22:40:38 2020 New Revision: 364580 URL: https://svnweb.freebsd.org/changeset/base/364580 Log: MFC r360671: Avoid underflowing a variable, which would result in taking more data from the stream queues then needed. Thanks to Timo Voelker for finding this bug and providing a fix. Modified: stable/12/sys/netinet/sctp_output.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Sun Aug 23 22:39:06 2020 (r364579) +++ stable/12/sys/netinet/sctp_output.c Sun Aug 23 22:40:38 2020 (r364580) @@ -7769,7 +7769,11 @@ sctp_fill_outqueue(struct sctp_tcb *stcb, } strq = stcb->asoc.ss_functions.sctp_ss_select_stream(stcb, net, asoc); total_moved += moved; - space_left -= moved; + if (space_left >= moved) { + space_left -= moved; + } else { + space_left = 0; + } if (space_left >= SCTP_DATA_CHUNK_OVERHEAD(stcb)) { space_left -= SCTP_DATA_CHUNK_OVERHEAD(stcb); } else { From owner-svn-src-all@freebsd.org Sun Aug 23 22:47:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C23543CE49A; Sun, 23 Aug 2020 22:47:09 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZVkP4Ytxz3Sq7; Sun, 23 Aug 2020 22:47:09 +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 7B636E6D1; Sun, 23 Aug 2020 22:47:09 +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 07NMl9Fg011572; Sun, 23 Aug 2020 22:47:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMl9ao011570; Sun, 23 Aug 2020 22:47:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232247.07NMl9ao011570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 22:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364581 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:47:09 -0000 Author: trasz Date: Sun Aug 23 22:47:08 2020 New Revision: 364581 URL: https://svnweb.freebsd.org/changeset/base/364581 Log: MFC r356170: Implement Linux BLKGETSIZE64 ioctl. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_ioctl.c stable/12/sys/compat/linux/linux_ioctl.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/12/sys/compat/linux/linux_ioctl.c Sun Aug 23 22:40:38 2020 (r364580) +++ stable/12/sys/compat/linux/linux_ioctl.c Sun Aug 23 22:47:08 2020 (r364581) @@ -286,6 +286,7 @@ linux_ioctl_disk(struct thread *td, struct linux_ioctl struct file *fp; int error; u_int sectorsize; + uint64_t blksize64; off_t mediasize; error = fget(td, args->fd, &cap_ioctl_rights, &fp); @@ -308,6 +309,15 @@ linux_ioctl_disk(struct thread *td, struct linux_ioctl return (copyout(§orsize, (void *)args->arg, sizeof(sectorsize))); break; + case LINUX_BLKGETSIZE64: + error = fo_ioctl(fp, DIOCGMEDIASIZE, + (caddr_t)&mediasize, td->td_ucred, td); + fdrop(fp, td); + if (error) + return (error); + blksize64 = mediasize;; + return (copyout(&blksize64, (void *)args->arg, + sizeof(blksize64))); case LINUX_BLKSSZGET: error = fo_ioctl(fp, DIOCGSECTORSIZE, (caddr_t)§orsize, td->td_ucred, td); Modified: stable/12/sys/compat/linux/linux_ioctl.h ============================================================================== --- stable/12/sys/compat/linux/linux_ioctl.h Sun Aug 23 22:40:38 2020 (r364580) +++ stable/12/sys/compat/linux/linux_ioctl.h Sun Aug 23 22:47:08 2020 (r364581) @@ -57,9 +57,10 @@ #define LINUX_BLKSECTSET 0x1266 #define LINUX_BLKSECTGET 0x1267 #define LINUX_BLKSSZGET 0x1268 +#define LINUX_BLKGETSIZE64 0x1272 #define LINUX_IOCTL_DISK_MIN LINUX_BLKROSET -#define LINUX_IOCTL_DISK_MAX LINUX_BLKSSZGET +#define LINUX_IOCTL_DISK_MAX LINUX_BLKGETSIZE64 /* * hdio From owner-svn-src-all@freebsd.org Sun Aug 23 22:48:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF76C3CE626; Sun, 23 Aug 2020 22:48:20 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZVlm48v4z3SrN; Sun, 23 Aug 2020 22:48:20 +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 71F09EC1B; Sun, 23 Aug 2020 22:48:20 +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 07NMmKS4011702; Sun, 23 Aug 2020 22:48:20 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMmKbk011701; Sun, 23 Aug 2020 22:48:20 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232248.07NMmKbk011701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364582 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:48:20 -0000 Author: tuexen Date: Sun Aug 23 22:48:19 2020 New Revision: 364582 URL: https://svnweb.freebsd.org/changeset/base/364582 Log: MFC r360869: Only drop DATA chunk with lower priorities as specified in RFC 7496. This issue was found by looking at a reproducer generated by syzkaller. Modified: stable/12/sys/netinet/sctp_output.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Sun Aug 23 22:47:08 2020 (r364581) +++ stable/12/sys/netinet/sctp_output.c Sun Aug 23 22:48:19 2020 (r364582) @@ -6205,11 +6205,11 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, * This one is PR-SCTP AND buffer space * limited type */ - if (chk->rec.data.timetodrop.tv_sec >= (long)srcv->sinfo_timetolive) { + if (chk->rec.data.timetodrop.tv_sec > (long)srcv->sinfo_timetolive) { /* * Lower numbers equates to higher * priority so if the one we are - * looking at has a larger or equal + * looking at has a larger * priority we want to drop the data * and NOT retransmit it. */ @@ -6240,7 +6240,7 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, TAILQ_FOREACH_SAFE(chk, &asoc->send_queue, sctp_next, nchk) { /* Here we must move to the sent queue and mark */ if (PR_SCTP_BUF_ENABLED(chk->flags)) { - if (chk->rec.data.timetodrop.tv_sec >= (long)srcv->sinfo_timetolive) { + if (chk->rec.data.timetodrop.tv_sec > (long)srcv->sinfo_timetolive) { if (chk->data) { /* * We release the book_size @@ -12622,7 +12622,7 @@ sctp_lower_sosend(struct socket *so, top = SCTP_HEADER_TO_CHAIN(i_pak); sndlen = SCTP_HEADER_LEN(i_pak); } - SCTPDBG(SCTP_DEBUG_OUTPUT1, "Send called addr:%p send length %zu\n", + SCTPDBG(SCTP_DEBUG_OUTPUT1, "Send called addr:%p send length %zd\n", (void *)addr, sndlen); if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && From owner-svn-src-all@freebsd.org Sun Aug 23 22:51:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 86C2E3CE5CE; Sun, 23 Aug 2020 22:51:01 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZVps32NSz3Sy5; Sun, 23 Aug 2020 22:51:01 +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 4B7B2ED38; Sun, 23 Aug 2020 22:51:01 +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 07NMp1gi013749; Sun, 23 Aug 2020 22:51:01 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMp0pv013744; Sun, 23 Aug 2020 22:51:00 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232251.07NMp0pv013744@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364583 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364583 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:51:01 -0000 Author: tuexen Date: Sun Aug 23 22:50:59 2020 New Revision: 364583 URL: https://svnweb.freebsd.org/changeset/base/364583 Log: MFC r360878: Ensure that we have a path when starting the T3 RXT timer. MFC r360942: Fix a copy and paste error introduced in r360878. Modified: stable/12/sys/netinet/sctp_asconf.c stable/12/sys/netinet/sctp_indata.c stable/12/sys/netinet/sctp_input.c stable/12/sys/netinet/sctp_timer.c stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_asconf.c ============================================================================== --- stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 22:48:19 2020 (r364582) +++ stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 22:50:59 2020 (r364583) @@ -1033,9 +1033,14 @@ sctp_assoc_immediate_retrans(struct sctp_tcb *stcb, st (stcb->asoc.sent_queue_cnt > 0)) { struct sctp_tmit_chunk *chk; - chk = TAILQ_FIRST(&stcb->asoc.sent_queue); - sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, chk->whoTo); + TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) { + if (chk->whoTo != NULL) { + break; + } + } + if (chk != NULL) { + sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, chk->whoTo); + } } } return; Modified: stable/12/sys/netinet/sctp_indata.c ============================================================================== --- stable/12/sys/netinet/sctp_indata.c Sun Aug 23 22:48:19 2020 (r364582) +++ stable/12/sys/netinet/sctp_indata.c Sun Aug 23 22:50:59 2020 (r364583) @@ -4439,7 +4439,12 @@ again: } } } - if (lchk) { + for (; lchk != NULL; lchk = TAILQ_NEXT(lchk, sctp_next)) { + if (lchk->whoTo != NULL) { + break; + } + } + if (lchk != NULL) { /* Assure a timer is up */ sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, lchk->whoTo); @@ -5279,7 +5284,12 @@ again: } } } - if (lchk) { + for (; lchk != NULL; lchk = TAILQ_NEXT(lchk, sctp_next)) { + if (lchk->whoTo != NULL) { + break; + } + } + if (lchk != NULL) { /* Assure a timer is up */ sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, lchk->whoTo); Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Sun Aug 23 22:48:19 2020 (r364582) +++ stable/12/sys/netinet/sctp_input.c Sun Aug 23 22:50:59 2020 (r364583) @@ -2956,6 +2956,7 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *c { /* cp must not be used, others call this without a c-ack :-) */ struct sctp_association *asoc; + struct sctp_tmit_chunk *chk; SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_cookie_ack: handling COOKIE-ACK\n"); @@ -3059,11 +3060,13 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *c closed_socket: /* Toss the cookie if I can */ sctp_toss_old_cookies(stcb, asoc); - if (!TAILQ_EMPTY(&asoc->sent_queue)) { - /* Restart the timer if we have pending data */ - struct sctp_tmit_chunk *chk; - - chk = TAILQ_FIRST(&asoc->sent_queue); + /* Restart the timer if we have pending data */ + TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) { + if (chk->whoTo != NULL) { + break; + } + } + if (chk != NULL) { sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, chk->whoTo); } } @@ -5159,6 +5162,7 @@ process_control_chunks: } else { struct mbuf *ret_buf; struct sctp_inpcb *linp; + struct sctp_tmit_chunk *chk; if (stcb) { linp = NULL; @@ -5220,14 +5224,13 @@ process_control_chunks: got_auth = 1; auth_skipped = 0; } - if (!TAILQ_EMPTY(&stcb->asoc.sent_queue)) { - /* - * Restart the timer if we have - * pending data - */ - struct sctp_tmit_chunk *chk; - - chk = TAILQ_FIRST(&stcb->asoc.sent_queue); + /* Restart the timer if we have pending data */ + TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) { + if (chk->whoTo != NULL) { + break; + } + } + if (chk != NULL) { sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, chk->whoTo); } } Modified: stable/12/sys/netinet/sctp_timer.c ============================================================================== --- stable/12/sys/netinet/sctp_timer.c Sun Aug 23 22:48:19 2020 (r364582) +++ stable/12/sys/netinet/sctp_timer.c Sun Aug 23 22:50:59 2020 (r364583) @@ -977,7 +977,12 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp, /* C3. See if we need to send a Fwd-TSN */ if (SCTP_TSN_GT(stcb->asoc.advanced_peer_ack_point, stcb->asoc.last_acked_seq)) { send_forward_tsn(stcb, &stcb->asoc); - if (lchk) { + for (; lchk != NULL; lchk = TAILQ_NEXT(lchk, sctp_next)) { + if (lchk->whoTo != NULL) { + break; + } + } + if (lchk != NULL) { /* Assure a timer is up */ sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, lchk->whoTo); } Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 22:48:19 2020 (r364582) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 22:50:59 2020 (r364583) @@ -1836,14 +1836,19 @@ sctp_timeout_handler(void *t) struct sctp_tmit_chunk *chk; /* - * safeguard. If there on some on the sent queue + * Safeguard. If there on some on the sent queue * somewhere but no timers running something is * wrong... so we start a timer on the first chunk * on the send queue on whatever net it is sent to. */ - chk = TAILQ_FIRST(&stcb->asoc.sent_queue); - sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, - chk->whoTo); + TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) { + if (chk->whoTo != NULL) { + break; + } + } + if (chk != NULL) { + sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, chk->whoTo); + } } break; case SCTP_TIMER_TYPE_INIT: From owner-svn-src-all@freebsd.org Sun Aug 23 22:52:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 65AF93CE915; Sun, 23 Aug 2020 22:52:48 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZVrw20gXz3TR0; Sun, 23 Aug 2020 22:52:48 +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 27D98E6EB; Sun, 23 Aug 2020 22:52:48 +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 07NMqmZg017617; Sun, 23 Aug 2020 22:52:48 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMqmtQ017616; Sun, 23 Aug 2020 22:52:48 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232252.07NMqmtQ017616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364584 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364584 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:52:48 -0000 Author: tuexen Date: Sun Aug 23 22:52:47 2020 New Revision: 364584 URL: https://svnweb.freebsd.org/changeset/base/364584 Log: MFC r360885: Ensure that the SCTP iterator runs with an stcb and inp, which belong to each other. Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 22:50:59 2020 (r364583) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 22:52:47 2020 (r364584) @@ -1486,6 +1486,7 @@ select_a_new_ep: } tinp = it->inp; it->inp = LIST_NEXT(it->inp, sctp_list); + it->stcb = NULL; SCTP_INP_RUNLOCK(tinp); if (it->inp == NULL) { goto done_with_iterator; @@ -1555,6 +1556,9 @@ select_a_new_ep: atomic_add_int(&it->stcb->asoc.refcnt, -1); iteration_count = 0; } + KASSERT(it->inp == it->stcb->sctp_ep, + ("%s: stcb %p does not belong to inp %p, but inp %p", + __func__, it->stcb, it->inp, it->stcb->sctp_ep)); /* run function on this one */ (*it->function_assoc) (it->inp, it->stcb, it->pointer, it->val); @@ -1587,6 +1591,7 @@ no_stcb: } else { it->inp = LIST_NEXT(it->inp, sctp_list); } + it->stcb = NULL; if (it->inp == NULL) { goto done_with_iterator; } From owner-svn-src-all@freebsd.org Sun Aug 23 22:54:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD0343CE938; Sun, 23 Aug 2020 22:54:30 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZVtt5YNTz3TGW; Sun, 23 Aug 2020 22:54:30 +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 A1EA2EBDC; Sun, 23 Aug 2020 22:54:30 +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 07NMsUBM017758; Sun, 23 Aug 2020 22:54:30 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NMsUoF017754; Sun, 23 Aug 2020 22:54:30 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232254.07NMsUoF017754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364585 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364585 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 22:54:30 -0000 Author: tuexen Date: Sun Aug 23 22:54:30 2020 New Revision: 364585 URL: https://svnweb.freebsd.org/changeset/base/364585 Log: MFC r361116: Ensure that an stcb is not dereferenced when it is about to be freed. This issue was found by SYZKALLER. Modified: stable/12/sys/netinet/sctp_indata.c stable/12/sys/netinet/sctp_indata.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_indata.c ============================================================================== --- stable/12/sys/netinet/sctp_indata.c Sun Aug 23 22:52:47 2020 (r364584) +++ stable/12/sys/netinet/sctp_indata.c Sun Aug 23 22:54:30 2020 (r364585) @@ -164,6 +164,9 @@ sctp_build_readq_entry(struct sctp_tcb *stcb, read_queue_e->data = dm; read_queue_e->stcb = stcb; read_queue_e->port_from = stcb->rport; + if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { + read_queue_e->do_not_ref_stcb = 1; + } failed_build: return (read_queue_e); } @@ -775,6 +778,7 @@ sctp_build_readq_entry_from_ctl(struct sctp_queued_to_ atomic_add_int(&nc->whoFrom->ref_count, 1); nc->stcb = control->stcb; nc->port_from = control->port_from; + nc->do_not_ref_stcb = control->do_not_ref_stcb; } static void Modified: stable/12/sys/netinet/sctp_indata.h ============================================================================== --- stable/12/sys/netinet/sctp_indata.h Sun Aug 23 22:52:47 2020 (r364584) +++ stable/12/sys/netinet/sctp_indata.h Sun Aug 23 22:54:30 2020 (r364585) @@ -68,6 +68,9 @@ sctp_build_readq_entry(struct sctp_tcb *stcb, (_ctl)->data = dm; \ (_ctl)->stcb = (in_it); \ (_ctl)->port_from = (in_it)->rport; \ + if ((in_it)->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { \ + (_ctl)->do_not_ref_stcb = 1; \ + }\ } \ } while (0) From owner-svn-src-all@freebsd.org Sun Aug 23 23:02:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C25B3CEBAE; Sun, 23 Aug 2020 23:02:52 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZW4X0jpyz3Trv; Sun, 23 Aug 2020 23:02:52 +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 EFFE3EC5D; Sun, 23 Aug 2020 23:02:51 +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 07NN2pSk024050; Sun, 23 Aug 2020 23:02:51 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NN2pf0024049; Sun, 23 Aug 2020 23:02:51 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232302.07NN2pf0024049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 23:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364586 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364586 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:02:52 -0000 Author: tuexen Date: Sun Aug 23 23:02:51 2020 New Revision: 364586 URL: https://svnweb.freebsd.org/changeset/base/364586 Log: MFC r361213: Whitespace change. Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 22:54:30 2020 (r364585) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 23:02:51 2020 (r364586) @@ -1557,8 +1557,8 @@ select_a_new_ep: iteration_count = 0; } KASSERT(it->inp == it->stcb->sctp_ep, - ("%s: stcb %p does not belong to inp %p, but inp %p", - __func__, it->stcb, it->inp, it->stcb->sctp_ep)); + ("%s: stcb %p does not belong to inp %p, but inp %p", + __func__, it->stcb, it->inp, it->stcb->sctp_ep)); /* run function on this one */ (*it->function_assoc) (it->inp, it->stcb, it->pointer, it->val); From owner-svn-src-all@freebsd.org Sun Aug 23 23:08:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A9923CEBC8; Sun, 23 Aug 2020 23:08:56 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZWCX28p1z3VFF; Sun, 23 Aug 2020 23:08:56 +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 2886CF17A; Sun, 23 Aug 2020 23:08:56 +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 07NN8une024374; Sun, 23 Aug 2020 23:08:56 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NN8tig024373; Sun, 23 Aug 2020 23:08:55 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232308.07NN8tig024373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 23:08:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364587 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364587 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:08:56 -0000 Author: tuexen Date: Sun Aug 23 23:08:55 2020 New Revision: 364587 URL: https://svnweb.freebsd.org/changeset/base/364587 Log: MFC r361214: Fix logical condition by looking at usecs. This issue was found by cpp-check running on the userland stack. Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 23:02:51 2020 (r364586) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 23:08:55 2020 (r364587) @@ -2928,7 +2928,7 @@ sctp_calculate_rto(struct sctp_tcb *stcb, (void)SCTP_GETTIME_TIMEVAL(&now); } if ((old->tv_sec > now.tv_sec) || - ((old->tv_sec == now.tv_sec) && (old->tv_sec > now.tv_sec))) { + ((old->tv_sec == now.tv_sec) && (old->tv_usec > now.tv_usec))) { /* The starting point is in the future. */ return (0); } From owner-svn-src-all@freebsd.org Sun Aug 23 23:10:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C67E23CEE1F; Sun, 23 Aug 2020 23:10:25 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZWFF4sSrz3VLH; Sun, 23 Aug 2020 23:10:25 +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 8A302F17B; Sun, 23 Aug 2020 23:10:25 +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 07NNAPJr024534; Sun, 23 Aug 2020 23:10:25 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NNAPMP024533; Sun, 23 Aug 2020 23:10:25 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232310.07NNAPMP024533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 23:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364588 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364588 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:10:25 -0000 Author: tuexen Date: Sun Aug 23 23:10:25 2020 New Revision: 364588 URL: https://svnweb.freebsd.org/changeset/base/364588 Log: MFC r361221: Remove redundant check. Modified: stable/12/sys/netinet/sctp_asconf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_asconf.c ============================================================================== --- stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 23:08:55 2020 (r364587) +++ stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 23:10:25 2020 (r364588) @@ -3038,10 +3038,6 @@ sctp_check_address_list_ep(struct sctp_tcb *stcb, stru "check_addr_list_ep: laddr->ifa is NULL"); continue; } - if (laddr->ifa == NULL) { - SCTPDBG(SCTP_DEBUG_ASCONF1, "check_addr_list_ep: laddr->ifa->ifa_addr is NULL"); - continue; - } /* do i have it implicitly? */ if (sctp_cmpaddr(&laddr->ifa->address.sa, init_addr)) { continue; From owner-svn-src-all@freebsd.org Sun Aug 23 23:11:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89F093CEDCD; Sun, 23 Aug 2020 23:11:54 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZWGy35Pkz3Vd8; Sun, 23 Aug 2020 23:11:54 +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 4D45EF240; Sun, 23 Aug 2020 23:11:54 +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 07NNBsgn030063; Sun, 23 Aug 2020 23:11:54 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NNBsK3030062; Sun, 23 Aug 2020 23:11:54 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232311.07NNBsK3030062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 23:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364589 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:11:54 -0000 Author: tuexen Date: Sun Aug 23 23:11:53 2020 New Revision: 364589 URL: https://svnweb.freebsd.org/changeset/base/364589 Log: MFC r361222: Avoid an integer underflow. Modified: stable/12/sys/netinet/sctp_asconf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_asconf.c ============================================================================== --- stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 23:10:25 2020 (r364588) +++ stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 23:11:53 2020 (r364589) @@ -1803,9 +1803,9 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, } /* switch */ /* update remaining ASCONF-ACK message length to process */ - ack_length -= SCTP_SIZE32(param_length); - if (ack_length <= 0) { - /* no more data in the mbuf chain */ + if (ack_length > SCTP_SIZE32(param_length)) { + ack_length -= SCTP_SIZE32(param_length); + } else { break; } offset += SCTP_SIZE32(param_length); From owner-svn-src-all@freebsd.org Sun Aug 23 23:13:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 765393CEE56; Sun, 23 Aug 2020 23:13:13 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZWJT2WP0z3Vk7; Sun, 23 Aug 2020 23:13:13 +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 39E04F382; Sun, 23 Aug 2020 23:13:13 +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 07NNDDh7030178; Sun, 23 Aug 2020 23:13:13 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NNDDsF030177; Sun, 23 Aug 2020 23:13:13 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232313.07NNDDsF030177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 23:13:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364590 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364590 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:13:13 -0000 Author: tuexen Date: Sun Aug 23 23:13:12 2020 New Revision: 364590 URL: https://svnweb.freebsd.org/changeset/base/364590 Log: MFC r361224: Cleanup, no functional change intended. Modified: stable/12/sys/netinet/sctp_pcb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 23:11:53 2020 (r364589) +++ stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 23:13:12 2020 (r364590) @@ -5204,16 +5204,12 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc SCTP_FREE_SHOULD_USE_GRACEFUL_CLOSE, SCTP_CALLED_DIRECTLY_NOCMPSET); SCTP_INP_DECR_REF(inp); - goto out_of; } else { /* The socket is still open. */ SCTP_INP_DECR_REF(inp); + SCTP_INP_RUNLOCK(inp); } } - if (from_inpcbfree == SCTP_NORMAL_PROC) { - SCTP_INP_RUNLOCK(inp); - } -out_of: /* destroyed the asoc */ #ifdef SCTP_LOG_CLOSING sctp_log_closing(inp, NULL, 11); From owner-svn-src-all@freebsd.org Sun Aug 23 23:14:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 71D4A3CF01B; Sun, 23 Aug 2020 23:14:48 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZWLJ2NN1z3VgD; Sun, 23 Aug 2020 23:14:48 +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 351FFF28A; Sun, 23 Aug 2020 23:14:48 +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 07NNEmxt030307; Sun, 23 Aug 2020 23:14:48 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NNEmVq030306; Sun, 23 Aug 2020 23:14:48 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232314.07NNEmVq030306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 23:14:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364591 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:14:48 -0000 Author: tuexen Date: Sun Aug 23 23:14:47 2020 New Revision: 364591 URL: https://svnweb.freebsd.org/changeset/base/364591 Log: MFC r361225: Remove redundant assignment. Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 23:13:12 2020 (r364590) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 23:14:47 2020 (r364591) @@ -1144,7 +1144,6 @@ sctp_init_asoc(struct sctp_inpcb *inp, struct sctp_tcb asoc->sctp_cmt_on_off = inp->sctp_cmt_on_off; asoc->ecn_supported = inp->ecn_supported; asoc->prsctp_supported = inp->prsctp_supported; - asoc->idata_supported = inp->idata_supported; asoc->auth_supported = inp->auth_supported; asoc->asconf_supported = inp->asconf_supported; asoc->reconfig_supported = inp->reconfig_supported; From owner-svn-src-all@freebsd.org Sun Aug 23 23:16:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CFA8A3CEB74; Sun, 23 Aug 2020 23:16:14 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZWMy4NrCz3W8p; Sun, 23 Aug 2020 23:16:14 +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 79D37F383; Sun, 23 Aug 2020 23:16:14 +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 07NNGEdJ030434; Sun, 23 Aug 2020 23:16:14 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NNGEfk030433; Sun, 23 Aug 2020 23:16:14 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232316.07NNGEfk030433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 23:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364592 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364592 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:16:14 -0000 Author: tuexen Date: Sun Aug 23 23:16:14 2020 New Revision: 364592 URL: https://svnweb.freebsd.org/changeset/base/364592 Log: MFC r361226: Don't check an unsigned variable for being negative. Modified: stable/12/sys/netinet/sctp_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Sun Aug 23 23:14:47 2020 (r364591) +++ stable/12/sys/netinet/sctp_usrreq.c Sun Aug 23 23:16:14 2020 (r364592) @@ -1023,7 +1023,7 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, struct sctp_vrf *vrf; actual = 0; - if (limit <= 0) + if (limit == 0) return (actual); if (stcb) { From owner-svn-src-all@freebsd.org Sun Aug 23 23:17:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 084D83CF21F; Sun, 23 Aug 2020 23:17:52 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZWPq6W7Dz3W7S; Sun, 23 Aug 2020 23:17:51 +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 C2D59F311; Sun, 23 Aug 2020 23:17:51 +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 07NNHpDk030551; Sun, 23 Aug 2020 23:17:51 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NNHpIm030550; Sun, 23 Aug 2020 23:17:51 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232317.07NNHpIm030550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 23:17:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364593 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364593 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:17:52 -0000 Author: tuexen Date: Sun Aug 23 23:17:51 2020 New Revision: 364593 URL: https://svnweb.freebsd.org/changeset/base/364593 Log: MFC r361227: Remove assignment without effect. Modified: stable/12/sys/netinet/sctp_auth.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_auth.c ============================================================================== --- stable/12/sys/netinet/sctp_auth.c Sun Aug 23 23:16:14 2020 (r364592) +++ stable/12/sys/netinet/sctp_auth.c Sun Aug 23 23:17:51 2020 (r364593) @@ -658,7 +658,6 @@ sctp_free_hmaclist(sctp_hmaclist_t *list) { if (list != NULL) { SCTP_FREE(list, SCTP_M_AUTH_HL); - list = NULL; } } From owner-svn-src-all@freebsd.org Sun Aug 23 23:19:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA2B33CF307; Sun, 23 Aug 2020 23:19:33 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZWRn5KgRz3WPv; Sun, 23 Aug 2020 23:19:33 +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 7D32DF28B; Sun, 23 Aug 2020 23:19:33 +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 07NNJX0m030698; Sun, 23 Aug 2020 23:19:33 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NNJWmQ030692; Sun, 23 Aug 2020 23:19:32 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232319.07NNJWmQ030692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 23:19:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364594 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364594 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:19:33 -0000 Author: tuexen Date: Sun Aug 23 23:19:32 2020 New Revision: 364594 URL: https://svnweb.freebsd.org/changeset/base/364594 Log: MFC r361243: Replace snprintf() by SCTP_SNPRINTF() and let SCTP_SNPRINTF() map to snprintf() on FreeBSD. This allows to check for failures of snprintf() on platforms other than FreeBSD kernel. Modified: stable/12/sys/netinet/sctp_asconf.c stable/12/sys/netinet/sctp_indata.c stable/12/sys/netinet/sctp_input.c stable/12/sys/netinet/sctp_os_bsd.h stable/12/sys/netinet/sctp_output.c stable/12/sys/netinet/sctp_pcb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_asconf.c ============================================================================== --- stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 23:17:51 2020 (r364593) +++ stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 23:19:32 2020 (r364594) @@ -1713,8 +1713,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, char msg[SCTP_DIAG_INFO_LEN]; SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf_ack: got unexpected next serial number! Aborting asoc!\n"); - snprintf(msg, sizeof(msg), "Never sent serial number %8.8x", - serial_num); + SCTP_SNPRINTF(msg, sizeof(msg), "Never sent serial number %8.8x", serial_num); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_no_unlock = 1; Modified: stable/12/sys/netinet/sctp_indata.c ============================================================================== --- stable/12/sys/netinet/sctp_indata.c Sun Aug 23 23:17:51 2020 (r364593) +++ stable/12/sys/netinet/sctp_indata.c Sun Aug 23 23:19:32 2020 (r364594) @@ -434,7 +434,7 @@ sctp_abort_in_reasm(struct sctp_tcb *stcb, struct mbuf *oper; if (stcb->asoc.idata_supported) { - snprintf(msg, sizeof(msg), + SCTP_SNPRINTF(msg, sizeof(msg), "Reass %x,CF:%x,TSN=%8.8x,SID=%4.4x,FSN=%8.8x,MID:%8.8x", opspot, control->fsn_included, @@ -442,7 +442,7 @@ sctp_abort_in_reasm(struct sctp_tcb *stcb, chk->rec.data.sid, chk->rec.data.fsn, chk->rec.data.mid); } else { - snprintf(msg, sizeof(msg), + SCTP_SNPRINTF(msg, sizeof(msg), "Reass %x,CI:%x,TSN=%8.8x,SID=%4.4x,FSN=%4.4x,SSN:%4.4x", opspot, control->fsn_included, @@ -533,11 +533,11 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb, */ TAILQ_INSERT_HEAD(&strm->inqueue, control, next_instrm); if (asoc->idata_supported) { - snprintf(msg, sizeof(msg), "Delivered MID=%8.8x, got TSN=%8.8x, SID=%4.4x, MID=%8.8x", + SCTP_SNPRINTF(msg, sizeof(msg), "Delivered MID=%8.8x, got TSN=%8.8x, SID=%4.4x, MID=%8.8x", strm->last_mid_delivered, control->sinfo_tsn, control->sinfo_stream, control->mid); } else { - snprintf(msg, sizeof(msg), "Delivered SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + SCTP_SNPRINTF(msg, sizeof(msg), "Delivered SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", (uint16_t)strm->last_mid_delivered, control->sinfo_tsn, control->sinfo_stream, @@ -648,9 +648,8 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb, * to put it on the queue. */ if (sctp_place_control_in_stream(strm, asoc, control)) { - snprintf(msg, sizeof(msg), - "Queue to str MID: %u duplicate", - control->mid); + SCTP_SNPRINTF(msg, sizeof(msg), + "Queue to str MID: %u duplicate", control->mid); sctp_clean_up_control(stcb, control); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_3; @@ -1881,8 +1880,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc * can *not* be fsn 0. XXX: This can happen in case of a * wrap around. Ignore is for now. */ - snprintf(msg, sizeof(msg), "FSN zero for MID=%8.8x, but flags=%2.2x", - mid, chk_flags); + SCTP_SNPRINTF(msg, sizeof(msg), "FSN zero for MID=%8.8x, but flags=%2.2x", mid, chk_flags); goto err_out; } control = sctp_find_reasm_entry(&asoc->strmin[sid], mid, ordered, asoc->idata_supported); @@ -1893,7 +1891,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc if (control != NULL) { /* We found something, does it belong? */ if (ordered && (mid != control->mid)) { - snprintf(msg, sizeof(msg), "Reassembly problem (MID=%8.8x)", mid); + SCTP_SNPRINTF(msg, sizeof(msg), "Reassembly problem (MID=%8.8x)", mid); err_out: op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; @@ -1906,7 +1904,8 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc * We can't have a switched order with an * unordered chunk */ - snprintf(msg, sizeof(msg), "All fragments of a user message must be ordered or unordered (TSN=%8.8x)", + SCTP_SNPRINTF(msg, sizeof(msg), + "All fragments of a user message must be ordered or unordered (TSN=%8.8x)", tsn); goto err_out; } @@ -1915,7 +1914,8 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc * We can't have a switched unordered with a * ordered chunk */ - snprintf(msg, sizeof(msg), "All fragments of a user message must be ordered or unordered (TSN=%8.8x)", + SCTP_SNPRINTF(msg, sizeof(msg), + "All fragments of a user message must be ordered or unordered (TSN=%8.8x)", tsn); goto err_out; } @@ -1930,12 +1930,14 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc if (ordered || asoc->idata_supported) { SCTPDBG(SCTP_DEBUG_XXX, "chunk_flags: 0x%x dup detected on MID: %u\n", chk_flags, mid); - snprintf(msg, sizeof(msg), "Duplicate MID=%8.8x detected.", mid); + SCTP_SNPRINTF(msg, sizeof(msg), "Duplicate MID=%8.8x detected.", mid); goto err_out; } else { if ((tsn == control->fsn_included + 1) && (control->end_added == 0)) { - snprintf(msg, sizeof(msg), "Illegal message sequence, missing end for MID: %8.8x", control->fsn_included); + SCTP_SNPRINTF(msg, sizeof(msg), + "Illegal message sequence, missing end for MID: %8.8x", + control->fsn_included); goto err_out; } else { control = NULL; @@ -2032,13 +2034,13 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc mid, asoc->strmin[sid].last_mid_delivered); if (asoc->idata_supported) { - snprintf(msg, sizeof(msg), "Delivered MID=%8.8x, got TSN=%8.8x, SID=%4.4x, MID=%8.8x", + SCTP_SNPRINTF(msg, sizeof(msg), "Delivered MID=%8.8x, got TSN=%8.8x, SID=%4.4x, MID=%8.8x", asoc->strmin[sid].last_mid_delivered, tsn, sid, mid); } else { - snprintf(msg, sizeof(msg), "Delivered SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", + SCTP_SNPRINTF(msg, sizeof(msg), "Delivered SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", (uint16_t)asoc->strmin[sid].last_mid_delivered, tsn, sid, @@ -2769,7 +2771,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; - snprintf(msg, sizeof(msg), "%s", "I-DATA chunk received when DATA was negotiated"); + SCTP_SNPRINTF(msg, sizeof(msg), "%s", "I-DATA chunk received when DATA was negotiated"); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_20; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); @@ -2780,7 +2782,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; - snprintf(msg, sizeof(msg), "%s", "DATA chunk received when I-DATA was negotiated"); + SCTP_SNPRINTF(msg, sizeof(msg), "%s", "DATA chunk received when I-DATA was negotiated"); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_21; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); @@ -2803,7 +2805,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; - snprintf(msg, sizeof(msg), "%s chunk of length %u", + SCTP_SNPRINTF(msg, sizeof(msg), "%s chunk of length %u", ch->chunk_type == SCTP_DATA ? "DATA" : "I-DATA", chk_length); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); @@ -2874,7 +2876,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; - snprintf(msg, sizeof(msg), "DATA chunk followed by chunk of type %2.2x", + SCTP_SNPRINTF(msg, sizeof(msg), "DATA chunk followed by chunk of type %2.2x", ch->chunk_type); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); @@ -2893,8 +2895,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; - snprintf(msg, sizeof(msg), "Chunk of length %u", - chk_length); + SCTP_SNPRINTF(msg, sizeof(msg), "Chunk of length %u", chk_length); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_23; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); @@ -4043,7 +4044,8 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32 *abort_now = 1; /* XXX */ - snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal than TSN %8.8x", + SCTP_SNPRINTF(msg, sizeof(msg), + "Cum ack %8.8x greater or equal than TSN %8.8x", cumack, send_s); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24; @@ -4585,7 +4587,8 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int o hopeless_peer: *abort_now = 1; /* XXX */ - snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal than TSN %8.8x", + SCTP_SNPRINTF(msg, sizeof(msg), + "Cum ack %8.8x greater or equal than TSN %8.8x", cum_ack, send_s); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_28; @@ -5629,7 +5632,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, * give out). This must be an attacker. */ *abort_flag = 1; - snprintf(msg, sizeof(msg), + SCTP_SNPRINTF(msg, sizeof(msg), "New cum ack %8.8x too high, highest TSN %8.8x", new_cum_tsn, asoc->highest_tsn_inside_map); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Sun Aug 23 23:17:51 2020 (r364593) +++ stable/12/sys/netinet/sctp_input.c Sun Aug 23 23:19:32 2020 (r364594) @@ -4692,7 +4692,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int * } } if (stcb == NULL) { - snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); + SCTP_SNPRINTF(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); /* no association, so it's out of the blue... */ @@ -4734,7 +4734,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int * if (stcb != NULL) { SCTP_TCB_UNLOCK(stcb); } - snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); + SCTP_SNPRINTF(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_handle_ootb(m, iphlen, *offset, src, dst, @@ -5671,7 +5671,7 @@ sctp_common_input_processing(struct mbuf **mm, int iph SCTP_TCB_UNLOCK(stcb); stcb = NULL; SCTP_PROBE5(receive, NULL, stcb, m, stcb, sh); - snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); + SCTP_SNPRINTF(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, op_err, @@ -5733,7 +5733,7 @@ sctp_common_input_processing(struct mbuf **mm, int iph if (stcb == NULL) { /* out of the blue DATA chunk */ SCTP_PROBE5(receive, NULL, NULL, m, NULL, sh); - snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); + SCTP_SNPRINTF(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, op_err, @@ -5799,7 +5799,7 @@ sctp_common_input_processing(struct mbuf **mm, int iph /* * We consider OOTB any data sent during asoc setup. */ - snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); + SCTP_SNPRINTF(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, op_err, Modified: stable/12/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/12/sys/netinet/sctp_os_bsd.h Sun Aug 23 23:17:51 2020 (r364593) +++ stable/12/sys/netinet/sctp_os_bsd.h Sun Aug 23 23:19:32 2020 (r364594) @@ -294,6 +294,8 @@ typedef struct callout sctp_os_timer_t; #define SCTP_ALIGN_TO_END(m, len) M_ALIGN(m, len) +#define SCTP_SNPRINTF(...) snprintf(__VA_ARGS__) + /* We make it so if you have up to 4 threads * writing based on the default size of * the packet log 65 k, that would be Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Sun Aug 23 23:17:51 2020 (r364593) +++ stable/12/sys/netinet/sctp_output.c Sun Aug 23 23:19:32 2020 (r364594) @@ -5587,7 +5587,7 @@ do_a_abort: if (op_err == NULL) { char msg[SCTP_DIAG_INFO_LEN]; - snprintf(msg, sizeof(msg), "%s:%d at %s", __FILE__, __LINE__, __func__); + SCTP_SNPRINTF(msg, sizeof(msg), "%s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); } @@ -6764,7 +6764,7 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct s char msg[SCTP_DIAG_INFO_LEN]; abort_anyway: - snprintf(msg, sizeof(msg), + SCTP_SNPRINTF(msg, sizeof(msg), "%s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); @@ -9632,7 +9632,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp, struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; - snprintf(msg, sizeof(msg), "TSN %8.8x retransmitted %d times, giving up", + SCTP_SNPRINTF(msg, sizeof(msg), "TSN %8.8x retransmitted %d times, giving up", chk->rec.data.tsn, chk->snd_count); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); @@ -13609,7 +13609,7 @@ dataless_eof: atomic_add_int(&stcb->asoc.refcnt, -1); free_cnt_applied = 0; } - snprintf(msg, sizeof(msg), + SCTP_SNPRINTF(msg, sizeof(msg), "%s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 23:17:51 2020 (r364593) +++ stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 23:19:32 2020 (r364594) @@ -541,9 +541,9 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 atomic_add_int(&vrf->refcount, 1); sctp_ifnp->ifn_mtu = SCTP_GATHER_MTU_FROM_IFN_INFO(ifn, ifn_index, addr->sa_family); if (if_name != NULL) { - snprintf(sctp_ifnp->ifn_name, SCTP_IFNAMSIZ, "%s", if_name); + SCTP_SNPRINTF(sctp_ifnp->ifn_name, SCTP_IFNAMSIZ, "%s", if_name); } else { - snprintf(sctp_ifnp->ifn_name, SCTP_IFNAMSIZ, "%s", "unknown"); + SCTP_SNPRINTF(sctp_ifnp->ifn_name, SCTP_IFNAMSIZ, "%s", "unknown"); } hash_ifn_head = &SCTP_BASE_INFO(vrf_ifn_hash)[(ifn_index & SCTP_BASE_INFO(vrf_ifn_hashmark))]; LIST_INIT(&sctp_ifnp->ifalist); @@ -6229,7 +6229,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s * in setup state we * abort this guy */ - snprintf(msg, sizeof(msg), + SCTP_SNPRINTF(msg, sizeof(msg), "%s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); @@ -6329,7 +6329,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s * in setup state we * abort this guy */ - snprintf(msg, sizeof(msg), + SCTP_SNPRINTF(msg, sizeof(msg), "%s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); From owner-svn-src-all@freebsd.org Sun Aug 23 23:21:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB3083CF45A; Sun, 23 Aug 2020 23:21:27 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZWTz55NGz3WSW; Sun, 23 Aug 2020 23:21:27 +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 93BC9F29E; Sun, 23 Aug 2020 23:21:27 +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 07NNLRHo034164; Sun, 23 Aug 2020 23:21:27 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NNLQ5I034155; Sun, 23 Aug 2020 23:21:26 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232321.07NNLQ5I034155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 23:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364595 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364595 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:21:27 -0000 Author: tuexen Date: Sun Aug 23 23:21:26 2020 New Revision: 364595 URL: https://svnweb.freebsd.org/changeset/base/364595 Log: MFC r361872: Non-functional changes due to cleanup (upstream removing of Panda support) of the code. Modified: stable/12/sys/netinet/sctp_constants.h stable/12/sys/netinet/sctp_indata.c stable/12/sys/netinet/sctp_os.h stable/12/sys/netinet/sctp_output.c stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctp_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_constants.h ============================================================================== --- stable/12/sys/netinet/sctp_constants.h Sun Aug 23 23:19:32 2020 (r364594) +++ stable/12/sys/netinet/sctp_constants.h Sun Aug 23 23:21:26 2020 (r364595) @@ -576,7 +576,6 @@ __FBSDID("$FreeBSD$"); */ #define SCTP_ASOC_MAX_CHUNKS_ON_QUEUE 512 - /* * Basically the minimum amount of time before I do a early FR. Making this * value to low will cause duplicate retransmissions. @@ -756,9 +755,8 @@ __FBSDID("$FreeBSD$"); #define SCTP_FROM_SCTP_ASCONF 0x80000000 #define SCTP_FROM_SCTP_OUTPUT 0x90000000 #define SCTP_FROM_SCTP_PEELOFF 0xa0000000 -#define SCTP_FROM_SCTP_PANDA 0xb0000000 -#define SCTP_FROM_SCTP_SYSCTL 0xc0000000 -#define SCTP_FROM_SCTP_CC_FUNCTIONS 0xd0000000 +#define SCTP_FROM_SCTP_SYSCTL 0xb0000000 +#define SCTP_FROM_SCTP_CC_FUNCTIONS 0xc0000000 /* Location ID's */ #define SCTP_LOC_1 0x00000001 Modified: stable/12/sys/netinet/sctp_indata.c ============================================================================== --- stable/12/sys/netinet/sctp_indata.c Sun Aug 23 23:19:32 2020 (r364594) +++ stable/12/sys/netinet/sctp_indata.c Sun Aug 23 23:21:26 2020 (r364595) @@ -2721,8 +2721,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o * cluster... i.e. it is a small packet sent in and yet the driver * underneath allocated a full cluster for it. If so we must copy it * to a smaller mbuf and free up the cluster mbuf. This will help - * with cluster starvation. Note for __Panda__ we don't do this - * since it has clusters all the way down to 64 bytes. + * with cluster starvation. */ if (SCTP_BUF_LEN(m) < (long)MLEN && SCTP_BUF_NEXT(m) == NULL) { /* we only handle mbufs that are singletons.. not chains */ Modified: stable/12/sys/netinet/sctp_os.h ============================================================================== --- stable/12/sys/netinet/sctp_os.h Sun Aug 23 23:19:32 2020 (r364594) +++ stable/12/sys/netinet/sctp_os.h Sun Aug 23 23:21:26 2020 (r364595) @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); - /* All os's must implement this address gatherer. If * no VRF's exist, then vrf 0 is the only one and all * addresses and ifn's live here. Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Sun Aug 23 23:19:32 2020 (r364594) +++ stable/12/sys/netinet/sctp_output.c Sun Aug 23 23:21:26 2020 (r364595) @@ -6481,8 +6481,7 @@ error_out: appendchain = clonechain; } else { if (!copy_by_ref && - (sizeofcpy <= (int)((((SCTP_BASE_SYSCTL(sctp_mbuf_threshold_count) - 1) * MLEN) + MHLEN))) - ) { + (sizeofcpy <= (int)((((SCTP_BASE_SYSCTL(sctp_mbuf_threshold_count) - 1) * MLEN) + MHLEN)))) { /* Its not in a cluster */ if (*endofchain == NULL) { /* lets get a mbuf cluster */ @@ -13525,12 +13524,6 @@ skip_preblock: error = sctp_msg_append(stcb, net, top, srcv, 0); top = NULL; if (sinfo_flags & SCTP_EOF) { - /* - * This should only happen for Panda for the mbuf - * send case, which does NOT yet support EEOR mode. - * Thus, we can just set this flag to do the proper - * EOF handling. - */ got_all_of_the_send = 1; } } Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 23:19:32 2020 (r364594) +++ stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 23:21:26 2020 (r364595) @@ -746,8 +746,7 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, struct sockadd /*- * The name has priority over the ifn_index - * if its given. We do this especially for - * panda who might recycle indexes fast. + * if its given. */ if (if_name) { if (strncmp(if_name, sctp_ifap->ifn_p->ifn_name, SCTP_IFNAMSIZ) == 0) { @@ -3154,8 +3153,7 @@ continue_anyway: } else { /* * Note for BSD we hit here always other O/S's will - * pass things in via the sctp_ifap argument - * (Panda). + * pass things in via the sctp_ifap argument. */ ifa = sctp_find_ifa_by_addr(&store.sa, vrf_id, SCTP_ADDR_NOT_LOCKED); @@ -4307,11 +4305,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockadd * If you have not performed a bind, then we need to do the * ephemeral bind for you. */ - if ((err = sctp_inpcb_bind(inp->sctp_socket, - (struct sockaddr *)NULL, - (struct sctp_ifa *)NULL, - p - ))) { + if ((err = sctp_inpcb_bind(inp->sctp_socket, NULL, NULL, p))) { /* bind error, probably perm */ *error = err; return (NULL); @@ -4679,7 +4673,6 @@ sctp_clean_up_stream(struct sctp_tcb *stcb, struct sct } } } - /*- * Free the association after un-hashing the remote port. This Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Sun Aug 23 23:19:32 2020 (r364594) +++ stable/12/sys/netinet/sctp_usrreq.c Sun Aug 23 23:21:26 2020 (r364595) @@ -71,7 +71,7 @@ sctp_init(void) SCTP_BASE_SYSCTL(sctp_max_chunks_on_queue) = (nmbclusters / 8); /* * Allow a user to take no more than 1/2 the number of clusters or - * the SB_MAX whichever is smaller for the send window. + * the SB_MAX, whichever is smaller, for the send window. */ sb_max_adj = (u_long)((u_quad_t)(SB_MAX) * MCLBYTES / (MSIZE + MCLBYTES)); SCTP_BASE_SYSCTL(sctp_sendspace) = min(sb_max_adj, From owner-svn-src-all@freebsd.org Sun Aug 23 23:22:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D597F3CF32B; Sun, 23 Aug 2020 23:22:55 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZWWg5N3Jz3WjK; Sun, 23 Aug 2020 23:22:55 +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 9B957F138; Sun, 23 Aug 2020 23:22:55 +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 07NNMtMD036717; Sun, 23 Aug 2020 23:22:55 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NNMtcQ036716; Sun, 23 Aug 2020 23:22:55 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232322.07NNMtcQ036716@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 23:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364596 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364596 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:22:55 -0000 Author: tuexen Date: Sun Aug 23 23:22:55 2020 New Revision: 364596 URL: https://svnweb.freebsd.org/changeset/base/364596 Log: MFC r361877: Fix typo in comment. Submitted by Orgad Shaneh for the userland stack. Modified: stable/12/sys/netinet/sctp_pcb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 23:21:26 2020 (r364595) +++ stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 23:22:55 2020 (r364596) @@ -5893,7 +5893,7 @@ retry: * holding the lock. We won't find it on the list either and * continue and free/destroy it. While holding the lock, spin, to * avoid the race condition as sctp_iterator_worker() will have to - * wait to re-aquire the lock. + * wait to re-acquire the lock. */ if (sctp_it_ctl.iterator_running != 0 || sctp_it_ctl.cur_it != NULL) { SCTP_IPI_ITERATOR_WQ_UNLOCK(); From owner-svn-src-all@freebsd.org Sun Aug 23 23:24:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DAEF23CEEEE; Sun, 23 Aug 2020 23:24:40 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZWYh5n9zz3X0g; Sun, 23 Aug 2020 23:24:40 +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 A976FF394; Sun, 23 Aug 2020 23:24:40 +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 07NNOeSw036863; Sun, 23 Aug 2020 23:24:40 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NNOcFZ036852; Sun, 23 Aug 2020 23:24:38 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232324.07NNOcFZ036852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 23:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364597 - in stable/12/sys: netinet netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in stable/12/sys: netinet netinet6 X-SVN-Commit-Revision: 364597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:24:40 -0000 Author: tuexen Date: Sun Aug 23 23:24:38 2020 New Revision: 364597 URL: https://svnweb.freebsd.org/changeset/base/364597 Log: MFC r361895: Retire SCTP_SO_LOCK_TESTING. This was intended to test the locking used in the MacOS X kernel on a FreeBSD system, to make use of WITNESS and other debugging infrastructure. This hasn't been used for ages, to take it out to reduce the #ifdef complexity. Modified: stable/12/sys/netinet/sctp_auth.c stable/12/sys/netinet/sctp_constants.h stable/12/sys/netinet/sctp_indata.c stable/12/sys/netinet/sctp_input.c stable/12/sys/netinet/sctp_output.c stable/12/sys/netinet/sctp_output.h stable/12/sys/netinet/sctp_sysctl.c stable/12/sys/netinet/sctp_sysctl.h stable/12/sys/netinet/sctp_usrreq.c stable/12/sys/netinet/sctputil.c stable/12/sys/netinet/sctputil.h stable/12/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_auth.c ============================================================================== --- stable/12/sys/netinet/sctp_auth.c Sun Aug 23 23:22:55 2020 (r364596) +++ stable/12/sys/netinet/sctp_auth.c Sun Aug 23 23:24:38 2020 (r364597) @@ -566,9 +566,7 @@ sctp_auth_key_acquire(struct sctp_tcb *stcb, uint16_t void sctp_auth_key_release(struct sctp_tcb *stcb, uint16_t key_id, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { sctp_sharedkey_t *skey; @@ -1721,9 +1719,7 @@ sctp_handle_auth(struct sctp_tcb *stcb, struct sctp_au void sctp_notify_authentication(struct sctp_tcb *stcb, uint32_t indication, uint16_t keyid, uint16_t alt_keyid, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { struct mbuf *m_notify; Modified: stable/12/sys/netinet/sctp_constants.h ============================================================================== --- stable/12/sys/netinet/sctp_constants.h Sun Aug 23 23:22:55 2020 (r364596) +++ stable/12/sys/netinet/sctp_constants.h Sun Aug 23 23:24:38 2020 (r364597) @@ -943,7 +943,7 @@ __FBSDID("$FreeBSD$"); /*- * defines for socket lock states. - * Used by __APPLE__ and SCTP_SO_LOCK_TESTING + * Used by __APPLE__ */ #define SCTP_SO_LOCKED 1 #define SCTP_SO_NOT_LOCKED 0 Modified: stable/12/sys/netinet/sctp_indata.c ============================================================================== --- stable/12/sys/netinet/sctp_indata.c Sun Aug 23 23:22:55 2020 (r364596) +++ stable/12/sys/netinet/sctp_indata.c Sun Aug 23 23:24:38 2020 (r364597) @@ -555,20 +555,6 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb, sctp_ucount_incr(asoc->cnt_on_all_streams); nxt_todel = strm->last_mid_delivered + 1; if (SCTP_MID_EQ(asoc->idata_supported, nxt_todel, control->mid)) { -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; - - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { - SCTP_SOCKET_UNLOCK(so, 1); - return; - } -#endif /* can be delivered right away? */ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_STR_LOGGING_ENABLE) { sctp_log_strm_del(control, NULL, SCTP_STR_LOG_FROM_IMMED_DEL); @@ -638,9 +624,6 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb, } break; } -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif } if (queue_needed) { /* @@ -1956,25 +1939,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc */ if (stcb->sctp_socket->so_rcv.sb_cc) { /* some to read, wake-up */ -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; - - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - /* assoc was freed while we were unlocked */ - SCTP_SOCKET_UNLOCK(so, 1); - return (0); - } -#endif sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif } /* now is it in the mapping array of what we have accepted? */ if (chk_type == SCTP_DATA) { @@ -4182,32 +4147,12 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32 } /* sa_ignore NO_NULL_CHK */ if (stcb->sctp_socket) { -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; - -#endif SOCKBUF_LOCK(&stcb->sctp_socket->so_snd); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { /* sa_ignore NO_NULL_CHK */ sctp_wakeup_log(stcb, 1, SCTP_WAKESND_FROM_SACK); } -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - /* assoc was freed while we were unlocked */ - SCTP_SOCKET_UNLOCK(so, 1); - return; - } -#endif sctp_sowwakeup_locked(stcb->sctp_ep, stcb->sctp_socket); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif } else { if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { sctp_wakeup_log(stcb, 1, SCTP_NOWAKE_FROM_SACK); @@ -4894,31 +4839,11 @@ hopeless_peer: /* sa_ignore NO_NULL_CHK */ if ((wake_him) && (stcb->sctp_socket)) { -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; - -#endif SOCKBUF_LOCK(&stcb->sctp_socket->so_snd); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { sctp_wakeup_log(stcb, wake_him, SCTP_WAKESND_FROM_SACK); } -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - /* assoc was freed while we were unlocked */ - SCTP_SOCKET_UNLOCK(so, 1); - return; - } -#endif sctp_sowwakeup_locked(stcb->sctp_ep, stcb->sctp_socket); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif } else { if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { sctp_wakeup_log(stcb, wake_him, SCTP_NOWAKE_FROM_SACK); Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Sun Aug 23 23:22:55 2020 (r364596) +++ stable/12/sys/netinet/sctp_input.c Sun Aug 23 23:24:38 2020 (r364597) @@ -214,9 +214,7 @@ outnow: int sctp_is_there_unsent_data(struct sctp_tcb *stcb, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { int unsent_data; @@ -788,9 +786,6 @@ static int sctp_handle_abort(struct sctp_abort_chunk *abort, struct sctp_tcb *stcb, struct sctp_nets *net) { -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; -#endif uint16_t len; uint16_t error; @@ -838,20 +833,9 @@ sctp_handle_abort(struct sctp_abort_chunk *abort, #ifdef SCTP_ASOCLOG_OF_TSNS sctp_print_out_track_log(stcb); #endif -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); -#endif SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_WAS_ABORTED); (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_8); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_abort: finished\n"); return (1); } @@ -892,9 +876,6 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, struct sctp_association *asoc; int some_on_streamwheel; int old_state; -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; -#endif SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_shutdown: handling SHUTDOWN\n"); @@ -943,25 +924,9 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, asoc->control_pdapi->pdapi_aborted = 1; asoc->control_pdapi = NULL; SCTP_INP_READ_UNLOCK(stcb->sctp_ep); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - /* assoc was freed while we were unlocked */ - SCTP_SOCKET_UNLOCK(so, 1); - return; - } -#endif if (stcb->sctp_socket) { sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); } -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif } /* goto SHUTDOWN_RECEIVED state to block new requests */ if (stcb->sctp_socket) { @@ -1021,11 +986,7 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chun struct sctp_nets *net) { struct sctp_association *asoc; -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; - so = SCTP_INP_SO(stcb->sctp_ep); -#endif SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_shutdown_ack: handling SHUTDOWN ACK\n"); if (stcb == NULL) @@ -1055,22 +1016,7 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chun asoc->control_pdapi->pdapi_aborted = 1; asoc->control_pdapi = NULL; SCTP_INP_READ_UNLOCK(stcb->sctp_ep); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - /* assoc was freed while we were unlocked */ - SCTP_SOCKET_UNLOCK(so, 1); - return; - } -#endif sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif } #ifdef INVARIANTS if (!TAILQ_EMPTY(&asoc->send_queue) || @@ -1094,18 +1040,8 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chun } SCTP_STAT_INCR_COUNTER32(sctps_shutdown); /* free the TCB but first save off the ep */ -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); -#endif (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_11); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif } static void @@ -1176,9 +1112,6 @@ sctp_handle_error(struct sctp_chunkhdr *ch, struct sctp_association *asoc; uint32_t remaining_length, adjust; uint16_t code, cause_code, cause_length; -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; -#endif /* parse through all of the errors and process */ asoc = &stcb->asoc; @@ -1252,19 +1185,8 @@ sctp_handle_error(struct sctp_chunkhdr *ch, asoc->max_init_times) { sctp_abort_notification(stcb, 0, 0, NULL, SCTP_SO_NOT_LOCKED); /* now free the asoc */ -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); -#endif (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_12); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif return (-1); } /* blast back to INIT state */ @@ -1648,9 +1570,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && (!SCTP_IS_LISTENING(inp))) { -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; -#endif /* * Here is where collision would go if we * did a connect() and instead got a @@ -1659,22 +1578,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle */ stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED; -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_add_int(&stcb->asoc.refcnt, -1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - SCTP_SOCKET_UNLOCK(so, 1); - return (NULL); - } -#endif soisconnected(stcb->sctp_socket); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif } /* notify upper layer */ *notification = SCTP_NOTIFY_ASSOC_UP; @@ -1849,27 +1753,9 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && (!SCTP_IS_LISTENING(inp))) { -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; -#endif stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED; -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_add_int(&stcb->asoc.refcnt, -1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - SCTP_SOCKET_UNLOCK(so, 1); - return (NULL); - } -#endif soisconnected(stcb->sctp_socket); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif } if (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED) SCTP_STAT_INCR_COUNTER32(sctps_activeestab); @@ -1910,9 +1796,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle cookie->tie_tag_peer_vtag == asoc->peer_vtag_nonce && cookie->tie_tag_peer_vtag != 0) { struct sctpasochead *head; -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; -#endif if (asoc->peer_supports_nat) { /* @@ -1980,10 +1863,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle asoc->mapping_array_size); } SCTP_TCB_UNLOCK(stcb); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - SCTP_SOCKET_LOCK(so, 1); -#endif SCTP_INP_INFO_WLOCK(); SCTP_INP_WLOCK(stcb->sctp_ep); SCTP_TCB_LOCK(stcb); @@ -2026,9 +1905,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle SCTP_TCB_SEND_UNLOCK(stcb); SCTP_INP_WUNLOCK(stcb->sctp_ep); SCTP_INP_INFO_WUNLOCK(); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif asoc->total_flight = 0; asoc->total_flight_count = 0; /* process the INIT info (peer's info) */ @@ -2095,12 +1971,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in int retval; int error = 0; uint8_t auth_chunk_buf[SCTP_CHUNK_BUFFER_SIZE]; -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; - so = SCTP_INP_SO(inp); -#endif - /* * find and validate the INIT chunk in the cookie (peer's info) the * INIT should start after the cookie-echo header struct (chunk @@ -2199,18 +2070,8 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in src, dst, sh, op_err, mflowtype, mflowid, vrf_id, port); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); -#endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_18); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif return (NULL); } /* process the INIT-ACK info (my info) */ @@ -2231,36 +2092,16 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in else retval = 0; if (retval < 0) { -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); -#endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_19); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif return (NULL); } /* load all addresses */ if (sctp_load_addresses_from_init(stcb, m, init_offset + sizeof(struct sctp_init_chunk), initack_offset, src, dst, init_src, port)) { -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); -#endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_20); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif return (NULL); } /* @@ -2282,18 +2123,8 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in /* auth HMAC failed, dump the assoc and packet */ SCTPDBG(SCTP_DEBUG_AUTH1, "COOKIE-ECHO: AUTH failed\n"); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); -#endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_21); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif return (NULL); } else { /* remaining chunks checked... good to go */ @@ -2333,18 +2164,8 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in break; #endif default: -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); -#endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_22); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif return (NULL); } @@ -2373,21 +2194,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in * a bit of protection is worth having.. */ stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED; -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - SCTP_SOCKET_UNLOCK(so, 1); - return (NULL); - } -#endif soisconnected(stcb->sctp_socket); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif } else if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && (SCTP_IS_LISTENING(inp))) { /* @@ -2807,9 +2614,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in if (so == NULL) { struct mbuf *op_err; -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *pcb_so; -#endif + /* Too many sockets */ SCTPDBG(SCTP_DEBUG_INPUT1, "process_cookie_new: no room for another socket!\n"); op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, ""); @@ -2817,19 +2622,8 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in src, dst, sh, op_err, mflowtype, mflowid, vrf_id, port); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - pcb_so = SCTP_INP_SO(*inp_p); - atomic_add_int(&(*stcb)->asoc.refcnt, 1); - SCTP_TCB_UNLOCK((*stcb)); - SCTP_SOCKET_LOCK(pcb_so, 1); - SCTP_TCB_LOCK((*stcb)); - atomic_subtract_int(&(*stcb)->asoc.refcnt, 1); -#endif (void)sctp_free_assoc(*inp_p, *stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_23); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(pcb_so, 1); -#endif return (NULL); } inp = (struct sctp_inpcb *)so->so_pcb; @@ -2926,17 +2720,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, in * Pull it from the incomplete queue and wake the * guy */ -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - atomic_add_int(&(*stcb)->asoc.refcnt, 1); - SCTP_TCB_UNLOCK((*stcb)); - SCTP_SOCKET_LOCK(so, 1); -#endif soisconnected(so); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_TCB_LOCK((*stcb)); - atomic_subtract_int(&(*stcb)->asoc.refcnt, 1); - SCTP_SOCKET_UNLOCK(so, 1); -#endif return (m); } } @@ -2996,25 +2780,10 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *c sctp_ulp_notify(SCTP_NOTIFY_ASSOC_UP, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; - -#endif stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED; -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); -#endif if ((stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) == 0) { soisconnected(stcb->sctp_socket); } -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif } /* * since we did not send a HB make sure we don't double @@ -3238,9 +3007,6 @@ static void sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp SCTP_UNUSED, struct sctp_tcb *stcb, struct sctp_nets *net) { -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; -#endif SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_shutdown_complete: handling SHUTDOWN-COMPLETE\n"); @@ -3273,19 +3039,8 @@ sctp_handle_shutdown_complete(struct sctp_shutdown_com /* free the TCB */ SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_shutdown_complete: calls free-asoc\n"); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); -#endif (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_25); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif return; } @@ -4570,9 +4325,6 @@ sctp_process_control(struct mbuf *m, int iphlen, int * uint32_t auth_offset = 0, auth_len = 0; int auth_skipped = 0; int asconf_cnt = 0; -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; -#endif SCTPDBG(SCTP_DEBUG_INPUT1, "sctp_process_control: iphlen=%u, offset=%u, length=%u stcb:%p\n", iphlen, *offset, length, (void *)stcb); @@ -4881,19 +4633,8 @@ process_control_chunks: } else { *offset = length; if (stcb != NULL) { -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(inp); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); -#endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_29); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif } return (NULL); } @@ -5245,19 +4986,8 @@ process_control_chunks: if ((stcb) && (stcb->asoc.total_output_queue_size)) { ; } else if (stcb) { -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(inp); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); -#endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_30); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif *offset = length; return (NULL); } @@ -5360,19 +5090,8 @@ process_control_chunks: *fwd_tsn_seen = 1; if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { /* We are not interested anymore */ -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(inp); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); -#endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_31); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif *offset = length; return (NULL); } Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Sun Aug 23 23:22:55 2020 (r364596) +++ stable/12/sys/netinet/sctp_output.c Sun Aug 23 23:24:38 2020 (r364597) @@ -3990,11 +3990,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, uint16_t port, union sctp_sockstore *over_addr, uint8_t mflowtype, uint32_t mflowid, -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) int so_locked SCTP_UNUSED -#else - int so_locked -#endif ) { /* nofragment_flag to tell if IP_DF should be set (IPv4 only) */ @@ -4024,9 +4020,6 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, struct udphdr *udp = NULL; #endif uint8_t tos_value; -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so = NULL; -#endif if ((net) && (net->dest_state & SCTP_ADDR_OUT_OF_SCOPE)) { SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EFAULT); @@ -4250,23 +4243,8 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, sctp_packet_log(o_pak); #endif /* send it out. table id is taken from stcb */ -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - if ((SCTP_BASE_SYSCTL(sctp_output_unlocked)) && (so_locked)) { - so = SCTP_INP_SO(inp); - SCTP_SOCKET_UNLOCK(so, 0); - } -#endif SCTP_PROBE5(send, NULL, stcb, ip, stcb, sctphdr); SCTP_IP_OUTPUT(ret, o_pak, ro, stcb, vrf_id); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - if ((SCTP_BASE_SYSCTL(sctp_output_unlocked)) && (so_locked)) { - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 0); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - } -#endif if (port) { UDPSTAT_INC(udps_opackets); } @@ -4588,27 +4566,12 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, SCTP_STAT_INCR(sctps_sendhwcrc); } /* send it out. table id is taken from stcb */ -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - if ((SCTP_BASE_SYSCTL(sctp_output_unlocked)) && (so_locked)) { - so = SCTP_INP_SO(inp); - SCTP_SOCKET_UNLOCK(so, 0); - } -#endif #ifdef SCTP_PACKET_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) sctp_packet_log(o_pak); #endif SCTP_PROBE5(send, NULL, stcb, ip6h, stcb, sctphdr); SCTP_IP6_OUTPUT(ret, o_pak, (struct route_in6 *)ro, &ifp, stcb, vrf_id); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - if ((SCTP_BASE_SYSCTL(sctp_output_unlocked)) && (so_locked)) { - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 0); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - } -#endif if (net) { /* for link local this must be done */ sin6->sin6_scope_id = prev_scope; @@ -4680,9 +4643,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, void sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { struct mbuf *m, *m_last; @@ -6618,9 +6579,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, int *reason_code, int control_only, int from_where, struct timeval *now, int *now_filled, int frag_point, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ); static void @@ -7082,9 +7041,7 @@ all_done: static void sctp_clean_up_ctl(struct sctp_tcb *stcb, struct sctp_association *asoc, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { struct sctp_tmit_chunk *chk, *nchk; @@ -7191,9 +7148,7 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb, int eeor_mode, int *bail, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { /* Move from the stream to the send_queue keeping track of the total */ @@ -7722,9 +7677,7 @@ out_of: static void sctp_fill_outqueue(struct sctp_tcb *stcb, struct sctp_nets *net, int frag_point, int eeor_mode, int *quit_now, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { struct sctp_association *asoc; @@ -7845,9 +7798,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, int *reason_code, int control_only, int from_where, struct timeval *now, int *now_filled, int frag_point, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { /** @@ -9464,9 +9415,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_association *asoc, int *cnt_out, struct timeval *now, int *now_filled, int *fr_done, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { /*- @@ -10017,9 +9966,7 @@ sctp_chunk_output(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_where, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { /*- @@ -10538,9 +10485,7 @@ sctp_fill_in_rest: void sctp_send_sack(struct sctp_tcb *stcb, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { /*- @@ -10936,9 +10881,7 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked void sctp_send_abort_tcb(struct sctp_tcb *stcb, struct mbuf *operr, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { struct mbuf *m_abort, *m, *m_last; @@ -11356,9 +11299,7 @@ sctp_send_shutdown_complete2(struct sockaddr *src, str void sctp_send_hb(struct sctp_tcb *stcb, struct sctp_nets *net, int so_locked -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ) { struct sctp_tmit_chunk *chk; Modified: stable/12/sys/netinet/sctp_output.h ============================================================================== --- stable/12/sys/netinet/sctp_output.h Sun Aug 23 23:22:55 2020 (r364596) +++ stable/12/sys/netinet/sctp_output.h Sun Aug 23 23:24:38 2020 (r364597) @@ -76,9 +76,7 @@ int void sctp_send_initiate(struct sctp_inpcb *, struct sctp_tcb *, int -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ); void @@ -148,15 +146,11 @@ sctp_output(struct sctp_inpcb *, struct mbuf *, struct void sctp_chunk_output(struct sctp_inpcb *, struct sctp_tcb *, int, int -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ); void sctp_send_abort_tcb(struct sctp_tcb *, struct mbuf *, int -#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED -#endif ); void send_forward_tsn(struct sctp_tcb *, struct sctp_association *); Modified: stable/12/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/12/sys/netinet/sctp_sysctl.c Sun Aug 23 23:22:55 2020 (r364596) +++ stable/12/sys/netinet/sctp_sysctl.c Sun Aug 23 23:24:38 2020 (r364597) @@ -130,9 +130,6 @@ sctp_init_sysctls() #if defined(SCTP_DEBUG) SCTP_BASE_SYSCTL(sctp_debug_on) = SCTPCTL_DEBUG_DEFAULT; #endif -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_BASE_SYSCTL(sctp_output_unlocked) = SCTPCTL_OUTPUT_UNLOCKED_DEFAULT; -#endif } @@ -948,9 +945,6 @@ SCTP_UINT_SYSCTL(sendall_limit, sctp_sendall_limit, SC SCTP_UINT_SYSCTL(diag_info_code, sctp_diag_info_code, SCTPCTL_DIAG_INFO_CODE) #ifdef SCTP_DEBUG SCTP_UINT_SYSCTL(debug, sctp_debug_on, SCTPCTL_DEBUG) -#endif -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) -SCTP_UINT_SYSCTL(output_unlocked, sctp_output_unlocked, SCTPCTL_OUTPUT_UNLOCKED) #endif SYSCTL_PROC(_net_inet_sctp, OID_AUTO, stats, CTLFLAG_VNET | CTLTYPE_STRUCT | CTLFLAG_RW, NULL, 0, sctp_sysctl_handle_stats, "S,sctpstat", "SCTP statistics (struct sctp_stat)"); Modified: stable/12/sys/netinet/sctp_sysctl.h ============================================================================== --- stable/12/sys/netinet/sctp_sysctl.h Sun Aug 23 23:22:55 2020 (r364596) +++ stable/12/sys/netinet/sctp_sysctl.h Sun Aug 23 23:24:38 2020 (r364597) @@ -120,9 +120,6 @@ struct sctp_sysctl { #if defined(SCTP_DEBUG) uint32_t sctp_debug_on; #endif -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - uint32_t sctp_output_unlocked; -#endif }; /* @@ -559,12 +556,6 @@ struct sctp_sysctl { #endif -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) -#define SCTPCTL_OUTPUT_UNLOCKED_DESC "Unlock socket when sending packets down to IP" -#define SCTPCTL_OUTPUT_UNLOCKED_MIN 0 -#define SCTPCTL_OUTPUT_UNLOCKED_MAX 1 -#define SCTPCTL_OUTPUT_UNLOCKED_DEFAULT SCTPCTL_OUTPUT_UNLOCKED_MIN -#endif #if defined(_KERNEL) || defined(__Userspace__) Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Sun Aug 23 23:22:55 2020 (r364596) +++ stable/12/sys/netinet/sctp_usrreq.c Sun Aug 23 23:24:38 2020 (r364597) @@ -163,9 +163,6 @@ sctp_notify(struct sctp_inpcb *inp, uint16_t ip_len, uint32_t next_mtu) { -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; -#endif int timer_stopped; if (icmp_type != ICMP_UNREACH) { @@ -195,20 +192,8 @@ sctp_notify(struct sctp_inpcb *inp, (icmp_code == ICMP_UNREACH_PORT)) { /* Treat it like an ABORT. */ sctp_abort_notification(stcb, 1, 0, NULL, SCTP_SO_NOT_LOCKED); -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(inp); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Aug 23 23:26:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2CE2C3CF608; Sun, 23 Aug 2020 23:26:01 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZWbF0N9yz3X39; Sun, 23 Aug 2020 23:26:01 +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 E3AE0F053; Sun, 23 Aug 2020 23:26:00 +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 07NNQ0bQ036988; Sun, 23 Aug 2020 23:26:00 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NNQ0S1036985; Sun, 23 Aug 2020 23:26:00 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232326.07NNQ0S1036985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 23:26:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364598 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364598 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:26:01 -0000 Author: tuexen Date: Sun Aug 23 23:26:00 2020 New Revision: 364598 URL: https://svnweb.freebsd.org/changeset/base/364598 Log: MFC r361934: Whitespace cleanups and removal of a stale comment. Modified: stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctp_sysctl.c stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 23:24:38 2020 (r364597) +++ stable/12/sys/netinet/sctp_pcb.c Sun Aug 23 23:26:00 2020 (r364598) @@ -5698,7 +5698,6 @@ sctp_startup_mcore_threads(void) i++; } } - /* Now start them all */ CPU_FOREACH(cpu) { (void)kproc_create(sctp_mcore_thread, @@ -5707,7 +5706,6 @@ sctp_startup_mcore_threads(void) RFPROC, SCTP_KTHREAD_PAGES, SCTP_MCORE_NAME); - } } #endif Modified: stable/12/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/12/sys/netinet/sctp_sysctl.c Sun Aug 23 23:24:38 2020 (r364597) +++ stable/12/sys/netinet/sctp_sysctl.c Sun Aug 23 23:26:00 2020 (r364598) @@ -451,7 +451,6 @@ sctp_sysctl_handle_assoclist(SYSCTL_HANDLER_ARGS) xstcb.primary_addr = stcb->asoc.primary_destination->ro._l_addr; xstcb.heartbeat_interval = stcb->asoc.heart_beat_delay; xstcb.state = (uint32_t)sctp_map_assoc_state(stcb->asoc.state); - /* 7.0 does not support these */ xstcb.assoc_id = sctp_get_associd(stcb); xstcb.peers_rwnd = stcb->asoc.peers_rwnd; xstcb.in_streams = stcb->asoc.streamincnt; Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 23:24:38 2020 (r364597) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 23:26:00 2020 (r364598) @@ -5553,7 +5553,6 @@ sctp_sorecvmsg(struct socket *so, sockbuf_lock = 1; restart: - restart_nosblocks: if (hold_sblock == 0) { SOCKBUF_LOCK(&so->so_rcv); From owner-svn-src-all@freebsd.org Sun Aug 23 23:39:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 239FA3CF87B; Sun, 23 Aug 2020 23:39:52 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZWvD05S7z3XhM; Sun, 23 Aug 2020 23:39: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 C105AF611; Sun, 23 Aug 2020 23:39:51 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07NNdp7j043346; Sun, 23 Aug 2020 23:39:51 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NNdpta043345; Sun, 23 Aug 2020 23:39:51 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202008232339.07NNdpta043345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 23 Aug 2020 23:39:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364599 - stable/12 X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12 X-SVN-Commit-Revision: 364599 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:39:52 -0000 Author: kevans Date: Sun Aug 23 23:39:51 2020 New Revision: 364599 URL: https://svnweb.freebsd.org/changeset/base/364599 Log: Record-only MFC of r351954, r352942 These were merged in r352273 and r353322 respectively. Modified: Directory Properties: stable/12/ (props changed) From owner-svn-src-all@freebsd.org Sun Aug 23 23:56:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B158D3A8204; Sun, 23 Aug 2020 23:56:58 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZXGy4CMjz3YfZ; Sun, 23 Aug 2020 23:56:58 +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 736F4F99B; Sun, 23 Aug 2020 23:56: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 07NNuwaP055657; Sun, 23 Aug 2020 23:56:58 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NNuwjY055655; Sun, 23 Aug 2020 23:56:58 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202008232356.07NNuwjY055655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 23 Aug 2020 23:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364600 - in head/secure/caroot: blacklisted trusted X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/secure/caroot: blacklisted trusted X-SVN-Commit-Revision: 364600 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 23 Aug 2020 23:56:58 -0000 Author: kevans Date: Sun Aug 23 23:56:57 2020 New Revision: 364600 URL: https://svnweb.freebsd.org/changeset/base/364600 Log: caroot: switch to using echo+shell glob to enumerate certs This solves an issue on stable/12 that causes certs to not get installed. ls is apparently not in PATH during installworld, so TRUSTED_CERTS ends up blank and nothing gets installed. We don't really require anything ls-specific, though, so let's just simplify it. MFC after: 3 days Modified: head/secure/caroot/blacklisted/Makefile head/secure/caroot/trusted/Makefile Modified: head/secure/caroot/blacklisted/Makefile ============================================================================== --- head/secure/caroot/blacklisted/Makefile Sun Aug 23 23:39:51 2020 (r364599) +++ head/secure/caroot/blacklisted/Makefile Sun Aug 23 23:56:57 2020 (r364600) @@ -2,7 +2,7 @@ BINDIR= /usr/share/certs/blacklisted -BLACKLISTED_CERTS!= ls ${.CURDIR}/*.pem 2> /dev/null || true +BLACKLISTED_CERTS!= echo ${.CURDIR}/*.pem 2> /dev/null || true FILES+= ${BLACKLISTED_CERTS} Modified: head/secure/caroot/trusted/Makefile ============================================================================== --- head/secure/caroot/trusted/Makefile Sun Aug 23 23:39:51 2020 (r364599) +++ head/secure/caroot/trusted/Makefile Sun Aug 23 23:56:57 2020 (r364600) @@ -2,7 +2,7 @@ BINDIR= /usr/share/certs/trusted -TRUSTED_CERTS!= ls ${.CURDIR}/*.pem 2> /dev/null || true +TRUSTED_CERTS!= echo ${.CURDIR}/*.pem 2> /dev/null || true FILES+= ${TRUSTED_CERTS} From owner-svn-src-all@freebsd.org Mon Aug 24 01:11:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D105A3A9DEA; Mon, 24 Aug 2020 01:11:29 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZYwx5D5Sz3ckV; Mon, 24 Aug 2020 01:11:29 +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 968481044A; Mon, 24 Aug 2020 01:11:29 +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 07O1BT4u001481; Mon, 24 Aug 2020 01:11:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O1BTOU001480; Mon, 24 Aug 2020 01:11:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202008240111.07O1BTOU001480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 24 Aug 2020 01:11:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364601 - stable/12/sys/cam/ctl X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cam/ctl X-SVN-Commit-Revision: 364601 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 01:11:29 -0000 Author: mav Date: Mon Aug 24 01:11:29 2020 New Revision: 364601 URL: https://svnweb.freebsd.org/changeset/base/364601 Log: MFC r364463: Fix CTL ioctl port creation error handling. Modified: stable/12/sys/cam/ctl/ctl_frontend_ioctl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- stable/12/sys/cam/ctl/ctl_frontend_ioctl.c Sun Aug 23 23:56:57 2020 (r364600) +++ stable/12/sys/cam/ctl/ctl_frontend_ioctl.c Mon Aug 24 01:11:29 2020 (r364601) @@ -226,7 +226,7 @@ cfi_ioctl_port_create(struct ctl_req *req) req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), "ctl_port_register() failed with error %d", retval); - free(port, M_CTL); + free(cfi, M_CTL); return; } @@ -247,7 +247,9 @@ cfi_ioctl_port_create(struct ctl_req *req) req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), "make_dev_s() failed with error %d", retval); - free(port, M_CTL); + ctl_port_offline(port); + ctl_port_deregister(port); + free(cfi, M_CTL); return; } From owner-svn-src-all@freebsd.org Mon Aug 24 01:51:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38BF33AA6D0; Mon, 24 Aug 2020 01:51:18 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZZpt0hrbz3fBg; Mon, 24 Aug 2020 01:51:18 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFF9410CE0; Mon, 24 Aug 2020 01:51:17 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07O1pH15025686; Mon, 24 Aug 2020 01:51:17 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O1pHrW025685; Mon, 24 Aug 2020 01:51:17 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202008240151.07O1pHrW025685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 24 Aug 2020 01:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364602 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 364602 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 01:51:18 -0000 Author: chuck Date: Mon Aug 24 01:51:17 2020 New Revision: 364602 URL: https://svnweb.freebsd.org/changeset/base/364602 Log: bhyve: NVMe set nominal health values Some operating systems believe bhyve's emulated NVMe drive is failing based on certain values in the SMART / Health Information log page being zero. Fix is to set the reported temperature and available spare values to reasonable defaults. Submitted by: wanpengqian@gmail.com Reviewed by: grehan MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24202 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Aug 24 01:11:29 2020 (r364601) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Aug 24 01:51:17 2020 (r364602) @@ -604,6 +604,11 @@ pci_nvme_init_logpages(struct pci_nvme_softc *sc) /* Set read/write remainder to round up according to spec */ sc->read_dunits_remainder = 999; sc->write_dunits_remainder = 999; + + /* Set nominal Health values checked by implementations */ + sc->health_log.temperature = 310; + sc->health_log.available_spare = 100; + sc->health_log.available_spare_threshold = 10; } static void From owner-svn-src-all@freebsd.org Mon Aug 24 01:51:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4AE953AA953; Mon, 24 Aug 2020 01:51:22 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZZpy0vwsz3dxl; Mon, 24 Aug 2020 01:51:22 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0186310C67; Mon, 24 Aug 2020 01:51:22 +0000 (UTC) (envelope-from chuck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07O1pLRV025730; Mon, 24 Aug 2020 01:51:21 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O1pLvx025729; Mon, 24 Aug 2020 01:51:21 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202008240151.07O1pLvx025729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 24 Aug 2020 01:51:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364603 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 364603 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 01:51:22 -0000 Author: chuck Date: Mon Aug 24 01:51:21 2020 New Revision: 364603 URL: https://svnweb.freebsd.org/changeset/base/364603 Log: bhyve: NVMe queue create must init head/tail The NVMe emulation code did not explicitly initialize queue head and tail pointers on queue creation. As these pointers are part of calloc()'ed memory, this only becomes a problem if the queues are deleted and then recreated. This error can manifest with messages about completions not matching a command. Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Aug 24 01:51:17 2020 (r364602) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Aug 24 01:51:21 2020 (r364603) @@ -932,6 +932,7 @@ nvme_opc_create_io_sq(struct pci_nvme_softc* sc, struc NVME_SC_MAXIMUM_QUEUE_SIZE_EXCEEDED); return (1); } + nsq->head = nsq->tail = 0; nsq->cqid = (command->cdw11 >> 16) & 0xffff; if ((nsq->cqid == 0) || (nsq->cqid > sc->num_cqueues)) { @@ -1053,6 +1054,7 @@ nvme_opc_create_io_cq(struct pci_nvme_softc* sc, struc NVME_SC_MAXIMUM_QUEUE_SIZE_EXCEEDED); return (1); } + ncq->head = ncq->tail = 0; ncq->qbase = vm_map_gpa(sc->nsc_pi->pi_vmctx, command->prp1, sizeof(struct nvme_command) * (size_t)ncq->size); From owner-svn-src-all@freebsd.org Mon Aug 24 07:42:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 663AB3B2D65; Mon, 24 Aug 2020 07:42:53 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZkcY2BrQz4GN1; Mon, 24 Aug 2020 07:42:53 +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 1660E15297; Mon, 24 Aug 2020 07:42:53 +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 07O7gr80045241; Mon, 24 Aug 2020 07:42:53 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O7gpKH045231; Mon, 24 Aug 2020 07:42:51 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240742.07O7gpKH045231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 07:42:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364605 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364605 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 07:42:53 -0000 Author: tuexen Date: Mon Aug 24 07:42:50 2020 New Revision: 364605 URL: https://svnweb.freebsd.org/changeset/base/364605 Log: MFC r362054: Non-functional changes due to upstream cleanup. Modified: stable/12/sys/netinet/sctp_asconf.c stable/12/sys/netinet/sctp_auth.c stable/12/sys/netinet/sctp_input.c stable/12/sys/netinet/sctp_output.c stable/12/sys/netinet/sctp_output.h stable/12/sys/netinet/sctp_peeloff.c stable/12/sys/netinet/sctp_timer.c stable/12/sys/netinet/sctp_usrreq.c stable/12/sys/netinet/sctputil.c stable/12/sys/netinet/sctputil.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_asconf.c ============================================================================== --- stable/12/sys/netinet/sctp_asconf.c Mon Aug 24 01:58:46 2020 (r364604) +++ stable/12/sys/netinet/sctp_asconf.c Mon Aug 24 07:42:50 2020 (r364605) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); * SCTP_DEBUG_ASCONF2: detailed info */ - /* * RFC 5061 * Modified: stable/12/sys/netinet/sctp_auth.c ============================================================================== --- stable/12/sys/netinet/sctp_auth.c Mon Aug 24 01:58:46 2020 (r364604) +++ stable/12/sys/netinet/sctp_auth.c Mon Aug 24 07:42:50 2020 (r364605) @@ -565,9 +565,7 @@ sctp_auth_key_acquire(struct sctp_tcb *stcb, uint16_t } void -sctp_auth_key_release(struct sctp_tcb *stcb, uint16_t key_id, int so_locked - SCTP_UNUSED -) +sctp_auth_key_release(struct sctp_tcb *stcb, uint16_t key_id, int so_locked) { sctp_sharedkey_t *skey; @@ -1718,9 +1716,7 @@ sctp_handle_auth(struct sctp_tcb *stcb, struct sctp_au */ void sctp_notify_authentication(struct sctp_tcb *stcb, uint32_t indication, - uint16_t keyid, uint16_t alt_keyid, int so_locked - SCTP_UNUSED -) + uint16_t keyid, uint16_t alt_keyid, int so_locked) { struct mbuf *m_notify; struct sctp_authkey_event *auth; Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Mon Aug 24 01:58:46 2020 (r364604) +++ stable/12/sys/netinet/sctp_input.c Mon Aug 24 07:42:50 2020 (r364605) @@ -55,8 +55,6 @@ __FBSDID("$FreeBSD$"); #endif #include - - static void sctp_stop_all_cookie_timers(struct sctp_tcb *stcb) { @@ -213,9 +211,7 @@ outnow: */ int -sctp_is_there_unsent_data(struct sctp_tcb *stcb, int so_locked - SCTP_UNUSED -) +sctp_is_there_unsent_data(struct sctp_tcb *stcb, int so_locked) { int unsent_data; unsigned int i; Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Mon Aug 24 01:58:46 2020 (r364604) +++ stable/12/sys/netinet/sctp_output.c Mon Aug 24 07:42:50 2020 (r364605) @@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$"); #include - #define SCTP_MAX_GAPS_INARRAY 4 struct sack_track { uint8_t right_edge; /* mergable on the right edge */ @@ -3990,8 +3989,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, uint16_t port, union sctp_sockstore *over_addr, uint8_t mflowtype, uint32_t mflowid, - int so_locked SCTP_UNUSED -) + int so_locked) { /* nofragment_flag to tell if IP_DF should be set (IPv4 only) */ /** @@ -4642,9 +4640,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, void -sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked - SCTP_UNUSED -) +sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked) { struct mbuf *m, *m_last; struct sctp_nets *net; @@ -6578,9 +6574,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, int *num_out, int *reason_code, int control_only, int from_where, - struct timeval *now, int *now_filled, int frag_point, int so_locked - SCTP_UNUSED -); + struct timeval *now, int *now_filled, int frag_point, int so_locked); static void sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, @@ -7040,9 +7034,7 @@ all_done: } static void -sctp_clean_up_ctl(struct sctp_tcb *stcb, struct sctp_association *asoc, int so_locked - SCTP_UNUSED -) +sctp_clean_up_ctl(struct sctp_tcb *stcb, struct sctp_association *asoc, int so_locked) { struct sctp_tmit_chunk *chk, *nchk; @@ -7147,9 +7139,7 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb, int *giveup, int eeor_mode, int *bail, - int so_locked - SCTP_UNUSED -) + int so_locked) { /* Move from the stream to the send_queue keeping track of the total */ struct sctp_association *asoc; @@ -7676,9 +7666,7 @@ out_of: static void sctp_fill_outqueue(struct sctp_tcb *stcb, - struct sctp_nets *net, int frag_point, int eeor_mode, int *quit_now, int so_locked - SCTP_UNUSED -) + struct sctp_nets *net, int frag_point, int eeor_mode, int *quit_now, int so_locked) { struct sctp_association *asoc; struct sctp_stream_out *strq; @@ -7797,9 +7785,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, int *num_out, int *reason_code, int control_only, int from_where, - struct timeval *now, int *now_filled, int frag_point, int so_locked - SCTP_UNUSED -) + struct timeval *now, int *now_filled, int frag_point, int so_locked) { /** * Ok this is the generic chunk service queue. we must do the @@ -9414,9 +9400,7 @@ static int sctp_chunk_retransmission(struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_association *asoc, - int *cnt_out, struct timeval *now, int *now_filled, int *fr_done, int so_locked - SCTP_UNUSED -) + int *cnt_out, struct timeval *now, int *now_filled, int *fr_done, int so_locked) { /*- * send out one MTU of retransmission. If fast_retransmit is @@ -9965,9 +9949,7 @@ void sctp_chunk_output(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_where, - int so_locked - SCTP_UNUSED -) + int so_locked) { /*- * Ok this is the generic chunk service queue. we must do the @@ -10484,9 +10466,7 @@ sctp_fill_in_rest: } void -sctp_send_sack(struct sctp_tcb *stcb, int so_locked - SCTP_UNUSED -) +sctp_send_sack(struct sctp_tcb *stcb, int so_locked) { /*- * Queue up a SACK or NR-SACK in the control queue. @@ -10880,9 +10860,7 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked } void -sctp_send_abort_tcb(struct sctp_tcb *stcb, struct mbuf *operr, int so_locked - SCTP_UNUSED -) +sctp_send_abort_tcb(struct sctp_tcb *stcb, struct mbuf *operr, int so_locked) { struct mbuf *m_abort, *m, *m_last; struct mbuf *m_out, *m_end = NULL; @@ -11298,9 +11276,7 @@ sctp_send_shutdown_complete2(struct sockaddr *src, str } void -sctp_send_hb(struct sctp_tcb *stcb, struct sctp_nets *net, int so_locked - SCTP_UNUSED -) +sctp_send_hb(struct sctp_tcb *stcb, struct sctp_nets *net, int so_locked) { struct sctp_tmit_chunk *chk; struct sctp_heartbeat_chunk *hb; Modified: stable/12/sys/netinet/sctp_output.h ============================================================================== --- stable/12/sys/netinet/sctp_output.h Mon Aug 24 01:58:46 2020 (r364604) +++ stable/12/sys/netinet/sctp_output.h Mon Aug 24 07:42:50 2020 (r364605) @@ -74,10 +74,7 @@ int int sctp_v4src_match_nexthop(struct sctp_ifa *sifa, sctp_route_t *ro); -void -sctp_send_initiate(struct sctp_inpcb *, struct sctp_tcb *, int - SCTP_UNUSED -); +void sctp_send_initiate(struct sctp_inpcb *, struct sctp_tcb *, int); void sctp_send_initiate_ack(struct sctp_inpcb *, struct sctp_tcb *, @@ -144,15 +141,10 @@ int sctp_output(struct sctp_inpcb *, struct mbuf *, struct sockaddr *, struct mbuf *, struct thread *, int); -void -sctp_chunk_output(struct sctp_inpcb *, struct sctp_tcb *, int, int - SCTP_UNUSED -); -void -sctp_send_abort_tcb(struct sctp_tcb *, struct mbuf *, int - SCTP_UNUSED -); +void sctp_chunk_output(struct sctp_inpcb *, struct sctp_tcb *, int, int); +void sctp_send_abort_tcb(struct sctp_tcb *, struct mbuf *, int); + void send_forward_tsn(struct sctp_tcb *, struct sctp_association *); void sctp_send_sack(struct sctp_tcb *, int); @@ -160,7 +152,6 @@ void sctp_send_sack(struct sctp_tcb *, int); void sctp_send_hb(struct sctp_tcb *, struct sctp_nets *, int); void sctp_send_ecn_echo(struct sctp_tcb *, struct sctp_nets *, uint32_t); - void sctp_send_packet_dropped(struct sctp_tcb *, struct sctp_nets *, struct mbuf *, Modified: stable/12/sys/netinet/sctp_peeloff.c ============================================================================== --- stable/12/sys/netinet/sctp_peeloff.c Mon Aug 24 01:58:46 2020 (r364604) +++ stable/12/sys/netinet/sctp_peeloff.c Mon Aug 24 07:42:50 2020 (r364605) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include - int sctp_can_peel_off(struct socket *head, sctp_assoc_t assoc_id) { Modified: stable/12/sys/netinet/sctp_timer.c ============================================================================== --- stable/12/sys/netinet/sctp_timer.c Mon Aug 24 01:58:46 2020 (r364604) +++ stable/12/sys/netinet/sctp_timer.c Mon Aug 24 07:42:50 2020 (r364605) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #endif - void sctp_audit_retranmission_queue(struct sctp_association *asoc) { Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Mon Aug 24 01:58:46 2020 (r364604) +++ stable/12/sys/netinet/sctp_usrreq.c Mon Aug 24 07:42:50 2020 (r364605) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include - extern const struct sctp_cc_functions sctp_cc_functions[]; extern const struct sctp_ss_functions sctp_ss_functions[]; Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Mon Aug 24 01:58:46 2020 (r364604) +++ stable/12/sys/netinet/sctputil.c Mon Aug 24 07:42:50 2020 (r364605) @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include #endif - #ifndef KTR_SCTP #define KTR_SCTP KTR_SUBSYS #endif @@ -3112,9 +3111,7 @@ sctp_pad_lastmbuf(struct mbuf *m, int padval, struct m static void sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, - uint16_t error, struct sctp_abort_chunk *abort, uint8_t from_peer, int so_locked - SCTP_UNUSED -) + uint16_t error, struct sctp_abort_chunk *abort, uint8_t from_peer, int so_locked) { struct mbuf *m_notify; struct sctp_assoc_change *sac; @@ -3249,9 +3246,7 @@ set_error: static void sctp_notify_peer_addr_change(struct sctp_tcb *stcb, uint32_t state, - struct sockaddr *sa, uint32_t error, int so_locked - SCTP_UNUSED -) + struct sockaddr *sa, uint32_t error, int so_locked) { struct mbuf *m_notify; struct sctp_paddr_change *spc; @@ -3340,9 +3335,7 @@ sctp_notify_peer_addr_change(struct sctp_tcb *stcb, ui static void sctp_notify_send_failed(struct sctp_tcb *stcb, uint8_t sent, uint32_t error, - struct sctp_tmit_chunk *chk, int so_locked - SCTP_UNUSED -) + struct sctp_tmit_chunk *chk, int so_locked) { struct mbuf *m_notify; struct sctp_send_failed *ssf; @@ -3474,9 +3467,7 @@ sctp_notify_send_failed(struct sctp_tcb *stcb, uint8_t static void sctp_notify_send_failed2(struct sctp_tcb *stcb, uint32_t error, - struct sctp_stream_queue_pending *sp, int so_locked - SCTP_UNUSED -) + struct sctp_stream_queue_pending *sp, int so_locked) { struct mbuf *m_notify; struct sctp_send_failed *ssf; @@ -3622,9 +3613,7 @@ sctp_notify_adaptation_layer(struct sctp_tcb *stcb) /* This always must be called with the read-queue LOCKED in the INP */ static void sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, - uint32_t val, int so_locked - SCTP_UNUSED -) + uint32_t val, int so_locked) { struct mbuf *m_notify; struct sctp_pdapi_event *pdapi; @@ -3745,9 +3734,7 @@ sctp_notify_shutdown_event(struct sctp_tcb *stcb) static void sctp_notify_sender_dry_event(struct sctp_tcb *stcb, - int so_locked - SCTP_UNUSED -) + int so_locked) { struct mbuf *m_notify; struct sctp_sender_dry_event *event; @@ -4034,9 +4021,7 @@ sctp_notify_remote_error(struct sctp_tcb *stcb, uint16 void sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, - uint32_t error, void *data, int so_locked - SCTP_UNUSED -) + uint32_t error, void *data, int so_locked) { if ((stcb == NULL) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || @@ -4211,9 +4196,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb } void -sctp_report_all_outbound(struct sctp_tcb *stcb, uint16_t error, int holds_lock, int so_locked - SCTP_UNUSED -) +sctp_report_all_outbound(struct sctp_tcb *stcb, uint16_t error, int holds_lock, int so_locked) { struct sctp_association *asoc; struct sctp_stream_out *outs; @@ -4322,9 +4305,7 @@ sctp_report_all_outbound(struct sctp_tcb *stcb, uint16 void sctp_abort_notification(struct sctp_tcb *stcb, uint8_t from_peer, uint16_t error, - struct sctp_abort_chunk *abort, int so_locked - SCTP_UNUSED -) + struct sctp_abort_chunk *abort, int so_locked) { if (stcb == NULL) { return; @@ -4446,9 +4427,7 @@ none_in: void sctp_abort_an_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct mbuf *op_err, - int so_locked - SCTP_UNUSED -) + int so_locked) { if (stcb == NULL) { @@ -4826,9 +4805,7 @@ sctp_add_to_readq(struct sctp_inpcb *inp, struct sockbuf *sb, int end, int inp_read_lock_held, - int so_locked - SCTP_UNUSED -) + int so_locked) { /* * Here we must place the control on the end of the socket read @@ -5006,9 +4983,7 @@ sctp_free_bufspace(struct sctp_tcb *stcb, struct sctp_ int sctp_release_pr_sctp_chunk(struct sctp_tcb *stcb, struct sctp_tmit_chunk *tp1, - uint8_t sent, int so_locked - SCTP_UNUSED -) + uint8_t sent, int so_locked) { struct sctp_stream_out *strq; struct sctp_tmit_chunk *chk = NULL, *tp2; Modified: stable/12/sys/netinet/sctputil.h ============================================================================== --- stable/12/sys/netinet/sctputil.h Mon Aug 24 01:58:46 2020 (r364604) +++ stable/12/sys/netinet/sctputil.h Mon Aug 24 07:42:50 2020 (r364605) @@ -117,9 +117,7 @@ sctp_add_to_readq(struct sctp_inpcb *inp, struct sockbuf *sb, int end, int inpread_locked, - int so_locked - SCTP_UNUSED -); + int so_locked); void sctp_iterator_worker(void); @@ -145,10 +143,7 @@ struct mbuf *sctp_add_pad_tombuf(struct mbuf *, int); struct mbuf *sctp_pad_lastmbuf(struct mbuf *, int, struct mbuf *); -void -sctp_ulp_notify(uint32_t, struct sctp_tcb *, uint32_t, void *, int - SCTP_UNUSED -); +void sctp_ulp_notify(uint32_t, struct sctp_tcb *, uint32_t, void *, int); void sctp_pull_off_control_to_new_inp(struct sctp_inpcb *old_inp, @@ -161,18 +156,13 @@ void sctp_stop_timers_for_shutdown(struct sctp_tcb *); /* Stop all timers for association and remote addresses. */ void sctp_stop_association_timers(struct sctp_tcb *, bool); -void -sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int, int - SCTP_UNUSED -); +void sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int, int); int sctp_expand_mapping_array(struct sctp_association *, uint32_t); void sctp_abort_notification(struct sctp_tcb *, uint8_t, uint16_t, - struct sctp_abort_chunk *, int - SCTP_UNUSED -); + struct sctp_abort_chunk *, int); /* We abort responding to an IP packet for some reason */ void @@ -186,9 +176,7 @@ sctp_abort_association(struct sctp_inpcb *, struct sct /* We choose to abort via user input */ void sctp_abort_an_association(struct sctp_inpcb *, struct sctp_tcb *, - struct mbuf *, int - SCTP_UNUSED -); + struct mbuf *, int); void sctp_handle_ootb(struct mbuf *, int, int, @@ -234,9 +222,7 @@ void sctp_print_address(struct sockaddr *); int sctp_release_pr_sctp_chunk(struct sctp_tcb *, struct sctp_tmit_chunk *, - uint8_t, int - SCTP_UNUSED -); + uint8_t, int); struct mbuf *sctp_generate_cause(uint16_t, char *); struct mbuf *sctp_generate_no_user_data_cause(uint32_t); From owner-svn-src-all@freebsd.org Mon Aug 24 07:53:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 55CAD3B316F; Mon, 24 Aug 2020 07:53:15 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZkrW1K9Dz4HJ7; Mon, 24 Aug 2020 07:53:15 +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 11C5814AFD; Mon, 24 Aug 2020 07:53:15 +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 07O7rEXN051840; Mon, 24 Aug 2020 07:53:14 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O7rEYD051839; Mon, 24 Aug 2020 07:53:14 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240753.07O7rEYD051839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 07:53:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364606 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364606 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 07:53:15 -0000 Author: tuexen Date: Mon Aug 24 07:53:14 2020 New Revision: 364606 URL: https://svnweb.freebsd.org/changeset/base/364606 Log: MFC r362090: Small cleanup due to upstream ifdef cleanups. Modified: stable/12/sys/netinet/sctputil.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.h ============================================================================== --- stable/12/sys/netinet/sctputil.h Mon Aug 24 07:42:50 2020 (r364605) +++ stable/12/sys/netinet/sctputil.h Mon Aug 24 07:53:14 2020 (r364606) @@ -55,7 +55,7 @@ void sctp_m_freem(struct mbuf *m); #define sctp_m_freem m_freem #endif -#if defined(SCTP_LOCAL_TRACE_BUF) || defined(__APPLE__) +#if defined(SCTP_LOCAL_TRACE_BUF) void sctp_log_trace(uint32_t fr, const char *str SCTP_UNUSED, uint32_t a, uint32_t b, uint32_t c, uint32_t d, uint32_t e, uint32_t f); #endif From owner-svn-src-all@freebsd.org Mon Aug 24 07:55:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3AE163B3B19; Mon, 24 Aug 2020 07:55:48 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZkvS0rhjz4HV3; Mon, 24 Aug 2020 07:55:48 +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 DA3E01542A; Mon, 24 Aug 2020 07:55:47 +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 07O7tlO5052044; Mon, 24 Aug 2020 07:55:47 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O7tkcw052038; Mon, 24 Aug 2020 07:55:46 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240755.07O7tkcw052038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 07:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364607 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364607 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 07:55:48 -0000 Author: tuexen Date: Mon Aug 24 07:55:46 2020 New Revision: 364607 URL: https://svnweb.freebsd.org/changeset/base/364607 Log: MFC r362106: More cleanups due to ifdef cleanup done upstream. Modified: stable/12/sys/netinet/sctp_constants.h stable/12/sys/netinet/sctp_input.c stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctp_pcb.h stable/12/sys/netinet/sctp_structs.h stable/12/sys/netinet/sctp_uio.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_constants.h ============================================================================== --- stable/12/sys/netinet/sctp_constants.h Mon Aug 24 07:53:14 2020 (r364606) +++ stable/12/sys/netinet/sctp_constants.h Mon Aug 24 07:55:46 2020 (r364607) @@ -1012,7 +1012,7 @@ do { \ do { \ if (inp->sctp_flags & SCTP_PCB_FLAGS_DONT_WAKE) { \ inp->sctp_flags |= SCTP_PCB_FLAGS_WAKEINPUT; \ - SOCKBUF_UNLOCK(&((so)->so_rcv)); \ + SOCKBUF_UNLOCK(&((so)->so_rcv)); \ } else { \ sorwakeup_locked(so); \ } \ Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Mon Aug 24 07:53:14 2020 (r364606) +++ stable/12/sys/netinet/sctp_input.c Mon Aug 24 07:55:46 2020 (r364607) @@ -5723,7 +5723,7 @@ out: return; } -#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) +#if defined(SCTP_MCORE_INPUT) && defined(SMP) extern int *sctp_cpuarry; #endif @@ -5735,7 +5735,7 @@ sctp_input(struct mbuf **mp, int *offp, int proto SCTP m = *mp; off = *offp; -#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) +#if defined(SCTP_MCORE_INPUT) && defined(SMP) if (mp_ncpus > 1) { struct ip *ip; struct sctphdr *sh; Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 07:53:14 2020 (r364606) +++ stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 07:55:46 2020 (r364607) @@ -5548,18 +5548,14 @@ sctp_del_local_addr_restricted(struct sctp_tcb *stcb, return; } -/* - * Temporarily remove for __APPLE__ until we use the Tiger equivalents - */ /* sysctl */ static int sctp_max_number_of_assoc = SCTP_MAX_NUM_OF_ASOC; static int sctp_scale_up_for_address = SCTP_SCALE_FOR_ADDR; - - -#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) +#if defined(SCTP_MCORE_INPUT) && defined(SMP) struct sctp_mcore_ctrl *sctp_mcore_workers = NULL; int *sctp_cpuarry = NULL; + void sctp_queue_to_mcore(struct mbuf *m, int off, int cpu_to_use) { @@ -5729,13 +5725,13 @@ sctp_pcb_init(void) #if defined(SCTP_LOCAL_TRACE_BUF) memset(&SCTP_BASE_SYSCTL(sctp_log), 0, sizeof(struct sctp_log)); #endif -#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT) SCTP_MALLOC(SCTP_BASE_STATS, struct sctpstat *, ((mp_maxid + 1) * sizeof(struct sctpstat)), SCTP_M_MCORE); #endif (void)SCTP_GETTIME_TIMEVAL(&tv); -#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT) memset(SCTP_BASE_STATS, 0, sizeof(struct sctpstat) * (mp_maxid + 1)); SCTP_BASE_STATS[PCPU_GET(cpuid)].sctps_discontinuitytime.tv_sec = (uint32_t)tv.tv_sec; SCTP_BASE_STATS[PCPU_GET(cpuid)].sctps_discontinuitytime.tv_usec = (uint32_t)tv.tv_usec; @@ -5846,7 +5842,7 @@ sctp_pcb_init(void) } sctp_startup_iterator(); -#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) +#if defined(SCTP_MCORE_INPUT) && defined(SMP) sctp_startup_mcore_threads(); #endif @@ -6001,7 +5997,7 @@ retry: SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_strmoq)); SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_asconf)); SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_asconf_ack)); -#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT) SCTP_FREE(SCTP_BASE_STATS, SCTP_M_MCORE); #endif } Modified: stable/12/sys/netinet/sctp_pcb.h ============================================================================== --- stable/12/sys/netinet/sctp_pcb.h Mon Aug 24 07:53:14 2020 (r364606) +++ stable/12/sys/netinet/sctp_pcb.h Mon Aug 24 07:55:46 2020 (r364607) @@ -246,7 +246,7 @@ struct sctp_base_info { * All static structures that anchor the system must be here. */ struct sctp_epinfo sctppcbinfo; -#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT) struct sctpstat *sctpstat; #else struct sctpstat sctpstat; @@ -478,7 +478,6 @@ struct sctp_tcb { #include -/* TODO where to put non-_KERNEL things for __Userspace__? */ #if defined(_KERNEL) || defined(__Userspace__) /* Attention Julian, this is the extern that @@ -646,7 +645,7 @@ sctp_initiate_iterator(inp_func inpf, end_func ef, struct sctp_inpcb *, uint8_t co_off); -#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) +#if defined(SCTP_MCORE_INPUT) && defined(SMP) void sctp_queue_to_mcore(struct mbuf *m, int off, int cpu_to_use); Modified: stable/12/sys/netinet/sctp_structs.h ============================================================================== --- stable/12/sys/netinet/sctp_structs.h Mon Aug 24 07:53:14 2020 (r364606) +++ stable/12/sys/netinet/sctp_structs.h Mon Aug 24 07:55:46 2020 (r364607) @@ -109,7 +109,7 @@ typedef void (*asoc_func) (struct sctp_inpcb *, struct typedef int (*inp_func) (struct sctp_inpcb *, void *ptr, uint32_t val); typedef void (*end_func) (void *ptr, uint32_t val); -#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) +#if defined(SCTP_MCORE_INPUT) && defined(SMP) /* whats on the mcore control struct */ struct sctp_mcore_queue { TAILQ_ENTRY(sctp_mcore_queue) next; @@ -129,10 +129,7 @@ struct sctp_mcore_ctrl { int running; int cpuid; }; - - #endif - struct sctp_iterator { TAILQ_ENTRY(sctp_iterator) sctp_nxt_itr; Modified: stable/12/sys/netinet/sctp_uio.h ============================================================================== --- stable/12/sys/netinet/sctp_uio.h Mon Aug 24 07:53:14 2020 (r364606) +++ stable/12/sys/netinet/sctp_uio.h Mon Aug 24 07:55:46 2020 (r364607) @@ -1128,7 +1128,7 @@ struct sctpstat { #define SCTP_STAT_INCR(_x) SCTP_STAT_INCR_BY(_x,1) #define SCTP_STAT_DECR(_x) SCTP_STAT_DECR_BY(_x,1) -#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT) #define SCTP_STAT_INCR_BY(_x,_d) (SCTP_BASE_STATS[PCPU_GET(cpuid)]._x += _d) #define SCTP_STAT_DECR_BY(_x,_d) (SCTP_BASE_STATS[PCPU_GET(cpuid)]._x -= _d) #else From owner-svn-src-all@freebsd.org Mon Aug 24 07:57:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F5193B3B39; Mon, 24 Aug 2020 07:57:30 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZkxQ2Njcz4Hpr; Mon, 24 Aug 2020 07:57:30 +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 362B5154BB; Mon, 24 Aug 2020 07:57:30 +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 07O7vT7q052172; Mon, 24 Aug 2020 07:57:29 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O7vTDP052171; Mon, 24 Aug 2020 07:57:29 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240757.07O7vTDP052171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 07:57:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364608 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364608 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 07:57:30 -0000 Author: tuexen Date: Mon Aug 24 07:57:29 2020 New Revision: 364608 URL: https://svnweb.freebsd.org/changeset/base/364608 Log: MFC r362107: Whitespace change due to upstream cleanup. Modified: stable/12/sys/netinet/sctp_constants.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_constants.h ============================================================================== --- stable/12/sys/netinet/sctp_constants.h Mon Aug 24 07:55:46 2020 (r364607) +++ stable/12/sys/netinet/sctp_constants.h Mon Aug 24 07:57:29 2020 (r364608) @@ -992,7 +992,7 @@ do { \ #define sctp_sowwakeup_locked(inp, so) \ do { \ if (inp->sctp_flags & SCTP_PCB_FLAGS_DONT_WAKE) { \ - SOCKBUF_UNLOCK(&((so)->so_snd)); \ + SOCKBUF_UNLOCK(&((so)->so_snd)); \ inp->sctp_flags |= SCTP_PCB_FLAGS_WAKEOUTPUT; \ } else { \ sowwakeup_locked(so); \ From owner-svn-src-all@freebsd.org Mon Aug 24 07:59:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49D723B3C68; Mon, 24 Aug 2020 07:59:00 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZkz80zX9z4Hrc; Mon, 24 Aug 2020 07:59:00 +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 051BA1542F; Mon, 24 Aug 2020 07:59:00 +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 07O7wxAO052290; Mon, 24 Aug 2020 07:58:59 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O7wxxA052289; Mon, 24 Aug 2020 07:58:59 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240758.07O7wxxA052289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 07:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364609 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364609 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 07:59:00 -0000 Author: tuexen Date: Mon Aug 24 07:58:59 2020 New Revision: 364609 URL: https://svnweb.freebsd.org/changeset/base/364609 Log: MFC r362153: Simpify a condition, no functional change. Modified: stable/12/sys/netinet/sctp_input.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Mon Aug 24 07:57:29 2020 (r364608) +++ stable/12/sys/netinet/sctp_input.c Mon Aug 24 07:58:59 2020 (r364609) @@ -5594,9 +5594,8 @@ trigger_send: if (!TAILQ_EMPTY(&stcb->asoc.asconf_send_queue) || cnt_ctrl_ready || stcb->asoc.trigger_reset || - ((un_sent) && - (stcb->asoc.peers_rwnd > 0 || - (stcb->asoc.peers_rwnd <= 0 && stcb->asoc.total_flight == 0)))) { + ((un_sent > 0) && + (stcb->asoc.peers_rwnd > 0 || stcb->asoc.total_flight == 0))) { SCTPDBG(SCTP_DEBUG_INPUT3, "Calling chunk OUTPUT\n"); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_CONTROL_PROC, SCTP_SO_NOT_LOCKED); SCTPDBG(SCTP_DEBUG_INPUT3, "chunk OUTPUT returns\n"); From owner-svn-src-all@freebsd.org Mon Aug 24 08:01:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B9573B3FDC; Mon, 24 Aug 2020 08:01:10 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZl1f2kPJz4JJl; Mon, 24 Aug 2020 08:01:10 +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 40EC515443; Mon, 24 Aug 2020 08:01:10 +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 07O81AUB053252; Mon, 24 Aug 2020 08:01:10 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8196R053250; Mon, 24 Aug 2020 08:01:09 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240801.07O8196R053250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364610 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364610 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:01:10 -0000 Author: tuexen Date: Mon Aug 24 08:01:09 2020 New Revision: 364610 URL: https://svnweb.freebsd.org/changeset/base/364610 Log: MFC r362155: Remove usage of empty macro. Modified: stable/12/sys/netinet/sctp_os_bsd.h stable/12/sys/netinet/sctp_pcb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/12/sys/netinet/sctp_os_bsd.h Mon Aug 24 07:58:59 2020 (r364609) +++ stable/12/sys/netinet/sctp_os_bsd.h Mon Aug 24 08:01:09 2020 (r364610) @@ -315,11 +315,6 @@ typedef struct callout sctp_os_timer_t; rt->rt_mtu = mtu; \ } while(0) -/* (de-)register interface event notifications */ -#define SCTP_REGISTER_INTERFACE(ifhandle, af) -#define SCTP_DEREGISTER_INTERFACE(ifhandle, af) - - /*************************/ /* These are for logging */ /*************************/ Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 07:58:59 2020 (r364609) +++ stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 08:01:09 2020 (r364610) @@ -299,8 +299,6 @@ sctp_delete_ifn(struct sctp_ifn *sctp_ifnp, int hold_a SCTP_IPI_ADDR_WLOCK(); LIST_REMOVE(sctp_ifnp, next_bucket); LIST_REMOVE(sctp_ifnp, next_ifn); - SCTP_DEREGISTER_INTERFACE(sctp_ifnp->ifn_index, - sctp_ifnp->registered_af); if (hold_addr_lock == 0) SCTP_IPI_ADDR_WUNLOCK(); /* Take away the reference, and possibly free it */ @@ -428,7 +426,6 @@ sctp_add_ifa_to_ifn(struct sctp_ifn *sctp_ifnp, struct } if (sctp_ifnp->ifa_count == 1) { /* register the new interface */ - SCTP_REGISTER_INTERFACE(sctp_ifnp->ifn_index, ifa_af); sctp_ifnp->registered_af = ifa_af; } } @@ -469,13 +466,9 @@ sctp_remove_ifa_from_ifn(struct sctp_ifa *sctp_ifap) /* re-register address family type, if needed */ if ((sctp_ifap->ifn_p->num_v6 == 0) && (sctp_ifap->ifn_p->registered_af == AF_INET6)) { - SCTP_DEREGISTER_INTERFACE(sctp_ifap->ifn_p->ifn_index, AF_INET6); - SCTP_REGISTER_INTERFACE(sctp_ifap->ifn_p->ifn_index, AF_INET); sctp_ifap->ifn_p->registered_af = AF_INET; } else if ((sctp_ifap->ifn_p->num_v4 == 0) && (sctp_ifap->ifn_p->registered_af == AF_INET)) { - SCTP_DEREGISTER_INTERFACE(sctp_ifap->ifn_p->ifn_index, AF_INET); - SCTP_REGISTER_INTERFACE(sctp_ifap->ifn_p->ifn_index, AF_INET6); sctp_ifap->ifn_p->registered_af = AF_INET6; } /* free the ifn refcount */ @@ -676,7 +669,6 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 vrf->total_ifa_count++; atomic_add_int(&SCTP_BASE_INFO(ipi_count_ifas), 1); if (new_ifn_af) { - SCTP_REGISTER_INTERFACE(ifn_index, new_ifn_af); sctp_ifnp->registered_af = new_ifn_af; } SCTP_IPI_ADDR_WUNLOCK(); From owner-svn-src-all@freebsd.org Mon Aug 24 08:08:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0948E3B45E4; Mon, 24 Aug 2020 08:08:14 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZl9n6Z9Rz4Jm9; Mon, 24 Aug 2020 08:08:13 +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 C5936153F3; Mon, 24 Aug 2020 08:08:13 +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 07O88Dri058502; Mon, 24 Aug 2020 08:08:13 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O88CdV058498; Mon, 24 Aug 2020 08:08:12 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240808.07O88CdV058498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364611 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364611 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:08:14 -0000 Author: tuexen Date: Mon Aug 24 08:08:12 2020 New Revision: 364611 URL: https://svnweb.freebsd.org/changeset/base/364611 Log: MFC r362173: Cleanups, no functional change. Modified: stable/12/sys/netinet/sctp_indata.c stable/12/sys/netinet/sctp_output.c stable/12/sys/netinet/sctp_ss_functions.c stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_indata.c ============================================================================== --- stable/12/sys/netinet/sctp_indata.c Mon Aug 24 08:01:09 2020 (r364610) +++ stable/12/sys/netinet/sctp_indata.c Mon Aug 24 08:08:12 2020 (r364611) @@ -66,7 +66,7 @@ sctp_add_chk_to_control(struct sctp_queued_to_read *co struct sctp_stream_in *strm, struct sctp_tcb *stcb, struct sctp_association *asoc, - struct sctp_tmit_chunk *chk, int lock_held); + struct sctp_tmit_chunk *chk, int hold_rlock); void Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Mon Aug 24 08:01:09 2020 (r364610) +++ stable/12/sys/netinet/sctp_output.c Mon Aug 24 08:08:12 2020 (r364611) @@ -5124,7 +5124,6 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_ } } return (op_err); - break; } default: /* Modified: stable/12/sys/netinet/sctp_ss_functions.c ============================================================================== --- stable/12/sys/netinet/sctp_ss_functions.c Mon Aug 24 08:01:09 2020 (r364610) +++ stable/12/sys/netinet/sctp_ss_functions.c Mon Aug 24 08:08:12 2020 (r364611) @@ -767,8 +767,8 @@ sctp_ss_fb_scheduled(struct sctp_tcb *stcb, struct sct */ static void sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc, - struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp, - int holds_lock); + struct sctp_stream_out *strq SCTP_UNUSED, + struct sctp_stream_queue_pending *sp, int holds_lock); static void sctp_ss_fcfs_init(struct sctp_tcb *stcb, struct sctp_association *asoc, Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Mon Aug 24 08:01:09 2020 (r364610) +++ stable/12/sys/netinet/sctputil.c Mon Aug 24 08:08:12 2020 (r364611) @@ -5221,10 +5221,6 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct soc if (((struct sockaddr_in *)addr)->sin_addr.s_addr == laddr->ifa->address.sin.sin_addr.s_addr) { /* found him. */ - if (holds_lock == 0) { - SCTP_INP_RUNLOCK(inp); - } - return (laddr->ifa); break; } } @@ -5234,10 +5230,6 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct soc if (SCTP6_ARE_ADDR_EQUAL((struct sockaddr_in6 *)addr, &laddr->ifa->address.sin6)) { /* found him. */ - if (holds_lock == 0) { - SCTP_INP_RUNLOCK(inp); - } - return (laddr->ifa); break; } } @@ -5246,7 +5238,7 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct soc if (holds_lock == 0) { SCTP_INP_RUNLOCK(inp); } - return (NULL); + return (laddr->ifa); } uint32_t @@ -5323,9 +5315,6 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t if (((struct sockaddr_in *)addr)->sin_addr.s_addr == sctp_ifap->address.sin.sin_addr.s_addr) { /* found him. */ - if (holds_lock == 0) - SCTP_IPI_ADDR_RUNLOCK(); - return (sctp_ifap); break; } } @@ -5335,9 +5324,6 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t if (SCTP6_ARE_ADDR_EQUAL((struct sockaddr_in6 *)addr, &sctp_ifap->address.sin6)) { /* found him. */ - if (holds_lock == 0) - SCTP_IPI_ADDR_RUNLOCK(); - return (sctp_ifap); break; } } @@ -5345,7 +5331,7 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t } if (holds_lock == 0) SCTP_IPI_ADDR_RUNLOCK(); - return (NULL); + return (sctp_ifap); } static void @@ -6918,7 +6904,7 @@ sctp_local_addr_count(struct sctp_tcb *stcb) #if defined(INET) int ipv4_local_scope, ipv4_addr_legal; #endif -#if defined (INET6) +#if defined(INET6) int local_scope, site_scope, ipv6_addr_legal; #endif struct sctp_vrf *vrf; From owner-svn-src-all@freebsd.org Mon Aug 24 08:10:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F59F3B4630; Mon, 24 Aug 2020 08:10:28 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlDN1NVxz4JxS; Mon, 24 Aug 2020 08:10:28 +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 12D4A15544; Mon, 24 Aug 2020 08:10:28 +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 07O8AR1x058688; Mon, 24 Aug 2020 08:10:27 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8ARR2058687; Mon, 24 Aug 2020 08:10:27 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240810.07O8ARR2058687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:10:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364612 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364612 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:10:28 -0000 Author: tuexen Date: Mon Aug 24 08:10:27 2020 New Revision: 364612 URL: https://svnweb.freebsd.org/changeset/base/364612 Log: MFC r362178: Allocate the mbuf for the signature in the COOKIE or the correct size. While there, do also do some cleanups. Modified: stable/12/sys/netinet/sctp_output.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Mon Aug 24 08:08:12 2020 (r364611) +++ stable/12/sys/netinet/sctp_output.c Mon Aug 24 08:10:27 2020 (r364612) @@ -3831,8 +3831,6 @@ sctp_add_cookie(struct mbuf *init, int init_offset, struct mbuf *copy_init, *copy_initack, *m_at, *sig, *mret; struct sctp_state_cookie *stc; struct sctp_paramhdr *ph; - uint8_t *foo; - int sig_offset; uint16_t cookie_sz; mret = sctp_get_mbuf_for_msg((sizeof(struct sctp_state_cookie) + @@ -3896,24 +3894,20 @@ sctp_add_cookie(struct mbuf *init, int init_offset, break; } } - sig = sctp_get_mbuf_for_msg(SCTP_SECRET_SIZE, 0, M_NOWAIT, 1, MT_DATA); + sig = sctp_get_mbuf_for_msg(SCTP_SIGNATURE_SIZE, 0, M_NOWAIT, 1, MT_DATA); if (sig == NULL) { /* no space, so free the entire chain */ sctp_m_freem(mret); return (NULL); } - SCTP_BUF_LEN(sig) = 0; SCTP_BUF_NEXT(m_at) = sig; - sig_offset = 0; - foo = (uint8_t *)(mtod(sig, caddr_t)+sig_offset); - memset(foo, 0, SCTP_SIGNATURE_SIZE); - *signature = foo; - SCTP_BUF_LEN(sig) += SCTP_SIGNATURE_SIZE; + SCTP_BUF_LEN(sig) = SCTP_SIGNATURE_SIZE; cookie_sz += SCTP_SIGNATURE_SIZE; ph->param_length = htons(cookie_sz); + *signature = (uint8_t *)mtod(sig, caddr_t); + memset(*signature, 0, SCTP_SIGNATURE_SIZE); return (mret); } - static uint8_t sctp_get_ect(struct sctp_tcb *stcb) From owner-svn-src-all@freebsd.org Mon Aug 24 08:11:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB7B83B4797; Mon, 24 Aug 2020 08:11:47 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlFv62MKz4Jqs; Mon, 24 Aug 2020 08:11:47 +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 B309F1582A; Mon, 24 Aug 2020 08:11:47 +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 07O8Bloh060656; Mon, 24 Aug 2020 08:11:47 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8Bl8P060655; Mon, 24 Aug 2020 08:11:47 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240811.07O8Bl8P060655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364613 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364613 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:11:48 -0000 Author: tuexen Date: Mon Aug 24 08:11:47 2020 New Revision: 364613 URL: https://svnweb.freebsd.org/changeset/base/364613 Log: MFC r362277: Allow the self reference to be NULL in case the timer was stopped. Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Mon Aug 24 08:10:27 2020 (r364612) +++ stable/12/sys/netinet/sctputil.c Mon Aug 24 08:11:47 2020 (r364613) @@ -1726,7 +1726,7 @@ sctp_timeout_handler(void *t) #endif /* sanity checks... */ - KASSERT(tmr->self == tmr, + KASSERT(tmr->self == NULL || tmr->self == tmr, ("sctp_timeout_handler: tmr->self corrupted")); KASSERT(SCTP_IS_TIMER_TYPE_VALID(tmr->type), ("sctp_timeout_handler: invalid timer type %d", tmr->type)); From owner-svn-src-all@freebsd.org Mon Aug 24 08:13:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B1CAB3B4671; Mon, 24 Aug 2020 08:13:06 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlHQ4DQQz4KJq; Mon, 24 Aug 2020 08:13:06 +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 74491157D0; Mon, 24 Aug 2020 08:13:06 +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 07O8D6aP064489; Mon, 24 Aug 2020 08:13:06 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8D6Fh064488; Mon, 24 Aug 2020 08:13:06 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240813.07O8D6Fh064488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364614 - stable/12/lib/libc/net X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/lib/libc/net X-SVN-Commit-Revision: 364614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:13:06 -0000 Author: tuexen Date: Mon Aug 24 08:13:06 2020 New Revision: 364614 URL: https://svnweb.freebsd.org/changeset/base/364614 Log: MFC r362332: Whitespace changes, not functional change intended. Modified: stable/12/lib/libc/net/sctp_sys_calls.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/12/lib/libc/net/sctp_sys_calls.c Mon Aug 24 08:11:47 2020 (r364613) +++ stable/12/lib/libc/net/sctp_sys_calls.c Mon Aug 24 08:13:06 2020 (r364614) @@ -100,7 +100,7 @@ sctp_getaddrlen(sa_family_t family) int sctp_connectx(int sd, const struct sockaddr *addrs, int addrcnt, - sctp_assoc_t * id) + sctp_assoc_t *id) { char *buf; int i, ret, *aa; @@ -159,9 +159,9 @@ sctp_connectx(int sd, const struct sockaddr *addrs, in aa = (int *)buf; *aa = addrcnt; ret = setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X, (void *)buf, - (socklen_t) len); + (socklen_t)len); if ((ret == 0) && (id != NULL)) { - *id = *(sctp_assoc_t *) buf; + *id = *(sctp_assoc_t *)buf; } free(buf); return (ret); @@ -269,7 +269,7 @@ sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt } } if (setsockopt(sd, IPPROTO_SCTP, flags, gaddrs, - (socklen_t) argsz) != 0) { + (socklen_t)argsz) != 0) { free(gaddrs); return (-1); } @@ -280,7 +280,7 @@ sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt } int -sctp_opt_info(int sd, sctp_assoc_t id, int opt, void *arg, socklen_t * size) +sctp_opt_info(int sd, sctp_assoc_t id, int opt, void *arg, socklen_t *size) { if (arg == NULL) { errno = EINVAL; @@ -409,13 +409,13 @@ sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockadd return (-1); } asoc = id; - opt_len = (socklen_t) sizeof(sctp_assoc_t); + opt_len = (socklen_t)sizeof(sctp_assoc_t); if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_REMOTE_ADDR_SIZE, &asoc, &opt_len) != 0) { return (-1); } /* size required is returned in 'asoc' */ - opt_len = (socklen_t) ((size_t)asoc + sizeof(sctp_assoc_t)); + opt_len = (socklen_t)((size_t)asoc + sizeof(sctp_assoc_t)); addrs = calloc(1, (size_t)opt_len); if (addrs == NULL) { errno = ENOMEM; @@ -465,7 +465,7 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockadd return (-1); } size_of_addresses = 0; - opt_len = (socklen_t) sizeof(int); + opt_len = (socklen_t)sizeof(int); if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_LOCAL_ADDR_SIZE, &size_of_addresses, &opt_len) != 0) { errno = ENOMEM; @@ -475,7 +475,7 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockadd errno = ENOTCONN; return (-1); } - opt_len = (socklen_t) (size_of_addresses + sizeof(sctp_assoc_t)); + opt_len = (socklen_t)(size_of_addresses + sizeof(sctp_assoc_t)); addrs = calloc(1, (size_t)opt_len); if (addrs == NULL) { errno = ENOMEM; @@ -586,6 +586,7 @@ sctp_sendmsg(int s, } who = (struct sockaddr *)&addr; } + iov.iov_base = (char *)data; iov.iov_len = len; @@ -632,7 +633,7 @@ sctp_getassocid(int sd, struct sockaddr *sa) if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_PEER_ADDR_INFO, &sp, &siz) != 0) { /* We depend on the fact that 0 can never be returned */ - return ((sctp_assoc_t) 0); + return ((sctp_assoc_t)0); } return (sp.spinfo_assoc_id); } @@ -748,7 +749,7 @@ sctp_sendx(int sd, const void *msg, size_t msg_len, aa++; memcpy((caddr_t)aa, addrs, (size_t)(len - sizeof(int))); ret = setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X_DELAYED, (void *)buf, - (socklen_t) len); + (socklen_t)len); free(buf); if (ret != 0) { @@ -766,7 +767,7 @@ continue_send: sinfo->sinfo_assoc_id = sctp_getassocid(sd, addrs); if (sinfo->sinfo_assoc_id == 0) { (void)setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X_COMPLETE, (void *)addrs, - (socklen_t) addrs->sa_len); + (socklen_t)addrs->sa_len); errno = ENOENT; return (-1); } @@ -774,7 +775,7 @@ continue_send: saved_errno = errno; if (no_end_cx == 0) (void)setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X_COMPLETE, (void *)addrs, - (socklen_t) addrs->sa_len); + (socklen_t)addrs->sa_len); errno = saved_errno; return (ret); @@ -808,7 +809,7 @@ sctp_recvmsg(int s, void *dbuf, size_t len, struct sockaddr *from, - socklen_t * fromlen, + socklen_t *fromlen, struct sctp_sndrcvinfo *sinfo, int *msg_flags) { @@ -878,14 +879,14 @@ sctp_recvmsg(int s, #endif } -ssize_t +ssize_t sctp_recvv(int sd, const struct iovec *iov, int iovlen, struct sockaddr *from, - socklen_t * fromlen, + socklen_t *fromlen, void *info, - socklen_t * infolen, + socklen_t *infolen, unsigned int *infotype, int *flags) { @@ -953,17 +954,17 @@ sctp_recvv(int sd, rn_info = (struct sctp_recvv_rn *)info; rn_info->recvv_rcvinfo = *rcvinfo; rn_info->recvv_nxtinfo = *nxtinfo; - *infolen = (socklen_t) sizeof(struct sctp_recvv_rn); + *infolen = (socklen_t)sizeof(struct sctp_recvv_rn); *infotype = SCTP_RECVV_RN; } else if (*infolen >= sizeof(struct sctp_rcvinfo)) { memcpy(info, rcvinfo, sizeof(struct sctp_rcvinfo)); - *infolen = (socklen_t) sizeof(struct sctp_rcvinfo); + *infolen = (socklen_t)sizeof(struct sctp_rcvinfo); *infotype = SCTP_RECVV_RCVINFO; } } else if (nxtinfo != NULL) { if (*infolen >= sizeof(struct sctp_nxtinfo)) { memcpy(info, nxtinfo, sizeof(struct sctp_nxtinfo)); - *infolen = (socklen_t) sizeof(struct sctp_nxtinfo); + *infolen = (socklen_t)sizeof(struct sctp_nxtinfo); *infotype = SCTP_RECVV_NXTINFO; } } @@ -1105,7 +1106,7 @@ sctp_sendv(int sd, for (i = 0; i < addrcnt; i++) { switch (addr->sa_family) { case AF_INET: - addr_len = (socklen_t) sizeof(struct sockaddr_in); + addr_len = (socklen_t)sizeof(struct sockaddr_in); addr_in = (struct sockaddr_in *)addr; if (addr_in->sin_len != addr_len) { free(cmsgbuf); @@ -1130,7 +1131,7 @@ sctp_sendv(int sd, } break; case AF_INET6: - addr_len = (socklen_t) sizeof(struct sockaddr_in6); + addr_len = (socklen_t)sizeof(struct sockaddr_in6); addr_in6 = (struct sockaddr_in6 *)addr; if (addr_in6->sin6_len != addr_len) { free(cmsgbuf); From owner-svn-src-all@freebsd.org Mon Aug 24 08:14:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7AE563B4B81; Mon, 24 Aug 2020 08:14:42 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlKG2FyJz4Kbj; Mon, 24 Aug 2020 08:14:42 +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 17B3715834; Mon, 24 Aug 2020 08:14:42 +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 07O8Ef1g064616; Mon, 24 Aug 2020 08:14:41 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8EfT7064614; Mon, 24 Aug 2020 08:14:41 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240814.07O8EfT7064614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:14:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364615 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364615 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:14:42 -0000 Author: tuexen Date: Mon Aug 24 08:14:41 2020 New Revision: 364615 URL: https://svnweb.freebsd.org/changeset/base/364615 Log: MFC r362377: Remove last argument of sctp_addr_mgmt_ep_sa(), since it is not used. Modified: stable/12/sys/netinet/sctp_asconf.c stable/12/sys/netinet/sctp_asconf.h stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_asconf.c ============================================================================== --- stable/12/sys/netinet/sctp_asconf.c Mon Aug 24 08:13:06 2020 (r364614) +++ stable/12/sys/netinet/sctp_asconf.c Mon Aug 24 08:14:41 2020 (r364615) @@ -3178,7 +3178,7 @@ sctp_check_address_list(struct sctp_tcb *stcb, struct */ uint32_t sctp_addr_mgmt_ep_sa(struct sctp_inpcb *inp, struct sockaddr *sa, - uint32_t type, uint32_t vrf_id, struct sctp_ifa *sctp_ifap) + uint32_t type, uint32_t vrf_id) { struct sctp_ifa *ifa; struct sctp_laddr *laddr, *nladdr; @@ -3187,9 +3187,7 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb *inp, struct so SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, EINVAL); return (EINVAL); } - if (sctp_ifap) { - ifa = sctp_ifap; - } else if (type == SCTP_ADD_IP_ADDRESS) { + if (type == SCTP_ADD_IP_ADDRESS) { /* For an add the address MUST be on the system */ ifa = sctp_find_ifa_by_addr(sa, vrf_id, SCTP_ADDR_NOT_LOCKED); } else if (type == SCTP_DEL_IP_ADDRESS) { Modified: stable/12/sys/netinet/sctp_asconf.h ============================================================================== --- stable/12/sys/netinet/sctp_asconf.h Mon Aug 24 08:13:06 2020 (r364614) +++ stable/12/sys/netinet/sctp_asconf.h Mon Aug 24 08:14:41 2020 (r364615) @@ -56,8 +56,8 @@ sctp_handle_asconf_ack(struct mbuf *, int, struct sctp struct sctp_tcb *, struct sctp_nets *, int *); extern uint32_t -sctp_addr_mgmt_ep_sa(struct sctp_inpcb *, struct sockaddr *, - uint32_t, uint32_t, struct sctp_ifa *); +sctp_addr_mgmt_ep_sa(struct sctp_inpcb *, struct sockaddr *, uint32_t, + uint32_t); extern int Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Mon Aug 24 08:13:06 2020 (r364614) +++ stable/12/sys/netinet/sctputil.c Mon Aug 24 08:14:41 2020 (r364615) @@ -6792,8 +6792,7 @@ sctp_bindx_add_address(struct socket *so, struct sctp_ } else if (lep == NULL) { ((struct sockaddr_in *)addr_touse)->sin_port = 0; *error = sctp_addr_mgmt_ep_sa(inp, addr_touse, - SCTP_ADD_IP_ADDRESS, - vrf_id, NULL); + SCTP_ADD_IP_ADDRESS, vrf_id); } else { *error = EADDRINUSE; } @@ -6884,8 +6883,7 @@ sctp_bindx_delete_address(struct sctp_inpcb *inp, if (assoc_id == 0) { /* delete the address */ *error = sctp_addr_mgmt_ep_sa(inp, addr_touse, - SCTP_DEL_IP_ADDRESS, - vrf_id, NULL); + SCTP_DEL_IP_ADDRESS, vrf_id); } else { /* * FIX: decide whether we allow assoc based bindx From owner-svn-src-all@freebsd.org Mon Aug 24 08:16:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 61F143B4BAD; Mon, 24 Aug 2020 08:16: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlLw1wL6z4Kn6; Mon, 24 Aug 2020 08:16: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 2522115952; Mon, 24 Aug 2020 08:16: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 07O8G8VS064749; Mon, 24 Aug 2020 08:16:08 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8G7Zu064747; Mon, 24 Aug 2020 08:16:07 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240816.07O8G7Zu064747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364616 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364616 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:16:08 -0000 Author: tuexen Date: Mon Aug 24 08:16:07 2020 New Revision: 364616 URL: https://svnweb.freebsd.org/changeset/base/364616 Log: MFC r362448: Cleanup the adding and deleting of addresses via sctp_bindx(). There is no need to use the association identifier, so remove it. While there, cleanup the code a bit. Modified: stable/12/sys/netinet/sctp_usrreq.c stable/12/sys/netinet/sctputil.c stable/12/sys/netinet/sctputil.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Mon Aug 24 08:14:41 2020 (r364615) +++ stable/12/sys/netinet/sctp_usrreq.c Mon Aug 24 08:16:07 2020 (r364616) @@ -6013,9 +6013,7 @@ sctp_setopt(struct socket *so, int optname, void *optv error = EAFNOSUPPORT; break; } - sctp_bindx_add_address(so, inp, addrs->addr, - addrs->sget_assoc_id, vrf_id, - &error, p); + sctp_bindx_add_address(so, inp, addrs->addr, vrf_id, &error, p); break; } case SCTP_BINDX_REM_ADDR: @@ -6059,9 +6057,7 @@ sctp_setopt(struct socket *so, int optname, void *optv error = EAFNOSUPPORT; break; } - sctp_bindx_delete_address(inp, addrs->addr, - addrs->sget_assoc_id, vrf_id, - &error); + sctp_bindx_delete_address(inp, addrs->addr, vrf_id, &error); break; } case SCTP_EVENT: Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Mon Aug 24 08:14:41 2020 (r364615) +++ stable/12/sys/netinet/sctputil.c Mon Aug 24 08:16:07 2020 (r364616) @@ -6682,13 +6682,21 @@ sctp_connectx_helper_find(struct sctp_inpcb *inp, stru */ void sctp_bindx_add_address(struct socket *so, struct sctp_inpcb *inp, - struct sockaddr *sa, sctp_assoc_t assoc_id, - uint32_t vrf_id, int *error, void *p) + struct sockaddr *sa, uint32_t vrf_id, int *error, + void *p) { - struct sockaddr *addr_touse; #if defined(INET) && defined(INET6) struct sockaddr_in sin; #endif +#ifdef INET6 + struct sockaddr_in6 *sin6; +#endif +#ifdef INET + struct sockaddr_in *sinp; +#endif + struct sockaddr *addr_to_use; + struct sctp_inpcb *lep; + uint16_t port; /* see if we're bound all already! */ if (inp->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) { @@ -6696,13 +6704,9 @@ sctp_bindx_add_address(struct socket *so, struct sctp_ *error = EINVAL; return; } - addr_touse = sa; + switch (sa->sa_family) { #ifdef INET6 - if (sa->sa_family == AF_INET6) { -#ifdef INET - struct sockaddr_in6 *sin6; - -#endif + case AF_INET6: if (sa->sa_len != sizeof(struct sockaddr_in6)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); *error = EINVAL; @@ -6714,8 +6718,9 @@ sctp_bindx_add_address(struct socket *so, struct sctp_ *error = EINVAL; return; } + sin6 = (struct sockaddr_in6 *)sa; + port = sin6->sin6_port; #ifdef INET - sin6 = (struct sockaddr_in6 *)addr_touse; if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && SCTP_IPV6_V6ONLY(inp)) { @@ -6725,13 +6730,15 @@ sctp_bindx_add_address(struct socket *so, struct sctp_ return; } in6_sin6_2_sin(&sin, sin6); - addr_touse = (struct sockaddr *)&sin; + addr_to_use = (struct sockaddr *)&sin; + } else { + addr_to_use = sa; } #endif - } + break; #endif #ifdef INET - if (sa->sa_family == AF_INET) { + case AF_INET: if (sa->sa_len != sizeof(struct sockaddr_in)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); *error = EINVAL; @@ -6744,8 +6751,16 @@ sctp_bindx_add_address(struct socket *so, struct sctp_ *error = EINVAL; return; } - } + sinp = (struct sockaddr_in *)sa; + port = sinp->sin_port; + addr_to_use = sa; + break; #endif + default: + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); + *error = EINVAL; + return; + } if (inp->sctp_flags & SCTP_PCB_FLAGS_UNBOUND) { if (p == NULL) { /* Can't get proc for Net/Open BSD */ @@ -6753,55 +6768,25 @@ sctp_bindx_add_address(struct socket *so, struct sctp_ *error = EINVAL; return; } - *error = sctp_inpcb_bind(so, addr_touse, NULL, p); + *error = sctp_inpcb_bind(so, addr_to_use, NULL, p); return; } - /* - * No locks required here since bind and mgmt_ep_sa all do their own - * locking. If we do something for the FIX: below we may need to - * lock in that case. - */ - if (assoc_id == 0) { + /* Validate the incoming port. */ + if ((port != 0) && (port != inp->sctp_lport)) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); + *error = EINVAL; + return; + } + lep = sctp_pcb_findep(addr_to_use, 1, 0, vrf_id); + if (lep == NULL) { /* add the address */ - struct sctp_inpcb *lep; - struct sockaddr_in *lsin = (struct sockaddr_in *)addr_touse; - - /* validate the incoming port */ - if ((lsin->sin_port != 0) && - (lsin->sin_port != inp->sctp_lport)) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); - *error = EINVAL; - return; - } else { - /* user specified 0 port, set it to existing port */ - lsin->sin_port = inp->sctp_lport; - } - - lep = sctp_pcb_findep(addr_touse, 1, 0, vrf_id); - if (lep != NULL) { - /* - * We must decrement the refcount since we have the - * ep already and are binding. No remove going on - * here. - */ - SCTP_INP_DECR_REF(lep); - } - if (lep == inp) { - /* already bound to it.. ok */ - return; - } else if (lep == NULL) { - ((struct sockaddr_in *)addr_touse)->sin_port = 0; - *error = sctp_addr_mgmt_ep_sa(inp, addr_touse, - SCTP_ADD_IP_ADDRESS, vrf_id); - } else { + *error = sctp_addr_mgmt_ep_sa(inp, addr_to_use, + SCTP_ADD_IP_ADDRESS, vrf_id); + } else { + if (lep != inp) { *error = EADDRINUSE; } - if (*error) - return; - } else { - /* - * FIX: decide whether we allow assoc based bindx - */ + SCTP_INP_DECR_REF(lep); } } @@ -6811,11 +6796,11 @@ sctp_bindx_add_address(struct socket *so, struct sctp_ */ void sctp_bindx_delete_address(struct sctp_inpcb *inp, - struct sockaddr *sa, sctp_assoc_t assoc_id, - uint32_t vrf_id, int *error) + struct sockaddr *sa, uint32_t vrf_id, int *error) { - struct sockaddr *addr_touse; + struct sockaddr *addr_to_use; #if defined(INET) && defined(INET6) + struct sockaddr_in6 *sin6; struct sockaddr_in sin; #endif @@ -6825,13 +6810,9 @@ sctp_bindx_delete_address(struct sctp_inpcb *inp, *error = EINVAL; return; } - addr_touse = sa; + switch (sa->sa_family) { #ifdef INET6 - if (sa->sa_family == AF_INET6) { -#ifdef INET - struct sockaddr_in6 *sin6; -#endif - + case AF_INET6: if (sa->sa_len != sizeof(struct sockaddr_in6)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); *error = EINVAL; @@ -6844,7 +6825,7 @@ sctp_bindx_delete_address(struct sctp_inpcb *inp, return; } #ifdef INET - sin6 = (struct sockaddr_in6 *)addr_touse; + sin6 = (struct sockaddr_in6 *)sa; if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && SCTP_IPV6_V6ONLY(inp)) { @@ -6854,13 +6835,15 @@ sctp_bindx_delete_address(struct sctp_inpcb *inp, return; } in6_sin6_2_sin(&sin, sin6); - addr_touse = (struct sockaddr *)&sin; + addr_to_use = (struct sockaddr *)&sin; + } else { + addr_to_use = sa; } #endif - } + break; #endif #ifdef INET - if (sa->sa_family == AF_INET) { + case AF_INET: if (sa->sa_len != sizeof(struct sockaddr_in)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); *error = EINVAL; @@ -6873,22 +6856,17 @@ sctp_bindx_delete_address(struct sctp_inpcb *inp, *error = EINVAL; return; } - } + addr_to_use = sa; + break; #endif - /* - * No lock required mgmt_ep_sa does its own locking. If the FIX: - * below is ever changed we may need to lock before calling - * association level binding. - */ - if (assoc_id == 0) { - /* delete the address */ - *error = sctp_addr_mgmt_ep_sa(inp, addr_touse, - SCTP_DEL_IP_ADDRESS, vrf_id); - } else { - /* - * FIX: decide whether we allow assoc based bindx - */ + default: + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); + *error = EINVAL; + return; } + /* No lock required mgmt_ep_sa does its own locking. */ + *error = sctp_addr_mgmt_ep_sa(inp, addr_to_use, SCTP_DEL_IP_ADDRESS, + vrf_id); } /* Modified: stable/12/sys/netinet/sctputil.h ============================================================================== --- stable/12/sys/netinet/sctputil.h Mon Aug 24 08:14:41 2020 (r364615) +++ stable/12/sys/netinet/sctputil.h Mon Aug 24 08:16:07 2020 (r364616) @@ -229,11 +229,10 @@ struct mbuf *sctp_generate_no_user_data_cause(uint32_t void sctp_bindx_add_address(struct socket *so, struct sctp_inpcb *inp, - struct sockaddr *sa, sctp_assoc_t assoc_id, - uint32_t vrf_id, int *error, void *p); + struct sockaddr *sa, uint32_t vrf_id, int *error, + void *p); void -sctp_bindx_delete_address(struct sctp_inpcb *inp, - struct sockaddr *sa, sctp_assoc_t assoc_id, +sctp_bindx_delete_address(struct sctp_inpcb *inp, struct sockaddr *sa, uint32_t vrf_id, int *error); int sctp_local_addr_count(struct sctp_tcb *stcb); From owner-svn-src-all@freebsd.org Mon Aug 24 08:19:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 95F243B4BCA; Mon, 24 Aug 2020 08:19:26 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlQk39xTz4KtP; Mon, 24 Aug 2020 08:19:26 +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 5136015836; Mon, 24 Aug 2020 08:19:26 +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 07O8JQoI064942; Mon, 24 Aug 2020 08:19:26 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8JP07064940; Mon, 24 Aug 2020 08:19:25 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240819.07O8JP07064940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:19:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364617 - in stable/12: lib/libc/net sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in stable/12: lib/libc/net sys/netinet X-SVN-Commit-Revision: 364617 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:19:26 -0000 Author: tuexen Date: Mon Aug 24 08:19:25 2020 New Revision: 364617 URL: https://svnweb.freebsd.org/changeset/base/364617 Log: MFC r362451: Use a struct sockaddr_in or struct sockaddr_in6 as the option value for the IPPROTO_SCTP level socket options SCTP_BINDX_ADD_ADDR and SCTP_BINDX_REM_ADDR. These socket option are intended for internal use only to implement sctp_bindx(). This is one user of struct sctp_getaddresses less. struct sctp_getaddresses is strange and will be changed shortly. Modified: stable/12/lib/libc/net/sctp_sys_calls.c stable/12/sys/netinet/sctp_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/12/lib/libc/net/sctp_sys_calls.c Mon Aug 24 08:16:07 2020 (r364616) +++ stable/12/lib/libc/net/sctp_sys_calls.c Mon Aug 24 08:19:25 2020 (r364617) @@ -35,6 +35,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -170,13 +171,12 @@ sctp_connectx(int sd, const struct sockaddr *addrs, in int sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt, int flags) { - struct sctp_getaddresses *gaddrs; struct sockaddr *sa; struct sockaddr_in *sin; struct sockaddr_in6 *sin6; int i; - size_t argsz; - uint16_t sport = 0; + uint16_t sport; + bool fix_port; /* validate the flags */ if ((flags != SCTP_BINDX_ADD_ADDR) && @@ -189,6 +189,8 @@ sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt errno = EINVAL; return (-1); } + sport = 0; + fix_port = false; /* First pre-screen the addresses */ sa = addrs; for (i = 0; i < addrcnt; i++) { @@ -210,6 +212,7 @@ sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt } else { /* save off the port */ sport = sin->sin_port; + fix_port = (i > 0); } } break; @@ -230,6 +233,7 @@ sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt } else { /* save off the port */ sport = sin6->sin6_port; + fix_port = (i > 0); } } break; @@ -240,42 +244,29 @@ sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt } sa = (struct sockaddr *)((caddr_t)sa + sa->sa_len); } - argsz = sizeof(struct sctp_getaddresses) + - sizeof(struct sockaddr_storage); - if ((gaddrs = (struct sctp_getaddresses *)malloc(argsz)) == NULL) { - errno = ENOMEM; - return (-1); - } sa = addrs; for (i = 0; i < addrcnt; i++) { - memset(gaddrs, 0, argsz); - gaddrs->sget_assoc_id = 0; - memcpy(gaddrs->addr, sa, sa->sa_len); /* * Now, if there was a port mentioned, assure that the first * address has that port to make sure it fails or succeeds * correctly. */ - if ((i == 0) && (sport != 0)) { - switch (gaddrs->addr->sa_family) { + if (fix_port) { + switch (sa->sa_family) { case AF_INET: - sin = (struct sockaddr_in *)gaddrs->addr; - sin->sin_port = sport; + ((struct sockaddr_in *)sa)->sin_port = sport; break; case AF_INET6: - sin6 = (struct sockaddr_in6 *)gaddrs->addr; - sin6->sin6_port = sport; + ((struct sockaddr_in6 *)sa)->sin6_port = sport; break; } + fix_port = false; } - if (setsockopt(sd, IPPROTO_SCTP, flags, gaddrs, - (socklen_t)argsz) != 0) { - free(gaddrs); + if (setsockopt(sd, IPPROTO_SCTP, flags, sa, sa->sa_len) != 0) { return (-1); } sa = (struct sockaddr *)((caddr_t)sa + sa->sa_len); } - free(gaddrs); return (0); } Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Mon Aug 24 08:16:07 2020 (r364616) +++ stable/12/sys/netinet/sctp_usrreq.c Mon Aug 24 08:19:25 2020 (r364617) @@ -5976,33 +5976,35 @@ sctp_setopt(struct socket *so, int optname, void *optv } case SCTP_BINDX_ADD_ADDR: { - struct sctp_getaddresses *addrs; + struct sockaddr *sa; struct thread *td; td = (struct thread *)p; - SCTP_CHECK_AND_CAST(addrs, optval, struct sctp_getaddresses, - optsize); + SCTP_CHECK_AND_CAST(sa, optval, struct sockaddr, optsize); #ifdef INET - if (addrs->addr->sa_family == AF_INET) { - if (optsize < sizeof(struct sctp_getaddresses) - sizeof(struct sockaddr) + sizeof(struct sockaddr_in)) { + if (sa->sa_family == AF_INET) { + if (optsize < sizeof(struct sockaddr_in)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; break; } - if (td != NULL && (error = prison_local_ip4(td->td_ucred, &(((struct sockaddr_in *)(addrs->addr))->sin_addr)))) { + if (td != NULL && + (error = prison_local_ip4(td->td_ucred, &(((struct sockaddr_in *)sa)->sin_addr)))) { SCTP_LTRACE_ERR_RET(inp, stcb, NULL, SCTP_FROM_SCTP_USRREQ, error); break; } } else #endif #ifdef INET6 - if (addrs->addr->sa_family == AF_INET6) { - if (optsize < sizeof(struct sctp_getaddresses) - sizeof(struct sockaddr) + sizeof(struct sockaddr_in6)) { + if (sa->sa_family == AF_INET6) { + if (optsize < sizeof(struct sockaddr_in6)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; break; } - if (td != NULL && (error = prison_local_ip6(td->td_ucred, &(((struct sockaddr_in6 *)(addrs->addr))->sin6_addr), + if (td != NULL && + (error = prison_local_ip6(td->td_ucred, + &(((struct sockaddr_in6 *)sa)->sin6_addr), (SCTP_IPV6_V6ONLY(inp) != 0))) != 0) { SCTP_LTRACE_ERR_RET(inp, stcb, NULL, SCTP_FROM_SCTP_USRREQ, error); break; @@ -6013,40 +6015,41 @@ sctp_setopt(struct socket *so, int optname, void *optv error = EAFNOSUPPORT; break; } - sctp_bindx_add_address(so, inp, addrs->addr, vrf_id, &error, p); + sctp_bindx_add_address(so, inp, sa, vrf_id, &error, p); break; } case SCTP_BINDX_REM_ADDR: { - struct sctp_getaddresses *addrs; + struct sockaddr *sa; struct thread *td; td = (struct thread *)p; - SCTP_CHECK_AND_CAST(addrs, optval, struct sctp_getaddresses, optsize); + SCTP_CHECK_AND_CAST(sa, optval, struct sockaddr, optsize); #ifdef INET - if (addrs->addr->sa_family == AF_INET) { - if (optsize < sizeof(struct sctp_getaddresses) - sizeof(struct sockaddr) + sizeof(struct sockaddr_in)) { + if (sa->sa_family == AF_INET) { + if (optsize < sizeof(struct sockaddr_in)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; break; } - if (td != NULL && (error = prison_local_ip4(td->td_ucred, &(((struct sockaddr_in *)(addrs->addr))->sin_addr)))) { + if (td != NULL && + (error = prison_local_ip4(td->td_ucred, &(((struct sockaddr_in *)sa)->sin_addr)))) { SCTP_LTRACE_ERR_RET(inp, stcb, NULL, SCTP_FROM_SCTP_USRREQ, error); break; } } else #endif #ifdef INET6 - if (addrs->addr->sa_family == AF_INET6) { - if (optsize < sizeof(struct sctp_getaddresses) - sizeof(struct sockaddr) + sizeof(struct sockaddr_in6)) { + if (sa->sa_family == AF_INET6) { + if (optsize < sizeof(struct sockaddr_in6)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; break; } if (td != NULL && (error = prison_local_ip6(td->td_ucred, - &(((struct sockaddr_in6 *)(addrs->addr))->sin6_addr), + &(((struct sockaddr_in6 *)sa)->sin6_addr), (SCTP_IPV6_V6ONLY(inp) != 0))) != 0) { SCTP_LTRACE_ERR_RET(inp, stcb, NULL, SCTP_FROM_SCTP_USRREQ, error); break; @@ -6057,7 +6060,7 @@ sctp_setopt(struct socket *so, int optname, void *optv error = EAFNOSUPPORT; break; } - sctp_bindx_delete_address(inp, addrs->addr, vrf_id, &error); + sctp_bindx_delete_address(inp, sa, vrf_id, &error); break; } case SCTP_EVENT: From owner-svn-src-all@freebsd.org Mon Aug 24 08:20:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 19F583B4A5B; Mon, 24 Aug 2020 08:20:50 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlSK72x4z4L0G; Mon, 24 Aug 2020 08:20:49 +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 D49EE1583A; Mon, 24 Aug 2020 08:20:49 +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 07O8KnK0066617; Mon, 24 Aug 2020 08:20:49 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8KnUD066616; Mon, 24 Aug 2020 08:20:49 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240820.07O8KnUD066616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364618 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364618 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:20:50 -0000 Author: tuexen Date: Mon Aug 24 08:20:49 2020 New Revision: 364618 URL: https://svnweb.freebsd.org/changeset/base/364618 Log: MFC r362454: Set a variable also in the case of an INET6 only kernel Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Mon Aug 24 08:19:25 2020 (r364617) +++ stable/12/sys/netinet/sctputil.c Mon Aug 24 08:20:49 2020 (r364618) @@ -6734,6 +6734,8 @@ sctp_bindx_add_address(struct socket *so, struct sctp_ } else { addr_to_use = sa; } +#else + addr_to_use = sa; #endif break; #endif From owner-svn-src-all@freebsd.org Mon Aug 24 08:22:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD33F3B4CB7; Mon, 24 Aug 2020 08:22:37 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlVP488Gz4L96; Mon, 24 Aug 2020 08:22:37 +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 7227A15A45; Mon, 24 Aug 2020 08:22:37 +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 07O8Mbr2070781; Mon, 24 Aug 2020 08:22:37 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8MbuR070780; Mon, 24 Aug 2020 08:22:37 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240822.07O8MbuR070780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:22:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364619 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364619 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:22:37 -0000 Author: tuexen Date: Mon Aug 24 08:22:37 2020 New Revision: 364619 URL: https://svnweb.freebsd.org/changeset/base/364619 Log: MFC r362462: Fix the build for an INET6 only configuration. The fix from the last commit is actually needed twice... Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Mon Aug 24 08:20:49 2020 (r364618) +++ stable/12/sys/netinet/sctputil.c Mon Aug 24 08:22:37 2020 (r364619) @@ -6841,6 +6841,8 @@ sctp_bindx_delete_address(struct sctp_inpcb *inp, } else { addr_to_use = sa; } +#else + addr_to_use = sa; #endif break; #endif From owner-svn-src-all@freebsd.org Mon Aug 24 08:25:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A202D3B4FBF; Mon, 24 Aug 2020 08:25:01 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlY93gdfz4LG9; Mon, 24 Aug 2020 08:25:01 +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 6157415ABE; Mon, 24 Aug 2020 08:25:01 +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 07O8P1MI070957; Mon, 24 Aug 2020 08:25:01 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8P0F5070954; Mon, 24 Aug 2020 08:25:00 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240825.07O8P0F5070954@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364620 - in stable/12: lib/libc/net sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in stable/12: lib/libc/net sys/netinet X-SVN-Commit-Revision: 364620 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:25:01 -0000 Author: tuexen Date: Mon Aug 24 08:25:00 2020 New Revision: 364620 URL: https://svnweb.freebsd.org/changeset/base/364620 Log: MFC r362473: leanup the defintion of struct sctp_getaddresses. This stucture is used by the IPPROTO_SCTP level socket options SCTP_GET_PEER_ADDRESSES and SCTP_GET_LOCAL_ADDRESSES, which are used by libc to implement sctp_getladdrs() and sctp_getpaddrs(). These changes allow an old libc to work on a newer kernel. Modified: stable/12/lib/libc/net/sctp_sys_calls.c stable/12/sys/netinet/sctp_uio.h stable/12/sys/netinet/sctp_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/12/lib/libc/net/sctp_sys_calls.c Mon Aug 24 08:22:37 2020 (r364619) +++ stable/12/lib/libc/net/sctp_sys_calls.c Mon Aug 24 08:25:00 2020 (r364620) @@ -406,7 +406,7 @@ sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockadd return (-1); } /* size required is returned in 'asoc' */ - opt_len = (socklen_t)((size_t)asoc + sizeof(sctp_assoc_t)); + opt_len = (socklen_t)((size_t)asoc + sizeof(struct sctp_getaddresses)); addrs = calloc(1, (size_t)opt_len); if (addrs == NULL) { errno = ENOMEM; @@ -419,9 +419,9 @@ sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockadd free(addrs); return (-1); } - *raddrs = (struct sockaddr *)&addrs->addr[0]; + *raddrs = &addrs->addr[0].sa; cnt = 0; - sa = (struct sockaddr *)&addrs->addr[0]; + sa = &addrs->addr[0].sa; lim = (caddr_t)addrs + opt_len; while (((caddr_t)sa < lim) && (sa->sa_len > 0)) { sa = (struct sockaddr *)((caddr_t)sa + sa->sa_len); @@ -436,7 +436,7 @@ sctp_freepaddrs(struct sockaddr *addrs) void *fr_addr; /* Take away the hidden association id */ - fr_addr = (void *)((caddr_t)addrs - sizeof(sctp_assoc_t)); + fr_addr = (void *)((caddr_t)addrs - offsetof(struct sctp_getaddresses, addr)); /* Now free it */ free(fr_addr); } @@ -466,7 +466,7 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockadd errno = ENOTCONN; return (-1); } - opt_len = (socklen_t)(size_of_addresses + sizeof(sctp_assoc_t)); + opt_len = (socklen_t)(size_of_addresses + sizeof(struct sctp_getaddresses)); addrs = calloc(1, (size_t)opt_len); if (addrs == NULL) { errno = ENOMEM; @@ -480,9 +480,9 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockadd errno = ENOMEM; return (-1); } - *raddrs = (struct sockaddr *)&addrs->addr[0]; + *raddrs = &addrs->addr[0].sa; cnt = 0; - sa = (struct sockaddr *)&addrs->addr[0]; + sa = &addrs->addr[0].sa; lim = (caddr_t)addrs + opt_len; while (((caddr_t)sa < lim) && (sa->sa_len > 0)) { sa = (struct sockaddr *)((caddr_t)sa + sa->sa_len); @@ -497,7 +497,7 @@ sctp_freeladdrs(struct sockaddr *addrs) void *fr_addr; /* Take away the hidden association id */ - fr_addr = (void *)((caddr_t)addrs - sizeof(sctp_assoc_t)); + fr_addr = (void *)((caddr_t)addrs - offsetof(struct sctp_getaddresses, addr)); /* Now free it */ free(fr_addr); } Modified: stable/12/sys/netinet/sctp_uio.h ============================================================================== --- stable/12/sys/netinet/sctp_uio.h Mon Aug 24 08:22:37 2020 (r364619) +++ stable/12/sys/netinet/sctp_uio.h Mon Aug 24 08:25:00 2020 (r364620) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #define _NETINET_SCTP_UIO_H_ -#if ! defined(_KERNEL) +#if !defined(_KERNEL) #include #endif #include @@ -633,10 +633,15 @@ struct sctp_setpeerprim { uint8_t sspp_padding[4]; }; +union sctp_sockstore { + struct sockaddr_in sin; + struct sockaddr_in6 sin6; + struct sockaddr sa; +}; + struct sctp_getaddresses { sctp_assoc_t sget_assoc_id; - /* addr is filled in for N * sockaddr_storage */ - struct sockaddr addr[1]; + union sctp_sockstore addr[]; }; struct sctp_status { @@ -1142,12 +1147,6 @@ struct sctpstat { #define SCTP_STAT_DECR_COUNTER32(_x) SCTP_STAT_DECR(_x) #define SCTP_STAT_DECR_COUNTER64(_x) SCTP_STAT_DECR(_x) #define SCTP_STAT_DECR_GAUGE32(_x) SCTP_STAT_DECR(_x) - -union sctp_sockstore { - struct sockaddr_in sin; - struct sockaddr_in6 sin6; - struct sockaddr sa; -}; /***********************************/ Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Mon Aug 24 08:22:37 2020 (r364619) +++ stable/12/sys/netinet/sctp_usrreq.c Mon Aug 24 08:25:00 2020 (r364620) @@ -970,7 +970,7 @@ sctp_shutdown(struct socket *so) * returns 0 on success, 1 on error */ static uint32_t -sctp_fill_user_address(struct sockaddr_storage *ss, struct sockaddr *sa) +sctp_fill_user_address(union sctp_sockstore *ss, struct sockaddr *sa) { #ifdef INET6 struct sockaddr_in6 lsa6; @@ -991,7 +991,7 @@ static size_t sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, struct sctp_tcb *stcb, size_t limit, - struct sockaddr_storage *sas, + union sctp_sockstore *addr, uint32_t vrf_id) { struct sctp_ifn *sctp_ifn; @@ -1106,18 +1106,18 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, if (actual + sizeof(struct sockaddr_in6) > limit) { return (actual); } - in6_sin_2_v4mapsin6(sin, (struct sockaddr_in6 *)sas); - ((struct sockaddr_in6 *)sas)->sin6_port = inp->sctp_lport; - sas = (struct sockaddr_storage *)((caddr_t)sas + sizeof(struct sockaddr_in6)); + in6_sin_2_v4mapsin6(sin, &addr->sin6); + addr->sin6.sin6_port = inp->sctp_lport; + addr = (union sctp_sockstore *)((caddr_t)addr + sizeof(struct sockaddr_in6)); actual += sizeof(struct sockaddr_in6); } else { #endif if (actual + sizeof(struct sockaddr_in) > limit) { return (actual); } - memcpy(sas, sin, sizeof(struct sockaddr_in)); - ((struct sockaddr_in *)sas)->sin_port = inp->sctp_lport; - sas = (struct sockaddr_storage *)((caddr_t)sas + sizeof(struct sockaddr_in)); + memcpy(addr, sin, sizeof(struct sockaddr_in)); + addr->sin.sin_port = inp->sctp_lport; + addr = (union sctp_sockstore *)((caddr_t)addr + sizeof(struct sockaddr_in)); actual += sizeof(struct sockaddr_in); #ifdef INET6 } @@ -1169,9 +1169,9 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, if (actual + sizeof(struct sockaddr_in6) > limit) { return (actual); } - memcpy(sas, sin6, sizeof(struct sockaddr_in6)); - ((struct sockaddr_in6 *)sas)->sin6_port = inp->sctp_lport; - sas = (struct sockaddr_storage *)((caddr_t)sas + sizeof(struct sockaddr_in6)); + memcpy(addr, sin6, sizeof(struct sockaddr_in6)); + addr->sin6.sin6_port = inp->sctp_lport; + addr = (union sctp_sockstore *)((caddr_t)addr + sizeof(struct sockaddr_in6)); actual += sizeof(struct sockaddr_in6); } else { continue; @@ -1198,24 +1198,24 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, if (actual + sa_len > limit) { return (actual); } - if (sctp_fill_user_address(sas, &laddr->ifa->address.sa)) + if (sctp_fill_user_address(addr, &laddr->ifa->address.sa)) continue; switch (laddr->ifa->address.sa.sa_family) { #ifdef INET case AF_INET: - ((struct sockaddr_in *)sas)->sin_port = inp->sctp_lport; + addr->sin.sin_port = inp->sctp_lport; break; #endif #ifdef INET6 case AF_INET6: - ((struct sockaddr_in6 *)sas)->sin6_port = inp->sctp_lport; + addr->sin6.sin6_port = inp->sctp_lport; break; #endif default: /* TSNH */ break; } - sas = (struct sockaddr_storage *)((caddr_t)sas + sa_len); + addr = (union sctp_sockstore *)((caddr_t)addr + sa_len); actual += sa_len; } } @@ -1226,13 +1226,13 @@ static size_t sctp_fill_up_addresses(struct sctp_inpcb *inp, struct sctp_tcb *stcb, size_t limit, - struct sockaddr_storage *sas) + union sctp_sockstore *addr) { size_t size = 0; SCTP_IPI_ADDR_RLOCK(); /* fill up addresses for the endpoint's default vrf */ - size = sctp_fill_up_addresses_vrf(inp, stcb, limit, sas, + size = sctp_fill_up_addresses_vrf(inp, stcb, limit, addr, inp->def_vrf_id); SCTP_IPI_ADDR_RUNLOCK(); return (size); @@ -2207,7 +2207,7 @@ flags_out: */ { size_t cpsz, left; - struct sockaddr_storage *sas; + union sctp_sockstore *addr; struct sctp_nets *net; struct sctp_getaddresses *saddr; @@ -2215,9 +2215,9 @@ flags_out: SCTP_FIND_STCB(inp, stcb, saddr->sget_assoc_id); if (stcb) { - left = (*optsize) - sizeof(sctp_assoc_t); - *optsize = sizeof(sctp_assoc_t); - sas = (struct sockaddr_storage *)&saddr->addr[0]; + left = *optsize - offsetof(struct sctp_getaddresses, addr); + *optsize = offsetof(struct sctp_getaddresses, addr); + addr = &saddr->addr[0]; TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { switch (net->ro._l_addr.sa.sa_family) { @@ -2255,16 +2255,16 @@ flags_out: (net->ro._l_addr.sa.sa_family == AF_INET)) { /* Must map the address */ in6_sin_2_v4mapsin6(&net->ro._l_addr.sin, - (struct sockaddr_in6 *)sas); + &addr->sin6); } else { - memcpy(sas, &net->ro._l_addr, cpsz); + memcpy(addr, &net->ro._l_addr, cpsz); } #else - memcpy(sas, &net->ro._l_addr, cpsz); + memcpy(addr, &net->ro._l_addr, cpsz); #endif - ((struct sockaddr_in *)sas)->sin_port = stcb->rport; + addr->sin.sin_port = stcb->rport; - sas = (struct sockaddr_storage *)((caddr_t)sas + cpsz); + addr = (union sctp_sockstore *)((caddr_t)addr + cpsz); left -= cpsz; *optsize += cpsz; } @@ -2278,19 +2278,17 @@ flags_out: case SCTP_GET_LOCAL_ADDRESSES: { size_t limit, actual; - struct sockaddr_storage *sas; struct sctp_getaddresses *saddr; SCTP_CHECK_AND_CAST(saddr, optval, struct sctp_getaddresses, *optsize); SCTP_FIND_STCB(inp, stcb, saddr->sget_assoc_id); - sas = (struct sockaddr_storage *)&saddr->addr[0]; - limit = *optsize - sizeof(sctp_assoc_t); - actual = sctp_fill_up_addresses(inp, stcb, limit, sas); + limit = *optsize - offsetof(struct sctp_getaddresses, addr); + actual = sctp_fill_up_addresses(inp, stcb, limit, saddr->addr); if (stcb) { SCTP_TCB_UNLOCK(stcb); } - *optsize = sizeof(sctp_assoc_t) + actual; + *optsize = offsetof(struct sctp_getaddresses, addr) + actual; break; } case SCTP_PEER_ADDR_PARAMS: From owner-svn-src-all@freebsd.org Mon Aug 24 08:26:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E0E63B5119; Mon, 24 Aug 2020 08: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlZR6bVlz4Lm7; Mon, 24 Aug 2020 08:26:07 +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 C69EE156CF; Mon, 24 Aug 2020 08:26:07 +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 07O8Q7ta071066; Mon, 24 Aug 2020 08:26:07 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8Q7Ow071065; Mon, 24 Aug 2020 08:26:07 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240826.07O8Q7Ow071065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364621 - stable/12/lib/libc/net X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/lib/libc/net X-SVN-Commit-Revision: 364621 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:26:08 -0000 Author: tuexen Date: Mon Aug 24 08:26:07 2020 New Revision: 364621 URL: https://svnweb.freebsd.org/changeset/base/364621 Log: MFC r362474: Add include missing from my last commit. Modified: stable/12/lib/libc/net/sctp_sys_calls.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/12/lib/libc/net/sctp_sys_calls.c Mon Aug 24 08:25:00 2020 (r364620) +++ stable/12/lib/libc/net/sctp_sys_calls.c Mon Aug 24 08:26:07 2020 (r364621) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include From owner-svn-src-all@freebsd.org Mon Aug 24 08:27:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 24DF93B4EF6; Mon, 24 Aug 2020 08:27:36 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlc76mdRz4Ldk; Mon, 24 Aug 2020 08:27:35 +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 CCED915A48; Mon, 24 Aug 2020 08:27:35 +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 07O8RZUK071189; Mon, 24 Aug 2020 08:27:35 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8RZAN071188; Mon, 24 Aug 2020 08:27:35 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240827.07O8RZAN071188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364622 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364622 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:27:36 -0000 Author: tuexen Date: Mon Aug 24 08:27:35 2020 New Revision: 364622 URL: https://svnweb.freebsd.org/changeset/base/364622 Log: MFC r362498: No need to include netinet/sctp_crc32.h twice. Modified: stable/12/sys/netinet/sctp_crc32.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_crc32.c ============================================================================== --- stable/12/sys/netinet/sctp_crc32.c Mon Aug 24 08:26:07 2020 (r364621) +++ stable/12/sys/netinet/sctp_crc32.c Mon Aug 24 08:27:35 2020 (r364622) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #if defined(SCTP) || defined(SCTP_SUPPORT) #include -#include #include #endif From owner-svn-src-all@freebsd.org Mon Aug 24 08:30:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A1F5E3B5481; Mon, 24 Aug 2020 08:30:37 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlgd3vw8z4Lqs; Mon, 24 Aug 2020 08:30:37 +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 6AB06157E9; Mon, 24 Aug 2020 08:30:37 +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 07O8UbgU071430; Mon, 24 Aug 2020 08:30:37 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8Ubof071429; Mon, 24 Aug 2020 08:30:37 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240830.07O8Ubof071429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:30:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364623 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364623 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:30:37 -0000 Author: tuexen Date: Mon Aug 24 08:30:36 2020 New Revision: 364623 URL: https://svnweb.freebsd.org/changeset/base/364623 Log: MFC r362563: Fix alignment issue manifesting in the userland stack. MFC r364353: Fix two bugs I introduced in r362563. Found by running syzkaller. Modified: stable/12/sys/netinet/sctp_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Mon Aug 24 08:27:35 2020 (r364622) +++ stable/12/sys/netinet/sctp_usrreq.c Mon Aug 24 08:30:36 2020 (r364623) @@ -970,15 +970,15 @@ sctp_shutdown(struct socket *so) * returns 0 on success, 1 on error */ static uint32_t -sctp_fill_user_address(union sctp_sockstore *ss, struct sockaddr *sa) +sctp_fill_user_address(struct sockaddr *dst, struct sockaddr *src) { #ifdef INET6 struct sockaddr_in6 lsa6; - sa = (struct sockaddr *)sctp_recover_scope((struct sockaddr_in6 *)sa, + src = (struct sockaddr *)sctp_recover_scope((struct sockaddr_in6 *)src, &lsa6); #endif - memcpy(ss, sa, sa->sa_len); + memcpy(dst, src, src->sa_len); return (0); } @@ -991,7 +991,7 @@ static size_t sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, struct sctp_tcb *stcb, size_t limit, - union sctp_sockstore *addr, + struct sockaddr *addr, uint32_t vrf_id) { struct sctp_ifn *sctp_ifn; @@ -1106,9 +1106,9 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, if (actual + sizeof(struct sockaddr_in6) > limit) { return (actual); } - in6_sin_2_v4mapsin6(sin, &addr->sin6); - addr->sin6.sin6_port = inp->sctp_lport; - addr = (union sctp_sockstore *)((caddr_t)addr + sizeof(struct sockaddr_in6)); + in6_sin_2_v4mapsin6(sin, (struct sockaddr_in6 *)addr); + ((struct sockaddr_in6 *)addr)->sin6_port = inp->sctp_lport; + addr = (struct sockaddr *)((caddr_t)addr + sizeof(struct sockaddr_in6)); actual += sizeof(struct sockaddr_in6); } else { #endif @@ -1116,8 +1116,8 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, return (actual); } memcpy(addr, sin, sizeof(struct sockaddr_in)); - addr->sin.sin_port = inp->sctp_lport; - addr = (union sctp_sockstore *)((caddr_t)addr + sizeof(struct sockaddr_in)); + ((struct sockaddr_in *)addr)->sin_port = inp->sctp_lport; + addr = (struct sockaddr *)((caddr_t)addr + sizeof(struct sockaddr_in)); actual += sizeof(struct sockaddr_in); #ifdef INET6 } @@ -1170,8 +1170,8 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, return (actual); } memcpy(addr, sin6, sizeof(struct sockaddr_in6)); - addr->sin6.sin6_port = inp->sctp_lport; - addr = (union sctp_sockstore *)((caddr_t)addr + sizeof(struct sockaddr_in6)); + ((struct sockaddr_in6 *)addr)->sin6_port = inp->sctp_lport; + addr = (struct sockaddr *)((caddr_t)addr + sizeof(struct sockaddr_in6)); actual += sizeof(struct sockaddr_in6); } else { continue; @@ -1203,19 +1203,19 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, switch (laddr->ifa->address.sa.sa_family) { #ifdef INET case AF_INET: - addr->sin.sin_port = inp->sctp_lport; + ((struct sockaddr_in *)addr)->sin_port = inp->sctp_lport; break; #endif #ifdef INET6 case AF_INET6: - addr->sin6.sin6_port = inp->sctp_lport; + ((struct sockaddr_in6 *)addr)->sin6_port = inp->sctp_lport; break; #endif default: /* TSNH */ break; } - addr = (union sctp_sockstore *)((caddr_t)addr + sa_len); + addr = (struct sockaddr *)((caddr_t)addr + sa_len); actual += sa_len; } } @@ -1226,7 +1226,7 @@ static size_t sctp_fill_up_addresses(struct sctp_inpcb *inp, struct sctp_tcb *stcb, size_t limit, - union sctp_sockstore *addr) + struct sockaddr *addr) { size_t size = 0; @@ -2207,7 +2207,7 @@ flags_out: */ { size_t cpsz, left; - union sctp_sockstore *addr; + struct sockaddr *addr; struct sctp_nets *net; struct sctp_getaddresses *saddr; @@ -2217,7 +2217,7 @@ flags_out: if (stcb) { left = *optsize - offsetof(struct sctp_getaddresses, addr); *optsize = offsetof(struct sctp_getaddresses, addr); - addr = &saddr->addr[0]; + addr = &saddr->addr[0].sa; TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { switch (net->ro._l_addr.sa.sa_family) { @@ -2255,16 +2255,16 @@ flags_out: (net->ro._l_addr.sa.sa_family == AF_INET)) { /* Must map the address */ in6_sin_2_v4mapsin6(&net->ro._l_addr.sin, - &addr->sin6); + (struct sockaddr_in6 *)addr); } else { memcpy(addr, &net->ro._l_addr, cpsz); } #else memcpy(addr, &net->ro._l_addr, cpsz); #endif - addr->sin.sin_port = stcb->rport; + ((struct sockaddr_in *)addr)->sin_port = stcb->rport; - addr = (union sctp_sockstore *)((caddr_t)addr + cpsz); + addr = (struct sockaddr *)((caddr_t)addr + cpsz); left -= cpsz; *optsize += cpsz; } @@ -2284,7 +2284,7 @@ flags_out: SCTP_FIND_STCB(inp, stcb, saddr->sget_assoc_id); limit = *optsize - offsetof(struct sctp_getaddresses, addr); - actual = sctp_fill_up_addresses(inp, stcb, limit, saddr->addr); + actual = sctp_fill_up_addresses(inp, stcb, limit, &saddr->addr[0].sa); if (stcb) { SCTP_TCB_UNLOCK(stcb); } From owner-svn-src-all@freebsd.org Mon Aug 24 08:32:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D250A3B5354; Mon, 24 Aug 2020 08:32:16 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZljX5Jg3z4MHC; Mon, 24 Aug 2020 08:32:16 +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 9976A156EB; Mon, 24 Aug 2020 08:32:16 +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 07O8WGJr074705; Mon, 24 Aug 2020 08:32:16 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8WG8S074704; Mon, 24 Aug 2020 08:32:16 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240832.07O8WG8S074704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:32:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364624 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364624 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:32:16 -0000 Author: tuexen Date: Mon Aug 24 08:32:16 2020 New Revision: 364624 URL: https://svnweb.freebsd.org/changeset/base/364624 Log: MFC r362581: Fix the acconting for fragmented unordered messages when using interleaving. This was reported for the userland stack in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19321 Modified: stable/12/sys/netinet/sctp_indata.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_indata.c ============================================================================== --- stable/12/sys/netinet/sctp_indata.c Mon Aug 24 08:30:36 2020 (r364623) +++ stable/12/sys/netinet/sctp_indata.c Mon Aug 24 08:32:16 2020 (r364624) @@ -1111,6 +1111,16 @@ sctp_deliver_reasm_check(struct sctp_tcb *stcb, struct #endif SCTP_STAT_INCR_COUNTER64(sctps_reasmusrmsgs); TAILQ_REMOVE(&strm->uno_inqueue, control, next_instrm); + if (asoc->size_on_all_streams >= control->length) { + asoc->size_on_all_streams -= control->length; + } else { +#ifdef INVARIANTS + panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, control->length); +#else + asoc->size_on_all_streams = 0; +#endif + } + sctp_ucount_decr(asoc->cnt_on_all_streams); control->on_strm_q = 0; } if (control->on_read_q == 0) { @@ -1391,7 +1401,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struc } /* Must be added to the stream-in queue */ if (created_control) { - if (unordered == 0) { + if ((unordered == 0) || (asoc->idata_supported)) { sctp_ucount_incr(asoc->cnt_on_all_streams); } if (sctp_place_control_in_stream(strm, asoc, control)) { From owner-svn-src-all@freebsd.org Mon Aug 24 08:33:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B5173B5375; Mon, 24 Aug 2020 08:33:33 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZll073nDz4MT3; Mon, 24 Aug 2020 08:33:32 +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 D5DC615AEE; Mon, 24 Aug 2020 08:33:32 +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 07O8XWu6077298; Mon, 24 Aug 2020 08:33:32 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8XWig077297; Mon, 24 Aug 2020 08:33:32 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240833.07O8XWig077297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364625 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364625 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:33:33 -0000 Author: tuexen Date: Mon Aug 24 08:33:32 2020 New Revision: 364625 URL: https://svnweb.freebsd.org/changeset/base/364625 Log: MFC r362720: Don't check ch for not being NULL, since that is true. Modified: stable/12/sys/netinet/sctp_input.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Mon Aug 24 08:32:16 2020 (r364624) +++ stable/12/sys/netinet/sctp_input.c Mon Aug 24 08:33:32 2020 (r364625) @@ -5106,7 +5106,7 @@ process_control_chunks: break; case SCTP_STREAM_RESET: SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_STREAM_RESET\n"); - if (((stcb == NULL) || (ch == NULL) || (chk_length < sizeof(struct sctp_stream_reset_tsn_req)))) { + if ((stcb == NULL) || (chk_length < sizeof(struct sctp_stream_reset_tsn_req))) { /* Its not ours */ *offset = length; return (stcb); @@ -5129,7 +5129,7 @@ process_control_chunks: return (stcb); } - if ((ch != NULL) && (stcb != NULL) && (netp != NULL) && (*netp != NULL)) { + if ((stcb != NULL) && (netp != NULL) && (*netp != NULL)) { if (stcb->asoc.pktdrop_supported == 0) { goto unknown_chunk; } @@ -5165,8 +5165,7 @@ process_control_chunks: goto next_chunk; } got_auth = 1; - if ((ch == NULL) || sctp_handle_auth(stcb, (struct sctp_auth_chunk *)ch, - m, *offset)) { + if (sctp_handle_auth(stcb, (struct sctp_auth_chunk *)ch, m, *offset)) { /* auth HMAC failed so dump the packet */ *offset = length; return (stcb); From owner-svn-src-all@freebsd.org Mon Aug 24 08:35:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 54DB13B5620; Mon, 24 Aug 2020 08:35:14 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlmy1d2Kz4MZ4; Mon, 24 Aug 2020 08:35:14 +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 1AF2E15E03; Mon, 24 Aug 2020 08:35:14 +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 07O8ZDAO077472; Mon, 24 Aug 2020 08:35:13 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8ZDcb077471; Mon, 24 Aug 2020 08:35:13 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240835.07O8ZDcb077471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:35:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364626 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364626 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:35:14 -0000 Author: tuexen Date: Mon Aug 24 08:35:13 2020 New Revision: 364626 URL: https://svnweb.freebsd.org/changeset/base/364626 Log: MFC r362722: Don't send packets containing ERROR chunks in response to unknown chunks when being in a state where the verification tag to be used is not known yet. Modified: stable/12/sys/netinet/sctp_input.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Mon Aug 24 08:33:32 2020 (r364625) +++ stable/12/sys/netinet/sctp_input.c Mon Aug 24 08:35:13 2020 (r364626) @@ -5178,7 +5178,11 @@ process_control_chunks: default: unknown_chunk: /* it's an unknown chunk! */ - if ((ch->chunk_type & 0x40) && (stcb != NULL)) { + if ((ch->chunk_type & 0x40) && + (stcb != NULL) && + (SCTP_GET_STATE(stcb) != SCTP_STATE_EMPTY) && + (SCTP_GET_STATE(stcb) != SCTP_STATE_INUSE) && + (SCTP_GET_STATE(stcb) != SCTP_STATE_COOKIE_WAIT)) { struct sctp_gen_error_cause *cause; int len; From owner-svn-src-all@freebsd.org Mon Aug 24 08:37:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80C703B55E4; Mon, 24 Aug 2020 08:37:30 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlqZ2rCCz4Mkf; Mon, 24 Aug 2020 08:37:30 +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 45FC8156EF; Mon, 24 Aug 2020 08:37:30 +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 07O8bUiX077674; Mon, 24 Aug 2020 08:37:30 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8bUGg077673; Mon, 24 Aug 2020 08:37:30 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240837.07O8bUGg077673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364627 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364627 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:37:30 -0000 Author: tuexen Date: Mon Aug 24 08:37:29 2020 New Revision: 364627 URL: https://svnweb.freebsd.org/changeset/base/364627 Log: MFC r362813: Fix a bug introduced in https://svnweb.freebsd.org/changeset/base/362173 Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Mon Aug 24 08:35:13 2020 (r364626) +++ stable/12/sys/netinet/sctputil.c Mon Aug 24 08:37:29 2020 (r364627) @@ -5238,7 +5238,11 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct soc if (holds_lock == 0) { SCTP_INP_RUNLOCK(inp); } - return (laddr->ifa); + if (laddr != NULL) { + return (laddr->ifa); + } else { + return (NULL); + } } uint32_t From owner-svn-src-all@freebsd.org Mon Aug 24 08:38:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E2703B57C4; Mon, 24 Aug 2020 08:38:59 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlsH2qTSz4MqP; Mon, 24 Aug 2020 08:38:59 +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 44FAF15E80; Mon, 24 Aug 2020 08:38:59 +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 07O8cx47077812; Mon, 24 Aug 2020 08:38:59 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8cxbn077811; Mon, 24 Aug 2020 08:38:59 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240838.07O8cxbn077811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:38:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364628 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364628 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:38:59 -0000 Author: tuexen Date: Mon Aug 24 08:38:58 2020 New Revision: 364628 URL: https://svnweb.freebsd.org/changeset/base/364628 Log: MFC r363008: Improve handling of PKTDROP chunks. This includes the input validation to address two issues found by ossfuzz testing the userland stack: * https://oss-fuzz.com/testcase-detail/5387560242380800 * https://oss-fuzz.com/testcase-detail/4887954068865024 and adding support for I-DATA chunks in addition to DATA chunks. Modified: stable/12/sys/netinet/sctp_input.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Mon Aug 24 08:37:29 2020 (r364627) +++ stable/12/sys/netinet/sctp_input.c Mon Aug 24 08:38:58 2020 (r364628) @@ -3046,7 +3046,8 @@ process_chunk_drop(struct sctp_tcb *stcb, struct sctp_ { switch (desc->chunk_type) { case SCTP_DATA: - /* find the tsn to resend (possibly */ + case SCTP_IDATA: + /* find the tsn to resend (possibly) */ { uint32_t tsn; struct sctp_tmit_chunk *tp1; @@ -3080,8 +3081,6 @@ process_chunk_drop(struct sctp_tcb *stcb, struct sctp_ SCTP_STAT_INCR(sctps_pdrptsnnf); } if ((tp1) && (tp1->sent < SCTP_DATAGRAM_ACKED)) { - uint8_t *ddp; - if (((flg & SCTP_BADCRC) == 0) && ((flg & SCTP_FROM_MIDDLE_BOX) == 0)) { return (0); @@ -3096,20 +3095,18 @@ process_chunk_drop(struct sctp_tcb *stcb, struct sctp_ SCTP_STAT_INCR(sctps_pdrpdizrw); return (0); } - ddp = (uint8_t *)(mtod(tp1->data, caddr_t)+ - sizeof(struct sctp_data_chunk)); - { - unsigned int iii; - - for (iii = 0; iii < sizeof(desc->data_bytes); - iii++) { - if (ddp[iii] != desc->data_bytes[iii]) { - SCTP_STAT_INCR(sctps_pdrpbadd); - return (-1); - } - } + if ((uint32_t)SCTP_BUF_LEN(tp1->data) < + SCTP_DATA_CHUNK_OVERHEAD(stcb) + SCTP_NUM_DB_TO_VERIFY) { + /* Payload not matching. */ + SCTP_STAT_INCR(sctps_pdrpbadd); + return (-1); } - + if (memcmp(mtod(tp1->data, caddr_t)+SCTP_DATA_CHUNK_OVERHEAD(stcb), + desc->data_bytes, SCTP_NUM_DB_TO_VERIFY) != 0) { + /* Payload not matching. */ + SCTP_STAT_INCR(sctps_pdrpbadd); + return (-1); + } if (tp1->do_rtt) { /* * this guy had a RTO calculation @@ -4135,104 +4132,126 @@ static void sctp_handle_packet_dropped(struct sctp_pktdrop_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t limit) { + struct sctp_chunk_desc desc; + struct sctp_chunkhdr *chk_hdr; + struct sctp_data_chunk *data_chunk; + struct sctp_idata_chunk *idata_chunk; uint32_t bottle_bw, on_queue; + uint32_t offset, chk_len; uint16_t trunc_len; - unsigned int chlen; - unsigned int at; - struct sctp_chunk_desc desc; - struct sctp_chunkhdr *ch; + uint16_t pktdrp_len; + uint8_t pktdrp_flags; - chlen = ntohs(cp->ch.chunk_length); - chlen -= sizeof(struct sctp_pktdrop_chunk); - /* XXX possible chlen underflow */ - if (chlen == 0) { - ch = NULL; - if (cp->ch.chunk_flags & SCTP_FROM_MIDDLE_BOX) + KASSERT(sizeof(struct sctp_pktdrop_chunk) <= limit, + ("PKTDROP chunk too small")); + pktdrp_flags = cp->ch.chunk_flags; + pktdrp_len = ntohs(cp->ch.chunk_length); + KASSERT(limit <= pktdrp_len, ("Inconsistent limit")); + if (pktdrp_flags & SCTP_PACKET_TRUNCATED) { + trunc_len = ntohs(cp->trunc_len); + if (trunc_len <= pktdrp_len - sizeof(struct sctp_pktdrop_chunk)) { + /* The peer plays games with us. */ + return; + } + } else { + trunc_len = 0; + } + limit -= sizeof(struct sctp_pktdrop_chunk); + offset = 0; + if (offset == limit) { + if (pktdrp_flags & SCTP_FROM_MIDDLE_BOX) { SCTP_STAT_INCR(sctps_pdrpbwrpt); + } + } else if (offset + sizeof(struct sctphdr) > limit) { + /* Only a partial SCTP common header. */ + SCTP_STAT_INCR(sctps_pdrpcrupt); + offset = limit; } else { - ch = (struct sctp_chunkhdr *)(cp->data + sizeof(struct sctphdr)); - chlen -= sizeof(struct sctphdr); - /* XXX possible chlen underflow */ - memset(&desc, 0, sizeof(desc)); + /* XXX: Check embedded SCTP common header. */ + offset += sizeof(struct sctphdr); } - trunc_len = (uint16_t)ntohs(cp->trunc_len); - if (trunc_len > limit) { - trunc_len = limit; - } - - /* now the chunks themselves */ - while ((ch != NULL) && (chlen >= sizeof(struct sctp_chunkhdr))) { - desc.chunk_type = ch->chunk_type; - /* get amount we need to move */ - at = ntohs(ch->chunk_length); - if (at < sizeof(struct sctp_chunkhdr)) { - /* corrupt chunk, maybe at the end? */ + /* Now parse through the chunks themselves. */ + while (offset < limit) { + if (offset + sizeof(struct sctp_chunkhdr) > limit) { SCTP_STAT_INCR(sctps_pdrpcrupt); break; } - if (trunc_len == 0) { - /* we are supposed to have all of it */ - if (at > chlen) { - /* corrupt skip it */ - SCTP_STAT_INCR(sctps_pdrpcrupt); + chk_hdr = (struct sctp_chunkhdr *)(cp->data + offset); + desc.chunk_type = chk_hdr->chunk_type; + /* get amount we need to move */ + chk_len = (uint32_t)ntohs(chk_hdr->chunk_length); + if (chk_len < sizeof(struct sctp_chunkhdr)) { + /* Someone is lying... */ + break; + } + if (desc.chunk_type == SCTP_DATA) { + if (stcb->asoc.idata_supported) { + /* Some is playing games with us. */ break; } - } else { - /* is there enough of it left ? */ - if (desc.chunk_type == SCTP_DATA) { - if (chlen < (sizeof(struct sctp_data_chunk) + - sizeof(desc.data_bytes))) { - break; - } - } else { - if (chlen < sizeof(struct sctp_chunkhdr)) { - break; - } + if (chk_len <= sizeof(struct sctp_data_chunk)) { + /* Some is playing games with us. */ + break; } - } - if (desc.chunk_type == SCTP_DATA) { - /* can we get out the tsn? */ - if ((cp->ch.chunk_flags & SCTP_FROM_MIDDLE_BOX)) + if (chk_len < sizeof(struct sctp_data_chunk) + SCTP_NUM_DB_TO_VERIFY) { + /* + * Not enough data bytes available in the + * chunk. + */ + SCTP_STAT_INCR(sctps_pdrpnedat); + goto next_chunk; + } + if (offset + sizeof(struct sctp_data_chunk) + SCTP_NUM_DB_TO_VERIFY > limit) { + /* Not enough data in buffer. */ + break; + } + data_chunk = (struct sctp_data_chunk *)(cp->data + offset); + memcpy(desc.data_bytes, data_chunk + 1, SCTP_NUM_DB_TO_VERIFY); + desc.tsn_ifany = data_chunk->dp.tsn; + if (pktdrp_flags & SCTP_FROM_MIDDLE_BOX) { SCTP_STAT_INCR(sctps_pdrpmbda); - - if (chlen >= (sizeof(struct sctp_data_chunk) + sizeof(uint32_t))) { - /* yep */ - struct sctp_data_chunk *dcp; - uint8_t *ddp; - unsigned int iii; - - dcp = (struct sctp_data_chunk *)ch; - ddp = (uint8_t *)(dcp + 1); - for (iii = 0; iii < sizeof(desc.data_bytes); iii++) { - desc.data_bytes[iii] = ddp[iii]; - } - desc.tsn_ifany = dcp->dp.tsn; - } else { - /* nope we are done. */ + } + } else if (desc.chunk_type == SCTP_IDATA) { + if (!stcb->asoc.idata_supported) { + /* Some is playing games with us. */ + break; + } + if (chk_len <= sizeof(struct sctp_idata_chunk)) { + /* Some is playing games with us. */ + break; + } + if (chk_len < sizeof(struct sctp_idata_chunk) + SCTP_NUM_DB_TO_VERIFY) { + /* + * Not enough data bytes available in the + * chunk. + */ SCTP_STAT_INCR(sctps_pdrpnedat); + goto next_chunk; + } + if (offset + sizeof(struct sctp_idata_chunk) + SCTP_NUM_DB_TO_VERIFY > limit) { + /* Not enough data in buffer. */ break; } + idata_chunk = (struct sctp_idata_chunk *)(cp->data + offset); + memcpy(desc.data_bytes, idata_chunk + 1, SCTP_NUM_DB_TO_VERIFY); + desc.tsn_ifany = idata_chunk->dp.tsn; + if (pktdrp_flags & SCTP_FROM_MIDDLE_BOX) { + SCTP_STAT_INCR(sctps_pdrpmbda); + } } else { - if ((cp->ch.chunk_flags & SCTP_FROM_MIDDLE_BOX)) + if (pktdrp_flags & SCTP_FROM_MIDDLE_BOX) { SCTP_STAT_INCR(sctps_pdrpmbct); + } } - - if (process_chunk_drop(stcb, &desc, net, cp->ch.chunk_flags)) { + if (process_chunk_drop(stcb, &desc, net, pktdrp_flags)) { SCTP_STAT_INCR(sctps_pdrppdbrk); break; } - if (SCTP_SIZE32(at) > chlen) { - break; - } - chlen -= SCTP_SIZE32(at); - if (chlen < sizeof(struct sctp_chunkhdr)) { - /* done, none left */ - break; - } - ch = (struct sctp_chunkhdr *)((caddr_t)ch + SCTP_SIZE32(at)); +next_chunk: + offset += SCTP_SIZE32(chk_len); } /* Now update any rwnd --- possibly */ - if ((cp->ch.chunk_flags & SCTP_FROM_MIDDLE_BOX) == 0) { + if ((pktdrp_flags & SCTP_FROM_MIDDLE_BOX) == 0) { /* From a peer, we get a rwnd report */ uint32_t a_rwnd; @@ -4268,7 +4287,7 @@ sctp_handle_packet_dropped(struct sctp_pktdrop_chunk * } /* now middle boxes in sat networks get a cwnd bump */ - if ((cp->ch.chunk_flags & SCTP_FROM_MIDDLE_BOX) && + if ((pktdrp_flags & SCTP_FROM_MIDDLE_BOX) && (stcb->asoc.sat_t3_loss_recovery == 0) && (stcb->asoc.sat_network)) { /* From owner-svn-src-all@freebsd.org Mon Aug 24 08:40:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6256D3B5658; Mon, 24 Aug 2020 08:40:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZltg1SDHz4NBr; Mon, 24 Aug 2020 08:40:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1508315CA1; Mon, 24 Aug 2020 08:40:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07O8eA4F077975; Mon, 24 Aug 2020 08:40:10 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8eAHk077974; Mon, 24 Aug 2020 08:40:10 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240840.07O8eAHk077974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:40:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364629 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:40:11 -0000 Author: tuexen Date: Mon Aug 24 08:40:10 2020 New Revision: 364629 URL: https://svnweb.freebsd.org/changeset/base/364629 Log: MFC r363010: Don't accept FORWARD-TSN chunks when I-FORWARD-TSN was negotiated and vice versa. Modified: stable/12/sys/netinet/sctp_input.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Mon Aug 24 08:38:58 2020 (r364628) +++ stable/12/sys/netinet/sctp_input.c Mon Aug 24 08:40:10 2020 (r364629) @@ -5089,7 +5089,8 @@ process_control_chunks: break; case SCTP_FORWARD_CUM_TSN: case SCTP_IFORWARD_CUM_TSN: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_FWD_TSN\n"); + SCTPDBG(SCTP_DEBUG_INPUT3, "%s\n", + ch->chunk_type == SCTP_FORWARD_CUM_TSN ? "FORWARD_TSN" : "I_FORWARD_TSN"); if (chk_length < sizeof(struct sctp_forward_tsn_chunk)) { /* Its not ours */ *offset = length; @@ -5101,6 +5102,18 @@ process_control_chunks: if (stcb->asoc.prsctp_supported == 0) { goto unknown_chunk; + } + if (((asoc->idata_supported == 1) && (ch->chunk_type == SCTP_FORWARD_CUM_TSN)) || + ((asoc->idata_supported == 0) && (ch->chunk_type == SCTP_IFORWARD_CUM_TSN))) { + if (ch->chunk_type == SCTP_FORWARD_CUM_TSN) { + SCTP_SNPRINTF(msg, sizeof(msg), "%s", "FORWARD-TSN chunk received when I-FORWARD-TSN was negotiated"); + } else { + SCTP_SNPRINTF(msg, sizeof(msg), "%s", "I-FORWARD-TSN chunk received when FORWARD-TSN was negotiated"); + } + op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); + sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); + *offset = length; + return (NULL); } *fwd_tsn_seen = 1; if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { From owner-svn-src-all@freebsd.org Mon Aug 24 08:41:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D67B43B5A24; Mon, 24 Aug 2020 08:41:22 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlw25RRKz4NT8; Mon, 24 Aug 2020 08:41:22 +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 9E31615B74; Mon, 24 Aug 2020 08:41:22 +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 07O8fMax081305; Mon, 24 Aug 2020 08:41:22 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8fM5e081304; Mon, 24 Aug 2020 08:41:22 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240841.07O8fM5e081304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364630 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364630 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:41:22 -0000 Author: tuexen Date: Mon Aug 24 08:41:22 2020 New Revision: 364630 URL: https://svnweb.freebsd.org/changeset/base/364630 Log: MFC r363011: Fix error description. Modified: stable/12/sys/netinet/sctp_indata.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_indata.c ============================================================================== --- stable/12/sys/netinet/sctp_indata.c Mon Aug 24 08:40:10 2020 (r364629) +++ stable/12/sys/netinet/sctp_indata.c Mon Aug 24 08:41:22 2020 (r364630) @@ -2745,7 +2745,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; - SCTP_SNPRINTF(msg, sizeof(msg), "%s", "I-DATA chunk received when DATA was negotiated"); + SCTP_SNPRINTF(msg, sizeof(msg), "%s", "DATA chunk received when I-DATA was negotiated"); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_20; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); @@ -2756,7 +2756,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; - SCTP_SNPRINTF(msg, sizeof(msg), "%s", "DATA chunk received when I-DATA was negotiated"); + SCTP_SNPRINTF(msg, sizeof(msg), "%s", "I-DATA chunk received when DATA was negotiated"); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_21; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); From owner-svn-src-all@freebsd.org Mon Aug 24 08:52:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 94CAA3B5C5A; Mon, 24 Aug 2020 08:52:24 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZm8m3W69z4PNH; Mon, 24 Aug 2020 08:52:24 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p4fd3a495.dip0.t-ipconnect.de [79.211.164.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 08DEC28DA5; Mon, 24 Aug 2020 08:52:23 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Mon, 24 Aug 2020 10:52:23 +0200 From: Gordon Bergling To: Hiroki Sato Cc: gbe@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364449 - head/bin/ls Message-ID: <20200824085223.GA28970@lion.0xfce3.net> References: <202008210620.07L6KC6M091289@repo.freebsd.org> <20200822.194438.808130473746317382.hrs@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lrZ03NoBR/3+SXJZ" Content-Disposition: inline In-Reply-To: <20200822.194438.808130473746317382.hrs@FreeBSD.org> X-Url: X-Operating-System: FreeBSD 12.1-STABLE amd64 X-Host-Uptime: 10:14AM up 12 days, 11:45, 3 users, load averages: 3.35, 3.71, 3.85 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:52:24 -0000 --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Hiroki, On Sat, Aug 22, 2020 at 07:44:38PM +0900, Hiroki Sato wrote: > Hi, >=20 > Gordon Bergling wrote > in <202008210620.07L6KC6M091289@repo.freebsd.org>: >=20 > gb> Author: gbe (doc committer) > gb> Date: Fri Aug 21 06:20:11 2020 > gb> New Revision: 364449 > gb> URL: https://svnweb.freebsd.org/changeset/base/364449 > gb> > gb> Log: > gb> ls(1): Update POSIX conformance from 2001 to 2008 > gb> > gb> - Update the options that are non-existing in POSIX from 2001 to 20= 08 > gb> - Update POSIX conformance in the STANDARDS section from 2001 to 20= 08 >=20 > Generally speaking, conformance with POSIX.1-2001 (SUSv3) and > POSIX.1-2008 (SUSv4) are independent, so a simple replacement by > s/2001/2008/ removes the former information. If we want to describe > -2008, please add it instead of replacing the prior version numbers. >=20 > -- Hiroki thanks for your feedback. I can only define POSIX.1-200{1,8} or -susv4. So = what do you think about the following STANDARDS section? For the options that are non-existing I could correct them to -2001 and men= tion also -susv4. STANDARDS With the exception of options -g, -n and -o, the ls utility conforms to IEEE Std 1003.1-2001 (=E2=80=9CPOSIX.1=E2=80=9D) and Version=C2=A04 of= the Single UNIX Specification (=E2=80=9CSUSv4=E2=80=9D). The options -B, -D, -G, -I, = -T, -U, -W, -Z, -b, -h, -w, -y and -, are compatible extensions not defined in IEEE Std 1003.1-2001 (=E2=80=9CPOSIX.1=E2=80=9D). --Gordon --lrZ03NoBR/3+SXJZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEEYbWI0KY5X7yH/Fy4OQX2V8rP09wFAl9Df8ZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDYx QjU4OEQwQTYzOTVGQkM4N0ZDNUNCODM5MDVGNjU3Q0FDRkQzREMACgkQOQX2V8rP 09z5yggAv22HrFPDGBKQRzMBbosxVlw8xAz3XcR+X4ZWoSEiLKvGPu6nC6CTskPe qOqbyxonrnSOCc5t+W/5Gpzft+118+43E9iWTEEikWL3NIxsk3JGjpcWy/Ra0Gvr 6X6A06KbjtgRzHJDSp/V0pw2DhqzZMLIHDei694u2uWsGuRv1yZMJY+U0BQM66mn ryZG0FWBygukr0/wlUnm/fmxJKj8Agu+cPLCi1e0kpolOa2bP/6axnzc+uL8yeqp eyECrKM+R3RwtabMWjuCY/IZYBZnEm46M4cglZjHw4Cwv6NOz/6EA2KpQMNuFoFE sGxoAFdbhwJ6AIvrQaP28d8HvlJHxg== =w4S+ -----END PGP SIGNATURE----- --lrZ03NoBR/3+SXJZ-- From owner-svn-src-all@freebsd.org Mon Aug 24 08:55:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C7E4D3B65AE; Mon, 24 Aug 2020 08:55:04 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmCr4qYZz4Pvc; Mon, 24 Aug 2020 08:55:04 +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 8868C1608D; Mon, 24 Aug 2020 08:55:04 +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 07O8t47B090510; Mon, 24 Aug 2020 08:55:04 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8t45T090509; Mon, 24 Aug 2020 08:55:04 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008240855.07O8t45T090509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 24 Aug 2020 08:55:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364631 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:55:04 -0000 Author: mjg Date: Mon Aug 24 08:55:04 2020 New Revision: 364631 URL: https://svnweb.freebsd.org/changeset/base/364631 Log: cache: populate v_cache_dd for non-VDIR entries It makes v_cache_dd into a little bit of a misnomer and it may be addressed later. Tested by: pho Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Mon Aug 24 08:41:22 2020 (r364630) +++ head/sys/kern/vfs_cache.c Mon Aug 24 08:55:04 2020 (r364631) @@ -2003,24 +2003,22 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, } if (vp != NULL) { - if (vp->v_type == VDIR) { - if (flag != NCF_ISDOTDOT) { - /* - * For this case, the cache entry maps both the - * directory name in it and the name ".." for the - * directory's parent. - */ - vn_seqc_write_begin(vp); - if ((ndd = vp->v_cache_dd) != NULL) { - if ((ndd->nc_flag & NCF_ISDOTDOT) != 0) - cache_zap_locked(ndd); - else - ndd = NULL; - } - vp->v_cache_dd = ncp; - vn_seqc_write_end(vp); + if (flag != NCF_ISDOTDOT) { + /* + * For this case, the cache entry maps both the + * directory name in it and the name ".." for the + * directory's parent. + */ + vn_seqc_write_begin(vp); + if ((ndd = vp->v_cache_dd) != NULL) { + if ((ndd->nc_flag & NCF_ISDOTDOT) != 0) + cache_zap_locked(ndd); + else + ndd = NULL; } - } else { + vp->v_cache_dd = ncp; + vn_seqc_write_end(vp); + } else if (vp->v_type != VDIR) { if (vp->v_cache_dd != NULL) { vn_seqc_write_begin(vp); vp->v_cache_dd = NULL; From owner-svn-src-all@freebsd.org Mon Aug 24 08:55:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F9083B678B; Mon, 24 Aug 2020 08:55:56 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmDr3l8Pz4Pqv; Mon, 24 Aug 2020 08:55:56 +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 63EF915DB9; Mon, 24 Aug 2020 08:55:56 +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 07O8tuQt090591; Mon, 24 Aug 2020 08:55:56 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8tup1090590; Mon, 24 Aug 2020 08:55:56 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008240855.07O8tup1090590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 24 Aug 2020 08:55:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364632 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364632 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:55:56 -0000 Author: mjg Date: Mon Aug 24 08:55:55 2020 New Revision: 364632 URL: https://svnweb.freebsd.org/changeset/base/364632 Log: cache: perform reverse lookup using v_cache_dd if possible Tested by: pho Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Mon Aug 24 08:55:04 2020 (r364631) +++ head/sys/kern/vfs_cache.c Mon Aug 24 08:55:55 2020 (r364632) @@ -2572,6 +2572,19 @@ vn_fullpath_global(struct thread *td, struct vnode *vn return (error); } +static struct namecache * +vn_dd_from_dst(struct vnode *vp) +{ + struct namecache *ncp; + + cache_assert_vnode_locked(vp); + TAILQ_FOREACH(ncp, &vp->v_cache_dst, nc_dst) { + if ((ncp->nc_flag & NCF_ISDOTDOT) == 0) + return (ncp); + } + return (NULL); +} + int vn_vptocnp(struct vnode **vp, struct ucred *cred, char *buf, size_t *buflen) { @@ -2582,9 +2595,13 @@ vn_vptocnp(struct vnode **vp, struct ucred *cred, char vlp = VP2VNODELOCK(*vp); mtx_lock(vlp); - TAILQ_FOREACH(ncp, &((*vp)->v_cache_dst), nc_dst) { - if ((ncp->nc_flag & NCF_ISDOTDOT) == 0) - break; + ncp = (*vp)->v_cache_dd; + if (ncp != NULL && (ncp->nc_flag & NCF_ISDOTDOT) == 0) { + KASSERT(ncp == vn_dd_from_dst(*vp), + ("%s: mismatch for dd entry (%p != %p)", __func__, + ncp, vn_dd_from_dst(*vp))); + } else { + ncp = vn_dd_from_dst(*vp); } if (ncp != NULL) { if (*buflen < ncp->nc_nlen) { From owner-svn-src-all@freebsd.org Mon Aug 24 08:57:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 626EB3B67A8; Mon, 24 Aug 2020 08:57:06 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmGB2Mqmz4Px3; Mon, 24 Aug 2020 08:57:06 +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 35C721612E; Mon, 24 Aug 2020 08:57:06 +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 07O8v6DU090709; Mon, 24 Aug 2020 08:57:06 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8v2v3090692; Mon, 24 Aug 2020 08:57:02 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008240857.07O8v2v3090692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 24 Aug 2020 08:57:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364633 - in head/sys: compat/linprocfs compat/linux dev/filemon dev/hwpmc fs/fdescfs fs/procfs kern security/audit sys vm X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: compat/linprocfs compat/linux dev/filemon dev/hwpmc fs/fdescfs fs/procfs kern security/audit sys vm X-SVN-Commit-Revision: 364633 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:57:06 -0000 Author: mjg Date: Mon Aug 24 08:57:02 2020 New Revision: 364633 URL: https://svnweb.freebsd.org/changeset/base/364633 Log: cache: drop the always curthread argument from reverse lookup routines Note VOP_VPTOCNP keeps getting it as temporary compatibility for zfs. Tested by: pho Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/compat/linux/linux_getcwd.c head/sys/dev/filemon/filemon_wrapper.c head/sys/dev/hwpmc/hwpmc_mod.c head/sys/fs/fdescfs/fdesc_vnops.c head/sys/fs/procfs/procfs.c head/sys/fs/procfs/procfs_map.c head/sys/kern/kern_exec.c head/sys/kern/kern_proc.c head/sys/kern/kern_sig.c head/sys/kern/sys_process.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_vnops.c head/sys/security/audit/audit_bsm_klib.c head/sys/sys/vnode.h head/sys/vm/vm_object.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/compat/linprocfs/linprocfs.c Mon Aug 24 08:57:02 2020 (r364633) @@ -426,7 +426,7 @@ linprocfs_domtab(PFS_FILL_ARGS) error = namei(&nd); lep = linux_emul_path; if (error == 0) { - if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) == 0) + if (vn_fullpath(nd.ni_vp, &dlep, &flep) == 0) lep = dlep; vrele(nd.ni_vp); } @@ -1053,7 +1053,7 @@ linprocfs_doproccwd(PFS_FILL_ARGS) char *freepath = NULL; pwd = pwd_hold(td); - vn_fullpath(td, pwd->pwd_cdir, &fullpath, &freepath); + vn_fullpath(pwd->pwd_cdir, &fullpath, &freepath); sbuf_printf(sb, "%s", fullpath); if (freepath) free(freepath, M_TEMP); @@ -1074,7 +1074,7 @@ linprocfs_doprocroot(PFS_FILL_ARGS) pwd = pwd_hold(td); vp = jailed(p->p_ucred) ? pwd->pwd_jdir : pwd->pwd_rdir; - vn_fullpath(td, vp, &fullpath, &freepath); + vn_fullpath(vp, &fullpath, &freepath); sbuf_printf(sb, "%s", fullpath); if (freepath) free(freepath, M_TEMP); @@ -1219,7 +1219,7 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) shadow_count = obj->shadow_count; VM_OBJECT_RUNLOCK(obj); if (vp != NULL) { - vn_fullpath(td, vp, &name, &freename); + vn_fullpath(vp, &name, &freename); vn_lock(vp, LK_SHARED | LK_RETRY); VOP_GETATTR(vp, &vat, td->td_ucred); ino = vat.va_fileid; Modified: head/sys/compat/linux/linux_getcwd.c ============================================================================== --- head/sys/compat/linux/linux_getcwd.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/compat/linux/linux_getcwd.c Mon Aug 24 08:57:02 2020 (r364633) @@ -73,7 +73,7 @@ linux_getcwd(struct thread *td, struct linux_getcwd_ar buflen = LINUX_PATH_MAX; buf = malloc(buflen, M_TEMP, M_WAITOK); - error = vn_getcwd(td, buf, &retbuf, &buflen); + error = vn_getcwd(buf, &retbuf, &buflen); if (error == 0) { error = copyout(retbuf, uap->buf, buflen); if (error == 0) Modified: head/sys/dev/filemon/filemon_wrapper.c ============================================================================== --- head/sys/dev/filemon/filemon_wrapper.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/dev/filemon/filemon_wrapper.c Mon Aug 24 08:57:02 2020 (r364633) @@ -186,8 +186,7 @@ _filemon_wrapper_openat(struct thread *td, const char */ if (getvnode(td, fd, cap_rights_init(&rights, CAP_LOOKUP), &fp) == 0) { - vn_fullpath(td, fp->f_vnode, &atpath, - &freepath); + vn_fullpath(fp->f_vnode, &atpath, &freepath); } } if (flags & O_RDWR) { Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/dev/hwpmc/hwpmc_mod.c Mon Aug 24 08:57:02 2020 (r364633) @@ -832,7 +832,7 @@ pmc_getfilename(struct vnode *v, char **fullpath, char *fullpath = "unknown"; *freepath = NULL; - vn_fullpath(curthread, v, fullpath, freepath); + vn_fullpath(v, fullpath, freepath); } /* Modified: head/sys/fs/fdescfs/fdesc_vnops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vnops.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/fs/fdescfs/fdesc_vnops.c Mon Aug 24 08:57:02 2020 (r364633) @@ -640,7 +640,7 @@ fdesc_readlink(struct vop_readlink_args *va) switch (fp->f_type) { case DTYPE_VNODE: vp = fp->f_vnode; - error = vn_fullpath(td, vp, &fullpath, &freepath); + error = vn_fullpath(vp, &fullpath, &freepath); break; default: fullpath = "anon_inode:[unknown]"; Modified: head/sys/fs/procfs/procfs.c ============================================================================== --- head/sys/fs/procfs/procfs.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/fs/procfs/procfs.c Mon Aug 24 08:57:02 2020 (r364633) @@ -79,7 +79,7 @@ procfs_doprocfile(PFS_FILL_ARGS) textvp = p->p_textvp; vhold(textvp); PROC_UNLOCK(p); - error = vn_fullpath(td, textvp, &fullpath, &freepath); + error = vn_fullpath(textvp, &fullpath, &freepath); vdrop(textvp); if (error == 0) sbuf_printf(sb, "%s", fullpath); Modified: head/sys/fs/procfs/procfs_map.c ============================================================================== --- head/sys/fs/procfs/procfs_map.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/fs/procfs/procfs_map.c Mon Aug 24 08:57:02 2020 (r364633) @@ -189,7 +189,7 @@ procfs_doprocmap(PFS_FILL_ARGS) shadow_count = obj->shadow_count; VM_OBJECT_RUNLOCK(obj); if (vp != NULL) { - vn_fullpath(td, vp, &fullpath, &freepath); + vn_fullpath(vp, &fullpath, &freepath); vrele(vp); } } else { Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/kern/kern_exec.c Mon Aug 24 08:57:02 2020 (r364633) @@ -575,8 +575,7 @@ interpret: imgp->execpath = args->fname; else { VOP_UNLOCK(imgp->vp); - if (vn_fullpath(td, imgp->vp, &imgp->execpath, - &imgp->freepath) != 0) + if (vn_fullpath(imgp->vp, &imgp->execpath, &imgp->freepath) != 0) imgp->execpath = args->fname; vn_lock(imgp->vp, LK_SHARED | LK_RETRY); } Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/kern/kern_proc.c Mon Aug 24 08:57:02 2020 (r364633) @@ -2237,7 +2237,7 @@ sysctl_kern_proc_pathname(SYSCTL_HANDLER_ARGS) vref(vp); if (*pidp != -1) PROC_UNLOCK(p); - error = vn_fullpath(req->td, vp, &retbuf, &freebuf); + error = vn_fullpath(vp, &retbuf, &freebuf); vrele(vp); if (error) return (error); @@ -2375,8 +2375,7 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_ARGS) kve->kve_shadow_count = obj->shadow_count; VM_OBJECT_RUNLOCK(obj); if (vp != NULL) { - vn_fullpath(curthread, vp, &fullpath, - &freepath); + vn_fullpath(vp, &fullpath, &freepath); cred = curthread->td_ucred; vn_lock(vp, LK_SHARED | LK_RETRY); if (VOP_GETATTR(vp, &va, cred) == 0) { @@ -2584,8 +2583,7 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, s kve->kve_shadow_count = obj->shadow_count; VM_OBJECT_RUNLOCK(obj); if (vp != NULL) { - vn_fullpath(curthread, vp, &fullpath, - &freepath); + vn_fullpath(vp, &fullpath, &freepath); kve->kve_vn_type = vntype_to_kinfo(vp->v_type); cred = curthread->td_ucred; vn_lock(vp, LK_SHARED | LK_RETRY); Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/kern/kern_sig.c Mon Aug 24 08:57:02 2020 (r364633) @@ -3731,7 +3731,7 @@ coredump(struct thread *td) if (error != 0 || coredump_devctl == 0) goto out; sb = sbuf_new_auto(); - if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0) + if (vn_fullpath_global(p->p_textvp, &fullpath, &freepath) != 0) goto out2; sbuf_printf(sb, "comm=\""); devctl_safe_quote_sb(sb, fullpath); @@ -3746,7 +3746,7 @@ coredump(struct thread *td) if (name[0] != '/') { fullpathsize = MAXPATHLEN; freepath = malloc(fullpathsize, M_TEMP, M_WAITOK); - if (vn_getcwd(td, freepath, &fullpath, &fullpathsize) != 0) { + if (vn_getcwd(freepath, &fullpath, &fullpathsize) != 0) { free(freepath, M_TEMP); goto out2; } Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/kern/sys_process.c Mon Aug 24 08:57:02 2020 (r364633) @@ -418,7 +418,7 @@ ptrace_vm_entry(struct thread *td, struct proc *p, str if (vp != NULL) { freepath = NULL; fullpath = NULL; - vn_fullpath(td, vp, &fullpath, &freepath); + vn_fullpath(vp, &fullpath, &freepath); vn_lock(vp, LK_SHARED | LK_RETRY); if (VOP_GETATTR(vp, &vattr, td->td_ucred) == 0) { pve->pve_fileid = vattr.va_fileid; Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/kern/vfs_cache.c Mon Aug 24 08:57:02 2020 (r364633) @@ -475,12 +475,12 @@ STATNODE_COUNTER(shrinking_skipped, "Number of times shrinking was already in progress"); static void cache_zap_locked(struct namecache *ncp); -static int vn_fullpath_hardlink(struct thread *td, struct nameidata *ndp, char **retbuf, +static int vn_fullpath_hardlink(struct nameidata *ndp, char **retbuf, char **freebuf, size_t *buflen); -static int vn_fullpath_any(struct thread *td, struct vnode *vp, struct vnode *rdir, - char *buf, char **retbuf, size_t *buflen); -static int vn_fullpath_dir(struct thread *td, struct vnode *vp, struct vnode *rdir, - char *buf, char **retbuf, size_t *len, bool slash_prefixed, size_t addend); +static int vn_fullpath_any(struct vnode *vp, struct vnode *rdir, char *buf, + char **retbuf, size_t *buflen); +static int vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, char *buf, + char **retbuf, size_t *len, bool slash_prefixed, size_t addend); static MALLOC_DEFINE(M_VFSCACHE, "vfscache", "VFS name cache entries"); @@ -2463,7 +2463,7 @@ sys___getcwd(struct thread *td, struct __getcwd_args * buflen = MAXPATHLEN; buf = uma_zalloc(namei_zone, M_WAITOK); - error = vn_getcwd(td, buf, &retbuf, &buflen); + error = vn_getcwd(buf, &retbuf, &buflen); if (error == 0) error = copyout(retbuf, uap->buf, buflen); uma_zfree(namei_zone, buf); @@ -2471,13 +2471,13 @@ sys___getcwd(struct thread *td, struct __getcwd_args * } int -vn_getcwd(struct thread *td, char *buf, char **retbuf, size_t *buflen) +vn_getcwd(char *buf, char **retbuf, size_t *buflen) { struct pwd *pwd; int error; - pwd = pwd_hold(td); - error = vn_fullpath_any(td, pwd->pwd_cdir, pwd->pwd_rdir, buf, retbuf, buflen); + pwd = pwd_hold(curthread); + error = vn_fullpath_any(pwd->pwd_cdir, pwd->pwd_rdir, buf, retbuf, buflen); pwd_drop(pwd); #ifdef KTRACE @@ -2501,7 +2501,7 @@ kern___realpathat(struct thread *td, int fd, const cha pathseg, path, fd, &cap_fstat_rights, td); if ((error = namei(&nd)) != 0) return (error); - error = vn_fullpath_hardlink(td, &nd, &retbuf, &freebuf, &size); + error = vn_fullpath_hardlink(&nd, &retbuf, &freebuf, &size); if (error == 0) { error = copyout(retbuf, buf, size); free(freebuf, M_TEMP); @@ -2523,23 +2523,22 @@ sys___realpathat(struct thread *td, struct __realpatha * cache (if available) */ int -vn_fullpath(struct thread *td, struct vnode *vn, char **retbuf, char **freebuf) +vn_fullpath(struct vnode *vp, char **retbuf, char **freebuf) { struct pwd *pwd; char *buf; size_t buflen; int error; - if (__predict_false(vn == NULL)) + if (__predict_false(vp == NULL)) return (EINVAL); buflen = MAXPATHLEN; buf = malloc(buflen, M_TEMP, M_WAITOK); - pwd = pwd_hold(td); - error = vn_fullpath_any(td, vn, pwd->pwd_rdir, buf, retbuf, &buflen); + pwd = pwd_hold(curthread); + error = vn_fullpath_any(vp, pwd->pwd_rdir, buf, retbuf, &buflen); pwd_drop(pwd); - - if (!error) + if (error == 0) *freebuf = buf; else free(buf, M_TEMP); @@ -2553,19 +2552,18 @@ vn_fullpath(struct thread *td, struct vnode *vn, char * global root mount point. */ int -vn_fullpath_global(struct thread *td, struct vnode *vn, - char **retbuf, char **freebuf) +vn_fullpath_global(struct vnode *vp, char **retbuf, char **freebuf) { char *buf; size_t buflen; int error; - if (__predict_false(vn == NULL)) + if (__predict_false(vp == NULL)) return (EINVAL); buflen = MAXPATHLEN; buf = malloc(buflen, M_TEMP, M_WAITOK); - error = vn_fullpath_any(td, vn, rootvnode, buf, retbuf, &buflen); - if (!error) + error = vn_fullpath_any(vp, rootvnode, buf, retbuf, &buflen); + if (error == 0) *freebuf = buf; else free(buf, M_TEMP); @@ -2661,8 +2659,8 @@ vn_vptocnp(struct vnode **vp, struct ucred *cred, char * The vnode must be referenced. */ static int -vn_fullpath_dir(struct thread *td, struct vnode *vp, struct vnode *rdir, - char *buf, char **retbuf, size_t *len, bool slash_prefixed, size_t addend) +vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, + size_t *len, bool slash_prefixed, size_t addend) { #ifdef KDTRACE_HOOKS struct vnode *startvp = vp; @@ -2727,7 +2725,7 @@ vn_fullpath_dir(struct thread *td, struct vnode *vp, s error, vp, NULL); break; } - error = vn_vptocnp(&vp, td->td_ucred, buf, &buflen); + error = vn_vptocnp(&vp, curthread->td_ucred, buf, &buflen); if (error) break; if (buflen == 0) { @@ -2772,8 +2770,8 @@ vn_fullpath_dir(struct thread *td, struct vnode *vp, s * (in which case resolving fails) */ static int -vn_fullpath_any(struct thread *td, struct vnode *vp, struct vnode *rdir, - char *buf, char **retbuf, size_t *buflen) +vn_fullpath_any(struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, + size_t *buflen) { size_t orig_buflen; bool slash_prefixed; @@ -2789,7 +2787,7 @@ vn_fullpath_any(struct thread *td, struct vnode *vp, s if (vp->v_type != VDIR) { *buflen -= 1; buf[*buflen] = '\0'; - error = vn_vptocnp(&vp, td->td_ucred, buf, buflen); + error = vn_vptocnp(&vp, curthread->td_ucred, buf, buflen); if (error) return (error); if (*buflen == 0) { @@ -2801,7 +2799,7 @@ vn_fullpath_any(struct thread *td, struct vnode *vp, s slash_prefixed = true; } - return (vn_fullpath_dir(td, vp, rdir, buf, retbuf, buflen, slash_prefixed, + return (vn_fullpath_dir(vp, rdir, buf, retbuf, buflen, slash_prefixed, orig_buflen - *buflen)); } @@ -2818,8 +2816,8 @@ vn_fullpath_any(struct thread *td, struct vnode *vp, s * from the parent */ static int -vn_fullpath_hardlink(struct thread *td, struct nameidata *ndp, char **retbuf, - char **freebuf, size_t *buflen) +vn_fullpath_hardlink(struct nameidata *ndp, char **retbuf, char **freebuf, + size_t *buflen) { char *buf, *tmpbuf; struct pwd *pwd; @@ -2838,7 +2836,7 @@ vn_fullpath_hardlink(struct thread *td, struct nameida slash_prefixed = false; buf = malloc(*buflen, M_TEMP, M_WAITOK); - pwd = pwd_hold(td); + pwd = pwd_hold(curthread); addend = 0; vp = ndp->ni_vp; @@ -2883,7 +2881,7 @@ vn_fullpath_hardlink(struct thread *td, struct nameida } vref(vp); - error = vn_fullpath_dir(td, vp, pwd->pwd_rdir, buf, retbuf, buflen, + error = vn_fullpath_dir(vp, pwd->pwd_rdir, buf, retbuf, buflen, slash_prefixed, addend); if (error != 0) goto out_bad; @@ -2969,7 +2967,7 @@ vn_path_to_global_path(struct thread *td, struct vnode /* Construct global filesystem path from vp. */ VOP_UNLOCK(vp); - error = vn_fullpath_global(td, vp, &rpath, &fbuf); + error = vn_fullpath_global(vp, &rpath, &fbuf); if (error != 0) { vrele(vp); Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/kern/vfs_vnops.c Mon Aug 24 08:57:02 2020 (r364633) @@ -2513,7 +2513,7 @@ vn_fill_kinfo_vnode(struct vnode *vp, struct kinfo_fil kif->kf_un.kf_file.kf_file_type = vntype_to_kinfo(vp->v_type); freepath = NULL; fullpath = "-"; - error = vn_fullpath(curthread, vp, &fullpath, &freepath); + error = vn_fullpath(vp, &fullpath, &freepath); if (error == 0) { strlcpy(kif->kf_path, fullpath, sizeof(kif->kf_path)); } Modified: head/sys/security/audit/audit_bsm_klib.c ============================================================================== --- head/sys/security/audit/audit_bsm_klib.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/security/audit/audit_bsm_klib.c Mon Aug 24 08:57:02 2020 (r364633) @@ -463,7 +463,7 @@ audit_canon_path_vp(struct thread *td, struct vnode *r * on Darwin. As a result, this may need some additional attention * in the future. */ - error = vn_fullpath_global(td, vp, &rbuf, &fbuf); + error = vn_fullpath_global(vp, &rbuf, &fbuf); if (error) { cpath[0] = '\0'; return; Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/sys/vnode.h Mon Aug 24 08:57:02 2020 (r364633) @@ -660,11 +660,9 @@ u_quad_t init_va_filerev(void); int speedup_syncer(void); int vn_vptocnp(struct vnode **vp, struct ucred *cred, char *buf, size_t *buflen); -int vn_getcwd(struct thread *td, char *buf, char **retbuf, size_t *buflen); -int vn_fullpath(struct thread *td, struct vnode *vn, - char **retbuf, char **freebuf); -int vn_fullpath_global(struct thread *td, struct vnode *vn, - char **retbuf, char **freebuf); +int vn_getcwd(char *buf, char **retbuf, size_t *buflen); +int vn_fullpath(struct vnode *vp, char **retbuf, char **freebuf); +int vn_fullpath_global(struct vnode *vp, char **retbuf, char **freebuf); struct vnode * vn_dir_dd_ino(struct vnode *vp); int vn_commname(struct vnode *vn, char *buf, u_int buflen); Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Mon Aug 24 08:55:55 2020 (r364632) +++ head/sys/vm/vm_object.c Mon Aug 24 08:57:02 2020 (r364633) @@ -2582,7 +2582,7 @@ sysctl_vm_object_list(SYSCTL_HANDLER_ARGS) vref(vp); VM_OBJECT_RUNLOCK(obj); if (vp != NULL) { - vn_fullpath(curthread, vp, &fullpath, &freepath); + vn_fullpath(vp, &fullpath, &freepath); vn_lock(vp, LK_SHARED | LK_RETRY); if (VOP_GETATTR(vp, &va, curthread->td_ucred) == 0) { kvo->kvo_vn_fileid = va.va_fileid; From owner-svn-src-all@freebsd.org Mon Aug 24 08:57:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 90B723B682F; Mon, 24 Aug 2020 08:57:28 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmGc3G5sz4QGb; Mon, 24 Aug 2020 08:57:28 +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 5356A15DBB; Mon, 24 Aug 2020 08:57:28 +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 07O8vSt2090767; Mon, 24 Aug 2020 08:57:28 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8vSZX090766; Mon, 24 Aug 2020 08:57:28 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240857.07O8vSZX090766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364634 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364634 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:57:28 -0000 Author: tuexen Date: Mon Aug 24 08:57:27 2020 New Revision: 364634 URL: https://svnweb.freebsd.org/changeset/base/364634 Log: MFC r363012: Improve consistency. Modified: stable/12/sys/netinet/sctp_input.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Mon Aug 24 08:57:02 2020 (r364633) +++ stable/12/sys/netinet/sctp_input.c Mon Aug 24 08:57:27 2020 (r364634) @@ -5103,8 +5103,8 @@ process_control_chunks: if (stcb->asoc.prsctp_supported == 0) { goto unknown_chunk; } - if (((asoc->idata_supported == 1) && (ch->chunk_type == SCTP_FORWARD_CUM_TSN)) || - ((asoc->idata_supported == 0) && (ch->chunk_type == SCTP_IFORWARD_CUM_TSN))) { + if (((stcb->asoc.idata_supported == 1) && (ch->chunk_type == SCTP_FORWARD_CUM_TSN)) || + ((stcb->asoc.idata_supported == 0) && (ch->chunk_type == SCTP_IFORWARD_CUM_TSN))) { if (ch->chunk_type == SCTP_FORWARD_CUM_TSN) { SCTP_SNPRINTF(msg, sizeof(msg), "%s", "FORWARD-TSN chunk received when I-FORWARD-TSN was negotiated"); } else { From owner-svn-src-all@freebsd.org Mon Aug 24 08:58:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 487273B676A; Mon, 24 Aug 2020 08:58:46 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmJ60tFxz4QMw; Mon, 24 Aug 2020 08:58:46 +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 01B231608E; Mon, 24 Aug 2020 08:58:46 +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 07O8wj3U090882; Mon, 24 Aug 2020 08:58:45 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8wjPr090881; Mon, 24 Aug 2020 08:58:45 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240858.07O8wjPr090881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364635 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364635 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 08:58:46 -0000 Author: tuexen Date: Mon Aug 24 08:58:45 2020 New Revision: 364635 URL: https://svnweb.freebsd.org/changeset/base/364635 Log: MFC r363046: Optimize flushing of receive queues. This addresses an issue found and reported for the userland stack in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21243 Modified: stable/12/sys/netinet/sctp_indata.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_indata.c ============================================================================== --- stable/12/sys/netinet/sctp_indata.c Mon Aug 24 08:57:27 2020 (r364634) +++ stable/12/sys/netinet/sctp_indata.c Mon Aug 24 08:58:45 2020 (r364635) @@ -5411,11 +5411,9 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb, static void sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb, - struct sctp_association *asoc, - uint16_t stream, uint32_t mid, int ordered, uint32_t cumtsn) + struct sctp_association *asoc, struct sctp_stream_in *strm, + struct sctp_queued_to_read *control, int ordered, uint32_t cumtsn) { - struct sctp_queued_to_read *control; - struct sctp_stream_in *strm; struct sctp_tmit_chunk *chk, *nchk; int cnt_removed = 0; @@ -5427,12 +5425,6 @@ sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb, * it can be delivered... But for now we just dump everything on the * queue. */ - strm = &asoc->strmin[stream]; - control = sctp_find_reasm_entry(strm, mid, ordered, asoc->idata_supported); - if (control == NULL) { - /* Not found */ - return; - } if (!asoc->idata_supported && !ordered && SCTP_TSN_GT(control->fsn_included, cumtsn)) { return; } @@ -5609,7 +5601,10 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, /* Flush all the un-ordered data based on cum-tsn */ SCTP_INP_READ_LOCK(stcb->sctp_ep); for (sid = 0; sid < asoc->streamincnt; sid++) { - sctp_flush_reassm_for_str_seq(stcb, asoc, sid, 0, 0, new_cum_tsn); + strm = &asoc->strmin[sid]; + if (!TAILQ_EMPTY(&strm->uno_inqueue)) { + sctp_flush_reassm_for_str_seq(stcb, asoc, strm, TAILQ_FIRST(&strm->uno_inqueue), 0, new_cum_tsn); + } } SCTP_INP_READ_UNLOCK(stcb->sctp_ep); } @@ -5621,7 +5616,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, if (m && fwd_sz) { /* New method. */ unsigned int num_str; - uint32_t mid, cur_mid; + uint32_t mid; uint16_t sid; uint16_t ordered, flags; struct sctp_strseq *stseq, strseqbuf; @@ -5688,8 +5683,24 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, asoc->fragmented_delivery_inprogress = 0; } strm = &asoc->strmin[sid]; - for (cur_mid = strm->last_mid_delivered; SCTP_MID_GE(asoc->idata_supported, mid, cur_mid); cur_mid++) { - sctp_flush_reassm_for_str_seq(stcb, asoc, sid, cur_mid, ordered, new_cum_tsn); + if (ordered) { + TAILQ_FOREACH(control, &strm->inqueue, next_instrm) { + if (SCTP_MID_GE(asoc->idata_supported, mid, control->mid)) { + sctp_flush_reassm_for_str_seq(stcb, asoc, strm, control, ordered, new_cum_tsn); + } + } + } else { + if (asoc->idata_supported) { + TAILQ_FOREACH(control, &strm->uno_inqueue, next_instrm) { + if (SCTP_MID_GE(asoc->idata_supported, mid, control->mid)) { + sctp_flush_reassm_for_str_seq(stcb, asoc, strm, control, ordered, new_cum_tsn); + } + } + } else { + if (!TAILQ_EMPTY(&strm->uno_inqueue)) { + sctp_flush_reassm_for_str_seq(stcb, asoc, strm, TAILQ_FIRST(&strm->uno_inqueue), ordered, new_cum_tsn); + } + } } TAILQ_FOREACH(control, &stcb->sctp_ep->read_queue, next) { if ((control->sinfo_stream == sid) && From owner-svn-src-all@freebsd.org Mon Aug 24 09:00:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D4A003B6B0E; Mon, 24 Aug 2020 09:00:07 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmKg5Lkhz4QYh; Mon, 24 Aug 2020 09:00:07 +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 9B06D16060; Mon, 24 Aug 2020 09:00:07 +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 07O907di091070; Mon, 24 Aug 2020 09:00:07 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O907e3091069; Mon, 24 Aug 2020 09:00:07 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240900.07O907e3091069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 09:00:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364636 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364636 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:00:07 -0000 Author: tuexen Date: Mon Aug 24 09:00:07 2020 New Revision: 364636 URL: https://svnweb.freebsd.org/changeset/base/364636 Log: MFC r363076: Fix a use-after-free bug for the userland stack. The kernel stack is not affected. Thanks to Mark Wodrich from Google for finding and reporting the bug. Modified: stable/12/sys/netinet/sctp_indata.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_indata.c ============================================================================== --- stable/12/sys/netinet/sctp_indata.c Mon Aug 24 08:58:45 2020 (r364635) +++ stable/12/sys/netinet/sctp_indata.c Mon Aug 24 09:00:07 2020 (r364636) @@ -1700,6 +1700,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc int *break_flag, int last_chunk, uint8_t chk_type) { struct sctp_tmit_chunk *chk = NULL; /* make gcc happy */ + struct sctp_stream_in *strm; uint32_t tsn, fsn, gap, mid; struct mbuf *dmbuf; int the_len; @@ -2327,12 +2328,13 @@ finish_express_del: /* All can be removed */ TAILQ_FOREACH_SAFE(control, &asoc->pending_reply_queue, next, ncontrol) { TAILQ_REMOVE(&asoc->pending_reply_queue, control, next); + strm = &asoc->strmin[control->sinfo_stream]; sctp_queue_data_to_stream(stcb, asoc, control, abort_flag, &need_reasm_check); if (*abort_flag) { return (0); } if (need_reasm_check) { - (void)sctp_deliver_reasm_check(stcb, asoc, &asoc->strmin[control->sinfo_stream], SCTP_READ_LOCK_NOT_HELD); + (void)sctp_deliver_reasm_check(stcb, asoc, strm, SCTP_READ_LOCK_NOT_HELD); need_reasm_check = 0; } } @@ -2347,12 +2349,13 @@ finish_express_del: * control->sinfo_tsn > liste->tsn */ TAILQ_REMOVE(&asoc->pending_reply_queue, control, next); + strm = &asoc->strmin[control->sinfo_stream]; sctp_queue_data_to_stream(stcb, asoc, control, abort_flag, &need_reasm_check); if (*abort_flag) { return (0); } if (need_reasm_check) { - (void)sctp_deliver_reasm_check(stcb, asoc, &asoc->strmin[control->sinfo_stream], SCTP_READ_LOCK_NOT_HELD); + (void)sctp_deliver_reasm_check(stcb, asoc, strm, SCTP_READ_LOCK_NOT_HELD); need_reasm_check = 0; } } From owner-svn-src-all@freebsd.org Mon Aug 24 09:00:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D0D43B6B40; Mon, 24 Aug 2020 09:00:58 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmLf2mbmz4QxX; Mon, 24 Aug 2020 09:00:58 +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 4250016139; Mon, 24 Aug 2020 09:00:58 +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 07O90wVR093089; Mon, 24 Aug 2020 09:00:58 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O90w9Y093073; Mon, 24 Aug 2020 09:00:58 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008240900.07O90w9Y093073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 24 Aug 2020 09:00:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364637 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364637 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:00:58 -0000 Author: mjg Date: Mon Aug 24 09:00:57 2020 New Revision: 364637 URL: https://svnweb.freebsd.org/changeset/base/364637 Log: cache: lockless reverse lookup This enables fully scalable operation for getcwd and significantly improves realpath. For example: PATH_CUSTOM=/usr/src ./getcwd_processes -t 104 before: 1550851 after: 380135380 Tested by: pho Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Mon Aug 24 09:00:07 2020 (r364636) +++ head/sys/kern/vfs_cache.c Mon Aug 24 09:00:57 2020 (r364637) @@ -85,6 +85,10 @@ SDT_PROBE_DEFINE3(vfs, namecache, enter, done, "struct "struct vnode *"); SDT_PROBE_DEFINE2(vfs, namecache, enter_negative, done, "struct vnode *", "char *"); +SDT_PROBE_DEFINE2(vfs, namecache, fullpath_smr, hit, "struct vnode *", + "const char *"); +SDT_PROBE_DEFINE4(vfs, namecache, fullpath_smr, miss, "struct vnode *", + "struct namecache *", "int", "int"); SDT_PROBE_DEFINE1(vfs, namecache, fullpath, entry, "struct vnode *"); SDT_PROBE_DEFINE3(vfs, namecache, fullpath, hit, "struct vnode *", "char *", "struct vnode *"); @@ -298,6 +302,10 @@ static u_int __read_mostly ncsize; /* the size as comp struct nchstats nchstats; /* cache effectiveness statistics */ +static bool __read_frequently cache_fast_revlookup = true; +SYSCTL_BOOL(_vfs, OID_AUTO, cache_fast_revlookup, CTLFLAG_RW, + &cache_fast_revlookup, 0, ""); + static struct mtx __exclusive_cache_line ncneg_shrink_lock; struct neglist { @@ -477,6 +485,8 @@ STATNODE_COUNTER(shrinking_skipped, static void cache_zap_locked(struct namecache *ncp); static int vn_fullpath_hardlink(struct nameidata *ndp, char **retbuf, char **freebuf, size_t *buflen); +static int vn_fullpath_any_smr(struct vnode *vp, struct vnode *rdir, char *buf, + char **retbuf, size_t *buflen, bool slash_prefixed, size_t addend); static int vn_fullpath_any(struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, size_t *buflen); static int vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, char *buf, @@ -2476,9 +2486,17 @@ vn_getcwd(char *buf, char **retbuf, size_t *buflen) struct pwd *pwd; int error; - pwd = pwd_hold(curthread); - error = vn_fullpath_any(pwd->pwd_cdir, pwd->pwd_rdir, buf, retbuf, buflen); - pwd_drop(pwd); + vfs_smr_enter(); + pwd = pwd_get_smr(); + error = vn_fullpath_any_smr(pwd->pwd_cdir, pwd->pwd_rdir, buf, retbuf, + buflen, false, 0); + VFS_SMR_ASSERT_NOT_ENTERED(); + if (error < 0) { + pwd = pwd_hold(curthread); + error = vn_fullpath_any(pwd->pwd_cdir, pwd->pwd_rdir, buf, + retbuf, buflen); + pwd_drop(pwd); + } #ifdef KTRACE if (KTRPOINT(curthread, KTR_NAMEI) && error == 0) @@ -2535,9 +2553,15 @@ vn_fullpath(struct vnode *vp, char **retbuf, char **fr buflen = MAXPATHLEN; buf = malloc(buflen, M_TEMP, M_WAITOK); - pwd = pwd_hold(curthread); - error = vn_fullpath_any(vp, pwd->pwd_rdir, buf, retbuf, &buflen); - pwd_drop(pwd); + vfs_smr_enter(); + pwd = pwd_get_smr(); + error = vn_fullpath_any_smr(vp, pwd->pwd_rdir, buf, retbuf, &buflen, false, 0); + VFS_SMR_ASSERT_NOT_ENTERED(); + if (error < 0) { + pwd = pwd_hold(curthread); + error = vn_fullpath_any(vp, pwd->pwd_rdir, buf, retbuf, &buflen); + pwd_drop(pwd); + } if (error == 0) *freebuf = buf; else @@ -2562,7 +2586,12 @@ vn_fullpath_global(struct vnode *vp, char **retbuf, ch return (EINVAL); buflen = MAXPATHLEN; buf = malloc(buflen, M_TEMP, M_WAITOK); - error = vn_fullpath_any(vp, rootvnode, buf, retbuf, &buflen); + vfs_smr_enter(); + error = vn_fullpath_any_smr(vp, rootvnode, buf, retbuf, &buflen, false, 0); + VFS_SMR_ASSERT_NOT_ENTERED(); + if (error < 0) { + error = vn_fullpath_any(vp, rootvnode, buf, retbuf, &buflen); + } if (error == 0) *freebuf = buf; else @@ -2769,7 +2798,145 @@ vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, * - namecache is not mandatory, meaning names are not guaranteed to be added * (in which case resolving fails) */ +static void __inline +cache_rev_failed_impl(int *reason, int line) +{ + + *reason = line; +} +#define cache_rev_failed(var) cache_rev_failed_impl((var), __LINE__) + static int +vn_fullpath_any_smr(struct vnode *vp, struct vnode *rdir, char *buf, + char **retbuf, size_t *buflen, bool slash_prefixed, size_t addend) +{ +#ifdef KDTRACE_HOOKS + struct vnode *startvp = vp; +#endif + struct vnode *tvp; + struct mount *mp; + struct namecache *ncp; + size_t orig_buflen; + int reason; + int error; +#ifdef KDTRACE_HOOKS + int i; +#endif + seqc_t vp_seqc, tvp_seqc; + u_char nc_flag; + + VFS_SMR_ASSERT_ENTERED(); + + if (!cache_fast_revlookup) { + vfs_smr_exit(); + return (-1); + } + + orig_buflen = *buflen; + + MPASS(*buflen >= 2); + + if (!slash_prefixed) { + MPASS(*buflen >= 2); + *buflen -= 1; + buf[*buflen] = '\0'; + } + + if (vp == rdir || vp == rootvnode) { + if (!slash_prefixed) { + *buflen -= 1; + buf[*buflen] = '/'; + } + goto out_ok; + } + +#ifdef KDTRACE_HOOKS + i = 0; +#endif + error = -1; + vp_seqc = vn_seqc_read_any(vp); + if (seqc_in_modify(vp_seqc)) { + cache_rev_failed(&reason); + goto out_abort; + } + + for (;;) { +#ifdef KDTRACE_HOOKS + i++; +#endif + if ((vp->v_vflag & VV_ROOT) != 0) { + mp = atomic_load_ptr(&vp->v_mount); + if (mp == NULL) { + cache_rev_failed(&reason); + goto out_abort; + } + tvp = atomic_load_ptr(&mp->mnt_vnodecovered); + tvp_seqc = vn_seqc_read_any(tvp); + if (seqc_in_modify(tvp_seqc)) { + cache_rev_failed(&reason); + goto out_abort; + } + if (!vn_seqc_consistent(vp, vp_seqc)) { + cache_rev_failed(&reason); + goto out_abort; + } + vp = tvp; + vp_seqc = tvp_seqc; + continue; + } + ncp = atomic_load_ptr(&vp->v_cache_dd); + if (ncp == NULL) { + cache_rev_failed(&reason); + goto out_abort; + } + nc_flag = atomic_load_char(&ncp->nc_flag); + if ((nc_flag & NCF_ISDOTDOT) != 0) { + cache_rev_failed(&reason); + goto out_abort; + } + if (!cache_ncp_canuse(ncp)) { + cache_rev_failed(&reason); + goto out_abort; + } + if (ncp->nc_nlen >= *buflen) { + cache_rev_failed(&reason); + error = ENOMEM; + goto out_abort; + } + *buflen -= ncp->nc_nlen; + memcpy(buf + *buflen, ncp->nc_name, ncp->nc_nlen); + *buflen -= 1; + buf[*buflen] = '/'; + tvp = ncp->nc_dvp; + tvp_seqc = vn_seqc_read_any(tvp); + if (seqc_in_modify(tvp_seqc)) { + cache_rev_failed(&reason); + goto out_abort; + } + if (!vn_seqc_consistent(vp, vp_seqc)) { + cache_rev_failed(&reason); + goto out_abort; + } + vp = tvp; + vp_seqc = tvp_seqc; + if (vp == rdir || vp == rootvnode) + break; + } +out_ok: + vfs_smr_exit(); + *retbuf = buf + *buflen; + *buflen = orig_buflen - *buflen + addend; + SDT_PROBE2(vfs, namecache, fullpath_smr, hit, startvp, *retbuf); + return (0); + +out_abort: + *buflen = orig_buflen; + SDT_PROBE4(vfs, namecache, fullpath_smr, miss, startvp, ncp, reason, i); + vfs_smr_exit(); + return (error); +} + +static int vn_fullpath_any(struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, size_t *buflen) { @@ -2836,7 +3003,6 @@ vn_fullpath_hardlink(struct nameidata *ndp, char **ret slash_prefixed = false; buf = malloc(*buflen, M_TEMP, M_WAITOK); - pwd = pwd_hold(curthread); addend = 0; vp = ndp->ni_vp; @@ -2880,18 +3046,25 @@ vn_fullpath_hardlink(struct nameidata *ndp, char **ret vp = ndp->ni_dvp; } - vref(vp); - error = vn_fullpath_dir(vp, pwd->pwd_rdir, buf, retbuf, buflen, + vfs_smr_enter(); + pwd = pwd_get_smr(); + error = vn_fullpath_any_smr(vp, pwd->pwd_rdir, buf, retbuf, buflen, slash_prefixed, addend); - if (error != 0) - goto out_bad; + VFS_SMR_ASSERT_NOT_ENTERED(); + if (error < 0) { + pwd = pwd_hold(curthread); + vref(vp); + error = vn_fullpath_dir(vp, pwd->pwd_rdir, buf, retbuf, buflen, + slash_prefixed, addend); + pwd_drop(pwd); + if (error != 0) + goto out_bad; + } - pwd_drop(pwd); *freebuf = buf; return (0); out_bad: - pwd_drop(pwd); free(buf, M_TEMP); return (error); } From owner-svn-src-all@freebsd.org Mon Aug 24 09:06:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B91603B7016; Mon, 24 Aug 2020 09:06:47 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmTM4RnZz4R2F; Mon, 24 Aug 2020 09:06:47 +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 7C0011622D; Mon, 24 Aug 2020 09:06:47 +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 07O96lBC096824; Mon, 24 Aug 2020 09:06:47 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O96l0x096822; Mon, 24 Aug 2020 09:06:47 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240906.07O96l0x096822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 09:06:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364638 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364638 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:06:47 -0000 Author: tuexen Date: Mon Aug 24 09:06:46 2020 New Revision: 364638 URL: https://svnweb.freebsd.org/changeset/base/364638 Log: MFC r363194: Improve the error handling in generating ASCONF chunks. In case of errors, the cleanup was not consistent. Thanks to Felix Weinrank for fuzzing the userland stack and making me aware of the issue. Modified: stable/12/sys/netinet/sctp_asconf.c stable/12/sys/netinet/sctp_input.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_asconf.c ============================================================================== --- stable/12/sys/netinet/sctp_asconf.c Mon Aug 24 09:00:57 2020 (r364637) +++ stable/12/sys/netinet/sctp_asconf.c Mon Aug 24 09:06:46 2020 (r364638) @@ -2600,14 +2600,14 @@ sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen if (m_asconf_chk == NULL) { /* no mbuf's */ SCTPDBG(SCTP_DEBUG_ASCONF1, - "compose_asconf: couldn't get chunk mbuf!\n"); + "sctp_compose_asconf: couldn't get chunk mbuf!\n"); return (NULL); } m_asconf = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA); if (m_asconf == NULL) { /* no mbuf's */ SCTPDBG(SCTP_DEBUG_ASCONF1, - "compose_asconf: couldn't get mbuf!\n"); + "sctp_compose_asconf: couldn't get mbuf!\n"); sctp_m_freem(m_asconf_chk); return (NULL); } @@ -2732,10 +2732,12 @@ sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen break; #endif default: - p_size = 0; - addr_size = 0; - addr_ptr = NULL; - break; + SCTPDBG(SCTP_DEBUG_ASCONF1, + "sctp_compose_asconf: no usable lookup addr (family = %d)!\n", + found_addr->sa_family); + sctp_m_freem(m_asconf_chk); + sctp_m_freem(m_asconf); + return (NULL); } lookup->ph.param_length = htons(SCTP_SIZE32(p_size)); memcpy(lookup->addr, addr_ptr, addr_size); @@ -2743,12 +2745,10 @@ sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen } else { /* uh oh... don't have any address?? */ SCTPDBG(SCTP_DEBUG_ASCONF1, - "compose_asconf: no lookup addr!\n"); - /* XXX for now, we send a IPv4 address of 0.0.0.0 */ - lookup->ph.param_type = htons(SCTP_IPV4_ADDRESS); - lookup->ph.param_length = htons(SCTP_SIZE32(sizeof(struct sctp_ipv4addr_param))); - memset(lookup->addr, 0, sizeof(struct in_addr)); - SCTP_BUF_LEN(m_asconf_chk) += SCTP_SIZE32(sizeof(struct sctp_ipv4addr_param)); + "sctp_compose_asconf: no lookup addr!\n"); + sctp_m_freem(m_asconf_chk); + sctp_m_freem(m_asconf); + return (NULL); } } /* chain it all together */ @@ -3274,10 +3274,9 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb *inp, struct so } void -sctp_asconf_send_nat_state_update(struct sctp_tcb *stcb, - struct sctp_nets *net) +sctp_asconf_send_nat_state_update(struct sctp_tcb *stcb, struct sctp_nets *net) { - struct sctp_asconf_addr *aa; + struct sctp_asconf_addr *aa_vtag, *aa_add, *aa_del; struct sctp_ifa *sctp_ifap; struct sctp_asconf_tag_param *vtag; #ifdef INET @@ -3286,6 +3285,7 @@ sctp_asconf_send_nat_state_update(struct sctp_tcb *stc #ifdef INET6 struct sockaddr_in6 *to6; #endif + if (net == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "sctp_asconf_send_nat_state_update: Missing net\n"); return; @@ -3295,105 +3295,81 @@ sctp_asconf_send_nat_state_update(struct sctp_tcb *stc return; } /* - * Need to have in the asconf: - vtagparam(my_vtag/peer_vtag) - - * add(0.0.0.0) - del(0.0.0.0) - Any global addresses add(addr) + * Need to have in the ASCONF: - VTAG(my_vtag/peer_vtag) - + * ADD(wildcard) - DEL(wildcard) - ADD(Any global addresses) */ - SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa), - SCTP_M_ASC_ADDR); - if (aa == NULL) { - /* didn't get memory */ - SCTPDBG(SCTP_DEBUG_ASCONF1, - "sctp_asconf_send_nat_state_update: failed to get memory!\n"); + SCTP_MALLOC(aa_vtag, struct sctp_asconf_addr *, sizeof(struct sctp_asconf_addr), SCTP_M_ASC_ADDR); + SCTP_MALLOC(aa_add, struct sctp_asconf_addr *, sizeof(struct sctp_asconf_addr), SCTP_M_ASC_ADDR); + SCTP_MALLOC(aa_del, struct sctp_asconf_addr *, sizeof(struct sctp_asconf_addr), SCTP_M_ASC_ADDR); + + if ((aa_vtag == NULL) || (aa_add == NULL) || (aa_del == NULL)) { + /* Didn't get memory */ + SCTPDBG(SCTP_DEBUG_ASCONF1, "sctp_asconf_send_nat_state_update: failed to get memory!\n"); +out: + if (aa_vtag != NULL) { + SCTP_FREE(aa_vtag, SCTP_M_ASC_ADDR); + } + if (aa_add != NULL) { + SCTP_FREE(aa_add, SCTP_M_ASC_ADDR); + } + if (aa_del != NULL) { + SCTP_FREE(aa_del, SCTP_M_ASC_ADDR); + } return; } - aa->special_del = 0; - /* fill in asconf address parameter fields */ - /* top level elements are "networked" during send */ - aa->ifa = NULL; - aa->sent = 0; /* clear sent flag */ - vtag = (struct sctp_asconf_tag_param *)&aa->ap.aph; + memset(aa_vtag, 0, sizeof(struct sctp_asconf_addr)); + aa_vtag->special_del = 0; + /* Fill in ASCONF address parameter fields. */ + /* Top level elements are "networked" during send. */ + aa_vtag->ifa = NULL; + aa_vtag->sent = 0; /* clear sent flag */ + vtag = (struct sctp_asconf_tag_param *)&aa_vtag->ap.aph; vtag->aph.ph.param_type = SCTP_NAT_VTAGS; vtag->aph.ph.param_length = sizeof(struct sctp_asconf_tag_param); vtag->local_vtag = htonl(stcb->asoc.my_vtag); vtag->remote_vtag = htonl(stcb->asoc.peer_vtag); - TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); - SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa), - SCTP_M_ASC_ADDR); - if (aa == NULL) { - /* didn't get memory */ - SCTPDBG(SCTP_DEBUG_ASCONF1, - "sctp_asconf_send_nat_state_update: failed to get memory!\n"); - return; - } - memset(aa, 0, sizeof(struct sctp_asconf_addr)); - /* fill in asconf address parameter fields */ - /* ADD(0.0.0.0) */ + memset(aa_add, 0, sizeof(struct sctp_asconf_addr)); + memset(aa_del, 0, sizeof(struct sctp_asconf_addr)); switch (net->ro._l_addr.sa.sa_family) { #ifdef INET case AF_INET: - aa->ap.aph.ph.param_type = SCTP_ADD_IP_ADDRESS; - aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addrv4_param); - aa->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS; - aa->ap.addrp.ph.param_length = sizeof(struct sctp_ipv4addr_param); - /* No need to add an address, we are using 0.0.0.0 */ - TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); + aa_add->ap.aph.ph.param_type = SCTP_ADD_IP_ADDRESS; + aa_add->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addrv4_param); + aa_add->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS; + aa_add->ap.addrp.ph.param_length = sizeof(struct sctp_ipv4addr_param); + /* No need to fill the address, we are using 0.0.0.0 */ + aa_del->ap.aph.ph.param_type = SCTP_ADD_IP_ADDRESS; + aa_del->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addrv4_param); + aa_del->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS; + aa_del->ap.addrp.ph.param_length = sizeof(struct sctp_ipv4addr_param); + /* No need to fill the address, we are using 0.0.0.0 */ break; #endif #ifdef INET6 case AF_INET6: - aa->ap.aph.ph.param_type = SCTP_ADD_IP_ADDRESS; - aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addr_param); - aa->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS; - aa->ap.addrp.ph.param_length = sizeof(struct sctp_ipv6addr_param); - /* No need to add an address, we are using 0.0.0.0 */ - TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); + aa_add->ap.aph.ph.param_type = SCTP_ADD_IP_ADDRESS; + aa_add->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addr_param); + aa_add->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS; + aa_add->ap.addrp.ph.param_length = sizeof(struct sctp_ipv6addr_param); + /* No need to fill the address, we are using ::0 */ + aa_del->ap.aph.ph.param_type = SCTP_DEL_IP_ADDRESS; + aa_del->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addr_param); + aa_del->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS; + aa_del->ap.addrp.ph.param_length = sizeof(struct sctp_ipv6addr_param); + /* No need to fill the address, we are using ::0 */ break; #endif default: SCTPDBG(SCTP_DEBUG_ASCONF1, - "sctp_asconf_send_nat_state_update: unknown address family\n"); - SCTP_FREE(aa, SCTP_M_ASC_ADDR); - return; + "sctp_asconf_send_nat_state_update: unknown address family %d\n", + net->ro._l_addr.sa.sa_family); + goto out; } - SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa), - SCTP_M_ASC_ADDR); - if (aa == NULL) { - /* didn't get memory */ - SCTPDBG(SCTP_DEBUG_ASCONF1, - "sctp_asconf_send_nat_state_update: failed to get memory!\n"); - return; - } - memset(aa, 0, sizeof(struct sctp_asconf_addr)); - /* fill in asconf address parameter fields */ - /* ADD(0.0.0.0) */ - switch (net->ro._l_addr.sa.sa_family) { -#ifdef INET - case AF_INET: - aa->ap.aph.ph.param_type = SCTP_ADD_IP_ADDRESS; - aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addrv4_param); - aa->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS; - aa->ap.addrp.ph.param_length = sizeof(struct sctp_ipv4addr_param); - /* No need to add an address, we are using 0.0.0.0 */ - TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); - break; -#endif -#ifdef INET6 - case AF_INET6: - aa->ap.aph.ph.param_type = SCTP_DEL_IP_ADDRESS; - aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_addr_param); - aa->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS; - aa->ap.addrp.ph.param_length = sizeof(struct sctp_ipv6addr_param); - /* No need to add an address, we are using 0.0.0.0 */ - TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); - break; -#endif - default: - SCTPDBG(SCTP_DEBUG_ASCONF1, - "sctp_asconf_send_nat_state_update: unknown address family\n"); - SCTP_FREE(aa, SCTP_M_ASC_ADDR); - return; - } + TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa_vtag, next); + TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa_add, next); + TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa_del, next); + /* Now we must hunt the addresses and add all global addresses */ if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) { struct sctp_vrf *vrf = NULL; Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Mon Aug 24 09:00:57 2020 (r364637) +++ stable/12/sys/netinet/sctp_input.c Mon Aug 24 09:06:46 2020 (r364638) @@ -800,13 +800,13 @@ sctp_handle_abort(struct sctp_abort_chunk *abort, cause = (struct sctp_error_cause *)(abort + 1); error = ntohs(cause->code); if (error == SCTP_CAUSE_NAT_COLLIDING_STATE) { - SCTPDBG(SCTP_DEBUG_INPUT2, "Received Colliding state abort flags:%x\n", + SCTPDBG(SCTP_DEBUG_INPUT2, "Received Colliding state, ABORT flags:%x\n", abort->ch.chunk_flags); if (sctp_handle_nat_colliding_state(stcb)) { return (0); } } else if (error == SCTP_CAUSE_NAT_MISSING_STATE) { - SCTPDBG(SCTP_DEBUG_INPUT2, "Received missing state abort flags:%x\n", + SCTPDBG(SCTP_DEBUG_INPUT2, "Received missing state, ABORT flags:%x\n", abort->ch.chunk_flags); if (sctp_handle_nat_missing_state(stcb, net)) { return (0); @@ -1146,14 +1146,14 @@ sctp_handle_error(struct sctp_chunkhdr *ch, cause_code); break; case SCTP_CAUSE_NAT_COLLIDING_STATE: - SCTPDBG(SCTP_DEBUG_INPUT2, "Received Colliding state abort flags: %x\n", + SCTPDBG(SCTP_DEBUG_INPUT2, "Received Colliding state, ERROR flags: %x\n", ch->chunk_flags); if (sctp_handle_nat_colliding_state(stcb)) { return (0); } break; case SCTP_CAUSE_NAT_MISSING_STATE: - SCTPDBG(SCTP_DEBUG_INPUT2, "Received missing state abort flags: %x\n", + SCTPDBG(SCTP_DEBUG_INPUT2, "Received missing state, ERROR flags: %x\n", ch->chunk_flags); if (sctp_handle_nat_missing_state(stcb, net)) { return (0); From owner-svn-src-all@freebsd.org Mon Aug 24 09:10:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF5623B7117; Mon, 24 Aug 2020 09:10:20 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmYS4fTlz4RP7; Mon, 24 Aug 2020 09:10:20 +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 83FF61622E; Mon, 24 Aug 2020 09:10:20 +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 07O9AK7c097088; Mon, 24 Aug 2020 09:10:20 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O9AJ6n097082; Mon, 24 Aug 2020 09:10:19 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240910.07O9AJ6n097082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 09:10:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364639 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364639 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:10:20 -0000 Author: tuexen Date: Mon Aug 24 09:10:19 2020 New Revision: 364639 URL: https://svnweb.freebsd.org/changeset/base/364639 Log: MFC r363275: Improve the locking of address lists by adding some asserts and rearranging the addition of address such that the lock is not given up during checking and adding. Modified: stable/12/sys/netinet/sctp_lock_bsd.h stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctp_usrreq.c stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_lock_bsd.h ============================================================================== --- stable/12/sys/netinet/sctp_lock_bsd.h Mon Aug 24 09:06:46 2020 (r364638) +++ stable/12/sys/netinet/sctp_lock_bsd.h Mon Aug 24 09:10:19 2020 (r364639) @@ -177,6 +177,13 @@ __FBSDID("$FreeBSD$"); rw_wunlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \ } while (0) +#define SCTP_IPI_ADDR_LOCK_ASSERT() do { \ + rw_assert(&SCTP_BASE_INFO(ipi_addr_mtx), RA_LOCKED); \ +} while (0) + +#define SCTP_IPI_ADDR_WLOCK_ASSERT() do { \ + rw_assert(&SCTP_BASE_INFO(ipi_addr_mtx), RA_WLOCKED); \ +} while (0) #define SCTP_IPI_ITERATOR_WQ_INIT() do { \ mtx_init(&sctp_it_ctl.ipi_iterator_wq_mtx, "sctp-it-wq", \ Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 09:06:46 2020 (r364638) +++ stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 09:10:19 2020 (r364639) @@ -200,6 +200,7 @@ sctp_find_ifn(void *ifn, uint32_t ifn_index) * We assume the lock is held for the addresses if that's wrong * problems could occur :-) */ + SCTP_IPI_ADDR_LOCK_ASSERT(); hash_ifn_head = &SCTP_BASE_INFO(vrf_ifn_hash)[(ifn_index & SCTP_BASE_INFO(vrf_ifn_hashmark))]; LIST_FOREACH(sctp_ifnp, hash_ifn_head, next_bucket) { if (sctp_ifnp->ifn_index == ifn_index) { @@ -295,12 +296,16 @@ sctp_delete_ifn(struct sctp_ifn *sctp_ifnp, int hold_a /* Not in the list.. sorry */ return; } - if (hold_addr_lock == 0) + if (hold_addr_lock == 0) { SCTP_IPI_ADDR_WLOCK(); + } else { + SCTP_IPI_ADDR_WLOCK_ASSERT(); + } LIST_REMOVE(sctp_ifnp, next_bucket); LIST_REMOVE(sctp_ifnp, next_ifn); - if (hold_addr_lock == 0) + if (hold_addr_lock == 0) { SCTP_IPI_ADDR_WUNLOCK(); + } /* Take away the reference, and possibly free it */ sctp_free_ifn(sctp_ifnp); } @@ -486,8 +491,8 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 int dynamic_add) { struct sctp_vrf *vrf; - struct sctp_ifn *sctp_ifnp = NULL; - struct sctp_ifa *sctp_ifap = NULL; + struct sctp_ifn *sctp_ifnp, *new_sctp_ifnp; + struct sctp_ifa *sctp_ifap, *new_sctp_ifap; struct sctp_ifalist *hash_addr_head; struct sctp_ifnlist *hash_ifn_head; uint32_t hash_of_addr; @@ -497,6 +502,23 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 SCTPDBG(SCTP_DEBUG_PCB4, "vrf_id 0x%x: adding address: ", vrf_id); SCTPDBG_ADDR(SCTP_DEBUG_PCB4, addr); #endif + SCTP_MALLOC(new_sctp_ifnp, struct sctp_ifn *, + sizeof(struct sctp_ifn), SCTP_M_IFN); + if (new_sctp_ifnp == NULL) { +#ifdef INVARIANTS + panic("No memory for IFN"); +#endif + return (NULL); + } + SCTP_MALLOC(new_sctp_ifap, struct sctp_ifa *, sizeof(struct sctp_ifa), SCTP_M_IFA); + if (new_sctp_ifap == NULL) { +#ifdef INVARIANTS + panic("No memory for IFA"); +#endif + SCTP_FREE(new_sctp_ifnp, SCTP_M_IFN); + return (NULL); + } + SCTP_IPI_ADDR_WLOCK(); sctp_ifnp = sctp_find_ifn(ifn, ifn_index); if (sctp_ifnp) { @@ -507,6 +529,8 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 vrf = sctp_allocate_vrf(vrf_id); if (vrf == NULL) { SCTP_IPI_ADDR_WUNLOCK(); + SCTP_FREE(new_sctp_ifnp, SCTP_M_IFN); + SCTP_FREE(new_sctp_ifap, SCTP_M_IFA); return (NULL); } } @@ -516,15 +540,8 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 * build one and add it, can't hold lock until after malloc * done though. */ - SCTP_IPI_ADDR_WUNLOCK(); - SCTP_MALLOC(sctp_ifnp, struct sctp_ifn *, - sizeof(struct sctp_ifn), SCTP_M_IFN); - if (sctp_ifnp == NULL) { -#ifdef INVARIANTS - panic("No memory for IFN"); -#endif - return (NULL); - } + sctp_ifnp = new_sctp_ifnp; + new_sctp_ifnp = NULL; memset(sctp_ifnp, 0, sizeof(struct sctp_ifn)); sctp_ifnp->ifn_index = ifn_index; sctp_ifnp->ifn_p = ifn; @@ -540,7 +557,6 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 } hash_ifn_head = &SCTP_BASE_INFO(vrf_ifn_hash)[(ifn_index & SCTP_BASE_INFO(vrf_ifn_hashmark))]; LIST_INIT(&sctp_ifnp->ifalist); - SCTP_IPI_ADDR_WLOCK(); LIST_INSERT_HEAD(hash_ifn_head, sctp_ifnp, next_bucket); LIST_INSERT_HEAD(&vrf->ifnlist, sctp_ifnp, next_ifn); atomic_add_int(&SCTP_BASE_INFO(ipi_count_ifns), 1); @@ -567,6 +583,10 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 } exit_stage_left: SCTP_IPI_ADDR_WUNLOCK(); + if (new_sctp_ifnp != NULL) { + SCTP_FREE(new_sctp_ifnp, SCTP_M_IFN); + } + SCTP_FREE(new_sctp_ifap, SCTP_M_IFA); return (sctp_ifap); } else { if (sctp_ifap->ifn_p) { @@ -593,14 +613,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 goto exit_stage_left; } } - SCTP_IPI_ADDR_WUNLOCK(); - SCTP_MALLOC(sctp_ifap, struct sctp_ifa *, sizeof(struct sctp_ifa), SCTP_M_IFA); - if (sctp_ifap == NULL) { -#ifdef INVARIANTS - panic("No memory for IFA"); -#endif - return (NULL); - } + sctp_ifap = new_sctp_ifap; memset(sctp_ifap, 0, sizeof(struct sctp_ifa)); sctp_ifap->ifn_p = sctp_ifnp; atomic_add_int(&sctp_ifnp->refcount, 1); @@ -660,7 +673,6 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 (sctp_ifap->src_is_loop == 0)) { sctp_ifap->src_is_glob = 1; } - SCTP_IPI_ADDR_WLOCK(); hash_addr_head = &vrf->vrf_addr_hash[(hash_of_addr & vrf->vrf_addr_hashmark)]; LIST_INSERT_HEAD(hash_addr_head, sctp_ifap, next_bucket); sctp_ifap->refcount = 1; @@ -672,6 +684,10 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint3 sctp_ifnp->registered_af = new_ifn_af; } SCTP_IPI_ADDR_WUNLOCK(); + if (new_sctp_ifnp != NULL) { + SCTP_FREE(new_sctp_ifnp, SCTP_M_IFN); + } + if (dynamic_add) { /* * Bump up the refcount so that when the timer completes it @@ -5921,6 +5937,7 @@ retry: * free the vrf/ifn/ifa lists and hashes (be sure address monitor is * destroyed first). */ + SCTP_IPI_ADDR_WLOCK(); vrf_bucket = &SCTP_BASE_INFO(sctp_vrfhash)[(SCTP_DEFAULT_VRFID & SCTP_BASE_INFO(hashvrfmark))]; LIST_FOREACH_SAFE(vrf, vrf_bucket, next_vrf, nvrf) { LIST_FOREACH_SAFE(ifn, &vrf->ifnlist, next_ifn, nifn) { @@ -5940,6 +5957,7 @@ retry: LIST_REMOVE(vrf, next_vrf); SCTP_FREE(vrf, SCTP_M_VRF); } + SCTP_IPI_ADDR_WUNLOCK(); /* free the vrf hashes */ SCTP_HASH_FREE(SCTP_BASE_INFO(sctp_vrfhash), SCTP_BASE_INFO(hashvrfmark)); SCTP_HASH_FREE(SCTP_BASE_INFO(vrf_ifn_hash), SCTP_BASE_INFO(vrf_ifn_hashmark)); Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Mon Aug 24 09:06:46 2020 (r364638) +++ stable/12/sys/netinet/sctp_usrreq.c Mon Aug 24 09:10:19 2020 (r364639) @@ -984,9 +984,6 @@ sctp_fill_user_address(struct sockaddr *dst, struct so -/* - * NOTE: assumes addr lock is held - */ static size_t sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, struct sctp_tcb *stcb, @@ -1006,6 +1003,7 @@ sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp, #endif struct sctp_vrf *vrf; + SCTP_IPI_ADDR_LOCK_ASSERT(); actual = 0; if (limit == 0) return (actual); @@ -1238,9 +1236,6 @@ sctp_fill_up_addresses(struct sctp_inpcb *inp, return (size); } -/* - * NOTE: assumes addr lock is held - */ static int sctp_count_max_addresses_vrf(struct sctp_inpcb *inp, uint32_t vrf_id) { @@ -1254,6 +1249,7 @@ sctp_count_max_addresses_vrf(struct sctp_inpcb *inp, u * bound-all case a TCB may NOT include the loopback or other * addresses as well. */ + SCTP_IPI_ADDR_LOCK_ASSERT(); vrf = sctp_find_vrf(vrf_id); if (vrf == NULL) { return (0); Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Mon Aug 24 09:06:46 2020 (r364638) +++ stable/12/sys/netinet/sctputil.c Mon Aug 24 09:10:19 2020 (r364639) @@ -5287,8 +5287,11 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t struct sctp_ifalist *hash_head; uint32_t hash_of_addr; - if (holds_lock == 0) + if (holds_lock == 0) { SCTP_IPI_ADDR_RLOCK(); + } else { + SCTP_IPI_ADDR_LOCK_ASSERT(); + } vrf = sctp_find_vrf(vrf_id); if (vrf == NULL) { @@ -6417,7 +6420,7 @@ sctp_dynamic_set_primary(struct sockaddr *sa, uint32_t struct sctp_ifa *ifa; struct sctp_laddr *wi; - ifa = sctp_find_ifa_by_addr(sa, vrf_id, 0); + ifa = sctp_find_ifa_by_addr(sa, vrf_id, SCTP_ADDR_NOT_LOCKED); if (ifa == NULL) { SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTPUTIL, EADDRNOTAVAIL); return (EADDRNOTAVAIL); From owner-svn-src-all@freebsd.org Mon Aug 24 09:11:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5CFD23B71D3; Mon, 24 Aug 2020 09:11:38 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmZy1rJzz4RcM; Mon, 24 Aug 2020 09:11:38 +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 223A01641A; Mon, 24 Aug 2020 09:11:38 +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 07O9BcB4098929; Mon, 24 Aug 2020 09:11:38 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O9BbAw098928; Mon, 24 Aug 2020 09:11:37 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240911.07O9BbAw098928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 09:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364640 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364640 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:11:38 -0000 Author: tuexen Date: Mon Aug 24 09:11:37 2020 New Revision: 364640 URL: https://svnweb.freebsd.org/changeset/base/364640 Log: MFC r363309: Remove code which is not needed. Modified: stable/12/sys/netinet/sctp_pcb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 09:10:19 2020 (r364639) +++ stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 09:11:37 2020 (r364640) @@ -3593,9 +3593,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, */ if (from != SCTP_CALLED_FROM_INPKILL_TIMER) { (void)SCTP_OS_TIMER_STOP_DRAIN(&inp->sctp_ep.signature_change.timer); - } else { - /* Probably un-needed */ - (void)SCTP_OS_TIMER_STOP(&inp->sctp_ep.signature_change.timer); } #ifdef SCTP_LOG_CLOSING From owner-svn-src-all@freebsd.org Mon Aug 24 09:13:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3B3E3B7507; Mon, 24 Aug 2020 09:13:07 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmcg4kc1z4RpT; Mon, 24 Aug 2020 09:13:07 +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 868171654E; Mon, 24 Aug 2020 09:13:07 +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 07O9D7kW003195; Mon, 24 Aug 2020 09:13:07 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O9D60D003191; Mon, 24 Aug 2020 09:13:06 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240913.07O9D60D003191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 09:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364641 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364641 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:13:07 -0000 Author: tuexen Date: Mon Aug 24 09:13:06 2020 New Revision: 364641 URL: https://svnweb.freebsd.org/changeset/base/364641 Log: MFC r363323: Add reference counts for inp/stcb/net when timers are running. This avoids a use-after-free reported for the userland stack. Thanks to Taylor Brandstetter for suggesting a patch for the userland stack. Modified: stable/12/sys/netinet/sctp_os_bsd.h stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctp_var.h stable/12/sys/netinet/sctputil.c stable/12/sys/netinet/sctputil.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/12/sys/netinet/sctp_os_bsd.h Mon Aug 24 09:11:37 2020 (r364640) +++ stable/12/sys/netinet/sctp_os_bsd.h Mon Aug 24 09:13:06 2020 (r364641) @@ -266,12 +266,17 @@ typedef struct callout sctp_os_timer_t; #define SCTP_OS_TIMER_INIT(tmr) callout_init(tmr, 1) -#define SCTP_OS_TIMER_START callout_reset -#define SCTP_OS_TIMER_STOP callout_stop -#define SCTP_OS_TIMER_STOP_DRAIN callout_drain -#define SCTP_OS_TIMER_PENDING callout_pending -#define SCTP_OS_TIMER_ACTIVE callout_active -#define SCTP_OS_TIMER_DEACTIVATE callout_deactivate +/* + * NOTE: The next two shouldn't be called directly outside of sctp_timer_start() + * and sctp_timer_stop(), since they don't handle incrementing/decrementing + * relevant reference counts. + */ +#define SCTP_OS_TIMER_START callout_reset +#define SCTP_OS_TIMER_STOP callout_stop +#define SCTP_OS_TIMER_STOP_DRAIN callout_drain +#define SCTP_OS_TIMER_PENDING callout_pending +#define SCTP_OS_TIMER_ACTIVE callout_active +#define SCTP_OS_TIMER_DEACTIVATE callout_deactivate #define sctp_get_tick_count() (ticks) Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 09:11:37 2020 (r364640) +++ stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 09:13:06 2020 (r364641) @@ -2739,23 +2739,54 @@ sctp_move_pcb_and_assoc(struct sctp_inpcb *old_inp, st } } } - /* - * Now any running timers need to be adjusted since we really don't - * care if they are running or not just blast in the new_inp into - * all of them. - */ - - stcb->asoc.dack_timer.ep = (void *)new_inp; - stcb->asoc.asconf_timer.ep = (void *)new_inp; - stcb->asoc.strreset_timer.ep = (void *)new_inp; - stcb->asoc.shut_guard_timer.ep = (void *)new_inp; - stcb->asoc.autoclose_timer.ep = (void *)new_inp; - stcb->asoc.delete_prim_timer.ep = (void *)new_inp; + /* Now any running timers need to be adjusted. */ + if (stcb->asoc.dack_timer.ep == old_inp) { + SCTP_INP_DECR_REF(old_inp); + stcb->asoc.dack_timer.ep = new_inp; + SCTP_INP_INCR_REF(new_inp); + } + if (stcb->asoc.asconf_timer.ep == old_inp) { + SCTP_INP_DECR_REF(old_inp); + stcb->asoc.asconf_timer.ep = new_inp; + SCTP_INP_INCR_REF(new_inp); + } + if (stcb->asoc.strreset_timer.ep == old_inp) { + SCTP_INP_DECR_REF(old_inp); + stcb->asoc.strreset_timer.ep = new_inp; + SCTP_INP_INCR_REF(new_inp); + } + if (stcb->asoc.shut_guard_timer.ep == old_inp) { + SCTP_INP_DECR_REF(old_inp); + stcb->asoc.shut_guard_timer.ep = new_inp; + SCTP_INP_INCR_REF(new_inp); + } + if (stcb->asoc.autoclose_timer.ep == old_inp) { + SCTP_INP_DECR_REF(old_inp); + stcb->asoc.autoclose_timer.ep = new_inp; + SCTP_INP_INCR_REF(new_inp); + } + if (stcb->asoc.delete_prim_timer.ep == old_inp) { + SCTP_INP_DECR_REF(old_inp); + stcb->asoc.delete_prim_timer.ep = new_inp; + SCTP_INP_INCR_REF(new_inp); + } /* now what about the nets? */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { - net->pmtu_timer.ep = (void *)new_inp; - net->hb_timer.ep = (void *)new_inp; - net->rxt_timer.ep = (void *)new_inp; + if (net->pmtu_timer.ep == old_inp) { + SCTP_INP_DECR_REF(old_inp); + net->pmtu_timer.ep = new_inp; + SCTP_INP_INCR_REF(new_inp); + } + if (net->hb_timer.ep == old_inp) { + SCTP_INP_DECR_REF(old_inp); + net->hb_timer.ep = new_inp; + SCTP_INP_INCR_REF(new_inp); + } + if (net->rxt_timer.ep == old_inp) { + SCTP_INP_DECR_REF(old_inp); + net->rxt_timer.ep = new_inp; + SCTP_INP_INCR_REF(new_inp); + } } SCTP_INP_WUNLOCK(new_inp); SCTP_INP_WUNLOCK(old_inp); @@ -3562,7 +3593,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, being_refed++; if (SCTP_ASOC_CREATE_LOCK_CONTENDED(inp)) being_refed++; - + /* NOTE: 0 refcount also means no timers are referencing us. */ if ((inp->refcount) || (being_refed) || (inp->sctp_flags & SCTP_PCB_FLAGS_CLOSE_IP)) { @@ -3584,16 +3615,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, SCTP_INP_WUNLOCK(inp); SCTP_ASOC_CREATE_UNLOCK(inp); SCTP_INP_INFO_WUNLOCK(); - /* - * Now we release all locks. Since this INP cannot be found anymore - * except possibly by the kill timer that might be running. We call - * the drain function here. It should hit the case were it sees the - * ACTIVE flag cleared and exit out freeing us to proceed and - * destroy everything. - */ - if (from != SCTP_CALLED_FROM_INPKILL_TIMER) { - (void)SCTP_OS_TIMER_STOP_DRAIN(&inp->sctp_ep.signature_change.timer); - } #ifdef SCTP_LOG_CLOSING sctp_log_closing(inp, NULL, 5); Modified: stable/12/sys/netinet/sctp_var.h ============================================================================== --- stable/12/sys/netinet/sctp_var.h Mon Aug 24 09:11:37 2020 (r364640) +++ stable/12/sys/netinet/sctp_var.h Mon Aug 24 09:13:06 2020 (r364641) @@ -186,7 +186,6 @@ extern struct pr_usrreqs sctp_usrreqs; #define sctp_free_remote_addr(__net) { \ if ((__net)) { \ if (SCTP_DECREMENT_AND_CHECK_REFCOUNT(&(__net)->ref_count)) { \ - (void)SCTP_OS_TIMER_STOP(&(__net)->rxt_timer.timer); \ if ((__net)->ro.ro_rt) { \ RTFREE((__net)->ro.ro_rt); \ (__net)->ro.ro_rt = NULL; \ Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Mon Aug 24 09:11:37 2020 (r364640) +++ stable/12/sys/netinet/sctputil.c Mon Aug 24 09:13:06 2020 (r364641) @@ -1709,16 +1709,22 @@ sctp_timeout_handler(void *t) struct sctp_nets *net; struct sctp_timer *tmr; struct mbuf *op_err; - int did_output; int type; int i, secret; + bool did_output, released_asoc_reference; + /* + * If inp, stcb or net are not NULL, then references to these were + * added when the timer was started, and must be released before + * this function returns. + */ tmr = (struct sctp_timer *)t; inp = (struct sctp_inpcb *)tmr->ep; stcb = (struct sctp_tcb *)tmr->tcb; net = (struct sctp_nets *)tmr->net; CURVNET_SET((struct vnet *)tmr->vnet); did_output = 1; + released_asoc_reference = false; #ifdef SCTP_AUDITING_ENABLED sctp_audit_log(0xF0, (uint8_t)tmr->type); @@ -1734,56 +1740,39 @@ sctp_timeout_handler(void *t) KASSERT(stcb == NULL || stcb->sctp_ep == inp, ("sctp_timeout_handler of type %d: inp = %p, stcb->sctp_ep %p", type, stcb, stcb->sctp_ep)); - if (inp) { - SCTP_INP_INCR_REF(inp); - } tmr->stopped_from = 0xa001; - if (stcb) { - atomic_add_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state == 0) { - atomic_add_int(&stcb->asoc.refcnt, -1); - if (inp) { - SCTP_INP_DECR_REF(inp); - } - SCTPDBG(SCTP_DEBUG_TIMER2, - "Timer type %d handler exiting due to CLOSED association.\n", - type); - CURVNET_RESTORE(); - return; - } + if ((stcb != NULL) && (stcb->asoc.state == SCTP_STATE_EMPTY)) { + SCTPDBG(SCTP_DEBUG_TIMER2, + "Timer type %d handler exiting due to CLOSED association.\n", + type); + goto out_decr; } tmr->stopped_from = 0xa002; SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d goes off.\n", type); if (!SCTP_OS_TIMER_ACTIVE(&tmr->timer)) { - if (inp) { - SCTP_INP_DECR_REF(inp); - } - if (stcb) { - atomic_add_int(&stcb->asoc.refcnt, -1); - } SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d handler exiting due to not being active.\n", type); - CURVNET_RESTORE(); - return; + goto out_decr; } tmr->stopped_from = 0xa003; if (stcb) { SCTP_TCB_LOCK(stcb); + /* + * Release reference so that association can be freed if + * necessary below. This is safe now that we have acquired + * the lock. + */ atomic_add_int(&stcb->asoc.refcnt, -1); + released_asoc_reference = true; if ((type != SCTP_TIMER_TYPE_ASOCKILL) && - ((stcb->asoc.state == 0) || + ((stcb->asoc.state == SCTP_STATE_EMPTY) || (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED))) { - SCTP_TCB_UNLOCK(stcb); - if (inp) { - SCTP_INP_DECR_REF(inp); - } SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d handler exiting due to CLOSED association.\n", type); - CURVNET_RESTORE(); - return; + goto out; } } else if (inp != NULL) { SCTP_INP_WLOCK(inp); @@ -1798,13 +1787,13 @@ sctp_timeout_handler(void *t) /* * Callout has been rescheduled. */ - goto get_out; + goto out; } if (!SCTP_OS_TIMER_ACTIVE(&tmr->timer)) { /* * Not active, so no action. */ - goto get_out; + goto out; } SCTP_OS_TIMER_DEACTIVATE(&tmr->timer); @@ -1831,6 +1820,7 @@ sctp_timeout_handler(void *t) sctp_auditing(4, inp, stcb, net); #endif sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_NOT_LOCKED); + did_output = true; if ((stcb->asoc.num_send_timers_up == 0) && (stcb->asoc.sent_queue_cnt > 0)) { struct sctp_tmit_chunk *chk; @@ -1861,8 +1851,7 @@ sctp_timeout_handler(void *t) /* no need to unlock on tcb its gone */ goto out_decr; } - /* We do output but not here */ - did_output = 0; + did_output = false; break; case SCTP_TIMER_TYPE_RECV: KASSERT(inp != NULL && stcb != NULL && net == NULL, @@ -1875,6 +1864,7 @@ sctp_timeout_handler(void *t) sctp_auditing(4, inp, stcb, NULL); #endif sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SACK_TMR, SCTP_SO_NOT_LOCKED); + did_output = true; break; case SCTP_TIMER_TYPE_SHUTDOWN: KASSERT(inp != NULL && stcb != NULL && net != NULL, @@ -1890,6 +1880,7 @@ sctp_timeout_handler(void *t) sctp_auditing(4, inp, stcb, net); #endif sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SHUT_TMR, SCTP_SO_NOT_LOCKED); + did_output = true; break; case SCTP_TIMER_TYPE_HEARTBEAT: KASSERT(inp != NULL && stcb != NULL && net != NULL, @@ -1907,6 +1898,9 @@ sctp_timeout_handler(void *t) if (!(net->dest_state & SCTP_ADDR_NOHB)) { sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_HB_TMR, SCTP_SO_NOT_LOCKED); + did_output = true; + } else { + did_output = false; } break; case SCTP_TIMER_TYPE_COOKIE: @@ -1927,6 +1921,7 @@ sctp_timeout_handler(void *t) * respect to where from in chunk_output. */ sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_NOT_LOCKED); + did_output = true; break; case SCTP_TIMER_TYPE_NEWCOOKIE: KASSERT(inp != NULL && stcb == NULL && net == NULL, @@ -1948,7 +1943,7 @@ sctp_timeout_handler(void *t) sctp_select_initial_TSN(&inp->sctp_ep); } sctp_timer_start(SCTP_TIMER_TYPE_NEWCOOKIE, inp, NULL, NULL); - did_output = 0; + did_output = false; break; case SCTP_TIMER_TYPE_PATHMTURAISE: KASSERT(inp != NULL && stcb != NULL && net != NULL, @@ -1956,7 +1951,7 @@ sctp_timeout_handler(void *t) type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timopathmtu); sctp_pathmtu_timer(inp, stcb, net); - did_output = 0; + did_output = false; break; case SCTP_TIMER_TYPE_SHUTDOWNACK: KASSERT(inp != NULL && stcb != NULL && net != NULL, @@ -1972,6 +1967,7 @@ sctp_timeout_handler(void *t) sctp_auditing(4, inp, stcb, net); #endif sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SHUT_ACK_TMR, SCTP_SO_NOT_LOCKED); + did_output = true; break; case SCTP_TIMER_TYPE_ASCONF: KASSERT(inp != NULL && stcb != NULL && net != NULL, @@ -1986,6 +1982,7 @@ sctp_timeout_handler(void *t) sctp_auditing(4, inp, stcb, net); #endif sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_ASCONF_TMR, SCTP_SO_NOT_LOCKED); + did_output = true; break; case SCTP_TIMER_TYPE_SHUTDOWNGUARD: KASSERT(inp != NULL && stcb != NULL && net == NULL, @@ -1995,6 +1992,7 @@ sctp_timeout_handler(void *t) op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), "Shutdown guard timer expired"); sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); + did_output = true; /* no need to unlock on tcb its gone */ goto out_decr; @@ -2005,7 +2003,7 @@ sctp_timeout_handler(void *t) SCTP_STAT_INCR(sctps_timoautoclose); sctp_autoclose_timer(inp, stcb); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_AUTOCLOSE_TMR, SCTP_SO_NOT_LOCKED); - did_output = 0; + did_output = true; break; case SCTP_TIMER_TYPE_STRRESET: KASSERT(inp != NULL && stcb != NULL && net == NULL, @@ -2017,6 +2015,7 @@ sctp_timeout_handler(void *t) goto out_decr; } sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_STRRST_TMR, SCTP_SO_NOT_LOCKED); + did_output = true; break; case SCTP_TIMER_TYPE_INPKILL: KASSERT(inp != NULL && stcb == NULL && net == NULL, @@ -2057,6 +2056,7 @@ sctp_timeout_handler(void *t) ("timeout of type %d: inp = %p, stcb = %p, net = %p", type, inp, stcb, net)); sctp_handle_addr_wq(); + did_output = true; break; case SCTP_TIMER_TYPE_PRIM_DELETED: KASSERT(inp != NULL && stcb != NULL && net == NULL, @@ -2064,20 +2064,22 @@ sctp_timeout_handler(void *t) type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timodelprim); sctp_delete_prim_timer(inp, stcb); + did_output = false; break; default: #ifdef INVARIANTS panic("Unknown timer type %d", type); #else - goto get_out; + did_output = false; + goto out; #endif } #ifdef SCTP_AUDITING_ENABLED sctp_audit_log(0xF1, (uint8_t)type); - if (inp) + if (inp != NULL) sctp_auditing(5, inp, stcb, net); #endif - if ((did_output) && stcb) { + if (did_output && (stcb != NULL)) { /* * Now we need to clean up the control chunk chain if an * ECNE is on it. It must be marked as UNSENT again so next @@ -2087,8 +2089,8 @@ sctp_timeout_handler(void *t) */ sctp_fix_ecn_echo(&stcb->asoc); } -get_out: - if (stcb) { +out: + if (stcb != NULL) { SCTP_TCB_UNLOCK(stcb); } else if (inp != NULL) { SCTP_INP_WUNLOCK(inp); @@ -2097,10 +2099,16 @@ get_out: } out_decr: - if (inp) { + /* These reference counts were incremented in sctp_timer_start(). */ + if (inp != NULL) { SCTP_INP_DECR_REF(inp); } - + if ((stcb != NULL) && !released_asoc_reference) { + atomic_add_int(&stcb->asoc.refcnt, -1); + } + if (net != NULL) { + sctp_free_remote_addr(net); + } out_no_decr: SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d handler finished.\n", type); CURVNET_RESTORE(); @@ -2533,6 +2541,19 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d started: ticks=%u, inp=%p, stcb=%p, net=%p.\n", t_type, to_ticks, inp, stcb, net); + /* + * If this is a newly scheduled callout, as opposed to a + * rescheduled one, increment relevant reference counts. + */ + if (tmr->ep != NULL) { + SCTP_INP_INCR_REF(inp); + } + if (tmr->tcb != NULL) { + atomic_add_int(&stcb->asoc.refcnt, 1); + } + if (tmr->net != NULL) { + atomic_add_int(&net->ref_count, 1); + } } else { /* * This should not happen, since we checked for pending @@ -2825,9 +2846,26 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, st SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d stopped: inp=%p, stcb=%p, net=%p.\n", t_type, inp, stcb, net); - tmr->ep = NULL; - tmr->tcb = NULL; - tmr->net = NULL; + /* + * If the timer was actually stopped, decrement reference + * counts that were incremented in sctp_timer_start(). + */ + if (tmr->ep != NULL) { + SCTP_INP_DECR_REF(inp); + tmr->ep = NULL; + } + if (tmr->tcb != NULL) { + atomic_add_int(&stcb->asoc.refcnt, -1); + tmr->tcb = NULL; + } + if (tmr->net != NULL) { + /* + * Can't use net, since it doesn't work for + * SCTP_TIMER_TYPE_ASCONF. + */ + sctp_free_remote_addr((struct sctp_nets *)tmr->net); + tmr->net = NULL; + } } else { SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d not stopped: inp=%p, stcb=%p, net=%p.\n", Modified: stable/12/sys/netinet/sctputil.h ============================================================================== --- stable/12/sys/netinet/sctputil.h Mon Aug 24 09:11:37 2020 (r364640) +++ stable/12/sys/netinet/sctputil.h Mon Aug 24 09:13:06 2020 (r364641) @@ -90,6 +90,14 @@ sctp_notify_stream_reset_add(struct sctp_tcb *stcb, ui void sctp_notify_stream_reset_tsn(struct sctp_tcb *stcb, uint32_t sending_tsn, uint32_t recv_tsn, int flag); +/* + * NOTE: sctp_timer_start() will increment the reference count of any relevant + * structure the timer is referencing, in order to prevent a race condition + * between the timer executing and the structure being freed. + * + * When the timer fires or sctp_timer_stop() is called, these references are + * removed. + */ void sctp_timer_start(int, struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *); From owner-svn-src-all@freebsd.org Mon Aug 24 09:14:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A4AC3B75A1; Mon, 24 Aug 2020 09:14:33 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmfK0nR1z4Rsf; Mon, 24 Aug 2020 09:14:33 +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 F2C751642D; Mon, 24 Aug 2020 09:14:32 +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 07O9EWJE003313; Mon, 24 Aug 2020 09:14:32 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O9EWa0003311; Mon, 24 Aug 2020 09:14:32 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240914.07O9EWa0003311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 09:14:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364642 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364642 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:14:33 -0000 Author: tuexen Date: Mon Aug 24 09:14:32 2020 New Revision: 364642 URL: https://svnweb.freebsd.org/changeset/base/364642 Log: MFC r363440: Detect and handle an invalid reassembly constellation, which results in a memory leak. Thanks to Felix Weinrank for finding this issue using fuzz testing the userland stack. Modified: stable/12/sys/netinet/sctp_constants.h stable/12/sys/netinet/sctp_indata.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_constants.h ============================================================================== --- stable/12/sys/netinet/sctp_constants.h Mon Aug 24 09:13:06 2020 (r364641) +++ stable/12/sys/netinet/sctp_constants.h Mon Aug 24 09:14:32 2020 (r364642) @@ -795,6 +795,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_LOC_34 0x00000022 #define SCTP_LOC_35 0x00000023 #define SCTP_LOC_36 0x00000024 +#define SCTP_LOC_37 0x00000025 /* Free assoc codes */ #define SCTP_NORMAL_PROC 0 Modified: stable/12/sys/netinet/sctp_indata.c ============================================================================== --- stable/12/sys/netinet/sctp_indata.c Mon Aug 24 09:13:06 2020 (r364641) +++ stable/12/sys/netinet/sctp_indata.c Mon Aug 24 09:14:32 2020 (r364642) @@ -1567,6 +1567,15 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struc chk->rec.data.fsn); TAILQ_FOREACH(at, &control->reasm, sctp_next) { if (SCTP_TSN_GT(at->rec.data.fsn, chk->rec.data.fsn)) { + if (chk->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG) { + /* Last not at the end? huh? */ + SCTPDBG(SCTP_DEBUG_XXX, + "Last fragment not last in list: -- abort\n"); + sctp_abort_in_reasm(stcb, control, + chk, abort_flag, + SCTP_FROM_SCTP_INDATA + SCTP_LOC_14); + return; + } /* * This one in queue is bigger than the new * one, insert the new one before at. @@ -1597,7 +1606,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struc at->rec.data.fsn); sctp_abort_in_reasm(stcb, control, chk, abort_flag, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_14); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_15); return; } } @@ -1751,7 +1760,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc * Need to send an abort since we had a empty data chunk. */ op_err = sctp_generate_no_user_data_cause(tsn); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_15; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); @@ -1888,7 +1897,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc SCTP_SNPRINTF(msg, sizeof(msg), "Reassembly problem (MID=%8.8x)", mid); err_out: op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_17; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); @@ -2023,7 +2032,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struc (uint16_t)mid); } op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_17; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_18; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); @@ -2597,7 +2606,7 @@ sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap) if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_18); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_19); } sctp_send_shutdown(stcb, ((stcb->asoc.alternate) ? stcb->asoc.alternate : stcb->asoc.primary_destination)); @@ -2648,7 +2657,7 @@ sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap) * there are gaps or duplicates. */ sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_19); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_20); sctp_send_sack(stcb, SCTP_SO_NOT_LOCKED); } } else { @@ -2750,7 +2759,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o SCTP_SNPRINTF(msg, sizeof(msg), "%s", "DATA chunk received when I-DATA was negotiated"); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_20; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_21; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); return (2); } @@ -2761,7 +2770,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o SCTP_SNPRINTF(msg, sizeof(msg), "%s", "I-DATA chunk received when DATA was negotiated"); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_21; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_22; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); return (2); } @@ -2786,7 +2795,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o ch->chunk_type == SCTP_DATA ? "DATA" : "I-DATA", chk_length); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_22; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_23; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); return (2); } @@ -2874,7 +2883,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o SCTP_SNPRINTF(msg, sizeof(msg), "Chunk of length %u", chk_length); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_23; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24; sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED); return (2); } @@ -4025,7 +4034,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32 "Cum ack %8.8x greater or equal than TSN %8.8x", cumack, send_s); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } @@ -4201,7 +4210,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32 net->dest_state &= ~SCTP_ADDR_PF; sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_26); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); asoc->cc_functions.sctp_cwnd_update_exit_pf(stcb, net); /* Done with this net */ @@ -4279,7 +4288,7 @@ again: } else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_26); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_27); } } } @@ -4332,7 +4341,7 @@ again: *abort_now = 1; /* XXX */ op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_27; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_28; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } @@ -4548,7 +4557,7 @@ hopeless_peer: "Cum ack %8.8x greater or equal than TSN %8.8x", cum_ack, send_s); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_28; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_29; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } @@ -4580,7 +4589,7 @@ hopeless_peer: /* stop any timers */ TAILQ_FOREACH(net, &asoc->nets, sctp_next) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_29); + stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_30); net->partial_bytes_acked = 0; net->flight_size = 0; } @@ -4780,14 +4789,14 @@ hopeless_peer: if (net->new_pseudo_cumack) sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_30); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_31); } } else { if (accum_moved) { TAILQ_FOREACH(net, &asoc->nets, sctp_next) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_31); + stcb, net, SCTP_FROM_SCTP_INDATA + SCTP_LOC_32); } } } @@ -4950,7 +4959,7 @@ hopeless_peer: net->dest_state &= ~SCTP_ADDR_PF; sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_32); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_33); sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); asoc->cc_functions.sctp_cwnd_update_exit_pf(stcb, net); /* Done with this net */ @@ -4975,7 +4984,7 @@ hopeless_peer: /* stop all timers */ sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_33); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_34); net->flight_size = 0; net->partial_bytes_acked = 0; } @@ -5013,7 +5022,7 @@ hopeless_peer: *abort_now = 1; /* XXX */ op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_34; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_35; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } @@ -5162,7 +5171,7 @@ again: } else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_35); + SCTP_FROM_SCTP_INDATA + SCTP_LOC_36); } } } @@ -5565,7 +5574,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, "New cum ack %8.8x too high, highest TSN %8.8x", new_cum_tsn, asoc->highest_tsn_inside_map); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_36; + stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_37; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; } From owner-svn-src-all@freebsd.org Mon Aug 24 09:15:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BDF073B725B; Mon, 24 Aug 2020 09:15:52 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmgr4HBQz4Rvc; Mon, 24 Aug 2020 09:15:52 +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 764E116263; Mon, 24 Aug 2020 09:15:52 +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 07O9FqxR003433; Mon, 24 Aug 2020 09:15:52 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O9FqHC003432; Mon, 24 Aug 2020 09:15:52 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240915.07O9FqHC003432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 09:15:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364643 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364643 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:15:52 -0000 Author: tuexen Date: Mon Aug 24 09:15:52 2020 New Revision: 364643 URL: https://svnweb.freebsd.org/changeset/base/364643 Log: MFC r363456: Clear the pointer to the socket when closing it also in case of an ungraceful operation. This fixes a use-after-free bug found and reported by Taylor Brandstetter of Google by testing the userland stack. Modified: stable/12/sys/netinet/sctp_pcb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 09:14:32 2020 (r364642) +++ stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 09:15:52 2020 (r364643) @@ -3545,6 +3545,11 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, cnt = 0; LIST_FOREACH_SAFE(asoc, &inp->sctp_asoc_list, sctp_tcblist, nasoc) { SCTP_TCB_LOCK(asoc); + if (immediate != SCTP_FREE_SHOULD_USE_GRACEFUL_CLOSE) { + /* Disconnect the socket please */ + asoc->sctp_socket = NULL; + SCTP_ADD_SUBSTATE(asoc, SCTP_STATE_CLOSED_SOCKET); + } if (asoc->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { if (asoc->asoc.state & SCTP_STATE_IN_ACCEPT_QUEUE) { SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_IN_ACCEPT_QUEUE); From owner-svn-src-all@freebsd.org Mon Aug 24 09:19:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A87C63B7568; Mon, 24 Aug 2020 09:19:07 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmlb40XTz4SHY; Mon, 24 Aug 2020 09:19:07 +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 6DD3815DE9; Mon, 24 Aug 2020 09:19:07 +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 07O9J72j003639; Mon, 24 Aug 2020 09:19:07 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O9J6Lj003633; Mon, 24 Aug 2020 09:19:06 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240919.07O9J6Lj003633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 09:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364644 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364644 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:19:07 -0000 Author: tuexen Date: Mon Aug 24 09:19:05 2020 New Revision: 364644 URL: https://svnweb.freebsd.org/changeset/base/364644 Log: MFC 364268: Improve the handling of concurrent send() calls for SCTP sockets, especially when having the explicit EOR mode enabled. MFC r364270: Remove a line which is needed and was added in https://svnweb.freebsd.org/changeset/base/364268 Modified: stable/12/sys/netinet/sctp_input.c stable/12/sys/netinet/sctp_output.c stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctp_structs.h stable/12/sys/netinet/sctputil.c stable/12/sys/netinet/sctputil.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Mon Aug 24 09:15:52 2020 (r364643) +++ stable/12/sys/netinet/sctp_input.c Mon Aug 24 09:19:05 2020 (r364644) @@ -829,7 +829,6 @@ sctp_handle_abort(struct sctp_abort_chunk *abort, #ifdef SCTP_ASOCLOG_OF_TSNS sctp_print_out_track_log(stcb); #endif - SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_WAS_ABORTED); (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_8); SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_abort: finished\n"); @@ -1866,7 +1865,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle /* send up all the data */ SCTP_TCB_SEND_LOCK(stcb); - sctp_report_all_outbound(stcb, 0, 1, SCTP_SO_LOCKED); + sctp_report_all_outbound(stcb, 0, SCTP_SO_LOCKED); for (i = 0; i < stcb->asoc.streamoutcnt; i++) { stcb->asoc.strmout[i].chunks_on_queues = 0; #if defined(SCTP_DETAILED_STR_STATS) Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Mon Aug 24 09:15:52 2020 (r364643) +++ stable/12/sys/netinet/sctp_output.c Mon Aug 24 09:19:05 2020 (r364644) @@ -13151,12 +13151,21 @@ skip_preblock: if (sinfo_flags & SCTP_UNORDERED) { SCTP_STAT_INCR(sctps_sends_with_unord); } + sp->processing = 1; TAILQ_INSERT_TAIL(&strm->outqueue, sp, next); stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, asoc, strm, sp, 1); SCTP_TCB_SEND_UNLOCK(stcb); } else { SCTP_TCB_SEND_LOCK(stcb); sp = TAILQ_LAST(&strm->outqueue, sctp_streamhead); + if (sp->processing) { + SCTP_TCB_SEND_UNLOCK(stcb); + SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); + error = EINVAL; + goto out; + } else { + sp->processing = 1; + } SCTP_TCB_SEND_UNLOCK(stcb); if (sp == NULL) { /* ???? Huh ??? last msg is gone */ @@ -13198,13 +13207,14 @@ skip_preblock: } /* Update the mbuf and count */ SCTP_TCB_SEND_LOCK(stcb); - if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { + if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) || + (stcb->asoc.state & SCTP_STATE_WAS_ABORTED)) { /* * we need to get out. Peer probably * aborted. */ sctp_m_freem(mm); - if (stcb->asoc.state & SCTP_PCB_FLAGS_WAS_ABORTED) { + if (stcb->asoc.state & SCTP_STATE_WAS_ABORTED) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ECONNRESET); error = ECONNRESET; } @@ -13404,7 +13414,8 @@ skip_preblock: } } SCTP_TCB_SEND_LOCK(stcb); - if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { + if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) || + (stcb->asoc.state & SCTP_STATE_WAS_ABORTED)) { SCTP_TCB_SEND_UNLOCK(stcb); goto out_unlocked; } @@ -13420,6 +13431,7 @@ skip_preblock: strm->last_msg_incomplete = 0; asoc->stream_locked = 0; } + sp->processing = 0; } else { SCTP_PRINTF("Huh no sp TSNH?\n"); strm->last_msg_incomplete = 0; Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 09:15:52 2020 (r364643) +++ stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 09:19:05 2020 (r364644) @@ -4741,6 +4741,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc /* there is no asoc, really TSNH :-0 */ return (1); } + SCTP_TCB_SEND_LOCK(stcb); if (stcb->asoc.alternate) { sctp_free_remote_addr(stcb->asoc.alternate); stcb->asoc.alternate = NULL; @@ -4775,6 +4776,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc /* nope, reader or writer in the way */ sctp_timer_start(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL); /* no asoc destroyed */ + SCTP_TCB_SEND_UNLOCK(stcb); SCTP_TCB_UNLOCK(stcb); #ifdef SCTP_LOG_CLOSING sctp_log_closing(inp, stcb, 8); @@ -4843,6 +4845,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc SCTP_CLEAR_SUBSTATE(stcb, SCTP_STATE_IN_ACCEPT_QUEUE); sctp_timer_start(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL); } + SCTP_TCB_SEND_UNLOCK(stcb); SCTP_TCB_UNLOCK(stcb); if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE)) @@ -4876,10 +4879,12 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc if (from_inpcbfree == SCTP_NORMAL_PROC) { atomic_add_int(&stcb->asoc.refcnt, 1); + SCTP_TCB_SEND_UNLOCK(stcb); SCTP_TCB_UNLOCK(stcb); SCTP_INP_INFO_WLOCK(); SCTP_INP_WLOCK(inp); SCTP_TCB_LOCK(stcb); + SCTP_TCB_SEND_LOCK(stcb); } /* Double check the GONE flag */ if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || @@ -4927,6 +4932,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc SCTP_INP_INFO_WUNLOCK(); SCTP_INP_WUNLOCK(inp); } + SCTP_TCB_SEND_UNLOCK(stcb); SCTP_TCB_UNLOCK(stcb); return (0); } @@ -4958,7 +4964,6 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc * in case. */ /* anything on the wheel needs to be removed */ - SCTP_TCB_SEND_LOCK(stcb); for (i = 0; i < asoc->streamoutcnt; i++) { struct sctp_stream_out *outs; @@ -4989,7 +4994,6 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc sctp_free_a_strmoq(stcb, sp, SCTP_SO_LOCKED); } } - SCTP_TCB_SEND_UNLOCK(stcb); /* sa_ignore FREED_MEMORY */ TAILQ_FOREACH_SAFE(strrst, &asoc->resetHead, next_resp, nstrrst) { TAILQ_REMOVE(&asoc->resetHead, strrst, next_resp); @@ -5191,6 +5195,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc /* Insert new items here :> */ /* Get rid of LOCK */ + SCTP_TCB_SEND_UNLOCK(stcb); SCTP_TCB_UNLOCK(stcb); SCTP_TCB_LOCK_DESTROY(stcb); SCTP_TCB_SEND_LOCK_DESTROY(stcb); Modified: stable/12/sys/netinet/sctp_structs.h ============================================================================== --- stable/12/sys/netinet/sctp_structs.h Mon Aug 24 09:15:52 2020 (r364643) +++ stable/12/sys/netinet/sctp_structs.h Mon Aug 24 09:19:05 2020 (r364644) @@ -534,6 +534,7 @@ struct sctp_stream_queue_pending { uint8_t sender_all_done; uint8_t put_last_out; uint8_t discard_rest; + uint8_t processing; }; /* Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Mon Aug 24 09:15:52 2020 (r364643) +++ stable/12/sys/netinet/sctputil.c Mon Aug 24 09:19:05 2020 (r364644) @@ -4234,7 +4234,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb } void -sctp_report_all_outbound(struct sctp_tcb *stcb, uint16_t error, int holds_lock, int so_locked) +sctp_report_all_outbound(struct sctp_tcb *stcb, uint16_t error, int so_locked) { struct sctp_association *asoc; struct sctp_stream_out *outs; @@ -4256,9 +4256,6 @@ sctp_report_all_outbound(struct sctp_tcb *stcb, uint16 return; } /* now through all the gunk freeing chunks */ - if (holds_lock == 0) { - SCTP_TCB_SEND_LOCK(stcb); - } /* sent queue SHOULD be empty */ TAILQ_FOREACH_SAFE(chk, &asoc->sent_queue, sctp_next, nchk) { TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next); @@ -4335,10 +4332,6 @@ sctp_report_all_outbound(struct sctp_tcb *stcb, uint16 /* sa_ignore FREED_MEMORY */ } } - - if (holds_lock == 0) { - SCTP_TCB_SEND_UNLOCK(stcb); - } } void @@ -4358,8 +4351,11 @@ sctp_abort_notification(struct sctp_tcb *stcb, uint8_t (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET)) { return; } + SCTP_TCB_SEND_LOCK(stcb); + SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_WAS_ABORTED); /* Tell them we lost the asoc */ - sctp_report_all_outbound(stcb, error, 0, so_locked); + sctp_report_all_outbound(stcb, error, so_locked); + SCTP_TCB_SEND_UNLOCK(stcb); if (from_peer) { sctp_ulp_notify(SCTP_NOTIFY_ASSOC_REM_ABORTED, stcb, error, abort, so_locked); } else { @@ -4388,7 +4384,6 @@ sctp_abort_association(struct sctp_inpcb *inp, struct if (stcb != NULL) { /* We have a TCB to abort, send notification too */ sctp_abort_notification(stcb, 0, 0, NULL, SCTP_SO_NOT_LOCKED); - SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_WAS_ABORTED); /* Ok, now lets free it */ SCTP_STAT_INCR_COUNTER32(sctps_aborted); if ((SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) || @@ -4477,8 +4472,6 @@ sctp_abort_an_association(struct sctp_inpcb *inp, stru } } return; - } else { - SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_WAS_ABORTED); } /* notify the peer */ sctp_send_abort_tcb(stcb, op_err, so_locked); Modified: stable/12/sys/netinet/sctputil.h ============================================================================== --- stable/12/sys/netinet/sctputil.h Mon Aug 24 09:15:52 2020 (r364643) +++ stable/12/sys/netinet/sctputil.h Mon Aug 24 09:19:05 2020 (r364644) @@ -164,7 +164,7 @@ void sctp_stop_timers_for_shutdown(struct sctp_tcb *); /* Stop all timers for association and remote addresses. */ void sctp_stop_association_timers(struct sctp_tcb *, bool); -void sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int, int); +void sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int); int sctp_expand_mapping_array(struct sctp_association *, uint32_t); From owner-svn-src-all@freebsd.org Mon Aug 24 09:20:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1DA53B757D; Mon, 24 Aug 2020 09:20:13 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmms64TPz4SLC; Mon, 24 Aug 2020 09:20:13 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3B2F16171; Mon, 24 Aug 2020 09:20:13 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07O9KD1j003774; Mon, 24 Aug 2020 09:20:13 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O9KD6L003773; Mon, 24 Aug 2020 09:20:13 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008240920.07O9KD6L003773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 24 Aug 2020 09:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364645 - head X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 364645 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:20:14 -0000 Author: arichardson Date: Mon Aug 24 09:20:13 2020 New Revision: 364645 URL: https://svnweb.freebsd.org/changeset/base/364645 Log: Pass the installworld install(1) flags to make buildenv This ensure that running make install inside buildenv correctly includes the METALOG flags when building with -DNO_ROOT. Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D26038 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Aug 24 09:19:05 2020 (r364644) +++ head/Makefile.inc1 Mon Aug 24 09:20:13 2020 (r364645) @@ -1178,7 +1178,9 @@ buildenv: .PHONY .if ${BUILDENV_SHELL:M*zsh*} @echo For ZSH you must run: export CPUTYPE=${TARGET_CPUTYPE} .endif - @cd ${BUILDENV_DIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} + @cd ${BUILDENV_DIR} && env ${WMAKEENV} \ + INSTALL="${INSTALL_CMD} ${INSTALLFLAGS}" \ + MTREE_CMD="${MTREE_CMD} ${MTREEFLAGS}" BUILDENV=1 ${BUILDENV_SHELL} TOOLCHAIN_TGTS= ${WMAKE_TGTS:Neverything:Nbuild${libcompat}} toolchain: ${TOOLCHAIN_TGTS} .PHONY From owner-svn-src-all@freebsd.org Mon Aug 24 09:20:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 127EF3B7617; Mon, 24 Aug 2020 09:20:20 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmmz0X8Nz4SZ4; Mon, 24 Aug 2020 09:20:19 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B953716172; Mon, 24 Aug 2020 09:20:18 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07O9KIrS003826; Mon, 24 Aug 2020 09:20:18 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O9KIP4003825; Mon, 24 Aug 2020 09:20:18 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008240920.07O9KIP4003825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 24 Aug 2020 09:20:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364646 - head/usr.sbin/crunch/crunchgen X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/usr.sbin/crunch/crunchgen X-SVN-Commit-Revision: 364646 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:20:22 -0000 Author: arichardson Date: Mon Aug 24 09:20:18 2020 New Revision: 364646 URL: https://svnweb.freebsd.org/changeset/base/364646 Log: Re-indent crunched_main.c in preparation for D25998 Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c ============================================================================== --- head/usr.sbin/crunch/crunchgen/crunched_main.c Mon Aug 24 09:20:13 2020 (r364645) +++ head/usr.sbin/crunch/crunchgen/crunched_main.c Mon Aug 24 09:20:18 2020 (r364646) @@ -40,8 +40,8 @@ __FBSDID("$FreeBSD$"); #include struct stub { - char *name; - int (*f)(); + char *name; + int (*f)(); }; extern char *__progname; @@ -52,65 +52,64 @@ static void crunched_usage(void); int main(int argc, char **argv, char **envp) { - char *slash, *basename; - struct stub *ep; + char *slash, *basename; + struct stub *ep; - if(argv[0] == NULL || *argv[0] == '\0') - crunched_usage(); + if (argv[0] == NULL || *argv[0] == '\0') + crunched_usage(); - slash = strrchr(argv[0], '/'); - basename = slash? slash+1 : argv[0]; + slash = strrchr(argv[0], '/'); + basename = slash ? slash + 1 : argv[0]; - for(ep=entry_points; ep->name != NULL; ep++) - if(!strcmp(basename, ep->name)) break; + for (ep = entry_points; ep->name != NULL; ep++) + if (!strcmp(basename, ep->name)) + break; - if(ep->name) - return ep->f(argc, argv, envp); - else { - fprintf(stderr, "%s: %s not compiled in\n", EXECNAME, basename); - crunched_usage(); - } + if (ep->name) + return ep->f(argc, argv, envp); + else { + fprintf(stderr, "%s: %s not compiled in\n", EXECNAME, basename); + crunched_usage(); + } } - int crunched_main(int argc, char **argv, char **envp) { - char *slash; - struct stub *ep; - int columns, len; + char *slash; + struct stub *ep; + int columns, len; - if(argc <= 1) - crunched_usage(); + if (argc <= 1) + crunched_usage(); - slash = strrchr(argv[1], '/'); - __progname = slash? slash+1 : argv[1]; + slash = strrchr(argv[1], '/'); + __progname = slash ? slash + 1 : argv[1]; - return main(--argc, ++argv, envp); + return main(--argc, ++argv, envp); } - static void crunched_usage() { - int columns, len; - struct stub *ep; + int columns, len; + struct stub *ep; - fprintf(stderr, "usage: %s ..., where is one of:\n", - EXECNAME); - columns = 0; - for(ep=entry_points; ep->name != NULL; ep++) { - len = strlen(ep->name) + 1; - if(columns+len < 80) - columns += len; - else { - fprintf(stderr, "\n"); - columns = len; + fprintf(stderr, + "usage: %s ..., where is one of:\n", EXECNAME); + columns = 0; + for (ep = entry_points; ep->name != NULL; ep++) { + len = strlen(ep->name) + 1; + if (columns + len < 80) + columns += len; + else { + fprintf(stderr, "\n"); + columns = len; + } + fprintf(stderr, " %s", ep->name); } - fprintf(stderr, " %s", ep->name); - } - fprintf(stderr, "\n"); - exit(1); + fprintf(stderr, "\n"); + exit(1); } /* end of crunched_main.c */ From owner-svn-src-all@freebsd.org Mon Aug 24 09:20:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8910B3B727E; Mon, 24 Aug 2020 09:20:25 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmn539h8z4SPC; Mon, 24 Aug 2020 09:20:25 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D16F16431; Mon, 24 Aug 2020 09:20:23 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07O9KNVs003879; Mon, 24 Aug 2020 09:20:23 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O9KN8j003878; Mon, 24 Aug 2020 09:20:23 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008240920.07O9KN8j003878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 24 Aug 2020 09:20:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364647 - head/usr.sbin/crunch/crunchgen X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/usr.sbin/crunch/crunchgen X-SVN-Commit-Revision: 364647 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:20:25 -0000 Author: arichardson Date: Mon Aug 24 09:20:23 2020 New Revision: 364647 URL: https://svnweb.freebsd.org/changeset/base/364647 Log: Correctly determine the real executable in crunched binaries This should fix cases like su setting argv[0] to _su for /bin/sh. Previously cheribsdbox (a crunched tool we use in CheriBSD to reduce the size of our minimal disk images to allow loading them onto FPGAs without waiting forever for the transfer) would complain about _su not being compiled in, but now that we also look at AT_EXECPATH it correctly invokes the sh tool. Note: we use use AT_EXECPATH instead of the KERN_PROC_PATHNAME sysctl to get the crunchgen binary name since it seems like KERN_PROC_PATHNAME just returns the last cached path for a given hardlink. When using `su`, instead of invoking /bin/csh this would invoke the last used hardlink to cheribsdbox. This caused weird test failures when running tests due to `id` being executed instead of `echo`: $ id # id is a hardlink to /bin/cheribsdbox $ su postgres -c 'echo 1' # su is also a hardlink uid=1001(postgres) gid=1001(postgres) groups=1001(postgres) Obtained from: CheriBSD Reviewed By: emaste, brooks Differential Revision: https://reviews.freebsd.org/D25998 Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c ============================================================================== --- head/usr.sbin/crunch/crunchgen/crunched_main.c Mon Aug 24 09:20:18 2020 (r364646) +++ head/usr.sbin/crunch/crunchgen/crunched_main.c Mon Aug 24 09:20:23 2020 (r364647) @@ -23,6 +23,38 @@ * Computer Science Department * University of Maryland at College Park */ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH 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. + * + */ /* * crunched_main.c - main program for crunched binaries, it branches to a * particular subprogram based on the value of argv[0]. Also included @@ -35,6 +67,11 @@ #include __FBSDID("$FreeBSD$"); +#include +#include +#include + +#include #include #include #include @@ -44,30 +81,88 @@ struct stub { int (*f)(); }; -extern char *__progname; +extern const char *__progname; extern struct stub entry_points[]; static void crunched_usage(void); +static struct stub * +find_entry_point(const char *basename) +{ + struct stub *ep = NULL; + + for (ep = entry_points; ep->name != NULL; ep++) + if (!strcmp(basename, ep->name)) + break; + + return (ep); +} + +static const char * +get_basename(const char *exe_path) +{ + const char *slash = strrchr(exe_path, '/'); + return (slash ? slash + 1 : exe_path); +} + int main(int argc, char **argv, char **envp) { - char *slash, *basename; - struct stub *ep; + struct stub *ep = NULL; + const char *basename = NULL; - if (argv[0] == NULL || *argv[0] == '\0') - crunched_usage(); + /* + * Look at __progname first (this will be set if the crunched binary is + * invoked directly). + */ + if (__progname) { + basename = get_basename(__progname); + ep = find_entry_point(basename); + } - slash = strrchr(argv[0], '/'); - basename = slash ? slash + 1 : argv[0]; + /* + * Otherwise try to find entry point based on argv[0] (this works for + * both symlinks as well as hardlinks). However, it does not work when + * su invokes a crunched shell because it sets argv[0] to _su when + * invoking the shell. In that case we look at AT_EXECPATH as a + * fallback. + */ + if (ep == NULL) { + basename = get_basename(argv[0]); + ep = find_entry_point(basename); + } - for (ep = entry_points; ep->name != NULL; ep++) - if (!strcmp(basename, ep->name)) - break; + /* + * If we didn't find the entry point based on __progname or argv[0], + * try AT_EXECPATH to get the actual binary that was executed. + */ + if (ep == NULL) { + char buf[MAXPATHLEN]; + int error = elf_aux_info(AT_EXECPATH, &buf, sizeof(buf)); - if (ep->name) + if (error == 0) { + const char *exe_name = get_basename(buf); + /* + * Keep using argv[0] if AT_EXECPATH is the crunched + * binary so that symlinks to the crunched binary report + * "not compiled in" instead of invoking + * crunched_main(). + */ + if (strcmp(exe_name, EXECNAME) != 0) { + basename = exe_name; + ep = find_entry_point(basename); + } + } else { + warnc(error, "elf_aux_info(AT_EXECPATH) failed"); + } + } + + if (basename == NULL || *basename == '\0') + crunched_usage(); + + if (ep != NULL) { return ep->f(argc, argv, envp); - else { + } else { fprintf(stderr, "%s: %s not compiled in\n", EXECNAME, basename); crunched_usage(); } @@ -76,16 +171,10 @@ main(int argc, char **argv, char **envp) int crunched_main(int argc, char **argv, char **envp) { - char *slash; - struct stub *ep; - int columns, len; - if (argc <= 1) crunched_usage(); - slash = strrchr(argv[1], '/'); - __progname = slash ? slash + 1 : argv[1]; - + __progname = get_basename(argv[1]); return main(--argc, ++argv, envp); } From owner-svn-src-all@freebsd.org Mon Aug 24 09:20:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 114D43B778C; Mon, 24 Aug 2020 09:20:33 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmnC5M1lz4SSP; Mon, 24 Aug 2020 09:20:31 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7171116173; Mon, 24 Aug 2020 09:20:28 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07O9KSLc003933; Mon, 24 Aug 2020 09:20:28 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O9KSf3003932; Mon, 24 Aug 2020 09:20:28 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008240920.07O9KSf3003932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 24 Aug 2020 09:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364648 - head/usr.sbin/makefs/msdos X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/usr.sbin/makefs/msdos X-SVN-Commit-Revision: 364648 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:20:33 -0000 Author: arichardson Date: Mon Aug 24 09:20:27 2020 New Revision: 364648 URL: https://svnweb.freebsd.org/changeset/base/364648 Log: makefs (msdosfs): Use fprintf instead of debug print for errors The added print was very helpful for debugging failed disk image creation. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D23200 Modified: head/usr.sbin/makefs/msdos/msdosfs_vnops.c Modified: head/usr.sbin/makefs/msdos/msdosfs_vnops.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_vnops.c Mon Aug 24 09:20:23 2020 (r364647) +++ head/usr.sbin/makefs/msdos/msdosfs_vnops.c Mon Aug 24 09:20:27 2020 (r364648) @@ -467,15 +467,15 @@ msdosfs_wfile(const char *path, struct denode *dep, fs if ((fd = open(path, O_RDONLY)) == -1) { error = errno; - MSDOSFS_DPRINTF(("open %s: %s", path, strerror(error))); + fprintf(stderr, "open %s: %s\n", path, strerror(error)); return error; } if ((dat = mmap(0, nsize, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0)) == MAP_FAILED) { error = errno; - MSDOSFS_DPRINTF(("%s: mmap %s: %s", __func__, node->name, - strerror(error))); + fprintf(stderr, "%s: mmap %s: %s\n", __func__, node->name, + strerror(error)); close(fd); goto out; } From owner-svn-src-all@freebsd.org Mon Aug 24 09:20:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 830823B7890; Mon, 24 Aug 2020 09:20:41 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmnN3cKJz4SMb; Mon, 24 Aug 2020 09:20:40 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BCF0C16176; Mon, 24 Aug 2020 09:20:34 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07O9KYnY003991; Mon, 24 Aug 2020 09:20:34 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O9KXCi003987; Mon, 24 Aug 2020 09:20:33 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008240920.07O9KXCi003987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 24 Aug 2020 09:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364649 - in head: lib/libcompiler_rt lib/libgcc_eh lib/libprocstat stand/userboot/userboot X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head: lib/libcompiler_rt lib/libgcc_eh lib/libprocstat stand/userboot/userboot X-SVN-Commit-Revision: 364649 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:20:42 -0000 Author: arichardson Date: Mon Aug 24 09:20:33 2020 New Revision: 364649 URL: https://svnweb.freebsd.org/changeset/base/364649 Log: Avoid adding duplicates to SRCS/OBJS/SOBJS/POBJS This is a change in preparation for stopping to use lorder.sh (D26044) and instead assume that we have a linker newer than ~1990. Without lorder.sh duplicates end up being passed to the linker when building .so files and this can result in duplicate symbol definition errors. There is one minor change: libcompiler_rt.a will no longer provide gcc_personality_v0 and instead we now only have it in libgcc_eh.a/libgcc_s.so. This matches GCC's behaviour. Reviewed By: emaste, cem Differential Revision: https://reviews.freebsd.org/D26042 Modified: head/lib/libcompiler_rt/Makefile.inc head/lib/libgcc_eh/Makefile head/lib/libgcc_eh/Makefile.inc head/lib/libprocstat/Makefile head/stand/userboot/userboot/Makefile Modified: head/lib/libcompiler_rt/Makefile.inc ============================================================================== --- head/lib/libcompiler_rt/Makefile.inc Mon Aug 24 09:20:27 2020 (r364648) +++ head/lib/libcompiler_rt/Makefile.inc Mon Aug 24 09:20:33 2020 (r364649) @@ -67,7 +67,6 @@ SRCF+= floatunsisf SRCF+= floatuntidf SRCF+= floatuntisf SRCF+= floatuntixf -SRCF+= gcc_personality_v0 # not in upstream SRCF+= int_util SRCF+= lshrdi3 SRCF+= lshrti3 Modified: head/lib/libgcc_eh/Makefile ============================================================================== --- head/lib/libgcc_eh/Makefile Mon Aug 24 09:20:27 2020 (r364648) +++ head/lib/libgcc_eh/Makefile Mon Aug 24 09:20:33 2020 (r364649) @@ -8,6 +8,7 @@ NO_PIC= MK_SSP= no WARNS?= 2 +SRCS_EXC+= int_util.c .include "Makefile.inc" .if ${.MAKE.LEVEL} > 0 Modified: head/lib/libgcc_eh/Makefile.inc ============================================================================== --- head/lib/libgcc_eh/Makefile.inc Mon Aug 24 09:20:27 2020 (r364648) +++ head/lib/libgcc_eh/Makefile.inc Mon Aug 24 09:20:33 2020 (r364649) @@ -9,7 +9,6 @@ STATIC_CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBI .PATH: ${COMPILERRTDIR}/lib/builtins .PATH: ${UNWINDSRCDIR} SRCS_EXC+= gcc_personality_v0.c -SRCS_EXC+= int_util.c SRCS_EXC+= Unwind-EHABI.cpp SRCS_EXC+= Unwind-sjlj.c SRCS_EXC+= UnwindLevel1-gcc-ext.c Modified: head/lib/libprocstat/Makefile ============================================================================== --- head/lib/libprocstat/Makefile Mon Aug 24 09:20:27 2020 (r364648) +++ head/lib/libprocstat/Makefile Mon Aug 24 09:20:33 2020 (r364649) @@ -59,8 +59,6 @@ MLINKS+=libprocstat.3 procstat_close.3 \ CFLAGS+= -DLIBPROCSTAT_ZFS SRCS+= zfs.c OBJS+= zfs/zfs_defs.o -SOBJS+= zfs/zfs_defs.pico -POBJS+= zfs/zfs_defs.po SUBDIR= zfs zfs/zfs_defs.o: .PHONY @cd ${.CURDIR}/zfs && ${MAKE} zfs_defs.o Modified: head/stand/userboot/userboot/Makefile ============================================================================== --- head/stand/userboot/userboot/Makefile Mon Aug 24 09:20:27 2020 (r364648) +++ head/stand/userboot/userboot/Makefile Mon Aug 24 09:20:33 2020 (r364649) @@ -20,7 +20,6 @@ SRCS+= bootinfo.c SRCS+= bootinfo32.c SRCS+= bootinfo64.c SRCS+= conf.c -SRCS+= console.c SRCS+= copy.c SRCS+= devicename.c SRCS+= elf32_freebsd.c From owner-svn-src-all@freebsd.org Mon Aug 24 09:20:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3AB53B74EF; Mon, 24 Aug 2020 09:20:44 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZmnQ6qbrz4SMg; Mon, 24 Aug 2020 09:20:42 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B95716437; Mon, 24 Aug 2020 09:20:39 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07O9KdSA004045; Mon, 24 Aug 2020 09:20:39 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O9Kd5H004044; Mon, 24 Aug 2020 09:20:39 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008240920.07O9Kd5H004044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 24 Aug 2020 09:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364650 - head X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 364650 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:20:45 -0000 Author: arichardson Date: Mon Aug 24 09:20:38 2020 New Revision: 364650 URL: https://svnweb.freebsd.org/changeset/base/364650 Log: Also print number of available CPUs on Linux Without this change the buildworld/buildkernel epilogue looks like this: >>> World built in 249 seconds, sysctl: cannot stat /proc/sys/hw/ncpu: No such file or directory ncpu: , make -j72. Reviewed By: emaste, bdrewery Differential Revision: https://reviews.freebsd.org/D26056 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Aug 24 09:20:33 2020 (r364649) +++ head/Makefile.inc1 Mon Aug 24 09:20:38 2020 (r364650) @@ -1136,6 +1136,8 @@ _BUILDWORLD_START!= date '+%s' buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue .PHONY .ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue +_ncpu_cmd=sysctl -n hw.ncpu 2>/dev/null || nproc 2>/dev/null || echo unknown + buildworld_prologue: .PHONY @echo "--------------------------------------------------------------" @echo ">>> World build started on `LC_ALL=C date`" @@ -1147,7 +1149,7 @@ buildworld_epilogue: .PHONY @echo ">>> World build completed on `LC_ALL=C date`" @seconds=$$(($$(date '+%s') - ${_BUILDWORLD_START})); \ echo -n ">>> World built in $$seconds seconds, "; \ - echo "ncpu: $$(sysctl -n hw.ncpu)${.MAKE.JOBS:S/^/, make -j/}" + echo "ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" @echo "--------------------------------------------------------------" # @@ -1656,7 +1658,7 @@ buildkernel: .MAKE .PHONY .endfor @seconds=$$(($$(date '+%s') - ${_BUILDKERNEL_START})); \ echo -n ">>> Kernel(s) ${BUILDKERNELS} built in $$seconds seconds, "; \ - echo "ncpu: $$(sysctl -n hw.ncpu)${.MAKE.JOBS:S/^/, make -j/}" + echo "ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" @echo "--------------------------------------------------------------" NO_INSTALLEXTRAKERNELS?= yes From owner-svn-src-all@freebsd.org Mon Aug 24 09:46:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8DCC43B7E7F; Mon, 24 Aug 2020 09:46:38 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZnML3G0Dz4VWV; Mon, 24 Aug 2020 09:46:38 +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 5427B16757; Mon, 24 Aug 2020 09:46:38 +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 07O9kcfu022551; Mon, 24 Aug 2020 09:46:38 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O9kbur022543; Mon, 24 Aug 2020 09:46:37 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240946.07O9kbur022543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 09:46: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: r364651 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 364651 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 09:46:38 -0000 Author: tuexen Date: Mon Aug 24 09:46:36 2020 New Revision: 364651 URL: https://svnweb.freebsd.org/changeset/base/364651 Log: MFC r364268: Improve the handling of concurrent send() calls for SCTP sockets, especially when having the explicit EOR mode enabled. Manually resolved merge conflicts. MFC r364270: Remove a line which is needed and was added in https://svnweb.freebsd.org/changeset/base/364268 Modified: stable/11/sys/netinet/sctp_input.c stable/11/sys/netinet/sctp_output.c stable/11/sys/netinet/sctp_pcb.c stable/11/sys/netinet/sctp_structs.h stable/11/sys/netinet/sctputil.c stable/11/sys/netinet/sctputil.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_input.c ============================================================================== --- stable/11/sys/netinet/sctp_input.c Mon Aug 24 09:20:38 2020 (r364650) +++ stable/11/sys/netinet/sctp_input.c Mon Aug 24 09:46:36 2020 (r364651) @@ -846,7 +846,6 @@ sctp_handle_abort(struct sctp_abort_chunk *abort, SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif - SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_WAS_ABORTED); (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_8); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) @@ -1995,7 +1994,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle /* send up all the data */ SCTP_TCB_SEND_LOCK(stcb); - sctp_report_all_outbound(stcb, 0, 1, SCTP_SO_LOCKED); + sctp_report_all_outbound(stcb, 0, SCTP_SO_LOCKED); for (i = 0; i < stcb->asoc.streamoutcnt; i++) { stcb->asoc.strmout[i].chunks_on_queues = 0; #if defined(SCTP_DETAILED_STR_STATS) Modified: stable/11/sys/netinet/sctp_output.c ============================================================================== --- stable/11/sys/netinet/sctp_output.c Mon Aug 24 09:20:38 2020 (r364650) +++ stable/11/sys/netinet/sctp_output.c Mon Aug 24 09:46:36 2020 (r364651) @@ -13232,12 +13232,21 @@ skip_preblock: if (sinfo_flags & SCTP_UNORDERED) { SCTP_STAT_INCR(sctps_sends_with_unord); } + sp->processing = 1; TAILQ_INSERT_TAIL(&strm->outqueue, sp, next); stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, asoc, strm, sp, 1); SCTP_TCB_SEND_UNLOCK(stcb); } else { SCTP_TCB_SEND_LOCK(stcb); sp = TAILQ_LAST(&strm->outqueue, sctp_streamhead); + if (sp->processing) { + SCTP_TCB_SEND_UNLOCK(stcb); + SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); + error = EINVAL; + goto out; + } else { + sp->processing = 1; + } SCTP_TCB_SEND_UNLOCK(stcb); if (sp == NULL) { /* ???? Huh ??? last msg is gone */ @@ -13279,13 +13288,14 @@ skip_preblock: } /* Update the mbuf and count */ SCTP_TCB_SEND_LOCK(stcb); - if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { + if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) || + (stcb->asoc.state & SCTP_STATE_WAS_ABORTED)) { /* * we need to get out. Peer probably * aborted. */ sctp_m_freem(mm); - if (stcb->asoc.state & SCTP_PCB_FLAGS_WAS_ABORTED) { + if (stcb->asoc.state & SCTP_STATE_WAS_ABORTED) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ECONNRESET); error = ECONNRESET; } @@ -13485,7 +13495,8 @@ skip_preblock: } } SCTP_TCB_SEND_LOCK(stcb); - if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { + if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) || + (stcb->asoc.state & SCTP_STATE_WAS_ABORTED)) { SCTP_TCB_SEND_UNLOCK(stcb); goto out_unlocked; } @@ -13501,6 +13512,7 @@ skip_preblock: strm->last_msg_incomplete = 0; asoc->stream_locked = 0; } + sp->processing = 0; } else { SCTP_PRINTF("Huh no sp TSNH?\n"); strm->last_msg_incomplete = 0; Modified: stable/11/sys/netinet/sctp_pcb.c ============================================================================== --- stable/11/sys/netinet/sctp_pcb.c Mon Aug 24 09:20:38 2020 (r364650) +++ stable/11/sys/netinet/sctp_pcb.c Mon Aug 24 09:46:36 2020 (r364651) @@ -4725,6 +4725,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc /* there is no asoc, really TSNH :-0 */ return (1); } + SCTP_TCB_SEND_LOCK(stcb); if (stcb->asoc.alternate) { sctp_free_remote_addr(stcb->asoc.alternate); stcb->asoc.alternate = NULL; @@ -4759,6 +4760,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc /* nope, reader or writer in the way */ sctp_timer_start(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL); /* no asoc destroyed */ + SCTP_TCB_SEND_UNLOCK(stcb); SCTP_TCB_UNLOCK(stcb); #ifdef SCTP_LOG_CLOSING sctp_log_closing(inp, stcb, 8); @@ -4827,6 +4829,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc SCTP_CLEAR_SUBSTATE(stcb, SCTP_STATE_IN_ACCEPT_QUEUE); sctp_timer_start(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL); } + SCTP_TCB_SEND_UNLOCK(stcb); SCTP_TCB_UNLOCK(stcb); if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE)) @@ -4860,10 +4863,12 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc if (from_inpcbfree == SCTP_NORMAL_PROC) { atomic_add_int(&stcb->asoc.refcnt, 1); + SCTP_TCB_SEND_UNLOCK(stcb); SCTP_TCB_UNLOCK(stcb); SCTP_INP_INFO_WLOCK(); SCTP_INP_WLOCK(inp); SCTP_TCB_LOCK(stcb); + SCTP_TCB_SEND_LOCK(stcb); } /* Double check the GONE flag */ if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || @@ -4911,6 +4916,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc SCTP_INP_INFO_WUNLOCK(); SCTP_INP_WUNLOCK(inp); } + SCTP_TCB_SEND_UNLOCK(stcb); SCTP_TCB_UNLOCK(stcb); return (0); } @@ -4942,7 +4948,6 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc * in case. */ /* anything on the wheel needs to be removed */ - SCTP_TCB_SEND_LOCK(stcb); for (i = 0; i < asoc->streamoutcnt; i++) { struct sctp_stream_out *outs; @@ -4973,7 +4978,6 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc sctp_free_a_strmoq(stcb, sp, SCTP_SO_LOCKED); } } - SCTP_TCB_SEND_UNLOCK(stcb); /* sa_ignore FREED_MEMORY */ TAILQ_FOREACH_SAFE(strrst, &asoc->resetHead, next_resp, nstrrst) { TAILQ_REMOVE(&asoc->resetHead, strrst, next_resp); @@ -5175,6 +5179,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc /* Insert new items here :> */ /* Get rid of LOCK */ + SCTP_TCB_SEND_UNLOCK(stcb); SCTP_TCB_UNLOCK(stcb); SCTP_TCB_LOCK_DESTROY(stcb); SCTP_TCB_SEND_LOCK_DESTROY(stcb); Modified: stable/11/sys/netinet/sctp_structs.h ============================================================================== --- stable/11/sys/netinet/sctp_structs.h Mon Aug 24 09:20:38 2020 (r364650) +++ stable/11/sys/netinet/sctp_structs.h Mon Aug 24 09:46:36 2020 (r364651) @@ -535,6 +535,7 @@ struct sctp_stream_queue_pending { uint8_t sender_all_done; uint8_t put_last_out; uint8_t discard_rest; + uint8_t processing; }; /* Modified: stable/11/sys/netinet/sctputil.c ============================================================================== --- stable/11/sys/netinet/sctputil.c Mon Aug 24 09:20:38 2020 (r364650) +++ stable/11/sys/netinet/sctputil.c Mon Aug 24 09:46:36 2020 (r364651) @@ -3925,7 +3925,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb } void -sctp_report_all_outbound(struct sctp_tcb *stcb, uint16_t error, int holds_lock, int so_locked +sctp_report_all_outbound(struct sctp_tcb *stcb, uint16_t error, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -3951,9 +3951,6 @@ sctp_report_all_outbound(struct sctp_tcb *stcb, uint16 return; } /* now through all the gunk freeing chunks */ - if (holds_lock == 0) { - SCTP_TCB_SEND_LOCK(stcb); - } /* sent queue SHOULD be empty */ TAILQ_FOREACH_SAFE(chk, &asoc->sent_queue, sctp_next, nchk) { TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next); @@ -4030,10 +4027,6 @@ sctp_report_all_outbound(struct sctp_tcb *stcb, uint16 /* sa_ignore FREED_MEMORY */ } } - - if (holds_lock == 0) { - SCTP_TCB_SEND_UNLOCK(stcb); - } } void @@ -4057,8 +4050,11 @@ sctp_abort_notification(struct sctp_tcb *stcb, uint8_t (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET)) { return; } + SCTP_TCB_SEND_LOCK(stcb); + SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_WAS_ABORTED); /* Tell them we lost the asoc */ - sctp_report_all_outbound(stcb, error, 0, so_locked); + sctp_report_all_outbound(stcb, error, so_locked); + SCTP_TCB_SEND_UNLOCK(stcb); if (from_peer) { sctp_ulp_notify(SCTP_NOTIFY_ASSOC_REM_ABORTED, stcb, error, abort, so_locked); } else { @@ -4090,7 +4086,6 @@ sctp_abort_association(struct sctp_inpcb *inp, struct if (stcb != NULL) { /* We have a TCB to abort, send notification too */ sctp_abort_notification(stcb, 0, 0, NULL, SCTP_SO_NOT_LOCKED); - SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_WAS_ABORTED); /* Ok, now lets free it */ #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); @@ -4200,8 +4195,6 @@ sctp_abort_an_association(struct sctp_inpcb *inp, stru } } return; - } else { - SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_WAS_ABORTED); } /* notify the peer */ sctp_send_abort_tcb(stcb, op_err, so_locked); Modified: stable/11/sys/netinet/sctputil.h ============================================================================== --- stable/11/sys/netinet/sctputil.h Mon Aug 24 09:20:38 2020 (r364650) +++ stable/11/sys/netinet/sctputil.h Mon Aug 24 09:46:36 2020 (r364651) @@ -166,7 +166,7 @@ void sctp_stop_timers_for_shutdown(struct sctp_tcb *); void sctp_stop_association_timers(struct sctp_tcb *, bool); void -sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int, int +sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif From owner-svn-src-all@freebsd.org Mon Aug 24 10:28:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 55BD43B8F78; Mon, 24 Aug 2020 10:28:16 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZpHN1ZHYz4XVR; Mon, 24 Aug 2020 10:28:16 +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 193C31712E; Mon, 24 Aug 2020 10:28:16 +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 07OASFeg047231; Mon, 24 Aug 2020 10:28:15 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OASF73047230; Mon, 24 Aug 2020 10:28:15 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202008241028.07OASF73047230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 24 Aug 2020 10:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364652 - stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 364652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 10:28:16 -0000 Author: manu Date: Mon Aug 24 10:28:15 2020 New Revision: 364652 URL: https://svnweb.freebsd.org/changeset/base/364652 Log: MFC r358176-r358177 r358176: linuxkpi: Add list_is_first function This function just test if the element is the first of the list. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D23766 r358177: linuxkpi: Add str_has_prefix This function test if the string str begins with the string pointed at by prefix. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D23767 Modified: stable/12/sys/compat/linuxkpi/common/include/linux/list.h stable/12/sys/compat/linuxkpi/common/include/linux/string.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/list.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/list.h Mon Aug 24 09:46:36 2020 (r364651) +++ stable/12/sys/compat/linuxkpi/common/include/linux/list.h Mon Aug 24 10:28:15 2020 (r364652) @@ -449,6 +449,13 @@ static inline void list_cut_position(struct list_head __list_cut_position(list, head, entry); } +static inline int list_is_first(const struct list_head *list, + const struct list_head *head) +{ + + return (list->prev == head); +} + static inline int list_is_last(const struct list_head *list, const struct list_head *head) { Modified: stable/12/sys/compat/linuxkpi/common/include/linux/string.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/string.h Mon Aug 24 09:46:36 2020 (r364651) +++ stable/12/sys/compat/linuxkpi/common/include/linux/string.h Mon Aug 24 10:28:15 2020 (r364652) @@ -158,4 +158,13 @@ memchr_inv(const void *start, int c, size_t length) return (NULL); } +static inline size_t +str_has_prefix(const char *str, const char *prefix) +{ + size_t len; + + len = strlen(prefix); + return (strncmp(str, prefix, len) == 0 ? len : 0); +} + #endif /* _LINUX_STRING_H_ */ From owner-svn-src-all@freebsd.org Mon Aug 24 10:42:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF2D93B9C33; Mon, 24 Aug 2020 10:42:05 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZpbK65Mtz4Yc4; Mon, 24 Aug 2020 10:42: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 B472517687; Mon, 24 Aug 2020 10:42: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 07OAg5bk059083; Mon, 24 Aug 2020 10:42:05 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OAg44w059080; Mon, 24 Aug 2020 10:42:04 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202008241042.07OAg44w059080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 24 Aug 2020 10:42:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364653 - in stable/12/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src dev/qlnx/qlnxe X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src dev/qlnx/qlnxe X-SVN-Commit-Revision: 364653 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 10:42:06 -0000 Author: manu Date: Mon Aug 24 10:42:04 2020 New Revision: 364653 URL: https://svnweb.freebsd.org/changeset/base/364653 Log: MFC r360787, r360851, r360870-r360872 r360787: linuxkpi: Add pci_iomap and pci_iounmap Those function are use to map/unmap io region of a pci device. Different resource can be mapped depending on the bar so use a tailq to store them all. Sponsored-by: The FreeBSD Foundation Reviewed by: emaste, hselasky Differential Revision: https://reviews.freebsd.org/D24696 r360851: linuxkpi: Add bitmap_copy and bitmap_andnot bitmap_copy simply copy the bitmaps, no idea why it exists. bitmap_andnot is similar to bitmap_and but uses !src2. Sponsored-by: The FreeBSD Foundation Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D24782 r360870: linuxkpi: Add bitmap_alloc and bitmap_free This is a simple call to kmallock_array/kfree, therefore include linux/slab.h as this is where the kmalloc_array/kfree definition is. Sponsored-by: The FreeBSD Foundation Reviewed by: hselsasky Differential Revision: https://reviews.freebsd.org/D24794 r360871: linuxkpi: Really add bitmap_alloc and bitmap_zalloc This was missing in r360870 Sponsored-by: The FreeBSD Foundation r360872: qnlx: Do not redifines types. r360870 added linux/slab.h into liunx/bitmap.h and this include linux/types.h The qlnx driver is redefining some of those types so remove them and add an explicit linux/types.h include. Pointy hat: manu Reported by: Austin Shafer Modified: stable/12/sys/compat/linuxkpi/common/include/linux/bitmap.h stable/12/sys/compat/linuxkpi/common/include/linux/pci.h stable/12/sys/compat/linuxkpi/common/src/linux_pci.c stable/12/sys/dev/qlnx/qlnxe/bcm_osal.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/bitmap.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/bitmap.h Mon Aug 24 10:28:15 2020 (r364652) +++ stable/12/sys/compat/linuxkpi/common/include/linux/bitmap.h Mon Aug 24 10:42:04 2020 (r364653) @@ -30,6 +30,7 @@ #define _LINUX_BITMAP_H_ #include +#include static inline void bitmap_zero(unsigned long *addr, const unsigned int size) @@ -277,6 +278,17 @@ bitmap_complement(unsigned long *dst, const unsigned l } static inline void +bitmap_copy(unsigned long *dst, const unsigned long *src, + const unsigned int size) +{ + const unsigned int end = BITS_TO_LONGS(size); + unsigned int i; + + for (i = 0; i != end; i++) + dst[i] = src[i]; +} + +static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, const unsigned int size) { @@ -299,6 +311,17 @@ bitmap_and(unsigned long *dst, const unsigned long *sr } static inline void +bitmap_andnot(unsigned long *dst, const unsigned long *src1, + const unsigned long *src2, const unsigned int size) +{ + const unsigned int end = BITS_TO_LONGS(size); + unsigned int i; + + for (i = 0; i != end; i++) + dst[i] = src1[i] & ~src2[i]; +} + +static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, const unsigned int size) { @@ -307,6 +330,25 @@ bitmap_xor(unsigned long *dst, const unsigned long *sr for (i = 0; i != end; i++) dst[i] = src1[i] ^ src2[i]; +} + +static inline unsigned long * +bitmap_alloc(unsigned int size, gfp_t flags) +{ + return (kmalloc_array(BITS_TO_LONGS(size), + sizeof(unsigned long), flags)); +} + +static inline unsigned long * +bitmap_zalloc(unsigned int size, gfp_t flags) +{ + return (bitmap_alloc(size, flags | __GFP_ZERO)); +} + +static inline void +bitmap_free(const unsigned long *bitmap) +{ + kfree(bitmap); } #endif /* _LINUX_BITMAP_H_ */ Modified: stable/12/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/pci.h Mon Aug 24 10:28:15 2020 (r364652) +++ stable/12/sys/compat/linuxkpi/common/include/linux/pci.h Mon Aug 24 10:42:04 2020 (r364653) @@ -222,6 +222,13 @@ extern spinlock_t pci_lock; #define __devexit_p(x) x +struct pci_mmio_region { + TAILQ_ENTRY(pci_mmio_region) next; + struct resource *res; + int rid; + int type; +}; + struct pci_dev { struct device dev; struct list_head links; @@ -236,6 +243,8 @@ struct pci_dev { uint32_t class; uint8_t revision; bool msi_enabled; + + TAILQ_HEAD(, pci_mmio_region) mmio; }; static inline struct resource_list_entry * @@ -657,6 +666,41 @@ static inline int pci_enable_sriov(struct pci_dev *dev } static inline void pci_disable_sriov(struct pci_dev *dev) { +} + +static inline void * +pci_iomap(struct pci_dev *dev, int mmio_bar, int mmio_size __unused) +{ + struct pci_mmio_region *mmio; + + mmio = malloc(sizeof(*mmio), M_DEVBUF, M_WAITOK | M_ZERO); + mmio->rid = PCIR_BAR(mmio_bar); + mmio->type = pci_resource_type(dev, mmio_bar); + mmio->res = bus_alloc_resource_any(dev->dev.bsddev, mmio->type, + &mmio->rid, RF_ACTIVE); + if (mmio->res == NULL) { + free(mmio, M_DEVBUF); + return (NULL); + } + TAILQ_INSERT_TAIL(&dev->mmio, mmio, next); + + return ((void *)rman_get_bushandle(mmio->res)); +} + +static inline void +pci_iounmap(struct pci_dev *dev, void *res) +{ + struct pci_mmio_region *mmio, *p; + + TAILQ_FOREACH_SAFE(mmio, &dev->mmio, next, p) { + if (res != (void *)rman_get_bushandle(mmio->res)) + continue; + bus_release_resource(dev->dev.bsddev, + mmio->type, mmio->rid, mmio->res); + TAILQ_REMOVE(&dev->mmio, mmio, next); + free(mmio, M_DEVBUF); + return; + } } #define DEFINE_PCI_DEVICE_TABLE(_table) \ Modified: stable/12/sys/compat/linuxkpi/common/src/linux_pci.c ============================================================================== --- stable/12/sys/compat/linuxkpi/common/src/linux_pci.c Mon Aug 24 10:28:15 2020 (r364652) +++ stable/12/sys/compat/linuxkpi/common/src/linux_pci.c Mon Aug 24 10:42:04 2020 (r364653) @@ -271,6 +271,7 @@ linux_pci_attach_device(device_t dev, struct pci_drive if (error) goto out_dma_init; + TAILQ_INIT(&pdev->mmio); pbus = malloc(sizeof(*pbus), M_DEVBUF, M_WAITOK | M_ZERO); pbus->self = pdev; pbus->number = pci_get_bus(dev); Modified: stable/12/sys/dev/qlnx/qlnxe/bcm_osal.h ============================================================================== --- stable/12/sys/dev/qlnx/qlnxe/bcm_osal.h Mon Aug 24 10:28:15 2020 (r364652) +++ stable/12/sys/dev/qlnx/qlnxe/bcm_osal.h Mon Aug 24 10:42:04 2020 (r364653) @@ -34,6 +34,8 @@ #include "ecore_status.h" #include +#include + #if __FreeBSD_version >= 1200032 #include #else @@ -112,11 +114,6 @@ extern void qlnx_vf_flr_update(void *p_hwfn); #define s32 uint32_t #ifndef QLNX_RDMA - -typedef uint16_t __le16; -typedef uint32_t __le32; -typedef uint16_t __be16; -typedef uint32_t __be32; static __inline unsigned long roundup_pow_of_two(unsigned long x) From owner-svn-src-all@freebsd.org Mon Aug 24 10:46:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98B6C3B9AC8; Mon, 24 Aug 2020 10:46:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZph23Yhsz4Yq3; Mon, 24 Aug 2020 10:46:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5DB1D17712; Mon, 24 Aug 2020 10:46:10 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07OAkAQh059382; Mon, 24 Aug 2020 10:46:10 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OAk9Z4059378; Mon, 24 Aug 2020 10:46:09 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202008241046.07OAk9Z4059378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 24 Aug 2020 10:46:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364654 - stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 364654 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 10:46:10 -0000 Author: manu Date: Mon Aug 24 10:46:09 2020 New Revision: 364654 URL: https://svnweb.freebsd.org/changeset/base/364654 Log: MFC r361007, r361138-r361140, r361245-r361246 r361007: linuxkpi: Add EBADRQC to errno.h This is used in the amdgpu driver from Linux 5.2 Sponsored-by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24807 r361138: linuxkpi: Add atomic_dec_and_mutex_lock This function decrement the counter and if the result is 0 it acquires the mutex and returns 1, if not it simply returns 0. Needed by DRM from Linux v5.3 Sponsored-by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24847 r361139: linuxkpi: Add __mutex_init Same as mutex_init, the lock_class_key argument seems to be only used for debug in Linux, simply ignore it for now. Needed by DRM in Linux v5.3 Sponsored-by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24848 r361140: linuxkpi: Add offsetofend macro This calculate the offset of the end of the member in the given struct. Needed by DRM in Linux v5.3 Sponsored-by: The FreeBSD Foudation Differential Revision: https://reviews.freebsd.org/D24849 r361245: linuxkpi: Add __init_waitqueue_head The only difference with init_waitqueue_head is that the name and the lock class key are provided but we don't use those so use init_waitqueue_head directly. Sponsored-by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24861 r361246: linuxkpi: add pci_dev_present pci_dev_present shows if a set of pci ids are present in the system. It just wraps pci_find_device. Needed by DRMv5.2 Submitted by: Austing Shafer (ashafer@badland.io) Differential Revision: https://reviews.freebsd.org/D24796 Modified: stable/12/sys/compat/linuxkpi/common/include/linux/errno.h stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h stable/12/sys/compat/linuxkpi/common/include/linux/mutex.h stable/12/sys/compat/linuxkpi/common/include/linux/pci.h stable/12/sys/compat/linuxkpi/common/include/linux/wait.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/errno.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/errno.h Mon Aug 24 10:42:04 2020 (r364653) +++ stable/12/sys/compat/linuxkpi/common/include/linux/errno.h Mon Aug 24 10:46:09 2020 (r364654) @@ -33,6 +33,8 @@ #include +#define EBADRQC 56 /* Bad request code */ + #define ECHRNG EDOM #define ETIME ETIMEDOUT #define ECOMM ESTALE Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Aug 24 10:42:04 2020 (r364653) +++ stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Aug 24 10:46:09 2020 (r364654) @@ -465,6 +465,9 @@ kstrtobool_from_user(const char __user *s, size_t coun type __max2 = (y); \ __max1 > __max2 ? __max1 : __max2; }) +#define offsetofend(t, m) \ + (offsetof(t, m) + sizeof((((t *)0)->m))) + #define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) #define clamp(x, lo, hi) min( max(x,lo), hi) #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/mutex.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/mutex.h Mon Aug 24 10:42:04 2020 (r364653) +++ stable/12/sys/compat/linuxkpi/common/include/linux/mutex.h Mon Aug 24 10:46:09 2020 (r364654) @@ -37,6 +37,7 @@ #include #include +#include typedef struct mutex { struct sx sx; @@ -107,6 +108,9 @@ mutex_trylock_recursive(struct mutex *lock) #define mutex_init(_m) \ linux_mutex_init(_m, mutex_name(#_m), SX_NOWITNESS) +#define __mutex_init(_m, _n, _l) \ + linux_mutex_init(_m, _n, SX_NOWITNESS) + #define mutex_init_witness(_m) \ linux_mutex_init(_m, mutex_name(#_m), SX_DUPOK) @@ -123,6 +127,16 @@ static inline bool mutex_is_owned(mutex_t *m) { return (sx_xlocked(&m->sx)); +} + +static inline int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *m) +{ + if (atomic_dec_and_test(cnt)) { + mutex_lock(m); + return (1); + } + + return (0); } #ifdef WITNESS_ALL Modified: stable/12/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/pci.h Mon Aug 24 10:42:04 2020 (r364653) +++ stable/12/sys/compat/linuxkpi/common/include/linux/pci.h Mon Aug 24 10:46:09 2020 (r364654) @@ -1050,4 +1050,16 @@ extern int linux_pci_attach_device(device_t, struct pc const struct pci_device_id *, struct pci_dev *); extern int linux_pci_detach_device(struct pci_dev *); +static inline int +pci_dev_present(const struct pci_device_id *cur) +{ + while (cur != NULL && (cur->vendor || cur->device)) { + if (pci_find_device(cur->vendor, cur->device) != NULL) { + return (1); + } + cur++; + } + return (0); +} + #endif /* _LINUX_PCI_H_ */ Modified: stable/12/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/wait.h Mon Aug 24 10:42:04 2020 (r364653) +++ stable/12/sys/compat/linuxkpi/common/include/linux/wait.h Mon Aug 24 10:46:09 2020 (r364654) @@ -119,6 +119,8 @@ extern wait_queue_func_t default_wake_function; INIT_LIST_HEAD(&(wqh)->task_list); \ } while (0) +#define __init_waitqueue_head(wqh, name, lk) init_waitqueue_head(wqh) + void linux_init_wait_entry(wait_queue_t *, int); void linux_wake_up(wait_queue_head_t *, unsigned int, int, bool); From owner-svn-src-all@freebsd.org Mon Aug 24 11:44:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07D523BB41C; Mon, 24 Aug 2020 11:44:21 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZqz86RHnz4ctf; Mon, 24 Aug 2020 11:44:20 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C14AA17C77; Mon, 24 Aug 2020 11:44:20 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07OBiKlo096407; Mon, 24 Aug 2020 11:44:20 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OBiK0E096406; Mon, 24 Aug 2020 11:44:20 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202008241144.07OBiK0E096406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Mon, 24 Aug 2020 11:44:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364655 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 364655 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 11:44:21 -0000 Author: vmaffione Date: Mon Aug 24 11:44:20 2020 New Revision: 364655 URL: https://svnweb.freebsd.org/changeset/base/364655 Log: iflib: fix isc_rxd_flush call in netmap_fl_refill() The semantic of the pidx argument of isc_rxd_flush() is the last valid index of in the free list, rather than the next index to be published. However, netmap was still using the old convention. While there, also refactor the netmap_fl_refill() to simplify a little bit and add an assertion. MFC after: 2 weeks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Mon Aug 24 10:46:09 2020 (r364654) +++ head/sys/net/iflib.c Mon Aug 24 11:44:20 2020 (r364655) @@ -757,7 +757,7 @@ iflib_num_tx_descs(if_ctx_t ctx) MODULE_DEPEND(iflib, netmap, 1, 1, 1); -static int netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, uint32_t nm_i, bool init); +static int netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, bool init); /* * device-specific sysctl variables: @@ -828,33 +828,43 @@ iflib_netmap_register(struct netmap_adapter *na, int o } static int -netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, uint32_t nm_i, bool init) +netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, bool init) { struct netmap_adapter *na = kring->na; u_int const lim = kring->nkr_num_slots - 1; u_int head = kring->rhead; + u_int nm_i = kring->nr_hwcur; struct netmap_ring *ring = kring->ring; bus_dmamap_t *map; struct if_rxd_update iru; if_ctx_t ctx = rxq->ifr_ctx; iflib_fl_t fl = &rxq->ifr_fl[0]; - uint32_t nic_i_first, nic_i; + u_int nic_i_first, nic_i; int i; #if IFLIB_DEBUG_COUNTERS int rf_count = 0; #endif - if (nm_i == head && __predict_true(!init)) + /* + * Netmap requires that we leave (at least) one free slot + * in the ring, so that it can distinguish between an empty + * ring (nr_hwcur == nr_hwtail, i.e. all the buffers owned by the + * user) and a full ring (nr_hwtail == (nr_hwcur - 1) mod N, i.e. + * all the buffers owned by the kernel). + * We thus set head (the refill limit) to nr_hwcur - 1 + * at initialization. The rest of the code will then make sure + * than nr_hwtail never overcomes nr_hwcur. + */ + if (__predict_false(init)) { + head = nm_prev(nm_i, lim); + } else if (nm_i == head) { + /* Nothing to do. We can leave early. */ return (0); + } iru_init(&iru, rxq, 0 /* flid */); map = fl->ifl_sds.ifsd_map; nic_i = netmap_idx_k2n(kring, nm_i); - /* - * IMPORTANT: we must leave one free slot in the ring, - * so move head back by one unit - */ - head = nm_prev(head, lim); DBG_COUNTER_INC(fl_refills); while (nm_i != head) { #if IFLIB_DEBUG_COUNTERS @@ -895,9 +905,13 @@ netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring } kring->nr_hwcur = head; + /* The pidx argument of isc_rxd_flush() is the index of the last valid + * slot in the free list ring. We need therefore to decrement nic_i, + * similarly to what happens in iflib_fl_refill() for ifl_pidx. */ bus_dmamap_sync(fl->ifl_ifdi->idi_tag, fl->ifl_ifdi->idi_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - ctx->isc_rxd_flush(ctx->ifc_softc, rxq->ifr_id, fl->ifl_id, nic_i); + ctx->isc_rxd_flush(ctx->ifc_softc, rxq->ifr_id, fl->ifl_id, + nm_prev(nic_i, lim)); DBG_COUNTER_INC(rxd_flush); return (0); @@ -1127,6 +1141,7 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int fl nic_i = fl->ifl_cidx; nm_i = netmap_idx_n2k(kring, nic_i); + MPASS(nm_i == kring->nr_hwtail); for (n = 0; avail > 0 && nm_i != hwtail_lim; n++, avail--) { rxd_info_zero(&ri); ri.iri_frags = rxq->ifr_frags; @@ -1165,9 +1180,9 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int fl * nic_i is the index in the NIC ring, and * nm_i == (nic_i + kring->nkr_hwofs) % ring_size */ - nm_i = kring->nr_hwcur; + netmap_fl_refill(rxq, kring, false); - return (netmap_fl_refill(rxq, kring, nm_i, false)); + return (0); } static void @@ -1239,14 +1254,12 @@ iflib_netmap_rxq_init(if_ctx_t ctx, iflib_rxq_t rxq) struct netmap_adapter *na = NA(ctx->ifc_ifp); struct netmap_kring *kring; struct netmap_slot *slot; - uint32_t nm_i; slot = netmap_reset(na, NR_RX, rxq->ifr_id, 0); if (slot == NULL) return (0); kring = na->rx_rings[rxq->ifr_id]; - nm_i = netmap_idx_n2k(kring, 0); - netmap_fl_refill(rxq, kring, nm_i, true); + netmap_fl_refill(rxq, kring, true); return (1); } From owner-svn-src-all@freebsd.org Mon Aug 24 11:49:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A00053BB716; Mon, 24 Aug 2020 11:49:50 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZr5V3lPBz4dCG; Mon, 24 Aug 2020 11:49:50 +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 5F4F41809A; Mon, 24 Aug 2020 11:49:50 +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 07OBnonW096834; Mon, 24 Aug 2020 11:49:50 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OBnodk096832; Mon, 24 Aug 2020 11:49:50 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <202008241149.07OBnodk096832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Mon, 24 Aug 2020 11:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364656 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head X-SVN-Commit-Author: grehan X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 364656 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 11:49:50 -0000 Author: grehan Date: Mon Aug 24 11:49:49 2020 New Revision: 364656 URL: https://svnweb.freebsd.org/changeset/base/364656 Log: cpu_auxmsr: assert caller is preventing CPU migration. Submitted by: Adam Fenn (adam at fenn dot io) Requested by: kib Reviewed by: kib, grehan Approved by: kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D26166 Modified: head/sys/amd64/amd64/initcpu.c head/sys/i386/i386/initcpu.c Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Mon Aug 24 11:44:20 2020 (r364655) +++ head/sys/amd64/amd64/initcpu.c Mon Aug 24 11:49:49 2020 (r364656) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -218,11 +219,14 @@ init_via(void) } /* - * The value for the TSC_AUX MSR and rdtscp/rdpid. + * The value for the TSC_AUX MSR and rdtscp/rdpid on the invoking CPU. + * + * Caller should prevent CPU migration. */ u_int cpu_auxmsr(void) { + KASSERT((read_rflags() & PSL_I) == 0, ("context switch possible")); return (PCPU_GET(cpuid)); } Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Mon Aug 24 11:44:20 2020 (r364655) +++ head/sys/i386/i386/initcpu.c Mon Aug 24 11:49:49 2020 (r364656) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -628,11 +629,14 @@ init_transmeta(void) #endif /* - * The value for the TSC_AUX MSR and rdtscp/rdpid. + * The value for the TSC_AUX MSR and rdtscp/rdpid on the invoking CPU. + * + * Caller should prevent CPU migration. */ u_int cpu_auxmsr(void) { + KASSERT((read_eflags() & PSL_I) == 0, ("context switch possible")); return (PCPU_GET(cpuid)); } From owner-svn-src-all@freebsd.org Mon Aug 24 12:20:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A20793BD021; Mon, 24 Aug 2020 12:20:56 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZrnN3mDHz4gMC; Mon, 24 Aug 2020 12:20:56 +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 64D36186A1; Mon, 24 Aug 2020 12:20:56 +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 07OCKuGA016497; Mon, 24 Aug 2020 12:20:56 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OCKubX016495; Mon, 24 Aug 2020 12:20:56 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241220.07OCKubX016495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 12:20:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364657 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364657 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:20:56 -0000 Author: trasz Date: Mon Aug 24 12:20:55 2020 New Revision: 364657 URL: https://svnweb.freebsd.org/changeset/base/364657 Log: MFC r363322: Make linux(4) support the BLKPBSZGET ioctl. Oracle uses it. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_ioctl.c stable/12/sys/compat/linux/linux_ioctl.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/12/sys/compat/linux/linux_ioctl.c Mon Aug 24 11:49:49 2020 (r364656) +++ stable/12/sys/compat/linux/linux_ioctl.c Mon Aug 24 12:20:55 2020 (r364657) @@ -285,9 +285,9 @@ linux_ioctl_disk(struct thread *td, struct linux_ioctl { struct file *fp; int error; - u_int sectorsize; + u_int sectorsize, psectorsize; uint64_t blksize64; - off_t mediasize; + off_t mediasize, stripesize; error = fget(td, args->fd, &cap_ioctl_rights, &fp); if (error != 0) @@ -327,6 +327,27 @@ linux_ioctl_disk(struct thread *td, struct linux_ioctl return (copyout(§orsize, (void *)args->arg, sizeof(sectorsize))); break; + case LINUX_BLKPBSZGET: + error = fo_ioctl(fp, DIOCGSTRIPESIZE, + (caddr_t)&stripesize, td->td_ucred, td); + if (error != 0) { + fdrop(fp, td); + return (error); + } + if (stripesize > 0 && stripesize <= 4096) { + psectorsize = stripesize; + } else { + error = fo_ioctl(fp, DIOCGSECTORSIZE, + (caddr_t)§orsize, td->td_ucred, td); + if (error != 0) { + fdrop(fp, td); + return (error); + } + psectorsize = sectorsize; + } + fdrop(fp, td); + return (copyout(&psectorsize, (void *)args->arg, + sizeof(psectorsize))); } fdrop(fp, td); return (ENOIOCTL); Modified: stable/12/sys/compat/linux/linux_ioctl.h ============================================================================== --- stable/12/sys/compat/linux/linux_ioctl.h Mon Aug 24 11:49:49 2020 (r364656) +++ stable/12/sys/compat/linux/linux_ioctl.h Mon Aug 24 12:20:55 2020 (r364657) @@ -58,9 +58,10 @@ #define LINUX_BLKSECTGET 0x1267 #define LINUX_BLKSSZGET 0x1268 #define LINUX_BLKGETSIZE64 0x1272 +#define LINUX_BLKPBSZGET 0x127b #define LINUX_IOCTL_DISK_MIN LINUX_BLKROSET -#define LINUX_IOCTL_DISK_MAX LINUX_BLKGETSIZE64 +#define LINUX_IOCTL_DISK_MAX LINUX_BLKPBSZGET /* * hdio From owner-svn-src-all@freebsd.org Mon Aug 24 12:23:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6BA8E3BD25D; Mon, 24 Aug 2020 12:23:56 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZrrr2KWkz4gJ2; Mon, 24 Aug 2020 12:23:56 +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 34236186BA; Mon, 24 Aug 2020 12:23:56 +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 07OCNuKu021266; Mon, 24 Aug 2020 12:23:56 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OCNtQv021264; Mon, 24 Aug 2020 12:23:55 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241223.07OCNtQv021264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 12:23:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364658 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364658 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:23:56 -0000 Author: trasz Date: Mon Aug 24 12:23:55 2020 New Revision: 364658 URL: https://svnweb.freebsd.org/changeset/base/364658 Log: MFC r362014: Support SO_SNDBUFFORCE/SO_RCVBUFFORCE by aliasing them to the standard SO_SNDBUF/SO_RCVBUF. Mostly cosmetics, to get rid of the warning during 'apt upgrade'. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_socket.c stable/12/sys/compat/linux/linux_socket.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 12:20:55 2020 (r364657) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 12:23:55 2020 (r364658) @@ -363,8 +363,10 @@ linux_to_bsd_so_sockopt(int opt) case LINUX_SO_BROADCAST: return (SO_BROADCAST); case LINUX_SO_SNDBUF: + case LINUX_SO_SNDBUFFORCE: return (SO_SNDBUF); case LINUX_SO_RCVBUF: + case LINUX_SO_RCVBUFFORCE: return (SO_RCVBUF); case LINUX_SO_KEEPALIVE: return (SO_KEEPALIVE); Modified: stable/12/sys/compat/linux/linux_socket.h ============================================================================== --- stable/12/sys/compat/linux/linux_socket.h Mon Aug 24 12:20:55 2020 (r364657) +++ stable/12/sys/compat/linux/linux_socket.h Mon Aug 24 12:23:55 2020 (r364658) @@ -206,6 +206,8 @@ int linux_accept(struct thread *td, struct linux_accep #endif #define LINUX_SO_TIMESTAMP 29 #define LINUX_SO_ACCEPTCONN 30 +#define LINUX_SO_SNDBUFFORCE 32 +#define LINUX_SO_RCVBUFFORCE 33 /* Socket options */ #define LINUX_IP_TOS 1 From owner-svn-src-all@freebsd.org Mon Aug 24 12:26:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 601AA3BD662; Mon, 24 Aug 2020 12:26:50 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZrwB1rjJz4h5N; Mon, 24 Aug 2020 12:26:50 +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 23929184D7; Mon, 24 Aug 2020 12:26:50 +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 07OCQoao021626; Mon, 24 Aug 2020 12:26:50 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OCQnEq021624; Mon, 24 Aug 2020 12:26:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241226.07OCQnEq021624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 12:26:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364659 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364659 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:26:50 -0000 Author: trasz Date: Mon Aug 24 12:26:49 2020 New Revision: 364659 URL: https://svnweb.freebsd.org/changeset/base/364659 Log: MFC r357076: Make linux(4) handle MAP_32BIT. This unbreaks Mono (mono-devel-4.6.2.7+dfsg-1ubuntu1 from Ubuntu Bionic); previously would crash on "amd64_is_imm32" assert. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_mmap.c stable/12/sys/compat/linux/linux_mmap.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_mmap.c ============================================================================== --- stable/12/sys/compat/linux/linux_mmap.c Mon Aug 24 12:23:55 2020 (r364658) +++ stable/12/sys/compat/linux/linux_mmap.c Mon Aug 24 12:26:49 2020 (r364659) @@ -113,7 +113,15 @@ linux_mmap_common(struct thread *td, uintptr_t addr, s if (flags & LINUX_MAP_GROWSDOWN) bsd_flags |= MAP_STACK; +#if defined(__amd64__) /* + * According to the Linux mmap(2) man page, "MAP_32BIT flag + * is ignored when MAP_FIXED is set." + */ + if ((flags & LINUX_MAP_32BIT) && (flags & LINUX_MAP_FIXED) == 0) + bsd_flags |= MAP_32BIT; + + /* * PROT_READ, PROT_WRITE, or PROT_EXEC implies PROT_READ and PROT_EXEC * on Linux/i386 if the binary requires executable stack. * We do this only for IA32 emulation as on native i386 this is does not @@ -121,7 +129,6 @@ linux_mmap_common(struct thread *td, uintptr_t addr, s * * XXX. Linux checks that the file system is not mounted with noexec. */ -#if defined(__amd64__) linux_fixup_prot(td, &prot); #endif Modified: stable/12/sys/compat/linux/linux_mmap.h ============================================================================== --- stable/12/sys/compat/linux/linux_mmap.h Mon Aug 24 12:23:55 2020 (r364658) +++ stable/12/sys/compat/linux/linux_mmap.h Mon Aug 24 12:26:49 2020 (r364659) @@ -39,6 +39,7 @@ #define LINUX_MAP_PRIVATE 0x0002 #define LINUX_MAP_FIXED 0x0010 #define LINUX_MAP_ANON 0x0020 +#define LINUX_MAP_32BIT 0x0040 #define LINUX_MAP_GROWSDOWN 0x0100 #define LINUX_PROT_GROWSDOWN 0x01000000 From owner-svn-src-all@freebsd.org Mon Aug 24 12:29:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE0D03BD7B0; Mon, 24 Aug 2020 12:29:23 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZrz75nrJz4h6D; Mon, 24 Aug 2020 12:29:23 +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 AA25718995; Mon, 24 Aug 2020 12:29:23 +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 07OCTN4J021795; Mon, 24 Aug 2020 12:29:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OCTNqj021793; Mon, 24 Aug 2020 12:29:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241229.07OCTNqj021793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 12:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364660 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364660 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:29:24 -0000 Author: trasz Date: Mon Aug 24 12:29:23 2020 New Revision: 364660 URL: https://svnweb.freebsd.org/changeset/base/364660 Log: MFC r357203: Add TCP_CORK support to linux(4). This fixes one of the things Nginx trips over. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_socket.c stable/12/sys/compat/linux/linux_socket.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 12:26:49 2020 (r364659) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 12:29:23 2020 (r364660) @@ -401,6 +401,8 @@ linux_to_bsd_tcp_sockopt(int opt) return (TCP_NODELAY); case LINUX_TCP_MAXSEG: return (TCP_MAXSEG); + case LINUX_TCP_CORK: + return (TCP_NOPUSH); case LINUX_TCP_KEEPIDLE: return (TCP_KEEPIDLE); case LINUX_TCP_KEEPINTVL: Modified: stable/12/sys/compat/linux/linux_socket.h ============================================================================== --- stable/12/sys/compat/linux/linux_socket.h Mon Aug 24 12:26:49 2020 (r364659) +++ stable/12/sys/compat/linux/linux_socket.h Mon Aug 24 12:29:23 2020 (r364660) @@ -248,6 +248,7 @@ int linux_accept(struct thread *td, struct linux_accep #define LINUX_TCP_NODELAY 1 #define LINUX_TCP_MAXSEG 2 +#define LINUX_TCP_CORK 3 #define LINUX_TCP_KEEPIDLE 4 #define LINUX_TCP_KEEPINTVL 5 #define LINUX_TCP_KEEPCNT 6 From owner-svn-src-all@freebsd.org Mon Aug 24 12:30:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A0DC3BDC12; Mon, 24 Aug 2020 12:30:44 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZs0h1J3pz4hLJ; Mon, 24 Aug 2020 12:30:44 +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 1001E184DD; Mon, 24 Aug 2020 12:30:44 +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 07OCUhH3023890; Mon, 24 Aug 2020 12:30:43 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OCUhlF023889; Mon, 24 Aug 2020 12:30:43 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241230.07OCUhlF023889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 12:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364661 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364661 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:30:44 -0000 Author: trasz Date: Mon Aug 24 12:30:43 2020 New Revision: 364661 URL: https://svnweb.freebsd.org/changeset/base/364661 Log: MFC r362051: Make linux(4) handle SO_REUSEPORT. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_socket.c stable/12/sys/compat/linux/linux_socket.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 12:29:23 2020 (r364660) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 12:30:43 2020 (r364661) @@ -374,6 +374,8 @@ linux_to_bsd_so_sockopt(int opt) return (SO_OOBINLINE); case LINUX_SO_LINGER: return (SO_LINGER); + case LINUX_SO_REUSEPORT: + return (SO_REUSEPORT_LB); case LINUX_SO_PEERCRED: return (LOCAL_PEERCRED); case LINUX_SO_RCVLOWAT: Modified: stable/12/sys/compat/linux/linux_socket.h ============================================================================== --- stable/12/sys/compat/linux/linux_socket.h Mon Aug 24 12:29:23 2020 (r364660) +++ stable/12/sys/compat/linux/linux_socket.h Mon Aug 24 12:30:43 2020 (r364661) @@ -196,6 +196,7 @@ int linux_accept(struct thread *td, struct linux_accep #define LINUX_SO_NO_CHECK 11 #define LINUX_SO_PRIORITY 12 #define LINUX_SO_LINGER 13 +#define LINUX_SO_REUSEPORT 15 #ifndef LINUX_SO_PASSCRED /* powerpc differs */ #define LINUX_SO_PASSCRED 16 #define LINUX_SO_PEERCRED 17 From owner-svn-src-all@freebsd.org Mon Aug 24 12:33:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2DBC53BDCA9; Mon, 24 Aug 2020 12:33:44 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZs480VFNz4hN6; Mon, 24 Aug 2020 12:33:44 +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 E85191884E; Mon, 24 Aug 2020 12:33:43 +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 07OCXhsn028113; Mon, 24 Aug 2020 12:33:43 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OCXgNV028108; Mon, 24 Aug 2020 12:33:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241233.07OCXgNV028108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 12:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364662 - in stable/12: share/man/man4 sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/compat/linux X-SVN-Commit-Revision: 364662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:33:44 -0000 Author: trasz Date: Mon Aug 24 12:33:42 2020 New Revision: 364662 URL: https://svnweb.freebsd.org/changeset/base/364662 Log: MFC r355820: Add a hack to make ^T work for Linux binaries, enabled with 'compat.linux.preserve_vstatus=1' sysctl. Sponsored by: The FreeBSD Foundation Modified: stable/12/share/man/man4/linux.4 stable/12/sys/compat/linux/linux_ioctl.c stable/12/sys/compat/linux/linux_ioctl.h stable/12/sys/compat/linux/linux_mib.c stable/12/sys/compat/linux/linux_mib.h Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/linux.4 ============================================================================== --- stable/12/share/man/man4/linux.4 Mon Aug 24 12:30:43 2020 (r364661) +++ stable/12/share/man/man4/linux.4 Mon Aug 24 12:33:42 2020 (r364662) @@ -109,6 +109,14 @@ Recent versions of GNU libc are known to use different on the value of this sysctl. .It Va compat.linux.oss_version Linux Open Sound System version. +.It Va compat.linux.preserve_vstatus +When set to 1, it prevents Linux applications from resetting the +.Xr termios 4 +VSTATUS setting. +From a user perspective, this makes +.Va SIGINFO +work for Linux executables. +Defaults to 0. .Sh FILES .Bl -tag -width /compat/linux/dev/shm -compact .It Pa /compat/linux Modified: stable/12/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/12/sys/compat/linux/linux_ioctl.c Mon Aug 24 12:30:43 2020 (r364661) +++ stable/12/sys/compat/linux/linux_ioctl.c Mon Aug 24 12:33:42 2020 (r364662) @@ -552,6 +552,8 @@ bsd_to_linux_termios(struct termios *bios, struct linu lios->c_cc[LINUX_VDISCARD] = bios->c_cc[VDISCARD]; lios->c_cc[LINUX_VWERASE] = bios->c_cc[VWERASE]; lios->c_cc[LINUX_VLNEXT] = bios->c_cc[VLNEXT]; + if (linux_preserve_vstatus) + lios->c_cc[LINUX_VSTATUS] = bios->c_cc[VSTATUS]; for (i=0; ic_cc[VDISCARD] = lios->c_cc[LINUX_VDISCARD]; bios->c_cc[VWERASE] = lios->c_cc[LINUX_VWERASE]; bios->c_cc[VLNEXT] = lios->c_cc[LINUX_VLNEXT]; + if (linux_preserve_vstatus) + bios->c_cc[VSTATUS] = lios->c_cc[LINUX_VSTATUS]; for (i=0; i= LINUX_KERNVER_2006000) +extern int linux_preserve_vstatus; + #endif /* _LINUX_MIB_H_ */ From owner-svn-src-all@freebsd.org Mon Aug 24 12:35:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 714F13BDAD7; Mon, 24 Aug 2020 12:35:03 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZs5g2MCnz4hg0; Mon, 24 Aug 2020 12:35:03 +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 344C218850; Mon, 24 Aug 2020 12:35:03 +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 07OCZ2al028247; Mon, 24 Aug 2020 12:35:02 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OCZ2Ck028244; Mon, 24 Aug 2020 12:35:02 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241235.07OCZ2Ck028244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 12:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364663 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364663 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:35:03 -0000 Author: trasz Date: Mon Aug 24 12:35:02 2020 New Revision: 364663 URL: https://svnweb.freebsd.org/changeset/base/364663 Log: MFC r357202: Add compat.linux.ignore_ip_recverr sysctl. This is a workaround for missing IP_RECVERR setsockopt(2) support. Without it, DNS resolution is broken for glibc >= 2.30 (glibc BZ #24047). From the user point of view this fixes "yum update" on recent CentOS 8. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_mib.c stable/12/sys/compat/linux/linux_mib.h stable/12/sys/compat/linux/linux_socket.c stable/12/sys/compat/linux/linux_socket.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_mib.c ============================================================================== --- stable/12/sys/compat/linux/linux_mib.c Mon Aug 24 12:33:42 2020 (r364662) +++ stable/12/sys/compat/linux/linux_mib.c Mon Aug 24 12:35:02 2020 (r364663) @@ -62,6 +62,10 @@ static unsigned linux_osd_jail_slot; SYSCTL_NODE(_compat, OID_AUTO, linux, CTLFLAG_RW, 0, "Linux mode"); +int linux_ignore_ip_recverr = 1; +SYSCTL_INT(_compat_linux, OID_AUTO, ignore_ip_recverr, CTLFLAG_RWTUN, + &linux_ignore_ip_recverr, 0, "Ignore enabling IP_RECVERR"); + int linux_preserve_vstatus = 0; SYSCTL_INT(_compat_linux, OID_AUTO, preserve_vstatus, CTLFLAG_RWTUN, &linux_preserve_vstatus, 0, "Preserve VSTATUS termios(4) flag"); Modified: stable/12/sys/compat/linux/linux_mib.h ============================================================================== --- stable/12/sys/compat/linux/linux_mib.h Mon Aug 24 12:33:42 2020 (r364662) +++ stable/12/sys/compat/linux/linux_mib.h Mon Aug 24 12:35:02 2020 (r364663) @@ -62,6 +62,7 @@ int linux_kernver(struct thread *td); #define linux_use26(t) (linux_kernver(t) >= LINUX_KERNVER_2006000) +extern int linux_ignore_ip_recverr; extern int linux_preserve_vstatus; #endif /* _LINUX_MIB_H_ */ Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 12:33:42 2020 (r364662) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 12:35:02 2020 (r364663) @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include #endif #include +#include #include #include #include @@ -1569,6 +1570,14 @@ linux_setsockopt(struct thread *td, struct linux_setso } break; case IPPROTO_IP: + if (args->optname == LINUX_IP_RECVERR && + linux_ignore_ip_recverr) { + /* + * XXX: This is a hack to unbreak DNS resolution + * with glibc 2.30 and above. + */ + return (0); + } name = linux_to_bsd_ip_sockopt(args->optname); break; case IPPROTO_IPV6: Modified: stable/12/sys/compat/linux/linux_socket.h ============================================================================== --- stable/12/sys/compat/linux/linux_socket.h Mon Aug 24 12:33:42 2020 (r364662) +++ stable/12/sys/compat/linux/linux_socket.h Mon Aug 24 12:35:02 2020 (r364663) @@ -215,6 +215,7 @@ int linux_accept(struct thread *td, struct linux_accep #define LINUX_IP_TTL 2 #define LINUX_IP_HDRINCL 3 #define LINUX_IP_OPTIONS 4 +#define LINUX_IP_RECVERR 11 #define LINUX_IP_MULTICAST_IF 32 #define LINUX_IP_MULTICAST_TTL 33 From owner-svn-src-all@freebsd.org Mon Aug 24 12:43:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49FFA3BDF4E; Mon, 24 Aug 2020 12:43:55 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZsHv1Fb9z4jYm; Mon, 24 Aug 2020 12:43:55 +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 0F10A18AB4; Mon, 24 Aug 2020 12:43:55 +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 07OChsaR034336; Mon, 24 Aug 2020 12:43:54 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OChsIO034334; Mon, 24 Aug 2020 12:43:54 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241243.07OChsIO034334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 12:43:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364664 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364664 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:43:55 -0000 Author: trasz Date: Mon Aug 24 12:43:54 2020 New Revision: 364664 URL: https://svnweb.freebsd.org/changeset/base/364664 Log: MFC r358483 by tijl: linuxulator: Map scheduler priorities to Linux priorities. On Linux the valid range of priorities for the SCHED_FIFO and SCHED_RR scheduling policies is [1,99]. For SCHED_OTHER the single valid priority is 0. On FreeBSD it is [0,31] for all policies. Programs are supposed to query the valid range using sched_get_priority_(min|max), but of course some programs assume the Linux values are valid. This commit adds a tunable compat.linux.map_sched_prio. When enabled sched_get_priority_(min|max) return the Linux values and sched_setscheduler and sched_(get|set)param translate between FreeBSD and Linux values. Because there are more Linux levels than FreeBSD levels, multiple Linux levels map to a single FreeBSD level, which means pre-emption might not happen as it does on Linux, so the tunable allows to disable this behaviour. It is enabled by default because I think it is unlikely that anyone runs real-time software under Linux emulation on FreeBSD that critically relies on correct pre-emption. This fixes FMOD, a commercial sound library used by several games. PR: 240043 Tested by: Alex S Modified: stable/12/sys/compat/linux/linux_misc.c stable/12/sys/compat/linux/linux_misc.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_misc.c ============================================================================== --- stable/12/sys/compat/linux/linux_misc.c Mon Aug 24 12:35:02 2020 (r364663) +++ stable/12/sys/compat/linux/linux_misc.c Mon Aug 24 12:43:54 2020 (r364664) @@ -143,6 +143,11 @@ struct l_pselect6arg { l_size_t ss_len; }; +static bool map_sched_prio = true; +SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, + &map_sched_prio, 0, "Map scheduler priorities to Linux priorities " + "(not POSIX compliant)"); + static int linux_utimensat_nsec_valid(l_long); @@ -1586,6 +1591,33 @@ linux_sched_setscheduler(struct thread *td, if (error) return (error); + if (map_sched_prio) { + switch (policy) { + case SCHED_OTHER: + if (sched_param.sched_priority != 0) + return (EINVAL); + + sched_param.sched_priority = + PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE; + break; + case SCHED_FIFO: + case SCHED_RR: + if (sched_param.sched_priority < 1 || + sched_param.sched_priority >= LINUX_MAX_RT_PRIO) + return (EINVAL); + + /* + * Map [1, LINUX_MAX_RT_PRIO - 1] to + * [0, RTP_PRIO_MAX - RTP_PRIO_MIN] (rounding down). + */ + sched_param.sched_priority = + (sched_param.sched_priority - 1) * + (RTP_PRIO_MAX - RTP_PRIO_MIN + 1) / + (LINUX_MAX_RT_PRIO - 1); + break; + } + } + tdt = linux_tdfind(td, args->pid, -1); if (tdt == NULL) return (ESRCH); @@ -1639,6 +1671,20 @@ linux_sched_get_priority_max(struct thread *td, printf(ARGS(sched_get_priority_max, "%d"), args->policy); #endif + if (map_sched_prio) { + switch (args->policy) { + case LINUX_SCHED_OTHER: + td->td_retval[0] = 0; + return (0); + case LINUX_SCHED_FIFO: + case LINUX_SCHED_RR: + td->td_retval[0] = LINUX_MAX_RT_PRIO - 1; + return (0); + default: + return (EINVAL); + } + } + switch (args->policy) { case LINUX_SCHED_OTHER: bsd.policy = SCHED_OTHER; @@ -1666,6 +1712,20 @@ linux_sched_get_priority_min(struct thread *td, printf(ARGS(sched_get_priority_min, "%d"), args->policy); #endif + if (map_sched_prio) { + switch (args->policy) { + case LINUX_SCHED_OTHER: + td->td_retval[0] = 0; + return (0); + case LINUX_SCHED_FIFO: + case LINUX_SCHED_RR: + td->td_retval[0] = 1; + return (0); + default: + return (EINVAL); + } + } + switch (args->policy) { case LINUX_SCHED_OTHER: bsd.policy = SCHED_OTHER; @@ -2123,7 +2183,7 @@ linux_sched_setparam(struct thread *td, { struct sched_param sched_param; struct thread *tdt; - int error; + int error, policy; #ifdef DEBUG if (ldebug(sched_setparam)) @@ -2138,8 +2198,41 @@ linux_sched_setparam(struct thread *td, if (tdt == NULL) return (ESRCH); + if( map_sched_prio ) { + error = kern_sched_getscheduler(td, tdt, &policy); + if (error) + goto out; + + switch (policy) { + case SCHED_OTHER: + if (sched_param.sched_priority != 0) { + error = EINVAL; + goto out; + } + sched_param.sched_priority = + PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE; + break; + case SCHED_FIFO: + case SCHED_RR: + if (sched_param.sched_priority < 1 || + sched_param.sched_priority >= LINUX_MAX_RT_PRIO) { + error = EINVAL; + goto out; + } + /* + * Map [1, LINUX_MAX_RT_PRIO - 1] to + * [0, RTP_PRIO_MAX - RTP_PRIO_MIN] (rounding down). + */ + sched_param.sched_priority = + (sched_param.sched_priority - 1) * + (RTP_PRIO_MAX - RTP_PRIO_MIN + 1) / + (LINUX_MAX_RT_PRIO - 1); + break; + } + } + error = kern_sched_setparam(td, tdt, &sched_param); - PROC_UNLOCK(tdt->td_proc); +out: PROC_UNLOCK(tdt->td_proc); return (error); } @@ -2149,7 +2242,7 @@ linux_sched_getparam(struct thread *td, { struct sched_param sched_param; struct thread *tdt; - int error; + int error, policy; #ifdef DEBUG if (ldebug(sched_getparam)) @@ -2161,10 +2254,38 @@ linux_sched_getparam(struct thread *td, return (ESRCH); error = kern_sched_getparam(td, tdt, &sched_param); - PROC_UNLOCK(tdt->td_proc); - if (error == 0) - error = copyout(&sched_param, uap->param, - sizeof(sched_param)); + if (error) { + PROC_UNLOCK(tdt->td_proc); + return (error); + } + + if (map_sched_prio) { + error = kern_sched_getscheduler(td, tdt, &policy); + PROC_UNLOCK(tdt->td_proc); + if (error) + return (error); + + switch (policy) { + case SCHED_OTHER: + sched_param.sched_priority = 0; + break; + case SCHED_FIFO: + case SCHED_RR: + /* + * Map [0, RTP_PRIO_MAX - RTP_PRIO_MIN] to + * [1, LINUX_MAX_RT_PRIO - 1] (rounding up). + */ + sched_param.sched_priority = + (sched_param.sched_priority * + (LINUX_MAX_RT_PRIO - 1) + + (RTP_PRIO_MAX - RTP_PRIO_MIN - 1)) / + (RTP_PRIO_MAX - RTP_PRIO_MIN) + 1; + break; + } + } else + PROC_UNLOCK(tdt->td_proc); + + error = copyout(&sched_param, uap->param, sizeof(sched_param)); return (error); } Modified: stable/12/sys/compat/linux/linux_misc.h ============================================================================== --- stable/12/sys/compat/linux/linux_misc.h Mon Aug 24 12:35:02 2020 (r364663) +++ stable/12/sys/compat/linux/linux_misc.h Mon Aug 24 12:43:54 2020 (r364664) @@ -105,6 +105,8 @@ extern const char *linux_kplatform; #define LINUX_SCHED_FIFO 1 #define LINUX_SCHED_RR 2 +#define LINUX_MAX_RT_PRIO 100 + struct l_new_utsname { char sysname[LINUX_MAX_UTSNAME]; char nodename[LINUX_MAX_UTSNAME]; From owner-svn-src-all@freebsd.org Mon Aug 24 12:47:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 260B93BE22D; Mon, 24 Aug 2020 12:47:21 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZsMs0D8bz4jcs; Mon, 24 Aug 2020 12:47:21 +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 DFF9518647; Mon, 24 Aug 2020 12:47:20 +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 07OClKhU034598; Mon, 24 Aug 2020 12:47:20 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OClKjF034596; Mon, 24 Aug 2020 12:47:20 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241247.07OClKjF034596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 12:47:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364665 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364665 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:47:21 -0000 Author: trasz Date: Mon Aug 24 12:47:20 2020 New Revision: 364665 URL: https://svnweb.freebsd.org/changeset/base/364665 Log: MFC r358673 by tijl: Move compat.linux.map_sched_prio sysctl definition to linux_mib.c so it is only defined by linux_common kernel module and not both linux and linux64 modules. Reported by: Yuri Pankov Modified: stable/12/sys/compat/linux/linux_mib.c stable/12/sys/compat/linux/linux_mib.h stable/12/sys/compat/linux/linux_misc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_mib.c ============================================================================== --- stable/12/sys/compat/linux/linux_mib.c Mon Aug 24 12:43:54 2020 (r364664) +++ stable/12/sys/compat/linux/linux_mib.c Mon Aug 24 12:47:20 2020 (r364665) @@ -70,6 +70,11 @@ int linux_preserve_vstatus = 0; SYSCTL_INT(_compat_linux, OID_AUTO, preserve_vstatus, CTLFLAG_RWTUN, &linux_preserve_vstatus, 0, "Preserve VSTATUS termios(4) flag"); +bool linux_map_sched_prio = true; +SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, + &linux_map_sched_prio, 0, "Map scheduler priorities to Linux priorities " + "(not POSIX compliant)"); + static int linux_set_osname(struct thread *td, char *osname); static int linux_set_osrelease(struct thread *td, char *osrelease); static int linux_set_oss_version(struct thread *td, int oss_version); Modified: stable/12/sys/compat/linux/linux_mib.h ============================================================================== --- stable/12/sys/compat/linux/linux_mib.h Mon Aug 24 12:43:54 2020 (r364664) +++ stable/12/sys/compat/linux/linux_mib.h Mon Aug 24 12:47:20 2020 (r364665) @@ -64,5 +64,6 @@ int linux_kernver(struct thread *td); extern int linux_ignore_ip_recverr; extern int linux_preserve_vstatus; +extern bool linux_map_sched_prio; #endif /* _LINUX_MIB_H_ */ Modified: stable/12/sys/compat/linux/linux_misc.c ============================================================================== --- stable/12/sys/compat/linux/linux_misc.c Mon Aug 24 12:43:54 2020 (r364664) +++ stable/12/sys/compat/linux/linux_misc.c Mon Aug 24 12:47:20 2020 (r364665) @@ -143,11 +143,6 @@ struct l_pselect6arg { l_size_t ss_len; }; -static bool map_sched_prio = true; -SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, - &map_sched_prio, 0, "Map scheduler priorities to Linux priorities " - "(not POSIX compliant)"); - static int linux_utimensat_nsec_valid(l_long); @@ -1591,7 +1586,7 @@ linux_sched_setscheduler(struct thread *td, if (error) return (error); - if (map_sched_prio) { + if (linux_map_sched_prio) { switch (policy) { case SCHED_OTHER: if (sched_param.sched_priority != 0) @@ -1671,7 +1666,7 @@ linux_sched_get_priority_max(struct thread *td, printf(ARGS(sched_get_priority_max, "%d"), args->policy); #endif - if (map_sched_prio) { + if (linux_map_sched_prio) { switch (args->policy) { case LINUX_SCHED_OTHER: td->td_retval[0] = 0; @@ -1712,7 +1707,7 @@ linux_sched_get_priority_min(struct thread *td, printf(ARGS(sched_get_priority_min, "%d"), args->policy); #endif - if (map_sched_prio) { + if (linux_map_sched_prio) { switch (args->policy) { case LINUX_SCHED_OTHER: td->td_retval[0] = 0; @@ -2198,7 +2193,7 @@ linux_sched_setparam(struct thread *td, if (tdt == NULL) return (ESRCH); - if( map_sched_prio ) { + if (linux_map_sched_prio) { error = kern_sched_getscheduler(td, tdt, &policy); if (error) goto out; @@ -2259,7 +2254,7 @@ linux_sched_getparam(struct thread *td, return (error); } - if (map_sched_prio) { + if (linux_map_sched_prio) { error = kern_sched_getscheduler(td, tdt, &policy); PROC_UNLOCK(tdt->td_proc); if (error) From owner-svn-src-all@freebsd.org Mon Aug 24 12:49:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BED853BE42F; Mon, 24 Aug 2020 12:49:52 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZsQm3DQDz4jc5; Mon, 24 Aug 2020 12:49:52 +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 5384318CCA; Mon, 24 Aug 2020 12:49:52 +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 07OCnqHV034767; Mon, 24 Aug 2020 12:49:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OCnpOq034763; Mon, 24 Aug 2020 12:49:51 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241249.07OCnpOq034763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 12:49:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364666 - in stable/12: share/man/man4 sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/compat/linux X-SVN-Commit-Revision: 364666 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:49:52 -0000 Author: trasz Date: Mon Aug 24 12:49:51 2020 New Revision: 364666 URL: https://svnweb.freebsd.org/changeset/base/364666 Log: MFC r362015: Make linux(4) set the openfiles soft resource limit to 1024 for Linux applications, which often depend on this being the case. There's a new sysctl, compat.linux.default_openfiles, to control this behaviour. Sponsored by: The FreeBSD Foundation Modified: stable/12/share/man/man4/linux.4 stable/12/sys/compat/linux/linux_emul.c stable/12/sys/compat/linux/linux_mib.c stable/12/sys/compat/linux/linux_mib.h Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/linux.4 ============================================================================== --- stable/12/share/man/man4/linux.4 Mon Aug 24 12:47:20 2020 (r364665) +++ stable/12/share/man/man4/linux.4 Mon Aug 24 12:49:51 2020 (r364666) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 16, 2019 +.Dd June 10, 2020 .Dt LINUX 4 .Os .Sh NAME @@ -95,6 +95,10 @@ variables and .Xr loader 8 tunables: .Bl -tag -width indent +.It Va compat.linux.default_openfiles +Default soft openfiles resource limit for Linux applications. +Set to -1 to disable the limit. +Defaults to 1024. .It Va compat.linux.emul_path Path to the Linux run-time environment. Defaults to Modified: stable/12/sys/compat/linux/linux_emul.c ============================================================================== --- stable/12/sys/compat/linux/linux_emul.c Mon Aug 24 12:47:20 2020 (r364665) +++ stable/12/sys/compat/linux/linux_emul.c Mon Aug 24 12:49:51 2020 (r364666) @@ -42,10 +42,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include #include #include @@ -87,6 +89,32 @@ pem_find(struct proc *p) return (pem); } +/* + * Linux apps generally expect the soft open file limit to be set + * to 1024, often iterating over all the file descriptors up to that + * limit instead of using closefrom(2). Give them what they want, + * unless there already is a resource limit in place. + */ +static void +linux_set_default_openfiles(struct thread *td, struct proc *p) +{ + struct rlimit rlim; + int error; + + if (linux_default_openfiles < 0) + return; + + PROC_LOCK(p); + lim_rlimit_proc(p, RLIMIT_NOFILE, &rlim); + PROC_UNLOCK(p); + if (rlim.rlim_cur != rlim.rlim_max || + rlim.rlim_cur <= linux_default_openfiles) + return; + rlim.rlim_cur = linux_default_openfiles; + error = kern_proc_setrlimit(td, p, RLIMIT_NOFILE, &rlim); + KASSERT(error == 0, ("kern_proc_setrlimit failed")); +} + void linux_proc_init(struct thread *td, struct thread *newtd, int flags) { @@ -115,6 +143,8 @@ linux_proc_init(struct thread *td, struct thread *newt p->p_emuldata = pem; } newtd->td_emuldata = em; + + linux_set_default_openfiles(td, p); } else { p = td->td_proc; Modified: stable/12/sys/compat/linux/linux_mib.c ============================================================================== --- stable/12/sys/compat/linux/linux_mib.c Mon Aug 24 12:47:20 2020 (r364665) +++ stable/12/sys/compat/linux/linux_mib.c Mon Aug 24 12:49:51 2020 (r364666) @@ -62,6 +62,11 @@ static unsigned linux_osd_jail_slot; SYSCTL_NODE(_compat, OID_AUTO, linux, CTLFLAG_RW, 0, "Linux mode"); +int linux_default_openfiles = 1024; +SYSCTL_INT(_compat_linux, OID_AUTO, default_openfiles, CTLFLAG_RWTUN, + &linux_default_openfiles, 0, + "Default soft openfiles resource limit, or -1 for unlimited"); + int linux_ignore_ip_recverr = 1; SYSCTL_INT(_compat_linux, OID_AUTO, ignore_ip_recverr, CTLFLAG_RWTUN, &linux_ignore_ip_recverr, 0, "Ignore enabling IP_RECVERR"); Modified: stable/12/sys/compat/linux/linux_mib.h ============================================================================== --- stable/12/sys/compat/linux/linux_mib.h Mon Aug 24 12:47:20 2020 (r364665) +++ stable/12/sys/compat/linux/linux_mib.h Mon Aug 24 12:49:51 2020 (r364666) @@ -62,6 +62,7 @@ int linux_kernver(struct thread *td); #define linux_use26(t) (linux_kernver(t) >= LINUX_KERNVER_2006000) +extern int linux_default_openfiles; extern int linux_ignore_ip_recverr; extern int linux_preserve_vstatus; extern bool linux_map_sched_prio; From owner-svn-src-all@freebsd.org Mon Aug 24 12:51:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9640C3BE5DB; Mon, 24 Aug 2020 12:51:21 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZsST3ST2z4kK3; Mon, 24 Aug 2020 12:51:21 +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 5A11C18870; Mon, 24 Aug 2020 12:51:21 +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 07OCpLNJ037170; Mon, 24 Aug 2020 12:51:21 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OCpKa2037166; Mon, 24 Aug 2020 12:51:20 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241251.07OCpKa2037166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 12:51:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364667 - in stable/12: share/man/man4 sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/compat/linux X-SVN-Commit-Revision: 364667 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:51:21 -0000 Author: trasz Date: Mon Aug 24 12:51:20 2020 New Revision: 364667 URL: https://svnweb.freebsd.org/changeset/base/364667 Log: MFC r362104: Add compat.linux.debug sysctl, to make it possible to silence down the debug messages. While here, clean up some variable naming. Sponsored by: The FreeBSD Foundation Modified: stable/12/share/man/man4/linux.4 stable/12/sys/compat/linux/linux_mib.c stable/12/sys/compat/linux/linux_mib.h stable/12/sys/compat/linux/linux_util.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/linux.4 ============================================================================== --- stable/12/share/man/man4/linux.4 Mon Aug 24 12:49:51 2020 (r364666) +++ stable/12/share/man/man4/linux.4 Mon Aug 24 12:51:20 2020 (r364667) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 10, 2020 +.Dd June 12, 2020 .Dt LINUX 4 .Os .Sh NAME @@ -95,6 +95,10 @@ variables and .Xr loader 8 tunables: .Bl -tag -width indent +.It Va compat.linux.debug +Enable debugging messages. +Set to 0 to silence them. +Defaults to 1. .It Va compat.linux.default_openfiles Default soft openfiles resource limit for Linux applications. Set to -1 to disable the limit. Modified: stable/12/sys/compat/linux/linux_mib.c ============================================================================== --- stable/12/sys/compat/linux/linux_mib.c Mon Aug 24 12:49:51 2020 (r364666) +++ stable/12/sys/compat/linux/linux_mib.c Mon Aug 24 12:51:20 2020 (r364667) @@ -62,6 +62,10 @@ static unsigned linux_osd_jail_slot; SYSCTL_NODE(_compat, OID_AUTO, linux, CTLFLAG_RW, 0, "Linux mode"); +int linux_debug = 1; +SYSCTL_INT(_compat_linux, OID_AUTO, debug, CTLFLAG_RWTUN, + &linux_debug, 0, "Log warnings from linux(4); or 0 to disable"); + int linux_default_openfiles = 1024; SYSCTL_INT(_compat_linux, OID_AUTO, default_openfiles, CTLFLAG_RWTUN, &linux_default_openfiles, 0, Modified: stable/12/sys/compat/linux/linux_mib.h ============================================================================== --- stable/12/sys/compat/linux/linux_mib.h Mon Aug 24 12:49:51 2020 (r364666) +++ stable/12/sys/compat/linux/linux_mib.h Mon Aug 24 12:51:20 2020 (r364667) @@ -62,6 +62,7 @@ int linux_kernver(struct thread *td); #define linux_use26(t) (linux_kernver(t) >= LINUX_KERNVER_2006000) +extern int linux_debug; extern int linux_default_openfiles; extern int linux_ignore_ip_recverr; extern int linux_preserve_vstatus; Modified: stable/12/sys/compat/linux/linux_util.c ============================================================================== --- stable/12/sys/compat/linux/linux_util.c Mon Aug 24 12:49:51 2020 (r364666) +++ stable/12/sys/compat/linux/linux_util.c Mon Aug 24 12:51:20 2020 (r364667) @@ -91,6 +91,9 @@ linux_msg(const struct thread *td, const char *fmt, .. va_list ap; struct proc *p; + if (linux_debug == 0) + return; + p = td->td_proc; printf("linux: pid %d (%s): ", (int)p->p_pid, p->p_comm); va_start(ap, fmt); From owner-svn-src-all@freebsd.org Mon Aug 24 12:54:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92D8B3BE7D9; Mon, 24 Aug 2020 12:54:20 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZsWw3JjTz4ksY; Mon, 24 Aug 2020 12:54:20 +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 55A3218ED8; Mon, 24 Aug 2020 12:54:20 +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 07OCsKr3041486; Mon, 24 Aug 2020 12:54:20 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OCsKXb041485; Mon, 24 Aug 2020 12:54:20 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241254.07OCsKXb041485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 12:54:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364668 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364668 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:54:20 -0000 Author: trasz Date: Mon Aug 24 12:54:19 2020 New Revision: 364668 URL: https://svnweb.freebsd.org/changeset/base/364668 Log: MFC r362205: Make Linux uname(2) return x86_64 to 32-bit apps. This helps Steam. PR: kern/240432 Analyzed by: Alex S Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_misc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_misc.c ============================================================================== --- stable/12/sys/compat/linux/linux_misc.c Mon Aug 24 12:51:20 2020 (r364667) +++ stable/12/sys/compat/linux/linux_misc.c Mon Aug 24 12:54:19 2020 (r364668) @@ -776,7 +776,17 @@ linux_newuname(struct thread *td, struct linux_newunam *p = '\0'; break; } +#if defined(__amd64__) + /* + * On amd64, Linux uname(2) needs to return "x86_64" + * for both 64-bit and 32-bit applications. On 32-bit, + * the string returned by getauxval(AT_PLATFORM) needs + * to remain "i686", though. + */ + strlcpy(utsname.machine, "x86_64", LINUX_MAX_UTSNAME); +#else strlcpy(utsname.machine, linux_kplatform, LINUX_MAX_UTSNAME); +#endif return (copyout(&utsname, args->buf, sizeof(utsname))); } From owner-svn-src-all@freebsd.org Mon Aug 24 12:57:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C29D53BEB17; Mon, 24 Aug 2020 12:57:03 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZsb34nVkz4l7L; Mon, 24 Aug 2020 12:57:03 +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 88D8F18AD5; Mon, 24 Aug 2020 12:57:03 +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 07OCv30e041910; Mon, 24 Aug 2020 12:57:03 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OCv32a041909; Mon, 24 Aug 2020 12:57:03 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241257.07OCv32a041909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 12:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364669 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364669 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:57:03 -0000 Author: trasz Date: Mon Aug 24 12:57:03 2020 New Revision: 364669 URL: https://svnweb.freebsd.org/changeset/base/364669 Log: MFC r349746: Fix linuxulator prlimit64(2) with pid == 0. This makes 'ulimit -a' return something reasonable, and helps linux binaries which attempt to close all the files, eg apt(8). Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_misc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_misc.c ============================================================================== --- stable/12/sys/compat/linux/linux_misc.c Mon Aug 24 12:54:19 2020 (r364668) +++ stable/12/sys/compat/linux/linux_misc.c Mon Aug 24 12:57:03 2020 (r364669) @@ -2397,10 +2397,14 @@ linux_prlimit64(struct thread *td, struct linux_prlimi flags |= PGET_CANDEBUG; else flags |= PGET_CANSEE; - error = pget(args->pid, flags, &p); - if (error != 0) - return (error); - + if (args->pid == 0) { + p = td->td_proc; + PHOLD(p); + } else { + error = pget(args->pid, flags, &p); + if (error != 0) + return (error); + } if (args->old != NULL) { PROC_LOCK(p); lim_rlimit_proc(p, which, &rlim); From owner-svn-src-all@freebsd.org Mon Aug 24 12:59:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62D003BEACB; Mon, 24 Aug 2020 12:59:16 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZsdc20bsz4lbH; Mon, 24 Aug 2020 12:59:16 +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 27DEE18DCC; Mon, 24 Aug 2020 12:59:16 +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 07OCxGSw042384; Mon, 24 Aug 2020 12:59:16 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OCxF4O042383; Mon, 24 Aug 2020 12:59:15 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241259.07OCxF4O042383@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 12:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364670 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364670 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:59:16 -0000 Author: trasz Date: Mon Aug 24 12:59:15 2020 New Revision: 364670 URL: https://svnweb.freebsd.org/changeset/base/364670 Log: MFC r349750: Return ENOTSUP for Linux FS_IOC_FIEMAP ioctl. Linux man(1) calls it for no good reason; this avoids the console spam (eg '(man): ioctl fd=4, cmd=0x660b ('f',11) is not implemented'). Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_ioctl.c stable/12/sys/compat/linux/linux_ioctl.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/12/sys/compat/linux/linux_ioctl.c Mon Aug 24 12:57:03 2020 (r364669) +++ stable/12/sys/compat/linux/linux_ioctl.c Mon Aug 24 12:59:15 2020 (r364670) @@ -3706,6 +3706,7 @@ linux_ioctl(struct thread *td, struct linux_ioctl_args switch (args->cmd & 0xffff) { case LINUX_BTRFS_IOC_CLONE: + case LINUX_FS_IOC_FIEMAP: return (ENOTSUP); default: Modified: stable/12/sys/compat/linux/linux_ioctl.h ============================================================================== --- stable/12/sys/compat/linux/linux_ioctl.h Mon Aug 24 12:57:03 2020 (r364669) +++ stable/12/sys/compat/linux/linux_ioctl.h Mon Aug 24 12:59:15 2020 (r364670) @@ -753,6 +753,7 @@ * Linux btrfs clone operation */ #define LINUX_BTRFS_IOC_CLONE 0x9409 /* 0x40049409 */ +#define LINUX_FS_IOC_FIEMAP 0x660b /* * Linux evdev ioctl min and max From owner-svn-src-all@freebsd.org Mon Aug 24 12:59:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1B1A3BEC76; Mon, 24 Aug 2020 12:59:57 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZsfP5DQwz4lt1; Mon, 24 Aug 2020 12:59:57 +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 7DD1918EE0; Mon, 24 Aug 2020 12:59:57 +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 07OCxvmT042578; Mon, 24 Aug 2020 12:59:57 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OCxt1i042570; Mon, 24 Aug 2020 12:59:55 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202008241259.07OCxt1i042570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 24 Aug 2020 12:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364671 - in stable/12/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf libkern sys X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf libkern sys X-SVN-Commit-Revision: 364671 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 12:59:58 -0000 Author: manu Date: Mon Aug 24 12:59:55 2020 New Revision: 364671 URL: https://svnweb.freebsd.org/changeset/base/364671 Log: MFC r361247, r361343, r361418-r361419, r361422, r361449 r361247: linuxkpi: Add irq_work.h Since handlers are call in a thread context we can simply use a workqueue to emulate those functions. The DRM code was patched to do that already, having it in linuxkpi allows us to not patch the upstream code. Sponsored-by: The FreeBSD Foundation Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D24859 r361343: linuxkpi: Add rcu_work functions The rcu_work function helps to queue some work after waiting for a grace period. This is needed by DRM drivers. Sponsored-by: The FreeBSD Foundation Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D24942 r361418: libkern: Add arc4random_uniform This variant get a random number up to the limit passed as the argument. This is simply a copy of the libc version. Sponsored-by: The FreeBSD Foundation Reviewed by: cem, hselasky (previous version) Differential Revision: https://reviews.freebsd.org/D24962 r361419: linuxkpi: Add prandom_u32_max This is just a wrapper around arc4random_uniform Needed by DRM v5.3 Sponsored-by: The FreeBSD Foundation Reviewed by: cem, hselasky Differential Revision: https://reviews.freebsd.org/D24961 r361422: bbr: Use arc4random_uniform from libkern. This unbreak LINT build Reported by: jenkins, melifaro r361449: linuxkpi: Add __same_type and __must_be_array macros The same_type macro simply wraps around builtin_types_compatible_p which exist for both GCC and CLANG, which returns 1 if both types are the same. The __must_be_array macros returns 1 if the argument is an array. This is needed for DRM v5.3 Sponsored-by: The FreeBSD Foundation Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D24953 Added: stable/12/sys/compat/linuxkpi/common/include/linux/irq_work.h - copied unchanged from r361247, head/sys/compat/linuxkpi/common/include/linux/irq_work.h stable/12/sys/libkern/arc4random_uniform.c - copied unchanged from r361419, head/sys/libkern/arc4random_uniform.c Modified: stable/12/sys/compat/linuxkpi/common/include/linux/compiler.h stable/12/sys/compat/linuxkpi/common/include/linux/random.h stable/12/sys/compat/linuxkpi/common/include/linux/workqueue.h stable/12/sys/compat/linuxkpi/common/src/linux_work.c stable/12/sys/conf/files stable/12/sys/sys/libkern.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/compiler.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/compiler.h Mon Aug 24 12:59:15 2020 (r364670) +++ stable/12/sys/compat/linuxkpi/common/include/linux/compiler.h Mon Aug 24 12:59:55 2020 (r364671) @@ -111,4 +111,7 @@ #define _AT(T,X) ((T)(X)) +#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) +#define __must_be_array(a) __same_type(a, &(a)[0]) + #endif /* _LINUX_COMPILER_H_ */ Copied: stable/12/sys/compat/linuxkpi/common/include/linux/irq_work.h (from r361247, head/sys/compat/linuxkpi/common/include/linux/irq_work.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/compat/linuxkpi/common/include/linux/irq_work.h Mon Aug 24 12:59:55 2020 (r364671, copy of r361247, head/sys/compat/linuxkpi/common/include/linux/irq_work.h) @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2020 The FreeBSD Foundation + * + * This software was developed by Emmanuel Vadot under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __LINUX_IRQ_WORK_H__ +#define __LINUX_IRQ_WORK_H__ + +#include + +struct irq_work { + struct work_struct work; +}; + +static inline void +init_irq_work(struct irq_work *irqw, void (*func)(struct irq_work *)) +{ + INIT_WORK(&irqw->work, (work_func_t)func); +} + +static inline void +irq_work_queue(struct irq_work *irqw) +{ + schedule_work(&irqw->work); +} + +#endif /* __LINUX_IRQ_WORK_H__ */ Modified: stable/12/sys/compat/linuxkpi/common/include/linux/random.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/random.h Mon Aug 24 12:59:15 2020 (r364670) +++ stable/12/sys/compat/linuxkpi/common/include/linux/random.h Mon Aug 24 12:59:55 2020 (r364671) @@ -63,4 +63,10 @@ get_random_long(void) return (val); } +static inline u32 +prandom_u32_max(u32 max) +{ + return (arc4random_uniform(max)); +} + #endif /* _LINUX_RANDOM_H_ */ Modified: stable/12/sys/compat/linuxkpi/common/include/linux/workqueue.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/workqueue.h Mon Aug 24 12:59:15 2020 (r364670) +++ stable/12/sys/compat/linuxkpi/common/include/linux/workqueue.h Mon Aug 24 12:59:55 2020 (r364671) @@ -72,6 +72,13 @@ struct work_struct { atomic_t state; }; +struct rcu_work { + struct work_struct work; + struct rcu_head rcu; + + struct workqueue_struct *wq; +}; + #define DECLARE_WORK(name, fn) \ struct work_struct name; \ static void name##_init(void *arg) \ @@ -111,6 +118,9 @@ do { \ TASK_INIT(&(work)->work_task, 0, linux_work_fn, (work)); \ } while (0) +#define INIT_RCU_WORK(_work, _fn) \ + INIT_WORK(&(_work)->work, (_fn)) + #define INIT_WORK_ONSTACK(work, fn) \ INIT_WORK(work, fn) @@ -191,6 +201,12 @@ do { \ #define flush_work(work) \ linux_flush_work(work) +#define queue_rcu_work(wq, rwork) \ + linux_queue_rcu_work(wq, rwork) + +#define flush_rcu_work(rwork) \ + linux_flush_rcu_work(rwork) + #define flush_delayed_work(dwork) \ linux_flush_delayed_work(dwork) @@ -236,5 +252,7 @@ extern bool linux_flush_delayed_work(struct delayed_wo extern bool linux_work_pending(struct work_struct *); extern bool linux_work_busy(struct work_struct *); extern struct work_struct *linux_current_work(void); +extern bool linux_queue_rcu_work(struct workqueue_struct *wq, struct rcu_work *rwork); +extern bool linux_flush_rcu_work(struct rcu_work *rwork); #endif /* _LINUX_WORKQUEUE_H_ */ Modified: stable/12/sys/compat/linuxkpi/common/src/linux_work.c ============================================================================== --- stable/12/sys/compat/linuxkpi/common/src/linux_work.c Mon Aug 24 12:59:15 2020 (r364670) +++ stable/12/sys/compat/linuxkpi/common/src/linux_work.c Mon Aug 24 12:59:55 2020 (r364671) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -153,6 +154,53 @@ linux_queue_work_on(int cpu __unused, struct workqueue default: return (false); /* already on a queue */ } +} + +/* + * Callback func for linux_queue_rcu_work + */ +static void +rcu_work_func(struct rcu_head *rcu) +{ + struct rcu_work *rwork; + + rwork = container_of(rcu, struct rcu_work, rcu); + linux_queue_work_on(WORK_CPU_UNBOUND, rwork->wq, &rwork->work); +} + +/* + * This function queue a work after a grace period + * If the work was already pending it returns false, + * if not it calls call_rcu and returns true. + */ +bool +linux_queue_rcu_work(struct workqueue_struct *wq, struct rcu_work *rwork) +{ + + if (!linux_work_pending(&rwork->work)) { + rwork->wq = wq; + linux_call_rcu(RCU_TYPE_REGULAR, &rwork->rcu, rcu_work_func); + return (true); + } + return (false); +} + +/* + * This function waits for the last execution of a work and then + * flush the work. + * It returns true if the work was pending and we waited, it returns + * false otherwise. + */ +bool +linux_flush_rcu_work(struct rcu_work *rwork) +{ + + if (linux_work_pending(&rwork->work)) { + linux_rcu_barrier(RCU_TYPE_REGULAR); + linux_flush_work(&rwork->work); + return (true); + } + return (linux_flush_work(&rwork->work)); } /* Modified: stable/12/sys/conf/files ============================================================================== --- stable/12/sys/conf/files Mon Aug 24 12:59:15 2020 (r364670) +++ stable/12/sys/conf/files Mon Aug 24 12:59:55 2020 (r364671) @@ -4071,6 +4071,7 @@ kgssapi/gsstest.c optional kgssapi_debug # the file should be moved to conf/files. from here. # libkern/arc4random.c standard +libkern/arc4random_uniform.c standard crypto/chacha20/chacha.c standard libkern/asprintf.c standard libkern/bcd.c standard Copied: stable/12/sys/libkern/arc4random_uniform.c (from r361419, head/sys/libkern/arc4random_uniform.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/libkern/arc4random_uniform.c Mon Aug 24 12:59:55 2020 (r364671, copy of r361419, head/sys/libkern/arc4random_uniform.c) @@ -0,0 +1,58 @@ +/* $OpenBSD: arc4random_uniform.c,v 1.3 2019/01/20 02:59:07 bcook Exp $ */ + +/* + * Copyright (c) 2008, Damien Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ + +#include +#include + +/* + * Calculate a uniformly distributed random number less than upper_bound + * avoiding "modulo bias". + * + * Uniformity is achieved by generating new random numbers until the one + * returned is outside the range [0, 2**32 % upper_bound). This + * guarantees the selected random number will be inside + * [2**32 % upper_bound, 2**32) which maps back to [0, upper_bound) + * after reduction modulo upper_bound. + */ +uint32_t +arc4random_uniform(uint32_t upper_bound) +{ + uint32_t r, min; + + if (upper_bound < 2) + return 0; + + /* 2**32 % x == (2**32 - x) % x */ + min = -upper_bound % upper_bound; + + /* + * This could theoretically loop forever but each retry has + * p > 0.5 (worst case, usually far better) of selecting a + * number inside the range we need, so it should rarely need + * to re-roll. + */ + for (;;) { + r = arc4random(); + if (r >= min) + break; + } + + return r % upper_bound; +} Modified: stable/12/sys/sys/libkern.h ============================================================================== --- stable/12/sys/sys/libkern.h Mon Aug 24 12:59:15 2020 (r364670) +++ stable/12/sys/sys/libkern.h Mon Aug 24 12:59:55 2020 (r364671) @@ -127,6 +127,7 @@ extern int arc4rand_iniseed_state; struct malloc_type; uint32_t arc4random(void); void arc4random_buf(void *, size_t); +uint32_t arc4random_uniform(uint32_t); void arc4rand(void *, u_int, int); int timingsafe_bcmp(const void *, const void *, size_t); void *bsearch(const void *, const void *, size_t, From owner-svn-src-all@freebsd.org Mon Aug 24 13:14:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 033373BF4AA; Mon, 24 Aug 2020 13:14:40 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZszM6HGmz4mVZ; Mon, 24 Aug 2020 13:14:39 +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 BAE48191A1; Mon, 24 Aug 2020 13:14:39 +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 07ODEdkI054843; Mon, 24 Aug 2020 13:14:39 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07ODEcon054838; Mon, 24 Aug 2020 13:14:38 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202008241314.07ODEcon054838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 24 Aug 2020 13:14:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364672 - in stable/12/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 364672 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 13:14:40 -0000 Author: manu Date: Mon Aug 24 13:14:38 2020 New Revision: 364672 URL: https://svnweb.freebsd.org/changeset/base/364672 Log: MFC r361450, r361452, r361550-r361551 r361450: linuxkpi: Add refcount.h Implement some refcount functions needed by drm. Just use the atomic_t struct and functions from linuxkpi for simplicity. Sponsored-by: The FreeBSD Foundation Reviewed by: hselsasky Differential Revision: https://reviews.freebsd.org/D24985 r361452: linuxkpi: Fix mod_timer and del_timer_sync mod_timer is supposed to return 1 if the modified timer was pending, which is exactly what callout_reset does so return the value after checking that it's a correct one in case the api change. del_timer_sync returns int so add a function and handle that. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D24983 r361550: linuxkpi: Add rcu_swap_protected This macros swap an rcu pointer with a normal pointer. The condition only seems to be used for debug/warning under linux, ignore for now. Sponsored-by: The FreeBSD Foundation Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D24954 r361551: linuxkpi: Add kstrtou16 This function convert a char * to a u16. Simply use strtoul and cast to compare for ERANGE Sponsored-by: The FreeBSD Foundation Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D24996 Added: stable/12/sys/compat/linuxkpi/common/include/linux/refcount.h - copied unchanged from r361450, head/sys/compat/linuxkpi/common/include/linux/refcount.h Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h stable/12/sys/compat/linuxkpi/common/include/linux/rcupdate.h stable/12/sys/compat/linuxkpi/common/include/linux/timer.h stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Aug 24 12:59:55 2020 (r364671) +++ stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Aug 24 13:14:38 2020 (r364672) @@ -377,6 +377,24 @@ kstrtouint(const char *cp, unsigned int base, unsigned } static inline int +kstrtou16(const char *cp, unsigned int base, u16 *res) +{ + char *end; + unsigned long temp; + + *res = temp = strtoul(cp, &end, base); + + /* skip newline character, if any */ + if (*end == '\n') + end++; + if (*cp == 0 || *end != 0) + return (-EINVAL); + if (temp != (u16)temp) + return (-ERANGE); + return (0); +} + +static inline int kstrtou32(const char *cp, unsigned int base, u32 *res) { char *end; Modified: stable/12/sys/compat/linuxkpi/common/include/linux/rcupdate.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/rcupdate.h Mon Aug 24 12:59:55 2020 (r364671) +++ stable/12/sys/compat/linuxkpi/common/include/linux/rcupdate.h Mon Aug 24 13:14:38 2020 (r364672) @@ -97,6 +97,12 @@ (uintptr_t)(v)); \ } while (0) +#define rcu_swap_protected(rcu, ptr, c) do { \ + typeof(ptr) p = rcu_dereference_protected(rcu, c); \ + rcu_assign_pointer(rcu, ptr); \ + (ptr) = p; \ +} while (0) + /* prototypes */ extern void linux_call_rcu(unsigned type, struct rcu_head *ptr, rcu_callback_t func); Copied: stable/12/sys/compat/linuxkpi/common/include/linux/refcount.h (from r361450, head/sys/compat/linuxkpi/common/include/linux/refcount.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/compat/linuxkpi/common/include/linux/refcount.h Mon Aug 24 13:14:38 2020 (r364672, copy of r361450, head/sys/compat/linuxkpi/common/include/linux/refcount.h) @@ -0,0 +1,82 @@ +/*- + * Copyright (c) 2020 The FreeBSD Foundation + * + * This software was developed by Emmanuel Vadot under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LINUX_REFCOUNT_H +#define _LINUX_REFCOUNT_H + +#include + +struct refcount_linux { + atomic_t value; +}; +typedef struct refcount_linux refcount_t; + +static inline void +refcount_set(refcount_t *ref, unsigned int i) +{ + atomic_set(&ref->value, i); +} + +static inline void +refcount_inc(refcount_t *ref) +{ + atomic_inc(&ref->value); +} + +static inline bool +refcount_inc_not_zero(refcount_t *ref) +{ + return (atomic_inc_not_zero(&ref->value)); +} + +static inline void +refcount_dec(refcount_t *ref) +{ + atomic_dec(&ref->value); +} + +static inline unsigned int +refcount_read(refcount_t *ref) +{ + return atomic_read(&ref->value); +} + +static inline bool +refcount_dec_and_lock_irqsave(refcount_t *ref, spinlock_t *lock, + unsigned long *flags) +{ + if (atomic_dec_and_test(&ref->value) == true) { + spin_lock_irqsave(lock, flags); + return (true); + } + return (false); +} + +#endif /* __LINUX_REFCOUNT_H__ */ Modified: stable/12/sys/compat/linuxkpi/common/include/linux/timer.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/timer.h Mon Aug 24 12:59:55 2020 (r364671) +++ stable/12/sys/compat/linuxkpi/common/include/linux/timer.h Mon Aug 24 13:14:38 2020 (r364672) @@ -78,12 +78,12 @@ extern unsigned long linux_timer_hz_mask; callout_init(&(timer)->callout, 1); \ } while (0) -extern void mod_timer(struct timer_list *, int); +extern int mod_timer(struct timer_list *, int); extern void add_timer(struct timer_list *); extern void add_timer_on(struct timer_list *, int cpu); extern int del_timer(struct timer_list *); +extern int del_timer_sync(struct timer_list *); -#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)) Modified: stable/12/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Mon Aug 24 12:59:55 2020 (r364671) +++ stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Mon Aug 24 13:14:38 2020 (r364672) @@ -1903,14 +1903,19 @@ linux_timer_callback_wrapper(void *context) timer->function(timer->data); } -void +int mod_timer(struct timer_list *timer, int expires) { + int ret; timer->expires = expires; - callout_reset(&timer->callout, + ret = callout_reset(&timer->callout, linux_timer_jiffies_until(expires), &linux_timer_callback_wrapper, timer); + + MPASS(ret == 0 || ret == 1); + + return (ret == 1); } void @@ -1936,6 +1941,15 @@ del_timer(struct timer_list *timer) { if (callout_stop(&(timer)->callout) == -1) + return (0); + return (1); +} + +int +del_timer_sync(struct timer_list *timer) +{ + + if (callout_drain(&(timer)->callout) == -1) return (0); return (1); } From owner-svn-src-all@freebsd.org Mon Aug 24 13:15:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3BCDC3BF4BF; Mon, 24 Aug 2020 13:15:10 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZszy0vXNz4mcC; Mon, 24 Aug 2020 13:15:10 +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 DE16A19299; Mon, 24 Aug 2020 13:15:09 +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 07ODF9m5054925; Mon, 24 Aug 2020 13:15:09 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07ODF9BZ054921; Mon, 24 Aug 2020 13:15:09 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202008241315.07ODF9BZ054921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 24 Aug 2020 13:15:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364673 - in head/sys: dev/rtwn dev/usb/wlan net80211 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: in head/sys: dev/rtwn dev/usb/wlan net80211 X-SVN-Commit-Revision: 364673 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 13:15:10 -0000 Author: bz Date: Mon Aug 24 13:15:08 2020 New Revision: 364673 URL: https://svnweb.freebsd.org/changeset/base/364673 Log: net80211: enhance getflags*() and ieee80211_add_channel*() For ieee80211_add_channel+*() we are passing in an int flag for ht40 and in some cases another int flag for vht80 where we'd only need two bits really. Convert these variables to a bitflag and fold them together into one. This also allows for VHT160 and VHT80P80 and whatever may come to be considered. Define the various options currently needed. Change the drivers (rtwn and rsu) which actually set this bit to non-0. For convenience the "1" currently used for HT40 is preserved. Enahnce getflags_5ghz() to handle the full set of VHT flags based on the input flags from the the driver. Update the regdomain implementation as well to make use of the new flags and deal with higher [V]HT bandwidths. ieee80211_add_channel() specifically did not take flags so it will not support naything beyond 20Mhz channels. Note: I am not entirely happy with the "cbw_flag[s]" name, but we do use chan_flags elsewhere already. MFC after: 2 weeks Reviewed by: adrian, gnn Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") Differential revision: https://reviews.freebsd.org/D26091 Modified: head/sys/dev/rtwn/if_rtwn.c head/sys/dev/usb/wlan/if_rsu.c head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211_regdomain.c head/sys/net80211/ieee80211_var.h Modified: head/sys/dev/rtwn/if_rtwn.c ============================================================================== --- head/sys/dev/rtwn/if_rtwn.c Mon Aug 24 13:14:38 2020 (r364672) +++ head/sys/dev/rtwn/if_rtwn.c Mon Aug 24 13:15:08 2020 (r364673) @@ -1525,25 +1525,29 @@ rtwn_getradiocaps(struct ieee80211com *ic, { struct rtwn_softc *sc = ic->ic_softc; uint8_t bands[IEEE80211_MODE_BYTES]; - int i; + int cbw_flags, i; + cbw_flags = (ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) ? + NET80211_CBW_FLAG_HT40 : 0; + memset(bands, 0, sizeof(bands)); setbit(bands, IEEE80211_MODE_11B); setbit(bands, IEEE80211_MODE_11G); setbit(bands, IEEE80211_MODE_11NG); ieee80211_add_channels_default_2ghz(chans, maxchans, nchans, - bands, !!(ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40)); + bands, cbw_flags); /* XXX workaround add_channel_list() limitations */ setbit(bands, IEEE80211_MODE_11A); setbit(bands, IEEE80211_MODE_11NA); for (i = 0; i < nitems(sc->chan_num_5ghz); i++) { + if (sc->chan_num_5ghz[i] == 0) continue; ieee80211_add_channel_list_5ghz(chans, maxchans, nchans, sc->chan_list_5ghz[i], sc->chan_num_5ghz[i], bands, - !!(ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40)); + cbw_flags); } } Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Mon Aug 24 13:14:38 2020 (r364672) +++ head/sys/dev/usb/wlan/if_rsu.c Mon Aug 24 13:15:08 2020 (r364673) @@ -779,7 +779,8 @@ rsu_getradiocaps(struct ieee80211com *ic, if (sc->sc_ht) setbit(bands, IEEE80211_MODE_11NG); ieee80211_add_channels_default_2ghz(chans, maxchans, nchans, - bands, (ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) != 0); + bands, (ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) ? + NET80211_CBW_FLAG_HT40 : 0); } static void Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Mon Aug 24 13:14:38 2020 (r364672) +++ head/sys/net80211/ieee80211.c Mon Aug 24 13:15:08 2020 (r364673) @@ -1301,7 +1301,7 @@ copychan_prev(struct ieee80211_channel chans[], int ma * XXX VHT-2GHz */ static void -getflags_2ghz(const uint8_t bands[], uint32_t flags[], int ht40) +getflags_2ghz(const uint8_t bands[], uint32_t flags[], int cbw_flags) { int nmodes; @@ -1312,7 +1312,7 @@ getflags_2ghz(const uint8_t bands[], uint32_t flags[], flags[nmodes++] = IEEE80211_CHAN_G; if (isset(bands, IEEE80211_MODE_11NG)) flags[nmodes++] = IEEE80211_CHAN_G | IEEE80211_CHAN_HT20; - if (ht40) { + if (cbw_flags & NET80211_CBW_FLAG_HT40) { flags[nmodes++] = IEEE80211_CHAN_G | IEEE80211_CHAN_HT40U; flags[nmodes++] = IEEE80211_CHAN_G | IEEE80211_CHAN_HT40D; } @@ -1320,12 +1320,12 @@ getflags_2ghz(const uint8_t bands[], uint32_t flags[], } static void -getflags_5ghz(const uint8_t bands[], uint32_t flags[], int ht40, int vht80) +getflags_5ghz(const uint8_t bands[], uint32_t flags[], int cbw_flags) { int nmodes; /* - * the addchan_list function seems to expect the flags array to + * The addchan_list() function seems to expect the flags array to * be in channel width order, so the VHT bits are interspersed * as appropriate to maintain said order. * @@ -1344,36 +1344,51 @@ getflags_5ghz(const uint8_t bands[], uint32_t flags[], } /* 40MHz */ - if (ht40) { + if (cbw_flags & NET80211_CBW_FLAG_HT40) flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U; - } - if (ht40 && isset(bands, IEEE80211_MODE_VHT_5GHZ)) { - flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U - | IEEE80211_CHAN_VHT40U; - } - if (ht40) { + if ((cbw_flags & NET80211_CBW_FLAG_HT40) && + isset(bands, IEEE80211_MODE_VHT_5GHZ)) + flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U | + IEEE80211_CHAN_VHT40U; + if (cbw_flags & NET80211_CBW_FLAG_HT40) flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D; + if ((cbw_flags & NET80211_CBW_FLAG_HT40) && + isset(bands, IEEE80211_MODE_VHT_5GHZ)) + flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D | + IEEE80211_CHAN_VHT40D; + + /* 80MHz */ + if ((cbw_flags & NET80211_CBW_FLAG_VHT80) && + isset(bands, IEEE80211_MODE_VHT_5GHZ)) { + flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U | + IEEE80211_CHAN_VHT80; + flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D | + IEEE80211_CHAN_VHT80; } - if (ht40 && isset(bands, IEEE80211_MODE_VHT_5GHZ)) { - flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D - | IEEE80211_CHAN_VHT40D; + + /* VHT160 */ + if ((cbw_flags & NET80211_CBW_FLAG_VHT160) && + isset(bands, IEEE80211_MODE_VHT_5GHZ)) { + flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U | + IEEE80211_CHAN_VHT160; + flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D | + IEEE80211_CHAN_VHT160; } - /* 80MHz */ - if (vht80 && isset(bands, IEEE80211_MODE_VHT_5GHZ)) { - flags[nmodes++] = IEEE80211_CHAN_A | - IEEE80211_CHAN_HT40U | IEEE80211_CHAN_VHT80; - flags[nmodes++] = IEEE80211_CHAN_A | - IEEE80211_CHAN_HT40D | IEEE80211_CHAN_VHT80; + /* VHT80+80 */ + if ((cbw_flags & NET80211_CBW_FLAG_VHT80P80) && + isset(bands, IEEE80211_MODE_VHT_5GHZ)) { + flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U | + IEEE80211_CHAN_VHT80P80; + flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D | + IEEE80211_CHAN_VHT80P80; } - /* XXX VHT160 */ - /* XXX VHT80+80 */ flags[nmodes] = 0; } static void -getflags(const uint8_t bands[], uint32_t flags[], int ht40, int vht80) +getflags(const uint8_t bands[], uint32_t flags[], int cbw_flags) { flags[0] = 0; @@ -1386,15 +1401,16 @@ getflags(const uint8_t bands[], uint32_t flags[], int isset(bands, IEEE80211_MODE_VHT_2GHZ)) return; - getflags_5ghz(bands, flags, ht40, vht80); + getflags_5ghz(bands, flags, cbw_flags); } else - getflags_2ghz(bands, flags, ht40); + getflags_2ghz(bands, flags, cbw_flags); } /* * Add one 20 MHz channel into specified channel list. * You MUST NOT mix bands when calling this. It will not add 5ghz * channels if you have any B/G/N band bit set. + * This also does not support 40/80/160/80+80. */ /* XXX VHT */ int @@ -1405,7 +1421,7 @@ ieee80211_add_channel(struct ieee80211_channel chans[] uint32_t flags[IEEE80211_MODE_MAX]; int i, error; - getflags(bands, flags, 0, 0); + getflags(bands, flags, 0); KASSERT(flags[0] != 0, ("%s: no correct mode provided\n", __func__)); error = addchan(chans, maxchans, nchans, ieee, freq, maxregpower, @@ -1632,12 +1648,12 @@ add_chanlist(struct ieee80211_channel chans[], int max int ieee80211_add_channel_list_2ghz(struct ieee80211_channel chans[], int maxchans, int *nchans, const uint8_t ieee[], int nieee, const uint8_t bands[], - int ht40) + int cbw_flags) { uint32_t flags[IEEE80211_MODE_MAX]; /* XXX no VHT for now */ - getflags_2ghz(bands, flags, ht40); + getflags_2ghz(bands, flags, cbw_flags); KASSERT(flags[0] != 0, ("%s: no correct mode provided\n", __func__)); return (add_chanlist(chans, maxchans, nchans, ieee, nieee, flags)); @@ -1645,30 +1661,27 @@ ieee80211_add_channel_list_2ghz(struct ieee80211_chann int ieee80211_add_channels_default_2ghz(struct ieee80211_channel chans[], - int maxchans, int *nchans, const uint8_t bands[], int ht40) + int maxchans, int *nchans, const uint8_t bands[], int cbw_flags) { const uint8_t default_chan_list[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; return (ieee80211_add_channel_list_2ghz(chans, maxchans, nchans, - default_chan_list, nitems(default_chan_list), bands, ht40)); + default_chan_list, nitems(default_chan_list), bands, cbw_flags)); } int ieee80211_add_channel_list_5ghz(struct ieee80211_channel chans[], int maxchans, int *nchans, const uint8_t ieee[], int nieee, const uint8_t bands[], - int ht40) + int cbw_flags) { - uint32_t flags[IEEE80211_MODE_MAX]; - int vht80 = 0; - /* - * For now, assume VHT == VHT80 support as a minimum. + * XXX-BZ with HT and VHT there is no 1:1 mapping anymore. Review all + * uses of IEEE80211_MODE_MAX and add a new #define name for array size. */ - if (isset(bands, IEEE80211_MODE_VHT_5GHZ)) - vht80 = 1; + uint32_t flags[2 * IEEE80211_MODE_MAX]; - getflags_5ghz(bands, flags, ht40, vht80); + getflags_5ghz(bands, flags, cbw_flags); KASSERT(flags[0] != 0, ("%s: no correct mode provided\n", __func__)); return (add_chanlist(chans, maxchans, nchans, ieee, nieee, flags)); Modified: head/sys/net80211/ieee80211_regdomain.c ============================================================================== --- head/sys/net80211/ieee80211_regdomain.c Mon Aug 24 13:14:38 2020 (r364672) +++ head/sys/net80211/ieee80211_regdomain.c Mon Aug 24 13:15:08 2020 (r364673) @@ -118,10 +118,11 @@ ieee80211_init_channels(struct ieee80211com *ic, { struct ieee80211_channel *chans = ic->ic_channels; int *nchans = &ic->ic_nchans; - int ht40; + int cbw_flags; /* XXX just do something for now */ - ht40 = !!(ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40); + cbw_flags = (ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) ? + NET80211_CBW_FLAG_HT40 : 0; *nchans = 0; if (isset(bands, IEEE80211_MODE_11B) || isset(bands, IEEE80211_MODE_11G) || @@ -131,19 +132,40 @@ ieee80211_init_channels(struct ieee80211com *ic, nchan -= 3; ieee80211_add_channel_list_2ghz(chans, IEEE80211_CHAN_MAX, - nchans, def_chan_2ghz, nchan, bands, ht40); + nchans, def_chan_2ghz, nchan, bands, cbw_flags); } + /* XXX IEEE80211_MODE_VHT_2GHZ if we really want to. */ + if (isset(bands, IEEE80211_MODE_11A) || isset(bands, IEEE80211_MODE_11NA)) { ieee80211_add_channel_list_5ghz(chans, IEEE80211_CHAN_MAX, nchans, def_chan_5ghz_band1, nitems(def_chan_5ghz_band1), - bands, ht40); + bands, cbw_flags); ieee80211_add_channel_list_5ghz(chans, IEEE80211_CHAN_MAX, nchans, def_chan_5ghz_band2, nitems(def_chan_5ghz_band2), - bands, ht40); + bands, cbw_flags); ieee80211_add_channel_list_5ghz(chans, IEEE80211_CHAN_MAX, nchans, def_chan_5ghz_band3, nitems(def_chan_5ghz_band3), - bands, ht40); + bands, cbw_flags); + } + if (isset(bands, IEEE80211_MODE_VHT_5GHZ)) { + cbw_flags |= NET80211_CBW_FLAG_HT40; /* Make sure this is set; or assert? */ + cbw_flags |= NET80211_CBW_FLAG_VHT80; +#define MS(_v, _f) (((_v) & _f) >> _f##_S) + if (MS(ic->ic_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) + cbw_flags |= NET80211_CBW_FLAG_VHT160; + if (MS(ic->ic_vhtcaps, IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) + cbw_flags |= NET80211_CBW_FLAG_VHT80P80; +#undef MS + ieee80211_add_channel_list_5ghz(chans, IEEE80211_CHAN_MAX, + nchans, def_chan_5ghz_band1, nitems(def_chan_5ghz_band1), + bands, cbw_flags); + ieee80211_add_channel_list_5ghz(chans, IEEE80211_CHAN_MAX, + nchans, def_chan_5ghz_band2, nitems(def_chan_5ghz_band2), + bands, cbw_flags); + ieee80211_add_channel_list_5ghz(chans, IEEE80211_CHAN_MAX, + nchans, def_chan_5ghz_band3, nitems(def_chan_5ghz_band3), + bands, cbw_flags); } if (rd != NULL) ic->ic_regdomain = *rd; Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Mon Aug 24 13:14:38 2020 (r364672) +++ head/sys/net80211/ieee80211_var.h Mon Aug 24 13:15:08 2020 (r364673) @@ -779,6 +779,10 @@ int ieee80211_add_channel_ht40(struct ieee80211_channe uint32_t ieee80211_get_channel_center_freq(const struct ieee80211_channel *); uint32_t ieee80211_get_channel_center_freq1(const struct ieee80211_channel *); uint32_t ieee80211_get_channel_center_freq2(const struct ieee80211_channel *); +#define NET80211_CBW_FLAG_HT40 0x01 +#define NET80211_CBW_FLAG_VHT80 0x02 +#define NET80211_CBW_FLAG_VHT160 0x04 +#define NET80211_CBW_FLAG_VHT80P80 0x08 int ieee80211_add_channel_list_2ghz(struct ieee80211_channel[], int, int *, const uint8_t[], int, const uint8_t[], int); int ieee80211_add_channels_default_2ghz(struct ieee80211_channel[], int, From owner-svn-src-all@freebsd.org Mon Aug 24 13:19:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9BFD03BF803; Mon, 24 Aug 2020 13:19:19 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZt4l3vpkz4n03; Mon, 24 Aug 2020 13:19:19 +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 697B81929D; Mon, 24 Aug 2020 13:19:19 +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 07ODJJCw055196; Mon, 24 Aug 2020 13:19:19 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07ODJHDN055185; Mon, 24 Aug 2020 13:19:17 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202008241319.07ODJHDN055185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 24 Aug 2020 13:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364674 - in stable/12/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 364674 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 13:19:19 -0000 Author: manu Date: Mon Aug 24 13:19:16 2020 New Revision: 364674 URL: https://svnweb.freebsd.org/changeset/base/364674 Log: MFC r363564-r363567, r363575, r363835-r363837, r363842-r363843, r364232 r363564: linuxkpi: Include linux/sizes.h in dma-mapping.h Linux does the same, this avoids ifdef or extra includes in ported drivers. Reviewed by: emaste, hselasky Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25701 r363565: linuxkpi: Include hardirq.h in preempt.h and lockdep.h in hardirq.h Linux does the same, this avoids ifdef or extra includes in ported drivers. Reviewed by: emaste, hselasky Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25702 r363566: linuxkpi: Add taint* defines This isn't used for us but allow us to port drivers more easily. Reviewed by: hselasky Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25703 r363567: Revert r363564 linux/sizes.h doesn't exists in base ... sorry. r363575: Fix r363565 lockdep.h needs sys/lock.h for LOCK_CLASS r363835: linuxkpi: Add linux/sizes.h This file contain some defines for common sizes. Sponsored-by: The FreeBSD Foundation Reviewed by: hselasky, emaste Differential Revision: https://reviews.freebsd.org/D25941 r363836: linuxkpi: Add kref_put_lock Same as kref_put but in addition to calling the rel function it will acquire the lock first. Sponsored by: The FreeBSD Foundation Reviewed by: hselasky, emaste Differential Revision: https://reviews.freebsd.org/D25942 r363837: linuxkpi: Add nested variant of mutex_lock_interruptible We don't do anything with the _nesteds variant so just call mutex_lock_interruptible Sponsoredby: The FreeBSD Foundation Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D25944 r363842: linuxkpi: Add clear_bit_unlock This calls clear_bit and adds a memory barrier. Sponsored by: The FreeBSD Foundation Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D25943 r363843: linuxkpi: Add time_after32 and time_before32 This compare two 32 bits times Sponsored by: The FreeBSD Foundation Reviewed by: kib, hselasky Differential Revision: https://reviews.freebsd.org/D25700 r364232: linuxkpi: Add a few wait_bit functions The linux function does a lot more than that as multiple waitqueue could be fetch from a static table based on the hash of the argument but since in DRM it's only used in one place just add a single variable. We will probably need to change that in the futur but it's ok with DRM even with current linux. Reviewed by: hselasky Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26054 Added: stable/12/sys/compat/linuxkpi/common/include/linux/sizes.h - copied unchanged from r363837, head/sys/compat/linuxkpi/common/include/linux/sizes.h stable/12/sys/compat/linuxkpi/common/include/linux/wait_bit.h - copied unchanged from r364232, head/sys/compat/linuxkpi/common/include/linux/wait_bit.h Modified: stable/12/sys/compat/linuxkpi/common/include/linux/bitops.h stable/12/sys/compat/linuxkpi/common/include/linux/hardirq.h stable/12/sys/compat/linuxkpi/common/include/linux/jiffies.h stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h stable/12/sys/compat/linuxkpi/common/include/linux/kref.h stable/12/sys/compat/linuxkpi/common/include/linux/lockdep.h stable/12/sys/compat/linuxkpi/common/include/linux/mutex.h stable/12/sys/compat/linuxkpi/common/include/linux/preempt.h stable/12/sys/compat/linuxkpi/common/include/linux/wait.h stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/bitops.h Mon Aug 24 13:15:08 2020 (r364673) +++ stable/12/sys/compat/linuxkpi/common/include/linux/bitops.h Mon Aug 24 13:19:16 2020 (r364674) @@ -275,6 +275,13 @@ find_next_zero_bit(const unsigned long *addr, unsigned #define test_bit(i, a) \ !!(READ_ONCE(((volatile const unsigned long *)(a))[BIT_WORD(i)]) & BIT_MASK(i)) +static inline void +clear_bit_unlock(long bit, volatile unsigned long *var) +{ + clear_bit(bit, var); + wmb(); +} + static inline int test_and_clear_bit(long bit, volatile unsigned long *var) { Modified: stable/12/sys/compat/linuxkpi/common/include/linux/hardirq.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/hardirq.h Mon Aug 24 13:15:08 2020 (r364673) +++ stable/12/sys/compat/linuxkpi/common/include/linux/hardirq.h Mon Aug 24 13:19:16 2020 (r364674) @@ -32,6 +32,7 @@ #define _LINUX_HARDIRQ_H_ #include +#include #include #include Modified: stable/12/sys/compat/linuxkpi/common/include/linux/jiffies.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/jiffies.h Mon Aug 24 13:15:08 2020 (r364673) +++ stable/12/sys/compat/linuxkpi/common/include/linux/jiffies.h Mon Aug 24 13:19:16 2020 (r364674) @@ -45,7 +45,9 @@ #define MAX_JIFFY_OFFSET ((INT_MAX >> 1) - 1) #define time_after(a, b) ((int)((b) - (a)) < 0) +#define time_after32(a, b) ((int32_t)((uint32_t)(b) - (uint32_t)(a)) < 0) #define time_before(a, b) time_after(b,a) +#define time_before32(a, b) time_after32(b, a) #define time_after_eq(a, b) ((int)((a) - (b)) >= 0) #define time_before_eq(a, b) time_after_eq(b, a) #define time_in_range(a,b,c) \ Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Aug 24 13:15:08 2020 (r364673) +++ stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Aug 24 13:19:16 2020 (r364674) @@ -593,4 +593,7 @@ linux_ratelimited(linux_ratelimit_t *rl) (is_signed(datatype) ? INT8_MIN : 0) \ ) +#define TAINT_WARN 0 +#define test_taint(x) (0) + #endif /* _LINUX_KERNEL_H_ */ Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kref.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/kref.h Mon Aug 24 13:15:08 2020 (r364673) +++ stable/12/sys/compat/linuxkpi/common/include/linux/kref.h Mon Aug 24 13:19:16 2020 (r364674) @@ -38,6 +38,7 @@ #include #include #include +#include #include @@ -76,6 +77,20 @@ kref_put(struct kref *kref, void (*rel)(struct kref *k } return 0; } + +static inline int +kref_put_lock(struct kref *kref, void (*rel)(struct kref *kref), + spinlock_t *lock) +{ + + if (refcount_release(&kref->refcount.counter)) { + spin_lock(lock); + rel(kref); + return (1); + } + return (0); +} + static inline int kref_sub(struct kref *kref, unsigned int count, Modified: stable/12/sys/compat/linuxkpi/common/include/linux/lockdep.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/lockdep.h Mon Aug 24 13:15:08 2020 (r364673) +++ stable/12/sys/compat/linuxkpi/common/include/linux/lockdep.h Mon Aug 24 13:19:16 2020 (r364674) @@ -32,6 +32,8 @@ #ifndef _LINUX_LOCKDEP_H_ #define _LINUX_LOCKDEP_H_ +#include + struct lock_class_key { }; Modified: stable/12/sys/compat/linuxkpi/common/include/linux/mutex.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/mutex.h Mon Aug 24 13:15:08 2020 (r364673) +++ stable/12/sys/compat/linuxkpi/common/include/linux/mutex.h Mon Aug 24 13:19:16 2020 (r364674) @@ -67,6 +67,8 @@ typedef struct mutex { linux_mutex_lock_interruptible(_m); \ }) +#define mutex_lock_interruptible_nested(m, c) mutex_lock_interruptible(m) + /* * Reuse the interruptable method since the SX * lock handles both signals and interrupts: Modified: stable/12/sys/compat/linuxkpi/common/include/linux/preempt.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/preempt.h Mon Aug 24 13:15:08 2020 (r364673) +++ stable/12/sys/compat/linuxkpi/common/include/linux/preempt.h Mon Aug 24 13:19:16 2020 (r364674) @@ -29,6 +29,7 @@ #ifndef _LINUX_PREEMPT_H_ #define _LINUX_PREEMPT_H_ +#include #include #define in_interrupt() \ Copied: stable/12/sys/compat/linuxkpi/common/include/linux/sizes.h (from r363837, head/sys/compat/linuxkpi/common/include/linux/sizes.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/compat/linuxkpi/common/include/linux/sizes.h Mon Aug 24 13:19:16 2020 (r364674, copy of r363837, head/sys/compat/linuxkpi/common/include/linux/sizes.h) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2020 The FreeBSD Foundation + * + * This software was developed by Emmanuel Vadot under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __LINUX_SIZES_H__ +#define __LINUX_SIZES_H__ + +#define SZ_1K (1024 * 1) +#define SZ_4K (1024 * 4) +#define SZ_8K (1024 * 8) +#define SZ_16K (1024 * 16) +#define SZ_32K (1024 * 32) +#define SZ_64K (1024 * 64) +#define SZ_128K (1024 * 128) +#define SZ_256K (1024 * 256) +#define SZ_512K (1024 * 512) + +#define SZ_1M (1024 * 1024 * 1) +#define SZ_2M (1024 * 1024 * 2) +#define SZ_8M (1024 * 1024 * 8) +#define SZ_16M (1024 * 1024 * 16) +#define SZ_32M (1024 * 1024 * 32) +#define SZ_64M (1024 * 1024 * 64) + +#endif Modified: stable/12/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/wait.h Mon Aug 24 13:15:08 2020 (r364673) +++ stable/12/sys/compat/linuxkpi/common/include/linux/wait.h Mon Aug 24 13:19:16 2020 (r364674) @@ -36,6 +36,7 @@ #include #include #include +#include #include Copied: stable/12/sys/compat/linuxkpi/common/include/linux/wait_bit.h (from r364232, head/sys/compat/linuxkpi/common/include/linux/wait_bit.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/compat/linuxkpi/common/include/linux/wait_bit.h Mon Aug 24 13:19:16 2020 (r364674, copy of r364232, head/sys/compat/linuxkpi/common/include/linux/wait_bit.h) @@ -0,0 +1,64 @@ +/*- + * Copyright (c) 2020 The FreeBSD Foundation + * + * This software was developed by Emmanuel Vadot under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __LINUX_WAITBIT_H__ +#define __LINUX_WAITBIT_H__ + +#include +#include + +extern wait_queue_head_t linux_bit_waitq; +extern wait_queue_head_t linux_var_waitq; + +#define wait_var_event_killable(var, cond) \ + wait_event_killable(linux_var_waitq, cond) + +static inline void +clear_and_wake_up_bit(int bit, void *word) +{ + clear_bit_unlock(bit, word); + wake_up_bit(word, bit); +} + +static inline wait_queue_head_t * +bit_waitqueue(void *word, int bit) +{ + + return (&linux_bit_waitq); +} + +static inline void +wake_up_var(void *var) +{ + + wake_up(&linux_var_waitq); +} + +#endif /* __LINUX_WAITBIT_H__ */ Modified: stable/12/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Mon Aug 24 13:15:08 2020 (r364673) +++ stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Mon Aug 24 13:19:16 2020 (r364674) @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #if defined(__i386__) || defined(__amd64__) #include @@ -117,6 +118,9 @@ spinlock_t pci_lock; unsigned long linux_timer_hz_mask; +wait_queue_head_t linux_bit_waitq; +wait_queue_head_t linux_var_waitq; + int panic_cmp(struct rb_node *one, struct rb_node *two) { @@ -2523,6 +2527,8 @@ linux_compat_init(void *arg) mtx_init(&vmmaplock, "IO Map lock", NULL, MTX_DEF); for (i = 0; i < VMMAP_HASH_SIZE; i++) LIST_INIT(&vmmaphead[i]); + init_waitqueue_head(&linux_bit_waitq); + init_waitqueue_head(&linux_var_waitq); } SYSINIT(linux_compat, SI_SUB_DRIVERS, SI_ORDER_SECOND, linux_compat_init, NULL); From owner-svn-src-all@freebsd.org Mon Aug 24 13:40:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 591C83C0596; Mon, 24 Aug 2020 13:40:36 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZtYJ1hhfz4p7f; Mon, 24 Aug 2020 13:40:36 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E00519467; Mon, 24 Aug 2020 13:40:36 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07ODeaxW068402; Mon, 24 Aug 2020 13:40:36 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07ODeaBG068401; Mon, 24 Aug 2020 13:40:36 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <202008241340.07ODeaBG068401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Mon, 24 Aug 2020 13:40:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364675 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 364675 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 13:40:36 -0000 Author: luporl Date: Mon Aug 24 13:40:35 2020 New Revision: 364675 URL: https://svnweb.freebsd.org/changeset/base/364675 Log: [PowerPC] Make new auxv format default Assume ELF images without OSREL use the new auxv format. This is specially important for rtld, that is not tagged. Using direct exec mode with new (ELFv2) binaries that expect the new auxv format would result in crashes otherwise. Unfortunately, this may break direct exec'ing old binaries, but it seems better to correctly support new binaries by default, considering the transition to ELFv2 happened quite some time ago. If needed, a sysctl may be added to allow old auxv format to be used when OSREL is not found. Reviewed by: bdragon Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D25651 Modified: head/sys/powerpc/powerpc/elf_common.c Modified: head/sys/powerpc/powerpc/elf_common.c ============================================================================== --- head/sys/powerpc/powerpc/elf_common.c Mon Aug 24 13:19:16 2020 (r364674) +++ head/sys/powerpc/powerpc/elf_common.c Mon Aug 24 13:40:35 2020 (r364675) @@ -36,7 +36,22 @@ __elfN(powerpc_copyout_auxargs)(struct image_params *i Elf_Auxinfo *argarray, *pos; int error; - if (imgp->proc->p_osrel >= P_OSREL_POWERPC_NEW_AUX_ARGS) + /* + * XXX If we can't find image's OSREL, assume it uses the new auxv + * format. + * + * This is specially important for rtld, that is not tagged. Using + * direct exec mode with new (ELFv2) binaries that expect the new auxv + * format would result in crashes otherwise. + * + * Unfortunately, this may break direct exec'ing old binaries, + * but it seems better to correctly support new binaries by default, + * considering the transition to ELFv2 happened quite some time + * ago. If needed, a sysctl may be added to allow old auxv format to + * be used when OSREL is not found. + */ + if (imgp->proc->p_osrel >= P_OSREL_POWERPC_NEW_AUX_ARGS || + imgp->proc->p_osrel == 0) return (__elfN(freebsd_copyout_auxargs)(imgp, base)); args = (Elf_Auxargs *)imgp->auxargs; From owner-svn-src-all@freebsd.org Mon Aug 24 13:50:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D8EF3C087D; Mon, 24 Aug 2020 13:50:56 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZtnD3VtDz4q1C; Mon, 24 Aug 2020 13:50:56 +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 5C805197F2; Mon, 24 Aug 2020 13:50:56 +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 07ODouGh075062; Mon, 24 Aug 2020 13:50:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07ODotGn075061; Mon, 24 Aug 2020 13:50:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008241350.07ODotGn075061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 24 Aug 2020 13:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364676 - stable/12/sys/dev/asmc X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/dev/asmc X-SVN-Commit-Revision: 364676 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 13:50:56 -0000 Author: markj Date: Mon Aug 24 13:50:55 2020 New Revision: 364676 URL: https://svnweb.freebsd.org/changeset/base/364676 Log: MFC r364300: asmc(4): Add support for MacBook7,1. PR: 248693 Modified: stable/12/sys/dev/asmc/asmc.c stable/12/sys/dev/asmc/asmcvar.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/asmc/asmc.c ============================================================================== --- stable/12/sys/dev/asmc/asmc.c Mon Aug 24 13:40:35 2020 (r364675) +++ stable/12/sys/dev/asmc/asmc.c Mon Aug 24 13:50:55 2020 (r364676) @@ -173,6 +173,12 @@ struct asmc_model asmc_models[] = { }, { + "MacBook7,1", "Apple SMC MacBook Core 2 Duo (mid 2010)", + ASMC_SMS_FUNCS, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS_DISABLED, + ASMC_MB71_TEMPS, ASMC_MB71_TEMPNAMES, ASMC_MB71_TEMPDESCS + }, + + { "MacBookPro1,1", "Apple SMC MacBook Pro Core Duo (15-inch)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, ASMC_MBP_TEMPS, ASMC_MBP_TEMPNAMES, ASMC_MBP_TEMPDESCS Modified: stable/12/sys/dev/asmc/asmcvar.h ============================================================================== --- stable/12/sys/dev/asmc/asmcvar.h Mon Aug 24 13:40:35 2020 (r364675) +++ stable/12/sys/dev/asmc/asmcvar.h Mon Aug 24 13:50:55 2020 (r364676) @@ -158,6 +158,21 @@ struct asmc_softc { "Heatsink 1","Heatsink 2" \ "Memory Bank A", } +#define ASMC_MB71_TEMPS { "TB0T", "TB1T", "TB2T", "TC0D", "TC0P", \ + "TH0P", "TN0D", "TN0P", "TN0S", "TN1D", \ + "TN1E", "TN1F", "TN1G", "TN1S", "Th1H", \ + "Ts0P", "Ts0S", NULL } + +#define ASMC_MB71_TEMPNAMES { "enclosure_bottom0", "battery_1", "battery_2", "cpu_package", "cpu_proximity", \ + "hdd_bay", "northbridge0_diode", "northbridge0_proximity", "TN0S", "mpc_die2", \ + "TN1E", "TN1F", "TN1G", "TN1S", "heatsink1", \ + "palm_rest", "memory_proximity", } + +#define ASMC_MB71_TEMPDESCS { "Enclosure Bottom 0", "Battery 1", "Battery 2", "CPU Package", "CPU Proximity", \ + "HDD Bay", "Northbridge Diode", "Northbridge Proximity", "TN0S", "MPC Die 2", \ + "TN1E", "TN1F", "TN1G", "TN1S", "Heatsink 1", \ + "Palm Rest", "Memory Proximity", } + #define ASMC_MBP_TEMPS { "TB0T", "Th0H", "Th1H", "Tm0P", \ "TG0H", "TG0P", "TG0T", NULL } From owner-svn-src-all@freebsd.org Mon Aug 24 13:52:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2389E3C0957; Mon, 24 Aug 2020 13:52:48 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZtqN08jLz4qRT; Mon, 24 Aug 2020 13:52:48 +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 DD00719370; Mon, 24 Aug 2020 13:52:47 +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 07ODqlxY079547; Mon, 24 Aug 2020 13:52:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07ODql7S079546; Mon, 24 Aug 2020 13:52:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241352.07ODql7S079546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 13:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364677 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364677 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 13:52:48 -0000 Author: trasz Date: Mon Aug 24 13:52:47 2020 New Revision: 364677 URL: https://svnweb.freebsd.org/changeset/base/364677 Log: MFC r354732: Support O_CLOEXEC in linux(4) open(2) and openat(2). Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_file.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_file.c ============================================================================== --- stable/12/sys/compat/linux/linux_file.c Mon Aug 24 13:50:55 2020 (r364676) +++ stable/12/sys/compat/linux/linux_file.c Mon Aug 24 13:52:47 2020 (r364677) @@ -112,6 +112,8 @@ linux_common_open(struct thread *td, int dirfd, char * bsd_flags |= O_APPEND; if (l_flags & LINUX_O_SYNC) bsd_flags |= O_FSYNC; + if (l_flags & LINUX_O_CLOEXEC) + bsd_flags |= O_CLOEXEC; if (l_flags & LINUX_O_NONBLOCK) bsd_flags |= O_NONBLOCK; if (l_flags & LINUX_FASYNC) From owner-svn-src-all@freebsd.org Mon Aug 24 13:54:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 022993C0AD2; Mon, 24 Aug 2020 13:54:42 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZtsY5qLkz4qQB; Mon, 24 Aug 2020 13:54:41 +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 ACBDF194E7; Mon, 24 Aug 2020 13:54:41 +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 07ODsfwL079693; Mon, 24 Aug 2020 13:54:41 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07ODsfuV079692; Mon, 24 Aug 2020 13:54:41 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008241354.07ODsfuV079692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 24 Aug 2020 13:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364678 - stable/12/usr.bin/cpuset X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/usr.bin/cpuset X-SVN-Commit-Revision: 364678 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 13:54:42 -0000 Author: markj Date: Mon Aug 24 13:54:41 2020 New Revision: 364678 URL: https://svnweb.freebsd.org/changeset/base/364678 Log: MFC r364304: cpuset(1): Update the usage message. Modified: stable/12/usr.bin/cpuset/cpuset.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/cpuset/cpuset.c ============================================================================== --- stable/12/usr.bin/cpuset/cpuset.c Mon Aug 24 13:52:47 2020 (r364677) +++ stable/12/usr.bin/cpuset/cpuset.c Mon Aug 24 13:54:41 2020 (r364678) @@ -458,15 +458,16 @@ usage(void) { fprintf(stderr, - "usage: cpuset [-l cpu-list] [-s setid] cmd ...\n"); + "usage: cpuset [-l cpu-list] [-n policy:domain-list] [-s setid] cmd ...\n"); fprintf(stderr, - " cpuset [-l cpu-list] [-s setid] -p pid\n"); + " cpuset [-l cpu-list] [-n policy:domain-list] [-s setid] -p pid\n"); fprintf(stderr, - " cpuset [-c] [-l cpu-list] -C -p pid\n"); + " cpuset [-c] [-l cpu-list] [-n policy:domain-list] -C -p pid\n"); fprintf(stderr, - " cpuset [-c] [-l cpu-list] [-j jailid | -p pid | -t tid | -s setid | -x irq]\n"); + " cpuset [-c] [-l cpu-list] [-n policy:domain-list]\n" + " [-j jailid | -p pid | -t tid | -s setid | -x irq]\n"); fprintf(stderr, - " cpuset -g [-cir] [-d domain | -j jailid | -p pid | -t tid | -s setid |\n" - " -x irq]\n"); + " cpuset -g [-cir]\n" + " [-d domain | -j jailid | -p pid | -t tid | -s setid | -x irq]\n"); exit(1); } From owner-svn-src-all@freebsd.org Mon Aug 24 13:54:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2863D3C0E82; Mon, 24 Aug 2020 13:54:59 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZtsv0LtLz4qsS; Mon, 24 Aug 2020 13:54:59 +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 E36B819A0D; Mon, 24 Aug 2020 13:54:58 +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 07ODsw57079760; Mon, 24 Aug 2020 13:54:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07ODswNa079759; Mon, 24 Aug 2020 13:54:58 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008241354.07ODswNa079759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 24 Aug 2020 13:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364679 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364679 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 13:54:59 -0000 Author: markj Date: Mon Aug 24 13:54:58 2020 New Revision: 364679 URL: https://svnweb.freebsd.org/changeset/base/364679 Log: MFC r364328: Fix a lock leak when emulating futex(FUTEX_WAIT_BITSET). Modified: stable/12/sys/compat/linux/linux_futex.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_futex.c ============================================================================== --- stable/12/sys/compat/linux/linux_futex.c Mon Aug 24 13:54:41 2020 (r364678) +++ stable/12/sys/compat/linux/linux_futex.c Mon Aug 24 13:54:58 2020 (r364679) @@ -643,6 +643,7 @@ futex_wait(struct futex *f, struct waiting_proc *wp, s if (bitset == 0) { LIN_SDT_PROBE1(futex, futex_wait, return, EINVAL); + futex_put(f, wp); return (EINVAL); } From owner-svn-src-all@freebsd.org Mon Aug 24 13:55:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B2A013C0AEE; Mon, 24 Aug 2020 13:55:24 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZttN4MByz4qt1; Mon, 24 Aug 2020 13:55:24 +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 7A58E19822; Mon, 24 Aug 2020 13:55:24 +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 07ODtOVf079866; Mon, 24 Aug 2020 13:55:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07ODtO9g079865; Mon, 24 Aug 2020 13:55:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008241355.07ODtO9g079865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 24 Aug 2020 13:55:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364680 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364680 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 13:55:24 -0000 Author: markj Date: Mon Aug 24 13:55:24 2020 New Revision: 364680 URL: https://svnweb.freebsd.org/changeset/base/364680 Log: MFC r364329: Remove "emulation" of clone(CLONE_PARENT | CLONE_THREAD). Modified: stable/12/sys/compat/linux/linux_fork.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_fork.c ============================================================================== --- stable/12/sys/compat/linux/linux_fork.c Mon Aug 24 13:54:58 2020 (r364679) +++ stable/12/sys/compat/linux/linux_fork.c Mon Aug 24 13:55:24 2020 (r364680) @@ -280,6 +280,8 @@ linux_clone_thread(struct thread *td, struct linux_clo td->td_tid, (unsigned)args->flags, args->parent_tidptr, args->child_tidptr); + if ((args->flags & LINUX_CLONE_PARENT) != 0) + return (EINVAL); if (args->flags & LINUX_CLONE_PARENT_SETTID) if (args->parent_tidptr == NULL) return (EINVAL); @@ -342,12 +344,8 @@ linux_clone_thread(struct thread *td, struct linux_clo PROC_LOCK(p); p->p_flag |= P_HADTHREADS; + thread_link(newtd, p); bcopy(p->p_comm, newtd->td_name, sizeof(newtd->td_name)); - - if (args->flags & LINUX_CLONE_PARENT) - thread_link(newtd, p->p_pptr); - else - thread_link(newtd, p); thread_lock(td); /* let the scheduler know about these things. */ From owner-svn-src-all@freebsd.org Mon Aug 24 13:56:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 32F343C0E35; Mon, 24 Aug 2020 13:56:16 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZtvN0bmxz4r2G; Mon, 24 Aug 2020 13:56:16 +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 EBC8D19939; Mon, 24 Aug 2020 13:56:15 +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 07ODuFNG079948; Mon, 24 Aug 2020 13:56:15 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07ODuFjd079947; Mon, 24 Aug 2020 13:56:15 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008241356.07ODuFjd079947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 24 Aug 2020 13:56: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: r364681 - stable/11/sys/compat/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/compat/linux X-SVN-Commit-Revision: 364681 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 13:56:16 -0000 Author: markj Date: Mon Aug 24 13:56:15 2020 New Revision: 364681 URL: https://svnweb.freebsd.org/changeset/base/364681 Log: MFC r364329: Remove "emulation" of clone(CLONE_PARENT | CLONE_THREAD). Modified: stable/11/sys/compat/linux/linux_fork.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linux/linux_fork.c ============================================================================== --- stable/11/sys/compat/linux/linux_fork.c Mon Aug 24 13:55:24 2020 (r364680) +++ stable/11/sys/compat/linux/linux_fork.c Mon Aug 24 13:56:15 2020 (r364681) @@ -278,6 +278,8 @@ linux_clone_thread(struct thread *td, struct linux_clo td->td_tid, (unsigned)args->flags, args->parent_tidptr, args->child_tidptr); + if ((args->flags & LINUX_CLONE_PARENT) != 0) + return (EINVAL); if (args->flags & LINUX_CLONE_PARENT_SETTID) if (args->parent_tidptr == NULL) return (EINVAL); @@ -339,12 +341,8 @@ linux_clone_thread(struct thread *td, struct linux_clo PROC_LOCK(p); p->p_flag |= P_HADTHREADS; + thread_link(newtd, p); bcopy(p->p_comm, newtd->td_name, sizeof(newtd->td_name)); - - if (args->flags & LINUX_CLONE_PARENT) - thread_link(newtd, p->p_pptr); - else - thread_link(newtd, p); thread_lock(td); /* let the scheduler know about these things. */ From owner-svn-src-all@freebsd.org Mon Aug 24 14:00:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9313D3C1033; Mon, 24 Aug 2020 14:00:13 +0000 (UTC) (envelope-from blackend@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZtzx3DnNz4r58; Mon, 24 Aug 2020 14:00:13 +0000 (UTC) (envelope-from blackend@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 529691993A; Mon, 24 Aug 2020 14:00:13 +0000 (UTC) (envelope-from blackend@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07OE0Dpb080232; Mon, 24 Aug 2020 14:00:13 GMT (envelope-from blackend@FreeBSD.org) Received: (from blackend@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OE0D6M080231; Mon, 24 Aug 2020 14:00:13 GMT (envelope-from blackend@FreeBSD.org) Message-Id: <202008241400.07OE0D6M080231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: blackend set sender to blackend@FreeBSD.org using -f From: Marc Fonvieille Date: Mon, 24 Aug 2020 14:00:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364682 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: blackend X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 364682 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 14:00:13 -0000 Author: blackend (doc committer) Date: Mon Aug 24 14:00:12 2020 New Revision: 364682 URL: https://svnweb.freebsd.org/changeset/base/364682 Log: Add missing Korean doc package entry, remove non-existent Serbian doc package entry. Approved by: re (gjb) MFC after: 1 week Modified: head/usr.sbin/bsdinstall/scripts/docsinstall Modified: head/usr.sbin/bsdinstall/scripts/docsinstall ============================================================================== --- head/usr.sbin/bsdinstall/scripts/docsinstall Mon Aug 24 13:56:15 2020 (r364681) +++ head/usr.sbin/bsdinstall/scripts/docsinstall Mon Aug 24 14:00:12 2020 (r364682) @@ -42,7 +42,7 @@ f_include $BSDCFG_SHARE/packages/packages.subr # List of languages to display (descriptions pulled from $msg_{lang}doc_desc) # : ${DOCSINSTALL_LANGS:=\ - bn da de el en es fr hu it ja mn nl pl pt ru sr tr zh_cn zh_tw \ + bn da de el en es fr hu it ja ko mn nl pl pt ru tr zh_cn zh_tw \ } ############################################################ GLOBALS @@ -65,13 +65,13 @@ msg_freebsd_installer="FreeBSD Installer" msg_hudoc_desc="Hungarian Documentation" msg_itdoc_desc="Italian Documentation" msg_jadoc_desc="Japanese Documentation" +msg_kodoc_desc="Korean Documentation" msg_mndoc_desc="Mongolian Documentation" msg_nldoc_desc="Dutch Documentation" msg_ok="OK" msg_pldoc_desc="Polish Documentation" msg_ptdoc_desc="Portuguese Documentation" msg_rudoc_desc="Russian Documentation" -msg_srdoc_desc="Serbian Documentation" msg_trdoc_desc="Turkish Documentation" msg_zh_cndoc_desc="Simplified Chinese Documentation" msg_zh_twdoc_desc="Traditional Chinese Documentation" From owner-svn-src-all@freebsd.org Mon Aug 24 14:01:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80D1D3C104F; Mon, 24 Aug 2020 14:01:53 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZv1s2qmVz4rVQ; Mon, 24 Aug 2020 14:01:53 +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 451ED1982D; Mon, 24 Aug 2020 14:01:53 +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 07OE1rJb084148; Mon, 24 Aug 2020 14:01:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OE1qsp084146; Mon, 24 Aug 2020 14:01:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241401.07OE1qsp084146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 14:01:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364683 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364683 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 14:01:53 -0000 Author: trasz Date: Mon Aug 24 14:01:52 2020 New Revision: 364683 URL: https://svnweb.freebsd.org/changeset/base/364683 Log: MFC r362055: Replace LINUX_FASYNC with LINUX_O_ASYNC; no functional changes. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_file.c stable/12/sys/compat/linux/linux_file.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_file.c ============================================================================== --- stable/12/sys/compat/linux/linux_file.c Mon Aug 24 14:00:12 2020 (r364682) +++ stable/12/sys/compat/linux/linux_file.c Mon Aug 24 14:01:52 2020 (r364683) @@ -116,7 +116,7 @@ linux_common_open(struct thread *td, int dirfd, char * bsd_flags |= O_CLOEXEC; if (l_flags & LINUX_O_NONBLOCK) bsd_flags |= O_NONBLOCK; - if (l_flags & LINUX_FASYNC) + if (l_flags & LINUX_O_ASYNC) bsd_flags |= O_ASYNC; if (l_flags & LINUX_O_CREAT) bsd_flags |= O_CREAT; @@ -1406,7 +1406,7 @@ fcntl_common(struct thread *td, struct linux_fcntl_arg if (result & O_FSYNC) td->td_retval[0] |= LINUX_O_SYNC; if (result & O_ASYNC) - td->td_retval[0] |= LINUX_FASYNC; + td->td_retval[0] |= LINUX_O_ASYNC; #ifdef LINUX_O_NOFOLLOW if (result & O_NOFOLLOW) td->td_retval[0] |= LINUX_O_NOFOLLOW; @@ -1425,7 +1425,7 @@ fcntl_common(struct thread *td, struct linux_fcntl_arg arg |= O_APPEND; if (args->arg & LINUX_O_SYNC) arg |= O_FSYNC; - if (args->arg & LINUX_FASYNC) + if (args->arg & LINUX_O_ASYNC) arg |= O_ASYNC; #ifdef LINUX_O_NOFOLLOW if (args->arg & LINUX_O_NOFOLLOW) Modified: stable/12/sys/compat/linux/linux_file.h ============================================================================== --- stable/12/sys/compat/linux/linux_file.h Mon Aug 24 14:00:12 2020 (r364682) +++ stable/12/sys/compat/linux/linux_file.h Mon Aug 24 14:01:52 2020 (r364683) @@ -71,7 +71,7 @@ #define LINUX_O_NONBLOCK 00004000 #define LINUX_O_NDELAY LINUX_O_NONBLOCK #define LINUX_O_SYNC 00010000 -#define LINUX_FASYNC 00020000 +#define LINUX_O_ASYNC 00020000 #define LINUX_O_DIRECT 00040000 /* Direct disk access hint */ #define LINUX_O_LARGEFILE 00100000 #define LINUX_O_DIRECTORY 00200000 /* Must be a directory */ From owner-svn-src-all@freebsd.org Mon Aug 24 14:04:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E63393C10B8; Mon, 24 Aug 2020 14:04:59 +0000 (UTC) (envelope-from blackend@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZv5R5lRtz4rjg; Mon, 24 Aug 2020 14:04:59 +0000 (UTC) (envelope-from blackend@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8B5A19D13; Mon, 24 Aug 2020 14:04:59 +0000 (UTC) (envelope-from blackend@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07OE4xES085941; Mon, 24 Aug 2020 14:04:59 GMT (envelope-from blackend@FreeBSD.org) Received: (from blackend@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OE4xKk085940; Mon, 24 Aug 2020 14:04:59 GMT (envelope-from blackend@FreeBSD.org) Message-Id: <202008241404.07OE4xKk085940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: blackend set sender to blackend@FreeBSD.org using -f From: Marc Fonvieille Date: Mon, 24 Aug 2020 14:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364684 - head/usr.sbin/bsdinstall X-SVN-Group: head X-SVN-Commit-Author: blackend X-SVN-Commit-Paths: head/usr.sbin/bsdinstall X-SVN-Commit-Revision: 364684 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 14:05:00 -0000 Author: blackend (doc committer) Date: Mon Aug 24 14:04:59 2020 New Revision: 364684 URL: https://svnweb.freebsd.org/changeset/base/364684 Log: s/redundacy/redundancy MFC after: 1 week Modified: head/usr.sbin/bsdinstall/bsdinstall.8 Modified: head/usr.sbin/bsdinstall/bsdinstall.8 ============================================================================== --- head/usr.sbin/bsdinstall/bsdinstall.8 Mon Aug 24 14:01:52 2020 (r364683) +++ head/usr.sbin/bsdinstall/bsdinstall.8 Mon Aug 24 14:04:59 2020 (r364684) @@ -349,7 +349,7 @@ Default: .Dq default .It Ev ZFSBOOT_VDEV_TYPE The type of pool to be created for the base system. -This variable can take one of this values: stripe (No redundacy), +This variable can take one of this values: stripe (No redundancy), mirror (n-Way mirroring), raid10 (RAID 1+0 - n x 2-Way Mirrors), raidz1 (RAID-Z1 - Single Redundancy RAID), raidz2 (RAID-Z2 - Double Redundancy RAID) or raidz3 (RAID-Z3 Triple Redundancy RAID). From owner-svn-src-all@freebsd.org Mon Aug 24 14:05:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23DB03C12AD; Mon, 24 Aug 2020 14:05:46 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZv6L06xZz4rbH; Mon, 24 Aug 2020 14:05:46 +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 DB17D19D14; Mon, 24 Aug 2020 14:05:45 +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 07OE5jeT086026; Mon, 24 Aug 2020 14:05:45 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OE5jrU086025; Mon, 24 Aug 2020 14:05:45 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241405.07OE5jrU086025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 14:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364685 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364685 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 14:05:46 -0000 Author: trasz Date: Mon Aug 24 14:05:45 2020 New Revision: 364685 URL: https://svnweb.freebsd.org/changeset/base/364685 Log: MFC r354805: Make linux(4) open(2)/openat(2) return ELOOP instead of EMLINK, when being passed O_NOFOLLOW. This fixes LTP testcase openat02:5. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_file.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_file.c ============================================================================== --- stable/12/sys/compat/linux/linux_file.c Mon Aug 24 14:04:59 2020 (r364684) +++ stable/12/sys/compat/linux/linux_file.c Mon Aug 24 14:05:45 2020 (r364685) @@ -135,8 +135,11 @@ linux_common_open(struct thread *td, int dirfd, char * /* XXX LINUX_O_NOATIME: unable to be easily implemented. */ error = kern_openat(td, dirfd, path, UIO_SYSSPACE, bsd_flags, mode); - if (error != 0) + if (error != 0) { + if (error == EMLINK) + error = ELOOP; goto done; + } if (bsd_flags & O_NOCTTY) goto done; From owner-svn-src-all@freebsd.org Mon Aug 24 14:13:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 22EB43C10F6; Mon, 24 Aug 2020 14:13:21 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZvH509r7z4s5S; Mon, 24 Aug 2020 14:13:21 +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 DD7CB19A4F; Mon, 24 Aug 2020 14:13:20 +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 07OEDKeE092134; Mon, 24 Aug 2020 14:13:20 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OEDK8m092133; Mon, 24 Aug 2020 14:13:20 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241413.07OEDK8m092133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 14:13:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364686 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364686 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 14:13:21 -0000 Author: trasz Date: Mon Aug 24 14:13:20 2020 New Revision: 364686 URL: https://svnweb.freebsd.org/changeset/base/364686 Log: MFC r356727: Make linux getcpu(2) report the domain. Submitted by: markj Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_misc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_misc.c ============================================================================== --- stable/12/sys/compat/linux/linux_misc.c Mon Aug 24 14:05:45 2020 (r364685) +++ stable/12/sys/compat/linux/linux_misc.c Mon Aug 24 14:13:20 2020 (r364686) @@ -2829,7 +2829,7 @@ linux_getcpu(struct thread *td, struct linux_getcpu_ar cpu = td->td_oncpu; /* Make sure it doesn't change during copyout(9) */ error = 0; - node = 0; /* XXX: Fake NUMA node 0 for now */ + node = cpuid_to_pcpu[cpu]->pc_domain; if (args->cpu != NULL) error = copyout(&cpu, args->cpu, sizeof(l_int)); From owner-svn-src-all@freebsd.org Mon Aug 24 14:17:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8B963C17C1; Mon, 24 Aug 2020 14:17:25 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZvMn4Sntz4sQ6; Mon, 24 Aug 2020 14:17:25 +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 7C78219D2D; Mon, 24 Aug 2020 14:17:25 +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 07OEHPqB092380; Mon, 24 Aug 2020 14:17:25 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OEHPVC092379; Mon, 24 Aug 2020 14:17:25 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241417.07OEHPVC092379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 14:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364687 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364687 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 14:17:25 -0000 Author: trasz Date: Mon Aug 24 14:17:25 2020 New Revision: 364687 URL: https://svnweb.freebsd.org/changeset/base/364687 Log: MFC r357491 by dchagin: linux_to_native_clockid() properly initializes nwhich variable (or return error), so don't initialize nwhich in declaration and remove stale comment from r161304. Modified: stable/12/sys/compat/linux/linux_time.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_time.c ============================================================================== --- stable/12/sys/compat/linux/linux_time.c Mon Aug 24 14:13:20 2020 (r364686) +++ stable/12/sys/compat/linux/linux_time.c Mon Aug 24 14:17:25 2020 (r364687) @@ -253,7 +253,7 @@ linux_clock_gettime(struct thread *td, struct linux_cl struct thread *targettd; struct proc *p; int error, clockwhich; - clockid_t nwhich = 0; /* XXX: GCC */ + clockid_t nwhich; pid_t pid; lwpid_t tid; @@ -382,7 +382,7 @@ linux_clock_settime(struct thread *td, struct linux_cl struct timespec ts; struct l_timespec lts; int error; - clockid_t nwhich = 0; /* XXX: GCC */ + clockid_t nwhich; LIN_SDT_PROBE2(time, linux_clock_settime, entry, args->which, args->tp); @@ -422,7 +422,7 @@ linux_clock_getres(struct thread *td, struct linux_clo struct timespec ts; struct l_timespec lts; int error, clockwhich; - clockid_t nwhich = 0; /* XXX: GCC */ + clockid_t nwhich; pid_t pid; lwpid_t tid; From owner-svn-src-all@freebsd.org Mon Aug 24 14:26:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD6943C1B16; Mon, 24 Aug 2020 14:26:49 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZvZd4YLLz4t59; Mon, 24 Aug 2020 14:26:49 +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 80B5119D41; Mon, 24 Aug 2020 14:26:49 +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 07OEQnQW098379; Mon, 24 Aug 2020 14:26:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OEQn1h098378; Mon, 24 Aug 2020 14:26:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241426.07OEQn1h098378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 14:26:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364688 - in stable/12/sys: kern sys X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: kern sys X-SVN-Commit-Revision: 364688 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 14:26:49 -0000 Author: trasz Date: Mon Aug 24 14:26:48 2020 New Revision: 364688 URL: https://svnweb.freebsd.org/changeset/base/364688 Log: MFC r357492 by dchagin: For code reuse in Linuxulator rename get_proccess_cputime() and get_thread_cputime() and add prototypes for it to . As both functions become a public interface add process lock assert to ensure that the process is not exiting under it. Fix whitespace nit while here. Modified: stable/12/sys/kern/kern_time.c stable/12/sys/sys/syscallsubr.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_time.c ============================================================================== --- stable/12/sys/kern/kern_time.c Mon Aug 24 14:17:25 2020 (r364687) +++ stable/12/sys/kern/kern_time.c Mon Aug 24 14:26:48 2020 (r364688) @@ -243,7 +243,7 @@ sys_clock_gettime(struct thread *td, struct clock_gett return (error); } -static inline void +static inline void cputick2timespec(uint64_t runtime, struct timespec *ats) { runtime = cputick2usec(runtime); @@ -251,12 +251,15 @@ cputick2timespec(uint64_t runtime, struct timespec *at ats->tv_nsec = runtime % 1000000 * 1000; } -static void -get_thread_cputime(struct thread *targettd, struct timespec *ats) +void +kern_thread_cputime(struct thread *targettd, struct timespec *ats) { uint64_t runtime, curtime, switchtime; + struct proc *p; if (targettd == NULL) { /* current thread */ + p = curthread->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); critical_enter(); switchtime = PCPU_GET(switchtime); curtime = cpu_ticks(); @@ -264,6 +267,8 @@ get_thread_cputime(struct thread *targettd, struct tim critical_exit(); runtime += curtime - switchtime; } else { + p = targettd->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); thread_lock(targettd); runtime = targettd->td_runtime; thread_unlock(targettd); @@ -271,12 +276,13 @@ get_thread_cputime(struct thread *targettd, struct tim cputick2timespec(runtime, ats); } -static void -get_process_cputime(struct proc *targetp, struct timespec *ats) +void +kern_process_cputime(struct proc *targetp, struct timespec *ats) { uint64_t runtime; struct rusage ru; + PROC_LOCK_ASSERT(targetp, MA_OWNED); PROC_STATLOCK(targetp); rufetch(targetp, &ru); runtime = targetp->p_rux.rux_runtime; @@ -301,14 +307,14 @@ get_cputime(struct thread *td, clockid_t clock_id, str td2 = tdfind(tid, p->p_pid); if (td2 == NULL) return (EINVAL); - get_thread_cputime(td2, ats); + kern_thread_cputime(td2, ats); PROC_UNLOCK(td2->td_proc); } else { pid = clock_id & CPUCLOCK_ID_MASK; error = pget(pid, PGET_CANSEE, &p2); if (error != 0) return (EINVAL); - get_process_cputime(p2, ats); + kern_process_cputime(p2, ats); PROC_UNLOCK(p2); } return (0); @@ -361,11 +367,11 @@ kern_clock_gettime(struct thread *td, clockid_t clock_ ats->tv_nsec = 0; break; case CLOCK_THREAD_CPUTIME_ID: - get_thread_cputime(NULL, ats); + kern_thread_cputime(NULL, ats); break; case CLOCK_PROCESS_CPUTIME_ID: PROC_LOCK(p); - get_process_cputime(p, ats); + kern_process_cputime(p, ats); PROC_UNLOCK(p); break; default: Modified: stable/12/sys/sys/syscallsubr.h ============================================================================== --- stable/12/sys/sys/syscallsubr.h Mon Aug 24 14:17:25 2020 (r364687) +++ stable/12/sys/sys/syscallsubr.h Mon Aug 24 14:26:48 2020 (r364688) @@ -93,6 +93,8 @@ int kern_clock_nanosleep(struct thread *td, clockid_t const struct timespec *rqtp, struct timespec *rmtp); int kern_clock_settime(struct thread *td, clockid_t clock_id, struct timespec *ats); +void kern_thread_cputime(struct thread *targettd, struct timespec *ats); +void kern_process_cputime(struct proc *targetp, struct timespec *ats); int kern_close_range(struct thread *td, u_int lowfd, u_int highfd); int kern_close(struct thread *td, int fd); int kern_connectat(struct thread *td, int dirfd, int fd, From owner-svn-src-all@freebsd.org Mon Aug 24 14:48:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E515A3C3340; Mon, 24 Aug 2020 14:48:54 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZw465kbwz4vwT; Mon, 24 Aug 2020 14:48:54 +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 A80DE1A222; Mon, 24 Aug 2020 14:48:54 +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 07OEms1k011361; Mon, 24 Aug 2020 14:48:54 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OEmsYl011360; Mon, 24 Aug 2020 14:48:54 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241448.07OEmsYl011360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 14:48:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364689 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364689 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 14:48:55 -0000 Author: trasz Date: Mon Aug 24 14:48:54 2020 New Revision: 364689 URL: https://svnweb.freebsd.org/changeset/base/364689 Log: MFC r357493 by dchagin: Fix clock_gettime() and clock_getres() for cpu clocks: - handle the CLOCK_{PROCESS,THREAD}_CPUTIME_ID specified directly; - fix thread id calculation as in the Linuxulator we should convert the user supplied thread id to struct thread * by linux_tdfind(); - fix CPUCLOCK_SCHED case by using kern_{process,thread}_cputime() directly as native get_cputime() used by kern_clock_gettime() uses native tdfind()/pfind() to find proccess/thread. PR: 240990 Modified: stable/12/sys/compat/linux/linux_time.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_time.c ============================================================================== --- stable/12/sys/compat/linux/linux_time.c Mon Aug 24 14:26:48 2020 (r364688) +++ stable/12/sys/compat/linux/linux_time.c Mon Aug 24 14:48:54 2020 (r364689) @@ -65,6 +65,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.14 2006/0 #endif #include +#include #include /* DTrace init */ @@ -203,6 +204,12 @@ linux_to_native_clockid(clockid_t *n, clockid_t l) case LINUX_CLOCK_MONOTONIC: *n = CLOCK_MONOTONIC; break; + case LINUX_CLOCK_PROCESS_CPUTIME_ID: + *n = CLOCK_PROCESS_CPUTIME_ID; + break; + case LINUX_CLOCK_THREAD_CPUTIME_ID: + *n = CLOCK_THREAD_CPUTIME_ID; + break; case LINUX_CLOCK_REALTIME_COARSE: *n = CLOCK_REALTIME_FAST; break; @@ -269,8 +276,13 @@ linux_clock_gettime(struct thread *td, struct linux_cl switch (nwhich) { case CLOCK_PROCESS_CPUTIME_ID: - clockwhich = LINUX_CPUCLOCK_WHICH(args->which); - pid = LINUX_CPUCLOCK_ID(args->which); + if (args->which < 0) { + clockwhich = LINUX_CPUCLOCK_WHICH(args->which); + pid = LINUX_CPUCLOCK_ID(args->which); + } else { + clockwhich = LINUX_CPUCLOCK_SCHED; + pid = 0; + } if (pid == 0) { p = td->td_proc; PROC_LOCK(p); @@ -296,12 +308,8 @@ linux_clock_gettime(struct thread *td, struct linux_cl TIMEVAL_TO_TIMESPEC(&ru.ru_utime, &tp); break; case LINUX_CPUCLOCK_SCHED: + kern_process_cputime(p, &tp); PROC_UNLOCK(p); - error = kern_clock_getcpuclockid2(td, pid, - CPUCLOCK_WHICH_PID, &nwhich); - if (error != 0) - return (EINVAL); - error = kern_clock_gettime(td, nwhich, &tp); break; default: PROC_UNLOCK(p); @@ -311,14 +319,19 @@ linux_clock_gettime(struct thread *td, struct linux_cl break; case CLOCK_THREAD_CPUTIME_ID: - clockwhich = LINUX_CPUCLOCK_WHICH(args->which); + if (args->which < 0) { + clockwhich = LINUX_CPUCLOCK_WHICH(args->which); + tid = LINUX_CPUCLOCK_ID(args->which); + } else { + clockwhich = LINUX_CPUCLOCK_SCHED; + tid = 0; + } p = td->td_proc; - tid = LINUX_CPUCLOCK_ID(args->which); if (tid == 0) { targettd = td; PROC_LOCK(p); } else { - targettd = tdfind(tid, p->p_pid); + targettd = linux_tdfind(td, tid, p->p_pid); if (targettd == NULL) return (EINVAL); } @@ -343,12 +356,10 @@ linux_clock_gettime(struct thread *td, struct linux_cl TIMEVAL_TO_TIMESPEC(&ru.ru_utime, &tp); break; case LINUX_CPUCLOCK_SCHED: - error = kern_clock_getcpuclockid2(td, tid, - CPUCLOCK_WHICH_TID, &nwhich); + if (td == targettd) + targettd = NULL; + kern_thread_cputime(targettd, &tp); PROC_UNLOCK(p); - if (error != 0) - return (EINVAL); - error = kern_clock_gettime(td, nwhich, &tp); break; default: PROC_UNLOCK(p); @@ -440,25 +451,27 @@ linux_clock_getres(struct thread *td, struct linux_clo * Check user supplied clock id in case of per-process * or thread-specific cpu-time clock. */ - switch (nwhich) { - case CLOCK_THREAD_CPUTIME_ID: - tid = LINUX_CPUCLOCK_ID(args->which); - if (tid != 0) { - p = td->td_proc; - if (tdfind(tid, p->p_pid) == NULL) - return (ESRCH); - PROC_UNLOCK(p); + if (args->which < 0) { + switch (nwhich) { + case CLOCK_THREAD_CPUTIME_ID: + tid = LINUX_CPUCLOCK_ID(args->which); + if (tid != 0) { + p = td->td_proc; + if (linux_tdfind(td, tid, p->p_pid) == NULL) + return (EINVAL); + PROC_UNLOCK(p); + } + break; + case CLOCK_PROCESS_CPUTIME_ID: + pid = LINUX_CPUCLOCK_ID(args->which); + if (pid != 0) { + error = pget(pid, PGET_CANSEE, &p); + if (error != 0) + return (EINVAL); + PROC_UNLOCK(p); + } + break; } - break; - case CLOCK_PROCESS_CPUTIME_ID: - pid = LINUX_CPUCLOCK_ID(args->which); - if (pid != 0) { - error = pget(pid, PGET_CANSEE, &p); - if (error != 0) - return (EINVAL); - PROC_UNLOCK(p); - } - break; } if (args->tp == NULL) { @@ -471,6 +484,20 @@ linux_clock_getres(struct thread *td, struct linux_clo case CLOCK_THREAD_CPUTIME_ID: case CLOCK_PROCESS_CPUTIME_ID: clockwhich = LINUX_CPUCLOCK_WHICH(args->which); + /* + * In both cases (when the clock id obtained by a call to + * clock_getcpuclockid() or using the clock + * ID CLOCK_PROCESS_CPUTIME_ID Linux hardcodes precision + * of clock. The same for the CLOCK_THREAD_CPUTIME_ID clock. + * + * See Linux posix_cpu_clock_getres() implementation. + */ + if (args->which > 0 || clockwhich == LINUX_CPUCLOCK_SCHED) { + ts.tv_sec = 0; + ts.tv_nsec = 1; + goto out; + } + switch (clockwhich) { case LINUX_CPUCLOCK_PROF: nwhich = CLOCK_PROF; @@ -478,8 +505,6 @@ linux_clock_getres(struct thread *td, struct linux_clo case LINUX_CPUCLOCK_VIRT: nwhich = CLOCK_VIRTUAL; break; - case LINUX_CPUCLOCK_SCHED: - break; default: return (EINVAL); } @@ -494,6 +519,8 @@ linux_clock_getres(struct thread *td, struct linux_clo LIN_SDT_PROBE1(time, linux_clock_getres, return, error); return (error); } + +out: error = native_to_linux_timespec(<s, &ts); if (error != 0) return (error); From owner-svn-src-all@freebsd.org Mon Aug 24 14:50:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EFAC83C33BF; Mon, 24 Aug 2020 14:50:52 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZw6N5wYqz3Rcj; Mon, 24 Aug 2020 14:50:52 +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 94EEA1A3EA; Mon, 24 Aug 2020 14:50:52 +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 07OEoqdg012227; Mon, 24 Aug 2020 14:50:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OEoqXm012226; Mon, 24 Aug 2020 14:50:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241450.07OEoqXm012226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 14:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364690 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364690 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 14:50:53 -0000 Author: trasz Date: Mon Aug 24 14:50:52 2020 New Revision: 364690 URL: https://svnweb.freebsd.org/changeset/base/364690 Log: MFC r362416: Add warnings for unsupported Linux clockids. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_time.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_time.c ============================================================================== --- stable/12/sys/compat/linux/linux_time.c Mon Aug 24 14:48:54 2020 (r364689) +++ stable/12/sys/compat/linux/linux_time.c Mon Aug 24 14:50:52 2020 (r364690) @@ -67,6 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.14 2006/0 #include #include #include +#include /* DTrace init */ LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); @@ -268,6 +269,8 @@ linux_clock_gettime(struct thread *td, struct linux_cl error = linux_to_native_clockid(&nwhich, args->which); if (error != 0) { + linux_msg(curthread, + "unsupported clock_gettime clockid %d", args->which); LIN_SDT_PROBE1(time, linux_clock_gettime, conversion_error, error); LIN_SDT_PROBE1(time, linux_clock_gettime, return, error); @@ -399,6 +402,8 @@ linux_clock_settime(struct thread *td, struct linux_cl error = linux_to_native_clockid(&nwhich, args->which); if (error != 0) { + linux_msg(curthread, + "unsupported clock_settime clockid %d", args->which); LIN_SDT_PROBE1(time, linux_clock_settime, conversion_error, error); LIN_SDT_PROBE1(time, linux_clock_settime, return, error); @@ -441,6 +446,8 @@ linux_clock_getres(struct thread *td, struct linux_clo error = linux_to_native_clockid(&nwhich, args->which); if (error != 0) { + linux_msg(curthread, + "unsupported clock_getres clockid %d", args->which); LIN_SDT_PROBE1(time, linux_clock_getres, conversion_error, error); LIN_SDT_PROBE1(time, linux_clock_getres, return, error); @@ -600,6 +607,8 @@ linux_clock_nanosleep(struct thread *td, struct linux_ error = linux_to_native_clockid(&clockid, args->which); if (error != 0) { + linux_msg(curthread, + "unsupported clock_nanosleep clockid %d", args->which); LIN_SDT_PROBE1(time, linux_clock_nanosleep, unsupported_clockid, args->which); LIN_SDT_PROBE1(time, linux_clock_settime, return, error); From owner-svn-src-all@freebsd.org Mon Aug 24 14:53:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E57813C390B; Mon, 24 Aug 2020 14:53:29 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZw9P5ft2z3SXs; Mon, 24 Aug 2020 14:53:29 +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 A6C201A5A0; Mon, 24 Aug 2020 14:53:29 +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 07OErTdE017534; Mon, 24 Aug 2020 14:53:29 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OErTSs017533; Mon, 24 Aug 2020 14:53:29 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241453.07OErTSs017533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 14:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364691 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 14:53:30 -0000 Author: trasz Date: Mon Aug 24 14:53:29 2020 New Revision: 364691 URL: https://svnweb.freebsd.org/changeset/base/364691 Log: MFC r363125 by netchild: Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28). It is documented as a raw hardware-based clock not subject to NTP or incremental adjustments. With this "not as precise as CLOCK_MONOTONIC" description in mind, map it to our CLOCK_MONOTNIC_FAST (the same mapping as for the linux CLOCK_MONOTONIC_COARSE). This is needed for the webcomponent of steam (chromium) and some other steam component or game. The linux-steam-utils port contains a LD_PRELOAD based fix for this. There this is mapped to CLOCK_MONOTONIC. As an untrained ear/eye (= the majority of people) is normaly not noticing a difference of jitter in the 10-20 ms range, specially if you don't pay attention like for example in a browser session while watching a video stream, the mapping to CLOCK_MONOTONIC_FAST seems more appropriate than to CLOCK_MONOTONIC. MFC r363130 by netchild: Fix r363125 (Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28)), by realy using the MONOTONIC version and not the REALTIME version. Modified: stable/12/sys/compat/linux/linux_time.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_time.c ============================================================================== --- stable/12/sys/compat/linux/linux_time.c Mon Aug 24 14:50:52 2020 (r364690) +++ stable/12/sys/compat/linux/linux_time.c Mon Aug 24 14:53:29 2020 (r364691) @@ -215,12 +215,12 @@ linux_to_native_clockid(clockid_t *n, clockid_t l) *n = CLOCK_REALTIME_FAST; break; case LINUX_CLOCK_MONOTONIC_COARSE: + case LINUX_CLOCK_MONOTONIC_RAW: *n = CLOCK_MONOTONIC_FAST; break; case LINUX_CLOCK_BOOTTIME: *n = CLOCK_UPTIME; break; - case LINUX_CLOCK_MONOTONIC_RAW: case LINUX_CLOCK_REALTIME_ALARM: case LINUX_CLOCK_BOOTTIME_ALARM: case LINUX_CLOCK_SGI_CYCLE: From owner-svn-src-all@freebsd.org Mon Aug 24 14:58:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A69E3C3A8D; Mon, 24 Aug 2020 14:58:59 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZwHl2b1qz3Slp; Mon, 24 Aug 2020 14:58:59 +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 3D1D61A5A2; Mon, 24 Aug 2020 14:58:59 +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 07OEwxqd018190; Mon, 24 Aug 2020 14:58:59 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OEwxZp018189; Mon, 24 Aug 2020 14:58:59 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241458.07OEwxZp018189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 14:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364692 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364692 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 14:58:59 -0000 Author: trasz Date: Mon Aug 24 14:58:58 2020 New Revision: 364692 URL: https://svnweb.freebsd.org/changeset/base/364692 Log: MFC r363307: Make linux fallocate(2) return EOPNOTSUPP, not ENOSYS, on unsupported mode, as documented in the man page. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_file.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_file.c ============================================================================== --- stable/12/sys/compat/linux/linux_file.c Mon Aug 24 14:53:29 2020 (r364691) +++ stable/12/sys/compat/linux/linux_file.c Mon Aug 24 14:58:58 2020 (r364692) @@ -1778,7 +1778,7 @@ linux_fallocate(struct thread *td, struct linux_falloc * mode should be 0. */ if (args->mode != 0) - return (ENOSYS); + return (EOPNOTSUPP); #if defined(__amd64__) && defined(COMPAT_LINUX32) len = PAIR32TO64(off_t, args->len); From owner-svn-src-all@freebsd.org Mon Aug 24 15:45:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 076363C4D41; Mon, 24 Aug 2020 15:45:44 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZxKg6pkbz3WTl; Mon, 24 Aug 2020 15:45:43 +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 CCD4B1AA4C; Mon, 24 Aug 2020 15:45:43 +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 07OFjh70048955; Mon, 24 Aug 2020 15:45:43 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OFjgMx048949; Mon, 24 Aug 2020 15:45:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241545.07OFjgMx048949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 15:45:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364693 - in stable/12/sys: compat/linux modules/linux_common X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: compat/linux modules/linux_common X-SVN-Commit-Revision: 364693 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 15:45:44 -0000 Author: trasz Date: Mon Aug 24 15:45:42 2020 New Revision: 364693 URL: https://svnweb.freebsd.org/changeset/base/364693 Log: MFC r347533 by dchagin: Our bsd_to_linux_sockaddr() and linux_to_bsd_sockaddr() functions alter the userspace sockaddr to convert the format between linux and BSD versions. That's the minimum 3 of copyin/copyout operations for one syscall. Also some syscall uses linux_sa_put() and linux_getsockaddr() when load sockaddr to userspace or from userspace accordingly. To avoid this chaos, especially converting sockaddr in the userspace, rewrite these 4 functions to convert sockaddr only in kernel and leave only 2 of this functions. Also in order to reduce duplication between MD parts of the Linuxulator put struct sockaddr conversion functions that are MI out into linux_common module. PR: 232920 Modified: stable/12/sys/compat/linux/linux.c stable/12/sys/compat/linux/linux.h stable/12/sys/compat/linux/linux_common.h stable/12/sys/compat/linux/linux_socket.c stable/12/sys/compat/linux/linux_socket.h stable/12/sys/modules/linux_common/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux.c ============================================================================== --- stable/12/sys/compat/linux/linux.c Mon Aug 24 14:58:58 2020 (r364692) +++ stable/12/sys/compat/linux/linux.c Mon Aug 24 15:45:42 2020 (r364693) @@ -27,21 +27,29 @@ #include __FBSDID("$FreeBSD$"); +#include + #include #include #include #include #include +#include #include #include +#include #include #include #include #include +#include +#include + #include #include +#include struct futex_list futex_list; struct mtx futex_mtx; /* protects the futex list */ @@ -325,4 +333,194 @@ linux_ifhwaddr(struct ifnet *ifp, struct l_sockaddr *l } return (ENOENT); +} + +int +linux_to_bsd_domain(int domain) +{ + + switch (domain) { + case LINUX_AF_UNSPEC: + return (AF_UNSPEC); + case LINUX_AF_UNIX: + return (AF_LOCAL); + case LINUX_AF_INET: + return (AF_INET); + case LINUX_AF_INET6: + return (AF_INET6); + case LINUX_AF_AX25: + return (AF_CCITT); + case LINUX_AF_IPX: + return (AF_IPX); + case LINUX_AF_APPLETALK: + return (AF_APPLETALK); + } + return (-1); +} + +int +bsd_to_linux_domain(int domain) +{ + + switch (domain) { + case AF_UNSPEC: + return (LINUX_AF_UNSPEC); + case AF_LOCAL: + return (LINUX_AF_UNIX); + case AF_INET: + return (LINUX_AF_INET); + case AF_INET6: + return (LINUX_AF_INET6); + case AF_CCITT: + return (LINUX_AF_AX25); + case AF_IPX: + return (LINUX_AF_IPX); + case AF_APPLETALK: + return (LINUX_AF_APPLETALK); + } + return (-1); +} + +/* + * Based on the fact that: + * 1. Native and Linux storage of struct sockaddr + * and struct sockaddr_in6 are equal. + * 2. On Linux sa_family is the first member of all struct sockaddr. + */ +int +bsd_to_linux_sockaddr(const struct sockaddr *sa, struct l_sockaddr **lsa, + socklen_t len) +{ + struct l_sockaddr *kosa; + int error, bdom; + + *lsa = NULL; + if (len < 2 || len > UCHAR_MAX) + return (EINVAL); + + kosa = malloc(len, M_SONAME, M_WAITOK); + bcopy(sa, kosa, len); + + bdom = bsd_to_linux_domain(sa->sa_family); + if (bdom == -1) { + error = EAFNOSUPPORT; + goto out; + } + + kosa->sa_family = bdom; + *lsa = kosa; + return (0); + +out: + free(kosa, M_SONAME); + return (error); +} + +int +linux_to_bsd_sockaddr(const struct l_sockaddr *osa, struct sockaddr **sap, + socklen_t *len) +{ + struct sockaddr *sa; + struct l_sockaddr *kosa; +#ifdef INET6 + struct sockaddr_in6 *sin6; + bool oldv6size; +#endif + char *name; + int salen, bdom, error, hdrlen, namelen; + + if (*len < 2 || *len > UCHAR_MAX) + return (EINVAL); + + salen = *len; + +#ifdef INET6 + oldv6size = false; + /* + * Check for old (pre-RFC2553) sockaddr_in6. We may accept it + * if it's a v4-mapped address, so reserve the proper space + * for it. + */ + if (salen == sizeof(struct sockaddr_in6) - sizeof(uint32_t)) { + salen += sizeof(uint32_t); + oldv6size = true; + } +#endif + + kosa = malloc(salen, M_SONAME, M_WAITOK); + + if ((error = copyin(osa, kosa, *len))) + goto out; + + bdom = linux_to_bsd_domain(kosa->sa_family); + if (bdom == -1) { + error = EAFNOSUPPORT; + goto out; + } + +#ifdef INET6 + /* + * Older Linux IPv6 code uses obsolete RFC2133 struct sockaddr_in6, + * which lacks the scope id compared with RFC2553 one. If we detect + * the situation, reject the address and write a message to system log. + * + * Still accept addresses for which the scope id is not used. + */ + if (oldv6size) { + if (bdom == AF_INET6) { + sin6 = (struct sockaddr_in6 *)kosa; + if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr) || + (!IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) && + !IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr) && + !IN6_IS_ADDR_V4COMPAT(&sin6->sin6_addr) && + !IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr) && + !IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr))) { + sin6->sin6_scope_id = 0; + } else { + linux_msg(curthread, + "obsolete pre-RFC2553 sockaddr_in6 rejected\n"); + error = EINVAL; + goto out; + } + } else + salen -= sizeof(uint32_t); + } +#endif + if (bdom == AF_INET) { + if (salen < sizeof(struct sockaddr_in)) { + error = EINVAL; + goto out; + } + salen = sizeof(struct sockaddr_in); + } + + if (bdom == AF_LOCAL && salen > sizeof(struct sockaddr_un)) { + hdrlen = offsetof(struct sockaddr_un, sun_path); + name = ((struct sockaddr_un *)kosa)->sun_path; + if (*name == '\0') { + /* + * Linux abstract namespace starts with a NULL byte. + * XXX We do not support abstract namespace yet. + */ + namelen = strnlen(name + 1, salen - hdrlen - 1) + 1; + } else + namelen = strnlen(name, salen - hdrlen); + salen = hdrlen + namelen; + if (salen > sizeof(struct sockaddr_un)) { + error = ENAMETOOLONG; + goto out; + } + } + + sa = (struct sockaddr *)kosa; + sa->sa_family = bdom; + sa->sa_len = salen; + + *sap = sa; + *len = salen; + return (0); + +out: + free(kosa, M_SONAME); + return (error); } Modified: stable/12/sys/compat/linux/linux.h ============================================================================== --- stable/12/sys/compat/linux/linux.h Mon Aug 24 14:58:58 2020 (r364692) +++ stable/12/sys/compat/linux/linux.h Mon Aug 24 15:45:42 2020 (r364693) @@ -47,6 +47,17 @@ struct l_sockaddr { #define LINUX_ARPHRD_LOOPBACK 772 /* + * Supported address families + */ +#define LINUX_AF_UNSPEC 0 +#define LINUX_AF_UNIX 1 +#define LINUX_AF_INET 2 +#define LINUX_AF_AX25 3 +#define LINUX_AF_IPX 4 +#define LINUX_AF_APPLETALK 5 +#define LINUX_AF_INET6 10 + +/* * net device flags */ #define LINUX_IFF_UP 0x0001 Modified: stable/12/sys/compat/linux/linux_common.h ============================================================================== --- stable/12/sys/compat/linux/linux_common.h Mon Aug 24 14:58:58 2020 (r364692) +++ stable/12/sys/compat/linux/linux_common.h Mon Aug 24 15:45:42 2020 (r364693) @@ -35,4 +35,11 @@ struct ifnet *ifname_linux_to_bsd(struct thread *td, void linux_ifflags(struct ifnet *ifp, short *flags); int linux_ifhwaddr(struct ifnet *ifp, struct l_sockaddr *lsa); +int linux_to_bsd_domain(int domain); +int bsd_to_linux_domain(int domain); +int bsd_to_linux_sockaddr(const struct sockaddr *sa, + struct l_sockaddr **lsa, socklen_t len); +int linux_to_bsd_sockaddr(const struct l_sockaddr *lsa, + struct sockaddr **sap, socklen_t *len); + #endif /* _LINUX_COMMON_H_ */ Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 14:58:58 2020 (r364692) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 15:45:42 2020 (r364693) @@ -70,177 +70,21 @@ __FBSDID("$FreeBSD$"); #include #include #endif +#include #include #include #include #include #include -static int linux_to_bsd_domain(int); static int linux_sendmsg_common(struct thread *, l_int, struct l_msghdr *, l_uint); static int linux_recvmsg_common(struct thread *, l_int, struct l_msghdr *, l_uint, struct msghdr *); static int linux_set_socket_flags(int, int *); -/* - * Reads a Linux sockaddr and does any necessary translation. - * Linux sockaddrs don't have a length field, only a family. - * Copy the osockaddr structure pointed to by osa to kernel, adjust - * family and convert to sockaddr. - */ -static int -linux_getsockaddr(struct sockaddr **sap, const struct osockaddr *osa, int salen) -{ - struct sockaddr *sa; - struct osockaddr *kosa; -#ifdef INET6 - struct sockaddr_in6 *sin6; - int oldv6size; -#endif - char *name; - int bdom, error, hdrlen, namelen; - if (salen < 2 || salen > UCHAR_MAX || !osa) - return (EINVAL); - -#ifdef INET6 - oldv6size = 0; - /* - * Check for old (pre-RFC2553) sockaddr_in6. We may accept it - * if it's a v4-mapped address, so reserve the proper space - * for it. - */ - if (salen == sizeof(struct sockaddr_in6) - sizeof(uint32_t)) { - salen += sizeof(uint32_t); - oldv6size = 1; - } -#endif - - kosa = malloc(salen, M_SONAME, M_WAITOK); - - if ((error = copyin(osa, kosa, salen))) - goto out; - - bdom = linux_to_bsd_domain(kosa->sa_family); - if (bdom == -1) { - error = EAFNOSUPPORT; - goto out; - } - -#ifdef INET6 - /* - * Older Linux IPv6 code uses obsolete RFC2133 struct sockaddr_in6, - * which lacks the scope id compared with RFC2553 one. If we detect - * the situation, reject the address and write a message to system log. - * - * Still accept addresses for which the scope id is not used. - */ - if (oldv6size) { - if (bdom == AF_INET6) { - sin6 = (struct sockaddr_in6 *)kosa; - if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr) || - (!IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) && - !IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr) && - !IN6_IS_ADDR_V4COMPAT(&sin6->sin6_addr) && - !IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr) && - !IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr))) { - sin6->sin6_scope_id = 0; - } else { - log(LOG_DEBUG, - "obsolete pre-RFC2553 sockaddr_in6 rejected\n"); - error = EINVAL; - goto out; - } - } else - salen -= sizeof(uint32_t); - } -#endif - if (bdom == AF_INET) { - if (salen < sizeof(struct sockaddr_in)) { - error = EINVAL; - goto out; - } - salen = sizeof(struct sockaddr_in); - } - - if (bdom == AF_LOCAL && salen > sizeof(struct sockaddr_un)) { - hdrlen = offsetof(struct sockaddr_un, sun_path); - name = ((struct sockaddr_un *)kosa)->sun_path; - if (*name == '\0') { - /* - * Linux abstract namespace starts with a NULL byte. - * XXX We do not support abstract namespace yet. - */ - namelen = strnlen(name + 1, salen - hdrlen - 1) + 1; - } else - namelen = strnlen(name, salen - hdrlen); - salen = hdrlen + namelen; - if (salen > sizeof(struct sockaddr_un)) { - error = ENAMETOOLONG; - goto out; - } - } - - sa = (struct sockaddr *)kosa; - sa->sa_family = bdom; - sa->sa_len = salen; - - *sap = sa; - return (0); - -out: - free(kosa, M_SONAME); - return (error); -} - static int -linux_to_bsd_domain(int domain) -{ - - switch (domain) { - case LINUX_AF_UNSPEC: - return (AF_UNSPEC); - case LINUX_AF_UNIX: - return (AF_LOCAL); - case LINUX_AF_INET: - return (AF_INET); - case LINUX_AF_INET6: - return (AF_INET6); - case LINUX_AF_AX25: - return (AF_CCITT); - case LINUX_AF_IPX: - return (AF_IPX); - case LINUX_AF_APPLETALK: - return (AF_APPLETALK); - } - return (-1); -} - -static int -bsd_to_linux_domain(int domain) -{ - - switch (domain) { - case AF_UNSPEC: - return (LINUX_AF_UNSPEC); - case AF_LOCAL: - return (LINUX_AF_UNIX); - case AF_INET: - return (LINUX_AF_INET); - case AF_INET6: - return (LINUX_AF_INET6); - case AF_CCITT: - return (LINUX_AF_AX25); - case AF_IPX: - return (LINUX_AF_IPX); - case AF_APPLETALK: - return (LINUX_AF_APPLETALK); - } - return (-1); -} - -static int linux_to_bsd_sockopt_level(int level) { @@ -458,72 +302,7 @@ linux_to_bsd_msg_flags(int flags) return (ret_flags); } -/* -* If bsd_to_linux_sockaddr() or linux_to_bsd_sockaddr() faults, then the -* native syscall will fault. Thus, we don't really need to check the -* return values for these functions. -*/ - static int -bsd_to_linux_sockaddr(struct sockaddr *arg) -{ - struct sockaddr sa; - size_t sa_len = sizeof(struct sockaddr); - int error, bdom; - - if ((error = copyin(arg, &sa, sa_len))) - return (error); - - bdom = bsd_to_linux_domain(sa.sa_family); - if (bdom == -1) - return (EAFNOSUPPORT); - - *(u_short *)&sa = bdom; - return (copyout(&sa, arg, sa_len)); -} - -static int -linux_to_bsd_sockaddr(struct sockaddr *arg, int len) -{ - struct sockaddr sa; - size_t sa_len = sizeof(struct sockaddr); - int error, bdom; - - if ((error = copyin(arg, &sa, sa_len))) - return (error); - - bdom = linux_to_bsd_domain(*(sa_family_t *)&sa); - if (bdom == -1) - return (EAFNOSUPPORT); - - sa.sa_family = bdom; - sa.sa_len = len; - return (copyout(&sa, arg, sa_len)); -} - -static int -linux_sa_put(struct osockaddr *osa) -{ - struct osockaddr sa; - int error, bdom; - - /* - * Only read/write the osockaddr family part, the rest is - * not changed. - */ - error = copyin(osa, &sa, sizeof(sa.sa_family)); - if (error != 0) - return (error); - - bdom = bsd_to_linux_domain(sa.sa_family); - if (bdom == -1) - return (EINVAL); - - sa.sa_family = bdom; - return (copyout(&sa, osa, sizeof(sa.sa_family))); -} - -static int linux_to_bsd_cmsg_type(int cmsg_type) { @@ -616,10 +395,11 @@ linux_sendit(struct thread *td, int s, struct msghdr * struct mbuf *control, enum uio_seg segflg) { struct sockaddr *to; - int error; + int error, len; if (mp->msg_name != NULL) { - error = linux_getsockaddr(&to, mp->msg_name, mp->msg_namelen); + len = mp->msg_namelen; + error = linux_to_bsd_sockaddr(mp->msg_name, &to, &len); if (error != 0) return (error); mp->msg_name = to; @@ -758,13 +538,15 @@ linux_bind(struct thread *td, struct linux_bind_args * struct sockaddr *sa; int error; - error = linux_getsockaddr(&sa, PTRIN(args->name), - args->namelen); + error = linux_to_bsd_sockaddr(PTRIN(args->name), &sa, + &args->namelen); if (error != 0) return (error); error = kern_bindat(td, AT_FDCWD, args->s, sa); free(sa, M_SONAME); + + /* XXX */ if (error == EADDRNOTAVAIL && args->namelen != sizeof(struct sockaddr_in)) return (EINVAL); return (error); @@ -779,8 +561,8 @@ linux_connect(struct thread *td, struct linux_connect_ u_int fflag; int error; - error = linux_getsockaddr(&sa, (struct osockaddr *)PTRIN(args->name), - args->namelen); + error = linux_to_bsd_sockaddr(PTRIN(args->name), &sa, + &args->namelen); if (error != 0) return (error); @@ -824,43 +606,67 @@ static int linux_accept_common(struct thread *td, int s, l_uintptr_t addr, l_uintptr_t namelen, int flags) { - struct accept4_args /* { - int s; - struct sockaddr * __restrict name; - socklen_t * __restrict anamelen; - int flags; - } */ bsd_args; - struct socket *so; + struct l_sockaddr *lsa; + struct sockaddr *sa; struct file *fp; + int bflags, len; + struct socket *so; int error, error1; - bsd_args.s = s; - bsd_args.name = (struct sockaddr * __restrict)PTRIN(addr); - bsd_args.anamelen = PTRIN(namelen); - bsd_args.flags = 0; - error = linux_set_socket_flags(flags, &bsd_args.flags); + bflags = 0; + error = linux_set_socket_flags(flags, &bflags); if (error != 0) return (error); - error = sys_accept4(td, &bsd_args); - bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.name); + + sa = NULL; + if (PTRIN(addr) == NULL) { + len = 0; + error = kern_accept4(td, s, NULL, NULL, bflags, NULL); + } else { + error = copyin(PTRIN(namelen), &len, sizeof(len)); + if (error != 0) + return (error); + if (len < 0) + return (EINVAL); + error = kern_accept4(td, s, &sa, &len, bflags, &fp); + if (error == 0) + fdrop(fp, td); + } + if (error != 0) { + /* + * XXX. This is wrong, different sockaddr structures + * have different sizes. + */ if (error == EFAULT && namelen != sizeof(struct sockaddr_in)) - return (EINVAL); + { + error = EINVAL; + goto out; + } if (error == EINVAL) { error1 = getsock_cap(td, s, &cap_accept_rights, &fp, NULL, NULL); - if (error1 != 0) - return (error1); - so = fp->f_data; - if (so->so_type == SOCK_DGRAM) { - fdrop(fp, td); - return (EOPNOTSUPP); + if (error1 != 0) { + error = error1; + goto out; } + so = fp->f_data; + if (so->so_type == SOCK_DGRAM) + error = EOPNOTSUPP; fdrop(fp, td); } - return (error); + goto out; } - if (addr) - error = linux_sa_put(PTRIN(addr)); + + if (len != 0 && error == 0) { + error = bsd_to_linux_sockaddr(sa, &lsa, len); + if (error == 0) + error = copyout(lsa, PTRIN(addr), len); + free(lsa, M_SONAME); + } + + free(sa, M_SONAME); + +out: if (error != 0) { (void)kern_close(td, td->td_retval[0]); td->td_retval[0] = 0; @@ -887,41 +693,59 @@ linux_accept4(struct thread *td, struct linux_accept4_ int linux_getsockname(struct thread *td, struct linux_getsockname_args *args) { - struct getsockname_args /* { - int fdes; - struct sockaddr * __restrict asa; - socklen_t * __restrict alen; - } */ bsd_args; - int error; + struct l_sockaddr *lsa; + struct sockaddr *sa; + int len, error; - bsd_args.fdes = args->s; - bsd_args.asa = (struct sockaddr * __restrict)PTRIN(args->addr); - bsd_args.alen = PTRIN(args->namelen); - error = sys_getsockname(td, &bsd_args); - bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.asa); + error = copyin(PTRIN(args->namelen), &len, sizeof(len)); if (error != 0) return (error); - return (linux_sa_put(PTRIN(args->addr))); + + error = kern_getsockname(td, args->s, &sa, &len); + if (error != 0) + return (error); + + if (len != 0) { + error = bsd_to_linux_sockaddr(sa, &lsa, len); + if (error == 0) + error = copyout(lsa, PTRIN(args->addr), + len); + free(lsa, M_SONAME); + } + + free(sa, M_SONAME); + if (error == 0) + error = copyout(&len, PTRIN(args->namelen), sizeof(len)); + return (error); } int linux_getpeername(struct thread *td, struct linux_getpeername_args *args) { - struct getpeername_args /* { - int fdes; - caddr_t asa; - int *alen; - } */ bsd_args; - int error; + struct l_sockaddr *lsa; + struct sockaddr *sa; + int len, error; - bsd_args.fdes = args->s; - bsd_args.asa = (struct sockaddr *)PTRIN(args->addr); - bsd_args.alen = (socklen_t *)PTRIN(args->namelen); - error = sys_getpeername(td, &bsd_args); - bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.asa); + error = copyin(PTRIN(args->namelen), &len, sizeof(len)); if (error != 0) return (error); - return (linux_sa_put(PTRIN(args->addr))); + + error = kern_getpeername(td, args->s, &sa, &len); + if (error != 0) + return (error); + + if (len != 0) { + error = bsd_to_linux_sockaddr(sa, &lsa, len); + if (error == 0) + error = copyout(lsa, PTRIN(args->addr), + len); + free(lsa, M_SONAME); + } + + free(sa, M_SONAME); + if (error == 0) + error = copyout(&len, PTRIN(args->namelen), sizeof(len)); + return (error); } int @@ -1043,6 +867,8 @@ linux_sendto(struct thread *td, struct linux_sendto_ar int linux_recvfrom(struct thread *td, struct linux_recvfrom_args *args) { + struct l_sockaddr *lsa; + struct sockaddr *sa; struct msghdr msg; struct iovec aiov; int error, fromlen; @@ -1054,11 +880,14 @@ linux_recvfrom(struct thread *td, struct linux_recvfro return (error); if (fromlen < 0) return (EINVAL); - msg.msg_namelen = fromlen; - } else - msg.msg_namelen = 0; + sa = malloc(fromlen, M_SONAME, M_WAITOK); + } else { + fromlen = 0; + sa = NULL; + } - msg.msg_name = (struct sockaddr * __restrict)PTRIN(args->from); + msg.msg_name = sa; + msg.msg_namelen = fromlen; msg.msg_iov = &aiov; msg.msg_iovlen = 1; aiov.iov_base = PTRIN(args->buf); @@ -1066,24 +895,23 @@ linux_recvfrom(struct thread *td, struct linux_recvfro msg.msg_control = 0; msg.msg_flags = linux_to_bsd_msg_flags(args->flags); - error = kern_recvit(td, args->s, &msg, UIO_USERSPACE, NULL); + error = kern_recvit(td, args->s, &msg, UIO_SYSSPACE, NULL); if (error != 0) return (error); if (PTRIN(args->from) != NULL) { - error = bsd_to_linux_sockaddr((struct sockaddr *) - PTRIN(args->from)); - if (error != 0) - return (error); - - error = linux_sa_put((struct osockaddr *) - PTRIN(args->from)); + error = bsd_to_linux_sockaddr(sa, &lsa, msg.msg_namelen); + if (error == 0) + error = copyout(lsa, PTRIN(args->from), + msg.msg_namelen); + free(lsa, M_SONAME); } - if (PTRIN(args->fromlen) != NULL) + if (error == 0 && PTRIN(args->fromlen) != NULL) error = copyout(&msg.msg_namelen, PTRIN(args->fromlen), sizeof(msg.msg_namelen)); + free(sa, M_SONAME); return (error); } @@ -1289,6 +1117,8 @@ linux_recvmsg_common(struct thread *td, l_int s, struc struct mbuf *control = NULL; struct mbuf **controlp; struct timeval *ftmvl; + struct l_sockaddr *lsa; + struct sockaddr *sa; l_timeval ltmvl; caddr_t outbuf; void *data; @@ -1312,36 +1142,34 @@ linux_recvmsg_common(struct thread *td, l_int s, struc return (error); if (msg->msg_name) { - error = linux_to_bsd_sockaddr((struct sockaddr *)msg->msg_name, - msg->msg_namelen); - if (error != 0) - goto bad; + sa = malloc(msg->msg_namelen, M_SONAME, M_WAITOK); + msg->msg_name = sa; } uiov = msg->msg_iov; msg->msg_iov = iov; controlp = (msg->msg_control != NULL) ? &control : NULL; - error = kern_recvit(td, s, msg, UIO_USERSPACE, controlp); + error = kern_recvit(td, s, msg, UIO_SYSSPACE, controlp); msg->msg_iov = uiov; if (error != 0) goto bad; - error = bsd_to_linux_msghdr(msg, &linux_msg); - if (error != 0) - goto bad; - - if (linux_msg.msg_name) { - error = bsd_to_linux_sockaddr((struct sockaddr *) - PTRIN(linux_msg.msg_name)); + if (sa) { + msg->msg_name = PTRIN(linux_msg.msg_name); + error = bsd_to_linux_sockaddr(sa, &lsa, msg->msg_namelen); + if (error == 0) + error = copyout(lsa, PTRIN(msg->msg_name), + msg->msg_namelen); + free(lsa, M_SONAME); + free(sa, M_SONAME); if (error != 0) goto bad; } - if (linux_msg.msg_name && linux_msg.msg_namelen > 2) { - error = linux_sa_put(PTRIN(linux_msg.msg_name)); - if (error != 0) - goto bad; - } + error = bsd_to_linux_msghdr(msg, &linux_msg); + if (error != 0) + goto bad; + maxlen = linux_msg.msg_controllen; linux_msg.msg_controllen = 0; if (control) { @@ -1544,7 +1372,9 @@ linux_setsockopt(struct thread *td, struct linux_setso int valsize; } */ bsd_args; l_timeval linux_tv; + struct sockaddr *sa; struct timeval tv; + socklen_t len; int error, name; bsd_args.s = args->s; @@ -1593,17 +1423,23 @@ linux_setsockopt(struct thread *td, struct linux_setso if (name == -1) return (ENOPROTOOPT); - bsd_args.name = name; - bsd_args.val = PTRIN(args->optval); - bsd_args.valsize = args->optlen; if (name == IPV6_NEXTHOP) { - linux_to_bsd_sockaddr((struct sockaddr *)bsd_args.val, - bsd_args.valsize); + + len = args->optlen; + error = linux_to_bsd_sockaddr(PTRIN(args->optval), &sa, &len); + if (error != 0) + return (error); + + error = kern_setsockopt(td, args->s, bsd_args.level, + name, sa, UIO_SYSSPACE, len); + free(sa, M_SONAME); + } else { + bsd_args.name = name; + bsd_args.val = PTRIN(args->optval); + bsd_args.valsize = args->optlen; error = sys_setsockopt(td, &bsd_args); - bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.val); - } else - error = sys_setsockopt(td, &bsd_args); + } return (error); } @@ -1621,6 +1457,8 @@ linux_getsockopt(struct thread *td, struct linux_getso l_timeval linux_tv; struct timeval tv; socklen_t tv_len, xulen, len; + struct l_sockaddr *lsa; + struct sockaddr *sa; struct xucred xu; struct l_ucred lxu; int error, name, newval; @@ -1695,14 +1533,32 @@ linux_getsockopt(struct thread *td, struct linux_getso return (EINVAL); bsd_args.name = name; - bsd_args.val = PTRIN(args->optval); bsd_args.avalsize = PTRIN(args->optlen); if (name == IPV6_NEXTHOP) { + error = copyin(PTRIN(args->optlen), &len, sizeof(len)); + if (error != 0) + return (error); + sa = malloc(len, M_SONAME, M_WAITOK); + + error = kern_getsockopt(td, args->s, bsd_args.level, + name, sa, UIO_SYSSPACE, &len); + if (error != 0) + goto out; + + error = bsd_to_linux_sockaddr(sa, &lsa, len); + if (error == 0) + error = copyout(lsa, PTRIN(args->optval), len); + free(lsa, M_SONAME); + if (error == 0) + error = copyout(&len, PTRIN(args->optlen), + sizeof(len)); +out: + free(sa, M_SONAME); + } else { + bsd_args.val = PTRIN(args->optval); error = sys_getsockopt(td, &bsd_args); - bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.val); - } else - error = sys_getsockopt(td, &bsd_args); + } return (error); } Modified: stable/12/sys/compat/linux/linux_socket.h ============================================================================== --- stable/12/sys/compat/linux/linux_socket.h Mon Aug 24 14:58:58 2020 (r364692) +++ stable/12/sys/compat/linux/linux_socket.h Mon Aug 24 15:45:42 2020 (r364693) @@ -109,16 +109,6 @@ struct l_cmsghdr { #define CMSG_HDRSZ CMSG_LEN(0) #define L_CMSG_HDRSZ LINUX_CMSG_LEN(0) -/* Supported address families */ - -#define LINUX_AF_UNSPEC 0 -#define LINUX_AF_UNIX 1 -#define LINUX_AF_INET 2 -#define LINUX_AF_AX25 3 -#define LINUX_AF_IPX 4 -#define LINUX_AF_APPLETALK 5 -#define LINUX_AF_INET6 10 - /* Supported socket types */ #define LINUX_SOCK_STREAM 1 Modified: stable/12/sys/modules/linux_common/Makefile ============================================================================== --- stable/12/sys/modules/linux_common/Makefile Mon Aug 24 14:58:58 2020 (r364692) +++ stable/12/sys/modules/linux_common/Makefile Mon Aug 24 15:45:42 2020 (r364693) @@ -5,7 +5,7 @@ KMOD= linux_common SRCS= linux_common.c linux_mib.c linux_mmap.c linux_util.c linux_emul.c \ linux_errno.c \ - linux.c device_if.h vnode_if.h bus_if.h + linux.c device_if.h vnode_if.h bus_if.h opt_inet6.h EXPORT_SYMS= EXPORT_SYMS+= linux_emul_path From owner-svn-src-all@freebsd.org Mon Aug 24 15:49:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC99C3C4FC9; Mon, 24 Aug 2020 15:49:37 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZxQ95VmLz3X2l; Mon, 24 Aug 2020 15:49:37 +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 A19681AEA3; Mon, 24 Aug 2020 15:49:37 +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 07OFnbKM049206; Mon, 24 Aug 2020 15:49:37 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OFnbQ8049205; Mon, 24 Aug 2020 15:49:37 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241549.07OFnbQ8049205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 15:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364694 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 15:49:38 -0000 Author: trasz Date: Mon Aug 24 15:49:37 2020 New Revision: 364694 URL: https://svnweb.freebsd.org/changeset/base/364694 Log: MFC r347537 by dchagin: Linuxulator getpeername() returns EINVAL in case then namelen less then 0. Modified: stable/12/sys/compat/linux/linux_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 15:45:42 2020 (r364693) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 15:49:37 2020 (r364694) @@ -729,6 +729,8 @@ linux_getpeername(struct thread *td, struct linux_getp error = copyin(PTRIN(args->namelen), &len, sizeof(len)); if (error != 0) return (error); + if (len < 0) + return (EINVAL); error = kern_getpeername(td, args->s, &sa, &len); if (error != 0) From owner-svn-src-all@freebsd.org Mon Aug 24 15:50:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 86EDE3C531E; Mon, 24 Aug 2020 15:50:58 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZxRk36vyz3Wvk; Mon, 24 Aug 2020 15:50:58 +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 4EA481AD9E; Mon, 24 Aug 2020 15:50:58 +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 07OFowLi052513; Mon, 24 Aug 2020 15:50:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OFowDR052512; Mon, 24 Aug 2020 15:50:58 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241550.07OFowDR052512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 15:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364695 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364695 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 15:50:58 -0000 Author: trasz Date: Mon Aug 24 15:50:57 2020 New Revision: 364695 URL: https://svnweb.freebsd.org/changeset/base/364695 Log: MFC r347969 by dchagin: Linux send() call returns EAGAIN instead of ENOTCONN in case when the socket is non-blocking and connect() is not finished yet. Initial patch developed by Steven Hartland in 2008 and adopted by me. PR: 129169 Modified: stable/12/sys/compat/linux/linux_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 15:49:37 2020 (r364694) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 15:50:57 2020 (r364695) @@ -805,6 +805,8 @@ linux_send(struct thread *td, struct linux_send_args * caddr_t to; int tolen; } */ bsd_args; + struct file *fp; + int error, fflag; bsd_args.s = args->s; bsd_args.buf = (caddr_t)PTRIN(args->msg); @@ -812,7 +814,21 @@ linux_send(struct thread *td, struct linux_send_args * bsd_args.flags = args->flags; bsd_args.to = NULL; bsd_args.tolen = 0; - return (sys_sendto(td, &bsd_args)); + error = sys_sendto(td, &bsd_args); + if (error == ENOTCONN) { + /* + * Linux doesn't return ENOTCONN for non-blocking sockets. + * Instead it returns the EAGAIN. + */ + error = getsock_cap(td, args->s, &cap_send_rights, &fp, + &fflag, NULL); + if (error == 0) { + if (fflag & FNONBLOCK) + error = EAGAIN; + fdrop(fp, td); + } + } + return (error); } struct linux_recv_args { From owner-svn-src-all@freebsd.org Mon Aug 24 15:52:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 985153C553C; Mon, 24 Aug 2020 15:52:46 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZxTp3N1tz3XdS; Mon, 24 Aug 2020 15:52:46 +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 5630F1B10C; Mon, 24 Aug 2020 15:52:46 +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 07OFqklo054933; Mon, 24 Aug 2020 15:52:46 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OFqka7054932; Mon, 24 Aug 2020 15:52:46 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241552.07OFqka7054932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 15:52:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364696 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364696 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 15:52:46 -0000 Author: trasz Date: Mon Aug 24 15:52:45 2020 New Revision: 364696 URL: https://svnweb.freebsd.org/changeset/base/364696 Log: MFC r348056 by dchagin: Do not leak sa in linux_recvfrom() call if kern_recvit() fails. Modified: stable/12/sys/compat/linux/linux_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 15:50:57 2020 (r364695) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 15:52:45 2020 (r364696) @@ -915,7 +915,7 @@ linux_recvfrom(struct thread *td, struct linux_recvfro error = kern_recvit(td, args->s, &msg, UIO_SYSSPACE, NULL); if (error != 0) - return (error); + goto out; if (PTRIN(args->from) != NULL) { error = bsd_to_linux_sockaddr(sa, &lsa, msg.msg_namelen); @@ -928,7 +928,7 @@ linux_recvfrom(struct thread *td, struct linux_recvfro if (error == 0 && PTRIN(args->fromlen) != NULL) error = copyout(&msg.msg_namelen, PTRIN(args->fromlen), sizeof(msg.msg_namelen)); - +out: free(sa, M_SONAME); return (error); } From owner-svn-src-all@freebsd.org Mon Aug 24 15:53:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4C7E3C5736; Mon, 24 Aug 2020 15:53:53 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZxW53wXvz3XlQ; Mon, 24 Aug 2020 15:53:53 +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 6A5C01B1F7; Mon, 24 Aug 2020 15:53:53 +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 07OFrrOl055046; Mon, 24 Aug 2020 15:53:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OFrrN8055045; Mon, 24 Aug 2020 15:53:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241553.07OFrrN8055045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 15:53:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364697 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364697 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 15:53:53 -0000 Author: trasz Date: Mon Aug 24 15:53:52 2020 New Revision: 364697 URL: https://svnweb.freebsd.org/changeset/base/364697 Log: MFC r348057 by dchagin: Do not use uninitialised sa. Modified: stable/12/sys/compat/linux/linux_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 15:52:45 2020 (r364696) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 15:53:52 2020 (r364697) @@ -1172,7 +1172,7 @@ linux_recvmsg_common(struct thread *td, l_int s, struc if (error != 0) goto bad; - if (sa) { + if (msg->msg_name) { msg->msg_name = PTRIN(linux_msg.msg_name); error = bsd_to_linux_sockaddr(sa, &lsa, msg->msg_namelen); if (error == 0) From owner-svn-src-all@freebsd.org Mon Aug 24 15:54:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F312C3C5982; Mon, 24 Aug 2020 15:54:58 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZxXL5yNcz3Xyk; Mon, 24 Aug 2020 15:54:58 +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 B114D1B10D; Mon, 24 Aug 2020 15:54:58 +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 07OFsw7r055159; Mon, 24 Aug 2020 15:54:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OFswwa055158; Mon, 24 Aug 2020 15:54:58 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241554.07OFswwa055158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 15:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364698 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364698 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 15:54:59 -0000 Author: trasz Date: Mon Aug 24 15:54:58 2020 New Revision: 364698 URL: https://svnweb.freebsd.org/changeset/base/364698 Log: MFC r348058 by dchagin: Do not leak sa in linux_recvmsg() call if kern_recvit() fails. Modified: stable/12/sys/compat/linux/linux_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 15:53:52 2020 (r364697) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 15:54:58 2020 (r364698) @@ -1162,7 +1162,8 @@ linux_recvmsg_common(struct thread *td, l_int s, struc if (msg->msg_name) { sa = malloc(msg->msg_namelen, M_SONAME, M_WAITOK); msg->msg_name = sa; - } + } else + sa = NULL; uiov = msg->msg_iov; msg->msg_iov = iov; @@ -1179,7 +1180,6 @@ linux_recvmsg_common(struct thread *td, l_int s, struc error = copyout(lsa, PTRIN(msg->msg_name), msg->msg_namelen); free(lsa, M_SONAME); - free(sa, M_SONAME); if (error != 0) goto bad; } @@ -1299,6 +1299,7 @@ bad: } free(iov, M_IOV); free(linux_cmsg, M_LINUX); + free(sa, M_SONAME); return (error); } From owner-svn-src-all@freebsd.org Mon Aug 24 15:56:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BBE763C59A4; Mon, 24 Aug 2020 15:56:31 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZxZ74ZQHz3YGK; Mon, 24 Aug 2020 15:56:31 +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 812651AA71; Mon, 24 Aug 2020 15:56:31 +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 07OFuVl3055462; Mon, 24 Aug 2020 15:56:31 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OFuVaL055461; Mon, 24 Aug 2020 15:56:31 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241556.07OFuVaL055461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 15:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364699 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364699 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 15:56:31 -0000 Author: trasz Date: Mon Aug 24 15:56:31 2020 New Revision: 364699 URL: https://svnweb.freebsd.org/changeset/base/364699 Log: MFC r348418 by dchagin: Linux does not support MSG_OOB for unix(4) or non-stream oriented socket, return EOPNOTSUPP as a Linux does. Modified: stable/12/sys/compat/linux/linux_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 15:54:58 2020 (r364698) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 15:56:31 2020 (r364699) @@ -946,11 +946,13 @@ linux_sendmsg_common(struct thread *td, l_int s, struc struct iovec *iov; socklen_t datalen; struct sockaddr *sa; + struct socket *so; sa_family_t sa_family; + struct file *fp; void *data; l_size_t len; l_size_t clen; - int error; + int error, fflag; error = copyin(msghdr, &linux_msg, sizeof(linux_msg)); if (error != 0) @@ -981,12 +983,30 @@ linux_sendmsg_common(struct thread *td, l_int s, struc control = NULL; - if (linux_msg.msg_controllen >= sizeof(struct l_cmsghdr)) { - error = kern_getsockname(td, s, &sa, &datalen); + error = kern_getsockname(td, s, &sa, &datalen); + if (error != 0) + goto bad; + sa_family = sa->sa_family; + free(sa, M_SONAME); + + if (flags & LINUX_MSG_OOB) { + error = EOPNOTSUPP; + if (sa_family == AF_UNIX) + goto bad; + + error = getsock_cap(td, s, &cap_send_rights, &fp, + &fflag, NULL); if (error != 0) goto bad; - sa_family = sa->sa_family; - free(sa, M_SONAME); + so = fp->f_data; + if (so->so_type != SOCK_STREAM) + error = EOPNOTSUPP; + fdrop(fp, td); + if (error != 0) + goto bad; + } + + if (linux_msg.msg_controllen >= sizeof(struct l_cmsghdr)) { error = ENOBUFS; control = m_get(M_WAITOK, MT_CONTROL); From owner-svn-src-all@freebsd.org Mon Aug 24 16:00:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 06FE03C597F; Mon, 24 Aug 2020 16:00:59 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZxgG6S3yz3YV3; Mon, 24 Aug 2020 16:00:58 +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 C1FED1B1FD; Mon, 24 Aug 2020 16:00:58 +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 07OG0wDx057572; Mon, 24 Aug 2020 16:00:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OG0wXh057571; Mon, 24 Aug 2020 16:00:58 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241600.07OG0wXh057571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 16:00:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364700 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364700 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 16:00:59 -0000 Author: trasz Date: Mon Aug 24 16:00:58 2020 New Revision: 364700 URL: https://svnweb.freebsd.org/changeset/base/364700 Log: MFC r362103: Fix naming clash. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 15:56:31 2020 (r364699) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:00:58 2020 (r364700) @@ -942,7 +942,7 @@ linux_sendmsg_common(struct thread *td, l_int s, struc struct msghdr msg; struct l_cmsghdr linux_cmsg; struct l_cmsghdr *ptr_cmsg; - struct l_msghdr linux_msg; + struct l_msghdr linux_msghdr; struct iovec *iov; socklen_t datalen; struct sockaddr *sa; @@ -954,7 +954,7 @@ linux_sendmsg_common(struct thread *td, l_int s, struc l_size_t clen; int error, fflag; - error = copyin(msghdr, &linux_msg, sizeof(linux_msg)); + error = copyin(msghdr, &linux_msghdr, sizeof(linux_msghdr)); if (error != 0) return (error); @@ -965,10 +965,11 @@ linux_sendmsg_common(struct thread *td, l_int s, struc * order to handle this case. This should be checked, but allows the * Linux ping to work. */ - if (PTRIN(linux_msg.msg_control) != NULL && linux_msg.msg_controllen == 0) - linux_msg.msg_control = PTROUT(NULL); + if (PTRIN(linux_msghdr.msg_control) != NULL && + linux_msghdr.msg_controllen == 0) + linux_msghdr.msg_control = PTROUT(NULL); - error = linux_to_bsd_msghdr(&msg, &linux_msg); + error = linux_to_bsd_msghdr(&msg, &linux_msghdr); if (error != 0) return (error); @@ -1006,7 +1007,7 @@ linux_sendmsg_common(struct thread *td, l_int s, struc goto bad; } - if (linux_msg.msg_controllen >= sizeof(struct l_cmsghdr)) { + if (linux_msghdr.msg_controllen >= sizeof(struct l_cmsghdr)) { error = ENOBUFS; control = m_get(M_WAITOK, MT_CONTROL); @@ -1014,8 +1015,8 @@ linux_sendmsg_common(struct thread *td, l_int s, struc data = mtod(control, void *); datalen = 0; - ptr_cmsg = PTRIN(linux_msg.msg_control); - clen = linux_msg.msg_controllen; + ptr_cmsg = PTRIN(linux_msghdr.msg_control); + clen = linux_msghdr.msg_controllen; do { error = copyin(ptr_cmsg, &linux_cmsg, sizeof(struct l_cmsghdr)); @@ -1150,7 +1151,7 @@ linux_recvmsg_common(struct thread *td, l_int s, struc struct l_cmsghdr *linux_cmsg = NULL; struct l_ucred linux_ucred; socklen_t datalen, maxlen, outlen; - struct l_msghdr linux_msg; + struct l_msghdr linux_msghdr; struct iovec *iov, *uiov; struct mbuf *control = NULL; struct mbuf **controlp; @@ -1162,11 +1163,11 @@ linux_recvmsg_common(struct thread *td, l_int s, struc void *data; int error, i, fd, fds, *fdp; - error = copyin(msghdr, &linux_msg, sizeof(linux_msg)); + error = copyin(msghdr, &linux_msghdr, sizeof(linux_msghdr)); if (error != 0) return (error); - error = linux_to_bsd_msghdr(msg, &linux_msg); + error = linux_to_bsd_msghdr(msg, &linux_msghdr); if (error != 0) return (error); @@ -1194,7 +1195,7 @@ linux_recvmsg_common(struct thread *td, l_int s, struc goto bad; if (msg->msg_name) { - msg->msg_name = PTRIN(linux_msg.msg_name); + msg->msg_name = PTRIN(linux_msghdr.msg_name); error = bsd_to_linux_sockaddr(sa, &lsa, msg->msg_namelen); if (error == 0) error = copyout(lsa, PTRIN(msg->msg_name), @@ -1204,12 +1205,12 @@ linux_recvmsg_common(struct thread *td, l_int s, struc goto bad; } - error = bsd_to_linux_msghdr(msg, &linux_msg); + error = bsd_to_linux_msghdr(msg, &linux_msghdr); if (error != 0) goto bad; - maxlen = linux_msg.msg_controllen; - linux_msg.msg_controllen = 0; + maxlen = linux_msghdr.msg_controllen; + linux_msghdr.msg_controllen = 0; if (control) { linux_cmsg = malloc(L_CMSG_HDRSZ, M_LINUX, M_WAITOK | M_ZERO); @@ -1217,7 +1218,7 @@ linux_recvmsg_common(struct thread *td, l_int s, struc msg->msg_controllen = control->m_len; cm = CMSG_FIRSTHDR(msg); - outbuf = PTRIN(linux_msg.msg_control); + outbuf = PTRIN(linux_msghdr.msg_control); outlen = 0; while (cm != NULL) { linux_cmsg->cmsg_type = @@ -1283,7 +1284,7 @@ linux_recvmsg_common(struct thread *td, l_int s, struc error = EMSGSIZE; goto bad; } else { - linux_msg.msg_flags |= LINUX_MSG_CTRUNC; + linux_msghdr.msg_flags |= LINUX_MSG_CTRUNC; m_dispose_extcontrolm(control); goto out; } @@ -1305,11 +1306,11 @@ linux_recvmsg_common(struct thread *td, l_int s, struc cm = CMSG_NXTHDR(msg, cm); } - linux_msg.msg_controllen = outlen; + linux_msghdr.msg_controllen = outlen; } out: - error = copyout(&linux_msg, msghdr, sizeof(linux_msg)); + error = copyout(&linux_msghdr, msghdr, sizeof(linux_msghdr)); bad: if (control != NULL) { @@ -1687,7 +1688,7 @@ linux_socketcall(struct thread *td, struct linux_socke return (linux_sendmmsg(td, arg)); } - uprintf("LINUX: 'socket' typ=%d not implemented\n", args->what); + linux_msg(td, "socket type %d not implemented", args->what); return (ENOSYS); } #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ From owner-svn-src-all@freebsd.org Mon Aug 24 16:06:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A91133C5CB2; Mon, 24 Aug 2020 16:06:12 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZxnJ41R4z3YyM; Mon, 24 Aug 2020 16:06:12 +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 6D3F91B403; Mon, 24 Aug 2020 16:06:12 +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 07OG6Cbd061886; Mon, 24 Aug 2020 16:06:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OG6CUd061884; Mon, 24 Aug 2020 16:06:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008241606.07OG6CUd061884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 24 Aug 2020 16:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364701 - in head: . tools/build X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . tools/build X-SVN-Commit-Revision: 364701 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 16:06:12 -0000 Author: imp Date: Mon Aug 24 16:06:11 2020 New Revision: 364701 URL: https://svnweb.freebsd.org/changeset/base/364701 Log: When copying over the binaries, use '-p' to preserve date/time Although I can't reproduce it, others are seeing different lex/yacc programs always regenerated after my change to copy rather than symlink the files. The reported fix is to add '-p' to the copies. Since it doesn't hurt, go head and add it, though the reasons for this mattering remain at best obscure and poorly articulated. Modified: head/Makefile.inc1 head/tools/build/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Aug 24 16:00:58 2020 (r364700) +++ head/Makefile.inc1 Mon Aug 24 16:06:11 2020 (r364701) @@ -2319,7 +2319,7 @@ ${_bt}-link-${_tool}: .PHONY .MAKE if [ ! -e "$${source_path}" ] ; then \ echo "Cannot find host tool '${_tool}'"; false; \ fi; \ - cp -f "$${source_path}" "${WORLDTMP}/legacy/bin/${_tool}" + cp -pf "$${source_path}" "${WORLDTMP}/legacy/bin/${_tool}" ${_bt}-links: ${_bt}-link-${_tool} .endfor Modified: head/tools/build/Makefile ============================================================================== --- head/tools/build/Makefile Mon Aug 24 16:00:58 2020 (r364700) +++ head/tools/build/Makefile Mon Aug 24 16:06:11 2020 (r364701) @@ -130,7 +130,7 @@ host-symlinks: echo "Cannot find host tool '${_tool}'"; false; \ fi; \ rm -f "${DESTDIR}/bin/${_tool}"; \ - cp -f "$${source_path}" "${DESTDIR}/bin/${_tool}" + cp -pf "$${source_path}" "${DESTDIR}/bin/${_tool}" .endfor .for _tool in ${_host_abs_tools_to_symlink} @source_path="${_tool:S/:/ /:[1]}"; \ @@ -139,11 +139,11 @@ host-symlinks: echo "Host tool '${src_path}' is missing"; false; \ fi; \ rm -f "$${target_path}"; \ - cp -f "$${source_path}" "$${target_path}" + cp -pf "$${source_path}" "$${target_path}" .endfor .if exists(/usr/libexec/flua) rm -f ${DESTDIR}/usr/libexec/flua - cp -f /usr/libexec/flua ${DESTDIR}/usr/libexec/flua + cp -pf /usr/libexec/flua ${DESTDIR}/usr/libexec/flua .endif # Create all the directories that are needed during the legacy, bootstrap-tools From owner-svn-src-all@freebsd.org Mon Aug 24 16:06:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D94553C5C19; Mon, 24 Aug 2020 16:06:19 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZxnQ4M7kz3Z8T; Mon, 24 Aug 2020 16:06:18 +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 65BDF1AE4E; Mon, 24 Aug 2020 16:06:18 +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 07OG6IAb061943; Mon, 24 Aug 2020 16:06:18 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OG6HKO061940; Mon, 24 Aug 2020 16:06:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241606.07OG6HKO061940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 16:06:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364702 - in stable/12/sys: compat/linux i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: compat/linux i386/linux X-SVN-Commit-Revision: 364702 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 16:06:20 -0000 Author: trasz Date: Mon Aug 24 16:06:17 2020 New Revision: 364702 URL: https://svnweb.freebsd.org/changeset/base/364702 Log: MFC r354413: Make linux(4) create /dev/shm. Linux applications often expect a tmpfs to be mounted there, and because they like to verify it's actually a mountpoint, a symlink won't do. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux.c stable/12/sys/compat/linux/linux.h stable/12/sys/compat/linux/linux_common.c stable/12/sys/i386/linux/linux_sysvec.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux.c ============================================================================== --- stable/12/sys/compat/linux/linux.c Mon Aug 24 16:06:11 2020 (r364701) +++ stable/12/sys/compat/linux/linux.c Mon Aug 24 16:06:17 2020 (r364702) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -129,6 +130,12 @@ static int linux_to_bsd_sigtbl[LINUX_SIGTBLSZ] = { SIGSYS /* LINUX_SIGSYS */ }; +static struct cdev *dev_shm_cdev; +static struct cdevsw dev_shm_cdevsw = { + .d_version = D_VERSION, + .d_name = "dev_shm", +}; + /* * Map Linux RT signals to the FreeBSD RT signals. */ @@ -523,4 +530,24 @@ linux_to_bsd_sockaddr(const struct l_sockaddr *osa, st out: free(kosa, M_SONAME); return (error); +} + +void +linux_dev_shm_create(void) +{ + int error; + + error = make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, &dev_shm_cdev, + &dev_shm_cdevsw, NULL, UID_ROOT, GID_WHEEL, 0, "shm/.mountpoint"); + if (error != 0) { + printf("%s: failed to create device node, error %d\n", + __func__, error); + } +} + +void +linux_dev_shm_destroy(void) +{ + + destroy_dev(dev_shm_cdev); } Modified: stable/12/sys/compat/linux/linux.h ============================================================================== --- stable/12/sys/compat/linux/linux.h Mon Aug 24 16:06:11 2020 (r364701) +++ stable/12/sys/compat/linux/linux.h Mon Aug 24 16:06:17 2020 (r364702) @@ -143,4 +143,7 @@ int bsd_to_linux_signal(int sig); extern LIST_HEAD(futex_list, futex) futex_list; extern struct mtx futex_mtx; +void linux_dev_shm_create(void); +void linux_dev_shm_destroy(void); + #endif /* _LINUX_MI_H_ */ Modified: stable/12/sys/compat/linux/linux_common.c ============================================================================== --- stable/12/sys/compat/linux/linux_common.c Mon Aug 24 16:06:11 2020 (r364701) +++ stable/12/sys/compat/linux/linux_common.c Mon Aug 24 16:06:17 2020 (r364702) @@ -68,6 +68,7 @@ linux_common_modevent(module_t mod, int type, void *da switch(type) { case MOD_LOAD: + linux_dev_shm_create(); linux_osd_jail_register(); linux_exit_tag = EVENTHANDLER_REGISTER(process_exit, linux_proc_exit, NULL, 1000); @@ -81,6 +82,7 @@ linux_common_modevent(module_t mod, int type, void *da mtx_init(&futex_mtx, "ftllk", NULL, MTX_DEF); break; case MOD_UNLOAD: + linux_dev_shm_destroy(); linux_osd_jail_deregister(); SET_FOREACH(ldhp, linux_device_handler_set) linux_device_unregister_handler(*ldhp); Modified: stable/12/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/12/sys/i386/linux/linux_sysvec.c Mon Aug 24 16:06:11 2020 (r364701) +++ stable/12/sys/i386/linux/linux_sysvec.c Mon Aug 24 16:06:17 2020 (r364702) @@ -1057,6 +1057,7 @@ linux_elf_modevent(module_t mod, int type, void *data) linux_get_machine(&linux_kplatform); linux_szplatform = roundup(strlen(linux_kplatform) + 1, sizeof(char *)); + linux_dev_shm_create(); linux_osd_jail_register(); stclohz = (stathz ? stathz : hz); if (bootverbose) @@ -1082,6 +1083,7 @@ linux_elf_modevent(module_t mod, int type, void *data) EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag); EVENTHANDLER_DEREGISTER(process_exec, linux_exec_tag); EVENTHANDLER_DEREGISTER(thread_dtor, linux_thread_dtor_tag); + linux_dev_shm_destroy(); linux_osd_jail_deregister(); if (bootverbose) printf("Linux ELF exec handler removed\n"); From owner-svn-src-all@freebsd.org Mon Aug 24 16:15:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41FD13C6489; Mon, 24 Aug 2020 16:15:13 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZxzj11q7z3Zhn; Mon, 24 Aug 2020 16:15:13 +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 0696C1B39E; Mon, 24 Aug 2020 16:15:13 +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 07OGFCnW068013; Mon, 24 Aug 2020 16:15:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OGFC71068008; Mon, 24 Aug 2020 16:15:12 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241615.07OGFC71068008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 16:15:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364703 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364703 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 16:15:13 -0000 Author: trasz Date: Mon Aug 24 16:15:12 2020 New Revision: 364703 URL: https://svnweb.freebsd.org/changeset/base/364703 Log: MFC r362059: Don't use newlines with linux_msg(). No functional changes. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux.c stable/12/sys/compat/linux/linux_event.c stable/12/sys/compat/linux/linux_futex.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux.c ============================================================================== --- stable/12/sys/compat/linux/linux.c Mon Aug 24 16:06:17 2020 (r364702) +++ stable/12/sys/compat/linux/linux.c Mon Aug 24 16:15:12 2020 (r364703) @@ -485,7 +485,7 @@ linux_to_bsd_sockaddr(const struct l_sockaddr *osa, st sin6->sin6_scope_id = 0; } else { linux_msg(curthread, - "obsolete pre-RFC2553 sockaddr_in6 rejected\n"); + "obsolete pre-RFC2553 sockaddr_in6 rejected"); error = EINVAL; goto out; } Modified: stable/12/sys/compat/linux/linux_event.c ============================================================================== --- stable/12/sys/compat/linux/linux_event.c Mon Aug 24 16:06:17 2020 (r364702) +++ stable/12/sys/compat/linux/linux_event.c Mon Aug 24 16:15:12 2020 (r364703) @@ -342,7 +342,7 @@ epoll_to_kevent(struct thread *td, int fd, struct epol if ((pem->flags & LINUX_XUNSUP_EPOLL) == 0) { pem->flags |= LINUX_XUNSUP_EPOLL; LINUX_PEM_XUNLOCK(pem); - linux_msg(td, "epoll_ctl unsupported flags: 0x%x\n", + linux_msg(td, "epoll_ctl unsupported flags: 0x%x", levents); } else LINUX_PEM_XUNLOCK(pem); Modified: stable/12/sys/compat/linux/linux_futex.c ============================================================================== --- stable/12/sys/compat/linux/linux_futex.c Mon Aug 24 16:06:17 2020 (r364702) +++ stable/12/sys/compat/linux/linux_futex.c Mon Aug 24 16:15:12 2020 (r364703) @@ -1086,7 +1086,7 @@ retry2: return (ENOSYS); default: - linux_msg(td, "unsupported futex op %d\n", args->op); + linux_msg(td, "unsupported futex op %d", args->op); LIN_SDT_PROBE1(futex, linux_sys_futex, unknown_operation, args->op); LIN_SDT_PROBE1(futex, linux_sys_futex, return, ENOSYS); From owner-svn-src-all@freebsd.org Mon Aug 24 16:21:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 21AA33C64EB; Mon, 24 Aug 2020 16:21:04 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZy6S06sTz3bB9; Mon, 24 Aug 2020 16:21:04 +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 DC64B1B227; Mon, 24 Aug 2020 16:21:03 +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 07OGL3cd070590; Mon, 24 Aug 2020 16:21:03 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OGL35L070589; Mon, 24 Aug 2020 16:21:03 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241621.07OGL35L070589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 16:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364704 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364704 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 16:21:04 -0000 Author: trasz Date: Mon Aug 24 16:21:03 2020 New Revision: 364704 URL: https://svnweb.freebsd.org/changeset/base/364704 Log: MFC r362176: Make linux(4) warn about unsupported CMSG level/type. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:15:12 2020 (r364703) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:21:03 2020 (r364704) @@ -1041,8 +1041,12 @@ linux_sendmsg_common(struct thread *td, l_int s, struc cmsg->cmsg_level = linux_to_bsd_sockopt_level(linux_cmsg.cmsg_level); if (cmsg->cmsg_type == -1 - || cmsg->cmsg_level != SOL_SOCKET) + || cmsg->cmsg_level != SOL_SOCKET) { + linux_msg(curthread, + "unsupported sendmsg cmsg level %d type %d", + linux_cmsg.cmsg_level, linux_cmsg.cmsg_type); goto bad; + } /* * Some applications (e.g. pulseaudio) attempt to @@ -1227,6 +1231,9 @@ linux_recvmsg_common(struct thread *td, l_int s, struc bsd_to_linux_sockopt_level(cm->cmsg_level); if (linux_cmsg->cmsg_type == -1 || cm->cmsg_level != SOL_SOCKET) { + linux_msg(curthread, + "unsupported recvmsg cmsg level %d type %d", + cm->cmsg_level, cm->cmsg_type); error = EINVAL; goto bad; } From owner-svn-src-all@freebsd.org Mon Aug 24 16:23:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 479183C68A2; Mon, 24 Aug 2020 16:23:28 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZy9D1BZBz3bSP; Mon, 24 Aug 2020 16:23:28 +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 0D8861B71D; Mon, 24 Aug 2020 16:23:28 +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 07OGNRDX074133; Mon, 24 Aug 2020 16:23:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OGNRxq074132; Mon, 24 Aug 2020 16:23:27 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241623.07OGNRxq074132@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 16:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364705 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364705 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 16:23:28 -0000 Author: trasz Date: Mon Aug 24 16:23:27 2020 New Revision: 364705 URL: https://svnweb.freebsd.org/changeset/base/364705 Log: MFC r362735: Make linux(4) support SO_PROTOCOL. Running Python test suite with python3.8 from Focal triggers those. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_socket.c stable/12/sys/compat/linux/linux_socket.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:21:03 2020 (r364704) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:23:27 2020 (r364705) @@ -235,6 +235,8 @@ linux_to_bsd_so_sockopt(int opt) return (SO_TIMESTAMP); case LINUX_SO_ACCEPTCONN: return (SO_ACCEPTCONN); + case LINUX_SO_PROTOCOL: + return (SO_PROTOCOL); } return (-1); } Modified: stable/12/sys/compat/linux/linux_socket.h ============================================================================== --- stable/12/sys/compat/linux/linux_socket.h Mon Aug 24 16:21:03 2020 (r364704) +++ stable/12/sys/compat/linux/linux_socket.h Mon Aug 24 16:23:27 2020 (r364705) @@ -199,6 +199,7 @@ int linux_accept(struct thread *td, struct linux_accep #define LINUX_SO_ACCEPTCONN 30 #define LINUX_SO_SNDBUFFORCE 32 #define LINUX_SO_RCVBUFFORCE 33 +#define LINUX_SO_PROTOCOL 38 /* Socket options */ #define LINUX_IP_TOS 1 From owner-svn-src-all@freebsd.org Mon Aug 24 16:25:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5DA813C6A1D; Mon, 24 Aug 2020 16:25:28 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZyCX1nk2z3bqf; Mon, 24 Aug 2020 16:25:28 +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 21EF21B780; Mon, 24 Aug 2020 16:25:28 +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 07OGPSBD074457; Mon, 24 Aug 2020 16:25:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OGPRhP074456; Mon, 24 Aug 2020 16:25:27 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241625.07OGPRhP074456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 16:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364706 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364706 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 16:25:28 -0000 Author: trasz Date: Mon Aug 24 16:25:27 2020 New Revision: 364706 URL: https://svnweb.freebsd.org/changeset/base/364706 Log: MFC r362833: Rework linux accept(2). This makes the code flow easier to follow, and fixes a bug where calling accept(2) could result in closing fd 0. Note that the code still contains a number of problems: it makes assumptions about l_sockaddr_in being the same as sockaddr_in, the EFAULT-related code looks like it doesn't work at all, and the socket type check is racy. Those will be addressed later on; I'm trying to work in small steps to avoid breaking one thing while fixing another. It fixes Redis, among other things. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:23:27 2020 (r364705) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:25:27 2020 (r364706) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -610,17 +611,19 @@ linux_accept_common(struct thread *td, int s, l_uintpt { struct l_sockaddr *lsa; struct sockaddr *sa; - struct file *fp; + struct file *fp, *fp1; int bflags, len; struct socket *so; int error, error1; bflags = 0; + fp = NULL; + sa = NULL; + error = linux_set_socket_flags(flags, &bflags); if (error != 0) return (error); - sa = NULL; if (PTRIN(addr) == NULL) { len = 0; error = kern_accept4(td, s, NULL, NULL, bflags, NULL); @@ -631,48 +634,54 @@ linux_accept_common(struct thread *td, int s, l_uintpt if (len < 0) return (EINVAL); error = kern_accept4(td, s, &sa, &len, bflags, &fp); - if (error == 0) - fdrop(fp, td); } + /* + * Translate errno values into ones used by Linux. + */ if (error != 0) { /* * XXX. This is wrong, different sockaddr structures * have different sizes. */ - if (error == EFAULT && namelen != sizeof(struct sockaddr_in)) - { - error = EINVAL; - goto out; - } - if (error == EINVAL) { - error1 = getsock_cap(td, s, &cap_accept_rights, &fp, NULL, NULL); + switch (error) { + case EFAULT: + if (namelen != sizeof(struct sockaddr_in)) + error = EINVAL; + break; + case EINVAL: + error1 = getsock_cap(td, s, &cap_accept_rights, &fp1, NULL, NULL); if (error1 != 0) { error = error1; - goto out; + break; } - so = fp->f_data; + so = fp1->f_data; if (so->so_type == SOCK_DGRAM) error = EOPNOTSUPP; - fdrop(fp, td); + fdrop(fp1, td); + break; } - goto out; + return (error); } - if (len != 0 && error == 0) { + if (len != 0) { error = bsd_to_linux_sockaddr(sa, &lsa, len); if (error == 0) error = copyout(lsa, PTRIN(addr), len); free(lsa, M_SONAME); - } - free(sa, M_SONAME); + /* + * XXX: We should also copyout the len, shouldn't we? + */ -out: - if (error != 0) { - (void)kern_close(td, td->td_retval[0]); - td->td_retval[0] = 0; + if (error != 0) { + fdclose(td, fp, td->td_retval[0]); + td->td_retval[0] = 0; + } } + if (fp != NULL) + fdrop(fp, td); + free(sa, M_SONAME); return (error); } From owner-svn-src-all@freebsd.org Mon Aug 24 16:27:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 190873C6BA9; Mon, 24 Aug 2020 16:27:52 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZyGH6gNHz3bwV; Mon, 24 Aug 2020 16:27:51 +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 C7F741B5A5; Mon, 24 Aug 2020 16:27:51 +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 07OGRpXt074736; Mon, 24 Aug 2020 16:27:51 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OGRpJr074735; Mon, 24 Aug 2020 16:27:51 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241627.07OGRpJr074735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 16:27:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364707 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364707 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 16:27:52 -0000 Author: trasz Date: Mon Aug 24 16:27:51 2020 New Revision: 364707 URL: https://svnweb.freebsd.org/changeset/base/364707 Log: MFC r362941: Fix Linux recvmsg(2) when msg_namelen returned is 0. Previously it would fail with EINVAL, breaking some of the Python regression tests. While here, cap the user-controlled message length. Note that the code doesn't seem to be copying out the new length in either (success or failure) case. This will be addressed separately. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:25:27 2020 (r364706) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:27:51 2020 (r364707) @@ -1195,11 +1195,14 @@ linux_recvmsg_common(struct thread *td, l_int s, struc if (error != 0) return (error); - if (msg->msg_name) { + if (msg->msg_name != NULL && msg->msg_namelen > 0) { + msg->msg_namelen = min(msg->msg_namelen, SOCK_MAXADDRLEN); sa = malloc(msg->msg_namelen, M_SONAME, M_WAITOK); msg->msg_name = sa; - } else + } else { sa = NULL; + msg->msg_name = NULL; + } uiov = msg->msg_iov; msg->msg_iov = iov; @@ -1209,7 +1212,10 @@ linux_recvmsg_common(struct thread *td, l_int s, struc if (error != 0) goto bad; - if (msg->msg_name) { + /* + * Note that kern_recvit() updates msg->msg_namelen. + */ + if (msg->msg_name != NULL && msg->msg_namelen > 0) { msg->msg_name = PTRIN(linux_msghdr.msg_name); error = bsd_to_linux_sockaddr(sa, &lsa, msg->msg_namelen); if (error == 0) From owner-svn-src-all@freebsd.org Mon Aug 24 16:36:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F7523C6C64; Mon, 24 Aug 2020 16:36:36 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZySN2tVkz3cSM; Mon, 24 Aug 2020 16:36:36 +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 464FD1B472; Mon, 24 Aug 2020 16:36:36 +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 07OGaaul080555; Mon, 24 Aug 2020 16:36:36 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OGaa5o080554; Mon, 24 Aug 2020 16:36:36 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241636.07OGaa5o080554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 16:36:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364708 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364708 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 16:36:36 -0000 Author: trasz Date: Mon Aug 24 16:36:35 2020 New Revision: 364708 URL: https://svnweb.freebsd.org/changeset/base/364708 Log: MFC r356728: Make linux(4) use kern_getsockopt(9) instead of going through sys_getsockopt(). It's a cleanup; no functional changes. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:27:51 2020 (r364707) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:36:35 2020 (r364708) @@ -1511,13 +1511,6 @@ linux_setsockopt(struct thread *td, struct linux_setso int linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args) { - struct getsockopt_args /* { - int s; - int level; - int name; - caddr_t val; - int *avalsize; - } */ bsd_args; l_timeval linux_tv; struct timeval tv; socklen_t tv_len, xulen, len; @@ -1525,11 +1518,10 @@ linux_getsockopt(struct thread *td, struct linux_getso struct sockaddr *sa; struct xucred xu; struct l_ucred lxu; - int error, name, newval; + int error, level, name, newval; - bsd_args.s = args->s; - bsd_args.level = linux_to_bsd_sockopt_level(args->level); - switch (bsd_args.level) { + level = linux_to_bsd_sockopt_level(args->level); + switch (level) { case SOL_SOCKET: name = linux_to_bsd_so_sockopt(args->optname); switch (name) { @@ -1537,7 +1529,7 @@ linux_getsockopt(struct thread *td, struct linux_getso /* FALLTHROUGH */ case SO_SNDTIMEO: tv_len = sizeof(tv); - error = kern_getsockopt(td, args->s, bsd_args.level, + error = kern_getsockopt(td, args->s, level, name, &tv, UIO_SYSSPACE, &tv_len); if (error != 0) return (error); @@ -1553,9 +1545,9 @@ linux_getsockopt(struct thread *td, struct linux_getso * LOCAL_PEERCRED is not served at the SOL_SOCKET level, * but by the Unix socket's level 0. */ - bsd_args.level = 0; + level = 0; xulen = sizeof(xu); - error = kern_getsockopt(td, args->s, bsd_args.level, + error = kern_getsockopt(td, args->s, level, name, &xu, UIO_SYSSPACE, &xulen); if (error != 0) return (error); @@ -1569,7 +1561,7 @@ linux_getsockopt(struct thread *td, struct linux_getso /* NOTREACHED */ case SO_ERROR: len = sizeof(newval); - error = kern_getsockopt(td, args->s, bsd_args.level, + error = kern_getsockopt(td, args->s, level, name, &newval, UIO_SYSSPACE, &len); if (error != 0) return (error); @@ -1596,16 +1588,13 @@ linux_getsockopt(struct thread *td, struct linux_getso if (name == -1) return (EINVAL); - bsd_args.name = name; - bsd_args.avalsize = PTRIN(args->optlen); - if (name == IPV6_NEXTHOP) { error = copyin(PTRIN(args->optlen), &len, sizeof(len)); if (error != 0) return (error); sa = malloc(len, M_SONAME, M_WAITOK); - error = kern_getsockopt(td, args->s, bsd_args.level, + error = kern_getsockopt(td, args->s, level, name, sa, UIO_SYSSPACE, &len); if (error != 0) goto out; @@ -1620,8 +1609,16 @@ linux_getsockopt(struct thread *td, struct linux_getso out: free(sa, M_SONAME); } else { - bsd_args.val = PTRIN(args->optval); - error = sys_getsockopt(td, &bsd_args); + if (args->optval) { + error = copyin(PTRIN(args->optlen), &len, sizeof(len)); + if (error != 0) + return (error); + } + error = kern_getsockopt(td, args->s, level, + name, PTRIN(args->optval), UIO_USERSPACE, &len); + if (error == 0) + error = copyout(&len, PTRIN(args->optlen), + sizeof(len)); } return (error); From owner-svn-src-all@freebsd.org Mon Aug 24 16:41:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D31CE3C7304; Mon, 24 Aug 2020 16:41:10 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZyYf5Kffz3d44; Mon, 24 Aug 2020 16:41:10 +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 9B9C21B7A3; Mon, 24 Aug 2020 16:41:10 +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 07OGfA3f084550; Mon, 24 Aug 2020 16:41:10 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OGfAtj084509; Mon, 24 Aug 2020 16:41:10 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241641.07OGfAtj084509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 16:41:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364709 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364709 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 16:41:10 -0000 Author: trasz Date: Mon Aug 24 16:41:10 2020 New Revision: 364709 URL: https://svnweb.freebsd.org/changeset/base/364709 Log: MFC r356729: Make linux(4) use kern_setsockopt(9) instead of going through sys_setsockopt. Just a cleanup; no functional changes. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:36:35 2020 (r364708) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:41:10 2020 (r364709) @@ -1428,22 +1428,14 @@ linux_shutdown(struct thread *td, struct linux_shutdow int linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args) { - struct setsockopt_args /* { - int s; - int level; - int name; - caddr_t val; - int valsize; - } */ bsd_args; l_timeval linux_tv; struct sockaddr *sa; struct timeval tv; socklen_t len; - int error, name; + int error, level, name; - bsd_args.s = args->s; - bsd_args.level = linux_to_bsd_sockopt_level(args->level); - switch (bsd_args.level) { + level = linux_to_bsd_sockopt_level(args->level); + switch (level) { case SOL_SOCKET: name = linux_to_bsd_so_sockopt(args->optname); switch (name) { @@ -1456,7 +1448,7 @@ linux_setsockopt(struct thread *td, struct linux_setso return (error); tv.tv_sec = linux_tv.tv_sec; tv.tv_usec = linux_tv.tv_usec; - return (kern_setsockopt(td, args->s, bsd_args.level, + return (kern_setsockopt(td, args->s, level, name, &tv, UIO_SYSSPACE, sizeof(tv))); /* NOTREACHED */ default: @@ -1489,20 +1481,17 @@ linux_setsockopt(struct thread *td, struct linux_setso if (name == IPV6_NEXTHOP) { - len = args->optlen; error = linux_to_bsd_sockaddr(PTRIN(args->optval), &sa, &len); if (error != 0) return (error); - error = kern_setsockopt(td, args->s, bsd_args.level, + error = kern_setsockopt(td, args->s, level, name, sa, UIO_SYSSPACE, len); free(sa, M_SONAME); } else { - bsd_args.name = name; - bsd_args.val = PTRIN(args->optval); - bsd_args.valsize = args->optlen; - error = sys_setsockopt(td, &bsd_args); + error = kern_setsockopt(td, args->s, level, + name, PTRIN(args->optval), UIO_USERSPACE, args->optlen); } return (error); From owner-svn-src-all@freebsd.org Mon Aug 24 16:44:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D25173C7078; Mon, 24 Aug 2020 16:44:18 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZydG5C5Lz3dGv; Mon, 24 Aug 2020 16:44:18 +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 961781BB1A; Mon, 24 Aug 2020 16:44:18 +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 07OGiInd086740; Mon, 24 Aug 2020 16:44:18 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OGiID7086738; Mon, 24 Aug 2020 16:44:18 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241644.07OGiID7086738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 16:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364710 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 16:44:18 -0000 Author: trasz Date: Mon Aug 24 16:44:17 2020 New Revision: 364710 URL: https://svnweb.freebsd.org/changeset/base/364710 Log: MFC r362101: Minor code cleanup; no functional changes. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_socket.c stable/12/sys/compat/linux/linux_socket.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:41:10 2020 (r364709) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:44:17 2020 (r364710) @@ -89,10 +89,9 @@ static int linux_to_bsd_sockopt_level(int level) { - switch (level) { - case LINUX_SOL_SOCKET: + if (level == LINUX_SOL_SOCKET) return (SOL_SOCKET); - } + /* Remaining values are RFC-defined protocol numbers. */ return (level); } @@ -100,10 +99,8 @@ static int bsd_to_linux_sockopt_level(int level) { - switch (level) { - case SOL_SOCKET: + if (level == SOL_SOCKET) return (LINUX_SOL_SOCKET); - } return (level); } Modified: stable/12/sys/compat/linux/linux_socket.h ============================================================================== --- stable/12/sys/compat/linux/linux_socket.h Mon Aug 24 16:41:10 2020 (r364709) +++ stable/12/sys/compat/linux/linux_socket.h Mon Aug 24 16:44:17 2020 (r364710) @@ -166,12 +166,6 @@ int linux_accept(struct thread *td, struct linux_accep /* Socket defines */ #define LINUX_SOL_SOCKET 1 -#define LINUX_SOL_IP 0 -#define LINUX_SOL_TCP 6 -#define LINUX_SOL_UDP 17 -#define LINUX_SOL_IPV6 41 -#define LINUX_SOL_IPX 256 -#define LINUX_SOL_AX25 257 #define LINUX_SO_DEBUG 1 #define LINUX_SO_REUSEADDR 2 From owner-svn-src-all@freebsd.org Mon Aug 24 16:45:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5994B3C7349; Mon, 24 Aug 2020 16:45:24 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZyfX1mSBz3dC1; Mon, 24 Aug 2020 16:45:24 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 200AF1B842; Mon, 24 Aug 2020 16:45:24 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07OGjO5K086963; Mon, 24 Aug 2020 16:45:24 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OGjOYC086962; Mon, 24 Aug 2020 16:45:24 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <202008241645.07OGjOYC086962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Mon, 24 Aug 2020 16:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364711 - head/usr.sbin/gstat X-SVN-Group: head X-SVN-Commit-Author: sobomax X-SVN-Commit-Paths: head/usr.sbin/gstat X-SVN-Commit-Revision: 364711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 16:45:24 -0000 Author: sobomax Date: Mon Aug 24 16:45:23 2020 New Revision: 364711 URL: https://svnweb.freebsd.org/changeset/base/364711 Log: In the endless batch mode (-B), terminate if and when stdout is closed. That mode is useful to call gstat from other app, however kinda useless since gstat won't exit and stay running forever when its parent process has long gone. MFC after: 2 weeks Modified: head/usr.sbin/gstat/gstat.c Modified: head/usr.sbin/gstat/gstat.c ============================================================================== --- head/usr.sbin/gstat/gstat.c Mon Aug 24 16:44:17 2020 (r364710) +++ head/usr.sbin/gstat/gstat.c Mon Aug 24 16:45:23 2020 (r364711) @@ -517,7 +517,8 @@ main(int argc, char **argv) if (!flag_B) loop = 0; else - fflush(stdout); + if (fflush(stdout) == EOF) + goto out; usleep(flag_I); continue; } @@ -585,7 +586,7 @@ main(int argc, char **argv) } } } - +out: if (!flag_b) { el_end(el); endwin(); From owner-svn-src-all@freebsd.org Mon Aug 24 17:06:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E4B13C80B8; Mon, 24 Aug 2020 17:06:37 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZz7140Z0z3g5b; Mon, 24 Aug 2020 17:06:37 +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 6C54F1BBAB; Mon, 24 Aug 2020 17:06:37 +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 07OH6b2h099624; Mon, 24 Aug 2020 17:06:37 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OH6ZUq099611; Mon, 24 Aug 2020 17:06:35 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241706.07OH6ZUq099611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 17:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364712 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux modules/linux modules/linux64 modules/linux_common X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux modules/linux modules/linux64 modules/linux_common X-SVN-Commit-Revision: 364712 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 17:06:37 -0000 Author: trasz Date: Mon Aug 24 17:06:34 2020 New Revision: 364712 URL: https://svnweb.freebsd.org/changeset/base/364712 Log: MFC r347538 by dchagin: Linuxulator depends on a fundamental kernel settings such as SMP. Many of them listed in opt_global.h which is not generated while building modules outside of a kernel and such modules never match real cofigured kernel. So, we should prevent our users from building obviously defective modules. Therefore, remove the root cause of the building of modules outside of a kernel - the possibility of building modules with DEBUG or KTR flags. And remove all of DEBUG printfs as it is incomplete and in threaded programms not informative, also a half of system call does not have DEBUG printf. For debuging Linux programms we have dtrace, ktr and ktrace ability. PR: 222861 Modified: stable/12/sys/amd64/linux/linux.h stable/12/sys/amd64/linux/linux_sysvec.c stable/12/sys/amd64/linux32/linux.h stable/12/sys/amd64/linux32/linux32_machdep.c stable/12/sys/amd64/linux32/linux32_sysvec.c stable/12/sys/arm64/linux/linux.h stable/12/sys/arm64/linux/linux_sysvec.c stable/12/sys/compat/linux/linux_file.c stable/12/sys/compat/linux/linux_fork.c stable/12/sys/compat/linux/linux_getcwd.c stable/12/sys/compat/linux/linux_ioctl.c stable/12/sys/compat/linux/linux_misc.c stable/12/sys/compat/linux/linux_misc.h stable/12/sys/compat/linux/linux_signal.c stable/12/sys/compat/linux/linux_stats.c stable/12/sys/i386/linux/linux.h stable/12/sys/i386/linux/linux_machdep.c stable/12/sys/i386/linux/linux_sysvec.c stable/12/sys/modules/linux/Makefile stable/12/sys/modules/linux64/Makefile stable/12/sys/modules/linux_common/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux.h ============================================================================== --- stable/12/sys/amd64/linux/linux.h Mon Aug 24 16:45:23 2020 (r364711) +++ stable/12/sys/amd64/linux/linux.h Mon Aug 24 17:06:34 2020 (r364712) @@ -39,15 +39,6 @@ #define LINUX_LEGACY_SYSCALLS -/* - * debugging support - */ -extern u_char linux_debug_map[]; -#define ldebug(name) isclr(linux_debug_map, LINUX_SYS_linux_ ## name) -#define ARGS(nm, fmt) "linux(%ld/%ld): "#nm"("fmt")\n", \ - (long)td->td_proc->p_pid, (long)td->td_tid -#define LMSG(fmt) "linux(%ld/%ld): "fmt"\n", \ - (long)td->td_proc->p_pid, (long)td->td_tid #define LINUX_DTRACE linuxulator /* Modified: stable/12/sys/amd64/linux/linux_sysvec.c ============================================================================== --- stable/12/sys/amd64/linux/linux_sysvec.c Mon Aug 24 16:45:23 2020 (r364711) +++ stable/12/sys/amd64/linux/linux_sysvec.c Mon Aug 24 17:06:34 2020 (r364712) @@ -85,20 +85,6 @@ __FBSDID("$FreeBSD$"); MODULE_VERSION(linux64, 1); -#if defined(DEBUG) -SYSCTL_PROC(_compat_linux, OID_AUTO, debug, - CTLTYPE_STRING | CTLFLAG_RW, - 0, 0, linux_sysctl_debug, "A", - "Linux 64 debugging control"); -#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). - */ -#define LINUX_SYS_linux_rt_sendsig 0 - const char *linux_kplatform; static int linux_szsigcode; static vm_object_t linux_shared_page_obj; @@ -650,9 +636,6 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse /* 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); -#endif PROC_LOCK(p); sigexit(td, SIGILL); } Modified: stable/12/sys/amd64/linux32/linux.h ============================================================================== --- stable/12/sys/amd64/linux32/linux.h Mon Aug 24 16:45:23 2020 (r364711) +++ stable/12/sys/amd64/linux32/linux.h Mon Aug 24 17:06:34 2020 (r364712) @@ -42,15 +42,6 @@ #define LINUX_LEGACY_SYSCALLS -/* - * debugging support - */ -extern u_char linux_debug_map[]; -#define ldebug(name) isclr(linux_debug_map, LINUX32_SYS_linux_ ## name) -#define ARGS(nm, fmt) "linux(%ld/%ld): "#nm"("fmt")\n", \ - (long)td->td_proc->p_pid, (long)td->td_tid -#define LMSG(fmt) "linux(%ld/%ld): "fmt"\n", \ - (long)td->td_proc->p_pid, (long)td->td_tid #define LINUX_DTRACE linuxulator32 #define LINUX32_MAXUSER ((1ul << 32) - PAGE_SIZE) Modified: stable/12/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_machdep.c Mon Aug 24 16:45:23 2020 (r364711) +++ stable/12/sys/amd64/linux32/linux32_machdep.c Mon Aug 24 17:06:34 2020 (r364712) @@ -133,11 +133,6 @@ linux_execve(struct thread *td, struct linux_execve_ar LCONVPATHEXIST(td, args->path, &path); -#ifdef DEBUG - if (ldebug(execve)) - printf(ARGS(execve, "%s"), path); -#endif - error = freebsd32_exec_copyin_args(&eargs, path, UIO_SYSSPACE, args->argp, args->envp); free(path, M_TEMP); @@ -382,11 +377,6 @@ linux_old_select(struct thread *td, struct linux_old_s struct linux_select_args newsel; int error; -#ifdef DEBUG - if (ldebug(old_select)) - printf(ARGS(old_select, "%p"), args->ptr); -#endif - error = copyin(args->ptr, &linux_args, sizeof(linux_args)); if (error) return (error); @@ -410,29 +400,19 @@ linux_set_cloned_tls(struct thread *td, void *desc) error = copyin(desc, &info, sizeof(struct l_user_desc)); if (error) { - printf(LMSG("copyin failed!")); + linux_msg(td, "set_cloned_tls copyin info failed!"); } else { + /* We might copy out the entry_number as GUGS32_SEL. */ info.entry_number = GUGS32_SEL; error = copyout(&info, desc, sizeof(struct l_user_desc)); if (error) - printf(LMSG("copyout failed!")); + linux_msg(td, "set_cloned_tls copyout info failed!"); a[0] = LINUX_LDT_entry_a(&info); a[1] = LINUX_LDT_entry_b(&info); memcpy(&sd, &a, sizeof(a)); -#ifdef DEBUG - if (ldebug(clone)) - printf("Segment created in clone with " - "CLONE_SETTLS: lobase: %x, hibase: %x, " - "lolimit: %x, hilimit: %x, type: %i, " - "dpl: %i, p: %i, xx: %i, long: %i, " - "def32: %i, gran: %i\n", sd.sd_lobase, - sd.sd_hibase, sd.sd_lolimit, sd.sd_hilimit, - sd.sd_type, sd.sd_dpl, sd.sd_p, sd.sd_xx, - sd.sd_long, sd.sd_def32, sd.sd_gran); -#endif pcb = td->td_pcb; pcb->pcb_gsbase = (register_t)info.base_addr; td->td_frame->tf_gs = GSEL(GUGS32_SEL, SEL_UPL); @@ -461,13 +441,6 @@ int linux_mmap2(struct thread *td, struct linux_mmap2_args *args) { -#ifdef DEBUG - if (ldebug(mmap2)) - printf(ARGS(mmap2, "0x%08x, %d, %d, 0x%08x, %d, %d"), - args->addr, args->len, args->prot, - args->flags, args->fd, args->pgoff); -#endif - return (linux_mmap_common(td, PTROUT(args->addr), args->len, args->prot, args->flags, args->fd, (uint64_t)(uint32_t)args->pgoff * PAGE_SIZE)); @@ -483,13 +456,6 @@ linux_mmap(struct thread *td, struct linux_mmap_args * if (error) return (error); -#ifdef DEBUG - if (ldebug(mmap)) - printf(ARGS(mmap, "0x%08x, %d, %d, 0x%08x, %d, %d"), - linux_args.addr, linux_args.len, linux_args.prot, - linux_args.flags, linux_args.fd, linux_args.pgoff); -#endif - return (linux_mmap_common(td, linux_args.addr, linux_args.len, linux_args.prot, linux_args.flags, linux_args.fd, (uint32_t)linux_args.pgoff)); @@ -526,12 +492,6 @@ linux_sigaction(struct thread *td, struct linux_sigact l_sigaction_t act, oact; int error; -#ifdef DEBUG - if (ldebug(sigaction)) - printf(ARGS(sigaction, "%d, %p, %p"), - args->sig, (void *)args->nsa, (void *)args->osa); -#endif - if (args->nsa != NULL) { error = copyin(args->nsa, &osa, sizeof(l_osigaction_t)); if (error) @@ -568,11 +528,6 @@ linux_sigsuspend(struct thread *td, struct linux_sigsu sigset_t sigmask; l_sigset_t mask; -#ifdef DEBUG - if (ldebug(sigsuspend)) - printf(ARGS(sigsuspend, "%08lx"), (unsigned long)args->mask); -#endif - LINUX_SIGEMPTYSET(mask); mask.__mask = args->mask; linux_to_bsd_sigset(&mask, &sigmask); @@ -586,12 +541,6 @@ linux_rt_sigsuspend(struct thread *td, struct linux_rt sigset_t sigmask; int error; -#ifdef DEBUG - if (ldebug(rt_sigsuspend)) - printf(ARGS(rt_sigsuspend, "%p, %d"), - (void *)uap->newset, uap->sigsetsize); -#endif - if (uap->sigsetsize != sizeof(l_sigset_t)) return (EINVAL); @@ -609,11 +558,6 @@ linux_pause(struct thread *td, struct linux_pause_args struct proc *p = td->td_proc; sigset_t sigmask; -#ifdef DEBUG - if (ldebug(pause)) - printf(ARGS(pause, "")); -#endif - PROC_LOCK(p); sigmask = td->td_sigmask; PROC_UNLOCK(p); @@ -627,11 +571,6 @@ linux_sigaltstack(struct thread *td, struct linux_siga l_stack_t lss; int error; -#ifdef DEBUG - if (ldebug(sigaltstack)) - printf(ARGS(sigaltstack, "%p, %p"), uap->uss, uap->uoss); -#endif - if (uap->uss != NULL) { error = copyin(uap->uss, &lss, sizeof(l_stack_t)); if (error) @@ -730,15 +669,6 @@ linux_set_thread_area(struct thread *td, if (error) return (error); -#ifdef DEBUG - if (ldebug(set_thread_area)) - printf(ARGS(set_thread_area, "%i, %x, %x, %i, %i, %i, " - "%i, %i, %i"), info.entry_number, info.base_addr, - info.limit, info.seg_32bit, info.contents, - info.read_exec_only, info.limit_in_pages, - info.seg_not_present, info.useable); -#endif - /* * Semantics of Linux version: every thread in the system has array * of three TLS descriptors. 1st is GLIBC TLS, 2nd is WINE, 3rd unknown. @@ -792,25 +722,6 @@ linux_set_thread_area(struct thread *td, } memcpy(&sd, &a, sizeof(a)); -#ifdef DEBUG - if (ldebug(set_thread_area)) - printf("Segment created in set_thread_area: " - "lobase: %x, hibase: %x, lolimit: %x, hilimit: %x, " - "type: %i, dpl: %i, p: %i, xx: %i, long: %i, " - "def32: %i, gran: %i\n", - sd.sd_lobase, - sd.sd_hibase, - sd.sd_lolimit, - sd.sd_hilimit, - sd.sd_type, - sd.sd_dpl, - sd.sd_p, - sd.sd_xx, - sd.sd_long, - sd.sd_def32, - sd.sd_gran); -#endif - pcb = td->td_pcb; pcb->pcb_gsbase = (register_t)info.base_addr; set_pcb_flags(pcb, PCB_32BIT); Modified: stable/12/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_sysvec.c Mon Aug 24 16:45:23 2020 (r364711) +++ stable/12/sys/amd64/linux32/linux32_sysvec.c Mon Aug 24 17:06:34 2020 (r364712) @@ -90,14 +90,6 @@ __FBSDID("$FreeBSD$"); MODULE_VERSION(linux, 1); -/* - * 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 - const char *linux_kplatform; static int linux_szsigcode; static vm_object_t linux_shared_page_obj; @@ -285,11 +277,6 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse regs = td->td_frame; oonstack = sigonstack(regs->tf_rsp); -#ifdef DEBUG - if (ldebug(rt_sendsig)) - printf(ARGS(rt_sendsig, "%p, %d, %p, %u"), - catcher, sig, (void*)mask, code); -#endif /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { @@ -348,23 +335,11 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigse frame.sf_sc.uc_mcontext.sc_cr2 = (u_int32_t)(uintptr_t)ksi->ksi_addr; frame.sf_sc.uc_mcontext.sc_trapno = bsd_to_linux_trapcode(code); -#ifdef DEBUG - if (ldebug(rt_sendsig)) - printf(LMSG("rt_sendsig flags: 0x%x, sp: %p, ss: 0x%lx, mask: 0x%x"), - frame.sf_sc.uc_stack.ss_flags, td->td_sigstk.ss_sp, - td->td_sigstk.ss_size, frame.sf_sc.uc_mcontext.sc_mask); -#endif - if (copyout(&frame, fp, sizeof(frame)) != 0) { /* * Process has trashed its stack; give it an illegal * instruction to halt it in its tracks. */ -#ifdef DEBUG - if (ldebug(rt_sendsig)) - printf(LMSG("rt_sendsig: bad stack %p, oonstack=%x"), - fp, oonstack); -#endif PROC_LOCK(p); sigexit(td, SIGILL); } @@ -422,12 +397,6 @@ linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t regs = td->td_frame; oonstack = sigonstack(regs->tf_rsp); -#ifdef DEBUG - if (ldebug(sendsig)) - printf(ARGS(sendsig, "%p, %d, %p, %u"), - catcher, sig, (void*)mask, code); -#endif - /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { @@ -520,10 +489,6 @@ linux_sigreturn(struct thread *td, struct linux_sigret regs = td->td_frame; -#ifdef DEBUG - if (ldebug(sigreturn)) - printf(ARGS(sigreturn, "%p"), (void *)args->sfp); -#endif /* * The trampoline code hands us the sigframe. * It is unsafe to keep track of it ourselves, in the event that a @@ -605,10 +570,6 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_ regs = td->td_frame; -#ifdef DEBUG - if (ldebug(rt_sigreturn)) - printf(ARGS(rt_sigreturn, "%p"), (void *)args->ucp); -#endif /* * The trampoline code hands us the ucontext. * It is unsafe to keep track of it ourselves, in the event that a @@ -673,11 +634,6 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_ ss.ss_size = lss->ss_size; ss.ss_flags = linux_to_bsd_sigaltstack(lss->ss_flags); -#ifdef DEBUG - if (ldebug(rt_sigreturn)) - printf(LMSG("rt_sigret flags: 0x%x, sp: %p, ss: 0x%lx, mask: 0x%x"), - ss.ss_flags, ss.ss_sp, ss.ss_size, context->sc_mask); -#endif (void)kern_sigaltstack(td, &ss, NULL); return (EJUSTRETURN); @@ -867,11 +823,6 @@ SYSCTL_ULONG(_compat_linux32, OID_AUTO, maxssiz, CTLFL static u_long linux32_maxvmem = LINUX32_MAXVMEM; SYSCTL_ULONG(_compat_linux32, OID_AUTO, maxvmem, CTLFLAG_RW, &linux32_maxvmem, 0, ""); - -#if defined(DEBUG) -SYSCTL_PROC(_compat_linux32, OID_AUTO, debug, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, - linux_sysctl_debug, "A", "Linux debugging control"); -#endif static void linux32_fixlimit(struct rlimit *rl, int which) Modified: stable/12/sys/arm64/linux/linux.h ============================================================================== --- stable/12/sys/arm64/linux/linux.h Mon Aug 24 16:45:23 2020 (r364711) +++ stable/12/sys/arm64/linux/linux.h Mon Aug 24 17:06:34 2020 (r364712) @@ -36,14 +36,6 @@ #include #include -/* Debugging support */ -#define DEBUG -extern u_char linux_debug_map[]; -#define ldebug(name) isclr(linux_debug_map, LINUX_SYS_linux_ ## name) -#define ARGS(nm, fmt) "linux(%ld/%ld): "#nm"("fmt")\n", \ - (long)td->td_proc->p_pid, (long)td->td_tid -#define LMSG(fmt) "linux(%ld/%ld): "fmt"\n", \ - (long)td->td_proc->p_pid, (long)td->td_tid #define LINUX_DTRACE linuxulator /* Provide a separate set of types for the Linux types */ Modified: stable/12/sys/arm64/linux/linux_sysvec.c ============================================================================== --- stable/12/sys/arm64/linux/linux_sysvec.c Mon Aug 24 16:45:23 2020 (r364711) +++ stable/12/sys/arm64/linux/linux_sysvec.c Mon Aug 24 17:06:34 2020 (r364712) @@ -59,11 +59,6 @@ __FBSDID("$FreeBSD$"); MODULE_VERSION(linux64elf, 1); -#if defined(DEBUG) -SYSCTL_PROC(_compat_linux, OID_AUTO, debug, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, - linux_sysctl_debug, "A", "64-bit Linux debugging control"); -#endif - const char *linux_kplatform; static int linux_szsigcode; static vm_object_t linux_shared_page_obj; Modified: stable/12/sys/compat/linux/linux_file.c ============================================================================== --- stable/12/sys/compat/linux/linux_file.c Mon Aug 24 16:45:23 2020 (r364711) +++ stable/12/sys/compat/linux/linux_file.c Mon Aug 24 17:06:34 2020 (r364712) @@ -76,10 +76,7 @@ linux_creat(struct thread *td, struct linux_creat_args int error; LCONVPATHEXIST(td, args->path, &path); -#ifdef DEBUG - if (ldebug(creat)) - printf(ARGS(creat, "%s, %d"), path, args->mode); -#endif + error = kern_openat(td, AT_FDCWD, path, UIO_SYSSPACE, O_WRONLY | O_CREAT | O_TRUNC, args->mode); LFREEPATH(path); @@ -170,14 +167,6 @@ linux_common_open(struct thread *td, int dirfd, char * } done: -#ifdef DEBUG -#ifdef LINUX_LEGACY_SYSCALLS - if (ldebug(open)) -#else - if (ldebug(openat)) -#endif - printf(LMSG("open returns error %d"), error); -#endif LFREEPATH(path); return (error); } @@ -193,11 +182,7 @@ linux_openat(struct thread *td, struct linux_openat_ar LCONVPATH_AT(td, args->filename, &path, 1, dfd); else LCONVPATH_AT(td, args->filename, &path, 0, dfd); -#ifdef DEBUG - if (ldebug(openat)) - printf(ARGS(openat, "%i, %s, 0x%x, 0x%x"), args->dfd, - path, args->flags, args->mode); -#endif + return (linux_common_open(td, dfd, path, args->flags, args->mode)); } @@ -211,11 +196,7 @@ linux_open(struct thread *td, struct linux_open_args * LCONVPATHCREAT(td, args->path, &path); else LCONVPATHEXIST(td, args->path, &path); -#ifdef DEBUG - if (ldebug(open)) - printf(ARGS(open, "%s, 0x%x, 0x%x"), - path, args->flags, args->mode); -#endif + return (linux_common_open(td, AT_FDCWD, path, args->flags, args->mode)); } #endif @@ -224,11 +205,6 @@ int linux_lseek(struct thread *td, struct linux_lseek_args *args) { -#ifdef DEBUG - if (ldebug(lseek)) - printf(ARGS(lseek, "%d, %ld, %d"), - args->fdes, (long)args->off, args->whence); -#endif return (kern_lseek(td, args->fdes, args->off, args->whence)); } @@ -239,11 +215,6 @@ linux_llseek(struct thread *td, struct linux_llseek_ar int error; off_t off; -#ifdef DEBUG - if (ldebug(llseek)) - printf(ARGS(llseek, "%d, %d:%d, %d"), - args->fd, args->ohigh, args->olow, args->whence); -#endif off = (args->olow) | (((off_t) args->ohigh) << 32); error = kern_lseek(td, args->fd, off, args->whence); @@ -332,10 +303,6 @@ linux_getdents(struct thread *td, struct linux_getdent int buflen, error; size_t retval; -#ifdef DEBUG - if (ldebug(getdents)) - printf(ARGS(getdents, "%d, *, %d"), args->fd, args->count); -#endif buflen = min(args->count, MAXBSIZE); buf = malloc(buflen, M_TEMP, M_WAITOK); @@ -413,10 +380,6 @@ linux_getdents64(struct thread *td, struct linux_getde int buflen, error; size_t retval; -#ifdef DEBUG - if (ldebug(getdents64)) - uprintf(ARGS(getdents64, "%d, *, %d"), args->fd, args->count); -#endif buflen = min(args->count, MAXBSIZE); buf = malloc(buflen, M_TEMP, M_WAITOK); @@ -488,10 +451,6 @@ linux_readdir(struct thread *td, struct linux_readdir_ struct l_dirent *linux_dirent; int buflen, error; -#ifdef DEBUG - if (ldebug(readdir)) - printf(ARGS(readdir, "%d, *"), args->fd); -#endif buflen = LINUX_RECLEN(LINUX_NAME_MAX); buf = malloc(buflen, M_TEMP, M_WAITOK); @@ -544,10 +503,6 @@ linux_access(struct thread *td, struct linux_access_ar LCONVPATHEXIST(td, args->path, &path); -#ifdef DEBUG - if (ldebug(access)) - printf(ARGS(access, "%s, %d"), path, args->amode); -#endif error = kern_accessat(td, AT_FDCWD, path, UIO_SYSSPACE, 0, args->amode); LFREEPATH(path); @@ -569,11 +524,6 @@ linux_faccessat(struct thread *td, struct linux_facces dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; LCONVPATHEXIST_AT(td, args->filename, &path, dfd); -#ifdef DEBUG - if (ldebug(faccessat)) - printf(ARGS(access, "%s, %d"), path, args->amode); -#endif - error = kern_accessat(td, dfd, path, UIO_SYSSPACE, 0, args->amode); LFREEPATH(path); @@ -590,11 +540,6 @@ linux_unlink(struct thread *td, struct linux_unlink_ar LCONVPATHEXIST(td, args->path, &path); -#ifdef DEBUG - if (ldebug(unlink)) - printf(ARGS(unlink, "%s"), path); -#endif - error = kern_unlinkat(td, AT_FDCWD, path, UIO_SYSSPACE, 0); if (error == EPERM) { /* Introduce POSIX noncompliant behaviour of Linux */ @@ -622,11 +567,6 @@ linux_unlinkat(struct thread *td, struct linux_unlinka dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; LCONVPATHEXIST_AT(td, args->pathname, &path, dfd); -#ifdef DEBUG - if (ldebug(unlinkat)) - printf(ARGS(unlinkat, "%s"), path); -#endif - if (args->flag & LINUX_AT_REMOVEDIR) error = kern_rmdirat(td, dfd, path, UIO_SYSSPACE); else @@ -648,10 +588,6 @@ linux_chdir(struct thread *td, struct linux_chdir_args LCONVPATHEXIST(td, args->path, &path); -#ifdef DEBUG - if (ldebug(chdir)) - printf(ARGS(chdir, "%s"), path); -#endif error = kern_chdir(td, path, UIO_SYSSPACE); LFREEPATH(path); return (error); @@ -666,10 +602,6 @@ linux_chmod(struct thread *td, struct linux_chmod_args LCONVPATHEXIST(td, args->path, &path); -#ifdef DEBUG - if (ldebug(chmod)) - printf(ARGS(chmod, "%s, %d"), path, args->mode); -#endif error = kern_fchmodat(td, AT_FDCWD, path, UIO_SYSSPACE, args->mode, 0); LFREEPATH(path); @@ -686,11 +618,6 @@ linux_fchmodat(struct thread *td, struct linux_fchmoda dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; LCONVPATHEXIST_AT(td, args->filename, &path, dfd); -#ifdef DEBUG - if (ldebug(fchmodat)) - printf(ARGS(fchmodat, "%s, %d"), path, args->mode); -#endif - error = kern_fchmodat(td, dfd, path, UIO_SYSSPACE, args->mode, 0); LFREEPATH(path); return (error); @@ -705,10 +632,6 @@ linux_mkdir(struct thread *td, struct linux_mkdir_args LCONVPATHCREAT(td, args->path, &path); -#ifdef DEBUG - if (ldebug(mkdir)) - printf(ARGS(mkdir, "%s, %d"), path, args->mode); -#endif error = kern_mkdirat(td, AT_FDCWD, path, UIO_SYSSPACE, args->mode); LFREEPATH(path); return (error); @@ -724,10 +647,6 @@ linux_mkdirat(struct thread *td, struct linux_mkdirat_ dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; LCONVPATHCREAT_AT(td, args->pathname, &path, dfd); -#ifdef DEBUG - if (ldebug(mkdirat)) - printf(ARGS(mkdirat, "%s, %d"), path, args->mode); -#endif error = kern_mkdirat(td, dfd, path, UIO_SYSSPACE, args->mode); LFREEPATH(path); return (error); @@ -742,10 +661,6 @@ linux_rmdir(struct thread *td, struct linux_rmdir_args LCONVPATHEXIST(td, args->path, &path); -#ifdef DEBUG - if (ldebug(rmdir)) - printf(ARGS(rmdir, "%s"), path); -#endif error = kern_rmdirat(td, AT_FDCWD, path, UIO_SYSSPACE); LFREEPATH(path); return (error); @@ -765,10 +680,6 @@ linux_rename(struct thread *td, struct linux_rename_ar return (error); } -#ifdef DEBUG - if (ldebug(rename)) - printf(ARGS(rename, "%s, %s"), from, to); -#endif error = kern_renameat(td, AT_FDCWD, from, AT_FDCWD, to, UIO_SYSSPACE); LFREEPATH(from); LFREEPATH(to); @@ -812,10 +723,6 @@ linux_renameat2(struct thread *td, struct linux_rename return (error); } -#ifdef DEBUG - if (ldebug(renameat)) - printf(ARGS(renameat, "%s, %s"), from, to); -#endif error = kern_renameat(td, olddfd, from, newdfd, to, UIO_SYSSPACE); LFREEPATH(from); LFREEPATH(to); @@ -837,10 +744,6 @@ linux_symlink(struct thread *td, struct linux_symlink_ return (error); } -#ifdef DEBUG - if (ldebug(symlink)) - printf(ARGS(symlink, "%s, %s"), path, to); -#endif error = kern_symlinkat(td, path, AT_FDCWD, to, UIO_SYSSPACE); LFREEPATH(path); LFREEPATH(to); @@ -863,11 +766,6 @@ linux_symlinkat(struct thread *td, struct linux_symlin return (error); } -#ifdef DEBUG - if (ldebug(symlinkat)) - printf(ARGS(symlinkat, "%s, %s"), path, to); -#endif - error = kern_symlinkat(td, path, dfd, to, UIO_SYSSPACE); LFREEPATH(path); LFREEPATH(to); @@ -883,11 +781,6 @@ linux_readlink(struct thread *td, struct linux_readlin LCONVPATHEXIST(td, args->name, &name); -#ifdef DEBUG - if (ldebug(readlink)) - printf(ARGS(readlink, "%s, %p, %d"), name, (void *)args->buf, - args->count); -#endif error = kern_readlinkat(td, AT_FDCWD, name, UIO_SYSSPACE, args->buf, UIO_USERSPACE, args->count); LFREEPATH(name); @@ -904,12 +797,6 @@ linux_readlinkat(struct thread *td, struct linux_readl dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; LCONVPATHEXIST_AT(td, args->path, &name, dfd); -#ifdef DEBUG - if (ldebug(readlinkat)) - printf(ARGS(readlinkat, "%s, %p, %d"), name, (void *)args->buf, - args->bufsiz); -#endif - error = kern_readlinkat(td, dfd, name, UIO_SYSSPACE, args->buf, UIO_USERSPACE, args->bufsiz); LFREEPATH(name); @@ -923,11 +810,6 @@ linux_truncate(struct thread *td, struct linux_truncat int error; LCONVPATHEXIST(td, args->path, &path); -#ifdef DEBUG - if (ldebug(truncate)) - printf(ARGS(truncate, "%s, %ld"), path, (long)args->length); -#endif - error = kern_truncate(td, path, UIO_SYSSPACE, args->length); LFREEPATH(path); return (error); @@ -949,11 +831,6 @@ linux_truncate64(struct thread *td, struct linux_trunc LCONVPATHEXIST(td, args->path, &path); -#ifdef DEBUG - if (ldebug(truncate64)) - printf(ARGS(truncate64, "%s, %jd"), path, length); -#endif - error = kern_truncate(td, path, UIO_SYSSPACE, length); LFREEPATH(path); return (error); @@ -998,10 +875,6 @@ linux_link(struct thread *td, struct linux_link_args * return (error); } -#ifdef DEBUG - if (ldebug(link)) - printf(ARGS(link, "%s, %s"), path, to); -#endif error = kern_linkat(td, AT_FDCWD, AT_FDCWD, path, to, UIO_SYSSPACE, FOLLOW); LFREEPATH(path); @@ -1029,12 +902,6 @@ linux_linkat(struct thread *td, struct linux_linkat_ar return (error); } -#ifdef DEBUG - if (ldebug(linkat)) - printf(ARGS(linkat, "%i, %s, %i, %s, %i"), args->olddfd, path, - args->newdfd, to, args->flag); -#endif - follow = (args->flag & LINUX_AT_SYMLINK_FOLLOW) == 0 ? NOFOLLOW : FOLLOW; error = kern_linkat(td, olddfd, newdfd, path, to, UIO_SYSSPACE, follow); @@ -1189,12 +1056,6 @@ linux_mount(struct thread *td, struct linux_mount_args if (error != 0) goto out; -#ifdef DEBUG - if (ldebug(mount)) - printf(ARGS(mount, "%s, %s, %s"), - fstypename, mntfromname, mntonname); -#endif - if (strcmp(fstypename, "ext2") == 0) { strcpy(fstypename, "ext2fs"); } else if (strcmp(fstypename, "proc") == 0) { @@ -1503,11 +1364,6 @@ int linux_fcntl(struct thread *td, struct linux_fcntl_args *args) { -#ifdef DEBUG - if (ldebug(fcntl)) - printf(ARGS(fcntl, "%d, %08x, *"), args->fd, args->cmd); -#endif - return (fcntl_common(td, args)); } @@ -1520,11 +1376,6 @@ linux_fcntl64(struct thread *td, struct linux_fcntl64_ struct linux_fcntl_args fcntl_args; int error; -#ifdef DEBUG - if (ldebug(fcntl64)) - printf(ARGS(fcntl64, "%d, %08x, *"), args->fd, args->cmd); -#endif - switch (args->cmd) { case LINUX_F_GETLK64: error = copyin((void *)args->arg, &linux_flock, @@ -1574,10 +1425,6 @@ linux_chown(struct thread *td, struct linux_chown_args LCONVPATHEXIST(td, args->path, &path); -#ifdef DEBUG - if (ldebug(chown)) - printf(ARGS(chown, "%s, %d, %d"), path, args->uid, args->gid); -#endif error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, args->uid, args->gid, 0); LFREEPATH(path); @@ -1597,11 +1444,6 @@ linux_fchownat(struct thread *td, struct linux_fchowna dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; LCONVPATHEXIST_AT(td, args->filename, &path, dfd); -#ifdef DEBUG - if (ldebug(fchownat)) - printf(ARGS(fchownat, "%s, %d, %d"), path, args->uid, args->gid); -#endif - flag = (args->flag & LINUX_AT_SYMLINK_NOFOLLOW) == 0 ? 0 : AT_SYMLINK_NOFOLLOW; error = kern_fchownat(td, dfd, path, UIO_SYSSPACE, args->uid, args->gid, @@ -1619,10 +1461,6 @@ linux_lchown(struct thread *td, struct linux_lchown_ar LCONVPATHEXIST(td, args->path, &path); -#ifdef DEBUG - if (ldebug(lchown)) - printf(ARGS(lchown, "%s, %d, %d"), path, args->uid, args->gid); -#endif error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, args->uid, args->gid, AT_SYMLINK_NOFOLLOW); LFREEPATH(path); @@ -1698,11 +1536,6 @@ linux_pipe(struct thread *td, struct linux_pipe_args * int fildes[2]; int error; -#ifdef DEBUG - if (ldebug(pipe)) - printf(ARGS(pipe, "*")); -#endif - error = kern_pipe(td, fildes, 0, NULL, NULL); if (error != 0) return (error); @@ -1722,11 +1555,6 @@ linux_pipe2(struct thread *td, struct linux_pipe2_args { int fildes[2]; int error, flags; - -#ifdef DEBUG - if (ldebug(pipe2)) - printf(ARGS(pipe2, "*, %d"), args->flags); -#endif if ((args->flags & ~(LINUX_O_NONBLOCK | LINUX_O_CLOEXEC)) != 0) return (EINVAL); Modified: stable/12/sys/compat/linux/linux_fork.c ============================================================================== --- stable/12/sys/compat/linux/linux_fork.c Mon Aug 24 16:45:23 2020 (r364711) +++ stable/12/sys/compat/linux/linux_fork.c Mon Aug 24 17:06:34 2020 (r364712) @@ -74,11 +74,6 @@ linux_fork(struct thread *td, struct linux_fork_args * struct proc *p2; struct thread *td2; -#ifdef DEBUG - if (ldebug(fork)) - printf(ARGS(fork, "")); -#endif - bzero(&fr, sizeof(fr)); fr.fr_flags = RFFDG | RFPROC | RFSTOPPED; fr.fr_procp = &p2; @@ -110,11 +105,6 @@ linux_vfork(struct thread *td, struct linux_vfork_args struct proc *p2; struct thread *td2; -#ifdef DEBUG - if (ldebug(vfork)) - printf(ARGS(vfork, "")); -#endif - bzero(&fr, sizeof(fr)); fr.fr_flags = RFFDG | RFPROC | RFMEM | RFPPWAIT | RFSTOPPED; fr.fr_procp = &p2; @@ -149,14 +139,6 @@ linux_clone_proc(struct thread *td, struct linux_clone int exit_signal; struct linux_emuldata *em; -#ifdef DEBUG - if (ldebug(clone)) { - printf(ARGS(clone, "flags %x, stack %p, parent tid: %p, " - "child tid: %p"), (unsigned)args->flags, - args->stack, args->parent_tidptr, args->child_tidptr); - } -#endif - exit_signal = args->flags & 0x000000ff; if (LINUX_SIG_VALID(exit_signal)) { exit_signal = linux_to_bsd_signal(exit_signal); @@ -212,7 +194,7 @@ linux_clone_proc(struct thread *td, struct linux_clone error = copyout(&p2->p_pid, args->parent_tidptr, sizeof(p2->p_pid)); if (error) - printf(LMSG("copyout failed!")); + linux_msg(td, "copyout p_pid failed!"); } PROC_LOCK(p2); @@ -240,13 +222,6 @@ linux_clone_proc(struct thread *td, struct linux_clone sx_xunlock(&proctree_lock); } -#ifdef DEBUG - if (ldebug(clone)) - printf(LMSG("clone: successful rfork to %d, " - "stack %p sig = %d"), (int)p2->p_pid, args->stack, - exit_signal); -#endif - /* * Make this runnable after we are finished with it. */ @@ -268,14 +243,6 @@ linux_clone_thread(struct thread *td, struct linux_clo struct proc *p; int error; -#ifdef DEBUG - if (ldebug(clone)) { - printf(ARGS(clone, "thread: flags %x, stack %p, parent tid: %p, " - "child tid: %p"), (unsigned)args->flags, - args->stack, args->parent_tidptr, args->child_tidptr); - } -#endif - LINUX_CTR4(clone_thread, "thread(%d) flags %x ptid %p ctid %p", td->td_tid, (unsigned)args->flags, args->parent_tidptr, args->child_tidptr); @@ -360,12 +327,6 @@ linux_clone_thread(struct thread *td, struct linux_clo tidhash_add(newtd); -#ifdef DEBUG - if (ldebug(clone)) - printf(ARGS(clone, "successful clone to %d, stack %p"), - (int)newtd->td_tid, args->stack); -#endif - LINUX_CTR2(clone_thread, "thread(%d) successful clone to %d", td->td_tid, newtd->td_tid); @@ -373,7 +334,7 @@ linux_clone_thread(struct thread *td, struct linux_clo error = copyout(&newtd->td_tid, args->parent_tidptr, sizeof(newtd->td_tid)); if (error) - printf(LMSG("clone_thread: copyout failed!")); + linux_msg(td, "clone_thread: copyout td_tid failed!"); } /* Modified: stable/12/sys/compat/linux/linux_getcwd.c ============================================================================== --- stable/12/sys/compat/linux/linux_getcwd.c Mon Aug 24 16:45:23 2020 (r364711) +++ stable/12/sys/compat/linux/linux_getcwd.c Mon Aug 24 17:06:34 2020 (r364712) @@ -65,11 +65,6 @@ linux_getcwd(struct thread *td, struct linux_getcwd_ar char *path; int error, lenused; -#ifdef DEBUG - if (ldebug(getcwd)) - printf(ARGS(getcwd, "%p, %ld"), args->buf, (long)args->bufsize); -#endif - /* * Linux returns ERANGE instead of EINVAL. */ Modified: stable/12/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/12/sys/compat/linux/linux_ioctl.c Mon Aug 24 16:45:23 2020 (r364711) +++ stable/12/sys/compat/linux/linux_ioctl.c Mon Aug 24 17:06:34 2020 (r364712) @@ -241,12 +241,7 @@ linux_ioctl_hdio(struct thread *td, struct linux_ioctl */ bytespercyl = (off_t) sectorsize * fwheads * fwsectors; fwcylinders = mediasize / bytespercyl; -#if defined(DEBUG) - linux_msg(td, "HDIO_GET_GEO: mediasize %jd, c/h/s %d/%d/%d, " - "bpc %jd", - (intmax_t)mediasize, fwcylinders, fwheads, fwsectors, - (intmax_t)bytespercyl); -#endif + if ((args->cmd & 0xffff) == LINUX_HDIO_GET_GEO) { struct linux_hd_geometry hdg; @@ -438,19 +433,6 @@ bsd_to_linux_termios(struct termios *bios, struct linu { int i; -#ifdef DEBUG - if (ldebug(ioctl)) { - printf("LINUX: BSD termios structure (input):\n"); - printf("i=%08x o=%08x c=%08x l=%08x ispeed=%d ospeed=%d\n", - bios->c_iflag, bios->c_oflag, bios->c_cflag, bios->c_lflag, - bios->c_ispeed, bios->c_ospeed); - printf("c_cc "); - for (i=0; ic_cc[i]); - printf("\n"); - } -#endif - lios->c_iflag = 0; if (bios->c_iflag & IGNBRK) lios->c_iflag |= LINUX_IGNBRK; @@ -561,19 +543,6 @@ bsd_to_linux_termios(struct termios *bios, struct linu lios->c_cc[i] = LINUX_POSIX_VDISABLE; } lios->c_line = 0; - -#ifdef DEBUG - if (ldebug(ioctl)) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Aug 24 17:20:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6E143C8797; Mon, 24 Aug 2020 17:20:56 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZzRX4HqHz3y1w; Mon, 24 Aug 2020 17:20:56 +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 76AF41C10A; Mon, 24 Aug 2020 17:20:56 +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 07OHKurr008664; Mon, 24 Aug 2020 17:20:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OHKoTr008633; Mon, 24 Aug 2020 17:20:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202008241720.07OHKoTr008633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 24 Aug 2020 17:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r364713 - in vendor/llvm-project/release-11.x: clang/include/clang/Basic clang/include/clang/Driver clang/lib/AST clang/lib/Basic clang/lib/Basic/Targets clang/lib/CodeGen clang/lib/Dri... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm-project/release-11.x: clang/include/clang/Basic clang/include/clang/Driver clang/lib/AST clang/lib/Basic clang/lib/Basic/Targets clang/lib/CodeGen clang/lib/Driver/ToolChains clang/lib/... X-SVN-Commit-Revision: 364713 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 17:20:56 -0000 Author: dim Date: Mon Aug 24 17:20:50 2020 New Revision: 364713 URL: https://svnweb.freebsd.org/changeset/base/364713 Log: Vendor import of llvm-project branch release/11.x llvmorg-11.0.0-rc2-0-g414f32a9e86. Modified: vendor/llvm-project/release-11.x/clang/include/clang/Basic/TargetOptions.h vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td vendor/llvm-project/release-11.x/clang/lib/AST/ASTContext.cpp vendor/llvm-project/release-11.x/clang/lib/Basic/Targets.cpp vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/OSTargets.h vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/PPC.h vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/Sparc.cpp vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/WebAssembly.cpp vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/WebAssembly.h vendor/llvm-project/release-11.x/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Arch/AArch64.cpp vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Arch/X86.cpp vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp vendor/llvm-project/release-11.x/libunwind/src/AddressSpace.hpp vendor/llvm-project/release-11.x/lld/docs/ReleaseNotes.rst vendor/llvm-project/release-11.x/lld/docs/conf.py vendor/llvm-project/release-11.x/llvm/include/llvm/MC/MCDwarf.h vendor/llvm-project/release-11.x/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp vendor/llvm-project/release-11.x/llvm/lib/Support/X86TargetParser.cpp vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64FrameLowering.h vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.h vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.td vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64StackOffset.h vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCInstrInfo.h vendor/llvm-project/release-11.x/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp vendor/llvm-project/release-11.x/llvm/lib/Target/RISCV/RISCVInstrInfo.td vendor/llvm-project/release-11.x/llvm/lib/Target/X86/X86ISelLowering.cpp vendor/llvm-project/release-11.x/llvm/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm-project/release-11.x/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp Modified: vendor/llvm-project/release-11.x/clang/include/clang/Basic/TargetOptions.h ============================================================================== --- vendor/llvm-project/release-11.x/clang/include/clang/Basic/TargetOptions.h Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/clang/include/clang/Basic/TargetOptions.h Mon Aug 24 17:20:50 2020 (r364713) @@ -54,6 +54,10 @@ class TargetOptions { (public) /// be a list of strings starting with by '+' or '-'. std::vector Features; + /// The map of which features have been enabled disabled based on the command + /// line. + llvm::StringMap FeatureMap; + /// Supported OpenCL extensions and optional core features. OpenCLOptions SupportedOpenCLOptions; Modified: vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td ============================================================================== --- vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td Mon Aug 24 17:20:50 2020 (r364713) @@ -1780,7 +1780,7 @@ def fstack_protector_all : Flag<["-"], "fstack-protect HelpText<"Enable stack protectors for all functions">; def fstack_clash_protection : Flag<["-"], "fstack-clash-protection">, Group, Flags<[CC1Option]>, HelpText<"Enable stack clash protection">; -def fnostack_clash_protection : Flag<["-"], "fnostack-clash-protection">, Group, +def fno_stack_clash_protection : Flag<["-"], "fno-stack-clash-protection">, Group, HelpText<"Disable stack clash protection">; def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, Group, HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. " Modified: vendor/llvm-project/release-11.x/clang/lib/AST/ASTContext.cpp ============================================================================== --- vendor/llvm-project/release-11.x/clang/lib/AST/ASTContext.cpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/clang/lib/AST/ASTContext.cpp Mon Aug 24 17:20:50 2020 (r364713) @@ -11147,8 +11147,7 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap std::vector Features(FeaturesTmp.begin(), FeaturesTmp.end()); Target->initFeatureMap(FeatureMap, getDiagnostics(), TargetCPU, Features); } else { - Target->initFeatureMap(FeatureMap, getDiagnostics(), TargetCPU, - Target->getTargetOpts().Features); + FeatureMap = Target->getTargetOpts().FeatureMap; } } Modified: vendor/llvm-project/release-11.x/clang/lib/Basic/Targets.cpp ============================================================================== --- vendor/llvm-project/release-11.x/clang/lib/Basic/Targets.cpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/clang/lib/Basic/Targets.cpp Mon Aug 24 17:20:50 2020 (r364713) @@ -346,6 +346,8 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple, return new FreeBSDTargetInfo(Triple, Opts); case llvm::Triple::NetBSD: return new NetBSDTargetInfo(Triple, Opts); + case llvm::Triple::OpenBSD: + return new OpenBSDTargetInfo(Triple, Opts); case llvm::Triple::AIX: return new AIXPPC64TargetInfo(Triple, Opts); default: @@ -358,6 +360,8 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple, return new LinuxTargetInfo(Triple, Opts); case llvm::Triple::NetBSD: return new NetBSDTargetInfo(Triple, Opts); + case llvm::Triple::OpenBSD: + return new OpenBSDTargetInfo(Triple, Opts); default: return new PPC64TargetInfo(Triple, Opts); } @@ -387,6 +391,8 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple, switch (os) { case llvm::Triple::FreeBSD: return new FreeBSDTargetInfo(Triple, Opts); + case llvm::Triple::OpenBSD: + return new OpenBSDTargetInfo(Triple, Opts); case llvm::Triple::Fuchsia: return new FuchsiaTargetInfo(Triple, Opts); case llvm::Triple::Linux: @@ -662,14 +668,13 @@ TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags, // Compute the default target features, we need the target to handle this // because features may have dependencies on one another. - llvm::StringMap Features; - if (!Target->initFeatureMap(Features, Diags, Opts->CPU, + if (!Target->initFeatureMap(Opts->FeatureMap, Diags, Opts->CPU, Opts->FeaturesAsWritten)) return nullptr; // Add the features to the compile options. Opts->Features.clear(); - for (const auto &F : Features) + for (const auto &F : Opts->FeatureMap) Opts->Features.push_back((F.getValue() ? "+" : "-") + F.getKey().str()); // Sort here, so we handle the features in a predictable order. (This matters // when we're dealing with features that overlap.) Modified: vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/OSTargets.h ============================================================================== --- vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/OSTargets.h Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/OSTargets.h Mon Aug 24 17:20:50 2020 (r364713) @@ -465,6 +465,9 @@ class LLVM_LIBRARY_VISIBILITY OpenBSDTargetInfo : publ public: OpenBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : OSTargetInfo(Triple, Opts) { + this->WCharType = this->WIntType = this->SignedInt; + this->IntMaxType = TargetInfo::SignedLongLong; + this->Int64Type = TargetInfo::SignedLongLong; switch (Triple.getArch()) { case llvm::Triple::x86: case llvm::Triple::x86_64: @@ -476,6 +479,8 @@ class LLVM_LIBRARY_VISIBILITY OpenBSDTargetInfo : publ case llvm::Triple::mips64: case llvm::Triple::mips64el: case llvm::Triple::ppc: + case llvm::Triple::ppc64: + case llvm::Triple::ppc64le: case llvm::Triple::sparcv9: this->MCountName = "_mcount"; break; Modified: vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/PPC.h ============================================================================== --- vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/PPC.h Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/PPC.h Mon Aug 24 17:20:50 2020 (r364713) @@ -414,8 +414,8 @@ class LLVM_LIBRARY_VISIBILITY PPC64TargetInfo : public ABI = "elfv1"; } - if (Triple.isOSFreeBSD() || Triple.getOS() == llvm::Triple::AIX || - Triple.isMusl()) { + if (Triple.isOSFreeBSD() || Triple.isOSOpenBSD() || + Triple.getOS() == llvm::Triple::AIX || Triple.isMusl()) { LongDoubleWidth = LongDoubleAlign = 64; LongDoubleFormat = &llvm::APFloat::IEEEdouble(); } Modified: vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/Sparc.cpp ============================================================================== --- vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/Sparc.cpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/Sparc.cpp Mon Aug 24 17:20:50 2020 (r364713) @@ -240,6 +240,11 @@ void SparcV9TargetInfo::getTargetDefines(const LangOpt Builder.defineMacro("__sparc_v9__"); Builder.defineMacro("__sparcv9__"); } + + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1"); + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2"); + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4"); + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8"); } void SparcV9TargetInfo::fillValidCPUList( Modified: vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/WebAssembly.cpp ============================================================================== --- vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/WebAssembly.cpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/WebAssembly.cpp Mon Aug 24 17:20:50 2020 (r364713) @@ -96,19 +96,43 @@ void WebAssemblyTargetInfo::getTargetDefines(const Lan } void WebAssemblyTargetInfo::setSIMDLevel(llvm::StringMap &Features, - SIMDEnum Level) { + SIMDEnum Level, bool Enabled) { + if (Enabled) { + switch (Level) { + case UnimplementedSIMD128: + Features["unimplemented-simd128"] = true; + LLVM_FALLTHROUGH; + case SIMD128: + Features["simd128"] = true; + LLVM_FALLTHROUGH; + case NoSIMD: + break; + } + return; + } + switch (Level) { - case UnimplementedSIMD128: - Features["unimplemented-simd128"] = true; - LLVM_FALLTHROUGH; + case NoSIMD: case SIMD128: - Features["simd128"] = true; + Features["simd128"] = false; LLVM_FALLTHROUGH; - case NoSIMD: + case UnimplementedSIMD128: + Features["unimplemented-simd128"] = false; break; } } +void WebAssemblyTargetInfo::setFeatureEnabled(llvm::StringMap &Features, + StringRef Name, + bool Enabled) const { + if (Name == "simd128") + setSIMDLevel(Features, SIMD128, Enabled); + else if (Name == "unimplemented-simd128") + setSIMDLevel(Features, UnimplementedSIMD128, Enabled); + else + Features[Name] = Enabled; +} + bool WebAssemblyTargetInfo::initFeatureMap( llvm::StringMap &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector &FeaturesVec) const { @@ -119,30 +143,8 @@ bool WebAssemblyTargetInfo::initFeatureMap( Features["atomics"] = true; Features["mutable-globals"] = true; Features["tail-call"] = true; - setSIMDLevel(Features, SIMD128); + setSIMDLevel(Features, SIMD128, true); } - // Other targets do not consider user-configured features here, but while we - // are actively developing new features it is useful to let user-configured - // features control availability of builtins - setSIMDLevel(Features, SIMDLevel); - if (HasNontrappingFPToInt) - Features["nontrapping-fptoint"] = true; - if (HasSignExt) - Features["sign-ext"] = true; - if (HasExceptionHandling) - Features["exception-handling"] = true; - if (HasBulkMemory) - Features["bulk-memory"] = true; - if (HasAtomics) - Features["atomics"] = true; - if (HasMutableGlobals) - Features["mutable-globals"] = true; - if (HasMultivalue) - Features["multivalue"] = true; - if (HasTailCall) - Features["tail-call"] = true; - if (HasReferenceTypes) - Features["reference-types"] = true; return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec); } Modified: vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/WebAssembly.h ============================================================================== --- vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/WebAssembly.h Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/WebAssembly.h Mon Aug 24 17:20:50 2020 (r364713) @@ -69,13 +69,17 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyTargetInfo : MacroBuilder &Builder) const override; private: - static void setSIMDLevel(llvm::StringMap &Features, SIMDEnum Level); + static void setSIMDLevel(llvm::StringMap &Features, SIMDEnum Level, + bool Enabled); bool initFeatureMap(llvm::StringMap &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector &FeaturesVec) const override; bool hasFeature(StringRef Feature) const final; + + void setFeatureEnabled(llvm::StringMap &Features, StringRef Name, + bool Enabled) const final; bool handleTargetFeatures(std::vector &Features, DiagnosticsEngine &Diags) final; Modified: vendor/llvm-project/release-11.x/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp ============================================================================== --- vendor/llvm-project/release-11.x/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp Mon Aug 24 17:20:50 2020 (r364713) @@ -4956,11 +4956,7 @@ bool CGOpenMPRuntimeNVPTX::hasAllocateAttributeForGlob static CudaArch getCudaArch(CodeGenModule &CGM) { if (!CGM.getTarget().hasFeature("ptx")) return CudaArch::UNKNOWN; - llvm::StringMap Features; - CGM.getTarget().initFeatureMap(Features, CGM.getDiags(), - CGM.getTarget().getTargetOpts().CPU, - CGM.getTarget().getTargetOpts().Features); - for (const auto &Feature : Features) { + for (const auto &Feature : CGM.getTarget().getTargetOpts().FeatureMap) { if (Feature.getValue()) { CudaArch Arch = StringToCudaArch(Feature.getKey()); if (Arch != CudaArch::UNKNOWN) Modified: vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Arch/AArch64.cpp ============================================================================== --- vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Arch/AArch64.cpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Arch/AArch64.cpp Mon Aug 24 17:20:50 2020 (r364713) @@ -370,9 +370,11 @@ fp16_fml_fallthrough: V8_6Pos = Features.insert(std::next(V8_6Pos), {"+i8mm", "+bf16"}); if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access, - options::OPT_munaligned_access)) + options::OPT_munaligned_access)) { if (A->getOption().matches(options::OPT_mno_unaligned_access)) Features.push_back("+strict-align"); + } else if (Triple.isOSOpenBSD()) + Features.push_back("+strict-align"); if (Args.hasArg(options::OPT_ffixed_x1)) Features.push_back("+reserve-x1"); Modified: vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Arch/X86.cpp ============================================================================== --- vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Arch/X86.cpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Arch/X86.cpp Mon Aug 24 17:20:50 2020 (r364713) @@ -93,13 +93,13 @@ const char *x86::getX86TargetCPU(const ArgList &Args, return "x86-64"; switch (Triple.getOS()) { - case llvm::Triple::FreeBSD: - return "i686"; case llvm::Triple::NetBSD: - case llvm::Triple::OpenBSD: return "i486"; case llvm::Triple::Haiku: + case llvm::Triple::OpenBSD: return "i586"; + case llvm::Triple::FreeBSD: + return "i686"; default: // Fallback to p4. return "pentium4"; Modified: vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp ============================================================================== --- vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp Mon Aug 24 17:20:50 2020 (r364713) @@ -1879,8 +1879,8 @@ void Clang::AddPPCTargetArgs(const ArgList &Args, ABIName = "elfv1-qpx"; break; } - - if (T.isMusl() || (T.isOSFreeBSD() && T.getOSMajorVersion() >= 13)) + if ((T.isOSFreeBSD() && T.getOSMajorVersion() >= 13) || + T.isOSOpenBSD() || T.isMusl()) ABIName = "elfv2"; else ABIName = "elfv1"; @@ -2971,7 +2971,7 @@ static void RenderSCPOptions(const ToolChain &TC, cons return; if (Args.hasFlag(options::OPT_fstack_clash_protection, - options::OPT_fnostack_clash_protection, false)) + options::OPT_fno_stack_clash_protection, false)) CmdArgs.push_back("-fstack-clash-protection"); } Modified: vendor/llvm-project/release-11.x/libunwind/src/AddressSpace.hpp ============================================================================== --- vendor/llvm-project/release-11.x/libunwind/src/AddressSpace.hpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/libunwind/src/AddressSpace.hpp Mon Aug 24 17:20:50 2020 (r364713) @@ -452,10 +452,12 @@ struct _LIBUNWIND_HIDDEN dl_iterate_cb_data { #error "_LIBUNWIND_SUPPORT_DWARF_UNWIND requires _LIBUNWIND_SUPPORT_DWARF_INDEX on this platform." #endif +#if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE) #include "FrameHeaderCache.hpp" // There should be just one of these per process. static FrameHeaderCache ProcessFrameHeaderCache; +#endif static bool checkAddrInSegment(const Elf_Phdr *phdr, size_t image_base, dl_iterate_cb_data *cbdata) { @@ -476,8 +478,10 @@ int findUnwindSectionsByPhdr(struct dl_phdr_info *pinf auto cbdata = static_cast(data); if (pinfo->dlpi_phnum == 0 || cbdata->targetAddr < pinfo->dlpi_addr) return 0; +#if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE) if (ProcessFrameHeaderCache.find(pinfo, pinfo_size, data)) return 1; +#endif Elf_Addr image_base = calculateImageBase(pinfo); bool found_obj = false; @@ -505,7 +509,9 @@ int findUnwindSectionsByPhdr(struct dl_phdr_info *pinf found_obj = checkAddrInSegment(phdr, image_base, cbdata); } if (found_obj && found_hdr) { +#if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE) ProcessFrameHeaderCache.add(cbdata->sects); +#endif return 1; } } Modified: vendor/llvm-project/release-11.x/lld/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm-project/release-11.x/lld/docs/ReleaseNotes.rst Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/lld/docs/ReleaseNotes.rst Mon Aug 24 17:20:50 2020 (r364713) @@ -28,6 +28,10 @@ ELF Improvements chrome://tracing. The file can be specified with ``--time-trace-file``. Trace granularity can be specified with ``--time-trace-granularity``. (`D71060 `_) +* For ARM architectures the default max page size was increased to 64k. + This increases compatibility with systems where a non standard page + size was configured. This also is inline with GNU ld defaults. + (`D77330 `_) * ... Breaking changes @@ -40,12 +44,17 @@ Breaking changes COFF Improvements ----------------- -* ... +* Fixed exporting symbols whose names contain a period (``.``), which was + a regression in lld 7. MinGW Improvements ------------------ -* ... +* Implemented new options for disabling auto import and runtime pseudo + relocations (``--disable-auto-import`` and + ``--disable-runtime-pseudo-reloc``), the ``--no-seh`` flag and options + for selecting file and section alignment (``--file-alignment`` and + ``--section-alignment``). MachO Improvements ------------------ Modified: vendor/llvm-project/release-11.x/lld/docs/conf.py ============================================================================== --- vendor/llvm-project/release-11.x/lld/docs/conf.py Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/lld/docs/conf.py Mon Aug 24 17:20:50 2020 (r364713) @@ -134,7 +134,7 @@ html_last_updated_fmt = '%Y-%m-%d' #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -html_sidebars = {'index': 'indexsidebar.html'} +html_sidebars = {'index': ['indexsidebar.html']} # Additional templates that should be rendered to pages, maps page names to # template names. Modified: vendor/llvm-project/release-11.x/llvm/include/llvm/MC/MCDwarf.h ============================================================================== --- vendor/llvm-project/release-11.x/llvm/include/llvm/MC/MCDwarf.h Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/llvm/include/llvm/MC/MCDwarf.h Mon Aug 24 17:20:50 2020 (r364713) @@ -467,10 +467,12 @@ class MCCFIInstruction { (private) unsigned Register2; }; std::vector Values; + std::string Comment; - MCCFIInstruction(OpType Op, MCSymbol *L, unsigned R, int O, StringRef V) + MCCFIInstruction(OpType Op, MCSymbol *L, unsigned R, int O, StringRef V, + StringRef Comment = "") : Operation(Op), Label(L), Register(R), Offset(O), - Values(V.begin(), V.end()) { + Values(V.begin(), V.end()), Comment(Comment) { assert(Op != OpRegister); } @@ -570,8 +572,9 @@ class MCCFIInstruction { (private) /// .cfi_escape Allows the user to add arbitrary bytes to the unwind /// info. - static MCCFIInstruction createEscape(MCSymbol *L, StringRef Vals) { - return MCCFIInstruction(OpEscape, L, 0, 0, Vals); + static MCCFIInstruction createEscape(MCSymbol *L, StringRef Vals, + StringRef Comment = "") { + return MCCFIInstruction(OpEscape, L, 0, 0, Vals, Comment); } /// A special wrapper for .cfi_escape that indicates GNU_ARGS_SIZE @@ -605,6 +608,10 @@ class MCCFIInstruction { (private) StringRef getValues() const { assert(Operation == OpEscape); return StringRef(&Values[0], Values.size()); + } + + StringRef getComment() const { + return Comment; } }; Modified: vendor/llvm-project/release-11.x/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp Mon Aug 24 17:20:50 2020 (r364713) @@ -241,6 +241,7 @@ void AsmPrinter::emitCFIInstruction(const MCCFIInstruc OutStreamer->emitCFIGnuArgsSize(Inst.getOffset()); break; case MCCFIInstruction::OpEscape: + OutStreamer->AddComment(Inst.getComment()); OutStreamer->emitCFIEscape(Inst.getValues()); break; case MCCFIInstruction::OpRestore: Modified: vendor/llvm-project/release-11.x/llvm/lib/Support/X86TargetParser.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/Support/X86TargetParser.cpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/llvm/lib/Support/X86TargetParser.cpp Mon Aug 24 17:20:50 2020 (r364713) @@ -37,6 +37,10 @@ class FeatureBitset { (public) set(I); } + bool any() const { + return llvm::any_of(Bits, [](uint64_t V) { return V != 0; }); + } + constexpr FeatureBitset &set(unsigned I) { // GCC <6.2 crashes if this is written in a single statement. uint32_t NewBits = Bits[I / 32] | (uint32_t(1) << (I % 32)); @@ -89,6 +93,13 @@ class FeatureBitset { (public) Result.Bits[I] = ~Bits[I]; return Result; } + + constexpr bool operator!=(const FeatureBitset &RHS) const { + for (unsigned I = 0, E = array_lengthof(Bits); I != E; ++I) + if (Bits[I] != RHS.Bits[I]) + return true; + return false; + } }; struct ProcInfo { @@ -552,11 +563,17 @@ void llvm::X86::getFeaturesForCPU(StringRef CPU, // For each feature that is (transitively) implied by this feature, set it. static void getImpliedEnabledFeatures(FeatureBitset &Bits, const FeatureBitset &Implies) { + // Fast path: Implies is often empty. + if (!Implies.any()) + return; + FeatureBitset Prev; Bits |= Implies; - for (unsigned i = 0; i != CPU_FEATURE_MAX; ++i) { - if (Implies[i]) - getImpliedEnabledFeatures(Bits, FeatureInfos[i].ImpliedFeatures); - } + do { + Prev = Bits; + for (unsigned i = CPU_FEATURE_MAX; i;) + if (Bits[--i]) + Bits |= FeatureInfos[i].ImpliedFeatures; + } while (Prev != Bits); } /// Create bit vector of features that are implied disabled if the feature @@ -564,12 +581,14 @@ static void getImpliedEnabledFeatures(FeatureBitset &B static void getImpliedDisabledFeatures(FeatureBitset &Bits, unsigned Value) { // Check all features looking for any dependent on this feature. If we find // one, mark it and recursively find any feature that depend on it. - for (unsigned i = 0; i != CPU_FEATURE_MAX; ++i) { - if (FeatureInfos[i].ImpliedFeatures[Value]) { - Bits.set(i); - getImpliedDisabledFeatures(Bits, i); - } - } + FeatureBitset Prev; + Bits.set(Value); + do { + Prev = Bits; + for (unsigned i = 0; i != CPU_FEATURE_MAX; ++i) + if ((FeatureInfos[i].ImpliedFeatures & Bits).any()) + Bits.set(i); + } while (Prev != Bits); } void llvm::X86::getImpliedFeatures( Modified: vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp Mon Aug 24 17:20:50 2020 (r364713) @@ -148,6 +148,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/LEB128.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetMachine.h" @@ -399,12 +400,102 @@ static bool ShouldSignReturnAddress(MachineFunction &M return false; } +// Convenience function to create a DWARF expression for +// Expr + NumBytes + NumVGScaledBytes * AArch64::VG +static void appendVGScaledOffsetExpr(SmallVectorImpl &Expr, + int NumBytes, int NumVGScaledBytes, unsigned VG, + llvm::raw_string_ostream &Comment) { + uint8_t buffer[16]; + + if (NumBytes) { + Expr.push_back(dwarf::DW_OP_consts); + Expr.append(buffer, buffer + encodeSLEB128(NumBytes, buffer)); + Expr.push_back((uint8_t)dwarf::DW_OP_plus); + Comment << (NumBytes < 0 ? " - " : " + ") << std::abs(NumBytes); + } + + if (NumVGScaledBytes) { + Expr.push_back((uint8_t)dwarf::DW_OP_consts); + Expr.append(buffer, buffer + encodeSLEB128(NumVGScaledBytes, buffer)); + + Expr.push_back((uint8_t)dwarf::DW_OP_bregx); + Expr.append(buffer, buffer + encodeULEB128(VG, buffer)); + Expr.push_back(0); + + Expr.push_back((uint8_t)dwarf::DW_OP_mul); + Expr.push_back((uint8_t)dwarf::DW_OP_plus); + + Comment << (NumVGScaledBytes < 0 ? " - " : " + ") + << std::abs(NumVGScaledBytes) << " * VG"; + } +} + +// Creates an MCCFIInstruction: +// { DW_CFA_def_cfa_expression, ULEB128 (sizeof expr), expr } +MCCFIInstruction AArch64FrameLowering::createDefCFAExpressionFromSP( + const TargetRegisterInfo &TRI, const StackOffset &OffsetFromSP) const { + int64_t NumBytes, NumVGScaledBytes; + OffsetFromSP.getForDwarfOffset(NumBytes, NumVGScaledBytes); + + std::string CommentBuffer = "sp"; + llvm::raw_string_ostream Comment(CommentBuffer); + + // Build up the expression (SP + NumBytes + NumVGScaledBytes * AArch64::VG) + SmallString<64> Expr; + Expr.push_back((uint8_t)(dwarf::DW_OP_breg0 + /*SP*/ 31)); + Expr.push_back(0); + appendVGScaledOffsetExpr(Expr, NumBytes, NumVGScaledBytes, + TRI.getDwarfRegNum(AArch64::VG, true), Comment); + + // Wrap this into DW_CFA_def_cfa. + SmallString<64> DefCfaExpr; + DefCfaExpr.push_back(dwarf::DW_CFA_def_cfa_expression); + uint8_t buffer[16]; + DefCfaExpr.append(buffer, + buffer + encodeULEB128(Expr.size(), buffer)); + DefCfaExpr.append(Expr.str()); + return MCCFIInstruction::createEscape(nullptr, DefCfaExpr.str(), + Comment.str()); +} + +MCCFIInstruction AArch64FrameLowering::createCfaOffset( + const TargetRegisterInfo &TRI, unsigned Reg, + const StackOffset &OffsetFromDefCFA) const { + int64_t NumBytes, NumVGScaledBytes; + OffsetFromDefCFA.getForDwarfOffset(NumBytes, NumVGScaledBytes); + + unsigned DwarfReg = TRI.getDwarfRegNum(Reg, true); + + // Non-scalable offsets can use DW_CFA_offset directly. + if (!NumVGScaledBytes) + return MCCFIInstruction::createOffset(nullptr, DwarfReg, NumBytes); + + std::string CommentBuffer; + llvm::raw_string_ostream Comment(CommentBuffer); + Comment << printReg(Reg, &TRI) << " @ cfa"; + + // Build up expression (NumBytes + NumVGScaledBytes * AArch64::VG) + SmallString<64> OffsetExpr; + appendVGScaledOffsetExpr(OffsetExpr, NumBytes, NumVGScaledBytes, + TRI.getDwarfRegNum(AArch64::VG, true), Comment); + + // Wrap this into DW_CFA_expression + SmallString<64> CfaExpr; + CfaExpr.push_back(dwarf::DW_CFA_expression); + uint8_t buffer[16]; + CfaExpr.append(buffer, buffer + encodeULEB128(DwarfReg, buffer)); + CfaExpr.append(buffer, buffer + encodeULEB128(OffsetExpr.size(), buffer)); + CfaExpr.append(OffsetExpr.str()); + + return MCCFIInstruction::createEscape(nullptr, CfaExpr.str(), Comment.str()); +} + void AArch64FrameLowering::emitCalleeSavedFrameMoves( MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) const { MachineFunction &MF = *MBB.getParent(); MachineFrameInfo &MFI = MF.getFrameInfo(); const TargetSubtargetInfo &STI = MF.getSubtarget(); - const MCRegisterInfo *MRI = STI.getRegisterInfo(); + const TargetRegisterInfo *TRI = STI.getRegisterInfo(); const TargetInstrInfo *TII = STI.getInstrInfo(); DebugLoc DL = MBB.findDebugLoc(MBBI); @@ -415,11 +506,26 @@ void AArch64FrameLowering::emitCalleeSavedFrameMoves( for (const auto &Info : CSI) { unsigned Reg = Info.getReg(); - int64_t Offset = - MFI.getObjectOffset(Info.getFrameIdx()) - getOffsetOfLocalArea(); - unsigned DwarfReg = MRI->getDwarfRegNum(Reg, true); - unsigned CFIIndex = MF.addFrameInst( - MCCFIInstruction::createOffset(nullptr, DwarfReg, Offset)); + + // Not all unwinders may know about SVE registers, so assume the lowest + // common demoninator. + unsigned NewReg; + if (static_cast(TRI)->regNeedsCFI(Reg, NewReg)) + Reg = NewReg; + else + continue; + + StackOffset Offset; + if (MFI.getStackID(Info.getFrameIdx()) == TargetStackID::SVEVector) { + AArch64FunctionInfo *AFI = MF.getInfo(); + Offset = StackOffset(MFI.getObjectOffset(Info.getFrameIdx()), MVT::nxv1i8) - + StackOffset(AFI->getCalleeSavedStackSize(MFI), MVT::i8); + } else { + Offset = {MFI.getObjectOffset(Info.getFrameIdx()) - + getOffsetOfLocalArea(), + MVT::i8}; + } + unsigned CFIIndex = MF.addFrameInst(createCfaOffset(*TRI, Reg, Offset)); BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)) .addCFIIndex(CFIIndex) .setMIFlags(MachineInstr::FrameSetup); @@ -1383,9 +1489,18 @@ void AArch64FrameLowering::emitPrologue(MachineFunctio .addCFIIndex(CFIIndex) .setMIFlags(MachineInstr::FrameSetup); } else { - // Encode the stack size of the leaf function. - unsigned CFIIndex = MF.addFrameInst( - MCCFIInstruction::cfiDefCfaOffset(nullptr, MFI.getStackSize())); + unsigned CFIIndex; + if (SVEStackSize) { + const TargetSubtargetInfo &STI = MF.getSubtarget(); + const TargetRegisterInfo &TRI = *STI.getRegisterInfo(); + StackOffset TotalSize = + SVEStackSize + StackOffset((int64_t)MFI.getStackSize(), MVT::i8); + CFIIndex = MF.addFrameInst(createDefCFAExpressionFromSP(TRI, TotalSize)); + } else { + // Encode the stack size of the leaf function. + CFIIndex = MF.addFrameInst( + MCCFIInstruction::cfiDefCfaOffset(nullptr, MFI.getStackSize())); + } BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)) .addCFIIndex(CFIIndex) .setMIFlags(MachineInstr::FrameSetup); @@ -2006,6 +2121,7 @@ static void computeCalleeSaveRegisterPairs( // available unwind codes. This flag assures that the alignment fixup is done // only once, as intened. bool FixupDone = false; + for (unsigned i = 0; i < Count; ++i) { RegPairInfo RPI; RPI.Reg1 = CSI[i].getReg(); Modified: vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64FrameLowering.h ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64FrameLowering.h Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64FrameLowering.h Mon Aug 24 17:20:50 2020 (r364713) @@ -18,6 +18,8 @@ namespace llvm { +class MCCFIInstruction; + class AArch64FrameLowering : public TargetFrameLowering { public: explicit AArch64FrameLowering() @@ -119,6 +121,11 @@ class AArch64FrameLowering : public TargetFrameLowerin int64_t assignSVEStackObjectOffsets(MachineFrameInfo &MF, int &MinCSFrameIndex, int &MaxCSFrameIndex) const; + MCCFIInstruction + createDefCFAExpressionFromSP(const TargetRegisterInfo &TRI, + const StackOffset &OffsetFromSP) const; + MCCFIInstruction createCfaOffset(const TargetRegisterInfo &MRI, unsigned DwarfReg, + const StackOffset &OffsetFromDefCFA) const; bool shouldCombineCSRLocalStackBumpInEpilogue(MachineBasicBlock &MBB, unsigned StackBumpBytes) const; }; Modified: vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Mon Aug 24 17:20:50 2020 (r364713) @@ -4107,6 +4107,7 @@ static bool canGuaranteeTCO(CallingConv::ID CC) { static bool mayTailCallThisCC(CallingConv::ID CC) { switch (CC) { case CallingConv::C: + case CallingConv::AArch64_SVE_VectorCall: case CallingConv::PreserveMost: case CallingConv::Swift: return true; @@ -4126,6 +4127,15 @@ bool AArch64TargetLowering::isEligibleForTailCallOptim MachineFunction &MF = DAG.getMachineFunction(); const Function &CallerF = MF.getFunction(); CallingConv::ID CallerCC = CallerF.getCallingConv(); + + // If this function uses the C calling convention but has an SVE signature, + // then it preserves more registers and should assume the SVE_VectorCall CC. + // The check for matching callee-saved regs will determine whether it is + // eligible for TCO. + if (CallerCC == CallingConv::C && + AArch64RegisterInfo::hasSVEArgsOrReturn(&MF)) + CallerCC = CallingConv::AArch64_SVE_VectorCall; + bool CCMatch = CallerCC == CalleeCC; // When using the Windows calling convention on a non-windows OS, we want @@ -4313,6 +4323,20 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI bool TailCallOpt = MF.getTarget().Options.GuaranteedTailCallOpt; bool IsSibCall = false; + // Check callee args/returns for SVE registers and set calling convention + // accordingly. + if (CallConv == CallingConv::C) { + bool CalleeOutSVE = any_of(Outs, [](ISD::OutputArg &Out){ + return Out.VT.isScalableVector(); + }); + bool CalleeInSVE = any_of(Ins, [](ISD::InputArg &In){ + return In.VT.isScalableVector(); + }); + + if (CalleeInSVE || CalleeOutSVE) + CallConv = CallingConv::AArch64_SVE_VectorCall; + } + if (IsTailCall) { // Check if it's really possible to do a tail call. IsTailCall = isEligibleForTailCallOptimization( @@ -4665,20 +4689,6 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI for (auto &RegToPass : RegsToPass) Ops.push_back(DAG.getRegister(RegToPass.first, RegToPass.second.getValueType())); - - // Check callee args/returns for SVE registers and set calling convention - // accordingly. - if (CallConv == CallingConv::C) { - bool CalleeOutSVE = any_of(Outs, [](ISD::OutputArg &Out){ - return Out.VT.isScalableVector(); - }); - bool CalleeInSVE = any_of(Ins, [](ISD::InputArg &In){ - return In.VT.isScalableVector(); - }); - - if (CalleeInSVE || CalleeOutSVE) - CallConv = CallingConv::AArch64_SVE_VectorCall; - } // Add a register mask operand representing the call-preserved registers. const uint32_t *Mask; Modified: vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp Mon Aug 24 17:20:50 2020 (r364713) @@ -40,7 +40,30 @@ AArch64RegisterInfo::AArch64RegisterInfo(const Triple AArch64_MC::initLLVMToCVRegMapping(this); } -static bool hasSVEArgsOrReturn(const MachineFunction *MF) { +/// Return whether the register needs a CFI entry. Not all unwinders may know +/// about SVE registers, so we assume the lowest common denominator, i.e. the +/// callee-saves required by the base ABI. For the SVE registers z8-z15 only the +/// lower 64-bits (d8-d15) need to be saved. The lower 64-bits subreg is +/// returned in \p RegToUseForCFI. +bool AArch64RegisterInfo::regNeedsCFI(unsigned Reg, + unsigned &RegToUseForCFI) const { + if (AArch64::PPRRegClass.contains(Reg)) + return false; + + if (AArch64::ZPRRegClass.contains(Reg)) { + RegToUseForCFI = getSubReg(Reg, AArch64::dsub); + for (int I = 0; CSR_AArch64_AAPCS_SaveList[I]; ++I) { + if (CSR_AArch64_AAPCS_SaveList[I] == RegToUseForCFI) + return true; + } + return false; + } + + RegToUseForCFI = Reg; + return true; +} + +bool AArch64RegisterInfo::hasSVEArgsOrReturn(const MachineFunction *MF) { const Function &F = MF->getFunction(); return isa(F.getReturnType()) || any_of(F.args(), [](const Argument &Arg) { Modified: vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.h ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.h Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.h Mon Aug 24 17:20:50 2020 (r364713) @@ -42,6 +42,8 @@ class AArch64RegisterInfo final : public AArch64GenReg void UpdateCustomCallPreservedMask(MachineFunction &MF, const uint32_t **Mask) const; + static bool hasSVEArgsOrReturn(const MachineFunction *MF); + /// Code Generation virtual methods... const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override; const MCPhysReg *getDarwinCalleeSavedRegs(const MachineFunction *MF) const; @@ -122,6 +124,7 @@ class AArch64RegisterInfo final : public AArch64GenReg MachineFunction &MF) const override; unsigned getLocalAddressRegister(const MachineFunction &MF) const; + bool regNeedsCFI(unsigned Reg, unsigned &RegToUseForCFI) const; }; } // end namespace llvm Modified: vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.td ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.td Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.td Mon Aug 24 17:20:50 2020 (r364713) @@ -133,6 +133,9 @@ def NZCV : AArch64Reg<0, "nzcv">; // First fault status register def FFR : AArch64Reg<0, "ffr">, DwarfRegNum<[47]>; +// Purely virtual Vector Granule (VG) Dwarf register +def VG : AArch64Reg<0, "vg">, DwarfRegNum<[46]>; + // GPR register classes with the intersections of GPR32/GPR32sp and // GPR64/GPR64sp for use by the coalescer. def GPR32common : RegisterClass<"AArch64", [i32], 32, (sequence "W%u", 0, 30)> { Modified: vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td Mon Aug 24 17:20:50 2020 (r364713) @@ -1765,7 +1765,7 @@ multiclass sve_prefetch; defm : unpred_store< store, nxv2f16, ST1H_D_IMM, PTRUE_D>; defm : unpred_store< store, nxv4f32, ST1W_IMM, PTRUE_S>; - defm : unpred_store< store, nxv4f32, ST1W_D_IMM, PTRUE_D>; + defm : unpred_store< store, nxv2f32, ST1W_D_IMM, PTRUE_D>; defm : unpred_store< store, nxv2f64, ST1D_IMM, PTRUE_D>; multiclass unpred_loaderaseFromParent(); if (Op1->use_empty()) Op1->eraseFromParent(); - if (Op2->use_empty()) + if (Op1 != Op2 && Op2->use_empty()) Op2->eraseFromParent(); return true; Modified: vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp ============================================================================== --- vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp Mon Aug 24 17:06:34 2020 (r364712) +++ vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp Mon Aug 24 17:20:50 2020 (r364713) @@ -2653,22 +2653,35 @@ const unsigned *PPCInstrInfo::getLoadOpcodesForSpillAr return LoadSpillOpcodesArray[getSpillTarget()]; } -void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr &StartMI, MachineInstr &EndMI, +void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr *StartMI, MachineInstr *EndMI, unsigned RegNo) const { // Conservatively clear kill flag for the register if the instructions are in // different basic blocks and in SSA form, because the kill flag may no longer // be right. There is no need to bother with dead flags since defs with no // uses will be handled by DCE. - MachineRegisterInfo &MRI = StartMI.getParent()->getParent()->getRegInfo(); - if (MRI.isSSA() && (StartMI.getParent() != EndMI.getParent())) { + MachineRegisterInfo &MRI = StartMI->getParent()->getParent()->getRegInfo(); + if (MRI.isSSA() && (StartMI->getParent() != EndMI->getParent())) { MRI.clearKillFlags(RegNo); return; } // Instructions between [StartMI, EndMI] should be in same basic block. - assert((StartMI.getParent() == EndMI.getParent()) && + assert((StartMI->getParent() == EndMI->getParent()) && "Instructions are not in same basic block"); + // If before RA, StartMI may be def through COPY, we need to adjust it to the + // real def. See function getForwardingDefMI. + if (MRI.isSSA()) { + bool Reads, Writes; + std::tie(Reads, Writes) = StartMI->readsWritesVirtualRegister(RegNo); + if (!Reads && !Writes) { + assert(Register::isVirtualRegister(RegNo) && + "Must be a virtual register"); + // Get real def and ignore copies. + StartMI = MRI.getVRegDef(RegNo); + } + } + bool IsKillSet = false; auto clearOperandKillInfo = [=] (MachineInstr &MI, unsigned Index) { @@ -2681,21 +2694,21 @@ void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr &Sta // Set killed flag for EndMI. // No need to do anything if EndMI defines RegNo. int UseIndex = - EndMI.findRegisterUseOperandIdx(RegNo, false, &getRegisterInfo()); + EndMI->findRegisterUseOperandIdx(RegNo, false, &getRegisterInfo()); if (UseIndex != -1) { - EndMI.getOperand(UseIndex).setIsKill(true); + EndMI->getOperand(UseIndex).setIsKill(true); IsKillSet = true; // Clear killed flag for other EndMI operands related to RegNo. In some // upexpected cases, killed may be set multiple times for same register // operand in same MI. - for (int i = 0, e = EndMI.getNumOperands(); i != e; ++i) + for (int i = 0, e = EndMI->getNumOperands(); i != e; ++i) if (i != UseIndex) - clearOperandKillInfo(EndMI, i); + clearOperandKillInfo(*EndMI, i); } // Walking the inst in reverse order (EndMI -> StartMI]. - MachineBasicBlock::reverse_iterator It = EndMI; - MachineBasicBlock::reverse_iterator E = EndMI.getParent()->rend(); + MachineBasicBlock::reverse_iterator It = *EndMI; + MachineBasicBlock::reverse_iterator E = EndMI->getParent()->rend(); // EndMI has been handled above, skip it here. It++; MachineOperand *MO = nullptr; @@ -2721,13 +2734,13 @@ void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr &Sta } else if ((MO = It->findRegisterDefOperand(RegNo, false, true, &getRegisterInfo()))) { // No use found, set dead for its def. - assert(&*It == &StartMI && "No new def between StartMI and EndMI."); + assert(&*It == StartMI && "No new def between StartMI and EndMI."); MO->setIsDead(true); break; } } - if ((&*It) == &StartMI) + if ((&*It) == StartMI) break; } // Ensure RegMo liveness is killed after EndMI. @@ -3858,7 +3871,7 @@ bool PPCInstrInfo::simplifyToLI(MachineInstr &MI, Mach // ForwardingOperandReg = LI imm1 // y = op2 imm2, ForwardingOperandReg(killed) if (IsForwardingOperandKilled) - fixupIsDeadOrKill(DefMI, MI, ForwardingOperandReg); + fixupIsDeadOrKill(&DefMI, &MI, ForwardingOperandReg); LLVM_DEBUG(dbgs() << "With:\n"); LLVM_DEBUG(MI.dump()); @@ -3950,9 +3963,9 @@ bool PPCInstrInfo::transformToNewImmFormFedByAdd( // Update kill flag if (RegMO->isKill() || IsKilledFor(RegMO->getReg())) - fixupIsDeadOrKill(DefMI, MI, RegMO->getReg()); + fixupIsDeadOrKill(&DefMI, &MI, RegMO->getReg()); if (ForwardKilledOperandReg != ~0U) - fixupIsDeadOrKill(DefMI, MI, ForwardKilledOperandReg); + fixupIsDeadOrKill(&DefMI, &MI, ForwardKilledOperandReg); } LLVM_DEBUG(dbgs() << "With:\n"); @@ -4063,12 +4076,12 @@ bool PPCInstrInfo::transformToImmFormFedByAdd( // x = ADD reg(killed), imm // y = XOP 0, x if (IsFwdFeederRegKilled || RegMO->isKill()) - fixupIsDeadOrKill(DefMI, MI, RegMO->getReg()); + fixupIsDeadOrKill(&DefMI, &MI, RegMO->getReg()); // Pattern 3: // ForwardKilledOperandReg = ADD reg, imm // y = XOP 0, ForwardKilledOperandReg(killed) if (ForwardKilledOperandReg != ~0U) - fixupIsDeadOrKill(DefMI, MI, ForwardKilledOperandReg); + fixupIsDeadOrKill(&DefMI, &MI, ForwardKilledOperandReg); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Aug 24 17:21:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79AFA3C88A1; Mon, 24 Aug 2020 17:21:27 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZzS72cjPz3yDP; Mon, 24 Aug 2020 17:21:27 +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 236871C286; Mon, 24 Aug 2020 17:21:27 +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 07OHLR1C009712; Mon, 24 Aug 2020 17:21:27 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OHLRDg009711; Mon, 24 Aug 2020 17:21:27 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202008241721.07OHLRDg009711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 24 Aug 2020 17:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r364714 - vendor/llvm-project/llvmorg-11.0.0-rc2-0-g414f32a9e86 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-project/llvmorg-11.0.0-rc2-0-g414f32a9e86 X-SVN-Commit-Revision: 364714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 17:21:27 -0000 Author: dim Date: Mon Aug 24 17:21:26 2020 New Revision: 364714 URL: https://svnweb.freebsd.org/changeset/base/364714 Log: Tag llvm-project branch release/11.x llvmorg-11.0.0-rc2-0-g414f32a9e86. Added: vendor/llvm-project/llvmorg-11.0.0-rc2-0-g414f32a9e86/ - copied from r364713, vendor/llvm-project/release-11.x/ From owner-svn-src-all@freebsd.org Mon Aug 24 17:25:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 13A8C3C8961; Mon, 24 Aug 2020 17:25:29 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZzXm6r2qz3yQ1; Mon, 24 Aug 2020 17:25:28 +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 CDC301BF58; Mon, 24 Aug 2020 17:25:28 +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 07OHPSQC012484; Mon, 24 Aug 2020 17:25:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OHPQmO012470; Mon, 24 Aug 2020 17:25:26 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241725.07OHPQmO012470@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 17:25:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364715 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux sys vm X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux sys vm X-SVN-Commit-Revision: 364715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 17:25:29 -0000 Author: trasz Date: Mon Aug 24 17:25:26 2020 New Revision: 364715 URL: https://svnweb.freebsd.org/changeset/base/364715 Log: MFC r362440: Add linux_madvise(2) instead of having Linux apps call the native FreeBSD madvise(2) directly. While some of the flag values match, most don't. PR: kern/230160 Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_machdep.c stable/12/sys/amd64/linux/syscalls.master stable/12/sys/amd64/linux32/linux32_machdep.c stable/12/sys/amd64/linux32/syscalls.master stable/12/sys/arm64/linux/linux_machdep.c stable/12/sys/arm64/linux/syscalls.master stable/12/sys/compat/linux/linux_mmap.c stable/12/sys/compat/linux/linux_mmap.h stable/12/sys/i386/linux/linux_machdep.c stable/12/sys/i386/linux/syscalls.master stable/12/sys/sys/syscallsubr.h stable/12/sys/vm/vm_mmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_machdep.c ============================================================================== --- stable/12/sys/amd64/linux/linux_machdep.c Mon Aug 24 17:21:26 2020 (r364714) +++ stable/12/sys/amd64/linux/linux_machdep.c Mon Aug 24 17:25:26 2020 (r364715) @@ -141,6 +141,13 @@ linux_mprotect(struct thread *td, struct linux_mprotec } int +linux_madvise(struct thread *td, struct linux_madvise_args *uap) +{ + + return (linux_madvise_common(td, PTROUT(uap->addr), uap->len, uap->behav)); +} + +int linux_iopl(struct thread *td, struct linux_iopl_args *args) { int error; Modified: stable/12/sys/amd64/linux/syscalls.master ============================================================================== --- stable/12/sys/amd64/linux/syscalls.master Mon Aug 24 17:21:26 2020 (r364714) +++ stable/12/sys/amd64/linux/syscalls.master Mon Aug 24 17:25:26 2020 (r364715) @@ -94,7 +94,7 @@ l_size_t len, l_int fl); } 27 AUE_MINCORE STD { int linux_mincore(l_ulong start, \ l_size_t len, u_char *vec); } -28 AUE_MADVISE NOPROTO { int madvise(void *addr, size_t len, \ +28 AUE_MADVISE STD { int linux_madvise(void *addr, size_t len, \ int behav); } 29 AUE_NULL STD { int linux_shmget(l_key_t key, l_size_t size, \ l_int shmflg); } Modified: stable/12/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_machdep.c Mon Aug 24 17:21:26 2020 (r364714) +++ stable/12/sys/amd64/linux32/linux32_machdep.c Mon Aug 24 17:25:26 2020 (r364715) @@ -469,6 +469,13 @@ linux_mprotect(struct thread *td, struct linux_mprotec } int +linux_madvise(struct thread *td, struct linux_madvise_args *uap) +{ + + return (linux_madvise_common(td, PTROUT(uap->addr), uap->len, uap->behav)); +} + +int linux_iopl(struct thread *td, struct linux_iopl_args *args) { int error; Modified: stable/12/sys/amd64/linux32/syscalls.master ============================================================================== --- stable/12/sys/amd64/linux32/syscalls.master Mon Aug 24 17:21:26 2020 (r364714) +++ stable/12/sys/amd64/linux32/syscalls.master Mon Aug 24 17:25:26 2020 (r364715) @@ -389,7 +389,7 @@ char *put_old); } 218 AUE_MINCORE STD { int linux_mincore(l_ulong start, \ l_size_t len, u_char *vec); } -219 AUE_MADVISE NOPROTO { int madvise(void *addr, size_t len, \ +219 AUE_MADVISE STD { int linux_madvise(void *addr, size_t len, \ int behav); } 220 AUE_GETDIRENTRIES STD { int linux_getdents64(l_uint fd, \ void *dirent, l_uint count); } Modified: stable/12/sys/arm64/linux/linux_machdep.c ============================================================================== --- stable/12/sys/arm64/linux/linux_machdep.c Mon Aug 24 17:21:26 2020 (r364714) +++ stable/12/sys/arm64/linux/linux_machdep.c Mon Aug 24 17:25:26 2020 (r364715) @@ -104,6 +104,13 @@ linux_mprotect(struct thread *td, struct linux_mprotec uap->prot)); } +int +linux_madvise(struct thread *td, struct linux_madvise_args *uap) +{ + + return (linux_madvise_common(td, PTROUT(uap->addr), uap->len, uap->behav)); +} + /* LINUXTODO: implement arm64 linux_rt_sigsuspend */ int linux_rt_sigsuspend(struct thread *td, struct linux_rt_sigsuspend_args *uap) Modified: stable/12/sys/arm64/linux/syscalls.master ============================================================================== --- stable/12/sys/arm64/linux/syscalls.master Mon Aug 24 17:21:26 2020 (r364714) +++ stable/12/sys/arm64/linux/syscalls.master Mon Aug 24 17:25:26 2020 (r364715) @@ -1310,8 +1310,9 @@ u_char *vec ); } -233 AUE_MADVISE NOPROTO { - int madvise(void *addr, +233 AUE_MADVISE STD { + int linux_madvise( + void *addr, size_t len, int behav ); Modified: stable/12/sys/compat/linux/linux_mmap.c ============================================================================== --- stable/12/sys/compat/linux/linux_mmap.c Mon Aug 24 17:21:26 2020 (r364714) +++ stable/12/sys/compat/linux/linux_mmap.c Mon Aug 24 17:25:26 2020 (r364715) @@ -233,6 +233,62 @@ linux_mprotect_common(struct thread *td, uintptr_t add return (kern_mprotect(td, addr, len, prot)); } +int +linux_madvise_common(struct thread *td, uintptr_t addr, size_t len, int behav) +{ + + switch (behav) { + case LINUX_MADV_NORMAL: + return (kern_madvise(td, addr, len, MADV_NORMAL)); + case LINUX_MADV_RANDOM: + return (kern_madvise(td, addr, len, MADV_RANDOM)); + case LINUX_MADV_SEQUENTIAL: + return (kern_madvise(td, addr, len, MADV_SEQUENTIAL)); + case LINUX_MADV_WILLNEED: + return (kern_madvise(td, addr, len, MADV_WILLNEED)); + case LINUX_MADV_DONTNEED: + return (kern_madvise(td, addr, len, MADV_DONTNEED)); + case LINUX_MADV_FREE: + return (kern_madvise(td, addr, len, MADV_FREE)); + case LINUX_MADV_REMOVE: + linux_msg(curthread, "unsupported madvise MADV_REMOVE"); + return (EINVAL); + case LINUX_MADV_DONTFORK: + return (kern_minherit(td, addr, len, INHERIT_NONE)); + case LINUX_MADV_DOFORK: + return (kern_minherit(td, addr, len, INHERIT_COPY)); + case LINUX_MADV_MERGEABLE: + linux_msg(curthread, "unsupported madvise MADV_MERGEABLE"); + return (EINVAL); + case LINUX_MADV_UNMERGEABLE: + /* We don't merge anyway. */ + return (0); + case LINUX_MADV_HUGEPAGE: + /* Ignored; on FreeBSD huge pages are always on. */ + return (0); + case LINUX_MADV_NOHUGEPAGE: + linux_msg(curthread, "unsupported madvise MADV_NOHUGEPAGE"); + return (EINVAL); + case LINUX_MADV_DONTDUMP: + return (kern_madvise(td, addr, len, MADV_NOCORE)); + case LINUX_MADV_DODUMP: + return (kern_madvise(td, addr, len, MADV_CORE)); + case LINUX_MADV_WIPEONFORK: + return (kern_minherit(td, addr, len, INHERIT_ZERO)); + case LINUX_MADV_KEEPONFORK: + return (kern_minherit(td, addr, len, INHERIT_COPY)); + case LINUX_MADV_HWPOISON: + linux_msg(curthread, "unsupported madvise MADV_HWPOISON"); + return (EINVAL); + case LINUX_MADV_SOFT_OFFLINE: + linux_msg(curthread, "unsupported madvise MADV_SOFT_OFFLINE"); + return (EINVAL); + default: + linux_msg(curthread, "unsupported madvise behav %d", behav); + return (EINVAL); + } +} + #if defined(__amd64__) static void linux_fixup_prot(struct thread *td, int *prot) Modified: stable/12/sys/compat/linux/linux_mmap.h ============================================================================== --- stable/12/sys/compat/linux/linux_mmap.h Mon Aug 24 17:21:26 2020 (r364714) +++ stable/12/sys/compat/linux/linux_mmap.h Mon Aug 24 17:25:26 2020 (r364715) @@ -45,8 +45,29 @@ #define LINUX_PROT_GROWSDOWN 0x01000000 #define LINUX_PROT_GROWSUP 0x02000000 +#define LINUX_MADV_NORMAL 0 +#define LINUX_MADV_RANDOM 1 +#define LINUX_MADV_SEQUENTIAL 2 +#define LINUX_MADV_WILLNEED 3 +#define LINUX_MADV_DONTNEED 4 +#define LINUX_MADV_FREE 8 +#define LINUX_MADV_REMOVE 9 +#define LINUX_MADV_DONTFORK 10 +#define LINUX_MADV_DOFORK 11 +#define LINUX_MADV_MERGEABLE 12 +#define LINUX_MADV_UNMERGEABLE 13 +#define LINUX_MADV_HUGEPAGE 14 +#define LINUX_MADV_NOHUGEPAGE 15 +#define LINUX_MADV_DONTDUMP 16 +#define LINUX_MADV_DODUMP 17 +#define LINUX_MADV_WIPEONFORK 18 +#define LINUX_MADV_KEEPONFORK 19 +#define LINUX_MADV_HWPOISON 100 +#define LINUX_MADV_SOFT_OFFLINE 101 + int linux_mmap_common(struct thread *, uintptr_t, size_t, int, int, int, off_t); int linux_mprotect_common(struct thread *, uintptr_t, size_t, int); +int linux_madvise_common(struct thread *, uintptr_t, size_t, int); #endif /* _LINUX_MMAP_H_ */ Modified: stable/12/sys/i386/linux/linux_machdep.c ============================================================================== --- stable/12/sys/i386/linux/linux_machdep.c Mon Aug 24 17:21:26 2020 (r364714) +++ stable/12/sys/i386/linux/linux_machdep.c Mon Aug 24 17:25:26 2020 (r364715) @@ -354,6 +354,13 @@ linux_mprotect(struct thread *td, struct linux_mprotec } int +linux_madvise(struct thread *td, struct linux_madvise_args *uap) +{ + + return (linux_madvise_common(td, PTROUT(uap->addr), uap->len, uap->behav)); +} + +int linux_ioperm(struct thread *td, struct linux_ioperm_args *args) { int error; Modified: stable/12/sys/i386/linux/syscalls.master ============================================================================== --- stable/12/sys/i386/linux/syscalls.master Mon Aug 24 17:21:26 2020 (r364714) +++ stable/12/sys/i386/linux/syscalls.master Mon Aug 24 17:25:26 2020 (r364715) @@ -392,7 +392,7 @@ char *put_old); } 218 AUE_MINCORE STD { int linux_mincore(l_ulong start, \ l_size_t len, u_char *vec); } -219 AUE_MADVISE NOPROTO { int madvise(void *addr, size_t len, \ +219 AUE_MADVISE STD { int linux_madvise(void *addr, size_t len, \ int behav); } 220 AUE_GETDIRENTRIES STD { int linux_getdents64(l_uint fd, \ void *dirent, l_uint count); } Modified: stable/12/sys/sys/syscallsubr.h ============================================================================== --- stable/12/sys/sys/syscallsubr.h Mon Aug 24 17:21:26 2020 (r364714) +++ stable/12/sys/sys/syscallsubr.h Mon Aug 24 17:25:26 2020 (r364715) @@ -170,6 +170,8 @@ int kern_lutimes(struct thread *td, char *path, enum u struct timeval *tptr, enum uio_seg tptrseg); int kern_madvise(struct thread *td, uintptr_t addr, size_t len, int behav); int kern_mincore(struct thread *td, uintptr_t addr, size_t len, char *vec); +int kern_minherit(struct thread *td, uintptr_t addr, size_t len, + int inherit); int kern_mkdirat(struct thread *td, int fd, char *path, enum uio_seg segflg, int mode); int kern_mkfifoat(struct thread *td, int fd, char *path, Modified: stable/12/sys/vm/vm_mmap.c ============================================================================== --- stable/12/sys/vm/vm_mmap.c Mon Aug 24 17:21:26 2020 (r364714) +++ stable/12/sys/vm/vm_mmap.c Mon Aug 24 17:25:26 2020 (r364715) @@ -645,13 +645,21 @@ struct minherit_args { int sys_minherit(struct thread *td, struct minherit_args *uap) { + + return (kern_minherit(td, (uintptr_t)uap->addr, uap->len, + uap->inherit)); +} + +int +kern_minherit(struct thread *td, uintptr_t addr0, size_t len, int inherit0) +{ vm_offset_t addr; vm_size_t size, pageoff; vm_inherit_t inherit; - addr = (vm_offset_t)uap->addr; - size = uap->len; - inherit = uap->inherit; + addr = (vm_offset_t)addr0; + size = len; + inherit = inherit0; pageoff = (addr & PAGE_MASK); addr -= pageoff; From owner-svn-src-all@freebsd.org Mon Aug 24 17:29:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 53AAC3C8C63; Mon, 24 Aug 2020 17:29: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZzdf1xKcz40Bp; Mon, 24 Aug 2020 17:29: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 257AB1C380; Mon, 24 Aug 2020 17:29: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 07OHTgsf012741; Mon, 24 Aug 2020 17:29:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OHTbgA012720; Mon, 24 Aug 2020 17:29:37 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241729.07OHTbgA012720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 17:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364716 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 364716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 17:29:42 -0000 Author: trasz Date: Mon Aug 24 17:29:37 2020 New Revision: 364716 URL: https://svnweb.freebsd.org/changeset/base/364716 Log: MFC r362441: Regen after r362440. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_proto.h stable/12/sys/amd64/linux/linux_syscall.h stable/12/sys/amd64/linux/linux_syscalls.c stable/12/sys/amd64/linux/linux_sysent.c stable/12/sys/amd64/linux/linux_systrace_args.c stable/12/sys/amd64/linux32/linux32_proto.h stable/12/sys/amd64/linux32/linux32_syscall.h stable/12/sys/amd64/linux32/linux32_syscalls.c stable/12/sys/amd64/linux32/linux32_sysent.c stable/12/sys/amd64/linux32/linux32_systrace_args.c stable/12/sys/arm64/linux/linux_proto.h stable/12/sys/arm64/linux/linux_syscall.h stable/12/sys/arm64/linux/linux_syscalls.c stable/12/sys/arm64/linux/linux_sysent.c stable/12/sys/arm64/linux/linux_systrace_args.c stable/12/sys/i386/linux/linux_proto.h stable/12/sys/i386/linux/linux_syscall.h stable/12/sys/i386/linux/linux_syscalls.c stable/12/sys/i386/linux/linux_sysent.c stable/12/sys/i386/linux/linux_systrace_args.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_proto.h ============================================================================== --- stable/12/sys/amd64/linux/linux_proto.h Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/amd64/linux/linux_proto.h Mon Aug 24 17:29:37 2020 (r364716) @@ -136,6 +136,11 @@ struct linux_mincore_args { char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; char vec_l_[PADL_(u_char *)]; u_char * vec; char vec_r_[PADR_(u_char *)]; }; +struct linux_madvise_args { + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; + char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char behav_l_[PADL_(int)]; int behav; char behav_r_[PADR_(int)]; +}; struct linux_shmget_args { char key_l_[PADL_(l_key_t)]; l_key_t key; char key_r_[PADR_(l_key_t)]; char size_l_[PADL_(l_size_t)]; l_size_t size; char size_r_[PADR_(l_size_t)]; @@ -1292,6 +1297,7 @@ int linux_select(struct thread *, struct linux_select_ int linux_mremap(struct thread *, struct linux_mremap_args *); int linux_msync(struct thread *, struct linux_msync_args *); int linux_mincore(struct thread *, struct linux_mincore_args *); +int linux_madvise(struct thread *, struct linux_madvise_args *); int linux_shmget(struct thread *, struct linux_shmget_args *); int linux_shmat(struct thread *, struct linux_shmat_args *); int linux_shmctl(struct thread *, struct linux_shmctl_args *); @@ -1615,6 +1621,7 @@ int linux_io_uring_register(struct thread *, struct li #define LINUX_SYS_AUE_linux_mremap AUE_NULL #define LINUX_SYS_AUE_linux_msync AUE_MSYNC #define LINUX_SYS_AUE_linux_mincore AUE_MINCORE +#define LINUX_SYS_AUE_linux_madvise AUE_MADVISE #define LINUX_SYS_AUE_linux_shmget AUE_NULL #define LINUX_SYS_AUE_linux_shmat AUE_NULL #define LINUX_SYS_AUE_linux_shmctl AUE_NULL Modified: stable/12/sys/amd64/linux/linux_syscall.h ============================================================================== --- stable/12/sys/amd64/linux/linux_syscall.h Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/amd64/linux/linux_syscall.h Mon Aug 24 17:29:37 2020 (r364716) @@ -33,7 +33,7 @@ #define LINUX_SYS_linux_mremap 25 #define LINUX_SYS_linux_msync 26 #define LINUX_SYS_linux_mincore 27 -#define LINUX_SYS_madvise 28 +#define LINUX_SYS_linux_madvise 28 #define LINUX_SYS_linux_shmget 29 #define LINUX_SYS_linux_shmat 30 #define LINUX_SYS_linux_shmctl 31 Modified: stable/12/sys/amd64/linux/linux_syscalls.c ============================================================================== --- stable/12/sys/amd64/linux/linux_syscalls.c Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/amd64/linux/linux_syscalls.c Mon Aug 24 17:29:37 2020 (r364716) @@ -35,7 +35,7 @@ const char *linux_syscallnames[] = { "linux_mremap", /* 25 = linux_mremap */ "linux_msync", /* 26 = linux_msync */ "linux_mincore", /* 27 = linux_mincore */ - "madvise", /* 28 = madvise */ + "linux_madvise", /* 28 = linux_madvise */ "linux_shmget", /* 29 = linux_shmget */ "linux_shmat", /* 30 = linux_shmat */ "linux_shmctl", /* 31 = linux_shmctl */ Modified: stable/12/sys/amd64/linux/linux_sysent.c ============================================================================== --- stable/12/sys/amd64/linux/linux_sysent.c Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/amd64/linux/linux_sysent.c Mon Aug 24 17:29:37 2020 (r364716) @@ -45,7 +45,7 @@ struct sysent linux_sysent[] = { { AS(linux_mremap_args), (sy_call_t *)linux_mremap, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 25 = linux_mremap */ { AS(linux_msync_args), (sy_call_t *)linux_msync, AUE_MSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 26 = linux_msync */ { AS(linux_mincore_args), (sy_call_t *)linux_mincore, AUE_MINCORE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 27 = linux_mincore */ - { AS(madvise_args), (sy_call_t *)sys_madvise, AUE_MADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 28 = madvise */ + { AS(linux_madvise_args), (sy_call_t *)linux_madvise, AUE_MADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 28 = linux_madvise */ { AS(linux_shmget_args), (sy_call_t *)linux_shmget, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 29 = linux_shmget */ { AS(linux_shmat_args), (sy_call_t *)linux_shmat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 30 = linux_shmat */ { AS(linux_shmctl_args), (sy_call_t *)linux_shmctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 31 = linux_shmctl */ Modified: stable/12/sys/amd64/linux/linux_systrace_args.c ============================================================================== --- stable/12/sys/amd64/linux/linux_systrace_args.c Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/amd64/linux/linux_systrace_args.c Mon Aug 24 17:29:37 2020 (r364716) @@ -258,9 +258,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 3; break; } - /* madvise */ + /* linux_madvise */ case 28: { - struct madvise_args *p = params; + struct linux_madvise_args *p = params; uarg[0] = (intptr_t) p->addr; /* void * */ uarg[1] = p->len; /* size_t */ iarg[2] = p->behav; /* int */ @@ -2983,7 +2983,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; - /* madvise */ + /* linux_madvise */ case 28: switch(ndx) { case 0: @@ -6649,7 +6649,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char * if (ndx == 0 || ndx == 1) p = "int"; break; - /* madvise */ + /* linux_madvise */ case 28: if (ndx == 0 || ndx == 1) p = "int"; Modified: stable/12/sys/amd64/linux32/linux32_proto.h ============================================================================== --- stable/12/sys/amd64/linux32/linux32_proto.h Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/amd64/linux32/linux32_proto.h Mon Aug 24 17:29:37 2020 (r364716) @@ -684,6 +684,11 @@ struct linux_mincore_args { char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; char vec_l_[PADL_(u_char *)]; u_char * vec; char vec_r_[PADR_(u_char *)]; }; +struct linux_madvise_args { + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; + char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char behav_l_[PADL_(int)]; int behav; char behav_r_[PADR_(int)]; +}; struct linux_getdents64_args { char fd_l_[PADL_(l_uint)]; l_uint fd; char fd_r_[PADR_(l_uint)]; char dirent_l_[PADL_(void *)]; void * dirent; char dirent_r_[PADR_(void *)]; @@ -1682,6 +1687,7 @@ int linux_setfsuid(struct thread *, struct linux_setfs int linux_setfsgid(struct thread *, struct linux_setfsgid_args *); int linux_pivot_root(struct thread *, struct linux_pivot_root_args *); int linux_mincore(struct thread *, struct linux_mincore_args *); +int linux_madvise(struct thread *, struct linux_madvise_args *); int linux_getdents64(struct thread *, struct linux_getdents64_args *); int linux_fcntl64(struct thread *, struct linux_fcntl64_args *); int linux_gettid(struct thread *, struct linux_gettid_args *); @@ -2069,6 +2075,7 @@ int linux_io_uring_register(struct thread *, struct li #define LINUX32_SYS_AUE_linux_setfsgid AUE_SETFSGID #define LINUX32_SYS_AUE_linux_pivot_root AUE_PIVOT_ROOT #define LINUX32_SYS_AUE_linux_mincore AUE_MINCORE +#define LINUX32_SYS_AUE_linux_madvise AUE_MADVISE #define LINUX32_SYS_AUE_linux_getdents64 AUE_GETDIRENTRIES #define LINUX32_SYS_AUE_linux_fcntl64 AUE_FCNTL #define LINUX32_SYS_AUE_linux_gettid AUE_NULL Modified: stable/12/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- stable/12/sys/amd64/linux32/linux32_syscall.h Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/amd64/linux32/linux32_syscall.h Mon Aug 24 17:29:37 2020 (r364716) @@ -199,7 +199,7 @@ #define LINUX32_SYS_linux_setfsgid 216 #define LINUX32_SYS_linux_pivot_root 217 #define LINUX32_SYS_linux_mincore 218 -#define LINUX32_SYS_madvise 219 +#define LINUX32_SYS_linux_madvise 219 #define LINUX32_SYS_linux_getdents64 220 #define LINUX32_SYS_linux_fcntl64 221 #define LINUX32_SYS_linux_gettid 224 Modified: stable/12/sys/amd64/linux32/linux32_syscalls.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_syscalls.c Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/amd64/linux32/linux32_syscalls.c Mon Aug 24 17:29:37 2020 (r364716) @@ -226,7 +226,7 @@ const char *linux32_syscallnames[] = { "linux_setfsgid", /* 216 = linux_setfsgid */ "linux_pivot_root", /* 217 = linux_pivot_root */ "linux_mincore", /* 218 = linux_mincore */ - "madvise", /* 219 = madvise */ + "linux_madvise", /* 219 = linux_madvise */ "linux_getdents64", /* 220 = linux_getdents64 */ "linux_fcntl64", /* 221 = linux_fcntl64 */ "#222", /* 222 = */ Modified: stable/12/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_sysent.c Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/amd64/linux32/linux32_sysent.c Mon Aug 24 17:29:37 2020 (r364716) @@ -236,7 +236,7 @@ struct sysent linux32_sysent[] = { { AS(linux_setfsgid_args), (sy_call_t *)linux_setfsgid, AUE_SETFSGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 216 = linux_setfsgid */ { AS(linux_pivot_root_args), (sy_call_t *)linux_pivot_root, AUE_PIVOT_ROOT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 217 = linux_pivot_root */ { AS(linux_mincore_args), (sy_call_t *)linux_mincore, AUE_MINCORE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 218 = linux_mincore */ - { AS(madvise_args), (sy_call_t *)sys_madvise, AUE_MADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 219 = madvise */ + { AS(linux_madvise_args), (sy_call_t *)linux_madvise, AUE_MADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 219 = linux_madvise */ { AS(linux_getdents64_args), (sy_call_t *)linux_getdents64, AUE_GETDIRENTRIES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 220 = linux_getdents64 */ { AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64, AUE_FCNTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 221 = linux_fcntl64 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 222 = */ Modified: stable/12/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_systrace_args.c Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/amd64/linux32/linux32_systrace_args.c Mon Aug 24 17:29:37 2020 (r364716) @@ -1520,9 +1520,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 3; break; } - /* madvise */ + /* linux_madvise */ case 219: { - struct madvise_args *p = params; + struct linux_madvise_args *p = params; uarg[0] = (intptr_t) p->addr; /* void * */ uarg[1] = p->len; /* size_t */ iarg[2] = p->behav; /* int */ @@ -5332,7 +5332,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; - /* madvise */ + /* linux_madvise */ case 219: switch(ndx) { case 0: @@ -8432,7 +8432,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char * if (ndx == 0 || ndx == 1) p = "int"; break; - /* madvise */ + /* linux_madvise */ case 219: if (ndx == 0 || ndx == 1) p = "int"; Modified: stable/12/sys/arm64/linux/linux_proto.h ============================================================================== --- stable/12/sys/arm64/linux/linux_proto.h Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/arm64/linux/linux_proto.h Mon Aug 24 17:29:37 2020 (r364716) @@ -854,6 +854,11 @@ struct linux_mincore_args { char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; char vec_l_[PADL_(u_char *)]; u_char * vec; char vec_r_[PADR_(u_char *)]; }; +struct linux_madvise_args { + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; + char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char behav_l_[PADL_(int)]; int behav; char behav_r_[PADR_(int)]; +}; struct linux_remap_file_pages_args { register_t dummy; }; @@ -1240,6 +1245,7 @@ int linux_swapoff(struct thread *, struct linux_swapof int linux_mprotect(struct thread *, struct linux_mprotect_args *); int linux_msync(struct thread *, struct linux_msync_args *); int linux_mincore(struct thread *, struct linux_mincore_args *); +int linux_madvise(struct thread *, struct linux_madvise_args *); int linux_remap_file_pages(struct thread *, struct linux_remap_file_pages_args *); int linux_mbind(struct thread *, struct linux_mbind_args *); int linux_get_mempolicy(struct thread *, struct linux_get_mempolicy_args *); @@ -1507,6 +1513,7 @@ int linux_pkey_free(struct thread *, struct linux_pkey #define LINUX_SYS_AUE_linux_mprotect AUE_MPROTECT #define LINUX_SYS_AUE_linux_msync AUE_MSYNC #define LINUX_SYS_AUE_linux_mincore AUE_MINCORE +#define LINUX_SYS_AUE_linux_madvise AUE_MADVISE #define LINUX_SYS_AUE_linux_remap_file_pages AUE_NULL #define LINUX_SYS_AUE_linux_mbind AUE_NULL #define LINUX_SYS_AUE_linux_get_mempolicy AUE_NULL Modified: stable/12/sys/arm64/linux/linux_syscall.h ============================================================================== --- stable/12/sys/arm64/linux/linux_syscall.h Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/arm64/linux/linux_syscall.h Mon Aug 24 17:29:37 2020 (r364716) @@ -227,7 +227,7 @@ #define LINUX_SYS_mlockall 230 #define LINUX_SYS_munlockall 231 #define LINUX_SYS_linux_mincore 232 -#define LINUX_SYS_madvise 233 +#define LINUX_SYS_linux_madvise 233 #define LINUX_SYS_linux_remap_file_pages 234 #define LINUX_SYS_linux_mbind 235 #define LINUX_SYS_linux_get_mempolicy 236 Modified: stable/12/sys/arm64/linux/linux_syscalls.c ============================================================================== --- stable/12/sys/arm64/linux/linux_syscalls.c Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/arm64/linux/linux_syscalls.c Mon Aug 24 17:29:37 2020 (r364716) @@ -240,7 +240,7 @@ const char *linux_syscallnames[] = { "mlockall", /* 230 = mlockall */ "munlockall", /* 231 = munlockall */ "linux_mincore", /* 232 = linux_mincore */ - "madvise", /* 233 = madvise */ + "linux_madvise", /* 233 = linux_madvise */ "linux_remap_file_pages", /* 234 = linux_remap_file_pages */ "linux_mbind", /* 235 = linux_mbind */ "linux_get_mempolicy", /* 236 = linux_get_mempolicy */ Modified: stable/12/sys/arm64/linux/linux_sysent.c ============================================================================== --- stable/12/sys/arm64/linux/linux_sysent.c Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/arm64/linux/linux_sysent.c Mon Aug 24 17:29:37 2020 (r364716) @@ -250,7 +250,7 @@ struct sysent linux_sysent[] = { { AS(mlockall_args), (sy_call_t *)sys_mlockall, AUE_MLOCKALL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 230 = mlockall */ { 0, (sy_call_t *)sys_munlockall, AUE_MUNLOCKALL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 231 = munlockall */ { AS(linux_mincore_args), (sy_call_t *)linux_mincore, AUE_MINCORE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 232 = linux_mincore */ - { AS(madvise_args), (sy_call_t *)sys_madvise, AUE_MADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 233 = madvise */ + { AS(linux_madvise_args), (sy_call_t *)linux_madvise, AUE_MADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 233 = linux_madvise */ { 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 234 = linux_remap_file_pages */ { 0, (sy_call_t *)linux_mbind, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 235 = linux_mbind */ { 0, (sy_call_t *)linux_get_mempolicy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 236 = linux_get_mempolicy */ Modified: stable/12/sys/arm64/linux/linux_systrace_args.c ============================================================================== --- stable/12/sys/arm64/linux/linux_systrace_args.c Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/arm64/linux/linux_systrace_args.c Mon Aug 24 17:29:37 2020 (r364716) @@ -1766,9 +1766,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 3; break; } - /* madvise */ + /* linux_madvise */ case 233: { - struct madvise_args *p = params; + struct linux_madvise_args *p = params; uarg[0] = (intptr_t) p->addr; /* void * */ uarg[1] = p->len; /* size_t */ iarg[2] = p->behav; /* int */ @@ -4898,7 +4898,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; - /* madvise */ + /* linux_madvise */ case 233: switch(ndx) { case 0: @@ -6449,7 +6449,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char * if (ndx == 0 || ndx == 1) p = "int"; break; - /* madvise */ + /* linux_madvise */ case 233: if (ndx == 0 || ndx == 1) p = "int"; Modified: stable/12/sys/i386/linux/linux_proto.h ============================================================================== --- stable/12/sys/i386/linux/linux_proto.h Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/i386/linux/linux_proto.h Mon Aug 24 17:29:37 2020 (r364716) @@ -681,6 +681,11 @@ struct linux_mincore_args { char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; char vec_l_[PADL_(u_char *)]; u_char * vec; char vec_r_[PADR_(u_char *)]; }; +struct linux_madvise_args { + char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; + char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char behav_l_[PADL_(int)]; int behav; char behav_r_[PADR_(int)]; +}; struct linux_getdents64_args { char fd_l_[PADL_(l_uint)]; l_uint fd; char fd_r_[PADR_(l_uint)]; char dirent_l_[PADL_(void *)]; void * dirent; char dirent_r_[PADR_(void *)]; @@ -1690,6 +1695,7 @@ int linux_setfsuid(struct thread *, struct linux_setfs int linux_setfsgid(struct thread *, struct linux_setfsgid_args *); int linux_pivot_root(struct thread *, struct linux_pivot_root_args *); int linux_mincore(struct thread *, struct linux_mincore_args *); +int linux_madvise(struct thread *, struct linux_madvise_args *); int linux_getdents64(struct thread *, struct linux_getdents64_args *); int linux_fcntl64(struct thread *, struct linux_fcntl64_args *); int linux_gettid(struct thread *, struct linux_gettid_args *); @@ -2079,6 +2085,7 @@ int linux_io_uring_register(struct thread *, struct li #define LINUX_SYS_AUE_linux_setfsgid AUE_SETFSGID #define LINUX_SYS_AUE_linux_pivot_root AUE_PIVOT_ROOT #define LINUX_SYS_AUE_linux_mincore AUE_MINCORE +#define LINUX_SYS_AUE_linux_madvise AUE_MADVISE #define LINUX_SYS_AUE_linux_getdents64 AUE_GETDIRENTRIES #define LINUX_SYS_AUE_linux_fcntl64 AUE_FCNTL #define LINUX_SYS_AUE_linux_gettid AUE_NULL Modified: stable/12/sys/i386/linux/linux_syscall.h ============================================================================== --- stable/12/sys/i386/linux/linux_syscall.h Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/i386/linux/linux_syscall.h Mon Aug 24 17:29:37 2020 (r364716) @@ -205,7 +205,7 @@ #define LINUX_SYS_linux_setfsgid 216 #define LINUX_SYS_linux_pivot_root 217 #define LINUX_SYS_linux_mincore 218 -#define LINUX_SYS_madvise 219 +#define LINUX_SYS_linux_madvise 219 #define LINUX_SYS_linux_getdents64 220 #define LINUX_SYS_linux_fcntl64 221 #define LINUX_SYS_linux_gettid 224 Modified: stable/12/sys/i386/linux/linux_syscalls.c ============================================================================== --- stable/12/sys/i386/linux/linux_syscalls.c Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/i386/linux/linux_syscalls.c Mon Aug 24 17:29:37 2020 (r364716) @@ -226,7 +226,7 @@ const char *linux_syscallnames[] = { "linux_setfsgid", /* 216 = linux_setfsgid */ "linux_pivot_root", /* 217 = linux_pivot_root */ "linux_mincore", /* 218 = linux_mincore */ - "madvise", /* 219 = madvise */ + "linux_madvise", /* 219 = linux_madvise */ "linux_getdents64", /* 220 = linux_getdents64 */ "linux_fcntl64", /* 221 = linux_fcntl64 */ "#222", /* 222 = */ Modified: stable/12/sys/i386/linux/linux_sysent.c ============================================================================== --- stable/12/sys/i386/linux/linux_sysent.c Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/i386/linux/linux_sysent.c Mon Aug 24 17:29:37 2020 (r364716) @@ -236,7 +236,7 @@ struct sysent linux_sysent[] = { { AS(linux_setfsgid_args), (sy_call_t *)linux_setfsgid, AUE_SETFSGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 216 = linux_setfsgid */ { AS(linux_pivot_root_args), (sy_call_t *)linux_pivot_root, AUE_PIVOT_ROOT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 217 = linux_pivot_root */ { AS(linux_mincore_args), (sy_call_t *)linux_mincore, AUE_MINCORE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 218 = linux_mincore */ - { AS(madvise_args), (sy_call_t *)sys_madvise, AUE_MADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 219 = madvise */ + { AS(linux_madvise_args), (sy_call_t *)linux_madvise, AUE_MADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 219 = linux_madvise */ { AS(linux_getdents64_args), (sy_call_t *)linux_getdents64, AUE_GETDIRENTRIES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 220 = linux_getdents64 */ { AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64, AUE_FCNTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 221 = linux_fcntl64 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 222 = */ Modified: stable/12/sys/i386/linux/linux_systrace_args.c ============================================================================== --- stable/12/sys/i386/linux/linux_systrace_args.c Mon Aug 24 17:25:26 2020 (r364715) +++ stable/12/sys/i386/linux/linux_systrace_args.c Mon Aug 24 17:29:37 2020 (r364716) @@ -1559,9 +1559,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 3; break; } - /* madvise */ + /* linux_madvise */ case 219: { - struct madvise_args *p = params; + struct linux_madvise_args *p = params; uarg[0] = (intptr_t) p->addr; /* void * */ uarg[1] = p->len; /* size_t */ iarg[2] = p->behav; /* int */ @@ -5446,7 +5446,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; - /* madvise */ + /* linux_madvise */ case 219: switch(ndx) { case 0: @@ -8643,7 +8643,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char * if (ndx == 0 || ndx == 1) p = "int"; break; - /* madvise */ + /* linux_madvise */ case 219: if (ndx == 0 || ndx == 1) p = "int"; From owner-svn-src-all@freebsd.org Mon Aug 24 17:31:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6EB1E3C9081; Mon, 24 Aug 2020 17:31:18 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZzgV2PgZz40SS; Mon, 24 Aug 2020 17:31:18 +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 315C91C0CC; Mon, 24 Aug 2020 17:31:18 +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 07OHVIFi013580; Mon, 24 Aug 2020 17:31:18 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OHVIhS013579; Mon, 24 Aug 2020 17:31:18 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008241731.07OHVIhS013579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 24 Aug 2020 17:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364717 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364717 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 17:31:18 -0000 Author: trasz Date: Mon Aug 24 17:31:17 2020 New Revision: 364717 URL: https://svnweb.freebsd.org/changeset/base/364717 Log: MFC r363087: Don't emit warnings on MADV_HUGEPAGE; Firefox uses it a lot. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_mmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_mmap.c ============================================================================== --- stable/12/sys/compat/linux/linux_mmap.c Mon Aug 24 17:29:37 2020 (r364716) +++ stable/12/sys/compat/linux/linux_mmap.c Mon Aug 24 17:31:17 2020 (r364717) @@ -267,7 +267,13 @@ linux_madvise_common(struct thread *td, uintptr_t addr /* Ignored; on FreeBSD huge pages are always on. */ return (0); case LINUX_MADV_NOHUGEPAGE: +#if 0 + /* + * Don't warn - Firefox uses it a lot, and in real Linux it's + * an optional feature. + */ linux_msg(curthread, "unsupported madvise MADV_NOHUGEPAGE"); +#endif return (EINVAL); case LINUX_MADV_DONTDUMP: return (kern_madvise(td, addr, len, MADV_NOCORE)); From owner-svn-src-all@freebsd.org Mon Aug 24 17:43:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 936933C8EEE; Mon, 24 Aug 2020 17:43:30 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZzxZ2YjQz41JG; Mon, 24 Aug 2020 17:43:30 +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 3BEB41C2C5; Mon, 24 Aug 2020 17:43:30 +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 07OHhUAL024535; Mon, 24 Aug 2020 17:43:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OHhOew024502; Mon, 24 Aug 2020 17:43:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202008241743.07OHhOew024502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 24 Aug 2020 17:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364718 - in head: contrib/llvm-project/clang/include/clang/Basic contrib/llvm-project/clang/include/clang/Driver contrib/llvm-project/clang/lib/AST contrib/llvm-project/clang/lib/Basic... X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/llvm-project/clang/include/clang/Basic contrib/llvm-project/clang/include/clang/Driver contrib/llvm-project/clang/lib/AST contrib/llvm-project/clang/lib/Basic contrib/llvm-project/cla... X-SVN-Commit-Revision: 364718 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 17:43:30 -0000 Author: dim Date: Mon Aug 24 17:43:23 2020 New Revision: 364718 URL: https://svnweb.freebsd.org/changeset/base/364718 Log: Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp release/11.x llvmorg-11.0.0-rc2-0-g414f32a9e86. MFC after: 6 weeks X-MFC-With: r364284 Modified: head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h head/contrib/llvm-project/clang/include/clang/Driver/Options.td head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp head/contrib/llvm-project/clang/lib/Basic/Targets.cpp head/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h head/contrib/llvm-project/clang/lib/Basic/Targets/Sparc.cpp head/contrib/llvm-project/clang/lib/Basic/Targets/WebAssembly.cpp head/contrib/llvm-project/clang/lib/Basic/Targets/WebAssembly.h head/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/AArch64.cpp head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp head/contrib/llvm-project/libunwind/src/AddressSpace.hpp head/contrib/llvm-project/lld/docs/ReleaseNotes.rst head/contrib/llvm-project/lld/docs/conf.py head/contrib/llvm-project/llvm/include/llvm/MC/MCDwarf.h head/contrib/llvm-project/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.h head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.h head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.td head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64StackOffset.h head/contrib/llvm-project/llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.td head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp head/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp head/lib/clang/include/VCSVersion.inc head/lib/clang/include/llvm/Support/VCSRevision.h Directory Properties: head/contrib/llvm-project/ (props changed) head/contrib/llvm-project/clang/ (props changed) head/contrib/llvm-project/libunwind/ (props changed) head/contrib/llvm-project/lld/ (props changed) head/contrib/llvm-project/llvm/ (props changed) Modified: head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h ============================================================================== --- head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h Mon Aug 24 17:43:23 2020 (r364718) @@ -54,6 +54,10 @@ class TargetOptions { (public) /// be a list of strings starting with by '+' or '-'. std::vector Features; + /// The map of which features have been enabled disabled based on the command + /// line. + llvm::StringMap FeatureMap; + /// Supported OpenCL extensions and optional core features. OpenCLOptions SupportedOpenCLOptions; Modified: head/contrib/llvm-project/clang/include/clang/Driver/Options.td ============================================================================== --- head/contrib/llvm-project/clang/include/clang/Driver/Options.td Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/clang/include/clang/Driver/Options.td Mon Aug 24 17:43:23 2020 (r364718) @@ -1780,7 +1780,7 @@ def fstack_protector_all : Flag<["-"], "fstack-protect HelpText<"Enable stack protectors for all functions">; def fstack_clash_protection : Flag<["-"], "fstack-clash-protection">, Group, Flags<[CC1Option]>, HelpText<"Enable stack clash protection">; -def fnostack_clash_protection : Flag<["-"], "fnostack-clash-protection">, Group, +def fno_stack_clash_protection : Flag<["-"], "fno-stack-clash-protection">, Group, HelpText<"Disable stack clash protection">; def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, Group, HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. " Modified: head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -11147,8 +11147,7 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap std::vector Features(FeaturesTmp.begin(), FeaturesTmp.end()); Target->initFeatureMap(FeatureMap, getDiagnostics(), TargetCPU, Features); } else { - Target->initFeatureMap(FeatureMap, getDiagnostics(), TargetCPU, - Target->getTargetOpts().Features); + FeatureMap = Target->getTargetOpts().FeatureMap; } } Modified: head/contrib/llvm-project/clang/lib/Basic/Targets.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Basic/Targets.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/clang/lib/Basic/Targets.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -346,6 +346,8 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple, return new FreeBSDTargetInfo(Triple, Opts); case llvm::Triple::NetBSD: return new NetBSDTargetInfo(Triple, Opts); + case llvm::Triple::OpenBSD: + return new OpenBSDTargetInfo(Triple, Opts); case llvm::Triple::AIX: return new AIXPPC64TargetInfo(Triple, Opts); default: @@ -358,6 +360,8 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple, return new LinuxTargetInfo(Triple, Opts); case llvm::Triple::NetBSD: return new NetBSDTargetInfo(Triple, Opts); + case llvm::Triple::OpenBSD: + return new OpenBSDTargetInfo(Triple, Opts); default: return new PPC64TargetInfo(Triple, Opts); } @@ -387,6 +391,8 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple, switch (os) { case llvm::Triple::FreeBSD: return new FreeBSDTargetInfo(Triple, Opts); + case llvm::Triple::OpenBSD: + return new OpenBSDTargetInfo(Triple, Opts); case llvm::Triple::Fuchsia: return new FuchsiaTargetInfo(Triple, Opts); case llvm::Triple::Linux: @@ -662,14 +668,13 @@ TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags, // Compute the default target features, we need the target to handle this // because features may have dependencies on one another. - llvm::StringMap Features; - if (!Target->initFeatureMap(Features, Diags, Opts->CPU, + if (!Target->initFeatureMap(Opts->FeatureMap, Diags, Opts->CPU, Opts->FeaturesAsWritten)) return nullptr; // Add the features to the compile options. Opts->Features.clear(); - for (const auto &F : Features) + for (const auto &F : Opts->FeatureMap) Opts->Features.push_back((F.getValue() ? "+" : "-") + F.getKey().str()); // Sort here, so we handle the features in a predictable order. (This matters // when we're dealing with features that overlap.) Modified: head/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h ============================================================================== --- head/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h Mon Aug 24 17:43:23 2020 (r364718) @@ -465,6 +465,9 @@ class LLVM_LIBRARY_VISIBILITY OpenBSDTargetInfo : publ public: OpenBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : OSTargetInfo(Triple, Opts) { + this->WCharType = this->WIntType = this->SignedInt; + this->IntMaxType = TargetInfo::SignedLongLong; + this->Int64Type = TargetInfo::SignedLongLong; switch (Triple.getArch()) { case llvm::Triple::x86: case llvm::Triple::x86_64: @@ -476,6 +479,8 @@ class LLVM_LIBRARY_VISIBILITY OpenBSDTargetInfo : publ case llvm::Triple::mips64: case llvm::Triple::mips64el: case llvm::Triple::ppc: + case llvm::Triple::ppc64: + case llvm::Triple::ppc64le: case llvm::Triple::sparcv9: this->MCountName = "_mcount"; break; Modified: head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h ============================================================================== --- head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h Mon Aug 24 17:43:23 2020 (r364718) @@ -414,8 +414,8 @@ class LLVM_LIBRARY_VISIBILITY PPC64TargetInfo : public ABI = "elfv1"; } - if (Triple.isOSFreeBSD() || Triple.getOS() == llvm::Triple::AIX || - Triple.isMusl()) { + if (Triple.isOSFreeBSD() || Triple.isOSOpenBSD() || + Triple.getOS() == llvm::Triple::AIX || Triple.isMusl()) { LongDoubleWidth = LongDoubleAlign = 64; LongDoubleFormat = &llvm::APFloat::IEEEdouble(); } Modified: head/contrib/llvm-project/clang/lib/Basic/Targets/Sparc.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Basic/Targets/Sparc.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/clang/lib/Basic/Targets/Sparc.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -240,6 +240,11 @@ void SparcV9TargetInfo::getTargetDefines(const LangOpt Builder.defineMacro("__sparc_v9__"); Builder.defineMacro("__sparcv9__"); } + + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1"); + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2"); + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4"); + Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8"); } void SparcV9TargetInfo::fillValidCPUList( Modified: head/contrib/llvm-project/clang/lib/Basic/Targets/WebAssembly.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Basic/Targets/WebAssembly.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/clang/lib/Basic/Targets/WebAssembly.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -96,19 +96,43 @@ void WebAssemblyTargetInfo::getTargetDefines(const Lan } void WebAssemblyTargetInfo::setSIMDLevel(llvm::StringMap &Features, - SIMDEnum Level) { + SIMDEnum Level, bool Enabled) { + if (Enabled) { + switch (Level) { + case UnimplementedSIMD128: + Features["unimplemented-simd128"] = true; + LLVM_FALLTHROUGH; + case SIMD128: + Features["simd128"] = true; + LLVM_FALLTHROUGH; + case NoSIMD: + break; + } + return; + } + switch (Level) { - case UnimplementedSIMD128: - Features["unimplemented-simd128"] = true; - LLVM_FALLTHROUGH; + case NoSIMD: case SIMD128: - Features["simd128"] = true; + Features["simd128"] = false; LLVM_FALLTHROUGH; - case NoSIMD: + case UnimplementedSIMD128: + Features["unimplemented-simd128"] = false; break; } } +void WebAssemblyTargetInfo::setFeatureEnabled(llvm::StringMap &Features, + StringRef Name, + bool Enabled) const { + if (Name == "simd128") + setSIMDLevel(Features, SIMD128, Enabled); + else if (Name == "unimplemented-simd128") + setSIMDLevel(Features, UnimplementedSIMD128, Enabled); + else + Features[Name] = Enabled; +} + bool WebAssemblyTargetInfo::initFeatureMap( llvm::StringMap &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector &FeaturesVec) const { @@ -119,30 +143,8 @@ bool WebAssemblyTargetInfo::initFeatureMap( Features["atomics"] = true; Features["mutable-globals"] = true; Features["tail-call"] = true; - setSIMDLevel(Features, SIMD128); + setSIMDLevel(Features, SIMD128, true); } - // Other targets do not consider user-configured features here, but while we - // are actively developing new features it is useful to let user-configured - // features control availability of builtins - setSIMDLevel(Features, SIMDLevel); - if (HasNontrappingFPToInt) - Features["nontrapping-fptoint"] = true; - if (HasSignExt) - Features["sign-ext"] = true; - if (HasExceptionHandling) - Features["exception-handling"] = true; - if (HasBulkMemory) - Features["bulk-memory"] = true; - if (HasAtomics) - Features["atomics"] = true; - if (HasMutableGlobals) - Features["mutable-globals"] = true; - if (HasMultivalue) - Features["multivalue"] = true; - if (HasTailCall) - Features["tail-call"] = true; - if (HasReferenceTypes) - Features["reference-types"] = true; return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec); } Modified: head/contrib/llvm-project/clang/lib/Basic/Targets/WebAssembly.h ============================================================================== --- head/contrib/llvm-project/clang/lib/Basic/Targets/WebAssembly.h Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/clang/lib/Basic/Targets/WebAssembly.h Mon Aug 24 17:43:23 2020 (r364718) @@ -69,13 +69,17 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyTargetInfo : MacroBuilder &Builder) const override; private: - static void setSIMDLevel(llvm::StringMap &Features, SIMDEnum Level); + static void setSIMDLevel(llvm::StringMap &Features, SIMDEnum Level, + bool Enabled); bool initFeatureMap(llvm::StringMap &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector &FeaturesVec) const override; bool hasFeature(StringRef Feature) const final; + + void setFeatureEnabled(llvm::StringMap &Features, StringRef Name, + bool Enabled) const final; bool handleTargetFeatures(std::vector &Features, DiagnosticsEngine &Diags) final; Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -4956,11 +4956,7 @@ bool CGOpenMPRuntimeNVPTX::hasAllocateAttributeForGlob static CudaArch getCudaArch(CodeGenModule &CGM) { if (!CGM.getTarget().hasFeature("ptx")) return CudaArch::UNKNOWN; - llvm::StringMap Features; - CGM.getTarget().initFeatureMap(Features, CGM.getDiags(), - CGM.getTarget().getTargetOpts().CPU, - CGM.getTarget().getTargetOpts().Features); - for (const auto &Feature : Features) { + for (const auto &Feature : CGM.getTarget().getTargetOpts().FeatureMap) { if (Feature.getValue()) { CudaArch Arch = StringToCudaArch(Feature.getKey()); if (Arch != CudaArch::UNKNOWN) Modified: head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/AArch64.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/AArch64.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/AArch64.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -370,9 +370,11 @@ fp16_fml_fallthrough: V8_6Pos = Features.insert(std::next(V8_6Pos), {"+i8mm", "+bf16"}); if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access, - options::OPT_munaligned_access)) + options::OPT_munaligned_access)) { if (A->getOption().matches(options::OPT_mno_unaligned_access)) Features.push_back("+strict-align"); + } else if (Triple.isOSOpenBSD()) + Features.push_back("+strict-align"); if (Args.hasArg(options::OPT_ffixed_x1)) Features.push_back("+reserve-x1"); Modified: head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -93,13 +93,13 @@ const char *x86::getX86TargetCPU(const ArgList &Args, return "x86-64"; switch (Triple.getOS()) { - case llvm::Triple::FreeBSD: - return "i686"; case llvm::Triple::NetBSD: - case llvm::Triple::OpenBSD: return "i486"; case llvm::Triple::Haiku: + case llvm::Triple::OpenBSD: return "i586"; + case llvm::Triple::FreeBSD: + return "i686"; default: // Fallback to p4. return "pentium4"; Modified: head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -1879,8 +1879,8 @@ void Clang::AddPPCTargetArgs(const ArgList &Args, ABIName = "elfv1-qpx"; break; } - - if (T.isMusl() || (T.isOSFreeBSD() && T.getOSMajorVersion() >= 13)) + if ((T.isOSFreeBSD() && T.getOSMajorVersion() >= 13) || + T.isOSOpenBSD() || T.isMusl()) ABIName = "elfv2"; else ABIName = "elfv1"; @@ -2971,7 +2971,7 @@ static void RenderSCPOptions(const ToolChain &TC, cons return; if (Args.hasFlag(options::OPT_fstack_clash_protection, - options::OPT_fnostack_clash_protection, false)) + options::OPT_fno_stack_clash_protection, false)) CmdArgs.push_back("-fstack-clash-protection"); } Modified: head/contrib/llvm-project/libunwind/src/AddressSpace.hpp ============================================================================== --- head/contrib/llvm-project/libunwind/src/AddressSpace.hpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/libunwind/src/AddressSpace.hpp Mon Aug 24 17:43:23 2020 (r364718) @@ -457,7 +457,7 @@ struct _LIBUNWIND_HIDDEN dl_iterate_cb_data { // There should be just one of these per process. static FrameHeaderCache ProcessFrameHeaderCache; -#endif // _LIBUNWIND_USE_FRAME_HEADER_CACHE +#endif static bool checkAddrInSegment(const Elf_Phdr *phdr, size_t image_base, dl_iterate_cb_data *cbdata) { @@ -481,7 +481,7 @@ int findUnwindSectionsByPhdr(struct dl_phdr_info *pinf #if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE) if (ProcessFrameHeaderCache.find(pinfo, pinfo_size, data)) return 1; -#endif // _LIBUNWIND_USE_FRAME_HEADER_CACHE +#endif Elf_Addr image_base = calculateImageBase(pinfo); bool found_obj = false; @@ -511,7 +511,7 @@ int findUnwindSectionsByPhdr(struct dl_phdr_info *pinf if (found_obj && found_hdr) { #if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE) ProcessFrameHeaderCache.add(cbdata->sects); -#endif // _LIBUNWIND_USE_FRAME_HEADER_CACHE +#endif return 1; } } Modified: head/contrib/llvm-project/lld/docs/ReleaseNotes.rst ============================================================================== --- head/contrib/llvm-project/lld/docs/ReleaseNotes.rst Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/lld/docs/ReleaseNotes.rst Mon Aug 24 17:43:23 2020 (r364718) @@ -28,6 +28,10 @@ ELF Improvements chrome://tracing. The file can be specified with ``--time-trace-file``. Trace granularity can be specified with ``--time-trace-granularity``. (`D71060 `_) +* For ARM architectures the default max page size was increased to 64k. + This increases compatibility with systems where a non standard page + size was configured. This also is inline with GNU ld defaults. + (`D77330 `_) * ... Breaking changes @@ -40,12 +44,17 @@ Breaking changes COFF Improvements ----------------- -* ... +* Fixed exporting symbols whose names contain a period (``.``), which was + a regression in lld 7. MinGW Improvements ------------------ -* ... +* Implemented new options for disabling auto import and runtime pseudo + relocations (``--disable-auto-import`` and + ``--disable-runtime-pseudo-reloc``), the ``--no-seh`` flag and options + for selecting file and section alignment (``--file-alignment`` and + ``--section-alignment``). MachO Improvements ------------------ Modified: head/contrib/llvm-project/lld/docs/conf.py ============================================================================== --- head/contrib/llvm-project/lld/docs/conf.py Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/lld/docs/conf.py Mon Aug 24 17:43:23 2020 (r364718) @@ -134,7 +134,7 @@ html_last_updated_fmt = '%Y-%m-%d' #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -html_sidebars = {'index': 'indexsidebar.html'} +html_sidebars = {'index': ['indexsidebar.html']} # Additional templates that should be rendered to pages, maps page names to # template names. Modified: head/contrib/llvm-project/llvm/include/llvm/MC/MCDwarf.h ============================================================================== --- head/contrib/llvm-project/llvm/include/llvm/MC/MCDwarf.h Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/llvm/include/llvm/MC/MCDwarf.h Mon Aug 24 17:43:23 2020 (r364718) @@ -467,10 +467,12 @@ class MCCFIInstruction { (private) unsigned Register2; }; std::vector Values; + std::string Comment; - MCCFIInstruction(OpType Op, MCSymbol *L, unsigned R, int O, StringRef V) + MCCFIInstruction(OpType Op, MCSymbol *L, unsigned R, int O, StringRef V, + StringRef Comment = "") : Operation(Op), Label(L), Register(R), Offset(O), - Values(V.begin(), V.end()) { + Values(V.begin(), V.end()), Comment(Comment) { assert(Op != OpRegister); } @@ -570,8 +572,9 @@ class MCCFIInstruction { (private) /// .cfi_escape Allows the user to add arbitrary bytes to the unwind /// info. - static MCCFIInstruction createEscape(MCSymbol *L, StringRef Vals) { - return MCCFIInstruction(OpEscape, L, 0, 0, Vals); + static MCCFIInstruction createEscape(MCSymbol *L, StringRef Vals, + StringRef Comment = "") { + return MCCFIInstruction(OpEscape, L, 0, 0, Vals, Comment); } /// A special wrapper for .cfi_escape that indicates GNU_ARGS_SIZE @@ -605,6 +608,10 @@ class MCCFIInstruction { (private) StringRef getValues() const { assert(Operation == OpEscape); return StringRef(&Values[0], Values.size()); + } + + StringRef getComment() const { + return Comment; } }; Modified: head/contrib/llvm-project/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -241,6 +241,7 @@ void AsmPrinter::emitCFIInstruction(const MCCFIInstruc OutStreamer->emitCFIGnuArgsSize(Inst.getOffset()); break; case MCCFIInstruction::OpEscape: + OutStreamer->AddComment(Inst.getComment()); OutStreamer->emitCFIEscape(Inst.getValues()); break; case MCCFIInstruction::OpRestore: Modified: head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -37,6 +37,10 @@ class FeatureBitset { (public) set(I); } + bool any() const { + return llvm::any_of(Bits, [](uint64_t V) { return V != 0; }); + } + constexpr FeatureBitset &set(unsigned I) { // GCC <6.2 crashes if this is written in a single statement. uint32_t NewBits = Bits[I / 32] | (uint32_t(1) << (I % 32)); @@ -89,6 +93,13 @@ class FeatureBitset { (public) Result.Bits[I] = ~Bits[I]; return Result; } + + constexpr bool operator!=(const FeatureBitset &RHS) const { + for (unsigned I = 0, E = array_lengthof(Bits); I != E; ++I) + if (Bits[I] != RHS.Bits[I]) + return true; + return false; + } }; struct ProcInfo { @@ -552,11 +563,17 @@ void llvm::X86::getFeaturesForCPU(StringRef CPU, // For each feature that is (transitively) implied by this feature, set it. static void getImpliedEnabledFeatures(FeatureBitset &Bits, const FeatureBitset &Implies) { + // Fast path: Implies is often empty. + if (!Implies.any()) + return; + FeatureBitset Prev; Bits |= Implies; - for (unsigned i = 0; i != CPU_FEATURE_MAX; ++i) { - if (Implies[i]) - getImpliedEnabledFeatures(Bits, FeatureInfos[i].ImpliedFeatures); - } + do { + Prev = Bits; + for (unsigned i = CPU_FEATURE_MAX; i;) + if (Bits[--i]) + Bits |= FeatureInfos[i].ImpliedFeatures; + } while (Prev != Bits); } /// Create bit vector of features that are implied disabled if the feature @@ -564,12 +581,14 @@ static void getImpliedEnabledFeatures(FeatureBitset &B static void getImpliedDisabledFeatures(FeatureBitset &Bits, unsigned Value) { // Check all features looking for any dependent on this feature. If we find // one, mark it and recursively find any feature that depend on it. - for (unsigned i = 0; i != CPU_FEATURE_MAX; ++i) { - if (FeatureInfos[i].ImpliedFeatures[Value]) { - Bits.set(i); - getImpliedDisabledFeatures(Bits, i); - } - } + FeatureBitset Prev; + Bits.set(Value); + do { + Prev = Bits; + for (unsigned i = 0; i != CPU_FEATURE_MAX; ++i) + if ((FeatureInfos[i].ImpliedFeatures & Bits).any()) + Bits.set(i); + } while (Prev != Bits); } void llvm::X86::getImpliedFeatures( Modified: head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -148,6 +148,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/LEB128.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetMachine.h" @@ -399,12 +400,102 @@ static bool ShouldSignReturnAddress(MachineFunction &M return false; } +// Convenience function to create a DWARF expression for +// Expr + NumBytes + NumVGScaledBytes * AArch64::VG +static void appendVGScaledOffsetExpr(SmallVectorImpl &Expr, + int NumBytes, int NumVGScaledBytes, unsigned VG, + llvm::raw_string_ostream &Comment) { + uint8_t buffer[16]; + + if (NumBytes) { + Expr.push_back(dwarf::DW_OP_consts); + Expr.append(buffer, buffer + encodeSLEB128(NumBytes, buffer)); + Expr.push_back((uint8_t)dwarf::DW_OP_plus); + Comment << (NumBytes < 0 ? " - " : " + ") << std::abs(NumBytes); + } + + if (NumVGScaledBytes) { + Expr.push_back((uint8_t)dwarf::DW_OP_consts); + Expr.append(buffer, buffer + encodeSLEB128(NumVGScaledBytes, buffer)); + + Expr.push_back((uint8_t)dwarf::DW_OP_bregx); + Expr.append(buffer, buffer + encodeULEB128(VG, buffer)); + Expr.push_back(0); + + Expr.push_back((uint8_t)dwarf::DW_OP_mul); + Expr.push_back((uint8_t)dwarf::DW_OP_plus); + + Comment << (NumVGScaledBytes < 0 ? " - " : " + ") + << std::abs(NumVGScaledBytes) << " * VG"; + } +} + +// Creates an MCCFIInstruction: +// { DW_CFA_def_cfa_expression, ULEB128 (sizeof expr), expr } +MCCFIInstruction AArch64FrameLowering::createDefCFAExpressionFromSP( + const TargetRegisterInfo &TRI, const StackOffset &OffsetFromSP) const { + int64_t NumBytes, NumVGScaledBytes; + OffsetFromSP.getForDwarfOffset(NumBytes, NumVGScaledBytes); + + std::string CommentBuffer = "sp"; + llvm::raw_string_ostream Comment(CommentBuffer); + + // Build up the expression (SP + NumBytes + NumVGScaledBytes * AArch64::VG) + SmallString<64> Expr; + Expr.push_back((uint8_t)(dwarf::DW_OP_breg0 + /*SP*/ 31)); + Expr.push_back(0); + appendVGScaledOffsetExpr(Expr, NumBytes, NumVGScaledBytes, + TRI.getDwarfRegNum(AArch64::VG, true), Comment); + + // Wrap this into DW_CFA_def_cfa. + SmallString<64> DefCfaExpr; + DefCfaExpr.push_back(dwarf::DW_CFA_def_cfa_expression); + uint8_t buffer[16]; + DefCfaExpr.append(buffer, + buffer + encodeULEB128(Expr.size(), buffer)); + DefCfaExpr.append(Expr.str()); + return MCCFIInstruction::createEscape(nullptr, DefCfaExpr.str(), + Comment.str()); +} + +MCCFIInstruction AArch64FrameLowering::createCfaOffset( + const TargetRegisterInfo &TRI, unsigned Reg, + const StackOffset &OffsetFromDefCFA) const { + int64_t NumBytes, NumVGScaledBytes; + OffsetFromDefCFA.getForDwarfOffset(NumBytes, NumVGScaledBytes); + + unsigned DwarfReg = TRI.getDwarfRegNum(Reg, true); + + // Non-scalable offsets can use DW_CFA_offset directly. + if (!NumVGScaledBytes) + return MCCFIInstruction::createOffset(nullptr, DwarfReg, NumBytes); + + std::string CommentBuffer; + llvm::raw_string_ostream Comment(CommentBuffer); + Comment << printReg(Reg, &TRI) << " @ cfa"; + + // Build up expression (NumBytes + NumVGScaledBytes * AArch64::VG) + SmallString<64> OffsetExpr; + appendVGScaledOffsetExpr(OffsetExpr, NumBytes, NumVGScaledBytes, + TRI.getDwarfRegNum(AArch64::VG, true), Comment); + + // Wrap this into DW_CFA_expression + SmallString<64> CfaExpr; + CfaExpr.push_back(dwarf::DW_CFA_expression); + uint8_t buffer[16]; + CfaExpr.append(buffer, buffer + encodeULEB128(DwarfReg, buffer)); + CfaExpr.append(buffer, buffer + encodeULEB128(OffsetExpr.size(), buffer)); + CfaExpr.append(OffsetExpr.str()); + + return MCCFIInstruction::createEscape(nullptr, CfaExpr.str(), Comment.str()); +} + void AArch64FrameLowering::emitCalleeSavedFrameMoves( MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) const { MachineFunction &MF = *MBB.getParent(); MachineFrameInfo &MFI = MF.getFrameInfo(); const TargetSubtargetInfo &STI = MF.getSubtarget(); - const MCRegisterInfo *MRI = STI.getRegisterInfo(); + const TargetRegisterInfo *TRI = STI.getRegisterInfo(); const TargetInstrInfo *TII = STI.getInstrInfo(); DebugLoc DL = MBB.findDebugLoc(MBBI); @@ -415,11 +506,26 @@ void AArch64FrameLowering::emitCalleeSavedFrameMoves( for (const auto &Info : CSI) { unsigned Reg = Info.getReg(); - int64_t Offset = - MFI.getObjectOffset(Info.getFrameIdx()) - getOffsetOfLocalArea(); - unsigned DwarfReg = MRI->getDwarfRegNum(Reg, true); - unsigned CFIIndex = MF.addFrameInst( - MCCFIInstruction::createOffset(nullptr, DwarfReg, Offset)); + + // Not all unwinders may know about SVE registers, so assume the lowest + // common demoninator. + unsigned NewReg; + if (static_cast(TRI)->regNeedsCFI(Reg, NewReg)) + Reg = NewReg; + else + continue; + + StackOffset Offset; + if (MFI.getStackID(Info.getFrameIdx()) == TargetStackID::SVEVector) { + AArch64FunctionInfo *AFI = MF.getInfo(); + Offset = StackOffset(MFI.getObjectOffset(Info.getFrameIdx()), MVT::nxv1i8) - + StackOffset(AFI->getCalleeSavedStackSize(MFI), MVT::i8); + } else { + Offset = {MFI.getObjectOffset(Info.getFrameIdx()) - + getOffsetOfLocalArea(), + MVT::i8}; + } + unsigned CFIIndex = MF.addFrameInst(createCfaOffset(*TRI, Reg, Offset)); BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)) .addCFIIndex(CFIIndex) .setMIFlags(MachineInstr::FrameSetup); @@ -1383,9 +1489,18 @@ void AArch64FrameLowering::emitPrologue(MachineFunctio .addCFIIndex(CFIIndex) .setMIFlags(MachineInstr::FrameSetup); } else { - // Encode the stack size of the leaf function. - unsigned CFIIndex = MF.addFrameInst( - MCCFIInstruction::cfiDefCfaOffset(nullptr, MFI.getStackSize())); + unsigned CFIIndex; + if (SVEStackSize) { + const TargetSubtargetInfo &STI = MF.getSubtarget(); + const TargetRegisterInfo &TRI = *STI.getRegisterInfo(); + StackOffset TotalSize = + SVEStackSize + StackOffset((int64_t)MFI.getStackSize(), MVT::i8); + CFIIndex = MF.addFrameInst(createDefCFAExpressionFromSP(TRI, TotalSize)); + } else { + // Encode the stack size of the leaf function. + CFIIndex = MF.addFrameInst( + MCCFIInstruction::cfiDefCfaOffset(nullptr, MFI.getStackSize())); + } BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)) .addCFIIndex(CFIIndex) .setMIFlags(MachineInstr::FrameSetup); @@ -2006,6 +2121,7 @@ static void computeCalleeSaveRegisterPairs( // available unwind codes. This flag assures that the alignment fixup is done // only once, as intened. bool FixupDone = false; + for (unsigned i = 0; i < Count; ++i) { RegPairInfo RPI; RPI.Reg1 = CSI[i].getReg(); Modified: head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.h ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.h Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.h Mon Aug 24 17:43:23 2020 (r364718) @@ -18,6 +18,8 @@ namespace llvm { +class MCCFIInstruction; + class AArch64FrameLowering : public TargetFrameLowering { public: explicit AArch64FrameLowering() @@ -119,6 +121,11 @@ class AArch64FrameLowering : public TargetFrameLowerin int64_t assignSVEStackObjectOffsets(MachineFrameInfo &MF, int &MinCSFrameIndex, int &MaxCSFrameIndex) const; + MCCFIInstruction + createDefCFAExpressionFromSP(const TargetRegisterInfo &TRI, + const StackOffset &OffsetFromSP) const; + MCCFIInstruction createCfaOffset(const TargetRegisterInfo &MRI, unsigned DwarfReg, + const StackOffset &OffsetFromDefCFA) const; bool shouldCombineCSRLocalStackBumpInEpilogue(MachineBasicBlock &MBB, unsigned StackBumpBytes) const; }; Modified: head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -4107,6 +4107,7 @@ static bool canGuaranteeTCO(CallingConv::ID CC) { static bool mayTailCallThisCC(CallingConv::ID CC) { switch (CC) { case CallingConv::C: + case CallingConv::AArch64_SVE_VectorCall: case CallingConv::PreserveMost: case CallingConv::Swift: return true; @@ -4126,6 +4127,15 @@ bool AArch64TargetLowering::isEligibleForTailCallOptim MachineFunction &MF = DAG.getMachineFunction(); const Function &CallerF = MF.getFunction(); CallingConv::ID CallerCC = CallerF.getCallingConv(); + + // If this function uses the C calling convention but has an SVE signature, + // then it preserves more registers and should assume the SVE_VectorCall CC. + // The check for matching callee-saved regs will determine whether it is + // eligible for TCO. + if (CallerCC == CallingConv::C && + AArch64RegisterInfo::hasSVEArgsOrReturn(&MF)) + CallerCC = CallingConv::AArch64_SVE_VectorCall; + bool CCMatch = CallerCC == CalleeCC; // When using the Windows calling convention on a non-windows OS, we want @@ -4313,6 +4323,20 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI bool TailCallOpt = MF.getTarget().Options.GuaranteedTailCallOpt; bool IsSibCall = false; + // Check callee args/returns for SVE registers and set calling convention + // accordingly. + if (CallConv == CallingConv::C) { + bool CalleeOutSVE = any_of(Outs, [](ISD::OutputArg &Out){ + return Out.VT.isScalableVector(); + }); + bool CalleeInSVE = any_of(Ins, [](ISD::InputArg &In){ + return In.VT.isScalableVector(); + }); + + if (CalleeInSVE || CalleeOutSVE) + CallConv = CallingConv::AArch64_SVE_VectorCall; + } + if (IsTailCall) { // Check if it's really possible to do a tail call. IsTailCall = isEligibleForTailCallOptimization( @@ -4665,20 +4689,6 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI for (auto &RegToPass : RegsToPass) Ops.push_back(DAG.getRegister(RegToPass.first, RegToPass.second.getValueType())); - - // Check callee args/returns for SVE registers and set calling convention - // accordingly. - if (CallConv == CallingConv::C) { - bool CalleeOutSVE = any_of(Outs, [](ISD::OutputArg &Out){ - return Out.VT.isScalableVector(); - }); - bool CalleeInSVE = any_of(Ins, [](ISD::InputArg &In){ - return In.VT.isScalableVector(); - }); - - if (CalleeInSVE || CalleeOutSVE) - CallConv = CallingConv::AArch64_SVE_VectorCall; - } // Add a register mask operand representing the call-preserved registers. const uint32_t *Mask; Modified: head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -40,7 +40,30 @@ AArch64RegisterInfo::AArch64RegisterInfo(const Triple AArch64_MC::initLLVMToCVRegMapping(this); } -static bool hasSVEArgsOrReturn(const MachineFunction *MF) { +/// Return whether the register needs a CFI entry. Not all unwinders may know +/// about SVE registers, so we assume the lowest common denominator, i.e. the +/// callee-saves required by the base ABI. For the SVE registers z8-z15 only the +/// lower 64-bits (d8-d15) need to be saved. The lower 64-bits subreg is +/// returned in \p RegToUseForCFI. +bool AArch64RegisterInfo::regNeedsCFI(unsigned Reg, + unsigned &RegToUseForCFI) const { + if (AArch64::PPRRegClass.contains(Reg)) + return false; + + if (AArch64::ZPRRegClass.contains(Reg)) { + RegToUseForCFI = getSubReg(Reg, AArch64::dsub); + for (int I = 0; CSR_AArch64_AAPCS_SaveList[I]; ++I) { + if (CSR_AArch64_AAPCS_SaveList[I] == RegToUseForCFI) + return true; + } + return false; + } + + RegToUseForCFI = Reg; + return true; +} + +bool AArch64RegisterInfo::hasSVEArgsOrReturn(const MachineFunction *MF) { const Function &F = MF->getFunction(); return isa(F.getReturnType()) || any_of(F.args(), [](const Argument &Arg) { Modified: head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.h ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.h Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.h Mon Aug 24 17:43:23 2020 (r364718) @@ -42,6 +42,8 @@ class AArch64RegisterInfo final : public AArch64GenReg void UpdateCustomCallPreservedMask(MachineFunction &MF, const uint32_t **Mask) const; + static bool hasSVEArgsOrReturn(const MachineFunction *MF); + /// Code Generation virtual methods... const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override; const MCPhysReg *getDarwinCalleeSavedRegs(const MachineFunction *MF) const; @@ -122,6 +124,7 @@ class AArch64RegisterInfo final : public AArch64GenReg MachineFunction &MF) const override; unsigned getLocalAddressRegister(const MachineFunction &MF) const; + bool regNeedsCFI(unsigned Reg, unsigned &RegToUseForCFI) const; }; } // end namespace llvm Modified: head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.td ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.td Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.td Mon Aug 24 17:43:23 2020 (r364718) @@ -133,6 +133,9 @@ def NZCV : AArch64Reg<0, "nzcv">; // First fault status register def FFR : AArch64Reg<0, "ffr">, DwarfRegNum<[47]>; +// Purely virtual Vector Granule (VG) Dwarf register +def VG : AArch64Reg<0, "vg">, DwarfRegNum<[46]>; + // GPR register classes with the intersections of GPR32/GPR32sp and // GPR64/GPR64sp for use by the coalescer. def GPR32common : RegisterClass<"AArch64", [i32], 32, (sequence "W%u", 0, 30)> { Modified: head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td Mon Aug 24 17:43:23 2020 (r364718) @@ -1765,7 +1765,7 @@ multiclass sve_prefetch; defm : unpred_store< store, nxv2f16, ST1H_D_IMM, PTRUE_D>; defm : unpred_store< store, nxv4f32, ST1W_IMM, PTRUE_S>; - defm : unpred_store< store, nxv4f32, ST1W_D_IMM, PTRUE_D>; + defm : unpred_store< store, nxv2f32, ST1W_D_IMM, PTRUE_D>; defm : unpred_store< store, nxv2f64, ST1D_IMM, PTRUE_D>; multiclass unpred_loaderaseFromParent(); if (Op1->use_empty()) Op1->eraseFromParent(); - if (Op2->use_empty()) + if (Op1 != Op2 && Op2->use_empty()) Op2->eraseFromParent(); return true; Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -279,7 +279,7 @@ bool RISCVInstrInfo::analyzeBranch(MachineBasicBlock & // Handle a single unconditional branch. if (NumTerminators == 1 && I->getDesc().isUnconditionalBranch()) { - TBB = I->getOperand(0).getMBB(); + TBB = getBranchDestBlock(*I); return false; } @@ -293,7 +293,7 @@ bool RISCVInstrInfo::analyzeBranch(MachineBasicBlock & if (NumTerminators == 2 && std::prev(I)->getDesc().isConditionalBranch() && I->getDesc().isUnconditionalBranch()) { parseCondBranch(*std::prev(I), TBB, Cond); - FBB = I->getOperand(0).getMBB(); + FBB = getBranchDestBlock(*I); return false; } @@ -384,11 +384,7 @@ unsigned RISCVInstrInfo::insertIndirectBranch(MachineB MachineFunction *MF = MBB.getParent(); MachineRegisterInfo &MRI = MF->getRegInfo(); - const auto &TM = static_cast(MF->getTarget()); - if (TM.isPositionIndependent()) - report_fatal_error("Unable to insert indirect branch"); - if (!isInt<32>(BrOffset)) report_fatal_error( "Branch offsets outside of the signed 32-bit range not supported"); @@ -399,15 +395,13 @@ unsigned RISCVInstrInfo::insertIndirectBranch(MachineB Register ScratchReg = MRI.createVirtualRegister(&RISCV::GPRRegClass); auto II = MBB.end(); - MachineInstr &LuiMI = *BuildMI(MBB, II, DL, get(RISCV::LUI), ScratchReg) - .addMBB(&DestBB, RISCVII::MO_HI); - BuildMI(MBB, II, DL, get(RISCV::PseudoBRIND)) - .addReg(ScratchReg, RegState::Kill) - .addMBB(&DestBB, RISCVII::MO_LO); + MachineInstr &MI = *BuildMI(MBB, II, DL, get(RISCV::PseudoJump)) + .addReg(ScratchReg, RegState::Define | RegState::Dead) + .addMBB(&DestBB, RISCVII::MO_CALL); RS->enterBasicBlockEnd(MBB); unsigned Scav = RS->scavengeRegisterBackwards(RISCV::GPRRegClass, - LuiMI.getIterator(), false, 0); + MI.getIterator(), false, 0); MRI.replaceRegWith(ScratchReg, Scav); MRI.clearVirtRegs(); RS->setRegUsed(Scav); @@ -431,6 +425,7 @@ RISCVInstrInfo::getBranchDestBlock(const MachineInstr bool RISCVInstrInfo::isBranchOffsetInRange(unsigned BranchOp, int64_t BrOffset) const { + unsigned XLen = STI.getXLen(); // Ideally we could determine the supported branch offset from the // RISCVII::FormMask, but this can't be used for Pseudo instructions like // PseudoBR. @@ -447,6 +442,8 @@ bool RISCVInstrInfo::isBranchOffsetInRange(unsigned Br case RISCV::JAL: case RISCV::PseudoBR: return isIntN(21, BrOffset); + case RISCV::PseudoJump: + return isIntN(32, SignExtend64(BrOffset + 0x800, XLen)); } } Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.td ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.td Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.td Mon Aug 24 17:43:23 2020 (r364718) @@ -1012,8 +1012,8 @@ def : Pat<(riscv_tail (iPTR tglobaladdr:$dst)), def : Pat<(riscv_tail (iPTR texternalsym:$dst)), (PseudoTAIL texternalsym:$dst)>; -let isCall = 0, isBarrier = 0, isCodeGenOnly = 0, hasSideEffects = 0, - mayStore = 0, mayLoad = 0 in +let isCall = 0, isBarrier = 1, isBranch = 1, isTerminator = 1, + isCodeGenOnly = 0, hasSideEffects = 0, mayStore = 0, mayLoad = 0 in def PseudoJump : Pseudo<(outs GPR:$rd), (ins pseudo_jump_symbol:$target), []> { let AsmString = "jump\t$target, $rd"; } Modified: head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -3208,13 +3208,23 @@ X86TargetLowering::LowerMemArgument(SDValue Chain, Cal return DAG.getFrameIndex(FI, PtrVT); } + EVT ArgVT = Ins[i].ArgVT; + + // If this is a vector that has been split into multiple parts, and the + // scalar size of the parts don't match the vector element size, then we can't + // elide the copy. The parts will have padding between them instead of being + // packed like a vector. + bool ScalarizedAndExtendedVector = + ArgVT.isVector() && !VA.getLocVT().isVector() && + VA.getLocVT().getSizeInBits() != ArgVT.getScalarSizeInBits(); + // This is an argument in memory. We might be able to perform copy elision. // If the argument is passed directly in memory without any extension, then we // can perform copy elision. Large vector types, for example, may be passed // indirectly by pointer. if (Flags.isCopyElisionCandidate() && - VA.getLocInfo() != CCValAssign::Indirect && !ExtendedInMem) { - EVT ArgVT = Ins[i].ArgVT; + VA.getLocInfo() != CCValAssign::Indirect && !ExtendedInMem && + !ScalarizedAndExtendedVector) { SDValue PartAddr; if (Ins[i].PartOffset == 0) { // If this is a one-part value or the first part of a multi-part value, Modified: head/contrib/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp Mon Aug 24 17:31:17 2020 (r364717) +++ head/contrib/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp Mon Aug 24 17:43:23 2020 (r364718) @@ -468,19 +468,16 @@ static bool CanDoGlobalSRA(GlobalVariable *GV) { /// Copy over the debug info for a variable to its SRA replacements. static void transferSRADebugInfo(GlobalVariable *GV, GlobalVariable *NGV, uint64_t FragmentOffsetInBits, - uint64_t FragmentSizeInBits) { + uint64_t FragmentSizeInBits, + uint64_t VarSize) { SmallVector GVs; GV->getDebugInfo(GVs); for (auto *GVE : GVs) { DIVariable *Var = GVE->getVariable(); - Optional VarSize = Var->getSizeInBits(); - DIExpression *Expr = GVE->getExpression(); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Aug 24 17:57:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A96E53C9819; Mon, 24 Aug 2020 17:57:09 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb0FK3rblz41lr; Mon, 24 Aug 2020 17:57:09 +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 6368E1C37F; Mon, 24 Aug 2020 17:57:09 +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 07OHv9P0031145; Mon, 24 Aug 2020 17:57:09 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OHv95N031144; Mon, 24 Aug 2020 17:57:09 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202008241757.07OHv95N031144@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: Mon, 24 Aug 2020 17:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364719 - head/usr.bin/w X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/w X-SVN-Commit-Revision: 364719 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 17:57:09 -0000 Author: fernape (ports committer) Date: Mon Aug 24 17:57:08 2020 New Revision: 364719 URL: https://svnweb.freebsd.org/changeset/base/364719 Log: w(1): Add EXAMPLES to man page Add small example section showing general use and -d and -h flags Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26172 Modified: head/usr.bin/w/w.1 Modified: head/usr.bin/w/w.1 ============================================================================== --- head/usr.bin/w/w.1 Mon Aug 24 17:43:23 2020 (r364718) +++ head/usr.bin/w/w.1 Mon Aug 24 17:57:08 2020 (r364719) @@ -28,7 +28,7 @@ .\" @(#)w.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 1, 2015 +.Dd August 24, 2020 .Dt W 1 .Os .Sh NAME @@ -99,6 +99,41 @@ names are specified, the output is restricted to those .It Pa /var/run/utx.active list of users on the system .El +.Sh EXAMPLES +Show global activity of the system: +.Bd -literal -offset indent +$ w + 8:05PM up 35 mins, 3 users, load averages: 0.09, 0.35, 0.27 +USER TTY FROM LOGIN@ IDLE WHAT +fernape v0 - 7:30PM - tmux: client (/tmp/tmux-1001/default) (tmux) +root v1 - 8:03PM 1 -bash (bash) +fernape pts/0 tmux(1391).%0 8:04PM - w +.Ed +.Pp +Show the entire process list per tty: +.Bd -literal -offset indent +$ w -d + 8:12PM up 42 mins, 3 users, load averages: 0.01, 0.11, 0.17 +USER TTY FROM LOGIN@ IDLE WHAT + 1199 login [pam] (login) + 1207 -bash (bash) + 1507 tmux: client (/tmp/tmux-1001/default) (tmux) +fernape v0 - 7:30PM - tmux: client (/tmp/tmux-1001/default) (tmux) + 1488 login [pam] (login) + 1489 -bash (bash) +root v1 - 8:08PM 3 -bash (bash) + 1510 -bash (bash) + 1515 w -d +fernape pts/0 tmux(1509).%0 8:11PM - w -d +.Ed +.Pp +Same as above but only for the root user and omitting the heading: +.Bd -literal -offset indent +$ w -d -h root + 1183 login [pam] (login) + 1204 -bash (bash) +root v1 - 7:15PM - -bash (bash) +.Ed .Sh COMPATIBILITY The .Fl f , @@ -137,9 +172,7 @@ to ignore interrupts. prints .Ql \- . ) .Pp -The -.Tn CPU -time is only an estimate, in particular, if someone leaves a background +The CPU time is only an estimate, in particular, if someone leaves a background process running after logging out, the person currently on that terminal is .Dq charged with the time. From owner-svn-src-all@freebsd.org Mon Aug 24 18:13:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0ADB3CA0BC; Mon, 24 Aug 2020 18:13:46 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb0cV4ftgz43FH; Mon, 24 Aug 2020 18:13:46 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83CA31C958; Mon, 24 Aug 2020 18:13:46 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07OIDkmV043288; Mon, 24 Aug 2020 18:13:46 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OIDjbx043281; Mon, 24 Aug 2020 18:13:45 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202008241813.07OIDjbx043281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 24 Aug 2020 18:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364720 - in head/contrib/sqlite3: . tea X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/contrib/sqlite3: . tea X-SVN-Commit-Revision: 364720 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 18:13:46 -0000 Author: cy Date: Mon Aug 24 18:13:44 2020 New Revision: 364720 URL: https://svnweb.freebsd.org/changeset/base/364720 Log: MFV 364467: Update sqlite to 3.33.0 (3330000). Release announcement at https://www.sqlite.org/releaselog/3_33_0.html. MFC after: 1 month Added: head/contrib/sqlite3/sqlite3rc.h - copied unchanged from r364467, vendor/sqlite3/dist/sqlite3rc.h Modified: head/contrib/sqlite3/Makefile.am head/contrib/sqlite3/Makefile.in head/contrib/sqlite3/configure head/contrib/sqlite3/configure.ac head/contrib/sqlite3/shell.c head/contrib/sqlite3/sqlite3.c head/contrib/sqlite3/sqlite3.h head/contrib/sqlite3/tea/configure head/contrib/sqlite3/tea/configure.ac Directory Properties: head/contrib/sqlite3/ (props changed) Modified: head/contrib/sqlite3/Makefile.am ============================================================================== --- head/contrib/sqlite3/Makefile.am Mon Aug 24 17:57:08 2020 (r364719) +++ head/contrib/sqlite3/Makefile.am Mon Aug 24 18:13:44 2020 (r364720) @@ -13,7 +13,7 @@ sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_ include_HEADERS = sqlite3.h sqlite3ext.h -EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc README.txt Replace.cs Makefile.fallback +EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc sqlite3rc.h README.txt Replace.cs Makefile.fallback pkgconfigdir = ${libdir}/pkgconfig pkgconfig_DATA = sqlite3.pc Modified: head/contrib/sqlite3/Makefile.in ============================================================================== --- head/contrib/sqlite3/Makefile.in Mon Aug 24 17:57:08 2020 (r364719) +++ head/contrib/sqlite3/Makefile.in Mon Aug 24 18:13:44 2020 (r364720) @@ -370,7 +370,7 @@ sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@ sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@ sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) include_HEADERS = sqlite3.h sqlite3ext.h -EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc README.txt Replace.cs Makefile.fallback +EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc sqlite3rc.h README.txt Replace.cs Makefile.fallback pkgconfigdir = ${libdir}/pkgconfig pkgconfig_DATA = sqlite3.pc man_MANS = sqlite3.1 Modified: head/contrib/sqlite3/configure ============================================================================== --- head/contrib/sqlite3/configure Mon Aug 24 17:57:08 2020 (r364719) +++ head/contrib/sqlite3/configure Mon Aug 24 18:13:44 2020 (r364720) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.32.3. +# Generated by GNU Autoconf 2.69 for sqlite 3.33.0. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.32.3' -PACKAGE_STRING='sqlite 3.32.3' +PACKAGE_VERSION='3.33.0' +PACKAGE_STRING='sqlite 3.33.0' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.32.3 to adapt to many kinds of systems. +\`configure' configures sqlite 3.33.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1412,7 +1412,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.32.3:";; + short | recursive ) echo "Configuration of sqlite 3.33.0:";; esac cat <<\_ACEOF @@ -1537,7 +1537,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.32.3 +sqlite configure 3.33.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1952,7 +1952,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.32.3, which was +It was created by sqlite $as_me 3.33.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2818,7 +2818,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.32.3' + VERSION='3.33.0' cat >>confdefs.h <<_ACEOF @@ -14438,7 +14438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.32.3, which was +This file was extended by sqlite $as_me 3.33.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14495,7 +14495,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sqlite config.status 3.32.3 +sqlite config.status 3.33.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/sqlite3/configure.ac ============================================================================== --- head/contrib/sqlite3/configure.ac Mon Aug 24 17:57:08 2020 (r364719) +++ head/contrib/sqlite3/configure.ac Mon Aug 24 18:13:44 2020 (r364720) @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.32.3, http://www.sqlite.org) +AC_INIT(sqlite, 3.33.0, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) Modified: head/contrib/sqlite3/shell.c ============================================================================== --- head/contrib/sqlite3/shell.c Mon Aug 24 17:57:08 2020 (r364719) +++ head/contrib/sqlite3/shell.c Mon Aug 24 18:13:44 2020 (r364720) @@ -642,6 +642,21 @@ static int strlenChar(const char *z){ } /* +** Return true if zFile does not exist or if it is not an ordinary file. +*/ +#ifdef _WIN32 +# define notNormalFile(X) 0 +#else +static int notNormalFile(const char *zFile){ + struct stat x; + int rc; + memset(&x, 0, sizeof(x)); + rc = stat(zFile, &x); + return rc || !S_ISREG(x.st_mode); +} +#endif + +/* ** This routine reads a line of text from FILE in, stores ** the text in memory obtained from malloc() and returns a pointer ** to the text. NULL is returned at end of file, or if malloc() @@ -953,7 +968,7 @@ static void shellModuleSchema( ** CREATE VIRTUAL TABLE ** ** This UDF is used by the .schema command to insert the schema name of -** attached databases into the middle of the sqlite_master.sql field. +** attached databases into the middle of the sqlite_schema.sql field. */ static void shellAddSchemaName( sqlite3_context *pCtx, @@ -3330,7 +3345,7 @@ static int completionNext(sqlite3_vtab_cursor *cur){ const char *zDb = (const char*)sqlite3_column_text(pS2, 1); zSql = sqlite3_mprintf( "%z%s" - "SELECT name FROM \"%w\".sqlite_master", + "SELECT name FROM \"%w\".sqlite_schema", zSql, zSep, zDb ); if( zSql==0 ) return SQLITE_NOMEM; @@ -3354,7 +3369,7 @@ static int completionNext(sqlite3_vtab_cursor *cur){ const char *zDb = (const char*)sqlite3_column_text(pS2, 1); zSql = sqlite3_mprintf( "%z%s" - "SELECT pti.name FROM \"%w\".sqlite_master AS sm" + "SELECT pti.name FROM \"%w\".sqlite_schema AS sm" " JOIN pragma_table_info(sm.name,%Q) AS pti" " WHERE sm.type='table'", zSql, zSep, zDb, zDb @@ -4047,7 +4062,7 @@ static int apndOpen( p = (ApndFile*)pFile; memset(p, 0, sizeof(*p)); pSubFile = ORIGFILE(pFile); - p->base.pMethods = &apnd_io_methods; + pFile->pMethods = &apnd_io_methods; rc = pSubVfs->xOpen(pSubVfs, zName, pSubFile, flags, pOutFlags); if( rc ) goto apnd_open_done; rc = pSubFile->pMethods->xFileSize(pSubFile, &sz); @@ -4379,6 +4394,927 @@ int sqlite3_uint_init( } /************************* End ../ext/misc/uint.c ********************/ +/************************* Begin ../ext/misc/decimal.c ******************/ +/* +** 2020-06-22 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +****************************************************************************** +** +** Routines to implement arbitrary-precision decimal math. +** +** The focus here is on simplicity and correctness, not performance. +*/ +/* #include "sqlite3ext.h" */ +SQLITE_EXTENSION_INIT1 +#include +#include +#include +#include + +/* Mark a function parameter as unused, to suppress nuisance compiler +** warnings. */ +#ifndef UNUSED_PARAMETER +# define UNUSED_PARAMETER(X) (void)(X) +#endif + + +/* A decimal object */ +typedef struct Decimal Decimal; +struct Decimal { + char sign; /* 0 for positive, 1 for negative */ + char oom; /* True if an OOM is encountered */ + char isNull; /* True if holds a NULL rather than a number */ + char isInit; /* True upon initialization */ + int nDigit; /* Total number of digits */ + int nFrac; /* Number of digits to the right of the decimal point */ + signed char *a; /* Array of digits. Most significant first. */ +}; + +/* +** Release memory held by a Decimal, but do not free the object itself. +*/ +static void decimal_clear(Decimal *p){ + sqlite3_free(p->a); +} + +/* +** Destroy a Decimal object +*/ +static void decimal_free(Decimal *p){ + if( p ){ + decimal_clear(p); + sqlite3_free(p); + } +} + +/* +** Allocate a new Decimal object. Initialize it to the number given +** by the input string. +*/ +static Decimal *decimal_new( + sqlite3_context *pCtx, + sqlite3_value *pIn, + int nAlt, + const unsigned char *zAlt +){ + Decimal *p; + int n, i; + const unsigned char *zIn; + int iExp = 0; + p = sqlite3_malloc( sizeof(*p) ); + if( p==0 ) goto new_no_mem; + p->sign = 0; + p->oom = 0; + p->isInit = 1; + p->isNull = 0; + p->nDigit = 0; + p->nFrac = 0; + if( zAlt ){ + n = nAlt, + zIn = zAlt; + }else{ + if( sqlite3_value_type(pIn)==SQLITE_NULL ){ + p->a = 0; + p->isNull = 1; + return p; + } + n = sqlite3_value_bytes(pIn); + zIn = sqlite3_value_text(pIn); + } + p->a = sqlite3_malloc64( n+1 ); + if( p->a==0 ) goto new_no_mem; + for(i=0; isspace(zIn[i]); i++){} + if( zIn[i]=='-' ){ + p->sign = 1; + i++; + }else if( zIn[i]=='+' ){ + i++; + } + while( i='0' && c<='9' ){ + p->a[p->nDigit++] = c - '0'; + }else if( c=='.' ){ + p->nFrac = p->nDigit + 1; + }else if( c=='e' || c=='E' ){ + int j = i+1; + int neg = 0; + if( j>=n ) break; + if( zIn[j]=='-' ){ + neg = 1; + j++; + }else if( zIn[j]=='+' ){ + j++; + } + while( j='0' && zIn[j]<='9' ){ + iExp = iExp*10 + zIn[j] - '0'; + } + j++; + } + if( neg ) iExp = -iExp; + break; + } + i++; + } + if( p->nFrac ){ + p->nFrac = p->nDigit - (p->nFrac - 1); + } + if( iExp>0 ){ + if( p->nFrac>0 ){ + if( iExp<=p->nFrac ){ + p->nFrac -= iExp; + iExp = 0; + }else{ + iExp -= p->nFrac; + p->nFrac = 0; + } + } + if( iExp>0 ){ + p->a = sqlite3_realloc64(p->a, p->nDigit + iExp + 1 ); + if( p->a==0 ) goto new_no_mem; + memset(p->a+p->nDigit, 0, iExp); + p->nDigit += iExp; + } + }else if( iExp<0 ){ + int nExtra; + iExp = -iExp; + nExtra = p->nDigit - p->nFrac - 1; + if( nExtra ){ + if( nExtra>=iExp ){ + p->nFrac += iExp; + iExp = 0; + }else{ + iExp -= nExtra; + p->nFrac = p->nDigit - 1; + } + } + if( iExp>0 ){ + p->a = sqlite3_realloc64(p->a, p->nDigit + iExp + 1 ); + if( p->a==0 ) goto new_no_mem; + memmove(p->a+iExp, p->a, p->nDigit); + memset(p->a, 0, iExp); + p->nDigit += iExp; + p->nFrac += iExp; + } + } + return p; + +new_no_mem: + if( pCtx ) sqlite3_result_error_nomem(pCtx); + sqlite3_free(p); + return 0; +} + +/* +** Make the given Decimal the result. +*/ +static void decimal_result(sqlite3_context *pCtx, Decimal *p){ + char *z; + int i, j; + int n; + if( p==0 || p->oom ){ + sqlite3_result_error_nomem(pCtx); + return; + } + if( p->isNull ){ + sqlite3_result_null(pCtx); + return; + } + z = sqlite3_malloc( p->nDigit+4 ); + if( z==0 ){ + sqlite3_result_error_nomem(pCtx); + return; + } + i = 0; + if( p->nDigit==0 || (p->nDigit==1 && p->a[0]==0) ){ + p->sign = 0; + } + if( p->sign ){ + z[0] = '-'; + i = 1; + } + n = p->nDigit - p->nFrac; + if( n<=0 ){ + z[i++] = '0'; + } + j = 0; + while( n>1 && p->a[j]==0 ){ + j++; + n--; + } + while( n>0 ){ + z[i++] = p->a[j] + '0'; + j++; + n--; + } + if( p->nFrac ){ + z[i++] = '.'; + do{ + z[i++] = p->a[j] + '0'; + j++; + }while( jnDigit ); + } + z[i] = 0; + sqlite3_result_text(pCtx, z, i, sqlite3_free); +} + +/* +** SQL Function: decimal(X) +** +** Convert input X into decimal and then back into text +*/ +static void decimalFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *p = decimal_new(context, argv[0], 0, 0); + UNUSED_PARAMETER(argc); + decimal_result(context, p); + decimal_free(p); +} + +/* +** Compare to Decimal objects. Return negative, 0, or positive if the +** first object is less than, equal to, or greater than the second. +** +** Preconditions for this routine: +** +** pA!=0 +** pA->isNull==0 +** pB!=0 +** pB->isNull==0 +*/ +static int decimal_cmp(const Decimal *pA, const Decimal *pB){ + int nASig, nBSig, rc, n; + if( pA->sign!=pB->sign ){ + return pA->sign ? -1 : +1; + } + if( pA->sign ){ + const Decimal *pTemp = pA; + pA = pB; + pB = pTemp; + } + nASig = pA->nDigit - pA->nFrac; + nBSig = pB->nDigit - pB->nFrac; + if( nASig!=nBSig ){ + return nASig - nBSig; + } + n = pA->nDigit; + if( n>pB->nDigit ) n = pB->nDigit; + rc = memcmp(pA->a, pB->a, n); + if( rc==0 ){ + rc = pA->nDigit - pB->nDigit; + } + return rc; +} + +/* +** SQL Function: decimal_cmp(X, Y) +** +** Return negative, zero, or positive if X is less then, equal to, or +** greater than Y. +*/ +static void decimalCmpFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *pA = 0, *pB = 0; + int rc; + + UNUSED_PARAMETER(argc); + pA = decimal_new(context, argv[0], 0, 0); + if( pA==0 || pA->isNull ) goto cmp_done; + pB = decimal_new(context, argv[1], 0, 0); + if( pB==0 || pB->isNull ) goto cmp_done; + rc = decimal_cmp(pA, pB); + if( rc<0 ) rc = -1; + else if( rc>0 ) rc = +1; + sqlite3_result_int(context, rc); +cmp_done: + decimal_free(pA); + decimal_free(pB); +} + +/* +** Expand the Decimal so that it has a least nDigit digits and nFrac +** digits to the right of the decimal point. +*/ +static void decimal_expand(Decimal *p, int nDigit, int nFrac){ + int nAddSig; + int nAddFrac; + if( p==0 ) return; + nAddFrac = nFrac - p->nFrac; + nAddSig = (nDigit - p->nDigit) - nAddFrac; + if( nAddFrac==0 && nAddSig==0 ) return; + p->a = sqlite3_realloc64(p->a, nDigit+1); + if( p->a==0 ){ + p->oom = 1; + return; + } + if( nAddSig ){ + memmove(p->a+nAddSig, p->a, p->nDigit); + memset(p->a, 0, nAddSig); + p->nDigit += nAddSig; + } + if( nAddFrac ){ + memset(p->a+p->nDigit, 0, nAddFrac); + p->nDigit += nAddFrac; + p->nFrac += nAddFrac; + } +} + +/* +** Add the value pB into pA. +** +** Both pA and pB might become denormalized by this routine. +*/ +static void decimal_add(Decimal *pA, Decimal *pB){ + int nSig, nFrac, nDigit; + int i, rc; + if( pA==0 ){ + return; + } + if( pA->oom || pB==0 || pB->oom ){ + pA->oom = 1; + return; + } + if( pA->isNull || pB->isNull ){ + pA->isNull = 1; + return; + } + nSig = pA->nDigit - pA->nFrac; + if( nSig && pA->a[0]==0 ) nSig--; + if( nSignDigit-pB->nFrac ){ + nSig = pB->nDigit - pB->nFrac; + } + nFrac = pA->nFrac; + if( nFracnFrac ) nFrac = pB->nFrac; + nDigit = nSig + nFrac + 1; + decimal_expand(pA, nDigit, nFrac); + decimal_expand(pB, nDigit, nFrac); + if( pA->oom || pB->oom ){ + pA->oom = 1; + }else{ + if( pA->sign==pB->sign ){ + int carry = 0; + for(i=nDigit-1; i>=0; i--){ + int x = pA->a[i] + pB->a[i] + carry; + if( x>=10 ){ + carry = 1; + pA->a[i] = x - 10; + }else{ + carry = 0; + pA->a[i] = x; + } + } + }else{ + signed char *aA, *aB; + int borrow = 0; + rc = memcmp(pA->a, pB->a, nDigit); + if( rc<0 ){ + aA = pB->a; + aB = pA->a; + pA->sign = !pA->sign; + }else{ + aA = pA->a; + aB = pB->a; + } + for(i=nDigit-1; i>=0; i--){ + int x = aA[i] - aB[i] - borrow; + if( x<0 ){ + pA->a[i] = x+10; + borrow = 1; + }else{ + pA->a[i] = x; + borrow = 0; + } + } + } + } +} + +/* +** Compare text in decimal order. +*/ +static int decimalCollFunc( + void *notUsed, + int nKey1, const void *pKey1, + int nKey2, const void *pKey2 +){ + const unsigned char *zA = (const unsigned char*)pKey1; + const unsigned char *zB = (const unsigned char*)pKey2; + Decimal *pA = decimal_new(0, 0, nKey1, zA); + Decimal *pB = decimal_new(0, 0, nKey2, zB); + int rc; + UNUSED_PARAMETER(notUsed); + if( pA==0 || pB==0 ){ + rc = 0; + }else{ + rc = decimal_cmp(pA, pB); + } + decimal_free(pA); + decimal_free(pB); + return rc; +} + + +/* +** SQL Function: decimal_add(X, Y) +** decimal_sub(X, Y) +** +** Return the sum or difference of X and Y. +*/ +static void decimalAddFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *pA = decimal_new(context, argv[0], 0, 0); + Decimal *pB = decimal_new(context, argv[1], 0, 0); + UNUSED_PARAMETER(argc); + decimal_add(pA, pB); + decimal_result(context, pA); + decimal_free(pA); + decimal_free(pB); +} +static void decimalSubFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *pA = decimal_new(context, argv[0], 0, 0); + Decimal *pB = decimal_new(context, argv[1], 0, 0); + UNUSED_PARAMETER(argc); + if( pB==0 ) return; + pB->sign = !pB->sign; + decimal_add(pA, pB); + decimal_result(context, pA); + decimal_free(pA); + decimal_free(pB); +} + +/* Aggregate funcion: decimal_sum(X) +** +** Works like sum() except that it uses decimal arithmetic for unlimited +** precision. +*/ +static void decimalSumStep( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *p; + Decimal *pArg; + UNUSED_PARAMETER(argc); + p = sqlite3_aggregate_context(context, sizeof(*p)); + if( p==0 ) return; + if( !p->isInit ){ + p->isInit = 1; + p->a = sqlite3_malloc(2); + if( p->a==0 ){ + p->oom = 1; + }else{ + p->a[0] = 0; + } + p->nDigit = 1; + p->nFrac = 0; + } + if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; + pArg = decimal_new(context, argv[0], 0, 0); + decimal_add(p, pArg); + decimal_free(pArg); +} +static void decimalSumInverse( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *p; + Decimal *pArg; + UNUSED_PARAMETER(argc); + p = sqlite3_aggregate_context(context, sizeof(*p)); + if( p==0 ) return; + if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; + pArg = decimal_new(context, argv[0], 0, 0); + if( pArg ) pArg->sign = !pArg->sign; + decimal_add(p, pArg); + decimal_free(pArg); +} +static void decimalSumValue(sqlite3_context *context){ + Decimal *p = sqlite3_aggregate_context(context, 0); + if( p==0 ) return; + decimal_result(context, p); +} +static void decimalSumFinalize(sqlite3_context *context){ + Decimal *p = sqlite3_aggregate_context(context, 0); + if( p==0 ) return; + decimal_result(context, p); + decimal_clear(p); +} + +/* +** SQL Function: decimal_mul(X, Y) +** +** Return the product of X and Y. +** +** All significant digits after the decimal point are retained. +** Trailing zeros after the decimal point are omitted as long as +** the number of digits after the decimal point is no less than +** either the number of digits in either input. +*/ +static void decimalMulFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *pA = decimal_new(context, argv[0], 0, 0); + Decimal *pB = decimal_new(context, argv[1], 0, 0); + signed char *acc = 0; + int i, j, k; + int minFrac; + UNUSED_PARAMETER(argc); + if( pA==0 || pA->oom || pA->isNull + || pB==0 || pB->oom || pB->isNull + ){ + goto mul_end; + } + acc = sqlite3_malloc64( pA->nDigit + pB->nDigit + 2 ); + if( acc==0 ){ + sqlite3_result_error_nomem(context); + goto mul_end; + } + memset(acc, 0, pA->nDigit + pB->nDigit + 2); + minFrac = pA->nFrac; + if( pB->nFracnFrac; + for(i=pA->nDigit-1; i>=0; i--){ + signed char f = pA->a[i]; + int carry = 0, x; + for(j=pB->nDigit-1, k=i+j+3; j>=0; j--, k--){ + x = acc[k] + f*pB->a[j] + carry; + acc[k] = x%10; + carry = x/10; + } + x = acc[k] + carry; + acc[k] = x%10; + acc[k-1] += x/10; + } + sqlite3_free(pA->a); + pA->a = acc; + acc = 0; + pA->nDigit += pB->nDigit + 2; + pA->nFrac += pB->nFrac; + pA->sign ^= pB->sign; + while( pA->nFrac>minFrac && pA->a[pA->nDigit-1]==0 ){ + pA->nFrac--; + pA->nDigit--; + } + decimal_result(context, pA); + +mul_end: + sqlite3_free(acc); + decimal_free(pA); + decimal_free(pB); +} + +#ifdef _WIN32 + +#endif +int sqlite3_decimal_init( + sqlite3 *db, + char **pzErrMsg, + const sqlite3_api_routines *pApi +){ + int rc = SQLITE_OK; + static const struct { + const char *zFuncName; + int nArg; + void (*xFunc)(sqlite3_context*,int,sqlite3_value**); + } aFunc[] = { + { "decimal", 1, decimalFunc }, + { "decimal_cmp", 2, decimalCmpFunc }, + { "decimal_add", 2, decimalAddFunc }, + { "decimal_sub", 2, decimalSubFunc }, + { "decimal_mul", 2, decimalMulFunc }, + }; + unsigned int i; + (void)pzErrMsg; /* Unused parameter */ + + SQLITE_EXTENSION_INIT2(pApi); + + for(i=0; i 'ieee754(2,0)' +** ieee754(45.25) -> 'ieee754(181,-2)' +** ieee754(2, 0) -> 2.0 +** ieee754(181, -2) -> 45.25 +** +** Two additional functions break apart the one-argument ieee754() +** result into separate integer values: +** +** ieee754_mantissa(45.25) -> 181 +** ieee754_exponent(45.25) -> -2 +** +** These functions convert binary64 numbers into blobs and back again. +** +** ieee754_from_blob(x'3ff0000000000000') -> 1.0 +** ieee754_to_blob(1.0) -> x'3ff0000000000000' +** +** In all single-argument functions, if the argument is an 8-byte blob +** then that blob is interpreted as a big-endian binary64 value. +** +** +** EXACT DECIMAL REPRESENTATION OF BINARY64 VALUES +** ----------------------------------------------- +** +** This extension in combination with the separate 'decimal' extension +** can be used to compute the exact decimal representation of binary64 +** values. To begin, first compute a table of exponent values: +** +** CREATE TABLE pow2(x INTEGER PRIMARY KEY, v TEXT); +** WITH RECURSIVE c(x,v) AS ( +** VALUES(0,'1') +** UNION ALL +** SELECT x+1, decimal_mul(v,'2') FROM c WHERE x+1<=971 +** ) INSERT INTO pow2(x,v) SELECT x, v FROM c; +** WITH RECURSIVE c(x,v) AS ( +** VALUES(-1,'0.5') +** UNION ALL +** SELECT x-1, decimal_mul(v,'0.5') FROM c WHERE x-1>=-1075 +** ) INSERT INTO pow2(x,v) SELECT x, v FROM c; +** +** Then, to compute the exact decimal representation of a floating +** point value (the value 47.49 is used in the example) do: +** +** WITH c(n) AS (VALUES(47.49)) +** ---------------^^^^^---- Replace with whatever you want +** SELECT decimal_mul(ieee754_mantissa(c.n),pow2.v) +** FROM pow2, c WHERE pow2.x=ieee754_exponent(c.n); +** +** Here is a query to show various boundry values for the binary64 +** number format: +** +** WITH c(name,bin) AS (VALUES +** ('minimum positive value', x'0000000000000001'), +** ('maximum subnormal value', x'000fffffffffffff'), +** ('mininum positive nornal value', x'0010000000000000'), +** ('maximum value', x'7fefffffffffffff')) +** SELECT c.name, decimal_mul(ieee754_mantissa(c.bin),pow2.v) +** FROM pow2, c WHERE pow2.x=ieee754_exponent(c.bin); +** +*/ +/* #include "sqlite3ext.h" */ +SQLITE_EXTENSION_INIT1 +#include +#include + +/* Mark a function parameter as unused, to suppress nuisance compiler +** warnings. */ +#ifndef UNUSED_PARAMETER +# define UNUSED_PARAMETER(X) (void)(X) +#endif + +/* +** Implementation of the ieee754() function +*/ +static void ieee754func( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + if( argc==1 ){ + sqlite3_int64 m, a; + double r; + int e; + int isNeg; + char zResult[100]; + assert( sizeof(m)==sizeof(r) ); + if( sqlite3_value_type(argv[0])==SQLITE_BLOB + && sqlite3_value_bytes(argv[0])==sizeof(r) + ){ + const unsigned char *x = sqlite3_value_blob(argv[0]); + unsigned int i; + sqlite3_uint64 v = 0; + for(i=0; i>52; + m = a & ((((sqlite3_int64)1)<<52)-1); + if( e==0 ){ + m <<= 1; + }else{ + m |= ((sqlite3_int64)1)<<52; + } + while( e<1075 && m>0 && (m&1)==0 ){ + m >>= 1; + e++; + } + if( isNeg ) m = -m; + } + switch( *(int*)sqlite3_user_data(context) ){ + case 0: + sqlite3_snprintf(sizeof(zResult), zResult, "ieee754(%lld,%d)", + m, e-1075); + sqlite3_result_text(context, zResult, -1, SQLITE_TRANSIENT); + break; + case 1: + sqlite3_result_int64(context, m); + break; + case 2: + sqlite3_result_int(context, e-1075); + break; + } + }else{ + sqlite3_int64 m, e, a; + double r; + int isNeg = 0; + m = sqlite3_value_int64(argv[0]); + e = sqlite3_value_int64(argv[1]); + if( m<0 ){ + isNeg = 1; + m = -m; + if( m<0 ) return; + }else if( m==0 && e>-1000 && e<1000 ){ + sqlite3_result_double(context, 0.0); + return; + } + while( (m>>32)&0xffe00000 ){ + m >>= 1; + e++; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Aug 24 18:14:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A2803CA06F; Mon, 24 Aug 2020 18:14:06 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb0ct1hsyz439F; Mon, 24 Aug 2020 18:14:06 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1920D1C77D; Mon, 24 Aug 2020 18:14:06 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07OIE632043355; Mon, 24 Aug 2020 18:14:06 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OIE41g043346; Mon, 24 Aug 2020 18:14:04 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202008241814.07OIE41g043346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 24 Aug 2020 18:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364721 - in head/contrib/unbound: . .github cachedb contrib contrib/android contrib/ios daemon dns64 dnstap doc dynlibmod edns-subnet iterator libunbound respip services sldns smallapp... X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/contrib/unbound: . .github cachedb contrib contrib/android contrib/ios daemon dns64 dnstap doc dynlibmod edns-subnet iterator libunbound respip services sldns smallapp util util/shm_side valid... X-SVN-Commit-Revision: 364721 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 18:14:06 -0000 Author: cy Date: Mon Aug 24 18:14:04 2020 New Revision: 364721 URL: https://svnweb.freebsd.org/changeset/base/364721 Log: MFV 364468: Update unbound 1.10.1 --> 1.11.0. MFH: 1 month Added: head/contrib/unbound/README-Travis.md - copied unchanged from r364468, vendor/unbound/dist/README-Travis.md head/contrib/unbound/contrib/android/ - copied from r364468, vendor/unbound/dist/contrib/android/ head/contrib/unbound/contrib/ios/ - copied from r364468, vendor/unbound/dist/contrib/ios/ head/contrib/unbound/dnstap/dnstap_fstrm.c - copied unchanged from r364468, vendor/unbound/dist/dnstap/dnstap_fstrm.c head/contrib/unbound/dnstap/dnstap_fstrm.h - copied unchanged from r364468, vendor/unbound/dist/dnstap/dnstap_fstrm.h head/contrib/unbound/dnstap/dtstream.c - copied unchanged from r364468, vendor/unbound/dist/dnstap/dtstream.c head/contrib/unbound/dnstap/dtstream.h - copied unchanged from r364468, vendor/unbound/dist/dnstap/dtstream.h head/contrib/unbound/dnstap/unbound-dnstap-socket.c - copied unchanged from r364468, vendor/unbound/dist/dnstap/unbound-dnstap-socket.c head/contrib/unbound/dynlibmod/ - copied from r364468, vendor/unbound/dist/dynlibmod/ Modified: head/contrib/unbound/.github/FUNDING.yml head/contrib/unbound/.travis.yml head/contrib/unbound/Makefile.in head/contrib/unbound/acx_python.m4 head/contrib/unbound/cachedb/cachedb.c head/contrib/unbound/cachedb/cachedb.h head/contrib/unbound/cachedb/redis.c head/contrib/unbound/config.guess head/contrib/unbound/config.h.in head/contrib/unbound/config.sub head/contrib/unbound/configure head/contrib/unbound/configure.ac head/contrib/unbound/contrib/aaaa-filter-iterator.patch head/contrib/unbound/contrib/fastrpz.patch head/contrib/unbound/contrib/libunbound.pc.in head/contrib/unbound/contrib/unbound.service.in head/contrib/unbound/daemon/acl_list.c head/contrib/unbound/daemon/daemon.c head/contrib/unbound/daemon/remote.c head/contrib/unbound/daemon/unbound.c head/contrib/unbound/daemon/worker.c head/contrib/unbound/dns64/dns64.c head/contrib/unbound/dnstap/dnstap.c head/contrib/unbound/dnstap/dnstap.h head/contrib/unbound/dnstap/dnstap.m4 head/contrib/unbound/doc/Changelog head/contrib/unbound/doc/README head/contrib/unbound/doc/example.conf.in head/contrib/unbound/doc/libunbound.3.in head/contrib/unbound/doc/unbound-anchor.8.in head/contrib/unbound/doc/unbound-checkconf.8.in head/contrib/unbound/doc/unbound-control.8.in head/contrib/unbound/doc/unbound-host.1.in head/contrib/unbound/doc/unbound.8.in head/contrib/unbound/doc/unbound.conf.5.in head/contrib/unbound/edns-subnet/subnetmod.c head/contrib/unbound/edns-subnet/subnetmod.h head/contrib/unbound/iterator/iter_utils.c head/contrib/unbound/iterator/iterator.c head/contrib/unbound/iterator/iterator.h head/contrib/unbound/libunbound/libworker.c head/contrib/unbound/libunbound/unbound.h head/contrib/unbound/respip/respip.c head/contrib/unbound/services/authzone.c head/contrib/unbound/services/authzone.h head/contrib/unbound/services/listen_dnsport.c head/contrib/unbound/services/listen_dnsport.h head/contrib/unbound/services/localzone.c head/contrib/unbound/services/mesh.c head/contrib/unbound/services/modstack.c head/contrib/unbound/services/outside_network.c head/contrib/unbound/services/outside_network.h head/contrib/unbound/services/rpz.c head/contrib/unbound/services/rpz.h head/contrib/unbound/sldns/parseutil.c head/contrib/unbound/smallapp/unbound-anchor.c head/contrib/unbound/smallapp/unbound-checkconf.c head/contrib/unbound/smallapp/unbound-control-setup.sh.in head/contrib/unbound/smallapp/unbound-control.c head/contrib/unbound/smallapp/worker_cb.c head/contrib/unbound/util/config_file.c head/contrib/unbound/util/config_file.h head/contrib/unbound/util/configlexer.lex head/contrib/unbound/util/configparser.y head/contrib/unbound/util/fptr_wlist.c head/contrib/unbound/util/iana_ports.inc head/contrib/unbound/util/mini_event.h head/contrib/unbound/util/net_help.c head/contrib/unbound/util/net_help.h head/contrib/unbound/util/netevent.c head/contrib/unbound/util/netevent.h head/contrib/unbound/util/shm_side/shm_main.c head/contrib/unbound/util/ub_event.c head/contrib/unbound/validator/val_secalgo.c head/contrib/unbound/validator/val_sigcrypt.c Directory Properties: head/contrib/unbound/ (props changed) Modified: head/contrib/unbound/.github/FUNDING.yml ============================================================================== --- head/contrib/unbound/.github/FUNDING.yml Mon Aug 24 18:13:44 2020 (r364720) +++ head/contrib/unbound/.github/FUNDING.yml Mon Aug 24 18:14:04 2020 (r364721) @@ -1,12 +1,2 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username +github: [NLnetLabs] custom: ['https://nlnetlabs.nl/funding/'] Modified: head/contrib/unbound/.travis.yml ============================================================================== --- head/contrib/unbound/.travis.yml Mon Aug 24 18:13:44 2020 (r364720) +++ head/contrib/unbound/.travis.yml Mon Aug 24 18:14:04 2020 (r364721) @@ -1,7 +1,8 @@ -sudo: false language: c -compiler: - - gcc + +git: + depth: 5 + addons: apt: packages: @@ -9,8 +10,335 @@ addons: - libevent-dev - libexpat-dev - clang + homebrew: + packages: + - openssl + - libevent + - expat + update: true + +jobs: + include: + - os: linux + name: GCC on Linux, Amd64 + compiler: gcc + arch: amd64 + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: linux + name: Clang on Linux, Amd64 + compiler: clang + arch: amd64 + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: osx + name: Clang on OS X, Amd64 + compiler: clang + arch: amd64 + env: + - TEST_OSX=yes + - CONFIG_OPTS="--enable-debug --disable-flto --with-ssl=/usr/local/opt/openssl/" + - os: linux + name: Libevent, GCC on Linux, Amd64 + compiler: gcc + arch: amd64 + env: + - TEST_LIBEVENT=yes + - CONFIG_OPTS="--with-libevent" + - os: linux + name: Libevent, Clang on Linux, Amd64 + compiler: clang + arch: amd64 + env: + - TEST_LIBEVENT=yes + - CONFIG_OPTS="--with-libevent" + - os: osx + name: Libevent, Clang on OS X, Amd64 + compiler: clang + arch: amd64 + env: + - TEST_OSX=yes + - TEST_LIBEVENT=yes + - CONFIG_OPTS="--with-ssl=/usr/local/opt/openssl/ --with-libevent=/usr/local/opt/libevent/" + - os: linux + name: UBsan, GCC on Linux, Amd64 + compiler: gcc + arch: amd64 + dist: bionic + env: + - TEST_UBSAN=yes + - os: linux + name: UBsan, Clang on Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - TEST_UBSAN=yes + - os: linux + name: Asan, GCC on Linux, Amd64 + compiler: gcc + arch: amd64 + dist: bionic + env: + - TEST_ASAN=yes + - os: linux + name: Asan, Clang on Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - TEST_ASAN=yes + - os: linux + name: GCC on Linux, Aarch64 + compiler: gcc + arch: arm64 + dist: bionic + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: linux + name: Clang on Linux, Aarch64 + compiler: clang + arch: arm64 + dist: bionic + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: linux + name: GCC on Linux, PowerPC64 + compiler: gcc + arch: ppc64le + dist: bionic + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: linux + name: Clang on Linux, PowerPC64 + compiler: clang + arch: ppc64le + dist: bionic + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: linux + name: GCC on Linux, s390x + compiler: gcc + arch: s390x + dist: bionic + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: linux + name: Clang on Linux, s390x + compiler: clang + arch: s390x + dist: bionic + env: + - CONFIG_OPTS="--enable-debug --disable-flto" + - os: osx + osx_image: xcode10 + name: Apple iPhone on iOS, armv7 + compiler: clang + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=armv7-apple-ios + - OPENSSL_HOST=ios-cross + - IOS_SDK=iPhoneOS + - IOS_CPU=armv7s + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: osx + osx_image: xcode10 + name: Apple iPhone on iOS, arm64 + compiler: clang + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=aarch64-apple-ios + - OPENSSL_HOST=ios64-cross + - IOS_SDK=iPhoneOS + - IOS_CPU=arm64 + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: osx + osx_image: xcode10 + name: Apple TV on iOS, arm64 + compiler: clang + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=aarch64-apple-ios + - OPENSSL_HOST=ios64-cross + - IOS_SDK=AppleTVOS + - IOS_CPU=arm64 + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: osx + osx_image: xcode10 + name: Apple Watch on iOS, armv7 + compiler: clang + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=armv7-apple-ios + - OPENSSL_HOST=ios-cross + - IOS_SDK=WatchOS + - IOS_CPU=armv7k + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: osx + osx_image: xcode10 + name: iPhoneSimulator on OS X, i386 + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=i386-apple-ios + - OPENSSL_HOST=iphoneos-cross + - IOS_CPU=i386 + - IOS_SDK=iPhoneSimulator + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: osx + osx_image: xcode10 + name: iPhoneSimulator on OS X, x86_64 + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=x86_64-apple-ios + - OPENSSL_HOST=iphoneos-cross + - IOS_CPU=x86_64 + - IOS_SDK=iPhoneSimulator + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: osx + osx_image: xcode10 + name: AppleTVSimulator on OS X, x86_64 + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=x86_64-apple-ios + - OPENSSL_HOST=iphoneos-cross + - IOS_CPU=x86_64 + - IOS_SDK=AppleTVSimulator + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: osx + osx_image: xcode10 + name: WatchSimulator on OS X, i386 + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=i386-apple-ios + - OPENSSL_HOST=iphoneos-cross + - IOS_CPU=i386 + - IOS_SDK=WatchSimulator + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" + - os: linux + name: Android armv7a, Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - TEST_ANDROID=yes + - AUTOTOOLS_HOST=armv7a-linux-androideabi + - OPENSSL_HOST=android-arm + - ANDROID_CPU=armv7a + - ANDROID_API=23 + - ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU" + - ANDROID_SDK_ROOT="$HOME/android-sdk" + - ANDROID_NDK_ROOT="$HOME/android-ndk" + - os: linux + name: Android aarch64, Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - TEST_ANDROID=yes + - AUTOTOOLS_HOST=aarch64-linux-android + - OPENSSL_HOST=android-arm64 + - ANDROID_CPU=aarch64 + - ANDROID_API=23 + - ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU" + - ANDROID_SDK_ROOT="$HOME/android-sdk" + - ANDROID_NDK_ROOT="$HOME/android-ndk" + - os: linux + name: Android x86, Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - TEST_ANDROID=yes + - AUTOTOOLS_HOST=i686-linux-android + - OPENSSL_HOST=android-x86 + - ANDROID_CPU=x86 + - ANDROID_API=23 + - ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU" + - ANDROID_SDK_ROOT="$HOME/android-sdk" + - ANDROID_NDK_ROOT="$HOME/android-ndk" + - os: linux + name: Android x86_64, Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - TEST_ANDROID=yes + - AUTOTOOLS_HOST=x86_64-linux-android + - OPENSSL_HOST=android-x86_64 + - ANDROID_CPU=x86_64 + - ANDROID_API=23 + - ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU" + - ANDROID_SDK_ROOT="$HOME/android-sdk" + - ANDROID_NDK_ROOT="$HOME/android-ndk" + + allow_failures: + - os: linux + name: Android armv7a, Linux, Amd64 + - os: linux + name: Android aarch64, Linux, Amd64 + - os: linux + name: Android x86, Linux, Amd64 + - os: linux + name: Android x86_64, Linux, Amd64 + +before_script: + - | + if [ "$TEST_ANDROID" = "yes" ]; then + ./contrib/android/install_tools.sh + elif [ "$TEST_IOS" = "yes" ]; then + ./contrib/ios/install_tools.sh + fi + +# The Travis docs say to avoid calling exit in the script. It leads to +# some code duplication to avoid failures in cross-compiles. Also see +# https://docs.travis-ci.com/user/job-lifecycle/ in the Travis docs. script: - - ./configure --enable-debug --disable-flto - - make - - make test - - (cd testdata/clang-analysis.tdir; bash clang-analysis.test) + - | + if [ "$TEST_UBSAN" = "yes" ]; then + export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=undefined -fno-sanitize-recover" + ./configure + make -j 2 + make test + elif [ "$TEST_ASAN" = "yes" ]; then + export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=address" + ./configure + make -j 2 + make test + elif [ "$TEST_IOS" = "yes" ]; then + export AUTOTOOLS_BUILD="$(./config.guess)" + export PKG_CONFIG_PATH="$IOS_PREFIX/lib/pkgconfig" + source ./contrib/ios/setenv_ios.sh + ./contrib/ios/install_openssl.sh + ./contrib/ios/install_expat.sh + ./configure \ + --build="$AUTOTOOLS_BUILD" --host="$AUTOTOOLS_HOST" \ + --prefix="$IOS_PREFIX" \ + --with-ssl="$IOS_PREFIX" --disable-gost \ + --with-libexpat="$IOS_PREFIX"; + make -j 2 + make install + elif [ "$TEST_ANDROID" = "yes" ]; then + export AUTOTOOLS_BUILD="$(./config.guess)" + export PKG_CONFIG_PATH="$ANDROID_PREFIX/lib/pkgconfig" + ./contrib/android/install_ndk.sh + source ./contrib/android/setenv_android.sh + ./contrib/android/install_openssl.sh + ./contrib/android/install_expat.sh + ./configure \ + --build="$AUTOTOOLS_BUILD" --host="$AUTOTOOLS_HOST" \ + --prefix="$ANDROID_PREFIX" \ + --with-ssl="$ANDROID_PREFIX" --disable-gost \ + --with-libexpat="$ANDROID_PREFIX"; + make -j 2 + make install + elif [ "$TEST_OSX" = "yes" ]; then + ./configure --enable-debug --disable-flto --with-ssl=/usr/local/opt/openssl/ + make -j 2 + make test + (cd testdata/clang-analysis.tdir; bash clang-analysis.test) + else + ./configure ${CONFIG_OPTS} + make -j 2 + make test + (cd testdata/clang-analysis.tdir; bash clang-analysis.test) + fi Modified: head/contrib/unbound/Makefile.in ============================================================================== --- head/contrib/unbound/Makefile.in Mon Aug 24 18:13:44 2020 (r364720) +++ head/contrib/unbound/Makefile.in Mon Aug 24 18:14:04 2020 (r364721) @@ -25,6 +25,7 @@ DNSTAP_SRC=@DNSTAP_SRC@ DNSTAP_OBJ=@DNSTAP_OBJ@ DNSCRYPT_SRC=@DNSCRYPT_SRC@ DNSCRYPT_OBJ=@DNSCRYPT_OBJ@ +WITH_DYNLIBMODULE=@WITH_DYNLIBMODULE@ WITH_PYTHONMODULE=@WITH_PYTHONMODULE@ WITH_PYUNBOUND=@WITH_PYUNBOUND@ PY_MAJOR_VERSION=@PY_MAJOR_VERSION@ @@ -77,7 +78,7 @@ LINT=splint LINTFLAGS=+quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -preproc -Drlimit=rlimit64 -D__gnuc_va_list=va_list -formatcode #-Dglob64=glob -Dglobfree64=globfree # compat with openssl linux edition. -LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned" -D"ECDSA_SIG=DSA_SIG" -Dfstrm_res=int +LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned" -D"ECDSA_SIG=DSA_SIG" # compat with NetBSD LINTFLAGS+=@NETBSD_LINTFLAGS@ # compat with OpenBSD @@ -87,6 +88,12 @@ LINTFLAGS+="-D__uint16_t=uint16_t" "-DEVP_PKEY_ASN1_ME INSTALL=$(SHELL) $(srcdir)/install-sh +DYNLIBMOD_SRC=dynlibmod/dynlibmod.c +DYNLIBMOD_OBJ=@DYNLIBMOD_OBJ@ +DYNLIBMOD_HEADER=@DYNLIBMOD_HEADER@ +DYNLIBMOD_EXTRALIBS=@DYNLIBMOD_EXTRALIBS@ + + #pythonmod.c is not here, it is mentioned by itself in its own rules, #makedepend fails on missing interface.h otherwise. PYTHONMOD_SRC=pythonmod/pythonmod_utils.c @@ -140,7 +147,7 @@ autotrust.lo val_anchor.lo rpz.lo \ validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo cachedb.lo redis.lo authzone.lo \ $(SUBNET_OBJ) $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) $(DNSTAP_OBJ) $(DNSCRYPT_OBJ) \ -$(IPSECMOD_OBJ) $(IPSET_OBJ) respip.lo +$(IPSECMOD_OBJ) $(IPSET_OBJ) $(DYNLIBMOD_OBJ) respip.lo COMMON_OBJ_WITHOUT_UB_EVENT=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ outside_network.lo COMMON_OBJ=$(COMMON_OBJ_WITHOUT_UB_EVENT) ub_event.lo @@ -219,7 +226,7 @@ MEMSTATS_OBJ_LINK=$(MEMSTATS_OBJ) worker_cb.lo $(COMMO $(SLDNS_OBJ) ASYNCLOOK_SRC=testcode/asynclook.c ASYNCLOOK_OBJ=asynclook.lo -ASYNCLOOK_OBJ_LINK=$(ASYNCLOOK_OBJ) log.lo locks.lo $(COMPAT_OBJ) @ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ@ +ASYNCLOOK_OBJ_LINK=$(ASYNCLOOK_OBJ) log.lo locks.lo $(CHECKLOCK_OBJ) $(COMPAT_OBJ) @ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ@ STREAMTCP_SRC=testcode/streamtcp.c STREAMTCP_OBJ=streamtcp.lo STREAMTCP_OBJ_LINK=$(STREAMTCP_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) \ @@ -233,6 +240,10 @@ DELAYER_OBJ_LINK=$(DELAYER_OBJ) worker_cb.lo $(COMMON_ $(SLDNS_OBJ) IPSET_SRC=@IPSET_SRC@ IPSET_OBJ=@IPSET_OBJ@ +DNSTAP_SOCKET_SRC=dnstap/unbound-dnstap-socket.c +DNSTAP_SOCKET_OBJ=unbound-dnstap-socket.lo +DNSTAP_SOCKET_OBJ_LINK=$(DNSTAP_SOCKET_OBJ) $(COMMON_OBJ) \ +$(COMPAT_OBJ) $(SLDNS_OBJ) LIBUNBOUND_SRC=libunbound/context.c libunbound/libunbound.c \ libunbound/libworker.c LIBUNBOUND_OBJ=context.lo libunbound.lo libworker.lo ub_event_pluggable.lo @@ -259,7 +270,7 @@ ALL_SRC=$(COMMON_SRC) $(UNITTEST_SRC) $(DAEMON_SRC) \ $(TESTBOUND_SRC) $(LOCKVERIFY_SRC) $(PKTVIEW_SRC) \ $(MEMSTATS_SRC) $(CHECKCONF_SRC) $(LIBUNBOUND_SRC) $(HOST_SRC) \ $(ASYNCLOOK_SRC) $(STREAMTCP_SRC) $(PERF_SRC) $(DELAYER_SRC) \ - $(CONTROL_SRC) $(UBANCHOR_SRC) $(PETAL_SRC) \ + $(CONTROL_SRC) $(UBANCHOR_SRC) $(PETAL_SRC) $(DNSTAP_SOCKET_SRC)\ $(PYTHONMOD_SRC) $(PYUNBOUND_SRC) $(WIN_DAEMON_THE_SRC) \ $(SVCINST_SRC) $(SVCUNINST_SRC) $(ANCHORUPD_SRC) $(SLDNS_SRC) @@ -267,7 +278,7 @@ ALL_OBJ=$(COMMON_OBJ) $(UNITTEST_OBJ) $(DAEMON_OBJ) \ $(TESTBOUND_OBJ) $(LOCKVERIFY_OBJ) $(PKTVIEW_OBJ) \ $(MEMSTATS_OBJ) $(CHECKCONF_OBJ) $(LIBUNBOUND_OBJ) $(HOST_OBJ) \ $(ASYNCLOOK_OBJ) $(STREAMTCP_OBJ) $(PERF_OBJ) $(DELAYER_OBJ) \ - $(CONTROL_OBJ) $(UBANCHOR_OBJ) $(PETAL_OBJ) \ + $(CONTROL_OBJ) $(UBANCHOR_OBJ) $(PETAL_OBJ) $(DNSTAP_SOCKET_OBJ)\ $(COMPAT_OBJ) $(PYUNBOUND_OBJ) \ $(SVCINST_OBJ) $(SVCUNINST_OBJ) $(ANCHORUPD_OBJ) $(SLDNS_OBJ) @@ -306,6 +317,7 @@ rsrc_unbound_checkconf.o: $(srcdir)/winrc/rsrc_unbound TEST_BIN=asynclook$(EXEEXT) delayer$(EXEEXT) \ lock-verify$(EXEEXT) memstats$(EXEEXT) perf$(EXEEXT) \ petal$(EXEEXT) pktview$(EXEEXT) streamtcp$(EXEEXT) \ + unbound-dnstap-socket$(EXEEXT) \ testbound$(EXEEXT) unittest$(EXEEXT) tests: all $(TEST_BIN) @@ -315,7 +327,7 @@ longcheck: longtest test: unittest$(EXEEXT) testbound$(EXEEXT) ./unittest$(EXEEXT) ./testbound$(EXEEXT) -s - for x in $(srcdir)/testdata/*.rpl; do echo -n "$$x "; if ./testbound$(EXEEXT) -p $$x >/dev/null 2>&1; then echo OK; else echo failed; exit 1; fi done + for x in $(srcdir)/testdata/*.rpl; do printf "%s" "$$x "; if ./testbound$(EXEEXT) -p $$x >/dev/null 2>&1; then echo OK; else echo failed; exit 1; fi done @echo test OK longtest: tests @@ -328,13 +340,13 @@ libunbound.la: $(LIBUNBOUND_OBJ_LINK) $(LINK_LIB) $(UBSYMS) -o $@ $(LIBUNBOUND_OBJ_LINK) -rpath $(libdir) $(SSLLIB) $(LIBS) unbound$(EXEEXT): $(DAEMON_OBJ_LINK) libunbound.la - $(LINK) -o $@ $(DAEMON_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(DAEMON_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) unbound-checkconf$(EXEEXT): $(CHECKCONF_OBJ_LINK) libunbound.la - $(LINK) -o $@ $(CHECKCONF_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(CHECKCONF_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) unbound-control$(EXEEXT): $(CONTROL_OBJ_LINK) libunbound.la - $(LINK) -o $@ $(CONTROL_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(CONTROL_OBJ_LINK) $(EXTRALINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) unbound-host$(EXEEXT): $(HOST_OBJ_LINK) libunbound.la $(LINK) -o $@ $(HOST_OBJ_LINK) -L. -L.libs -lunbound $(SSLLIB) $(LIBS) @@ -352,34 +364,34 @@ anchor-update$(EXEEXT): $(ANCHORUPD_OBJ_LINK) libunbo $(LINK) -o $@ $(ANCHORUPD_OBJ_LINK) -L. -L.libs -lunbound $(LIBS) unittest$(EXEEXT): $(UNITTEST_OBJ_LINK) - $(LINK) -o $@ $(UNITTEST_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(UNITTEST_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) testbound$(EXEEXT): $(TESTBOUND_OBJ_LINK) - $(LINK) -o $@ $(TESTBOUND_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(TESTBOUND_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) lock-verify$(EXEEXT): $(LOCKVERIFY_OBJ_LINK) - $(LINK) -o $@ $(LOCKVERIFY_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(LOCKVERIFY_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) petal$(EXEEXT): $(PETAL_OBJ_LINK) $(LINK) -o $@ $(PETAL_OBJ_LINK) $(SSLLIB) $(LIBS) pktview$(EXEEXT): $(PKTVIEW_OBJ_LINK) - $(LINK) -o $@ $(PKTVIEW_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(PKTVIEW_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) memstats$(EXEEXT): $(MEMSTATS_OBJ_LINK) - $(LINK) -o $@ $(MEMSTATS_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(MEMSTATS_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) asynclook$(EXEEXT): $(ASYNCLOOK_OBJ_LINK) libunbound.la $(LINK) -o $@ $(ASYNCLOOK_OBJ_LINK) -L. -L.libs -lunbound $(SSLLIB) $(LIBS) streamtcp$(EXEEXT): $(STREAMTCP_OBJ_LINK) - $(LINK) -o $@ $(STREAMTCP_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(STREAMTCP_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) perf$(EXEEXT): $(PERF_OBJ_LINK) - $(LINK) -o $@ $(PERF_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(PERF_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) delayer$(EXEEXT): $(DELAYER_OBJ_LINK) - $(LINK) -o $@ $(DELAYER_OBJ_LINK) $(SSLLIB) $(LIBS) + $(LINK) -o $@ $(DELAYER_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) signit$(EXEEXT): testcode/signit.c $(CC) $(CPPFLAGS) $(CFLAGS) @PTHREAD_CFLAGS_ONLY@ -o $@ testcode/signit.c $(LDFLAGS) -lldns $(SSLLIB) $(LIBS) @@ -401,7 +413,13 @@ dnstap/dnstap.pb-c.c dnstap/dnstap.pb-c.h: $(srcdir)/d @-if test ! -d dnstap; then $(INSTALL) -d dnstap; fi $(PROTOC_C) --c_out=. --proto_path=$(srcdir) $(srcdir)/dnstap/dnstap.proto +unbound-dnstap-socket$(EXEEXT): $(DNSTAP_SOCKET_OBJ_LINK) + $(LINK) -o $@ $(DNSTAP_SOCKET_OBJ_LINK) $(SSLLIB) $(LIBS) $(DYNLIBMOD_EXTRALIBS) + dnstap.pb-c.lo dnstap.pb-c.o: dnstap/dnstap.pb-c.c dnstap/dnstap.pb-c.h +dtstream.lo dtstream.o: $(srcdir)/dnstap/dtstream.c config.h $(srcdir)/dnstap/dtstream.h +dnstap_fstrm.lo dnstap_fstrm.o: $(srcdir)/dnstap/dnstap_fstrm.c config.h $(srcdir)/dnstap/dnstap_fstrm.h +unbound-dnstap-socket.lo unbound-dnstap-socket.o: $(srcdir)/dnstap/unbound-dnstap-socket.c config.h $(srcdir)/dnstap/dtstream.h # dnscrypt dnscrypt.lo dnscrypt.o: $(srcdir)/dnscrypt/dnscrypt.c config.h \ @@ -455,6 +473,7 @@ clean: rm -f unbound$(EXEEXT) unbound-checkconf$(EXEEXT) unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup libunbound.la unbound.h rm -f $(ALL_SRC:.c=.lint) rm -f _unbound.la libunbound/python/libunbound_wrap.c libunbound/python/unbound.py pythonmod/interface.h pythonmod/unboundmodule.py + rm -f libunbound.a rm -rf autom4te.cache .libs build doc/html doc/xml distclean: clean @@ -629,6 +648,7 @@ depend: -e 's?$$(srcdir)/pythonmod/pythonmod.h?$$(PYTHONMOD_HEADER)?g' \ -e 's?$$(srcdir)/edns-subnet/subnetmod.h $$(srcdir)/edns-subnet/subnet-whitelist.h $$(srcdir)/edns-subnet/edns-subnet.h $$(srcdir)/edns-subnet/addrtree.h?$$(SUBNET_HEADER)?g' \ -e 's?$$(srcdir)/ipsecmod/ipsecmod.h $$(srcdir)/ipsecmod/ipsecmod-whitelist.h?$$(IPSECMOD_HEADER)?g' \ + -e 's?$$(srcdir)/dynlibmod/dynlibmod.h?$$(DYNLIBMOD_HEADER)?g' \ -e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' \ > $(DEPEND_TMP) cp $(DEPEND_TARGET) $(DEPEND_TMP2) @@ -796,12 +816,13 @@ modstack.lo modstack.o: $(srcdir)/services/modstack.c $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h \ - $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ - $(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h $(srcdir)/dns64/dns64.h $(srcdir)/iterator/iterator.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/dns64/dns64.h \ + $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/respip/respip.h $(srcdir)/services/localzone.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(PYTHONMOD_HEADER) $(srcdir)/ipsecmod/ipsecmod.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/edns-subnet/addrtree.h $(srcdir)/edns-subnet/edns-subnet.h \ + $(srcdir)/ipset/ipset.h $(srcdir)/dynlibmod/dynlibmod.h view.lo view.o: $(srcdir)/services/view.c config.h $(srcdir)/services/view.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h \ @@ -886,21 +907,23 @@ authzone.lo authzone.o: $(srcdir)/services/authzone.c $(srcdir)/validator/val_secalgo.h fptr_wlist.lo fptr_wlist.o: $(srcdir)/util/fptr_wlist.c config.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h \ - $(srcdir)/util/config_file.h $(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ - $(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/outside_network.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h \ - $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ - $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h \ - $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h \ - $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/libunbound/libworker.h \ - $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound-event.h \ - $(srcdir)/libunbound/worker.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ + $(srcdir)/services/outside_network.h $(srcdir)/services/localzone.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(srcdir)/services/authzone.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_nsec3.h \ + $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_neg.h \ + $(srcdir)/validator/autotrust.h $(srcdir)/libunbound/libworker.h $(srcdir)/libunbound/context.h \ + $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/unbound-event.h \ + $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h $(srcdir)/respip/respip.h \ + $(PYTHONMOD_HEADER) $(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/edns-subnet/subnetmod.h $(srcdir)/util/net_help.h \ + $(srcdir)/edns-subnet/addrtree.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/ipset/ipset.h \ + $(srcdir)/dynlibmod/dynlibmod.h locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/sldns/sbuffer.h mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ @@ -1108,7 +1131,32 @@ respip.lo respip.o: $(srcdir)/respip/respip.c config.h $(srcdir)/util/regional.h checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/testcode/checklocks.h +dnstap.lo dnstap.o: $(srcdir)/dnstap/dnstap.c config.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/locks.h $(srcdir)/dnstap/dnstap.h \ + dnstap/dnstap.pb-c.h +dnstap.pb-c.lo dnstap.pb-c.o: dnstap/dnstap.pb-c.c dnstap/dnstap.pb-c.h \ + +dynlibmod.lo dynlibmod.o: $(srcdir)/dynlibmod/dynlibmod.c config.h $(srcdir)/dynlibmod/dynlibmod.h \ + $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/rbtree.h\ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/services/cache/dns.h $(srcdir)/sldns/wire2str.h +dnscrypt.lo dnscrypt.o: $(srcdir)/dnscrypt/dnscrypt.c config.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/locks.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/storage/lookup3.h ipsecmod.lo ipsecmod.o: $(srcdir)/ipsecmod/ipsecmod.c config.h +ipset.lo ipset.o: $(srcdir)/ipset/ipset.c config.h $(srcdir)/ipset/ipset.h $(srcdir)/util/module.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/services/cache/dns.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/parseutil.h ipsecmod-whitelist.lo ipsecmod-whitelist.o: $(srcdir)/ipsecmod/ipsecmod-whitelist.c config.h unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/testcode/unitmain.h \ Copied: head/contrib/unbound/README-Travis.md (from r364468, vendor/unbound/dist/README-Travis.md) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/unbound/README-Travis.md Mon Aug 24 18:14:04 2020 (r364721, copy of r364468, vendor/unbound/dist/README-Travis.md) @@ -0,0 +1,278 @@ +# Travis Testing + +Unbound 1.10 and above leverage Travis CI to increase coverage of compilers and platforms. Compilers include Clang and GCC; while platforms include Android, iOS, Linux, and OS X on AMD64, Aarch64, PowerPC and s390x hardware. + +Android is tested on armv7a, aarch64, x86 and x86_64. The Android recipes build and install OpenSSL and Expat, and then builds Unbound. The testing is tailored for Android NDK-r19 and above, and includes NDK-r20 and NDK-r21. Mips and Mips64 are not tested because they are no longer supported under current NDKs. + +iOS is tested for iPhoneOS, WatchOS, AppleTVOS, iPhoneSimulator, AppleTVSimulator and WatchSimulator. The testing uses Xcode 10 on OS X 10.13. + +The Unbound Travis configuration file `.travis.yml` does not use top-level keys like `os:` and `compiler:` so there is no matrix expansion. Instead Unbound specifies the exact job to run under the `jobs:` and `include:` keys. + +## Typical recipe + +A typical recipe tests Clang and GCC on various hardware. The hardware includes AMD64, Aarch64, PowerPC and s390x. PowerPC is a little-endian platform, and s390x is a big-endian platform. There are pairs of recipes that are similar to the following. + +``` +- os: linux + name: GCC on Linux, Aarch64 + compiler: gcc + arch: arm64 + dist: bionic +- os: linux + name: Clang on Linux, Aarch64 + compiler: clang + arch: arm64 + dist: bionic +``` + +OS X provides a single recipe to test Clang. GCC is not tested because GCC is an alias for Clang. + +## Sanitizer builds + +Two sanitizer builds are tested using Clang and GCC, for a total of four builds. The first sanitizer is Undefined Behavior sanitizer (UBsan), and the second is Address sanitizer (Asan). The sanitizers are only run on AMD64 hardware. Note the environment includes `TEST_UBSAN=yes` or `TEST_ASAN=yes` for the sanitizer builds. + +The recipes are similar to the following. + +``` +- os: linux + name: UBsan, GCC on Linux, Amd64 + compiler: gcc + arch: amd64 + dist: bionic + env: TEST_UBSAN=yes +- os: linux + name: UBsan, Clang on Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: TEST_UBSAN=yes +``` + +When the Travis script encounters a sanitizer it uses different `CFLAGS` and configuration string. + +``` +if [ "$TEST_UBSAN" = "yes" ]; then + export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=undefined -fno-sanitize-recover" + ./configure + make -j 2 + make test +elif [ "$TEST_ASAN" = "yes" ]; then + export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=address" + ./configure + make -j 2 + make test +... +``` + +## Android builds + +Travis tests Android builds for the armv7a, aarch64, x86 and x86_64 architectures. The builds are trickier than other builds for several reasons. The testing requires installation of the Android NDK and SDK, it requires a cross-compile, and requires OpenSSL and Expat prerequisites. The Android cross-compiles also require care to set the Autotools triplet, the OpenSSL triplet, the toolchain path, the tool variables, and the sysroot. The discussion below detail the steps of the Android recipes. + +### Android job + +The first step sets environmental variables for the cross-compile using the Travis job. A typical job with variables is shown below. + +``` +- os: linux + name: Android armv7a, Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - TEST_ANDROID=yes + - AUTOTOOLS_HOST=armv7a-linux-androideabi + - OPENSSL_HOST=android-arm + - ANDROID_CPU=armv7a + - ANDROID_API=23 + - ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU" + - ANDROID_SDK_ROOT="$HOME/android-sdk" + - ANDROID_NDK_ROOT="$HOME/android-ndk" +``` + +### ANDROID_NDK_ROOT + +The second step for Android is to set the environmental variables `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT`. This is an important step because the NDK and SDK use the variables internally to locate their own tools. Also see [Recommended NDK Directory?](https://groups.google.com/forum/#!topic/android-ndk/qZjhOaynHXc) on the android-ndk mailing list. (Many folks miss this step, or use incorrect variables like `ANDROID_NDK_HOME` or `ANDROID_SDK_HOME`). + +If you are working from a developer machine you probably already have the necessary tools installed. You should ensure `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT` are set properly. + +### Tool installation + +The second step installs tools needed for OpenSSL, Expat and Unbound. This step is handled in by the script `contrib/android/install_tools.sh`. The tools include curl, tar, zip, unzip and java. + +``` +before_script: + - | + if [ "$TEST_ANDROID" = "yes" ]; then + ./contrib/android/install_tools.sh + elif [ "$TEST_IOS" = "yes" ]; then + ./contrib/ios/install_tools.sh + fi +``` + +### NDK installation + +The third step installs the NDK and SDK. This step is handled in by the script `contrib/android/install_ndk.sh`. The script uses `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT` to place the NDK and SDK in the `$HOME` directory. + +If you are working from a developer machine you probably already have a NDK and SDK installed. + +### Android environment + +The fourth step sets the Android cross-compile environment using the script `contrib/android/setenv_android.sh`. The script is `sourced` so the variables in the script are available to the calling shell. The script sets variables like `CC`, `CXX`, `AS` and `AR`; sets `CFLAGS` and `CXXFLAGS`; sets a `sysroot` so Android headers and libraries are found; and adds the path to the toolchain to `PATH`. + +`contrib/android/setenv_android.sh` knows which toolchain and architecture to select by inspecting environmental variables set by Travis for the job. In particular, the variables `ANDROID_CPU` and `ANDROID_API` tell `contrib/android/setenv_android.sh` which tools and libraries to select. + +The `contrib/android/setenv_android.sh` script specifies the tools in a `case` statement like the following. There is a case for each of the architectures armv7a, aarch64, x86 and x86_64. + +``` +armv8a|aarch64|arm64|arm64-v8a) + CC="aarch64-linux-android$ANDROID_API-clang" + CXX="aarch64-linux-android$ANDROID_API-clang++" + LD="aarch64-linux-android-ld" + AS="aarch64-linux-android-as" + AR="aarch64-linux-android-ar" + RANLIB="aarch64-linux-android-ranlib" + STRIP="aarch64-linux-android-strip" + + CFLAGS="-funwind-tables -fexceptions" + CXXFLAGS="-funwind-tables -fexceptions -frtti" +``` + +### OpenSSL and Expat + +The fifth step builds OpenSSL and Expat. OpenSSL and Expat are built for Android using the scripts `contrib/android/install_openssl.sh` and `contrib/android/install_expat.sh`. The scripts download, configure and install the latest release version of the libraries. The libraries are configured with `--prefix="$ANDROID_PREFIX"` so the headers are placed in `$ANDROID_PREFIX/include` directory, and the libraries are placed in the `$ANDROID_PREFIX/lib` directory. + +`ANDROID_PREFIX` is the value `$HOME/android$ANDROID_API-$ANDROID_CPU`. The libraries will be installed in `$HOME/android23-armv7a`, `$HOME/android23-aarch64`, etc. For Autotools projects, the appropriate `PKG_CONFIG_PATH` is exported. `PKG_CONFIG_PATH` is the userland equivalent to sysroot, and allows Autotools to find non-system headers and libraries for an architecture. Typical `PKG_CONFIG_PATH` are `$HOME/android23-armv7a/lib/pkgconfig` and `$HOME/android23-aarch64/lib/pkgconfig`. + +OpenSSL also uses a custom configuration file called `15-android.conf`. It is a copy of the OpenSSL's project file and located at `contrib/android/15-android.conf`. The Unbound version is copied to the OpenSSL source files after unpacking the OpenSSL distribution. The Unbound version has legacy NDK support removed and some other fixes, like `ANDROID_NDK_ROOT` awareness. The changes mean Unbound's `15-android.conf` will only work with Unbound, with NDK-r19 and above, and a properly set environment. + +OpenSSL is configured with `no-engine`. If you want to include OpenSSL engines then edit `contrib/android/install_openssl.sh` and remove the config option. + +### Android build + +Finally, once OpenSSL and Expat are built, then the Travis script configures and builds Unbound. The recipe looks as follows. + +``` +elif [ "$TEST_ANDROID" = "yes" ]; then + export AUTOTOOLS_BUILD="$(./config.guess)" + export PKG_CONFIG_PATH="$ANDROID_PREFIX/lib/pkgconfig" + ./contrib/android/install_ndk.sh + source ./contrib/android/setenv_android.sh + ./contrib/android/install_openssl.sh + ./contrib/android/install_expat.sh + ./configure \ + --build="$AUTOTOOLS_BUILD" \ + --host="$AUTOTOOLS_HOST" \ + --prefix="$ANDROID_PREFIX" \ + --with-ssl="$ANDROID_PREFIX" \ + --with-libexpat="$ANDROID_PREFIX" \ + --disable-gost; + make -j 2 + make install +``` + +Travis only smoke tests an Android build using a compile, link and install. The self tests are not run. TODO: figure out how to fire up an emulator, push the tests to the device and run them. + +### Android flags + +`contrib/android/setenv_android.sh` uses specific flags for `CFLAGS` and `CXXFLAGS`. They are taken from `ndk-build`, so we consider them the official flag set. It is important to use the same flags across projects to avoid subtle problems due to mixing and matching different flags. + +`CXXFLAGS` includes `-fexceptions` and `-frtti` because exceptions and runtime type info are disabled by default. `CFLAGS` include `-funwind-tables` and `-fexceptions` to ensure C++ exceptions pass through C code, if needed. Also see `docs/CPLUSPLUS-SUPPORT.html` in the NDK docs. + +To inspect the flags used by `ndk-build` for a platform clone ASOP's [ndk-samples](https://github.com/android/ndk-samples/tree/master/hello-jni) and build the `hello-jni` project. Use the `V=1` flag to see the full compiler output from `ndk-build`. + +## iOS builds + +Travis tests iOS builds for the armv7a, armv7s and aarch64 architectures for iPhoneOS, AppleTVOS and WatchOS. iPhoneOS is tested using both 32-bit builds (iPhones) and 64-bit builds (iPads). Travis also tests compiles against the simulators. The builds are trickier than other builds for several reasons. The testing requires a cross-compile, and requires OpenSSL and Expat prerequisites. The iOS cross-compiles also require care to set the Autotools triplet, the OpenSSL triplet, the toolchain path, the tool variables, and the sysroot. The discussion below detail the steps of the iOS recipes. + +### iOS job + +The first step sets environmental variables for the cross-compile using the Travis job. A typical job with variables is shown below. + +``` +- os: osx + osx_image: xcode10 + name: Apple iPhone on iOS, armv7 + compiler: clang + env: + - TEST_IOS=yes + - AUTOTOOLS_HOST=armv7-apple-ios + - OPENSSL_HOST=ios-cross + - IOS_SDK=iPhoneOS + - IOS_CPU=armv7s + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" +``` + +### Tool installation + +The second step installs tools needed for OpenSSL, Expat and Unbound. This step is handled in by the script `contrib/ios/install_tools.sh`. The tools include autotools, curl and perl. The installation happens at the `before_script:` stage of Travis. + +``` +before_script: + - | + if [ "$TEST_ANDROID" = "yes" ]; then + ./contrib/android/install_tools.sh + elif [ "$TEST_IOS" = "yes" ]; then + ./contrib/ios/install_tools.sh + fi +``` + +### iOS environment + +The third step sets the iOS cross-compile environment using the script `contrib/ios/setenv_ios.sh`. The script is `sourced` so the variables in the script are available to the calling shell. The script sets variables like `CC`, `CXX`, `AS` and `AR`; sets `CFLAGS` and `CXXFLAGS`; sets a `sysroot` so iOS headers and libraries are found; and adds the path to the toolchain to `PATH`. + +`contrib/ios/setenv_ios.sh` knows which toolchain and architecture to select by inspecting environmental variables set by Travis for the job. In particular, the variables `IOS_SDK` and `IOS_CPU` tell `contrib/ios/setenv_ios.sh` which tools and libraries to select. + +The `contrib/ios/setenv_ios.sh` script specifies the tools to use during the cross-compile. For Apple SDKs, the tool names are the same as a desktop. There are no special prefixes for the mobile tools. + +``` +CPP=cpp +CC=clang +CXX=clang++ +LD=ld +AS=as +AR=ar +RANLIB=ranlib +STRIP=strip +``` + +If you are working from a developer machine you probably already have the necessary tools installed. + +### OpenSSL and Expat + +The fourth step builds OpenSSL and Expat. OpenSSL and Expat are built for iOS using the scripts `contrib/ios/install_openssl.sh` and `contrib/ios/install_expat.sh`. The scripts download, configure and install the latest release version of the libraries. The libraries are configured with `--prefix="$IOS_PREFIX"` so the headers are placed in `$IOS_PREFIX/include` directory, and the libraries are placed in the `$IOS_PREFIX/lib` directory. + +`IOS_PREFIX` is the value `$HOME/$IOS_SDK-$IOS_CPU`. The scheme handles both iOS SDKs and cpu architectures so the pair recieves a unique installation directory. The libraries will be installed in `$HOME/iPhoneOS-armv7s`, `$HOME/iPhoneOS-arm64`, `$HOME/iPhoneSimulator-i386`, etc. For Autotools projects, the appropriate `PKG_CONFIG_PATH` is exported. + +`PKG_CONFIG_PATH` is an important variable. It is the userland equivalent to sysroot, and allows Autotools to find non-system headers and libraries for an architecture. Typical `PKG_CONFIG_PATH` are `$HOME/iPhoneOS-armv7s/lib/pkgconfig` and `$HOME/iPhoneOS-arm64/lib/pkgconfig`. + +OpenSSL also uses a custom configuration file called `15-ios.conf`. It is a copy of the OpenSSL's project file and located at `contrib/ios/15-ios.conf`. The Unbound version is copied to the OpenSSL source files after unpacking the OpenSSL distribution. The changes mean Unbound's `15-ios.conf` will only work with Unbound and a properly set environment. + +OpenSSL is configured with `no-engine`. Engines require dynamic loading so engines are disabled permanently in `15-ios.conf`. + +### iOS build + +Finally, once OpenSSL and Expat are built, then the Travis script configures and builds Unbound. The full recipe looks as follows. + +``` +elif [ "$TEST_IOS" = "yes" ]; then + export AUTOTOOLS_BUILD="$(./config.guess)" + export PKG_CONFIG_PATH="$IOS_PREFIX/lib/pkgconfig" + source ./contrib/ios/setenv_ios.sh + ./contrib/ios/install_openssl.sh + ./contrib/ios/install_expat.sh + ./configure \ + --build="$AUTOTOOLS_BUILD" \ + --host="$AUTOTOOLS_HOST" \ + --prefix="$IOS_PREFIX" \ + --with-ssl="$IOS_PREFIX" \ + --with-libexpat="$IOS_PREFIX" \ + --disable-gost; + make -j 2 + make install +``` + +Travis only smoke tests an iOS build using a compile, link and install. The self tests are not run. TODO: figure out how to fire up an simulator, push the tests to the device and run them. + +### iOS flags + +`contrib/ios/setenv_ios.sh` uses specific flags for `CFLAGS` and `CXXFLAGS`. They are taken from Xcode, so we consider them the official flag set. It is important to use the same flags across projects to avoid subtle problems due to mixing and matching different flags. Modified: head/contrib/unbound/acx_python.m4 ============================================================================== --- head/contrib/unbound/acx_python.m4 Mon Aug 24 18:13:44 2020 (r364720) +++ head/contrib/unbound/acx_python.m4 Mon Aug 24 18:14:04 2020 (r364721) @@ -58,6 +58,11 @@ $ac_distutils_result]) AC_MSG_RESULT([$PYTHON_LDFLAGS]) AC_SUBST([PYTHON_LDFLAGS]) + if test -z "$PYTHON_LIBDIR"; then + PYTHON_LIBDIR=`$PYTHON -c "from distutils.sysconfig import *; \ + print(get_config_var('LIBDIR'));"` + fi + # # Check for site packages # Modified: head/contrib/unbound/cachedb/cachedb.c ============================================================================== --- head/contrib/unbound/cachedb/cachedb.c Mon Aug 24 18:13:44 2020 (r364720) +++ head/contrib/unbound/cachedb/cachedb.c Mon Aug 24 18:14:04 2020 (r364721) @@ -160,7 +160,7 @@ testframe_lookup(struct module_env* env, struct cached static void testframe_store(struct module_env* env, struct cachedb_env* cachedb_env, - char* key, uint8_t* data, size_t data_len) + char* key, uint8_t* data, size_t data_len, time_t ATTR_UNUSED(ttl)) { struct testframe_moddata* d = (struct testframe_moddata*) cachedb_env->backend_data; @@ -606,7 +606,8 @@ cachedb_extcache_store(struct module_qstate* qstate, s /* call backend */ (*ie->backend->store)(qstate->env, ie, key, sldns_buffer_begin(qstate->env->scratch_buffer), - sldns_buffer_limit(qstate->env->scratch_buffer)); + sldns_buffer_limit(qstate->env->scratch_buffer), + qstate->return_msg->rep->ttl); } /** Modified: head/contrib/unbound/cachedb/cachedb.h ============================================================================== --- head/contrib/unbound/cachedb/cachedb.h Mon Aug 24 18:13:44 2020 (r364720) +++ head/contrib/unbound/cachedb/cachedb.h Mon Aug 24 18:14:04 2020 (r364721) @@ -84,7 +84,7 @@ struct cachedb_backend { /** Store (env, cachedb_env, key, data, data_len) */ void (*store)(struct module_env*, struct cachedb_env*, char*, - uint8_t*, size_t); + uint8_t*, size_t, time_t); }; #define CACHEDB_HASHSIZE 256 /* bit hash */ Modified: head/contrib/unbound/cachedb/redis.c ============================================================================== --- head/contrib/unbound/cachedb/redis.c Mon Aug 24 18:13:44 2020 (r364720) +++ head/contrib/unbound/cachedb/redis.c Mon Aug 24 18:14:04 2020 (r364721) @@ -59,6 +59,9 @@ struct redis_moddata { struct timeval timeout; /* timeout for connection setup and commands */ }; +static redisReply* redis_command(struct module_env*, struct cachedb_env*, + const char*, const uint8_t*, size_t); + static redisContext* redis_connect(const struct redis_moddata* moddata) { @@ -114,6 +117,33 @@ redis_init(struct module_env* env, struct cachedb_env* for(i = 0; i < moddata->numctxs; i++) moddata->ctxs[i] = redis_connect(moddata); cachedb_env->backend_data = moddata; + if(env->cfg->redis_expire_records) { + redisReply* rep = NULL; + int redis_reply_type = 0; + /** check if setex command is supported */ + rep = redis_command(env, cachedb_env, + "SETEX __UNBOUND_REDIS_CHECK__ 1 none", NULL, 0); + if(!rep) { + /** init failed, no response from redis server*/ + log_err("redis_init: failed to init redis, the " *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Aug 24 18:17:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70CA53CA147; Mon, 24 Aug 2020 18:17:14 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb0hV2S55z43Wv; Mon, 24 Aug 2020 18:17:14 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 370761C77E; Mon, 24 Aug 2020 18:17:14 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07OIHExb043539; Mon, 24 Aug 2020 18:17:14 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OIHEgb043538; Mon, 24 Aug 2020 18:17:14 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202008241817.07OIHEgb043538@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 24 Aug 2020 18:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364722 - head/usr.sbin/unbound X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/usr.sbin/unbound X-SVN-Commit-Revision: 364722 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 18:17:14 -0000 Author: cy Date: Mon Aug 24 18:17:13 2020 New Revision: 364722 URL: https://svnweb.freebsd.org/changeset/base/364722 Log: Update unbound version number. MFC after: 1 month X-MFC with: r364721 Modified: head/usr.sbin/unbound/config.h Modified: head/usr.sbin/unbound/config.h ============================================================================== --- head/usr.sbin/unbound/config.h Mon Aug 24 18:14:04 2020 (r364721) +++ head/usr.sbin/unbound/config.h Mon Aug 24 18:17:13 2020 (r364722) @@ -687,7 +687,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.10.1" +#define PACKAGE_VERSION "1.11.0" /* default pidfile location */ #define PIDFILE "/var/unbound/unbound.pid" @@ -709,7 +709,7 @@ #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem" /* version number for resource files */ -#define RSRC_PACKAGE_VERSION 1,9,6,0 +#define RSRC_PACKAGE_VERSION 1,11,0,0 /* Directory to chdir to */ #define RUN_DIR "/var/unbound" From owner-svn-src-all@freebsd.org Mon Aug 24 18:23:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B59013CA78B; Mon, 24 Aug 2020 18:23:59 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb0rH3x34z43xJ; Mon, 24 Aug 2020 18:23:59 +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 6A8491CC70; Mon, 24 Aug 2020 18:23:59 +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 07OINxtH049484; Mon, 24 Aug 2020 18:23:59 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OINxvQ049483; Mon, 24 Aug 2020 18:23:59 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008241823.07OINxvQ049483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 24 Aug 2020 18:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364723 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364723 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 18:23:59 -0000 Author: mjg Date: Mon Aug 24 18:23:58 2020 New Revision: 364723 URL: https://svnweb.freebsd.org/changeset/base/364723 Log: cache: remove leftover assert in vn_fullpath_any_smr It is only valid when !slash_prefixed. For slash_prefixed the length is properly accounted for later. Reported by: markj (syzkaller) Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Mon Aug 24 18:17:13 2020 (r364722) +++ head/sys/kern/vfs_cache.c Mon Aug 24 18:23:58 2020 (r364723) @@ -2834,8 +2834,6 @@ vn_fullpath_any_smr(struct vnode *vp, struct vnode *rd orig_buflen = *buflen; - MPASS(*buflen >= 2); - if (!slash_prefixed) { MPASS(*buflen >= 2); *buflen -= 1; From owner-svn-src-all@freebsd.org Mon Aug 24 19:35:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 880663CB3F6; Mon, 24 Aug 2020 19:35: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb2QX2s38z47qk; Mon, 24 Aug 2020 19:35: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 276F41D849; Mon, 24 Aug 2020 19:35: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 07OJZGRG092509; Mon, 24 Aug 2020 19:35:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OJZF1H092507; Mon, 24 Aug 2020 19:35:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008241935.07OJZF1H092507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 24 Aug 2020 19:35:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364725 - in head: sbin/devd sys/kern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: sbin/devd sys/kern X-SVN-Commit-Revision: 364725 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 19:35:16 -0000 Author: imp Date: Mon Aug 24 19:35:15 2020 New Revision: 364725 URL: https://svnweb.freebsd.org/changeset/base/364725 Log: Change the resume notification event from 'kern' to 'kernel' We have both a system of 'kern' and of 'kernel'. Prefer the latter and convert this notification to use 'kernel' instead of 'kern'. As a transition period, continue to also generate the 'kern' notification until sometime after FreeBSD 13 is branched. MFC After: 3 days Modified: head/sbin/devd/devd.conf.5 head/sys/kern/subr_bus.c Modified: head/sbin/devd/devd.conf.5 ============================================================================== --- head/sbin/devd/devd.conf.5 Mon Aug 24 19:00:57 2020 (r364724) +++ head/sbin/devd/devd.conf.5 Mon Aug 24 19:35:15 2020 (r364725) @@ -465,6 +465,8 @@ provider size has changed. .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li kern Ta Li power Ta Li resume Ta Notification that the system has woken from the suspended state. +Note: this notification is deprecated and will be removed in +.Fx 14.0 . .El .Pp .Pp @@ -472,6 +474,8 @@ Notification that the system has woken from the suspen .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li kernel Ta Li signal Ta Li coredump Ta Notification that a process has crashed and dumped core. +.It Li kernel Ta Li power Ta Li resume Ta +Notification that the system has woken from the suspended state. .El .Pp .Bl -column "System" "Subsystem" "1234567" -compact Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Mon Aug 24 19:00:57 2020 (r364724) +++ head/sys/kern/subr_bus.c Mon Aug 24 19:35:15 2020 (r364725) @@ -4989,8 +4989,10 @@ root_resume(device_t dev) int error; error = bus_generic_resume(dev); - if (error == 0) - devctl_notify("kern", "power", "resume", NULL); + if (error == 0) { + devctl_notify("kern", "power", "resume", NULL); /* Deprecated gone in 14 */ + devctl_notify("kernel", "power", "resume", NULL); + } return (error); } From owner-svn-src-all@freebsd.org Mon Aug 24 19:35:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 709883CB5B7; Mon, 24 Aug 2020 19:35: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb2Qm0VFbz47x3; Mon, 24 Aug 2020 19:35:27 +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 A3EA51D5F1; Mon, 24 Aug 2020 19:35:27 +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 07OJZRbx092568; Mon, 24 Aug 2020 19:35:27 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OJZROr092567; Mon, 24 Aug 2020 19:35:27 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008241935.07OJZROr092567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 24 Aug 2020 19:35:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364726 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 364726 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 19:35:28 -0000 Author: imp Date: Mon Aug 24 19:35:27 2020 New Revision: 364726 URL: https://svnweb.freebsd.org/changeset/base/364726 Log: Document the kern -> kernel name change for resume events. MFC After: 3 days Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Aug 24 19:35:15 2020 (r364725) +++ head/UPDATING Mon Aug 24 19:35:27 2020 (r364726) @@ -26,6 +26,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20200824: + The resume code now notifies devd with the 'kernel' system + rather than the old 'kern' subsystem to be consistent with + other use. The old notification will be created as well, but + will be removed prior to FreeBSD 14.0. + 20200821: r362275 changed the internal API between the kernel RPC and the NFS modules. As such, all the modules must be recompiled from From owner-svn-src-all@freebsd.org Mon Aug 24 19:49:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B18F3CB833; Mon, 24 Aug 2020 19:49:23 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb2kq2C2kz49Bw; Mon, 24 Aug 2020 19:49:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2AB101DB29; Mon, 24 Aug 2020 19:49:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07OJnNmK099084; Mon, 24 Aug 2020 19:49:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OJnNI7099083; Mon, 24 Aug 2020 19:49:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008241949.07OJnNI7099083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 24 Aug 2020 19:49:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364727 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 364727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 19:49:23 -0000 Author: imp Date: Mon Aug 24 19:49:22 2020 New Revision: 364727 URL: https://svnweb.freebsd.org/changeset/base/364727 Log: Document devd event change from r364725 Modified: head/RELNOTES Modified: head/RELNOTES ============================================================================== --- head/RELNOTES Mon Aug 24 19:35:27 2020 (r364726) +++ head/RELNOTES Mon Aug 24 19:49:22 2020 (r364727) @@ -10,6 +10,11 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +r364725: + Changes to one obscure devd event generated on resume need to + be documented. The old form will still be gerated in 13, but not + in 14. + r363679: Applications using regex(3), e.g. sed/grep, will no longer accept redundant escapes for most ordinary characters. From owner-svn-src-all@freebsd.org Mon Aug 24 20:02:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8BED63CBDE2; Mon, 24 Aug 2020 20:02:14 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb31f3By8z4Bpr; Mon, 24 Aug 2020 20:02:14 +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 511AF1DF2A; Mon, 24 Aug 2020 20:02:14 +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 07OK2EJi010325; Mon, 24 Aug 2020 20:02:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OK2EDS010324; Mon, 24 Aug 2020 20:02:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008242002.07OK2EDS010324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 24 Aug 2020 20:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364728 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 364728 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 20:02:14 -0000 Author: imp Date: Mon Aug 24 20:02:13 2020 New Revision: 364728 URL: https://svnweb.freebsd.org/changeset/base/364728 Log: Fix silly typo... Modified: head/RELNOTES Modified: head/RELNOTES ============================================================================== --- head/RELNOTES Mon Aug 24 19:49:22 2020 (r364727) +++ head/RELNOTES Mon Aug 24 20:02:13 2020 (r364728) @@ -12,7 +12,7 @@ Changes to this file should not be MFCed. r364725: Changes to one obscure devd event generated on resume need to - be documented. The old form will still be gerated in 13, but not + be documented. The old form will still be generated in 13, but not in 14. r363679: From owner-svn-src-all@freebsd.org Mon Aug 24 20:02:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 049F13CC31D; Mon, 24 Aug 2020 20:02:37 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb324696Cz4BqQ; Mon, 24 Aug 2020 20:02:36 +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 B6CE21E070; Mon, 24 Aug 2020 20:02:36 +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 07OK2aF7011135; Mon, 24 Aug 2020 20:02:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OK2aHe011134; Mon, 24 Aug 2020 20:02:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008242002.07OK2aHe011134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 24 Aug 2020 20:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364729 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 20:02:37 -0000 Author: markj Date: Mon Aug 24 20:02:36 2020 New Revision: 364729 URL: https://svnweb.freebsd.org/changeset/base/364729 Log: MFC r362631, r364317: Implement an approximation of Linux MADV_DONTNEED semantics. PR: 230160 Modified: stable/12/sys/compat/linux/linux_mmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_mmap.c ============================================================================== --- stable/12/sys/compat/linux/linux_mmap.c Mon Aug 24 20:02:13 2020 (r364728) +++ stable/12/sys/compat/linux/linux_mmap.c Mon Aug 24 20:02:36 2020 (r364729) @@ -38,9 +38,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include #include #include @@ -48,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -233,6 +236,105 @@ linux_mprotect_common(struct thread *td, uintptr_t add return (kern_mprotect(td, addr, len, prot)); } +/* + * Implement Linux madvise(MADV_DONTNEED), which has unusual semantics: for + * anonymous memory, pages in the range are immediately discarded. + */ +static int +linux_madvise_dontneed(struct thread *td, vm_offset_t start, vm_offset_t end) +{ + vm_map_t map; + vm_map_entry_t entry; + vm_object_t backing_object, object; + vm_offset_t estart, eend; + vm_pindex_t pstart, pend; + int error; + + map = &td->td_proc->p_vmspace->vm_map; + + if (!vm_map_range_valid(map, start, end)) + return (EINVAL); + start = trunc_page(start); + end = round_page(end); + + error = 0; + vm_map_lock_read(map); + if (!vm_map_lookup_entry(map, start, &entry)) + entry = entry->next; + for (; entry->start < end; entry = entry->next) { + if ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) != 0) + continue; + + if (entry->wired_count != 0) { + error = EINVAL; + break; + } + + object = entry->object.vm_object; + if (object == NULL) + continue; + if ((object->flags & (OBJ_UNMANAGED | OBJ_FICTITIOUS)) != 0) + continue; + + pstart = OFF_TO_IDX(entry->offset); + if (start > entry->start) { + pstart += atop(start - entry->start); + estart = start; + } else { + estart = entry->start; + } + pend = OFF_TO_IDX(entry->offset) + + atop(entry->end - entry->start); + if (entry->end > end) { + pend -= atop(entry->end - end); + eend = end; + } else { + eend = entry->end; + } + + if ((object->type == OBJT_DEFAULT || + object->type == OBJT_SWAP) && object->handle == NULL && + (object->flags & (OBJ_ONEMAPPING | OBJ_NOSPLIT)) == + OBJ_ONEMAPPING) { + /* + * Singly-mapped anonymous memory is discarded. This + * does not match Linux's semantics when the object + * belongs to a shadow chain of length > 1, since + * subsequent faults may retrieve pages from an + * intermediate anonymous object. However, handling + * this case correctly introduces a fair bit of + * complexity. + */ + VM_OBJECT_WLOCK(object); + if ((object->flags & OBJ_ONEMAPPING) != 0) { + vm_object_collapse(object); + vm_object_page_remove(object, pstart, pend, 0); + backing_object = object->backing_object; + if (backing_object != NULL && + (backing_object->type == OBJT_DEFAULT || + backing_object->type == OBJT_SWAP) && + backing_object->handle == NULL && + (backing_object->flags & OBJ_NOSPLIT) == 0) + linux_msg(td, + "possibly incorrect MADV_DONTNEED"); + VM_OBJECT_WUNLOCK(object); + continue; + } + VM_OBJECT_WUNLOCK(object); + } + + /* + * Handle shared mappings. Remove them outright instead of + * calling pmap_advise(), for consistency with Linux. + */ + pmap_remove(map->pmap, estart, eend); + vm_object_madvise(object, pstart, pend, MADV_DONTNEED); + } + vm_map_unlock_read(map); + + return (error); +} + int linux_madvise_common(struct thread *td, uintptr_t addr, size_t len, int behav) { @@ -247,7 +349,7 @@ linux_madvise_common(struct thread *td, uintptr_t addr case LINUX_MADV_WILLNEED: return (kern_madvise(td, addr, len, MADV_WILLNEED)); case LINUX_MADV_DONTNEED: - return (kern_madvise(td, addr, len, MADV_DONTNEED)); + return (linux_madvise_dontneed(td, addr, addr + len)); case LINUX_MADV_FREE: return (kern_madvise(td, addr, len, MADV_FREE)); case LINUX_MADV_REMOVE: From owner-svn-src-all@freebsd.org Mon Aug 24 20:06:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B48B73CC488; Mon, 24 Aug 2020 20:06:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb3604J7rz4CZw; Mon, 24 Aug 2020 20:06:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8681:1cb0:496b:2c59:e028:c140]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 7481A2D6D1; Mon, 24 Aug 2020 20:05:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r364675 - head/sys/powerpc/powerpc To: Leandro Lupori , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202008241340.07ODeaBG068401@repo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Mon, 24 Aug 2020 13:05:57 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <202008241340.07ODeaBG068401@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.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 20:06:00 -0000 On 8/24/20 6:40 AM, Leandro Lupori wrote: > Author: luporl > Date: Mon Aug 24 13:40:35 2020 > New Revision: 364675 > URL: https://svnweb.freebsd.org/changeset/base/364675 > > Log: > [PowerPC] Make new auxv format default > > Assume ELF images without OSREL use the new auxv format. > > This is specially important for rtld, that is not tagged. Using > direct exec mode with new (ELFv2) binaries that expect the new auxv > format would result in crashes otherwise. > > Unfortunately, this may break direct exec'ing old binaries, > but it seems better to correctly support new binaries by default, > considering the transition to ELFv2 happened quite some time > ago. If needed, a sysctl may be added to allow old auxv format to > be used when OSREL is not found. BTW, rtld is now tagged in HEAD as of r363264 (a little over a month ago) -- John Baldwin From owner-svn-src-all@freebsd.org Mon Aug 24 20:23:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 013C53CC895; Mon, 24 Aug 2020 20:23:36 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb3VH6BXMz4DJd; Mon, 24 Aug 2020 20:23:35 +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 B84E11DDFC; Mon, 24 Aug 2020 20:23:35 +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 07OKNZo2023418; Mon, 24 Aug 2020 20:23:35 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OKNYGI023412; Mon, 24 Aug 2020 20:23:34 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202008242023.07OKNYGI023412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 24 Aug 2020 20:23:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364730 - in head/sys: kern net net/route X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: kern net net/route X-SVN-Commit-Revision: 364730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 20:23:36 -0000 Author: melifaro Date: Mon Aug 24 20:23:34 2020 New Revision: 364730 URL: https://svnweb.freebsd.org/changeset/base/364730 Log: Remove RT_LOCK mutex from rte. rtentry lock traditionally served 2 purposed: first was protecting refcounts, the second was assuring consistent field access/changes. Since route nexthop introduction, the need for the former disappeared and the need for the latter reduced. To be more precise, the following rte field are mutable: rt_nhop (nexthop pointer, updated with RIB_WLOCK, passed in rib_cmd_info) rte_flags (only RTF_HOST and RTF_UP, where RTF_UP gets changed at rte removal) rt_weight (relative weight, updated with RIB_WLOCK, passed in rib_cmd_info) rt_expire (time when rte deletion is scheduled, updated with RIB_WLOCK) rt_chain (deletion chain pointer, updated with RIB_WLOCK) All of them are updated under RIB_WLOCK, so the only remaining concern is the reading. rt_nhop and rt_weight (addressed in this review) are read under rib lock and stored in the rib_cmd_info, so the caller has no problem with consitency. rte_flags is currently read unlocked in rtsock reporting (however the scope is only RTF_UP flag, which is pretty static). rt_expire is currently read unlocked in rtsock reporting. rt_chain accesses are safe, as this is only used at route deletion. rt_expire and rte_flags reads will be dealt in a separate reviews soon. Differential Revision: https://reviews.freebsd.org/D26162 Modified: head/sys/kern/subr_witness.c head/sys/net/route.c head/sys/net/route/route_ctl.c head/sys/net/route/route_var.h head/sys/net/rtsock.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Mon Aug 24 20:02:36 2020 (r364729) +++ head/sys/kern/subr_witness.c Mon Aug 24 20:23:34 2020 (r364730) @@ -531,7 +531,6 @@ static struct witness_order_list_entry order_lists[] = */ { "so_rcv", &lock_class_mtx_sleep }, { "radix node head", &lock_class_rm }, - { "rtentry", &lock_class_mtx_sleep }, { "ifaddr", &lock_class_mtx_sleep }, { NULL, NULL }, /* Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Mon Aug 24 20:02:36 2020 (r364729) +++ head/sys/net/route.c Mon Aug 24 20:23:34 2020 (r364730) @@ -214,18 +214,19 @@ rib_add_redirect(u_int fibnum, struct sockaddr *dst, s /* Verify the allowed flag mask. */ KASSERT(((flags & ~(RTF_GATEWAY)) == 0), ("invalid redirect flags: %x", flags)); + flags |= RTF_HOST | RTF_DYNAMIC; /* Get the best ifa for the given interface and gateway. */ if ((ifa = ifaof_ifpforaddr(gateway, ifp)) == NULL) return (ENETUNREACH); ifa_ref(ifa); - + bzero(&info, sizeof(info)); info.rti_info[RTAX_DST] = dst; info.rti_info[RTAX_GATEWAY] = gateway; info.rti_ifa = ifa; info.rti_ifp = ifp; - info.rti_flags = flags | RTF_HOST | RTF_DYNAMIC; + info.rti_flags = flags; /* Setup route metrics to define expire time. */ bzero(&rti_rmx, sizeof(rti_rmx)); @@ -242,10 +243,6 @@ rib_add_redirect(u_int fibnum, struct sockaddr *dst, s return (error); } - RT_LOCK(rc.rc_rt); - flags = rc.rc_rt->rte_flags; - RT_UNLOCK(rc.rc_rt); - RTSTAT_INC(rts_dynamic); /* Send notification of a route addition to userland. */ @@ -253,7 +250,7 @@ rib_add_redirect(u_int fibnum, struct sockaddr *dst, s info.rti_info[RTAX_DST] = dst; info.rti_info[RTAX_GATEWAY] = gateway; info.rti_info[RTAX_AUTHOR] = author; - rt_missmsg_fib(RTM_REDIRECT, &info, flags, error, fibnum); + rt_missmsg_fib(RTM_REDIRECT, &info, flags | RTF_UP, error, fibnum); return (0); } @@ -811,9 +808,7 @@ rt_mpath_unlink(struct rib_head *rnh, struct rt_addrin */ if (rn) { rto = RNTORT(rn); - RT_LOCK(rto); rto->rte_flags |= RTF_UP; - RT_UNLOCK(rto); } else if (rt->rte_flags & RTF_GATEWAY) { /* * For gateway routes, we need to Modified: head/sys/net/route/route_ctl.c ============================================================================== --- head/sys/net/route/route_ctl.c Mon Aug 24 20:02:36 2020 (r364729) +++ head/sys/net/route/route_ctl.c Mon Aug 24 20:23:34 2020 (r364730) @@ -149,9 +149,6 @@ rtfree(struct rtentry *rt) KASSERT(rt != NULL, ("%s: NULL rt", __func__)); - RT_LOCK_ASSERT(rt); - - RT_UNLOCK(rt); epoch_call(net_epoch_preempt, destroy_rtentry_epoch, &rt->rt_epoch_ctx); } @@ -250,7 +247,6 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *in nhop_free(nh); return (ENOBUFS); } - RT_LOCK_INIT(rt); rt->rte_flags = RTF_UP | flags; rt->rt_nhop = nh; @@ -283,7 +279,6 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *in rt_old = NULL; RIB_WLOCK(rnh); - RT_LOCK(rt); #ifdef RADIX_MPATH /* do not permit exactly the same dst/mask/gw pair */ if (rt_mpath_capable(rnh) && @@ -291,7 +286,6 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *in RIB_WUNLOCK(rnh); nhop_free(nh); - RT_LOCK_DESTROY(rt); uma_zfree(V_rtzone, rt); return (EEXIST); } @@ -307,8 +301,9 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *in /* Finalize notification */ rnh->rnh_gen++; - rc->rc_rt = RNTORT(rn); + rc->rc_rt = rt; rc->rc_nh_new = nh; + rc->rc_nh_weight = rt->rt_weight; rib_notify(rnh, RIB_NOTIFY_IMMEDIATE, rc); } else if ((info->rti_flags & RTF_PINNED) != 0) { @@ -333,14 +328,15 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *in if (rn != NULL) { rc->rc_cmd = RTM_CHANGE; - rc->rc_rt = RNTORT(rn); + rc->rc_rt = rt; rc->rc_nh_old = rt_old->rt_nhop; rc->rc_nh_new = nh; + rc->rc_nh_weight = rt->rt_weight; } else { rc->rc_cmd = RTM_DELETE; - rc->rc_rt = RNTORT(rn); + rc->rc_rt = rt_old; rc->rc_nh_old = rt_old->rt_nhop; - rc->rc_nh_new = nh; + rc->rc_nh_weight = rt_old->rt_weight; } rib_notify(rnh, RIB_NOTIFY_IMMEDIATE, rc); } @@ -359,13 +355,10 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *in */ if (rn == NULL) { nhop_free(nh); - RT_LOCK_DESTROY(rt); uma_zfree(V_rtzone, rt); return (EEXIST); } - RT_UNLOCK(rt); - return (0); } @@ -461,7 +454,6 @@ rt_unlinkrte(struct rib_head *rnh, struct rt_addrinfo panic ("rtrequest delete"); rt = RNTORT(rn); - RT_LOCK(rt); rt->rte_flags &= ~RTF_UP; *perror = 0; @@ -620,21 +612,19 @@ change_route_one(struct rib_head *rnh, struct rt_addri } /* Proceed with the update */ - RT_LOCK(rt); /* Provide notification to the protocols.*/ rt->rt_nhop = nh; rt_setmetrics(info, rt); /* Finalize notification */ + rnh->rnh_gen++; + rc->rc_rt = rt; rc->rc_nh_old = nh_orig; rc->rc_nh_new = rt->rt_nhop; + rc->rc_nh_weight = rt->rt_weight; - RT_UNLOCK(rt); - - /* Update generation id to reflect rtable change */ - rnh->rnh_gen++; rib_notify(rnh, RIB_NOTIFY_IMMEDIATE, rc); RIB_WUNLOCK(rnh); Modified: head/sys/net/route/route_var.h ============================================================================== --- head/sys/net/route/route_var.h Mon Aug 24 20:02:36 2020 (r364729) +++ head/sys/net/route/route_var.h Mon Aug 24 20:23:34 2020 (r364730) @@ -168,22 +168,9 @@ struct rtentry { int rte_flags; /* up/down?, host/net */ u_long rt_weight; /* absolute weight */ u_long rt_expire; /* lifetime for route, e.g. redirect */ -#define rt_endzero rt_mtx - struct mtx rt_mtx; /* mutex for routing entry */ struct rtentry *rt_chain; /* pointer to next rtentry to delete */ struct epoch_context rt_epoch_ctx; /* net epoch tracker */ }; - -#define RT_LOCK_INIT(_rt) \ - mtx_init(&(_rt)->rt_mtx, "rtentry", NULL, MTX_DEF | MTX_DUPOK | MTX_NEW) -#define RT_LOCK(_rt) mtx_lock(&(_rt)->rt_mtx) -#define RT_UNLOCK(_rt) mtx_unlock(&(_rt)->rt_mtx) -#define RT_LOCK_DESTROY(_rt) mtx_destroy(&(_rt)->rt_mtx) -#define RT_LOCK_ASSERT(_rt) mtx_assert(&(_rt)->rt_mtx, MA_OWNED) -#define RT_UNLOCK_COND(_rt) do { \ - if (mtx_owned(&(_rt)->rt_mtx)) \ - mtx_unlock(&(_rt)->rt_mtx); \ -} while (0) /* * With the split between the routing entry and the nexthop, Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Mon Aug 24 20:02:36 2020 (r364729) +++ head/sys/net/rtsock.c Mon Aug 24 20:23:34 2020 (r364730) @@ -184,9 +184,9 @@ static void rt_getmetrics(const struct rtentry *rt, static void rt_dispatch(struct mbuf *, sa_family_t); static int handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, struct rt_msghdr *rtm, struct rib_cmd_info *rc); -static int update_rtm_from_rte(struct rt_addrinfo *info, +static int update_rtm_from_rc(struct rt_addrinfo *info, struct rt_msghdr **prtm, int alloc_len, - struct rtentry *rt, struct nhop_object *nh); + struct rib_cmd_info *rc, struct nhop_object *nh); static void send_rtm_reply(struct socket *so, struct rt_msghdr *rtm, struct mbuf *m, sa_family_t saf, u_int fibnum, int rtm_errno); @@ -747,7 +747,7 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, } /* - * Update sockaddrs, flags, etc in @prtm based on @rt data. + * Update sockaddrs, flags, etc in @prtm based on @rc data. * rtm can be reallocated. * * Returns 0 on success, along with pointer to (potentially reallocated) @@ -755,8 +755,8 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, * */ static int -update_rtm_from_rte(struct rt_addrinfo *info, struct rt_msghdr **prtm, - int alloc_len, struct rtentry *rt, struct nhop_object *nh) +update_rtm_from_rc(struct rt_addrinfo *info, struct rt_msghdr **prtm, + int alloc_len, struct rib_cmd_info *rc, struct nhop_object *nh) { struct sockaddr_storage netmask_ss; struct walkarg w; @@ -767,10 +767,10 @@ update_rtm_from_rte(struct rt_addrinfo *info, struct r rtm = *prtm; - info->rti_info[RTAX_DST] = rt_key(rt); + info->rti_info[RTAX_DST] = rt_key(rc->rc_rt); info->rti_info[RTAX_GATEWAY] = &nh->gw_sa; - info->rti_info[RTAX_NETMASK] = rtsock_fix_netmask(rt_key(rt), - rt_mask(rt), &netmask_ss); + info->rti_info[RTAX_NETMASK] = rtsock_fix_netmask(rt_key(rc->rc_rt), + rt_mask(rc->rc_rt), &netmask_ss); info->rti_info[RTAX_GENMASK] = 0; ifp = nh->nh_ifp; if (rtm->rtm_addrs & (RTA_IFP | RTA_IFA)) { @@ -815,12 +815,12 @@ update_rtm_from_rte(struct rt_addrinfo *info, struct r w.w_tmemsize = alloc_len; rtsock_msg_buffer(rtm->rtm_type, info, &w, &len); - if (rt->rte_flags & RTF_GWFLAG_COMPAT) + rtm->rtm_flags = rc->rc_rt->rte_flags | nhop_get_rtflags(nh); + if (rtm->rtm_flags & RTF_GWFLAG_COMPAT) rtm->rtm_flags = RTF_GATEWAY | - (rt->rte_flags & ~RTF_GWFLAG_COMPAT); - else - rtm->rtm_flags = rt->rte_flags; - rt_getmetrics(rt, nh, &rtm->rtm_rmx); + (rtm->rtm_flags & ~RTF_GWFLAG_COMPAT); + rt_getmetrics(rc->rc_rt, nh, &rtm->rtm_rmx); + rtm->rtm_rmx.rmx_weight = rc->rc_nh_weight; rtm->rtm_addrs = info->rti_addrs; if (orig_rtm != NULL) @@ -918,8 +918,8 @@ route_output(struct mbuf *m, struct socket *so, ...) #ifdef INET6 rti_need_deembed = 1; #endif - rtm->rtm_index = rc.rc_nh_new->nh_ifp->if_index; nh = rc.rc_nh_new; + rtm->rtm_index = nh->nh_ifp->if_index; } break; @@ -946,7 +946,7 @@ report: senderr(ESRCH); } - error = update_rtm_from_rte(&info, &rtm, alloc_len, rc.rc_rt, nh); + error = update_rtm_from_rc(&info, &rtm, alloc_len, &rc, nh); /* * Note that some sockaddr pointers may have changed to * point to memory outsize @rtm. Some may be pointing From owner-svn-src-all@freebsd.org Mon Aug 24 20:28:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4940C3CC8BE; Mon, 24 Aug 2020 20:28:22 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb3bp19qZz4DgR; Mon, 24 Aug 2020 20:28:22 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BACB1E488; Mon, 24 Aug 2020 20:28:22 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07OKSLgL023680; Mon, 24 Aug 2020 20:28:21 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OKSLDL023679; Mon, 24 Aug 2020 20:28:21 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202008242028.07OKSLDL023679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Mon, 24 Aug 2020 20:28:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364731 - head/sys/dev/netmap X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/dev/netmap X-SVN-Commit-Revision: 364731 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 20:28:22 -0000 Author: vmaffione Date: Mon Aug 24 20:28:21 2020 New Revision: 364731 URL: https://svnweb.freebsd.org/changeset/base/364731 Log: netmap: use FreeBSD guards for epoch calls EPOCH calls are FreeBSD specific. Use guards to protect these, so that the code can compile under Linux. MFC after: 1 week Modified: head/sys/dev/netmap/netmap.c Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Mon Aug 24 20:23:34 2020 (r364730) +++ head/sys/dev/netmap/netmap.c Mon Aug 24 20:28:21 2020 (r364731) @@ -1149,11 +1149,13 @@ netmap_dtor(void *data) static void netmap_send_up(struct ifnet *dst, struct mbq *q) { - struct epoch_tracker et; struct mbuf *m; struct mbuf *head = NULL, *prev = NULL; +#ifdef __FreeBSD__ + struct epoch_tracker et; NET_EPOCH_ENTER(et); +#endif /* __FreeBSD__ */ /* Send packets up, outside the lock; head/prev machinery * is only useful for Windows. */ while ((m = mbq_dequeue(q)) != NULL) { @@ -1165,7 +1167,9 @@ netmap_send_up(struct ifnet *dst, struct mbq *q) } if (head) nm_os_send_up(dst, NULL, head); +#ifdef __FreeBSD__ NET_EPOCH_EXIT(et); +#endif /* __FreeBSD__ */ mbq_fini(q); } From owner-svn-src-all@freebsd.org Mon Aug 24 20:37:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B9E3C3CCDCB; Mon, 24 Aug 2020 20:37:19 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb3p74KRTz4FD4; Mon, 24 Aug 2020 20:37:19 +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 78B7B1E59A; Mon, 24 Aug 2020 20:37:19 +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 07OKbJV4030030; Mon, 24 Aug 2020 20:37:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OKbIYw030024; Mon, 24 Aug 2020 20:37:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202008242037.07OKbIYw030024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 24 Aug 2020 20:37:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364732 - head/contrib/llvm-project/openmp/runtime/src X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm-project/openmp/runtime/src X-SVN-Commit-Revision: 364732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 20:37:19 -0000 Author: dim Date: Mon Aug 24 20:37:18 2020 New Revision: 364732 URL: https://svnweb.freebsd.org/changeset/base/364732 Log: Merge commit cde8f4c16 from llvm git (by me): Move special va_list handling to kmp_os.h Instead of copying and pasting the same #ifdef expressions in multiple places, define a type and a pair of macros in kmp_os.h, to handle whether va_list is pointer-like or not: * kmp_va_list is the type to use for __kmp_fork_call() * kmp_va_deref() dereferences a va_list, if necessary * kmp_va_addr_of() takes the address of a va_list, if necessary Also add FreeBSD to the list of OSes that has a non pointer-like va_list. This can now be easily extended to other OSes too. Reviewed By: AndreyChurbanov Differential Revision: https://reviews.llvm.org/D86397 This should enable building of LLVM's OpenMP on AArch64. Addition to share/mk will follow in a subsequent commit. PR: 248864 MFC after: 2 weeks Modified: head/contrib/llvm-project/openmp/runtime/src/kmp.h head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp head/contrib/llvm-project/openmp/runtime/src/kmp_os.h head/contrib/llvm-project/openmp/runtime/src/kmp_runtime.cpp Modified: head/contrib/llvm-project/openmp/runtime/src/kmp.h ============================================================================== --- head/contrib/llvm-project/openmp/runtime/src/kmp.h Mon Aug 24 20:28:21 2020 (r364731) +++ head/contrib/llvm-project/openmp/runtime/src/kmp.h Mon Aug 24 20:37:18 2020 (r364732) @@ -3459,13 +3459,7 @@ enum fork_context_e { extern int __kmp_fork_call(ident_t *loc, int gtid, enum fork_context_e fork_context, kmp_int32 argc, microtask_t microtask, launch_t invoker, -/* TODO: revert workaround for Intel(R) 64 tracker #96 */ -#if (KMP_ARCH_ARM || KMP_ARCH_X86_64 || KMP_ARCH_AARCH64) && KMP_OS_LINUX - va_list *ap -#else - va_list ap -#endif - ); + kmp_va_list ap); extern void __kmp_join_call(ident_t *loc, int gtid #if OMPT_SUPPORT Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp ============================================================================== --- head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp Mon Aug 24 20:28:21 2020 (r364731) +++ head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp Mon Aug 24 20:37:18 2020 (r364732) @@ -308,13 +308,7 @@ void __kmpc_fork_call(ident_t *loc, kmp_int32 argc, km __kmp_fork_call(loc, gtid, fork_context_intel, argc, VOLATILE_CAST(microtask_t) microtask, // "wrapped" task VOLATILE_CAST(launch_t) __kmp_invoke_task_func, -/* TODO: revert workaround for Intel(R) 64 tracker #96 */ -#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX - &ap -#else - ap -#endif - ); + kmp_va_addr_of(ap)); #if INCLUDE_SSC_MARKS SSC_MARK_JOINING(); #endif @@ -408,16 +402,10 @@ void __kmpc_fork_teams(ident_t *loc, kmp_int32 argc, k KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nteams >= 1); KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nth >= 1); - __kmp_fork_call(loc, gtid, fork_context_intel, argc, - VOLATILE_CAST(microtask_t) - __kmp_teams_master, // "wrapped" task - VOLATILE_CAST(launch_t) __kmp_invoke_teams_master, -#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX - &ap -#else - ap -#endif - ); + __kmp_fork_call( + loc, gtid, fork_context_intel, argc, + VOLATILE_CAST(microtask_t) __kmp_teams_master, // "wrapped" task + VOLATILE_CAST(launch_t) __kmp_invoke_teams_master, kmp_va_addr_of(ap)); __kmp_join_call(loc, gtid #if OMPT_SUPPORT , Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp ============================================================================== --- head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp Mon Aug 24 20:28:21 2020 (r364731) +++ head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp Mon Aug 24 20:37:18 2020 (r364732) @@ -376,13 +376,7 @@ static va_start(ap, argc); rc = __kmp_fork_call(loc, gtid, fork_context_gnu, argc, wrapper, - __kmp_invoke_task_func, -#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX - &ap -#else - ap -#endif - ); + __kmp_invoke_task_func, kmp_va_addr_of(ap)); va_end(ap); Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_os.h ============================================================================== --- head/contrib/llvm-project/openmp/runtime/src/kmp_os.h Mon Aug 24 20:28:21 2020 (r364731) +++ head/contrib/llvm-project/openmp/runtime/src/kmp_os.h Mon Aug 24 20:37:18 2020 (r364732) @@ -200,6 +200,18 @@ typedef kmp_uint32 kmp_uint; #define KMP_INT_MAX ((kmp_int32)0x7FFFFFFF) #define KMP_INT_MIN ((kmp_int32)0x80000000) +// stdarg handling +#if (KMP_ARCH_ARM || KMP_ARCH_X86_64 || KMP_ARCH_AARCH64) && \ + (KMP_OS_FREEBSD || KMP_OS_LINUX) +typedef va_list *kmp_va_list; +#define kmp_va_deref(ap) (*(ap)) +#define kmp_va_addr_of(ap) (&(ap)) +#else +typedef va_list kmp_va_list; +#define kmp_va_deref(ap) (ap) +#define kmp_va_addr_of(ap) (ap) +#endif + #ifdef __cplusplus // macros to cast out qualifiers and to re-interpret types #define CCAST(type, var) const_cast(var) Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_runtime.cpp ============================================================================== --- head/contrib/llvm-project/openmp/runtime/src/kmp_runtime.cpp Mon Aug 24 20:28:21 2020 (r364731) +++ head/contrib/llvm-project/openmp/runtime/src/kmp_runtime.cpp Mon Aug 24 20:37:18 2020 (r364732) @@ -1389,13 +1389,7 @@ void __kmp_serialized_parallel(ident_t *loc, kmp_int32 int __kmp_fork_call(ident_t *loc, int gtid, enum fork_context_e call_context, // Intel, GNU, ... kmp_int32 argc, microtask_t microtask, launch_t invoker, -/* TODO: revert workaround for Intel(R) 64 tracker #96 */ -#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX - va_list *ap -#else - va_list ap -#endif - ) { + kmp_va_list ap) { void **argv; int i; int master_tid; @@ -1505,12 +1499,7 @@ int __kmp_fork_call(ident_t *loc, int gtid, parent_team->t.t_argc = argc; argv = (void **)parent_team->t.t_argv; for (i = argc - 1; i >= 0; --i) -/* TODO: revert workaround for Intel(R) 64 tracker #96 */ -#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX - *argv++ = va_arg(*ap, void *); -#else - *argv++ = va_arg(ap, void *); -#endif + *argv++ = va_arg(kmp_va_deref(ap), void *); // Increment our nested depth levels, but not increase the serialization if (parent_team == master_th->th.th_serial_team) { // AC: we are in serialized parallel @@ -1804,12 +1793,7 @@ int __kmp_fork_call(ident_t *loc, int gtid, argv = (void **)team->t.t_argv; if (ap) { for (i = argc - 1; i >= 0; --i) -// TODO: revert workaround for Intel(R) 64 tracker #96 -#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX - *argv++ = va_arg(*ap, void *); -#else - *argv++ = va_arg(ap, void *); -#endif + *argv++ = va_arg(kmp_va_deref(ap), void *); } else { for (i = 0; i < argc; ++i) // Get args from parent team for teams construct @@ -1840,12 +1824,7 @@ int __kmp_fork_call(ident_t *loc, int gtid, } else { argv = args; for (i = argc - 1; i >= 0; --i) -// TODO: revert workaround for Intel(R) 64 tracker #96 -#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX - *argv++ = va_arg(*ap, void *); -#else - *argv++ = va_arg(ap, void *); -#endif + *argv++ = va_arg(kmp_va_deref(ap), void *); KMP_MB(); #if OMPT_SUPPORT @@ -2130,12 +2109,7 @@ int __kmp_fork_call(ident_t *loc, int gtid, argv = (void **)team->t.t_argv; if (ap) { for (i = argc - 1; i >= 0; --i) { -// TODO: revert workaround for Intel(R) 64 tracker #96 -#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX - void *new_argv = va_arg(*ap, void *); -#else - void *new_argv = va_arg(ap, void *); -#endif + void *new_argv = va_arg(kmp_va_deref(ap), void *); KMP_CHECK_UPDATE(*argv, new_argv); argv++; } From owner-svn-src-all@freebsd.org Mon Aug 24 20:40:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77BC53CCEFA; Mon, 24 Aug 2020 20:40:27 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb3sl2dNWz4FX1; Mon, 24 Aug 2020 20:40:27 +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 3A2271E1DE; Mon, 24 Aug 2020 20:40:27 +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 07OKeQxj030264; Mon, 24 Aug 2020 20:40:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OKeQ8q030263; Mon, 24 Aug 2020 20:40:26 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202008242040.07OKeQ8q030263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 24 Aug 2020 20:40:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364733 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 364733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 20:40:27 -0000 Author: dim Date: Mon Aug 24 20:40:26 2020 New Revision: 364733 URL: https://svnweb.freebsd.org/changeset/base/364733 Log: After r364732, we can now enable MK_OPENMP for aarch64 by default. PR: 248864 MFC after: 2 weeks Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Aug 24 20:37:18 2020 (r364732) +++ head/share/mk/src.opts.mk Mon Aug 24 20:40:26 2020 (r364733) @@ -359,7 +359,8 @@ BROKEN_OPTIONS+=HYPERV BROKEN_OPTIONS+=NVME .endif -.if ${__T} == "amd64" || ${__T} == "i386" || ${__T} == "powerpc64" +.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ + ${__T} == "powerpc64" __DEFAULT_YES_OPTIONS+=OPENMP .else __DEFAULT_NO_OPTIONS+=OPENMP From owner-svn-src-all@freebsd.org Mon Aug 24 22:12:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 17BBF3CEE95; Mon, 24 Aug 2020 22:12:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb5wF6hDjz4LVf; Mon, 24 Aug 2020 22:12:45 +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 C935A1F850; Mon, 24 Aug 2020 22:12:45 +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 07OMCjqn091706; Mon, 24 Aug 2020 22:12:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OMCjXH091705; Mon, 24 Aug 2020 22:12:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202008242212.07OMCjXH091705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 24 Aug 2020 22:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364734 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 364734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 22:12:46 -0000 Author: kib Date: Mon Aug 24 22:12:45 2020 New Revision: 364734 URL: https://svnweb.freebsd.org/changeset/base/364734 Log: Restore workaround for sysret fault on non-canonical address after LA57. Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Mon Aug 24 20:40:26 2020 (r364733) +++ head/sys/amd64/amd64/trap.c Mon Aug 24 22:12:45 2020 (r364734) @@ -1189,7 +1189,8 @@ amd64_syscall(struct thread *td, int traced) * not be safe. Instead, use the full return path which * catches the problem safely. */ - if (__predict_false(td->td_frame->tf_rip >= VM_MAXUSER_ADDRESS)) + if (__predict_false(td->td_frame->tf_rip >= (la57 ? + VM_MAXUSER_ADDRESS_LA57 : VM_MAXUSER_ADDRESS_LA48))) set_pcb_flags(td->td_pcb, PCB_FULL_IRET); amd64_syscall_ret_flush_l1d_check_inline(td->td_errno); From owner-svn-src-all@freebsd.org Mon Aug 24 22:47:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9A4B3CFE23; Mon, 24 Aug 2020 22:47:25 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb6hF41cbz4NMf; Mon, 24 Aug 2020 22:47:25 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6907A1FD22; Mon, 24 Aug 2020 22:47:25 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07OMlPfu010628; Mon, 24 Aug 2020 22:47:25 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OMlPQj010627; Mon, 24 Aug 2020 22:47:25 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008242247.07OMlPQj010627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Mon, 24 Aug 2020 22:47:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r364735 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 364735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 22:47:25 -0000 Author: mmacy Date: Mon Aug 24 22:47:24 2020 New Revision: 364735 URL: https://svnweb.freebsd.org/changeset/base/364735 Log: Bump limit for openzfs vendor branch import Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Mon Aug 24 22:12:45 2020 (r364734) +++ svnadmin/conf/sizelimit.conf Mon Aug 24 22:47:24 2020 (r364735) @@ -29,3 +29,4 @@ np obrien peter rwatson +mmacy 21064397 \ No newline at end of file From owner-svn-src-all@freebsd.org Mon Aug 24 22:48:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89C753CFD57; Mon, 24 Aug 2020 22:48:23 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb6jM33Hlz4NWS; Mon, 24 Aug 2020 22:48:23 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2EDB31FE4C; Mon, 24 Aug 2020 22:48:23 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07OMmNUU010843; Mon, 24 Aug 2020 22:48:23 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OMmLDF010834; Mon, 24 Aug 2020 22:48:21 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008242248.07OMmLDF010834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Mon, 24 Aug 2020 22:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r364736 - in vendor-sys/openzfs: . dist dist/cmd dist/cmd/arc_summary dist/cmd/arcstat dist/cmd/dbufstat dist/cmd/fsck_zfs dist/cmd/mount_zfs dist/cmd/raidz_test dist/cmd/vdev_id dist/c... X-SVN-Group: vendor-sys X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in vendor-sys/openzfs: . dist dist/cmd dist/cmd/arc_summary dist/cmd/arcstat dist/cmd/dbufstat dist/cmd/fsck_zfs dist/cmd/mount_zfs dist/cmd/raidz_test dist/cmd/vdev_id dist/cmd/zdb dist/cmd/zed dist/... X-SVN-Commit-Revision: 364736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 22:48:23 -0000 Author: mmacy Date: Mon Aug 24 22:48:19 2020 New Revision: 364736 URL: https://svnweb.freebsd.org/changeset/base/364736 Log: Vendor import of openzfs master @ 184df27eef0abdc7ab2105b21257f753834b936b Sponsored by: iX Systems, Inc. Added: vendor-sys/openzfs/ vendor-sys/openzfs/dist/ vendor-sys/openzfs/dist/AUTHORS vendor-sys/openzfs/dist/CODE_OF_CONDUCT.md vendor-sys/openzfs/dist/COPYRIGHT vendor-sys/openzfs/dist/LICENSE vendor-sys/openzfs/dist/META vendor-sys/openzfs/dist/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/NEWS vendor-sys/openzfs/dist/NOTICE vendor-sys/openzfs/dist/README.md vendor-sys/openzfs/dist/TEST vendor-sys/openzfs/dist/autogen.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/ vendor-sys/openzfs/dist/cmd/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/arc_summary/ vendor-sys/openzfs/dist/cmd/arc_summary/.gitignore vendor-sys/openzfs/dist/cmd/arc_summary/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/arc_summary/arc_summary2 (contents, props changed) vendor-sys/openzfs/dist/cmd/arc_summary/arc_summary3 (contents, props changed) vendor-sys/openzfs/dist/cmd/arcstat/ vendor-sys/openzfs/dist/cmd/arcstat/.gitignore vendor-sys/openzfs/dist/cmd/arcstat/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/arcstat/arcstat.in (contents, props changed) vendor-sys/openzfs/dist/cmd/dbufstat/ vendor-sys/openzfs/dist/cmd/dbufstat/.gitignore vendor-sys/openzfs/dist/cmd/dbufstat/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/dbufstat/dbufstat.in (contents, props changed) vendor-sys/openzfs/dist/cmd/fsck_zfs/ vendor-sys/openzfs/dist/cmd/fsck_zfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/fsck_zfs/fsck.zfs (contents, props changed) vendor-sys/openzfs/dist/cmd/mount_zfs/ vendor-sys/openzfs/dist/cmd/mount_zfs/.gitignore vendor-sys/openzfs/dist/cmd/mount_zfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/mount_zfs/mount_zfs.c (contents, props changed) vendor-sys/openzfs/dist/cmd/raidz_test/ vendor-sys/openzfs/dist/cmd/raidz_test/.gitignore vendor-sys/openzfs/dist/cmd/raidz_test/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/raidz_test/raidz_bench.c (contents, props changed) vendor-sys/openzfs/dist/cmd/raidz_test/raidz_test.c (contents, props changed) vendor-sys/openzfs/dist/cmd/raidz_test/raidz_test.h (contents, props changed) vendor-sys/openzfs/dist/cmd/vdev_id/ vendor-sys/openzfs/dist/cmd/vdev_id/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/vdev_id/vdev_id (contents, props changed) vendor-sys/openzfs/dist/cmd/zdb/ vendor-sys/openzfs/dist/cmd/zdb/.gitignore vendor-sys/openzfs/dist/cmd/zdb/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/zdb/zdb.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zdb/zdb.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zdb/zdb_il.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/ vendor-sys/openzfs/dist/cmd/zed/.gitignore vendor-sys/openzfs/dist/cmd/zed/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/agents/ vendor-sys/openzfs/dist/cmd/zed/agents/README.md vendor-sys/openzfs/dist/cmd/zed/agents/fmd_api.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/agents/fmd_api.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/agents/fmd_serd.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/agents/fmd_serd.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/agents/zfs_agents.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/agents/zfs_agents.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/agents/zfs_diagnosis.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/agents/zfs_mod.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/agents/zfs_retire.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/ vendor-sys/openzfs/dist/cmd/zed/zed.d/.gitignore vendor-sys/openzfs/dist/cmd/zed/zed.d/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/README (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/all-debug.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/all-syslog.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/data-notify.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/generic-notify.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/history_event-zfs-list-cacher.sh.in (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/pool_import-led.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/resilver_finish-notify.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/resilver_finish-start-scrub.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/scrub_finish-notify.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/statechange-led.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/statechange-notify.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/trim_finish-notify.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/vdev_attach-led.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/vdev_clear-led.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/zed-functions.sh (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed.d/zed.rc vendor-sys/openzfs/dist/cmd/zed/zed.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed_conf.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed_conf.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed_disk_event.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed_disk_event.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed_event.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed_event.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed_exec.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed_exec.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed_file.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed_file.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed_log.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed_log.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed_strings.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zed/zed_strings.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zfs/ vendor-sys/openzfs/dist/cmd/zfs/.gitignore vendor-sys/openzfs/dist/cmd/zfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/zfs/zfs_iter.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zfs/zfs_iter.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zfs/zfs_main.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zfs/zfs_project.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zfs/zfs_projectutil.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zfs/zfs_util.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zfs_ids_to_path/ vendor-sys/openzfs/dist/cmd/zfs_ids_to_path/.gitignore vendor-sys/openzfs/dist/cmd/zfs_ids_to_path/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/zfs_ids_to_path/zfs_ids_to_path.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zgenhostid/ vendor-sys/openzfs/dist/cmd/zgenhostid/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/zgenhostid/zgenhostid (contents, props changed) vendor-sys/openzfs/dist/cmd/zhack/ vendor-sys/openzfs/dist/cmd/zhack/.gitignore vendor-sys/openzfs/dist/cmd/zhack/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/zhack/zhack.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zinject/ vendor-sys/openzfs/dist/cmd/zinject/.gitignore vendor-sys/openzfs/dist/cmd/zinject/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/zinject/translate.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zinject/zinject.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zinject/zinject.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/ vendor-sys/openzfs/dist/cmd/zpool/.gitignore vendor-sys/openzfs/dist/cmd/zpool/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/os/ vendor-sys/openzfs/dist/cmd/zpool/os/freebsd/ vendor-sys/openzfs/dist/cmd/zpool/os/freebsd/zpool_vdev_os.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/os/linux/ vendor-sys/openzfs/dist/cmd/zpool/os/linux/zpool_vdev_os.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/ vendor-sys/openzfs/dist/cmd/zpool/zpool.d/README (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/ata_err (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/cmd_to (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/defect (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/dm-deps (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/enc (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/encdev (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/fault_led (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/health (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/hours_on (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/iostat (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/iostat-10s (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/iostat-1s (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/label (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/locate_led (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/lsblk (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/media (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/model (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/nonmed (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/nvme_err (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/off_ucor (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/pend_sec (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/pwr_cyc (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/r_proc (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/r_ucor (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/realloc (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/rep_ucor (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/serial (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/ses (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/size (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/slot (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/smart (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/smart_test (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/smartx (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/temp (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/test_ended (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/test_progress (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/test_status (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/test_type (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/upath (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/vendor (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/w_proc (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool.d/w_ucor (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool_iter.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool_main.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool_util.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool_util.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zpool/zpool_vdev.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zstream/ vendor-sys/openzfs/dist/cmd/zstream/.gitignore vendor-sys/openzfs/dist/cmd/zstream/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/zstream/zstream.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zstream/zstream.h (contents, props changed) vendor-sys/openzfs/dist/cmd/zstream/zstream_dump.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zstream/zstream_redup.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zstream/zstream_token.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zstreamdump/ vendor-sys/openzfs/dist/cmd/zstreamdump/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/zstreamdump/zstreamdump (contents, props changed) vendor-sys/openzfs/dist/cmd/ztest/ vendor-sys/openzfs/dist/cmd/ztest/.gitignore vendor-sys/openzfs/dist/cmd/ztest/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/ztest/ztest.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zvol_id/ vendor-sys/openzfs/dist/cmd/zvol_id/.gitignore vendor-sys/openzfs/dist/cmd/zvol_id/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/zvol_id/zvol_id_main.c (contents, props changed) vendor-sys/openzfs/dist/cmd/zvol_wait/ vendor-sys/openzfs/dist/cmd/zvol_wait/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/cmd/zvol_wait/zvol_wait (contents, props changed) vendor-sys/openzfs/dist/config/ vendor-sys/openzfs/dist/config/.gitignore vendor-sys/openzfs/dist/config/Rules.am vendor-sys/openzfs/dist/config/Substfiles.am vendor-sys/openzfs/dist/config/always-arch.m4 vendor-sys/openzfs/dist/config/always-compiler-options.m4 vendor-sys/openzfs/dist/config/always-python.m4 vendor-sys/openzfs/dist/config/always-pyzfs.m4 vendor-sys/openzfs/dist/config/always-sed.m4 vendor-sys/openzfs/dist/config/always-system.m4 vendor-sys/openzfs/dist/config/ax_code_coverage.m4 vendor-sys/openzfs/dist/config/ax_python_devel.m4 vendor-sys/openzfs/dist/config/ax_restore_flags.m4 vendor-sys/openzfs/dist/config/ax_save_flags.m4 vendor-sys/openzfs/dist/config/config.awk (contents, props changed) vendor-sys/openzfs/dist/config/config.rpath (contents, props changed) vendor-sys/openzfs/dist/config/deb.am vendor-sys/openzfs/dist/config/find_system_library.m4 vendor-sys/openzfs/dist/config/gettext.m4 vendor-sys/openzfs/dist/config/host-cpu-c-abi.m4 vendor-sys/openzfs/dist/config/iconv.m4 vendor-sys/openzfs/dist/config/intlmacosx.m4 vendor-sys/openzfs/dist/config/kernel-access-ok-type.m4 vendor-sys/openzfs/dist/config/kernel-acl.m4 vendor-sys/openzfs/dist/config/kernel-aio-fsync.m4 vendor-sys/openzfs/dist/config/kernel-automount.m4 vendor-sys/openzfs/dist/config/kernel-bdi.m4 vendor-sys/openzfs/dist/config/kernel-bio.m4 vendor-sys/openzfs/dist/config/kernel-blk-queue.m4 vendor-sys/openzfs/dist/config/kernel-blkdev.m4 vendor-sys/openzfs/dist/config/kernel-block-device-operations.m4 vendor-sys/openzfs/dist/config/kernel-clear-inode.m4 vendor-sys/openzfs/dist/config/kernel-commit-metadata.m4 vendor-sys/openzfs/dist/config/kernel-config-defined.m4 vendor-sys/openzfs/dist/config/kernel-current-time.m4 vendor-sys/openzfs/dist/config/kernel-declare-event-class.m4 vendor-sys/openzfs/dist/config/kernel-dentry-operations.m4 vendor-sys/openzfs/dist/config/kernel-dirty-inode.m4 vendor-sys/openzfs/dist/config/kernel-discard-granularity.m4 vendor-sys/openzfs/dist/config/kernel-encode-fh-inode.m4 vendor-sys/openzfs/dist/config/kernel-evict-inode.m4 vendor-sys/openzfs/dist/config/kernel-fallocate.m4 vendor-sys/openzfs/dist/config/kernel-file-dentry.m4 vendor-sys/openzfs/dist/config/kernel-file-inode.m4 vendor-sys/openzfs/dist/config/kernel-fmode-t.m4 vendor-sys/openzfs/dist/config/kernel-follow-down-one.m4 vendor-sys/openzfs/dist/config/kernel-fpu.m4 vendor-sys/openzfs/dist/config/kernel-fst-mount.m4 vendor-sys/openzfs/dist/config/kernel-fsync.m4 vendor-sys/openzfs/dist/config/kernel-generic_io_acct.m4 vendor-sys/openzfs/dist/config/kernel-generic_readlink.m4 vendor-sys/openzfs/dist/config/kernel-get-disk-and-module.m4 vendor-sys/openzfs/dist/config/kernel-get-disk-ro.m4 vendor-sys/openzfs/dist/config/kernel-get-link.m4 vendor-sys/openzfs/dist/config/kernel-global_page_state.m4 vendor-sys/openzfs/dist/config/kernel-group-info.m4 vendor-sys/openzfs/dist/config/kernel-in-compat-syscall.m4 vendor-sys/openzfs/dist/config/kernel-inode-create.m4 vendor-sys/openzfs/dist/config/kernel-inode-getattr.m4 vendor-sys/openzfs/dist/config/kernel-inode-lock.m4 vendor-sys/openzfs/dist/config/kernel-inode-lookup.m4 vendor-sys/openzfs/dist/config/kernel-inode-set-flags.m4 vendor-sys/openzfs/dist/config/kernel-inode-set-iversion.m4 vendor-sys/openzfs/dist/config/kernel-inode-times.m4 vendor-sys/openzfs/dist/config/kernel-insert-inode-locked.m4 vendor-sys/openzfs/dist/config/kernel-is_owner_or_cap.m4 vendor-sys/openzfs/dist/config/kernel-kmap-atomic-args.m4 vendor-sys/openzfs/dist/config/kernel-kmem-cache.m4 vendor-sys/openzfs/dist/config/kernel-kmem.m4 vendor-sys/openzfs/dist/config/kernel-kstrtoul.m4 vendor-sys/openzfs/dist/config/kernel-ktime.m4 vendor-sys/openzfs/dist/config/kernel-kuid-helpers.m4 vendor-sys/openzfs/dist/config/kernel-kuidgid.m4 vendor-sys/openzfs/dist/config/kernel-lseek-execute.m4 vendor-sys/openzfs/dist/config/kernel-make-request-fn.m4 vendor-sys/openzfs/dist/config/kernel-misc-minor.m4 vendor-sys/openzfs/dist/config/kernel-mkdir-umode-t.m4 vendor-sys/openzfs/dist/config/kernel-mod-param.m4 vendor-sys/openzfs/dist/config/kernel-objtool.m4 vendor-sys/openzfs/dist/config/kernel-pde-data.m4 vendor-sys/openzfs/dist/config/kernel-percpu.m4 vendor-sys/openzfs/dist/config/kernel-proc-operations.m4 vendor-sys/openzfs/dist/config/kernel-put-link.m4 vendor-sys/openzfs/dist/config/kernel-rename.m4 vendor-sys/openzfs/dist/config/kernel-rw.m4 vendor-sys/openzfs/dist/config/kernel-rwsem.m4 vendor-sys/openzfs/dist/config/kernel-sched.m4 vendor-sys/openzfs/dist/config/kernel-security-inode-init.m4 vendor-sys/openzfs/dist/config/kernel-set-nlink.m4 vendor-sys/openzfs/dist/config/kernel-setattr-prepare.m4 vendor-sys/openzfs/dist/config/kernel-sget-args.m4 vendor-sys/openzfs/dist/config/kernel-show-options.m4 vendor-sys/openzfs/dist/config/kernel-shrink.m4 vendor-sys/openzfs/dist/config/kernel-super-userns.m4 vendor-sys/openzfs/dist/config/kernel-timer.m4 vendor-sys/openzfs/dist/config/kernel-tmpfile.m4 vendor-sys/openzfs/dist/config/kernel-totalhigh_pages.m4 vendor-sys/openzfs/dist/config/kernel-totalram-pages-func.m4 vendor-sys/openzfs/dist/config/kernel-truncate-setsize.m4 vendor-sys/openzfs/dist/config/kernel-userns-capabilities.m4 vendor-sys/openzfs/dist/config/kernel-usleep_range.m4 vendor-sys/openzfs/dist/config/kernel-vfs-direct_IO.m4 vendor-sys/openzfs/dist/config/kernel-vfs-fsync.m4 vendor-sys/openzfs/dist/config/kernel-vfs-getattr.m4 vendor-sys/openzfs/dist/config/kernel-vfs-iterate.m4 vendor-sys/openzfs/dist/config/kernel-vfs-rw-iterate.m4 vendor-sys/openzfs/dist/config/kernel-wait.m4 vendor-sys/openzfs/dist/config/kernel-xattr-handler.m4 vendor-sys/openzfs/dist/config/kernel-zlib.m4 vendor-sys/openzfs/dist/config/kernel.m4 vendor-sys/openzfs/dist/config/lib-ld.m4 vendor-sys/openzfs/dist/config/lib-link.m4 vendor-sys/openzfs/dist/config/lib-prefix.m4 vendor-sys/openzfs/dist/config/mount-helper.m4 vendor-sys/openzfs/dist/config/nls.m4 vendor-sys/openzfs/dist/config/pkg.m4 vendor-sys/openzfs/dist/config/po.m4 vendor-sys/openzfs/dist/config/progtest.m4 vendor-sys/openzfs/dist/config/rpm.am vendor-sys/openzfs/dist/config/tgz.am vendor-sys/openzfs/dist/config/toolchain-simd.m4 vendor-sys/openzfs/dist/config/user-clock_gettime.m4 vendor-sys/openzfs/dist/config/user-dracut.m4 vendor-sys/openzfs/dist/config/user-gettext.m4 vendor-sys/openzfs/dist/config/user-libaio.m4 vendor-sys/openzfs/dist/config/user-libblkid.m4 vendor-sys/openzfs/dist/config/user-libcrypto.m4 vendor-sys/openzfs/dist/config/user-libexec.m4 vendor-sys/openzfs/dist/config/user-libtirpc.m4 vendor-sys/openzfs/dist/config/user-libudev.m4 vendor-sys/openzfs/dist/config/user-libuuid.m4 vendor-sys/openzfs/dist/config/user-makedev.m4 vendor-sys/openzfs/dist/config/user-pam.m4 vendor-sys/openzfs/dist/config/user-runstatedir.m4 vendor-sys/openzfs/dist/config/user-systemd.m4 vendor-sys/openzfs/dist/config/user-sysvinit.m4 vendor-sys/openzfs/dist/config/user-udev.m4 vendor-sys/openzfs/dist/config/user-zlib.m4 vendor-sys/openzfs/dist/config/user.m4 vendor-sys/openzfs/dist/config/zfs-build.m4 vendor-sys/openzfs/dist/config/zfs-meta.m4 vendor-sys/openzfs/dist/configure.ac vendor-sys/openzfs/dist/contrib/ vendor-sys/openzfs/dist/contrib/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/bash_completion.d/ vendor-sys/openzfs/dist/contrib/bash_completion.d/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/bash_completion.d/zfs vendor-sys/openzfs/dist/contrib/bpftrace/ vendor-sys/openzfs/dist/contrib/bpftrace/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/bpftrace/taskqlatency.bt vendor-sys/openzfs/dist/contrib/bpftrace/zfs-trace.sh (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/ vendor-sys/openzfs/dist/contrib/dracut/02zfsexpandknowledge/ vendor-sys/openzfs/dist/contrib/dracut/02zfsexpandknowledge/.gitignore vendor-sys/openzfs/dist/contrib/dracut/02zfsexpandknowledge/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/90zfs/ vendor-sys/openzfs/dist/contrib/dracut/90zfs/.gitignore vendor-sys/openzfs/dist/contrib/dracut/90zfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/90zfs/export-zfs.sh.in (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/90zfs/module-setup.sh.in (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/90zfs/mount-zfs.sh.in (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/90zfs/parse-zfs.sh.in (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/90zfs/zfs-env-bootfs.service.in (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/90zfs/zfs-generator.sh.in (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/90zfs/zfs-lib.sh.in (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/90zfs/zfs-load-key.sh.in (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/90zfs/zfs-needshutdown.sh.in (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/dracut/README.dracut.markdown vendor-sys/openzfs/dist/contrib/initramfs/ vendor-sys/openzfs/dist/contrib/initramfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/initramfs/README.initramfs.markdown vendor-sys/openzfs/dist/contrib/initramfs/conf-hooks.d/ vendor-sys/openzfs/dist/contrib/initramfs/conf-hooks.d/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/initramfs/conf-hooks.d/zfs vendor-sys/openzfs/dist/contrib/initramfs/conf.d/ vendor-sys/openzfs/dist/contrib/initramfs/conf.d/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/initramfs/conf.d/zfs vendor-sys/openzfs/dist/contrib/initramfs/hooks/ vendor-sys/openzfs/dist/contrib/initramfs/hooks/.gitignore vendor-sys/openzfs/dist/contrib/initramfs/hooks/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/initramfs/hooks/zfs.in (contents, props changed) vendor-sys/openzfs/dist/contrib/initramfs/hooks/zfsunlock.in (contents, props changed) vendor-sys/openzfs/dist/contrib/initramfs/scripts/ vendor-sys/openzfs/dist/contrib/initramfs/scripts/.gitignore vendor-sys/openzfs/dist/contrib/initramfs/scripts/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/initramfs/scripts/local-top/ vendor-sys/openzfs/dist/contrib/initramfs/scripts/local-top/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/initramfs/scripts/local-top/zfs (contents, props changed) vendor-sys/openzfs/dist/contrib/initramfs/scripts/zfs vendor-sys/openzfs/dist/contrib/initramfs/zfsunlock (contents, props changed) vendor-sys/openzfs/dist/contrib/pam_zfs_key/ vendor-sys/openzfs/dist/contrib/pam_zfs_key/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/pam_zfs_key/pam_zfs_key.c (contents, props changed) vendor-sys/openzfs/dist/contrib/pam_zfs_key/zfs_key vendor-sys/openzfs/dist/contrib/pyzfs/ vendor-sys/openzfs/dist/contrib/pyzfs/.gitignore vendor-sys/openzfs/dist/contrib/pyzfs/LICENSE vendor-sys/openzfs/dist/contrib/pyzfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/README (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/docs/ vendor-sys/openzfs/dist/contrib/pyzfs/docs/source/ vendor-sys/openzfs/dist/contrib/pyzfs/docs/source/conf.py (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/docs/source/index.rst vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/ vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/__init__.py (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/_constants.py (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/_error_translation.py (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/_libzfs_core.py (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/_nvlist.py (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/bindings/ vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/bindings/__init__.py (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/bindings/libnvpair.py (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/bindings/libzfs_core.py (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/ctypes.py (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/exceptions.py (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/test/ vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/test/__init__.py (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/test/test_libzfs_core.py (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/libzfs_core/test/test_nvlist.py (contents, props changed) vendor-sys/openzfs/dist/contrib/pyzfs/setup.py.in (contents, props changed) vendor-sys/openzfs/dist/contrib/zcp/ vendor-sys/openzfs/dist/contrib/zcp/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/contrib/zcp/autosnap.lua (contents, props changed) vendor-sys/openzfs/dist/copy-builtin (contents, props changed) vendor-sys/openzfs/dist/cppcheck-suppressions.txt (contents, props changed) vendor-sys/openzfs/dist/etc/ vendor-sys/openzfs/dist/etc/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/etc/default/ vendor-sys/openzfs/dist/etc/default/.gitignore vendor-sys/openzfs/dist/etc/default/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/etc/default/zfs.in (contents, props changed) vendor-sys/openzfs/dist/etc/init.d/ vendor-sys/openzfs/dist/etc/init.d/.gitignore vendor-sys/openzfs/dist/etc/init.d/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/etc/init.d/README.md vendor-sys/openzfs/dist/etc/init.d/zfs-import.in (contents, props changed) vendor-sys/openzfs/dist/etc/init.d/zfs-mount.in (contents, props changed) vendor-sys/openzfs/dist/etc/init.d/zfs-share.in (contents, props changed) vendor-sys/openzfs/dist/etc/init.d/zfs-zed.in (contents, props changed) vendor-sys/openzfs/dist/etc/modules-load.d/ vendor-sys/openzfs/dist/etc/modules-load.d/.gitignore vendor-sys/openzfs/dist/etc/modules-load.d/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/etc/modules-load.d/zfs.conf (contents, props changed) vendor-sys/openzfs/dist/etc/sudoers.d/ vendor-sys/openzfs/dist/etc/sudoers.d/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/etc/sudoers.d/zfs vendor-sys/openzfs/dist/etc/systemd/ vendor-sys/openzfs/dist/etc/systemd/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/etc/systemd/system/ vendor-sys/openzfs/dist/etc/systemd/system-generators/ vendor-sys/openzfs/dist/etc/systemd/system-generators/.gitignore vendor-sys/openzfs/dist/etc/systemd/system-generators/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/etc/systemd/system-generators/zfs-mount-generator.in (contents, props changed) vendor-sys/openzfs/dist/etc/systemd/system/.gitignore vendor-sys/openzfs/dist/etc/systemd/system/50-zfs.preset.in (contents, props changed) vendor-sys/openzfs/dist/etc/systemd/system/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/etc/systemd/system/zfs-import-cache.service.in (contents, props changed) vendor-sys/openzfs/dist/etc/systemd/system/zfs-import-scan.service.in (contents, props changed) vendor-sys/openzfs/dist/etc/systemd/system/zfs-import.target.in (contents, props changed) vendor-sys/openzfs/dist/etc/systemd/system/zfs-mount.service.in (contents, props changed) vendor-sys/openzfs/dist/etc/systemd/system/zfs-share.service.in (contents, props changed) vendor-sys/openzfs/dist/etc/systemd/system/zfs-volume-wait.service.in (contents, props changed) vendor-sys/openzfs/dist/etc/systemd/system/zfs-volumes.target.in (contents, props changed) vendor-sys/openzfs/dist/etc/systemd/system/zfs-zed.service.in (contents, props changed) vendor-sys/openzfs/dist/etc/systemd/system/zfs.target.in (contents, props changed) vendor-sys/openzfs/dist/etc/zfs/ vendor-sys/openzfs/dist/etc/zfs/.gitignore vendor-sys/openzfs/dist/etc/zfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/etc/zfs/vdev_id.conf.alias.example vendor-sys/openzfs/dist/etc/zfs/vdev_id.conf.multipath.example vendor-sys/openzfs/dist/etc/zfs/vdev_id.conf.sas_direct.example vendor-sys/openzfs/dist/etc/zfs/vdev_id.conf.sas_switch.example vendor-sys/openzfs/dist/etc/zfs/vdev_id.conf.scsi.example vendor-sys/openzfs/dist/etc/zfs/zfs-functions.in (contents, props changed) vendor-sys/openzfs/dist/include/ vendor-sys/openzfs/dist/include/.gitignore vendor-sys/openzfs/dist/include/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/cityhash.h (contents, props changed) vendor-sys/openzfs/dist/include/libnvpair.h (contents, props changed) vendor-sys/openzfs/dist/include/libuutil.h (contents, props changed) vendor-sys/openzfs/dist/include/libuutil_common.h (contents, props changed) vendor-sys/openzfs/dist/include/libuutil_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/libzfs.h (contents, props changed) vendor-sys/openzfs/dist/include/libzfs_core.h (contents, props changed) vendor-sys/openzfs/dist/include/libzfs_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/libzutil.h (contents, props changed) vendor-sys/openzfs/dist/include/os/ vendor-sys/openzfs/dist/include/os/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/ vendor-sys/openzfs/dist/include/os/freebsd/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/linux/ vendor-sys/openzfs/dist/include/os/freebsd/linux/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/linux/compiler.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/linux/types.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/ vendor-sys/openzfs/dist/include/os/freebsd/spl/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/acl/ vendor-sys/openzfs/dist/include/os/freebsd/spl/acl/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/acl/acl_common.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/rpc/ vendor-sys/openzfs/dist/include/os/freebsd/spl/rpc/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/rpc/xdr.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/ vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/acl.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/acl_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/atomic.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/byteorder.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/callb.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/ccompat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/ccompile.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/cmn_err.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/condvar.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/console.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/cred.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/ctype.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/debug.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/dirent.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/disp.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/dkio.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/extdirent.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/file.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/freebsd_rwlock.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/idmap.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/inttypes.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/isa_defs.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/kidmap.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/kmem.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/kmem_cache.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/kstat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/list.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/list_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/lock.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/misc.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/mod_os.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/mode.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/mount.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/mutex.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/param.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/policy.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/proc.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/processor.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/procfs_list.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/random.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/rwlock.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/sdt.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/sid.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/sig.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/simd.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/simd_x86.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/spl_condvar.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/string.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/strings.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/sunddi.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/sysmacros.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/systeminfo.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/systm.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/taskq.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/thread.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/time.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/timer.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/trace.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/trace_zfs.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/types.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/types32.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/uio.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/uuid.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/vfs.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/vm.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/vmsystm.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/vnode.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/vnode_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/zmod.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/zone.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/zfs/ vendor-sys/openzfs/dist/include/os/freebsd/zfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/zfs/sys/ vendor-sys/openzfs/dist/include/os/freebsd/zfs/sys/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/zfs/sys/freebsd_crypto.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/zfs/sys/sha2.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/zfs/sys/vdev_os.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/zfs/sys/zfs_context_os.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/zfs/sys/zfs_ctldir.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/zfs/sys/zfs_dir.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/zfs/sys/zfs_ioctl_compat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/zfs/sys/zfs_vfsops.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/zfs/sys/zfs_vnops.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/zfs/sys/zfs_znode_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/os/freebsd/zfs/sys/zpl.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/ vendor-sys/openzfs/dist/include/os/linux/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/ vendor-sys/openzfs/dist/include/os/linux/kernel/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/ vendor-sys/openzfs/dist/include/os/linux/kernel/linux/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/blkdev_compat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/compiler_compat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/dcache_compat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/kmap_compat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/mod_compat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/page_compat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/percpu_compat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/simd.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/simd_aarch64.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/simd_powerpc.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/simd_x86.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/utsname_compat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/vfs_compat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/kernel/linux/xattr_compat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/ vendor-sys/openzfs/dist/include/os/linux/spl/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/rpc/ vendor-sys/openzfs/dist/include/os/linux/spl/rpc/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/rpc/xdr.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/ vendor-sys/openzfs/dist/include/os/linux/spl/sys/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/acl.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/atomic.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/byteorder.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/callb.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/callo.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/cmn_err.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/condvar.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/console.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/cred.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/ctype.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/debug.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/disp.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/dkio.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/errno.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/fcntl.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/file.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/inttypes.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/isa_defs.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/kmem.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/kmem_cache.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/kstat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/list.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/mod_os.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/mutex.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/param.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/proc.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/processor.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/procfs_list.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/random.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/rwlock.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/shrinker.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/sid.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/signal.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/simd.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/stat.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/strings.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/sunddi.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/sysmacros.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/systeminfo.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/taskq.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/thread.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/time.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/timer.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/trace.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/trace_spl.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/trace_taskq.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/tsd.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/types.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/types32.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/uio.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/user.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/vfs.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/vmem.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/vmsystm.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/vnode.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/wait.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/zmod.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/spl/sys/zone.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/ vendor-sys/openzfs/dist/include/os/linux/zfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/ vendor-sys/openzfs/dist/include/os/linux/zfs/sys/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/policy.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/sha2.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_acl.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_arc.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_common.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_dbgmsg.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_dbuf.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_dmu.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_dnode.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_multilist.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_rrwlock.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_txg.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_vdev.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_zfs.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_zil.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_zio.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/trace_zrlock.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/zfs_context_os.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/zfs_ctldir.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/zfs_dir.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/zfs_vfsops.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/zfs_vnops.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/zfs_znode_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/os/linux/zfs/sys/zpl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/ vendor-sys/openzfs/dist/include/sys/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/sys/abd.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/abd_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/aggsum.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/arc.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/arc_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/avl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/avl_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/bitops.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/blkptr.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/bplist.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/bpobj.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/bptree.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/bqueue.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/btree.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/crypto/ vendor-sys/openzfs/dist/include/sys/crypto/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/sys/crypto/api.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/crypto/common.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/crypto/icp.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dataset_kstats.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dbuf.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/ddt.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dmu.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dmu_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dmu_objset.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dmu_recv.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dmu_redact.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dmu_send.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dmu_traverse.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dmu_tx.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dmu_zfetch.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dnode.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dsl_bookmark.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dsl_crypt.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dsl_dataset.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dsl_deadlist.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dsl_deleg.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dsl_destroy.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dsl_dir.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dsl_pool.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dsl_prop.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dsl_scan.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dsl_synctask.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/dsl_userhold.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/edonr.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/efi_partition.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/fm/ vendor-sys/openzfs/dist/include/sys/fm/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/sys/fm/fs/ vendor-sys/openzfs/dist/include/sys/fm/fs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/sys/fm/fs/zfs.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/fm/protocol.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/fm/util.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/frame.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/fs/ vendor-sys/openzfs/dist/include/sys/fs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/sys/fs/zfs.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/hkdf.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/lua/ vendor-sys/openzfs/dist/include/sys/lua/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/sys/lua/lauxlib.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/lua/lua.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/lua/luaconf.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/lua/lualib.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/metaslab.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/metaslab_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/mmp.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/mntent.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/mod.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/multilist.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/note.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/nvpair.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/nvpair_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/objlist.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/pathname.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/qat.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/range_tree.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/rrwlock.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/sa.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/sa_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/skein.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/spa.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/spa_boot.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/spa_checkpoint.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/spa_checksum.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/spa_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/spa_log_spacemap.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/space_map.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/space_reftree.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/sysevent/ vendor-sys/openzfs/dist/include/sys/sysevent.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/sysevent/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/sys/sysevent/dev.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/sysevent/eventdefs.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/txg.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/txg_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/u8_textprep.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/u8_textprep_data.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/uberblock.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/uberblock_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/uio_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/unique.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/uuid.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/vdev.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/vdev_disk.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/vdev_file.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/vdev_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/vdev_indirect_births.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/vdev_indirect_mapping.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/vdev_initialize.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/vdev_raidz.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/vdev_raidz_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/vdev_rebuild.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/vdev_removal.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/vdev_trim.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/xvattr.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zap.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zap_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zap_leaf.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zcp.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zcp_global.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zcp_iter.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zcp_prop.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zcp_set.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfeature.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_acl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_context.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_debug.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_delay.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_file.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_fuid.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_ioctl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_ioctl_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_onexit.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_project.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_quota.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_ratelimit.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_refcount.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_rlock.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_sa.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_stat.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_sysfs.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zfs_znode.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zil.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zil_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zio.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zio_checksum.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zio_compress.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zio_crypt.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zio_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zio_priority.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zrlock.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zstd/ vendor-sys/openzfs/dist/include/sys/zstd/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/include/sys/zstd/zstd.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zthr.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zvol.h (contents, props changed) vendor-sys/openzfs/dist/include/sys/zvol_impl.h (contents, props changed) vendor-sys/openzfs/dist/include/thread_pool.h (contents, props changed) vendor-sys/openzfs/dist/include/zfeature_common.h (contents, props changed) vendor-sys/openzfs/dist/include/zfs_comutil.h (contents, props changed) vendor-sys/openzfs/dist/include/zfs_deleg.h (contents, props changed) vendor-sys/openzfs/dist/include/zfs_fletcher.h (contents, props changed) vendor-sys/openzfs/dist/include/zfs_namecheck.h (contents, props changed) vendor-sys/openzfs/dist/include/zfs_prop.h (contents, props changed) vendor-sys/openzfs/dist/lib/ vendor-sys/openzfs/dist/lib/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libavl/ vendor-sys/openzfs/dist/lib/libavl/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libefi/ vendor-sys/openzfs/dist/lib/libefi/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libefi/rdwr_efi.c (contents, props changed) vendor-sys/openzfs/dist/lib/libicp/ vendor-sys/openzfs/dist/lib/libicp/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libnvpair/ vendor-sys/openzfs/dist/lib/libnvpair/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libnvpair/libnvpair.c (contents, props changed) vendor-sys/openzfs/dist/lib/libnvpair/libnvpair_json.c (contents, props changed) vendor-sys/openzfs/dist/lib/libnvpair/nvpair_alloc_system.c (contents, props changed) vendor-sys/openzfs/dist/lib/libshare/ vendor-sys/openzfs/dist/lib/libshare/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libshare/libshare.c (contents, props changed) vendor-sys/openzfs/dist/lib/libshare/libshare_impl.h (contents, props changed) vendor-sys/openzfs/dist/lib/libshare/nfs.h (contents, props changed) vendor-sys/openzfs/dist/lib/libshare/os/ vendor-sys/openzfs/dist/lib/libshare/os/freebsd/ vendor-sys/openzfs/dist/lib/libshare/os/freebsd/nfs.c (contents, props changed) vendor-sys/openzfs/dist/lib/libshare/os/freebsd/smb.c (contents, props changed) vendor-sys/openzfs/dist/lib/libshare/os/linux/ vendor-sys/openzfs/dist/lib/libshare/os/linux/nfs.c (contents, props changed) vendor-sys/openzfs/dist/lib/libshare/os/linux/smb.c (contents, props changed) vendor-sys/openzfs/dist/lib/libshare/smb.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/ vendor-sys/openzfs/dist/lib/libspl/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/asm-generic/ vendor-sys/openzfs/dist/lib/libspl/asm-generic/.gitignore vendor-sys/openzfs/dist/lib/libspl/asm-generic/atomic.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/asm-i386/ vendor-sys/openzfs/dist/lib/libspl/asm-i386/atomic.S (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/asm-x86_64/ vendor-sys/openzfs/dist/lib/libspl/asm-x86_64/atomic.S (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/assert.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/ vendor-sys/openzfs/dist/lib/libspl/include/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/assert.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/atomic.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/ia32/ vendor-sys/openzfs/dist/lib/libspl/include/ia32/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/ia32/sys/ vendor-sys/openzfs/dist/lib/libspl/include/ia32/sys/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/ia32/sys/asm_linkage.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/libdevinfo.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/libgen.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/libshare.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/limits.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/locale.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/ vendor-sys/openzfs/dist/lib/libspl/include/os/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/ vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/ vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/byteorder.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/file.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/mnttab.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/mount.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/param.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/stat.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/sysmacros.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/vfs.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/zfs_context_os.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/linux/ vendor-sys/openzfs/dist/lib/libspl/include/os/linux/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/linux/sys/ vendor-sys/openzfs/dist/lib/libspl/include/os/linux/sys/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/linux/sys/byteorder.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/linux/sys/errno.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/linux/sys/mnttab.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/linux/sys/mount.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/linux/sys/param.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/linux/sys/stat.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/linux/sys/sysmacros.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/os/linux/sys/zfs_context_os.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/rpc/ vendor-sys/openzfs/dist/lib/libspl/include/rpc/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/rpc/xdr.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/statcommon.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/stdio.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/stdlib.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/string.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/stropts.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/ vendor-sys/openzfs/dist/lib/libspl/include/sys/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/acl.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/acl_impl.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/callb.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/cmn_err.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/cred.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/debug.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/dkio.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/dklabel.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/dktp/ vendor-sys/openzfs/dist/lib/libspl/include/sys/dktp/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/dktp/fdisk.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/feature_tests.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/int_limits.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/int_types.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/inttypes.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/isa_defs.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/kmem.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/kstat.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/list.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/list_impl.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/mhd.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/mkdev.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/policy.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/poll.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/priv.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/processor.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/sha2.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/simd.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/stack.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/stdtypes.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/strings.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/stropts.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/sunddi.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/systeminfo.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/time.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/trace_spl.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/trace_zfs.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/types.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/types32.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/tzfile.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/uio.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/va_list.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/varargs.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/vnode.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/vtoc.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/sys/zone.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/thread.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/tzfile.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/ucred.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/umem.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/unistd.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/util/ vendor-sys/openzfs/dist/lib/libspl/include/util/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/util/sscanf.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/include/zone.h (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/list.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/mkdirp.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/os/ vendor-sys/openzfs/dist/lib/libspl/os/freebsd/ vendor-sys/openzfs/dist/lib/libspl/os/freebsd/getexecname.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/os/freebsd/gethostid.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/os/freebsd/getmntany.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/os/freebsd/mnttab.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/os/linux/ vendor-sys/openzfs/dist/lib/libspl/os/linux/getexecname.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/os/linux/gethostid.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/os/linux/getmntany.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/page.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/strlcat.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/strlcpy.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/timestamp.c (contents, props changed) vendor-sys/openzfs/dist/lib/libspl/zone.c (contents, props changed) vendor-sys/openzfs/dist/lib/libtpool/ vendor-sys/openzfs/dist/lib/libtpool/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libtpool/thread_pool.c (contents, props changed) vendor-sys/openzfs/dist/lib/libtpool/thread_pool_impl.h (contents, props changed) vendor-sys/openzfs/dist/lib/libunicode/ vendor-sys/openzfs/dist/lib/libunicode/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libuutil/ vendor-sys/openzfs/dist/lib/libuutil/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libuutil/uu_alloc.c (contents, props changed) vendor-sys/openzfs/dist/lib/libuutil/uu_avl.c (contents, props changed) vendor-sys/openzfs/dist/lib/libuutil/uu_dprintf.c (contents, props changed) vendor-sys/openzfs/dist/lib/libuutil/uu_ident.c (contents, props changed) vendor-sys/openzfs/dist/lib/libuutil/uu_list.c (contents, props changed) vendor-sys/openzfs/dist/lib/libuutil/uu_misc.c (contents, props changed) vendor-sys/openzfs/dist/lib/libuutil/uu_open.c (contents, props changed) vendor-sys/openzfs/dist/lib/libuutil/uu_pname.c (contents, props changed) vendor-sys/openzfs/dist/lib/libuutil/uu_string.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/ vendor-sys/openzfs/dist/lib/libzfs/.gitignore vendor-sys/openzfs/dist/lib/libzfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/THIRDPARTYLICENSE.openssl vendor-sys/openzfs/dist/lib/libzfs/THIRDPARTYLICENSE.openssl.descrip vendor-sys/openzfs/dist/lib/libzfs/libzfs.pc.in (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/libzfs_changelist.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/libzfs_config.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/libzfs_crypto.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/libzfs_dataset.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/libzfs_diff.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/libzfs_import.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/libzfs_iter.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/libzfs_mount.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/libzfs_pool.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/libzfs_sendrecv.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/libzfs_status.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/libzfs_util.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/os/ vendor-sys/openzfs/dist/lib/libzfs/os/freebsd/ vendor-sys/openzfs/dist/lib/libzfs/os/freebsd/libzfs_compat.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/os/freebsd/libzfs_ioctl_compat.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/os/freebsd/libzfs_zmount.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/os/linux/ vendor-sys/openzfs/dist/lib/libzfs/os/linux/libzfs_mount_os.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/os/linux/libzfs_pool_os.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/os/linux/libzfs_sendrecv_os.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs/os/linux/libzfs_util_os.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs_core/ vendor-sys/openzfs/dist/lib/libzfs_core/.gitignore vendor-sys/openzfs/dist/lib/libzfs_core/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs_core/libzfs_core.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzfs_core/libzfs_core.pc.in (contents, props changed) vendor-sys/openzfs/dist/lib/libzpool/ vendor-sys/openzfs/dist/lib/libzpool/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libzpool/kernel.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzpool/taskq.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzpool/util.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzstd/ vendor-sys/openzfs/dist/lib/libzstd/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libzutil/ vendor-sys/openzfs/dist/lib/libzutil/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/lib/libzutil/os/ vendor-sys/openzfs/dist/lib/libzutil/os/freebsd/ vendor-sys/openzfs/dist/lib/libzutil/os/freebsd/zutil_compat.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzutil/os/freebsd/zutil_device_path_os.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzutil/os/freebsd/zutil_import_os.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzutil/os/linux/ vendor-sys/openzfs/dist/lib/libzutil/os/linux/zutil_compat.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzutil/os/linux/zutil_device_path_os.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzutil/os/linux/zutil_import_os.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzutil/zutil_device_path.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzutil/zutil_import.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzutil/zutil_import.h (contents, props changed) vendor-sys/openzfs/dist/lib/libzutil/zutil_nicenum.c (contents, props changed) vendor-sys/openzfs/dist/lib/libzutil/zutil_pool.c (contents, props changed) vendor-sys/openzfs/dist/man/ vendor-sys/openzfs/dist/man/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/man/man1/ vendor-sys/openzfs/dist/man/man1/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/man/man1/arcstat.1 (contents, props changed) vendor-sys/openzfs/dist/man/man1/cstyle.1 (contents, props changed) vendor-sys/openzfs/dist/man/man1/raidz_test.1 (contents, props changed) vendor-sys/openzfs/dist/man/man1/zhack.1 (contents, props changed) vendor-sys/openzfs/dist/man/man1/ztest.1 (contents, props changed) vendor-sys/openzfs/dist/man/man1/zvol_wait.1 (contents, props changed) vendor-sys/openzfs/dist/man/man5/ vendor-sys/openzfs/dist/man/man5/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/man/man5/spl-module-parameters.5 (contents, props changed) vendor-sys/openzfs/dist/man/man5/vdev_id.conf.5 (contents, props changed) vendor-sys/openzfs/dist/man/man5/zfs-events.5 (contents, props changed) vendor-sys/openzfs/dist/man/man5/zfs-module-parameters.5 (contents, props changed) vendor-sys/openzfs/dist/man/man5/zpool-features.5 (contents, props changed) vendor-sys/openzfs/dist/man/man8/ vendor-sys/openzfs/dist/man/man8/.gitignore vendor-sys/openzfs/dist/man/man8/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/man/man8/fsck.zfs.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/mount.zfs.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/vdev_id.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zdb.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zed.8.in (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-allow.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-bookmark.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-change-key.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-clone.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-create.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-destroy.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-diff.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-get.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-groupspace.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-hold.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-inherit.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-jail.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-list.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-load-key.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-mount-generator.8.in (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-mount.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-program.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-project.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-projectspace.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-promote.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-receive.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-recv.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-redact.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-release.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-rename.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-rollback.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-send.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-set.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-share.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-snapshot.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-unallow.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-unjail.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-unload-key.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-unmount.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-upgrade.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-userspace.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs-wait.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfs_ids_to_path.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfsconcepts.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zfsprops.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zgenhostid.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zinject.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-add.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-attach.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-checkpoint.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-clear.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-create.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-destroy.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-detach.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-events.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-export.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-get.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-history.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-import.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-initialize.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-iostat.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-labelclear.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-list.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-offline.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-online.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-reguid.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-remove.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-reopen.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-replace.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-resilver.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-scrub.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-set.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-split.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-status.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-sync.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-trim.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-upgrade.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool-wait.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpool.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpoolconcepts.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zpoolprops.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zstream.8 (contents, props changed) vendor-sys/openzfs/dist/man/man8/zstreamdump.8 (contents, props changed) vendor-sys/openzfs/dist/module/ vendor-sys/openzfs/dist/module/.gitignore vendor-sys/openzfs/dist/module/Kbuild.in (contents, props changed) vendor-sys/openzfs/dist/module/Makefile.bsd (contents, props changed) vendor-sys/openzfs/dist/module/Makefile.in (contents, props changed) vendor-sys/openzfs/dist/module/avl/ vendor-sys/openzfs/dist/module/avl/Makefile.in (contents, props changed) vendor-sys/openzfs/dist/module/avl/avl.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/ vendor-sys/openzfs/dist/module/icp/Makefile.in (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/ vendor-sys/openzfs/dist/module/icp/algs/aes/ vendor-sys/openzfs/dist/module/icp/algs/aes/aes_impl.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/aes/aes_impl_aesni.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/aes/aes_impl_generic.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/aes/aes_impl_x86-64.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/aes/aes_modes.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/edonr/ vendor-sys/openzfs/dist/module/icp/algs/edonr/edonr.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/edonr/edonr_byteorder.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/modes/ vendor-sys/openzfs/dist/module/icp/algs/modes/cbc.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/modes/ccm.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/modes/ctr.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/modes/ecb.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/modes/gcm.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/modes/gcm_generic.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/modes/gcm_pclmulqdq.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/modes/modes.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/sha1/ vendor-sys/openzfs/dist/module/icp/algs/sha1/sha1.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/sha2/ vendor-sys/openzfs/dist/module/icp/algs/sha2/sha2.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/skein/ vendor-sys/openzfs/dist/module/icp/algs/skein/THIRDPARTYLICENSE vendor-sys/openzfs/dist/module/icp/algs/skein/THIRDPARTYLICENSE.descrip vendor-sys/openzfs/dist/module/icp/algs/skein/skein.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/skein/skein_block.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/skein/skein_impl.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/skein/skein_iv.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/algs/skein/skein_port.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/api/ vendor-sys/openzfs/dist/module/icp/api/kcf_cipher.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/api/kcf_ctxops.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/api/kcf_digest.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/api/kcf_mac.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/api/kcf_miscapi.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/asm-x86_64/ vendor-sys/openzfs/dist/module/icp/asm-x86_64/aes/ vendor-sys/openzfs/dist/module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman vendor-sys/openzfs/dist/module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman.descrip vendor-sys/openzfs/dist/module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl vendor-sys/openzfs/dist/module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl.descrip vendor-sys/openzfs/dist/module/icp/asm-x86_64/aes/aes_aesni.S (contents, props changed) vendor-sys/openzfs/dist/module/icp/asm-x86_64/aes/aes_amd64.S (contents, props changed) vendor-sys/openzfs/dist/module/icp/asm-x86_64/aes/aeskey.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/asm-x86_64/aes/aesopt.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/asm-x86_64/aes/aestab.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/asm-x86_64/aes/aestab2.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/asm-x86_64/modes/ vendor-sys/openzfs/dist/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.cryptogams vendor-sys/openzfs/dist/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.cryptogams.descrip vendor-sys/openzfs/dist/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.openssl vendor-sys/openzfs/dist/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.openssl.descrip vendor-sys/openzfs/dist/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S (contents, props changed) vendor-sys/openzfs/dist/module/icp/asm-x86_64/modes/gcm_pclmulqdq.S (contents, props changed) vendor-sys/openzfs/dist/module/icp/asm-x86_64/modes/ghash-x86_64.S (contents, props changed) vendor-sys/openzfs/dist/module/icp/asm-x86_64/sha1/ vendor-sys/openzfs/dist/module/icp/asm-x86_64/sha1/sha1-x86_64.S (contents, props changed) vendor-sys/openzfs/dist/module/icp/asm-x86_64/sha2/ vendor-sys/openzfs/dist/module/icp/asm-x86_64/sha2/sha256_impl.S (contents, props changed) vendor-sys/openzfs/dist/module/icp/asm-x86_64/sha2/sha512_impl.S (contents, props changed) vendor-sys/openzfs/dist/module/icp/core/ vendor-sys/openzfs/dist/module/icp/core/kcf_callprov.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/core/kcf_mech_tabs.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/core/kcf_prov_lib.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/core/kcf_prov_tabs.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/core/kcf_sched.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/illumos-crypto.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/ vendor-sys/openzfs/dist/module/icp/include/aes/ vendor-sys/openzfs/dist/module/icp/include/aes/aes_impl.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/modes/ vendor-sys/openzfs/dist/module/icp/include/modes/gcm_impl.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/modes/modes.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sha1/ vendor-sys/openzfs/dist/module/icp/include/sha1/sha1.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sha1/sha1_consts.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sha1/sha1_impl.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sha2/ vendor-sys/openzfs/dist/module/icp/include/sha2/sha2_consts.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sha2/sha2_impl.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/ vendor-sys/openzfs/dist/module/icp/include/sys/asm_linkage.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/bitmap.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/crypto/ vendor-sys/openzfs/dist/module/icp/include/sys/crypto/elfsign.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/crypto/impl.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/crypto/ioctl.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/crypto/ioctladmin.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/crypto/ops_impl.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/crypto/sched_impl.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/crypto/spi.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/ia32/ vendor-sys/openzfs/dist/module/icp/include/sys/ia32/asm_linkage.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/ia32/stack.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/ia32/trap.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/modctl.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/modhash.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/modhash_impl.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/stack.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/include/sys/trap.h (contents, props changed) vendor-sys/openzfs/dist/module/icp/io/ vendor-sys/openzfs/dist/module/icp/io/aes.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/io/edonr_mod.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/io/sha1_mod.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/io/sha2_mod.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/io/skein_mod.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/os/ vendor-sys/openzfs/dist/module/icp/os/modconf.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/os/modhash.c (contents, props changed) vendor-sys/openzfs/dist/module/icp/spi/ vendor-sys/openzfs/dist/module/icp/spi/kcf_spi.c (contents, props changed) vendor-sys/openzfs/dist/module/lua/ vendor-sys/openzfs/dist/module/lua/Makefile.in vendor-sys/openzfs/dist/module/lua/README.zfs vendor-sys/openzfs/dist/module/lua/lapi.c vendor-sys/openzfs/dist/module/lua/lapi.h vendor-sys/openzfs/dist/module/lua/lauxlib.c vendor-sys/openzfs/dist/module/lua/lbaselib.c vendor-sys/openzfs/dist/module/lua/lcode.c vendor-sys/openzfs/dist/module/lua/lcode.h vendor-sys/openzfs/dist/module/lua/lcompat.c vendor-sys/openzfs/dist/module/lua/lcorolib.c vendor-sys/openzfs/dist/module/lua/lctype.c vendor-sys/openzfs/dist/module/lua/lctype.h vendor-sys/openzfs/dist/module/lua/ldebug.c vendor-sys/openzfs/dist/module/lua/ldebug.h vendor-sys/openzfs/dist/module/lua/ldo.c vendor-sys/openzfs/dist/module/lua/ldo.h vendor-sys/openzfs/dist/module/lua/lfunc.c vendor-sys/openzfs/dist/module/lua/lfunc.h vendor-sys/openzfs/dist/module/lua/lgc.c vendor-sys/openzfs/dist/module/lua/lgc.h vendor-sys/openzfs/dist/module/lua/llex.c vendor-sys/openzfs/dist/module/lua/llex.h vendor-sys/openzfs/dist/module/lua/llimits.h vendor-sys/openzfs/dist/module/lua/lmem.c vendor-sys/openzfs/dist/module/lua/lmem.h vendor-sys/openzfs/dist/module/lua/lobject.c vendor-sys/openzfs/dist/module/lua/lobject.h vendor-sys/openzfs/dist/module/lua/lopcodes.c vendor-sys/openzfs/dist/module/lua/lopcodes.h vendor-sys/openzfs/dist/module/lua/lparser.c vendor-sys/openzfs/dist/module/lua/lparser.h vendor-sys/openzfs/dist/module/lua/lstate.c vendor-sys/openzfs/dist/module/lua/lstate.h vendor-sys/openzfs/dist/module/lua/lstring.c vendor-sys/openzfs/dist/module/lua/lstring.h vendor-sys/openzfs/dist/module/lua/lstrlib.c vendor-sys/openzfs/dist/module/lua/ltable.c vendor-sys/openzfs/dist/module/lua/ltable.h vendor-sys/openzfs/dist/module/lua/ltablib.c vendor-sys/openzfs/dist/module/lua/ltm.c vendor-sys/openzfs/dist/module/lua/ltm.h vendor-sys/openzfs/dist/module/lua/lvm.c vendor-sys/openzfs/dist/module/lua/lvm.h vendor-sys/openzfs/dist/module/lua/lzio.c vendor-sys/openzfs/dist/module/lua/lzio.h vendor-sys/openzfs/dist/module/lua/setjmp/ vendor-sys/openzfs/dist/module/lua/setjmp/setjmp.S vendor-sys/openzfs/dist/module/lua/setjmp/setjmp_aarch64.S vendor-sys/openzfs/dist/module/lua/setjmp/setjmp_arm.S vendor-sys/openzfs/dist/module/lua/setjmp/setjmp_i386.S vendor-sys/openzfs/dist/module/lua/setjmp/setjmp_mips.S vendor-sys/openzfs/dist/module/lua/setjmp/setjmp_ppc.S vendor-sys/openzfs/dist/module/lua/setjmp/setjmp_rv64g.S vendor-sys/openzfs/dist/module/lua/setjmp/setjmp_s390x.S vendor-sys/openzfs/dist/module/lua/setjmp/setjmp_sparc64.S vendor-sys/openzfs/dist/module/lua/setjmp/setjmp_x86_64.S vendor-sys/openzfs/dist/module/nvpair/ vendor-sys/openzfs/dist/module/nvpair/Makefile.in (contents, props changed) vendor-sys/openzfs/dist/module/nvpair/fnvpair.c (contents, props changed) vendor-sys/openzfs/dist/module/nvpair/nvpair.c (contents, props changed) vendor-sys/openzfs/dist/module/nvpair/nvpair_alloc_fixed.c (contents, props changed) vendor-sys/openzfs/dist/module/nvpair/nvpair_alloc_spl.c (contents, props changed) vendor-sys/openzfs/dist/module/os/ vendor-sys/openzfs/dist/module/os/freebsd/ vendor-sys/openzfs/dist/module/os/freebsd/spl/ vendor-sys/openzfs/dist/module/os/freebsd/spl/acl_common.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/callb.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/list.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/sha224.h (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/sha256.h (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/sha256c.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/sha384.h (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/sha512.h (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/sha512c.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/sha512t.h (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_acl.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_atomic.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_cmn_err.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_dtrace.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_kmem.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_kstat.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_misc.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_policy.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_procfs_list.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_string.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_sunddi.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_sysevent.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_taskq.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_uio.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_vfs.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_vm.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_zlib.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/spl/spl_zone.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/ vendor-sys/openzfs/dist/module/os/freebsd/zfs/abd_os.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/arc_os.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/crypto_os.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/dmu_os.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/hkdf.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/kmod_core.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/spa_os.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/spa_stats.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/sysctl_os.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/vdev_file.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/vdev_geom.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/vdev_label_os.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_acl.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_ctldir.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_debug.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_dir.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_file_os.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_ioctl_compat.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_ioctl_os.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_onexit_os.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_vfsops.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_vnops.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/zfs_znode.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/zio_crypt.c (contents, props changed) vendor-sys/openzfs/dist/module/os/freebsd/zfs/zvol_os.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/ vendor-sys/openzfs/dist/module/os/linux/spl/ vendor-sys/openzfs/dist/module/os/linux/spl/Makefile.in (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/README.md vendor-sys/openzfs/dist/module/os/linux/spl/THIRDPARTYLICENSE.gplv2 vendor-sys/openzfs/dist/module/os/linux/spl/THIRDPARTYLICENSE.gplv2.descrip vendor-sys/openzfs/dist/module/os/linux/spl/spl-atomic.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-condvar.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-cred.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-err.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-generic.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-kmem-cache.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-kmem.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-kstat.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-proc.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-procfs-list.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-taskq.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-thread.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-trace.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-tsd.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-vmem.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-xdr.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/spl/spl-zlib.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/zfs/ vendor-sys/openzfs/dist/module/os/linux/zfs/Makefile.in vendor-sys/openzfs/dist/module/os/linux/zfs/abd_os.c vendor-sys/openzfs/dist/module/os/linux/zfs/arc_os.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/zfs/mmp_os.c vendor-sys/openzfs/dist/module/os/linux/zfs/policy.c vendor-sys/openzfs/dist/module/os/linux/zfs/qat.c vendor-sys/openzfs/dist/module/os/linux/zfs/qat_compress.c vendor-sys/openzfs/dist/module/os/linux/zfs/qat_crypt.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/zfs/spa_misc_os.c vendor-sys/openzfs/dist/module/os/linux/zfs/spa_stats.c vendor-sys/openzfs/dist/module/os/linux/zfs/trace.c vendor-sys/openzfs/dist/module/os/linux/zfs/vdev_disk.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/zfs/vdev_file.c vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_acl.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_ctldir.c vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_debug.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_dir.c vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_file_os.c vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_ioctl_os.c vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_sysfs.c vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_vfsops.c vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_vnops.c vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_znode.c vendor-sys/openzfs/dist/module/os/linux/zfs/zio_crypt.c vendor-sys/openzfs/dist/module/os/linux/zfs/zpl_ctldir.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/zfs/zpl_export.c (contents, props changed) vendor-sys/openzfs/dist/module/os/linux/zfs/zpl_file.c vendor-sys/openzfs/dist/module/os/linux/zfs/zpl_inode.c vendor-sys/openzfs/dist/module/os/linux/zfs/zpl_super.c vendor-sys/openzfs/dist/module/os/linux/zfs/zpl_xattr.c vendor-sys/openzfs/dist/module/os/linux/zfs/zvol_os.c vendor-sys/openzfs/dist/module/spl/ vendor-sys/openzfs/dist/module/spl/Makefile.in (contents, props changed) vendor-sys/openzfs/dist/module/unicode/ vendor-sys/openzfs/dist/module/unicode/Makefile.in (contents, props changed) vendor-sys/openzfs/dist/module/unicode/u8_textprep.c (contents, props changed) vendor-sys/openzfs/dist/module/unicode/uconv.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/ vendor-sys/openzfs/dist/module/zcommon/Makefile.in (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/cityhash.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zfeature_common.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zfs_comutil.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zfs_deleg.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zfs_fletcher.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zfs_fletcher_aarch64_neon.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zfs_fletcher_avx512.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zfs_fletcher_intel.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zfs_fletcher_sse.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zfs_fletcher_superscalar.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zfs_fletcher_superscalar4.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zfs_namecheck.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zfs_prop.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zfs_uio.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zpool_prop.c (contents, props changed) vendor-sys/openzfs/dist/module/zcommon/zprop_common.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/ vendor-sys/openzfs/dist/module/zfs/Makefile.in (contents, props changed) vendor-sys/openzfs/dist/module/zfs/THIRDPARTYLICENSE.cityhash vendor-sys/openzfs/dist/module/zfs/THIRDPARTYLICENSE.cityhash.descrip vendor-sys/openzfs/dist/module/zfs/abd.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/aggsum.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/arc.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/blkptr.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/bplist.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/bpobj.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/bptree.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/bqueue.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/btree.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dataset_kstats.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dbuf.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dbuf_stats.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/ddt.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/ddt_zap.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dmu.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dmu_diff.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dmu_object.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dmu_objset.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dmu_recv.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dmu_redact.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dmu_send.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dmu_traverse.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dmu_tx.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dmu_zfetch.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dnode.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dnode_sync.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dsl_bookmark.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dsl_crypt.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dsl_dataset.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dsl_deadlist.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dsl_deleg.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dsl_destroy.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dsl_dir.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dsl_pool.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dsl_prop.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dsl_scan.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dsl_synctask.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/dsl_userhold.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/edonr_zfs.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/fm.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/gzip.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/hkdf.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/lz4.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/lzjb.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/metaslab.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/mmp.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/multilist.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/objlist.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/pathname.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/range_tree.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/refcount.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/rrwlock.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/sa.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/sha256.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/skein_zfs.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/spa.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/spa_boot.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/spa_checkpoint.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/spa_config.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/spa_errlog.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/spa_history.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/spa_log_spacemap.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/spa_misc.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/space_map.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/space_reftree.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/txg.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/uberblock.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/unique.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_cache.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_indirect.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_indirect_births.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_indirect_mapping.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_initialize.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_label.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_mirror.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_missing.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_queue.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_raidz.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math_aarch64_neon.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math_aarch64_neon_common.h (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math_aarch64_neonx2.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math_avx2.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math_avx512bw.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math_avx512f.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math_impl.h (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math_powerpc_altivec.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math_powerpc_altivec_common.h (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math_scalar.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math_sse2.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math_ssse3.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_rebuild.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_removal.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_root.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/vdev_trim.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zap.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zap_leaf.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zap_micro.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zcp.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zcp_get.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zcp_global.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zcp_iter.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zcp_set.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zcp_synctask.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zfeature.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zfs_byteswap.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zfs_fm.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zfs_fuid.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zfs_ioctl.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zfs_log.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zfs_onexit.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zfs_quota.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zfs_ratelimit.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zfs_replay.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zfs_rlock.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zfs_sa.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zil.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zio.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zio_checksum.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zio_compress.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zio_inject.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zle.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zrlock.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zthr.c (contents, props changed) vendor-sys/openzfs/dist/module/zfs/zvol.c (contents, props changed) vendor-sys/openzfs/dist/module/zstd/ vendor-sys/openzfs/dist/module/zstd/Makefile.in (contents, props changed) vendor-sys/openzfs/dist/module/zstd/README.md vendor-sys/openzfs/dist/module/zstd/include/ vendor-sys/openzfs/dist/module/zstd/include/aarch64_compat.h (contents, props changed) vendor-sys/openzfs/dist/module/zstd/include/limits.h (contents, props changed) vendor-sys/openzfs/dist/module/zstd/include/stddef.h (contents, props changed) vendor-sys/openzfs/dist/module/zstd/include/stdint.h (contents, props changed) vendor-sys/openzfs/dist/module/zstd/include/stdio.h (contents, props changed) vendor-sys/openzfs/dist/module/zstd/include/stdlib.h (contents, props changed) vendor-sys/openzfs/dist/module/zstd/include/string.h (contents, props changed) vendor-sys/openzfs/dist/module/zstd/include/zstd_compat_wrapper.h (contents, props changed) vendor-sys/openzfs/dist/module/zstd/lib/ vendor-sys/openzfs/dist/module/zstd/lib/zstd.c (contents, props changed) vendor-sys/openzfs/dist/module/zstd/lib/zstd.h (contents, props changed) vendor-sys/openzfs/dist/module/zstd/lib/zstd_errors.h (contents, props changed) vendor-sys/openzfs/dist/module/zstd/zfs_zstd.c (contents, props changed) vendor-sys/openzfs/dist/module/zstd/zstd-in.c (contents, props changed) vendor-sys/openzfs/dist/rpm/ vendor-sys/openzfs/dist/rpm/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/rpm/generic/ vendor-sys/openzfs/dist/rpm/generic/.gitignore vendor-sys/openzfs/dist/rpm/generic/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/rpm/generic/zfs-dkms.spec.in (contents, props changed) vendor-sys/openzfs/dist/rpm/generic/zfs-kmod.spec.in (contents, props changed) vendor-sys/openzfs/dist/rpm/generic/zfs.spec.in (contents, props changed) vendor-sys/openzfs/dist/rpm/redhat/ vendor-sys/openzfs/dist/rpm/redhat/.gitignore vendor-sys/openzfs/dist/rpm/redhat/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/rpm/redhat/zfs-dkms.spec.in (contents, props changed) vendor-sys/openzfs/dist/rpm/redhat/zfs-kmod.spec.in (contents, props changed) vendor-sys/openzfs/dist/rpm/redhat/zfs.spec.in (contents, props changed) vendor-sys/openzfs/dist/scripts/ vendor-sys/openzfs/dist/scripts/.gitignore vendor-sys/openzfs/dist/scripts/Makefile.am vendor-sys/openzfs/dist/scripts/commitcheck.sh (contents, props changed) vendor-sys/openzfs/dist/scripts/common.sh.in vendor-sys/openzfs/dist/scripts/cstyle.pl (contents, props changed) vendor-sys/openzfs/dist/scripts/dkms.mkconf (contents, props changed) vendor-sys/openzfs/dist/scripts/dkms.postbuild (contents, props changed) vendor-sys/openzfs/dist/scripts/enum-extract.pl (contents, props changed) vendor-sys/openzfs/dist/scripts/kmodtool (contents, props changed) vendor-sys/openzfs/dist/scripts/make_gitrev.sh (contents, props changed) vendor-sys/openzfs/dist/scripts/man-dates.sh (contents, props changed) vendor-sys/openzfs/dist/scripts/paxcheck.sh (contents, props changed) vendor-sys/openzfs/dist/scripts/zfs-helpers.sh (contents, props changed) vendor-sys/openzfs/dist/scripts/zfs-images/ vendor-sys/openzfs/dist/scripts/zfs-tests.sh (contents, props changed) vendor-sys/openzfs/dist/scripts/zfs.sh (contents, props changed) vendor-sys/openzfs/dist/scripts/zfs2zol-patch.sed (contents, props changed) vendor-sys/openzfs/dist/scripts/zimport.sh (contents, props changed) vendor-sys/openzfs/dist/scripts/zloop.sh (contents, props changed) vendor-sys/openzfs/dist/scripts/zol2zfs-patch.sed (contents, props changed) vendor-sys/openzfs/dist/tests/ vendor-sys/openzfs/dist/tests/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/README.md vendor-sys/openzfs/dist/tests/runfiles/ vendor-sys/openzfs/dist/tests/runfiles/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/runfiles/common.run vendor-sys/openzfs/dist/tests/runfiles/freebsd.run vendor-sys/openzfs/dist/tests/runfiles/linux.run vendor-sys/openzfs/dist/tests/runfiles/longevity.run vendor-sys/openzfs/dist/tests/runfiles/perf-regression.run vendor-sys/openzfs/dist/tests/runfiles/sunos.run vendor-sys/openzfs/dist/tests/test-runner/ vendor-sys/openzfs/dist/tests/test-runner/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/test-runner/bin/ vendor-sys/openzfs/dist/tests/test-runner/bin/.gitignore vendor-sys/openzfs/dist/tests/test-runner/bin/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/test-runner/bin/test-runner.py.in (contents, props changed) vendor-sys/openzfs/dist/tests/test-runner/bin/zts-report.py.in (contents, props changed) vendor-sys/openzfs/dist/tests/test-runner/include/ vendor-sys/openzfs/dist/tests/test-runner/include/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/test-runner/include/logapi.shlib vendor-sys/openzfs/dist/tests/test-runner/include/stf.shlib vendor-sys/openzfs/dist/tests/test-runner/man/ vendor-sys/openzfs/dist/tests/test-runner/man/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/test-runner/man/test-runner.1 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/ vendor-sys/openzfs/dist/tests/zfs-tests/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/callbacks/ vendor-sys/openzfs/dist/tests/zfs-tests/callbacks/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/callbacks/zfs_dbgmsg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/callbacks/zfs_dmesg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/callbacks/zfs_failsafe.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/callbacks/zfs_mmp.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/btree_test/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/btree_test/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/btree_test/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/btree_test/btree_test.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/chg_usr_exec/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/chg_usr_exec/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/chg_usr_exec/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/chg_usr_exec/chg_usr_exec.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/devname2devid/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/devname2devid/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/devname2devid/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/devname2devid/devname2devid.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/dir_rd_update/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/dir_rd_update/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/dir_rd_update/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/dir_rd_update/dir_rd_update.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/file_check/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/file_check/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/file_check/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/file_check/file_check.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/file_common.h (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/file_trunc/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/file_trunc/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/file_trunc/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/file_trunc/file_trunc.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/file_write/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/file_write/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/file_write/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/file_write/file_write.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/get_diff/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/get_diff/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/get_diff/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/get_diff/get_diff.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/largest_file/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/largest_file/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/largest_file/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/largest_file/largest_file.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/libzfs_input_check/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/libzfs_input_check/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/libzfs_input_check/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mkbusy/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mkbusy/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mkbusy/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mkbusy/mkbusy.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mkfile/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mkfile/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mkfile/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mkfile/mkfile.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mkfiles/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mkfiles/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mkfiles/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mkfiles/mkfiles.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mktree/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mktree/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mktree/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mktree/mktree.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mmap_exec/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mmap_exec/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mmap_exec/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mmap_exec/mmap_exec.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mmap_libaio/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mmap_libaio/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mmap_libaio/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mmap_libaio/mmap_libaio.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mmapwrite/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mmapwrite/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mmapwrite/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/mmapwrite/mmapwrite.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/nvlist_to_lua/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/nvlist_to_lua/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/nvlist_to_lua/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/nvlist_to_lua/nvlist_to_lua.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/randfree_file/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/randfree_file/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/randfree_file/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/randfree_file/randfree_file.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/randwritecomp/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/randwritecomp/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/randwritecomp/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/randwritecomp/randwritecomp.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/readmmap/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/readmmap/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/readmmap/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/readmmap/readmmap.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/rename_dir/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/rename_dir/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/rename_dir/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/rename_dir/rename_dir.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/rm_lnkcnt_zero_file/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/rm_lnkcnt_zero_file/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/rm_lnkcnt_zero_file/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/rm_lnkcnt_zero_file/rm_lnkcnt_zero_file.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/stride_dd/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/stride_dd/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/stride_dd/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/stride_dd/stride_dd.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/threadsappend/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/threadsappend/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/threadsappend/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/threadsappend/threadsappend.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/user_ns_exec/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/user_ns_exec/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/user_ns_exec/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/user_ns_exec/user_ns_exec.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/xattrtest/ vendor-sys/openzfs/dist/tests/zfs-tests/cmd/xattrtest/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/cmd/xattrtest/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/cmd/xattrtest/xattrtest.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/include/ vendor-sys/openzfs/dist/tests/zfs-tests/include/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/include/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/include/blkdev.shlib vendor-sys/openzfs/dist/tests/zfs-tests/include/commands.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/include/default.cfg.in (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/include/libtest.shlib vendor-sys/openzfs/dist/tests/zfs-tests/include/math.shlib vendor-sys/openzfs/dist/tests/zfs-tests/include/properties.shlib vendor-sys/openzfs/dist/tests/zfs-tests/include/tunables.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/include/zpool_script.shlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/acl/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/acl/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/acl/acl.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/acl/acl_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/acl/posix/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/acl/posix/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/acl/posix/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/acl/posix/posix_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/acl/posix/posix_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/acl/posix/posix_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/acl/posix/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class_010_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class_011_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class_012_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/alloc_class_013_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/alloc_class/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/arc/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/arc/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/arc/arcstats_runtime_tuning.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/arc/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/arc/dbufstats_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/arc/dbufstats_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/arc/dbufstats_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/arc/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/atime/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/atime/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/atime/atime.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/atime/atime_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/atime/atime_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/atime/atime_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/atime/atime_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/atime/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/atime/root_atime_off.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/atime/root_atime_on.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/atime/root_relatime_on.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/atime/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/bootfs/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/bootfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/bootfs/bootfs_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/bootfs/bootfs_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/bootfs/bootfs_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/bootfs/bootfs_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/bootfs/bootfs_005_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/bootfs/bootfs_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/bootfs/bootfs_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/bootfs/bootfs_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/bootfs/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/bootfs/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/btree/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/btree/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/btree/btree_negative.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/btree/btree_positive.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cache.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cache.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cache_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cache_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cache_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cache_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cache_005_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cache_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cache_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cache_008_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cache_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cache_010_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cache_011_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cache_012_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cache/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cachefile/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cachefile/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cachefile/cachefile.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cachefile/cachefile.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cachefile/cachefile_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cachefile/cachefile_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cachefile/cachefile_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cachefile/cachefile_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cachefile/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cachefile/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/case_all_values.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/casenorm.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/casenorm.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/insensitive_formd_delete.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/insensitive_formd_lookup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/insensitive_none_delete.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/insensitive_none_lookup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/mixed_create_failure.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/mixed_formd_delete.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/mixed_formd_lookup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/mixed_formd_lookup_ci.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/mixed_none_delete.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/mixed_none_lookup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/mixed_none_lookup_ci.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/norm_all_values.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/sensitive_formd_delete.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/sensitive_formd_lookup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/sensitive_none_delete.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/sensitive_none_lookup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/casenorm/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/channel_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.args_to_lua.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.args_to_lua.out vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.args_to_lua.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.divide_by_zero.err vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.divide_by_zero.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.divide_by_zero.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.exists.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.exists.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.integer_illegal.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.integer_overflow.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.language_functions_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.language_functions_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.large_prog.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.large_prog.out vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.large_prog.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.lib_base.lua (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.lib_coroutine.lua (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.lib_strings.lua (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.lib_table.lua (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.libraries.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.memory_limit.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.nested_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.nested_neg.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.nested_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.nested_pos.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.nvlist_to_lua.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.recursive.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.recursive_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.recursive_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.return_large.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.return_large.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.return_nvlist_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.return_nvlist_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.return_recursive_table.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.return_recursive_table.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.stack_gsub.err vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.stack_gsub.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.stack_gsub.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.timeout.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.timeout.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.bookmark.copy.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.bookmark.copy.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.bookmark.create.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.bookmark.create.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.destroy_fs.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.destroy_snap.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_count_and_limit.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_index_props.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_index_props.out vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_index_props.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_mountpoint.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_number_props.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_number_props.out vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_number_props.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_string_props.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_string_props.out vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_string_props.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_type.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_userquota.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_written.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.inherit.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.list_bookmarks.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.list_children.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.list_clones.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.list_holds.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.list_snapshots.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.list_system_props.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.list_user_props.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.parse_args_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.promote_conflict.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.promote_conflict.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.promote_multiple.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.promote_simple.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.rollback_mult.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.rollback_one.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.set_props.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.set_props.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.snapshot_destroy.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.snapshot_destroy.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.snapshot_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.snapshot_neg.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.snapshot_recursive.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.snapshot_recursive.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.snapshot_simple.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.snapshot_simple.zcp vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.terminate_by_signal.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/chattr/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/chattr/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/chattr/chattr_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/chattr/chattr_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/chattr/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/chattr/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/checksum/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/checksum/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/checksum/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/checksum/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/checksum/default.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/checksum/edonr_test.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/checksum/filetest_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/checksum/run_edonr_test.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/checksum/run_sha2_test.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/checksum/run_skein_test.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/checksum/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/checksum/sha2_test.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/checksum/skein_test.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/clean_mirror/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/clean_mirror/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/clean_mirror/clean_mirror_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/clean_mirror/clean_mirror_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/clean_mirror/clean_mirror_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/clean_mirror/clean_mirror_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/clean_mirror/clean_mirror_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/clean_mirror/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/clean_mirror/default.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/clean_mirror/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/cli_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_args_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_args_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_block_size_histogram.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_checksum.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_decompress.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_decompress_zstd.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_display_block.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_object_range_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_object_range_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_objset_id.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_bookmark/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_bookmark/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_bookmark/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_bookmark/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_bookmark/zfs_bookmark_cliargs.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_child.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_clones.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_format.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_inherit.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_load.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_location.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_pbkdf2iters.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_008_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_009_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_010_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_deeply_nested.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_encrypted.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_rm_nested.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_copies/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_copies/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_copies/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_copies/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_copies/zfs_copies.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_copies/zfs_copies.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_copies/zfs_copies_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_copies/zfs_copies_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_copies/zfs_copies_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_copies/zfs_copies_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_copies/zfs_copies_005_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_copies/zfs_copies_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/properties.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_008_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_009_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_010_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_011_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_012_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_013_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_014_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_crypt_combos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_dryrun.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_encrypted.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_verbose.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_clone_livelist_condense_and_disable.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_clone_livelist_condense_races.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_005_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_006_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_010_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_011_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_012_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_013_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_014_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_015_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_016_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_clone_livelist.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_dev_removal.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_dev_removal_condense.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_diff/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_diff/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_diff/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_diff/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_diff/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_diff/socket.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_diff/zfs_diff_changes.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_diff/zfs_diff_cliargs.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_diff/zfs_diff_encrypted.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_diff/zfs_diff_timestamp.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_diff/zfs_diff_types.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/zfs_get_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/zfs_get_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/zfs_get_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/zfs_get_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/zfs_get_005_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/zfs_get_006_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/zfs_get_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/zfs_get_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/zfs_get_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/zfs_get_010_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/zfs_get_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_get/zfs_get_list_d.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_ids_to_path/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_ids_to_path/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_ids_to_path/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_ids_to_path/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_ids_to_path/zfs_ids_to_path_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_inherit/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_inherit/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_inherit/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_inherit/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_inherit/zfs_inherit_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_inherit/zfs_inherit_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_inherit/zfs_inherit_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_inherit/zfs_inherit_mountpoint.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_jail/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_jail/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_jail/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_jail/jail.conf (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_jail/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_jail/zfs_jail_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_all.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_file.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_location.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_noop.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_recursive.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_009_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_010_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_011_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_012_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_all_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_all_fail.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_all_mountpoints.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_encrypted.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_remount.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_test_race.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_multi_mount.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_program/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_program/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_program/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_program/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_program/zfs_program_json.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_promote/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_promote/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_promote/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_promote/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_promote/zfs_promote.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_promote/zfs_promote_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_promote/zfs_promote_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_promote/zfs_promote_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_promote/zfs_promote_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_promote/zfs_promote_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_promote/zfs_promote_006_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_promote/zfs_promote_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_promote/zfs_promote_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_promote/zfs_promote_encryptionroot.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_property/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_property/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_property/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_property/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_property/zfs_written_property_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/receive-o-x_props_override.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_-e.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_005_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_009_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_010_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_011_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_012_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_013_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_014_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_015_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_016_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_from_encrypted.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_from_zstd.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_raw.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_raw_-d.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_raw_incremental.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_to_encrypted.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zstd_test_data.txt (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_005_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_009_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_010_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_011_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_012_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_013_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_014_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_encrypted_child.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_mountpoint.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rename/zfs_rename_to_encrypted.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_reservation/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_reservation/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_reservation/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_reservation/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_reservation/zfs_reservation_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_reservation/zfs_reservation_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rollback/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rollback/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rollback/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rollback/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rollback/zfs_rollback.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rollback/zfs_rollback_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rollback/zfs_rollback_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rollback/zfs_rollback_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rollback/zfs_rollback_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_rollback/zfs_rollback_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send-b.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_encrypted.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_encrypted_unloaded.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_raw.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_sparse.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/cache_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/cache_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/canmount_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/canmount_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/canmount_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/canmount_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/checksum_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/compression_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/mountpoint_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/mountpoint_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/mountpoint_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/onoffs_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/property_alias_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/readonly_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/reservation_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/ro_props_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/share_mount_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/snapdir_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/user_property_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/user_property_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/user_property_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/user_property_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/version_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_feature_activation.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_set/zfs_set_keylocation.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_008_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_009_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_010_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_011_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_012_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_concurrent_shares.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot_005_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot_008_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/zfeature_set_unsupported.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/zfs_get_unsupported.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/zfs_set_unsupported.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/zfs_sysfs_live.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/zpool_get_unsupported.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/zpool_set_unsupported.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unload-key/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unload-key/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unload-key/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unload-key/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unload-key/zfs_unload-key.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unload-key/zfs_unload-key_all.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unload-key/zfs_unload-key_recursive.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_008_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_all_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_nested.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_unload_keys.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unshare/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unshare/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unshare/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unshare/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unshare/zfs_unshare_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unshare/zfs_unshare_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unshare/zfs_unshare_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unshare/zfs_unshare_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unshare/zfs_unshare_005_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unshare/zfs_unshare_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_unshare/zfs_unshare_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_006_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_wait/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_wait/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_wait/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_wait/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_wait/zfs_wait.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_wait/zfs_wait_deleteq.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool/zpool_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool/zpool_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool/zpool_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool/zpool_colors.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/add-o_ashift.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/add_nested_replacing_spare.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/add_prop_ashift.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_008_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_009_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_010_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_attach/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_attach/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_attach/attach-o_ashift.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_attach/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_attach/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_attach/zpool_attach_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_clear/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_clear/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_clear/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_clear/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_clear/zpool_clear.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_clear/zpool_clear_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_clear/zpool_clear_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_clear/zpool_clear_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_clear/zpool_clear_readonly.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/create-o_ashift.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create.shlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_009_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_010_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_011_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_012_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_014_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_015_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_016_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_017_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_018_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_019_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_020_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_021_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_022_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_023_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_024_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_crypt_combos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_encrypted.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_tempname.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_detach/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_detach/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_detach/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_detach/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_detach/zpool_detach_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_events/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_events/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_events/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_events/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_clear.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_cliargs.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_errors.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_follow.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_poolname.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_expand/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_expand/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_expand/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_expand/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_export/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_export/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_export/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_export/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_get/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_get/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_get/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_get/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get_parsable.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_history/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_history/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_history/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_history/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_history/zpool_history_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_history/zpool_history_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/blockfiles/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/blockfiles/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/blockfiles/cryptv0.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/blockfiles/missing_ivset.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/blockfiles/unclean_export.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_device_added.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_device_removed.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_device_replaced.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_mirror_attached.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_mirror_detached.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_shared_device.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_devices_missing.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_paths_changed.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_rewind_config_changed.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_rewind_device_replaced.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_009_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_010_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_011_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_012_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_013_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_014_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_015_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_all_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_encrypted.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_encrypted_load.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_errata3.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_errata4.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_features_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_features_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_features_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_missing_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_missing_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_missing_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_rename_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_attach_detach_add_remove.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_import_export.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_offline_export_import_online.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_online_offline.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_split.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_start_and_cancel_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_start_and_cancel_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_suspend_resume.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_unsupported_vdevs.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_verify_checksums.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_verify_initialized.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_labelclear/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_labelclear/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_labelclear/labelclear.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_labelclear/zpool_labelclear_active.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_labelclear/zpool_labelclear_exported.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_labelclear/zpool_labelclear_removed.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_labelclear/zpool_labelclear_valid.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_offline/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_offline/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_offline/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_offline/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_offline/zpool_offline_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_offline/zpool_offline_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_offline/zpool_offline_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_online/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_online/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_online/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_online/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_online/zpool_online_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_online/zpool_online_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_remove/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_remove/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_remove/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_remove/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_remove/zpool_remove.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_remove/zpool_remove_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_remove/zpool_remove_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_remove/zpool_remove_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen.shlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen_006_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_replace/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_replace/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_replace/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_replace/replace-o_ashift.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_replace/replace_prop_ashift.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_replace/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_replace/zpool_replace_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_resilver/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_resilver/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_resilver/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_resilver/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_resilver/zpool_resilver.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_resilver/zpool_resilver_bad_args.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_resilver/zpool_resilver_restart.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_encrypted_unloaded.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_multiple_copies.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_offline_device.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_print_repairing.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_set/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_set/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_set/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_set/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_set/zpool_set_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_set/zpool_set_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_set/zpool_set_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_set/zpool_set_ashift.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_set/zpool_set_features.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_split/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_split/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_split/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_split/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_cliargs.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_devices.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_encryption.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_indirect.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_props.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_resilver.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_vdevs.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_wholedisk.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_status/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_status/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_status/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_status/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_sync/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_sync/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_sync/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_sync/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_sync/zpool_sync_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_sync/zpool_sync_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_attach_detach_add_remove.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_import_export.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_multiple.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_offline_export_import_online.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_online_offline.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_partial.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_rate.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_rate_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_secure.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_split.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_start_and_cancel_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_start_and_cancel_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_suspend_resume.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_unsupported_vdevs.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_verify_checksums.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_verify_trimmed.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-broken-mirror1.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-broken-mirror2.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v1.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v10.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v11.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v12.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v13.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v14.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v15.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v1mirror1.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v1mirror2.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v1mirror3.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v1raidz1.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v1raidz2.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v1raidz3.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v1stripe1.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v1stripe2.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v1stripe3.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v2.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v2mirror1.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v2mirror2.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v2mirror3.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v2raidz1.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v2raidz2.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v2raidz3.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v2stripe1.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v2stripe2.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v2stripe3.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3hotspare1.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3hotspare2.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3hotspare3.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3mirror1.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3mirror2.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3mirror3.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3raidz1.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3raidz2.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3raidz21.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3raidz22.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3raidz23.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3raidz3.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3stripe1.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3stripe2.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v3stripe3.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v4.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v5.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v6.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v7.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v8.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v9.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v999.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-vBROKEN.dat.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade_005_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade_006_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade_009_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/scan/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/scan/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/scan/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/scan/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/scan/zpool_wait_rebuild.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/scan/zpool_wait_replace.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/scan/zpool_wait_replace_cancel.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/scan/zpool_wait_resilver.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/scan/zpool_wait_scrub_basic.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/scan/zpool_wait_scrub_cancel.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/scan/zpool_wait_scrub_flag.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait_discard.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait_freeing.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait_initialize_basic.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait_initialize_cancel.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait_initialize_flag.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait_multiple.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait_no_activity.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait_remove.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait_remove_cancel.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait_trim_basic.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait_trim_cancel.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait_trim_flag.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait_usage.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/arc_summary_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/arc_summary_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/arcstat_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/misc.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zdb_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_allow_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_clone_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_create_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_destroy_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_get_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_inherit_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_mount_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_promote_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_receive_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_rename_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_rollback_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_send_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_set_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_share_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_snapshot_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_unallow_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_unmount_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_unshare_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zfs_upgrade_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_add_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_attach_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_clear_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_create_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_destroy_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_detach_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_export_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_get_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_history_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_import_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_import_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_offline_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_online_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_remove_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_replace_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_scrub_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_set_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_status_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_upgrade_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/misc/zpool_wait_privilege.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zfs_list/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zfs_list/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zfs_list/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zfs_list/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zfs_list/zfs_list.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zfs_list/zfs_list.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zfs_list/zfs_list_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zfs_list/zfs_list_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zfs_list/zfs_list_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zfs_list/zfs_list_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zfs_list/zfs_list_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zfs_list/zfs_list_008_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_iostat/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_iostat/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_iostat/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_iostat/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_iostat/zpool_iostat_-c_disable.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_iostat/zpool_iostat_-c_homedir.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_iostat/zpool_iostat_-c_searchpath.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_iostat/zpool_iostat_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_iostat/zpool_iostat_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_iostat/zpool_iostat_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_iostat/zpool_iostat_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_iostat/zpool_iostat_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_list/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_list/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_list/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_list/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_list/zpool_list_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_list/zpool_list_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_status/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_status/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_status/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_status/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_status/zpool_status_-c_disable.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_status/zpool_status_-c_homedir.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_status/zpool_status_-c_searchpath.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_user/zpool_status/zpool_status_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/compression/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/compression/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/compression/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/compression/compress.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/compression/compress_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/compression/compress_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/compression/compress_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/compression/compress_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/compression/l2arc_compressed_arc.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/compression/l2arc_compressed_arc_disabled.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/compression/l2arc_encrypted.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/compression/l2arc_encrypted_no_compressed_arc.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/compression/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cp_files/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cp_files/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cp_files/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cp_files/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cp_files/cp_files.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cp_files/cp_files_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cp_files/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/ctime/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/ctime/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/ctime/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/ctime/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/ctime/ctime.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/ctime/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/deadman/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/deadman/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/deadman/deadman.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/deadman/deadman_sync.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/deadman/deadman_zio.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/delegate.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/delegate_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_allow_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_allow_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_allow_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_allow_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_allow_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_allow_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_allow_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_allow_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_allow_009_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_allow_010_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_allow_011_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_allow_012_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_unallow_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_unallow_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_unallow_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_unallow_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_unallow_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_unallow_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_unallow_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/delegate/zfs_unallow_008_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/devices/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/devices/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/devices/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/devices/devices.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/devices/devices_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/devices/devices_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/devices/devices_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/devices/devices_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/devices/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/events/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/events/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/events/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/events/events.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/events/events_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/events/events_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/events/events_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/events/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/events/zed_rc_filter.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/exec/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/exec/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/exec/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/exec/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/exec/exec_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/exec/exec_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/exec/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fallocate/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fallocate/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fallocate/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fallocate/fallocate_prealloc.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fallocate/fallocate_punch-hole.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fallocate/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/auto_offline_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/auto_online_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/auto_replace_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/auto_spare_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/auto_spare_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/auto_spare_ashift.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/auto_spare_multiple.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/auto_spare_shared.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/decompress_fault.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/decrypt_fault.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/fault.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/scrub_after_resilver.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/fault/zpool_status_-s.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/async_destroy/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/async_destroy/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/async_destroy/async_destroy_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/async_destroy/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/async_destroy/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/large_dnode/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/large_dnode/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/large_dnode/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/large_dnode/large_dnode_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/large_dnode/large_dnode_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/large_dnode/large_dnode_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/large_dnode/large_dnode_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/large_dnode/large_dnode_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/large_dnode/large_dnode_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/large_dnode/large_dnode_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/large_dnode/large_dnode_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/large_dnode/large_dnode_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/features/large_dnode/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/grow/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/grow/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/grow/grow.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/grow/grow_pool_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/grow/grow_replicas_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/history.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/history_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/history_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/history_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/history_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/history_005_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/history_006_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/history_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/history_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/history_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/history_010_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/history_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/i386.migratedpool.DAT.Z (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/i386.orig_history.txt (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/sparc.migratedpool.DAT.Z (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/sparc.orig_history.txt (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/history/zfs-pool-v4.dat.Z (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/hkdf/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/hkdf/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/hkdf/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/hkdf/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/hkdf/hkdf_test.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/hkdf/run_hkdf_test.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/hkdf/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/README.config vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/README.state vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config001.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config002.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config003.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config004.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config005.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config006.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config007.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config008.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config009.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config010.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config011.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config012.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config013.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config014.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config015.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config016.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config017.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config018.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config019.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config020.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config021.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config022.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config023.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/config024.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/inherit.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/inherit_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state001.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state002.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state003.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state004.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state005.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state006.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state007.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state008.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state009.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state010.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state011.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state012.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state013.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state014.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state015.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state016.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state017.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state018.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state019.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state020.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state021.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state022.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state023.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inheritance/state024.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inuse/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inuse/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inuse/inuse.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inuse/inuse_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inuse/inuse_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inuse/inuse_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inuse/inuse_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inuse/inuse_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inuse/inuse_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inuse/inuse_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inuse/inuse_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/inuse/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/io/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/io/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/io/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/io/io.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/io/libaio.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/io/mmap.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/io/posixaio.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/io/psync.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/io/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/io/sync.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/large_files/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/large_files/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/large_files/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/large_files/large_files_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/large_files/large_files_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/large_files/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/largest_pool/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/largest_pool/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/largest_pool/largest_pool.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/largest_pool/largest_pool_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/libzfs/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/libzfs/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/libzfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/libzfs/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/libzfs/libzfs_input.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/libzfs/many_fds.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/libzfs/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/limits/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/limits/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/limits/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/limits/filesystem_count.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/limits/filesystem_limit.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/limits/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/limits/snapshot_count.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/limits/snapshot_limit.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/link_count/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/link_count/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/link_count/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/link_count/link_count_001.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/link_count/link_count_root_inode.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/link_count/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/log_spacemap/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/log_spacemap/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/log_spacemap/log_spacemap_import_logs.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/migration.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/migration.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/migration_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/migration_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/migration_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/migration_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/migration_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/migration_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/migration_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/migration_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/migration_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/migration_010_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/migration_011_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/migration_012_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/migration/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmap/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmap/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmap/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmap/mmap.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmap/mmap_libaio_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmap/mmap_read_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmap/mmap_write_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmap/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/mmp.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/mmp.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/mmp_active_import.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/mmp_exported_import.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/mmp_hostid.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/mmp_inactive_import.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/mmp_interval.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/mmp_on_off.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/mmp_on_thread.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/mmp_on_uberblocks.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/mmp_on_zdb.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/mmp_reset_interval.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/mmp_write_distribution.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/mmp_write_uberblocks.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/multihost_history.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mmp/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mount/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mount/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mount/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mount/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mount/umount_001.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mount/umount_unlinked_drain.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mount/umountall_001.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mv_files/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mv_files/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mv_files/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mv_files/mv_files.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mv_files/mv_files_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mv_files/mv_files_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mv_files/mv_files_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mv_files/random_creation.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/mv_files/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nestedfs/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nestedfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nestedfs/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nestedfs/nestedfs_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nestedfs/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/no_space/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/no_space/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/no_space/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/no_space/enospc.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/no_space/enospc_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/no_space/enospc_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/no_space/enospc_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/no_space/enospc_df.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/no_space/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nopwrite/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nopwrite/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nopwrite/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nopwrite/nopwrite.shlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nopwrite/nopwrite_copies.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nopwrite/nopwrite_mtime.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nopwrite/nopwrite_negative.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nopwrite/nopwrite_promoted_clone.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nopwrite/nopwrite_recsize.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nopwrite/nopwrite_sync.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nopwrite/nopwrite_varying_compression.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nopwrite/nopwrite_volume.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/nopwrite/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/online_offline/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/online_offline/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/online_offline/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/online_offline/online_offline.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/online_offline/online_offline_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/online_offline/online_offline_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/online_offline/online_offline_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/online_offline/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pam/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pam/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pam/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pam/pam_basic.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pam/pam_nounmount.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pam/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pam/utilities.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/persist_l2arc/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/persist_l2arc/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/persist_l2arc/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/persist_l2arc/persist_l2arc.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/persist_l2arc/persist_l2arc_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/persist_l2arc/persist_l2arc_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/persist_l2arc/persist_l2arc_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/persist_l2arc/persist_l2arc_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/persist_l2arc/persist_l2arc_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/persist_l2arc/persist_l2arc_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/persist_l2arc/persist_l2arc_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/persist_l2arc/persist_l2arc_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/persist_l2arc/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_after_rewind.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_big_rewind.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_capacity.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_conf_change.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_discard.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_discard_busy.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_discard_many.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_indirect.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_invalid.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_lun_expsz.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_open.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_removal.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_rewind.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_ro_rewind.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_sm_scale.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_twice.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_vdev_add.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_zdb.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_zhack_feat.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/pool_checkpoint.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_checkpoint/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_names/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_names/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_names/pool_names_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pool_names/pool_names_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/poolversion/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/poolversion/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/poolversion/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/poolversion/poolversion_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/poolversion/poolversion_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/poolversion/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/privilege/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/privilege/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/privilege/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/privilege/privilege_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/privilege/privilege_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/privilege/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/procfs/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/procfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/procfs/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/procfs/pool_state.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/procfs/procfs_list_basic.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/procfs/procfs_list_concurrent_readers.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/procfs/procfs_list_stale_read.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/procfs/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectid_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectid_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectid_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectquota.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectquota_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectquota_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectquota_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectquota_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectquota_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectquota_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectquota_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectquota_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectquota_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectquota_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectspace_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectspace_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectspace_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projectspace_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projecttree_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projecttree_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/projecttree_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/projectquota/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pyzfs/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pyzfs/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pyzfs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/pyzfs/pyzfs_unittest.ksh.in (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/quota/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/quota/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/quota/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/quota/quota.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/quota/quota.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/quota/quota_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/quota/quota_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/quota/quota_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/quota/quota_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/quota/quota_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/quota/quota_006_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/quota/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/raidz/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/raidz/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/raidz/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/raidz/raidz_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/raidz/raidz_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/raidz/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_compressed.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_contents.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_deleted.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_disabled_feature.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_embedded.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_holes.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_incrementals.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_largeblocks.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_many_clones.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_mixed_recsize.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_mounts.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_negative.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_origin.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_props.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_resume.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_size.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/redacted_volume.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redacted_send/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redundancy/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redundancy/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redundancy/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redundancy/redundancy.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redundancy/redundancy.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redundancy/redundancy_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redundancy/redundancy_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redundancy/redundancy_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redundancy/redundancy_004_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/redundancy/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refquota/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refquota/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refquota/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refquota/refquota_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refquota/refquota_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refquota/refquota_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refquota/refquota_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refquota/refquota_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refquota/refquota_006_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refquota/refquota_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refquota/refquota_008_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refquota/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refreserv/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refreserv/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refreserv/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refreserv/refreserv.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refreserv/refreserv_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refreserv/refreserv_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refreserv/refreserv_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refreserv/refreserv_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refreserv/refreserv_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refreserv/refreserv_multi_raidz.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refreserv/refreserv_raidz.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/refreserv/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_all_vdev.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_cancel.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_check_space.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_condense_export.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_multiple_indirection.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_nopwrite.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_remap_deadlists.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_reservation.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_resume_export.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_sanity.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_with_add.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_with_create_fs.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_with_dedup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_with_errors.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_with_export.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_with_faulted.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_with_ganging.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_with_remove.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_with_scrub.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_with_send.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_with_send_recv.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_with_snapshot.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_with_write.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/removal_with_zdb.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/remove_expanded.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/remove_indirect.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/remove_mirror.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/remove_mirror_sanity.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/removal/remove_raidz.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rename_dirs/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rename_dirs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rename_dirs/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rename_dirs/rename_dirs_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rename_dirs/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/attach_import.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/attach_multiple.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/attach_rebuild.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/attach_resilver.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/detach.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/rebuild_disabled_feature.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/rebuild_multiple.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/rebuild_raidz.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/replace_import.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/replace_rebuild.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/replace_resilver.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/replacement.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/resilver_restart_001.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/resilver_restart_002.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/scrub_cancel.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/replacement/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation.shlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_010_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_011_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_012_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_013_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_014_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_015_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_016_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_017_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_018_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_019_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_020_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_021_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/reservation_022_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/reservation/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rootpool/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rootpool/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rootpool/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rootpool/rootpool_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rootpool/rootpool_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rootpool/rootpool_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rootpool/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/dedup.zsend.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/dedup_encrypted_zvol.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/dedup_encrypted_zvol.zsend.bz2 (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/fs.tar.gz (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/recv_dedup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/recv_dedup_encrypted_zvol.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_010_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_011_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_013_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_014_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_016_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_019_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_020_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_021_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_022_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-L_toggle.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-c_embedded_blocks.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-c_incremental.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-c_lz4_disabled.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-c_mixed_compression.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-c_props.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-c_recv_dedup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-c_recv_lz4_disabled.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-c_resume.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-c_stream_size_estimate.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-c_verify_contents.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-c_verify_ratio.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-c_volume.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-c_zstreamdump.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-cpL_varied_recsize.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send-wR_encrypted_zvol.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send_encrypted_files.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send_encrypted_hierarchy.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send_encrypted_props.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send_encrypted_truncated_files.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send_freeobjects.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send_holds.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send_hole_birth.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send_mixed_raw.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send_partial_dataset.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send_realloc_dnode_size.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send_realloc_encrypted_files.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send_realloc_files.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/send_spill_block.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/rsend/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/scrub_mirror/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/scrub_mirror/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/scrub_mirror/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/scrub_mirror/default.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/scrub_mirror/scrub_mirror_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/scrub_mirror/scrub_mirror_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/scrub_mirror/scrub_mirror_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/scrub_mirror/scrub_mirror_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/scrub_mirror/scrub_mirror_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/scrub_mirror/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_008_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_009_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_010_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_011_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_012_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_013_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_014_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_015_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_replay_fs_001.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_replay_fs_002.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/slog/slog_replay_volume.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/clone_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/rollback_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/rollback_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/rollback_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_010_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_011_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_012_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_013_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_014_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_015_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_016_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapshot/snapshot_017_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapused/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapused/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapused/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapused/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapused/snapused.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapused/snapused_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapused/snapused_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapused/snapused_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapused/snapused_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/snapused/snapused_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/sparse/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/sparse/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/sparse/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/sparse/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/sparse/sparse.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/sparse/sparse_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/suid/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/suid/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/suid/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/suid/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/suid/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/suid/suid_write_to_file.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/suid/suid_write_to_none.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/suid/suid_write_to_sgid.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/suid/suid_write_to_suid.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/suid/suid_write_to_suid_sgid.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/threadsappend/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/threadsappend/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/threadsappend/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/threadsappend/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/threadsappend/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/threadsappend/threadsappend_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/tmpfile/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/tmpfile/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/tmpfile/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/tmpfile/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/tmpfile/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/tmpfile/tmpfile_001_pos.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/tmpfile/tmpfile_002_pos.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/tmpfile/tmpfile_003_pos.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/tmpfile/tmpfile_stat_mode.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/tmpfile/tmpfile_test.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/trim/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/trim/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/trim/autotrim_config.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/trim/autotrim_integrity.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/trim/autotrim_trim_integrity.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/trim/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/trim/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/trim/trim.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/trim/trim.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/trim/trim_config.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/trim/trim_integrity.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/trim/trim_l2arc.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/truncate/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/truncate/.gitignore vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/truncate/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/truncate/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/truncate/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/truncate/truncate.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/truncate/truncate_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/truncate/truncate_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/truncate/truncate_test.c (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/truncate/truncate_timestamps.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/upgrade/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/upgrade/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/upgrade/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/upgrade/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/upgrade/upgrade_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/upgrade/upgrade_projectquota_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/upgrade/upgrade_readonly_pool.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/upgrade/upgrade_userobj_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/user_namespace/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/user_namespace/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/user_namespace/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/user_namespace/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/user_namespace/user_namespace.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/user_namespace/user_namespace_001.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/user_namespace/user_namespace_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/groupspace_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/groupspace_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/groupspace_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota_005_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota_009_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota_010_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota_011_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota_012_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota_013_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userquota_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userspace_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userspace_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/userquota/userspace_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/vdev_zaps/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/vdev_zaps/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/vdev_zaps/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/vdev_zaps/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/vdev_zaps/vdev_zaps.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/vdev_zaps/vdev_zaps_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/vdev_zaps/vdev_zaps_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/vdev_zaps/vdev_zaps_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/vdev_zaps/vdev_zaps_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/vdev_zaps/vdev_zaps_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/vdev_zaps/vdev_zaps_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/vdev_zaps/vdev_zaps_007_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/write_dirs/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/write_dirs/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/write_dirs/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/write_dirs/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/write_dirs/write_dirs_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/write_dirs/write_dirs_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr_002_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr_007_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr_008_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr_009_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr_010_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr_011_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr_012_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr_013_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/xattr/xattr_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/zvol_ENOSPC.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/zvol_ENOSPC_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_cli/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_cli/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_cli/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_cli/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_cli/zvol_cli.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_cli/zvol_cli_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_cli/zvol_cli_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_cli/zvol_cli_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_common.shlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_001_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_003_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_005_neg.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_hierarchy.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_rename_inuse.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_snapdev.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_volmode.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_zil.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_swap/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_swap/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_swap/cleanup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_swap/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_swap/zvol_swap.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_swap/zvol_swap_001_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_swap/zvol_swap_002_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_swap/zvol_swap_003_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_swap/zvol_swap_004_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_swap/zvol_swap_005_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/zvol/zvol_swap/zvol_swap_006_pos.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/fio/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/fio/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/fio/mkfiles.fio vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/fio/random_reads.fio vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/fio/random_readwrite.fio vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/fio/random_readwrite_fixed.fio vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/fio/random_writes.fio vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/fio/sequential_reads.fio vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/fio/sequential_readwrite.fio vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/fio/sequential_writes.fio vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/nfs-sample.cfg (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/perf.shlib vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/regression/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/regression/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/regression/random_reads.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/regression/random_readwrite.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/regression/random_readwrite_fixed.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/regression/random_writes.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/regression/random_writes_zil.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/regression/sequential_reads.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/regression/sequential_reads_arc_cached.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/regression/sequential_reads_arc_cached_clone.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/regression/sequential_reads_dbuf_cached.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/regression/sequential_writes.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/regression/setup.ksh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/scripts/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/scripts/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/perf/scripts/prefetch_io.sh (contents, props changed) vendor-sys/openzfs/dist/tests/zfs-tests/tests/stress/ vendor-sys/openzfs/dist/tests/zfs-tests/tests/stress/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/udev/ vendor-sys/openzfs/dist/udev/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/udev/rules.d/ vendor-sys/openzfs/dist/udev/rules.d/.gitignore vendor-sys/openzfs/dist/udev/rules.d/60-zvol.rules.in (contents, props changed) vendor-sys/openzfs/dist/udev/rules.d/69-vdev.rules.in (contents, props changed) vendor-sys/openzfs/dist/udev/rules.d/90-zfs.rules.in (contents, props changed) vendor-sys/openzfs/dist/udev/rules.d/Makefile.am (contents, props changed) vendor-sys/openzfs/dist/zfs.release.in (contents, props changed) Added: vendor-sys/openzfs/dist/AUTHORS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/openzfs/dist/AUTHORS Mon Aug 24 22:48:19 2020 (r364736) @@ -0,0 +1,308 @@ +MAINTAINERS: + + Brian Behlendorf + Tony Hutter + +PAST MAINTAINERS: + + Ned Bass + +CONTRIBUTORS: + + Aaron Fineman + Adam Leventhal + Adam Stevko + Ahmed G + Akash Ayare + Alan Somers + Alar Aun + Albert Lee + Alec Salazar + Alejandro R. Sedeño + Alek Pinchuk + Alex Braunegg + Alex McWhirter + Alex Reece + Alex Wilson + Alex Zhuravlev + Alexander Eremin + Alexander Motin + Alexander Pyhalov + Alexander Stetsenko + Alexey Shvetsov + Alexey Smirnoff + Allan Jude + AndCycle + Andreas Buschmann + Andreas Dilger + Andrew Barnes + Andrew Hamilton + Andrew Reid + Andrew Stormont + Andrew Tselischev + Andrey Vesnovaty + Andriy Gapon + Andy Bakun + Aniruddha Shankar + Antonio Russo + Arkadiusz BubaÅ‚a + Arne Jansen + Aron Xu + Bart Coddens + Basil Crow + Huang Liu + Ben Allen + Ben Rubson + Benjamin Albrecht + Bill McGonigle + Bill Pijewski + Boris Protopopov + Brad Lewis + Brian Behlendorf + Brian J. Murrell + Caleb James DeLisle + Cao Xuewen + Carlo Landmeter + Carlos Alberto Lopez Perez + Chaoyu Zhang + Chen Can + Chen Haiquan + Chip Parker + Chris Burroughs + Chris Dunlap + Chris Dunlop + Chris Siden + Chris Wedgwood + Chris Williamson + Chris Zubrzycki + Christ Schlacta + Christer Ekholm + Christian Kohlschütter + Christian Neukirchen + Christian Schwarz + Christopher Voltz + Chunwei Chen + Clemens Fruhwirth + Coleman Kane + Colin Ian King + Craig Loomis + Craig Sanders + Cyril Plisko + DHE + Damian WojsÅ‚aw + Dan Kimmel + Dan McDonald + Dan Swartzendruber + Dan Vatca + Daniel Hoffman + Daniel Verite + Daniil Lunev + Darik Horn + Dave Eddy + David Lamparter + David Qian + David Quigley + Debabrata Banerjee + Denys Rtveliashvili + Derek Dai + Dimitri John Ledkov + Dmitry Khasanov + Dominik Hassler + Dominik Honnef + Don Brady + Dr. András Korn + Eli Rosenthal + Eric Desrochers + Eric Dillmann + Eric Schrock + Etienne Dechamps + Evan Susarret + Fabian Grünbichler + Fajar A. Nugraha + Fan Yong + Feng Sun + Frederik Wessels + Frédéric Vanniere + Garrett D'Amore + Garrison Jensen + Gary Mills + Gaurav Kumar + GeLiXin + George Amanakis + George Melikov + George Wilson + Georgy Yakovlev + Giuseppe Di Natale + Gordan Bobic + Gordon Ross + Gregor Kopka + Grischa Zengel + Gunnar Beutner + Gvozden Neskovic + Hajo Möller + Hans Rosenfeld + HÃ¥kan Johansson + Igor Kozhukhov + Igor Lvovsky + Isaac Huang + JK Dingwall + Jacek FefliÅ„ski + James Cowgill + James Lee + James Pan + Jan Engelhardt + Jan Kryl + Jan Sanislo + Jason King + Jason Zaman + Javen Wu + Jeremy Gill + Jeremy Jones + Jerry Jelinek + Jinshan Xiong + Joe Stein + John Albietz + John Eismeier + John L. Hammond + John Layman + John Paul Adrian Glaubitz + John Wren Kennedy + Johnny Stenback + Jorgen Lundman + Josef 'Jeff' Sipek + Joshua M. Clulow + Justin BedÅ‘ + Justin Lecher + Justin T. Gibbs + Jörg Thalheim + KORN Andras + Kamil DomaÅ„ski + Karsten Kretschmer + Kash Pande + Keith M Wesolowski + Kevin Tanguy + KireinaHoro + Kjeld Schouten-Lebbing + Kohsuke Kawaguchi + Kyle Blatter + Kyle Fuller + Loli + Lars Johannsen + Li Dongyang + Li Wei + Lukas Wunner + Madhav Suresh + Manoj Joseph + Manuel Amador (Rudd-O) + Marcel Huber + Marcel Telka + Marcel Wysocki + Mark Shellenbaum + Mark Wright + Martin Matuska + Massimo Maggi + Matt Johnston + Matt Kemp + Matthew Ahrens + Matthew Thode + Matus Kral + Max Grossman + Maximilian Mehnert + Michael Gebetsroither + Michael Kjorling + Michael Martin + Michael Niewöhner + Mike Gerdts + Mike Harsch + Mike Leddy + Mike Swanson + Milan Jurik + Morgan Jones + Moritz Maxeiner + Nathaniel Clark + Nathaniel Wesley Filardo + Nav Ravindranath + Neal Gompa (ニール・ゴンパ) + Ned Bass + Neependra Khare + Neil Stockbridge + Nick Garvey + Nikolay Borisov + Olaf Faaland + Oleg Drokin + Oleg Stepura + Patrik Greco + Paul B. Henson + Paul Dagnelie + Paul Zuchowski + Pavel Boldin + Pavel Zakharov + Pawel Jakub Dawidek + Pedro Giffuni + Peng + Peter Ashford + Prakash Surya + Prasad Joshi + Ralf Ertzinger + Randall Mason + Remy Blank + Ricardo M. Correia + Rich Ercolani + Richard Elling + Richard Laager + Richard Lowe + Richard Sharpe + Richard Yao + Rohan Puri + Romain Dolbeau + Roman Strashkin + Ruben Kerkhof + Saso Kiselkov + Scot W. Stevenson + Sean Eric Fagan + Sebastian Gottschall + Sen Haerens + Serapheim Dimitropoulos + Seth Forshee + Shampavman + Shen Yan + Simon Guest + Simon Klinkert + Sowrabha Gopal + Stanislav Seletskiy + Steffen Müthing + Stephen Blinick + Steve Dougherty + Steven Burgess + Steven Hartland + Steven Johnson + Stian Ellingsen + Suman Chakravartula + Sydney Vanda + Sören Tempel + Thijs Cramer + Tim Chase + Tim Connors + Tim Crawford + Tim Haley + Tobin Harding + Tom Caputi + Tom Matthews + Tom Prince + Tomohiro Kusumi + Tony Hutter + Toomas Soome + Trey Dockendorf + Turbo Fredriksson + Tyler J. Stachecki + Vitaut Bajaryn + Weigang Li + Will Andrews + Will Rouesnel + Wolfgang Bumiller + Xin Li + Ying Zhu + YunQiang Su + Yuri Pankov + Yuxuan Shui + Zachary Bedell Added: vendor-sys/openzfs/dist/CODE_OF_CONDUCT.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/openzfs/dist/CODE_OF_CONDUCT.md Mon Aug 24 22:48:19 2020 (r364736) @@ -0,0 +1,2 @@ +The [OpenZFS Code of Conduct](http://www.open-zfs.org/wiki/Code_of_Conduct) +applies to spaces associated with the ZFS on Linux project, including GitHub. Added: vendor-sys/openzfs/dist/COPYRIGHT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/openzfs/dist/COPYRIGHT Mon Aug 24 22:48:19 2020 (r364736) @@ -0,0 +1,31 @@ +Refer to the git commit log for authoritative copyright attribution. + +The original ZFS source code was obtained from Open Solaris which was +released under the terms of the CDDL open source license. Additional +changes have been included from OpenZFS and the Illumos project which +are similarly licensed. These projects can be found on Github at: + + * https://github.com/illumos/illumos-gate + * https://github.com/openzfs/openzfs + +Unless otherwise noted, all files in this distribution are released +under the Common Development and Distribution License (CDDL). + +Exceptions are noted within the associated source files headers and +by including a THIRDPARTYLICENSE file with the license terms. A few +notable exceptions and their respective licenses include: + + * Skein Checksum Implementation: module/icp/algs/skein/THIRDPARTYLICENSE + * AES Implementation: module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman + * AES Implementation: module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl + * PBKDF2 Implementation: lib/libzfs/THIRDPARTYLICENSE.openssl + * SPL Implementation: module/os/linux/spl/THIRDPARTYLICENSE.gplv2 + * GCM Implementation: module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.cryptogams + * GCM Implementation: module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.openssl + * GHASH Implementation: module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.cryptogams + * GHASH Implementation: module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.openssl + +This product includes software developed by the OpenSSL Project for use +in the OpenSSL Toolkit (http://www.openssl.org/) + +See the LICENSE and NOTICE for more information. Added: vendor-sys/openzfs/dist/LICENSE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/openzfs/dist/LICENSE Mon Aug 24 22:48:19 2020 (r364736) @@ -0,0 +1,384 @@ +Unless otherwise noted, all files in this distribution are released +under the Common Development and Distribution License (CDDL). +Exceptions are noted within the associated source files. + +-------------------------------------------------------------------- + + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE Version 1.0 + +1. Definitions. + + 1.1. "Contributor" means each individual or entity that creates + or contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Software, prior Modifications used by a Contributor (if any), + and the Modifications made by that particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or (b) + Modifications, or (c) the combination of files containing + Original Software with files containing Modifications, in + each case including portions thereof. + + 1.4. "Executable" means the Covered Software in any form other + than Source Code. + + 1.5. "Initial Developer" means the individual or entity that first + makes Original Software available under this License. + + 1.6. "Larger Work" means a work which combines Covered Software or + portions thereof with code not governed by the terms of this + License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed + herein. + + 1.9. "Modifications" means the Source Code and Executable form of + any of the following: + + A. Any file that results from an addition to, deletion from or + modification of the contents of a file containing Original + Software or previous Modifications; + + B. Any new file that contains any part of the Original + Software or previous Modifications; or + + C. Any new file that is contributed or otherwise made + available under the terms of this License. + + 1.10. "Original Software" means the Source Code and Executable + form of computer software code that is originally released + under this License. + + 1.11. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, + process, and apparatus claims, in any patent Licensable by + grantor. + + 1.12. "Source Code" means (a) the common form of computer software + code in which modifications are made and (b) associated + documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms + of, this License. For legal entities, "You" includes any + entity which controls, is controlled by, or is under common + control with You. For purposes of this definition, + "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by + contract or otherwise, or (b) ownership of more than fifty + percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, the Initial + Developer hereby grants You a world-wide, royalty-free, + non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer, to use, + reproduce, modify, display, perform, sublicense and + distribute the Original Software (or portions thereof), + with or without Modifications, and/or as part of a Larger + Work; and + + (b) under Patent Claims infringed by the making, using or + selling of Original Software, to make, have made, use, + practice, sell, and offer for sale, and/or otherwise + dispose of the Original Software (or portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) are + effective on the date Initial Developer first distributes + or otherwise makes the Original Software available to a + third party under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: (1) for code that You delete from the Original + Software, or (2) for infringements caused by: (i) the + modification of the Original Software, or (ii) the + combination of the Original Software with other software + or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, each + Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor to use, reproduce, + modify, display, perform, sublicense and distribute the + Modifications created by such Contributor (or portions + thereof), either on an unmodified basis, with other + Modifications, as Covered Software and/or as part of a + Larger Work; and + + (b) under Patent Claims infringed by the making, using, or + selling of Modifications made by that Contributor either + alone and/or in combination with its Contributor Version + (or portions of such combination), to make, use, sell, + offer for sale, have made, and/or otherwise dispose of: + (1) Modifications made by that Contributor (or portions + thereof); and (2) the combination of Modifications made by + that Contributor with its Contributor Version (or portions + of such combination). + + (c) The licenses granted in Sections 2.2(a) and 2.2(b) are + effective on the date Contributor first distributes or + otherwise makes the Modifications available to a third + party. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: (1) for any code that Contributor has deleted + from the Contributor Version; (2) for infringements caused + by: (i) third party modifications of Contributor Version, + or (ii) the combination of Modifications made by that + Contributor with other software (except as part of the + Contributor Version) or other devices; or (3) under Patent + Claims infringed by Covered Software in the absence of + Modifications made by that Contributor. + +3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make + available in Executable form must also be made available in Source + Code form and that Source Code form must be distributed only under + the terms of this License. You must include a copy of this + License with every copy of the Source Code form of the Covered + Software You distribute or otherwise make available. You must + inform recipients of any such Covered Software in Executable form + as to how they can obtain such Covered Software in Source Code + form in a reasonable manner on or through a medium customarily + used for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You contribute are + governed by the terms of this License. You represent that You + believe Your Modifications are Your original creation(s) and/or + You have sufficient rights to grant the rights conveyed by this + License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications that + identifies You as the Contributor of the Modification. You may + not remove or alter any copyright, patent or trademark notices + contained within the Covered Software, or any notices of licensing + or any descriptive text giving attribution to any Contributor or + the Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered Software in + Source Code form that alters or restricts the applicable version + of this License or the recipients' rights hereunder. You may + choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of + Covered Software. However, you may do so only on Your own behalf, + and not on behalf of the Initial Developer or any Contributor. + You must make it absolutely clear that any such warranty, support, + indemnity or liability obligation is offered by You alone, and You + hereby agree to indemnify the Initial Developer and every + Contributor for any liability incurred by the Initial Developer or + such Contributor as a result of warranty, support, indemnity or + liability terms You offer. + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered Software + under the terms of this License or under the terms of a license of + Your choice, which may contain terms different from this License, + provided that You are in compliance with the terms of this License + and that the license for the Executable form does not attempt to + limit or alter the recipient's rights in the Source Code form from + the rights set forth in this License. If You distribute the + Covered Software in Executable form under a different license, You + must make it absolutely clear that any terms which differ from + this License are offered by You alone, not by the Initial + Developer or Contributor. You hereby agree to indemnify the + Initial Developer and every Contributor for any liability incurred + by the Initial Developer or such Contributor as a result of any + such terms You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software with + other code not governed by the terms of this License and + distribute the Larger Work as a single product. In such a case, + You must make sure the requirements of this License are fulfilled + for the Covered Software. + +4. Versions of the License. + + 4.1. New Versions. + + Sun Microsystems, Inc. is the initial license steward and may + publish revised and/or new versions of this License from time to + time. Each version will be given a distinguishing version number. + Except as provided in Section 4.3, no one other than the license + steward has the right to modify this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise make the + Covered Software available under the terms of the version of the + License under which You originally received the Covered Software. + If the Initial Developer includes a notice in the Original + Software prohibiting it from being distributed or otherwise made + available under any subsequent version of the License, You must + distribute and make the Covered Software available under the terms + of the version of the License under which You originally received + the Covered Software. Otherwise, You may also choose to use, + distribute or otherwise make the Covered Software available under + the terms of any subsequent version of the License published by + the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a new + license for Your Original Software, You may create and use a + modified version of this License if You: (a) rename the license + and remove any references to the name of the license steward + (except to note that the license differs from this License); and + (b) otherwise make it clear that the license contains terms which + differ from this License. + +5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" + BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED + SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR + PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND + PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY + COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE + INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY + NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF + WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS + DISCLAIMER. + +6. TERMINATION. + + 6.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to + cure such breach within 30 days of becoming aware of the breach. + Provisions which, by their nature, must remain in effect beyond + the termination of this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or a + Contributor (the Initial Developer or Contributor against whom You + assert such claim is referred to as "Participant") alleging that + the Participant Software (meaning the Contributor Version where + the Participant is a Contributor or the Original Software where + the Participant is the Initial Developer) directly or indirectly + infringes any patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial Developer (if + the Initial Developer is not the Participant) and all Contributors + under Sections 2.1 and/or 2.2 of this License shall, upon 60 days + notice from Participant terminate prospectively and automatically + at the expiration of such 60 day notice period, unless if within + such 60 day period You withdraw Your claim with respect to the + Participant Software against such Participant either unilaterally + or pursuant to a written agreement with Participant. + + 6.3. In the event of termination under Sections 6.1 or 6.2 above, + all end user licenses that have been validly granted by You or any + distributor hereunder prior to termination (excluding licenses + granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE + LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK + STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL + INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT + APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO + NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR + CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT + APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is + defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial + computer software" (as that term is defined at 48 + C.F.R. 252.227-7014(a)(1)) and "commercial computer software + documentation" as such terms are used in 48 C.F.R. 12.212 + (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 + C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all + U.S. Government End Users acquire Covered Software with only those + rights set forth herein. This U.S. Government Rights clause is in + lieu of, and supersedes, any other FAR, DFAR, or other clause or + provision that addresses Government rights in computer software + under this License. + +9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed + by the law of the jurisdiction specified in a notice contained + within the Original Software (except to the extent applicable law, + if any, provides otherwise), excluding such jurisdiction's + conflict-of-law provisions. Any litigation relating to this + License shall be subject to the jurisdiction of the courts located + in the jurisdiction and venue specified in a notice contained + within the Original Software, with the losing party responsible + for costs, including, without limitation, court costs and + reasonable attorneys' fees and expenses. The application of the + United Nations Convention on Contracts for the International Sale + of Goods is expressly excluded. Any law or regulation which + provides that the language of a contract shall be construed + against the drafter shall not apply to this License. You agree + that You alone are responsible for compliance with the United + States export administration regulations (and the export control + laws and regulation of any other countries) when You use, + distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or + indirectly, out of its utilization of rights under this License + and You agree to work with Initial Developer and Contributors to + distribute such responsibility on an equitable basis. Nothing + herein is intended or shall be deemed to constitute any admission + of liability. + +-------------------------------------------------------------------- + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND +DISTRIBUTION LICENSE (CDDL) + +For Covered Software in this distribution, this License shall +be governed by the laws of the State of California (excluding +conflict-of-law provisions). + +Any litigation relating to this License shall be subject to the +jurisdiction of the Federal Courts of the Northern District of +California and the state courts of the State of California, with +venue lying in Santa Clara County, California. Added: vendor-sys/openzfs/dist/META ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/openzfs/dist/META Mon Aug 24 22:48:19 2020 (r364736) @@ -0,0 +1,10 @@ +Meta: 1 +Name: zfs +Branch: 1.0 +Version: 0.8.0 +Release: 1 +Release-Tags: relext +License: CDDL +Author: OpenZFS on Linux +Linux-Maximum: 5.6 +Linux-Minimum: 3.10 Added: vendor-sys/openzfs/dist/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/openzfs/dist/Makefile.am Mon Aug 24 22:48:19 2020 (r364736) @@ -0,0 +1,256 @@ +ACLOCAL_AMFLAGS = -I config + +SUBDIRS = include +if BUILD_LINUX +SUBDIRS += rpm +endif + +if CONFIG_USER +SUBDIRS += etc man scripts lib tests cmd contrib +if BUILD_LINUX +SUBDIRS += udev +endif +endif +if CONFIG_KERNEL +SUBDIRS += module + +extradir = $(prefix)/src/zfs-$(VERSION) +extra_HEADERS = zfs.release.in zfs_config.h.in + +if BUILD_LINUX +kerneldir = $(prefix)/src/zfs-$(VERSION)/$(LINUX_VERSION) +nodist_kernel_HEADERS = zfs.release zfs_config.h module/$(LINUX_SYMBOLS) +endif +endif + +AUTOMAKE_OPTIONS = foreign +EXTRA_DIST = autogen.sh copy-builtin +EXTRA_DIST += cppcheck-suppressions.txt +EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am +EXTRA_DIST += META AUTHORS COPYRIGHT LICENSE NEWS NOTICE README.md +EXTRA_DIST += CODE_OF_CONDUCT.md +EXTRA_DIST += module/lua/README.zfs module/os/linux/spl/README.md + +# Include all the extra licensing information for modules +EXTRA_DIST += module/icp/algs/skein/THIRDPARTYLICENSE +EXTRA_DIST += module/icp/algs/skein/THIRDPARTYLICENSE.descrip +EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman +EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman.descrip +EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl +EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl.descrip +EXTRA_DIST += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.cryptogams +EXTRA_DIST += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.cryptogams.descrip +EXTRA_DIST += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.openssl +EXTRA_DIST += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.openssl.descrip +EXTRA_DIST += module/os/linux/spl/THIRDPARTYLICENSE.gplv2 +EXTRA_DIST += module/os/linux/spl/THIRDPARTYLICENSE.gplv2.descrip +EXTRA_DIST += module/zfs/THIRDPARTYLICENSE.cityhash +EXTRA_DIST += module/zfs/THIRDPARTYLICENSE.cityhash.descrip + +@CODE_COVERAGE_RULES@ + +GITREV = include/zfs_gitrev.h + +PHONY = gitrev +gitrev: + $(AM_V_GEN)$(top_srcdir)/scripts/make_gitrev.sh $(GITREV) + +all: gitrev + +# Double-colon rules are allowed; there are multiple independent definitions. +maintainer-clean-local:: + -$(RM) $(GITREV) + +distclean-local:: + -$(RM) -R autom4te*.cache build + -find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \ + -o -name .pc -o -name .hg -o -name .git \) -prune -o \ + \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ + -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ + -o -name '.*.rej' -o -size 0 -o -name '*%' -o -name '.*.cmd' \ + -o -name 'core' -o -name 'Makefile' -o -name 'Module.symvers' \ + -o -name '*.order' -o -name '*.markers' -o -name '*.gcda' \ + -o -name '*.gcno' \) \ + -type f -print | xargs $(RM) + +all-local: + -[ -x ${top_builddir}/scripts/zfs-tests.sh ] && \ + ${top_builddir}/scripts/zfs-tests.sh -c + +dist-hook: + $(AM_V_GEN)$(top_srcdir)/scripts/make_gitrev.sh -D $(distdir) $(GITREV) + $(SED) ${ac_inplace} -e 's/Release:[[:print:]]*/Release: $(RELEASE)/' \ + $(distdir)/META + +if BUILD_LINUX +# For compatibility, create a matching spl-x.y.z directly which contains +# symlinks to the updated header and object file locations. These +# compatibility links will be removed in the next major release. +if CONFIG_KERNEL +install-data-hook: + rm -rf $(DESTDIR)$(prefix)/src/spl-$(VERSION) && \ + mkdir $(DESTDIR)$(prefix)/src/spl-$(VERSION) && \ + cd $(DESTDIR)$(prefix)/src/spl-$(VERSION) && \ + ln -s ../zfs-$(VERSION)/include/spl include && \ + ln -s ../zfs-$(VERSION)/$(LINUX_VERSION) $(LINUX_VERSION) && \ + ln -s ../zfs-$(VERSION)/zfs_config.h.in spl_config.h.in && \ + ln -s ../zfs-$(VERSION)/zfs.release.in spl.release.in && \ + cd $(DESTDIR)$(prefix)/src/zfs-$(VERSION)/$(LINUX_VERSION) && \ + ln -fs zfs_config.h spl_config.h && \ + ln -fs zfs.release spl.release +endif +endif + +PHONY += codecheck +codecheck: cstyle shellcheck checkbashisms flake8 mancheck testscheck vcscheck + +PHONY += checkstyle +checkstyle: codecheck commitcheck + +PHONY += commitcheck +commitcheck: + @if git rev-parse --git-dir > /dev/null 2>&1; then \ + ${top_srcdir}/scripts/commitcheck.sh; \ + fi + +PHONY += cstyle +cstyle: + @find ${top_srcdir} -name build -prune \ + -o -type f -name '*.[hc]' \ + ! -name 'zfs_config.*' ! -name '*.mod.c' \ + ! -name 'opt_global.h' ! -name '*_if*.h' \ + ! -path './module/zstd/lib/*' \ + -exec ${top_srcdir}/scripts/cstyle.pl -cpP {} \+ + +filter_executable = -exec test -x '{}' \; -print + +PHONY += shellcheck +shellcheck: + @if type shellcheck > /dev/null 2>&1; then \ + shellcheck --exclude=SC1090 --exclude=SC1117 --format=gcc \ + $$(find ${top_srcdir}/scripts/*.sh -type f) \ + $$(find ${top_srcdir}/cmd/zed/zed.d/*.sh -type f) \ + $$(find ${top_srcdir}/cmd/zpool/zpool.d/* \ + -type f ${filter_executable}); \ + else \ + echo "skipping shellcheck because shellcheck is not installed"; \ + fi + +PHONY += checkbashisms +checkbashisms: + @if type checkbashisms > /dev/null 2>&1; then \ + checkbashisms -n -p -x \ + $$(find ${top_srcdir} \ + -name '.git' -prune \ + -o -name 'build' -prune \ + -o -name 'tests' -prune \ + -o -name 'config' -prune \ + -o -name 'zed-functions.sh*' -prune \ + -o -name 'zfs-import*' -prune \ + -o -name 'zfs-mount*' -prune \ + -o -name 'zfs-zed*' -prune \ + -o -name 'smart' -prune \ + -o -name 'paxcheck.sh' -prune \ + -o -name 'make_gitrev.sh' -prune \ + -o -type f ! -name 'config*' \ + ! -name 'libtool' \ + -exec bash -c 'awk "NR==1 && /\#\!.*bin\/sh.*/ {print FILENAME;}" "{}"' \;); \ + else \ + echo "skipping checkbashisms because checkbashisms is not installed"; \ + fi + +PHONY += mancheck +mancheck: + @if type mandoc > /dev/null 2>&1; then \ + find ${top_srcdir}/man/man8 -type f -name 'zfs.8' \ + -o -name 'zpool.8' -o -name 'zdb.8' \ + -o -name 'zgenhostid.8' | \ + xargs mandoc -Tlint -Werror; \ + else \ + echo "skipping mancheck because mandoc is not installed"; \ + fi + +if BUILD_LINUX +stat_fmt = -c '%A %n' +else +stat_fmt = -f '%Sp %N' +endif + +PHONY += testscheck +testscheck: + @find ${top_srcdir}/tests/zfs-tests -type f \ + \( -name '*.ksh' -not ${filter_executable} \) -o \ + \( -name '*.kshlib' ${filter_executable} \) -o \ + \( -name '*.shlib' ${filter_executable} \) -o \ + \( -name '*.cfg' ${filter_executable} \) | \ + xargs -r stat ${stat_fmt} | \ + awk '{c++; print} END {if(c>0) exit 1}' + +PHONY += vcscheck +vcscheck: + @if git rev-parse --git-dir > /dev/null 2>&1; then \ + git ls-files . --exclude-standard --others | \ + awk '{c++; print} END {if(c>0) exit 1}' ; \ + fi + +PHONY += lint +lint: cppcheck paxcheck + +PHONY += cppcheck +cppcheck: + @if type cppcheck > /dev/null 2>&1; then \ + cppcheck --quiet --force --error-exitcode=2 --inline-suppr \ + --suppressions-list=${top_srcdir}/cppcheck-suppressions.txt \ + -UHAVE_SSE2 -UHAVE_AVX512F -UHAVE_UIO_ZEROCOPY \ + ${top_srcdir}; \ + else \ + echo "skipping cppcheck because cppcheck is not installed"; \ + fi + +PHONY += paxcheck +paxcheck: + @if type scanelf > /dev/null 2>&1; then \ + ${top_srcdir}/scripts/paxcheck.sh ${top_builddir}; \ + else \ + echo "skipping paxcheck because scanelf is not installed"; \ + fi + +PHONY += flake8 +flake8: + @if type flake8 > /dev/null 2>&1; then \ + flake8 ${top_srcdir}; \ + else \ + echo "skipping flake8 because flake8 is not installed"; \ + fi + +PHONY += ctags +ctags: + $(RM) tags + find $(top_srcdir) -name '.?*' -prune \ + -o -type f -name '*.[hcS]' -print | xargs ctags -a + +PHONY += etags +etags: + $(RM) TAGS + find $(top_srcdir) -name '.?*' -prune \ + -o -type f -name '*.[hcS]' -print | xargs etags -a + +PHONY += cscopelist +cscopelist: + find $(top_srcdir) -name '.?*' -prune \ + -o -type f -name '*.[hc]' -print >cscope.files + +PHONY += tags +tags: ctags etags + +PHONY += pkg pkg-dkms pkg-kmod pkg-utils +pkg: @DEFAULT_PACKAGE@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Aug 24 22:53:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B119A3B02EC; Mon, 24 Aug 2020 22:53:23 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb6q74644z4P8H; Mon, 24 Aug 2020 22:53:23 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7115C1FF18; Mon, 24 Aug 2020 22:53:23 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07OMrNOw016613; Mon, 24 Aug 2020 22:53:23 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OMrNO2016612; Mon, 24 Aug 2020 22:53:23 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <202008242253.07OMrNO2016612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Mon, 24 Aug 2020 22:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364737 - head/sys/dev/drm2 X-SVN-Group: head X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: head/sys/dev/drm2 X-SVN-Commit-Revision: 364737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 22:53:23 -0000 Author: zeising (doc,ports committer) Date: Mon Aug 24 22:53:23 2020 New Revision: 364737 URL: https://svnweb.freebsd.org/changeset/base/364737 Log: drm2: Update deprecation message Update the deprecation message in the drm2 (aka legacy drm) drivers to point towards the graphics/drm-kmod ports for all architectures, not just amd64. drm-kmod has support for more architectures these days, and the graphics/drm-legacy-kmod port is being deprecated. Approved by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26174 Modified: head/sys/dev/drm2/drm_os_freebsd.h Modified: head/sys/dev/drm2/drm_os_freebsd.h ============================================================================== --- head/sys/dev/drm2/drm_os_freebsd.h Mon Aug 24 22:48:19 2020 (r364736) +++ head/sys/dev/drm2/drm_os_freebsd.h Mon Aug 24 22:53:23 2020 (r364737) @@ -154,16 +154,12 @@ typedef void irqreturn_t; *(volatile u_int64_t *)(((vm_offset_t)(map)->handle) + \ (vm_offset_t)(offset)) = htole64(val) -#ifdef amd64 #define DRM_PORT "graphics/drm-kmod" -#else -#define DRM_PORT "graphics/drm-legacy-kmod" -#endif #define DRM_OBSOLETE(dev) \ do { \ device_printf(dev, "=======================================================\n"); \ - device_printf(dev, "This code is obsolete abandonware. Install the " DRM_PORT " pkg\n"); \ + device_printf(dev, "This code is deprecated. Install the " DRM_PORT " pkg\n"); \ device_printf(dev, "=======================================================\n"); \ gone_in_dev(dev, 13, "drm2 drivers"); \ } while (0) From owner-svn-src-all@freebsd.org Mon Aug 24 22:53:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 244493B0495; Mon, 24 Aug 2020 22:53:40 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb6qR4P5Pz4PHt; Mon, 24 Aug 2020 22:53:39 +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 16E962005A; Mon, 24 Aug 2020 22: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 07OMrbxd016673; Mon, 24 Aug 2020 22:53:37 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07OMrba3016672; Mon, 24 Aug 2020 22:53:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008242253.07OMrba3016672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 24 Aug 2020 22:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r364738 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: imp X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 364738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 22:53:40 -0000 Author: imp Date: Mon Aug 24 22:53:37 2020 New Revision: 364738 URL: https://svnweb.freebsd.org/changeset/base/364738 Log: Trim myself from the sizelimit log and others that haven't made large commits in a very long time. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Mon Aug 24 22:53:23 2020 (r364737) +++ svnadmin/conf/sizelimit.conf Mon Aug 24 22:53:37 2020 (r364738) @@ -14,19 +14,13 @@ # If you add just your name here, you get 10 times that. (10240000) # First field is username, second field is the raised limit required. -achim andrew bapt -davidcs dim 20480000 -imp jb jeff jkim markj mm np -obrien -peter -rwatson -mmacy 21064397 \ No newline at end of file +mmacy 21064397 From owner-svn-src-all@freebsd.org Mon Aug 24 23:10:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 88AB23B0724; Mon, 24 Aug 2020 23:10:25 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb7Bn2ptcz4PhP; Mon, 24 Aug 2020 23:10:25 +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 40332201A4; Mon, 24 Aug 2020 23:10:25 +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 07ONAPew023260; Mon, 24 Aug 2020 23:10:25 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07ONAPlE023259; Mon, 24 Aug 2020 23:10:25 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008242310.07ONAPlE023259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 24 Aug 2020 23:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r364739 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: markj X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 364739 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 23:10:25 -0000 Author: markj Date: Mon Aug 24 23:10:24 2020 New Revision: 364739 URL: https://svnweb.freebsd.org/changeset/base/364739 Log: Remove myself from sizelimit.conf. It was a one-off for importing some iwm(4) firmware. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Mon Aug 24 22:53:37 2020 (r364738) +++ svnadmin/conf/sizelimit.conf Mon Aug 24 23:10:24 2020 (r364739) @@ -20,7 +20,6 @@ dim 20480000 jb jeff jkim -markj mm np mmacy 21064397 From owner-svn-src-all@freebsd.org Mon Aug 24 23:31:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8EAD73B0D90; Mon, 24 Aug 2020 23:31:27 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb7g333Tjz4Qgw; Mon, 24 Aug 2020 23:31:27 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 324AA201ED; Mon, 24 Aug 2020 23:31:27 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07ONVRqK037235; Mon, 24 Aug 2020 23:31:27 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07ONVRt7037234; Mon, 24 Aug 2020 23:31:27 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008242331.07ONVRt7037234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Mon, 24 Aug 2020 23:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364740 - head/sys/contrib/openzfs X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/contrib/openzfs X-SVN-Commit-Revision: 364740 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 23:31:27 -0000 Author: mmacy Date: Mon Aug 24 23:31:26 2020 New Revision: 364740 URL: https://svnweb.freebsd.org/changeset/base/364740 Log: Initial import from vendor-sys branch of openzfs Added: head/sys/contrib/openzfs/ - copied from r364739, vendor-sys/openzfs/dist/ From owner-svn-src-all@freebsd.org Mon Aug 24 23:38:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B1903B0EB7; Mon, 24 Aug 2020 23:38:23 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb7q31GCqz4RPq; Mon, 24 Aug 2020 23:38:23 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA2712076F; Mon, 24 Aug 2020 23:38:22 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07ONcMgV041786; Mon, 24 Aug 2020 23:38:22 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07ONcMCT041785; Mon, 24 Aug 2020 23:38:22 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008242338.07ONcMCT041785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Mon, 24 Aug 2020 23:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r364741 - vendor-sys/openzfs/2.0-rc0-g184df27 X-SVN-Group: vendor-sys X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: vendor-sys/openzfs/2.0-rc0-g184df27 X-SVN-Commit-Revision: 364741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 23:38:23 -0000 Author: mmacy Date: Mon Aug 24 23:38:22 2020 New Revision: 364741 URL: https://svnweb.freebsd.org/changeset/base/364741 Log: Tag initial import in vendor branch Added: vendor-sys/openzfs/2.0-rc0-g184df27/ - copied from r364740, vendor-sys/openzfs/dist/ From owner-svn-src-all@freebsd.org Mon Aug 24 23:50:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1358B3B0EDE; Mon, 24 Aug 2020 23:50:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb84v6WJKz4Rlt; Mon, 24 Aug 2020 23:50:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF2CE20561; Mon, 24 Aug 2020 23:50:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07ONoNuU048120; Mon, 24 Aug 2020 23:50:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07ONoNwv048119; Mon, 24 Aug 2020 23:50:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008242350.07ONoNwv048119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 24 Aug 2020 23:50:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r364742 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: imp X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 364742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 24 Aug 2020 23:50:24 -0000 Author: imp Date: Mon Aug 24 23:50:23 2020 New Revision: 364742 URL: https://svnweb.freebsd.org/changeset/base/364742 Log: One more stale entry, alas... has it been 11 years :( Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Mon Aug 24 23:38:22 2020 (r364741) +++ svnadmin/conf/sizelimit.conf Mon Aug 24 23:50:23 2020 (r364742) @@ -17,7 +17,6 @@ andrew bapt dim 20480000 -jb jeff jkim mm From owner-svn-src-all@freebsd.org Tue Aug 25 00:49:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A242A3B226B; Tue, 25 Aug 2020 00:49:58 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb9Pf3rQ7z4VNQ; Tue, 25 Aug 2020 00:49:58 +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 62E6021371; Tue, 25 Aug 2020 00:49:58 +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 07P0nwf0085559; Tue, 25 Aug 2020 00:49:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07P0nwaa085558; Tue, 25 Aug 2020 00:49:58 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008250049.07P0nwaa085558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 25 Aug 2020 00:49:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364743 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 00:49:58 -0000 Author: markj Date: Tue Aug 25 00:49:57 2020 New Revision: 364743 URL: https://svnweb.freebsd.org/changeset/base/364743 Log: MFC r364346: Fix handling of ancillary data on non-AF_UNIX Linux sockets. Modified: stable/12/sys/compat/linux/linux_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 23:50:23 2020 (r364742) +++ stable/12/sys/compat/linux/linux_socket.c Tue Aug 25 00:49:57 2020 (r364743) @@ -1063,7 +1063,7 @@ linux_sendmsg_common(struct thread *td, l_int s, struc * FreeBSD system call interface. */ if (sa_family != AF_UNIX) - continue; + goto next; if (cmsg->cmsg_type == SCM_CREDS) { len = sizeof(struct cmsgcred); @@ -1090,6 +1090,7 @@ linux_sendmsg_common(struct thread *td, l_int s, struc data = (char *)data + CMSG_SPACE(len); datalen += CMSG_SPACE(len); +next: if (clen <= LINUX_CMSG_ALIGN(linux_cmsg.cmsg_len)) break; From owner-svn-src-all@freebsd.org Tue Aug 25 00:58:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1BC73B2681; Tue, 25 Aug 2020 00:58:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bb9bB5Nb7z4VpQ; Tue, 25 Aug 2020 00:58:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95EFD214D5; Tue, 25 Aug 2020 00:58:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07P0wEhN091740; Tue, 25 Aug 2020 00:58:14 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07P0wEFU091739; Tue, 25 Aug 2020 00:58:14 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202008250058.07P0wEFU091739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 25 Aug 2020 00:58:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364744 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364744 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 00:58:14 -0000 Author: rmacklem Date: Tue Aug 25 00:58:14 2020 New Revision: 364744 URL: https://svnweb.freebsd.org/changeset/base/364744 Log: Fix hangs with processes stuck sleeping on btalloc on i386. r358097 introduced a problem for i386, where kernel builds will intermittently get hung, typically with many processes sleeping on "btalloc". I know nothing about VM, but received assistance from rlibby@ and markj@. rlibby@ stated the following: It looks like the problem is that for systems that do not have UMA_MD_SMALL_ALLOC, we do uma_zone_set_allocf(vmem_bt_zone, vmem_bt_alloc); but we haven't set an appropriate free function. This is probably why UMA_ZONE_NOFREE was originally there. When NOFREE was removed, it was appropriate for systems with uma_small_alloc. So by default we get page_free as our free function. That calls kmem_free, which calls vmem_free ... but we do our allocs with vmem_xalloc. I'm not positive, but I think the problem is that in effect we vmem_xalloc -> vmem_free, not vmem_xfree. Three possible fixes: 1: The one you tested, but this is not best for systems with uma_small_alloc. 2: Pass UMA_ZONE_NOFREE conditional on UMA_MD_SMALL_ALLOC. 3: Actually provide an appropriate vmem_bt_free function. I think we should just do option 2 with a comment, it's simple and it's what we used to do. I'm not sure how much benefit we would see from option 3, but it's more work. This patch implements #2. I haven't done a comment, since I don't know what the problem is. markj@ noted the following: I think the suggested patch is ok, but not for the reason stated. On platforms without a direct map the problem is: to allocate btags we need a slab, and to allocate a slab we need to map a page, and to map a page we need to allocate btags. We handle this recursion using a custom slab allocator which specifies M_USE_RESERVE, allowing it to dip into a reserve of free btags. Because the returned slab can be used to keep the reserve populated, this ensures that there are always enough free btags available to handle the recursion. UMA_ZONE_NOFREE ensures that we never reclaim free slabs from the zone. However, when it was removed, an apparent bug in UMA was exposed: keg_drain() ignores the reservation set by uma_zone_reserve() in vmem_startup(). So under memory pressure we reclaim the free btags that are needed to break the recursion. That's why adding _NOFREE back fixes the problem: it disables the reclamation. We could perhaps fix it more cleverly, by modifying keg_drain() to always leave uk_reserve slabs available. markj@'s initial patch failed testing, so committing this patch was agreed upon as the interim solution. Either rlibby@ or markj@ might choose to add a comment to it. PR: 248008 Reviewed by: rlibby, markj Modified: head/sys/kern/subr_vmem.c Modified: head/sys/kern/subr_vmem.c ============================================================================== --- head/sys/kern/subr_vmem.c Tue Aug 25 00:49:57 2020 (r364743) +++ head/sys/kern/subr_vmem.c Tue Aug 25 00:58:14 2020 (r364744) @@ -668,10 +668,14 @@ vmem_startup(void) vmem_zone = uma_zcreate("vmem", sizeof(struct vmem), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); +#ifdef UMA_MD_SMALL_ALLOC vmem_bt_zone = uma_zcreate("vmem btag", sizeof(struct vmem_btag), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM); -#ifndef UMA_MD_SMALL_ALLOC +#else + vmem_bt_zone = uma_zcreate("vmem btag", + sizeof(struct vmem_btag), NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); mtx_init(&vmem_bt_lock, "btag lock", NULL, MTX_DEF); uma_prealloc(vmem_bt_zone, BT_MAXALLOC); /* From owner-svn-src-all@freebsd.org Tue Aug 25 02:14:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFCBC3B5BA2; Tue, 25 Aug 2020 02:14:38 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbCHL4Wm9z4bVJ; Tue, 25 Aug 2020 02:14:38 +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 7DE562207D; Tue, 25 Aug 2020 02:14:38 +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 07P2Ec7Q040674; Tue, 25 Aug 2020 02:14:38 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07P2Ebwr040667; Tue, 25 Aug 2020 02:14:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <202008250214.07P2Ebwr040667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 25 Aug 2020 02:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364745 - in stable/12: share/man/man4 sys/dev/cxgbe sys/dev/cxgbe/common X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/dev/cxgbe sys/dev/cxgbe/common X-SVN-Commit-Revision: 364745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 02:14:38 -0000 Author: np Date: Tue Aug 25 02:14:36 2020 New Revision: 364745 URL: https://svnweb.freebsd.org/changeset/base/364745 Log: MFC r351444, r357475, r357479, r357481-r357482, r358859, and r364497. All these are rx improvements in the cxgbe(4) driver. r351444: cxgbe(4): Use the same buffer size for TOE rx queues as the NIC rx queues. This is a minor simplification. r357475: cxgbe(4): Initialize the rx buffer's metadata on first-use and not on allocation. refill_fl doesn't touch any part of a freshly allocated cluster after this change. r357479: cxgbe(4): Avoid ext_arg2 in rxb_free. ext_arg2 is the only item in the third cacheline in an mbuf and could be cold by the time rxb_free runs. Put the information needed by rxb_free in the same line as the refcount, which is very likely to be hot given that rxb_free runs when the refcount is decremented and reaches 0. r357481: cxgbe(4): Retire the allow_mbufs_in_cluster optimization. This simplifies the driver's rx fast path as well as the bookkeeping code that tracks various rx buffer sizes and layouts. r357482: cxgbe(4): Treat NIC rx as special and run its handler directly and not via the t4_cpl_handler dispatch table. r358859: cxgbe(4): Do not try to use 0 as an rx buffer address when the driver is already allocating from the safe zone and the allocation fails. This bug was introduced in r357481. r364497: cxgbe(4): Use large clusters for TOE rx queues when TOE+TLS is enabled. Rx is more efficient within the chip when the receive buffer size matches the TLS PDU size. Sponsored by: Chelsio Communications Modified: stable/12/share/man/man4/cxgbe.4 stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/common/common.h stable/12/sys/dev/cxgbe/common/t4_hw.c stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/cxgbe/t4_netmap.c stable/12/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/cxgbe.4 ============================================================================== --- stable/12/share/man/man4/cxgbe.4 Tue Aug 25 00:58:14 2020 (r364744) +++ stable/12/share/man/man4/cxgbe.4 Tue Aug 25 02:14:36 2020 (r364745) @@ -317,11 +317,6 @@ Allow the hardware to deliver multiple frames in the s opportunistically. The default is -1 which lets the driver decide. 0 or 1 explicitly disable or enable this feature. -.It Va hw.cxgbe.allow_mbufs_in_cluster -1 allows the driver to lay down one or more mbufs within the receive buffer -opportunistically. -This is the default. -0 prohibits the driver from doing so. .It Va hw.cxgbe.largest_rx_cluster .It Va hw.cxgbe.safest_rx_cluster Sizes of rx clusters. Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Tue Aug 25 00:58:14 2020 (r364744) +++ stable/12/sys/dev/cxgbe/adapter.h Tue Aug 25 02:14:36 2020 (r364745) @@ -314,24 +314,17 @@ struct port_info { #define IS_MAIN_VI(vi) ((vi) == &((vi)->pi->vi[0])) -/* Where the cluster came from, how it has been carved up. */ -struct cluster_layout { - int8_t zidx; - int8_t hwidx; - uint16_t region1; /* mbufs laid out within this region */ - /* region2 is the DMA region */ - uint16_t region3; /* cluster_metadata within this region */ -}; - struct cluster_metadata { + uma_zone_t zone; + caddr_t cl; u_int refcount; - struct fl_sdesc *sd; /* For debug only. Could easily be stale */ }; struct fl_sdesc { caddr_t cl; uint16_t nmbuf; /* # of driver originated mbufs with ref on cluster */ - struct cluster_layout cll; + int16_t moff; /* offset of metadata from cl */ + uint8_t zidx; }; struct tx_desc { @@ -463,20 +456,17 @@ struct sge_eq { char lockname[16]; }; -struct sw_zone_info { +struct rx_buf_info { uma_zone_t zone; /* zone that this cluster comes from */ - int size; /* size of cluster: 2K, 4K, 9K, 16K, etc. */ - int type; /* EXT_xxx type of the cluster */ - int8_t head_hwidx; - int8_t tail_hwidx; + uint16_t size1; /* same as size of cluster: 2K/4K/9K/16K. + * hwsize[hwidx1] = size1. No spare. */ + uint16_t size2; /* hwsize[hwidx2] = size2. + * spare in cluster = size1 - size2. */ + int8_t hwidx1; /* SGE bufsize idx for size1 */ + int8_t hwidx2; /* SGE bufsize idx for size2 */ + uint8_t type; /* EXT_xxx type of the cluster */ }; -struct hw_buf_info { - int8_t zidx; /* backpointer to zone; -ve means unused */ - int8_t next; /* next hwidx for this zone; -1 means no more */ - int size; -}; - enum { NUM_MEMWIN = 3, @@ -516,7 +506,8 @@ struct sge_fl { struct mtx fl_lock; __be64 *desc; /* KVA of descriptor ring, ptr to addresses */ struct fl_sdesc *sdesc; /* KVA of software descriptor ring */ - struct cluster_layout cll_def; /* default refill zone, layout */ + uint16_t zidx; /* refill zone idx */ + uint16_t safe_zidx; uint16_t lowat; /* # of buffers <= this means fl needs help */ int flags; uint16_t buf_boundary; @@ -534,8 +525,6 @@ struct sge_fl { u_int rx_offset; /* offset in fl buf (when buffer packing) */ volatile uint32_t *udb; - uint64_t mbuf_allocated;/* # of mbuf allocated from zone_mbuf */ - uint64_t mbuf_inlined; /* # of mbuf created within clusters */ uint64_t cl_allocated; /* # of clusters allocated */ uint64_t cl_recycled; /* # of clusters recycled */ uint64_t cl_fast_recycled; /* # of clusters recycled (fast) */ @@ -552,7 +541,6 @@ struct sge_fl { bus_dmamap_t desc_map; char lockname[16]; bus_addr_t ba; /* bus address of descriptor ring */ - struct cluster_layout cll_alt; /* alternate refill zone, layout */ }; struct mp_ring; @@ -766,10 +754,8 @@ struct sge { struct sge_iq **iqmap; /* iq->cntxt_id to iq mapping */ struct sge_eq **eqmap; /* eq->cntxt_id to eq mapping */ - int8_t safe_hwidx1; /* may not have room for metadata */ - int8_t safe_hwidx2; /* with room for metadata and maybe more */ - struct sw_zone_info sw_zone_info[SW_ZONE_SIZES]; - struct hw_buf_info hw_buf_info[SGE_FLBUF_SIZES]; + int8_t safe_zidx; + struct rx_buf_info rx_buf_info[SW_ZONE_SIZES]; }; struct devnames { Modified: stable/12/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/12/sys/dev/cxgbe/common/common.h Tue Aug 25 00:58:14 2020 (r364744) +++ stable/12/sys/dev/cxgbe/common/common.h Tue Aug 25 02:14:36 2020 (r364745) @@ -246,6 +246,8 @@ struct tp_params { uint32_t vlan_pri_map; uint32_t ingress_config; + uint32_t max_rx_pdu; + uint32_t max_tx_pdu; uint64_t hash_filter_mask; __be16 err_vec_mask; Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/12/sys/dev/cxgbe/common/t4_hw.c Tue Aug 25 00:58:14 2020 (r364744) +++ stable/12/sys/dev/cxgbe/common/t4_hw.c Tue Aug 25 02:14:36 2020 (r364745) @@ -9348,7 +9348,7 @@ static void read_filter_mode_and_ingress_config(struct int t4_init_tp_params(struct adapter *adap, bool sleep_ok) { int chan; - u32 v; + u32 tx_len, rx_len, r, v; struct tp_params *tpp = &adap->params.tp; v = t4_read_reg(adap, A_TP_TIMER_RESOLUTION); @@ -9374,6 +9374,21 @@ int t4_init_tp_params(struct adapter *adap, bool sleep htobe16(V_T6_COMPR_RXERR_VEC(M_T6_COMPR_RXERR_VEC)); } } + + rx_len = t4_read_reg(adap, A_TP_PMM_RX_PAGE_SIZE); + tx_len = t4_read_reg(adap, A_TP_PMM_TX_PAGE_SIZE); + + r = t4_read_reg(adap, A_TP_PARA_REG2); + rx_len = min(rx_len, G_MAXRXDATA(r)); + tx_len = min(tx_len, G_MAXRXDATA(r)); + + r = t4_read_reg(adap, A_TP_PARA_REG7); + v = min(G_PMMAXXFERLEN0(r), G_PMMAXXFERLEN1(r)); + rx_len = min(rx_len, v); + tx_len = min(tx_len, v); + + tpp->max_tx_pdu = tx_len; + tpp->max_rx_pdu = rx_len; return 0; } Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Tue Aug 25 00:58:14 2020 (r364744) +++ stable/12/sys/dev/cxgbe/t4_main.c Tue Aug 25 02:14:36 2020 (r364745) @@ -695,6 +695,7 @@ static int sysctl_ulprx_la(SYSCTL_HANDLER_ARGS); static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); static int sysctl_cpus(SYSCTL_HANDLER_ARGS); #ifdef TCP_OFFLOAD +static int sysctl_tls(SYSCTL_HANDLER_ARGS); 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); @@ -6293,8 +6294,8 @@ t4_sysctls(struct adapter *sc) 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", CTLTYPE_INT | + CTLFLAG_RW, sc, 0, sysctl_tls, "I", "Inline TLS allowed"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "tls_rx_ports", CTLTYPE_INT | CTLFLAG_RW, sc, 0, sysctl_tls_rx_ports, @@ -9364,6 +9365,37 @@ sysctl_cpus(SYSCTL_HANDLER_ARGS) #ifdef TCP_OFFLOAD static int +sysctl_tls(SYSCTL_HANDLER_ARGS) +{ + struct adapter *sc = arg1; + int i, j, v, rc; + struct vi_info *vi; + + v = sc->tt.tls; + rc = sysctl_handle_int(oidp, &v, 0, req); + if (rc != 0 || req->newptr == NULL) + return (rc); + + if (v != 0 && !(sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS)) + return (ENOTSUP); + + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4stls"); + if (rc) + return (rc); + sc->tt.tls = !!v; + for_each_port(sc, i) { + for_each_vi(sc->port[i], j, vi) { + if (vi->flags & VI_INIT_DONE) + t4_update_fl_bufsize(vi->ifp); + } + } + end_synchronized_op(sc, 0); + + return (0); + +} + +static int sysctl_tls_rx_ports(SYSCTL_HANDLER_ARGS) { struct adapter *sc = arg1; @@ -10039,8 +10071,6 @@ clear_stats(struct adapter *sc, u_int port_id) rxq->rxcsum = 0; rxq->vlan_extraction = 0; - rxq->fl.mbuf_allocated = 0; - rxq->fl.mbuf_inlined = 0; rxq->fl.cl_allocated = 0; rxq->fl.cl_recycled = 0; rxq->fl.cl_fast_recycled = 0; @@ -10069,8 +10099,6 @@ clear_stats(struct adapter *sc, u_int port_id) #endif #ifdef TCP_OFFLOAD for_each_ofld_rxq(vi, i, ofld_rxq) { - ofld_rxq->fl.mbuf_allocated = 0; - ofld_rxq->fl.mbuf_inlined = 0; ofld_rxq->fl.cl_allocated = 0; ofld_rxq->fl.cl_recycled = 0; ofld_rxq->fl.cl_fast_recycled = 0; Modified: stable/12/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_netmap.c Tue Aug 25 00:58:14 2020 (r364744) +++ stable/12/sys/dev/cxgbe/t4_netmap.c Tue Aug 25 02:14:36 2020 (r364745) @@ -355,7 +355,7 @@ cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi struct sge_nm_rxq *nm_rxq; struct sge_nm_txq *nm_txq; int rc, i, j, hwidx, defq, nrssq; - struct hw_buf_info *hwb; + struct rx_buf_info *rxb; ASSERT_SYNCHRONIZED_OP(sc); @@ -363,17 +363,22 @@ cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return (EAGAIN); - hwb = &sc->sge.hw_buf_info[0]; - for (i = 0; i < SGE_FLBUF_SIZES; i++, hwb++) { - if (hwb->size == NETMAP_BUF_SIZE(na)) + rxb = &sc->sge.rx_buf_info[0]; + for (i = 0; i < SW_ZONE_SIZES; i++, rxb++) { + if (rxb->size1 == NETMAP_BUF_SIZE(na)) { + hwidx = rxb->hwidx1; break; + } + if (rxb->size2 == NETMAP_BUF_SIZE(na)) { + hwidx = rxb->hwidx2; + break; + } } - if (i >= SGE_FLBUF_SIZES) { + if (i >= SW_ZONE_SIZES) { if_printf(ifp, "no hwidx for netmap buffer size %d.\n", NETMAP_BUF_SIZE(na)); return (ENXIO); } - hwidx = i; /* Must set caps before calling netmap_reset */ nm_set_native_flags(na); Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Tue Aug 25 00:58:14 2020 (r364744) +++ stable/12/sys/dev/cxgbe/t4_sge.c Tue Aug 25 02:14:36 2020 (r364745) @@ -143,16 +143,6 @@ SYSCTL_INT(_hw_cxgbe, OID_AUTO, fl_pack, CTLFLAG_RDTUN "payload pack boundary (bytes)"); /* - * Allow the driver to create mbuf(s) in a cluster allocated for rx. - * 0: never; always allocate mbufs from the zone_mbuf UMA zone. - * 1: ok to create mbuf(s) within a cluster if there is room. - */ -static int allow_mbufs_in_cluster = 1; -SYSCTL_INT(_hw_cxgbe, OID_AUTO, allow_mbufs_in_cluster, CTLFLAG_RDTUN, - &allow_mbufs_in_cluster, 0, - "Allow driver to create mbufs within a rx cluster"); - -/* * Largest rx cluster size that the driver is allowed to allocate. */ static int largest_rx_cluster = MJUM16BYTES; @@ -224,7 +214,8 @@ struct sgl { static int service_iq(struct sge_iq *, int); static int service_iq_fl(struct sge_iq *, int); static struct mbuf *get_fl_payload(struct adapter *, struct sge_fl *, uint32_t); -static int t4_eth_rx(struct sge_iq *, const struct rss_header *, struct mbuf *); +static int eth_rx(struct adapter *, struct sge_rxq *, const struct iq_desc *, + u_int); static inline void init_iq(struct sge_iq *, struct adapter *, int, int, int); static inline void init_fl(struct adapter *, struct sge_fl *, int, int, char *); static inline void init_eq(struct adapter *, struct sge_eq *, int, int, uint8_t, @@ -279,8 +270,7 @@ static int refill_fl(struct adapter *, struct sge_fl * static void refill_sfl(void *); static int alloc_fl_sdesc(struct sge_fl *); static void free_fl_sdesc(struct adapter *, struct sge_fl *); -static void find_best_refill_source(struct adapter *, struct sge_fl *, int); -static void find_safe_refill_source(struct adapter *, struct sge_fl *); +static int find_refill_source(struct adapter *, int, bool); static void add_fl_to_sfl(struct adapter *, struct sge_fl *); static inline void get_pkt_gl(struct mbuf *, struct sglist *); @@ -556,7 +546,6 @@ t4_sge_modload(void) t4_register_cpl_handler(CPL_FW4_MSG, handle_fw_msg); t4_register_cpl_handler(CPL_FW6_MSG, handle_fw_msg); t4_register_cpl_handler(CPL_SGE_EGR_UPDATE, handle_sge_egr_update); - t4_register_cpl_handler(CPL_RX_PKT, t4_eth_rx); #ifdef RATELIMIT t4_register_shared_cpl_handler(CPL_FW4_ACK, ethofld_fw4_ack, CPL_COOKIE_ETHOFLD); @@ -665,24 +654,19 @@ setup_pad_and_pack_boundaries(struct adapter *sc) void t4_tweak_chip_settings(struct adapter *sc) { - int i; + int i, reg; uint32_t v, m; int intr_timer[SGE_NTIMERS] = {1, 5, 10, 50, 100, 200}; int timer_max = M_TIMERVALUE0 * 1000 / sc->params.vpd.cclk; int intr_pktcount[SGE_NCOUNTERS] = {1, 8, 16, 32}; /* 63 max */ uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE); - static int sge_flbuf_sizes[] = { + static int sw_buf_sizes[] = { MCLBYTES, #if MJUMPAGESIZE != MCLBYTES MJUMPAGESIZE, - MJUMPAGESIZE - CL_METADATA_SIZE, - MJUMPAGESIZE - 2 * MSIZE - CL_METADATA_SIZE, #endif MJUM9BYTES, - MJUM16BYTES, - MCLBYTES - MSIZE - CL_METADATA_SIZE, - MJUM9BYTES - CL_METADATA_SIZE, - MJUM16BYTES - CL_METADATA_SIZE, + MJUM16BYTES }; KASSERT(sc->flags & MASTER_PF, @@ -705,13 +689,16 @@ t4_tweak_chip_settings(struct adapter *sc) V_HOSTPAGESIZEPF7(PAGE_SHIFT - 10); t4_write_reg(sc, A_SGE_HOST_PAGE_SIZE, v); - KASSERT(nitems(sge_flbuf_sizes) <= SGE_FLBUF_SIZES, - ("%s: hw buffer size table too big", __func__)); t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE0, 4096); t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE1, 65536); - for (i = 0; i < min(nitems(sge_flbuf_sizes), SGE_FLBUF_SIZES); i++) { - t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE15 - (4 * i), - sge_flbuf_sizes[i]); + reg = A_SGE_FL_BUFFER_SIZE2; + for (i = 0; i < nitems(sw_buf_sizes); i++) { + MPASS(reg <= A_SGE_FL_BUFFER_SIZE15); + t4_write_reg(sc, reg, sw_buf_sizes[i]); + reg += 4; + MPASS(reg <= A_SGE_FL_BUFFER_SIZE15); + t4_write_reg(sc, reg, sw_buf_sizes[i] - CL_METADATA_SIZE); + reg += 4; } v = V_THRESHOLD_0(intr_pktcount[0]) | V_THRESHOLD_1(intr_pktcount[1]) | @@ -788,11 +775,11 @@ t4_tweak_chip_settings(struct adapter *sc) } /* - * SGE wants the buffer to be at least 64B and then a multiple of 16. If - * padding is in use, the buffer's start and end need to be aligned to the pad - * boundary as well. We'll just make sure that the size is a multiple of the - * boundary here, it is up to the buffer allocation code to make sure the start - * of the buffer is aligned as well. + * SGE wants the buffer to be at least 64B and then a multiple of 16. Its + * address mut be 16B aligned. If padding is in use the buffer's start and end + * need to be aligned to the pad boundary as well. We'll just make sure that + * the size is a multiple of the pad boundary here, it is up to the buffer + * allocation code to make sure the start of the buffer is aligned. */ static inline int hwsz_ok(struct adapter *sc, int hwsz) @@ -821,8 +808,7 @@ t4_read_chip_settings(struct adapter *sc) MJUM9BYTES, MJUM16BYTES }; - struct sw_zone_info *swz, *safe_swz; - struct hw_buf_info *hwb; + struct rx_buf_info *rxb; m = F_RXPKTCPLMODE; v = F_RXPKTCPLMODE; @@ -841,114 +827,51 @@ t4_read_chip_settings(struct adapter *sc) rc = EINVAL; } - /* Filter out unusable hw buffer sizes entirely (mark with -2). */ - hwb = &s->hw_buf_info[0]; - for (i = 0; i < nitems(s->hw_buf_info); i++, hwb++) { - r = sc->params.sge.sge_fl_buffer_size[i]; - hwb->size = r; - hwb->zidx = hwsz_ok(sc, r) ? -1 : -2; - hwb->next = -1; - } + s->safe_zidx = -1; + rxb = &s->rx_buf_info[0]; + for (i = 0; i < SW_ZONE_SIZES; i++, rxb++) { + rxb->size1 = sw_buf_sizes[i]; + rxb->zone = m_getzone(rxb->size1); + rxb->type = m_gettype(rxb->size1); + rxb->size2 = 0; + rxb->hwidx1 = -1; + rxb->hwidx2 = -1; + for (j = 0; j < SGE_FLBUF_SIZES; j++) { + int hwsize = sp->sge_fl_buffer_size[j]; - /* - * Create a sorted list in decreasing order of hw buffer sizes (and so - * increasing order of spare area) for each software zone. - * - * If padding is enabled then the start and end of the buffer must align - * to the pad boundary; if packing is enabled then they must align with - * the pack boundary as well. Allocations from the cluster zones are - * aligned to min(size, 4K), so the buffer starts at that alignment and - * ends at hwb->size alignment. If mbuf inlining is allowed the - * starting alignment will be reduced to MSIZE and the driver will - * exercise appropriate caution when deciding on the best buffer layout - * to use. - */ - n = 0; /* no usable buffer size to begin with */ - swz = &s->sw_zone_info[0]; - safe_swz = NULL; - for (i = 0; i < SW_ZONE_SIZES; i++, swz++) { - int8_t head = -1, tail = -1; - - swz->size = sw_buf_sizes[i]; - swz->zone = m_getzone(swz->size); - swz->type = m_gettype(swz->size); - - if (swz->size < PAGE_SIZE) { - MPASS(powerof2(swz->size)); - if (fl_pad && (swz->size % sp->pad_boundary != 0)) + if (!hwsz_ok(sc, hwsize)) continue; - } - if (swz->size == safest_rx_cluster) - safe_swz = swz; + /* hwidx for size1 */ + if (rxb->hwidx1 == -1 && rxb->size1 == hwsize) + rxb->hwidx1 = j; - hwb = &s->hw_buf_info[0]; - for (j = 0; j < SGE_FLBUF_SIZES; j++, hwb++) { - if (hwb->zidx != -1 || hwb->size > swz->size) + /* hwidx for size2 (buffer packing) */ + if (rxb->size1 - CL_METADATA_SIZE < hwsize) continue; -#ifdef INVARIANTS - if (fl_pad) - MPASS(hwb->size % sp->pad_boundary == 0); -#endif - hwb->zidx = i; - if (head == -1) - head = tail = j; - else if (hwb->size < s->hw_buf_info[tail].size) { - s->hw_buf_info[tail].next = j; - tail = j; - } else { - int8_t *cur; - struct hw_buf_info *t; - - for (cur = &head; *cur != -1; cur = &t->next) { - t = &s->hw_buf_info[*cur]; - if (hwb->size == t->size) { - hwb->zidx = -2; - break; - } - if (hwb->size > t->size) { - hwb->next = *cur; - *cur = j; - break; - } + n = rxb->size1 - hwsize - CL_METADATA_SIZE; + if (n == 0) { + rxb->hwidx2 = j; + rxb->size2 = hwsize; + break; /* stop looking */ + } + if (rxb->hwidx2 != -1) { + if (n < sp->sge_fl_buffer_size[rxb->hwidx2] - + hwsize - CL_METADATA_SIZE) { + rxb->hwidx2 = j; + rxb->size2 = hwsize; } + } else if (n <= 2 * CL_METADATA_SIZE) { + rxb->hwidx2 = j; + rxb->size2 = hwsize; } } - swz->head_hwidx = head; - swz->tail_hwidx = tail; - - if (tail != -1) { - n++; - if (swz->size - s->hw_buf_info[tail].size >= - CL_METADATA_SIZE) - sc->flags |= BUF_PACKING_OK; - } + if (rxb->hwidx2 != -1) + sc->flags |= BUF_PACKING_OK; + if (s->safe_zidx == -1 && rxb->size1 == safest_rx_cluster) + s->safe_zidx = i; } - if (n == 0) { - device_printf(sc->dev, "no usable SGE FL buffer size.\n"); - rc = EINVAL; - } - s->safe_hwidx1 = -1; - s->safe_hwidx2 = -1; - if (safe_swz != NULL) { - s->safe_hwidx1 = safe_swz->head_hwidx; - for (i = safe_swz->head_hwidx; i != -1; i = hwb->next) { - int spare; - - hwb = &s->hw_buf_info[i]; -#ifdef INVARIANTS - if (fl_pad) - MPASS(hwb->size % sp->pad_boundary == 0); -#endif - spare = safe_swz->size - hwb->size; - if (spare >= CL_METADATA_SIZE) { - s->safe_hwidx2 = i; - break; - } - } - } - if (sc->flags & IS_VF) return (0); @@ -1007,7 +930,7 @@ t4_sge_sysctls(struct adapter *sc, struct sysctl_ctx_l struct sge_params *sp = &sc->params.sge; SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "buffer_sizes", - CTLTYPE_STRING | CTLFLAG_RD, &sc->sge, 0, sysctl_bufsizes, "A", + CTLTYPE_STRING | CTLFLAG_RD, sc, 0, sysctl_bufsizes, "A", "freelist buffer sizes"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pktshift", CTLFLAG_RD, @@ -1115,28 +1038,19 @@ t4_teardown_adapter_queues(struct adapter *sc) return (0); } -/* Maximum payload that can be delivered with a single iq descriptor */ +/* Maximum payload that could arrive with a single iq descriptor. */ static inline int -mtu_to_max_payload(struct adapter *sc, int mtu, const int toe) +max_rx_payload(struct adapter *sc, struct ifnet *ifp, const bool ofld) { - int payload; + int maxp; -#ifdef TCP_OFFLOAD - if (toe) { - int rxcs = G_RXCOALESCESIZE(t4_read_reg(sc, A_TP_PARA_REG2)); - - /* Note that COP can set rx_coalesce on/off per connection. */ - payload = max(mtu, rxcs); - } else { -#endif - /* large enough even when hw VLAN extraction is disabled */ - payload = sc->params.sge.fl_pktshift + ETHER_HDR_LEN + - ETHER_VLAN_ENCAP_LEN + mtu; -#ifdef TCP_OFFLOAD - } -#endif - - return (payload); + /* large enough even when hw VLAN extraction is disabled */ + maxp = sc->params.sge.fl_pktshift + ETHER_HDR_LEN + + ETHER_VLAN_ENCAP_LEN + ifp->if_mtu; + if (ofld && sc->tt.tls && sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS && + maxp < sc->params.tp.max_rx_pdu) + maxp = sc->params.tp.max_rx_pdu; + return (maxp); } int @@ -1162,7 +1076,7 @@ t4_setup_vi_queues(struct vi_info *vi) struct ifnet *ifp = vi->ifp; struct sysctl_oid *oid = device_get_sysctl_tree(vi->dev); struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid); - int maxp, mtu = ifp->if_mtu; + int maxp; /* Interrupt vector to start from (when using multiple vectors) */ intr_idx = vi->first_intr; @@ -1206,7 +1120,7 @@ t4_setup_vi_queues(struct vi_info *vi) * Allocate rx queues first because a default iqid is required when * creating a tx queue. */ - maxp = mtu_to_max_payload(sc, mtu, 0); + maxp = max_rx_payload(sc, ifp, false); oid = SYSCTL_ADD_NODE(&vi->ctx, children, OID_AUTO, "rxq", CTLFLAG_RD, NULL, "rx queues"); for_each_rxq(vi, i, rxq) { @@ -1228,7 +1142,7 @@ t4_setup_vi_queues(struct vi_info *vi) intr_idx = saved_idx + max(vi->nrxq, vi->nnmrxq); #endif #ifdef TCP_OFFLOAD - maxp = mtu_to_max_payload(sc, mtu, 1); + maxp = max_rx_payload(sc, ifp, true); oid = SYSCTL_ADD_NODE(&vi->ctx, children, OID_AUTO, "ofld_rxq", CTLFLAG_RD, NULL, "rx queues for offloaded TCP connections"); for_each_ofld_rxq(vi, i, ofld_rxq) { @@ -1618,6 +1532,20 @@ last_flit_to_ns(struct adapter *sc, uint64_t lf) return (n * 1000000 / sc->params.vpd.cclk); } +static inline void +move_to_next_rxbuf(struct sge_fl *fl) +{ + + fl->rx_offset = 0; + if (__predict_false((++fl->cidx & 7) == 0)) { + uint16_t cidx = fl->cidx >> 3; + + if (__predict_false(cidx == fl->sidx)) + fl->cidx = cidx = 0; + fl->hw_cidx = cidx; + } +} + /* * Deals with interrupts on an iq+fl queue. */ @@ -1628,8 +1556,8 @@ service_iq_fl(struct sge_iq *iq, int budget) struct sge_fl *fl; struct adapter *sc = iq->adapter; struct iq_desc *d = &iq->desc[iq->cidx]; - int ndescs = 0, limit; - int rsp_type, refill, starved; + int ndescs, limit; + int rsp_type, starved; uint32_t lq; uint16_t fl_hw_cidx; struct mbuf *m0; @@ -1641,10 +1569,7 @@ service_iq_fl(struct sge_iq *iq, int budget) KASSERT(iq->state == IQS_BUSY, ("%s: iq %p not BUSY", __func__, iq)); MPASS(iq->flags & IQ_HAS_FL); - limit = budget ? budget : iq->qsize / 16; - fl = &rxq->fl; - fl_hw_cidx = fl->hw_cidx; /* stable snapshot */ - + ndescs = 0; #if defined(INET) || defined(INET6) if (iq->flags & IQ_ADJ_CREDIT) { MPASS(sort_before_lro(lro)); @@ -1662,38 +1587,40 @@ service_iq_fl(struct sge_iq *iq, int budget) MPASS((iq->flags & IQ_ADJ_CREDIT) == 0); #endif + limit = budget ? budget : iq->qsize / 16; + fl = &rxq->fl; + fl_hw_cidx = fl->hw_cidx; /* stable snapshot */ while ((d->rsp.u.type_gen & F_RSPD_GEN) == iq->gen) { rmb(); - refill = 0; m0 = NULL; rsp_type = G_RSPD_TYPE(d->rsp.u.type_gen); lq = be32toh(d->rsp.pldbuflen_qid); switch (rsp_type) { case X_RSPD_TYPE_FLBUF: + if (lq & F_RSPD_NEWBUF) { + if (fl->rx_offset > 0) + move_to_next_rxbuf(fl); + lq = G_RSPD_LEN(lq); + } + if (IDXDIFF(fl->hw_cidx, fl_hw_cidx, fl->sidx) > 4) { + FL_LOCK(fl); + refill_fl(sc, fl, 64); + FL_UNLOCK(fl); + fl_hw_cidx = fl->hw_cidx; + } + if (d->rss.opcode == CPL_RX_PKT) { + if (__predict_true(eth_rx(sc, rxq, d, lq) == 0)) + break; + goto out; + } m0 = get_fl_payload(sc, fl, lq); if (__predict_false(m0 == NULL)) goto out; - refill = IDXDIFF(fl->hw_cidx, fl_hw_cidx, fl->sidx) > 2; - if (iq->flags & IQ_RX_TIMESTAMP) { - /* - * Fill up rcv_tstmp but do not set M_TSTMP. - * rcv_tstmp is not in the format that the - * kernel expects and we don't want to mislead - * it. For now this is only for custom code - * that knows how to interpret cxgbe's stamp. - */ - m0->m_pkthdr.rcv_tstmp = - last_flit_to_ns(sc, d->rsp.u.last_flit); -#ifdef notyet - m0->m_flags |= M_TSTMP; -#endif - } - /* fall through */ case X_RSPD_TYPE_CPL: @@ -1737,7 +1664,6 @@ service_iq_fl(struct sge_iq *iq, int budget) t4_write_reg(sc, sc->sge_gts_reg, V_CIDXINC(ndescs) | V_INGRESSQID(iq->cntxt_id) | V_SEINTARM(V_QINTR_TIMER_IDX(X_TIMERREG_UPDATE_CIDX))); - ndescs = 0; #if defined(INET) || defined(INET6) if (iq->flags & IQ_LRO_ENABLED && @@ -1746,20 +1672,10 @@ service_iq_fl(struct sge_iq *iq, int budget) tcp_lro_flush_inactive(lro, &lro_timeout); } #endif - if (budget) { - FL_LOCK(fl); - refill_fl(sc, fl, 32); - FL_UNLOCK(fl); - + if (budget) return (EINPROGRESS); - } + ndescs = 0; } - if (refill) { - FL_LOCK(fl); - refill_fl(sc, fl, 32); - FL_UNLOCK(fl); - fl_hw_cidx = fl->hw_cidx; - } } out: #if defined(INET) || defined(INET6) @@ -1787,49 +1703,28 @@ out: return (0); } -static inline int -cl_has_metadata(struct sge_fl *fl, struct cluster_layout *cll) -{ - int rc = fl->flags & FL_BUF_PACKING || cll->region1 > 0; - - if (rc) - MPASS(cll->region3 >= CL_METADATA_SIZE); - - return (rc); -} - static inline struct cluster_metadata * -cl_metadata(struct adapter *sc, struct sge_fl *fl, struct cluster_layout *cll, - caddr_t cl) +cl_metadata(struct fl_sdesc *sd) { - if (cl_has_metadata(fl, cll)) { - struct sw_zone_info *swz = &sc->sge.sw_zone_info[cll->zidx]; - - return ((struct cluster_metadata *)(cl + swz->size) - 1); - } - return (NULL); + return ((void *)(sd->cl + sd->moff)); } static void rxb_free(struct mbuf *m) { - uma_zone_t zone = m->m_ext.ext_arg1; - void *cl = m->m_ext.ext_arg2; + struct cluster_metadata *clm = m->m_ext.ext_arg1; - uma_zfree(zone, cl); + uma_zfree(clm->zone, clm->cl); counter_u64_add(extfree_rels, 1); } /* - * The mbuf returned by this function could be allocated from zone_mbuf or - * constructed in spare room in the cluster. - * - * The mbuf carries the payload in one of these ways - * a) frame inside the mbuf (mbuf from zone_mbuf) - * b) m_cljset (for clusters without metadata) zone_mbuf - * c) m_extaddref (cluster with metadata) inline mbuf - * d) m_extaddref (cluster with metadata) zone_mbuf + * The mbuf returned comes from zone_muf and carries the payload in one of these + * ways + * a) complete frame inside the mbuf + * b) m_cljset (for clusters without metadata) + * d) m_extaddref (cluster with metadata) */ static struct mbuf * get_scatter_segment(struct adapter *sc, struct sge_fl *fl, int fr_offset, @@ -1837,118 +1732,86 @@ get_scatter_segment(struct adapter *sc, struct sge_fl { struct mbuf *m; struct fl_sdesc *sd = &fl->sdesc[fl->cidx]; - struct cluster_layout *cll = &sd->cll; - struct sw_zone_info *swz = &sc->sge.sw_zone_info[cll->zidx]; - struct hw_buf_info *hwb = &sc->sge.hw_buf_info[cll->hwidx]; - struct cluster_metadata *clm = cl_metadata(sc, fl, cll, sd->cl); + struct rx_buf_info *rxb = &sc->sge.rx_buf_info[sd->zidx]; + struct cluster_metadata *clm; int len, blen; caddr_t payload; - blen = hwb->size - fl->rx_offset; /* max possible in this buf */ - len = min(remaining, blen); - payload = sd->cl + cll->region1 + fl->rx_offset; if (fl->flags & FL_BUF_PACKING) { - const u_int l = fr_offset + len; - const u_int pad = roundup2(l, fl->buf_boundary) - l; + u_int l, pad; - if (fl->rx_offset + len + pad < hwb->size) + blen = rxb->size2 - fl->rx_offset; /* max possible in this buf */ + len = min(remaining, blen); + payload = sd->cl + fl->rx_offset; + + l = fr_offset + len; + pad = roundup2(l, fl->buf_boundary) - l; + if (fl->rx_offset + len + pad < rxb->size2) blen = len + pad; - MPASS(fl->rx_offset + blen <= hwb->size); + MPASS(fl->rx_offset + blen <= rxb->size2); } else { MPASS(fl->rx_offset == 0); /* not packing */ + blen = rxb->size1; + len = min(remaining, blen); + payload = sd->cl; } - - if (sc->sc_do_rxcopy && len < RX_COPY_THRESHOLD) { - - /* - * Copy payload into a freshly allocated mbuf. - */ - - m = fr_offset == 0 ? - m_gethdr(M_NOWAIT, MT_DATA) : m_get(M_NOWAIT, MT_DATA); - if (m == NULL) + if (fr_offset == 0) { + m = m_gethdr(M_NOWAIT, MT_DATA); + if (__predict_false(m == NULL)) return (NULL); - fl->mbuf_allocated++; + m->m_pkthdr.len = remaining; + } else { + m = m_get(M_NOWAIT, MT_DATA); + if (__predict_false(m == NULL)) + return (NULL); + } + m->m_len = len; + if (sc->sc_do_rxcopy && len < RX_COPY_THRESHOLD) { /* copy data to mbuf */ bcopy(payload, mtod(m, caddr_t), len); - - } else if (sd->nmbuf * MSIZE < cll->region1) { - - /* - * There's spare room in the cluster for an mbuf. Create one - * and associate it with the payload that's in the cluster. - */ - - MPASS(clm != NULL); - m = (struct mbuf *)(sd->cl + sd->nmbuf * MSIZE); - /* No bzero required */ - if (m_init(m, M_NOWAIT, MT_DATA, - fr_offset == 0 ? M_PKTHDR | M_NOFREE : M_NOFREE)) - return (NULL); - fl->mbuf_inlined++; - m_extaddref(m, payload, blen, &clm->refcount, rxb_free, - swz->zone, sd->cl); - if (sd->nmbuf++ == 0) + if (fl->flags & FL_BUF_PACKING) { + fl->rx_offset += blen; + MPASS(fl->rx_offset <= rxb->size2); + if (fl->rx_offset < rxb->size2) + return (m); /* without advancing the cidx */ + } + } else if (fl->flags & FL_BUF_PACKING) { + clm = cl_metadata(sd); + if (sd->nmbuf++ == 0) { + clm->refcount = 1; + clm->zone = rxb->zone; + clm->cl = sd->cl; counter_u64_add(extfree_refs, 1); - - } else { - - /* - * Grab an mbuf from zone_mbuf and associate it with the - * payload in the cluster. - */ - - m = fr_offset == 0 ? - m_gethdr(M_NOWAIT, MT_DATA) : m_get(M_NOWAIT, MT_DATA); - if (m == NULL) - return (NULL); - fl->mbuf_allocated++; - if (clm != NULL) { - m_extaddref(m, payload, blen, &clm->refcount, - rxb_free, swz->zone, sd->cl); - if (sd->nmbuf++ == 0) - counter_u64_add(extfree_refs, 1); - } else { - m_cljset(m, sd->cl, swz->type); - sd->cl = NULL; /* consumed, not a recycle candidate */ } - } - if (fr_offset == 0) - m->m_pkthdr.len = remaining; - m->m_len = len; + m_extaddref(m, payload, blen, &clm->refcount, rxb_free, clm, + NULL); - if (fl->flags & FL_BUF_PACKING) { fl->rx_offset += blen; - MPASS(fl->rx_offset <= hwb->size); - if (fl->rx_offset < hwb->size) + MPASS(fl->rx_offset <= rxb->size2); + if (fl->rx_offset < rxb->size2) return (m); /* without advancing the cidx */ + } else { + m_cljset(m, sd->cl, rxb->type); + sd->cl = NULL; /* consumed, not a recycle candidate */ } - if (__predict_false(++fl->cidx % 8 == 0)) { - uint16_t cidx = fl->cidx / 8; + move_to_next_rxbuf(fl); - if (__predict_false(cidx == fl->sidx)) - fl->cidx = cidx = 0; - fl->hw_cidx = cidx; - } - fl->rx_offset = 0; - return (m); } static struct mbuf * -get_fl_payload(struct adapter *sc, struct sge_fl *fl, uint32_t len_newbuf) +get_fl_payload(struct adapter *sc, struct sge_fl *fl, const u_int plen) { struct mbuf *m0, *m, **pnext; u_int remaining; - const u_int total = G_RSPD_LEN(len_newbuf); if (__predict_false(fl->flags & FL_BUF_RESUME)) { M_ASSERTPKTHDR(fl->m0); - MPASS(fl->m0->m_pkthdr.len == total); - MPASS(fl->remaining < total); + MPASS(fl->m0->m_pkthdr.len == plen); + MPASS(fl->remaining < plen); m0 = fl->m0; pnext = fl->pnext; @@ -1957,31 +1820,20 @@ get_fl_payload(struct adapter *sc, struct sge_fl *fl, goto get_segment; } - if (fl->rx_offset > 0 && len_newbuf & F_RSPD_NEWBUF) { - fl->rx_offset = 0; - if (__predict_false(++fl->cidx % 8 == 0)) { - uint16_t cidx = fl->cidx / 8; - - if (__predict_false(cidx == fl->sidx)) - fl->cidx = cidx = 0; - fl->hw_cidx = cidx; - } - } - /* * Payload starts at rx_offset in the current hw buffer. Its length is * 'len' and it may span multiple hw buffers. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Aug 25 02:21:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B57483B5D9A; Tue, 25 Aug 2020 02:21:32 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbCRJ4Yvjz4bsx; Tue, 25 Aug 2020 02:21:32 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 65A87226A2; Tue, 25 Aug 2020 02:21:32 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07P2LW54044861; Tue, 25 Aug 2020 02:21:32 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07P2LRST044836; Tue, 25 Aug 2020 02:21:27 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008250221.07P2LRST044836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Tue, 25 Aug 2020 02:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364746 - in head: . cddl/compat/opensolaris/include cddl/contrib/opensolaris/cmd/lockstat cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd... X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head: . cddl/compat/opensolaris/include cddl/contrib/opensolaris/cmd/lockstat cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zhack cddl/contrib/opens... X-SVN-Commit-Revision: 364746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 02:21:32 -0000 Author: mmacy Date: Tue Aug 25 02:21:27 2020 New Revision: 364746 URL: https://svnweb.freebsd.org/changeset/base/364746 Log: Merge OpenZFS support in to HEAD. The primary benefit is maintaining a completely shared code base with the community allowing FreeBSD to receive new features sooner and with less effort. I would advise against doing 'zpool upgrade' or creating indispensable pools using new features until this change has had a month+ to soak. Work on merging FreeBSD support in to what was at the time "ZFS on Linux" began in August 2018. I first publicly proposed transitioning FreeBSD to (new) OpenZFS on December 18th, 2018. FreeBSD support in OpenZFS was finally completed in December 2019. A CFT for downstreaming OpenZFS support in to FreeBSD was first issued on July 8th. All issues that were reported have been addressed or, for a couple of less critical matters there are pull requests in progress with OpenZFS. iXsystems has tested and dogfooded extensively internally. The TrueNAS 12 release is based on OpenZFS with some additional features that have not yet made it upstream. Improvements include: project quotas, encrypted datasets, allocation classes, vectorized raidz, vectorized checksums, various command line improvements, zstd compression. Thanks to those who have helped along the way: Ryan Moeller, Allan Jude, Zack Welch, and many others. Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25872 Added: head/cddl/lib/libicp/ head/cddl/lib/libicp/Makefile (contents, props changed) head/cddl/lib/libicp_rescue/ head/cddl/lib/libicp_rescue/Makefile (contents, props changed) head/cddl/lib/libspl/ head/cddl/lib/libspl/Makefile (contents, props changed) head/cddl/lib/libtpool/ head/cddl/lib/libtpool/Makefile (contents, props changed) head/cddl/lib/libzutil/ head/cddl/lib/libzutil/Makefile (contents, props changed) head/cddl/usr.bin/zstream/ head/cddl/usr.bin/zstream/Makefile (contents, props changed) head/sys/modules/zfs/static_ccompile.h (contents, props changed) head/sys/modules/zfs/zfs_config.h (contents, props changed) head/sys/modules/zfs/zfs_gitrev.h (contents, props changed) Deleted: head/cddl/compat/opensolaris/include/mnttab.h head/cddl/contrib/opensolaris/cmd/zdb/ head/cddl/contrib/opensolaris/cmd/zfs/ head/cddl/contrib/opensolaris/cmd/zhack/ head/cddl/contrib/opensolaris/cmd/zinject/ head/cddl/contrib/opensolaris/cmd/zlook/ head/cddl/contrib/opensolaris/cmd/zpool/ head/cddl/contrib/opensolaris/cmd/zstreamdump/ head/cddl/contrib/opensolaris/cmd/ztest/ head/cddl/contrib/opensolaris/lib/libnvpair/ head/cddl/contrib/opensolaris/lib/libuutil/ head/cddl/contrib/opensolaris/lib/libzfs/ head/cddl/contrib/opensolaris/lib/libzfs_core/ head/cddl/contrib/opensolaris/lib/libzpool/ head/cddl/usr.bin/zlook/ head/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c head/sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c head/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c head/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c head/sys/cddl/compat/opensolaris/kern/opensolaris_sunddi.c head/sys/cddl/compat/opensolaris/kern/opensolaris_sysevent.c head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c head/sys/cddl/compat/opensolaris/kern/opensolaris_zone.c head/sys/cddl/compat/opensolaris/sys/acl.h head/sys/cddl/compat/opensolaris/sys/file.h head/sys/cddl/compat/opensolaris/sys/kobj.h head/sys/cddl/compat/opensolaris/sys/lock.h head/sys/cddl/compat/opensolaris/sys/mman.h head/sys/cddl/compat/opensolaris/sys/mount.h head/sys/cddl/compat/opensolaris/sys/mutex.h head/sys/cddl/compat/opensolaris/sys/nvpair.h head/sys/cddl/compat/opensolaris/sys/param.h head/sys/cddl/compat/opensolaris/sys/proc.h head/sys/cddl/compat/opensolaris/sys/stat.h head/sys/cddl/compat/opensolaris/sys/systm.h head/sys/cddl/compat/opensolaris/sys/time.h head/sys/cddl/compat/opensolaris/sys/types.h head/sys/cddl/compat/opensolaris/sys/uio.h head/sys/cddl/compat/opensolaris/sys/vnode.h head/sys/cddl/contrib/opensolaris/common/acl/ head/sys/cddl/contrib/opensolaris/common/atomic/ head/sys/cddl/contrib/opensolaris/common/avl/ head/sys/cddl/contrib/opensolaris/common/nvpair/ head/sys/cddl/contrib/opensolaris/common/zfs/ head/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ head/sys/cddl/contrib/opensolaris/uts/common/os/callb.c head/sys/cddl/contrib/opensolaris/uts/common/os/fm.c head/sys/cddl/contrib/opensolaris/uts/common/os/nvpair_alloc_system.c head/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h head/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h head/sys/cddl/contrib/opensolaris/uts/common/sys/fm/ head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/ head/sys/cddl/contrib/opensolaris/uts/common/sys/nvpair.h head/sys/cddl/contrib/opensolaris/uts/common/sys/nvpair_impl.h head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h Modified: head/Makefile.inc1 head/cddl/compat/opensolaris/include/fcntl.h head/cddl/contrib/opensolaris/cmd/lockstat/sym.c head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c head/cddl/lib/Makefile head/cddl/lib/drti/Makefile head/cddl/lib/libavl/Makefile head/cddl/lib/libctf/Makefile head/cddl/lib/libdtrace/Makefile head/cddl/lib/libnvpair/Makefile head/cddl/lib/libuutil/Makefile head/cddl/lib/libzfs/Makefile head/cddl/lib/libzfs_core/Makefile head/cddl/lib/libzpool/Makefile head/cddl/lib/libzpool/Makefile.depend head/cddl/sbin/zfs/Makefile head/cddl/sbin/zpool/Makefile head/cddl/usr.bin/Makefile head/cddl/usr.bin/ctfconvert/Makefile head/cddl/usr.bin/ctfconvert/Makefile.depend head/cddl/usr.bin/ctfdump/Makefile head/cddl/usr.bin/ctfmerge/Makefile head/cddl/usr.bin/zinject/Makefile head/cddl/usr.bin/zstreamdump/Makefile head/cddl/usr.bin/ztest/Makefile head/cddl/usr.sbin/dtrace/Makefile head/cddl/usr.sbin/lockstat/Makefile head/cddl/usr.sbin/plockstat/Makefile head/cddl/usr.sbin/zdb/Makefile head/cddl/usr.sbin/zfsd/Makefile.common head/cddl/usr.sbin/zfsd/callout.cc head/cddl/usr.sbin/zfsd/case_file.cc head/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc head/cddl/usr.sbin/zfsd/vdev.cc head/cddl/usr.sbin/zfsd/vdev_iterator.cc head/cddl/usr.sbin/zfsd/zfsd.cc head/cddl/usr.sbin/zfsd/zfsd_event.cc head/cddl/usr.sbin/zfsd/zfsd_exception.cc head/cddl/usr.sbin/zfsd/zpool_list.cc head/cddl/usr.sbin/zhack/Makefile head/include/Makefile head/lib/libbe/Makefile head/lib/libbe/be.c head/lib/libbe/tests/Makefile head/lib/libproc/Makefile head/lib/libproc/proc_bkpt.c head/lib/libproc/proc_sym.c head/lib/libprocstat/libprocstat.c head/lib/libprocstat/zfs/Makefile head/lib/libprocstat/zfs_defs.c head/libexec/rc/rc.d/zfs head/rescue/rescue/Makefile head/sbin/bectl/Makefile head/sbin/bectl/Makefile.depend head/sbin/bectl/bectl.c head/sbin/zfsbootcfg/Makefile head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk head/sys/cddl/compat/opensolaris/kern/opensolaris.c head/sys/cddl/compat/opensolaris/sys/misc.h head/sys/cddl/compat/opensolaris/sys/modctl.h head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c head/sys/cddl/contrib/opensolaris/uts/common/sys/ccompile.h head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c head/sys/cddl/dev/fbt/fbt.c head/sys/cddl/dev/profile/profile.c head/sys/cddl/dev/sdt/sdt.c head/sys/cddl/dev/systrace/systrace.c head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk head/sys/modules/Makefile head/sys/modules/dtrace/dtaudit/Makefile head/sys/modules/dtrace/dtmalloc/Makefile head/sys/modules/dtrace/dtnfscl/Makefile head/sys/modules/dtrace/dtrace/Makefile head/sys/modules/dtrace/fasttrap/Makefile head/sys/modules/dtrace/fbt/Makefile head/sys/modules/dtrace/profile/Makefile head/sys/modules/dtrace/prototype/Makefile head/sys/modules/dtrace/sdt/Makefile head/sys/modules/dtrace/systrace/Makefile head/sys/modules/dtrace/systrace_freebsd32/Makefile head/sys/modules/dtrace/systrace_linux/Makefile head/sys/modules/dtrace/systrace_linux32/Makefile head/sys/modules/opensolaris/Makefile head/sys/modules/zfs/Makefile head/sys/vm/vm.h head/tests/sys/cddl/zfs/bin/file_write.c head/tools/boot/rootgen.sh head/usr.sbin/fstyp/Makefile head/usr.sbin/fstyp/zfs.c Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Aug 25 02:14:36 2020 (r364745) +++ head/Makefile.inc1 Tue Aug 25 02:21:27 2020 (r364746) @@ -2442,7 +2442,7 @@ _btxld= usr.sbin/btxld # 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 cddl/usr.bin/ctfconvert \ +_dtrace_tools= cddl/lib/libctf cddl/lib/libspl cddl/usr.bin/ctfconvert \ cddl/usr.bin/ctfmerge .endif @@ -2756,7 +2756,12 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ ${_cddl_lib_libuutil} \ ${_cddl_lib_libavl} \ + ${_cddl_lib_libicp} \ + ${_cddl_lib_libicp_rescue} \ + ${_cddl_lib_libspl} \ + ${_cddl_lib_libtpool} \ ${_cddl_lib_libzfs_core} ${_cddl_lib_libzfs} \ + ${_cddl_lib_libzutil} \ ${_cddl_lib_libctf} \ lib/libufs \ lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \ @@ -2826,21 +2831,34 @@ _cddl_lib_libumem= cddl/lib/libumem _cddl_lib_libnvpair= cddl/lib/libnvpair _cddl_lib_libavl= cddl/lib/libavl _cddl_lib_libuutil= cddl/lib/libuutil +_cddl_lib_libspl= cddl/lib/libspl + +cddl/lib/libuutil__L: cddl/lib/libavl__L cddl/lib/libspl__L + .if ${MK_ZFS} != "no" +_cddl_lib_libicp= cddl/lib/libicp +_cddl_lib_libicp_rescue= cddl/lib/libicp_rescue +_cddl_lib_libtpool= cddl/lib/libtpool +_cddl_lib_libzutil= cddl/lib/libzutil _cddl_lib_libzfs_core= cddl/lib/libzfs_core _cddl_lib_libzfs= cddl/lib/libzfs +cddl/lib/libtpool__L: cddl/lib/libspl__L + +cddl/lib/libzutil__L: cddl/lib/libavl__L cddl/lib/libtpool__L + cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L cddl/lib/libzfs__L: cddl/lib/libzfs_core__L lib/msun__L lib/libutil__L cddl/lib/libzfs__L: lib/libthr__L lib/libmd__L lib/libz__L cddl/lib/libumem__L cddl/lib/libzfs__L: cddl/lib/libuutil__L cddl/lib/libavl__L lib/libgeom__L +cddl/lib/libzfs__L: cddl/lib/libnvpair__L cddl/lib/libzutil__L lib/libbe__L: cddl/lib/libzfs__L .endif _cddl_lib_libctf= cddl/lib/libctf _cddl_lib= cddl/lib -cddl/lib/libctf__L: lib/libz__L +cddl/lib/libctf__L: lib/libz__L cddl/lib/libspl__L .endif # cddl/lib/libdtrace requires lib/libproc and lib/librtld_db _prebuild_libs+= lib/libprocstat lib/libproc lib/librtld_db Modified: head/cddl/compat/opensolaris/include/fcntl.h ============================================================================== --- head/cddl/compat/opensolaris/include/fcntl.h Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/compat/opensolaris/include/fcntl.h Tue Aug 25 02:21:27 2020 (r364746) @@ -32,7 +32,9 @@ #include_next +#ifndef open64 #define open64(...) open(__VA_ARGS__) +#endif #define openat64(...) openat(__VA_ARGS__) #endif Modified: head/cddl/contrib/opensolaris/cmd/lockstat/sym.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Tue Aug 25 02:21:27 2020 (r364746) @@ -54,6 +54,7 @@ #endif #include + typedef struct syment { uintptr_t addr; char *name; @@ -71,6 +72,11 @@ static char maxsymname[64]; #define elf_getshdr elf32_getshdr #endif #endif + +#define __sElfN(x) typedef __CONCAT(__CONCAT(__CONCAT(Elf,__ELF_WORD_SIZE),_),x) x +__sElfN(Sym); +__sElfN(Shdr); +#define elf_getshdr __elfN(getshdr) static void add_symbol(char *name, uintptr_t addr, size_t size) Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Tue Aug 25 02:21:27 2020 (r364746) @@ -24,6 +24,7 @@ * Use is subject to license terms. */ +#include #include #include #include Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Tue Aug 25 02:21:27 2020 (r364746) @@ -31,6 +31,7 @@ #include #include +#include #include #include #include Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c Tue Aug 25 02:21:27 2020 (r364746) @@ -77,7 +77,6 @@ #include #include #include -#include #include #include Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c Tue Aug 25 02:21:27 2020 (r364746) @@ -44,11 +44,18 @@ #include #include #include -#include - +#include #include #include #include + +#ifndef NS_IN6ADDRSZ +#define NS_IN6ADDRSZ 16 +#endif + +#ifndef NS_INADDRSZ +#define NS_INADDRSZ 4 +#endif /*ARGSUSED*/ static int Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c Tue Aug 25 02:21:27 2020 (r364746) @@ -29,6 +29,7 @@ * Utility functions */ +#include #include #include #include Modified: head/cddl/lib/Makefile ============================================================================== --- head/cddl/lib/Makefile Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/lib/Makefile Tue Aug 25 02:21:27 2020 (r364746) @@ -6,27 +6,40 @@ SUBDIR= drti \ libavl \ libctf \ libdtrace \ + ${_libicp} \ + ${_libicp_rescue} \ libnvpair \ + libspl \ + ${_libtpool} \ libumem \ libuutil \ ${_libzfs_core} \ ${_libzfs} \ ${_libzpool} \ + ${_libzutil} SUBDIR.${MK_TESTS}+= tests .if ${MK_ZFS} != "no" _libzfs_core= libzfs_core +_libicp= libicp +_libicp_rescue= libicp_rescue _libzfs= libzfs +_libzutil= libzutil .if ${MK_LIBTHR} != "no" _libzpool= libzpool +_libtpool= libtpool .endif .endif +SUBDIR_DEPEND_libctf= libspl SUBDIR_DEPEND_libdtrace= libctf +SUBDIR_DEPEND_libtpool= libspl +SUBDIR_DEPEND_libuutil= libavl libspl SUBDIR_DEPEND_libzfs_core= libnvpair -SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core -SUBDIR_DEPEND_libzpool= libavl libnvpair libumem +SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core libzutil +SUBDIR_DEPEND_libzpool= libavl libnvpair libumem libicp +SUBDIR_DEPEND_libzutil= libavl libtpool SUBDIR_PARALLEL= Modified: head/cddl/lib/drti/Makefile ============================================================================== --- head/cddl/lib/drti/Makefile Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/lib/drti/Makefile Tue Aug 25 02:21:27 2020 (r364746) @@ -11,7 +11,14 @@ FILESDIR= ${LIBDIR}/dtrace CLEANFILES= ${FILES} # These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. .undef LIBRARIES_ONLY - +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${OPENSOLARIS_USR_DISTDIR}/head \ Modified: head/cddl/lib/libavl/Makefile ============================================================================== --- head/cddl/lib/libavl/Makefile Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/lib/libavl/Makefile Tue Aug 25 02:21:27 2020 (r364746) @@ -1,12 +1,15 @@ # $FreeBSD$ -.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/avl +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/avl PACKAGE= runtime LIB= avl SRCS= avl.c WARNS?= 3 -CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common - +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h .include Modified: head/cddl/lib/libctf/Makefile ============================================================================== --- head/cddl/lib/libctf/Makefile Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/lib/libctf/Makefile Tue Aug 25 02:21:27 2020 (r364746) @@ -21,6 +21,14 @@ MAN= ctf.5 WARNS?= 2 CFLAGS+= -DCTF_OLD_VERSIONS +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID + CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${OPENSOLARIS_USR_DISTDIR}/head \ @@ -28,6 +36,6 @@ CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common -LIBADD+= z +LIBADD+= spl z .include Modified: head/cddl/lib/libdtrace/Makefile ============================================================================== --- head/cddl/lib/libdtrace/Makefile Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/lib/libdtrace/Makefile Tue Aug 25 02:21:27 2020 (r364746) @@ -66,6 +66,16 @@ FILESMODE= ${NOBINMODE} WARNS?= 1 +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID + + CFLAGS+= -I${.OBJDIR} -I${.CURDIR} \ -I${SRCTOP}/sys/cddl/dev/dtrace/${MACHINE_ARCH} \ -I${SRCTOP}/sys/cddl/compat/opensolaris \ Added: head/cddl/lib/libicp/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/lib/libicp/Makefile Tue Aug 25 02:21:27 2020 (r364746) @@ -0,0 +1,101 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp + +PACKAGE= runtime +LIB= icp +LIBADD= + + +.if ${MACHINE_ARCH} == "amd64" +ASM_SOURCES_C = asm-x86_64/aes/aeskey.c +ASM_SOURCES_AS = \ + asm-x86_64/aes/aes_amd64.S \ + asm-x86_64/aes/aes_aesni.S \ + asm-x86_64/modes/gcm_pclmulqdq.S \ + asm-x86_64/modes/aesni-gcm-x86_64.S \ + asm-x86_64/modes/ghash-x86_64.S \ + asm-x86_64/sha1/sha1-x86_64.S \ + asm-x86_64/sha2/sha256_impl.S \ + asm-x86_64/sha2/sha512_impl.S + +CFLAGS+= -D__amd64 -D_SYS_STACK_H -UHAVE_AES +.else +ASM_SOURCES_C = +ASM_SOURCES_AS = +.endif + + +KERNEL_C = \ + spi/kcf_spi.c \ + api/kcf_ctxops.c \ + api/kcf_digest.c \ + api/kcf_cipher.c \ + api/kcf_miscapi.c \ + api/kcf_mac.c \ + algs/aes/aes_impl_aesni.c \ + algs/aes/aes_impl_generic.c \ + algs/aes/aes_impl_x86-64.c \ + algs/aes/aes_impl.c \ + algs/aes/aes_modes.c \ + algs/edonr/edonr.c \ + algs/modes/modes.c \ + algs/modes/cbc.c \ + algs/modes/gcm_generic.c \ + algs/modes/gcm_pclmulqdq.c \ + algs/modes/gcm.c \ + algs/modes/ctr.c \ + algs/modes/ccm.c \ + algs/modes/ecb.c \ + algs/sha1/sha1.c \ + algs/sha2/sha2.c \ + algs/skein/skein.c \ + algs/skein/skein_block.c \ + algs/skein/skein_iv.c \ + illumos-crypto.c \ + io/aes.c \ + io/edonr_mod.c \ + io/sha1_mod.c \ + io/sha2_mod.c \ + io/skein_mod.c \ + os/modhash.c \ + os/modconf.c \ + core/kcf_sched.c \ + core/kcf_prov_lib.c \ + core/kcf_callprov.c \ + core/kcf_mech_tabs.c \ + core/kcf_prov_tabs.c \ + $(ASM_SOURCES_C) + + + + + + +SRCS= $(ASM_SOURCES_AS) $(KERNEL_C) + +WARNS?= 2 +SHLIB_MAJOR= 3 +CSTD= c99 +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h + + +CFLAGS.aes_amd64.S+= -DLOCORE +CFLAGS.aes_aesni.S+= -DLOCORE +CFLAGS.gcm_pclmulqdq.S+= -DLOCORE +CFLAGS.aesni-gcm-x86_64.S+= -DLOCORE +CFLAGS.ghash-x86_64.S+= -DLOCORE +CFLAGS.sha1-x86_64.S+= -DLOCORE +CFLAGS.sha256_impl.S+= -DLOCORE +CFLAGS.sha512_impl.S+= -DLOCORE + +.include Added: head/cddl/lib/libicp_rescue/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/lib/libicp_rescue/Makefile Tue Aug 25 02:21:27 2020 (r364746) @@ -0,0 +1,99 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp + +PACKAGE= runtime +LIB= icp_rescue +LIBADD= + + +.if ${MACHINE_ARCH} == "amd64" +ASM_SOURCES_C = asm-x86_64/aes/aeskey.c +ASM_SOURCES_AS = \ + asm-x86_64/aes/aes_amd64.S \ + asm-x86_64/aes/aes_aesni.S \ + asm-x86_64/modes/gcm_pclmulqdq.S \ + asm-x86_64/modes/aesni-gcm-x86_64.S \ + asm-x86_64/sha1/sha1-x86_64.S \ + asm-x86_64/sha2/sha256_impl.S \ + asm-x86_64/sha2/sha512_impl.S + +CFLAGS+= -D__amd64 -D_SYS_STACK_H +.else +ASM_SOURCES_C = +ASM_SOURCES_AS = +.endif + + +KERNEL_C = \ + spi/kcf_spi.c \ + api/kcf_ctxops.c \ + api/kcf_digest.c \ + api/kcf_cipher.c \ + api/kcf_miscapi.c \ + api/kcf_mac.c \ + algs/aes/aes_impl_aesni.c \ + algs/aes/aes_impl_generic.c \ + algs/aes/aes_impl_x86-64.c \ + algs/aes/aes_impl.c \ + algs/aes/aes_modes.c \ + algs/edonr/edonr.c \ + algs/modes/modes.c \ + algs/modes/cbc.c \ + algs/modes/gcm_generic.c \ + algs/modes/gcm_pclmulqdq.c \ + algs/modes/gcm.c \ + algs/modes/ctr.c \ + algs/modes/ccm.c \ + algs/modes/ecb.c \ + algs/sha1/sha1.c \ + algs/sha2/sha2.c \ + algs/skein/skein_block.c \ + illumos-crypto.c \ + io/aes.c \ + io/edonr_mod.c \ + io/sha1_mod.c \ + io/sha2_mod.c \ + io/skein_mod.c \ + os/modhash.c \ + os/modconf.c \ + core/kcf_sched.c \ + core/kcf_prov_lib.c \ + core/kcf_callprov.c \ + core/kcf_mech_tabs.c \ + core/kcf_prov_tabs.c \ + $(ASM_SOURCES_C) + + + + + + +SRCS= $(ASM_SOURCES_AS) $(KERNEL_C) + +WARNS?= 2 +SHLIB_MAJOR= 3 +CSTD= c99 +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID -UHAVE_AVX -DRESCUE +CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h + + +CFLAGS.aes_amd64.S+= -DLOCORE +CFLAGS.aes_aesni.S+= -DLOCORE +CFLAGS.gcm_pclmulqdq.S+= -DLOCORE +CFLAGS.aesni-gcm-x86_64.S+= -DLOCORE +CFLAGS.ghash-x86_64.S+= -DLOCORE +CFLAGS.sha1-x86_64.S+= -DLOCORE +CFLAGS.sha256_impl.S+= -DLOCORE +CFLAGS.sha512_impl.S+= -DLOCORE +CFLAGS.gcm.c+= -UCAN_USE_GCM_ASM + +.include Modified: head/cddl/lib/libnvpair/Makefile ============================================================================== --- head/cddl/lib/libnvpair/Makefile Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/lib/libnvpair/Makefile Tue Aug 25 02:21:27 2020 (r364746) @@ -1,36 +1,30 @@ # $FreeBSD$ -.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair -.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/nvpair +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/nvpair +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libnvpair LIB= nvpair PACKAGE= runtime -INCS= libnvpair.h +# user SRCS= libnvpair.c \ - nvpair_alloc_system.c \ - nvpair_json.c \ - opensolaris_fnvpair.c \ - opensolaris_nvpair.c \ - opensolaris_nvpair_alloc_fixed.c + libnvpair_json.c \ + nvpair_alloc_system.c +# kernel +SRCS+= nvpair_alloc_fixed.c \ + nvpair.c \ + fnvpair.c -WARNS?= 1 -CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +WARNS?= 2 +CFLAGS+= -DIN_BASE -DHAVE_RPC_TYPES +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head -CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID -DHAVE_CONFIG_H -DHAVE_XDR_BYTESREC -# This library uses macros to define fprintf behavior for several object types -# The compiler will see the non-string literal arguments to the fprintf calls and -# omit warnings for them. Quiesce these warnings in contrib code: -# -# cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:743:12: warning: format -# string is not a string literal (potentially insecure) [-Wformat-security] -# ARENDER(pctl, nvlist_array, nvl, name, val, nelem); -# -CFLAGS+= -Wno-format-security + +CFLAGS.nvpair.c+= -UHAVE_RPC_TYPES .include Added: head/cddl/lib/libspl/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/lib/libspl/Makefile Tue Aug 25 02:21:27 2020 (r364746) @@ -0,0 +1,56 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/os/freebsd +.PATH: ${SRCTOP}/sys/contrib/openzfs/include + + +LIB= spl +LIBADD= +PACKAGE= runtime + +SRCS = \ + assert.c \ + list.c \ + mkdirp.c \ + page.c \ + strlcat.c \ + strlcpy.c \ + timestamp.c \ + zone.c \ + include/sys/list.h \ + include/sys/list_impl.h + +SRCS += \ + getexecname.c \ + gethostid.c \ + getmntany.c \ + mnttab.c + + +.if ${MACHINE_ARCH} == "amd64" +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/asm-x86_64 +SRCS += atomic.S +.elif ${MACHINE_ARCH} == "i386" +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/asm-i386 +SRCS += atomic.S +.else +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/asm-generic +SRCS += atomic.c +.endif + + +WARNS?= 2 +CSTD= c99 +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h +CFLAGS.atomic.S+= -DLOCORE + +.include Added: head/cddl/lib/libtpool/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/lib/libtpool/Makefile Tue Aug 25 02:21:27 2020 (r364746) @@ -0,0 +1,27 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libtpool +.PATH: ${SRCTOP}/sys/contrib/openzfs/include + + +LIB= tpool +LIBADD= spl +PACKAGE= runtime + +INCS= thread_pool_impl.h +SRCS= thread_pool.c + +WARNS?= 2 +CSTD= c99 +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h + +.include Modified: head/cddl/lib/libuutil/Makefile ============================================================================== --- head/cddl/lib/libuutil/Makefile Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/lib/libuutil/Makefile Tue Aug 25 02:21:27 2020 (r364746) @@ -1,11 +1,10 @@ # $FreeBSD$ -.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common -.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/avl +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libuutil PACKAGE= runtime LIB= uutil -SRCS= avl.c \ +SRCS=\ uu_alloc.c \ uu_avl.c \ uu_dprintf.c \ @@ -14,14 +13,17 @@ SRCS= avl.c \ uu_misc.c \ uu_open.c \ uu_pname.c \ - uu_strtoint.c + uu_string.c -WARNS?= 1 -CFLAGS+= -DNATIVE_BUILD -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common -CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common +WARNS?= 2 +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h + +LIBADD= avl spl .include Modified: head/cddl/lib/libzfs/Makefile ============================================================================== --- head/cddl/lib/libzfs/Makefile Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/lib/libzfs/Makefile Tue Aug 25 02:21:27 2020 (r364746) @@ -1,62 +1,102 @@ # $FreeBSD$ -.PATH: ${SRCTOP}/cddl/compat/opensolaris/misc -.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs -.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs -.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common -.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils/common +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zcommon +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs/os/freebsd +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare/os/freebsd +.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd/lib PACKAGE= runtime LIB= zfs -LIBADD= md pthread umem util uutil m avl bsdxml geom nvpair z zfs_core -SRCS= deviceid.c \ - fsshare.c \ - mkdirp.c \ - mnttab.c \ - thread_pool.c \ - zmount.c \ - zone.c +LIBADD= md pthread umem util uutil m avl bsdxml geom nvpair z zfs_core zutil -SRCS+= nicenum.c +INCS= libzfs.h +USER_C = \ + libzfs_changelist.c \ + libzfs_config.c \ + libzfs_crypto.c \ + libzfs_dataset.c \ + libzfs_diff.c \ + libzfs_import.c \ + libzfs_iter.c \ + libzfs_mount.c \ + libzfs_pool.c \ + libzfs_sendrecv.c \ + libzfs_status.c \ + libzfs_util.c -SRCS+= libzfs_changelist.c \ - libzfs_compat.c \ - libzfs_config.c \ - libzfs_dataset.c \ - libzfs_diff.c \ - libzfs_import.c \ - libzfs_iter.c \ - libzfs_mount.c \ - libzfs_pool.c \ - libzfs_sendrecv.c \ - libzfs_status.c \ - libzfs_util.c \ - zfeature_common.c \ - zfs_comutil.c \ - zfs_deleg.c \ - zfs_fletcher.c \ - zfs_namecheck.c \ - zfs_prop.c \ - zpool_prop.c \ - zprop_common.c \ +# FreeBSD +USER_C += \ + libzfs_compat.c \ + libzfs_ioctl_compat.c \ + libzfs_zmount.c -WARNS?= 0 -SHLIB_MAJOR= 3 +# libshare +USER_C += \ + libshare.c \ + nfs.c \ + smb.c + + +KERNEL_C = \ + algs/sha2/sha2.c \ + cityhash.c \ + zfeature_common.c \ + zfs_comutil.c \ + zfs_deleg.c \ + zfs_fletcher.c \ + zfs_fletcher_superscalar.c \ + zfs_fletcher_superscalar4.c \ + zfs_namecheck.c \ + zfs_prop.c \ + zfs_uio.c \ + zpool_prop.c \ + zprop_common.c + + +KERNEL_C+= zstd.c \ + zfs_zstd.c + + +ARCH_C = +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +ARCH_C += zfs_fletcher_intel.c \ + zfs_fletcher_sse.c +CFLAGS += -DHAVE_SSE2 +.endif +.if ${MACHINE_ARCH} == "amd64" +ARCH_C += zfs_fletcher_avx512.c +CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_AVX512F +.endif +.if ${MACHINE_ARCH} == "aarch64" +ARCH_C += zfs_fletcher_aarch64_neon.c +.endif + +SRCS= $(USER_C) $(KERNEL_C) $(ARCH_C) + +WARNS?= 2 +SHLIB_MAJOR= 4 CSTD= c99 -CFLAGS+= -DZFS_NO_ACL -CFLAGS+= -I${SRCTOP}/sbin/mount -CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libshare +CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include +CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include +CFLAGS+= -I${SRCDIR}/sys/contrib/openzfs/module/zstd/include +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h +CFLAGS.zfs_zstd.c= -Wno-cast-qual -Wno-pointer-arith +CFLAGS.zstd.c= -fno-tree-vectorize + .include Modified: head/cddl/lib/libzfs_core/Makefile ============================================================================== --- head/cddl/lib/libzfs_core/Makefile Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/lib/libzfs_core/Makefile Tue Aug 25 02:21:27 2020 (r364746) @@ -1,37 +1,28 @@ # $FreeBSD$ -.PATH: ${SRCTOP}/cddl/compat/opensolaris/misc -.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs -.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs -.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common -.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs_core +.PATH: ${SRCTOP}/sys/contrib/openzfs/include + LIB= zfs_core LIBADD= nvpair PACKAGE= runtime INCS= libzfs_core.h -SRCS= libzfs_core.c \ - libzfs_core_compat.c \ - zfs_ioctl_compat.c +SRCS= libzfs_core.c -SRCS+= libzfs_compat.c - -WARNS?= 0 +WARNS?= 2 CSTD= c99 -CFLAGS+= -DZFS_NO_ACL -CFLAGS+= -I${SRCTOP}/sbin/mount -CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzfs_core/common +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libuutil/common -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h .include Modified: head/cddl/lib/libzpool/Makefile ============================================================================== --- head/cddl/lib/libzpool/Makefile Tue Aug 25 02:14:36 2020 (r364745) +++ head/cddl/lib/libzpool/Makefile Tue Aug 25 02:21:27 2020 (r364746) @@ -1,20 +1,17 @@ # $FreeBSD$ -.include "${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/Makefile.files" # ZFS_COMMON_SRCS -.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zfs +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zcommon +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/unicode # LUA_SRCS -.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua -# ZFS_SHARED_SRCS -.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs -# LZ4_COMMON_SRCS -.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4 -# KERNEL_SRCS -.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common -# LIST_SRCS -.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/os -# ATOMIC_SRCS +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/lua + +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/os/linux/zfs + +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzpool + .if exists(${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}/opensolaris_atomic.S) .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} ATOMIC_SRCS= opensolaris_atomic.S @@ -23,40 +20,218 @@ ACFLAGS+= -Wa,--noexecstack .PATH: ${SRCTOP}/sys/cddl/compat/opensolaris/kern ATOMIC_SRCS= opensolaris_atomic.c .endif -# UNICODE_SRCS -.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/unicode -# LIBCMDUTILS_SRCS -.PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils/common +.if ${MACHINE_ARCH} == "powerpc" +# Don't waste GOT entries on small data. +PICFLAG= -fPIC +.endif + LIB= zpool -ZFS_COMMON_SRCS= ${ZFS_COMMON_OBJS:C/.o$/.c/} trim_map.c -ZFS_SHARED_SRCS= ${ZFS_SHARED_OBJS:C/.o$/.c/} -LZ4_COMMON_SRCS= lz4.c -LUA_SRCS= ${LUA_OBJS:C/.o$/.c/} -KERNEL_SRCS= kernel.c taskq.c util.c -LIST_SRCS= list.c -UNICODE_SRCS= u8_textprep.c -LIBCMDUTILS_SRCS=nicenum.c -SRCS= ${ZFS_COMMON_SRCS} ${ZFS_SHARED_SRCS} ${LUA_SRCS} \ - ${LZ4_COMMON_SRCS} ${KERNEL_SRCS} ${LIST_SRCS} ${ATOMIC_SRCS} \ - ${UNICODE_SRCS} ${LIBCMDUTILS_SRCS} -WARNS?= 0 -CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris -CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4 -CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair -CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils +USER_C = \ + kernel.c \ + taskq.c \ + util.c + +KERNEL_C = \ + zfeature_common.c \ + zfs_comutil.c \ + zfs_deleg.c \ + zfs_fletcher.c \ + zfs_fletcher_superscalar.c \ + zfs_fletcher_superscalar4.c \ + zfs_namecheck.c \ + zfs_prop.c \ + zfs_uio.c \ + zpool_prop.c \ + zprop_common.c \ + abd.c \ + abd_os.c \ + aggsum.c \ + arc.c \ + arc_os.c \ + blkptr.c \ + bplist.c \ + bpobj.c \ + bptree.c \ + btree.c \ + bqueue.c \ + cityhash.c \ + dbuf.c \ + dbuf_stats.c \ + ddt.c \ + ddt_zap.c \ + dmu.c \ + dmu_diff.c \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Aug 25 02:22:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D2D873B5E54; Tue, 25 Aug 2020 02:22:49 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbCSn5Kbjz4cV7; Tue, 25 Aug 2020 02:22:49 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CB6E228B5; Tue, 25 Aug 2020 02:22:49 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07P2Mnni046597; Tue, 25 Aug 2020 02:22:49 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07P2Mnq7046596; Tue, 25 Aug 2020 02:22:49 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008250222.07P2Mnq7046596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Tue, 25 Aug 2020 02:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364747 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 364747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 02:22:49 -0000 Author: mmacy Date: Tue Aug 25 02:22:49 2020 New Revision: 364747 URL: https://svnweb.freebsd.org/changeset/base/364747 Log: Bump __FreeBSD_version for OpenZFS switchover Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Aug 25 02:21:27 2020 (r364746) +++ head/sys/sys/param.h Tue Aug 25 02:22:49 2020 (r364747) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300111 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300112 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Tue Aug 25 02:42:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BCCC73B707B; Tue, 25 Aug 2020 02:42:08 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbCv44YdRz4dkJ; Tue, 25 Aug 2020 02:42:08 +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 7FBE022CC9; Tue, 25 Aug 2020 02:42:08 +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 07P2g8Ah057889; Tue, 25 Aug 2020 02:42:08 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07P2g8X4057888; Tue, 25 Aug 2020 02:42:08 GMT (envelope-from np@FreeBSD.org) Message-Id: <202008250242.07P2g8X4057888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 25 Aug 2020 02:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364748 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 364748 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 02:42:08 -0000 Author: np Date: Tue Aug 25 02:42:07 2020 New Revision: 364748 URL: https://svnweb.freebsd.org/changeset/base/364748 Log: MFC r362532: cxgbe(4): Add a tx_len16_to_desc helper. No functional change. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Tue Aug 25 02:22:49 2020 (r364747) +++ stable/12/sys/dev/cxgbe/adapter.h Tue Aug 25 02:42:07 2020 (r364748) @@ -1313,4 +1313,12 @@ write_via_memwin(struct adapter *sc, int idx, uint32_t return (rw_via_memwin(sc, idx, addr, (void *)(uintptr_t)val, len, 1)); } + +/* Number of len16 -> number of descriptors */ +static inline int +tx_len16_to_desc(int len16) +{ + + return (howmany(len16, EQ_ESIZE / 16)); +} #endif Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Tue Aug 25 02:22:49 2020 (r364747) +++ stable/12/sys/dev/cxgbe/t4_sge.c Tue Aug 25 02:42:07 2020 (r364748) @@ -2522,7 +2522,7 @@ start_wrq_wr(struct sge_wrq *wrq, int len16, struct wr void *w; MPASS(len16 > 0); - ndesc = howmany(len16, EQ_ESIZE / 16); + ndesc = tx_len16_to_desc(len16); MPASS(ndesc > 0 && ndesc <= SGE_MAX_WR_NDESC); EQ_LOCK(eq); @@ -2734,9 +2734,9 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx) M_ASSERTPKTHDR(m0); MPASS(m0->m_nextpkt == NULL); - if (available < SGE_MAX_WR_NDESC) { + if (available < tx_len16_to_desc(mbuf_len16(m0))) { available += reclaim_tx_descs(txq, 64); - if (available < howmany(mbuf_len16(m0), EQ_ESIZE / 16)) + if (available < tx_len16_to_desc(mbuf_len16(m0))) break; /* out of descriptors */ } @@ -4440,7 +4440,7 @@ write_txpkt_vm_wr(struct adapter *sc, struct sge_txq * ctrl = sizeof(struct cpl_tx_pkt_core); if (needs_tso(m0)) ctrl += sizeof(struct cpl_tx_pkt_lso_core); - ndesc = howmany(len16, EQ_ESIZE / 16); + ndesc = tx_len16_to_desc(len16); MPASS(ndesc <= available); /* Firmware work request header */ @@ -4551,7 +4551,7 @@ write_raw_wr(struct sge_txq *txq, void *wr, struct mbu int len16, ndesc; len16 = mbuf_len16(m0); - ndesc = howmany(len16, EQ_ESIZE / 16); + ndesc = tx_len16_to_desc(len16); MPASS(ndesc <= available); dst = wr; @@ -4603,7 +4603,7 @@ write_txpkt_wr(struct adapter *sc, struct sge_txq *txq sizeof(struct cpl_tx_pkt_core) + pktlen, 16); nsegs = 0; } - ndesc = howmany(len16, EQ_ESIZE / 16); + ndesc = tx_len16_to_desc(len16); MPASS(ndesc <= available); /* Firmware work request header */ @@ -4709,7 +4709,7 @@ try_txpkts(struct mbuf *m, struct mbuf *n, struct txpk l2 = txpkts0_len16(nsegs2); } txp->len16 = howmany(sizeof(struct fw_eth_tx_pkts_wr), 16) + l1 + l2; - needed = howmany(txp->len16, EQ_ESIZE / 16); + needed = tx_len16_to_desc(txp->len16); if (needed > SGE_MAX_WR_NDESC || needed > available) return (1); @@ -4743,7 +4743,7 @@ add_to_txpkts(struct mbuf *m, struct txpkts *txp, u_in len16 = txpkts0_len16(nsegs); else len16 = txpkts1_len16(); - needed = howmany(txp->len16 + len16, EQ_ESIZE / 16); + needed = tx_len16_to_desc(txp->len16 + len16); if (needed > SGE_MAX_WR_NDESC || needed > available) return (1); @@ -4784,7 +4784,7 @@ write_txpkts_wr(struct adapter *sc, struct sge_txq *tx MPASS(txp->len16 <= howmany(SGE_MAX_WR_LEN, 16)); MPASS(available > 0 && available < eq->sidx); - ndesc = howmany(txp->len16, EQ_ESIZE / 16); + ndesc = tx_len16_to_desc(txp->len16); MPASS(ndesc <= available); MPASS(wr == (void *)&eq->desc[eq->pidx]); From owner-svn-src-all@freebsd.org Tue Aug 25 02:42:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B43FD3B7395; Tue, 25 Aug 2020 02:42:49 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbCvs4QmSz4dqd; Tue, 25 Aug 2020 02:42:49 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B6A822AD7; Tue, 25 Aug 2020 02:42:49 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07P2gnZ9058809; Tue, 25 Aug 2020 02:42:49 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07P2gngr058808; Tue, 25 Aug 2020 02:42:49 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008250242.07P2gngr058808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Tue, 25 Aug 2020 02:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364749 - head X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 364749 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 02:42:49 -0000 Author: mmacy Date: Tue Aug 25 02:42:48 2020 New Revision: 364749 URL: https://svnweb.freebsd.org/changeset/base/364749 Log: Mention OpenZFS merge in UPDATING Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Aug 25 02:42:07 2020 (r364748) +++ head/UPDATING Tue Aug 25 02:42:48 2020 (r364749) @@ -27,6 +27,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20200824: + OpenZFS support has been integrated. We caution against 'zpool upgrade' + for the next few weeks. The change should be transparent unless you + want to use new features. + + The resume code now notifies devd with the 'kernel' system rather than the old 'kern' subsystem to be consistent with other use. The old notification will be created as well, but From owner-svn-src-all@freebsd.org Tue Aug 25 02:54:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50A453B83C1; Tue, 25 Aug 2020 02:54:50 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbD9k1l8lz4fbN; Tue, 25 Aug 2020 02:54:50 +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 1EFF422F83; Tue, 25 Aug 2020 02:54:50 +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 07P2soBs064994; Tue, 25 Aug 2020 02:54:50 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07P2smm3064987; Tue, 25 Aug 2020 02:54:48 GMT (envelope-from np@FreeBSD.org) Message-Id: <202008250254.07P2smm3064987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 25 Aug 2020 02:54:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364750 - in stable/12/sys/dev/cxgbe: . cxgbei tom X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12/sys/dev/cxgbe: . cxgbei tom X-SVN-Commit-Revision: 364750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 02:54:50 -0000 Author: np Date: Tue Aug 25 02:54:48 2020 New Revision: 364750 URL: https://svnweb.freebsd.org/changeset/base/364750 Log: MFC r362616: cxgbe(4): Add a pointer to the adapter softc in vi_info. There were quite a few places where port_info was being accessed only to get to the adapter. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/cxgbei/icl_cxgbei.c stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/cxgbe/t4_netmap.c stable/12/sys/dev/cxgbe/t4_sge.c stable/12/sys/dev/cxgbe/t4_vf.c stable/12/sys/dev/cxgbe/tom/t4_listen.c stable/12/sys/dev/cxgbe/tom/t4_tom.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Tue Aug 25 02:42:48 2020 (r364749) +++ stable/12/sys/dev/cxgbe/adapter.h Tue Aug 25 02:54:48 2020 (r364750) @@ -187,6 +187,7 @@ enum { struct vi_info { device_t dev; struct port_info *pi; + struct adapter *adapter; struct ifnet *ifp; @@ -931,22 +932,22 @@ struct adapter { #define TXQ_LOCK_ASSERT_NOTOWNED(txq) EQ_LOCK_ASSERT_NOTOWNED(&(txq)->eq) #define for_each_txq(vi, iter, q) \ - for (q = &vi->pi->adapter->sge.txq[vi->first_txq], iter = 0; \ + for (q = &vi->adapter->sge.txq[vi->first_txq], iter = 0; \ iter < vi->ntxq; ++iter, ++q) #define for_each_rxq(vi, iter, q) \ - for (q = &vi->pi->adapter->sge.rxq[vi->first_rxq], iter = 0; \ + for (q = &vi->adapter->sge.rxq[vi->first_rxq], iter = 0; \ iter < vi->nrxq; ++iter, ++q) #define for_each_ofld_txq(vi, iter, q) \ - for (q = &vi->pi->adapter->sge.ofld_txq[vi->first_ofld_txq], iter = 0; \ + for (q = &vi->adapter->sge.ofld_txq[vi->first_ofld_txq], iter = 0; \ iter < vi->nofldtxq; ++iter, ++q) #define for_each_ofld_rxq(vi, iter, q) \ - for (q = &vi->pi->adapter->sge.ofld_rxq[vi->first_ofld_rxq], iter = 0; \ + for (q = &vi->adapter->sge.ofld_rxq[vi->first_ofld_rxq], iter = 0; \ iter < vi->nofldrxq; ++iter, ++q) #define for_each_nm_txq(vi, iter, q) \ - for (q = &vi->pi->adapter->sge.nm_txq[vi->first_nm_txq], iter = 0; \ + for (q = &vi->adapter->sge.nm_txq[vi->first_nm_txq], iter = 0; \ iter < vi->nnmtxq; ++iter, ++q) #define for_each_nm_rxq(vi, iter, q) \ - for (q = &vi->pi->adapter->sge.nm_rxq[vi->first_nm_rxq], iter = 0; \ + for (q = &vi->adapter->sge.nm_rxq[vi->first_nm_rxq], iter = 0; \ iter < vi->nnmrxq; ++iter, ++q) #define for_each_vi(_pi, _iter, _vi) \ for ((_vi) = (_pi)->vi, (_iter) = 0; (_iter) < (_pi)->nvi; \ Modified: stable/12/sys/dev/cxgbe/cxgbei/icl_cxgbei.c ============================================================================== --- stable/12/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Tue Aug 25 02:42:48 2020 (r364749) +++ stable/12/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Tue Aug 25 02:54:48 2020 (r364750) @@ -671,7 +671,7 @@ icl_cxgbei_conn_handoff(struct icl_conn *ic, int fd) MPASS(tp->tod != NULL); MPASS(tp->t_toe != NULL); toep = tp->t_toe; - MPASS(toep->vi->pi->adapter == icc->sc); + MPASS(toep->vi->adapter == icc->sc); icc->toep = toep; icc->cwt = cxgbei_select_worker_thread(icc); Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Tue Aug 25 02:42:48 2020 (r364749) +++ stable/12/sys/dev/cxgbe/t4_main.c Tue Aug 25 02:54:48 2020 (r364750) @@ -1297,6 +1297,7 @@ t4_attach(device_t dev) pi->nvi = num_vis; for_each_vi(pi, j, vi) { vi->pi = pi; + vi->adapter = sc; vi->qsize_rxq = t4_qsize_rxq; vi->qsize_txq = t4_qsize_txq; @@ -1695,7 +1696,7 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) ifp->if_capabilities |= IFCAP_TOE; #endif #ifdef RATELIMIT - if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) { + if (is_ethoffload(vi->adapter) && vi->nofldtxq != 0) { ifp->if_capabilities |= IFCAP_TXRTLMT; ifp->if_capenable |= IFCAP_TXRTLMT; } @@ -1706,7 +1707,7 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) ifp->if_hw_tsomax = IP_MAXPACKET; ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_TSO; #ifdef RATELIMIT - if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) + if (is_ethoffload(vi->adapter) && vi->nofldtxq != 0) ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_EO_TSO; #endif ifp->if_hw_tsomaxsegsize = 65536; @@ -1834,7 +1835,7 @@ static void cxgbe_init(void *arg) { struct vi_info *vi = arg; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; if (begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4init") != 0) return; @@ -2144,7 +2145,7 @@ vi_get_counter(struct ifnet *ifp, ift_counter c) struct vi_info *vi = ifp->if_softc; struct fw_vi_stats_vf *s = &vi->stats; - vi_refresh_stats(vi->pi->adapter, vi); + vi_refresh_stats(vi->adapter, vi); switch (c) { case IFCOUNTER_IPACKETS: @@ -2587,7 +2588,7 @@ vcxgbe_detach(device_t dev) struct adapter *sc; vi = device_get_softc(dev); - sc = vi->pi->adapter; + sc = vi->adapter; doom_vi(sc, vi); @@ -5488,7 +5489,7 @@ hashen_to_hashconfig(int hashen) int vi_full_init(struct vi_info *vi) { - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct ifnet *ifp = vi->ifp; uint16_t *rss; struct sge_rxq *rxq; @@ -5918,7 +5919,7 @@ void vi_tick(void *arg) { struct vi_info *vi = arg; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; vi_refresh_stats(sc, vi); @@ -6856,7 +6857,7 @@ static int sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS) { struct vi_info *vi = arg1; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int idx, rc, i; struct sge_rxq *rxq; uint8_t v; @@ -6893,7 +6894,7 @@ static int sysctl_holdoff_pktc_idx(SYSCTL_HANDLER_ARGS) { struct vi_info *vi = arg1; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int idx, rc; idx = vi->pktc_idx; @@ -6923,7 +6924,7 @@ static int sysctl_qsize_rxq(SYSCTL_HANDLER_ARGS) { struct vi_info *vi = arg1; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int qsize, rc; qsize = vi->qsize_rxq; @@ -6953,7 +6954,7 @@ static int sysctl_qsize_txq(SYSCTL_HANDLER_ARGS) { struct vi_info *vi = arg1; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int qsize, rc; qsize = vi->qsize_txq; @@ -9579,7 +9580,7 @@ static int sysctl_holdoff_tmr_idx_ofld(SYSCTL_HANDLER_ARGS) { struct vi_info *vi = arg1; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int idx, rc, i; struct sge_ofld_rxq *ofld_rxq; uint8_t v; @@ -9616,7 +9617,7 @@ static int sysctl_holdoff_pktc_idx_ofld(SYSCTL_HANDLER_ARGS) { struct vi_info *vi = arg1; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int idx, rc; idx = vi->ofld_pktc_idx; Modified: stable/12/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_netmap.c Tue Aug 25 02:42:48 2020 (r364749) +++ stable/12/sys/dev/cxgbe/t4_netmap.c Tue Aug 25 02:54:48 2020 (r364750) @@ -125,7 +125,7 @@ alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq { int rc, cntxt_id, i; __be32 v; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct sge_params *sp = &sc->params.sge; struct netmap_adapter *na = NA(vi->ifp); struct fw_iq_cmd c; @@ -245,7 +245,7 @@ alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq static int free_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq *nm_rxq) { - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int rc; rc = -t4_iq_free(sc, sc->mbox, sc->pf, 0, FW_IQ_TYPE_FL_INT_CAP, @@ -262,7 +262,7 @@ alloc_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq { int rc, cntxt_id; size_t len; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct netmap_adapter *na = NA(vi->ifp); struct fw_eq_eth_cmd c; @@ -335,7 +335,7 @@ alloc_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq static int free_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq *nm_txq) { - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int rc; rc = -t4_eth_eq_free(sc, sc->mbox, sc->pf, 0, nm_txq->cntxt_id); @@ -562,7 +562,7 @@ cxgbe_netmap_reg(struct netmap_adapter *na, int on) { struct ifnet *ifp = na->ifp; struct vi_info *vi = ifp->if_softc; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; int rc; rc = begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4nmreg"); @@ -817,7 +817,7 @@ cxgbe_netmap_txsync(struct netmap_kring *kring, int fl struct netmap_adapter *na = kring->na; struct ifnet *ifp = na->ifp; struct vi_info *vi = ifp->if_softc; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct sge_nm_txq *nm_txq = &sc->sge.nm_txq[vi->first_nm_txq + kring->ring_id]; const u_int head = kring->rhead; u_int reclaimed = 0; @@ -881,7 +881,7 @@ cxgbe_netmap_rxsync(struct netmap_kring *kring, int fl struct netmap_ring *ring = kring->ring; struct ifnet *ifp = na->ifp; struct vi_info *vi = ifp->if_softc; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct sge_nm_rxq *nm_rxq = &sc->sge.nm_rxq[vi->first_nm_rxq + kring->ring_id]; u_int const head = kring->rhead; u_int n; @@ -1038,7 +1038,7 @@ void service_nm_rxq(struct sge_nm_rxq *nm_rxq) { struct vi_info *vi = nm_rxq->vi; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct ifnet *ifp = vi->ifp; struct netmap_adapter *na = NA(ifp); struct netmap_kring *kring = na->rx_rings[nm_rxq->nid]; Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Tue Aug 25 02:42:48 2020 (r364749) +++ stable/12/sys/dev/cxgbe/t4_sge.c Tue Aug 25 02:54:48 2020 (r364750) @@ -2061,7 +2061,7 @@ void t4_update_fl_bufsize(struct ifnet *ifp) { struct vi_info *vi = ifp->if_softc; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct sge_rxq *rxq; #ifdef TCP_OFFLOAD struct sge_ofld_rxq *ofld_rxq; @@ -2695,8 +2695,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx) struct sge_eq *eq = &txq->eq; struct ifnet *ifp = txq->ifp; struct vi_info *vi = ifp->if_softc; - struct port_info *pi = vi->pi; - struct adapter *sc = pi->adapter; + struct adapter *sc = vi->adapter; u_int total, remaining; /* # of packets */ u_int available, dbdiff; /* # of hardware descriptors */ u_int n, next_cidx; @@ -3302,7 +3301,7 @@ alloc_rxq(struct vi_info *vi, struct sge_rxq *rxq, int struct sysctl_oid *oid) { int rc; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct sysctl_oid_list *children; char name[16]; @@ -3432,7 +3431,7 @@ alloc_nm_rxq(struct vi_info *vi, struct sge_nm_rxq *nm struct sysctl_ctx_list *ctx; char name[16]; size_t len; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct netmap_adapter *na = NA(vi->ifp); MPASS(na != NULL); @@ -3498,7 +3497,7 @@ alloc_nm_rxq(struct vi_info *vi, struct sge_nm_rxq *nm static int free_nm_rxq(struct vi_info *vi, struct sge_nm_rxq *nm_rxq) { - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; if (vi->flags & VI_INIT_DONE) MPASS(nm_rxq->iq_cntxt_id == INVALID_NM_RXQ_CNTXT_ID); @@ -3564,7 +3563,7 @@ alloc_nm_txq(struct vi_info *vi, struct sge_nm_txq *nm static int free_nm_txq(struct vi_info *vi, struct sge_nm_txq *nm_txq) { - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; if (vi->flags & VI_INIT_DONE) MPASS(nm_txq->cntxt_id == INVALID_NM_TXQ_CNTXT_ID); @@ -4033,7 +4032,7 @@ static int free_txq(struct vi_info *vi, struct sge_txq *txq) { int rc; - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct sge_eq *eq = &txq->eq; rc = free_eq(sc, eq); Modified: stable/12/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_vf.c Tue Aug 25 02:42:48 2020 (r364749) +++ stable/12/sys/dev/cxgbe/t4_vf.c Tue Aug 25 02:54:48 2020 (r364750) @@ -702,6 +702,7 @@ t4vf_attach(device_t dev) for_each_vi(pi, j, vi) { vi->pi = pi; + vi->adapter = sc; vi->qsize_rxq = t4_qsize_rxq; vi->qsize_txq = t4_qsize_txq; Modified: stable/12/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_listen.c Tue Aug 25 02:42:48 2020 (r364749) +++ stable/12/sys/dev/cxgbe/tom/t4_listen.c Tue Aug 25 02:54:48 2020 (r364750) @@ -1422,7 +1422,7 @@ do_pass_establish(struct sge_iq *iq, const struct rss_ ifp = synqe->syn->m_pkthdr.rcvif; vi = ifp->if_softc; - KASSERT(vi->pi->adapter == sc, + KASSERT(vi->adapter == sc, ("%s: vi %p, sc %p mismatch", __func__, vi, sc)); if (__predict_false(inp->inp_flags & INP_DROPPED)) { Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tom.c Tue Aug 25 02:42:48 2020 (r364749) +++ stable/12/sys/dev/cxgbe/tom/t4_tom.c Tue Aug 25 02:54:48 2020 (r364750) @@ -955,7 +955,7 @@ calc_options0(struct vi_info *vi, struct conn_params * MPASS(cp->opt0_bufsize >= 0 && cp->opt0_bufsize <= M_RCV_BUFSIZ); opt0 |= V_RCV_BUFSIZ(cp->opt0_bufsize); - MPASS(cp->l2t_idx >= 0 && cp->l2t_idx < vi->pi->adapter->vres.l2t.size); + MPASS(cp->l2t_idx >= 0 && cp->l2t_idx < vi->adapter->vres.l2t.size); opt0 |= V_L2T_IDX(cp->l2t_idx); opt0 |= V_SMAC_SEL(vi->smt_idx); @@ -1030,7 +1030,7 @@ calc_options2(struct vi_info *vi, struct conn_params * uint64_t select_ntuple(struct vi_info *vi, struct l2t_entry *e) { - struct adapter *sc = vi->pi->adapter; + struct adapter *sc = vi->adapter; struct tp_params *tp = &sc->params.tp; uint64_t ntuple = 0; From owner-svn-src-all@freebsd.org Tue Aug 25 03:43:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAF163BACC7; Tue, 25 Aug 2020 03:43:52 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbFGJ5yvdz3V5q; Tue, 25 Aug 2020 03:43:52 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B16332372E; Tue, 25 Aug 2020 03:43:52 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07P3hqg4096569; Tue, 25 Aug 2020 03:43:52 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07P3hqi8096568; Tue, 25 Aug 2020 03:43:52 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008250343.07P3hqi8096568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Tue, 25 Aug 2020 03:43:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364751 - head/cddl/lib/libzfs X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/cddl/lib/libzfs X-SVN-Commit-Revision: 364751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 03:43:53 -0000 Author: mmacy Date: Tue Aug 25 03:43:52 2020 New Revision: 364751 URL: https://svnweb.freebsd.org/changeset/base/364751 Log: Fix libzfs build failures for some In some environments adding zstd/include to the include path would cause zstd's stdlib.h to hide the system one. Modified: head/cddl/lib/libzfs/Makefile Modified: head/cddl/lib/libzfs/Makefile ============================================================================== --- head/cddl/lib/libzfs/Makefile Tue Aug 25 02:54:48 2020 (r364750) +++ head/cddl/lib/libzfs/Makefile Tue Aug 25 03:43:52 2020 (r364751) @@ -91,7 +91,6 @@ CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS+= -I${SRCDIR}/sys/contrib/openzfs/module/zstd/include CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h From owner-svn-src-all@freebsd.org Tue Aug 25 06:49:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EEB6C3C0E79; Tue, 25 Aug 2020 06:49:11 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbKN762sMz3gYl; Tue, 25 Aug 2020 06:49:11 +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 B2C5A25AF4; Tue, 25 Aug 2020 06:49:11 +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 07P6nBiS006832; Tue, 25 Aug 2020 06:49:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07P6nBGp006829; Tue, 25 Aug 2020 06:49:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202008250649.07P6nBGp006829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 25 Aug 2020 06:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364753 - in head: contrib/llvm-project/compiler-rt/lib/builtins lib/libcompiler_rt sys/sys X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/llvm-project/compiler-rt/lib/builtins lib/libcompiler_rt sys/sys X-SVN-Commit-Revision: 364753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 06:49:12 -0000 Author: dim Date: Tue Aug 25 06:49:10 2020 New Revision: 364753 URL: https://svnweb.freebsd.org/changeset/base/364753 Log: Add atomic and bswap functions to libcompiler_rt There have been several mentions on our mailing lists about missing atomic functions in our system libraries (e.g. __atomic_load_8 and friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too. To address this, add implementations for the functions from compiler-rt to the system compiler support libraries, e.g. libcompiler_rt.a and and libgcc_s.so. This also needs a small fixup in compiler-rt's atomic.c, to ensure that 32-bit mips can build correctly. Bump __FreeBSD_version to make it easier for port maintainers to detect when these functions were added. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26159 Modified: head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c head/lib/libcompiler_rt/Makefile.inc head/sys/sys/param.h Modified: head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c ============================================================================== --- head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c Tue Aug 25 05:15:40 2020 (r364752) +++ head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c Tue Aug 25 06:49:10 2020 (r364753) @@ -125,8 +125,8 @@ static __inline Lock *lock_for_pointer(void *ptr) { #define IS_LOCK_FREE_2 __c11_atomic_is_lock_free(2) #define IS_LOCK_FREE_4 __c11_atomic_is_lock_free(4) -/// 32 bit PowerPC doesn't support 8-byte lock_free atomics -#if !defined(__powerpc64__) && defined(__powerpc__) +/// 32 bit MIPS and PowerPC don't support 8-byte lock_free atomics +#if defined(__mips__) || (!defined(__powerpc64__) && defined(__powerpc__)) #define IS_LOCK_FREE_8 0 #else #define IS_LOCK_FREE_8 __c11_atomic_is_lock_free(8) Modified: head/lib/libcompiler_rt/Makefile.inc ============================================================================== --- head/lib/libcompiler_rt/Makefile.inc Tue Aug 25 05:15:40 2020 (r364752) +++ head/lib/libcompiler_rt/Makefile.inc Tue Aug 25 06:49:10 2020 (r364753) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + CRTARCH= ${MACHINE_CPUARCH:C/amd64/x86_64/} CRTSRC= ${SRCTOP}/contrib/llvm-project/compiler-rt/lib/builtins @@ -18,6 +20,9 @@ SRCF+= ashldi3 SRCF+= ashlti3 SRCF+= ashrdi3 SRCF+= ashrti3 +SRCF+= atomic +SRCF+= bswapdi2 +SRCF+= bswapsi2 SRCF+= clear_cache SRCF+= clzdi2 SRCF+= clzsi2 @@ -120,6 +125,10 @@ SRCF+= umoddi3 SRCF+= umodsi3 SRCF+= umodti3 +.if "${COMPILER_TYPE}" == "clang" +CFLAGS.atomic.c+= -Wno-atomic-alignment +.endif + # Avoid using SSE2 instructions on i386, if unsupported. .if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2) SRCS+= floatdidf.c @@ -212,12 +221,6 @@ CFLAGS+= -DEMIT_SYNC_ATOMICS SRCF+= stdatomic .endif -.if "${COMPILER_TYPE}" == "clang" && \ - (${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe") -SRCS+= atomic.c -CFLAGS.atomic.c+= -Wno-atomic-alignment -.endif - .for file in ${SRCF} .if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \ && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S) @@ -239,19 +242,11 @@ SRCS+= aeabi_memmove.S SRCS+= aeabi_memset.S SRCS+= aeabi_uidivmod.S SRCS+= aeabi_uldivmod.S -SRCS+= bswapdi2.S -SRCS+= bswapsi2.S SRCS+= switch16.S SRCS+= switch32.S SRCS+= switch8.S SRCS+= switchu8.S SRCS+= sync_synchronize.S -.endif - -# On some archs GCC-6.3 requires bswap32 built-in. -.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv" -SRCS+= bswapdi2.c -SRCS+= bswapsi2.c .endif .if ${MACHINE_ARCH:Mriscv*sf} Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Aug 25 05:15:40 2020 (r364752) +++ head/sys/sys/param.h Tue Aug 25 06:49:10 2020 (r364753) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300112 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300113 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Tue Aug 25 08:07:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 541233C3359 for ; Tue, 25 Aug 2020 08:07:13 +0000 (UTC) (envelope-from noreply@email.alpes-plafond.com) Received: from email.alpes-plafond.com (email.alpes-plafond.com [153.92.229.239]) (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 4BbM680BRjz42Tw for ; Tue, 25 Aug 2020 08:07:11 +0000 (UTC) (envelope-from noreply@email.alpes-plafond.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alpes-plafond.com; q=dns/txt; s=mail; bh=QCvleZD2Q/hFfqp3B9LpJq9XyTiYf3zqEP3NPU/1Yrw=; h=from:reply-to:subject:date:mime-version:content-type:list-id:list-unsubscribe:x-csa-complaints:list-unsubscribe-post; b=DE4InOy3MxG5ubt99FVQDMOAiq+4N+ZGLtR4MVOHimfh7CdHk03ppg94S1J5yM+i3efhpxQNDknp 2T8JWAE9pEeuXMgyZz2HL72xgbRb0GFmOm3swQ7bpCOeUmT1GBw0IsZjhXNu52iuCnQQNgKusUf6 eyYhw81b3EjBFw2SMP0= To: Subject: RE: vos projet de renovation Date: Tue, 25 Aug 2020 08:06:23 +0000 Feedback-ID: 153.92.229.239:1320145_338:1320145:Sendinblue From: Alpes Plafond List-Unsubscribe-Post: List-Unsubscribe=One-Click MIME-Version: 1.0 Message-Id: <202025080806.22f797nfxabklzj@email.alpes-plafond.com> Precedence: bulk Reply-To: alpesplafond@free.fr X-Csa-Complaints: whitelist-complaints@eco.de X-Mailer: Sendinblue X-Mailin-Campaign: 338 X-Mailin-Client: 1320145 X-sib-id: -c7yvvwv3XXLWDa0F-Pv3hMILwAjHOj8sanEy51X-4Cp21a2--f9zMnlixesdBquPJv56B_XMcAIaNyJwDIXBcUHC_g7FDdhrIcdjmDTSI0l92sq74yazzo-mjaN-LXw9YStGswEpQKDYE1zJCuMWm8O2YxHF45MxNuLGHLD4WvsRpo X-Rspamd-Queue-Id: 4BbM680BRjz42Tw X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=alpes-plafond.com header.s=mail header.b=DE4InOy3; dmarc=pass (policy=none) header.from=alpes-plafond.com; spf=pass (mx1.freebsd.org: domain of noreply@email.alpes-plafond.com designates 153.92.229.239 as permitted sender) smtp.mailfrom=noreply@email.alpes-plafond.com X-Spamd-Result: default: False [3.22 / 15.00]; HAS_REPLYTO(0.00)[alpesplafond@free.fr]; XM_UA_NO_VERSION(0.01)[]; R_SPF_ALLOW(-0.20)[+ip4:153.92.224.0/19]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[alpes-plafond.com:+]; DMARC_POLICY_ALLOW(-0.50)[alpes-plafond.com,none]; FORGED_SENDER(0.30)[contact@alpes-plafond.com,noreply@email.alpes-plafond.com]; RCVD_COUNT_ZERO(0.00)[0]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:200484, ipnet:153.92.228.0/22, country:FR]; FROM_NEQ_ENVFROM(0.00)[contact@alpes-plafond.com,noreply@email.alpes-plafond.com]; FAKE_REPLY(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[alpes-plafond.com:s=mail]; NEURAL_HAM_MEDIUM(-0.37)[-0.367]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PRECEDENCE_BULK(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FREEMAIL_REPLYTO(0.00)[free.fr]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; HTML_SHORT_LINK_IMG_1(2.00)[]; MANY_INVISIBLE_PARTS(1.00)[10]; NEURAL_SPAM_SHORT(0.28)[0.282]; MAILMAN_DEST(0.00)[svn-src-all] Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 List-Id: "SVN commit messages 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, 25 Aug 2020 08:07:13 -0000 [ ]( # ) [ ]( # ) [ ]( # ) [ ]( # ) [ ]( http://www.alpesplafond.sitew.fr/?utm_source=3Dsendinblue&utm_campaig= n=3DSAVOIE_RE_votre_projet_&utm_medium=3Demail ) [ ]( # ) =C2=A0 RENOVER SON PLAFOND =C2=A0 [ ]( # ) =C2=A0 en 1 journ=C3=A9e seulement=C2=A0 =C2=A0 [ ]( # ) =C2=A0 sans d=C3=A9m=C3=A9nager les meubles, sans poussi=C3=A8re, sans peinture ga= rantie 10 ans =C2=A0 [ ]( # ) =C2=A0 =C3=A0 un PRIX ABORDABLE =C2=A0 [ ]( # ) =C2=A0 C'EST POSSIBLE ! =C2=A0 [ ]( # ) =C2=A0 [ En savoir + ]( http://www.alpesplafond.sitew.fr/?ut= m_source=3Dsendinblue&utm_campaign=3DSAVOIE_RE_votre_projet_&utm_medium=3De= mail ) =C2=A0 [ ]( # ) =C2=A0 =C2=A0 [ Cliquez pour voir nos r=C3=A9alisations : ]( http://www.alpesplafo= nd.sitew.fr/?utm_source=3Dsendinblue&utm_campaign=3DSAVOIE_RE_votre_projet_= &utm_medium=3Demail ) =C2=A0 [ ]( # ) [ ]( http://www.alpesplafond.sitew.fr/?utm_source=3Dsendinblue&utm_campaig= n=3DSAVOIE_RE_votre_projet_&utm_medium=3Demail ) [ ]( # ) Sp=C3=A9cialiste depuis + de 15 ans dans la pose de plafond tendu Is=C3=A8re, Savoie, Haute Savoie [ ]( # ) =C2=A0 [ Consultez les avis de nos clients ]( https://www.societe-des-avis-garanti= s.fr/alpes-plafond-com/?utm_source=3Dsendinblue&utm_campaign=3DSAVOIE_RE_vo= tre_projet_&utm_medium=3Demail ) =C2=A0 [ ]( # ) =C2=A0 =C2=A0 Alpes Plafond=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A004.76.00.93.06 19, boulevard des Alpes=C2=A0 =C2=A0 =C2=A0 [ alpesplafond@orange.fr ]( mai= lto:alpesplafond@orange.fr ) 38240 MEYLAN=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0[ www.alpes-plafond.com ]( http://www.alpes-plafond.com/?utm_source= =3Dsendinblue&utm_campaign=3DSAVOIE_RE_votre_projet_&utm_medium=3Demail ) [ ]( # ) =C2=A0 [ Se d=C3=A9sinscrire ]( http://r.email.alpes-plafond.com/mk/un/ct0SEEnxyZD= Pd-NDwXacllBrLvh_USbV-qREwZSn6Pj4zCgj1iQJ8eA84QvJ_Nj7K6uCIChSDq4RKkp1oNioGv= ZWkyrAJ-NEYVG_IaxonmpbNUM8FI3uSZuEKW40zT-7TRocX8qy6LJnXmlUp2wO00yEvQ ) =C2= =A0 From owner-svn-src-all@freebsd.org Tue Aug 25 09:42:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78FAF3C51D3; Tue, 25 Aug 2020 09:42:04 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbPCc2fw3z46hb; Tue, 25 Aug 2020 09:42:04 +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 3E82127E00; Tue, 25 Aug 2020 09:42:04 +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 07P9g40P016441; Tue, 25 Aug 2020 09:42:04 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07P9g3gN016439; Tue, 25 Aug 2020 09:42:03 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008250942.07P9g3gN016439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 25 Aug 2020 09:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364754 - in head/sys/netinet: . tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in head/sys/netinet: . tcp_stacks X-SVN-Commit-Revision: 364754 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 09:42:04 -0000 Author: tuexen Date: Tue Aug 25 09:42:03 2020 New Revision: 364754 URL: https://svnweb.freebsd.org/changeset/base/364754 Log: RFC 3465 defines a limit L used in TCP slow start for limiting the number of acked bytes as described in Section 2.2 of that document. This patch ensures that this limit is not also applied in congestion avoidance. Applying this limit also in congestion avoidance can result in using less bandwidth than allowed. Reported by: l.tian.email@gmail.com Reviewed by: rrs, rscheff MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D26120 Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_stacks/rack.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Tue Aug 25 06:49:10 2020 (r364753) +++ head/sys/netinet/tcp_input.c Tue Aug 25 09:42:03 2020 (r364754) @@ -349,8 +349,7 @@ cc_ack_received(struct tcpcb *tp, struct tcphdr *th, u } #endif /* STATS */ if (tp->snd_cwnd > tp->snd_ssthresh) { - tp->t_bytes_acked += min(tp->ccv->bytes_this_ack, - nsegs * V_tcp_abc_l_var * tcp_maxseg(tp)); + tp->t_bytes_acked += tp->ccv->bytes_this_ack; if (tp->t_bytes_acked >= tp->snd_cwnd) { tp->t_bytes_acked -= tp->snd_cwnd; tp->ccv->flags |= CCF_ABC_SENTAWND; Modified: head/sys/netinet/tcp_stacks/rack.c ============================================================================== --- head/sys/netinet/tcp_stacks/rack.c Tue Aug 25 06:49:10 2020 (r364753) +++ head/sys/netinet/tcp_stacks/rack.c Tue Aug 25 09:42:03 2020 (r364754) @@ -3911,8 +3911,7 @@ rack_ack_received(struct tcpcb *tp, struct tcp_rack *r #endif } if (rack->r_ctl.cwnd_to_use > tp->snd_ssthresh) { - tp->t_bytes_acked += min(tp->ccv->bytes_this_ack, - nsegs * V_tcp_abc_l_var * ctf_fixed_maxseg(tp)); + tp->t_bytes_acked += tp->ccv->bytes_this_ack; if (tp->t_bytes_acked >= rack->r_ctl.cwnd_to_use) { tp->t_bytes_acked -= rack->r_ctl.cwnd_to_use; tp->ccv->flags |= CCF_ABC_SENTAWND; From owner-svn-src-all@freebsd.org Tue Aug 25 11:10:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECB2E3C7305; Tue, 25 Aug 2020 11:10:37 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbR9n643yz4D5n; Tue, 25 Aug 2020 11:10:37 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9703E28E0C; Tue, 25 Aug 2020 11:10:37 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PBAbfH066434; Tue, 25 Aug 2020 11:10:37 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PBAbnl066433; Tue, 25 Aug 2020 11:10:37 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202008251110.07PBAbnl066433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 25 Aug 2020 11:10:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364755 - stable/12/sys/dev/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/sys/dev/netmap X-SVN-Commit-Revision: 364755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 11:10:38 -0000 Author: vmaffione Date: Tue Aug 25 11:10:37 2020 New Revision: 364755 URL: https://svnweb.freebsd.org/changeset/base/364755 Log: MFC r364341 netmap: fix parsing of legacy nmr->nr_ringid Code was checking for NETMAP_{SW,HW}_RING in req->nr_ringid which had already been masked by NETMAP_RING_MASK. Therefore, the comparisons always failed and set NR_REG_ALL_NIC. Check against the original nmr structure. Submitted by: bpoole@packetforensics.com Reported by: bpoole@packetforensics.com Reviewed by: giuseppe.lettieri@unipi.it Approved by: vmaffione This line, and those below, will be ignored-- > Description of fields to fill in above: 76 columns --| > PR: If and which Problem Report is related. > Submitted by: If someone else sent in the change. > Reported by: If someone else reported the issue. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > MFH: Ports tree branch name. Request approval for merge. > Relnotes: Set to 'yes' for mention in release notes. > Security: Vulnerability reference (one per line) or description. > Sponsored by: If the change was sponsored by an organization. > Pull Request: https://github.com/freebsd/freebsd/pull/### (*full* GitHub URL needed). > Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed). > Empty fields above will be automatically removed. _M . M sys/dev/netmap/netmap_legacy.c Modified: stable/12/sys/dev/netmap/netmap_legacy.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/netmap/netmap_legacy.c ============================================================================== --- stable/12/sys/dev/netmap/netmap_legacy.c Tue Aug 25 09:42:03 2020 (r364754) +++ stable/12/sys/dev/netmap/netmap_legacy.c Tue Aug 25 11:10:37 2020 (r364755) @@ -76,9 +76,9 @@ nmreq_register_from_legacy(struct nmreq *nmr, struct n /* Convert the older nmr->nr_ringid (original * netmap control API) to nmr->nr_flags. */ u_int regmode = NR_REG_DEFAULT; - if (req->nr_ringid & NETMAP_SW_RING) { + if (nmr->nr_ringid & NETMAP_SW_RING) { regmode = NR_REG_SW; - } else if (req->nr_ringid & NETMAP_HW_RING) { + } else if (nmr->nr_ringid & NETMAP_HW_RING) { regmode = NR_REG_ONE_NIC; } else { regmode = NR_REG_ALL_NIC; From owner-svn-src-all@freebsd.org Tue Aug 25 11:12:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 895AE3C759E; Tue, 25 Aug 2020 11:12:31 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbRCz39hcz4DZ2; Tue, 25 Aug 2020 11:12:31 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51C2828D4B; Tue, 25 Aug 2020 11:12:31 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PBCV0M072254; Tue, 25 Aug 2020 11:12:31 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PBCVdY072253; Tue, 25 Aug 2020 11:12:31 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202008251112.07PBCVdY072253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 25 Aug 2020 11:12: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: r364756 - stable/11/sys/dev/netmap X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/11/sys/dev/netmap X-SVN-Commit-Revision: 364756 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 11:12:31 -0000 Author: vmaffione Date: Tue Aug 25 11:12:30 2020 New Revision: 364756 URL: https://svnweb.freebsd.org/changeset/base/364756 Log: MFC r364341 netmap: fix parsing of legacy nmr->nr_ringid Code was checking for NETMAP_{SW,HW}_RING in req->nr_ringid which had already been masked by NETMAP_RING_MASK. Therefore, the comparisons always failed and set NR_REG_ALL_NIC. Check against the original nmr structure. Submitted by: bpoole@packetforensics.com Reported by: bpoole@packetforensics.com Reviewed by: giuseppe.lettieri@unipi.it Approved by: vmaffione Modified: stable/11/sys/dev/netmap/netmap_legacy.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/netmap/netmap_legacy.c ============================================================================== --- stable/11/sys/dev/netmap/netmap_legacy.c Tue Aug 25 11:10:37 2020 (r364755) +++ stable/11/sys/dev/netmap/netmap_legacy.c Tue Aug 25 11:12:30 2020 (r364756) @@ -71,9 +71,9 @@ nmreq_register_from_legacy(struct nmreq *nmr, struct n /* Convert the older nmr->nr_ringid (original * netmap control API) to nmr->nr_flags. */ u_int regmode = NR_REG_DEFAULT; - if (req->nr_ringid & NETMAP_SW_RING) { + if (nmr->nr_ringid & NETMAP_SW_RING) { regmode = NR_REG_SW; - } else if (req->nr_ringid & NETMAP_HW_RING) { + } else if (nmr->nr_ringid & NETMAP_HW_RING) { regmode = NR_REG_ONE_NIC; } else { regmode = NR_REG_ALL_NIC; From owner-svn-src-all@freebsd.org Tue Aug 25 13:18:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 876FB3CB0D7; Tue, 25 Aug 2020 13:18:57 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbV1s3K3yz4P6f; Tue, 25 Aug 2020 13:18:57 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54F542A159; Tue, 25 Aug 2020 13:18:57 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PDIv7p048677; Tue, 25 Aug 2020 13:18:57 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PDIsYD048661; Tue, 25 Aug 2020 13:18:54 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008251318.07PDIsYD048661@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Tue, 25 Aug 2020 13:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364757 - in head/tools/build/cross-build/include: . common common/machine common/sys linux linux/sys mac mac/sys X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head/tools/build/cross-build/include: . common common/machine common/sys linux linux/sys mac mac/sys X-SVN-Commit-Revision: 364757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 13:18:57 -0000 Author: arichardson Date: Tue Aug 25 13:18:53 2020 New Revision: 364757 URL: https://svnweb.freebsd.org/changeset/base/364757 Log: Add Linux/macOS compatibility system headers to tools/build/cross-build These headers are required in order to build the bootstrap tools on macOS and Linux. A follow-up commit will add implementations of functions that don't exist on those operating systems to -legacy when bootstrapping. Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D14316 Added: head/tools/build/cross-build/include/ head/tools/build/cross-build/include/common/ head/tools/build/cross-build/include/common/db.h (contents, props changed) head/tools/build/cross-build/include/common/getopt.h (contents, props changed) head/tools/build/cross-build/include/common/grp.h (contents, props changed) head/tools/build/cross-build/include/common/libcasper.h (contents, props changed) head/tools/build/cross-build/include/common/libelf.h (contents, props changed) head/tools/build/cross-build/include/common/libutil.h (contents, props changed) head/tools/build/cross-build/include/common/machine/ head/tools/build/cross-build/include/common/machine/endian.h (contents, props changed) head/tools/build/cross-build/include/common/netconfig.h (contents, props changed) head/tools/build/cross-build/include/common/netdb.h (contents, props changed) head/tools/build/cross-build/include/common/osreldate.h (contents, props changed) head/tools/build/cross-build/include/common/pwd.h (contents, props changed) head/tools/build/cross-build/include/common/string.h (contents, props changed) head/tools/build/cross-build/include/common/sys/ head/tools/build/cross-build/include/common/sys/_iovec.h (contents, props changed) head/tools/build/cross-build/include/common/sys/_null.h (contents, props changed) head/tools/build/cross-build/include/common/sys/_types.h (contents, props changed) head/tools/build/cross-build/include/common/sys/cdefs.h (contents, props changed) head/tools/build/cross-build/include/common/sys/ctype.h (contents, props changed) head/tools/build/cross-build/include/common/sys/limits.h (contents, props changed) head/tools/build/cross-build/include/common/sys/mman.h (contents, props changed) head/tools/build/cross-build/include/common/sys/param.h (contents, props changed) head/tools/build/cross-build/include/common/sys/stdint.h (contents, props changed) head/tools/build/cross-build/include/common/sys/sysctl.h (contents, props changed) head/tools/build/cross-build/include/common/sys/types.h (contents, props changed) head/tools/build/cross-build/include/common/sys/uio.h (contents, props changed) head/tools/build/cross-build/include/common/unistd.h (contents, props changed) head/tools/build/cross-build/include/linux/ head/tools/build/cross-build/include/linux/__unused_workaround_end.h (contents, props changed) head/tools/build/cross-build/include/linux/__unused_workaround_start.h (contents, props changed) head/tools/build/cross-build/include/linux/ctype.h (contents, props changed) head/tools/build/cross-build/include/linux/endian.h (contents, props changed) head/tools/build/cross-build/include/linux/errno.h (contents, props changed) head/tools/build/cross-build/include/linux/fcntl.h (contents, props changed) head/tools/build/cross-build/include/linux/libutil.h (contents, props changed) head/tools/build/cross-build/include/linux/limits.h (contents, props changed) head/tools/build/cross-build/include/linux/nbtool_config.h (contents, props changed) head/tools/build/cross-build/include/linux/netdb.h (contents, props changed) head/tools/build/cross-build/include/linux/regex.h (contents, props changed) head/tools/build/cross-build/include/linux/resolv.h (contents, props changed) head/tools/build/cross-build/include/linux/signal.h (contents, props changed) head/tools/build/cross-build/include/linux/stdio.h (contents, props changed) head/tools/build/cross-build/include/linux/stdlib.h (contents, props changed) head/tools/build/cross-build/include/linux/string.h (contents, props changed) head/tools/build/cross-build/include/linux/sys/ head/tools/build/cross-build/include/linux/sys/disk.h (contents, props changed) head/tools/build/cross-build/include/linux/sys/endian.h (contents, props changed) head/tools/build/cross-build/include/linux/sys/filio.h (contents, props changed) head/tools/build/cross-build/include/linux/sys/ioccom.h (contents, props changed) head/tools/build/cross-build/include/linux/sys/mount.h (contents, props changed) head/tools/build/cross-build/include/linux/sys/param.h (contents, props changed) head/tools/build/cross-build/include/linux/sys/stat.h (contents, props changed) head/tools/build/cross-build/include/linux/sys/sysctl.h (contents, props changed) head/tools/build/cross-build/include/linux/sys/time.h (contents, props changed) head/tools/build/cross-build/include/linux/sys/ttycom.h (contents, props changed) head/tools/build/cross-build/include/linux/sys/types.h (contents, props changed) head/tools/build/cross-build/include/linux/sys/ucred.h (contents, props changed) head/tools/build/cross-build/include/linux/time.h (contents, props changed) head/tools/build/cross-build/include/linux/unistd.h (contents, props changed) head/tools/build/cross-build/include/linux/wctype.h (contents, props changed) head/tools/build/cross-build/include/mac/ head/tools/build/cross-build/include/mac/libutil.h (contents, props changed) head/tools/build/cross-build/include/mac/nbtool_config.h (contents, props changed) head/tools/build/cross-build/include/mac/signal.h (contents, props changed) head/tools/build/cross-build/include/mac/stdlib.h (contents, props changed) head/tools/build/cross-build/include/mac/string.h (contents, props changed) head/tools/build/cross-build/include/mac/sys/ head/tools/build/cross-build/include/mac/sys/_types.h (contents, props changed) head/tools/build/cross-build/include/mac/sys/endian.h (contents, props changed) head/tools/build/cross-build/include/mac/sys/stat.h (contents, props changed) head/tools/build/cross-build/include/mac/sys/time.h (contents, props changed) head/tools/build/cross-build/include/mac/unistd.h (contents, props changed) Added: head/tools/build/cross-build/include/common/db.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/db.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,42 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once + +/* Ensure that we use the FreeBSD version of the db functions */ +#define dbopen __freebsd_dbopen +#include_next Added: head/tools/build/cross-build/include/common/getopt.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/getopt.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,53 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once + +#define getopt __freebsd_getopt +#define getopt_long __freebsd_getopt_long +#define getopt_long_only __freebsd_getopt_long_only +#define opterr __freebsd_opterr +#define optind __freebsd_optind +#define optopt __freebsd_optopt +#define optreset __freebsd_optreset +#define optarg __freebsd_optarg + +/* Since we are building the FreeBSD getopt.c also use the matching header */ +#include_next + +#undef getopt +#define getopt(argc, argv, optstr) __freebsd_getopt(argc, argv, optstr) Added: head/tools/build/cross-build/include/common/grp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/grp.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,61 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once + +#include_next + +#define group_from_gid __nbcompat_group_from_gid + +int pwcache_groupdb(int (*a_setgroupent)(int), void (*a_endgrent)(void), + struct group *(*a_getgrnam)(const char *), + struct group *(*a_getgrgid)(gid_t)); + +int gid_from_group(const char *name, gid_t *gid); + +int gid_from_group(const char *name, gid_t *gid); + +const char *group_from_gid(gid_t gid, int noname); + +#ifdef __linux__ +static inline int +setgroupent(int stayopen) +{ + setgrent(); + return (1); +} +#endif Added: head/tools/build/cross-build/include/common/libcasper.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/libcasper.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,42 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once + +#include_next + +_Static_assert(CASPER_SUPPORT == 0, "Should not have casper support"); Added: head/tools/build/cross-build/include/common/libelf.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/libelf.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,44 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once +/* Needed to get opensolaris stuff to compile */ +#ifdef _OPENSOLARIS_SYS_TYPES_H_ +#include + +#include_next +#endif Added: head/tools/build/cross-build/include/common/libutil.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/libutil.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,44 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once + +#if __has_include_next() +#include_next +#endif + +int expand_number(const char *_buf, uint64_t *_num); Added: head/tools/build/cross-build/include/common/machine/endian.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/machine/endian.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,40 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#if __has_include_next() +#include_next +#endif Added: head/tools/build/cross-build/include/common/netconfig.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/netconfig.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,43 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once + +/* Not actually needed. Only exists to keep rpc/types.h happy */ +#if __has_include_next() +#include_next +#endif Added: head/tools/build/cross-build/include/common/netdb.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/netdb.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,41 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once +#include_next + +#define _PATH_SERVICES_DB "/var/db/services.db" Added: head/tools/build/cross-build/include/common/osreldate.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/osreldate.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,40 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once + +#define __FreeBSD_version 0 Added: head/tools/build/cross-build/include/common/pwd.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/pwd.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,60 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once + +#include_next + +#define user_from_uid __nbcompat_user_from_uid + +int pwcache_userdb(int (*a_setpassent)(int), void (*a_endpwent)(void), + struct passwd *(*a_getpwnam)(const char *), + struct passwd *(*a_getpwuid)(uid_t)); + +int uid_from_user(const char *name, uid_t *uid); + +int uid_from_user(const char *name, uid_t *uid); +const char *user_from_uid(uid_t uid, int noname); + +#ifdef __linux__ +static inline int +setpassent(int stayopen) +{ + setpwent(); + return (1); +} +#endif Added: head/tools/build/cross-build/include/common/string.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/string.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,45 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once + +#include_next +/* + * FreeBSD string.h #includes strings.h and all libmd code depends on + * string.h providing explicit_bzero. + */ +#include Added: head/tools/build/cross-build/include/common/sys/_iovec.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/sys/_iovec.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,38 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once Added: head/tools/build/cross-build/include/common/sys/_null.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/sys/_null.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,44 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once + +#if __has_include_next() +#include_next +#else +#include +#endif Added: head/tools/build/cross-build/include/common/sys/_types.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/sys/_types.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,49 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once + +#if __has_include_next() +#include_next +#else +#include +#endif + +/* + * Neither GLibc nor macOS define __va_list but many FreeBSD headers require it. + */ +typedef __builtin_va_list __va_list; Added: head/tools/build/cross-build/include/common/sys/cdefs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/include/common/sys/cdefs.h Tue Aug 25 13:18:53 2020 (r364757) @@ -0,0 +1,278 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once +/* musl libc does not provide a sys/cdefs.h header */ +#if __has_include_next() +#include_next +#else +/* No sys/cdefs.h header exists so we have to provide some basic macros */ +#ifdef __cplusplus +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } +#else +#define __BEGIN_DECLS +#define __END_DECLS +#endif + +#endif + +#ifndef __FBSDID +#define __FBSDID(id) +#endif + +#ifndef __IDSTRING +#define __IDSTRING(name, string) +#endif + +#ifndef rounddown +#define rounddown(x, y) (((x) / (y)) * (y)) +#define rounddown2(x, y) ((x) & (~((y)-1))) /* if y is power of two */ +#define roundup(x, y) ((((x) + ((y)-1)) / (y)) * (y)) /* to any y */ +#define roundup2(x, y) \ + (((x) + ((y)-1)) & (~((y)-1))) /* if y is powers of two */ +#define powerof2(x) ((((x)-1) & (x)) == 0) +#endif + +#ifndef __pure +#define __pure __attribute__((__pure__)) +#endif +#ifndef __packed +#define __packed __attribute__((__packed__)) +#endif +#ifndef __dead2 +#define __dead2 __attribute__((__noreturn__)) +#endif +#ifndef __pure2 +#define __pure2 __attribute__((__const__)) +#endif +#ifndef __used +#define __used __attribute__((__used__)) +#endif +#ifndef __aligned +#define __aligned(x) __attribute__((__aligned__(x))) +#endif +#ifndef __section +#define __section(x) __attribute__((__section__(x))) +#endif + +#ifndef __alloc_size +#define __alloc_size(...) __attribute__((__alloc_size__(__VA_ARGS__))) +#endif +#ifndef __alloc_size2 +#define __alloc_size2(n, x) __attribute__((__alloc_size__(n, x))) +#endif +#ifndef __alloc_align +#define __alloc_align(x) __attribute__((__alloc_align__(x))) +#endif +#ifndef __result_use_check +#define __result_use_check __attribute__((__warn_unused_result__)) +#endif +#ifndef __printflike +#define __printflike(fmtarg, firstvararg) \ + __attribute__((__format__(__printf__, fmtarg, firstvararg))) +#endif +#ifndef __printf0like +#define __printf0like(fmtarg, firstvararg) \ + __attribute__((__format__(__printf0__, fmtarg, firstvararg))) +#endif + +#ifndef __predict_true +#define __predict_true(exp) __builtin_expect((exp), 1) +#endif +#ifndef __predict_false +#define __predict_false(exp) __builtin_expect((exp), 0) +#endif + +#ifndef __weak_reference +#ifdef __ELF__ +#define __weak_reference(sym, alias) \ + __asm__(".weak " #alias); \ + __asm__(".equ " #alias ", " #sym) +#else +#define __weak_reference(sym, alias) \ + static int alias() __attribute__((weakref(#sym))); +#endif +#endif + +/* Some files built as part of the bootstrap libegacy use these macros, but + * since we aren't actually building libc.so, we can defined them to be empty */ +#ifndef __sym_compat +#define __sym_compat(sym, impl, verid) /* not needed for bootstrapping */ +#endif +#ifndef __sym_default +#define __sym_default(sym, impl, verid) /* not needed for bootstrapping */ +#endif +#ifndef __sym_default +#define __warn_references(sym, msg) /* not needed for bootstrapping */ +#endif + +#ifndef __malloc_like +#define __malloc_like __attribute__((__malloc__)) +#endif + +#ifndef nitems +// https://stackoverflow.com/questions/1598773/is-there-a-standard-function-in-c-that-would-return-the-length-of-an-array/1598827#1598827 +#define nitems(x) \ + ((sizeof(x) / sizeof(0 [x])) / ((size_t)(!(sizeof(x) % sizeof(0 [x]))))) +#endif + +#ifndef __min_size +#if !defined(__cplusplus) +#define __min_size(x) static(x) +#else +#define __min_size(x) (x) +#endif +#endif + +#ifndef __unused +#define __unused __attribute__((unused)) +#endif +#define __format_arg(fmtarg) __attribute__((__format_arg__(fmtarg))) + +#ifndef __exported +#define __exported __attribute__((__visibility__("default"))) +#endif +#ifndef __hidden +#define __hidden __attribute__((__visibility__("hidden"))) +#endif + +#ifndef __unreachable +#define __unreachable() __builtin_unreachable() +#endif + +#ifndef __clang__ +/* GCC doesn't like the printf0 format specifier. Clang treats it the same as + * printf so add the compatibility macro here. */ +#define __printf0__ __printf__ +#endif + +/* + * These should probably be in sys/types.h but mtree expects them to exist + * without including + */ +typedef unsigned char u_char; +typedef unsigned short u_short; +typedef unsigned int u_int; +typedef unsigned long u_long; + +/* This is needed so that BSNMP doesn't redeclare an incompatible version */ +#define HAVE_STRLCPY 1 +/* The compiler supports __func__ */ +#define HAVE_DECL___FUNC__ 1 + +/* On MacOS __CONCAT is defined as x ## y, which won't expand macros */ +#undef __CONCAT +#define __CONCAT1(x, y) x##y +#define __CONCAT(x, y) __CONCAT1(x, y) + +#ifndef __STRING +#define __STRING(x) #x /* stringify without expanding x */ +#endif +#ifndef __XSTRING +#define __XSTRING(x) __STRING(x) /* expand x, then stringify */ +#endif + +#ifndef __has_feature +#define __has_feature(...) 0 +#endif + +#ifndef __has_builtin +#define __has_builtin(...) 0 +#endif + +/* + * Nullability qualifiers: currently only supported by Clang. + */ +#if !(defined(__clang__) && __has_feature(nullability)) +#define _Nonnull +#define _Nullable +#define _Null_unspecified +#define __NULLABILITY_PRAGMA_PUSH +#define __NULLABILITY_PRAGMA_POP +#else +#define __NULLABILITY_PRAGMA_PUSH \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wnullability-completeness\"") +#define __NULLABILITY_PRAGMA_POP _Pragma("clang diagnostic pop") +#endif + +#ifndef __offsetof +#define __offsetof(type, field) __builtin_offsetof(type, field) +#endif + +#define __rangeof(type, start, end) \ + (__offsetof(type, end) - __offsetof(type, start)) + +#ifndef __containerof +#define __containerof(x, s, m) \ + ({ \ + const volatile __typeof(((s *)0)->m) *__x = (x); \ + __DEQUALIFY( \ + s *, (const volatile char *)__x - __offsetof(s, m)); \ + }) +#endif + +#ifndef __RCSID +#define __RCSID(x) +#endif +#ifndef __FBSDID +#define __FBSDID(x) +#endif +#ifndef __RCSID +#define __RCSID(x) +#endif +#ifndef __RCSID_SOURCE +#define __RCSID_SOURCE(x) +#endif +#ifndef __SCCSID +#define __SCCSID(x) +#endif +#ifndef __COPYRIGHT +#define __COPYRIGHT(x) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Aug 25 13:21:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0F3D3CB326; Tue, 25 Aug 2020 13:21:50 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbV5B4Ltsz4PTl; Tue, 25 Aug 2020 13:21:50 +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 78E462A751; Tue, 25 Aug 2020 13:21:50 +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 07PDLo5c054236; Tue, 25 Aug 2020 13:21:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PDLoKW054235; Tue, 25 Aug 2020 13:21:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202008251321.07PDLoKW054235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 25 Aug 2020 13:21:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364758 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 364758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 13:21:50 -0000 Author: hselasky Date: Tue Aug 25 13:21:49 2020 New Revision: 364758 URL: https://svnweb.freebsd.org/changeset/base/364758 Log: Add mlx5en(4) to the list of supported netdump network drivers. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/share/man/man4/netdump.4 Modified: head/share/man/man4/netdump.4 ============================================================================== --- head/share/man/man4/netdump.4 Tue Aug 25 13:18:53 2020 (r364757) +++ head/share/man/man4/netdump.4 Tue Aug 25 13:21:49 2020 (r364758) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2019 +.Dd August 25, 2020 .Dt NETDUMP 4 .Os .Sh NAME @@ -110,6 +110,7 @@ The following network drivers support netdump: .Xr ix 4 , .Xr ixl 4 , .Xr mlx4en 4 , +.Xr mlx5en 4 , .Xr re 4 , .Xr vtnet 4 . .Sh SYSCTL VARIABLES From owner-svn-src-all@freebsd.org Tue Aug 25 13:23:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F38743CB489; Tue, 25 Aug 2020 13:23:33 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbV796Xx4z4PcH; Tue, 25 Aug 2020 13:23:33 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3BB32A5E0; Tue, 25 Aug 2020 13:23:33 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PDNXL3055074; Tue, 25 Aug 2020 13:23:33 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PDNV7f055061; Tue, 25 Aug 2020 13:23:31 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008251323.07PDNV7f055061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Tue, 25 Aug 2020 13:23:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364759 - in head: lib/libc/gen lib/libcapsicum tools/build tools/build/cross-build tools/build/libc-bootstrap tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head: lib/libc/gen lib/libcapsicum tools/build tools/build/cross-build tools/build/libc-bootstrap tools/build/mk X-SVN-Commit-Revision: 364759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 13:23:34 -0000 Author: arichardson Date: Tue Aug 25 13:23:31 2020 New Revision: 364759 URL: https://svnweb.freebsd.org/changeset/base/364759 Log: Add missing FreeBSD functions to -legacy when building on macOS/Linux In most cases this simply builds the file from lib/libc for missing functions (e.g. strlcpy on Linux etc.). In cases where this is not possible I've added an implementation to tools/build/cross-build. The fgetln.c/fgetwln.c/closefrom.c compatibility code was obtained from https://gitlab.freedesktop.org/libbsd/libbsd, but I'm not sure it makes sense to import it into to contrib just for these three bootstrap files. Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D25978 Added: head/tools/build/cross-build/capsicum_stubs.c (contents, props changed) head/tools/build/cross-build/closefrom.c (contents, props changed) head/tools/build/cross-build/fake_sysctl.c (contents, props changed) head/tools/build/cross-build/fgetln_fallback.c (contents, props changed) head/tools/build/cross-build/fgetwln_fallback.c (contents, props changed) head/tools/build/cross-build/local-link.h (contents, props changed) head/tools/build/cross-build/progname.c (contents, props changed) head/tools/build/libc-bootstrap/ head/tools/build/libc-bootstrap/libc_private.h (contents, props changed) head/tools/build/libc-bootstrap/namespace.h (contents, props changed) head/tools/build/libc-bootstrap/un-namespace.h (contents, props changed) head/tools/build/mk/Makefile.boot.pre (contents, props changed) Modified: head/lib/libc/gen/arc4random.h head/lib/libcapsicum/capsicum_helpers.h head/tools/build/Makefile head/tools/build/mk/Makefile.boot head/tools/build/mk/bsd.lib.mk head/tools/build/mk/bsd.prog.mk Modified: head/lib/libc/gen/arc4random.h ============================================================================== --- head/lib/libc/gen/arc4random.h Tue Aug 25 13:21:49 2020 (r364758) +++ head/lib/libc/gen/arc4random.h Tue Aug 25 13:23:31 2020 (r364759) @@ -58,11 +58,13 @@ _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) if ((p = mmap(NULL, sizeof(*p), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) return (-1); + /* Allow bootstrapping arc4random.c on Linux/macOS */ +#ifdef INHERIT_ZERO if (minherit(p, sizeof(*p), INHERIT_ZERO) == -1) { munmap(p, sizeof(*p)); return (-1); } - +#endif *rsp = &p->rs; *rsxp = &p->rsx; return (0); Modified: head/lib/libcapsicum/capsicum_helpers.h ============================================================================== --- head/lib/libcapsicum/capsicum_helpers.h Tue Aug 25 13:21:49 2020 (r364758) +++ head/lib/libcapsicum/capsicum_helpers.h Tue Aug 25 13:23:31 2020 (r364759) @@ -49,7 +49,17 @@ __BEGIN_DECLS static const unsigned long caph_stream_cmds[] = - { TIOCGETA, TIOCGWINSZ, FIODTYPE }; + { +#ifdef TIOCGETA + TIOCGETA, +#endif +#ifdef TIOCGWINSZ + TIOCGWINSZ, +#endif +#ifdef FIODTYPE + FIODTYPE, +#endif + }; static const uint32_t caph_stream_fcntls = CAP_FCNTL_GETFL; static __inline void Modified: head/tools/build/Makefile ============================================================================== --- head/tools/build/Makefile Tue Aug 25 13:21:49 2020 (r364758) +++ head/tools/build/Makefile Tue Aug 25 13:23:31 2020 (r364759) @@ -5,6 +5,7 @@ LIB= egacy SRC= INCSGROUPS= INCS SYSINCS CASPERINC UFSINCS FFSINCS MSDOSFSINCS DISKINCS +INCSGROUPS+= MACHINESYSINCS RPCINCS INCS= SYSINCSDIR= ${INCLUDEDIR}/sys @@ -14,49 +15,83 @@ UFSINCSDIR= ${INCLUDEDIR}/ufs/ufs FFSINCSDIR= ${INCLUDEDIR}/ufs/ffs MSDOSFSINCSDIR= ${INCLUDEDIR}/fs/msdosfs DISKINCSDIR= ${INCLUDEDIR}/sys/disk +MACHINESYSINCSDIR= ${INCLUDEDIR}/machine +RPCINCSDIR= ${INCLUDEDIR}/rpc BOOTSTRAPPING?= 0 -_WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/grp.h || true + +.if ${.MAKE.OS} == "Darwin" +_XCODE_ROOT!=xcode-select -p +# since macOS 10.14 C headers are no longer installed in /usr but only +# provided via the SDK +.if ${_XCODE_ROOT} == "/Library/Developer/CommandLineTools" +# Only command line tools installed -> host headers are in the SDKs directory +_MACOS_SDK_DIR=${_XCODE_ROOT}/SDKs/MacOSX.sdk/ +.else +# Full XCode installed -> host headers are below Platforms/MacOSX.platform +_MACOS_SDK_DIR=${_XCODE_ROOT}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk +.endif +HOST_INCLUDE_ROOT=${_MACOS_SDK_DIR}/usr/include +.if !exists(${HOST_INCLUDE_ROOT}/stdio.h) +.error "You must install the macOS SDK (try xcode-select --install)" +.endif +.else +HOST_INCLUDE_ROOT=/usr/include +.endif + +# Allow building libc-internal files (also on non-FreeBSD hosts) +CFLAGS+= -I${.CURDIR}/libc-bootstrap +# Symbol versioning is not required for -legacy (and macOS bootstrap) +MK_SYMVER= no + +_WITH_PWCACHEDB!= grep -c pwcache_groupdb ${HOST_INCLUDE_ROOT}/grp.h || true .if ${_WITH_PWCACHEDB} == 0 .PATH: ${.CURDIR}/../../contrib/libc-pwcache -CFLAGS+= -I${.CURDIR}/../../contrib/libc-pwcache \ - -I${.CURDIR}/../../lib/libc/include +CFLAGS.pwcache.c+= -I${.CURDIR}/../../contrib/libc-pwcache SRCS+= pwcache.c .endif -_WITH_STRSVIS!= grep -c strsvis /usr/include/vis.h || true +_WITH_STRSVIS!= grep -c strsvis ${HOST_INCLUDE_ROOT}/vis.h 2>/dev/null || true .if ${_WITH_STRSVIS} == 0 .PATH: ${.CURDIR}/../../contrib/libc-vis -SRCS+= vis.c -CFLAGS+= -I${.CURDIR}/../../contrib/libc-vis \ - -I${.CURDIR}/../../lib/libc/include +INCS+= vis.h +SRCS+= vis.c unvis.c +CFLAGS.vis.c+= -I${.CURDIR}/../../contrib/libc-vis +CFLAGS.unvis.c+= -I${.CURDIR}/../../contrib/libc-vis .endif -_WITH_REALLOCARRAY!= grep -c reallocarray /usr/include/stdlib.h || true +_WITH_REALLOCARRAY!= grep -c reallocarray ${HOST_INCLUDE_ROOT}/stdlib.h || true .if ${_WITH_REALLOCARRAY} == 0 .PATH: ${.CURDIR}/../../lib/libc/stdlib INCS+= stdlib.h SRCS+= reallocarray.c -CFLAGS+= -I${.CURDIR}/../../lib/libc/include .endif -_WITH_UTIMENS!= grep -c utimensat /usr/include/sys/stat.h || true +_WITH_UTIMENS!= grep -c utimensat ${HOST_INCLUDE_ROOT}/sys/stat.h || true .if ${_WITH_UTIMENS} == 0 SYSINCS+= stat.h SRCS+= futimens.c utimensat.c .endif -_WITH_EXPLICIT_BZERO!= grep -c explicit_bzero /usr/include/strings.h || true +_WITH_EXPLICIT_BZERO!= grep -c explicit_bzero ${HOST_INCLUDE_ROOT}/strings.h || true .if ${_WITH_EXPLICIT_BZERO} == 0 -.PATH: ${SRCTOP}/sys/libkern +# .PATH: ${SRCTOP}/sys/libkern +# Adding sys/libkern to .PATH breaks building the cross-build compat library +# since that attempts to build strlcpy.c from libc and adding libkern here will +# cause it to pick the file from libkern instead (which won't compile). +# Avoid modifying .PATH by creating a copy in the build directory instead. +explicit_bzero.c: ${SRCTOP}/sys/libkern/explicit_bzero.c + cp ${.ALLSRC} ${.TARGET} +CLEANFILES+= explicit_bzero.c INCS+= strings.h SRCS+= explicit_bzero.c .endif -.if exists(/usr/include/capsicum_helpers.h) -_WITH_CAPH_ENTER!= grep -c caph_enter /usr/include/capsicum_helpers.h || true -_WITH_CAPH_RIGHTS_LIMIT!= grep -c caph_rights_limit /usr/include/capsicum_helpers.h || true + +.if exists(${HOST_INCLUDE_ROOT}/capsicum_helpers.h) +_WITH_CAPH_ENTER!= grep -c caph_enter ${HOST_INCLUDE_ROOT}/capsicum_helpers.h || true +_WITH_CAPH_RIGHTS_LIMIT!= grep -c caph_rights_limit ${HOST_INCLUDE_ROOT}/capsicum_helpers.h || true .endif .if !defined(_WITH_CAPH_ENTER) || ${_WITH_CAPH_ENTER} == 0 || ${_WITH_CAPH_RIGHTS_LIMIT} == 0 .PATH: ${SRCTOP}/lib/libcapsicum @@ -65,6 +100,105 @@ INCS+= capsicum_helpers.h INCS+= libcasper.h .endif +# rpcgen should build against the source tree rpc/types.h and not the host. +# This is especially important on non-FreeBSD systems where the types may +# not match. +RPCINCS+= ${SRCTOP}/sys/rpc/types.h + +.if ${.MAKE.OS} != "FreeBSD" +.PATH: ${.CURDIR}/cross-build + +INCS+= ${SRCTOP}/include/mpool.h +INCS+= ${SRCTOP}/include/ndbm.h +INCS+= ${SRCTOP}/include/err.h +INCS+= ${SRCTOP}/include/stringlist.h + +# Needed to build arc4random.c +INCSGROUPS+= CHACHA20INCS +CHACHA20INCSDIR= ${INCLUDEDIR}/crypto/chacha20 +CHACHA20INCS+= ${SRCTOP}/sys/crypto/chacha20/_chacha.h \ + ${SRCTOP}/sys/crypto/chacha20/chacha.h + +_host_arch=${MACHINE} +.if ${_host_arch} == "x86_64" +# bmake on Linux/mac often prints that instead of amd64 +_host_arch=amd64 +.endif +.if ${_host_arch} == "unknown" +# HACK: If MACHINE is unknown, assume we are building on x86 +_host_arch=amd64 +.endif +MACHINESYSINCS+= ${SRCTOP}/sys/${_host_arch}/include/elf.h +.if ${_host_arch} == "amd64" || ${_host_arch} == "i386" +INCSGROUPS+= X86INCS +X86INCSDIR= ${INCLUDEDIR}/x86 +X86INCS+= ${SRCTOP}/sys/x86/include/elf.h +.endif + +# needed for btxld: +MACHINESYSINCS+= ${SRCTOP}/sys/${_host_arch}/include/exec.h +MACHINESYSINCS+= ${SRCTOP}/sys/${_host_arch}/include/reloc.h +INCS+= ${SRCTOP}/include/a.out.h +INCS+= ${SRCTOP}/include/nlist.h +SYSINCS+= ${SRCTOP}/sys/sys/imgact_aout.h +SYSINCS+= ${SRCTOP}/sys/sys/nlist_aout.h + +# dbopen() behaves differently on Linux and FreeBSD so we ensure that we +# bootstrap the FreeBSD db code. The cross-build headers #define dbopen() to +# __freebsd_dbopen() so that we don't ever use the host version +INCS+= ${SRCTOP}/include/db.h +LIBC_SRCTOP= ${SRCTOP}/lib/libc/ +.include "${LIBC_SRCTOP}/db/Makefile.inc" +# Do the same as we did for dbopen() for getopt() on since it's not compatible +# on Linux (and to avoid surprises also compile the FreeBSD code on macOS) +.PATH: ${LIBC_SRCTOP}/stdlib +SRCS+= getopt.c getopt_long.c +INCS+= ${SRCTOP}/include/getopt.h + +# getcap.c is needed for cap_mkdb: +.PATH: ${LIBC_SRCTOP}/gen +SRCS+= getcap.c +# Add various libbc functions that are not available in glibc: +SRCS+= stringlist.c setmode.c +SRCS+= strtonum.c merge.c heapsort.c reallocf.c +.PATH: ${LIBC_SRCTOP}/locale +SRCS+= rpmatch.c + +.if ${.MAKE.OS} == "Linux" +# On Linux, glibc does not provide strlcpy,strlcat or strmode. +.PATH: ${LIBC_SRCTOP}/string +SRCS+= strlcpy.c strlcat.c strmode.c +# Compile the fgetln/fgetwln/closefrom fallback code from libbsd: +SRCS+= fgetln_fallback.c fgetwln_fallback.c closefrom.c +CFLAGS.closefrom.c+= -DSTDC_HEADERS -DHAVE_SYS_DIR_H -DHAVE_DIRENT_H \ + -DHAVE_DIRFD -DHAVE_SYSCONF +# Provide warnc/errc/getprogname/setprograme +SRCS+= err.c progname.c +.endif +# Provide the same arc4random implementation on Linux/macOS +CFLAGS.arc4random.c+= -I${SRCTOP}/sys/crypto/chacha20 -D__isthreaded=1 +SRCS+= arc4random.c arc4random_uniform.c + +# expand_number() is not provided by either Linux or MacOS libutil +.PATH: ${SRCTOP}/lib/libutil +SRCS+= expand_number.c +# Linux libutil also doesn't have fparseln +SRCS+= fparseln.c +# A dummy sysctl for tzsetup: +SRCS+= fake_sysctl.c + +# capsicum support +SYSINCS+= ${SRCTOP}/sys/sys/capsicum.h +SYSINCS+= ${SRCTOP}/sys/sys/caprights.h +SRCS+= capsicum_stubs.c +# XXX: we can't add ${SRCTOP}/sys/kern to .PATH since that will causes +# conflicts with other files. Instead copy subr_capability to the build dir. +subr_capability.c: ${SRCTOP}/sys/kern/subr_capability.c + cp ${.ALLSRC} ${.TARGET} +SRCS+= subr_capability.c +CLEANFILES+= subr_capability.c +.endif + CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs.h .if empty(SRCS) @@ -97,9 +231,22 @@ SYSINCS+= ${SRCTOP}/sys/sys/elf32.h SYSINCS+= ${SRCTOP}/sys/sys/elf64.h SYSINCS+= ${SRCTOP}/sys/sys/elf_common.h SYSINCS+= ${SRCTOP}/sys/sys/elf_generic.h +SYSINCS+= ${SRCTOP}/sys/sys/queue.h +SYSINCS+= ${SRCTOP}/sys/sys/md5.h +SYSINCS+= ${SRCTOP}/sys/sys/sbuf.h +SYSINCS+= ${SRCTOP}/sys/sys/tree.h # vtfontcvt is using sys/font.h SYSINCS+= ${SRCTOP}/sys/sys/font.h +# For mkscrfil.c: +SYSINCS+= ${SRCTOP}/sys/sys/consio.h +# for gencat: +INCS+= ${SRCTOP}/include/nl_types.h +# for vtfontcvt: +SYSINCS+= ${SRCTOP}/sys/sys/fnv_hash.h +# opensolaris compatibility +INCS+= ${SRCTOP}/include/elf.h +SYSINCS+= ${SRCTOP}/sys/sys/elf.h # We want to run the build with only ${WORLDTMP} in $PATH to ensure we don't # accidentally run tools that are incompatible but happen to be in $PATH. @@ -121,6 +268,19 @@ _host_tools_to_symlink= basename bzip2 bunzip2 chmod c # since e.g. on Linux and MacOS that will be GNU make. _make_abs!= which "${MAKE}" _host_abs_tools_to_symlink= ${_make_abs}:make ${_make_abs}:bmake + +.if ${.MAKE.OS} != "FreeBSD" +_make_abs!= which "${MAKE}" +_host_abs_tools_to_symlink+= ${_make_abs}:make ${_make_abs}:bmake +.if ${.MAKE.OS} == "Darwin" +# /usr/bin/cpp may invoke xcrun: +_host_tools_to_symlink+=xcrun +.endif # ${.MAKE.OS} == "Darwin" +# On Ubuntu /bin/sh is dash which is totally useless. Let's just link bash +# as the build sh since that will work fine. +_host_abs_tools_to_symlink+= /bin/bash:sh +_host_tools_to_symlink:=${_host_tools_to_symlink:Nsh} +.endif host-symlinks: @echo "Linking host tools into ${DESTDIR}/bin" Added: head/tools/build/cross-build/capsicum_stubs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/capsicum_stubs.c Tue Aug 25 13:23:31 2020 (r364759) @@ -0,0 +1,67 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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. + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include + +int +cap_ioctls_limit(int fd, const cap_ioctl_t *cmds, size_t ncmds) +{ + return 0; /* Just pretend that it succeeded */ +} + +int +cap_fcntls_limit(int fd, uint32_t fcntlrights) +{ + return 0; /* Just pretend that it succeeded */ +} + +int +cap_rights_limit(int fd, const cap_rights_t *rights) +{ + return 0; /* Just pretend that it succeeded */ +} + +int +cap_enter(void) +{ + errno = ENOSYS; + return -1; +} Added: head/tools/build/cross-build/closefrom.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/closefrom.c Tue Aug 25 13:23:31 2020 (r364759) @@ -0,0 +1,192 @@ +/* + * Copyright (c) 2004-2005, 2007, 2010, 2012-2014 + * Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +// #include + +#include +#include +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif /* STDC_HEADERS */ +#include +#include +#ifdef HAVE_PSTAT_GETPROC +# include +# include +#else +# ifdef HAVE_DIRENT_H +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +# else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# ifdef HAVE_SYS_NDIR_H +# include +# endif +# ifdef HAVE_SYS_DIR_H +# include +# endif +# ifdef HAVE_NDIR_H +# include +# endif +# endif +#endif + +#ifndef OPEN_MAX +# define OPEN_MAX 256 +#endif + +#if defined(HAVE_FCNTL_CLOSEM) && !defined(HAVE_DIRFD) +# define closefrom closefrom_fallback +#endif + +static inline void +closefrom_close(int fd) +{ +#ifdef __APPLE__ + /* Avoid potential libdispatch crash when we close its fds. */ + (void)fcntl(fd, F_SETFD, FD_CLOEXEC); +#else + (void)close(fd); +#endif +} + +/* + * Close all file descriptors greater than or equal to lowfd. + * This is the expensive (fallback) method. + */ +void +closefrom_fallback(int lowfd) +{ + long fd, maxfd; + + /* + * Fall back on sysconf() or getdtablesize(). We avoid checking + * resource limits since it is possible to open a file descriptor + * and then drop the rlimit such that it is below the open fd. + */ +#ifdef HAVE_SYSCONF + maxfd = sysconf(_SC_OPEN_MAX); +#else + maxfd = getdtablesize(); +#endif /* HAVE_SYSCONF */ + if (maxfd < 0) + maxfd = OPEN_MAX; + + for (fd = lowfd; fd < maxfd; fd++) + closefrom_close(fd); +} + +/* + * Close all file descriptors greater than or equal to lowfd. + * We try the fast way first, falling back on the slow method. + */ +#if defined(HAVE_FCNTL_CLOSEM) +void +closefrom(int lowfd) +{ + if (fcntl(lowfd, F_CLOSEM, 0) == -1) + closefrom_fallback(lowfd); +} +#elif defined(HAVE_PSTAT_GETPROC) +void +closefrom(int lowfd) +{ + struct pst_status pstat; + int fd; + + if (pstat_getproc(&pstat, sizeof(pstat), 0, getpid()) != -1) { + for (fd = lowfd; fd <= pstat.pst_highestfd; fd++) + (void)close(fd); + } else { + closefrom_fallback(lowfd); + } +} +#elif defined(HAVE_DIRFD) +static int +closefrom_procfs(int lowfd) +{ + const char *path; + DIR *dirp; + struct dirent *dent; + int *fd_array = NULL; + int fd_array_used = 0; + int fd_array_size = 0; + int ret = 0; + int i; + + /* Use /proc/self/fd (or /dev/fd on FreeBSD) if it exists. */ +# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) + path = "/dev/fd"; +# else + path = "/proc/self/fd"; +# endif + dirp = opendir(path); + if (dirp == NULL) + return -1; + + while ((dent = readdir(dirp)) != NULL) { + const char *errstr; + int fd; + + fd = strtonum(dent->d_name, lowfd, INT_MAX, &errstr); + if (errstr != NULL || fd == dirfd(dirp)) + continue; + + if (fd_array_used >= fd_array_size) { + int *ptr; + + if (fd_array_size > 0) + fd_array_size *= 2; + else + fd_array_size = 32; + + ptr = reallocarray(fd_array, fd_array_size, sizeof(int)); + if (ptr == NULL) { + ret = -1; + break; + } + fd_array = ptr; + } + + fd_array[fd_array_used++] = fd; + } + + for (i = 0; i < fd_array_used; i++) + closefrom_close(fd_array[i]); + + free(fd_array); + (void)closedir(dirp); + + return ret; +} + +void +closefrom(int lowfd) +{ + if (closefrom_procfs(lowfd) == 0) + return; + + closefrom_fallback(lowfd); +} +#endif /* HAVE_FCNTL_CLOSEM */ Added: head/tools/build/cross-build/fake_sysctl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/fake_sysctl.c Tue Aug 25 13:23:31 2020 (r364759) @@ -0,0 +1,58 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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. + */ +/* This file contains wrappers for sysctls used during build/install */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +int +__freebsd_sysctlbyname( + const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen) +{ + if (strcmp(name, "kern.vm_guest") == 0) { + if (!oldp || !oldlenp) + errx(EX_USAGE, "Missing arguments for kern.vm_guest"); + + if (newp || newlen) + errx(EX_USAGE, "kern.vm_guest is read-only"); + strlcpy(oldp, "none", *oldlenp); + *oldlenp = strlen("none"); + } + errx(EX_USAGE, "fatal: unknown sysctl %s\n", name); +} Added: head/tools/build/cross-build/fgetln_fallback.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/fgetln_fallback.c Tue Aug 25 13:23:31 2020 (r364759) @@ -0,0 +1,84 @@ +/* + * Copyright © 2005 Hector Garcia Alvarez + * Copyright © 2005, 2008-2012 Guillem Jover + * + * 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. 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 ``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. + */ + +#include +#include +#include +#include + +#include "local-link.h" + +#define HAVE_GETLINE 1 +#ifdef HAVE_GETLINE +struct filebuf { + FILE *fp; + char *buf; + size_t len; +}; + +#define FILEBUF_POOL_ITEMS 32 + +static struct filebuf fb_pool[FILEBUF_POOL_ITEMS]; +static int fb_pool_cur; + +char * +fgetln(FILE *stream, size_t *len) +{ + struct filebuf *fb; + ssize_t nread; + + flockfile(stream); + + /* Try to diminish the possibility of several fgetln() calls being + * used on different streams, by using a pool of buffers per file. */ + fb = &fb_pool[fb_pool_cur]; + if (fb->fp != stream && fb->fp != NULL) { + fb_pool_cur++; + fb_pool_cur %= FILEBUF_POOL_ITEMS; + fb = &fb_pool[fb_pool_cur]; + } + fb->fp = stream; + + nread = getline(&fb->buf, &fb->len, stream); + + funlockfile(stream); + + /* Note: the getdelim/getline API ensures nread != 0. */ + if (nread == -1) { + *len = 0; + return NULL; + } else { + *len = (size_t)nread; + return fb->buf; + } +} +libbsd_link_warning(fgetln, + "This function cannot be safely ported, use getline(3) " + "instead, as it is supported by GNU and POSIX.1-2008.") +#else +#error "Function fgetln() needs to be ported." +#endif Added: head/tools/build/cross-build/fgetwln_fallback.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/fgetwln_fallback.c Tue Aug 25 13:23:31 2020 (r364759) @@ -0,0 +1,93 @@ +/* + * Copyright 2012 Guillem Jover + * + * 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. 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 ``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. + */ + +#include + +#include +#include +#include + +#include "local-link.h" + +struct filewbuf { + FILE *fp; + wchar_t *wbuf; + size_t len; +}; + +#define FILEWBUF_INIT_LEN 128 +#define FILEWBUF_POOL_ITEMS 32 + +static struct filewbuf fb_pool[FILEWBUF_POOL_ITEMS]; +static int fb_pool_cur; + +wchar_t * +fgetwln(FILE *stream, size_t *lenp) +{ + struct filewbuf *fb; + wint_t wc; + size_t wused = 0; + + /* Try to diminish the possibility of several fgetwln() calls being + * used on different streams, by using a pool of buffers per file. */ + fb = &fb_pool[fb_pool_cur]; + if (fb->fp != stream && fb->fp != NULL) { + fb_pool_cur++; + fb_pool_cur %= FILEWBUF_POOL_ITEMS; + fb = &fb_pool[fb_pool_cur]; + } + fb->fp = stream; + + while ((wc = fgetwc(stream)) != WEOF) { + if (!fb->len || wused >= fb->len) { + wchar_t *wp; + + if (fb->len) + fb->len *= 2; + else + fb->len = FILEWBUF_INIT_LEN; + + wp = reallocarray(fb->wbuf, fb->len, sizeof(wchar_t)); + if (wp == NULL) { + wused = 0; + break; + } + fb->wbuf = wp; + } + + fb->wbuf[wused++] = wc; + + if (wc == L'\n') + break; + } + + *lenp = wused; + return wused ? fb->wbuf : NULL; +} + +libbsd_link_warning(fgetwln, + "This function cannot be safely ported, use fgetwc(3) " + "instead, as it is supported by C99 and POSIX.1-2001.") Added: head/tools/build/cross-build/local-link.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/local-link.h Tue Aug 25 13:23:31 2020 (r364759) @@ -0,0 +1,38 @@ +/* + * Copyright © 2015 Guillem Jover + * + * 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. 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 ``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. + */ + +#ifndef LIBBSD_LOCAL_LINK_H +#define LIBBSD_LOCAL_LINK_H + +#ifdef notyet +#define libbsd_link_warning(symbol, msg) \ + static const char libbsd_emit_link_warning_##symbol[] \ + __attribute__((__used__,__section__(".gnu.warning." #symbol))) = msg; +#else +#define libbsd_link_warning(symbol, msg) +#endif + +#endif Added: head/tools/build/cross-build/progname.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/cross-build/progname.c Tue Aug 25 13:23:31 2020 (r364759) @@ -0,0 +1,53 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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. + */ +#include +__FBSDID("$FreeBSD$"); + +#include + +#ifdef __GLIBC__ +extern const char *__progname; +const char * +getprogname(void) +{ + return (__progname); +} +void +setprogname(const char *progname) +{ + __progname = progname; +} +#endif /* __GLIBC__ */ Added: head/tools/build/libc-bootstrap/libc_private.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/libc-bootstrap/libc_private.h Tue Aug 25 13:23:31 2020 (r364759) @@ -0,0 +1,40 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once + +#define __libc_sigprocmask(a, b, c) sigprocmask(a, b, c) Added: head/tools/build/libc-bootstrap/namespace.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/libc-bootstrap/namespace.h Tue Aug 25 13:23:31 2020 (r364759) @@ -0,0 +1,52 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2018-2020 Alex Richardson + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ +#pragma once + +#define _open(...) open(__VA_ARGS__) +#define _close(a) close(a) +#define _fstat(a, b) fstat(a, b) +#define _read(a, b, c) read(a, b, c) +#define _write(a, b, c) write(a, b, c) +#define _writev(a, b, c) writev(a, b, c) +#define _fsync(a) fsync(a) +#define _getprogname() getprogname() +#define _err(...) err(__VA_ARGS__) + +#define _pthread_mutex_unlock pthread_mutex_unlock +#define _pthread_mutex_lock pthread_mutex_lock + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Aug 25 13:29:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B876B3CB44A; Tue, 25 Aug 2020 13:29:58 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbVGZ4lbWz4Pyj; Tue, 25 Aug 2020 13:29:58 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85FF42A178; Tue, 25 Aug 2020 13:29:58 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PDTwd4055477; Tue, 25 Aug 2020 13:29:58 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PDTvTR055471; Tue, 25 Aug 2020 13:29:57 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008251329.07PDTvTR055471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Tue, 25 Aug 2020 13:29:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364760 - in head: . sys/conf tools/build tools/build/bootstrap-m4 tools/build/cross-build/fake_chflags usr.bin/m4 X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head: . sys/conf tools/build tools/build/bootstrap-m4 tools/build/cross-build/fake_chflags usr.bin/m4 X-SVN-Commit-Revision: 364760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 13:29:58 -0000 Author: arichardson Date: Tue Aug 25 13:29:57 2020 New Revision: 364760 URL: https://svnweb.freebsd.org/changeset/base/364760 Log: Add necessary Makefile.inc1 infrastructure for building on non-FreeBSD The most awkward bit in this patch is the bootstrapping of m4: We can't simply use the host version of m4 since that is not compatible with the flags passed by lex (at least on macOS, possibly also on Linux). Therefore we need to bootstrap m4, but lex needs m4 to build and m4 also depends on lex (which needs m4 to generate any files). To work around this cyclic dependency we can build a bootstrap version of m4 (with pre-generated files) then use that to build the real m4. This patch also changes the xz/unxz/dd tools to always use the host version since the version in the source tree cannot easily be bootstrapped on macOS or Linux. Reviewed By: brooks, imp (earlier version) Differential Revision: https://reviews.freebsd.org/D25992 Added: head/tools/build/bootstrap-m4/ head/tools/build/bootstrap-m4/Makefile (contents, props changed) head/tools/build/bootstrap-m4/inittokenizer.c (contents, props changed) head/tools/build/cross-build/fake_chflags/ head/tools/build/cross-build/fake_chflags/Makefile (contents, props changed) head/tools/build/cross-build/fake_chflags/chflags (contents, props changed) Modified: head/Makefile.inc1 head/sys/conf/kern.post.mk head/tools/build/Makefile head/usr.bin/m4/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Aug 25 13:23:31 2020 (r364759) +++ head/Makefile.inc1 Tue Aug 25 13:29:57 2020 (r364760) @@ -167,6 +167,19 @@ _t= ${TARGET_ARCH}/${TARGET} .endif .endfor +.if ${.MAKE.OS} != "FreeBSD" +CROSSBUILD_HOST=${.MAKE.OS} +.if ${.MAKE.OS} != "Linux" && ${.MAKE.OS} != "Darwin" +.warning "Unsupported crossbuild system: ${.MAKE.OS}. Build will probably fail!" +.endif +# We need to force NO_ROOT/DB_FROM_SRC builds when building on other operating +# systems since the BSD.foo.dist specs contain users and groups that do not +# exist by default on a Linux/MacOS system. +NO_ROOT:= 1 +DB_FROM_SRC:= 1 +.export NO_ROOT +.endif + # If all targets are disabled for system llvm then don't expect it to work # for cross-builds. .if !defined(TOOLS_PREFIX) && ${MK_LLVM_TARGET_ALL} == "no" && \ @@ -568,13 +581,16 @@ _CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAK .endif .if make(buildworld) BUILD_ARCH!= uname -p -.if ${MACHINE_ARCH} != ${BUILD_ARCH} +# On some Linux systems uname -p returns "unknown" so skip this check there. +# This check only exists to tell people to use TARGET_ARCH instead of +# MACHINE_ARCH so skipping it when crossbuilding on non-FreeBSD should be fine. +.if ${MACHINE_ARCH} != ${BUILD_ARCH} && ${.MAKE.OS} == "FreeBSD" .error To cross-build, set TARGET_ARCH. .endif .endif WORLDTMP?= ${OBJTOP}/tmp BPATH= ${CCACHE_WRAPPER_PATH_PFX}${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin:${WORLDTMP}/legacy/usr/libexec -XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin +XPATH= ${WORLDTMP}/bin:${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin # When building we want to find the cross tools before the host tools in ${BPATH}. # We also need to add UNIVERSE_TOOLCHAIN_PATH so that we can find the shared @@ -589,6 +605,13 @@ STRICTTMPPATH= ${XPATH}:${BPATH}:${UNIVERSE_TOOLCHAIN_ # USING_SYSTEM_LINKER/USING_SYSTEM_COMPILER. Once these issues have been # resolved it will be turned on by default. BUILD_WITH_STRICT_TMPPATH?=0 +.if defined(CROSSBUILD_HOST) +# When building on non-FreeBSD we can't rely on the tools in /usr/bin being compatible +# with what FreeBSD expects. Therefore we only use tools from STRICTTMPPATH +# during the world build stage. We build most tools during the bootstrap-tools +# phase but symlink host tools that are known to work instead of building them +BUILD_WITH_STRICT_TMPPATH:=1 +.endif .if ${BUILD_WITH_STRICT_TMPPATH} != 0 TMPPATH= ${STRICTTMPPATH} .else @@ -724,7 +747,9 @@ XMAKE= ${BMAKE} \ # kernel-tools stage KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${BPATH}:${PATH} \ - WORLDTMP=${WORLDTMP} + WORLDTMP=${WORLDTMP} \ + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" + KTMAKE= \ TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ @@ -845,7 +870,13 @@ NO_META_IGNORE_HOST_HEADERS= 1 # allows tracking the oldest osreldate to force rebuilds via # META_MODE_BADABI_REVS above. host-osreldate.h: # DO NOT ADD /usr/include/osreldate.h here +.if !defined(CROSSBUILD_HOST) @cp -f /usr/include/osreldate.h ${.TARGET} +.else + @echo "#ifndef __FreeBSD_version" > ${.TARGET} + @echo "#define __FreeBSD_version ${OSRELDATE}" >> ${.TARGET} + @echo "#endif" >> ${.TARGET} +.endif WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ BWPHASE=${.TARGET:C,^_,,} \ @@ -1022,7 +1053,8 @@ _bootstrap-tools: @echo ">>> stage 1.2: bootstrap tools" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools - mkdir -p ${WORLDTMP}/usr ${WORLDTMP}/lib/casper ${WORLDTMP}/lib/geom + mkdir -p ${WORLDTMP}/usr ${WORLDTMP}/lib/casper ${WORLDTMP}/lib/geom \ + ${WORLDTMP}/bin ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${WORLDTMP}/usr >/dev/null ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ @@ -1277,11 +1309,15 @@ __installcheck_sh_check: .PHONY _zoneinfo= zic tzsetup .endif +.if !defined(CROSSBUILD_HOST) +_sysctl=sysctl +.endif + ITOOLS= [ awk cap_mkdb cat chflags chmod chown cmp cp \ date echo egrep find grep id install ${_install-info} \ ln make mkdir mtree mv pwd_mkdb \ - rm sed services_mkdb sh sort strip sysctl test true uname wc ${_zoneinfo} \ - ${LOCAL_ITOOLS} + rm sed services_mkdb sh sort strip ${_sysctl} test true uname wc \ + ${_zoneinfo} ${LOCAL_ITOOLS} # Needed for share/man .if ${MK_MAN_UTILS} != "no" @@ -1317,23 +1353,25 @@ MTREE_MAGIC?= mtree 2.0 distributeworld installworld stageworld: _installcheck_world .PHONY mkdir -p ${INSTALLTMP} progs=$$(for prog in ${ITOOLS}; do \ - if progpath=`which $$prog`; then \ + if progpath=`env PATH=${TMPPATH} which $$prog`; then \ echo $$progpath; \ else \ - echo "Required tool $$prog not found in PATH." >&2; \ + echo "Required tool $$prog not found in PATH ($$PATH)." >&2; \ exit 1; \ fi; \ done); \ - libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | \ - while read line; do \ - set -- $$line; \ - if [ "$$2 $$3" != "not found" ]; then \ - echo $$2; \ - else \ - echo "Required library $$1 not found." >&2; \ - exit 1; \ - fi; \ - done); \ + if [ -z "${CROSSBUILD_HOST}" ] ; then \ + libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | \ + while read line; do \ + set -- $$line; \ + if [ "$$2 $$3" != "not found" ]; then \ + echo $$2; \ + else \ + echo "Required library $$1 not found." >&2; \ + exit 1; \ + fi; \ + done); \ + fi; \ cp $$libs $$progs ${INSTALLTMP} cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale .if defined(NO_ROOT) @@ -2043,10 +2081,9 @@ update: .PHONY # build-tools or cross-tools. # - -# libnv is a requirement for config(8), which is an unconditional +# libnv and libsbuf are requirements for config(8), which is an unconditional # bootstrap-tool. -_config_deps= lib/libnv +_config_deps= lib/libnv lib/libsbuf legacy: .PHONY .if ${BOOTSTRAPPING} < ${MINIMUM_SUPPORTED_OSREL} && ${BOOTSTRAPPING} != 0 @@ -2054,7 +2091,7 @@ legacy: .PHONY false .endif -.for _tool in tools/build ${_config_deps} +.for _tool in tools/build ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \ cd ${.CURDIR}/${_tool}; \ if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \ @@ -2090,12 +2127,23 @@ _bt= _bootstrap-tools # If BOOTSTRAP_ALL_TOOLS is set we will build all the required tools from the # current source tree. Otherwise we create a symlink to the version found in # $PATH during the bootstrap-tools stage. +# When building on non-FreeBSD systems we can't assume that the host binaries +# accept compatible flags or produce compatible output. Therefore we force +# BOOTSTRAP_ALL_TOOLS and just build the FreeBSD version of the binary. +.if defined(CROSSBUILD_HOST) +BOOTSTRAP_ALL_TOOLS:= 1 +.endif .if defined(BOOTSTRAP_ALL_TOOLS) # BOOTSTRAPPING will be set on the command line so we can't override it here. # Instead set BOOTSTRAPPING_OSRELDATE so that the value 0 is set ${BSARGS} BOOTSTRAPPING_OSRELDATE:= 0 .endif +# libnv and libsbuf are requirements for config(8), which is an unconditional +# bootstrap-tool. +_config=usr.sbin/config lib/libnv lib/libsbuf +${_bt}-usr.sbin/config: ${_bt}-lib/libnv ${_bt}-lib/libsbuf + .if ${MK_GAMES} != "no" _strfile= usr.bin/fortune/strfile .endif @@ -2111,13 +2159,20 @@ _vtfontcvt= usr.bin/vtfontcvt # please ensure that you also add a .else case where you add the tool to the # _bootstrap_tools_links variable. .if ${BOOTSTRAPPING} < 1000033 -_m4= usr.bin/m4 +# Note: lex needs m4 to build but m4 also depends on lex (which needs m4 to +# generate any files). To fix this cyclic dependency we can build a bootstrap +# version of m4 (with pre-generated files) then use that to build the real m4. +# We can't simply use the host m4 since e.g. the macOS version does not accept +# the flags that are passed by lex. +# For lex we also use the pre-gerated files since we would otherwise need to +# build awk and sed first (which need lex to build) +# TODO: add a _bootstrap_lex and then build the real lex afterwards _lex= usr.bin/lex -# Note: lex needs m4 to build but m4 also depends on lex. However, lex can be -# bootstrapped so we build lex first. -${_bt}-usr.bin/m4: ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc ${_bt}-${_lex} -_bt_m4_depend=${_bt}-${_m4} -_bt_lex_depend=${_bt}-${_lex} ${_bt_m4_depend} +_m4= tools/build/bootstrap-m4 usr.bin/m4 +${_bt}-tools/build/bootstrap-m4: ${_bt}-usr.bin/lex ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc +${_bt}-usr.bin/m4: ${_bt}-lib/libopenbsd ${_bt}-usr.bin/yacc ${_bt}-usr.bin/lex ${_bt}-tools/build/bootstrap-m4 +_bt_m4_depend=${_bt}-usr.bin/m4 +_bt_lex_depend=${_bt}-usr.bin/lex ${_bt_m4_depend} .else _bootstrap_tools_links+=m4 lex .endif @@ -2183,12 +2238,15 @@ _bootstrap_tools_links+=crunchgen .endif # r296926 -P keymap search path, MFC to stable/10 in r298297 -.if ${BOOTSTRAPPING} < 1003501 || \ - (${BOOTSTRAPPING} >= 1100000 && ${BOOTSTRAPPING} < 1100103) +# Note: kbdcontrol can not be bootstrapped on non-FreeBSD systems +.if !defined(CROSSBUILD_HOST) +.if (${BOOTSTRAPPING} < 1003501 || \ + (${BOOTSTRAPPING} >= 1100000 && ${BOOTSTRAPPING} < 1100103)) _kbdcontrol= usr.sbin/kbdcontrol .else _bootstrap_tools_links+=kbdcontrol .endif +.endif _yacc= usr.bin/yacc @@ -2215,6 +2273,7 @@ ${_bt}-usr.bin/clang/lldb-tblgen: ${_bt}-lib/clang/lib .if ${MK_LOCALES} != "no" _localedef= usr.bin/localedef +${_bt}-usr.bin/localedef: ${_bt}-usr.bin/yacc ${_bt_lex_depend} .endif .if ${MK_KERBEROS} != "no" @@ -2244,8 +2303,8 @@ ${_bt}-usr.bin/mandoc: ${_bt}-lib/libopenbsd _basic_bootstrap_tools_multilink=usr.bin/grep grep,egrep,fgrep _basic_bootstrap_tools_multilink+=bin/test test,[ # bootstrap tools needed by buildworld: -_basic_bootstrap_tools=usr.bin/cut bin/expr usr.bin/gencat \ - usr.bin/join usr.bin/mktemp bin/rmdir usr.bin/sed usr.bin/sort \ +_basic_bootstrap_tools+=usr.bin/cut bin/expr usr.bin/gencat usr.bin/join \ + usr.bin/mktemp bin/realpath bin/rmdir usr.bin/sed usr.bin/sort \ usr.bin/truncate usr.bin/tsort # Some build scripts use nawk instead of awk (this happens at least in # cddl/contrib/opensolaris/lib/libdtrace/common/mknames.sh) so we need both awk @@ -2259,25 +2318,30 @@ _basic_bootstrap_tools+=usr.bin/uuencode usr.bin/uudec _basic_bootstrap_tools+=usr.bin/xargs # cap_mkdb is required for share/termcap: _basic_bootstrap_tools+=usr.bin/cap_mkdb -# ldd is required for installcheck (TODO: just always use /usr/bin/ldd instead?) -_basic_bootstrap_tools+=usr.bin/ldd # services_mkdb/pwd_mkdb are required for installworld: _basic_bootstrap_tools+=usr.sbin/services_mkdb usr.sbin/pwd_mkdb +# ldd is required for installcheck (TODO: just always use /usr/bin/ldd instead?) +.if !defined(CROSSBUILD_HOST) +# ldd is only needed for updating the running system so we don't need to +# bootstrap ldd on non-FreeBSD systems +_basic_bootstrap_tools+=usr.bin/ldd +.endif # sysctl/chflags are required for installkernel: +.if !defined(CROSSBUILD_HOST) _basic_bootstrap_tools+=sbin/sysctl bin/chflags +.else +# When building on non-FreeBSD, install a fake chflags instead since the +# version from the source tree cannot work. We also don't need sysctl since we +# are install with -DNO_ROOT. +_other_bootstrap_tools+=tools/build/cross-build/fake_chflags +.endif # mkfifo is used by sys/conf/newvers.sh _basic_bootstrap_tools+=usr.bin/mkfifo .if ${MK_BOOT} != "no" -_basic_bootstrap_tools+=bin/dd -# xz/unxz is used by EFI -_basic_bootstrap_tools_multilink+=usr.bin/xz xz,unxz # md5 is used by boot/beri (and possibly others) _basic_bootstrap_tools+=sbin/md5 -.if defined(BOOTSTRAP_ALL_TOOLS) -${_bt}-sbin/md5: ${_bt}-lib/libmd .endif -.endif .if ${MK_ZONEINFO} != "no" _basic_bootstrap_tools+=usr.sbin/zic usr.sbin/tzsetup @@ -2297,6 +2361,10 @@ ${_bt}-usr.sbin/config: ${_bt}-usr.bin/file2c ${_bt_le # `make legacy` step. Not adding a link to make is important on non-FreeBSD # since "make" will usually point to GNU make there. _other_bootstrap_tools+=usr.bin/bmake + +# Avoid dependency on host bz2 headers: +_other_bootstrap_tools+=lib/libbz2 +${_bt}-usr.bin/grep: ${_bt}-lib/libbz2 .else # All tools in _basic_bootstrap_tools have the same name as the subdirectory # so we can use :T to get the name of the symlinks that we need to create. @@ -2346,7 +2414,7 @@ bootstrap-tools: ${_bt}-links .PHONY ${_other_bootstrap_tools} \ usr.bin/xinstall \ ${_gensnmptree} \ - usr.sbin/config \ + ${_config} \ ${_flua} \ ${_crunchide} \ ${_crunchgen} \ @@ -2365,6 +2433,14 @@ ${_bt}-${_tool}: ${_bt}-links .PHONY .MAKE bootstrap-tools: ${_bt}-${_tool} .endfor +.if target(${_bt}-lib/libmd) +# If we are bootstrapping libmd (e.g. when building on macOS/Linux) add the +# necessary dependencies: +${_bt}-usr.bin/sort: ${_bt}-lib/libmd +${_bt}-usr.bin/xinstall: ${_bt}-lib/libmd +${_bt}-sbin/md5: ${_bt}-lib/libmd +.endif + # # build-tools: Build special purpose build tools Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue Aug 25 13:23:31 2020 (r364759) +++ head/sys/conf/kern.post.mk Tue Aug 25 13:29:57 2020 (r364760) @@ -395,7 +395,7 @@ kernel-install: .PHONY exit 1 ; \ fi .if exists(${DESTDIR}${KODIR}) - -thiskernel=`sysctl -n kern.bootfile` ; \ + -thiskernel=`sysctl -n kern.bootfile || echo /boot/kernel/kernel` ; \ if [ ! "`dirname "$$thiskernel"`" -ef ${DESTDIR}${KODIR} ] ; then \ chflags -R noschg ${DESTDIR}${KODIR} ; \ rm -rf ${DESTDIR}${KODIR} ; \ Modified: head/tools/build/Makefile ============================================================================== --- head/tools/build/Makefile Tue Aug 25 13:23:31 2020 (r364759) +++ head/tools/build/Makefile Tue Aug 25 13:29:57 2020 (r364760) @@ -260,8 +260,8 @@ SYSINCS+= ${SRCTOP}/sys/sys/elf.h # Linux/MacOS since we only use flags that are supported by all of them. _host_tools_to_symlink= basename bzip2 bunzip2 chmod chown cmp comm cp date dd \ dirname echo env false find fmt gzip gunzip head hostname id ln ls \ - mkdir mv nice patch rm realpath sh sleep stat tee touch tr true \ - uname uniq wc which + mkdir mv nice patch rm sh sleep stat tee touch tr true uname uniq unxz \ + wc which xz # We also need a symlink to the absolute path to the make binary used for # the toplevel makefile. This is not necessarily the same as `which make` @@ -285,9 +285,9 @@ _host_tools_to_symlink:=${_host_tools_to_symlink:Nsh} host-symlinks: @echo "Linking host tools into ${DESTDIR}/bin" .for _tool in ${_host_tools_to_symlink} - @source_path=`which ${_tool}`; \ + @export PATH=$${PATH}:/usr/local/bin; source_path=`which ${_tool}`; \ if [ ! -e "$${source_path}" ] ; then \ - echo "Cannot find host tool '${_tool}'"; false; \ + echo "Cannot find host tool '${_tool}' in PATH ($$PATH)." >&2; false; \ fi; \ rm -f "${DESTDIR}/bin/${_tool}"; \ cp -pf "$${source_path}" "${DESTDIR}/bin/${_tool}" @@ -330,7 +330,7 @@ installdirs: .for _dir in sbin usr/sbin usr/bin # delete existing directories from before r340157 - @if [ ! -L ${DESTDIR}/${_dir} ]; then \ + @if [ -e ${DESTDIR}/${_dir} ] && [ ! -L ${DESTDIR}/${_dir} ]; then \ echo "removing old non-symlink ${DESTDIR}/${_dir}"; \ rm -rf "${DESTDIR}/${_dir}"; \ fi Added: head/tools/build/bootstrap-m4/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/bootstrap-m4/Makefile Tue Aug 25 13:29:57 2020 (r364760) @@ -0,0 +1,27 @@ +# $FreeBSD$ + +# Build a bootstrap version of m4 (needed in order to build libelf and lex) +.PATH: ${SRCTOP}/usr.bin/m4 ${.CURDIR} + +# Avoid using lex or yacc to generate sources +LEX:=/this/should/not/be/used + +tokenizer.c: bootstrap_m4_tokenizer + test -e ${.TARGET} + +# This target is used as a marker in usr.bin/m4/Makefile to not add the +# lex and yacc includes. Therefore we must define it before including +# the other Makefile. +bootstrap_m4_tokenizer: inittokenizer.c +.for _f in tokenizer.c + @cmp -s ${.CURDIR}/init${_f} ${_f} || { \ + echo "Bootstrapping ${_f}" ; \ + ${CP} ${.CURDIR}/init${_f} ${_f} ; \ + } +.endfor + +BINDIR= /usr/bin +.include "${SRCTOP}/usr.bin/m4/Makefile" + +regen: + (cd ${SRCTOP}/usr.bin/m4 && lex -t ${SRCTOP}/usr.bin/m4/tokenizer.l) | grep -v '#line' > inittokenizer.c Added: head/tools/build/bootstrap-m4/inittokenizer.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/bootstrap-m4/inittokenizer.c Tue Aug 25 13:29:57 2020 (r364760) @@ -0,0 +1,1850 @@ + + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 37 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +#if defined(__FreeBSD__) +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS +#endif +#include +#include +#else +#define __dead2 +#endif + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined(__FreeBSD__) || \ + (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart(yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t yyleng; + +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) +#define yy_current_buffer YY_CURRENT_BUFFER + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart (FILE *input_file ); +void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); +void yy_delete_buffer (YY_BUFFER_STATE b ); +void yy_flush_buffer (YY_BUFFER_STATE b ); +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state (void ); + +static void yyensure_buffer_stack (void ); +static void yy_load_buffer_state (void ); +static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); + +void *yyalloc (yy_size_t ); +void *yyrealloc (void *,yy_size_t ); +void yyfree (void * ); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define yywrap() 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; + +typedef int yy_state_type; + +extern int yylineno; + +int yylineno = 1; + +extern char *yytext; +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ) __dead2; + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + yyleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 14 +#define YY_END_OF_BUFFER 15 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[35] = + { 0, + 0, 0, 15, 13, 1, 1, 13, 13, 13, 2, + 2, 13, 13, 13, 13, 1, 9, 10, 12, 2, + 0, 0, 2, 6, 4, 8, 5, 7, 11, 0, + 2, 0, 3, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 1, 1, 1, 1, 5, 1, 1, + 1, 6, 1, 1, 1, 1, 1, 7, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 10, 1, 11, + 12, 13, 1, 1, 14, 14, 14, 14, 14, 14, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 16, 15, 15, 15, 15, 15, 17, 15, 15, + 1, 1, 1, 1, 1, 1, 14, 14, 14, 14, + + 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 16, 15, 15, 15, 15, 15, 17, + 15, 15, 1, 18, 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, 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, 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 + } ; + +static yyconst flex_int32_t yy_meta[19] = + { 0, + 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, + 1, 1, 1, 3, 4, 4, 4, 1 + } ; + +static yyconst flex_int16_t yy_base[39] = + { 0, + 0, 0, 48, 49, 17, 19, 35, 41, 39, 16, + 0, 14, 32, 15, 25, 27, 49, 49, 49, 27, + 0, 0, 0, 49, 49, 49, 49, 49, 49, 32, + 0, 0, 0, 49, 39, 29, 34, 36 + } ; + +static yyconst flex_int16_t yy_def[39] = + { 0, + 34, 1, 34, 34, 34, 34, 34, 34, 34, 34, + 35, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 36, 37, 35, 34, 34, 34, 34, 34, 34, 36, + 37, 38, 38, 0, 34, 34, 34, 34 + } ; + +static yyconst flex_int16_t yy_nxt[68] = + { 0, + 4, 5, 6, 7, 8, 9, 10, 11, 11, 4, + 12, 13, 14, 4, 4, 4, 4, 15, 16, 16, + 16, 16, 20, 20, 24, 25, 27, 28, 16, 16, + 30, 21, 22, 20, 20, 31, 31, 33, 33, 33, + 23, 32, 29, 26, 19, 18, 17, 34, 3, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34 + } ; + +static yyconst flex_int16_t yy_chk[68] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, + 6, 6, 10, 10, 12, 12, 14, 14, 16, 16, + 36, 10, 10, 20, 20, 37, 37, 38, 38, 38, + 35, 30, 15, 13, 9, 8, 7, 3, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int yy_flex_debug; +int yy_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#define YY_NO_INPUT 1 +/* $OpenBSD: tokenizer.l,v 1.9 2017/06/15 13:48:42 bcallah Exp $ */ +/* + * Copyright (c) 2004 Marc Espie + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ +#include "parser.h" +#include +#include +#include +#include +#include + +extern void m4_warnx(const char *, ...); +extern int mimic_gnu; +extern int32_t yylval; + +int32_t number(void); +int32_t parse_radix(void); +extern int yylex(void); + +#define YY_DECL int yylex(void) + +#define INITIAL 0 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy (void ); + +int yyget_debug (void ); + +void yyset_debug (int debug_flag ); + +YY_EXTRA_TYPE yyget_extra (void ); + +void yyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in (void ); + +void yyset_in (FILE * in_str ); + +FILE *yyget_out (void ); + +void yyset_out (FILE * out_str ); + +yy_size_t yyget_leng (void ); + +char *yyget_text (void ); + +int yyget_lineno (void ); + +void yyset_lineno (int line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap (void ); +#else +extern int yywrap (void ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Aug 25 13:30:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5A4E23CB37B; Tue, 25 Aug 2020 13:30:07 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbVGk1syTz4Ptt; Tue, 25 Aug 2020 13:30:05 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 587792A5E5; Tue, 25 Aug 2020 13:30:05 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PDU5C7055576; Tue, 25 Aug 2020 13:30:05 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PDU4WQ055570; Tue, 25 Aug 2020 13:30:04 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008251330.07PDU4WQ055570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Tue, 25 Aug 2020 13:30:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364761 - in head: share/mk sys/conf sys/modules/cloudabi32 sys/modules/cloudabi64 sys/modules/linux sys/modules/linux64 X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head: share/mk sys/conf sys/modules/cloudabi32 sys/modules/cloudabi64 sys/modules/linux sys/modules/linux64 X-SVN-Commit-Revision: 364761 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 13:30:07 -0000 Author: arichardson Date: Tue Aug 25 13:30:03 2020 New Revision: 364761 URL: https://svnweb.freebsd.org/changeset/base/364761 Log: Pass -fuse-ld=/path/to/ld if ${LD} != "ld" This is needed so that setting LD/XLD is not ignored when linking with $CC instead of directly using $LD. Currently only clang accepts an absolute path for -fuse-ld= (Clang 12+ will add a new --ld-path flag), so we now warn when building with GCC and $LD != "ld" since that might result in the wrong linker being used. We have been setting XLD=/path/to/cheri/ld.lld in CheriBSD for a long time and used a similar version of this patch to avoid linking with /usr/bin/ld. This change is also required when building FreeBSD on an Ubuntu with Clang: In that case we set XCC=/usr/lib/llvm-10/bin/clang and since /usr/lib/llvm-10/bin/ does not contain a "ld" binary the build fails with `clang: error: unable to execute command: Executable "ld" doesn't exist!` unless we pass -fuse-ld=/usr/lib/llvm-10/bin/ld.lld. This change passes -fuse-ld instead of copying ${XLD} to WOLRDTMP/bin/ld since then we would have to ensure that this file does not exist while building the bootstrap tools. The cross-linker might not be compatible with the host linker (e.g. when building on macos: host-linker= Mach-O /usr/bin/ld, cross-linker=LLVM ld.lld). Reviewed By: brooks, emaste Differential Revision: https://reviews.freebsd.org/D26055 Modified: head/share/mk/bsd.sys.mk head/sys/conf/kern.mk head/sys/conf/kern.post.mk head/sys/modules/cloudabi32/Makefile head/sys/modules/cloudabi64/Makefile head/sys/modules/linux/Makefile head/sys/modules/linux64/Makefile Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Tue Aug 25 13:29:57 2020 (r364760) +++ head/share/mk/bsd.sys.mk Tue Aug 25 13:30:03 2020 (r364761) @@ -284,6 +284,19 @@ CFLAGS+= ERROR-tried-to-rebuild-during-make-install .endif .endif +# Please keep this if in sync with kern.mk +.if ${LD} != "ld" && (${CC:[1]:H} != ${LD:[1]:H} || ${LD:[1]:T} != "ld") +# Add -fuse-ld=${LD} if $LD is in a different directory or not called "ld". +# Note: Clang 12+ will prefer --ld-path= over -fuse-ld=. +.if ${COMPILER_TYPE} == "clang" +LDFLAGS+= -fuse-ld=${LD:[1]} +.else +# GCC does not support an absolute path for -fuse-ld so we just print this +# warning instead and let the user add the required symlinks. +.warning LD (${LD}) is not the default linker for ${CC} but -fuse-ld= is not supported +.endif +.endif + # Tell bmake not to mistake standard targets for things to be searched for # or expect to ever be up-to-date. PHONY_NOTMAIN = analyze afterdepend afterinstall all beforedepend beforeinstall \ Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Aug 25 13:29:57 2020 (r364760) +++ head/sys/conf/kern.mk Tue Aug 25 13:30:03 2020 (r364761) @@ -270,6 +270,22 @@ CFLAGS+= -std=iso9899:1999 CFLAGS+= -std=${CSTD} .endif # CSTD +# Please keep this if in sync with bsd.sys.mk +.if ${LD} != "ld" && (${CC:[1]:H} != ${LD:[1]:H} || ${LD:[1]:T} != "ld") +# Add -fuse-ld=${LD} if $LD is in a different directory or not called "ld". +# Note: Clang 12+ will prefer --ld-path= over -fuse-ld=. +.if ${COMPILER_TYPE} == "clang" +# Note: unlike bsd.sys.mk we can't use LDFLAGS here since that is used for the +# flags required when linking the kernel. We don't need those flags when +# building the vdsos. However, we do need -fuse-ld, so use ${CCLDFLAGS} instead. +CCLDFLAGS+= -fuse-ld=${LD:[1]} +.else +# GCC does not support an absolute path for -fuse-ld so we just print this +# warning instead and let the user add the required symlinks. +.warning LD (${LD}) is not the default linker for ${CC} but -fuse-ld= is not supported +.endif +.endif + # Set target-specific linker emulation name. LD_EMULATION_aarch64=aarch64elf LD_EMULATION_amd64=elf_x86_64_fbsd Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue Aug 25 13:29:57 2020 (r364760) +++ head/sys/conf/kern.post.mk Tue Aug 25 13:30:03 2020 (r364761) @@ -228,7 +228,7 @@ kernel-clean: # in the a.out ld. For now, this works. hack.pico: Makefile :> hack.c - ${CC} -shared ${CFLAGS} -nostdlib hack.c -o hack.pico + ${CC} ${CCLDFLAGS} -shared ${CFLAGS} -nostdlib hack.c -o hack.pico rm -f hack.c offset.inc: $S/kern/genoffset.sh genoffset.o Modified: head/sys/modules/cloudabi32/Makefile ============================================================================== --- head/sys/modules/cloudabi32/Makefile Tue Aug 25 13:29:57 2020 (r364760) +++ head/sys/modules/cloudabi32/Makefile Tue Aug 25 13:30:03 2020 (r364761) @@ -33,7 +33,7 @@ BINARY_ARCHITECTURE=i386 .endif cloudabi32_vdso.o: ${VDSO_SRCS} - ${CC} -x assembler-with-cpp -m32 -shared -nostdinc -nostdlib \ + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -m32 -shared -nostdinc -nostdlib \ -Wl,-T${SYSDIR}/compat/cloudabi/cloudabi_vdso.lds \ ${VDSO_SRCS} -o ${.TARGET} Modified: head/sys/modules/cloudabi64/Makefile ============================================================================== --- head/sys/modules/cloudabi64/Makefile Tue Aug 25 13:29:57 2020 (r364760) +++ head/sys/modules/cloudabi64/Makefile Tue Aug 25 13:30:03 2020 (r364761) @@ -25,7 +25,7 @@ BINARY_ARCHITECTURE=i386 .endif cloudabi64_vdso.o: ${VDSO_SRCS} - ${CC} -x assembler-with-cpp -shared -nostdinc -nostdlib \ + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -shared -nostdinc -nostdlib \ -Wl,-T${SYSDIR}/compat/cloudabi/cloudabi_vdso.lds \ ${VDSO_SRCS} -o ${.TARGET} Modified: head/sys/modules/linux/Makefile ============================================================================== --- head/sys/modules/linux/Makefile Tue Aug 25 13:29:57 2020 (r364760) +++ head/sys/modules/linux/Makefile Tue Aug 25 13:30:03 2020 (r364761) @@ -54,7 +54,7 @@ linux${SFX}_assym.h: linux${SFX}_genassym.o sh ${SYSDIR}/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET} linux${SFX}_locore.o: linux${SFX}_assym.h assym.inc - ${CC} -x assembler-with-cpp -DLOCORE -m32 -shared -s \ + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -DLOCORE -m32 -shared -s \ -pipe -I. -I${SYSDIR} ${WERROR} -Wall -fno-common -nostdinc -nostdlib \ -fno-omit-frame-pointer -fPIC \ -Wl,-T${SRCTOP}/sys/${MACHINE_CPUARCH}/linux${SFX}/${VDSO}.lds.s \ Modified: head/sys/modules/linux64/Makefile ============================================================================== --- head/sys/modules/linux64/Makefile Tue Aug 25 13:29:57 2020 (r364760) +++ head/sys/modules/linux64/Makefile Tue Aug 25 13:30:03 2020 (r364761) @@ -30,7 +30,7 @@ linux_assym.h: linux_genassym.o sh ${SYSDIR}/kern/genassym.sh linux_genassym.o > ${.TARGET} linux_locore.o: linux_locore.asm linux_assym.h - ${CC} -x assembler-with-cpp -DLOCORE -shared -mcmodel=small \ + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -DLOCORE -shared -mcmodel=small \ -pipe -I. -I${SYSDIR} ${WERROR} -Wall -fno-common -fPIC -nostdinc \ -Wl,-T${SRCTOP}/sys/${MACHINE}/linux/${VDSO}.lds.s \ -Wl,-soname=${VDSO}.so.1,-warn-common -nostdlib \ From owner-svn-src-all@freebsd.org Tue Aug 25 13:30:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5D0B3CB651; Tue, 25 Aug 2020 13:30:12 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbVGp63mNz4Pxd; Tue, 25 Aug 2020 13:30:10 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E9E52A5E6; Tue, 25 Aug 2020 13:30:10 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PDUA2x055632; Tue, 25 Aug 2020 13:30:10 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PDUANg055631; Tue, 25 Aug 2020 13:30:10 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008251330.07PDUANg055631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Tue, 25 Aug 2020 13:30:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364762 - head X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 364762 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 13:30:12 -0000 Author: arichardson Date: Tue Aug 25 13:30:09 2020 New Revision: 364762 URL: https://svnweb.freebsd.org/changeset/base/364762 Log: Fix running the builddtb target on a noexec file system Obtained from: CheriBSD Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Aug 25 13:30:03 2020 (r364761) +++ head/Makefile.inc1 Tue Aug 25 13:30:09 2020 (r364762) @@ -3260,7 +3260,7 @@ DTBOUTPUTPATH= ${.CURDIR} # builddtb: .PHONY @PATH=${TMPPATH} MACHINE=${TARGET} \ - ${.CURDIR}/sys/tools/fdt/make_dtb.sh ${.CURDIR}/sys \ + sh ${.CURDIR}/sys/tools/fdt/make_dtb.sh ${.CURDIR}/sys \ "${FDT_DTS_FILE}" ${DTBOUTPUTPATH} ############### From owner-svn-src-all@freebsd.org Tue Aug 25 13:30:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D46C93CB73D; Tue, 25 Aug 2020 13:30:15 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbVGv4KqXz4Pxq; Tue, 25 Aug 2020 13:30:15 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DEA092A1E1; Tue, 25 Aug 2020 13:30:14 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PDUEBf055687; Tue, 25 Aug 2020 13:30:14 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PDUE7j055686; Tue, 25 Aug 2020 13:30:14 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008251330.07PDUE7j055686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Tue, 25 Aug 2020 13:30:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364763 - head X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 364763 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 13:30:16 -0000 Author: arichardson Date: Tue Aug 25 13:30:14 2020 New Revision: 364763 URL: https://svnweb.freebsd.org/changeset/base/364763 Log: Use bootstrapped install(1) install of tools/install.sh in world stage This should be noticeably faster due to fewer processes being forked and also handles other flags such as -S or writing to METALOG. Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D26039 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Aug 25 13:30:09 2020 (r364762) +++ head/Makefile.inc1 Tue Aug 25 13:30:14 2020 (r364763) @@ -765,7 +765,7 @@ KTMAKE= \ # world stage WMAKEENV= ${CROSSENV} \ - INSTALL="sh ${.CURDIR}/tools/install.sh" \ + INSTALL="${INSTALL_CMD} -U" \ PATH=${TMPPATH} \ SYSROOT=${WORLDTMP} From owner-svn-src-all@freebsd.org Tue Aug 25 13:30:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D90053CB6C4; Tue, 25 Aug 2020 13:30:23 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbVH32g6kz4QD4; Tue, 25 Aug 2020 13:30:23 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C959B2A5E7; Tue, 25 Aug 2020 13:30:19 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PDUJEH055741; Tue, 25 Aug 2020 13:30:19 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PDUJL6055740; Tue, 25 Aug 2020 13:30:19 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008251330.07PDUJL6055740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Tue, 25 Aug 2020 13:30:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364764 - head X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 364764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 13:30:24 -0000 Author: arichardson Date: Tue Aug 25 13:30:19 2020 New Revision: 364764 URL: https://svnweb.freebsd.org/changeset/base/364764 Log: Fix typo in r364325 that broke tinderbox with -DBUILD_WITH_STRICT_TMPPATH ${TARGET_ARCH} is empty here which results in empy MAKE_PARAMS being passed to the buildkernel phase. This breaks the build when using the strict TMPPATH since cc will not be included in $PATH. Reviewed By: jhb Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Aug 25 13:30:14 2020 (r364763) +++ head/Makefile Tue Aug 25 13:30:19 2020 (r364764) @@ -734,7 +734,7 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE ${SUB_MAKE} ${JFLAG} buildkernel \ TARGET=${TARGET} \ TARGET_ARCH=${TARGET_ARCH_${kernel}} \ - ${MAKE_PARAMS_${TARGET_ARCH}} \ + ${MAKE_PARAMS_${TARGET_ARCH_${kernel}}} \ KERNCONF=${kernel} \ > _.${TARGET}.${kernel} 2>&1 || \ (echo "${TARGET} ${kernel} kernel failed," \ From owner-svn-src-all@freebsd.org Tue Aug 25 13:30:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 719623CB74D; Tue, 25 Aug 2020 13:30:28 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbVH73wLyz4Q9n; Tue, 25 Aug 2020 13:30:26 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE8BE2A45C; Tue, 25 Aug 2020 13:30:24 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PDUOVN055796; Tue, 25 Aug 2020 13:30:24 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PDUOZN055795; Tue, 25 Aug 2020 13:30:24 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008251330.07PDUOZN055795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Tue, 25 Aug 2020 13:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364765 - in head: sbin/newfs_msdos usr.sbin/makefs X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head: sbin/newfs_msdos usr.sbin/makefs X-SVN-Commit-Revision: 364765 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 13:30:28 -0000 Author: arichardson Date: Tue Aug 25 13:30:24 2020 New Revision: 364765 URL: https://svnweb.freebsd.org/changeset/base/364765 Log: Fix makefs bootstrap on macOS after D25563 The macOS assert.h header does not define static_assert when compiling in C99 mode. To fix this compile with -std=c11. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D25928 Modified: head/sbin/newfs_msdos/Makefile head/usr.sbin/makefs/Makefile Modified: head/sbin/newfs_msdos/Makefile ============================================================================== --- head/sbin/newfs_msdos/Makefile Tue Aug 25 13:30:19 2020 (r364764) +++ head/sbin/newfs_msdos/Makefile Tue Aug 25 13:30:24 2020 (r364765) @@ -9,5 +9,6 @@ SRCS= newfs_msdos.c mkfs_msdos.c .if ${MACHINE_CPUARCH} == "arm" WARNS?= 3 .endif +CSTD= c11 .include Modified: head/usr.sbin/makefs/Makefile ============================================================================== --- head/usr.sbin/makefs/Makefile Tue Aug 25 13:30:19 2020 (r364764) +++ head/usr.sbin/makefs/Makefile Tue Aug 25 13:30:24 2020 (r364765) @@ -17,6 +17,7 @@ SRCS= cd9660.c \ MAN= makefs.8 WARNS?= 2 +CSTD= c11 .include "${SRCDIR}/cd9660/Makefile.inc" .include "${SRCDIR}/ffs/Makefile.inc" From owner-svn-src-all@freebsd.org Tue Aug 25 13:30:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 791933CB813; Tue, 25 Aug 2020 13:30:34 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbVHG0RgYz4QDl; Tue, 25 Aug 2020 13:30:34 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C66E52A4DB; Tue, 25 Aug 2020 13:30:29 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PDUTPf055850; Tue, 25 Aug 2020 13:30:29 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PDUT3q055849; Tue, 25 Aug 2020 13:30:29 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008251330.07PDUT3q055849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Tue, 25 Aug 2020 13:30:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364766 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 364766 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 13:30:34 -0000 Author: arichardson Date: Tue Aug 25 13:30:29 2020 New Revision: 364766 URL: https://svnweb.freebsd.org/changeset/base/364766 Log: style.Makefile: list CSTD between WARNS and CFLAGS This was suggested by emaste in https://reviews.freebsd.org/D25928 and matches most uses in the tree. Modified: head/share/man/man5/style.Makefile.5 Modified: head/share/man/man5/style.Makefile.5 ============================================================================== --- head/share/man/man5/style.Makefile.5 Tue Aug 25 13:30:24 2020 (r364765) +++ head/share/man/man5/style.Makefile.5 Tue Aug 25 13:30:29 2020 (r364766) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 21, 2015 +.Dd August 25, 2020 .Dt STYLE.MAKEFILE 5 .Os .Sh NAME @@ -78,6 +78,7 @@ order is: .Va INCS .Va SRCS .Va WARNS +.Va CSTD .Va CFLAGS .Va DPADD .Va LDADD . @@ -87,6 +88,7 @@ order is: .Va PROG Ns / Ns Oo Va SH Oc Ns Va LIB Ns / Ns Va SCRIPTS .Va SRCS .Va WARNS +.Va CSTD .Va CFLAGS .Va DPADD .Va LDADD From owner-svn-src-all@freebsd.org Tue Aug 25 13:30:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D2D43CB3FD; Tue, 25 Aug 2020 13:30:40 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbVHM1RfCz4QHF; Tue, 25 Aug 2020 13:30:38 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 790D82A75E; Tue, 25 Aug 2020 13:30:35 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PDUZ15055905; Tue, 25 Aug 2020 13:30:35 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PDUZam055903; Tue, 25 Aug 2020 13:30:35 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008251330.07PDUZam055903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Tue, 25 Aug 2020 13:30:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364767 - in head: contrib/lua/src lib/liblua X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head: contrib/lua/src lib/liblua X-SVN-Commit-Revision: 364767 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 13:30:40 -0000 Author: arichardson Date: Tue Aug 25 13:30:34 2020 New Revision: 364767 URL: https://svnweb.freebsd.org/changeset/base/364767 Log: Fix -Wundef warnings when building liblua We need to define the LUA_FLOAT_INT64 macro even if we don't use it (copied from stand/luaconf.h). While touching luaconf.h.dist also sync it with the the 5.3.5 release version (matches the one in lib/liblua). Reviewed By: kevans Differential Revision: https://reviews.freebsd.org/D25977 Modified: head/contrib/lua/src/luaconf.h.dist head/lib/liblua/luaconf.h Modified: head/contrib/lua/src/luaconf.h.dist ============================================================================== --- head/contrib/lua/src/luaconf.h.dist Tue Aug 25 13:30:29 2020 (r364766) +++ head/contrib/lua/src/luaconf.h.dist Tue Aug 25 13:30:34 2020 (r364767) @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.259 2016/12/22 13:08:50 roberto Exp $ +** $Id: luaconf.h,v 1.259.1.1 2017/04/19 17:29:57 roberto Exp $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -114,6 +114,7 @@ #define LUA_FLOAT_FLOAT 1 #define LUA_FLOAT_DOUBLE 2 #define LUA_FLOAT_LONGDOUBLE 3 +#define LUA_FLOAT_INT64 4 #if defined(LUA_32BITS) /* { */ /* @@ -618,6 +619,13 @@ #if !defined(LUA_USE_C89) #define lua_strx2number(s,p) lua_str2number(s,p) #endif + + +/* +@@ lua_pointer2str converts a pointer to a readable string in a +** non-specified way. +*/ +#define lua_pointer2str(buff,sz,p) l_sprintf(buff,sz,"%p",p) /* Modified: head/lib/liblua/luaconf.h ============================================================================== --- head/lib/liblua/luaconf.h Tue Aug 25 13:30:29 2020 (r364766) +++ head/lib/liblua/luaconf.h Tue Aug 25 13:30:34 2020 (r364767) @@ -122,6 +122,7 @@ #define LUA_FLOAT_FLOAT 1 #define LUA_FLOAT_DOUBLE 2 #define LUA_FLOAT_LONGDOUBLE 3 +#define LUA_FLOAT_INT64 4 #if defined(LUA_32BITS) /* { */ /* From owner-svn-src-all@freebsd.org Tue Aug 25 13:45:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 697523CC14B; Tue, 25 Aug 2020 13:45:07 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbVc325jhz4SBL; Tue, 25 Aug 2020 13:45:07 +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 2717B2AB20; Tue, 25 Aug 2020 13:45:07 +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 07PDj7TB067489; Tue, 25 Aug 2020 13:45:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PDj609067488; Tue, 25 Aug 2020 13:45:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008251345.07PDj609067488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 25 Aug 2020 13:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364768 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 364768 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 13:45:07 -0000 Author: markj Date: Tue Aug 25 13:45:06 2020 New Revision: 364768 URL: https://svnweb.freebsd.org/changeset/base/364768 Log: Permit vm_page_wire() to be called on pages not belonging to an object. For such pages ref_count is effectively a consumer-managed field, but there is no harm in calling vm_page_wire() on them. vm_page_unwire_noq() handles them as well. Relax the vm_page_wire() assertions to permit this case which is triggered by some out-of-tree code. [1] Also guard a conditional assertion with INVARIANTS. Otherwise the conditions are evaluated even though the result is unused. [2] Reported by: bz, cem [1], kib [2] Reviewed by: dougm, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26173 Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Aug 25 13:30:34 2020 (r364767) +++ head/sys/vm/vm_page.c Tue Aug 25 13:45:06 2020 (r364768) @@ -3854,18 +3854,19 @@ vm_page_free_pages_toq(struct spglist *free, bool upda } /* - * Mark this page as wired down, preventing reclamation by the page daemon - * or when the containing object is destroyed. + * Mark this page as wired down. For managed pages, this prevents reclamation + * by the page daemon, or when the containing object, if any, is destroyed. */ void vm_page_wire(vm_page_t m) { u_int old; - KASSERT(m->object != NULL, - ("vm_page_wire: page %p does not belong to an object", m)); - if (!vm_page_busied(m) && !vm_object_busied(m->object)) +#ifdef INVARIANTS + if (m->object != NULL && !vm_page_busied(m) && + !vm_object_busied(m->object)) VM_OBJECT_ASSERT_LOCKED(m->object); +#endif KASSERT((m->flags & PG_FICTITIOUS) == 0 || VPRC_WIRE_COUNT(m->ref_count) >= 1, ("vm_page_wire: fictitious page %p has zero wirings", m)); From owner-svn-src-all@freebsd.org Tue Aug 25 14:18:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7AD483CCE34; Tue, 25 Aug 2020 14:18:51 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbWLz2hdzz4TkK; Tue, 25 Aug 2020 14:18:51 +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 40D472ADD2; Tue, 25 Aug 2020 14:18:51 +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 07PEIpPn086227; Tue, 25 Aug 2020 14:18:51 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PEIoBB086223; Tue, 25 Aug 2020 14:18:50 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008251418.07PEIoBB086223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 25 Aug 2020 14:18:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364769 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 364769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 14:18:51 -0000 Author: mjg Date: Tue Aug 25 14:18:50 2020 New Revision: 364769 URL: https://svnweb.freebsd.org/changeset/base/364769 Log: vfs: respect PRIV_VFS_LOOKUP in vaccess_smr Reported by: novel Modified: head/sys/kern/kern_jail.c head/sys/kern/kern_priv.c head/sys/kern/vfs_subr.c head/sys/sys/priv.h Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Tue Aug 25 13:45:06 2020 (r364768) +++ head/sys/kern/kern_jail.c Tue Aug 25 14:18:50 2020 (r364769) @@ -3049,6 +3049,7 @@ prison_priv_check(struct ucred *cred, int priv) * called for them. See priv_check_cred(). */ switch (priv) { + case PRIV_VFS_LOOKUP: case PRIV_VFS_GENERATION: KASSERT(0, ("prison_priv_check instead of a custom handler " "called for %d\n", priv)); @@ -3277,7 +3278,6 @@ prison_priv_check(struct ucred *cred, int priv) case PRIV_VFS_WRITE: case PRIV_VFS_ADMIN: case PRIV_VFS_EXEC: - case PRIV_VFS_LOOKUP: case PRIV_VFS_BLOCKRESERVE: /* XXXRW: Slightly surprising. */ case PRIV_VFS_CHFLAGS_DEV: case PRIV_VFS_CHOWN: Modified: head/sys/kern/kern_priv.c ============================================================================== --- head/sys/kern/kern_priv.c Tue Aug 25 13:45:06 2020 (r364768) +++ head/sys/kern/kern_priv.c Tue Aug 25 14:18:50 2020 (r364769) @@ -129,6 +129,8 @@ priv_check_cred(struct ucred *cred, int priv) priv)); switch (priv) { + case PRIV_VFS_LOOKUP: + return (priv_check_cred_vfs_lookup(cred)); case PRIV_VFS_GENERATION: return (priv_check_cred_vfs_generation(cred)); } @@ -245,6 +247,56 @@ priv_check(struct thread *td, int priv) KASSERT(td == curthread, ("priv_check: td != curthread")); return (priv_check_cred(td->td_ucred, priv)); +} + +static int __noinline +priv_check_cred_vfs_lookup_slow(struct ucred *cred) +{ + int error; + + error = priv_check_cred_pre(cred, PRIV_VFS_LOOKUP); + if (error) + goto out; + + if (cred->cr_uid == 0 && suser_enabled) { + error = 0; + goto out; + } + + return (priv_check_cred_post(cred, PRIV_VFS_LOOKUP, error, false)); +out: + return (priv_check_cred_post(cred, PRIV_VFS_LOOKUP, error, true)); + +} + +int +priv_check_cred_vfs_lookup(struct ucred *cred) +{ + int error; + + if (__predict_false(mac_priv_check_fp_flag || + mac_priv_grant_fp_flag || SDT_PROBES_ENABLED())) + return (priv_check_cred_vfs_lookup_slow(cred)); + + error = EPERM; + if (cred->cr_uid == 0 && suser_enabled) + error = 0; + return (error); +} + +int +priv_check_cred_vfs_lookup_nomac(struct ucred *cred) +{ + int error; + + if (__predict_false(mac_priv_check_fp_flag || + mac_priv_grant_fp_flag || SDT_PROBES_ENABLED())) + return (EAGAIN); + + error = EPERM; + if (cred->cr_uid == 0 && suser_enabled) + error = 0; + return (error); } static int __noinline Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Tue Aug 25 13:45:06 2020 (r364768) +++ head/sys/kern/vfs_subr.c Tue Aug 25 14:18:50 2020 (r364769) @@ -5045,6 +5045,7 @@ vn_isdisk(struct vnode *vp) int vaccess_vexec_smr(mode_t file_mode, uid_t file_uid, gid_t file_gid, struct ucred *cred) { + int error; VFS_SMR_ASSERT_ENTERED(); @@ -5067,7 +5068,9 @@ vaccess_vexec_smr(mode_t file_mode, uid_t file_uid, gi return (0); out_error: /* - * Permission check failed. + * Permission check failed, but it is possible denial will get overwritten + * (e.g., when root is traversing through a 700 directory owned by someone + * else). * * vaccess() calls priv_check_cred which in turn can descent into MAC * modules overriding this result. It's quite unclear what semantics @@ -5075,9 +5078,20 @@ out_error: * from within the SMR section. This also means if any such modules * are present, we have to let the regular lookup decide. */ - if (__predict_false(mac_priv_check_fp_flag || mac_priv_grant_fp_flag)) + error = priv_check_cred_vfs_lookup_nomac(cred); + switch (error) { + case 0: + return (0); + case EAGAIN: + /* + * MAC modules present. + */ return (EAGAIN); - return (EACCES); + case EPERM: + return (EACCES); + default: + return (error); + } } /* Modified: head/sys/sys/priv.h ============================================================================== --- head/sys/sys/priv.h Tue Aug 25 13:45:06 2020 (r364768) +++ head/sys/sys/priv.h Tue Aug 25 14:18:50 2020 (r364769) @@ -536,6 +536,8 @@ struct thread; struct ucred; int priv_check(struct thread *td, int priv); int priv_check_cred(struct ucred *cred, int priv); +int priv_check_cred_vfs_lookup(struct ucred *cred); +int priv_check_cred_vfs_lookup_nomac(struct ucred *cred); int priv_check_cred_vfs_generation(struct ucred *cred); #endif From owner-svn-src-all@freebsd.org Tue Aug 25 14:39:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5A7053CD152; Tue, 25 Aug 2020 14:39:27 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbWpl1jLJz4VrJ; Tue, 25 Aug 2020 14:39:27 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from localhost (unknown [IPv6:2400:4051:a743:3c00:16:ceff:fe34:2700]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: hrs) by smtp.freebsd.org (Postfix) with ESMTPSA id 1FBB216731; Tue, 25 Aug 2020 14:39:25 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Date: Tue, 25 Aug 2020 23:21:47 +0900 (JST) Message-Id: <20200825.232147.141648624023404568.hrs@FreeBSD.org> To: gbe@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364449 - head/bin/ls From: Hiroki Sato In-Reply-To: <20200824085223.GA28970@lion.0xfce3.net> References: <202008210620.07L6KC6M091289@repo.freebsd.org> <20200822.194438.808130473746317382.hrs@FreeBSD.org> <20200824085223.GA28970@lion.0xfce3.net> X-Old-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-PGPkey-fingerprint: 6C0D 2353 27CF 80C7 901E FDD2 DBB0 7DC6 6F1F 737F X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="--Security_Multipart(Tue_Aug_25_23_21_47_2020_675)--" Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 14:39:27 -0000 ----Security_Multipart(Tue_Aug_25_23_21_47_2020_675)-- Content-Type: Text/Plain; charset=utf-8 Content-Transfer-Encoding: base64 R29yZG9uIEJlcmdsaW5nIDxnYmVAZnJlZWJzZC5vcmc+IHdyb3RlDQogIGluIDwyMDIwMDgyNDA4 NTIyMy5HQTI4OTcwQGxpb24uMHhmY2UzLm5ldD46DQoNCmdiPiB0aGFua3MgZm9yIHlvdXIgZmVl ZGJhY2suIEkgY2FuIG9ubHkgZGVmaW5lIFBPU0lYLjEtMjAwezEsOH0gb3IgLXN1c3Y0LiBTbyB3 aGF0DQpnYj4gZG8geW91IHRoaW5rIGFib3V0IHRoZSBmb2xsb3dpbmcgU1RBTkRBUkRTIHNlY3Rp b24/DQpnYj4gDQpnYj4gRm9yIHRoZSBvcHRpb25zIHRoYXQgYXJlIG5vbi1leGlzdGluZyBJIGNv dWxkIGNvcnJlY3QgdGhlbSB0byAtMjAwMSBhbmQgbWVudGlvbg0KZ2I+IGFsc28gLXN1c3Y0Lg0K Z2I+IA0KZ2I+IFNUQU5EQVJEUw0KZ2I+ICAgICAgV2l0aCB0aGUgZXhjZXB0aW9uIG9mIG9wdGlv bnMgLWcsIC1uIGFuZCAtbywgdGhlIGxzIHV0aWxpdHkgY29uZm9ybXMgdG8NCmdiPiAgICAgIElF RUUgU3RkIDEwMDMuMS0yMDAxICjigJxQT1NJWC4x4oCdKSBhbmQgVmVyc2lvbsKgNCBvZiB0aGUg U2luZ2xlIFVOSVgNCmdiPiAgICAgIFNwZWNpZmljYXRpb24gKOKAnFNVU3Y04oCdKS4gIFRoZSBv cHRpb25zIC1CLCAtRCwgLUcsIC1JLCAtVCwgLVUsIC1XLCAtWiwgLWIsDQpnYj4gICAgICAtaCwg LXcsIC15IGFuZCAtLCBhcmUgY29tcGF0aWJsZSBleHRlbnNpb25zIG5vdCBkZWZpbmVkIGluIElF RUUgU3RkDQpnYj4gICAgICAxMDAzLjEtMjAwMSAo4oCcUE9TSVguMeKAnSkuDQoNCiBJdCBtaWdo dCBiZSBhIGJpdCB0ZWRpb3VzLCBidXQganVzdCBhZGRpbmcgLTIwMDggbG9va3MgZ29vZCB0byBt ZQ0KIGxpa2UgdGhlIGZvbGxvd2luZzoNCg0KIHwuU3QgLXAxMDAzLjEtMjAwMQ0KIHxhbmQNCiB8 LlN0IC1wMTAwMy4xLTIwMDggLg0KDQogcDEwMDMuMS0yMDA0IGlzIGEgc3Vic2V0IG9mIFNVU3Yz IChhbmQgLTIwMDggaXMgb25lIG9mIFNVU3Y0KSwgc28NCiB1c2luZyBwMTAwMy4xLVlZWVkgY29u c2lzdGVudGx5IHNvdW5kcyBsZXNzIGNvbmZ1c2luZyB3aGVuIGRlc2NyaWJpbmcNCiB0aGUgY29u Zm9ybWFuY2Ugd2l0aGluIHRoZSBzdWJzZXRzLg0KDQogUmVnYXJkaW5nIHRoZSBub24tc3RhbmRh cmQgZXh0ZW5zaW9ucywgSSBhbSBub3Qgc3VyZSB3aGF0DQogImNvbXBhdGlibGUiIG1lYW5zLiAg U29tZSBvZiB0aGVtIGFyZSBleHRlbnNpb25zIGNvbW1vbmx5IHNlZW4gb24NCiBvdGhlciBCU0Qt ZGVyaXZlZCBPU2VzLCBzb21lIGFyZSBhdmFpbGFibGUgb25seSBvbiBGcmVlQlNELCBhbmQgc29t ZQ0KIGhhdmUgdGhlIHNhbWUgbmFtZXMgd2l0aCBHTlUncyBjb3VudGVycGFydCBidXQgZGlmZmVy ZW50IG1lYW5pbmdzLg0KIElzIGp1c3QgbWVudGlvbmluZyAiLi4uYXJlIG5vbi1zdGFuZGFyZCBl eHRlbnNpb25zIiB3aXRoIG5vDQogc3BlY2lmaWNhdGlvbiBuYW1lIHN1ZmZpY2llbnQgYW5kIGVh c2llcj8gIEkgaGF2ZSBubyBzdHJvbmcgb3Bpbmlvbg0KIG9uIHRoYXQgcGFydCwgYnV0IHRoaXMg aXMganVzdCBteSB0d28gY2VudHMuDQoNCi0tIEhpcm9raQ0K ----Security_Multipart(Tue_Aug_25_23_21_47_2020_675)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iMkEABMKAC4WIQRsDSNTJ8+Ax5Ae/dLbsH3Gbx9zfwUCX0UeexAcaHJzQGZyZWVi c2Qub3JnAAoJENuwfcZvH3N/J4MCCJNE4t7/7mtqF3SE1THStB7TIGlkmxsX/vMJ Quvg7LeimkMm6T76raLpC0dXYvdkFOwTID84mRvpoIHYwtZhbM+JAgkBExIRrgdM nUEtp8WSuikc35kXrkkHbZwfg/mmhATv/TIZltbRRwhf9N7UVO+QobVsZvbFFWP0 0j34RSAR9dLusGQ= =PiaP -----END PGP SIGNATURE----- ----Security_Multipart(Tue_Aug_25_23_21_47_2020_675)---- From owner-svn-src-all@freebsd.org Tue Aug 25 15:19:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC4BF3CE57A; Tue, 25 Aug 2020 15:19:45 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbXjF46jbz4YZ3; Tue, 25 Aug 2020 15:19:45 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7093A2BC8E; Tue, 25 Aug 2020 15:19:45 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PFJj3X023538; Tue, 25 Aug 2020 15:19:45 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PFJjpW023537; Tue, 25 Aug 2020 15:19:45 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202008251519.07PFJjpW023537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 25 Aug 2020 15:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364770 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 364770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 15:19:45 -0000 Author: vmaffione Date: Tue Aug 25 15:19:45 2020 New Revision: 364770 URL: https://svnweb.freebsd.org/changeset/base/364770 Log: iflib: netmap: publish all the receive buffer At initialization time, the netmap RX refill function used to prepare the NIC RX ring with N-1 buffers rather than N (with N equal to the number of descriptors in the NIC RX ring). This is not how netmap is supposed to work, as it would keep kring->nr_hwcur not in sync with the NIC "next index to refill" (i.e., fl->ifl_pidx). Instead we prepare N buffers, although we still publish (with isc_rxd_flush()) only the first N-1 buffers, to avoid the NIC producer pointer to overrun the NIC consumer pointer (for NICs where this is a real issue, e.g. Intel ones). MFC after: 2 weeks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Aug 25 14:18:50 2020 (r364769) +++ head/sys/net/iflib.c Tue Aug 25 15:19:45 2020 (r364770) @@ -832,7 +832,6 @@ netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring { struct netmap_adapter *na = kring->na; u_int const lim = kring->nkr_num_slots - 1; - u_int head = kring->rhead; u_int nm_i = kring->nr_hwcur; struct netmap_ring *ring = kring->ring; bus_dmamap_t *map; @@ -840,39 +839,46 @@ netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring if_ctx_t ctx = rxq->ifr_ctx; iflib_fl_t fl = &rxq->ifr_fl[0]; u_int nic_i_first, nic_i; - int i; + int i, n; #if IFLIB_DEBUG_COUNTERS int rf_count = 0; #endif /* - * Netmap requires that we leave (at least) one free slot - * in the ring, so that it can distinguish between an empty - * ring (nr_hwcur == nr_hwtail, i.e. all the buffers owned by the - * user) and a full ring (nr_hwtail == (nr_hwcur - 1) mod N, i.e. - * all the buffers owned by the kernel). - * We thus set head (the refill limit) to nr_hwcur - 1 - * at initialization. The rest of the code will then make sure - * than nr_hwtail never overcomes nr_hwcur. + * This function is used both at initialization and in rxsync. + * At initialization we need to prepare (with isc_rxd_refill()) + * all the (N) netmap buffers in the ring, in such a way to keep + * fl->ifl_pidx and kring->nr_hwcur in sync (except for + * kring->nkr_hwofs); at rxsync time, both indexes point to the + * next buffer to be refilled. + * In any case we publish (with isc_rxd_flush()) up to + * (fl->ifl_pidx - 1) % N (included), to avoid the NIC tail/prod + * pointer to overrun the head/cons pointer, although this is + * not necessary for some NICs (e.g. vmx). */ - if (__predict_false(init)) { - head = nm_prev(nm_i, lim); - } else if (nm_i == head) { - /* Nothing to do. We can leave early. */ - return (0); + if (__predict_false(init)) + n = kring->nkr_num_slots; + else { + n = kring->rhead - nm_i; + if (n == 0) + return (0); /* Nothing to do. */ + if (n < 0) + n += kring->nkr_num_slots; } + /* Start to refill from nr_hwcur, publishing n buffers. */ iru_init(&iru, rxq, 0 /* flid */); map = fl->ifl_sds.ifsd_map; - nic_i = netmap_idx_k2n(kring, nm_i); + nic_i = fl->ifl_pidx; + MPASS(nic_i == netmap_idx_k2n(kring, nm_i)); DBG_COUNTER_INC(fl_refills); - while (nm_i != head) { + while (n > 0) { #if IFLIB_DEBUG_COUNTERS if (++rf_count == 9) DBG_COUNTER_INC(fl_refills_large); #endif nic_i_first = nic_i; - for (i = 0; i < IFLIB_MAX_RX_REFRESH && nm_i != head; i++) { + for (i = 0; n > 0 && i < IFLIB_MAX_RX_REFRESH; n--, i++) { struct netmap_slot *slot = &ring->slot[nm_i]; void *addr = PNMB(na, slot, &fl->ifl_bus_addrs[i]); @@ -903,11 +909,11 @@ netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring iru.iru_count = i; ctx->isc_rxd_refill(ctx->ifc_softc, &iru); } - kring->nr_hwcur = head; + fl->ifl_pidx = nic_i; + MPASS(!init || nm_i == 0); + MPASS(nm_i == kring->rhead); + kring->nr_hwcur = nm_i; - /* The pidx argument of isc_rxd_flush() is the index of the last valid - * slot in the free list ring. We need therefore to decrement nic_i, - * similarly to what happens in iflib_fl_refill() for ifl_pidx. */ bus_dmamap_sync(fl->ifl_ifdi->idi_tag, fl->ifl_ifdi->idi_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); ctx->isc_rxd_flush(ctx->ifc_softc, rxq->ifr_id, fl->ifl_id, From owner-svn-src-all@freebsd.org Tue Aug 25 16:09:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AF153CFF93; Tue, 25 Aug 2020 16:09:24 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbYpX3cNpz4cgF; Tue, 25 Aug 2020 16:09:24 +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 5F2592C556; Tue, 25 Aug 2020 16:09:24 +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 07PG9Oip054168; Tue, 25 Aug 2020 16:09:24 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PG9NDP054163; Tue, 25 Aug 2020 16:09:23 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202008251609.07PG9NDP054163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 25 Aug 2020 16:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364771 - head/usr.sbin/rtsold X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/usr.sbin/rtsold X-SVN-Commit-Revision: 364771 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 16:09:24 -0000 Author: bz Date: Tue Aug 25 16:09:23 2020 New Revision: 364771 URL: https://svnweb.freebsd.org/changeset/base/364771 Log: rtsol(d): add script for "M bit" While we do support the "O bit" running a script (usually to start a dhcpv6 client) we have no options for setups which set the "M bit" for, e.g., static address assignment as in EC2. Duplicate most of the "O bit" logic to also start a script for the "M bit" with the one difference: if the "M bit" is set we will not start the script for the "O bit" as well (per RFC 4861, Section 4.2). Reviewed by: hrs, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26099 Modified: head/usr.sbin/rtsold/dump.c head/usr.sbin/rtsold/rtsol.c head/usr.sbin/rtsold/rtsold.8 head/usr.sbin/rtsold/rtsold.c head/usr.sbin/rtsold/rtsold.h Modified: head/usr.sbin/rtsold/dump.c ============================================================================== --- head/usr.sbin/rtsold/dump.c Tue Aug 25 15:19:45 2020 (r364770) +++ head/usr.sbin/rtsold/dump.c Tue Aug 25 16:09:23 2020 (r364771) @@ -84,6 +84,8 @@ rtsold_dump(FILE *fp) } fprintf(fp, " interface status: %s\n", ifi->active > 0 ? "active" : "inactive"); + fprintf(fp, " managed config: %s\n", + ifi->managedconfig ? "on" : "off"); fprintf(fp, " other config: %s\n", ifi->otherconfig ? "on" : "off"); fprintf(fp, " rtsold status: %s\n", ifstatstr[ifi->state]); Modified: head/usr.sbin/rtsold/rtsol.c ============================================================================== --- head/usr.sbin/rtsold/rtsol.c Tue Aug 25 15:19:45 2020 (r364770) +++ head/usr.sbin/rtsold/rtsol.c Tue Aug 25 16:09:23 2020 (r364771) @@ -79,6 +79,7 @@ static int ra_opt_rdnss_dispatch(struct ifinfo *, stru struct script_msg_head_t *, struct script_msg_head_t *); static char *make_rsid(const char *, const char *, struct rainfo *); +#define _ARGS_MANAGED managedconf_script, ifi->ifname #define _ARGS_OTHER otherconf_script, ifi->ifname #define _ARGS_RESADD resolvconf_script, "-a", rsid #define _ARGS_RESDEL resolvconf_script, "-d", rsid @@ -291,18 +292,36 @@ rtsol_input(int sock) nd_ra = (struct nd_router_advert *)icp; /* + * Process the "M bit." + * If the value of ManagedConfigFlag changes from FALSE to TRUE, the + * host should invoke the stateful autoconfiguration protocol, + * requesting information. + * [RFC 4861 Section 4.2] + * XXX ??? [draft-ietf-v6ops-dhcpv6-slaac-problem-07] + */ + if (((nd_ra->nd_ra_flags_reserved) & ND_RA_FLAG_MANAGED) && + !ifi->managedconfig) { + warnmsg(LOG_DEBUG, __func__, + "ManagedConfigFlag on %s is turned on", ifi->ifname); + ifi->managedconfig = 1; + CALL_SCRIPT(MANAGED, NULL); + } + + /* * Process the "O bit." * If the value of OtherConfigFlag changes from FALSE to TRUE, the * host should invoke the stateful autoconfiguration protocol, - * requesting information. - * [RFC 2462 Section 5.5.3] + * requesting information unless the "M bit" was set as well in + * which case the "O bit" is redundant. + * [RFC 4861 Section 4.2] */ if (((nd_ra->nd_ra_flags_reserved) & ND_RA_FLAG_OTHER) && !ifi->otherconfig) { warnmsg(LOG_DEBUG, __func__, "OtherConfigFlag on %s is turned on", ifi->ifname); ifi->otherconfig = 1; - CALL_SCRIPT(OTHER, NULL); + if (!ifi->managedconfig) + CALL_SCRIPT(OTHER, NULL); } clock_gettime(CLOCK_MONOTONIC_FAST, &now); newent_rai = 0; Modified: head/usr.sbin/rtsold/rtsold.8 ============================================================================== --- head/usr.sbin/rtsold/rtsold.8 Tue Aug 25 15:19:45 2020 (r364770) +++ head/usr.sbin/rtsold/rtsold.8 Tue Aug 25 16:09:23 2020 (r364771) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 14, 2011 +.Dd August 19, 2020 .Dt RTSOLD 8 .Os .\" @@ -40,23 +40,27 @@ .Sh SYNOPSIS .Nm .Op Fl dDfFmu1 +.Op Fl M Ar script-name .Op Fl O Ar script-name .Op Fl p Ar pidfile .Op Fl R Ar script-name .Ar interface ... .Nm .Op Fl dDfFmu1 +.Op Fl M Ar script-name .Op Fl O Ar script-name .Op Fl p Ar pidfile .Op Fl R Ar script-name .Fl a .Nm rtsol .Op Fl dDu +.Op Fl M Ar script-name .Op Fl O Ar script-name .Op Fl R Ar script-name .Ar interface ... .Nm rtsol .Op Fl dDu +.Op Fl M Ar script-name .Op Fl O Ar script-name .Op Fl R Ar script-name .Fl a @@ -208,6 +212,20 @@ Transmit Router Solicitation packets until at least on Advertisement packet has arrived on each .Ar interface , then exit. +.It Fl M Ar script-name +Specifies a supplement script file to handle the Managed Configuration +flag of the router advertisement. +When the flag changes from FALSE to TRUE, +.Nm +will invoke +.Ar script-name +with a single argument of the receiving interface name, +expecting the script will then start a protocol for the managed +configuration. +.Ar script-name +must be the absolute path from root to the script file, be a regular +file, and be created by the same owner who runs +.Nm . .It Fl O Ar script-name Specifies a supplement script file to handle the Other Configuration flag of the router advertisement. @@ -218,6 +236,8 @@ will invoke with a single argument of the receiving interface name, expecting the script will then start a protocol for the other configuration. +The script will not be run if the Managed Configuration flag in the +router advertisement is also TRUE. .Ar script-name must be the absolute path from root to the script file, be a regular file, and be created by the same owner who runs Modified: head/usr.sbin/rtsold/rtsold.c ============================================================================== --- head/usr.sbin/rtsold/rtsold.c Tue Aug 25 15:19:45 2020 (r364770) +++ head/usr.sbin/rtsold/rtsold.c Tue Aug 25 16:09:23 2020 (r364771) @@ -80,6 +80,7 @@ int aflag = 0; int dflag = 0; int uflag = 0; +const char *managedconf_script; const char *otherconf_script; const char *resolvconf_script = "/sbin/resolvconf"; @@ -124,11 +125,11 @@ main(int argc, char **argv) progname = basename(argv[0]); if (strcmp(progname, "rtsold") == 0) { - opts = "adDfFm1O:p:R:u"; + opts = "adDfFm1M:O:p:R:u"; once = 0; pidfilepath = NULL; } else { - opts = "adDFO:R:u"; + opts = "adDFM:O:R:u"; fflag = 1; once = 1; } @@ -156,6 +157,9 @@ main(int argc, char **argv) case '1': once = 1; break; + case 'M': + managedconf_script = optarg; + break; case 'O': otherconf_script = optarg; break; @@ -190,6 +194,9 @@ main(int argc, char **argv) else log_upto = LOG_NOTICE; + if (managedconf_script != NULL && *managedconf_script != '/') + errx(1, "configuration script (%s) must be an absolute path", + managedconf_script); if (otherconf_script != NULL && *otherconf_script != '/') errx(1, "configuration script (%s) must be an absolute path", otherconf_script); @@ -324,9 +331,11 @@ static int init_capabilities(void) { #ifdef WITH_CASPER - const char *const scripts[2] = { resolvconf_script, otherconf_script }; + const char *const scripts[] = + { resolvconf_script, managedconf_script, otherconf_script }; cap_channel_t *capcasper; nvlist_t *limits; + int count; capcasper = cap_init(); if (capcasper == NULL) @@ -339,9 +348,12 @@ init_capabilities(void) capscript = cap_service_open(capcasper, "rtsold.script"); if (capscript == NULL) return (-1); + count = 0; + for (size_t i = 0; i < nitems(scripts); i++) + if (scripts[i] != NULL) + count++; limits = nvlist_create(0); - nvlist_add_string_array(limits, "scripts", scripts, - otherconf_script != NULL ? 2 : 1); + nvlist_add_string_array(limits, "scripts", scripts, count); if (cap_limit_set(capscript, limits) != 0) return (-1); @@ -597,10 +609,12 @@ rtsol_check_timer(void) /* * If we need a probe, clear the previous - * status wrt the "other" configuration. + * status wrt the "managed/other" configuration. */ - if (probe) + if (probe) { + ifi->managedconfig = 0; ifi->otherconfig = 0; + } if (probe && mobile_node) { error = cap_probe_defrouters(capsendmsg, ifi); Modified: head/usr.sbin/rtsold/rtsold.h ============================================================================== --- head/usr.sbin/rtsold/rtsold.h Tue Aug 25 15:19:45 2020 (r364770) +++ head/usr.sbin/rtsold/rtsold.h Tue Aug 25 16:09:23 2020 (r364771) @@ -71,6 +71,8 @@ struct ifinfo { int probeinterval; /* interval of probe timer (if necessary) */ int probetimer; /* rest of probe timer */ int mediareqok; /* whether the IF supports SIOCGIFMEDIA */ + int managedconfig; /* need a separate protocol for the "managed" + * configuration */ int otherconfig; /* need a separate protocol for the "other" * configuration */ int state; @@ -156,6 +158,7 @@ extern int dflag; extern int aflag; extern int Fflag; extern int uflag; +extern const char *managedconf_script; extern const char *otherconf_script; extern const char *resolvconf_script; extern struct cap_channel *capllflags, *capscript, *capsendmsg, *capsyslog; From owner-svn-src-all@freebsd.org Tue Aug 25 17:19:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 806C63B243E; Tue, 25 Aug 2020 17:19:16 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbbM82p3Pz3TtM; Tue, 25 Aug 2020 17:19:16 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 426E32D521; Tue, 25 Aug 2020 17:19:16 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PHJGjQ097748; Tue, 25 Aug 2020 17:19:16 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PHJG9t097747; Tue, 25 Aug 2020 17:19:16 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008251719.07PHJG9t097747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Tue, 25 Aug 2020 17:19:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364772 - head X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 364772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 17:19:16 -0000 Author: mmacy Date: Tue Aug 25 17:19:15 2020 New Revision: 364772 URL: https://svnweb.freebsd.org/changeset/base/364772 Log: Give stronger guidance with regards to upgrading root pools Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Aug 25 16:09:23 2020 (r364771) +++ head/UPDATING Tue Aug 25 17:19:15 2020 (r364772) @@ -27,9 +27,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20200824: - OpenZFS support has been integrated. We caution against 'zpool upgrade' - for the next few weeks. The change should be transparent unless you - want to use new features. + OpenZFS support has been integrated. Do not upgrade root pools until + the loader is updated to support zstd. Furthermore, we caution against + 'zpool upgrade' for the next few weeks. The change should be transparent + unless you want to use new features. The resume code now notifies devd with the 'kernel' system From owner-svn-src-all@freebsd.org Tue Aug 25 17:23:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 68A613B2A01; Tue, 25 Aug 2020 17:23:34 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbbS61r9Rz3V8f; Tue, 25 Aug 2020 17:23:34 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 224B22D887; Tue, 25 Aug 2020 17:23:34 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PHNXER004010; Tue, 25 Aug 2020 17:23:33 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PHNXU1004009; Tue, 25 Aug 2020 17:23:33 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008251723.07PHNXU1004009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Tue, 25 Aug 2020 17:23:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364773 - head/stand/userboot/userboot X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/stand/userboot/userboot X-SVN-Commit-Revision: 364773 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 17:23:34 -0000 Author: mmacy Date: Tue Aug 25 17:23:33 2020 New Revision: 364773 URL: https://svnweb.freebsd.org/changeset/base/364773 Log: Fix userboot after r364355 r364355 replaced init_zfs_bootenv with init_zfs_boot_options and neglected to update userboot in the process. Modified: head/stand/userboot/userboot/main.c Modified: head/stand/userboot/userboot/main.c ============================================================================== --- head/stand/userboot/userboot/main.c Tue Aug 25 17:19:15 2020 (r364772) +++ head/stand/userboot/userboot/main.c Tue Aug 25 17:23:33 2020 (r364773) @@ -232,7 +232,7 @@ extract_currdev(void) bzero(&zdev, sizeof(zdev)); zdev.dd.d_dev = &zfs_dev; - init_zfs_bootenv(zfs_fmtdev(&zdev)); + init_zfs_boot_options(zfs_fmtdev(&zdev)); dd = &zdev.dd; } else #endif From owner-svn-src-all@freebsd.org Tue Aug 25 18:11:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3F693B4C48; Tue, 25 Aug 2020 18:11:45 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbcWj5p12z3YwS; Tue, 25 Aug 2020 18:11:45 +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 AA6062DF1B; Tue, 25 Aug 2020 18:11:45 +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 07PIBjTS033593; Tue, 25 Aug 2020 18:11:45 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PIBjWh033592; Tue, 25 Aug 2020 18:11:45 GMT (envelope-from np@FreeBSD.org) Message-Id: <202008251811.07PIBjWh033592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 25 Aug 2020 18:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364774 - stable/12/sys/dev/cxgbe/cxgbei X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe/cxgbei X-SVN-Commit-Revision: 364774 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 18:11:46 -0000 Author: np Date: Tue Aug 25 18:11:45 2020 New Revision: 364774 URL: https://svnweb.freebsd.org/changeset/base/364774 Log: MFC r364444: cxgbei: destroy the worker threads' CV and mutex in stop_worker_threads. Modified: stable/12/sys/dev/cxgbe/cxgbei/cxgbei.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/cxgbei/cxgbei.c ============================================================================== --- stable/12/sys/dev/cxgbe/cxgbei/cxgbei.c Tue Aug 25 17:23:33 2020 (r364773) +++ stable/12/sys/dev/cxgbe/cxgbei/cxgbei.c Tue Aug 25 18:11:45 2020 (r364774) @@ -714,6 +714,8 @@ stop_worker_threads(void) cv_wait(&cwt->cwt_cv, &cwt->cwt_lock); } while (cwt->cwt_state != CWT_STOPPED); mtx_unlock(&cwt->cwt_lock); + mtx_destroy(&cwt->cwt_lock); + cv_destroy(&cwt->cwt_cv); } free(cwt_softc, M_CXGBE); } From owner-svn-src-all@freebsd.org Tue Aug 25 18:16:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 103E63B552C; Tue, 25 Aug 2020 18:16:41 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbcdN6jx3z3ZtQ; Tue, 25 Aug 2020 18:16: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 CB1772DC6C; Tue, 25 Aug 2020 18:16: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 07PIGe8j035462; Tue, 25 Aug 2020 18:16:40 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PIGe7X035461; Tue, 25 Aug 2020 18:16:40 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202008251816.07PIGe7X035461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 25 Aug 2020 18:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364775 - head/lib/libbe X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libbe X-SVN-Commit-Revision: 364775 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 18:16:41 -0000 Author: kevans Date: Tue Aug 25 18:16:40 2020 New Revision: 364775 URL: https://svnweb.freebsd.org/changeset/base/364775 Log: libbe: lift the WARNS post-OpenZFS merge sys/ccompile.h no longer uses #pragma ident, so we no longer need to worry about unknown pragmas. I fixed one WARNS issue in r363409 by annotating be_is_auto_snapshot_name's lbh parameter __unused, then upstreamed the following changes to OpenZFS that rode in with the merge: - zfs_path_to_zhandle now takes a const char *path rather than a char *path, since it won't be mutating the string it receives and I had no reason to believe it will need to in the future. [OpenZFS PR #10605] - Annotated some unused parameters on definitions inlined into headers as such. [OpenZFS PR #10606] Modified: head/lib/libbe/Makefile Modified: head/lib/libbe/Makefile ============================================================================== --- head/lib/libbe/Makefile Tue Aug 25 18:11:45 2020 (r364774) +++ head/lib/libbe/Makefile Tue Aug 25 18:16:40 2020 (r364775) @@ -12,9 +12,6 @@ SRCS= be.c be_access.c be_error.c be_info.c INCS= be.h MAN= libbe.3 -WARNS?= 2 -IGNORE_PRAGMA= yes - LIBADD+= zfs LIBADD+= nvpair spl From owner-svn-src-all@freebsd.org Tue Aug 25 18:21:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 185873B5628; Tue, 25 Aug 2020 18:21:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbckg04gnz3Zq5; Tue, 25 Aug 2020 18:21:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DABFF2DE72; Tue, 25 Aug 2020 18:21:14 +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 07PILEg9036816; Tue, 25 Aug 2020 18:21:14 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PILEMk035752; Tue, 25 Aug 2020 18:21:14 GMT (envelope-from np@FreeBSD.org) Message-Id: <202008251821.07PILEMk035752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 25 Aug 2020 18:21:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364776 - in stable/12/sys/dev/cxgbe: common cudbg X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12/sys/dev/cxgbe: common cudbg X-SVN-Commit-Revision: 364776 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 18:21:15 -0000 Author: np Date: Tue Aug 25 18:21:13 2020 New Revision: 364776 URL: https://svnweb.freebsd.org/changeset/base/364776 Log: MFC r363498: cxgbe(4): Some updates to the common code. Modified: stable/12/sys/dev/cxgbe/common/common.h stable/12/sys/dev/cxgbe/common/t4_hw.c stable/12/sys/dev/cxgbe/common/t4_hw.h stable/12/sys/dev/cxgbe/cudbg/cudbg_lib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/12/sys/dev/cxgbe/common/common.h Tue Aug 25 18:16:40 2020 (r364775) +++ stable/12/sys/dev/cxgbe/common/common.h Tue Aug 25 18:21:13 2020 (r364776) @@ -301,6 +301,7 @@ struct chip_params { u16 vfcount; u32 sge_fl_db; u16 mps_tcam_size; + u16 rss_nentries; }; /* VF-only parameters. */ @@ -379,6 +380,7 @@ struct adapter_params { unsigned int hash_filter:1; unsigned int filter2_wr_support:1; unsigned int port_caps32:1; + unsigned int smac_add_support:1; unsigned int ofldq_wr_cred; unsigned int eo_wr_cred; @@ -784,8 +786,27 @@ int t4_set_rxmode(struct adapter *adap, unsigned int m int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox, unsigned int viid, bool free, unsigned int naddr, const u8 **addr, u16 *idx, u64 *hash, bool sleep_ok); +int t4_free_mac_filt(struct adapter *adap, unsigned int mbox, + unsigned int viid, unsigned int naddr, + const u8 **addr, bool sleep_ok); +int t4_free_encap_mac_filt(struct adapter *adap, unsigned int viid, + int idx, bool sleep_ok); +int t4_free_raw_mac_filt(struct adapter *adap, unsigned int viid, + const u8 *addr, const u8 *mask, unsigned int idx, + u8 lookup_type, u8 port_id, bool sleep_ok); +int t4_alloc_raw_mac_filt(struct adapter *adap, unsigned int viid, + const u8 *addr, const u8 *mask, unsigned int idx, + u8 lookup_type, u8 port_id, bool sleep_ok); +int t4_alloc_encap_mac_filt(struct adapter *adap, unsigned int viid, + const u8 *addr, const u8 *mask, unsigned int vni, + unsigned int vni_mask, u8 dip_hit, u8 lookup_type, + bool sleep_ok); int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid, int idx, const u8 *addr, bool persist, uint16_t *smt_idx); +int t4_del_mac(struct adapter *adap, unsigned int mbox, unsigned int viid, + const u8 *addr, bool smac); +int t4_add_mac(struct adapter *adap, unsigned int mbox, unsigned int viid, + int idx, const u8 *addr, bool persist, u8 *smt_idx, bool smac); int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid, bool ucast, u64 vec, bool sleep_ok); int t4_enable_vi_params(struct adapter *adap, unsigned int mbox, @@ -798,6 +819,10 @@ int t4_mdio_rd(struct adapter *adap, unsigned int mbox unsigned int mmd, unsigned int reg, unsigned int *valp); int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, unsigned int mmd, unsigned int reg, unsigned int val); +int t4_i2c_io(struct adapter *adap, unsigned int mbox, + int port, unsigned int devid, + unsigned int offset, unsigned int len, + u8 *buf, bool write); int t4_i2c_rd(struct adapter *adap, unsigned int mbox, int port, unsigned int devid, unsigned int offset, unsigned int len, @@ -822,7 +847,7 @@ int t4_sge_ctxt_rd(struct adapter *adap, unsigned int enum ctxt_type ctype, u32 *data); int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid, enum ctxt_type ctype, u32 *data); -int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox); +int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox, int ctxt_type); const char *t4_link_down_rc_str(unsigned char link_down_rc); int t4_update_port_info(struct port_info *pi); int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl); @@ -855,6 +880,10 @@ void t4_tp_tm_pio_read(struct adapter *adap, u32 *buff u32 start_index, bool sleep_ok); void t4_tp_mib_read(struct adapter *adap, u32 *buff, u32 nregs, u32 start_index, bool sleep_ok); +int t4_configure_ringbb(struct adapter *adap); +int t4_configure_add_smac(struct adapter *adap); +int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf, + u16 vlan); static inline int t4vf_query_params(struct adapter *adapter, unsigned int nparams, const u32 *params, Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/12/sys/dev/cxgbe/common/t4_hw.c Tue Aug 25 18:16:40 2020 (r364775) +++ stable/12/sys/dev/cxgbe/common/t4_hw.c Tue Aug 25 18:21:13 2020 (r364776) @@ -1359,8 +1359,7 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t 0x9608, 0x9638, 0x9640, 0x96f4, 0x9800, 0x9808, - 0x9820, 0x983c, - 0x9850, 0x9864, + 0x9810, 0x9864, 0x9c00, 0x9c6c, 0x9c80, 0x9cec, 0x9d00, 0x9d6c, @@ -1369,7 +1368,7 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t 0x9e80, 0x9eec, 0x9f00, 0x9f6c, 0x9f80, 0xa020, - 0xd004, 0xd004, + 0xd000, 0xd004, 0xd010, 0xd03c, 0xdfc0, 0xdfe0, 0xe000, 0x1106c, @@ -1410,10 +1409,8 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t 0x1a0b0, 0x1a0e4, 0x1a0ec, 0x1a0f8, 0x1a100, 0x1a108, - 0x1a114, 0x1a120, - 0x1a128, 0x1a130, - 0x1a138, 0x1a138, - 0x1a190, 0x1a1c4, + 0x1a114, 0x1a130, + 0x1a138, 0x1a1c4, 0x1a1fc, 0x1a1fc, 0x1e008, 0x1e00c, 0x1e040, 0x1e044, @@ -2084,7 +2081,7 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t 0x1180, 0x1184, 0x1190, 0x1194, 0x11a0, 0x11a4, - 0x11b0, 0x11b4, + 0x11b0, 0x11c4, 0x11fc, 0x1274, 0x1280, 0x133c, 0x1800, 0x18fc, @@ -2140,7 +2137,7 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t 0x7e4c, 0x7e78, 0x7e80, 0x7edc, 0x7ee8, 0x7efc, - 0x8dc0, 0x8de4, + 0x8dc0, 0x8de0, 0x8df8, 0x8e04, 0x8e10, 0x8e84, 0x8ea0, 0x8f88, @@ -2154,8 +2151,7 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t 0x9640, 0x9704, 0x9710, 0x971c, 0x9800, 0x9808, - 0x9820, 0x983c, - 0x9850, 0x9864, + 0x9810, 0x9864, 0x9c00, 0x9c6c, 0x9c80, 0x9cec, 0x9d00, 0x9d6c, @@ -2164,7 +2160,7 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t 0x9e80, 0x9eec, 0x9f00, 0x9f6c, 0x9f80, 0xa020, - 0xd004, 0xd03c, + 0xd000, 0xd03c, 0xd100, 0xd118, 0xd200, 0xd214, 0xd220, 0xd234, @@ -2198,7 +2194,6 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t 0x191d0, 0x191e8, 0x19238, 0x19290, 0x192a4, 0x192b0, - 0x192bc, 0x192bc, 0x19348, 0x1934c, 0x193f8, 0x19418, 0x19420, 0x19428, @@ -2216,7 +2211,7 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t 0x19d00, 0x19d28, 0x19d50, 0x19d78, 0x19d94, 0x19d98, - 0x19da0, 0x19dc8, + 0x19da0, 0x19de0, 0x19df0, 0x19e10, 0x19e50, 0x19e6c, 0x19ea0, 0x19ebc, @@ -2232,10 +2227,8 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t 0x1a0b0, 0x1a0e4, 0x1a0ec, 0x1a0f8, 0x1a100, 0x1a108, - 0x1a114, 0x1a120, - 0x1a128, 0x1a130, - 0x1a138, 0x1a138, - 0x1a190, 0x1a1c4, + 0x1a114, 0x1a130, + 0x1a138, 0x1a1c4, 0x1a1fc, 0x1a1fc, 0x1e008, 0x1e00c, 0x1e040, 0x1e044, @@ -3357,7 +3350,7 @@ int t4_get_tp_version(struct adapter *adapter, u32 *ve * this in the Firmware Version Format since it's convenient. Return * 0 on success, -ENOENT if no Expansion ROM is present. */ -int t4_get_exprom_version(struct adapter *adap, u32 *vers) +int t4_get_exprom_version(struct adapter *adapter, u32 *vers) { struct exprom_header { unsigned char hdr_arr[16]; /* must start with 0x55aa */ @@ -3367,7 +3360,7 @@ int t4_get_exprom_version(struct adapter *adap, u32 *v sizeof(u32))]; int ret; - ret = t4_read_flash(adap, FLASH_EXP_ROM_START, + ret = t4_read_flash(adapter, FLASH_EXP_ROM_START, ARRAY_SIZE(exprom_header_buf), exprom_header_buf, 0); if (ret) @@ -5703,8 +5696,9 @@ int t4_read_rss(struct adapter *adapter, u16 *map) { u32 val; int i, ret; + int rss_nentries = adapter->chip_params->rss_nentries; - for (i = 0; i < RSS_NENTRIES / 2; ++i) { + for (i = 0; i < rss_nentries / 2; ++i) { ret = rd_rss_row(adapter, i, &val); if (ret) return ret; @@ -7374,14 +7368,16 @@ void t4_sge_decode_idma_state(struct adapter *adapter, * Issues a FW command through the given mailbox to flush the * SGE context cache. */ -int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox) +int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox, int ctxt_type) { int ret; u32 ldst_addrspace; struct fw_ldst_cmd c; memset(&c, 0, sizeof(c)); - ldst_addrspace = V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_SGE_EGRC); + ldst_addrspace = V_FW_LDST_CMD_ADDRSPACE(ctxt_type == CTXT_EGRESS ? + FW_LDST_ADDRSPC_SGE_EGRC : + FW_LDST_ADDRSPC_SGE_INGC); c.op_to_addrspace = cpu_to_be32(V_FW_CMD_OP(FW_LDST_CMD) | F_FW_CMD_REQUEST | F_FW_CMD_READ | ldst_addrspace); @@ -8035,6 +8031,111 @@ int t4_set_rxmode(struct adapter *adap, unsigned int m } /** + * t4_alloc_encap_mac_filt - Adds a mac entry in mps tcam with VNI support + * @adap: the adapter + * @viid: the VI id + * @mac: the MAC address + * @mask: the mask + * @vni: the VNI id for the tunnel protocol + * @vni_mask: mask for the VNI id + * @dip_hit: to enable DIP match for the MPS entry + * @lookup_type: MAC address for inner (1) or outer (0) header + * @sleep_ok: call is allowed to sleep + * + * Allocates an MPS entry with specified MAC address and VNI value. + * + * Returns a negative error number or the allocated index for this mac. + */ +int t4_alloc_encap_mac_filt(struct adapter *adap, unsigned int viid, + const u8 *addr, const u8 *mask, unsigned int vni, + unsigned int vni_mask, u8 dip_hit, u8 lookup_type, + bool sleep_ok) +{ + struct fw_vi_mac_cmd c; + struct fw_vi_mac_vni *p = c.u.exact_vni; + int ret = 0; + u32 val; + + memset(&c, 0, sizeof(c)); + c.op_to_viid = cpu_to_be32(V_FW_CMD_OP(FW_VI_MAC_CMD) | + F_FW_CMD_REQUEST | F_FW_CMD_WRITE | + V_FW_VI_MAC_CMD_VIID(viid)); + val = V_FW_CMD_LEN16(1) | + V_FW_VI_MAC_CMD_ENTRY_TYPE(FW_VI_MAC_TYPE_EXACTMAC_VNI); + c.freemacs_to_len16 = cpu_to_be32(val); + p->valid_to_idx = cpu_to_be16(F_FW_VI_MAC_CMD_VALID | + V_FW_VI_MAC_CMD_IDX(FW_VI_MAC_ADD_MAC)); + memcpy(p->macaddr, addr, sizeof(p->macaddr)); + memcpy(p->macaddr_mask, mask, sizeof(p->macaddr_mask)); + + p->lookup_type_to_vni = cpu_to_be32(V_FW_VI_MAC_CMD_VNI(vni) | + V_FW_VI_MAC_CMD_DIP_HIT(dip_hit) | + V_FW_VI_MAC_CMD_LOOKUP_TYPE(lookup_type)); + p->vni_mask_pkd = cpu_to_be32(V_FW_VI_MAC_CMD_VNI_MASK(vni_mask)); + + ret = t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, sleep_ok); + if (ret == 0) + ret = G_FW_VI_MAC_CMD_IDX(be16_to_cpu(p->valid_to_idx)); + return ret; +} + +/** + * t4_alloc_raw_mac_filt - Adds a mac entry in mps tcam + * @adap: the adapter + * @viid: the VI id + * @mac: the MAC address + * @mask: the mask + * @idx: index at which to add this entry + * @port_id: the port index + * @lookup_type: MAC address for inner (1) or outer (0) header + * @sleep_ok: call is allowed to sleep + * + * Adds the mac entry at the specified index using raw mac interface. + * + * Returns a negative error number or the allocated index for this mac. + */ +int t4_alloc_raw_mac_filt(struct adapter *adap, unsigned int viid, + const u8 *addr, const u8 *mask, unsigned int idx, + u8 lookup_type, u8 port_id, bool sleep_ok) +{ + int ret = 0; + struct fw_vi_mac_cmd c; + struct fw_vi_mac_raw *p = &c.u.raw; + u32 val; + + memset(&c, 0, sizeof(c)); + c.op_to_viid = cpu_to_be32(V_FW_CMD_OP(FW_VI_MAC_CMD) | + F_FW_CMD_REQUEST | F_FW_CMD_WRITE | + V_FW_VI_MAC_CMD_VIID(viid)); + val = V_FW_CMD_LEN16(1) | + V_FW_VI_MAC_CMD_ENTRY_TYPE(FW_VI_MAC_TYPE_RAW); + c.freemacs_to_len16 = cpu_to_be32(val); + + /* Specify that this is an inner mac address */ + p->raw_idx_pkd = cpu_to_be32(V_FW_VI_MAC_CMD_RAW_IDX(idx)); + + /* Lookup Type. Outer header: 0, Inner header: 1 */ + p->data0_pkd = cpu_to_be32(V_DATALKPTYPE(lookup_type) | + V_DATAPORTNUM(port_id)); + /* Lookup mask and port mask */ + p->data0m_pkd = cpu_to_be64(V_DATALKPTYPE(M_DATALKPTYPE) | + V_DATAPORTNUM(M_DATAPORTNUM)); + + /* Copy the address and the mask */ + memcpy((u8 *)&p->data1[0] + 2, addr, ETHER_ADDR_LEN); + memcpy((u8 *)&p->data1m[0] + 2, mask, ETHER_ADDR_LEN); + + ret = t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, sleep_ok); + if (ret == 0) { + ret = G_FW_VI_MAC_CMD_RAW_IDX(be32_to_cpu(p->raw_idx_pkd)); + if (ret != idx) + ret = -ENOMEM; + } + + return ret; +} + +/** * t4_alloc_mac_filt - allocates exact-match filters for MAC addresses * @adap: the adapter * @mbox: mailbox to use for the FW command @@ -8128,6 +8229,168 @@ int t4_alloc_mac_filt(struct adapter *adap, unsigned i } /** + * t4_free_encap_mac_filt - frees MPS entry at given index + * @adap: the adapter + * @viid: the VI id + * @idx: index of MPS entry to be freed + * @sleep_ok: call is allowed to sleep + * + * Frees the MPS entry at supplied index + * + * Returns a negative error number or zero on success + */ +int t4_free_encap_mac_filt(struct adapter *adap, unsigned int viid, + int idx, bool sleep_ok) +{ + struct fw_vi_mac_exact *p; + struct fw_vi_mac_cmd c; + u8 addr[] = {0,0,0,0,0,0}; + int ret = 0; + u32 exact; + + memset(&c, 0, sizeof(c)); + c.op_to_viid = cpu_to_be32(V_FW_CMD_OP(FW_VI_MAC_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE | + V_FW_CMD_EXEC(0) | + V_FW_VI_MAC_CMD_VIID(viid)); + exact = V_FW_VI_MAC_CMD_ENTRY_TYPE(FW_VI_MAC_TYPE_EXACTMAC); + c.freemacs_to_len16 = cpu_to_be32(V_FW_VI_MAC_CMD_FREEMACS(0) | + exact | + V_FW_CMD_LEN16(1)); + p = c.u.exact; + p->valid_to_idx = cpu_to_be16(F_FW_VI_MAC_CMD_VALID | + V_FW_VI_MAC_CMD_IDX(idx)); + memcpy(p->macaddr, addr, sizeof(p->macaddr)); + + ret = t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, sleep_ok); + return ret; +} + +/** + * t4_free_raw_mac_filt - Frees a raw mac entry in mps tcam + * @adap: the adapter + * @viid: the VI id + * @addr: the MAC address + * @mask: the mask + * @idx: index of the entry in mps tcam + * @lookup_type: MAC address for inner (1) or outer (0) header + * @port_id: the port index + * @sleep_ok: call is allowed to sleep + * + * Removes the mac entry at the specified index using raw mac interface. + * + * Returns a negative error number on failure. + */ +int t4_free_raw_mac_filt(struct adapter *adap, unsigned int viid, + const u8 *addr, const u8 *mask, unsigned int idx, + u8 lookup_type, u8 port_id, bool sleep_ok) +{ + struct fw_vi_mac_cmd c; + struct fw_vi_mac_raw *p = &c.u.raw; + u32 raw; + + memset(&c, 0, sizeof(c)); + c.op_to_viid = cpu_to_be32(V_FW_CMD_OP(FW_VI_MAC_CMD) | + F_FW_CMD_REQUEST | F_FW_CMD_WRITE | + V_FW_CMD_EXEC(0) | + V_FW_VI_MAC_CMD_VIID(viid)); + raw = V_FW_VI_MAC_CMD_ENTRY_TYPE(FW_VI_MAC_TYPE_RAW); + c.freemacs_to_len16 = cpu_to_be32(V_FW_VI_MAC_CMD_FREEMACS(0) | + raw | + V_FW_CMD_LEN16(1)); + + p->raw_idx_pkd = cpu_to_be32(V_FW_VI_MAC_CMD_RAW_IDX(idx) | + FW_VI_MAC_ID_BASED_FREE); + + /* Lookup Type. Outer header: 0, Inner header: 1 */ + p->data0_pkd = cpu_to_be32(V_DATALKPTYPE(lookup_type) | + V_DATAPORTNUM(port_id)); + /* Lookup mask and port mask */ + p->data0m_pkd = cpu_to_be64(V_DATALKPTYPE(M_DATALKPTYPE) | + V_DATAPORTNUM(M_DATAPORTNUM)); + + /* Copy the address and the mask */ + memcpy((u8 *)&p->data1[0] + 2, addr, ETHER_ADDR_LEN); + memcpy((u8 *)&p->data1m[0] + 2, mask, ETHER_ADDR_LEN); + + return t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, sleep_ok); +} + +/** + * t4_free_mac_filt - frees exact-match filters of given MAC addresses + * @adap: the adapter + * @mbox: mailbox to use for the FW command + * @viid: the VI id + * @naddr: the number of MAC addresses to allocate filters for (up to 7) + * @addr: the MAC address(es) + * @sleep_ok: call is allowed to sleep + * + * Frees the exact-match filter for each of the supplied addresses + * + * Returns a negative error number or the number of filters freed. + */ +int t4_free_mac_filt(struct adapter *adap, unsigned int mbox, + unsigned int viid, unsigned int naddr, + const u8 **addr, bool sleep_ok) +{ + int offset, ret = 0; + struct fw_vi_mac_cmd c; + unsigned int nfilters = 0; + unsigned int max_naddr = adap->chip_params->mps_tcam_size; + unsigned int rem = naddr; + + if (naddr > max_naddr) + return -EINVAL; + + for (offset = 0; offset < (int)naddr ; /**/) { + unsigned int fw_naddr = (rem < ARRAY_SIZE(c.u.exact) + ? rem + : ARRAY_SIZE(c.u.exact)); + size_t len16 = DIV_ROUND_UP(offsetof(struct fw_vi_mac_cmd, + u.exact[fw_naddr]), 16); + struct fw_vi_mac_exact *p; + int i; + + memset(&c, 0, sizeof(c)); + c.op_to_viid = cpu_to_be32(V_FW_CMD_OP(FW_VI_MAC_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE | + V_FW_CMD_EXEC(0) | + V_FW_VI_MAC_CMD_VIID(viid)); + c.freemacs_to_len16 = + cpu_to_be32(V_FW_VI_MAC_CMD_FREEMACS(0) | + V_FW_CMD_LEN16(len16)); + + for (i = 0, p = c.u.exact; i < (int)fw_naddr; i++, p++) { + p->valid_to_idx = cpu_to_be16( + F_FW_VI_MAC_CMD_VALID | + V_FW_VI_MAC_CMD_IDX(FW_VI_MAC_MAC_BASED_FREE)); + memcpy(p->macaddr, addr[offset+i], sizeof(p->macaddr)); + } + + ret = t4_wr_mbox_meat(adap, mbox, &c, sizeof(c), &c, sleep_ok); + if (ret) + break; + + for (i = 0, p = c.u.exact; i < fw_naddr; i++, p++) { + u16 index = G_FW_VI_MAC_CMD_IDX( + be16_to_cpu(p->valid_to_idx)); + + if (index < max_naddr) + nfilters++; + } + + offset += fw_naddr; + rem -= fw_naddr; + } + + if (ret == 0) + ret = nfilters; + return ret; +} + +/** * t4_change_mac - modifies the exact-match filter for a MAC address * @adap: the adapter * @mbox: mailbox to use for the FW command @@ -8916,6 +9179,7 @@ const struct chip_params *t4_get_chip_params(int chipi .vfcount = 128, .sge_fl_db = F_DBPRIO, .mps_tcam_size = NUM_MPS_CLS_SRAM_L_INSTANCES, + .rss_nentries = RSS_NENTRIES, }, { /* T5 */ @@ -8928,6 +9192,7 @@ const struct chip_params *t4_get_chip_params(int chipi .vfcount = 128, .sge_fl_db = F_DBPRIO | F_DBTYPE, .mps_tcam_size = NUM_MPS_T5_CLS_SRAM_L_INSTANCES, + .rss_nentries = RSS_NENTRIES, }, { /* T6 */ @@ -8940,6 +9205,7 @@ const struct chip_params *t4_get_chip_params(int chipi .vfcount = 256, .sge_fl_db = 0, .mps_tcam_size = NUM_MPS_T5_CLS_SRAM_L_INSTANCES, + .rss_nentries = T6_RSS_NENTRIES, }, }; @@ -9743,15 +10009,15 @@ int t4_cim_read_la(struct adapter *adap, u32 *la_buf, if (ret) break; - /* address can't exceed 0xfff (UpDbgLaRdPtr is of 12-bits) */ - idx = (idx + 1) & M_UPDBGLARDPTR; - /* - * Bits 0-3 of UpDbgLaRdPtr can be between 0000 to 1001 to + /* Bits 0-3 of UpDbgLaRdPtr can be between 0000 to 1001 to * identify the 32-bit portion of the full 312-bit data */ - if (is_t6(adap)) - while ((idx & 0xf) > 9) - idx = (idx + 1) % M_UPDBGLARDPTR; + if (is_t6(adap) && (idx & 0xf) >= 9) + idx = (idx & 0xff0) + 0x10; + else + idx++; + /* address can't exceed 0xfff */ + idx &= M_UPDBGLARDPTR; } restart: if (cfg & F_UPDBGLAEN) { @@ -10494,88 +10760,81 @@ void t4_clr_port_stats(struct adapter *adap, int idx) } /** - * t4_i2c_rd - read I2C data from adapter + * t4_i2c_io - read/write I2C data from adapter * @adap: the adapter * @port: Port number if per-port device; <0 if not * @devid: per-port device ID or absolute device ID * @offset: byte offset into device I2C space * @len: byte length of I2C space data - * @buf: buffer in which to return I2C data - * - * Reads the I2C data from the indicated device and location. + * @buf: buffer in which to return I2C data for read + * buffer which holds the I2C data for write + * @write: if true, do a write; else do a read + * Reads/Writes the I2C data from/to the indicated device and location. */ -int t4_i2c_rd(struct adapter *adap, unsigned int mbox, +int t4_i2c_io(struct adapter *adap, unsigned int mbox, int port, unsigned int devid, unsigned int offset, unsigned int len, - u8 *buf) + u8 *buf, bool write) { - u32 ldst_addrspace; - struct fw_ldst_cmd ldst; - int ret; + struct fw_ldst_cmd ldst_cmd, ldst_rpl; + unsigned int i2c_max = sizeof(ldst_cmd.u.i2c.data); + int ret = 0; - if (port >= 4 || - devid >= 256 || - offset >= 256 || - len > sizeof ldst.u.i2c.data) + if (len > I2C_PAGE_SIZE) return -EINVAL; - memset(&ldst, 0, sizeof ldst); - ldst_addrspace = V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_I2C); - ldst.op_to_addrspace = + /* Dont allow reads that spans multiple pages */ + if (offset < I2C_PAGE_SIZE && offset + len > I2C_PAGE_SIZE) + return -EINVAL; + + memset(&ldst_cmd, 0, sizeof(ldst_cmd)); + ldst_cmd.op_to_addrspace = cpu_to_be32(V_FW_CMD_OP(FW_LDST_CMD) | F_FW_CMD_REQUEST | - F_FW_CMD_READ | - ldst_addrspace); - ldst.cycles_to_len16 = cpu_to_be32(FW_LEN16(ldst)); - ldst.u.i2c.pid = (port < 0 ? 0xff : port); - ldst.u.i2c.did = devid; - ldst.u.i2c.boffset = offset; - ldst.u.i2c.blen = len; - ret = t4_wr_mbox(adap, mbox, &ldst, sizeof ldst, &ldst); - if (!ret) - memcpy(buf, ldst.u.i2c.data, len); + (write ? F_FW_CMD_WRITE : F_FW_CMD_READ) | + V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_I2C)); + ldst_cmd.cycles_to_len16 = cpu_to_be32(FW_LEN16(ldst_cmd)); + ldst_cmd.u.i2c.pid = (port < 0 ? 0xff : port); + ldst_cmd.u.i2c.did = devid; + + while (len > 0) { + unsigned int i2c_len = (len < i2c_max) ? len : i2c_max; + + ldst_cmd.u.i2c.boffset = offset; + ldst_cmd.u.i2c.blen = i2c_len; + + if (write) + memcpy(ldst_cmd.u.i2c.data, buf, i2c_len); + + ret = t4_wr_mbox(adap, mbox, &ldst_cmd, sizeof(ldst_cmd), + write ? NULL : &ldst_rpl); + if (ret) + break; + + if (!write) + memcpy(buf, ldst_rpl.u.i2c.data, i2c_len); + offset += i2c_len; + buf += i2c_len; + len -= i2c_len; + } + return ret; } -/** - * t4_i2c_wr - write I2C data to adapter - * @adap: the adapter - * @port: Port number if per-port device; <0 if not - * @devid: per-port device ID or absolute device ID - * @offset: byte offset into device I2C space - * @len: byte length of I2C space data - * @buf: buffer containing new I2C data - * - * Write the I2C data to the indicated device and location. - */ -int t4_i2c_wr(struct adapter *adap, unsigned int mbox, +int t4_i2c_rd(struct adapter *adap, unsigned int mbox, int port, unsigned int devid, unsigned int offset, unsigned int len, u8 *buf) { - u32 ldst_addrspace; - struct fw_ldst_cmd ldst; + return t4_i2c_io(adap, mbox, port, devid, offset, len, buf, false); +} - if (port >= 4 || - devid >= 256 || - offset >= 256 || - len > sizeof ldst.u.i2c.data) - return -EINVAL; - - memset(&ldst, 0, sizeof ldst); - ldst_addrspace = V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_I2C); - ldst.op_to_addrspace = - cpu_to_be32(V_FW_CMD_OP(FW_LDST_CMD) | - F_FW_CMD_REQUEST | - F_FW_CMD_WRITE | - ldst_addrspace); - ldst.cycles_to_len16 = cpu_to_be32(FW_LEN16(ldst)); - ldst.u.i2c.pid = (port < 0 ? 0xff : port); - ldst.u.i2c.did = devid; - ldst.u.i2c.boffset = offset; - ldst.u.i2c.blen = len; - memcpy(ldst.u.i2c.data, buf, len); - return t4_wr_mbox(adap, mbox, &ldst, sizeof ldst, &ldst); +int t4_i2c_wr(struct adapter *adap, unsigned int mbox, + int port, unsigned int devid, + unsigned int offset, unsigned int len, + u8 *buf) +{ + return t4_i2c_io(adap, mbox, port, devid, offset, len, buf, true); } /** @@ -10841,4 +11100,220 @@ int t4_set_devlog_level(struct adapter *adapter, unsig devlog_cmd.retval_len16 = cpu_to_be32(FW_LEN16(devlog_cmd)); return t4_wr_mbox(adapter, adapter->mbox, &devlog_cmd, sizeof(devlog_cmd), &devlog_cmd); +} + +int t4_configure_add_smac(struct adapter *adap) +{ + unsigned int param, val; + int ret = 0; + + adap->params.smac_add_support = 0; + param = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_ADD_SMAC)); + /* Query FW to check if FW supports adding source mac address + * to TCAM feature or not. + * If FW returns 1, driver can use this feature and driver need to send + * FW_PARAMS_PARAM_DEV_ADD_SMAC write command with value 1 to + * enable adding smac to TCAM. + */ + ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, ¶m, &val); + if (ret) + return ret; + + if (val == 1) { + ret = t4_set_params(adap, adap->mbox, adap->pf, 0, 1, + ¶m, &val); + if (!ret) + /* Firmware allows adding explicit TCAM entries. + * Save this internally. + */ + adap->params.smac_add_support = 1; + } + + return ret; +} + +int t4_configure_ringbb(struct adapter *adap) +{ + unsigned int param, val; + int ret = 0; + + param = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_RING_BACKBONE)); + /* Query FW to check if FW supports ring switch feature or not. + * If FW returns 1, driver can use this feature and driver need to send + * FW_PARAMS_PARAM_DEV_RING_BACKBONE write command with value 1 to + * enable the ring backbone configuration. + */ + ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, ¶m, &val); + if (ret < 0) { + CH_ERR(adap, "Querying FW using Ring backbone params command failed, err=%d\n", + ret); + goto out; + } + + if (val != 1) { + CH_ERR(adap, "FW doesnot support ringbackbone features\n"); + goto out; + } + + ret = t4_set_params(adap, adap->mbox, adap->pf, 0, 1, ¶m, &val); + if (ret < 0) { + CH_ERR(adap, "Could not set Ringbackbone, err= %d\n", + ret); + goto out; + } + +out: + return ret; +} + +/* + * t4_set_vlan_acl - Set a VLAN id for the specified VF + * @adapter: the adapter + * @mbox: mailbox to use for the FW command + * @vf: one of the VFs instantiated by the specified PF + * @vlan: The vlanid to be set + * + */ +int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf, + u16 vlan) +{ + struct fw_acl_vlan_cmd vlan_cmd; + unsigned int enable; + + enable = (vlan ? F_FW_ACL_VLAN_CMD_EN : 0); + memset(&vlan_cmd, 0, sizeof(vlan_cmd)); + vlan_cmd.op_to_vfn = cpu_to_be32(V_FW_CMD_OP(FW_ACL_VLAN_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE | + F_FW_CMD_EXEC | + V_FW_ACL_VLAN_CMD_PFN(adap->pf) | + V_FW_ACL_VLAN_CMD_VFN(vf)); + vlan_cmd.en_to_len16 = cpu_to_be32(enable | FW_LEN16(vlan_cmd)); + /* Drop all packets that donot match vlan id */ + vlan_cmd.dropnovlan_fm = (enable + ? (F_FW_ACL_VLAN_CMD_DROPNOVLAN | + F_FW_ACL_VLAN_CMD_FM) + : 0); + if (enable != 0) { + vlan_cmd.nvlan = 1; + vlan_cmd.vlanid[0] = cpu_to_be16(vlan); + } + + return t4_wr_mbox(adap, adap->mbox, &vlan_cmd, sizeof(vlan_cmd), NULL); +} + +/** + * t4_del_mac - Removes the exact-match filter for a MAC address + * @adap: the adapter + * @mbox: mailbox to use for the FW command + * @viid: the VI id + * @addr: the MAC address value + * @smac: if true, delete from only the smac region of MPS + * + * Modifies an exact-match filter and sets it to the new MAC address if + * @idx >= 0, or adds the MAC address to a new filter if @idx < 0. In the + * latter case the address is added persistently if @persist is %true. + * + * Returns a negative error number or the index of the filter with the new + * MAC value. Note that this index may differ from @idx. + */ +int t4_del_mac(struct adapter *adap, unsigned int mbox, unsigned int viid, + const u8 *addr, bool smac) +{ + int ret; + struct fw_vi_mac_cmd c; + struct fw_vi_mac_exact *p = c.u.exact; + unsigned int max_mac_addr = adap->chip_params->mps_tcam_size; + + memset(&c, 0, sizeof(c)); + c.op_to_viid = cpu_to_be32(V_FW_CMD_OP(FW_VI_MAC_CMD) | + F_FW_CMD_REQUEST | F_FW_CMD_WRITE | + V_FW_VI_MAC_CMD_VIID(viid)); + c.freemacs_to_len16 = cpu_to_be32( + V_FW_CMD_LEN16(1) | + (smac ? F_FW_VI_MAC_CMD_IS_SMAC : 0)); + + memcpy(p->macaddr, addr, sizeof(p->macaddr)); + p->valid_to_idx = cpu_to_be16( + F_FW_VI_MAC_CMD_VALID | + V_FW_VI_MAC_CMD_IDX(FW_VI_MAC_MAC_BASED_FREE)); + + ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); + if (ret == 0) { + ret = G_FW_VI_MAC_CMD_IDX(be16_to_cpu(p->valid_to_idx)); + if (ret < max_mac_addr) + return -ENOMEM; + } + + return ret; +} + +/** + * t4_add_mac - Adds an exact-match filter for a MAC address + * @adap: the adapter + * @mbox: mailbox to use for the FW command + * @viid: the VI id + * @idx: index of existing filter for old value of MAC address, or -1 + * @addr: the new MAC address value + * @persist: whether a new MAC allocation should be persistent + * @add_smt: if true also add the address to the HW SMT + * @smac: if true, update only the smac region of MPS + * + * Modifies an exact-match filter and sets it to the new MAC address if + * @idx >= 0, or adds the MAC address to a new filter if @idx < 0. In the + * latter case the address is added persistently if @persist is %true. + * + * Returns a negative error number or the index of the filter with the new + * MAC value. Note that this index may differ from @idx. + */ +int t4_add_mac(struct adapter *adap, unsigned int mbox, unsigned int viid, + int idx, const u8 *addr, bool persist, u8 *smt_idx, bool smac) +{ + int ret, mode; + struct fw_vi_mac_cmd c; + struct fw_vi_mac_exact *p = c.u.exact; + unsigned int max_mac_addr = adap->chip_params->mps_tcam_size; + + if (idx < 0) /* new allocation */ + idx = persist ? FW_VI_MAC_ADD_PERSIST_MAC : FW_VI_MAC_ADD_MAC; + mode = smt_idx ? FW_VI_MAC_SMT_AND_MPSTCAM : FW_VI_MAC_MPS_TCAM_ENTRY; + + memset(&c, 0, sizeof(c)); + c.op_to_viid = cpu_to_be32(V_FW_CMD_OP(FW_VI_MAC_CMD) | + F_FW_CMD_REQUEST | F_FW_CMD_WRITE | + V_FW_VI_MAC_CMD_VIID(viid)); + c.freemacs_to_len16 = cpu_to_be32( + V_FW_CMD_LEN16(1) | + (smac ? F_FW_VI_MAC_CMD_IS_SMAC : 0)); + p->valid_to_idx = cpu_to_be16(F_FW_VI_MAC_CMD_VALID | + V_FW_VI_MAC_CMD_SMAC_RESULT(mode) | + V_FW_VI_MAC_CMD_IDX(idx)); + memcpy(p->macaddr, addr, sizeof(p->macaddr)); + + ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); + if (ret == 0) { + ret = G_FW_VI_MAC_CMD_IDX(be16_to_cpu(p->valid_to_idx)); + if (ret >= max_mac_addr) + return -ENOMEM; + if (smt_idx) { + /* Does fw supports returning smt_idx? */ + if (adap->params.viid_smt_extn_support) + *smt_idx = G_FW_VI_MAC_CMD_SMTID(be32_to_cpu(c.op_to_viid)); + else { + /* In T4/T5, SMT contains 256 SMAC entries + * organized in 128 rows of 2 entries each. + * In T6, SMT contains 256 SMAC entries in + * 256 rows. + */ + if (chip_id(adap) <= CHELSIO_T5) + *smt_idx = ((viid & M_FW_VIID_VIN) << 1); + else + *smt_idx = (viid & M_FW_VIID_VIN); + } + } + } + + return ret; } Modified: stable/12/sys/dev/cxgbe/common/t4_hw.h ============================================================================== --- stable/12/sys/dev/cxgbe/common/t4_hw.h Tue Aug 25 18:16:40 2020 (r364775) +++ stable/12/sys/dev/cxgbe/common/t4_hw.h Tue Aug 25 18:21:13 2020 (r364776) @@ -43,6 +43,7 @@ enum { EEPROMVSIZE = 32768, /* Serial EEPROM virtual address space size */ EEPROMPFSIZE = 1024, /* EEPROM writable area size for PFn, n>0 */ RSS_NENTRIES = 2048, /* # of entries in RSS mapping table */ + T6_RSS_NENTRIES = 4096, TCB_SIZE = 128, /* TCB size */ NMTUS = 16, /* size of MTU table */ NCCTRL_WIN = 32, /* # of congestion control windows */ @@ -92,6 +93,7 @@ enum { SGE_CTXT_SIZE = 24, /* size of SGE context */ SGE_NTIMERS = 6, /* # of interrupt holdoff timer values */ SGE_NCOUNTERS = 4, /* # of interrupt packet counter values */ + SGE_NDBQTIMERS = 8, /* # of Doorbell Queue Timer values */ SGE_MAX_IQ_SIZE = 65520, SGE_FLBUF_SIZES = 16, }; @@ -298,5 +300,15 @@ enum { #define M_SGE_TIMESTAMP 0xfffffffffffffffULL #define V_SGE_TIMESTAMP(x) ((__u64)(x) << S_SGE_TIMESTAMP) #define G_SGE_TIMESTAMP(x) (((__u64)(x) >> S_SGE_TIMESTAMP) & M_SGE_TIMESTAMP) + +#define I2C_DEV_ADDR_A0 0xa0 +#define I2C_DEV_ADDR_A2 0xa2 +#define I2C_PAGE_SIZE 0x100 +#define SFP_DIAG_TYPE_ADDR 0x5c +#define SFP_DIAG_TYPE_LEN 0x1 +#define SFF_8472_COMP_ADDR 0x5e +#define SFF_8472_COMP_LEN 0x1 +#define SFF_REV_ADDR 0x1 +#define SFF_REV_LEN 0x1 #endif /* __T4_HW_H */ Modified: stable/12/sys/dev/cxgbe/cudbg/cudbg_lib.c ============================================================================== --- stable/12/sys/dev/cxgbe/cudbg/cudbg_lib.c Tue Aug 25 18:16:40 2020 (r364775) +++ stable/12/sys/dev/cxgbe/cudbg/cudbg_lib.c Tue Aug 25 18:21:13 2020 (r364776) @@ -576,7 +576,7 @@ static int collect_rss(struct cudbg_init *pdbg_init, u32 size; int rc = 0; - size = RSS_NENTRIES * sizeof(u16); + size = padap->chip_params->rss_nentries * sizeof(u16); rc = get_scratch_buff(dbg_buff, size, &scratch_buff); if (rc) goto err; From owner-svn-src-all@freebsd.org Tue Aug 25 18:22:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2EB633B54C9; Tue, 25 Aug 2020 18:22:31 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbcm702Nxz3bNn; Tue, 25 Aug 2020 18:22:31 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8BE02DFB1; Tue, 25 Aug 2020 18:22:30 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PIMUZE041585; Tue, 25 Aug 2020 18:22:30 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PIMU7l041584; Tue, 25 Aug 2020 18:22:30 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202008251822.07PIMU7l041584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Tue, 25 Aug 2020 18:22:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364777 - head/sys/modules/zfs X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: head/sys/modules/zfs X-SVN-Commit-Revision: 364777 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 18:22:31 -0000 Author: freqlabs Date: Tue Aug 25 18:22:30 2020 New Revision: 364777 URL: https://svnweb.freebsd.org/changeset/base/364777 Log: Fix zstd in OpenZFS module with CPUTYPE?= The build breaks when something adds -march= to the compiler flags, for example CPUTYPE?=native. When the arch supports BMI, __BMI__ is defined and zstd.c tries to include immintrin.h, which is not present when building the kernel. Disable experimental BMI intrinsics in zstd in the OpenZFS kernel module by explicitly undefining __BMI__ for zstd.c. A similar fix was needed for the original zstd import, done in r327738. Reported by: Jakob Alvermark Discussed with: mmacy Sponsored by: iXsystems, Inc. Modified: head/sys/modules/zfs/Makefile Modified: head/sys/modules/zfs/Makefile ============================================================================== --- head/sys/modules/zfs/Makefile Tue Aug 25 18:21:13 2020 (r364776) +++ head/sys/modules/zfs/Makefile Tue Aug 25 18:22:30 2020 (r364777) @@ -338,7 +338,7 @@ CFLAGS.zil.c= -Wno-cast-qual CFLAGS.zio.c= -Wno-cast-qual CFLAGS.zrlock.c= -Wno-cast-qual CFLAGS.zfs_zstd.c= -Wno-cast-qual -Wno-pointer-arith -CFLAGS.zstd.c= -fno-tree-vectorize +CFLAGS.zstd.c= -U__BMI__ -fno-tree-vectorize .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS.zstd.c+= -include ${SRCDIR}/zstd/include/aarch64_compat.h .endif From owner-svn-src-all@freebsd.org Tue Aug 25 18:32:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B7CE3B6220; Tue, 25 Aug 2020 18:32:44 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbczw38yQz3c9K; Tue, 25 Aug 2020 18:32:44 +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 4FAFB2E145; Tue, 25 Aug 2020 18:32:44 +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 07PIWiMd048041; Tue, 25 Aug 2020 18:32:44 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PIWh5i048038; Tue, 25 Aug 2020 18:32:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008251832.07PIWh5i048038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 25 Aug 2020 18:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364779 - in head: share/man/man4 sys/dev/sdhci X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/sdhci X-SVN-Commit-Revision: 364779 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 18:32:44 -0000 Author: markj Date: Tue Aug 25 18:32:43 2020 New Revision: 364779 URL: https://svnweb.freebsd.org/changeset/base/364779 Log: sdhci(4): Recognize the Texas Instruments PCIxx12 card reader. PR: 248650 Submitted by: Lars Herschke MFC after: 1 week Modified: head/share/man/man4/sdhci.4 head/sys/dev/sdhci/sdhci_pci.c Modified: head/share/man/man4/sdhci.4 ============================================================================== --- head/share/man/man4/sdhci.4 Tue Aug 25 18:30:12 2020 (r364778) +++ head/share/man/man4/sdhci.4 Tue Aug 25 18:32:43 2020 (r364779) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 9, 2012 +.Dd August 25, 2020 .Dt SDHCI 4 .Os .Sh NAME @@ -71,7 +71,7 @@ RICOH R5C822 .It RICOH R5CE823 .It -TI PCIXX21/XX11 +TI PCIXX21/XX11/XX12 .El .Sh SEE ALSO .Xr mmc 4 , Modified: head/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- head/sys/dev/sdhci/sdhci_pci.c Tue Aug 25 18:30:12 2020 (r364778) +++ head/sys/dev/sdhci/sdhci_pci.c Tue Aug 25 18:32:43 2020 (r364779) @@ -90,6 +90,9 @@ static const struct sdhci_device { SDHCI_QUIRK_LOWER_FREQUENCY }, { 0x8034104c, 0xffff, "TI XX21/XX11 SD", SDHCI_QUIRK_FORCE_DMA }, + { 0x803c104c, 0xffff, "TI XX12 SD", + SDHCI_QUIRK_FORCE_DMA | + SDHCI_QUIRK_WAITFOR_RESET_ASSERTED }, { 0x05501524, 0xffff, "ENE CB712 SD", SDHCI_QUIRK_BROKEN_TIMINGS }, { 0x05511524, 0xffff, "ENE CB712 SD 2", From owner-svn-src-all@freebsd.org Tue Aug 25 18:54:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 906033B6F25; Tue, 25 Aug 2020 18:54:11 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbdSg3LtHz3g5N; Tue, 25 Aug 2020 18:54:11 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 561E82E6E0; Tue, 25 Aug 2020 18:54:11 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PIsB8m062343; Tue, 25 Aug 2020 18:54:11 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PIsBkR062342; Tue, 25 Aug 2020 18:54:11 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202008251854.07PIsBkR062342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Tue, 25 Aug 2020 18:54:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364780 - head/cddl/lib/libzpool X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/cddl/lib/libzpool X-SVN-Commit-Revision: 364780 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 18:54:11 -0000 Author: bdragon Date: Tue Aug 25 18:54:10 2020 New Revision: 364780 URL: https://svnweb.freebsd.org/changeset/base/364780 Log: [PowerPC] Apply the ppc32 GOT overflow fix to powerpcspe powerpcspe is also a 32 bit ppc platform, and also needs to be -fPIC to avoid overflowing the GOT. Sponsored by: Tag1 Consulting, Inc. Modified: head/cddl/lib/libzpool/Makefile Modified: head/cddl/lib/libzpool/Makefile ============================================================================== --- head/cddl/lib/libzpool/Makefile Tue Aug 25 18:32:43 2020 (r364779) +++ head/cddl/lib/libzpool/Makefile Tue Aug 25 18:54:10 2020 (r364780) @@ -21,7 +21,7 @@ ACFLAGS+= -Wa,--noexecstack ATOMIC_SRCS= opensolaris_atomic.c .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe" # Don't waste GOT entries on small data. PICFLAG= -fPIC .endif From owner-svn-src-all@freebsd.org Tue Aug 25 19:04:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7AC043B7343; Tue, 25 Aug 2020 19:04:55 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbdj32djmz3gq5; Tue, 25 Aug 2020 19:04:55 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E9552EB9A; Tue, 25 Aug 2020 19:04:55 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PJ4tw8068865; Tue, 25 Aug 2020 19:04:55 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PJ4srL068863; Tue, 25 Aug 2020 19:04:54 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202008251904.07PJ4srL068863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Tue, 25 Aug 2020 19:04:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364781 - in head/sys: conf modules/zfs X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in head/sys: conf modules/zfs X-SVN-Commit-Revision: 364781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 19:04:55 -0000 Author: bdragon Date: Tue Aug 25 19:04:54 2020 New Revision: 364781 URL: https://svnweb.freebsd.org/changeset/base/364781 Log: [PowerPC] More preemptive powerpcspe ZFS build fixes I went through the merge and found the rest of the instances where ${MACHINE_ARCH} == "powerpc" was being used to detect 32-bit and adjusted the rest of the instances to also check for powerpcspe. mips32* will probably want to do the same. Sponsored by: Tag1 Consulting, Inc. Modified: head/sys/conf/kern.pre.mk head/sys/modules/zfs/Makefile Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Aug 25 18:54:10 2020 (r364780) +++ head/sys/conf/kern.pre.mk Tue Aug 25 19:04:54 2020 (r364781) @@ -257,7 +257,7 @@ ZFS_CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_ .endif .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ - ${MACHINE_ARCH} == "arm" + ${MACHINE_ARCH} == "powerpcspe" || ${MACHINE_ARCH} == "arm" ZFS_CFLAGS+= -DBITS_PER_LONG=32 .else ZFS_CFLAGS+= -DBITS_PER_LONG=64 Modified: head/sys/modules/zfs/Makefile ============================================================================== --- head/sys/modules/zfs/Makefile Tue Aug 25 18:54:10 2020 (r364780) +++ head/sys/modules/zfs/Makefile Tue Aug 25 19:04:54 2020 (r364781) @@ -47,7 +47,7 @@ CFLAGS+= -fprofile-arcs -ftest-coverage DEBUG_FLAGS=-g .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ - ${MACHINE_ARCH} == "arm" + ${MACHINE_ARCH} == "powerpcspe" || ${MACHINE_ARCH} == "arm" CFLAGS+= -DBITS_PER_LONG=32 .else CFLAGS+= -DBITS_PER_LONG=64 @@ -117,7 +117,7 @@ SRCS+= acl_common.c \ .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ - ${MACHINE_ARCH} == "arm" + ${MACHINE_ARCH} == "powerpcspe" || ${MACHINE_ARCH} == "arm" SRCS+= spl_atomic.c .endif From owner-svn-src-all@freebsd.org Tue Aug 25 19:57:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03ACE3B8EC5; Tue, 25 Aug 2020 19:57:12 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbfsM6LL3z42Jy; Tue, 25 Aug 2020 19:57:11 +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 B9CC52F0CD; Tue, 25 Aug 2020 19:57:11 +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 07PJvBKr099972; Tue, 25 Aug 2020 19:57:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PJvBcC099971; Tue, 25 Aug 2020 19:57:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202008251957.07PJvBcC099971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 25 Aug 2020 19:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364782 - head/lib/libcompiler_rt X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/lib/libcompiler_rt X-SVN-Commit-Revision: 364782 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 19:57:12 -0000 Author: dim Date: Tue Aug 25 19:57:11 2020 New Revision: 364782 URL: https://svnweb.freebsd.org/changeset/base/364782 Log: After r364753, there should be no need to suppress -Watomic-alignment warnings anymore for compiler-rt's atomic.c. This occurred because the IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this caused the compiler to emit a runtime call to __atomic_is_lock_free(), and that triggers the warning. MFC after: 2 weeks X-MFC-With: r364753 Modified: head/lib/libcompiler_rt/Makefile.inc Modified: head/lib/libcompiler_rt/Makefile.inc ============================================================================== --- head/lib/libcompiler_rt/Makefile.inc Tue Aug 25 19:04:54 2020 (r364781) +++ head/lib/libcompiler_rt/Makefile.inc Tue Aug 25 19:57:11 2020 (r364782) @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - CRTARCH= ${MACHINE_CPUARCH:C/amd64/x86_64/} CRTSRC= ${SRCTOP}/contrib/llvm-project/compiler-rt/lib/builtins @@ -124,10 +122,6 @@ SRCF+= udivti3 SRCF+= umoddi3 SRCF+= umodsi3 SRCF+= umodti3 - -.if "${COMPILER_TYPE}" == "clang" -CFLAGS.atomic.c+= -Wno-atomic-alignment -.endif # Avoid using SSE2 instructions on i386, if unsupported. .if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2) From owner-svn-src-all@freebsd.org Tue Aug 25 20:04:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFFBD3B95EE; Tue, 25 Aug 2020 20:04:35 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbg1v5krBz438H; Tue, 25 Aug 2020 20:04:35 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1ECB2F682; Tue, 25 Aug 2020 20:04:35 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PK4Zjn006078; Tue, 25 Aug 2020 20:04:35 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PK4ZBM006077; Tue, 25 Aug 2020 20:04:35 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202008252004.07PK4ZBM006077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Tue, 25 Aug 2020 20:04:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364783 - head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear X-SVN-Commit-Revision: 364783 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 20:04:35 -0000 Author: freqlabs Date: Tue Aug 25 20:04:35 2020 New Revision: 364783 URL: https://svnweb.freebsd.org/changeset/base/364783 Log: Skip zpool_clear_005_pos test until bug fixed Messing with gnop devices under a zpool fails in this test, causing the pool to be suspended and eventually the system to deadlock. Skip the test for now until the issue is resolved. PR: tests/248910 Discussed with: lwhsu Sponsored by: iXsystems, Inc. Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/zpool_clear_test.sh Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/zpool_clear_test.sh ============================================================================== --- head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/zpool_clear_test.sh Tue Aug 25 19:57:11 2020 (r364782) +++ head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/zpool_clear_test.sh Tue Aug 25 20:04:35 2020 (r364783) @@ -124,6 +124,7 @@ zpool_clear_005_pos_head() } zpool_clear_005_pos_body() { + atf_skip "Fails on OpenZFS, causing eventual deadlock. PR tests/248910" . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_clear.cfg From owner-svn-src-all@freebsd.org Tue Aug 25 20:07:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60CCB3B9874; Tue, 25 Aug 2020 20:07:12 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbg4w1wJ3z43PN; Tue, 25 Aug 2020 20:07:12 +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 250512F0E6; Tue, 25 Aug 2020 20:07:12 +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 07PK7CGJ006485; Tue, 25 Aug 2020 20:07:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PK7BLS006484; Tue, 25 Aug 2020 20:07:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202008252007.07PK7BLS006484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 25 Aug 2020 20:07:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364784 - head/lib/libgcc_eh X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/lib/libgcc_eh X-SVN-Commit-Revision: 364784 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 20:07:12 -0000 Author: dim Date: Tue Aug 25 20:07:11 2020 New Revision: 364784 URL: https://svnweb.freebsd.org/changeset/base/364784 Log: After r364423, which ensures the callbacks that dl_iterate_phdr(3) performs are protected by an exclusive lock, even for statically linked programs, it is safe to re-enable libunwind's FrameHeaderCache, which I temporarily disabled in r364263. Meanwhile upstream has also used the _LIBUNWIND_USE_FRAME_HEADER_CACHE for this purpose, so the only thing needed is to add this as a compile-time command line flag. While here, reformat the CFLAGS lines a little bit. MFC after: 6 weeks X-MFC-With: r364284, r364423 Modified: head/lib/libgcc_eh/Makefile.inc Modified: head/lib/libgcc_eh/Makefile.inc ============================================================================== --- head/lib/libgcc_eh/Makefile.inc Tue Aug 25 20:04:35 2020 (r364783) +++ head/lib/libgcc_eh/Makefile.inc Tue Aug 25 20:07:11 2020 (r364784) @@ -25,7 +25,10 @@ CFLAGS.${file}+= -fno-exceptions -funwind-tables CXXFLAGS.${file}+= -fno-exceptions -funwind-tables .endfor -CFLAGS+= -I${UNWINDINCDIR} -I${.CURDIR} -D_LIBUNWIND_IS_NATIVE_ONLY +CFLAGS+= -I${UNWINDINCDIR} +CFLAGS+= -I${.CURDIR} +CFLAGS+= -D_LIBUNWIND_IS_NATIVE_ONLY +CFLAGS+= -D_LIBUNWIND_USE_FRAME_HEADER_CACHE CXXFLAGS+= -fno-rtti CXXSTD?= c++11 STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC From owner-svn-src-all@freebsd.org Tue Aug 25 20:08:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ADCB33B9B0A; Tue, 25 Aug 2020 20:08:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbg6c48pjz43jf; Tue, 25 Aug 2020 20:08:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 596C7184C8; Tue, 25 Aug 2020 20:08:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::841c:2a51:60d8:8a4] (unknown [IPv6:2001:470:7a58:0:841c:2a51:60d8:8a4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 5A64763A31; Tue, 25 Aug 2020 22:08:38 +0200 (CEST) From: Dimitry Andric Content-Type: multipart/signed; boundary="Apple-Mail=_7B84E4BC-056D-4402-91A4-26055332415B"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: svn commit: r364782 - head/lib/libcompiler_rt Date: Tue, 25 Aug 2020 22:08:30 +0200 References: <202008251957.07PJvBcC099971@repo.freebsd.org> To: src-committers , svn-src-all , svn-src-head@freebsd.org In-Reply-To: <202008251957.07PJvBcC099971@repo.freebsd.org> Message-Id: <043F4141-45F1-436F-9B23-185FC0598AEF@FreeBSD.org> X-Mailer: Apple Mail (2.3445.104.15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 20:08:40 -0000 --Apple-Mail=_7B84E4BC-056D-4402-91A4-26055332415B Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 25 Aug 2020, at 21:57, Dimitry Andric wrote: > > Author: dim > Date: Tue Aug 25 19:57:11 2020 > New Revision: 364782 > URL: https://svnweb.freebsd.org/changeset/base/364782 > > Log: > After r364753, there should be no need to suppress -Watomic-alignment > warnings anymore for compiler-rt's atomic.c. This occurred because the > IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this > caused the compiler to emit a runtime call to __atomic_is_lock_free(), > and that triggers the warning. > > MFC after: 2 weeks > X-MFC-With: r364753 Forgot to mention, Noticed by: arichardson. :) -Dimitry --Apple-Mail=_7B84E4BC-056D-4402-91A4-26055332415B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCX0VvvwAKCRCwXqMKLiCW o6u3AKCWMPlV1W1Y2ghizjk7FrJHY56eIgCfbC1sa+w/F/juZi8fuCFMYoULxbI= =BKCI -----END PGP SIGNATURE----- --Apple-Mail=_7B84E4BC-056D-4402-91A4-26055332415B-- From owner-svn-src-all@freebsd.org Tue Aug 25 20:17:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7293A3BA1A1; Tue, 25 Aug 2020 20:17:43 +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 4BbgK26XnWz44SB; Tue, 25 Aug 2020 20:17:42 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 86A433C0199; Tue, 25 Aug 2020 20:17:36 +0000 (UTC) Date: Tue, 25 Aug 2020 20:17:36 +0000 From: Brooks Davis To: Brandon Bergren Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364781 - in head/sys: conf modules/zfs Message-ID: <20200825201736.GC43898@spindle.one-eyed-alien.net> References: <202008251904.07PJ4srL068863@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R3G7APHDIzY6R/pk" Content-Disposition: inline In-Reply-To: <202008251904.07PJ4srL068863@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 4BbgK26XnWz44SB X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 20:17:43 -0000 --R3G7APHDIzY6R/pk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 25, 2020 at 07:04:54PM +0000, Brandon Bergren wrote: > Author: bdragon > Date: Tue Aug 25 19:04:54 2020 > New Revision: 364781 > URL: https://svnweb.freebsd.org/changeset/base/364781 >=20 > Log: > [PowerPC] More preemptive powerpcspe ZFS build fixes > =20 > I went through the merge and found the rest of the instances where > ${MACHINE_ARCH} =3D=3D "powerpc" was being used to detect 32-bit and ad= justed > the rest of the instances to also check for powerpcspe. > =20 > mips32* will probably want to do the same. > =20 > Sponsored by: Tag1 Consulting, Inc. >=20 > Modified: > head/sys/conf/kern.pre.mk > head/sys/modules/zfs/Makefile >=20 > Modified: head/sys/conf/kern.pre.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/kern.pre.mk Tue Aug 25 18:54:10 2020 (r364780) > +++ head/sys/conf/kern.pre.mk Tue Aug 25 19:04:54 2020 (r364781) > @@ -257,7 +257,7 @@ ZFS_CFLAGS+=3D -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHA= VE_ > .endif > =20 > .if ${MACHINE_ARCH} =3D=3D "i386" || ${MACHINE_ARCH} =3D=3D "powerpc" ||= \ > - ${MACHINE_ARCH} =3D=3D "arm" > + ${MACHINE_ARCH} =3D=3D "powerpcspe" || ${MACHINE_ARCH} =3D=3D "arm" > ZFS_CFLAGS+=3D -DBITS_PER_LONG=3D32 > .else > ZFS_CFLAGS+=3D -DBITS_PER_LONG=3D64 In CheriBSD we've added a MACHINE_ABI variable that could be used to simplify this mess of checks. https://github.com/CTSRD-CHERI/cheribsd/blob/5ee735e5f8ef7268731359a2d8a9a8= 218df2d23f/share/mk/bsd.cpu.mk#L478 As currently implemented you'd use: =2Eif ${MACHINE_ABI:Mptr64} There's be a argument for adding long32 and long64 for to avoid conflating long and pointer size. -- Brooks --R3G7APHDIzY6R/pk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJfRXHfAAoJEKzQXbSebgfAgJIH/Ay1jbdHWG0MtmUz2J/PdO38 x3Jl77+J857l3zv26JUHer+CgzDeFH0Z7iQPml9v5KgHyh6Ec2+Qra+wvoQGPywq /1QKGHPPiTLDSOIk34IMK3ukr19SH73sdFbFJIuA+3wwmIJCsBRk6NuBlkdxQhV/ ZBCoq23kXPxWBBkPbZmakBRX1ELzlfgrJGKkpnAGwbkyEPLkqU6fSWrt4a+CRhrx ehejZgPR4bb7YUGabmgT4OH00+KFWap4e0bITzGRFqVA3ehdAsxkJUSLG1BrSWX7 SqQxG2xzbrbsItkfHbrvPMlgzCFNkzK5mMv1ISCLuPg6XPGTdh1GBNkt2DrbRr0= =ABXN -----END PGP SIGNATURE----- --R3G7APHDIzY6R/pk-- From owner-svn-src-all@freebsd.org Tue Aug 25 21:07:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DCFBA3BC19F; Tue, 25 Aug 2020 21:07:27 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbhQR5Vjfz47tb; Tue, 25 Aug 2020 21:07:27 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0485824B; Tue, 25 Aug 2020 21:07:27 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PL7Rb1043010; Tue, 25 Aug 2020 21:07:27 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PL7RZx043009; Tue, 25 Aug 2020 21:07:27 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202008252107.07PL7RZx043009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Tue, 25 Aug 2020 21:07:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364785 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 364785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 21:07:27 -0000 Author: freqlabs Date: Tue Aug 25 21:07:27 2020 New Revision: 364785 URL: https://svnweb.freebsd.org/changeset/base/364785 Log: bsdinstall: Update loader.conf for new OpenZFS deps zfs.ko now includes the SPL but relies on cryptodev instead. Reported by: D Scott Phillips Sponsored by: iXsystems, Inc. Modified: head/usr.sbin/bsdinstall/scripts/config Modified: head/usr.sbin/bsdinstall/scripts/config ============================================================================== --- head/usr.sbin/bsdinstall/scripts/config Tue Aug 25 20:07:11 2020 (r364784) +++ head/usr.sbin/bsdinstall/scripts/config Tue Aug 25 21:07:27 2020 (r364785) @@ -44,9 +44,9 @@ cp $BSDINSTALL_TMPETC/* $BSDINSTALL_CHROOT/etc cat $BSDINSTALL_TMPBOOT/loader.conf.* >> $BSDINSTALL_TMPBOOT/loader.conf rm $BSDINSTALL_TMPBOOT/loader.conf.* -# The 'opensolaris_load' line is a workaround for arm64, which does not -# automatically load opensolaris.ko with zfs.ko. -df -t zfs $BSDINSTALL_CHROOT > /dev/null && echo "opensolaris_load=\"YES\"" >> $BSDINSTALL_TMPBOOT/loader.conf +# The 'cryptodev_load' line is a workaround for arm64, which does not +# automatically load cryptodev.ko with zfs.ko. +df -t zfs $BSDINSTALL_CHROOT > /dev/null && echo "cryptodev_load=\"YES\"" >> $BSDINSTALL_TMPBOOT/loader.conf df -t zfs $BSDINSTALL_CHROOT > /dev/null && echo "zfs_load=\"YES\"" >> $BSDINSTALL_TMPBOOT/loader.conf cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHROOT/boot From owner-svn-src-all@freebsd.org Tue Aug 25 21:36:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2565F3BCFC5; Tue, 25 Aug 2020 21:36: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbj4T0D97z4CMb; Tue, 25 Aug 2020 21:36:57 +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 DFFA78827; Tue, 25 Aug 2020 21:36: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 07PLauZ1061712; Tue, 25 Aug 2020 21:36:56 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PLaudm061711; Tue, 25 Aug 2020 21:36:56 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202008252136.07PLaudm061711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 25 Aug 2020 21:36:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364786 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 364786 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 21:36:57 -0000 Author: cem Date: Tue Aug 25 21:36:56 2020 New Revision: 364786 URL: https://svnweb.freebsd.org/changeset/base/364786 Log: vm_pageout: Scale worker threads with CPUs Autoscale vm_pageout worker threads from r364129 with CPU count. The default is arbitrarily chosen to be 16 CPUs per worker thread, but can be adjusted with the vm.pageout_cpus_per_thread tunable. There will never be less than 1 thread per populated NUMA domain, and the previous arbitrary upper limit (at most ncpus/2 threads per NUMA domain) is preserved. Care is taken to gracefully handle asymmetric NUMA nodes, such as empty node systems (e.g., AMD 2990WX) and systems with nodes of varying size (e.g., some larger >20 core Intel Haswell/Broadwell Xeon). Reviewed by: kib, markj Sponsored by: Isilon Differential Revision: https://reviews.freebsd.org/D26152 Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Tue Aug 25 21:07:27 2020 (r364785) +++ head/sys/vm/vm_pageout.c Tue Aug 25 21:36:56 2020 (r364786) @@ -165,11 +165,10 @@ SYSCTL_INT(_vm, OID_AUTO, pageout_update_period, CTLFLAG_RWTUN, &vm_pageout_update_period, 0, "Maximum active LRU update period"); -/* Access with get_pageout_threads_per_domain(). */ -static int pageout_threads_per_domain = 1; -SYSCTL_INT(_vm, OID_AUTO, pageout_threads_per_domain, CTLFLAG_RDTUN, - &pageout_threads_per_domain, 0, - "Number of worker threads comprising each per-domain pagedaemon"); +static int pageout_cpus_per_thread = 16; +SYSCTL_INT(_vm, OID_AUTO, pageout_cpus_per_thread, CTLFLAG_RDTUN, + &pageout_cpus_per_thread, 0, + "Number of CPUs per pagedaemon worker thread"); SYSCTL_INT(_vm, OID_AUTO, lowmem_period, CTLFLAG_RWTUN, &lowmem_period, 0, "Low memory callback period"); @@ -2200,38 +2199,38 @@ vm_pageout_helper(void *arg) } static int -get_pageout_threads_per_domain(void) +get_pageout_threads_per_domain(const struct vm_domain *vmd) { - static bool resolved = false; - int half_cpus_per_dom; + unsigned total_pageout_threads, eligible_cpus, domain_cpus; - /* - * This is serialized externally by the sorted autoconfig portion of - * boot. - */ - if (__predict_true(resolved)) - return (pageout_threads_per_domain); + if (VM_DOMAIN_EMPTY(vmd->vmd_domain)) + return (0); /* * Semi-arbitrarily constrain pagedaemon threads to less than half the - * total number of threads in the system as an insane upper limit. + * total number of CPUs in the system as an upper limit. */ - half_cpus_per_dom = howmany(mp_ncpus / vm_ndomains, 2); + if (pageout_cpus_per_thread < 2) + pageout_cpus_per_thread = 2; + else if (pageout_cpus_per_thread > mp_ncpus) + pageout_cpus_per_thread = mp_ncpus; - if (pageout_threads_per_domain < 1) { - printf("Invalid tuneable vm.pageout_threads_per_domain value: " - "%d out of valid range: [1-%d]; clamping to 1\n", - pageout_threads_per_domain, half_cpus_per_dom); - pageout_threads_per_domain = 1; - } else if (pageout_threads_per_domain > half_cpus_per_dom) { - printf("Invalid tuneable vm.pageout_threads_per_domain value: " - "%d out of valid range: [1-%d]; clamping to %d\n", - pageout_threads_per_domain, half_cpus_per_dom, - half_cpus_per_dom); - pageout_threads_per_domain = half_cpus_per_dom; - } - resolved = true; - return (pageout_threads_per_domain); + total_pageout_threads = howmany(mp_ncpus, pageout_cpus_per_thread); + domain_cpus = CPU_COUNT(&cpuset_domain[vmd->vmd_domain]); + + /* Pagedaemons are not run in empty domains. */ + eligible_cpus = mp_ncpus; + for (unsigned i = 0; i < vm_ndomains; i++) + if (VM_DOMAIN_EMPTY(i)) + eligible_cpus -= CPU_COUNT(&cpuset_domain[i]); + + /* + * Assign a portion of the total pageout threads to this domain + * corresponding to the fraction of pagedaemon-eligible CPUs in the + * domain. In asymmetric NUMA systems, domains with more CPUs may be + * allocated more threads than domains with fewer CPUs. + */ + return (howmany(total_pageout_threads * domain_cpus, eligible_cpus)); } /* @@ -2288,7 +2287,7 @@ vm_pageout_init_domain(int domain) "pidctrl", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, ""); pidctrl_init_sysctl(&vmd->vmd_pid, SYSCTL_CHILDREN(oid)); - vmd->vmd_inactive_threads = get_pageout_threads_per_domain(); + vmd->vmd_inactive_threads = get_pageout_threads_per_domain(vmd); } static void @@ -2343,7 +2342,6 @@ vm_pageout(void) p = curproc; td = curthread; - pageout_threads = get_pageout_threads_per_domain(); mtx_init(&vm_oom_ratelim_mtx, "vmoomr", NULL, MTX_DEF); swap_pager_swap_init(); @@ -2363,6 +2361,7 @@ vm_pageout(void) panic("starting pageout for domain %d: %d\n", i, error); } + pageout_threads = VM_DOMAIN(i)->vmd_inactive_threads; for (j = 0; j < pageout_threads - 1; j++) { error = kthread_add(vm_pageout_helper, (void *)(uintptr_t)i, p, NULL, 0, 0, From owner-svn-src-all@freebsd.org Tue Aug 25 23:26:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41A8E3C07B1; Tue, 25 Aug 2020 23:26:53 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BblWK1407z4KT5; Tue, 25 Aug 2020 23:26:53 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 075DC9D44; Tue, 25 Aug 2020 23:26:53 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PNQqBM029325; Tue, 25 Aug 2020 23:26:52 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PNQqWH029324; Tue, 25 Aug 2020 23:26:52 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008252326.07PNQqWH029324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Tue, 25 Aug 2020 23:26:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364787 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 364787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 23:26:53 -0000 Author: mmacy Date: Tue Aug 25 23:26:52 2020 New Revision: 364787 URL: https://svnweb.freebsd.org/changeset/base/364787 Log: ZFS: whitelist zstd and encryption in the loader Please note that neither zstd nor encryption is supported by the loader at this instant. This change makes it safe to use those features in one's root pool, but not in one's root dataset. Modified: head/stand/libsa/zfs/zfsimpl.c Modified: head/stand/libsa/zfs/zfsimpl.c ============================================================================== --- head/stand/libsa/zfs/zfsimpl.c Tue Aug 25 21:36:56 2020 (r364786) +++ head/stand/libsa/zfs/zfsimpl.c Tue Aug 25 23:26:52 2020 (r364787) @@ -127,6 +127,8 @@ static const char *features_for_read[] = { "com.delphix:device_removal", "com.delphix:obsolete_counts", "com.intel:allocation_classes", + "org.freebsd:zstd_compress", + "com.datto:encryption", NULL }; From owner-svn-src-all@freebsd.org Tue Aug 25 23:35:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C7BD23C0C8F; Tue, 25 Aug 2020 23:35:55 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbljl4xV4z4LRZ; Tue, 25 Aug 2020 23:35:55 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B99A9A66; Tue, 25 Aug 2020 23:35:55 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07PNZtuG035515; Tue, 25 Aug 2020 23:35:55 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07PNZtNK035514; Tue, 25 Aug 2020 23:35:55 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008252335.07PNZtNK035514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Tue, 25 Aug 2020 23:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364788 - head/sys/cddl/contrib/opensolaris/common/lz4 X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/common/lz4 X-SVN-Commit-Revision: 364788 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 25 Aug 2020 23:35:55 -0000 Author: mmacy Date: Tue Aug 25 23:35:55 2020 New Revision: 364788 URL: https://svnweb.freebsd.org/changeset/base/364788 Log: ZFS: band-aid for -DNO_CLEAN Submitted by: Neal Chauhan Approved by: imp@ Differential Revision: https://reviews.freebsd.org/D26183 Modified: head/sys/cddl/contrib/opensolaris/common/lz4/lz4.c Modified: head/sys/cddl/contrib/opensolaris/common/lz4/lz4.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/lz4/lz4.c Tue Aug 25 23:26:52 2020 (r364787) +++ head/sys/cddl/contrib/opensolaris/common/lz4/lz4.c Tue Aug 25 23:35:55 2020 (r364788) @@ -44,6 +44,7 @@ #include #include +#undef ASSERT #define ASSERT assert #else #include @@ -52,9 +53,10 @@ #include #include +#undef ASSERT #define ASSERT assert #endif -#include +#include "lz4.h" static int real_LZ4_compress(const char *source, char *dest, int isize, int osize); From owner-svn-src-all@freebsd.org Wed Aug 26 00:28:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89FC43C24B9; Wed, 26 Aug 2020 00:28:29 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbmtP32HRz4PKW; Wed, 26 Aug 2020 00:28:29 +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 4C1BDA26A; Wed, 26 Aug 2020 00:28:29 +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 07Q0STSp065952; Wed, 26 Aug 2020 00:28:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q0SSb1065949; Wed, 26 Aug 2020 00:28:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202008260028.07Q0SSb1065949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 26 Aug 2020 00:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364789 - in stable/12/sys: amd64/acpica arm64/acpica i386/acpica X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12/sys: amd64/acpica arm64/acpica i386/acpica X-SVN-Commit-Revision: 364789 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 00:28:29 -0000 Author: mav Date: Wed Aug 26 00:28:28 2020 New Revision: 364789 URL: https://svnweb.freebsd.org/changeset/base/364789 Log: MFC r364399: Remove some noisy ACPI tables messages from verbose dmesg. Those messages were printed hundreds of times during boot, often multiple times for each table. We already print information about the tables in more organized form once to not duplicate it when random ACPI drivers are attaching. Modified: stable/12/sys/amd64/acpica/acpi_machdep.c stable/12/sys/arm64/acpica/acpi_machdep.c stable/12/sys/i386/acpica/acpi_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/acpica/acpi_machdep.c ============================================================================== --- stable/12/sys/amd64/acpica/acpi_machdep.c Tue Aug 25 23:35:55 2020 (r364788) +++ stable/12/sys/amd64/acpica/acpi_machdep.c Wed Aug 26 00:28:28 2020 (r364789) @@ -132,9 +132,6 @@ probe_table(vm_paddr_t address, const char *sig) table = pmap_mapbios(address, sizeof(ACPI_TABLE_HEADER)); ret = strncmp(table->Signature, sig, ACPI_NAMESEG_SIZE) == 0; - if (bootverbose) - printf("Table '%.4s' at 0x%jx\n", table->Signature, - (uintmax_t)address); pmap_unmapbios((vm_offset_t)table, sizeof(ACPI_TABLE_HEADER)); return (ret); } @@ -239,13 +236,8 @@ acpi_find_table(const char *sig) acpi_unmap_table(rsdt); } pmap_unmapbios((vm_offset_t)rsdp, sizeof(ACPI_TABLE_RSDP)); - if (addr == 0) { - if (bootverbose) - printf("ACPI: No %s table found\n", sig); + if (addr == 0) return (0); - } - if (bootverbose) - printf("%s: Found table at 0x%jx\n", sig, (uintmax_t)addr); /* * Verify that we can map the full table and that its checksum is Modified: stable/12/sys/arm64/acpica/acpi_machdep.c ============================================================================== --- stable/12/sys/arm64/acpica/acpi_machdep.c Tue Aug 25 23:35:55 2020 (r364788) +++ stable/12/sys/arm64/acpica/acpi_machdep.c Wed Aug 26 00:28:28 2020 (r364789) @@ -103,9 +103,6 @@ probe_table(vm_paddr_t address, const char *sig) (uintmax_t)address); return (0); } - if (bootverbose) - printf("Table '%.4s' at 0x%jx\n", table->Signature, - (uintmax_t)address); if (strncmp(table->Signature, sig, ACPI_NAMESEG_SIZE) != 0) { pmap_unmapbios((vm_offset_t)table, sizeof(ACPI_TABLE_HEADER)); @@ -198,13 +195,8 @@ acpi_find_table(const char *sig) } pmap_unmapbios((vm_offset_t)rsdp, sizeof(ACPI_TABLE_RSDP)); - if (addr == 0) { - if (bootverbose) - printf("ACPI: No %s table found\n", sig); + if (addr == 0) return (0); - } - if (bootverbose) - printf("%s: Found table at 0x%jx\n", sig, (uintmax_t)addr); /* * Verify that we can map the full table and that its checksum is Modified: stable/12/sys/i386/acpica/acpi_machdep.c ============================================================================== --- stable/12/sys/i386/acpica/acpi_machdep.c Tue Aug 25 23:35:55 2020 (r364788) +++ stable/12/sys/i386/acpica/acpi_machdep.c Wed Aug 26 00:28:28 2020 (r364789) @@ -149,9 +149,6 @@ probe_table(vm_paddr_t address, const char *sig) int ret; table = pmap_mapbios(address, sizeof(ACPI_TABLE_HEADER)); - if (bootverbose) - printf("Table '%.4s' at 0x%jx\n", table->Signature, - (uintmax_t)address); ret = strncmp(table->Signature, sig, ACPI_NAMESEG_SIZE) == 0; pmap_unmapbios((vm_offset_t)table, sizeof(ACPI_TABLE_HEADER)); return (ret); @@ -257,13 +254,8 @@ acpi_find_table(const char *sig) acpi_unmap_table(rsdt); } pmap_unmapbios((vm_offset_t)rsdp, sizeof(ACPI_TABLE_RSDP)); - if (addr == 0) { - if (bootverbose) - printf("ACPI: No %s table found\n", sig); + if (addr == 0) return (0); - } - if (bootverbose) - printf("%s: Found table at 0x%jx\n", sig, (uintmax_t)addr); /* * Verify that we can map the full table and that its checksum is From owner-svn-src-all@freebsd.org Wed Aug 26 00:32:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0AD493C25C9; Wed, 26 Aug 2020 00:32:00 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbmyR6Zlnz4PMg; Wed, 26 Aug 2020 00:31:59 +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 C677CA85A; Wed, 26 Aug 2020 00:31:59 +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 07Q0VxE6069448; Wed, 26 Aug 2020 00:31:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q0VxOQ069447; Wed, 26 Aug 2020 00:31:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202008260031.07Q0VxOQ069447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 26 Aug 2020 00:31:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364790 - head/bin/date X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/bin/date X-SVN-Commit-Revision: 364790 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 00:32:00 -0000 Author: emaste Date: Wed Aug 26 00:31:59 2020 New Revision: 364790 URL: https://svnweb.freebsd.org/changeset/base/364790 Log: date.1: note possibly surprising behaviour of -j -f PR: 248918 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/bin/date/date.1 Modified: head/bin/date/date.1 ============================================================================== --- head/bin/date/date.1 Wed Aug 26 00:28:28 2020 (r364789) +++ head/bin/date/date.1 Wed Aug 26 00:31:59 2020 (r364790) @@ -32,7 +32,7 @@ .\" @(#)date.1 8.3 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd April 23, 2019 +.Dd August 25, 2020 .Dt DATE 1 .Os .Sh NAME @@ -142,6 +142,9 @@ This allows you to use the flag in addition to the .Cm + option to convert one date format to another. +Note that any date or time components unspecified by the +.Fl f +format string take their values from the current time. .It Fl n Obsolete flag, accepted and ignored for compatibility. .It Fl R From owner-svn-src-all@freebsd.org Wed Aug 26 00:43:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B69F93C38AC; Wed, 26 Aug 2020 00:43:00 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbnC84VRbz4QV4; Wed, 26 Aug 2020 00:43:00 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7DC0FAB7A; Wed, 26 Aug 2020 00:43:00 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07Q0h0aN077835; Wed, 26 Aug 2020 00:43:00 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q0h0kH077834; Wed, 26 Aug 2020 00:43:00 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <202008260043.07Q0h0kH077834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Wed, 26 Aug 2020 00:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364791 - head/usr.sbin/jail X-SVN-Group: head X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: head/usr.sbin/jail X-SVN-Commit-Revision: 364791 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 00:43:00 -0000 Author: jamie Date: Wed Aug 26 00:42:59 2020 New Revision: 364791 URL: https://svnweb.freebsd.org/changeset/base/364791 Log: Handle jail.conf variables that have the same names as parameters. PR: 248444 Submitted by: Akos Somfai Reported by: Markus Stoff Modified: head/usr.sbin/jail/config.c Modified: head/usr.sbin/jail/config.c ============================================================================== --- head/usr.sbin/jail/config.c Wed Aug 26 00:31:59 2020 (r364790) +++ head/usr.sbin/jail/config.c Wed Aug 26 00:42:59 2020 (r364791) @@ -393,7 +393,8 @@ add_param(struct cfjail *j, const struct cfparam *p, e else for (ipnum = IP__NULL + 1; ipnum < IP_NPARAM; ipnum++) if (!(intparams[ipnum].flags & PF_CONV) && - equalopts(name, intparams[ipnum].name)) { + equalopts(name, intparams[ipnum].name) && + !(p->flags & PF_VAR)) { j->intparams[ipnum] = np; np->flags |= intparams[ipnum].flags; break; From owner-svn-src-all@freebsd.org Wed Aug 26 00:50:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 72F0A3C3A65; Wed, 26 Aug 2020 00:50: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbnMm2QF4z4R12; Wed, 26 Aug 2020 00:50:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36817AD0F; Wed, 26 Aug 2020 00:50:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07Q0oSdV078313; Wed, 26 Aug 2020 00:50:28 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q0oRxg078311; Wed, 26 Aug 2020 00:50:27 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202008260050.07Q0oRxg078311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 26 Aug 2020 00:50: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: r364792 - in stable: 11/secure/caroot/blacklisted 11/secure/caroot/trusted 12/secure/caroot/blacklisted 12/secure/caroot/trusted X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/secure/caroot/blacklisted 11/secure/caroot/trusted 12/secure/caroot/blacklisted 12/secure/caroot/trusted X-SVN-Commit-Revision: 364792 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 00:50:28 -0000 Author: kevans Date: Wed Aug 26 00:50:27 2020 New Revision: 364792 URL: https://svnweb.freebsd.org/changeset/base/364792 Log: MFC r364600: caroot: switch to using echo+shell glob to enumerate certs This solves an issue on stable/12 that causes certs to not get installed. ls is apparently not in PATH during installworld, so TRUSTED_CERTS ends up blank and nothing gets installed. We don't really require anything ls-specific, though, so let's just simplify it. Modified: stable/11/secure/caroot/blacklisted/Makefile stable/11/secure/caroot/trusted/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/secure/caroot/blacklisted/Makefile stable/12/secure/caroot/trusted/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/11/secure/caroot/blacklisted/Makefile ============================================================================== --- stable/11/secure/caroot/blacklisted/Makefile Wed Aug 26 00:42:59 2020 (r364791) +++ stable/11/secure/caroot/blacklisted/Makefile Wed Aug 26 00:50:27 2020 (r364792) @@ -2,7 +2,7 @@ BINDIR= /usr/share/certs/blacklisted -BLACKLISTED_CERTS!= ls ${.CURDIR}/*.pem 2> /dev/null || true +BLACKLISTED_CERTS!= echo ${.CURDIR}/*.pem 2> /dev/null || true FILES+= ${BLACKLISTED_CERTS} Modified: stable/11/secure/caroot/trusted/Makefile ============================================================================== --- stable/11/secure/caroot/trusted/Makefile Wed Aug 26 00:42:59 2020 (r364791) +++ stable/11/secure/caroot/trusted/Makefile Wed Aug 26 00:50:27 2020 (r364792) @@ -2,7 +2,7 @@ BINDIR= /usr/share/certs/trusted -TRUSTED_CERTS!= ls ${.CURDIR}/*.pem 2> /dev/null || true +TRUSTED_CERTS!= echo ${.CURDIR}/*.pem 2> /dev/null || true FILES+= ${TRUSTED_CERTS} From owner-svn-src-all@freebsd.org Wed Aug 26 00:50:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1788D3C3C37; Wed, 26 Aug 2020 00:50:29 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbnMm5yxJz4QtH; Wed, 26 Aug 2020 00:50:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1271A8FD; Wed, 26 Aug 2020 00:50:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07Q0oS4c078320; Wed, 26 Aug 2020 00:50:28 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q0oShb078319; Wed, 26 Aug 2020 00:50:28 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202008260050.07Q0oShb078319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 26 Aug 2020 00:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364792 - in stable: 11/secure/caroot/blacklisted 11/secure/caroot/trusted 12/secure/caroot/blacklisted 12/secure/caroot/trusted X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/secure/caroot/blacklisted 11/secure/caroot/trusted 12/secure/caroot/blacklisted 12/secure/caroot/trusted X-SVN-Commit-Revision: 364792 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 00:50:29 -0000 Author: kevans Date: Wed Aug 26 00:50:27 2020 New Revision: 364792 URL: https://svnweb.freebsd.org/changeset/base/364792 Log: MFC r364600: caroot: switch to using echo+shell glob to enumerate certs This solves an issue on stable/12 that causes certs to not get installed. ls is apparently not in PATH during installworld, so TRUSTED_CERTS ends up blank and nothing gets installed. We don't really require anything ls-specific, though, so let's just simplify it. Modified: stable/12/secure/caroot/blacklisted/Makefile stable/12/secure/caroot/trusted/Makefile Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/secure/caroot/blacklisted/Makefile stable/11/secure/caroot/trusted/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/12/secure/caroot/blacklisted/Makefile ============================================================================== --- stable/12/secure/caroot/blacklisted/Makefile Wed Aug 26 00:42:59 2020 (r364791) +++ stable/12/secure/caroot/blacklisted/Makefile Wed Aug 26 00:50:27 2020 (r364792) @@ -2,7 +2,7 @@ BINDIR= /usr/share/certs/blacklisted -BLACKLISTED_CERTS!= ls ${.CURDIR}/*.pem 2> /dev/null || true +BLACKLISTED_CERTS!= echo ${.CURDIR}/*.pem 2> /dev/null || true FILES+= ${BLACKLISTED_CERTS} Modified: stable/12/secure/caroot/trusted/Makefile ============================================================================== --- stable/12/secure/caroot/trusted/Makefile Wed Aug 26 00:42:59 2020 (r364791) +++ stable/12/secure/caroot/trusted/Makefile Wed Aug 26 00:50:27 2020 (r364792) @@ -2,7 +2,7 @@ BINDIR= /usr/share/certs/trusted -TRUSTED_CERTS!= ls ${.CURDIR}/*.pem 2> /dev/null || true +TRUSTED_CERTS!= echo ${.CURDIR}/*.pem 2> /dev/null || true FILES+= ${TRUSTED_CERTS} From owner-svn-src-all@freebsd.org Wed Aug 26 01:55:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 830883C5124; Wed, 26 Aug 2020 01:55:38 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbppy2ll7z4TkC; Wed, 26 Aug 2020 01:55:38 +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 42F2BBA73; Wed, 26 Aug 2020 01:55:38 +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 07Q1tcRG021454; Wed, 26 Aug 2020 01:55:38 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q1tbkt021452; Wed, 26 Aug 2020 01:55:37 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202008260155.07Q1tbkt021452@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 26 Aug 2020 01:55: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: r364793 - in stable/11/secure/caroot: blacklisted trusted X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/secure/caroot: blacklisted trusted X-SVN-Commit-Revision: 364793 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 01:55:38 -0000 Author: kevans Date: Wed Aug 26 01:55:37 2020 New Revision: 364793 URL: https://svnweb.freebsd.org/changeset/base/364793 Log: Partial revert of r364792: caroot: switch to using echo+shell glob On stable/11, I mistakenly only tested installation of trusted certs. When the dir is empty, the glob remains unexpanded when it gets added to FILES. On stable/11 (but not 12 or head), this ends up being erroneous; it kind of looks like the glob is being expanded to a single-word empty string rather than leaving us with an empty FILES. Regardless, this isn't worth fixing on stable/11, so back it out. Modified: stable/11/secure/caroot/blacklisted/Makefile stable/11/secure/caroot/trusted/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/secure/caroot/blacklisted/Makefile ============================================================================== --- stable/11/secure/caroot/blacklisted/Makefile Wed Aug 26 00:50:27 2020 (r364792) +++ stable/11/secure/caroot/blacklisted/Makefile Wed Aug 26 01:55:37 2020 (r364793) @@ -2,7 +2,7 @@ BINDIR= /usr/share/certs/blacklisted -BLACKLISTED_CERTS!= echo ${.CURDIR}/*.pem 2> /dev/null || true +BLACKLISTED_CERTS!= ls ${.CURDIR}/*.pem 2> /dev/null || true FILES+= ${BLACKLISTED_CERTS} Modified: stable/11/secure/caroot/trusted/Makefile ============================================================================== --- stable/11/secure/caroot/trusted/Makefile Wed Aug 26 00:50:27 2020 (r364792) +++ stable/11/secure/caroot/trusted/Makefile Wed Aug 26 01:55:37 2020 (r364793) @@ -2,7 +2,7 @@ BINDIR= /usr/share/certs/trusted -TRUSTED_CERTS!= echo ${.CURDIR}/*.pem 2> /dev/null || true +TRUSTED_CERTS!= ls ${.CURDIR}/*.pem 2> /dev/null || true FILES+= ${TRUSTED_CERTS} From owner-svn-src-all@freebsd.org Wed Aug 26 02:04:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C9603C51C5; Wed, 26 Aug 2020 02:04:05 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbq0h6X4Hz4VLX; Wed, 26 Aug 2020 02:04:04 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3440BB25; Wed, 26 Aug 2020 02:04:04 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07Q24460027526; Wed, 26 Aug 2020 02:04:04 GMT (envelope-from scottph@FreeBSD.org) Received: (from scottph@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q244dt027525; Wed, 26 Aug 2020 02:04:04 GMT (envelope-from scottph@FreeBSD.org) Message-Id: <202008260204.07Q244dt027525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottph set sender to scottph@FreeBSD.org using -f From: D Scott Phillips Date: Wed, 26 Aug 2020 02:04:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364794 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: scottph X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 364794 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 02:04:05 -0000 Author: scottph Date: Wed Aug 26 02:04:04 2020 New Revision: 364794 URL: https://svnweb.freebsd.org/changeset/base/364794 Log: arm64: Make local stores observable before sending IPIs Add a synchronizing instruction to flush and wait until the local CPU's writes are observable to other CPUs before sending IPIs. This fixes an issue where recipient CPUs doing a rendezvous could enter the rendezvous handling code before the initiator's writes to the smp_rv_* variables were visible. This manifested as a system hang, where a single CPU's increment of smp_rv_waiters[0] actually happened "before" the initiator's zeroing of that field, so all CPUs were stuck with the field appearing to be at ncpus - 1. Reviewed by: andrew, markj Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D25798 Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Wed Aug 26 01:55:37 2020 (r364793) +++ head/sys/arm64/arm64/mp_machdep.c Wed Aug 26 02:04:04 2020 (r364794) @@ -304,6 +304,13 @@ pic_ipi_send(void *arg, cpuset_t cpus, u_int ipi) { KASSERT(intr_irq_root_dev != NULL, ("%s: no root attached", __func__)); + + /* + * Ensure that this CPU's stores will be visible to IPI + * recipients before starting to send the interrupts. + */ + dsb(ishst); + PIC_IPI_SEND(intr_irq_root_dev, arg, cpus, ipi); } From owner-svn-src-all@freebsd.org Wed Aug 26 02:05:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39D653C5539; Wed, 26 Aug 2020 02:05:59 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbq2v0pq7z4VNB; Wed, 26 Aug 2020 02:05:59 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 003B4BD95; Wed, 26 Aug 2020 02:05:59 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07Q25wTQ027680; Wed, 26 Aug 2020 02:05:58 GMT (envelope-from scottph@FreeBSD.org) Received: (from scottph@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q25wFp027678; Wed, 26 Aug 2020 02:05:58 GMT (envelope-from scottph@FreeBSD.org) Message-Id: <202008260205.07Q25wFp027678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottph set sender to scottph@FreeBSD.org using -f From: D Scott Phillips Date: Wed, 26 Aug 2020 02:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364795 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: scottph X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 364795 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 02:05:59 -0000 Author: scottph Date: Wed Aug 26 02:05:58 2020 New Revision: 364795 URL: https://svnweb.freebsd.org/changeset/base/364795 Log: efibootmgr: Add option to request booting to the firmware user interface The OsIndications UEFI variable can request the firware to stop at its UI instead of continuing with boot. Add flags for setting and clearing this request. Reviewed by: manu, bcr (manpages) Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D25839 Modified: head/usr.sbin/efibootmgr/efibootmgr.8 head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.8 ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.8 Wed Aug 26 02:04:04 2020 (r364794) +++ head/usr.sbin/efibootmgr/efibootmgr.8 Wed Aug 26 02:05:58 2020 (r364795) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 23, 2020 +.Dd August 25, 2020 .Dt EFIBOOTMGR 8 .Os .Sh NAME @@ -55,6 +55,10 @@ .Op Fl d .Op Fl p .Nm +.Fl F +.Nm +.Fl f +.Nm .Fl n .Fl b Ar bootnum .Nm @@ -137,6 +141,9 @@ is specified, the UEFI device path to the ESP is repor If .Fl p -unix-path is specified, the mount point of the ESP is reported instead. +.It Fl f -fw-ui , Fl F -no-fw-ui +Set or clear the request to the system firmware to stop in its user +interface on the next boot. .It Fl k -kernel Ar kernel The path to and name of the kernel. .It Fl l -loader Ar loader Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Wed Aug 26 02:04:04 2020 (r364794) +++ head/usr.sbin/efibootmgr/efibootmgr.c Wed Aug 26 02:05:58 2020 (r364795) @@ -67,6 +67,8 @@ __FBSDID("$FreeBSD$"); #define BAD_LENGTH ((size_t)-1) +#define EFI_OS_INDICATIONS_BOOT_TO_FW_UI 0x0000000000000001 + typedef struct _bmgr_opts { char *env; char *loader; @@ -83,6 +85,8 @@ typedef struct _bmgr_opts { bool dry_run; bool device_path; bool esp_device; + bool fw_ui; + bool no_fw_ui; bool has_bootnum; bool once; int cp_src; @@ -110,6 +114,8 @@ static struct option lopts[] = { {"dry-run", no_argument, NULL, 'D'}, {"env", required_argument, NULL, 'e'}, {"esp", no_argument, NULL, 'E'}, + {"fw-ui", no_argument, NULL, 'f'}, + {"no-fw-ui", no_argument, NULL, 'F'}, {"help", no_argument, NULL, 'h'}, {"kernel", required_argument, NULL, 'k'}, {"label", required_argument, NULL, 'L'}, @@ -197,7 +203,7 @@ parse_args(int argc, char *argv[]) { int ch; - while ((ch = getopt_long(argc, argv, "AaBb:C:cdDe:Ehk:L:l:NnOo:pTt:v", + while ((ch = getopt_long(argc, argv, "AaBb:C:cdDe:EFfhk:L:l:NnOo:pTt:v", lopts, NULL)) != -1) { switch (ch) { case 'A': @@ -232,6 +238,12 @@ parse_args(int argc, char *argv[]) case 'E': opts.esp_device = true; break; + case 'F': + opts.no_fw_ui = true; + break; + case 'f': + opts.fw_ui = true; + break; case 'h': default: errx(1, "%s", USAGE); @@ -825,6 +837,45 @@ print_boot_var(const char *name, bool verbose, bool cu } +static bool +os_indication_supported(uint64_t indication) +{ + uint8_t *data; + size_t size; + uint32_t attrs; + int ret; + + ret = efi_get_variable(EFI_GLOBAL_GUID, "OsIndicationsSupported", &data, + &size, &attrs); + if (ret < 0) + return false; + return (le64dec(data) & indication) == indication; +} + +static uint64_t +os_indications(void) +{ + uint8_t *data; + size_t size; + uint32_t attrs; + int ret; + + ret = efi_get_variable(EFI_GLOBAL_GUID, "OsIndications", &data, &size, + &attrs); + if (ret < 0) + return 0; + return le64dec(data); +} + +static int +os_indications_set(uint64_t mask, uint64_t val) +{ + uint8_t new[sizeof(uint64_t)]; + + le64enc(&new, (os_indications() & ~mask) | (val & mask)); + return set_bootvar("OsIndications", new, sizeof(new)); +} + /* Cmd epilogue, or just the default with no args. * The order is [bootnext] bootcurrent, timeout, order, and the bootvars [-v] */ @@ -841,7 +892,15 @@ print_boot_vars(bool verbose) uint32_t attrs; int ret, bolen; uint16_t *boot_order = NULL, current; + bool boot_to_fw_ui; + if (os_indication_supported(EFI_OS_INDICATIONS_BOOT_TO_FW_UI)) { + boot_to_fw_ui = + (os_indications() & EFI_OS_INDICATIONS_BOOT_TO_FW_UI) != 0; + printf("Boot to FW : %s\n", boot_to_fw_ui != 0 ? + "true" : "false"); + } + ret = efi_get_variable(EFI_GLOBAL_GUID, "BootNext", &data, &size, &attrs); if (ret > 0) { printf("BootNext : %04x\n", le16dec(data)); @@ -987,6 +1046,23 @@ report_esp_device(bool do_dp, bool do_unix) exit(0); } +static void +set_boot_to_fw_ui(bool to_fw) +{ + int ret; + + if (!os_indication_supported(EFI_OS_INDICATIONS_BOOT_TO_FW_UI)) { + if (to_fw) + errx(1, "boot to fw ui not supported"); + else + return; + } + ret = os_indications_set(EFI_OS_INDICATIONS_BOOT_TO_FW_UI, + to_fw ? ~0 : 0); + if (ret < 0) + errx(1, "failed to set boot to fw ui"); +} + int main(int argc, char *argv[]) { @@ -1021,6 +1097,10 @@ main(int argc, char *argv[]) handle_timeout(opts.timeout); else if (opts.esp_device) report_esp_device(opts.device_path, opts.unix_path); + else if (opts.fw_ui) + set_boot_to_fw_ui(true); + else if (opts.no_fw_ui) + set_boot_to_fw_ui(false); print_boot_vars(opts.verbose); } From owner-svn-src-all@freebsd.org Wed Aug 26 02:07:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0EE4A3C5C94; Wed, 26 Aug 2020 02:07:48 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbq4z546Sz4W2v; Wed, 26 Aug 2020 02:07:47 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91A95BD9A; Wed, 26 Aug 2020 02:07:47 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07Q27lvX027823; Wed, 26 Aug 2020 02:07:47 GMT (envelope-from scottph@FreeBSD.org) Received: (from scottph@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q27lDH027822; Wed, 26 Aug 2020 02:07:47 GMT (envelope-from scottph@FreeBSD.org) Message-Id: <202008260207.07Q27lDH027822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottph set sender to scottph@FreeBSD.org using -f From: D Scott Phillips Date: Wed, 26 Aug 2020 02:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364796 - in head: share/man/man9 sys/sys X-SVN-Group: head X-SVN-Commit-Author: scottph X-SVN-Commit-Paths: in head: share/man/man9 sys/sys X-SVN-Commit-Revision: 364796 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 02:07:48 -0000 Author: scottph Date: Wed Aug 26 02:07:46 2020 New Revision: 364796 URL: https://svnweb.freebsd.org/changeset/base/364796 Log: bitset: add BIT_FFS_AT() for finding the first bit set greater than a start bit Reviewed by: kib Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26128 Modified: head/share/man/man9/bitset.9 head/sys/sys/bitset.h Modified: head/share/man/man9/bitset.9 ============================================================================== --- head/share/man/man9/bitset.9 Wed Aug 26 02:05:58 2020 (r364795) +++ head/share/man/man9/bitset.9 Wed Aug 26 02:07:46 2020 (r364796) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2019 +.Dd August 25, 2020 .Dt BITSET 9 .Os .Sh NAME @@ -43,6 +43,7 @@ .Nm BIT_EMPTY , .Nm BIT_ISFULLSET , .Nm BIT_FFS , +.Nm BIT_FFS_AT , .Nm BIT_FLS , .Nm BIT_COUNT , .Nm BIT_SUBSET , @@ -86,6 +87,8 @@ .Ft int .Fn BIT_FFS "const SETSIZE" "struct STRUCTNAME *bitset" .Ft int +.Fn BIT_FFS_AT "const SETSIZE" "struct STRUCTNAME *bitset" "int start" +.Ft int .Fn BIT_FLS "const SETSIZE" "struct STRUCTNAME *bitset" .Ft int .Fn BIT_COUNT "const SETSIZE" "struct STRUCTNAME *bitset" @@ -285,6 +288,18 @@ index parameter to any other macro, you must subtract one from the result. .Pp The +.Fn BIT_FFS_AT +macro returns the 1-index of the first (lowest) set bit in +.Fa bitset , +which is greater than the given 1-indexed +.Fa start , +or zero if no bits in +.Fa bitset +greater than +.Fa start +are set. +.Pp +The .Fn BIT_FLS macro returns the 1-index of the last (highest) set bit in .Fa bitset , @@ -518,7 +533,8 @@ argument to all of these macros must match the value g .Fn BITSET_DEFINE . .Pp Unlike every other reference to individual set members, which are zero-indexed, -.Fn BIT_FFS +.Fn BIT_FFS , +.Fn BIT_FFS_AT and .Fn BIT_FLS return a one-indexed result (or zero if the set is empty). Modified: head/sys/sys/bitset.h ============================================================================== --- head/sys/sys/bitset.h Wed Aug 26 02:05:58 2020 (r364795) +++ head/sys/sys/bitset.h Wed Aug 26 02:07:46 2020 (r364796) @@ -207,20 +207,31 @@ (f)->__bits[__i]); \ } while (0) -#define BIT_FFS(_s, p) __extension__ ({ \ +/* + * Note that `start` and the returned value from BIT_FFS_AT are + * 1-based bit indices. + */ +#define BIT_FFS_AT(_s, p, start) __extension__ ({ \ __size_t __i; \ + long __mask; \ int __bit; \ \ + __mask = ~0UL << ((start) % _BITSET_BITS); \ __bit = 0; \ - for (__i = 0; __i < __bitset_words((_s)); __i++) { \ - if ((p)->__bits[__i] != 0) { \ - __bit = ffsl((p)->__bits[__i]); \ + for (__i = __bitset_word((_s), (start)); \ + __i < __bitset_words((_s)); \ + __i++) { \ + if (((p)->__bits[__i] & __mask) != 0) { \ + __bit = ffsl((p)->__bits[__i] & __mask); \ __bit += __i * _BITSET_BITS; \ break; \ } \ + __mask = ~0UL; \ } \ __bit; \ }) + +#define BIT_FFS(_s, p) BIT_FFS_AT((_s), (p), 0) #define BIT_FLS(_s, p) __extension__ ({ \ __size_t __i; \ From owner-svn-src-all@freebsd.org Wed Aug 26 02:12:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A10653C5DF3; Wed, 26 Aug 2020 02:12:16 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbqB83p3qz4WHG; Wed, 26 Aug 2020 02:12:16 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 65AFABF06; Wed, 26 Aug 2020 02:12:16 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07Q2CGBY032696; Wed, 26 Aug 2020 02:12:16 GMT (envelope-from scottph@FreeBSD.org) Received: (from scottph@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q2CFTo032694; Wed, 26 Aug 2020 02:12:15 GMT (envelope-from scottph@FreeBSD.org) Message-Id: <202008260212.07Q2CFTo032694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottph set sender to scottph@FreeBSD.org using -f From: D Scott Phillips Date: Wed, 26 Aug 2020 02:12:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364797 - in head/sys/arm64: acpica arm64 X-SVN-Group: head X-SVN-Commit-Author: scottph X-SVN-Commit-Paths: in head/sys/arm64: acpica arm64 X-SVN-Commit-Revision: 364797 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 02:12:16 -0000 Author: scottph Date: Wed Aug 26 02:12:15 2020 New Revision: 364797 URL: https://svnweb.freebsd.org/changeset/base/364797 Log: arm64/acpi: Give the real PA limit to ACPI Read PA bits from ID_AA64MMFR0_EL1.PARange. Reviewed by: andrew, markj Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26133 Modified: head/sys/arm64/acpica/acpi_machdep.c head/sys/arm64/arm64/identcpu.c Modified: head/sys/arm64/acpica/acpi_machdep.c ============================================================================== --- head/sys/arm64/acpica/acpi_machdep.c Wed Aug 26 02:07:46 2020 (r364796) +++ head/sys/arm64/acpica/acpi_machdep.c Wed Aug 26 02:12:15 2020 (r364797) @@ -232,12 +232,47 @@ acpi_map_addr(struct acpi_generic_address *addr, bus_s static void parse_pxm_tables(void *dummy) { + uint64_t mmfr0, parange; /* Only parse ACPI tables when booting via ACPI */ if (arm64_bus_method != ARM64_BUS_ACPI) return; - acpi_pxm_init(MAXCPU, (vm_paddr_t)1 << 40); + if (!get_kernel_reg(ID_AA64MMFR0_EL1, &mmfr0)) { + /* chosen arbitrarily */ + mmfr0 = ID_AA64MMFR0_PARange_1T; + } + + switch (ID_AA64MMFR0_PARange_VAL(mmfr0)) { + case ID_AA64MMFR0_PARange_4G: + parange = (vm_paddr_t)4 << 30 /* GiB */; + break; + case ID_AA64MMFR0_PARange_64G: + parange = (vm_paddr_t)64 << 30 /* GiB */; + break; + case ID_AA64MMFR0_PARange_1T: + parange = (vm_paddr_t)1 << 40 /* TiB */; + break; + case ID_AA64MMFR0_PARange_4T: + parange = (vm_paddr_t)4 << 40 /* TiB */; + break; + case ID_AA64MMFR0_PARange_16T: + parange = (vm_paddr_t)16 << 40 /* TiB */; + break; + case ID_AA64MMFR0_PARange_256T: + parange = (vm_paddr_t)256 << 40 /* TiB */; + break; + case ID_AA64MMFR0_PARange_4P: + parange = (vm_paddr_t)4 << 50 /* PiB */; + break; + default: + /* chosen arbitrarily */ + parange = (vm_paddr_t)1 << 40 /* TiB */; + printf("Unknown value for PARange in mmfr0 (%#lx)\n", mmfr0); + break; + } + + acpi_pxm_init(MAXCPU, parange); acpi_pxm_parse_tables(); acpi_pxm_set_mem_locality(); } Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Wed Aug 26 02:07:46 2020 (r364796) +++ head/sys/arm64/arm64/identcpu.c Wed Aug 26 02:12:15 2020 (r364797) @@ -916,6 +916,13 @@ static struct mrs_user_reg user_regs[] = { .offset = __offsetof(struct cpu_desc, id_aa64dfr0), .fields = id_aa64dfr0_fields, }, + { /* id_aa64mmfr0_el1 */ + .reg = ID_AA64MMFR0_EL1, + .CRm = 7, + .Op2 = 0, + .offset = __offsetof(struct cpu_desc, id_aa64mmfr0), + .fields = id_aa64mmfr0_fields, + }, }; #define CPU_DESC_FIELD(desc, idx) \ From owner-svn-src-all@freebsd.org Wed Aug 26 02:13:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CFFB63C6205; Wed, 26 Aug 2020 02:13:27 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbqCW585pz4Wch; Wed, 26 Aug 2020 02:13:27 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93DFEB958; Wed, 26 Aug 2020 02:13:27 +0000 (UTC) (envelope-from scottph@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07Q2DR5U033521; Wed, 26 Aug 2020 02:13:27 GMT (envelope-from scottph@FreeBSD.org) Received: (from scottph@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q2DRZH033520; Wed, 26 Aug 2020 02:13:27 GMT (envelope-from scottph@FreeBSD.org) Message-Id: <202008260213.07Q2DRZH033520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottph set sender to scottph@FreeBSD.org using -f From: D Scott Phillips Date: Wed, 26 Aug 2020 02:13:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364798 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: scottph X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 364798 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 02:13:27 -0000 Author: scottph Date: Wed Aug 26 02:13:27 2020 New Revision: 364798 URL: https://svnweb.freebsd.org/changeset/base/364798 Log: arm64: Increase dmap size to 95 TiB The Ampere Altra has physical memory populated sparsely within the physical address space. Increase the size of the dmap to cover all physical memory. Reviewed by: andrew Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26134 Modified: head/sys/arm64/include/vmparam.h Modified: head/sys/arm64/include/vmparam.h ============================================================================== --- head/sys/arm64/include/vmparam.h Wed Aug 26 02:12:15 2020 (r364797) +++ head/sys/arm64/include/vmparam.h Wed Aug 26 02:13:27 2020 (r364798) @@ -156,8 +156,8 @@ #define VM_MIN_KERNEL_ADDRESS (0xffff000000000000UL) #define VM_MAX_KERNEL_ADDRESS (0xffff008000000000UL) -/* 2 TiB maximum for the direct map region */ -#define DMAP_MIN_ADDRESS (0xfffffd0000000000UL) +/* 95 TiB maximum for the direct map region */ +#define DMAP_MIN_ADDRESS (0xffffa00000000000UL) #define DMAP_MAX_ADDRESS (0xffffff0000000000UL) #define DMAP_MIN_PHYSADDR (dmap_phys_base) From owner-svn-src-all@freebsd.org Wed Aug 26 02:37:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 543113C64CA; Wed, 26 Aug 2020 02:37:45 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbqlY1tZ9z4X8X; Wed, 26 Aug 2020 02:37:45 +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 23C43C22A; Wed, 26 Aug 2020 02:37:45 +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 07Q2bjqj045998; Wed, 26 Aug 2020 02:37:45 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q2bhwF045988; Wed, 26 Aug 2020 02:37:43 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202008260237.07Q2bhwF045988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 26 Aug 2020 02:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto X-SVN-Commit-Revision: 364799 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 02:37:45 -0000 Author: asomers Date: Wed Aug 26 02:37:42 2020 New Revision: 364799 URL: https://svnweb.freebsd.org/changeset/base/364799 Log: crypto(9): add CRYPTO_BUF_VMPAGE crypto(9) functions can now be used on buffers composed of an array of vm_page_t structures, such as those stored in an unmapped struct bio. It requires the running to kernel to support the direct memory map, so not all architectures can use it. Reviewed by: markj, kib, jhb, mjg, mat, bcr (manpages) MFC after: 1 week Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D25671 Modified: head/share/man/man9/crypto_buffer.9 head/share/man/man9/crypto_request.9 head/sys/crypto/ccp/ccp.c head/sys/dev/cxgbe/crypto/t4_crypto.c head/sys/dev/sec/sec.c head/sys/kern/subr_bus_dma.c head/sys/opencrypto/criov.c head/sys/opencrypto/crypto.c head/sys/opencrypto/cryptodev.h head/sys/opencrypto/cryptosoft.c Modified: head/share/man/man9/crypto_buffer.9 ============================================================================== --- head/share/man/man9/crypto_buffer.9 Wed Aug 26 02:13:27 2020 (r364798) +++ head/share/man/man9/crypto_buffer.9 Wed Aug 26 02:37:42 2020 (r364799) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 25, 2020 +.Dd August 12, 2020 .Dt CRYPTO_BUFFER 9 .Os .Sh NAME @@ -197,10 +197,17 @@ A scatter/gather list of kernel buffers as described i .It Dv CRYPTO_BUF_MBUF A network memory buffer as described in .Xr mbuf 9 . +.It Dv CRYPTO_BUF_VMPAGE +A scatter/gather list of +.Vt vm_page_t +structures describing pages in the kernel's address space. +This buffer type is only available if +.Dv CRYPTO_HAS_VMPAGE +is true. .El .Pp The structure also contains the following type-specific fields: -.Bl -tag -width " cb_buf_len" +.Bl -tag -width " cb_vm_page_offset" .It Fa cb_buf A pointer to the start of a .Dv CRYPTO_BUF_CONTIG @@ -219,6 +226,19 @@ A pointer to a .Vt struct uio for .Dv CRYPTO_BUF_UIO . +.It Fa cb_vm_page +A pointer to an array of +.Vt struct vm_page +for +.Dv CRYPTO_BUF_VMPAGE . +.It Fa cb_vm_page_len +The total amount of data included in the +.Fa cb_vm_page +array, in bytes. +.It Fa cb_vm_page_offset +Offset in bytes in the first page of +.Fa cb_vm_page +where valid data begins. .El .Ss Cursors Cursors provide a mechanism for iterating over a data buffer. Modified: head/share/man/man9/crypto_request.9 ============================================================================== --- head/share/man/man9/crypto_request.9 Wed Aug 26 02:13:27 2020 (r364798) +++ head/share/man/man9/crypto_request.9 Wed Aug 26 02:37:42 2020 (r364799) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2020 +.Dd August 12, 2020 .Dt CRYPTO_REQUEST 9 .Os .Sh NAME @@ -55,11 +55,15 @@ .Ft void .Fn crypto_use_uio "struct cryptop *crp" "struct uio *uio" .Ft void +.Fn crypto_use_vmpage "struct cryptop *crp" "vm_page_t *pages" "int len" "int offset" +.Ft void .Fn crypto_use_output_buf "struct cryptop *crp" "void *buf" "int len" .Ft void .Fn crypto_use_output_mbuf "struct cryptop *crp" "struct mbuf *m" .Ft void .Fn crypto_use_output_uio "struct cryptop *crp" "struct uio *uio" +.Ft void +.Fn crypto_use_output_vmpage "struct cryptop *crp" "vm_page_t *pages" "int len" "int offset" .Sh DESCRIPTION Each symmetric cryptographic operation in the kernel is described by an instance of @@ -141,7 +145,7 @@ mode requests. All requests must have a valid .Fa crp_buf initialized by one of the following functions: -.Bl -tag -width "Fn crypto_use_mbuf" +.Bl -tag -width "Fn crypto_use_vmpage" .It Fn crypto_use_buf Uses an array of .Fa len @@ -156,12 +160,16 @@ as the data buffer. Uses the scatter/gather list .Fa uio as the data buffer. +.It Fn crypto_use_vmpage +Uses the array of +.Vt vm_page_t +structures as the data buffer. .El .Pp One of the following functions should be used to initialize .Fa crp_obuf for requests that use separate input and output buffers: -.Bl -tag -width "Fn crypto_use_output_mbuf" +.Bl -tag -width "Fn crypto_use_output_vmpage" .It Fn crypto_use_output_buf Uses an array of .Fa len @@ -176,6 +184,10 @@ as the output buffer. Uses the scatter/gather list .Fa uio as the output buffer. +.It Fn crypto_use_output_vmpage +Uses the array of +.Vt vm_page_t +structures as the output buffer. .El .Ss Request Regions Each request describes one or more regions in the data buffers. Modified: head/sys/crypto/ccp/ccp.c ============================================================================== --- head/sys/crypto/ccp/ccp.c Wed Aug 26 02:13:27 2020 (r364798) +++ head/sys/crypto/ccp/ccp.c Wed Aug 26 02:37:42 2020 (r364799) @@ -107,6 +107,10 @@ ccp_populate_sglist(struct sglist *sg, struct crypto_b case CRYPTO_BUF_CONTIG: error = sglist_append(sg, cb->cb_buf, cb->cb_buf_len); break; + case CRYPTO_BUF_VMPAGE: + error = sglist_append_vmpages(sg, cb->cb_vm_page, + cb->cb_vm_page_len, cb->cb_vm_page_offset); + break; default: error = EINVAL; } Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c ============================================================================== --- head/sys/dev/cxgbe/crypto/t4_crypto.c Wed Aug 26 02:13:27 2020 (r364798) +++ head/sys/dev/cxgbe/crypto/t4_crypto.c Wed Aug 26 02:37:42 2020 (r364799) @@ -272,6 +272,10 @@ ccr_populate_sglist(struct sglist *sg, struct crypto_b case CRYPTO_BUF_CONTIG: error = sglist_append(sg, cb->cb_buf, cb->cb_buf_len); break; + case CRYPTO_BUF_VMPAGE: + error = sglist_append_vmpages(sg, cb->cb_vm_page, + cb->cb_vm_page_len, cb->cb_vm_page_offset); + break; default: error = EINVAL; } Modified: head/sys/dev/sec/sec.c ============================================================================== --- head/sys/dev/sec/sec.c Wed Aug 26 02:13:27 2020 (r364798) +++ head/sys/dev/sec/sec.c Wed Aug 26 02:37:42 2020 (r364799) @@ -851,6 +851,9 @@ sec_desc_map_dma(struct sec_softc *sc, struct sec_dma_ case CRYPTO_BUF_MBUF: size = m_length(crp->crp_buf.cb_mbuf, NULL); break; + case CRYPTO_BUF_VMPAGE: + size = PAGE_SIZE - cb->cb_vm_page_offset; + break; default: return (EINVAL); } Modified: head/sys/kern/subr_bus_dma.c ============================================================================== --- head/sys/kern/subr_bus_dma.c Wed Aug 26 02:13:27 2020 (r364798) +++ head/sys/kern/subr_bus_dma.c Wed Aug 26 02:37:42 2020 (r364799) @@ -661,6 +661,11 @@ bus_dmamap_load_crp_buffer(bus_dma_tag_t dmat, bus_dma error = _bus_dmamap_load_uio(dmat, map, cb->cb_uio, &nsegs, flags); break; + case CRYPTO_BUF_VMPAGE: + error = _bus_dmamap_load_ma(dmat, map, cb->cb_vm_page, + cb->cb_vm_page_len, cb->cb_vm_page_offset, flags, NULL, + &nsegs); + break; default: error = EINVAL; } Modified: head/sys/opencrypto/criov.c ============================================================================== --- head/sys/opencrypto/criov.c Wed Aug 26 02:13:27 2020 (r364798) +++ head/sys/opencrypto/criov.c Wed Aug 26 02:37:42 2020 (r364799) @@ -40,12 +40,21 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include + +#include +#include +#include + #include +SDT_PROVIDER_DECLARE(opencrypto); + /* - * This macro is only for avoiding code duplication, as we need to skip - * given number of bytes in the same way in three functions below. + * These macros are only for avoiding code duplication, as we need to skip + * given number of bytes in the same way in several functions below. */ #define CUIO_SKIP() do { \ KASSERT(off >= 0, ("%s: off %d < 0", __func__, off)); \ @@ -60,6 +69,18 @@ __FBSDID("$FreeBSD$"); } \ } while (0) +#define CVM_PAGE_SKIP() do { \ + KASSERT(off >= 0, ("%s: off %d < 0", __func__, off)); \ + KASSERT(len >= 0, ("%s: len %d < 0", __func__, len)); \ + while (off > 0) { \ + if (off < PAGE_SIZE) \ + break; \ + processed += PAGE_SIZE - off; \ + off -= PAGE_SIZE - off; \ + pages++; \ + } \ +} while (0) + static void cuio_copydata(struct uio* uio, int off, int len, caddr_t cp) { @@ -128,6 +149,96 @@ cuio_getptr(struct uio *uio, int loc, int *off) return (-1); } +#if CRYPTO_MAY_HAVE_VMPAGE +/* + * Apply function f to the data in a vm_page_t list starting "off" bytes from + * the beginning, continuing for "len" bytes. + */ +static int +cvm_page_apply(vm_page_t *pages, int off, int len, + int (*f)(void *, const void *, u_int), void *arg) +{ + int processed = 0; + unsigned count; + int rval; + + CVM_PAGE_SKIP(); + while (len > 0) { + char *kaddr = (char *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(*pages)); + count = min(PAGE_SIZE - off, len); + rval = (*f)(arg, kaddr + off, count); + if (rval) + return (rval); + len -= count; + processed += count; + off = 0; + pages++; + } + return (0); +} + +static inline void * +cvm_page_contiguous_segment(vm_page_t *pages, size_t skip, int len) +{ + if ((skip + len - 1) / PAGE_SIZE > skip / PAGE_SIZE) + return (NULL); + + pages += (skip / PAGE_SIZE); + skip -= rounddown(skip, PAGE_SIZE); + return (((char *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(*pages))) + skip); +} + +/* + * Copy len bytes of data from the vm_page_t array, skipping the first off + * bytes, into the pointer cp. Return the number of bytes skipped and copied. + * Does not verify the length of the array. + */ +static int +cvm_page_copyback(vm_page_t *pages, int off, int len, c_caddr_t cp) +{ + int processed = 0; + unsigned count; + + CVM_PAGE_SKIP(); + while (len > 0) { + count = min(PAGE_SIZE - off, len); + bcopy(cp, (char *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(*pages)) + off, + count); + len -= count; + cp += count; + processed += count; + off = 0; + pages++; + } + return (processed); +} + +/* + * Copy len bytes of data from the pointer cp into the vm_page_t array, + * skipping the first off bytes, Return the number of bytes skipped and copied. + * Does not verify the length of the array. + */ +static int +cvm_page_copydata(vm_page_t *pages, int off, int len, caddr_t cp) +{ + int processed = 0; + unsigned count; + + CVM_PAGE_SKIP(); + while (len > 0) { + count = min(PAGE_SIZE - off, len); + bcopy(((char *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(*pages)) + off), cp, + count); + len -= count; + cp += count; + processed += count; + off = 0; + pages++; + } + return processed; +} +#endif /* CRYPTO_MAY_HAVE_VMPAGE */ + void crypto_cursor_init(struct crypto_buffer_cursor *cc, const struct crypto_buffer *cb) @@ -142,6 +253,11 @@ crypto_cursor_init(struct crypto_buffer_cursor *cc, case CRYPTO_BUF_MBUF: cc->cc_mbuf = cb->cb_mbuf; break; + case CRYPTO_BUF_VMPAGE: + cc->cc_vmpage = cb->cb_vm_page; + cc->cc_buf_len = cb->cb_vm_page_len; + cc->cc_offset = cb->cb_vm_page_offset; + break; case CRYPTO_BUF_UIO: cc->cc_iov = cb->cb_uio->uio_iov; break; @@ -153,6 +269,8 @@ crypto_cursor_init(struct crypto_buffer_cursor *cc, } } +SDT_PROBE_DEFINE2(opencrypto, criov, cursor_advance, vmpage, "struct crypto_buffer_cursor*", "size_t"); + void crypto_cursor_advance(struct crypto_buffer_cursor *cc, size_t amount) { @@ -178,6 +296,24 @@ crypto_cursor_advance(struct crypto_buffer_cursor *cc, break; } break; + case CRYPTO_BUF_VMPAGE: + for (;;) { + SDT_PROBE2(opencrypto, criov, cursor_advance, vmpage, + cc, amount); + remain = MIN(PAGE_SIZE - cc->cc_offset, cc->cc_buf_len); + if (amount < remain) { + cc->cc_buf_len -= amount; + cc->cc_offset += amount; + break; + } + cc->cc_buf_len -= remain; + amount -= remain; + cc->cc_vmpage++; + cc->cc_offset = 0; + if (amount == 0 || cc->cc_buf_len == 0) + break; + } + break; case CRYPTO_BUF_UIO: for (;;) { remain = cc->cc_iov->iov_len - cc->cc_offset; @@ -212,6 +348,9 @@ crypto_cursor_segbase(struct crypto_buffer_cursor *cc) KASSERT((cc->cc_mbuf->m_flags & M_EXTPG) == 0, ("%s: not supported for unmapped mbufs", __func__)); return (mtod(cc->cc_mbuf, char *) + cc->cc_offset); + case CRYPTO_BUF_VMPAGE: + return ((char *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS( + *cc->cc_vmpage)) + cc->cc_offset); case CRYPTO_BUF_UIO: return ((char *)cc->cc_iov->iov_base + cc->cc_offset); default: @@ -228,6 +367,8 @@ crypto_cursor_seglen(struct crypto_buffer_cursor *cc) switch (cc->cc_type) { case CRYPTO_BUF_CONTIG: return (cc->cc_buf_len); + case CRYPTO_BUF_VMPAGE: + return (PAGE_SIZE - cc->cc_offset); case CRYPTO_BUF_MBUF: if (cc->cc_mbuf == NULL) return (0); @@ -278,6 +419,26 @@ crypto_cursor_copyback(struct crypto_buffer_cursor *cc break; } break; + case CRYPTO_BUF_VMPAGE: + for (;;) { + dst = (char *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS( + *cc->cc_vmpage)) + cc->cc_offset; + remain = MIN(PAGE_SIZE - cc->cc_offset, cc->cc_buf_len); + todo = MIN(remain, size); + memcpy(dst, src, todo); + src += todo; + cc->cc_buf_len -= todo; + if (todo < remain) { + cc->cc_offset += todo; + break; + } + size -= todo; + cc->cc_vmpage++; + cc->cc_offset = 0; + if (size == 0) + break; + } + break; case CRYPTO_BUF_UIO: for (;;) { dst = (char *)cc->cc_iov->iov_base + cc->cc_offset; @@ -339,6 +500,26 @@ crypto_cursor_copydata(struct crypto_buffer_cursor *cc break; } break; + case CRYPTO_BUF_VMPAGE: + for (;;) { + src = (char *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS( + *cc->cc_vmpage)) + cc->cc_offset; + remain = MIN(PAGE_SIZE - cc->cc_offset, cc->cc_buf_len); + todo = MIN(remain, size); + memcpy(dst, src, todo); + src += todo; + cc->cc_buf_len -= todo; + if (todo < remain) { + cc->cc_offset += todo; + break; + } + size -= todo; + cc->cc_vmpage++; + cc->cc_offset = 0; + if (size == 0) + break; + } + break; case CRYPTO_BUF_UIO: for (;;) { src = (const char *)cc->cc_iov->iov_base + @@ -421,6 +602,15 @@ crypto_copyback(struct cryptop *crp, int off, int size case CRYPTO_BUF_MBUF: m_copyback(cb->cb_mbuf, off, size, src); break; +#if CRYPTO_MAY_HAVE_VMPAGE + case CRYPTO_BUF_VMPAGE: + MPASS(size <= cb->cb_vm_page_len); + MPASS(size + off <= + cb->cb_vm_page_len + cb->cb_vm_page_offset); + cvm_page_copyback(cb->cb_vm_page, + off + cb->cb_vm_page_offset, size, src); + break; +#endif /* CRYPTO_MAY_HAVE_VMPAGE */ case CRYPTO_BUF_UIO: cuio_copyback(cb->cb_uio, off, size, src); break; @@ -444,6 +634,15 @@ crypto_copydata(struct cryptop *crp, int off, int size case CRYPTO_BUF_MBUF: m_copydata(crp->crp_buf.cb_mbuf, off, size, dst); break; +#if CRYPTO_MAY_HAVE_VMPAGE + case CRYPTO_BUF_VMPAGE: + MPASS(size <= crp->crp_buf.cb_vm_page_len); + MPASS(size + off <= crp->crp_buf.cb_vm_page_len + + crp->crp_buf.cb_vm_page_offset); + cvm_page_copydata(crp->crp_buf.cb_vm_page, + off + crp->crp_buf.cb_vm_page_offset, size, dst); + break; +#endif /* CRYPTO_MAY_HAVE_VMPAGE */ case CRYPTO_BUF_UIO: cuio_copydata(crp->crp_buf.cb_uio, off, size, dst); break; @@ -473,6 +672,12 @@ crypto_apply_buf(struct crypto_buffer *cb, int off, in case CRYPTO_BUF_UIO: error = cuio_apply(cb->cb_uio, off, len, f, arg); break; +#if CRYPTO_MAY_HAVE_VMPAGE + case CRYPTO_BUF_VMPAGE: + error = cvm_page_apply(cb->cb_vm_page, + off + cb->cb_vm_page_offset, len, f, arg); + break; +#endif /* CRYPTO_MAY_HAVE_VMPAGE */ case CRYPTO_BUF_CONTIG: MPASS(off + len <= cb->cb_buf_len); error = (*f)(arg, cb->cb_buf + off, len); @@ -540,6 +745,12 @@ crypto_buffer_contiguous_subsegment(struct crypto_buff return (m_contiguous_subsegment(cb->cb_mbuf, skip, len)); case CRYPTO_BUF_UIO: return (cuio_contiguous_segment(cb->cb_uio, skip, len)); +#if CRYPTO_MAY_HAVE_VMPAGE + case CRYPTO_BUF_VMPAGE: + MPASS(skip + len <= cb->cb_vm_page_len); + return (cvm_page_contiguous_segment(cb->cb_vm_page, + skip + cb->cb_vm_page_offset, len)); +#endif /* CRYPTO_MAY_HAVE_VMPAGE */ case CRYPTO_BUF_CONTIG: MPASS(skip + len <= cb->cb_buf_len); return (cb->cb_buf + skip); Modified: head/sys/opencrypto/crypto.c ============================================================================== --- head/sys/opencrypto/crypto.c Wed Aug 26 02:13:27 2020 (r364798) +++ head/sys/opencrypto/crypto.c Wed Aug 26 02:37:42 2020 (r364799) @@ -78,7 +78,9 @@ __FBSDID("$FreeBSD$"); #include +#include #include + #include #include #include @@ -1218,6 +1220,8 @@ crypto_buffer_len(struct crypto_buffer *cb) if (cb->cb_mbuf->m_flags & M_PKTHDR) return (cb->cb_mbuf->m_pkthdr.len); return (m_length(cb->cb_mbuf, NULL)); + case CRYPTO_BUF_VMPAGE: + return (cb->cb_vm_page_len); case CRYPTO_BUF_UIO: return (cb->cb_uio->uio_resid); default: @@ -1232,9 +1236,25 @@ cb_sanity(struct crypto_buffer *cb, const char *name) { KASSERT(cb->cb_type > CRYPTO_BUF_NONE && cb->cb_type <= CRYPTO_BUF_LAST, ("incoming crp with invalid %s buffer type", name)); - if (cb->cb_type == CRYPTO_BUF_CONTIG) + switch (cb->cb_type) { + case CRYPTO_BUF_CONTIG: KASSERT(cb->cb_buf_len >= 0, ("incoming crp with -ve %s buffer length", name)); + break; + case CRYPTO_BUF_VMPAGE: + KASSERT(CRYPTO_HAS_VMPAGE, + ("incoming crp uses dmap on supported arch")); + KASSERT(cb->cb_vm_page_len >= 0, + ("incoming crp with -ve %s buffer length", name)); + KASSERT(cb->cb_vm_page_offset >= 0, + ("incoming crp with -ve %s buffer offset", name)); + KASSERT(cb->cb_vm_page_offset < PAGE_SIZE, + ("incoming crp with %s buffer offset greater than page size" + , name)); + break; + default: + break; + } } static void Modified: head/sys/opencrypto/cryptodev.h ============================================================================== --- head/sys/opencrypto/cryptodev.h Wed Aug 26 02:13:27 2020 (r364798) +++ head/sys/opencrypto/cryptodev.h Wed Aug 26 02:37:42 2020 (r364799) @@ -205,6 +205,15 @@ #define CRYPTO_FLAG_HARDWARE 0x01000000 /* hardware accelerated */ #define CRYPTO_FLAG_SOFTWARE 0x02000000 /* software implementation */ +/* Does the kernel support vmpage buffers on this platform? */ +#ifdef __powerpc__ +#define CRYPTO_MAY_HAVE_VMPAGE 1 +#else +#define CRYPTO_MAY_HAVE_VMPAGE ( PMAP_HAS_DMAP ) +#endif +/* Does the currently running system support vmpage buffers on this platform? */ +#define CRYPTO_HAS_VMPAGE ( PMAP_HAS_DMAP ) + /* NB: deprecated */ struct session_op { u_int32_t cipher; /* ie. CRYPTO_AES_CBC */ @@ -387,7 +396,8 @@ enum crypto_buffer_type { CRYPTO_BUF_CONTIG, CRYPTO_BUF_UIO, CRYPTO_BUF_MBUF, - CRYPTO_BUF_LAST = CRYPTO_BUF_MBUF + CRYPTO_BUF_VMPAGE, + CRYPTO_BUF_LAST = CRYPTO_BUF_VMPAGE }; /* @@ -402,6 +412,11 @@ struct crypto_buffer { int cb_buf_len; }; struct mbuf *cb_mbuf; + struct { + vm_page_t *cb_vm_page; + int cb_vm_page_len; + int cb_vm_page_offset; + }; struct uio *cb_uio; }; enum crypto_buffer_type cb_type; @@ -415,11 +430,15 @@ struct crypto_buffer_cursor { char *cc_buf; struct mbuf *cc_mbuf; struct iovec *cc_iov; + vm_page_t *cc_vmpage; }; - union { - int cc_buf_len; - size_t cc_offset; - }; + /* Optional bytes of valid data remaining */ + int cc_buf_len; + /* + * Optional offset within the current buffer segment where + * valid data begins + */ + size_t cc_offset; enum crypto_buffer_type cc_type; }; @@ -509,6 +528,16 @@ _crypto_use_mbuf(struct crypto_buffer *cb, struct mbuf } static __inline void +_crypto_use_vmpage(struct crypto_buffer *cb, vm_page_t *pages, int len, + int offset) +{ + cb->cb_vm_page = pages; + cb->cb_vm_page_len = len; + cb->cb_vm_page_offset = offset; + cb->cb_type = CRYPTO_BUF_VMPAGE; +} + +static __inline void _crypto_use_uio(struct crypto_buffer *cb, struct uio *uio) { cb->cb_uio = uio; @@ -528,6 +557,12 @@ crypto_use_mbuf(struct cryptop *crp, struct mbuf *m) } static __inline void +crypto_use_vmpage(struct cryptop *crp, vm_page_t *pages, int len, int offset) +{ + _crypto_use_vmpage(&crp->crp_buf, pages, len, offset); +} + +static __inline void crypto_use_uio(struct cryptop *crp, struct uio *uio) { _crypto_use_uio(&crp->crp_buf, uio); @@ -543,6 +578,13 @@ static __inline void crypto_use_output_mbuf(struct cryptop *crp, struct mbuf *m) { _crypto_use_mbuf(&crp->crp_obuf, m); +} + +static __inline void +crypto_use_output_vmpage(struct cryptop *crp, vm_page_t *pages, int len, + int offset) +{ + _crypto_use_vmpage(&crp->crp_obuf, pages, len, offset); } static __inline void Modified: head/sys/opencrypto/cryptosoft.c ============================================================================== --- head/sys/opencrypto/cryptosoft.c Wed Aug 26 02:13:27 2020 (r364798) +++ head/sys/opencrypto/cryptosoft.c Wed Aug 26 02:37:42 2020 (r364799) @@ -980,6 +980,10 @@ swcr_compdec(struct swcr_session *ses, struct cryptop } } break; + case CRYPTO_BUF_VMPAGE: + adj = crp->crp_payload_length - result; + crp->crp_buf.cb_vm_page_len -= adj; + break; default: break; } From owner-svn-src-all@freebsd.org Wed Aug 26 02:44:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0F503C6925; Wed, 26 Aug 2020 02:44:36 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbqvS4H5Vz4XdM; Wed, 26 Aug 2020 02:44:36 +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 71FA6C39A; Wed, 26 Aug 2020 02:44:36 +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 07Q2iaCg051940; Wed, 26 Aug 2020 02:44:36 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q2iaI6051938; Wed, 26 Aug 2020 02:44:36 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202008260244.07Q2iaI6051938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 26 Aug 2020 02:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364800 - head/sys/geom/eli X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sys/geom/eli X-SVN-Commit-Revision: 364800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 02:44:36 -0000 Author: asomers Date: Wed Aug 26 02:44:35 2020 New Revision: 364800 URL: https://svnweb.freebsd.org/changeset/base/364800 Log: geli: use unmapped I/O Use unmapped I/O for geli. Unlike most geom providers, geli needs to manipulate data on every read or write. Previously it would always map bios. On my 16-core, dual socket server using geli atop md(4) devices, with 512B sectors, this change increases geli IOPs by about 3x. Note that geli still can't use unmapped I/O when data integrity verification is enabled (but it could, with a little more work). And it can't use unmapped I/O in combination with ZFS, because ZFS uses mapped bios. Reviewed by: markj, kib, jhb, mjg, mat, bcr (manpages) MFC after: 1 week Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D25671 Modified: head/sys/geom/eli/g_eli.c head/sys/geom/eli/g_eli_privacy.c Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Wed Aug 26 02:37:42 2020 (r364799) +++ head/sys/geom/eli/g_eli.c Wed Aug 26 02:44:35 2020 (r364800) @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include @@ -972,6 +974,15 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, */ pp = g_new_providerf(gp, "%s%s", bpp->name, G_ELI_SUFFIX); pp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE; + if (CRYPTO_HAS_VMPAGE) { + /* + * On DMAP architectures we can use unmapped I/O. But don't + * use it with data integrity verification. That code hasn't + * been written yet. + */ + if ((sc->sc_flags & G_ELI_FLAG_AUTH) == 0) + pp->flags |= G_PF_ACCEPT_UNMAPPED; + } pp->mediasize = sc->sc_mediasize; pp->sectorsize = sc->sc_sectorsize; LIST_FOREACH(gap, &bpp->aliases, ga_next) Modified: head/sys/geom/eli/g_eli_privacy.c ============================================================================== --- head/sys/geom/eli/g_eli_privacy.c Wed Aug 26 02:37:42 2020 (r364799) +++ head/sys/geom/eli/g_eli_privacy.c Wed Aug 26 02:44:35 2020 (r364800) @@ -63,6 +63,28 @@ __FBSDID("$FreeBSD$"); MALLOC_DECLARE(M_ELI); /* + * Copy data from a (potentially unmapped) bio to a kernelspace buffer. + * + * The buffer must have at least as much room as bp->bio_length. + */ +static void +g_eli_bio_copyin(struct bio *bp, void *kaddr) +{ + struct uio uio; + struct iovec iov[1]; + + iov[0].iov_base = kaddr; + iov[0].iov_len = bp->bio_length; + uio.uio_iov = iov; + uio.uio_iovcnt = 1; + uio.uio_offset = 0; + uio.uio_resid = bp->bio_length; + uio.uio_segflg = UIO_SYSSPACE; + uio.uio_rw = UIO_READ; + uiomove_fromphys(bp->bio_ma, bp->bio_ma_offset, bp->bio_length, &uio); +} + +/* * The function is called after we read and decrypt data. * * g_eli_start -> g_eli_crypto_read -> g_io_request -> g_eli_read_done -> g_eli_crypto_run -> G_ELI_CRYPTO_READ_DONE -> g_io_deliver @@ -98,8 +120,7 @@ g_eli_crypto_read_done(struct cryptop *crp) */ if (bp->bio_inbed < bp->bio_children) return (0); - free(bp->bio_driver2, M_ELI); - bp->bio_driver2 = NULL; + if (bp->bio_error != 0) { G_ELI_LOGREQ(0, bp, "Crypto READ request failed (error=%d).", bp->bio_error); @@ -167,6 +188,11 @@ g_eli_crypto_write_done(struct cryptop *crp) return (0); } cbp->bio_data = bp->bio_driver2; + /* + * Clear BIO_UNMAPPED, which was inherited from where we cloned the bio + * in g_eli_start, because we manually set bio_data + */ + cbp->bio_flags &= ~BIO_UNMAPPED; cbp->bio_done = g_eli_write_done; cp = LIST_FIRST(&gp->consumer); cbp->bio_to = cp->provider; @@ -236,10 +262,12 @@ g_eli_crypto_run(struct g_eli_worker *wr, struct bio * { struct g_eli_softc *sc; struct cryptop *crp; + vm_page_t *pages; u_int i, nsec, secsize; off_t dstoff; - u_char *data; + u_char *data = NULL; int error; + int pages_offset; G_ELI_LOGREQ(3, bp, "%s", __func__); @@ -258,16 +286,37 @@ g_eli_crypto_run(struct g_eli_worker *wr, struct bio * if (bp->bio_cmd == BIO_WRITE) { data = malloc(bp->bio_length, M_ELI, M_WAITOK); bp->bio_driver2 = data; - bcopy(bp->bio_data, data, bp->bio_length); - } else - data = bp->bio_data; + /* + * This copy could be eliminated by using crypto's output + * buffer, instead of using a single overwriting buffer. + */ + if ((bp->bio_flags & BIO_UNMAPPED) != 0) + g_eli_bio_copyin(bp, data); + else + bcopy(bp->bio_data, data, bp->bio_length); + } else { + if ((bp->bio_flags & BIO_UNMAPPED) != 0) { + pages = bp->bio_ma; + pages_offset = bp->bio_ma_offset; + } else { + data = bp->bio_data; + } + } for (i = 0, dstoff = bp->bio_offset; i < nsec; i++, dstoff += secsize) { crp = crypto_getreq(wr->w_sid, M_WAITOK); - crypto_use_buf(crp, data, secsize); + if (data) { + crypto_use_buf(crp, data, secsize); + data += secsize; + } else { + MPASS(pages != NULL); + crypto_use_vmpage(crp, pages, secsize, pages_offset); + pages_offset += secsize; + pages += pages_offset >> PAGE_SHIFT; + pages_offset &= PAGE_MASK; + } crp->crp_opaque = (void *)bp; - data += secsize; if (bp->bio_cmd == BIO_WRITE) { crp->crp_op = CRYPTO_OP_ENCRYPT; crp->crp_callback = g_eli_crypto_write_done; From owner-svn-src-all@freebsd.org Wed Aug 26 03:41:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7152E3C77C8; Wed, 26 Aug 2020 03:41: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbs962T9Pz4btC; Wed, 26 Aug 2020 03:41: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 39484CAE1; Wed, 26 Aug 2020 03:41: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 07Q3fUxj085681; Wed, 26 Aug 2020 03:41:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q3fUgr085666; Wed, 26 Aug 2020 03:41:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202008260341.07Q3fUgr085666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 26 Aug 2020 03:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364801 - head/tools/build X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/build X-SVN-Commit-Revision: 364801 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 03:41:30 -0000 Author: emaste Date: Wed Aug 26 03:41:29 2020 New Revision: 364801 URL: https://svnweb.freebsd.org/changeset/base/364801 Log: depend-cleanup.sh: add a note about removing old entries Modified: head/tools/build/depend-cleanup.sh Modified: head/tools/build/depend-cleanup.sh ============================================================================== --- head/tools/build/depend-cleanup.sh Wed Aug 26 02:44:35 2020 (r364800) +++ head/tools/build/depend-cleanup.sh Wed Aug 26 03:41:29 2020 (r364801) @@ -11,6 +11,11 @@ # We handle those cases here in an ad-hoc fashion by looking for the known- # bad case in the main .depend file, and if found deleting all of the related # .depend files (including for example the lib32 version). +# +# These tests increase the build time (albeit by a small amount), so they +# should be removed once enough time has passed and it is extremely unlikely +# anyone would try a NO_CLEAN build against an object tree from before the +# related change. One year should be sufficient. OBJTOP=$1 if [ ! -d "$OBJTOP" ]; then From owner-svn-src-all@freebsd.org Wed Aug 26 04:01:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 71AA53C8087; Wed, 26 Aug 2020 04:01:07 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbsbl2Q8wz4chS; Wed, 26 Aug 2020 04:01:07 +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 375B2CF76; Wed, 26 Aug 2020 04:01:07 +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 07Q4174J096820; Wed, 26 Aug 2020 04:01:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q417T2096819; Wed, 26 Aug 2020 04:01:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202008260401.07Q417T2096819@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 26 Aug 2020 04:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364802 - head/tools/build X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/build X-SVN-Commit-Revision: 364802 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 04:01:07 -0000 Author: emaste Date: Wed Aug 26 04:01:06 2020 New Revision: 364802 URL: https://svnweb.freebsd.org/changeset/base/364802 Log: Apply a big hammer for stale pre-OpenZFS files -DNO_CLEAN builds have had trouble across the OpenZFS import. It's not worth the effort to try to address this with any granularity; instead, just trigger on a .depend file indicating a tree from before the import, and remove the whole cddl object tree. Reviewed by: mmacy, kevans Differential Revision: https://reviews.freebsd.org/D26189 Modified: head/tools/build/depend-cleanup.sh Modified: head/tools/build/depend-cleanup.sh ============================================================================== --- head/tools/build/depend-cleanup.sh Wed Aug 26 03:41:29 2020 (r364801) +++ head/tools/build/depend-cleanup.sh Wed Aug 26 04:01:06 2020 (r364802) @@ -43,3 +43,11 @@ clean_dep lib/libc shm_open S clean_dep lib/libomp ittnotify_static c # 20200414 r359930 closefrom clean_dep lib/libc closefrom S + +# 20200826 r364746 OpenZFS merge, apply a big hammer (remove whole tree) +if [ -e "$OBJTOP"/cddl/lib/libzfs/.depend.libzfs_changelist.o ] && \ + egrep -qw "cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c" \ + "$OBJTOP"/cddl/lib/libzfs/.depend.libzfs_changelist.o; then + echo "Removing old ZFS tree" + rm -rf "$OBJTOP"/cddl "$OBJTOP"/obj-lib32/cddl +fi From owner-svn-src-all@freebsd.org Wed Aug 26 04:24:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF7C03C8785; Wed, 26 Aug 2020 04:24:04 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (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 4Bbt6C190gz4dRt; Wed, 26 Aug 2020 04:24:02 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id AmydkltvvYYpxAmyekSlJ3; Tue, 25 Aug 2020 22:24:01 -0600 X-Authority-Analysis: v=2.3 cv=OubUNx3t c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=y4yBn9ojGxQA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=dLfdeUgLZtNwh5DCnN0A:9 a=CjuIK1q_8ugA:10 a=OJAZQCPpPQ8A:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=Z5ABNNGmrOfJ6cZ5bIyy:22 a=QOGEsqRv6VhmHaoFNykA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 528C2400; Tue, 25 Aug 2020 21:23:58 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 07Q4NwVi055225; Tue, 25 Aug 2020 21:23:58 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202008260423.07Q4NwVi055225@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Matt Macy cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364746 - in head: . cddl/compat/opensolaris/include cddl/contrib/opensolaris/cmd/lockstat cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd... In-reply-to: <202008250221.07P2LRST044836@repo.freebsd.org> References: <202008250221.07P2LRST044836@repo.freebsd.org> Comments: In-reply-to Matt Macy message dated "Tue, 25 Aug 2020 02:21:27 -0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 25 Aug 2020 21:23:58 -0700 X-CMAE-Envelope: MS4wfO1+NIsBJOdrATMhGYin0ZwSnxgy0fHOCzHVrWowFU6Y3Sxhssif74GvG6QIesFuzn2NX6OefPeG1bzoTZ74pJrz2JQYzpKP3bupNeWdW79HF9I0tKcg zzEZxWlhlJAauJnwF4b1mCORR3J/jKRt6WdV9NHVPpZgoPhdIILUSM7phj0ru3GCld+iiQk0eEpjy3Bz5nsTg6xNyVxgea6vnDPpspYVAM3aKiQ9kk24xP3V CptaDf2S+dV46t6Ys1ENNaFbFOazyqjLng5aPWJGCVPYCv/nM6irHWahSe4y5cxw X-Rspamd-Queue-Id: 4Bbt6C190gz4dRt X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.137) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [0.99 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_MEDIUM(0.18)[0.177]; AUTH_NA(1.00)[]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.04)[0.045]; NEURAL_HAM_LONG(-0.54)[-0.535]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.125.17:received]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.136.137:from] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 04:24:04 -0000 In message <202008250221.07P2LRST044836@repo.freebsd.org>, Matt Macy writes: > Author: mmacy > Date: Tue Aug 25 02:21:27 2020 > New Revision: 364746 > URL: https://svnweb.freebsd.org/changeset/base/364746 > > Log: > Merge OpenZFS support in to HEAD. > > The primary benefit is maintaining a completely shared > code base with the community allowing FreeBSD to receive > new features sooner and with less effort. > > I would advise against doing 'zpool upgrade' > or creating indispensable pools using new > features until this change has had a month+ > to soak. > > Work on merging FreeBSD support in to what was > at the time "ZFS on Linux" began in August 2018. > I first publicly proposed transitioning FreeBSD > to (new) OpenZFS on December 18th, 2018. FreeBSD > support in OpenZFS was finally completed in December > 2019. A CFT for downstreaming OpenZFS support in > to FreeBSD was first issued on July 8th. All issues > that were reported have been addressed or, for > a couple of less critical matters there are > pull requests in progress with OpenZFS. iXsystems > has tested and dogfooded extensively internally. > The TrueNAS 12 release is based on OpenZFS with > some additional features that have not yet made > it upstream. > > Improvements include: > project quotas, encrypted datasets, > allocation classes, vectorized raidz, > vectorized checksums, various command line > improvements, zstd compression. > > Thanks to those who have helped along the way: > Ryan Moeller, Allan Jude, Zack Welch, and many > others. > > Sponsored by: iXsystems, Inc. > Differential Revision: https://reviews.freebsd.org/D25872 > Relnotes? -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Wed Aug 26 04:29:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D01713C8872 for ; Wed, 26 Aug 2020 04:29:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbtDF1jMQz4dr1 for ; Wed, 26 Aug 2020 04:29:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x744.google.com with SMTP id n129so819908qkd.6 for ; Tue, 25 Aug 2020 21:29:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Gj157nNKMmeLBMhI3AEB/Kw2EnCdzo8k6+So0EVQ7rE=; b=wyNl/n5yYCERGkaU2Mim71564Ec0e+bPmYDY6fStUNVc2ACjR7asmGJHpcr9sOIdTa QkE1pX6iz0pNMN4hdc3o5ffE3jnOnSYs2rs2sBSdLaaqib4XNNZJxPU0KTvtTAmB5vOj LeMR57QYb45tdbwLn3Z1otd0BgJiZx7ijRs0xOeLk4whIfAhmpuyoU8uy3Mzs7Ou1vKo Upae8dcmAspgIt3dQJanyhQaw24EDH95D4AgWLcvBg74DWxNlXEkz0cAd9rQuwqAfSMf c3zOlcwRh79DkvXyDmOzRhhmS9ndIWf7qJ4n76/KocMZpBXL+5nLbHbHsPP5hpY9cYw4 H4EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Gj157nNKMmeLBMhI3AEB/Kw2EnCdzo8k6+So0EVQ7rE=; b=XYAletOz5PjawV/MpWNTh581kjAlvNQfz54cLqmPGEFQZUUspDd3fJn1ev//o50N0g Iw3fKR7Z21iyHlaGOZq/fnNuzBgWTg5KsCqyhpPk3ga5VYQK2L2FjEB/VTF4pwqfoA2d vEn0Qp6fJEYKi1cmZpT7FAGAjgjyBVFDqOwOIPl4219WNpWH/4a1v/EAFZgSi0N8Kygp rl4nN+rKn1CfrslUh7FS+uEf2TzPq1JVDG5DABDEv37DPkHpE1WfApL60a76VqV9i3a6 XjCbPqsjqMn5M1HGFpxMVEsLaSMxvr89oSKk8NT5/SDegZaU6ic6c56Ei4C82KEIi/a/ 5YWw== X-Gm-Message-State: AOAM533KwMUbFHOXMyoCjBLDHW7ncYu3bovA/BsJtiax+ljvOwhj8LRV R8dF5Nu1UzffK5tKAp+3S2cji7o9p7MkGXmTCOS3ug== X-Google-Smtp-Source: ABdhPJw3WpYM1P9MOZDzOvIa/m01rovvbwGIx+Ff/NWt07vkxOqJtoEVbyI37Nlbl/HnHzKOP+czgx9SLeRC/amt2CU= X-Received: by 2002:a37:b801:: with SMTP id i1mr11624345qkf.240.1598416155953; Tue, 25 Aug 2020 21:29:15 -0700 (PDT) MIME-Version: 1.0 References: <202008251904.07PJ4srL068863@repo.freebsd.org> <20200825201736.GC43898@spindle.one-eyed-alien.net> In-Reply-To: <20200825201736.GC43898@spindle.one-eyed-alien.net> From: Warner Losh Date: Tue, 25 Aug 2020 22:29:03 -0600 Message-ID: Subject: Re: svn commit: r364781 - in head/sys: conf modules/zfs To: Brooks Davis Cc: Brandon Bergren , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 4BbtDF1jMQz4dr1 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=wyNl/n5y; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::744) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-0.62 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.23)[-0.226]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.10)[0.102]; NEURAL_HAM_LONG(-0.50)[-0.495]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::744:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-all]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 04:29:17 -0000 Got diffs? Warner On Tue, Aug 25, 2020, 2:17 PM Brooks Davis wrote: > On Tue, Aug 25, 2020 at 07:04:54PM +0000, Brandon Bergren wrote: > > Author: bdragon > > Date: Tue Aug 25 19:04:54 2020 > > New Revision: 364781 > > URL: https://svnweb.freebsd.org/changeset/base/364781 > > > > Log: > > [PowerPC] More preemptive powerpcspe ZFS build fixes > > > > I went through the merge and found the rest of the instances where > > ${MACHINE_ARCH} == "powerpc" was being used to detect 32-bit and > adjusted > > the rest of the instances to also check for powerpcspe. > > > > mips32* will probably want to do the same. > > > > Sponsored by: Tag1 Consulting, Inc. > > > > Modified: > > head/sys/conf/kern.pre.mk > > head/sys/modules/zfs/Makefile > > > > Modified: head/sys/conf/kern.pre.mk > > > ============================================================================== > > --- head/sys/conf/kern.pre.mk Tue Aug 25 18:54:10 2020 (r364780) > > +++ head/sys/conf/kern.pre.mk Tue Aug 25 19:04:54 2020 (r364781) > > @@ -257,7 +257,7 @@ ZFS_CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 > -DHAVE_ > > .endif > > > > .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ > > - ${MACHINE_ARCH} == "arm" > > + ${MACHINE_ARCH} == "powerpcspe" || ${MACHINE_ARCH} == "arm" > > ZFS_CFLAGS+= -DBITS_PER_LONG=32 > > .else > > ZFS_CFLAGS+= -DBITS_PER_LONG=64 > > In CheriBSD we've added a MACHINE_ABI variable that could be used to > simplify this mess of checks. > > > https://github.com/CTSRD-CHERI/cheribsd/blob/5ee735e5f8ef7268731359a2d8a9a8218df2d23f/share/mk/bsd.cpu.mk#L478 > > As currently implemented you'd use: > > .if ${MACHINE_ABI:Mptr64} > > There's be a argument for adding long32 and long64 for to avoid > conflating long and pointer size. > > -- Brooks > From owner-svn-src-all@freebsd.org Wed Aug 26 05:31:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC2833C9F8D; Wed, 26 Aug 2020 05:31:28 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bbvc05Tv9z4hRH; Wed, 26 Aug 2020 05:31:28 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1598419888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GhFUoPji7VY/Fc+KeWkFp+zLTH7w8GX5r8x9Gg/xN2U=; b=Ts5Sz+l0MZZbfIdoGzvvrqV5PXxxFuitUDjcgCh10NnpE0VJG0TVay+EBqHTpxQMcTGlIs Wp0W/H6o3i2zZ2QeqrYXmpQU2Bx62syfS86GlATCkvC2H6H0KOzKnkMeAnqs2kUiIFiC0O typMiW1A2nOnBpWWwivuJKHnMMVLtn8gOgW7jMj2qPyNX5KWV/db6k5+L2rNOp0EJGzeZz wDH5auRvBrtU4/a7vPLQ8qwecu6GcTFNN1Pwxo4FCNLl6wrgSw8ttbRti6gtMnMLOmmdjj g6Ab0JN3MHrNOXdPLpgBGHSdT3BiyQnJxR/DMkOBYyntg1MB5fA1QpOyn8mgoQ== Received: by freefall.freebsd.org (Postfix, from userid 1033) id AD1FA9241; Wed, 26 Aug 2020 05:31:28 +0000 (UTC) Date: Wed, 26 Aug 2020 05:31:28 +0000 From: Alexey Dokuchaev To: Matt Macy Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364746 - in head: . cddl/compat/opensolaris/include cddl/contrib/opensolaris/cmd/lockstat cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd... Message-ID: <20200826053128.GA85697@FreeBSD.org> References: <202008250221.07P2LRST044836@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202008250221.07P2LRST044836@repo.freebsd.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1598419888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GhFUoPji7VY/Fc+KeWkFp+zLTH7w8GX5r8x9Gg/xN2U=; b=mZJ2iLGnZDCrc68f89N4X6QA8BQJ1fvmOKyHd+DH032Jq3U4NG0ilH26qo+EKafooIvDbc ydmtgsYVrZlPykffFEATifc1E2Inld0pJhhVl1YKzbFaX8+b7euzu7Ro91rwnJreertCdw VHkXzuibGWWMXpmxrXL7zV2QcBUTmW2kQyF+An5dRRD+pi6EFLdxNLazGnjlSxIhwNz3Vr Lno6icbuxbalNYLA2zxOmflzMeNwYkc35+0xRibGAP0ibdYVqyCS6NGBiuBeTwxTWTJD+R Ll+F1TTNYIJMCpbIwzSHFFlfo6KGXF1JFwcm5M0gAjy+ps4SuPPv9EYZ9mwfXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1598419888; a=rsa-sha256; cv=none; b=BOYJYwemMv/PG6M4TXpN8yrxo+te3S5Ov64y/Aqk5HO1eiKrXBiRME3qy3955UlpDGJkTB y2qW4ayLmlmn42P1NxVke8aG894CUHQZrFqjE3Eq2cc7LOGwjU7l0pW0lIZ5K7hBZqECga 9JCKS9tamxN6EjsAaVPX8esyePkVWFhYVtS/dDp3pa6jasutK4bqaNMAsQqxB3/H3PWIgp UoTTN2Y059bDfNgoH/6IPZbHdIbesU+/om5UHVTkdQ6LDJIKEJMf/wiGWEaswVfviO4NxV pobWpLbW1NO3DQsF6oWZwkIRvSYECoyZYSTy52EXGPauLoTykdbpswRi+S8Hog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 05:31:28 -0000 On Tue, Aug 25, 2020 at 02:21:27AM +0000, Matt Macy wrote: > New Revision: 364746 > URL: https://svnweb.freebsd.org/changeset/base/364746 > > Log: > Merge OpenZFS support in to HEAD. > > The primary benefit is maintaining a completely shared > code base with the community allowing FreeBSD to receive > new features sooner and with less effort. This commit raises several questions. To start, I see a lot of things checked in under `sys/contrib/openzfs' which do not belong to the kernel (e.g. userland programs, libraries, manpages, bash completions, test suite, etc/sudoers.d) or FreeBSD at all (init.d, initramfs, systemd). Why those bits were not cleaned up, or at least kept on the vendor branch only? > Improvements include: > project quotas, encrypted datasets, > allocation classes, vectorized raidz, > vectorized checksums, various command line > improvements, zstd compression. And what about regressions? Would illumos (opensolaris) ZFS be also offered, maybe from ports, for those of us who prefer stable and highly reliable implementation? > Added: head/cddl/lib/libicp/Makefile > ... > + core/kcf_prov_lib.c \ > + core/kcf_callprov.c \ > + core/kcf_mech_tabs.c \ > + core/kcf_prov_tabs.c \ > + $(ASM_SOURCES_C) > + > + > + > + > + > + > +SRCS= $(ASM_SOURCES_AS) $(KERNEL_C) There are many excessive whitespace bugs, this is the most prominent. How did they pass the review? ./danfe From owner-svn-src-all@freebsd.org Wed Aug 26 07:00:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91E933CBA3D; Wed, 26 Aug 2020 07:00:08 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbxZJ3Qzwz4mQj; Wed, 26 Aug 2020 07:00:08 +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 416FFF227; Wed, 26 Aug 2020 07:00:08 +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 07Q708C0005969; Wed, 26 Aug 2020 07:00:08 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q708KR005968; Wed, 26 Aug 2020 07:00:08 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202008260700.07Q708KR005968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 26 Aug 2020 07:00:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364805 - head/sys/cddl/contrib/opensolaris/uts/common/fs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs X-SVN-Commit-Revision: 364805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 07:00:08 -0000 Author: tsoome Date: Wed Aug 26 07:00:07 2020 New Revision: 364805 URL: https://svnweb.freebsd.org/changeset/base/364805 Log: remove left over empty directory 364746 did leave empty directory around. Deleted: head/sys/cddl/contrib/opensolaris/uts/common/fs/ From owner-svn-src-all@freebsd.org Wed Aug 26 07:29:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D2063CC33C; Wed, 26 Aug 2020 07:29:19 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BbyCz0wC1z4nfV; Wed, 26 Aug 2020 07:29:19 +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 F2142F9B1; Wed, 26 Aug 2020 07:29:18 +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 07Q7TI5Q023751; Wed, 26 Aug 2020 07:29:18 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q7THlo023745; Wed, 26 Aug 2020 07:29:17 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202008260729.07Q7THlo023745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 26 Aug 2020 07:29:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364806 - in head/sys/contrib/openzfs: include/os/freebsd/spl/sys module/os/freebsd/spl X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/sys/contrib/openzfs: include/os/freebsd/spl/sys module/os/freebsd/spl X-SVN-Commit-Revision: 364806 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 07:29:19 -0000 Author: tsoome Date: Wed Aug 26 07:29:17 2020 New Revision: 364806 URL: https://svnweb.freebsd.org/changeset/base/364806 Log: remove pragma ident lines The #pragma ident is historical relict and not needed any more, this pragma is actually unknown for common compilers and is only causing trouble. Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h head/sys/contrib/openzfs/module/os/freebsd/spl/list.c Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h ============================================================================== --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h Wed Aug 26 07:00:07 2020 (r364805) +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h Wed Aug 26 07:29:17 2020 (r364806) @@ -26,8 +26,6 @@ #ifndef _SYS_ACL_IMPL_H #define _SYS_ACL_IMPL_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h ============================================================================== --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h Wed Aug 26 07:00:07 2020 (r364805) +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h Wed Aug 26 07:29:17 2020 (r364806) @@ -31,8 +31,6 @@ #ifndef _SYS_CMN_ERR_H #define _SYS_CMN_ERR_H -#pragma ident "%Z%%M% %I% %E% SMI" - #if !defined(_ASM) #include #endif Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h ============================================================================== --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h Wed Aug 26 07:00:07 2020 (r364805) +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h Wed Aug 26 07:29:17 2020 (r364806) @@ -26,8 +26,6 @@ #ifndef _SYS_EXTDIRENT_H #define _SYS_EXTDIRENT_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h ============================================================================== --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h Wed Aug 26 07:00:07 2020 (r364805) +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h Wed Aug 26 07:29:17 2020 (r364806) @@ -26,8 +26,6 @@ #ifndef _SYS_LIST_H #define _SYS_LIST_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #ifdef __cplusplus Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h ============================================================================== --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h Wed Aug 26 07:00:07 2020 (r364805) +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h Wed Aug 26 07:29:17 2020 (r364806) @@ -27,8 +27,6 @@ #ifndef _SYS_LIST_IMPL_H #define _SYS_LIST_IMPL_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #ifdef __cplusplus Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h ============================================================================== --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h Wed Aug 26 07:00:07 2020 (r364805) +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h Wed Aug 26 07:29:17 2020 (r364806) @@ -27,8 +27,6 @@ #ifndef _ZMOD_H #define _ZMOD_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif Modified: head/sys/contrib/openzfs/module/os/freebsd/spl/list.c ============================================================================== --- head/sys/contrib/openzfs/module/os/freebsd/spl/list.c Wed Aug 26 07:00:07 2020 (r364805) +++ head/sys/contrib/openzfs/module/os/freebsd/spl/list.c Wed Aug 26 07:29:17 2020 (r364806) @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Generic doubly-linked list implementation */ From owner-svn-src-all@freebsd.org Wed Aug 26 09:19:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 718FC3CF33C; Wed, 26 Aug 2020 09:19:45 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc0gP2V8rz4vW3; Wed, 26 Aug 2020 09:19:45 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3906510A56; Wed, 26 Aug 2020 09:19:45 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07Q9JjxW091143; Wed, 26 Aug 2020 09:19:45 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q9JieJ091141; Wed, 26 Aug 2020 09:19:44 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008260919.07Q9JieJ091141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 26 Aug 2020 09:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364807 - in head: share/mk sys/conf X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head: share/mk sys/conf X-SVN-Commit-Revision: 364807 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 09:19:45 -0000 Author: arichardson Date: Wed Aug 26 09:19:44 2020 New Revision: 364807 URL: https://svnweb.freebsd.org/changeset/base/364807 Log: Fix builds that set LD=ld.lld after r364761 When using relative paths for the linker we have to transform the name since clang does not like -fuse-ld=ld.lld and instead requires -fuse-ld=lld (the same also applies for ld.bfd). Modified: head/share/mk/bsd.sys.mk head/sys/conf/kern.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Wed Aug 26 07:29:17 2020 (r364806) +++ head/share/mk/bsd.sys.mk Wed Aug 26 09:19:44 2020 (r364807) @@ -289,7 +289,8 @@ CFLAGS+= ERROR-tried-to-rebuild-during-make-install # Add -fuse-ld=${LD} if $LD is in a different directory or not called "ld". # Note: Clang 12+ will prefer --ld-path= over -fuse-ld=. .if ${COMPILER_TYPE} == "clang" -LDFLAGS+= -fuse-ld=${LD:[1]} +# Note: Clang does not like relative paths in -fuse-ld so we map ld.lld -> lld. +LDFLAGS+= -fuse-ld=${LD:[1]:S/^ld.//1W} .else # GCC does not support an absolute path for -fuse-ld so we just print this # warning instead and let the user add the required symlinks. Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Wed Aug 26 07:29:17 2020 (r364806) +++ head/sys/conf/kern.mk Wed Aug 26 09:19:44 2020 (r364807) @@ -278,7 +278,8 @@ CFLAGS+= -std=${CSTD} # Note: unlike bsd.sys.mk we can't use LDFLAGS here since that is used for the # flags required when linking the kernel. We don't need those flags when # building the vdsos. However, we do need -fuse-ld, so use ${CCLDFLAGS} instead. -CCLDFLAGS+= -fuse-ld=${LD:[1]} +# Note: Clang does not like relative paths in -fuse-ld so we map ld.lld -> lld. +CCLDFLAGS+= -fuse-ld=${LD:[1]:S/^ld.//1W} .else # GCC does not support an absolute path for -fuse-ld so we just print this # warning instead and let the user add the required symlinks. From owner-svn-src-all@freebsd.org Wed Aug 26 09:19:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6E713CF2A6; Wed, 26 Aug 2020 09:19:50 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc0gV2W2Xz4v8s; Wed, 26 Aug 2020 09:19:50 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A1DA10D84; Wed, 26 Aug 2020 09:19:50 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07Q9JnG9091197; Wed, 26 Aug 2020 09:19:49 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07Q9Jnhr091196; Wed, 26 Aug 2020 09:19:49 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008260919.07Q9Jnhr091196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 26 Aug 2020 09:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364808 - head/lib X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/lib X-SVN-Commit-Revision: 364808 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 09:19:51 -0000 Author: arichardson Date: Wed Aug 26 09:19:49 2020 New Revision: 364808 URL: https://svnweb.freebsd.org/changeset/base/364808 Log: Move libsqlite3 to the top of the SUBDIR list In parallel builds, this should allow sqlite to start building earlier and increase parallelism when building lib/. Looking at htop output during buildworld/tinderbox, there are long phases where only one CPU is active optimizing the massive sqlite3.c file since the build of libsqlite3 is started quite late. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D26169 Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Wed Aug 26 09:19:44 2020 (r364807) +++ head/lib/Makefile Wed Aug 26 09:19:49 2020 (r364808) @@ -23,9 +23,12 @@ SUBDIR_BOOTSTRAP= \ msun # The main list; please keep these sorted alphabetically. +# The only exception is sqlite3: we place it at the start of the list since it +# takes a long time to build and starting it first improves parallelism. SUBDIR= ${SUBDIR_BOOTSTRAP} \ .WAIT \ + libsqlite3 \ geom \ libalias \ libarchive \ @@ -84,7 +87,6 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ librtld_db \ libsbuf \ libsmb \ - libsqlite3 \ libstdbuf \ libstdthreads \ libsysdecode \ From owner-svn-src-all@freebsd.org Wed Aug 26 10:21:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 877DD3D06E8; Wed, 26 Aug 2020 10:21:39 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc22q35XXz3VX7; Wed, 26 Aug 2020 10:21:39 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E7391135E; Wed, 26 Aug 2020 10:21:39 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QALdaw030264; Wed, 26 Aug 2020 10:21:39 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QALcXZ030262; Wed, 26 Aug 2020 10:21:38 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202008261021.07QALcXZ030262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 26 Aug 2020 10:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364809 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 364809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 10:21:39 -0000 Author: arichardson Date: Wed Aug 26 10:21:38 2020 New Revision: 364809 URL: https://svnweb.freebsd.org/changeset/base/364809 Log: Avoid recomputing COMPILER_/LINKER_ variables when set explicitly I noticed that when we build libraries for a different ABI (in CheriBSD) we were calling ${XCC}/${LD} --version for every directory. It turns out that this was caused by bsd.compat.mk explicitly setting (X_)COMPILER variables for that build stage and this stops the _can_export logic from working. To fix this, we change the check to only set _can_export=no if the variable is set and it is set to a different value than the cached value. This noticeably speeds up the tree walk while building compat libraries. During an upstream amd64 buildworld this also removes 8 --version calls. Obtained from: CheriBSD Reviewed By: brooks, emaste Differential Revision: https://reviews.freebsd.org/D25986 Modified: head/share/mk/bsd.compiler.mk head/share/mk/bsd.linker.mk Modified: head/share/mk/bsd.compiler.mk ============================================================================== --- head/share/mk/bsd.compiler.mk Wed Aug 26 09:19:49 2020 (r364808) +++ head/share/mk/bsd.compiler.mk Wed Aug 26 10:21:38 2020 (r364809) @@ -146,10 +146,13 @@ _exported_vars= ${X_}COMPILER_TYPE ${X_}COMPILER_VERSI ${X_}COMPILER_FREEBSD_VERSION ${X_}COMPILER_RESOURCE_DIR ${X_}_cc_hash= ${${cc}}${MACHINE}${PATH} ${X_}_cc_hash:= ${${X_}_cc_hash:hash} -# Only import if none of the vars are set somehow else. +# Only import if none of the vars are set differently somehow else. _can_export= yes .for var in ${_exported_vars} -.if defined(${var}) +.if defined(${var}) && (!defined(${var}__${${X_}_cc_hash}) || ${${var}__${${X_}_cc_hash}} != ${${var}}) +.if defined(${var}__${${X_}_ld_hash}) +.info "Cannot import ${X_}COMPILER variables since cached ${var} is different: ${${var}__${${X_}_cc_hash}} != ${${var}}" +.endif _can_export= no .endif .endfor Modified: head/share/mk/bsd.linker.mk ============================================================================== --- head/share/mk/bsd.linker.mk Wed Aug 26 09:19:49 2020 (r364808) +++ head/share/mk/bsd.linker.mk Wed Aug 26 10:21:38 2020 (r364809) @@ -41,10 +41,13 @@ _exported_vars= ${X_}LINKER_TYPE ${X_}LINKER_VERSION $ ${X_}LINKER_FREEBSD_VERSION ${X_}_ld_hash= ${${ld}}${MACHINE}${PATH} ${X_}_ld_hash:= ${${X_}_ld_hash:hash} -# Only import if none of the vars are set somehow else. +# Only import if none of the vars are set differently somehow else. _can_export= yes .for var in ${_exported_vars} -.if defined(${var}) +.if defined(${var}) && (!defined(${var}__${${X_}_ld_hash}) || ${${var}__${${X_}_ld_hash}} != ${${var}}) +.if defined(${var}__${${X_}_ld_hash}) +.info "Cannot import ${X_}LINKER variables since cached ${var} is different: ${${var}__${${X_}_ld_hash}} != ${${var}}" +.endif _can_export= no .endif .endfor From owner-svn-src-all@freebsd.org Wed Aug 26 11:57:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28ECA3D275F; Wed, 26 Aug 2020 11:57:56 +0000 (UTC) (envelope-from bogorodskiy@gmail.com) Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc49v5lMWz3d8p; Wed, 26 Aug 2020 11:57:55 +0000 (UTC) (envelope-from bogorodskiy@gmail.com) Received: by mail-lf1-x12b.google.com with SMTP id y26so839116lfe.2; Wed, 26 Aug 2020 04:57:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=+PcVHigEh4qz/E0WIDCc9p3WCpmSb8WrugiuupgQQCQ=; b=VcOKcMCtq9tEODKjg7Rq1ezkFCDWrUSwcHw/K4pkuqtiqkwAcqIA2AWYTznqAKSi4b 0kNYhkbKk/B2ezKU2l0AXrgaC4eBvoyQ6Ek5kUVTNwj0Hn7cgS8k/JTLMiKHEiRI99jU F15U7Ct6PDr7dcRH7Ihz3z3SeHPwx9UY1mi7+scEpkQopi5MO/sN8YWgLSOdj7YacJdM gHyNwfxZ7cG4zFNHNYBfFbbkKUa6X36ACaoTu0ADq7HcxNpmqeeqepzmU3QMvNufLnq4 diPN41fgYT7fHQ9x6lSZP9KWO7jdAj/mscJljyRJkKF+cXLVApvrIJZgDkiM4ktBfj/d 8dDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=+PcVHigEh4qz/E0WIDCc9p3WCpmSb8WrugiuupgQQCQ=; b=rdMJ0QBuN5HMPUnMlDsTUUgI/xLAlgwWdckfy6xwmjNbHj2ysojNA9nS940uCt6ABi Hi6BhzJYzua+Ti9anbNo+oFG/Y5VbGWAnTHJ8fPcz4sd1MWE/gZWyOOVBLiecCci2ffx yXqHCduVxz/ctXQAg22pQ3n5cBqjrpLPTC/6LaK2mt7wG6QcN4n/CjbHdvXl8rbDaoIB xibN76qwujc8r21CfpEEPXVgq/2+6XgfPPBZC803DXoD6E9WAVw4vjssR7P4nFmJPzbF atI8obCT9mEUodb5ieS/xemwX06xALtXJ3eyaQqskecJZeutlZsyNLZcbEuPCBjbRF9/ BKPw== X-Gm-Message-State: AOAM5307D49psYuWb5xTsyQGCwS5Vqs+uyLWRaQ8WhUZyYyBaP+04aZL Wohd5W17bo0b7JH1b5D7YXnuRzHz0La7vQ== X-Google-Smtp-Source: ABdhPJzlfJzHZF8rB+5GcZeiVJBDXqz+6gpJMesZtmRY/LU0yw4voi4d5XV2Jm0W3RVk8t96a3FT0w== X-Received: by 2002:a19:4acd:: with SMTP id x196mr185860lfa.118.1598443073604; Wed, 26 Aug 2020 04:57:53 -0700 (PDT) Received: from kloomba ([95.104.140.4]) by smtp.gmail.com with ESMTPSA id r1sm512490lff.55.2020.08.26.04.57.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 04:57:52 -0700 (PDT) Sender: Roman Bogorodskiy Date: Wed, 26 Aug 2020 15:57:43 +0400 From: Roman Bogorodskiy To: Jamie Gritton Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364791 - head/usr.sbin/jail Message-ID: <20200826115743.GA1791@kloomba> References: <202008260043.07Q0h0kH077834@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline In-Reply-To: <202008260043.07Q0h0kH077834@repo.freebsd.org> X-Rspamd-Queue-Id: 4Bc49v5lMWz3d8p X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 11:57:56 -0000 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Jamie Gritton wrote: > Author: jamie > Date: Wed Aug 26 00:42:59 2020 > New Revision: 364791 > URL: https://svnweb.freebsd.org/changeset/base/364791 >=20 > Log: > Handle jail.conf variables that have the same names as parameters. > =20 > PR: 248444 > Submitted by: Akos Somfai > Reported by: Markus Stoff >=20 > Modified: > head/usr.sbin/jail/config.c >=20 > Modified: head/usr.sbin/jail/config.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/jail/config.c Wed Aug 26 00:31:59 2020 (r364790) > +++ head/usr.sbin/jail/config.c Wed Aug 26 00:42:59 2020 (r364791) > @@ -393,7 +393,8 @@ add_param(struct cfjail *j, const struct cfparam *p, e > else > for (ipnum =3D IP__NULL + 1; ipnum < IP_NPARAM; ipnum++) > if (!(intparams[ipnum].flags & PF_CONV) && > - equalopts(name, intparams[ipnum].name)) { > + equalopts(name, intparams[ipnum].name) && > + !(p->flags & PF_VAR)) { > j->intparams[ipnum] =3D np; > np->flags |=3D intparams[ipnum].flags; > break; Looks like it's causing jail(8) to segfault, at least when using with poudriere: $ [00:00:00] Creating the reference jail... done [00:00:07] Mounting system devices for current-local [00:00:07] Mounting ports/packages/distfiles [00:00:07] Using packages from previously failed build: /usr/local/poudrier= e/data/packages/current-local/.building [00:00:07] Mounting ccache from: /var/cache/ccache [00:00:07] Mounting packages from: /usr/local/poudriere/data/packages/curre= nt-local [00:00:07] Copying /var/db/ports from: /usr/local/etc/poudriere.d/current-l= ocal-options [00:00:07] Appending to make.conf: /usr/local/etc/poudriere.d/current-make.= conf /etc/resolv.conf -> /usr/local/poudriere/data/.m/current-local/ref/etc/reso= lv.conf [00:00:07] Starting jail current-local Segmentation fault (core dumped) [00:00:08] Cleaning up [00:00:08] Unmounting file systems $ $ lldb /usr/sbin/jail --core /tmp/jail.core (lldb) target create "/usr/sbin/jail" --core "/tmp/jail.core" Core file '/tmp/jail.core' (x86_64) was loaded. (lldb) bt all * thread #1, name =3D 'jail', stop reason =3D signal SIGSEGV * frame #0: 0x000000000020c3fb jail`add_param(j=3D0x0000000800a09000, p= =3D, ipnum=3D, value=3D) at config.c= :399:16 frame #1: 0x0000000000207e08 jail`main(argc=3D8, argv=3D0x00007fffffffe= 8f0) at jail.c:0 frame #2: 0x0000000000206e10 jail`_start(ap=3D, cleanup=3D= ) at crt1_c.c:75:7 (lldb)=20 This works fine when I back out this change. Roman Bogorodskiy --GvXjxJ+pjyke8COw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEi6TfKtFPmbY34ABwyW1f/gjCImoFAl9GTjUACgkQyW1f/gjC ImoeOgf9F6jI1XL7GLVdbu+Us3qRhVnxcIdRd/L1aL/eWMCwv3TfFOuf9HnOkqiv 64kjuuAFu4VCL5afNYFYjuk7vaFTrC5/W1Kq8TS6bKyuEbck3e95V4HfKCjcahVS WZQJp4AIJqz2N1Bmv7jfk7f3zXj+K6hRwTI3AawxCyxFGEmr21+5KLwFRqi+htRl rYxk94vy43zAwU56pP3Jpl+Jxgu324r5cFIOJz6wCK/UN79kcCzq7NgiWiYTTrIv +BqdqhYmDgDdr4X14Fmq951RrpJgGTHiMCjilto5u5wDUMR7q/Z/ltxG8lzFmFOA dG7aMPbZebUO7wb+s0Jq9Uco/AONGg== =JUYG -----END PGP SIGNATURE----- --GvXjxJ+pjyke8COw-- From owner-svn-src-all@freebsd.org Wed Aug 26 12:49:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 770843D42B1; Wed, 26 Aug 2020 12:49:40 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc5Kc2csKz3gQ1; Wed, 26 Aug 2020 12:49:40 +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 3D484131BD; Wed, 26 Aug 2020 12:49:40 +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 07QCneb7021779; Wed, 26 Aug 2020 12:49:40 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QCneZQ021778; Wed, 26 Aug 2020 12:49:40 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008261249.07QCneZQ021778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 26 Aug 2020 12:49:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364810 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364810 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 12:49:40 -0000 Author: mjg Date: Wed Aug 26 12:49:39 2020 New Revision: 364810 URL: https://svnweb.freebsd.org/changeset/base/364810 Log: cache: factor dotdot lookup out of cache_lookup Tested by: pho Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Wed Aug 26 10:21:38 2020 (r364809) +++ head/sys/kern/vfs_cache.c Wed Aug 26 12:49:39 2020 (r364810) @@ -1273,14 +1273,10 @@ cache_zap_wlocked_bucket_kl(struct namecache *ncp, str } static void -cache_lookup_unlock(struct rwlock *blp, struct mtx *vlp) +cache_lookup_unlock(struct rwlock *blp) { - if (blp != NULL) { - rw_runlock(blp); - } else { - mtx_unlock(vlp); - } + rw_runlock(blp); } static int __noinline @@ -1320,6 +1316,111 @@ cache_lookup_dot(struct vnode *dvp, struct vnode **vpp } static __noinline int +cache_remove_cnp(struct vnode *dvp, struct componentname *cnp); + + +static int __noinline +cache_lookup_dotdot(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, + struct timespec *tsp, int *ticksp) +{ + struct namecache_ts *ncp_ts; + struct namecache *ncp; + struct mtx *dvlp; + enum vgetstate vs; + int error, ltype; + bool whiteout; + + MPASS((cnp->cn_flags & ISDOTDOT) != 0); + + if ((cnp->cn_flags & MAKEENTRY) == 0) { + cache_remove_cnp(dvp, cnp); + return (0); + } + + counter_u64_add(dotdothits, 1); +retry: + dvlp = VP2VNODELOCK(dvp); + mtx_lock(dvlp); + ncp = dvp->v_cache_dd; + if (ncp == NULL) { + SDT_PROBE3(vfs, namecache, lookup, miss, dvp, + "..", NULL); + mtx_unlock(dvlp); + return (0); + } + if ((ncp->nc_flag & NCF_ISDOTDOT) != 0) { + if (ncp->nc_flag & NCF_NEGATIVE) + *vpp = NULL; + else + *vpp = ncp->nc_vp; + } else + *vpp = ncp->nc_dvp; + /* Return failure if negative entry was found. */ + if (*vpp == NULL) + goto negative_success; + CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..", + dvp, cnp->cn_nameptr, *vpp); + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, "..", + *vpp); + cache_out_ts(ncp, tsp, ticksp); + if ((ncp->nc_flag & (NCF_ISDOTDOT | NCF_DTS)) == + NCF_DTS && tsp != NULL) { + ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc); + *tsp = ncp_ts->nc_dotdottime; + } + + /* + * On success we return a locked and ref'd vnode as per the lookup + * protocol. + */ + MPASS(dvp != *vpp); + ltype = 0; /* silence gcc warning */ + ltype = VOP_ISLOCKED(dvp); + VOP_UNLOCK(dvp); + vs = vget_prep(*vpp); + mtx_unlock(dvlp); + error = vget_finish(*vpp, cnp->cn_lkflags, vs); + vn_lock(dvp, ltype | LK_RETRY); + if (VN_IS_DOOMED(dvp)) { + if (error == 0) + vput(*vpp); + *vpp = NULL; + return (ENOENT); + } + if (error) { + *vpp = NULL; + goto retry; + } + if ((cnp->cn_flags & ISLASTCN) && + (cnp->cn_lkflags & LK_TYPE_MASK) == LK_EXCLUSIVE) { + ASSERT_VOP_ELOCKED(*vpp, "cache_lookup"); + } + return (-1); +negative_success: + if (__predict_false(cnp->cn_nameiop == CREATE)) { + counter_u64_add(numnegzaps, 1); + error = cache_zap_locked_vnode(ncp, dvp); + if (__predict_false(error != 0)) { + zap_and_exit_bucket_fail2++; + cache_maybe_yield(); + goto retry; + } + cache_free(ncp); + return (0); + } + + SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, ncp->nc_name); + cache_out_ts(ncp, tsp, ticksp); + counter_u64_add(numneghits, 1); + whiteout = (ncp->nc_flag & NCF_WHITE); + cache_negative_hit(ncp); + mtx_unlock(dvlp); + if (whiteout) + cnp->cn_flags |= ISWHITEOUT; + return (ENOENT); +} + +static __noinline int cache_remove_cnp(struct vnode *dvp, struct componentname *cnp) { struct namecache *ncp; @@ -1441,14 +1542,12 @@ int cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct timespec *tsp, int *ticksp) { - struct namecache_ts *ncp_ts; struct namecache *ncp; struct negstate *negstate; struct rwlock *blp; - struct mtx *dvlp; uint32_t hash; enum vgetstate vs; - int error, ltype; + int error; bool try_smr, doing_smr, whiteout; #ifdef DEBUG_CACHE @@ -1458,9 +1557,15 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st } #endif - if (__predict_false(cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.')) - return (cache_lookup_dot(dvp, vpp, cnp, tsp, ticksp)); + if (__predict_false(cnp->cn_nameptr[0] == '.')) { + if (cnp->cn_namelen == 1) + return (cache_lookup_dot(dvp, vpp, cnp, tsp, ticksp)); + if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') + return (cache_lookup_dotdot(dvp, vpp, cnp, tsp, ticksp)); + } + MPASS((cnp->cn_flags & ISDOTDOT) == 0); + if ((cnp->cn_flags & MAKEENTRY) == 0) { cache_remove_cnp(dvp, cnp); return (0); @@ -1472,42 +1577,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st retry: doing_smr = false; blp = NULL; - dvlp = NULL; error = 0; - if (cnp->cn_namelen == 2 && - cnp->cn_nameptr[0] == '.' && cnp->cn_nameptr[1] == '.') { - counter_u64_add(dotdothits, 1); - dvlp = VP2VNODELOCK(dvp); - mtx_lock(dvlp); - ncp = dvp->v_cache_dd; - if (ncp == NULL) { - SDT_PROBE3(vfs, namecache, lookup, miss, dvp, - "..", NULL); - mtx_unlock(dvlp); - return (0); - } - if ((ncp->nc_flag & NCF_ISDOTDOT) != 0) { - if (ncp->nc_flag & NCF_NEGATIVE) - *vpp = NULL; - else - *vpp = ncp->nc_vp; - } else - *vpp = ncp->nc_dvp; - /* Return failure if negative entry was found. */ - if (*vpp == NULL) - goto negative_success; - CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..", - dvp, cnp->cn_nameptr, *vpp); - SDT_PROBE3(vfs, namecache, lookup, hit, dvp, "..", - *vpp); - cache_out_ts(ncp, tsp, ticksp); - if ((ncp->nc_flag & (NCF_ISDOTDOT | NCF_DTS)) == - NCF_DTS && tsp != NULL) { - ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc); - *tsp = ncp_ts->nc_dotdottime; - } - goto success; - } hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp); retry_hashed: @@ -1549,17 +1619,11 @@ retry_hashed: SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ncp->nc_name, *vpp); cache_out_ts(ncp, tsp, ticksp); -success: /* * On success we return a locked and ref'd vnode as per the lookup * protocol. */ MPASS(dvp != *vpp); - ltype = 0; /* silence gcc warning */ - if (cnp->cn_flags & ISDOTDOT) { - ltype = VOP_ISLOCKED(dvp); - VOP_UNLOCK(dvp); - } if (doing_smr) { if (!cache_ncp_canuse(ncp)) { vfs_smr_exit(); @@ -1574,18 +1638,9 @@ success: } } else { vs = vget_prep(*vpp); - cache_lookup_unlock(blp, dvlp); + cache_lookup_unlock(blp); } error = vget_finish(*vpp, cnp->cn_lkflags, vs); - if (cnp->cn_flags & ISDOTDOT) { - vn_lock(dvp, ltype | LK_RETRY); - if (VN_IS_DOOMED(dvp)) { - if (error == 0) - vput(*vpp); - *vpp = NULL; - return (ENOENT); - } - } if (error) { *vpp = NULL; goto retry; @@ -1598,10 +1653,17 @@ success: negative_success: /* We found a negative match, and want to create it, so purge */ - if (cnp->cn_nameiop == CREATE) { + if (__predict_false(cnp->cn_nameiop == CREATE)) { MPASS(!doing_smr); counter_u64_add(numnegzaps, 1); - goto zap_and_exit; + error = cache_zap_rlocked_bucket(ncp, cnp, hash, blp); + if (__predict_false(error != 0)) { + zap_and_exit_bucket_fail2++; + cache_maybe_yield(); + goto retry; + } + cache_free(ncp); + return (0); } SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, ncp->nc_name); @@ -1623,25 +1685,11 @@ negative_success: vfs_smr_exit(); } else { cache_negative_hit(ncp); - cache_lookup_unlock(blp, dvlp); + cache_lookup_unlock(blp); } if (whiteout) cnp->cn_flags |= ISWHITEOUT; return (ENOENT); - -zap_and_exit: - MPASS(!doing_smr); - if (blp != NULL) - error = cache_zap_rlocked_bucket(ncp, cnp, hash, blp); - else - error = cache_zap_locked_vnode(ncp, dvp); - if (__predict_false(error != 0)) { - zap_and_exit_bucket_fail2++; - cache_maybe_yield(); - goto retry; - } - cache_free(ncp); - return (0); } struct celockstate { From owner-svn-src-all@freebsd.org Wed Aug 26 12:50:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B47273D4360; Wed, 26 Aug 2020 12:50:10 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc5LB4LZKz3gbc; Wed, 26 Aug 2020 12:50:10 +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 7994012EFC; Wed, 26 Aug 2020 12:50:10 +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 07QCoApt021883; Wed, 26 Aug 2020 12:50:10 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QCoAVr021882; Wed, 26 Aug 2020 12:50:10 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008261250.07QCoAVr021882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 26 Aug 2020 12:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364811 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364811 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 12:50:10 -0000 Author: mjg Date: Wed Aug 26 12:50:10 2020 New Revision: 364811 URL: https://svnweb.freebsd.org/changeset/base/364811 Log: cache: decouple smr and locked lookup in the slowpath Tested by: pho Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Wed Aug 26 12:49:39 2020 (r364810) +++ head/sys/kern/vfs_cache.c Wed Aug 26 12:50:10 2020 (r364811) @@ -1538,17 +1538,104 @@ out_no_entry: * .., dvp is unlocked. If we're looking up . an extra ref is taken, but the * lock is not recursively acquired. */ +static int __noinline +cache_lookup_fallback(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, + struct timespec *tsp, int *ticksp) +{ + struct namecache *ncp; + struct rwlock *blp; + uint32_t hash; + enum vgetstate vs; + int error; + bool whiteout; + + MPASS((cnp->cn_flags & (MAKEENTRY | ISDOTDOT)) == MAKEENTRY); + +retry: + hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp); + blp = HASH2BUCKETLOCK(hash); + rw_rlock(blp); + + CK_SLIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { + if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen && + !bcmp(ncp->nc_name, cnp->cn_nameptr, ncp->nc_nlen)) + break; + } + + /* We failed to find an entry */ + if (__predict_false(ncp == NULL)) { + rw_runlock(blp); + SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr, + NULL); + counter_u64_add(nummiss, 1); + return (0); + } + + if (ncp->nc_flag & NCF_NEGATIVE) + goto negative_success; + + /* We found a "positive" match, return the vnode */ + counter_u64_add(numposhits, 1); + *vpp = ncp->nc_vp; + CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p", + dvp, cnp->cn_nameptr, *vpp, ncp); + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ncp->nc_name, + *vpp); + cache_out_ts(ncp, tsp, ticksp); + /* + * On success we return a locked and ref'd vnode as per the lookup + * protocol. + */ + MPASS(dvp != *vpp); + vs = vget_prep(*vpp); + cache_lookup_unlock(blp); + error = vget_finish(*vpp, cnp->cn_lkflags, vs); + if (error) { + *vpp = NULL; + goto retry; + } + if ((cnp->cn_flags & ISLASTCN) && + (cnp->cn_lkflags & LK_TYPE_MASK) == LK_EXCLUSIVE) { + ASSERT_VOP_ELOCKED(*vpp, "cache_lookup"); + } + return (-1); + +negative_success: + /* We found a negative match, and want to create it, so purge */ + if (__predict_false(cnp->cn_nameiop == CREATE)) { + counter_u64_add(numnegzaps, 1); + error = cache_zap_rlocked_bucket(ncp, cnp, hash, blp); + if (__predict_false(error != 0)) { + zap_and_exit_bucket_fail2++; + cache_maybe_yield(); + goto retry; + } + cache_free(ncp); + return (0); + } + + SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, ncp->nc_name); + cache_out_ts(ncp, tsp, ticksp); + counter_u64_add(numneghits, 1); + whiteout = (ncp->nc_flag & NCF_WHITE); + cache_negative_hit(ncp); + cache_lookup_unlock(blp); + if (whiteout) + cnp->cn_flags |= ISWHITEOUT; + return (ENOENT); +} + int cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct timespec *tsp, int *ticksp) { struct namecache *ncp; struct negstate *negstate; - struct rwlock *blp; uint32_t hash; enum vgetstate vs; int error; - bool try_smr, doing_smr, whiteout; + bool whiteout; + u_short nc_flag; #ifdef DEBUG_CACHE if (__predict_false(!doingcache)) { @@ -1571,24 +1658,15 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st return (0); } - try_smr = true; + /* + * TODO: we only fallback becasue if a negative entry is found it will + * need to be purged. + */ if (cnp->cn_nameiop == CREATE) - try_smr = false; -retry: - doing_smr = false; - blp = NULL; - error = 0; + goto out_fallback; hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp); -retry_hashed: - if (try_smr) { - vfs_smr_enter(); - doing_smr = true; - try_smr = false; - } else { - blp = HASH2BUCKETLOCK(hash); - rw_rlock(blp); - } + vfs_smr_enter(); CK_SLIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen && @@ -1598,17 +1676,15 @@ retry_hashed: /* We failed to find an entry */ if (__predict_false(ncp == NULL)) { - if (doing_smr) - vfs_smr_exit(); - else - rw_runlock(blp); + vfs_smr_exit(); SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr, NULL); counter_u64_add(nummiss, 1); return (0); } - if (ncp->nc_flag & NCF_NEGATIVE) + nc_flag = atomic_load_char(&ncp->nc_flag); + if (nc_flag & NCF_NEGATIVE) goto negative_success; /* We found a "positive" match, return the vnode */ @@ -1624,26 +1700,21 @@ retry_hashed: * protocol. */ MPASS(dvp != *vpp); - if (doing_smr) { - if (!cache_ncp_canuse(ncp)) { - vfs_smr_exit(); - *vpp = NULL; - goto retry; - } - vs = vget_prep_smr(*vpp); + if (!cache_ncp_canuse(ncp)) { vfs_smr_exit(); - if (__predict_false(vs == VGET_NONE)) { - *vpp = NULL; - goto retry; - } - } else { - vs = vget_prep(*vpp); - cache_lookup_unlock(blp); + *vpp = NULL; + goto out_fallback; } + vs = vget_prep_smr(*vpp); + vfs_smr_exit(); + if (__predict_false(vs == VGET_NONE)) { + *vpp = NULL; + goto out_fallback; + } error = vget_finish(*vpp, cnp->cn_lkflags, vs); if (error) { *vpp = NULL; - goto retry; + goto out_fallback; } if ((cnp->cn_flags & ISLASTCN) && (cnp->cn_lkflags & LK_TYPE_MASK) == LK_EXCLUSIVE) { @@ -1652,44 +1723,25 @@ retry_hashed: return (-1); negative_success: - /* We found a negative match, and want to create it, so purge */ - if (__predict_false(cnp->cn_nameiop == CREATE)) { - MPASS(!doing_smr); - counter_u64_add(numnegzaps, 1); - error = cache_zap_rlocked_bucket(ncp, cnp, hash, blp); - if (__predict_false(error != 0)) { - zap_and_exit_bucket_fail2++; - cache_maybe_yield(); - goto retry; - } - cache_free(ncp); - return (0); - } - SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, ncp->nc_name); cache_out_ts(ncp, tsp, ticksp); counter_u64_add(numneghits, 1); whiteout = (ncp->nc_flag & NCF_WHITE); - - if (doing_smr) { - /* - * We need to take locks to promote an entry. - */ - negstate = NCP2NEGSTATE(ncp); - if ((negstate->neg_flag & NEG_HOT) == 0 || - !cache_ncp_canuse(ncp)) { - vfs_smr_exit(); - doing_smr = false; - goto retry_hashed; - } + /* + * We need to take locks to promote an entry. + */ + negstate = NCP2NEGSTATE(ncp); + if ((negstate->neg_flag & NEG_HOT) == 0 || + !cache_ncp_canuse(ncp)) { vfs_smr_exit(); - } else { - cache_negative_hit(ncp); - cache_lookup_unlock(blp); + goto out_fallback; } + vfs_smr_exit(); if (whiteout) cnp->cn_flags |= ISWHITEOUT; return (ENOENT); +out_fallback: + return (cache_lookup_fallback(dvp, vpp, cnp, tsp, ticksp)); } struct celockstate { From owner-svn-src-all@freebsd.org Wed Aug 26 12:50:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 76F2D3D4373; Wed, 26 Aug 2020 12:50:58 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc5M62dSBz3yKP; Wed, 26 Aug 2020 12:50:58 +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 264E813078; Wed, 26 Aug 2020 12:50:58 +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 07QCowgm024941; Wed, 26 Aug 2020 12:50:58 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QCow1S024940; Wed, 26 Aug 2020 12:50:58 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008261250.07QCow1S024940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 26 Aug 2020 12:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364812 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 12:50:58 -0000 Author: mjg Date: Wed Aug 26 12:50:57 2020 New Revision: 364812 URL: https://svnweb.freebsd.org/changeset/base/364812 Log: cache: only evict negative entries on CREATE when ISLASTCN is set Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Wed Aug 26 12:50:10 2020 (r364811) +++ head/sys/kern/vfs_cache.c Wed Aug 26 12:50:57 2020 (r364812) @@ -1398,15 +1398,17 @@ retry: return (-1); negative_success: if (__predict_false(cnp->cn_nameiop == CREATE)) { - counter_u64_add(numnegzaps, 1); - error = cache_zap_locked_vnode(ncp, dvp); - if (__predict_false(error != 0)) { - zap_and_exit_bucket_fail2++; - cache_maybe_yield(); - goto retry; + if (cnp->cn_flags & ISLASTCN) { + counter_u64_add(numnegzaps, 1); + error = cache_zap_locked_vnode(ncp, dvp); + if (__predict_false(error != 0)) { + zap_and_exit_bucket_fail2++; + cache_maybe_yield(); + goto retry; + } + cache_free(ncp); + return (0); } - cache_free(ncp); - return (0); } SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, ncp->nc_name); @@ -1603,15 +1605,17 @@ retry: negative_success: /* We found a negative match, and want to create it, so purge */ if (__predict_false(cnp->cn_nameiop == CREATE)) { - counter_u64_add(numnegzaps, 1); - error = cache_zap_rlocked_bucket(ncp, cnp, hash, blp); - if (__predict_false(error != 0)) { - zap_and_exit_bucket_fail2++; - cache_maybe_yield(); - goto retry; + if (cnp->cn_flags & ISLASTCN) { + counter_u64_add(numnegzaps, 1); + error = cache_zap_locked_vnode(ncp, dvp); + if (__predict_false(error != 0)) { + zap_and_exit_bucket_fail2++; + cache_maybe_yield(); + goto retry; + } + cache_free(ncp); + return (0); } - cache_free(ncp); - return (0); } SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, ncp->nc_name); @@ -1658,13 +1662,6 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st return (0); } - /* - * TODO: we only fallback becasue if a negative entry is found it will - * need to be purged. - */ - if (cnp->cn_nameiop == CREATE) - goto out_fallback; - hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp); vfs_smr_enter(); @@ -1723,6 +1720,13 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st return (-1); negative_success: + if (__predict_false(cnp->cn_nameiop == CREATE)) { + if (cnp->cn_flags & ISLASTCN) { + vfs_smr_exit(); + goto out_fallback; + } + } + SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, ncp->nc_name); cache_out_ts(ncp, tsp, ticksp); counter_u64_add(numneghits, 1); From owner-svn-src-all@freebsd.org Wed Aug 26 12:52:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E89B3D44D7; Wed, 26 Aug 2020 12:52:18 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc5Nf0MK4z3xw7; Wed, 26 Aug 2020 12:52:18 +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 E3B9E13621; Wed, 26 Aug 2020 12:52:17 +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 07QCqHWO027724; Wed, 26 Aug 2020 12:52:17 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QCqHsP027722; Wed, 26 Aug 2020 12:52:17 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008261252.07QCqHsP027722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 26 Aug 2020 12:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364813 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364813 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 12:52:18 -0000 Author: mjg Date: Wed Aug 26 12:52:17 2020 New Revision: 364813 URL: https://svnweb.freebsd.org/changeset/base/364813 Log: cache: convert bucketlocks to a mutex By now bucket locks are almost never taken for anything but writing and converting to mutex simplifies the code. Modified: head/sys/kern/subr_witness.c head/sys/kern/vfs_cache.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Wed Aug 26 12:50:57 2020 (r364812) +++ head/sys/kern/subr_witness.c Wed Aug 26 12:52:17 2020 (r364813) @@ -638,7 +638,7 @@ static struct witness_order_list_entry order_lists[] = * VFS namecache */ { "ncvn", &lock_class_mtx_sleep }, - { "ncbuc", &lock_class_rw }, + { "ncbuc", &lock_class_mtx_sleep }, { "vnode interlock", &lock_class_mtx_sleep }, { "ncneg", &lock_class_mtx_sleep }, { NULL, NULL }, Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Wed Aug 26 12:50:57 2020 (r364812) +++ head/sys/kern/vfs_cache.c Wed Aug 26 12:52:17 2020 (r364813) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -247,7 +246,7 @@ cache_ncp_canuse(struct namecache *ncp) * These locks are used (in the order in which they can be taken): * NAME TYPE ROLE * vnodelock mtx vnode lists and v_cache_dd field protection - * bucketlock rwlock for access to given set of hash buckets + * bucketlock mtx for access to given set of hash buckets * neglist mtx negative entry LRU management * * Additionally, ncneg_shrink_lock mtx is used to have at most one thread @@ -263,7 +262,8 @@ cache_ncp_canuse(struct namecache *ncp) * name -> vnode lookup requires the relevant bucketlock to be held for reading. * * Insertions and removals of entries require involved vnodes and bucketlocks - * to be write-locked to prevent other threads from seeing the entry. + * to be locked to provide safe operation against other threads modifying the + * cache. * * Some lookups result in removal of the found entry (e.g. getting rid of a * negative entry with the intent to create a positive one), which poses a @@ -336,9 +336,9 @@ NCP2NEGSTATE(struct namecache *ncp) #define numbucketlocks (ncbuckethash + 1) static u_int __read_mostly ncbuckethash; -static struct rwlock_padalign __read_mostly *bucketlocks; +static struct mtx_padalign __read_mostly *bucketlocks; #define HASH2BUCKETLOCK(hash) \ - ((struct rwlock *)(&bucketlocks[((hash) & ncbuckethash)])) + ((struct mtx *)(&bucketlocks[((hash) & ncbuckethash)])) #define numvnodelocks (ncvnodehash + 1) static u_int __read_mostly ncvnodehash; @@ -552,7 +552,7 @@ NCP2BUCKET(struct namecache *ncp) return (NCHHASH(hash)); } -static inline struct rwlock * +static inline struct mtx * NCP2BUCKETLOCK(struct namecache *ncp) { uint32_t hash; @@ -563,15 +563,25 @@ NCP2BUCKETLOCK(struct namecache *ncp) #ifdef INVARIANTS static void -cache_assert_bucket_locked(struct namecache *ncp, int mode) +cache_assert_bucket_locked(struct namecache *ncp) { - struct rwlock *blp; + struct mtx *blp; blp = NCP2BUCKETLOCK(ncp); - rw_assert(blp, mode); + mtx_assert(blp, MA_OWNED); } + +static void +cache_assert_bucket_unlocked(struct namecache *ncp) +{ + struct mtx *blp; + + blp = NCP2BUCKETLOCK(ncp); + mtx_assert(blp, MA_NOTOWNED); +} #else -#define cache_assert_bucket_locked(x, y) do { } while (0) +#define cache_assert_bucket_locked(x) do { } while (0) +#define cache_assert_bucket_unlocked(x) do { } while (0) #endif #define cache_sort_vnodes(x, y) _cache_sort_vnodes((void **)(x), (void **)(y)) @@ -595,7 +605,7 @@ cache_lock_all_buckets(void) u_int i; for (i = 0; i < numbucketlocks; i++) - rw_wlock(&bucketlocks[i]); + mtx_lock(&bucketlocks[i]); } static void @@ -604,7 +614,7 @@ cache_unlock_all_buckets(void) u_int i; for (i = 0; i < numbucketlocks; i++) - rw_wunlock(&bucketlocks[i]); + mtx_unlock(&bucketlocks[i]); } static void @@ -829,7 +839,7 @@ cache_negative_insert(struct namecache *ncp) struct neglist *neglist; MPASS(ncp->nc_flag & NCF_NEGATIVE); - cache_assert_bucket_locked(ncp, RA_WLOCKED); + cache_assert_bucket_locked(ncp); neglist = NCP2NEGLIST(ncp); mtx_lock(&neglist->nl_lock); TAILQ_INSERT_TAIL(&neglist->nl_list, ncp, nc_dst); @@ -845,7 +855,7 @@ cache_negative_remove(struct namecache *ncp) bool hot_locked = false; bool list_locked = false; - cache_assert_bucket_locked(ncp, RA_WLOCKED); + cache_assert_bucket_locked(ncp); neglist = NCP2NEGLIST(ncp); negstate = NCP2NEGSTATE(ncp); if ((negstate->neg_flag & NEG_HOT) != 0) { @@ -917,7 +927,7 @@ cache_negative_zap_one(void) struct neglist *neglist; struct negstate *negstate; struct mtx *dvlp; - struct rwlock *blp; + struct mtx *blp; if (mtx_owner(&ncneg_shrink_lock) != NULL || !mtx_trylock(&ncneg_shrink_lock)) { @@ -951,7 +961,7 @@ cache_negative_zap_one(void) blp = NCP2BUCKETLOCK(ncp); mtx_unlock(&neglist->nl_lock); mtx_lock(dvlp); - rw_wlock(blp); + mtx_lock(blp); /* * Enter SMR to safely check the negative list. * Even if the found pointer matches, the entry may now be reallocated @@ -970,7 +980,7 @@ cache_negative_zap_one(void) cache_zap_locked(ncp); counter_u64_add(numneg_evicted, 1); } - rw_wunlock(blp); + mtx_unlock(blp); mtx_unlock(dvlp); cache_free(ncp); } @@ -989,7 +999,7 @@ cache_zap_locked(struct namecache *ncp) if (!(ncp->nc_flag & NCF_NEGATIVE)) cache_assert_vnode_locked(ncp->nc_vp); cache_assert_vnode_locked(ncp->nc_dvp); - cache_assert_bucket_locked(ncp, RA_WLOCKED); + cache_assert_bucket_locked(ncp); CTR2(KTR_VFS, "cache_zap(%p) vp %p", ncp, (ncp->nc_flag & NCF_NEGATIVE) ? NULL : ncp->nc_vp); @@ -1031,16 +1041,16 @@ cache_zap_locked(struct namecache *ncp) static void cache_zap_negative_locked_vnode_kl(struct namecache *ncp, struct vnode *vp) { - struct rwlock *blp; + struct mtx *blp; MPASS(ncp->nc_dvp == vp); MPASS(ncp->nc_flag & NCF_NEGATIVE); cache_assert_vnode_locked(vp); blp = NCP2BUCKETLOCK(ncp); - rw_wlock(blp); + mtx_lock(blp); cache_zap_locked(ncp); - rw_wunlock(blp); + mtx_unlock(blp); } static bool @@ -1048,7 +1058,7 @@ cache_zap_locked_vnode_kl2(struct namecache *ncp, stru struct mtx **vlpp) { struct mtx *pvlp, *vlp1, *vlp2, *to_unlock; - struct rwlock *blp; + struct mtx *blp; MPASS(vp == ncp->nc_dvp || vp == ncp->nc_vp); cache_assert_vnode_locked(vp); @@ -1085,9 +1095,9 @@ cache_zap_locked_vnode_kl2(struct namecache *ncp, stru to_unlock = vlp1; } } - rw_wlock(blp); + mtx_lock(blp); cache_zap_locked(ncp); - rw_wunlock(blp); + mtx_unlock(blp); if (to_unlock != NULL) mtx_unlock(to_unlock); return (true); @@ -1105,7 +1115,7 @@ static int __noinline cache_zap_locked_vnode(struct namecache *ncp, struct vnode *vp) { struct mtx *pvlp, *vlp1, *vlp2, *to_unlock; - struct rwlock *blp; + struct mtx *blp; int error = 0; MPASS(vp == ncp->nc_dvp || vp == ncp->nc_vp); @@ -1131,9 +1141,9 @@ cache_zap_locked_vnode(struct namecache *ncp, struct v } to_unlock = vlp1; } - rw_wlock(blp); + mtx_lock(blp); cache_zap_locked(ncp); - rw_wunlock(blp); + mtx_unlock(blp); mtx_unlock(to_unlock); out: mtx_unlock(pvlp); @@ -1147,15 +1157,15 @@ out: static int cache_zap_unlocked_bucket(struct namecache *ncp, struct componentname *cnp, struct vnode *dvp, struct mtx *dvlp, struct mtx *vlp, uint32_t hash, - struct rwlock *blp) + struct mtx *blp) { struct namecache *rncp; - cache_assert_bucket_locked(ncp, RA_UNLOCKED); + cache_assert_bucket_unlocked(ncp); cache_sort_vnodes(&dvlp, &vlp); cache_lock_vnodes(dvlp, vlp); - rw_wlock(blp); + mtx_lock(blp); CK_SLIST_FOREACH(rncp, (NCHHASH(hash)), nc_hash) { if (rncp == ncp && rncp->nc_dvp == dvp && rncp->nc_nlen == cnp->cn_namelen && @@ -1164,25 +1174,25 @@ cache_zap_unlocked_bucket(struct namecache *ncp, struc } if (rncp != NULL) { cache_zap_locked(rncp); - rw_wunlock(blp); + mtx_unlock(blp); cache_unlock_vnodes(dvlp, vlp); counter_u64_add(zap_and_exit_bucket_relock_success, 1); return (0); } - rw_wunlock(blp); + mtx_unlock(blp); cache_unlock_vnodes(dvlp, vlp); return (EAGAIN); } static int __noinline -cache_zap_wlocked_bucket(struct namecache *ncp, struct componentname *cnp, - uint32_t hash, struct rwlock *blp) +cache_zap_locked_bucket(struct namecache *ncp, struct componentname *cnp, + uint32_t hash, struct mtx *blp) { struct mtx *dvlp, *vlp; struct vnode *dvp; - cache_assert_bucket_locked(ncp, RA_WLOCKED); + cache_assert_bucket_locked(ncp); dvlp = VP2VNODELOCK(ncp->nc_dvp); vlp = NULL; @@ -1190,50 +1200,23 @@ cache_zap_wlocked_bucket(struct namecache *ncp, struct vlp = VP2VNODELOCK(ncp->nc_vp); if (cache_trylock_vnodes(dvlp, vlp) == 0) { cache_zap_locked(ncp); - rw_wunlock(blp); + mtx_unlock(blp); cache_unlock_vnodes(dvlp, vlp); return (0); } dvp = ncp->nc_dvp; - rw_wunlock(blp); + mtx_unlock(blp); return (cache_zap_unlocked_bucket(ncp, cnp, dvp, dvlp, vlp, hash, blp)); } -static int __noinline -cache_zap_rlocked_bucket(struct namecache *ncp, struct componentname *cnp, - uint32_t hash, struct rwlock *blp) -{ - struct mtx *dvlp, *vlp; - struct vnode *dvp; - - cache_assert_bucket_locked(ncp, RA_RLOCKED); - - dvlp = VP2VNODELOCK(ncp->nc_dvp); - vlp = NULL; - if (!(ncp->nc_flag & NCF_NEGATIVE)) - vlp = VP2VNODELOCK(ncp->nc_vp); - if (cache_trylock_vnodes(dvlp, vlp) == 0) { - rw_runlock(blp); - rw_wlock(blp); - cache_zap_locked(ncp); - rw_wunlock(blp); - cache_unlock_vnodes(dvlp, vlp); - return (0); - } - - dvp = ncp->nc_dvp; - rw_runlock(blp); - return (cache_zap_unlocked_bucket(ncp, cnp, dvp, dvlp, vlp, hash, blp)); -} - static int -cache_zap_wlocked_bucket_kl(struct namecache *ncp, struct rwlock *blp, +cache_zap_locked_bucket_kl(struct namecache *ncp, struct mtx *blp, struct mtx **vlpp1, struct mtx **vlpp2) { struct mtx *dvlp, *vlp; - cache_assert_bucket_locked(ncp, RA_WLOCKED); + cache_assert_bucket_locked(ncp); dvlp = VP2VNODELOCK(ncp->nc_dvp); vlp = NULL; @@ -1262,23 +1245,16 @@ cache_zap_wlocked_bucket_kl(struct namecache *ncp, str return (0); } - rw_wunlock(blp); + mtx_unlock(blp); *vlpp1 = dvlp; *vlpp2 = vlp; if (*vlpp1 != NULL) mtx_lock(*vlpp1); mtx_lock(*vlpp2); - rw_wlock(blp); + mtx_lock(blp); return (EAGAIN); } -static void -cache_lookup_unlock(struct rwlock *blp) -{ - - rw_runlock(blp); -} - static int __noinline cache_lookup_dot(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct timespec *tsp, int *ticksp) @@ -1426,7 +1402,7 @@ static __noinline int cache_remove_cnp(struct vnode *dvp, struct componentname *cnp) { struct namecache *ncp; - struct rwlock *blp; + struct mtx *blp; struct mtx *dvlp, *dvlp2; uint32_t hash; int error; @@ -1474,7 +1450,7 @@ retry: if (CK_SLIST_EMPTY(NCHHASH(hash))) goto out_no_entry; - rw_wlock(blp); + mtx_lock(blp); CK_SLIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen && @@ -1484,11 +1460,11 @@ retry: /* We failed to find an entry */ if (ncp == NULL) { - rw_wunlock(blp); + mtx_unlock(blp); goto out_no_entry; } - error = cache_zap_wlocked_bucket(ncp, cnp, hash, blp); + error = cache_zap_locked_bucket(ncp, cnp, hash, blp); if (__predict_false(error != 0)) { zap_and_exit_bucket_fail++; cache_maybe_yield(); @@ -1545,7 +1521,7 @@ cache_lookup_fallback(struct vnode *dvp, struct vnode struct timespec *tsp, int *ticksp) { struct namecache *ncp; - struct rwlock *blp; + struct mtx *blp; uint32_t hash; enum vgetstate vs; int error; @@ -1556,7 +1532,7 @@ cache_lookup_fallback(struct vnode *dvp, struct vnode retry: hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp); blp = HASH2BUCKETLOCK(hash); - rw_rlock(blp); + mtx_lock(blp); CK_SLIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen && @@ -1566,7 +1542,7 @@ retry: /* We failed to find an entry */ if (__predict_false(ncp == NULL)) { - rw_runlock(blp); + mtx_unlock(blp); SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr, NULL); counter_u64_add(nummiss, 1); @@ -1590,7 +1566,7 @@ retry: */ MPASS(dvp != *vpp); vs = vget_prep(*vpp); - cache_lookup_unlock(blp); + mtx_unlock(blp); error = vget_finish(*vpp, cnp->cn_lkflags, vs); if (error) { *vpp = NULL; @@ -1623,7 +1599,7 @@ negative_success: counter_u64_add(numneghits, 1); whiteout = (ncp->nc_flag & NCF_WHITE); cache_negative_hit(ncp); - cache_lookup_unlock(blp); + mtx_unlock(blp); if (whiteout) cnp->cn_flags |= ISWHITEOUT; return (ENOENT); @@ -1750,7 +1726,7 @@ out_fallback: struct celockstate { struct mtx *vlp[3]; - struct rwlock *blp[2]; + struct mtx *blp[2]; }; CTASSERT((nitems(((struct celockstate *)0)->vlp) == 3)); CTASSERT((nitems(((struct celockstate *)0)->blp) == 2)); @@ -1839,8 +1815,8 @@ out: } static void -cache_lock_buckets_cel(struct celockstate *cel, struct rwlock *blp1, - struct rwlock *blp2) +cache_lock_buckets_cel(struct celockstate *cel, struct mtx *blp1, + struct mtx *blp2) { MPASS(cel->blp[0] == NULL); @@ -1849,10 +1825,10 @@ cache_lock_buckets_cel(struct celockstate *cel, struct cache_sort_vnodes(&blp1, &blp2); if (blp1 != NULL) { - rw_wlock(blp1); + mtx_lock(blp1); cel->blp[0] = blp1; } - rw_wlock(blp2); + mtx_lock(blp2); cel->blp[1] = blp2; } @@ -1861,8 +1837,8 @@ cache_unlock_buckets_cel(struct celockstate *cel) { if (cel->blp[0] != NULL) - rw_wunlock(cel->blp[0]); - rw_wunlock(cel->blp[1]); + mtx_unlock(cel->blp[0]); + mtx_unlock(cel->blp[1]); } /* @@ -1881,7 +1857,7 @@ cache_enter_lock(struct celockstate *cel, struct vnode uint32_t hash) { struct namecache *ncp; - struct rwlock *blps[2]; + struct mtx *blps[2]; blps[0] = HASH2BUCKETLOCK(hash); for (;;) { @@ -1922,7 +1898,7 @@ cache_enter_lock_dd(struct celockstate *cel, struct vn uint32_t hash) { struct namecache *ncp; - struct rwlock *blps[2]; + struct mtx *blps[2]; blps[0] = HASH2BUCKETLOCK(hash); for (;;) { @@ -2256,7 +2232,7 @@ nchinit(void *dummy __unused) bucketlocks = malloc(sizeof(*bucketlocks) * numbucketlocks, M_VFSCACHE, M_WAITOK | M_ZERO); for (i = 0; i < numbucketlocks; i++) - rw_init_flags(&bucketlocks[i], "ncbuc", RW_DUPOK | RW_RECURSE); + mtx_init(&bucketlocks[i], "ncbuc", NULL, MTX_DUPOK | MTX_RECURSE); ncvnodehash = ncbuckethash; vnodelocks = malloc(sizeof(*vnodelocks) * numvnodelocks, M_VFSCACHE, M_WAITOK | M_ZERO); @@ -2482,7 +2458,7 @@ cache_purgevfs(struct mount *mp, bool force) { TAILQ_HEAD(, namecache) ncps; struct mtx *vlp1, *vlp2; - struct rwlock *blp; + struct mtx *blp; struct nchashhead *bucket; struct namecache *ncp, *nnp; u_long i, j, n_nchash; @@ -2496,23 +2472,23 @@ cache_purgevfs(struct mount *mp, bool force) n_nchash = nchash + 1; vlp1 = vlp2 = NULL; for (i = 0; i < numbucketlocks; i++) { - blp = (struct rwlock *)&bucketlocks[i]; - rw_wlock(blp); + blp = (struct mtx *)&bucketlocks[i]; + mtx_lock(blp); for (j = i; j < n_nchash; j += numbucketlocks) { retry: bucket = &nchashtbl[j]; CK_SLIST_FOREACH_SAFE(ncp, bucket, nc_hash, nnp) { - cache_assert_bucket_locked(ncp, RA_WLOCKED); + cache_assert_bucket_locked(ncp); if (ncp->nc_dvp->v_mount != mp) continue; - error = cache_zap_wlocked_bucket_kl(ncp, blp, + error = cache_zap_locked_bucket_kl(ncp, blp, &vlp1, &vlp2); if (error != 0) goto retry; TAILQ_INSERT_HEAD(&ncps, ncp, nc_dst); } } - rw_wunlock(blp); + mtx_unlock(blp); if (vlp1 == NULL && vlp2 == NULL) cache_maybe_yield(); } From owner-svn-src-all@freebsd.org Wed Aug 26 12:52:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2172E3D4884; Wed, 26 Aug 2020 12:52:55 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc5PM05gTz3yDL; Wed, 26 Aug 2020 12:52:55 +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 DC20713711; Wed, 26 Aug 2020 12:52:54 +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 07QCqsj8027792; Wed, 26 Aug 2020 12:52:54 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QCqsPO027791; Wed, 26 Aug 2020 12:52:54 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008261252.07QCqsPO027791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 26 Aug 2020 12:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364814 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 12:52:55 -0000 Author: mjg Date: Wed Aug 26 12:52:54 2020 New Revision: 364814 URL: https://svnweb.freebsd.org/changeset/base/364814 Log: cache: make it mandatory to request both timestamps or neither Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Wed Aug 26 12:52:17 2020 (r364813) +++ head/sys/kern/vfs_cache.c Wed Aug 26 12:52:54 2020 (r364814) @@ -415,14 +415,12 @@ cache_out_ts(struct namecache *ncp, struct timespec *t (tsp == NULL && ticksp == NULL), ("No NCF_TS")); - if (tsp == NULL && ticksp == NULL) + if (tsp == NULL) return; ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc); - if (tsp != NULL) - *tsp = ncp_ts->nc_time; - if (ticksp != NULL) - *ticksp = ncp_ts->nc_ticks; + *tsp = ncp_ts->nc_time; + *ticksp = ncp_ts->nc_ticks; } #ifdef DEBUG_CACHE @@ -1616,6 +1614,8 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st int error; bool whiteout; u_short nc_flag; + + MPASS((tsp == NULL && ticksp == NULL) || (tsp != NULL && ticksp != NULL)); #ifdef DEBUG_CACHE if (__predict_false(!doingcache)) { From owner-svn-src-all@freebsd.org Wed Aug 26 12:53:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 273C33D45CA; Wed, 26 Aug 2020 12:53:17 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc5Pn0DGhz3yCS; Wed, 26 Aug 2020 12:53:17 +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 DF35313691; Wed, 26 Aug 2020 12:53:16 +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 07QCrGm2027860; Wed, 26 Aug 2020 12:53:16 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QCrGWr027859; Wed, 26 Aug 2020 12:53:16 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008261253.07QCrGWr027859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 26 Aug 2020 12:53:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364815 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 12:53:17 -0000 Author: mjg Date: Wed Aug 26 12:53:16 2020 New Revision: 364815 URL: https://svnweb.freebsd.org/changeset/base/364815 Log: cache: stop null checking in cache_free Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Wed Aug 26 12:52:54 2020 (r364814) +++ head/sys/kern/vfs_cache.c Wed Aug 26 12:53:16 2020 (r364815) @@ -388,8 +388,7 @@ cache_free(struct namecache *ncp) { struct namecache_ts *ncp_ts; - if (ncp == NULL) - return; + MPASS(ncp != NULL); if ((ncp->nc_flag & NCF_DVDROP) != 0) vdrop(ncp->nc_dvp); if (__predict_false(ncp->nc_flag & NCF_TS)) { @@ -980,7 +979,8 @@ cache_negative_zap_one(void) } mtx_unlock(blp); mtx_unlock(dvlp); - cache_free(ncp); + if (ncp != NULL) + cache_free(ncp); } /* @@ -1962,7 +1962,8 @@ cache_enter_dotdot_prep(struct vnode *dvp, struct vnod dvp->v_cache_dd = NULL; vn_seqc_write_end(dvp); cache_enter_unlock(&cel); - cache_free(ncp); + if (ncp != NULL) + cache_free(ncp); } /* @@ -2158,7 +2159,8 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, cache_enter_unlock(&cel); if (numneg * ncnegfactor > lnumcache) cache_negative_zap_one(); - cache_free(ndd); + if (ndd != NULL) + cache_free(ndd); return; out_unlock_free: cache_enter_unlock(&cel); From owner-svn-src-all@freebsd.org Wed Aug 26 12:54:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B1D7C3D464A; Wed, 26 Aug 2020 12:54:18 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc5Qy4KHWz3yTF; Wed, 26 Aug 2020 12:54:18 +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 78AC7135DD; Wed, 26 Aug 2020 12:54:18 +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 07QCsIEr027945; Wed, 26 Aug 2020 12:54:18 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QCsIbx027944; Wed, 26 Aug 2020 12:54:18 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008261254.07QCsIbx027944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 26 Aug 2020 12:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364816 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 12:54:18 -0000 Author: mjg Date: Wed Aug 26 12:54:18 2020 New Revision: 364816 URL: https://svnweb.freebsd.org/changeset/base/364816 Log: cache: relock on failure in cache_zap_locked_vnode This gets rid of bogus scheme of yielding in hopes the blocking thread will make progress. Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Wed Aug 26 12:53:16 2020 (r364815) +++ head/sys/kern/vfs_cache.c Wed Aug 26 12:54:18 2020 (r364816) @@ -1134,8 +1134,15 @@ cache_zap_locked_vnode(struct namecache *ncp, struct v to_unlock = vlp2; } else { if (!mtx_trylock(vlp1)) { - error = EAGAIN; - goto out; + /* + * TODO: Very wasteful but rare. + */ + mtx_unlock(pvlp); + mtx_lock(vlp1); + mtx_lock(vlp2); + mtx_unlock(vlp2); + mtx_unlock(vlp1); + return (EAGAIN); } to_unlock = vlp1; } @@ -1377,7 +1384,6 @@ negative_success: error = cache_zap_locked_vnode(ncp, dvp); if (__predict_false(error != 0)) { zap_and_exit_bucket_fail2++; - cache_maybe_yield(); goto retry; } cache_free(ncp); @@ -1465,7 +1471,6 @@ retry: error = cache_zap_locked_bucket(ncp, cnp, hash, blp); if (__predict_false(error != 0)) { zap_and_exit_bucket_fail++; - cache_maybe_yield(); goto retry; } counter_u64_add(numposzaps, 1); @@ -1584,7 +1589,6 @@ negative_success: error = cache_zap_locked_vnode(ncp, dvp); if (__predict_false(error != 0)) { zap_and_exit_bucket_fail2++; - cache_maybe_yield(); goto retry; } cache_free(ncp); From owner-svn-src-all@freebsd.org Wed Aug 26 13:13:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4901E3D4D21; Wed, 26 Aug 2020 13:13:59 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc5sg1BDGz40Pm; Wed, 26 Aug 2020 13:13:59 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BDDA13741; Wed, 26 Aug 2020 13:13:59 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QDDwBE040124; Wed, 26 Aug 2020 13:13:58 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QDDwRm040119; Wed, 26 Aug 2020 13:13:58 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202008261313.07QDDwRm040119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 26 Aug 2020 13:13:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364817 - head/libexec/rc/rc.d X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/libexec/rc/rc.d X-SVN-Commit-Revision: 364817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 13:13:59 -0000 Author: cy Date: Wed Aug 26 13:13:57 2020 New Revision: 364817 URL: https://svnweb.freebsd.org/changeset/base/364817 Log: As of r364746 (OpenZFS import) existing ZPOOLs are not imported prior to zvol and mountcritlocal resulting in ZVOLs (swap and virtual machine UFS filesystems) being unavailable, leading to boot failures. We move the zpool import from zfs to a new zpool script, with the -N option to avoid mounting datasets while making the ZPOOL's datasets available for "legacy" mount (mountpoint=legacy) and ZVOLs available for subsequent use for swap (in the zvol rc sript) or for UFS or other filesystems in fstab(5), mounted by mountcritlocal. Reviewed by: freqlabs (previous version) Differential Revision: https://reviews.freebsd.org/D26185 Added: head/libexec/rc/rc.d/zpool (contents, props changed) Modified: head/libexec/rc/rc.d/Makefile head/libexec/rc/rc.d/mountcritlocal head/libexec/rc/rc.d/zfs head/libexec/rc/rc.d/zvol Modified: head/libexec/rc/rc.d/Makefile ============================================================================== --- head/libexec/rc/rc.d/Makefile Wed Aug 26 12:54:18 2020 (r364816) +++ head/libexec/rc/rc.d/Makefile Wed Aug 26 13:13:57 2020 (r364817) @@ -318,6 +318,7 @@ CONFGROUPS+= ZFS ZFS+= zfs ZFS+= zfsbe ZFS+= zfsd +ZFS+= zpool ZFS+= zvol .endif Modified: head/libexec/rc/rc.d/mountcritlocal ============================================================================== --- head/libexec/rc/rc.d/mountcritlocal Wed Aug 26 12:54:18 2020 (r364816) +++ head/libexec/rc/rc.d/mountcritlocal Wed Aug 26 13:13:57 2020 (r364817) @@ -4,7 +4,7 @@ # # PROVIDE: mountcritlocal -# REQUIRE: root hostid_save mdconfig +# REQUIRE: root hostid_save mdconfig zvol # KEYWORD: nojail shutdown . /etc/rc.subr Modified: head/libexec/rc/rc.d/zfs ============================================================================== --- head/libexec/rc/rc.d/zfs Wed Aug 26 12:54:18 2020 (r364816) +++ head/libexec/rc/rc.d/zfs Wed Aug 26 13:13:57 2020 (r364817) @@ -25,13 +25,6 @@ zfs_start_jail() zfs_start_main() { - local cachefile - - for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do - if [ -r $cachefile ]; then - zpool import -c $cachefile -a - fi - done zfs mount -va zfs share -a if [ ! -r /etc/zfs/exports ]; then Added: head/libexec/rc/rc.d/zpool ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rc/rc.d/zpool Wed Aug 26 13:13:57 2020 (r364817) @@ -0,0 +1,31 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: zpool +# REQUIRE: hostid +# BEFORE: zvol mountcritlocal +# KEYWORD: nojail + +. /etc/rc.subr + +name="zpool" +desc="Import ZPOOLs" +rcvar="zfs_enable" +start_cmd="zpool_start" +required_modules="zfs" + +zpool_start() +{ + local cachefile + + for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do + if [ -r $cachefile ]; then + zpool import -c $cachefile -a -N + fi + done +} + +load_rc_config $name +run_rc_command "$1" Modified: head/libexec/rc/rc.d/zvol ============================================================================== --- head/libexec/rc/rc.d/zvol Wed Aug 26 12:54:18 2020 (r364816) +++ head/libexec/rc/rc.d/zvol Wed Aug 26 13:13:57 2020 (r364817) @@ -4,7 +4,7 @@ # # PROVIDE: zvol -# REQUIRE: hostid +# REQUIRE: zpool # BEFORE: dumpon # KEYWORD: nojail From owner-svn-src-all@freebsd.org Wed Aug 26 14:02:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15FF23D5D3C; Wed, 26 Aug 2020 14:02:39 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc6xp6tbnz431T; Wed, 26 Aug 2020 14:02:38 +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 CFCF814068; Wed, 26 Aug 2020 14:02:38 +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 07QE2c3l072481; Wed, 26 Aug 2020 14:02:38 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QE2c58072480; Wed, 26 Aug 2020 14:02:38 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202008261402.07QE2c58072480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 26 Aug 2020 14:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364818 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 364818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 14:02:39 -0000 Author: tsoome Date: Wed Aug 26 14:02:38 2020 New Revision: 364818 URL: https://svnweb.freebsd.org/changeset/base/364818 Log: efibootmgr: wrong check for opts.order opts.order && !(opts.order) does not really make sense. Reported by: swildner Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Wed Aug 26 13:13:57 2020 (r364817) +++ head/usr.sbin/efibootmgr/efibootmgr.c Wed Aug 26 14:02:38 2020 (r364818) @@ -295,7 +295,7 @@ parse_args(int argc, char *argv[]) return; } - if (opts.order && !(opts.order)) + if (opts.order != NULL && *opts.order == '\0') errx(1, "%s", ORDER_USAGE); if ((opts.set_inactive || opts.set_active) && !opts.has_bootnum) From owner-svn-src-all@freebsd.org Wed Aug 26 14:31:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A0113D63BD; Wed, 26 Aug 2020 14:31:36 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc7bD3CPZz44Nk; Wed, 26 Aug 2020 14:31:36 +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 514D51492B; Wed, 26 Aug 2020 14:31:36 +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 07QEVaWB090753; Wed, 26 Aug 2020 14:31:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QEVals090752; Wed, 26 Aug 2020 14:31:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008261431.07QEVals090752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 26 Aug 2020 14:31:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364819 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364819 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 14:31:36 -0000 Author: markj Date: Wed Aug 26 14:31:35 2020 New Revision: 364819 URL: https://svnweb.freebsd.org/changeset/base/364819 Log: vmem: Avoid allocating span tags when segments are never released. vmem uses span tags to delimit imported segments, so that they can be released if the segment becomes free in the future. However, the per-domain kernel KVA arenas never release resources, so the span tags between imported ranges are unused when the ranges are contiguous. Furthermore, such span tags prevent coalescing of free segments across KVA_QUANTUM boundaries, resulting in internal fragmentation which inhibits superpage promotion in the kernel map. Stop allocating span tags in arenas that never release resources. This saves a small amount of memory and allows free segements to coalesce across import boundaries. This manifests as improved kernel superpage usage during poudriere runs, which also helps to reduce physical memory fragmentation by reducing the number of broken partially populated reservations. Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24548 Modified: head/sys/kern/subr_vmem.c Modified: head/sys/kern/subr_vmem.c ============================================================================== --- head/sys/kern/subr_vmem.c Wed Aug 26 14:02:38 2020 (r364818) +++ head/sys/kern/subr_vmem.c Wed Aug 26 14:31:35 2020 (r364819) @@ -249,6 +249,18 @@ static struct vmem memguard_arena_storage; vmem_t *memguard_arena = &memguard_arena_storage; #endif +static bool +bt_isbusy(bt_t *bt) +{ + return (bt->bt_type == BT_TYPE_BUSY); +} + +static bool +bt_isfree(bt_t *bt) +{ + return (bt->bt_type == BT_TYPE_FREE); +} + /* * Fill the vmem's boundary tag cache. We guarantee that boundary tag * allocation will not fail once bt_fill() passes. To do so we cache @@ -795,25 +807,49 @@ SYSINIT(vfs, SI_SUB_CONFIGURE, SI_ORDER_ANY, vmem_star static void vmem_add1(vmem_t *vm, vmem_addr_t addr, vmem_size_t size, int type) { - bt_t *btspan; - bt_t *btfree; + bt_t *btfree, *btprev, *btspan; + VMEM_ASSERT_LOCKED(vm); MPASS(type == BT_TYPE_SPAN || type == BT_TYPE_SPAN_STATIC); MPASS((size & vm->vm_quantum_mask) == 0); - btspan = bt_alloc(vm); - btspan->bt_type = type; - btspan->bt_start = addr; - btspan->bt_size = size; - bt_insseg_tail(vm, btspan); + if (vm->vm_releasefn == NULL) { + /* + * The new segment will never be released, so see if it is + * contiguous with respect to an existing segment. In this case + * a span tag is not needed, and it may be possible now or in + * the future to coalesce the new segment with an existing free + * segment. + */ + btprev = TAILQ_LAST(&vm->vm_seglist, vmem_seglist); + if ((!bt_isbusy(btprev) && !bt_isfree(btprev)) || + btprev->bt_start + btprev->bt_size != addr) + btprev = NULL; + } else { + btprev = NULL; + } - btfree = bt_alloc(vm); - btfree->bt_type = BT_TYPE_FREE; - btfree->bt_start = addr; - btfree->bt_size = size; - bt_insseg(vm, btfree, btspan); - bt_insfree(vm, btfree); + if (btprev == NULL || bt_isbusy(btprev)) { + if (btprev == NULL) { + btspan = bt_alloc(vm); + btspan->bt_type = type; + btspan->bt_start = addr; + btspan->bt_size = size; + bt_insseg_tail(vm, btspan); + } + btfree = bt_alloc(vm); + btfree->bt_type = BT_TYPE_FREE; + btfree->bt_start = addr; + btfree->bt_size = size; + bt_insseg_tail(vm, btfree); + bt_insfree(vm, btfree); + } else { + bt_remfree(vm, btprev); + btprev->bt_size += size; + bt_insfree(vm, btprev); + } + vm->vm_size += size; } @@ -1147,6 +1183,7 @@ vmem_set_import(vmem_t *vm, vmem_import_t *importfn, { VMEM_LOCK(vm); + KASSERT(vm->vm_size == 0, ("%s: arena is non-empty", __func__)); vm->vm_importfn = importfn; vm->vm_releasefn = releasefn; vm->vm_arg = arg; From owner-svn-src-all@freebsd.org Wed Aug 26 14:31:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B12173D63C0; Wed, 26 Aug 2020 14:31:48 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc7bS4Kh7z44Wt; Wed, 26 Aug 2020 14:31:48 +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 7346A145C4; Wed, 26 Aug 2020 14:31:48 +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 07QEVmCh090832; Wed, 26 Aug 2020 14:31:48 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QEVmrO090831; Wed, 26 Aug 2020 14:31:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008261431.07QEVmrO090831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 26 Aug 2020 14:31:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364820 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 364820 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 14:31:48 -0000 Author: markj Date: Wed Aug 26 14:31:48 2020 New Revision: 364820 URL: https://svnweb.freebsd.org/changeset/base/364820 Log: Use a large kmem arena import size on NUMA systems. This helps minimize internal fragmentation that occurs when 2MB imports are interleaved across NUMA domains. Virtually all KVA allocations on direct map platforms consume more than one page, so the fragmentation manifests as runs of 511 4KB page mappings in the kernel. Reviewed by: alc, kib Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26050 Modified: head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Wed Aug 26 14:31:35 2020 (r364819) +++ head/sys/vm/vm_kern.c Wed Aug 26 14:31:48 2020 (r364820) @@ -128,6 +128,7 @@ SYSCTL_ULONG(_vm, OID_AUTO, max_kernel_address, CTLFLA #define KVA_QUANTUM_SHIFT (8 + PAGE_SHIFT) #endif #define KVA_QUANTUM (1 << KVA_QUANTUM_SHIFT) +#define KVA_NUMA_IMPORT_QUANTUM (KVA_QUANTUM * 128) extern void uma_startup2(void); @@ -745,6 +746,7 @@ kva_import_domain(void *arena, vmem_size_t size, int f void kmem_init(vm_offset_t start, vm_offset_t end) { + vm_size_t quantum; int domain; vm_map_init(kernel_map, kernel_pmap, VM_MIN_KERNEL_ADDRESS, end); @@ -774,10 +776,20 @@ kmem_init(vm_offset_t start, vm_offset_t end) vm_map_unlock(kernel_map); /* + * Use a large import quantum on NUMA systems. This helps minimize + * interleaving of superpages, reducing internal fragmentation within + * the per-domain arenas. + */ + if (vm_ndomains > 1 && PMAP_HAS_DMAP) + quantum = KVA_NUMA_IMPORT_QUANTUM; + else + quantum = KVA_QUANTUM; + + /* * Initialize the kernel_arena. This can grow on demand. */ vmem_init(kernel_arena, "kernel arena", 0, 0, PAGE_SIZE, 0, 0); - vmem_set_import(kernel_arena, kva_import, NULL, NULL, KVA_QUANTUM); + vmem_set_import(kernel_arena, kva_import, NULL, NULL, quantum); for (domain = 0; domain < vm_ndomains; domain++) { /* @@ -789,13 +801,15 @@ kmem_init(vm_offset_t start, vm_offset_t end) vm_dom[domain].vmd_kernel_arena = vmem_create( "kernel arena domain", 0, 0, PAGE_SIZE, 0, M_WAITOK); vmem_set_import(vm_dom[domain].vmd_kernel_arena, - kva_import_domain, NULL, kernel_arena, KVA_QUANTUM); + kva_import_domain, NULL, kernel_arena, quantum); /* * In architectures with superpages, maintain separate arenas * for allocations with permissions that differ from the * "standard" read/write permissions used for kernel memory, * so as not to inhibit superpage promotion. + * + * Use the base import quantum since this arena is rarely used. */ #if VM_NRESERVLEVEL > 0 vm_dom[domain].vmd_kernel_rwx_arena = vmem_create( From owner-svn-src-all@freebsd.org Wed Aug 26 15:43:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 623823D7ED6; Wed, 26 Aug 2020 15:43:45 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bc9BT1zk8z49yK; Wed, 26 Aug 2020 15:43:45 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 276A3157E4; Wed, 26 Aug 2020 15:43:45 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QFhjDx045549; Wed, 26 Aug 2020 15:43:45 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QFhjH9045548; Wed, 26 Aug 2020 15:43:45 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202008261543.07QFhjH9045548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Wed, 26 Aug 2020 15:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364821 - head/cddl/sbin/zpool X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: head/cddl/sbin/zpool X-SVN-Commit-Revision: 364821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 15:43:45 -0000 Author: freqlabs Date: Wed Aug 26 15:43:44 2020 New Revision: 364821 URL: https://svnweb.freebsd.org/changeset/base/364821 Log: Install zfs-events.5 Sponsored by: iXsystems, Inc. Modified: head/cddl/sbin/zpool/Makefile Modified: head/cddl/sbin/zpool/Makefile ============================================================================== --- head/cddl/sbin/zpool/Makefile Wed Aug 26 14:31:48 2020 (r364820) +++ head/cddl/sbin/zpool/Makefile Wed Aug 26 15:43:44 2020 (r364821) @@ -12,6 +12,7 @@ PACKAGE= runtime PROG= zpool MAN= \ spl-module-parameters.5 \ + zfs-events.5 \ zfs-module-parameters.5 \ zpool.8 \ zpool-add.8 \ From owner-svn-src-all@freebsd.org Wed Aug 26 16:32:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6D96F3B165B; Wed, 26 Aug 2020 16:32:27 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcBGg2L8Kz4FjH; Wed, 26 Aug 2020 16:32:27 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 343C6212DD; Wed, 26 Aug 2020 16:32:27 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f174.google.com with SMTP id c12so1844812qtn.9; Wed, 26 Aug 2020 09:32:27 -0700 (PDT) X-Gm-Message-State: AOAM531VDah+kGMm437OQFEJSLXnbpRYGMo4oLBAhjir9SdgvJjjEQgy X48aKBpQiioeINAdkOeHaShingQICUNQ0RbtCdY= X-Google-Smtp-Source: ABdhPJy56ZAOpVxBYbPq6oDBFpW1gJf2ey6iFUY6krpSJYl8uhIJQ8KQ1cEKGMMm5kw0XX6/CwMRL5UlfBvH+G4JpDM= X-Received: by 2002:ac8:70cd:: with SMTP id g13mr14968212qtp.53.1598459546769; Wed, 26 Aug 2020 09:32:26 -0700 (PDT) MIME-Version: 1.0 References: <202008260043.07Q0h0kH077834@repo.freebsd.org> <20200826115743.GA1791@kloomba> In-Reply-To: <20200826115743.GA1791@kloomba> From: Kyle Evans Date: Wed, 26 Aug 2020 11:32:14 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r364791 - head/usr.sbin/jail To: Roman Bogorodskiy Cc: Jamie Gritton , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 16:32:27 -0000 On Wed, Aug 26, 2020 at 6:58 AM Roman Bogorodskiy wrote: > > Jamie Gritton wrote: > > > Author: jamie > > Date: Wed Aug 26 00:42:59 2020 > > New Revision: 364791 > > URL: https://svnweb.freebsd.org/changeset/base/364791 > > > > Log: > > Handle jail.conf variables that have the same names as parameters. > > > > PR: 248444 > > Submitted by: Akos Somfai > > Reported by: Markus Stoff > > > > Modified: > > head/usr.sbin/jail/config.c > > > > Modified: head/usr.sbin/jail/config.c > > ============================================================================== > > --- head/usr.sbin/jail/config.c Wed Aug 26 00:31:59 2020 (r364790) > > +++ head/usr.sbin/jail/config.c Wed Aug 26 00:42:59 2020 (r364791) > > @@ -393,7 +393,8 @@ add_param(struct cfjail *j, const struct cfparam *p, e > > else > > for (ipnum = IP__NULL + 1; ipnum < IP_NPARAM; ipnum++) > > if (!(intparams[ipnum].flags & PF_CONV) && > > - equalopts(name, intparams[ipnum].name)) { > > + equalopts(name, intparams[ipnum].name) && > > + !(p->flags & PF_VAR)) { > > j->intparams[ipnum] = np; > > np->flags |= intparams[ipnum].flags; > > break; > > Looks like it's causing jail(8) to segfault, at least when using with > poudriere: > It looks like it's also wiped out a good chunk of the test suite, as reported by lwhsu: https://ci.freebsd.org/job/FreeBSD-head-amd64-test/16305/testReport/ From owner-svn-src-all@freebsd.org Wed Aug 26 16:34:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89CB13B1755; Wed, 26 Aug 2020 16:34:56 +0000 (UTC) (envelope-from jamie@freebsd.org) Received: from gritton.org (gritton.org [199.192.165.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcBKX2gj0z4FyC; Wed, 26 Aug 2020 16:34:56 +0000 (UTC) (envelope-from jamie@freebsd.org) Received: from gritton.org ([127.0.0.131]) (authenticated bits=0) by gritton.org (8.15.2/8.15.2) with ESMTPA id 07QGYtat018444; Wed, 26 Aug 2020 09:34:55 -0700 (PDT) (envelope-from jamie@freebsd.org) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 26 Aug 2020 09:34:55 -0700 From: James Gritton To: Kyle Evans Cc: Roman Bogorodskiy , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r364791 - head/usr.sbin/jail In-Reply-To: References: <202008260043.07Q0h0kH077834@repo.freebsd.org> <20200826115743.GA1791@kloomba> User-Agent: Roundcube Webmail/1.4.1 Message-ID: <85c530bbdd61107631f305fa06b0dd48@freebsd.org> X-Sender: jamie@freebsd.org X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (gritton.org [127.0.0.131]); Wed, 26 Aug 2020 10:34:55 -0600 (MDT) X-Rspamd-Queue-Id: 4BcBKX2gj0z4FyC X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:30247, ipnet:199.192.164.0/22, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 16:34:56 -0000 On 2020-08-26 09:32, Kyle Evans wrote: > On Wed, Aug 26, 2020 at 6:58 AM Roman Bogorodskiy > wrote: >> >> Jamie Gritton wrote: >> >> > Author: jamie >> > Date: Wed Aug 26 00:42:59 2020 >> > New Revision: 364791 >> > URL: https://svnweb.freebsd.org/changeset/base/364791 >> > >> > Log: >> > Handle jail.conf variables that have the same names as parameters. >> > >> > PR: 248444 >> > Submitted by: Akos Somfai >> > Reported by: Markus Stoff >> > >> > Modified: >> > head/usr.sbin/jail/config.c >> > >> > Modified: head/usr.sbin/jail/config.c >> > ============================================================================== >> > --- head/usr.sbin/jail/config.c Wed Aug 26 00:31:59 2020 (r364790) >> > +++ head/usr.sbin/jail/config.c Wed Aug 26 00:42:59 2020 (r364791) >> > @@ -393,7 +393,8 @@ add_param(struct cfjail *j, const struct cfparam *p, e >> > else >> > for (ipnum = IP__NULL + 1; ipnum < IP_NPARAM; ipnum++) >> > if (!(intparams[ipnum].flags & PF_CONV) && >> > - equalopts(name, intparams[ipnum].name)) { >> > + equalopts(name, intparams[ipnum].name) && >> > + !(p->flags & PF_VAR)) { >> > j->intparams[ipnum] = np; >> > np->flags |= intparams[ipnum].flags; >> > break; >> >> Looks like it's causing jail(8) to segfault, at least when using with >> poudriere: >> > > It looks like it's also wiped out a good chunk of the test suite, as > reported by lwhsu: > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/16305/testReport/ Ooh - I killed things nicely, didn't I? I'll get on that. - Jamie From owner-svn-src-all@freebsd.org Wed Aug 26 16:55:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9898F3B2A55; Wed, 26 Aug 2020 16:55:33 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcBnK3xBZz4JD0; Wed, 26 Aug 2020 16:55:33 +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 51FDA161B4; Wed, 26 Aug 2020 16:55:33 +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 07QGtXq6097015; Wed, 26 Aug 2020 16:55:33 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QGtSZx096979; Wed, 26 Aug 2020 16:55:28 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202008261655.07QGtSZx096979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 26 Aug 2020 16:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm X-SVN-Commit-Revision: 364822 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 16:55:33 -0000 Author: jkim Date: Wed Aug 26 16:55:28 2020 New Revision: 364822 URL: https://svnweb.freebsd.org/changeset/base/364822 Log: Fix Clang version detection. We prepend "FreeBSD" to Clang version string. This broke compiler test for AVX instruction support. Reported by: jhb Modified: head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl head/crypto/openssl/crypto/bn/asm/x86_64-mont.pl head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl head/crypto/openssl/crypto/chacha/asm/chacha-x86.pl head/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl head/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl head/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl head/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl head/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl head/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl head/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl head/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl head/crypto/openssl/crypto/sha/asm/sha1-586.pl head/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl head/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl head/crypto/openssl/crypto/sha/asm/sha256-586.pl head/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl head/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl Modified: head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -70,7 +70,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -108,7 +108,7 @@ $avx=1 if (!$avx && $win64 && ($flavour =~ /nasm/ || $ $avx=1 if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) && `ml64 2>&1` =~ /Version ([0-9]+)\./ && $1>=10); -$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0); +$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0); $shaext=1; ### set to zero if compiling for 1.0.1 Modified: head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -70,7 +70,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=12); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl ============================================================================== --- head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -66,7 +66,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $addx = ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([0-9]+)\.([0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) ([0-9]+)\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $avx = ($ver>=3.0) + ($ver>=3.01); $addx = ($ver>=3.03); Modified: head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -81,7 +81,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $addx = ($ver>=3.03); } Modified: head/crypto/openssl/crypto/bn/asm/x86_64-mont.pl ============================================================================== --- head/crypto/openssl/crypto/bn/asm/x86_64-mont.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/bn/asm/x86_64-mont.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -75,7 +75,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $addx = ($ver>=3.03); } Modified: head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl ============================================================================== --- head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -60,7 +60,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $addx = ($ver>=3.03); } Modified: head/crypto/openssl/crypto/chacha/asm/chacha-x86.pl ============================================================================== --- head/crypto/openssl/crypto/chacha/asm/chacha-x86.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/chacha/asm/chacha-x86.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -62,7 +62,7 @@ $ymm=1 if ($xmm && !$ymm && $ARGV[0] eq "win32" && $1>=10); # first version supporting AVX $ymm=1 if ($xmm && !$ymm && - `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/ && + `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0); # first version supporting AVX $a="eax"; Modified: head/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -85,7 +85,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: head/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl ============================================================================== --- head/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -47,7 +47,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([0-9]+)\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) ([0-9]+)\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $avx = ($ver>=3.0) + ($ver>=3.01); $addx = ($ver>=3.03); Modified: head/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -72,7 +72,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $avx = ($ver>=3.0) + ($ver>=3.01); $addx = ($ver>=3.03); Modified: head/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -90,7 +90,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $addx = ($ver>=3.03); } Modified: head/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -66,7 +66,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: head/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -116,7 +116,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: head/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl ============================================================================== --- head/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -71,7 +71,7 @@ if ($sse2) { $avx = ($1>=2.09) + ($1>=2.10); } - if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/) { + if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } } Modified: head/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -90,7 +90,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=12); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: head/crypto/openssl/crypto/sha/asm/sha1-586.pl ============================================================================== --- head/crypto/openssl/crypto/sha/asm/sha1-586.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/sha/asm/sha1-586.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -144,7 +144,7 @@ $ymm=1 if ($xmm && !$ymm && $ARGV[0] eq "win32" && `ml 2>&1` =~ /Version ([0-9]+)\./ && $1>=10); # first version supporting AVX -$ymm=1 if ($xmm && !$ymm && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/ && +$ymm=1 if ($xmm && !$ymm && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0); # first version supporting AVX $shaext=$xmm; ### set to zero if compiling for 1.0.1 Modified: head/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -66,7 +66,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: head/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -119,7 +119,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: head/crypto/openssl/crypto/sha/asm/sha256-586.pl ============================================================================== --- head/crypto/openssl/crypto/sha/asm/sha256-586.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/sha/asm/sha256-586.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -96,7 +96,7 @@ if ($xmm && !$avx && $ARGV[0] eq "win32" && $avx = ($1>=10) + ($1>=11); } -if ($xmm && !$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/) { +if ($xmm && !$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: head/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -67,7 +67,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: head/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl ============================================================================== --- head/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl Wed Aug 26 15:43:44 2020 (r364821) +++ head/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl Wed Aug 26 16:55:28 2020 (r364822) @@ -135,7 +135,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } From owner-svn-src-all@freebsd.org Wed Aug 26 16:56:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ACE163B2E36; Wed, 26 Aug 2020 16:56:45 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcBpj4YFHz4HxV; Wed, 26 Aug 2020 16:56:45 +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 676A516160; Wed, 26 Aug 2020 16:56:45 +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 07QGujdU097252; Wed, 26 Aug 2020 16:56:45 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QGujQS097248; Wed, 26 Aug 2020 16:56:45 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202008261656.07QGujQS097248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 26 Aug 2020 16:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364823 - in head/secure/lib/libcrypto: amd64 i386 X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/secure/lib/libcrypto: amd64 i386 X-SVN-Commit-Revision: 364823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 16:56:45 -0000 Author: jkim Date: Wed Aug 26 16:56:44 2020 New Revision: 364823 URL: https://svnweb.freebsd.org/changeset/base/364823 Log: Regen X86 assembly files after r364822. Modified: head/secure/lib/libcrypto/amd64/aesni-gcm-x86_64.S head/secure/lib/libcrypto/amd64/aesni-mb-x86_64.S head/secure/lib/libcrypto/amd64/aesni-sha1-x86_64.S head/secure/lib/libcrypto/amd64/aesni-sha256-x86_64.S head/secure/lib/libcrypto/amd64/chacha-x86_64.S head/secure/lib/libcrypto/amd64/ecp_nistz256-x86_64.S head/secure/lib/libcrypto/amd64/ghash-x86_64.S head/secure/lib/libcrypto/amd64/poly1305-x86_64.S head/secure/lib/libcrypto/amd64/rsaz-avx2.S head/secure/lib/libcrypto/amd64/rsaz-x86_64.S head/secure/lib/libcrypto/amd64/sha1-mb-x86_64.S head/secure/lib/libcrypto/amd64/sha1-x86_64.S head/secure/lib/libcrypto/amd64/sha256-mb-x86_64.S head/secure/lib/libcrypto/amd64/sha256-x86_64.S head/secure/lib/libcrypto/amd64/sha512-x86_64.S head/secure/lib/libcrypto/amd64/x25519-x86_64.S head/secure/lib/libcrypto/amd64/x86_64-mont.S head/secure/lib/libcrypto/amd64/x86_64-mont5.S head/secure/lib/libcrypto/i386/chacha-x86.S head/secure/lib/libcrypto/i386/poly1305-x86.S head/secure/lib/libcrypto/i386/sha1-586.S head/secure/lib/libcrypto/i386/sha256-586.S Modified: head/secure/lib/libcrypto/amd64/aesni-gcm-x86_64.S ============================================================================== --- head/secure/lib/libcrypto/amd64/aesni-gcm-x86_64.S Wed Aug 26 16:55:28 2020 (r364822) +++ head/secure/lib/libcrypto/amd64/aesni-gcm-x86_64.S Wed Aug 26 16:56:44 2020 (r364823) @@ -2,20 +2,790 @@ /* Do not modify. This file is auto-generated from aesni-gcm-x86_64.pl. */ .text -.globl aesni_gcm_encrypt -.type aesni_gcm_encrypt,@function -aesni_gcm_encrypt: +.type _aesni_ctr32_ghash_6x,@function +.align 32 +_aesni_ctr32_ghash_6x: .cfi_startproc - xorl %eax,%eax + vmovdqu 32(%r11),%xmm2 + subq $6,%rdx + vpxor %xmm4,%xmm4,%xmm4 + vmovdqu 0-128(%rcx),%xmm15 + vpaddb %xmm2,%xmm1,%xmm10 + vpaddb %xmm2,%xmm10,%xmm11 + vpaddb %xmm2,%xmm11,%xmm12 + vpaddb %xmm2,%xmm12,%xmm13 + vpaddb %xmm2,%xmm13,%xmm14 + vpxor %xmm15,%xmm1,%xmm9 + vmovdqu %xmm4,16+8(%rsp) + jmp .Loop6x + +.align 32 +.Loop6x: + addl $100663296,%ebx + jc .Lhandle_ctr32 + vmovdqu 0-32(%r9),%xmm3 + vpaddb %xmm2,%xmm14,%xmm1 + vpxor %xmm15,%xmm10,%xmm10 + vpxor %xmm15,%xmm11,%xmm11 + +.Lresume_ctr32: + vmovdqu %xmm1,(%r8) + vpclmulqdq $0x10,%xmm3,%xmm7,%xmm5 + vpxor %xmm15,%xmm12,%xmm12 + vmovups 16-128(%rcx),%xmm2 + vpclmulqdq $0x01,%xmm3,%xmm7,%xmm6 + xorq %r12,%r12 + cmpq %r14,%r15 + + vaesenc %xmm2,%xmm9,%xmm9 + vmovdqu 48+8(%rsp),%xmm0 + vpxor %xmm15,%xmm13,%xmm13 + vpclmulqdq $0x00,%xmm3,%xmm7,%xmm1 + vaesenc %xmm2,%xmm10,%xmm10 + vpxor %xmm15,%xmm14,%xmm14 + setnc %r12b + vpclmulqdq $0x11,%xmm3,%xmm7,%xmm7 + vaesenc %xmm2,%xmm11,%xmm11 + vmovdqu 16-32(%r9),%xmm3 + negq %r12 + vaesenc %xmm2,%xmm12,%xmm12 + vpxor %xmm5,%xmm6,%xmm6 + vpclmulqdq $0x00,%xmm3,%xmm0,%xmm5 + vpxor %xmm4,%xmm8,%xmm8 + vaesenc %xmm2,%xmm13,%xmm13 + vpxor %xmm5,%xmm1,%xmm4 + andq $0x60,%r12 + vmovups 32-128(%rcx),%xmm15 + vpclmulqdq $0x10,%xmm3,%xmm0,%xmm1 + vaesenc %xmm2,%xmm14,%xmm14 + + vpclmulqdq $0x01,%xmm3,%xmm0,%xmm2 + leaq (%r14,%r12,1),%r14 + vaesenc %xmm15,%xmm9,%xmm9 + vpxor 16+8(%rsp),%xmm8,%xmm8 + vpclmulqdq $0x11,%xmm3,%xmm0,%xmm3 + vmovdqu 64+8(%rsp),%xmm0 + vaesenc %xmm15,%xmm10,%xmm10 + movbeq 88(%r14),%r13 + vaesenc %xmm15,%xmm11,%xmm11 + movbeq 80(%r14),%r12 + vaesenc %xmm15,%xmm12,%xmm12 + movq %r13,32+8(%rsp) + vaesenc %xmm15,%xmm13,%xmm13 + movq %r12,40+8(%rsp) + vmovdqu 48-32(%r9),%xmm5 + vaesenc %xmm15,%xmm14,%xmm14 + + vmovups 48-128(%rcx),%xmm15 + vpxor %xmm1,%xmm6,%xmm6 + vpclmulqdq $0x00,%xmm5,%xmm0,%xmm1 + vaesenc %xmm15,%xmm9,%xmm9 + vpxor %xmm2,%xmm6,%xmm6 + vpclmulqdq $0x10,%xmm5,%xmm0,%xmm2 + vaesenc %xmm15,%xmm10,%xmm10 + vpxor %xmm3,%xmm7,%xmm7 + vpclmulqdq $0x01,%xmm5,%xmm0,%xmm3 + vaesenc %xmm15,%xmm11,%xmm11 + vpclmulqdq $0x11,%xmm5,%xmm0,%xmm5 + vmovdqu 80+8(%rsp),%xmm0 + vaesenc %xmm15,%xmm12,%xmm12 + vaesenc %xmm15,%xmm13,%xmm13 + vpxor %xmm1,%xmm4,%xmm4 + vmovdqu 64-32(%r9),%xmm1 + vaesenc %xmm15,%xmm14,%xmm14 + + vmovups 64-128(%rcx),%xmm15 + vpxor %xmm2,%xmm6,%xmm6 + vpclmulqdq $0x00,%xmm1,%xmm0,%xmm2 + vaesenc %xmm15,%xmm9,%xmm9 + vpxor %xmm3,%xmm6,%xmm6 + vpclmulqdq $0x10,%xmm1,%xmm0,%xmm3 + vaesenc %xmm15,%xmm10,%xmm10 + movbeq 72(%r14),%r13 + vpxor %xmm5,%xmm7,%xmm7 + vpclmulqdq $0x01,%xmm1,%xmm0,%xmm5 + vaesenc %xmm15,%xmm11,%xmm11 + movbeq 64(%r14),%r12 + vpclmulqdq $0x11,%xmm1,%xmm0,%xmm1 + vmovdqu 96+8(%rsp),%xmm0 + vaesenc %xmm15,%xmm12,%xmm12 + movq %r13,48+8(%rsp) + vaesenc %xmm15,%xmm13,%xmm13 + movq %r12,56+8(%rsp) + vpxor %xmm2,%xmm4,%xmm4 + vmovdqu 96-32(%r9),%xmm2 + vaesenc %xmm15,%xmm14,%xmm14 + + vmovups 80-128(%rcx),%xmm15 + vpxor %xmm3,%xmm6,%xmm6 + vpclmulqdq $0x00,%xmm2,%xmm0,%xmm3 + vaesenc %xmm15,%xmm9,%xmm9 + vpxor %xmm5,%xmm6,%xmm6 + vpclmulqdq $0x10,%xmm2,%xmm0,%xmm5 + vaesenc %xmm15,%xmm10,%xmm10 + movbeq 56(%r14),%r13 + vpxor %xmm1,%xmm7,%xmm7 + vpclmulqdq $0x01,%xmm2,%xmm0,%xmm1 + vpxor 112+8(%rsp),%xmm8,%xmm8 + vaesenc %xmm15,%xmm11,%xmm11 + movbeq 48(%r14),%r12 + vpclmulqdq $0x11,%xmm2,%xmm0,%xmm2 + vaesenc %xmm15,%xmm12,%xmm12 + movq %r13,64+8(%rsp) + vaesenc %xmm15,%xmm13,%xmm13 + movq %r12,72+8(%rsp) + vpxor %xmm3,%xmm4,%xmm4 + vmovdqu 112-32(%r9),%xmm3 + vaesenc %xmm15,%xmm14,%xmm14 + + vmovups 96-128(%rcx),%xmm15 + vpxor %xmm5,%xmm6,%xmm6 + vpclmulqdq $0x10,%xmm3,%xmm8,%xmm5 + vaesenc %xmm15,%xmm9,%xmm9 + vpxor %xmm1,%xmm6,%xmm6 + vpclmulqdq $0x01,%xmm3,%xmm8,%xmm1 + vaesenc %xmm15,%xmm10,%xmm10 + movbeq 40(%r14),%r13 + vpxor %xmm2,%xmm7,%xmm7 + vpclmulqdq $0x00,%xmm3,%xmm8,%xmm2 + vaesenc %xmm15,%xmm11,%xmm11 + movbeq 32(%r14),%r12 + vpclmulqdq $0x11,%xmm3,%xmm8,%xmm8 + vaesenc %xmm15,%xmm12,%xmm12 + movq %r13,80+8(%rsp) + vaesenc %xmm15,%xmm13,%xmm13 + movq %r12,88+8(%rsp) + vpxor %xmm5,%xmm6,%xmm6 + vaesenc %xmm15,%xmm14,%xmm14 + vpxor %xmm1,%xmm6,%xmm6 + + vmovups 112-128(%rcx),%xmm15 + vpslldq $8,%xmm6,%xmm5 + vpxor %xmm2,%xmm4,%xmm4 + vmovdqu 16(%r11),%xmm3 + + vaesenc %xmm15,%xmm9,%xmm9 + vpxor %xmm8,%xmm7,%xmm7 + vaesenc %xmm15,%xmm10,%xmm10 + vpxor %xmm5,%xmm4,%xmm4 + movbeq 24(%r14),%r13 + vaesenc %xmm15,%xmm11,%xmm11 + movbeq 16(%r14),%r12 + vpalignr $8,%xmm4,%xmm4,%xmm0 + vpclmulqdq $0x10,%xmm3,%xmm4,%xmm4 + movq %r13,96+8(%rsp) + vaesenc %xmm15,%xmm12,%xmm12 + movq %r12,104+8(%rsp) + vaesenc %xmm15,%xmm13,%xmm13 + vmovups 128-128(%rcx),%xmm1 + vaesenc %xmm15,%xmm14,%xmm14 + + vaesenc %xmm1,%xmm9,%xmm9 + vmovups 144-128(%rcx),%xmm15 + vaesenc %xmm1,%xmm10,%xmm10 + vpsrldq $8,%xmm6,%xmm6 + vaesenc %xmm1,%xmm11,%xmm11 + vpxor %xmm6,%xmm7,%xmm7 + vaesenc %xmm1,%xmm12,%xmm12 + vpxor %xmm0,%xmm4,%xmm4 + movbeq 8(%r14),%r13 + vaesenc %xmm1,%xmm13,%xmm13 + movbeq 0(%r14),%r12 + vaesenc %xmm1,%xmm14,%xmm14 + vmovups 160-128(%rcx),%xmm1 + cmpl $11,%ebp + jb .Lenc_tail + + vaesenc %xmm15,%xmm9,%xmm9 + vaesenc %xmm15,%xmm10,%xmm10 + vaesenc %xmm15,%xmm11,%xmm11 + vaesenc %xmm15,%xmm12,%xmm12 + vaesenc %xmm15,%xmm13,%xmm13 + vaesenc %xmm15,%xmm14,%xmm14 + + vaesenc %xmm1,%xmm9,%xmm9 + vaesenc %xmm1,%xmm10,%xmm10 + vaesenc %xmm1,%xmm11,%xmm11 + vaesenc %xmm1,%xmm12,%xmm12 + vaesenc %xmm1,%xmm13,%xmm13 + vmovups 176-128(%rcx),%xmm15 + vaesenc %xmm1,%xmm14,%xmm14 + vmovups 192-128(%rcx),%xmm1 + je .Lenc_tail + + vaesenc %xmm15,%xmm9,%xmm9 + vaesenc %xmm15,%xmm10,%xmm10 + vaesenc %xmm15,%xmm11,%xmm11 + vaesenc %xmm15,%xmm12,%xmm12 + vaesenc %xmm15,%xmm13,%xmm13 + vaesenc %xmm15,%xmm14,%xmm14 + + vaesenc %xmm1,%xmm9,%xmm9 + vaesenc %xmm1,%xmm10,%xmm10 + vaesenc %xmm1,%xmm11,%xmm11 + vaesenc %xmm1,%xmm12,%xmm12 + vaesenc %xmm1,%xmm13,%xmm13 + vmovups 208-128(%rcx),%xmm15 + vaesenc %xmm1,%xmm14,%xmm14 + vmovups 224-128(%rcx),%xmm1 + jmp .Lenc_tail + +.align 32 +.Lhandle_ctr32: + vmovdqu (%r11),%xmm0 + vpshufb %xmm0,%xmm1,%xmm6 + vmovdqu 48(%r11),%xmm5 + vpaddd 64(%r11),%xmm6,%xmm10 + vpaddd %xmm5,%xmm6,%xmm11 + vmovdqu 0-32(%r9),%xmm3 + vpaddd %xmm5,%xmm10,%xmm12 + vpshufb %xmm0,%xmm10,%xmm10 + vpaddd %xmm5,%xmm11,%xmm13 + vpshufb %xmm0,%xmm11,%xmm11 + vpxor %xmm15,%xmm10,%xmm10 + vpaddd %xmm5,%xmm12,%xmm14 + vpshufb %xmm0,%xmm12,%xmm12 + vpxor %xmm15,%xmm11,%xmm11 + vpaddd %xmm5,%xmm13,%xmm1 + vpshufb %xmm0,%xmm13,%xmm13 + vpshufb %xmm0,%xmm14,%xmm14 + vpshufb %xmm0,%xmm1,%xmm1 + jmp .Lresume_ctr32 + +.align 32 +.Lenc_tail: + vaesenc %xmm15,%xmm9,%xmm9 + vmovdqu %xmm7,16+8(%rsp) + vpalignr $8,%xmm4,%xmm4,%xmm8 + vaesenc %xmm15,%xmm10,%xmm10 + vpclmulqdq $0x10,%xmm3,%xmm4,%xmm4 + vpxor 0(%rdi),%xmm1,%xmm2 + vaesenc %xmm15,%xmm11,%xmm11 + vpxor 16(%rdi),%xmm1,%xmm0 + vaesenc %xmm15,%xmm12,%xmm12 + vpxor 32(%rdi),%xmm1,%xmm5 + vaesenc %xmm15,%xmm13,%xmm13 + vpxor 48(%rdi),%xmm1,%xmm6 + vaesenc %xmm15,%xmm14,%xmm14 + vpxor 64(%rdi),%xmm1,%xmm7 + vpxor 80(%rdi),%xmm1,%xmm3 + vmovdqu (%r8),%xmm1 + + vaesenclast %xmm2,%xmm9,%xmm9 + vmovdqu 32(%r11),%xmm2 + vaesenclast %xmm0,%xmm10,%xmm10 + vpaddb %xmm2,%xmm1,%xmm0 + movq %r13,112+8(%rsp) + leaq 96(%rdi),%rdi + vaesenclast %xmm5,%xmm11,%xmm11 + vpaddb %xmm2,%xmm0,%xmm5 + movq %r12,120+8(%rsp) + leaq 96(%rsi),%rsi + vmovdqu 0-128(%rcx),%xmm15 + vaesenclast %xmm6,%xmm12,%xmm12 + vpaddb %xmm2,%xmm5,%xmm6 + vaesenclast %xmm7,%xmm13,%xmm13 + vpaddb %xmm2,%xmm6,%xmm7 + vaesenclast %xmm3,%xmm14,%xmm14 + vpaddb %xmm2,%xmm7,%xmm3 + + addq $0x60,%r10 + subq $0x6,%rdx + jc .L6x_done + + vmovups %xmm9,-96(%rsi) + vpxor %xmm15,%xmm1,%xmm9 + vmovups %xmm10,-80(%rsi) + vmovdqa %xmm0,%xmm10 + vmovups %xmm11,-64(%rsi) + vmovdqa %xmm5,%xmm11 + vmovups %xmm12,-48(%rsi) + vmovdqa %xmm6,%xmm12 + vmovups %xmm13,-32(%rsi) + vmovdqa %xmm7,%xmm13 + vmovups %xmm14,-16(%rsi) + vmovdqa %xmm3,%xmm14 + vmovdqu 32+8(%rsp),%xmm7 + jmp .Loop6x + +.L6x_done: + vpxor 16+8(%rsp),%xmm8,%xmm8 + vpxor %xmm4,%xmm8,%xmm8 + .byte 0xf3,0xc3 .cfi_endproc -.size aesni_gcm_encrypt,.-aesni_gcm_encrypt - +.size _aesni_ctr32_ghash_6x,.-_aesni_ctr32_ghash_6x .globl aesni_gcm_decrypt .type aesni_gcm_decrypt,@function +.align 32 aesni_gcm_decrypt: .cfi_startproc - xorl %eax,%eax + xorq %r10,%r10 + cmpq $0x60,%rdx + jb .Lgcm_dec_abort + + leaq (%rsp),%rax +.cfi_def_cfa_register %rax + pushq %rbx +.cfi_offset %rbx,-16 + pushq %rbp +.cfi_offset %rbp,-24 + pushq %r12 +.cfi_offset %r12,-32 + pushq %r13 +.cfi_offset %r13,-40 + pushq %r14 +.cfi_offset %r14,-48 + pushq %r15 +.cfi_offset %r15,-56 + vzeroupper + + vmovdqu (%r8),%xmm1 + addq $-128,%rsp + movl 12(%r8),%ebx + leaq .Lbswap_mask(%rip),%r11 + leaq -128(%rcx),%r14 + movq $0xf80,%r15 + vmovdqu (%r9),%xmm8 + andq $-128,%rsp + vmovdqu (%r11),%xmm0 + leaq 128(%rcx),%rcx + leaq 32+32(%r9),%r9 + movl 240-128(%rcx),%ebp + vpshufb %xmm0,%xmm8,%xmm8 + + andq %r15,%r14 + andq %rsp,%r15 + subq %r14,%r15 + jc .Ldec_no_key_aliasing + cmpq $768,%r15 + jnc .Ldec_no_key_aliasing + subq %r15,%rsp +.Ldec_no_key_aliasing: + + vmovdqu 80(%rdi),%xmm7 + leaq (%rdi),%r14 + vmovdqu 64(%rdi),%xmm4 + leaq -192(%rdi,%rdx,1),%r15 + vmovdqu 48(%rdi),%xmm5 + shrq $4,%rdx + xorq %r10,%r10 + vmovdqu 32(%rdi),%xmm6 + vpshufb %xmm0,%xmm7,%xmm7 + vmovdqu 16(%rdi),%xmm2 + vpshufb %xmm0,%xmm4,%xmm4 + vmovdqu (%rdi),%xmm3 + vpshufb %xmm0,%xmm5,%xmm5 + vmovdqu %xmm4,48(%rsp) + vpshufb %xmm0,%xmm6,%xmm6 + vmovdqu %xmm5,64(%rsp) + vpshufb %xmm0,%xmm2,%xmm2 + vmovdqu %xmm6,80(%rsp) + vpshufb %xmm0,%xmm3,%xmm3 + vmovdqu %xmm2,96(%rsp) + vmovdqu %xmm3,112(%rsp) + + call _aesni_ctr32_ghash_6x + + vmovups %xmm9,-96(%rsi) + vmovups %xmm10,-80(%rsi) + vmovups %xmm11,-64(%rsi) + vmovups %xmm12,-48(%rsi) + vmovups %xmm13,-32(%rsi) + vmovups %xmm14,-16(%rsi) + + vpshufb (%r11),%xmm8,%xmm8 + vmovdqu %xmm8,-64(%r9) + + vzeroupper + movq -48(%rax),%r15 +.cfi_restore %r15 + movq -40(%rax),%r14 +.cfi_restore %r14 + movq -32(%rax),%r13 +.cfi_restore %r13 + movq -24(%rax),%r12 +.cfi_restore %r12 + movq -16(%rax),%rbp +.cfi_restore %rbp + movq -8(%rax),%rbx +.cfi_restore %rbx + leaq (%rax),%rsp +.cfi_def_cfa_register %rsp +.Lgcm_dec_abort: + movq %r10,%rax .byte 0xf3,0xc3 .cfi_endproc .size aesni_gcm_decrypt,.-aesni_gcm_decrypt +.type _aesni_ctr32_6x,@function +.align 32 +_aesni_ctr32_6x: +.cfi_startproc + vmovdqu 0-128(%rcx),%xmm4 + vmovdqu 32(%r11),%xmm2 + leaq -1(%rbp),%r13 + vmovups 16-128(%rcx),%xmm15 + leaq 32-128(%rcx),%r12 + vpxor %xmm4,%xmm1,%xmm9 + addl $100663296,%ebx + jc .Lhandle_ctr32_2 + vpaddb %xmm2,%xmm1,%xmm10 + vpaddb %xmm2,%xmm10,%xmm11 + vpxor %xmm4,%xmm10,%xmm10 + vpaddb %xmm2,%xmm11,%xmm12 + vpxor %xmm4,%xmm11,%xmm11 + vpaddb %xmm2,%xmm12,%xmm13 + vpxor %xmm4,%xmm12,%xmm12 + vpaddb %xmm2,%xmm13,%xmm14 + vpxor %xmm4,%xmm13,%xmm13 + vpaddb %xmm2,%xmm14,%xmm1 + vpxor %xmm4,%xmm14,%xmm14 + jmp .Loop_ctr32 + +.align 16 +.Loop_ctr32: + vaesenc %xmm15,%xmm9,%xmm9 + vaesenc %xmm15,%xmm10,%xmm10 + vaesenc %xmm15,%xmm11,%xmm11 + vaesenc %xmm15,%xmm12,%xmm12 + vaesenc %xmm15,%xmm13,%xmm13 + vaesenc %xmm15,%xmm14,%xmm14 + vmovups (%r12),%xmm15 + leaq 16(%r12),%r12 + decl %r13d + jnz .Loop_ctr32 + + vmovdqu (%r12),%xmm3 + vaesenc %xmm15,%xmm9,%xmm9 + vpxor 0(%rdi),%xmm3,%xmm4 + vaesenc %xmm15,%xmm10,%xmm10 + vpxor 16(%rdi),%xmm3,%xmm5 + vaesenc %xmm15,%xmm11,%xmm11 + vpxor 32(%rdi),%xmm3,%xmm6 + vaesenc %xmm15,%xmm12,%xmm12 + vpxor 48(%rdi),%xmm3,%xmm8 + vaesenc %xmm15,%xmm13,%xmm13 + vpxor 64(%rdi),%xmm3,%xmm2 + vaesenc %xmm15,%xmm14,%xmm14 + vpxor 80(%rdi),%xmm3,%xmm3 + leaq 96(%rdi),%rdi + + vaesenclast %xmm4,%xmm9,%xmm9 + vaesenclast %xmm5,%xmm10,%xmm10 + vaesenclast %xmm6,%xmm11,%xmm11 + vaesenclast %xmm8,%xmm12,%xmm12 + vaesenclast %xmm2,%xmm13,%xmm13 + vaesenclast %xmm3,%xmm14,%xmm14 + vmovups %xmm9,0(%rsi) + vmovups %xmm10,16(%rsi) + vmovups %xmm11,32(%rsi) + vmovups %xmm12,48(%rsi) + vmovups %xmm13,64(%rsi) + vmovups %xmm14,80(%rsi) + leaq 96(%rsi),%rsi + + .byte 0xf3,0xc3 +.align 32 +.Lhandle_ctr32_2: + vpshufb %xmm0,%xmm1,%xmm6 + vmovdqu 48(%r11),%xmm5 + vpaddd 64(%r11),%xmm6,%xmm10 + vpaddd %xmm5,%xmm6,%xmm11 + vpaddd %xmm5,%xmm10,%xmm12 + vpshufb %xmm0,%xmm10,%xmm10 + vpaddd %xmm5,%xmm11,%xmm13 + vpshufb %xmm0,%xmm11,%xmm11 + vpxor %xmm4,%xmm10,%xmm10 + vpaddd %xmm5,%xmm12,%xmm14 + vpshufb %xmm0,%xmm12,%xmm12 + vpxor %xmm4,%xmm11,%xmm11 + vpaddd %xmm5,%xmm13,%xmm1 + vpshufb %xmm0,%xmm13,%xmm13 + vpxor %xmm4,%xmm12,%xmm12 + vpshufb %xmm0,%xmm14,%xmm14 + vpxor %xmm4,%xmm13,%xmm13 + vpshufb %xmm0,%xmm1,%xmm1 + vpxor %xmm4,%xmm14,%xmm14 + jmp .Loop_ctr32 +.cfi_endproc +.size _aesni_ctr32_6x,.-_aesni_ctr32_6x + +.globl aesni_gcm_encrypt +.type aesni_gcm_encrypt,@function +.align 32 +aesni_gcm_encrypt: +.cfi_startproc + xorq %r10,%r10 + cmpq $288,%rdx + jb .Lgcm_enc_abort + + leaq (%rsp),%rax +.cfi_def_cfa_register %rax + pushq %rbx +.cfi_offset %rbx,-16 + pushq %rbp +.cfi_offset %rbp,-24 + pushq %r12 +.cfi_offset %r12,-32 + pushq %r13 +.cfi_offset %r13,-40 + pushq %r14 +.cfi_offset %r14,-48 + pushq %r15 +.cfi_offset %r15,-56 + vzeroupper + + vmovdqu (%r8),%xmm1 + addq $-128,%rsp + movl 12(%r8),%ebx + leaq .Lbswap_mask(%rip),%r11 + leaq -128(%rcx),%r14 + movq $0xf80,%r15 + leaq 128(%rcx),%rcx + vmovdqu (%r11),%xmm0 + andq $-128,%rsp + movl 240-128(%rcx),%ebp + + andq %r15,%r14 + andq %rsp,%r15 + subq %r14,%r15 + jc .Lenc_no_key_aliasing + cmpq $768,%r15 + jnc .Lenc_no_key_aliasing + subq %r15,%rsp +.Lenc_no_key_aliasing: + + leaq (%rsi),%r14 + leaq -192(%rsi,%rdx,1),%r15 + shrq $4,%rdx + + call _aesni_ctr32_6x + vpshufb %xmm0,%xmm9,%xmm8 + vpshufb %xmm0,%xmm10,%xmm2 + vmovdqu %xmm8,112(%rsp) + vpshufb %xmm0,%xmm11,%xmm4 + vmovdqu %xmm2,96(%rsp) + vpshufb %xmm0,%xmm12,%xmm5 + vmovdqu %xmm4,80(%rsp) + vpshufb %xmm0,%xmm13,%xmm6 + vmovdqu %xmm5,64(%rsp) + vpshufb %xmm0,%xmm14,%xmm7 + vmovdqu %xmm6,48(%rsp) + + call _aesni_ctr32_6x + + vmovdqu (%r9),%xmm8 + leaq 32+32(%r9),%r9 + subq $12,%rdx + movq $192,%r10 + vpshufb %xmm0,%xmm8,%xmm8 + + call _aesni_ctr32_ghash_6x + vmovdqu 32(%rsp),%xmm7 + vmovdqu (%r11),%xmm0 + vmovdqu 0-32(%r9),%xmm3 + vpunpckhqdq %xmm7,%xmm7,%xmm1 + vmovdqu 32-32(%r9),%xmm15 + vmovups %xmm9,-96(%rsi) + vpshufb %xmm0,%xmm9,%xmm9 + vpxor %xmm7,%xmm1,%xmm1 + vmovups %xmm10,-80(%rsi) + vpshufb %xmm0,%xmm10,%xmm10 + vmovups %xmm11,-64(%rsi) + vpshufb %xmm0,%xmm11,%xmm11 + vmovups %xmm12,-48(%rsi) + vpshufb %xmm0,%xmm12,%xmm12 + vmovups %xmm13,-32(%rsi) + vpshufb %xmm0,%xmm13,%xmm13 + vmovups %xmm14,-16(%rsi) + vpshufb %xmm0,%xmm14,%xmm14 + vmovdqu %xmm9,16(%rsp) + vmovdqu 48(%rsp),%xmm6 + vmovdqu 16-32(%r9),%xmm0 + vpunpckhqdq %xmm6,%xmm6,%xmm2 + vpclmulqdq $0x00,%xmm3,%xmm7,%xmm5 + vpxor %xmm6,%xmm2,%xmm2 + vpclmulqdq $0x11,%xmm3,%xmm7,%xmm7 + vpclmulqdq $0x00,%xmm15,%xmm1,%xmm1 + + vmovdqu 64(%rsp),%xmm9 + vpclmulqdq $0x00,%xmm0,%xmm6,%xmm4 + vmovdqu 48-32(%r9),%xmm3 + vpxor %xmm5,%xmm4,%xmm4 + vpunpckhqdq %xmm9,%xmm9,%xmm5 + vpclmulqdq $0x11,%xmm0,%xmm6,%xmm6 + vpxor %xmm9,%xmm5,%xmm5 + vpxor %xmm7,%xmm6,%xmm6 + vpclmulqdq $0x10,%xmm15,%xmm2,%xmm2 + vmovdqu 80-32(%r9),%xmm15 + vpxor %xmm1,%xmm2,%xmm2 + + vmovdqu 80(%rsp),%xmm1 + vpclmulqdq $0x00,%xmm3,%xmm9,%xmm7 + vmovdqu 64-32(%r9),%xmm0 + vpxor %xmm4,%xmm7,%xmm7 + vpunpckhqdq %xmm1,%xmm1,%xmm4 + vpclmulqdq $0x11,%xmm3,%xmm9,%xmm9 + vpxor %xmm1,%xmm4,%xmm4 + vpxor %xmm6,%xmm9,%xmm9 + vpclmulqdq $0x00,%xmm15,%xmm5,%xmm5 + vpxor %xmm2,%xmm5,%xmm5 + + vmovdqu 96(%rsp),%xmm2 + vpclmulqdq $0x00,%xmm0,%xmm1,%xmm6 + vmovdqu 96-32(%r9),%xmm3 + vpxor %xmm7,%xmm6,%xmm6 + vpunpckhqdq %xmm2,%xmm2,%xmm7 + vpclmulqdq $0x11,%xmm0,%xmm1,%xmm1 + vpxor %xmm2,%xmm7,%xmm7 + vpxor %xmm9,%xmm1,%xmm1 + vpclmulqdq $0x10,%xmm15,%xmm4,%xmm4 + vmovdqu 128-32(%r9),%xmm15 + vpxor %xmm5,%xmm4,%xmm4 + + vpxor 112(%rsp),%xmm8,%xmm8 + vpclmulqdq $0x00,%xmm3,%xmm2,%xmm5 + vmovdqu 112-32(%r9),%xmm0 + vpunpckhqdq %xmm8,%xmm8,%xmm9 + vpxor %xmm6,%xmm5,%xmm5 + vpclmulqdq $0x11,%xmm3,%xmm2,%xmm2 + vpxor %xmm8,%xmm9,%xmm9 + vpxor %xmm1,%xmm2,%xmm2 + vpclmulqdq $0x00,%xmm15,%xmm7,%xmm7 + vpxor %xmm4,%xmm7,%xmm4 + + vpclmulqdq $0x00,%xmm0,%xmm8,%xmm6 + vmovdqu 0-32(%r9),%xmm3 + vpunpckhqdq %xmm14,%xmm14,%xmm1 + vpclmulqdq $0x11,%xmm0,%xmm8,%xmm8 + vpxor %xmm14,%xmm1,%xmm1 + vpxor %xmm5,%xmm6,%xmm5 + vpclmulqdq $0x10,%xmm15,%xmm9,%xmm9 + vmovdqu 32-32(%r9),%xmm15 + vpxor %xmm2,%xmm8,%xmm7 + vpxor %xmm4,%xmm9,%xmm6 + + vmovdqu 16-32(%r9),%xmm0 + vpxor %xmm5,%xmm7,%xmm9 + vpclmulqdq $0x00,%xmm3,%xmm14,%xmm4 + vpxor %xmm9,%xmm6,%xmm6 + vpunpckhqdq %xmm13,%xmm13,%xmm2 + vpclmulqdq $0x11,%xmm3,%xmm14,%xmm14 + vpxor %xmm13,%xmm2,%xmm2 + vpslldq $8,%xmm6,%xmm9 + vpclmulqdq $0x00,%xmm15,%xmm1,%xmm1 + vpxor %xmm9,%xmm5,%xmm8 + vpsrldq $8,%xmm6,%xmm6 + vpxor %xmm6,%xmm7,%xmm7 + + vpclmulqdq $0x00,%xmm0,%xmm13,%xmm5 + vmovdqu 48-32(%r9),%xmm3 + vpxor %xmm4,%xmm5,%xmm5 + vpunpckhqdq %xmm12,%xmm12,%xmm9 + vpclmulqdq $0x11,%xmm0,%xmm13,%xmm13 + vpxor %xmm12,%xmm9,%xmm9 + vpxor %xmm14,%xmm13,%xmm13 + vpalignr $8,%xmm8,%xmm8,%xmm14 + vpclmulqdq $0x10,%xmm15,%xmm2,%xmm2 + vmovdqu 80-32(%r9),%xmm15 + vpxor %xmm1,%xmm2,%xmm2 + + vpclmulqdq $0x00,%xmm3,%xmm12,%xmm4 + vmovdqu 64-32(%r9),%xmm0 + vpxor %xmm5,%xmm4,%xmm4 + vpunpckhqdq %xmm11,%xmm11,%xmm1 + vpclmulqdq $0x11,%xmm3,%xmm12,%xmm12 + vpxor %xmm11,%xmm1,%xmm1 + vpxor %xmm13,%xmm12,%xmm12 + vxorps 16(%rsp),%xmm7,%xmm7 + vpclmulqdq $0x00,%xmm15,%xmm9,%xmm9 + vpxor %xmm2,%xmm9,%xmm9 + + vpclmulqdq $0x10,16(%r11),%xmm8,%xmm8 + vxorps %xmm14,%xmm8,%xmm8 + + vpclmulqdq $0x00,%xmm0,%xmm11,%xmm5 + vmovdqu 96-32(%r9),%xmm3 + vpxor %xmm4,%xmm5,%xmm5 + vpunpckhqdq %xmm10,%xmm10,%xmm2 + vpclmulqdq $0x11,%xmm0,%xmm11,%xmm11 + vpxor %xmm10,%xmm2,%xmm2 + vpalignr $8,%xmm8,%xmm8,%xmm14 + vpxor %xmm12,%xmm11,%xmm11 + vpclmulqdq $0x10,%xmm15,%xmm1,%xmm1 + vmovdqu 128-32(%r9),%xmm15 + vpxor %xmm9,%xmm1,%xmm1 + + vxorps %xmm7,%xmm14,%xmm14 + vpclmulqdq $0x10,16(%r11),%xmm8,%xmm8 + vxorps %xmm14,%xmm8,%xmm8 + + vpclmulqdq $0x00,%xmm3,%xmm10,%xmm4 + vmovdqu 112-32(%r9),%xmm0 + vpxor %xmm5,%xmm4,%xmm4 + vpunpckhqdq %xmm8,%xmm8,%xmm9 + vpclmulqdq $0x11,%xmm3,%xmm10,%xmm10 + vpxor %xmm8,%xmm9,%xmm9 + vpxor %xmm11,%xmm10,%xmm10 + vpclmulqdq $0x00,%xmm15,%xmm2,%xmm2 + vpxor %xmm1,%xmm2,%xmm2 + + vpclmulqdq $0x00,%xmm0,%xmm8,%xmm5 + vpclmulqdq $0x11,%xmm0,%xmm8,%xmm7 + vpxor %xmm4,%xmm5,%xmm5 + vpclmulqdq $0x10,%xmm15,%xmm9,%xmm6 + vpxor %xmm10,%xmm7,%xmm7 + vpxor %xmm2,%xmm6,%xmm6 + + vpxor %xmm5,%xmm7,%xmm4 + vpxor %xmm4,%xmm6,%xmm6 + vpslldq $8,%xmm6,%xmm1 + vmovdqu 16(%r11),%xmm3 + vpsrldq $8,%xmm6,%xmm6 + vpxor %xmm1,%xmm5,%xmm8 + vpxor %xmm6,%xmm7,%xmm7 + + vpalignr $8,%xmm8,%xmm8,%xmm2 + vpclmulqdq $0x10,%xmm3,%xmm8,%xmm8 + vpxor %xmm2,%xmm8,%xmm8 + + vpalignr $8,%xmm8,%xmm8,%xmm2 + vpclmulqdq $0x10,%xmm3,%xmm8,%xmm8 + vpxor %xmm7,%xmm2,%xmm2 + vpxor %xmm2,%xmm8,%xmm8 + vpshufb (%r11),%xmm8,%xmm8 + vmovdqu %xmm8,-64(%r9) + + vzeroupper + movq -48(%rax),%r15 +.cfi_restore %r15 + movq -40(%rax),%r14 +.cfi_restore %r14 + movq -32(%rax),%r13 +.cfi_restore %r13 + movq -24(%rax),%r12 +.cfi_restore %r12 + movq -16(%rax),%rbp +.cfi_restore %rbp + movq -8(%rax),%rbx +.cfi_restore %rbx + leaq (%rax),%rsp +.cfi_def_cfa_register %rsp +.Lgcm_enc_abort: + movq %r10,%rax + .byte 0xf3,0xc3 +.cfi_endproc +.size aesni_gcm_encrypt,.-aesni_gcm_encrypt +.align 64 +.Lbswap_mask: +.byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 +.Lpoly: +.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc2 +.Lone_msb: +.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 +.Ltwo_lsb: +.byte 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +.Lone_lsb: +.byte 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +.byte 65,69,83,45,78,73,32,71,67,77,32,109,111,100,117,108,101,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 +.align 64 Modified: head/secure/lib/libcrypto/amd64/aesni-mb-x86_64.S ============================================================================== --- head/secure/lib/libcrypto/amd64/aesni-mb-x86_64.S Wed Aug 26 16:55:28 2020 (r364822) +++ head/secure/lib/libcrypto/amd64/aesni-mb-x86_64.S Wed Aug 26 16:56:44 2020 (r364823) @@ -9,6 +9,14 @@ .align 32 aesni_multi_cbc_encrypt: .cfi_startproc + cmpl $2,%edx + jb .Lenc_non_avx + movl OPENSSL_ia32cap_P+4(%rip),%ecx + testl $268435456,%ecx + jnz _avx_cbc_enc_shortcut + jmp .Lenc_non_avx +.align 16 +.Lenc_non_avx: movq %rsp,%rax .cfi_def_cfa_register %rax pushq %rbx @@ -283,6 +291,14 @@ aesni_multi_cbc_encrypt: .align 32 aesni_multi_cbc_decrypt: .cfi_startproc + cmpl $2,%edx + jb .Ldec_non_avx + movl OPENSSL_ia32cap_P+4(%rip),%ecx + testl $268435456,%ecx + jnz _avx_cbc_dec_shortcut + jmp .Ldec_non_avx +.align 16 +.Ldec_non_avx: movq %rsp,%rax .cfi_def_cfa_register %rax pushq %rbx @@ -542,3 +558,952 @@ aesni_multi_cbc_decrypt: .byte 0xf3,0xc3 .cfi_endproc .size aesni_multi_cbc_decrypt,.-aesni_multi_cbc_decrypt +.type aesni_multi_cbc_encrypt_avx,@function +.align 32 +aesni_multi_cbc_encrypt_avx: +.cfi_startproc +_avx_cbc_enc_shortcut: + movq %rsp,%rax +.cfi_def_cfa_register %rax + pushq %rbx +.cfi_offset %rbx,-16 + pushq %rbp +.cfi_offset %rbp,-24 + pushq %r12 +.cfi_offset %r12,-32 + pushq %r13 +.cfi_offset %r13,-40 + pushq %r14 +.cfi_offset %r14,-48 + pushq %r15 +.cfi_offset %r15,-56 + + + + + + + + + subq $192,%rsp + andq $-128,%rsp + movq %rax,16(%rsp) +.cfi_escape 0x0f,0x05,0x77,0x10,0x06,0x23,0x08 + +.Lenc8x_body: + vzeroupper + vmovdqu (%rsi),%xmm15 + leaq 120(%rsi),%rsi + leaq 160(%rdi),%rdi + shrl $1,%edx + +.Lenc8x_loop_grande: + + xorl %edx,%edx + movl -144(%rdi),%ecx + movq -160(%rdi),%r8 + cmpl %edx,%ecx + movq -152(%rdi),%rbx + cmovgl %ecx,%edx + testl %ecx,%ecx + vmovdqu -136(%rdi),%xmm2 + movl %ecx,32(%rsp) + cmovleq %rsp,%r8 + subq %r8,%rbx + movq %rbx,64(%rsp) + movl -104(%rdi),%ecx + movq -120(%rdi),%r9 + cmpl %edx,%ecx + movq -112(%rdi),%rbp + cmovgl %ecx,%edx + testl %ecx,%ecx + vmovdqu -96(%rdi),%xmm3 + movl %ecx,36(%rsp) + cmovleq %rsp,%r9 + subq %r9,%rbp + movq %rbp,72(%rsp) + movl -64(%rdi),%ecx + movq -80(%rdi),%r10 + cmpl %edx,%ecx + movq -72(%rdi),%rbp + cmovgl %ecx,%edx + testl %ecx,%ecx + vmovdqu -56(%rdi),%xmm4 + movl %ecx,40(%rsp) + cmovleq %rsp,%r10 + subq %r10,%rbp + movq %rbp,80(%rsp) + movl -24(%rdi),%ecx + movq -40(%rdi),%r11 + cmpl %edx,%ecx + movq -32(%rdi),%rbp + cmovgl %ecx,%edx + testl %ecx,%ecx + vmovdqu -16(%rdi),%xmm5 + movl %ecx,44(%rsp) + cmovleq %rsp,%r11 + subq %r11,%rbp + movq %rbp,88(%rsp) + movl 16(%rdi),%ecx + movq 0(%rdi),%r12 + cmpl %edx,%ecx + movq 8(%rdi),%rbp + cmovgl %ecx,%edx + testl %ecx,%ecx + vmovdqu 24(%rdi),%xmm6 + movl %ecx,48(%rsp) + cmovleq %rsp,%r12 + subq %r12,%rbp + movq %rbp,96(%rsp) + movl 56(%rdi),%ecx + movq 40(%rdi),%r13 + cmpl %edx,%ecx + movq 48(%rdi),%rbp + cmovgl %ecx,%edx + testl %ecx,%ecx + vmovdqu 64(%rdi),%xmm7 + movl %ecx,52(%rsp) + cmovleq %rsp,%r13 + subq %r13,%rbp + movq %rbp,104(%rsp) + movl 96(%rdi),%ecx + movq 80(%rdi),%r14 + cmpl %edx,%ecx + movq 88(%rdi),%rbp + cmovgl %ecx,%edx + testl %ecx,%ecx + vmovdqu 104(%rdi),%xmm8 + movl %ecx,56(%rsp) + cmovleq %rsp,%r14 + subq %r14,%rbp + movq %rbp,112(%rsp) + movl 136(%rdi),%ecx + movq 120(%rdi),%r15 + cmpl %edx,%ecx + movq 128(%rdi),%rbp + cmovgl %ecx,%edx + testl %ecx,%ecx + vmovdqu 144(%rdi),%xmm9 + movl %ecx,60(%rsp) + cmovleq %rsp,%r15 + subq %r15,%rbp + movq %rbp,120(%rsp) + testl %edx,%edx + jz .Lenc8x_done + + vmovups 16-120(%rsi),%xmm1 + vmovups 32-120(%rsi),%xmm0 + movl 240-120(%rsi),%eax + + vpxor (%r8),%xmm15,%xmm10 + leaq 128(%rsp),%rbp + vpxor (%r9),%xmm15,%xmm11 + vpxor (%r10),%xmm15,%xmm12 + vpxor (%r11),%xmm15,%xmm13 + vpxor %xmm10,%xmm2,%xmm2 + vpxor (%r12),%xmm15,%xmm10 + vpxor %xmm11,%xmm3,%xmm3 + vpxor (%r13),%xmm15,%xmm11 + vpxor %xmm12,%xmm4,%xmm4 + vpxor (%r14),%xmm15,%xmm12 + vpxor %xmm13,%xmm5,%xmm5 + vpxor (%r15),%xmm15,%xmm13 + vpxor %xmm10,%xmm6,%xmm6 + movl $1,%ecx + vpxor %xmm11,%xmm7,%xmm7 + vpxor %xmm12,%xmm8,%xmm8 + vpxor %xmm13,%xmm9,%xmm9 + jmp .Loop_enc8x + +.align 32 +.Loop_enc8x: + vaesenc %xmm1,%xmm2,%xmm2 + cmpl 32+0(%rsp),%ecx + vaesenc %xmm1,%xmm3,%xmm3 + prefetcht0 31(%r8) + vaesenc %xmm1,%xmm4,%xmm4 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Aug 26 17:04:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4BD83B33A1; Wed, 26 Aug 2020 17:04:34 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcBzk39N0z4Jq8; Wed, 26 Aug 2020 17:04:34 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x32c.google.com with SMTP id w2so2268727wmi.1; Wed, 26 Aug 2020 10:04:34 -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=VOFJKTTWHwEIws6WD+/o1HDeM/AMNWjMasLkA5XoMHo=; b=koCQG1ZO+g9PPn0kPUQ1I+Zg79MNEUUIxG4BxXQYOwuxH6aBP2xU8TOB7SWFZ6AkA4 fSqbsyz0Yz/P1dQlKDkP8yC8yvXi0Z73tsx4PDX5gYwvqUXTEJh0CfUC+n94BpBR9wvx hanav/iMR6KwW0q12DedXMfiBbfMsHsTLePga+I5Y9cV9TBuqbtfw/+a+Nm2r/JsGyuN jAGymfw3RaRH4LQJUoqUIHhE+v/umE4U7+0FuuSXKO9AUVKzh331uGwPKjWUp/X9N9na kFtoaO4/umIXfiLLBISYtN0jWSLr+FOzI8LSsWwb4oCXQK6nyLn13q6Aqcj5khOKgO9S uFaw== 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=VOFJKTTWHwEIws6WD+/o1HDeM/AMNWjMasLkA5XoMHo=; b=ceiBRAfDpXf6yAm1ezedK0rhYJhGUlaBO5tye1amWnjaeEGKKtvU02caTF8M69y9m1 i8T0xY1rGJbh7/JIYk4ZTEeCpx5HVDrFSGt11hXdAcdUkBzeNl8MabUCAuk44ptajyWx ZYS5QduDvrr9Nyp1rsj6FUuMTwrUbNntj7Oqt9Ac0LIEiNrtDfhAUy0yHU4ht7030xcM TgZF1J3F3MtG8zGV2xICJ2OdT2nJp9ojjE68NEaWP7fVeZEjtTO6l1rVVtyAL+b48GDt WmDslqms2W0iJwF2fFEmdI8Yxsjr9n4hunIKEeqo7emjrd+7JESzYbKZHV+MJ7lsmmyF w3XQ== X-Gm-Message-State: AOAM531cZlXXTm4CVNq47CIu2xr/MHUmpXa5kGNZV0rmh4q+QwsJV96k 0Qsr5zprLr2MSgrMuIh+bMi+J9A4qJMrRiCbHoSBuAiS X-Google-Smtp-Source: ABdhPJzlOtfoNcukJX3y+bXO7pDST0mdAEdHyetGz7zkNvAg0Js0qelALWYQC0M0uv/OfZLMo51UH5A6jqFTVukmqlg= X-Received: by 2002:a05:600c:4150:: with SMTP id h16mr8170919wmm.127.1598461471633; Wed, 26 Aug 2020 10:04:31 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:5347:0:0:0:0:0 with HTTP; Wed, 26 Aug 2020 10:04:30 -0700 (PDT) In-Reply-To: <202008261655.07QGtSZx096979@repo.freebsd.org> References: <202008261655.07QGtSZx096979@repo.freebsd.org> From: Mateusz Guzik Date: Wed, 26 Aug 2020 19:04:30 +0200 Message-ID: Subject: Re: svn commit: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm To: Jung-uk Kim Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4BcBzk39N0z4Jq8 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 17:04:34 -0000 On 8/26/20, Jung-uk Kim wrote: > Author: jkim > Date: Wed Aug 26 16:55:28 2020 > New Revision: 364822 > URL: https://svnweb.freebsd.org/changeset/base/364822 > > Log: > Fix Clang version detection. > > We prepend "FreeBSD" to Clang version string. This broke compiler test > for > AVX instruction support. > What about other software checking in similar fashion? imo the right fix is to stop mucking with the way clang reports itself > Reported by: jhb > > Modified: > head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl > head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl > head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl > head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl > head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl > head/crypto/openssl/crypto/bn/asm/x86_64-mont.pl > head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl > head/crypto/openssl/crypto/chacha/asm/chacha-x86.pl > head/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl > head/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl > head/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl > head/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl > head/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl > head/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl > head/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl > head/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl > head/crypto/openssl/crypto/sha/asm/sha1-586.pl > head/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl > head/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl > head/crypto/openssl/crypto/sha/asm/sha256-586.pl > head/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl > head/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl > > Modified: head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl > ============================================================================== > --- head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl Wed Aug 26 > 15:43:44 2020 (r364821) > +++ head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl Wed Aug 26 > 16:55:28 2020 (r364822) > @@ -70,7 +70,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM > $avx = ($1>=10) + ($1>=11); > } > > -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > $avx = ($2>=3.0) + ($2>3.0); > } > > > Modified: head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl > ============================================================================== > --- head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl Wed Aug 26 > 15:43:44 2020 (r364821) > +++ head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl Wed Aug 26 > 16:55:28 2020 (r364822) > @@ -108,7 +108,7 @@ $avx=1 if (!$avx && $win64 && ($flavour =~ /nasm/ || $ > $avx=1 if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) > && > `ml64 2>&1` =~ /Version ([0-9]+)\./ && > $1>=10); > -$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based > on LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0); > +$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based > on LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0); > > $shaext=1; ### set to zero if compiling for 1.0.1 > > > Modified: head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl > ============================================================================== > --- head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl Wed Aug 26 > 15:43:44 2020 (r364821) > +++ head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl Wed Aug 26 > 16:55:28 2020 (r364822) > @@ -70,7 +70,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM > $avx = ($1>=10) + ($1>=12); > } > > -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > $avx = ($2>=3.0) + ($2>3.0); > } > > > Modified: head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl > ============================================================================== > --- head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl Wed Aug 26 15:43:44 > 2020 (r364821) > +++ head/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl Wed Aug 26 16:55:28 > 2020 (r364822) > @@ -66,7 +66,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM > $addx = ($1>=11); > } > > -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) > ([0-9]+)\.([0-9]+)/) { > +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) > ([0-9]+)\.([0-9]+)/) { > my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 > $avx = ($ver>=3.0) + ($ver>=3.01); > $addx = ($ver>=3.03); > > Modified: head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl > ============================================================================== > --- head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl Wed Aug 26 15:43:44 > 2020 (r364821) > +++ head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl Wed Aug 26 16:55:28 > 2020 (r364822) > @@ -81,7 +81,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS > $addx = ($1>=12); > } > > -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+)\.([0-9]+)/) { > +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+)\.([0-9]+)/) { > my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 > $addx = ($ver>=3.03); > } > > Modified: head/crypto/openssl/crypto/bn/asm/x86_64-mont.pl > ============================================================================== > --- head/crypto/openssl/crypto/bn/asm/x86_64-mont.pl Wed Aug 26 15:43:44 > 2020 (r364821) > +++ head/crypto/openssl/crypto/bn/asm/x86_64-mont.pl Wed Aug 26 16:55:28 > 2020 (r364822) > @@ -75,7 +75,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS > $addx = ($1>=12); > } > > -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+)\.([0-9]+)/) { > +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+)\.([0-9]+)/) { > my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 > $addx = ($ver>=3.03); > } > > Modified: head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl > ============================================================================== > --- head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl Wed Aug 26 15:43:44 > 2020 (r364821) > +++ head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl Wed Aug 26 16:55:28 > 2020 (r364822) > @@ -60,7 +60,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS > $addx = ($1>=12); > } > > -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+)\.([0-9]+)/) { > +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+)\.([0-9]+)/) { > my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 > $addx = ($ver>=3.03); > } > > Modified: head/crypto/openssl/crypto/chacha/asm/chacha-x86.pl > ============================================================================== > --- head/crypto/openssl/crypto/chacha/asm/chacha-x86.pl Wed Aug 26 15:43:44 > 2020 (r364821) > +++ head/crypto/openssl/crypto/chacha/asm/chacha-x86.pl Wed Aug 26 16:55:28 > 2020 (r364822) > @@ -62,7 +62,7 @@ $ymm=1 if ($xmm && !$ymm && $ARGV[0] eq "win32" && > $1>=10); # first version supporting AVX > > $ymm=1 if ($xmm && !$ymm && > - `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) > ([0-9]+\.[0-9]+)/ && > + `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) > ([0-9]+\.[0-9]+)/ && > $2>=3.0); # first version supporting AVX > > $a="eax"; > > Modified: head/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl > ============================================================================== > --- head/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl Wed Aug 26 > 15:43:44 2020 (r364821) > +++ head/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl Wed Aug 26 > 16:55:28 2020 (r364822) > @@ -85,7 +85,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM > $avx = ($1>=10) + ($1>=11); > } > > -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > $avx = ($2>=3.0) + ($2>3.0); > } > > > Modified: head/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl > ============================================================================== > --- head/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl Wed Aug 26 > 15:43:44 2020 (r364821) > +++ head/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl Wed Aug 26 > 16:55:28 2020 (r364822) > @@ -47,7 +47,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS > $addx = ($1>=12); > } > > -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on > LLVM) ([0-9]+)\.([0-9]+)/) { > +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) > ([0-9]+)\.([0-9]+)/) { > my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 > $avx = ($ver>=3.0) + ($ver>=3.01); > $addx = ($ver>=3.03); > > Modified: head/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl > ============================================================================== > --- head/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl Wed Aug 26 > 15:43:44 2020 (r364821) > +++ head/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl Wed Aug 26 > 16:55:28 2020 (r364822) > @@ -72,7 +72,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS > $addx = ($1>=12); > } > > -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+)\.([0-9]+)/) { > +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+)\.([0-9]+)/) { > my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 > $avx = ($ver>=3.0) + ($ver>=3.01); > $addx = ($ver>=3.03); > > Modified: head/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl > ============================================================================== > --- head/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl Wed Aug 26 15:43:44 > 2020 (r364821) > +++ head/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl Wed Aug 26 16:55:28 > 2020 (r364822) > @@ -90,7 +90,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS > $addx = ($1>=12); > } > > -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+)\.([0-9]+)/) { > +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+)\.([0-9]+)/) { > my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 > $addx = ($ver>=3.03); > } > > Modified: head/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl > ============================================================================== > --- head/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl Wed Aug 26 > 15:43:44 2020 (r364821) > +++ head/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl Wed Aug 26 > 16:55:28 2020 (r364822) > @@ -66,7 +66,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM > $avx = ($1>=10) + ($1>=11); > } > > -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > $avx = ($2>=3.0) + ($2>3.0); > } > > > Modified: head/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl > ============================================================================== > --- head/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl Wed Aug 26 15:43:44 > 2020 (r364821) > +++ head/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl Wed Aug 26 16:55:28 > 2020 (r364822) > @@ -116,7 +116,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM > $avx = ($1>=10) + ($1>=11); > } > > -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > $avx = ($2>=3.0) + ($2>3.0); > } > > > Modified: head/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl > ============================================================================== > --- head/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl Wed Aug 26 > 15:43:44 2020 (r364821) > +++ head/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl Wed Aug 26 > 16:55:28 2020 (r364822) > @@ -71,7 +71,7 @@ if ($sse2) { > $avx = ($1>=2.09) + ($1>=2.10); > } > > - if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on > LLVM) ([0-9]+\.[0-9]+)/) { > + if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) > ([0-9]+\.[0-9]+)/) { > $avx = ($2>=3.0) + ($2>3.0); > } > } > > Modified: head/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl > ============================================================================== > --- head/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl Wed Aug 26 > 15:43:44 2020 (r364821) > +++ head/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl Wed Aug 26 > 16:55:28 2020 (r364822) > @@ -90,7 +90,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM > $avx = ($1>=10) + ($1>=12); > } > > -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > $avx = ($2>=3.0) + ($2>3.0); > } > > > Modified: head/crypto/openssl/crypto/sha/asm/sha1-586.pl > ============================================================================== > --- head/crypto/openssl/crypto/sha/asm/sha1-586.pl Wed Aug 26 15:43:44 > 2020 (r364821) > +++ head/crypto/openssl/crypto/sha/asm/sha1-586.pl Wed Aug 26 16:55:28 > 2020 (r364822) > @@ -144,7 +144,7 @@ $ymm=1 if ($xmm && !$ymm && $ARGV[0] eq "win32" && > `ml 2>&1` =~ /Version ([0-9]+)\./ && > $1>=10); # first version supporting AVX > > -$ymm=1 if ($xmm && !$ymm && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) > version|based on LLVM) ([0-9]+\.[0-9]+)/ && > +$ymm=1 if ($xmm && !$ymm && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) > version|based on LLVM) ([0-9]+\.[0-9]+)/ && > $2>=3.0); # first version supporting AVX > > $shaext=$xmm; ### set to zero if compiling for 1.0.1 > > Modified: head/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl > ============================================================================== > --- head/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl Wed Aug 26 15:43:44 > 2020 (r364821) > +++ head/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl Wed Aug 26 16:55:28 > 2020 (r364822) > @@ -66,7 +66,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM > $avx = ($1>=10) + ($1>=11); > } > > -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > $avx = ($2>=3.0) + ($2>3.0); > } > > > Modified: head/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl > ============================================================================== > --- head/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl Wed Aug 26 15:43:44 > 2020 (r364821) > +++ head/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl Wed Aug 26 16:55:28 > 2020 (r364822) > @@ -119,7 +119,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM > $avx = ($1>=10) + ($1>=11); > } > > -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > $avx = ($2>=3.0) + ($2>3.0); > } > > > Modified: head/crypto/openssl/crypto/sha/asm/sha256-586.pl > ============================================================================== > --- head/crypto/openssl/crypto/sha/asm/sha256-586.pl Wed Aug 26 15:43:44 > 2020 (r364821) > +++ head/crypto/openssl/crypto/sha/asm/sha256-586.pl Wed Aug 26 16:55:28 > 2020 (r364822) > @@ -96,7 +96,7 @@ if ($xmm && !$avx && $ARGV[0] eq "win32" && > $avx = ($1>=10) + ($1>=11); > } > > -if ($xmm && !$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based > on LLVM) ([0-9]+\.[0-9]+)/) { > +if ($xmm && !$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based > on LLVM) ([0-9]+\.[0-9]+)/) { > $avx = ($2>=3.0) + ($2>3.0); > } > > > Modified: head/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl > ============================================================================== > --- head/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl Wed Aug 26 > 15:43:44 2020 (r364821) > +++ head/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl Wed Aug 26 > 16:55:28 2020 (r364822) > @@ -67,7 +67,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM > $avx = ($1>=10) + ($1>=11); > } > > -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > $avx = ($2>=3.0) + ($2>3.0); > } > > > Modified: head/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl > ============================================================================== > --- head/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl Wed Aug 26 15:43:44 > 2020 (r364821) > +++ head/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl Wed Aug 26 16:55:28 > 2020 (r364822) > @@ -135,7 +135,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM > $avx = ($1>=10) + ($1>=11); > } > > -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on > LLVM) ([0-9]+\.[0-9]+)/) { > $avx = ($2>=3.0) + ($2>3.0); > } > > -- Mateusz Guzik From owner-svn-src-all@freebsd.org Wed Aug 26 17:06:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D6AD3B33C4; Wed, 26 Aug 2020 17:06: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcC1j2lcPz4KC1; Wed, 26 Aug 2020 17:06:17 +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 41FF71644A; Wed, 26 Aug 2020 17:06:17 +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 07QH6HvX004456; Wed, 26 Aug 2020 17:06:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QH6Hu3004455; Wed, 26 Aug 2020 17:06:17 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008261706.07QH6Hu3004455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 26 Aug 2020 17:06:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364824 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 364824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 17:06:17 -0000 Author: imp Date: Wed Aug 26 17:06:16 2020 New Revision: 364824 URL: https://svnweb.freebsd.org/changeset/base/364824 Log: Make sbuf_setpos match the implementation. sbuf_setpos can only be used to truncate the buffer, never to make it longer. Update the documentation to reflect this. Reviewed By: allanjude, phk Differential Revision: https://reviews.freebsd.org/D26198 Modified: head/share/man/man9/sbuf.9 Modified: head/share/man/man9/sbuf.9 ============================================================================== --- head/share/man/man9/sbuf.9 Wed Aug 26 16:56:44 2020 (r364823) +++ head/share/man/man9/sbuf.9 Wed Aug 26 17:06:16 2020 (r364824) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 7, 2019 +.Dd August 26, 2020 .Dt SBUF 9 .Os .Sh NAME @@ -370,9 +370,8 @@ function sets the .Fa sbuf Ns 's end position to .Fa pos , -which is a value between zero and one less than the size of the -storage buffer. -This effectively truncates the sbuf at the new position. +which is a value between zero and the current position in the buffer. +It can only truncate the sbuf to the new position. .Pp The .Fn sbuf_bcat From owner-svn-src-all@freebsd.org Wed Aug 26 17:09:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 179023B34F4 for ; Wed, 26 Aug 2020 17:09:25 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcC5J1fz1z4KMF for ; Wed, 26 Aug 2020 17:09:23 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f67.google.com with SMTP id s13so2516556wmh.4 for ; Wed, 26 Aug 2020 10:09:23 -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:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ntgY0YbWc++h+4H7EEPy/uu+suEfWWPLprozJLlXe6Y=; b=AK7e/ll9kBT1TDjtenDg2lkA3x1DSLosSWkESVLUOk86+LAewIWzdHcmKt/rnWadgV Q7llZ2Dimw8G6zW2pc2SS5sVaUKMu8MFqcbFxqH5a9gLDbRcWgejmF+rn38APxVk1h4r iM4mmSSA2lZmAU3a/EjtsIMUnTLzKueXXcnnupSGxpES+xhwTdONs1CxNP0choCAPCFL MtR/OUPMmb+MV02QJ4jlhwZ2B/ZGubw6HpwsVXDQK098g7BECdYUTDE71H6izf4wyZ8r SLW2H0jKIBioa6Ag+ZLvMQkiVoUDXOugJizHTZos2qIOqfqiL4tmOnDBK/vc/M0Ot+6r Ujvw== X-Gm-Message-State: AOAM5320SSa82a3Gj1QyH0cELWLixxd06m3nNWRScog3WPf7bG1JxXuE Z8NDZZ/xLgioXRQxn4fcV3f+gpg1iIxYHA== X-Google-Smtp-Source: ABdhPJy/2hXvCGtEz76xXzi2lXDVTSItHsBvbKZzokPktwEKGDOUyBDFJds6g2CKXAL51WmnfpWvXQ== X-Received: by 2002:a1c:740e:: with SMTP id p14mr7747479wmc.179.1598461762694; Wed, 26 Aug 2020 10:09:22 -0700 (PDT) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id z6sm7188356wml.41.2020.08.26.10.09.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Aug 2020 10:09:21 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: svn commit: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm From: Jessica Clarke In-Reply-To: Date: Wed, 26 Aug 2020 18:09:19 +0100 Cc: Jung-uk Kim , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <1005AA00-136E-4C56-807B-391CEC2A0051@freebsd.org> References: <202008261655.07QGtSZx096979@repo.freebsd.org> To: Mateusz Guzik X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Rspamd-Queue-Id: 4BcC5J1fz1z4KMF X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.67 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-1.68 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.51)[-0.511]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.82)[-0.819]; FREEFALL_USER(0.00)[jrtc27]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.85)[-0.853]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.67:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.67:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 17:09:25 -0000 On 26 Aug 2020, at 18:04, Mateusz Guzik wrote: > > On 8/26/20, Jung-uk Kim wrote: >> Author: jkim >> Date: Wed Aug 26 16:55:28 2020 >> New Revision: 364822 >> URL: https://svnweb.freebsd.org/changeset/base/364822 >> >> Log: >> Fix Clang version detection. >> >> We prepend "FreeBSD" to Clang version string. This broke compiler test >> for >> AVX instruction support. >> > > What about other software checking in similar fashion? imo the right > fix is to stop mucking with the way clang reports itself Apple's LLVM also does the same thing. Whilst it may be better to leave the string alone, it is sometimes useful information and, given the existence of Apple's LLVM, well-behaved software should already be dealing with this properly; based on this commit, upstream OpenSSL seems like it suffers the same bug on macOS. Jess From owner-svn-src-all@freebsd.org Wed Aug 26 17:14:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7EAC43B3A36 for ; Wed, 26 Aug 2020 17:14:01 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound5a.ore.mailhop.org (outbound5a.ore.mailhop.org [44.233.67.66]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcCBc5ncZz4Kg5 for ; Wed, 26 Aug 2020 17:14:00 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1598462033; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=M20qIZO7XpFVL5388mF/cn9UmDW4c1AXMLeZ1xn5D7STGwWelf6ATo5cyP9fgyOo/aijEIBv+0KwO 5PHAPjO5fvqXiJf37lQCWRQ/VOLlZXSC/qtlusUTAMdBAh6c636wCiqqdKugEUF7QMpgpFOnZM/u8g c93p8/8b0qWEYZMwu+9IScuaWDefbSZ6Z4irKDI8ZtdkMg0ngYSVdzMxSaAv/6QLUuj85WZMgWOWLR X/b8wxULj/RJQlHn1r5QFbDeaBkhFoUxrsCtaV1tEs5N45HaM6x4Sh+pVFCnnHXUo2tjJrXX79TGoA 4DO0G0OCeUi+GvSOA8jhpHtYyygSuCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=gu8G8Q5LNIslAcGyVspUc1TuCeoFLiJ1W/FInZc8ZwU=; b=O83o0GtwXPgqEl6W9AzDFdlQQgvdG+r0dEhm1WcI/wR1iLBuZfpZMjhN+7syFtAliFOuDZcw9ZqUp eLI9Yt65vb1JNn6xFbS0l18Xa3Ybg6GnbbiutIFOHUYylNXwT7gb9z3mHgjRYtvkURyus85PzJNr49 TcPx6eJR63cQ8gBbDo/xDo6ES+ttCjeS4DaxOwsuSunfBkEeHZaIZ+T3E1lnO/d0npW33NCv0omRBP kG3cwcYTBpR1TflNkFP7aHAZAcBolszDw3uOtxvikw2/e6IFCk7pvjmizQjab5At0qHYuKmVQxfIIo cDA8rRwWEnJ4DYvkUAWhEEW8rl0DBPg== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=gu8G8Q5LNIslAcGyVspUc1TuCeoFLiJ1W/FInZc8ZwU=; b=n4GBsKvgdx5HvwV+kSYYOShvfFkdzqy/tpPnDtQNqRjpGezHW//PMlB0gsL/IxqXSRUgURNj2OGNy yiI/Zg2NUKIfqLICGv4J+RSOZrHGzuimRnA1esjl8JpxboS558FOY0Fg5M1W2N/qavd8QJWBZwhwNu k4oXTpLWHU7fN0TqUF4A8AqvTzG7eg4ybiUN5l6fEJCEvyl6JKiRqfOfsx7wDwCd9QjJPxZweZHP87 2TmEXL5LhnnYREVtYGDsbcANE1ZoUYMtIGxIRoT3m6fatGaLuQ7lzr3He2ub3wTKEh5SxvxPx+VKdT jSyOed3xhOowq3kDWUFSxa6DH6rbcPw== X-MHO-RoutePath: aGlwcGll X-MHO-User: 82ba72f9-e7bf-11ea-a2bb-9f0c275c2f69 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 (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 82ba72f9-e7bf-11ea-a2bb-9f0c275c2f69; Wed, 26 Aug 2020 17:13:51 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 07QHDocY018073; Wed, 26 Aug 2020 11:13:50 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <7f1149b6e8dfd1600ff235b7b1aaae3b746b4a9f.camel@freebsd.org> Subject: Re: svn commit: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm From: Ian Lepore To: Mateusz Guzik , Jung-uk Kim Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 26 Aug 2020 11:13:50 -0600 In-Reply-To: References: <202008261655.07QGtSZx096979@repo.freebsd.org> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BcCBc5ncZz4Kg5 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:44.224.0.0/11, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 17:14:01 -0000 On Wed, 2020-08-26 at 19:04 +0200, Mateusz Guzik wrote: > On 8/26/20, Jung-uk Kim wrote: > > Author: jkim > > Date: Wed Aug 26 16:55:28 2020 > > New Revision: 364822 > > URL: https://svnweb.freebsd.org/changeset/base/364822 > > > > Log: > > Fix Clang version detection. > > > > We prepend "FreeBSD" to Clang version string. This broke > > compiler test > > for > > AVX instruction support. > > > > What about other software checking in similar fashion? imo the right > fix is to stop mucking with the way clang reports itself > Maybe it would be better to not modify the start of the string. Instead of FreeBSD clang version 9.0.1 (git@github.com:llvm/llvm-project.git c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1) maybe clang version 9.0.1 for FreeBSD (git@github.com:llvm/llvm-project.git c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1) -- Ian From owner-svn-src-all@freebsd.org Wed Aug 26 17:14:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 09ABA3B3B8A; Wed, 26 Aug 2020 17:14:18 +0000 (UTC) (envelope-from grembo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcCBx3WLsz4Ks8; Wed, 26 Aug 2020 17:14:17 +0000 (UTC) (envelope-from grembo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 825DC166BD; Wed, 26 Aug 2020 17:14:16 +0000 (UTC) (envelope-from grembo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QHEGNE011789; Wed, 26 Aug 2020 17:14:16 GMT (envelope-from grembo@FreeBSD.org) Received: (from grembo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QHEGgq011788; Wed, 26 Aug 2020 17:14:16 GMT (envelope-from grembo@FreeBSD.org) Message-Id: <202008261714.07QHEGgq011788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grembo set sender to grembo@FreeBSD.org using -f From: Michael Gmelin Date: Wed, 26 Aug 2020 17:14: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: r364825 - stable/11/usr.sbin/freebsd-update X-SVN-Group: stable-11 X-SVN-Commit-Author: grembo X-SVN-Commit-Paths: stable/11/usr.sbin/freebsd-update X-SVN-Commit-Revision: 364825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 17:14:18 -0000 Author: grembo (ports committer) Date: Wed Aug 26 17:14:16 2020 New Revision: 364825 URL: https://svnweb.freebsd.org/changeset/base/364825 Log: MFC r364396: Unbreak `freebsd-update updatesready'. The command would only work if PWD happened to be WORKDIR. Also, exit 1 in case WORKDIR exists, but isn't accessible by the current user. PR: 242709 Reported by: Max Fiedler 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 Wed Aug 26 17:06:16 2020 (r364824) +++ stable/11/usr.sbin/freebsd-update/freebsd-update.sh Wed Aug 26 17:14:16 2020 (r364825) @@ -3341,8 +3341,18 @@ cmd_upgrade () { upgrade_run || exit 1 } -# Check if there are fetched updates ready to install +# Check if there are fetched updates ready to install. +# Chdir into the working directory. cmd_updatesready () { + # Check if working directory exists (if not, no updates pending) + if ! [ -e "${WORKDIR}" ]; then + echo "No updates are available to install." + exit 2 + fi + + # Change into working directory (fail if no permission/directory etc.) + cd ${WORKDIR} || exit 1 + # Construct a unique name from ${BASEDIR} BDHASH=`echo ${BASEDIR} | sha256 -q` From owner-svn-src-all@freebsd.org Wed Aug 26 17:15:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41E4E3B3BB7; Wed, 26 Aug 2020 17:15:18 +0000 (UTC) (envelope-from grembo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcCD610qlz4L1f; Wed, 26 Aug 2020 17:15:18 +0000 (UTC) (envelope-from grembo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 071F11664F; Wed, 26 Aug 2020 17:15:18 +0000 (UTC) (envelope-from grembo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QHFH7k012033; Wed, 26 Aug 2020 17:15:17 GMT (envelope-from grembo@FreeBSD.org) Received: (from grembo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QHFHG9012032; Wed, 26 Aug 2020 17:15:17 GMT (envelope-from grembo@FreeBSD.org) Message-Id: <202008261715.07QHFHG9012032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grembo set sender to grembo@FreeBSD.org using -f From: Michael Gmelin Date: Wed, 26 Aug 2020 17:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364826 - stable/12/usr.sbin/freebsd-update X-SVN-Group: stable-12 X-SVN-Commit-Author: grembo X-SVN-Commit-Paths: stable/12/usr.sbin/freebsd-update X-SVN-Commit-Revision: 364826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 17:15:18 -0000 Author: grembo (ports committer) Date: Wed Aug 26 17:15:17 2020 New Revision: 364826 URL: https://svnweb.freebsd.org/changeset/base/364826 Log: MFC r364396: Unbreak `freebsd-update updatesready'. The command would only work if PWD happened to be WORKDIR. Also, exit 1 in case WORKDIR exists, but isn't accessible by the current user. PR: 242709 Reported by: Max Fiedler Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Wed Aug 26 17:14:16 2020 (r364825) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Wed Aug 26 17:15:17 2020 (r364826) @@ -3341,8 +3341,18 @@ cmd_upgrade () { upgrade_run || exit 1 } -# Check if there are fetched updates ready to install +# Check if there are fetched updates ready to install. +# Chdir into the working directory. cmd_updatesready () { + # Check if working directory exists (if not, no updates pending) + if ! [ -e "${WORKDIR}" ]; then + echo "No updates are available to install." + exit 2 + fi + + # Change into working directory (fail if no permission/directory etc.) + cd ${WORKDIR} || exit 1 + # Construct a unique name from ${BASEDIR} BDHASH=`echo ${BASEDIR} | sha256 -q` From owner-svn-src-all@freebsd.org Wed Aug 26 17:15:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 69F153B3D84; Wed, 26 Aug 2020 17:15:36 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcCDS0s5sz4LLV; Wed, 26 Aug 2020 17:15:35 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by mail-lj1-x232.google.com with SMTP id w25so3219392ljo.12; Wed, 26 Aug 2020 10:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pIomMq6JNXdW4oe4tWBNLahOmtF0xVJ6CD/N2hvWO6o=; b=CcQdK1cc65on8vuRR11S4vWNsAbPL8ZgTmQxQTlCl9GJpSFMNqHkSm0+SBFr1WFkhy McnKuwLwQL/sW1/Cqveo/qZN2B6rrTJNUHotSse8e4lUP0L3h8EasbTpcP7Wx1PVrrto e97PCSoodCbO+yqOjL/ZWEiDDHfidWhBdmLYMsIi8Y7hfzMPQETzwpC8PerqxRcf8sL2 LPp0/16aDQB9b02YARqcvUlUU/a+2QAg+7IZZg5DygcSxAdg2JsZj3KEvEvuzdkZ0FOm jJJlWx+W+SYeGoVn3hUmgjE1Pjuigxgi61Tr7sp8JCDWxklyM6h2anr8YS5XZmJUt0Ba LI2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pIomMq6JNXdW4oe4tWBNLahOmtF0xVJ6CD/N2hvWO6o=; b=g439XWjzFKaNyFwRT5MaKLwwB2K5gDlHVD+lyFUUJa7nlM9q74PQDyDJvaLMUGZ7Xl 8l6NynmsgCAxLRG3UHUVU1iUehM7XlBzcfIxT9uUQCJHMNLOqO6OrNyG/Wxp0NmRTik1 LMEND7ZPBwI7Jmdzai8VOjXhMnJMQ9Y7jDjRAR1dJe8nBJGboFoX09dBi2xDg/IEtQVA g6N+/JMMysRbNaCAQCdisqarZEedFBRmCVmjE9W/zFDHBCM0+UsrRG1EViqlb5do3Poi dKJNbRKUUmlLXj830R4fCc+Gg241NRA3UwbSQ4gS5xEmeGrpfYZlWxjOlX3KbqHXmMev S0YQ== X-Gm-Message-State: AOAM5317C62kfU8bgHPq/WQAT5YF7LiAGZDHwxBuKhRFhqKPwNCnXGPM WX4uHh/gY+UKbBh9TfKXmxXtz6cmP003/6huC1xxwhm0up8= X-Google-Smtp-Source: ABdhPJxSDUet0WMmNUPb/07KKDad+w+RS9VJNU2Rj1pUAkAOFP3Xf2GNaCB17tlEtU1wujYi0lEec/+AtNdNETMfPTc= X-Received: by 2002:a2e:91d4:: with SMTP id u20mr7119273ljg.87.1598462133210; Wed, 26 Aug 2020 10:15:33 -0700 (PDT) MIME-Version: 1.0 References: <202008260729.07Q7THlo023745@repo.freebsd.org> In-Reply-To: <202008260729.07Q7THlo023745@repo.freebsd.org> From: Matthew Macy Date: Wed, 26 Aug 2020 10:15:21 -0700 Message-ID: Subject: Re: svn commit: r364806 - in head/sys/contrib/openzfs: include/os/freebsd/spl/sys module/os/freebsd/spl To: Toomas Soome Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4BcCDS0s5sz4LLV X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 17:15:36 -0000 Do not commit directly to sys/contrib. PR, vendor branch update, then merge. On Wed, Aug 26, 2020 at 12:29 AM Toomas Soome wrote: > > Author: tsoome > Date: Wed Aug 26 07:29:17 2020 > New Revision: 364806 > URL: https://svnweb.freebsd.org/changeset/base/364806 > > Log: > remove pragma ident lines > > The #pragma ident is historical relict and not needed any more, this > pragma is actually unknown for common compilers and is only causing > trouble. > > Modified: > head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h > head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h > head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h > head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h > head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h > head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h > head/sys/contrib/openzfs/module/os/freebsd/spl/list.c > > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h > ============================================================================== > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h Wed Aug 26 07:00:07 2020 (r364805) > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h Wed Aug 26 07:29:17 2020 (r364806) > @@ -26,8 +26,6 @@ > #ifndef _SYS_ACL_IMPL_H > #define _SYS_ACL_IMPL_H > > -#pragma ident "%Z%%M% %I% %E% SMI" > - > #ifdef __cplusplus > extern "C" { > #endif > > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h > ============================================================================== > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h Wed Aug 26 07:00:07 2020 (r364805) > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h Wed Aug 26 07:29:17 2020 (r364806) > @@ -31,8 +31,6 @@ > #ifndef _SYS_CMN_ERR_H > #define _SYS_CMN_ERR_H > > -#pragma ident "%Z%%M% %I% %E% SMI" > - > #if !defined(_ASM) > #include > #endif > > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h > ============================================================================== > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h Wed Aug 26 07:00:07 2020 (r364805) > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h Wed Aug 26 07:29:17 2020 (r364806) > @@ -26,8 +26,6 @@ > #ifndef _SYS_EXTDIRENT_H > #define _SYS_EXTDIRENT_H > > -#pragma ident "%Z%%M% %I% %E% SMI" > - > #ifdef __cplusplus > extern "C" { > #endif > > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h > ============================================================================== > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h Wed Aug 26 07:00:07 2020 (r364805) > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h Wed Aug 26 07:29:17 2020 (r364806) > @@ -26,8 +26,6 @@ > #ifndef _SYS_LIST_H > #define _SYS_LIST_H > > -#pragma ident "%Z%%M% %I% %E% SMI" > - > #include > > #ifdef __cplusplus > > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h > ============================================================================== > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h Wed Aug 26 07:00:07 2020 (r364805) > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h Wed Aug 26 07:29:17 2020 (r364806) > @@ -27,8 +27,6 @@ > #ifndef _SYS_LIST_IMPL_H > #define _SYS_LIST_IMPL_H > > -#pragma ident "%Z%%M% %I% %E% SMI" > - > #include > > #ifdef __cplusplus > > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h > ============================================================================== > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h Wed Aug 26 07:00:07 2020 (r364805) > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h Wed Aug 26 07:29:17 2020 (r364806) > @@ -27,8 +27,6 @@ > #ifndef _ZMOD_H > #define _ZMOD_H > > -#pragma ident "%Z%%M% %I% %E% SMI" > - > #ifdef __cplusplus > extern "C" { > #endif > > Modified: head/sys/contrib/openzfs/module/os/freebsd/spl/list.c > ============================================================================== > --- head/sys/contrib/openzfs/module/os/freebsd/spl/list.c Wed Aug 26 07:00:07 2020 (r364805) > +++ head/sys/contrib/openzfs/module/os/freebsd/spl/list.c Wed Aug 26 07:29:17 2020 (r364806) > @@ -23,8 +23,6 @@ > * Use is subject to license terms. > */ > > -#pragma ident "%Z%%M% %I% %E% SMI" > - > /* > * Generic doubly-linked list implementation > */ From owner-svn-src-all@freebsd.org Wed Aug 26 17:29:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A87FB3B5451; Wed, 26 Aug 2020 17:29:49 +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 4BcCXr1g2Gz4McG; Wed, 26 Aug 2020 17:29:47 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id AzF1kqqSeng7KAzF3k2UgE; Wed, 26 Aug 2020 11:29:45 -0600 X-Authority-Analysis: v=2.3 cv=ecemg4MH c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=y4yBn9ojGxQA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=4wgsC2hmVBIfBVsB2CoA:9 a=89Yf-Dv4xqrt60fL:21 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 3B8D553B; Wed, 26 Aug 2020 10:29:43 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 07QHTgfB008169; Wed, 26 Aug 2020 10:29:43 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202008261729.07QHTgfB008169@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Matthew Macy cc: Toomas Soome , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r364806 - in head/sys/contrib/openzfs: include/os/freebsd/spl/sys module/os/freebsd/spl In-reply-to: References: <202008260729.07Q7THlo023745@repo.freebsd.org> Comments: In-reply-to Matthew Macy message dated "Wed, 26 Aug 2020 10:15:21 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 26 Aug 2020 10:29:42 -0700 X-CMAE-Envelope: MS4wfGRjMJUAx/IFXqooM/WonBAVmgZdVH11a0uKCyOydhALdlrrkURXI2XzKrk78Al+11LFTYeAwXgDvwp7aJtCf04SC3Ao/QVxM6RyhdNEtmiy7vfKM24e 3PEWK6GDHMkNcRkSpXJwAmPTHcpstF0KKO64FRYute36X3B2auiKGDBJW5nknZdgjlTzERirKrfVPTApVAOqxEa3at7TX3w1GHE8kcZ+p+2qW9Mng8kAe2xq w/NwjsCUFnQMn2BV0YtmAmqWmnJ2uACGZ+zHdr61LzFoW+iRpnVEcul3GNyM3APtq6Rwttb3I+LrcL0gl2vO3Q== X-Rspamd-Queue-Id: 4BcCXr1g2Gz4McG X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.9) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [1.33 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[64.59.134.9:from]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.03)[-0.034]; FREEMAIL_TO(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.125.17:received]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.134.9:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.05)[-0.051]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; AUTH_NA(1.00)[]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.11)[0.111]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 17:29:49 -0000 If these are local FreeBSD changes then one *should* commit directly to contrib/. vendor is for virgin vendor sources, i.e. without our modifications. svn does a fair job of merging from vendor to contrib (though occasionally it gets it wrong). Ideally we should push our changes back to the vendor, import those into vendor, then merge the official vendor sources/updates only after we receive them from the vendor or after the vendor has officially accepted them. But to put our changes into the vendor branch is wrong. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. In message , Matthew Macy writes: > Do not commit directly to sys/contrib. PR, vendor branch update, then merge. > > On Wed, Aug 26, 2020 at 12:29 AM Toomas Soome wrote: > > > > Author: tsoome > > Date: Wed Aug 26 07:29:17 2020 > > New Revision: 364806 > > URL: https://svnweb.freebsd.org/changeset/base/364806 > > > > Log: > > remove pragma ident lines > > > > The #pragma ident is historical relict and not needed any more, this > > pragma is actually unknown for common compilers and is only causing > > trouble. > > > > Modified: > > head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h > > head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h > > head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h > > head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h > > head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h > > head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h > > head/sys/contrib/openzfs/module/os/freebsd/spl/list.c > > > > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h > > =========================================================================== > === > > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h Wed > Aug 26 07:00:07 2020 (r364805) > > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/acl_impl.h Wed > Aug 26 07:29:17 2020 (r364806) > > @@ -26,8 +26,6 @@ > > #ifndef _SYS_ACL_IMPL_H > > #define _SYS_ACL_IMPL_H > > > > -#pragma ident "%Z%%M% %I% %E% SMI" > > - > > #ifdef __cplusplus > > extern "C" { > > #endif > > > > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h > > =========================================================================== > === > > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h Wed > Aug 26 07:00:07 2020 (r364805) > > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h Wed > Aug 26 07:29:17 2020 (r364806) > > @@ -31,8 +31,6 @@ > > #ifndef _SYS_CMN_ERR_H > > #define _SYS_CMN_ERR_H > > > > -#pragma ident "%Z%%M% %I% %E% SMI" > > - > > #if !defined(_ASM) > > #include > > #endif > > > > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h > > =========================================================================== > === > > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h Wed > Aug 26 07:00:07 2020 (r364805) > > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/extdirent.h Wed > Aug 26 07:29:17 2020 (r364806) > > @@ -26,8 +26,6 @@ > > #ifndef _SYS_EXTDIRENT_H > > #define _SYS_EXTDIRENT_H > > > > -#pragma ident "%Z%%M% %I% %E% SMI" > > - > > #ifdef __cplusplus > > extern "C" { > > #endif > > > > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h > > =========================================================================== > === > > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h Wed Aug 26 > 07:00:07 2020 (r364805) > > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list.h Wed Aug 26 > 07:29:17 2020 (r364806) > > @@ -26,8 +26,6 @@ > > #ifndef _SYS_LIST_H > > #define _SYS_LIST_H > > > > -#pragma ident "%Z%%M% %I% %E% SMI" > > - > > #include > > > > #ifdef __cplusplus > > > > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h > > =========================================================================== > === > > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h Wed > Aug 26 07:00:07 2020 (r364805) > > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/list_impl.h Wed > Aug 26 07:29:17 2020 (r364806) > > @@ -27,8 +27,6 @@ > > #ifndef _SYS_LIST_IMPL_H > > #define _SYS_LIST_IMPL_H > > > > -#pragma ident "%Z%%M% %I% %E% SMI" > > - > > #include > > > > #ifdef __cplusplus > > > > Modified: head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h > > =========================================================================== > === > > --- head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h Wed Aug 26 > 07:00:07 2020 (r364805) > > +++ head/sys/contrib/openzfs/include/os/freebsd/spl/sys/zmod.h Wed Aug 26 > 07:29:17 2020 (r364806) > > @@ -27,8 +27,6 @@ > > #ifndef _ZMOD_H > > #define _ZMOD_H > > > > -#pragma ident "%Z%%M% %I% %E% SMI" > > - > > #ifdef __cplusplus > > extern "C" { > > #endif > > > > Modified: head/sys/contrib/openzfs/module/os/freebsd/spl/list.c > > =========================================================================== > === > > --- head/sys/contrib/openzfs/module/os/freebsd/spl/list.c Wed Aug 26 > 07:00:07 2020 (r364805) > > +++ head/sys/contrib/openzfs/module/os/freebsd/spl/list.c Wed Aug 26 > 07:29:17 2020 (r364806) > > @@ -23,8 +23,6 @@ > > * Use is subject to license terms. > > */ > > > > -#pragma ident "%Z%%M% %I% %E% SMI" > > - > > /* > > * Generic doubly-linked list implementation > > */ > From owner-svn-src-all@freebsd.org Wed Aug 26 17:33:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 97AB73B5C04; Wed, 26 Aug 2020 17:33:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcCcm3b6Dz4NKM; Wed, 26 Aug 2020 17:33:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8681:1cb0:9808:df28:c1f9:5a05]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id C1AC822515; Wed, 26 Aug 2020 17:33:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r364806 - in head/sys/contrib/openzfs: include/os/freebsd/spl/sys module/os/freebsd/spl To: Matthew Macy , Toomas Soome Cc: src-committers , svn-src-all , svn-src-head References: <202008260729.07Q7THlo023745@repo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Wed, 26 Aug 2020 10:33:09 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: 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.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 17:33:12 -0000 On 8/26/20 10:15 AM, Matthew Macy wrote: > Do not commit directly to sys/contrib. PR, vendor branch update, then merge. We do live in a world where source control is able to merge changes, and it should be ok in that world to commit things directly while waiting for the PR to be merged and letting the VCS figure it out on the next merge. We haven't had a policy of never comitting directly to contrib/ since the CVS days. I do agree that changes should be pushed upstream to keep local diffs as small as possible, but reasonable judgement should be applied rather than a hard rule banning all commits. > On Wed, Aug 26, 2020 at 12:29 AM Toomas Soome wrote: >> >> Author: tsoome >> Date: Wed Aug 26 07:29:17 2020 >> New Revision: 364806 >> URL: https://svnweb.freebsd.org/changeset/base/364806 >> >> Log: >> remove pragma ident lines >> >> The #pragma ident is historical relict and not needed any more, this >> pragma is actually unknown for common compilers and is only causing >> trouble. -- John Baldwin From owner-svn-src-all@freebsd.org Wed Aug 26 17:43:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E884F3B5CE4 for ; Wed, 26 Aug 2020 17:43:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcCrM1w1jz4Njd for ; Wed, 26 Aug 2020 17:43:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82d.google.com with SMTP id p36so2056564qtd.12 for ; Wed, 26 Aug 2020 10:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nYj00C9aJusmZUGmz76zRC062/e0NWALNx/+WIV0dH8=; b=q0Q9D8ieSywwbmzaJAvAwiXH/xFUykGjmLuSY23+lV1qXRYSSmdhkk0qmljj0Ikys4 Bryi6ew1KquzF8rN7+hrBlJM+GlBM2dODl4bVsCG1h8wmvVcmzkwbyW2pSisuumiNLYO GxvOu1qLF3HkUU4U2onPyt+21WyTyLq3GDK9GC1mZXZKEFLuNr8IJlegbKNy0e0e5+5T spnDmxN6l//pBOXNtQLhTrekjeF9f0xkZpC8KhhlOpf/snEoft+fZ18zp126mp02YeFw Xfbx5tDIFutNdMNFWUl+lmLVdoNVwgXXz+sq0N7g6dcP+yn5gji3UEGH47pk0z+ElIK5 SBIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nYj00C9aJusmZUGmz76zRC062/e0NWALNx/+WIV0dH8=; b=ZQEYO9Zy3JkynXU657jKFKEXlLHz4k0DMULRA52n0Te9gKj/7ExkqmQw10FuOzNr0J kXTmNJNgMvNnoDhiJ0av2rypss09/1xQWd5AETJkMnwNZtcWyAUdN++b0rK2bZNHeMr0 69TmGZkUEd7VVu0dhdJAujebDqLIH1wqhzJxgRrpEcP2v+DpwWEimBsrelzt5EJshAD8 gLvn7sZ2H2exEFUcAgQlG6JQIyF6vY1/p7J0PugzIPtMew7JLWTVh/zZYe7eLT10j8gR UX+24ArSWmUxMZUc2+vHxRYtceZXR+MyiYA9ekf8+njxZgKaWRje55uuHL901Y5X8QQS oKpQ== X-Gm-Message-State: AOAM531NTdhgrh/5bOv9KztoOCRz+AuOSTunlYMlHVtKYtOt33vVwSPM jZ7knkF64w6HfbF0h/X0F5fv/VDbb5BSrV4N9w2J4g== X-Google-Smtp-Source: ABdhPJze8RErX6356bKse+0pPgXKq/MeEqOFgLuF+iVz+XKdKIgAt0Oslu2cuG7UB2h4Y+NiAbDB65KAzuawndBOk1o= X-Received: by 2002:ac8:4719:: with SMTP id f25mr15420642qtp.291.1598463793981; Wed, 26 Aug 2020 10:43:13 -0700 (PDT) MIME-Version: 1.0 References: <202008260729.07Q7THlo023745@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 26 Aug 2020 11:43:03 -0600 Message-ID: Subject: Re: svn commit: r364806 - in head/sys/contrib/openzfs: include/os/freebsd/spl/sys module/os/freebsd/spl To: John Baldwin Cc: Matthew Macy , Toomas Soome , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BcCrM1w1jz4Njd X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=q0Q9D8ie; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::82d) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-0.44 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-0.74)[-0.737]; NEURAL_HAM_LONG(-0.10)[-0.100]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82d:from]; NEURAL_SPAM_SHORT(0.40)[0.397]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; DMARC_NA(0.00)[bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-all]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 17:43:16 -0000 On Wed, Aug 26, 2020 at 11:33 AM John Baldwin wrote: > On 8/26/20 10:15 AM, Matthew Macy wrote: > > Do not commit directly to sys/contrib. PR, vendor branch update, then > merge. > > We do live in a world where source control is able to merge changes, and > it should be ok in that world to commit things directly while waiting for > the PR to be merged and letting the VCS figure it out on the next merge. > We haven't had a policy of never comitting directly to contrib/ since the > CVS days. I do agree that changes should be pushed upstream to keep local > diffs as small as possible, but reasonable judgement should be applied > rather than a hard rule banning all commits. > Matt's wording sucked. However, he's requesting that people push changes upstream for the moment to help him manage because he's planning on doing several more vendor imports in the coming days and these commits lead to conflicts which slow him down. It's not a hard lock, but a very strong request to make his life easier while the velocity upstream is still kinda fast and we need to loop in many of those changes in. Warner > > On Wed, Aug 26, 2020 at 12:29 AM Toomas Soome > wrote: > >> > >> Author: tsoome > >> Date: Wed Aug 26 07:29:17 2020 > >> New Revision: 364806 > >> URL: https://svnweb.freebsd.org/changeset/base/364806 > >> > >> Log: > >> remove pragma ident lines > >> > >> The #pragma ident is historical relict and not needed any more, this > >> pragma is actually unknown for common compilers and is only causing > >> trouble. > > -- > John Baldwin > From owner-svn-src-all@freebsd.org Wed Aug 26 17:52:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5E5C3B6528; Wed, 26 Aug 2020 17:52:32 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcD345NgLz4PRW; Wed, 26 Aug 2020 17:52:32 +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 9C9C716F1E; Wed, 26 Aug 2020 17:52:32 +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 07QHqWM0037818; Wed, 26 Aug 2020 17:52:32 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QHqWuD037817; Wed, 26 Aug 2020 17:52:32 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202008261752.07QHqWuD037817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 26 Aug 2020 17:52:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364827 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 364827 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 17:52:32 -0000 Author: tsoome Date: Wed Aug 26 17:52:32 2020 New Revision: 364827 URL: https://svnweb.freebsd.org/changeset/base/364827 Log: libsa: only skein_block.c is using SKEIN_LOOP Only use SKEIN_LOOP while compiling skein_block.c Modified: head/stand/libsa/zfs/Makefile.inc Modified: head/stand/libsa/zfs/Makefile.inc ============================================================================== --- head/stand/libsa/zfs/Makefile.inc Wed Aug 26 17:15:17 2020 (r364826) +++ head/stand/libsa/zfs/Makefile.inc Wed Aug 26 17:52:32 2020 (r364827) @@ -2,8 +2,6 @@ .PATH: ${ZFSSRC} SRCS+= zfs.c nvlist.c skein.c skein_block.c list.c -# Do not unroll skein loops, reduce code size -CFLAGS+= -DSKEIN_LOOP=111 .PATH: ${SYSDIR}/crypto/skein .PATH: ${SYSDIR}/cddl/contrib/opensolaris/uts/common/os @@ -12,6 +10,8 @@ CFLAGS+= -I${SYSDIR}/cddl/boot/zfs CFLAGS+= -I${SYSDIR}/cddl/contrib/opensolaris/uts/common CFLAGS+= -I${SYSDIR}/crypto/skein +# Do not unroll skein loops, reduce code size +CFLAGS.skein_block.c+= -DSKEIN_LOOP=111 CFLAGS.zfs.c+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4 CFLAGS+= -Wformat -Wall From owner-svn-src-all@freebsd.org Wed Aug 26 18:34:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7DB773B7CB2; Wed, 26 Aug 2020 18:34:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcDz02m46z4S3T; Wed, 26 Aug 2020 18:34:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 28AF62319D; Wed, 26 Aug 2020 18:34:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::9d13:595a:4fbd:9b05] (unknown [IPv6:2001:470:7a58:0:9d13:595a:4fbd:9b05]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 0FE7F63D10; Wed, 26 Aug 2020 20:34:02 +0200 (CEST) From: Dimitry Andric Message-Id: <0FAD8A61-49D2-4419-8744-1BAE6DA9C6C2@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_9A17FF09-2CB2-4A7B-B329-1371FDB9E3E6"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: svn commit: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm Date: Wed, 26 Aug 2020 20:33:54 +0200 In-Reply-To: <7f1149b6e8dfd1600ff235b7b1aaae3b746b4a9f.camel@freebsd.org> Cc: Mateusz Guzik , Jung-uk Kim , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Ian Lepore References: <202008261655.07QGtSZx096979@repo.freebsd.org> <7f1149b6e8dfd1600ff235b7b1aaae3b746b4a9f.camel@freebsd.org> X-Mailer: Apple Mail (2.3445.104.15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 18:34:04 -0000 --Apple-Mail=_9A17FF09-2CB2-4A7B-B329-1371FDB9E3E6 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 26 Aug 2020, at 19:13, Ian Lepore wrote: > > On Wed, 2020-08-26 at 19:04 +0200, Mateusz Guzik wrote: >> On 8/26/20, Jung-uk Kim wrote: >>> Author: jkim >>> Date: Wed Aug 26 16:55:28 2020 >>> New Revision: 364822 >>> URL: https://svnweb.freebsd.org/changeset/base/364822 >>> >>> Log: >>> Fix Clang version detection. >>> >>> We prepend "FreeBSD" to Clang version string. This broke >>> compiler test >>> for >>> AVX instruction support. >>> >> >> What about other software checking in similar fashion? imo the right >> fix is to stop mucking with the way clang reports itself >> > > Maybe it would be better to not modify the start of the string. > Instead of > > FreeBSD clang version 9.0.1 (git@github.com:llvm/llvm-project.git > c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1) > > maybe > > clang version 9.0.1 for FreeBSD (git@github.com:llvm/llvm-project.git > c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1) We have been doing this since, well, forever. And this way actually originates from upstream, we only define the CLANG_VENDOR macro. I see no reason to change this after all those years. A better question is, why these perl scripts "suddenly" started failing? Or have they also failed since forever, and it was only noticed now? -Dimitry --Apple-Mail=_9A17FF09-2CB2-4A7B-B329-1371FDB9E3E6 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCX0arEgAKCRCwXqMKLiCW o/9VAKCT6F/WSyi7cwXeJ7uGzED/1l8IQACfUWGC62pRYVUNKPMJBllgLLV4IO4= =1GGW -----END PGP SIGNATURE----- --Apple-Mail=_9A17FF09-2CB2-4A7B-B329-1371FDB9E3E6-- From owner-svn-src-all@freebsd.org Wed Aug 26 18:35:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 887BD3B810B; Wed, 26 Aug 2020 18:35:33 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcF0j36tfz4SQs; Wed, 26 Aug 2020 18:35:33 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E90B1715A; Wed, 26 Aug 2020 18:35:33 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QIZXjo063948; Wed, 26 Aug 2020 18:35:33 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QIZXOd063947; Wed, 26 Aug 2020 18:35:33 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <202008261835.07QIZXOd063947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Wed, 26 Aug 2020 18:35:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364828 - head/usr.sbin/jail X-SVN-Group: head X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: head/usr.sbin/jail X-SVN-Commit-Revision: 364828 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 18:35:33 -0000 Author: jamie Date: Wed Aug 26 18:35:32 2020 New Revision: 364828 URL: https://svnweb.freebsd.org/changeset/base/364828 Log: Back out r364791 to unbreak jails. Lesson learned: "compile and test" means running the test on the same executable that you just compiled. PR: 248444 Pointy hat to: jamie Modified: head/usr.sbin/jail/config.c Modified: head/usr.sbin/jail/config.c ============================================================================== --- head/usr.sbin/jail/config.c Wed Aug 26 17:52:32 2020 (r364827) +++ head/usr.sbin/jail/config.c Wed Aug 26 18:35:32 2020 (r364828) @@ -393,8 +393,7 @@ add_param(struct cfjail *j, const struct cfparam *p, e else for (ipnum = IP__NULL + 1; ipnum < IP_NPARAM; ipnum++) if (!(intparams[ipnum].flags & PF_CONV) && - equalopts(name, intparams[ipnum].name) && - !(p->flags & PF_VAR)) { + equalopts(name, intparams[ipnum].name)) { j->intparams[ipnum] = np; np->flags |= intparams[ipnum].flags; break; From owner-svn-src-all@freebsd.org Wed Aug 26 18:42:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB2013B81B2 for ; Wed, 26 Aug 2020 18:42:54 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcF995zywz4SXl for ; Wed, 26 Aug 2020 18:42:53 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f65.google.com with SMTP id w13so2856728wrk.5 for ; Wed, 26 Aug 2020 11:42:53 -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:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ncPjS7Jp5+JkNRTaEKC5JWpThjx5Kr4F44UN5FhtyKI=; b=Q55Uej3G9fUoE3yHNdnMowCDtgqABTABqKtzQ8CYlcTcfPrW20ve5JCpMA1nrWI4KE e+tkIFpgO+TvXIU558wFIvj33LkQCGQ+7mw5YuMI9w/EaYU/QfDivd5X3gL18HHY9/un X8rDH9UN+D/8sA1Kt8EFk8ZjQxC5a7OVhHIsr8ZqjNw96fFdNYPEQFRx7LzCe4OZaPHl H0XZQH0hAV3rJcFPGcBDExDmntmq0VfcPh9Z5homCmH/wNHlB75VPubb9pHVMtnpsftZ Bh4scRyeu4X6PkvLvYJZ3hb4wIU7JiZBSSatqDuqOyTPl1ceCCMA5DRlQB9yRMKCwdop 876g== X-Gm-Message-State: AOAM53379CC6P7mI8DgOiUtm3pWilOOfMEqqRhr7L6l8la0BSHjJek9K I8iR2If7oVQEKZva0rGkBp1P5GawK0vhjA== X-Google-Smtp-Source: ABdhPJwSLvakhc8kfYTY9x8rn4apHJ1X4GNvv0BRs7nDvWLiq362PQyAs5gm3P860u40auPZi95ABQ== X-Received: by 2002:adf:8504:: with SMTP id 4mr12088080wrh.289.1598467372227; Wed, 26 Aug 2020 11:42:52 -0700 (PDT) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id b8sm8343372wrx.76.2020.08.26.11.42.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Aug 2020 11:42:51 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: svn commit: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm From: Jessica Clarke In-Reply-To: <0FAD8A61-49D2-4419-8744-1BAE6DA9C6C2@FreeBSD.org> Date: Wed, 26 Aug 2020 19:42:50 +0100 Cc: Ian Lepore , Mateusz Guzik , Jung-uk Kim , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <187C5112-6E19-4155-9226-FD23BA03ABA9@freebsd.org> References: <202008261655.07QGtSZx096979@repo.freebsd.org> <7f1149b6e8dfd1600ff235b7b1aaae3b746b4a9f.camel@freebsd.org> <0FAD8A61-49D2-4419-8744-1BAE6DA9C6C2@FreeBSD.org> To: Dimitry Andric X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Rspamd-Queue-Id: 4BcF995zywz4SXl X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.65 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-1.49 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.29)[-0.289]; RCPT_COUNT_SEVEN(0.00)[7]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.90)[-0.904]; FREEFALL_USER(0.00)[jrtc27]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.79)[-0.793]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.65:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.65:from]; FREEMAIL_CC(0.00)[FreeBSD.org,gmail.com,freebsd.org]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 18:42:54 -0000 On 26 Aug 2020, at 19:33, Dimitry Andric wrote: > > On 26 Aug 2020, at 19:13, Ian Lepore wrote: >> >> On Wed, 2020-08-26 at 19:04 +0200, Mateusz Guzik wrote: >>> On 8/26/20, Jung-uk Kim wrote: >>>> Author: jkim >>>> Date: Wed Aug 26 16:55:28 2020 >>>> New Revision: 364822 >>>> URL: https://svnweb.freebsd.org/changeset/base/364822 >>>> >>>> Log: >>>> Fix Clang version detection. >>>> >>>> We prepend "FreeBSD" to Clang version string. This broke >>>> compiler test >>>> for >>>> AVX instruction support. >>>> >>> >>> What about other software checking in similar fashion? imo the right >>> fix is to stop mucking with the way clang reports itself >>> >> >> Maybe it would be better to not modify the start of the string. >> Instead of >> >> FreeBSD clang version 9.0.1 (git@github.com:llvm/llvm-project.git >> c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1) >> >> maybe >> >> clang version 9.0.1 for FreeBSD (git@github.com:llvm/llvm-project.git >> c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1) > > We have been doing this since, well, forever. And this way actually > originates from upstream, we only define the CLANG_VENDOR macro. I see > no reason to change this after all those years. > > A better question is, why these perl scripts "suddenly" started failing? > Or have they also failed since forever, and it was only noticed now? Ah, digging deeper it gets more interesting. All those scripts check for "based on LLVM X.Y", a suffix printed for vendor builds. However, that was dropped in https://reviews.llvm.org/D69925 as it's redundant, thereby breaking this detection. So it's fallout from LLVM 10. Also the scripts aren't failing in a sense, they just don't know what compiler is in use so they fall back on not enabling AVX. Jess From owner-svn-src-all@freebsd.org Wed Aug 26 18:55:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E79003B8265; Wed, 26 Aug 2020 18:55:59 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcFSH5p9hz4T8C; Wed, 26 Aug 2020 18:55:59 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (pool-100-8-53-238.nwrknj.fios.verizon.net [100.8.53.238]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 91CF6227DA; Wed, 26 Aug 2020 18:55:59 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm To: Jessica Clarke , Dimitry Andric Cc: Ian Lepore , Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202008261655.07QGtSZx096979@repo.freebsd.org> <7f1149b6e8dfd1600ff235b7b1aaae3b746b4a9f.camel@freebsd.org> <0FAD8A61-49D2-4419-8744-1BAE6DA9C6C2@FreeBSD.org> <187C5112-6E19-4155-9226-FD23BA03ABA9@freebsd.org> From: Jung-uk Kim Autocrypt: addr=jkim@FreeBSD.org; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Organization: FreeBSD.org Message-ID: <7e156551-1776-ca81-5608-aad10ff7c2de@FreeBSD.org> Date: Wed, 26 Aug 2020 14:55:55 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <187C5112-6E19-4155-9226-FD23BA03ABA9@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.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 18:56:00 -0000 On 20. 8. 26., Jessica Clarke wrote: > On 26 Aug 2020, at 19:33, Dimitry Andric wrote: >> >> On 26 Aug 2020, at 19:13, Ian Lepore wrote: >>> >>> On Wed, 2020-08-26 at 19:04 +0200, Mateusz Guzik wrote: >>>> On 8/26/20, Jung-uk Kim wrote: >>>>> Author: jkim >>>>> Date: Wed Aug 26 16:55:28 2020 >>>>> New Revision: 364822 >>>>> URL: https://svnweb.freebsd.org/changeset/base/364822 >>>>> >>>>> Log: >>>>> Fix Clang version detection. >>>>> >>>>> We prepend "FreeBSD" to Clang version string. This broke >>>>> compiler test >>>>> for >>>>> AVX instruction support. >>>>> >>>> >>>> What about other software checking in similar fashion? imo the right >>>> fix is to stop mucking with the way clang reports itself >>>> >>> >>> Maybe it would be better to not modify the start of the string. >>> Instead of >>> >>> FreeBSD clang version 9.0.1 (git@github.com:llvm/llvm-project.git >>> c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1) >>> >>> maybe >>> >>> clang version 9.0.1 for FreeBSD (git@github.com:llvm/llvm-project.git >>> c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1) >> >> We have been doing this since, well, forever. And this way actually >> originates from upstream, we only define the CLANG_VENDOR macro. I see >> no reason to change this after all those years. >> >> A better question is, why these perl scripts "suddenly" started failing? >> Or have they also failed since forever, and it was only noticed now? > > Ah, digging deeper it gets more interesting. All those scripts check > for "based on LLVM X.Y", a suffix printed for vendor builds. However, > that was dropped in https://reviews.llvm.org/D69925 as it's redundant, > thereby breaking this detection. So it's fallout from LLVM 10. Yes, that's correct. BTW, they also changed "-dumpversion" format from Clang 9. % clang80 -dumpversion 4.2.1 % clang90 -dumpversion 9.0.1 Since some do not check whether you are using Clang or GCC, some scripts may think you are using GCC 9 or newer. > Also the scripts aren't failing in a sense, they just don't know what > compiler is in use so they fall back on not enabling AVX. Also, correct. Jung-uk Kim From owner-svn-src-all@freebsd.org Wed Aug 26 19:00:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F2033B86C3; Wed, 26 Aug 2020 19:00:18 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcFYG0RBYz4TZF; Wed, 26 Aug 2020 19:00:18 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CCFC717B22; Wed, 26 Aug 2020 19:00:17 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QJ0HCm078930; Wed, 26 Aug 2020 19:00:17 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QJ0HIk078929; Wed, 26 Aug 2020 19:00:17 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202008261900.07QJ0HIk078929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Wed, 26 Aug 2020 19:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364829 - head/cddl/lib/libzpool X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: head/cddl/lib/libzpool X-SVN-Commit-Revision: 364829 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:00:18 -0000 Author: freqlabs Date: Wed Aug 26 19:00:17 2020 New Revision: 364829 URL: https://svnweb.freebsd.org/changeset/base/364829 Log: Tidy up libzpool Makefile Sponsored by: iXsystems, Inc. Modified: head/cddl/lib/libzpool/Makefile Modified: head/cddl/lib/libzpool/Makefile ============================================================================== --- head/cddl/lib/libzpool/Makefile Wed Aug 26 18:35:32 2020 (r364828) +++ head/cddl/lib/libzpool/Makefile Wed Aug 26 19:00:17 2020 (r364829) @@ -1,16 +1,17 @@ # $FreeBSD$ +ZFSTOP= ${SRCTOP}/sys/contrib/openzfs # ZFS_COMMON_SRCS -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zfs -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zcommon -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/unicode +.PATH: ${ZFSTOP}/module/zfs +.PATH: ${ZFSTOP}/module/zcommon +.PATH: ${ZFSTOP}/module/unicode # LUA_SRCS -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/lua +.PATH: ${ZFSTOP}/module/lua -.PATH: ${SRCTOP}/sys/contrib/openzfs/module/os/linux/zfs +.PATH: ${ZFSTOP}/module/os/linux/zfs -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzpool +.PATH: ${ZFSTOP}/lib/libzpool .if exists(${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}/opensolaris_atomic.S) .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} @@ -28,8 +29,6 @@ PICFLAG= -fPIC LIB= zpool - - USER_C = \ kernel.c \ taskq.c \ @@ -218,19 +217,19 @@ UNICODE_C = u8_textprep.c uconv.c SRCS= ${USER_C} ${KERNEL_C} ${LUA_C} ${UNICODE_C} ${ARCH_C} WARNS?= 2 -CFLAGS+= -DIN_BASE -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd -CFLAGS+= -I${SRCTOP}/sys -CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include -CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include -CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h -CFLAGS+= -DHAVE_ISSETUGID -CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h -CFLAGS+= -I${SRCTOP}/sys/modules/zfs -CFLAGS+= -DLIB_ZPOOL_BUILD -DZFS_DEBUG - +CFLAGS+= \ + -DIN_BASE \ + -I${ZFSTOP}/include \ + -I${ZFSTOP}/lib/libspl/include \ + -I${ZFSTOP}/lib/libspl/include/os/freebsd \ + -I${SRCTOP}/sys \ + -I${SRCTOP}/cddl/compat/opensolaris/include \ + -I${ZFSTOP}/module/icp/include \ + -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ + -DHAVE_ISSETUGID \ + -include ${SRCTOP}/sys/modules/zfs/zfs_config.h \ + -I${SRCTOP}/sys/modules/zfs \ + -DLIB_ZPOOL_BUILD -DZFS_DEBUG \ # XXX: pthread doesn't have mutex_owned() equivalent, so we need to look # into libthr private structures. That's sooo evil, but it's only for From owner-svn-src-all@freebsd.org Wed Aug 26 19:03:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C84143B8951; Wed, 26 Aug 2020 19:03:16 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcFch4xcVz4TtY; Wed, 26 Aug 2020 19:03:16 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E14617AB4; Wed, 26 Aug 2020 19:03:16 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QJ3Gvl085213; Wed, 26 Aug 2020 19:03:16 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QJ3GdU085211; Wed, 26 Aug 2020 19:03:16 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202008261903.07QJ3GdU085211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Wed, 26 Aug 2020 19:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364830 - in head/cddl/lib: libzfs libzpool X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in head/cddl/lib: libzfs libzpool X-SVN-Commit-Revision: 364830 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:03:16 -0000 Author: freqlabs Date: Wed Aug 26 19:03:15 2020 New Revision: 364830 URL: https://svnweb.freebsd.org/changeset/base/364830 Log: Move zstd sources from libzfs to libzpool zstd is kernel code that was not supposed to be in libzfs. libzpool provides userland shims for kernel code and is where the zstd code needs to be included. Reported by: John Kennedy Discussed with: mmacy Sponsored by: iXsystems, Inc. Modified: head/cddl/lib/libzfs/Makefile head/cddl/lib/libzpool/Makefile Modified: head/cddl/lib/libzfs/Makefile ============================================================================== --- head/cddl/lib/libzfs/Makefile Wed Aug 26 19:00:17 2020 (r364829) +++ head/cddl/lib/libzfs/Makefile Wed Aug 26 19:03:15 2020 (r364830) @@ -58,10 +58,6 @@ KERNEL_C = \ zprop_common.c -KERNEL_C+= zstd.c \ - zfs_zstd.c - - ARCH_C = .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" ARCH_C += zfs_fletcher_intel.c \ @@ -94,8 +90,6 @@ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/in CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h -CFLAGS.zfs_zstd.c= -Wno-cast-qual -Wno-pointer-arith -CFLAGS.zstd.c= -fno-tree-vectorize .include Modified: head/cddl/lib/libzpool/Makefile ============================================================================== --- head/cddl/lib/libzpool/Makefile Wed Aug 26 19:00:17 2020 (r364829) +++ head/cddl/lib/libzpool/Makefile Wed Aug 26 19:03:15 2020 (r364830) @@ -8,6 +8,9 @@ ZFSTOP= ${SRCTOP}/sys/contrib/openzfs .PATH: ${ZFSTOP}/module/unicode # LUA_SRCS .PATH: ${ZFSTOP}/module/lua +# ZSTD_SRCS +.PATH: ${ZFSTOP}/module/zstd +.PATH: ${ZFSTOP}/module/zstd/lib .PATH: ${ZFSTOP}/module/os/linux/zfs @@ -44,6 +47,7 @@ KERNEL_C = \ zfs_namecheck.c \ zfs_prop.c \ zfs_uio.c \ + zfs_zstd.c \ zpool_prop.c \ zprop_common.c \ abd.c \ @@ -167,6 +171,7 @@ KERNEL_C = \ zio_inject.c \ zle.c \ zrlock.c \ + zstd.c \ zthr.c ARCH_C = @@ -251,5 +256,8 @@ CSTD= c99 # it without debugging. CFLAGS+= -g -DDEBUG=1 + +CFLAGS.zfs_zstd.c= -Wno-cast-qual -Wno-pointer-arith +CFLAGS.zstd.c+= -fno-tree-vectorize .include From owner-svn-src-all@freebsd.org Wed Aug 26 19:16:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 687EE3B8EE0; Wed, 26 Aug 2020 19:16:40 +0000 (UTC) (envelope-from bdragon@imap.cc) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcFw80KJGz4VYb; Wed, 26 Aug 2020 19:16:39 +0000 (UTC) (envelope-from bdragon@imap.cc) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 2C17E15DF; Wed, 26 Aug 2020 15:16:37 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Wed, 26 Aug 2020 15:16:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=imap.cc; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=fm1; bh=mikaS6Z/bflaiO+AZk7v6Qag7H1eVbV vACMvXnjjykA=; b=lJcf2reZpZv+c2TrVl7HT/Oxy+XhZJAFcPzUS7cD3krLB1H XGZGj0bDmyGFeSP0dwW4+RQeuey1BYcN/unY0tTbjITcfkVd1VgWrAGiyrtnTvWy yfg9P9lbaWbaCkz/RNPHQDjFLYASVrlB1nodo5SWOArfA4YkxBT6e941wHihmjok yKJh9mFX4p+d695r3CzggLhNFAJG39Lf37WJyXYsSjVVEZ8v0KQ+OGoqi9TZAVdk FzU2kjh1lwYpz9fu0RqYp4RQ2/cvlbQyxKho005MDDUVMymNuqOAmxYY8cV1Jt9U +6TP+K0jkqLZ1o52kyNDCKbej7O0K0ltYan8ceA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=mikaS6 Z/bflaiO+AZk7v6Qag7H1eVbVvACMvXnjjykA=; b=tbPZ6rRtfsJEuDsjuiqikT Ox1G0rOxjFDEC9KBT4n44AV6L28cDb82apPH3eTjQnczz4q2OReWP4l/QhywzDIW Dc00+jAkepUG+8rwucwVyi8Ob/2dNV9oFZ8PrHOsqePKqG4p7bASWzKpuwI+z+RW Cnk+VfqK8oxIHMtGQYpG68Yh5grU3jVJdsCC3FvKScifLVoHI1pBA51x3O5zpHjj n4a3dc+UwpBOdGPB9jn091dXYVBH2Af2ZFmUOO49w+YaqqxOsOGDaAlQUCRGcjdu MAQLoMkjxqVRJd0DFr6/pzDjWcE7k4gkd9qSNoDWtKCUivuMlJzdAQJ2l3FDmIbA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddvvddgudeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculddutddmnecujfgurhepofgfggfkjghffffhvffutgesthdtredt reerjeenucfhrhhomhepfdeurhgrnhguohhnuceuvghrghhrvghnfdcuoegsughrrghgoh hnsehimhgrphdrtggtqeenucggtffrrghtthgvrhhnpefgffeiieehudfgfffhheejteef keeuvdeggfejhffhhfeihfefjeeltdeijeejffenucffohhmrghinhepfhhrvggvsghsug drohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pegsughrrghgohhnsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 02CF3C200A5; Wed, 26 Aug 2020 15:16:35 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-232-g4bdb081-fm-20200825.002-g4bdb081a Mime-Version: 1.0 Message-Id: <7e0abc1a-a397-46c3-b283-2c1ab21a9c4d@www.fastmail.com> In-Reply-To: <202008260237.07Q2bhwF045988@repo.freebsd.org> References: <202008260237.07Q2bhwF045988@repo.freebsd.org> Date: Wed, 26 Aug 2020 14:16:15 -0500 From: "Brandon Bergren" To: "Alan Somers" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: =?UTF-8?Q?Re:_svn_commit:_r364799_-_in_head:_share/man/man9_sys/crypto/c?= =?UTF-8?Q?cp_sys/dev/cxgbe/crypto_sys/dev/sec_sys/kern_sys/opencrypto?= Content-Type: text/plain X-Rspamd-Queue-Id: 4BcFw80KJGz4VYb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:16:40 -0000 On Tue, Aug 25, 2020, at 9:37 PM, Alan Somers wrote: > Author: asomers > Date: Wed Aug 26 02:37:42 2020 > New Revision: 364799 > URL: https://svnweb.freebsd.org/changeset/base/364799 > > Modified: head/sys/dev/sec/sec.c > ============================================================================== > --- head/sys/dev/sec/sec.c Wed Aug 26 02:13:27 2020 (r364798) > +++ head/sys/dev/sec/sec.c Wed Aug 26 02:37:42 2020 (r364799) > @@ -851,6 +851,9 @@ sec_desc_map_dma(struct sec_softc *sc, struct sec_dma_ > case CRYPTO_BUF_MBUF: > size = m_length(crp->crp_buf.cb_mbuf, NULL); > break; > + case CRYPTO_BUF_VMPAGE: > + size = PAGE_SIZE - cb->cb_vm_page_offset; > + break; > default: > return (EINVAL); > } Uh, where is cb coming from? Shouldn't this be using crp->crp_buf.cb_vm_page_offset? This is causing a build failure on powerpc and powerpcspe. I don't see why other platforms aren't also erroring out here. From owner-svn-src-all@freebsd.org Wed Aug 26 19:19:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7FE13B9337 for ; Wed, 26 Aug 2020 19:19:25 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcFzK00dsz4VxT for ; Wed, 26 Aug 2020 19:19:24 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f67.google.com with SMTP id o4so2977924wrn.0 for ; Wed, 26 Aug 2020 12:19:24 -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:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=yDfpRmB3yHyU7x3XNaNjEyQwQkhsYlT4d03gzG2A10E=; b=QNth5fpCRl0iYsy2G1fPqkukIKFY2XtAFmj9/lK07EwXydidGoqD+Fn4ek1S5pvhSH Ke47uOYfDb4kPnwado5Ll/YNdGKdDG8qZMzelDqEfsR6ngAa1VXmF4vmFRL+ilPl7hRJ 3G8I4R+yuL5DC2RS3GV9Nvh/Ty+Rl9mYtboUdg3q5YXP6VtcszoHBEx3M0ujF9Qcvcpz 1jeSUB5jgpPUVM2gAdFfofU9IDdv6WCt7iyEZg8x9sZZu1qxAPFW/R/f3P9pqOcYSmVE pRpEuluEZwh62PfV0vYDENAxy6cIW/xLT2ycqa/clC7iWS9voSJN/6mjc6mrgx/f++b0 BZ/w== X-Gm-Message-State: AOAM531ZFO5uLjnk9VTfbNDFx8iAFnF6NYtpmEZqxLhTNFizUzRM/XMk NBnBIP2PFi1+YM3GRVlwowj/kw== X-Google-Smtp-Source: ABdhPJznz2B+7Q29lEMmwYZLqxcIsOe7YkvXkWykaWVSU1o0z+bOjEoQmXTApcenxXunegdfVvBYoQ== X-Received: by 2002:a5d:684b:: with SMTP id o11mr17735355wrw.101.1598469563309; Wed, 26 Aug 2020 12:19:23 -0700 (PDT) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id g16sm8960067wrs.88.2020.08.26.12.19.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Aug 2020 12:19:22 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: svn commit: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto From: Jessica Clarke In-Reply-To: <7e0abc1a-a397-46c3-b283-2c1ab21a9c4d@www.fastmail.com> Date: Wed, 26 Aug 2020 20:19:21 +0100 Cc: Alan Somers , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <2534D2E5-2974-4067-8B9C-53EE3E8C6A68@freebsd.org> References: <202008260237.07Q2bhwF045988@repo.freebsd.org> <7e0abc1a-a397-46c3-b283-2c1ab21a9c4d@www.fastmail.com> To: Brandon Bergren X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Rspamd-Queue-Id: 4BcFzK00dsz4VxT X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.67 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-0.93 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_TO(0.00)[imap.cc]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.82)[-0.821]; FREEFALL_USER(0.00)[jrtc27]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.26)[0.262]; NEURAL_HAM_LONG(-0.87)[-0.867]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.67:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.67:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:19:25 -0000 On 26 Aug 2020, at 20:16, Brandon Bergren wrote: > On Tue, Aug 25, 2020, at 9:37 PM, Alan Somers wrote: >> Author: asomers >> Date: Wed Aug 26 02:37:42 2020 >> New Revision: 364799 >> URL: https://svnweb.freebsd.org/changeset/base/364799 >>=20 >> Modified: head/sys/dev/sec/sec.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/dev/sec/sec.c Wed Aug 26 02:13:27 2020 = (r364798) >> +++ head/sys/dev/sec/sec.c Wed Aug 26 02:37:42 2020 = (r364799) >> @@ -851,6 +851,9 @@ sec_desc_map_dma(struct sec_softc *sc, struct = sec_dma_ >> case CRYPTO_BUF_MBUF: >> size =3D m_length(crp->crp_buf.cb_mbuf, NULL); >> break; >> + case CRYPTO_BUF_VMPAGE: >> + size =3D PAGE_SIZE - cb->cb_vm_page_offset; >> + break; >> default: >> return (EINVAL); >> } >=20 > Uh, where is cb coming from? Shouldn't this be using = crp->crp_buf.cb_vm_page_offset? This is causing a build failure on = powerpc and powerpcspe. I don't see why other platforms aren't also = erroring out here. Because it's PowerPC-specific: sys/conf/files.powerpc:dev/sec/sec.c optional sec mpc85xx Jess From owner-svn-src-all@freebsd.org Wed Aug 26 19:21:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0CE83B91F2; Wed, 26 Aug 2020 19:21:46 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcG224m9wz4WJ0; Wed, 26 Aug 2020 19:21:46 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 8201622EEB; Wed, 26 Aug 2020 19:21:46 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 53E6127C0054; Wed, 26 Aug 2020 15:21:46 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute4.internal (MEProxy); Wed, 26 Aug 2020 15:21:46 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddvvddgudefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculddutddmnecujfgurhepofgfggfkjghffffhvffutgesthdtredt reerjeenucfhrhhomhepfdeurhgrnhguohhnuceuvghrghhrvghnfdcuoegsughrrghgoh hnsefhrhgvvgeuufffrdhorhhgqeenucggtffrrghtthgvrhhnpeehieeikeekffekleek leegtefgledttefghfduteeikeevfedvhfeggfffudejgfenucffohhmrghinhepfhhrvg gvsghsugdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpegsughrrghgohhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqd dutdegvdefheekieegqddukedutdekheduqdgsughrrghgohhnpeephfhrvggvuefuffdr ohhrghesihhmrghprdgttg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id C4E11C200A5; Wed, 26 Aug 2020 15:21:45 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-232-g4bdb081-fm-20200825.002-g4bdb081a Mime-Version: 1.0 Message-Id: In-Reply-To: <2534D2E5-2974-4067-8B9C-53EE3E8C6A68@freebsd.org> References: <202008260237.07Q2bhwF045988@repo.freebsd.org> <7e0abc1a-a397-46c3-b283-2c1ab21a9c4d@www.fastmail.com> <2534D2E5-2974-4067-8B9C-53EE3E8C6A68@freebsd.org> Date: Wed, 26 Aug 2020 14:21:24 -0500 From: "Brandon Bergren" To: "Jessica Clarke" Cc: "Alan Somers" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: =?UTF-8?Q?Re:_svn_commit:_r364799_-_in_head:_share/man/man9_sys/crypto/c?= =?UTF-8?Q?cp_sys/dev/cxgbe/crypto_sys/dev/sec_sys/kern_sys/opencrypto?= Content-Type: text/plain X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:21:46 -0000 On Wed, Aug 26, 2020, at 2:19 PM, Jessica Clarke wrote: > On 26 Aug 2020, at 20:16, Brandon Bergren wrote: > > On Tue, Aug 25, 2020, at 9:37 PM, Alan Somers wrote: > >> Author: asomers > >> Date: Wed Aug 26 02:37:42 2020 > >> New Revision: 364799 > >> URL: https://svnweb.freebsd.org/changeset/base/364799 > >> > >> Modified: head/sys/dev/sec/sec.c > >> ============================================================================== > >> --- head/sys/dev/sec/sec.c Wed Aug 26 02:13:27 2020 (r364798) > >> +++ head/sys/dev/sec/sec.c Wed Aug 26 02:37:42 2020 (r364799) > >> @@ -851,6 +851,9 @@ sec_desc_map_dma(struct sec_softc *sc, struct sec_dma_ > >> case CRYPTO_BUF_MBUF: > >> size = m_length(crp->crp_buf.cb_mbuf, NULL); > >> break; > >> + case CRYPTO_BUF_VMPAGE: > >> + size = PAGE_SIZE - cb->cb_vm_page_offset; > >> + break; > >> default: > >> return (EINVAL); > >> } > > > > Uh, where is cb coming from? Shouldn't this be using crp->crp_buf.cb_vm_page_offset? This is causing a build failure on powerpc and powerpcspe. I don't see why other platforms aren't also erroring out here. > > Because it's PowerPC-specific: > > sys/conf/files.powerpc:dev/sec/sec.c optional sec mpc85xx > > Jess > > No, I mean literally. What scope is cb coming from? It's not a variable that is in scope for that function as far as I can tell. -- Brandon Bergren bdragon@FreeBSD.org From owner-svn-src-all@freebsd.org Wed Aug 26 19:23:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFA653B9206 for ; Wed, 26 Aug 2020 19:23:04 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcG3X0nV1z4WMF for ; Wed, 26 Aug 2020 19:23:03 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f67.google.com with SMTP id r15so2949044wrp.13 for ; Wed, 26 Aug 2020 12:23:03 -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:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wju96yoU8bHVs59ytpClBdsnHIvncRhlFZixUsEVb08=; b=o28v/3Jl4tTGWx4QmZtm8EeiBX8rxpxWijW8vBAlrrSF260xjlGf50Gipjz2onpxir +UScDhZpvwJWj0SlKr0vGaI4M9F46KUnOnQf5fYa6CCWNPR1XKsIKfIMOaJYHSR+r8sh voh3tFjCbyZ4MKdlPYELjpI5niRdw7yGVi8KDbBBQS8RpH9N/Lag7k8/WFU70dXOl3ps fxrYvbL7eQBkusea2IejhLJUc4eUAe7Qt9mhvtRkq0bk+gntvKcj+5iAXmHHNFhGwO1v TpkuXqUN/3J2Xi82AWyBYljlz8tiwRG+R/YKJI4Yv+PfL4SqWbOkztPxAi+Dn7XCL5va LGfw== X-Gm-Message-State: AOAM5332bUSv2W5DbhRT1gk4d4qbHW6dR4kNHVyhdUfUVkqtykITaoDV D/kgnikaGJk1lNIx3w5DRX/KAA== X-Google-Smtp-Source: ABdhPJwJPNZMim0YE2KFEU+nR4yifbN7zn3FSyea4cIHKLcYCB6bGypp6KXa4SwU0RoiPwigjXXdAA== X-Received: by 2002:a5d:410e:: with SMTP id l14mr16502646wrp.216.1598469782707; Wed, 26 Aug 2020 12:23:02 -0700 (PDT) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id d66sm8616450wmc.16.2020.08.26.12.23.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Aug 2020 12:23:02 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: svn commit: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto From: Jessica Clarke In-Reply-To: Date: Wed, 26 Aug 2020 20:23:01 +0100 Cc: Alan Somers , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <202008260237.07Q2bhwF045988@repo.freebsd.org> <7e0abc1a-a397-46c3-b283-2c1ab21a9c4d@www.fastmail.com> <2534D2E5-2974-4067-8B9C-53EE3E8C6A68@freebsd.org> To: Brandon Bergren X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Rspamd-Queue-Id: 4BcG3X0nV1z4WMF X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.67 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-1.31 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.88)[-0.881]; FREEFALL_USER(0.00)[jrtc27]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.00)[0.005]; NEURAL_HAM_LONG(-0.94)[-0.938]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.67:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.67:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:23:04 -0000 On 26 Aug 2020, at 20:21, Brandon Bergren wrote: > On Wed, Aug 26, 2020, at 2:19 PM, Jessica Clarke wrote: >> On 26 Aug 2020, at 20:16, Brandon Bergren wrote: >>> On Tue, Aug 25, 2020, at 9:37 PM, Alan Somers wrote: >>>> Author: asomers >>>> Date: Wed Aug 26 02:37:42 2020 >>>> New Revision: 364799 >>>> URL: https://svnweb.freebsd.org/changeset/base/364799 >>>>=20 >>>> Modified: head/sys/dev/sec/sec.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/dev/sec/sec.c Wed Aug 26 02:13:27 2020 = (r364798) >>>> +++ head/sys/dev/sec/sec.c Wed Aug 26 02:37:42 2020 = (r364799) >>>> @@ -851,6 +851,9 @@ sec_desc_map_dma(struct sec_softc *sc, struct = sec_dma_ >>>> case CRYPTO_BUF_MBUF: >>>> size =3D m_length(crp->crp_buf.cb_mbuf, NULL); >>>> break; >>>> + case CRYPTO_BUF_VMPAGE: >>>> + size =3D PAGE_SIZE - cb->cb_vm_page_offset; >>>> + break; >>>> default: >>>> return (EINVAL); >>>> } >>>=20 >>> Uh, where is cb coming from? Shouldn't this be using = crp->crp_buf.cb_vm_page_offset? This is causing a build failure on = powerpc and powerpcspe. I don't see why other platforms aren't also = erroring out here. >>=20 >> Because it's PowerPC-specific: >>=20 >> sys/conf/files.powerpc:dev/sec/sec.c optional sec mpc85xx >>=20 >> Jess >>=20 >>=20 >=20 > No, I mean literally. What scope is cb coming from? It's not a = variable that is in scope for that function as far as I can tell. Oh no I agree it's wrong and your proposal sounds correct. I was just explaining why it's only noticed in PowerPC builds. Jess From owner-svn-src-all@freebsd.org Wed Aug 26 19:23:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39B623B9217; Wed, 26 Aug 2020 19:23:19 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcG3p2tKxz4Wpm; Wed, 26 Aug 2020 19:23:17 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 1B295230E3; Wed, 26 Aug 2020 19:23:16 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id E97D827C0054; Wed, 26 Aug 2020 15:23:15 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute4.internal (MEProxy); Wed, 26 Aug 2020 15:23:15 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddvvddgudefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculddutddmnecujfgurhepofgfggfkjghffffhvffutgesthdtredt reerjeenucfhrhhomhepfdeurhgrnhguohhnuceuvghrghhrvghnfdcuoegsughrrghgoh hnsefhrhgvvgeuufffrdhorhhgqeenucggtffrrghtthgvrhhnpeejhfeftddutdelgeek gedtgeejkeffvdejtddthefggfevuefggfefledvgefhgfenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsughrrghgohhnodhmvghsmhhtphgr uhhthhhpvghrshhonhgrlhhithihqddutdegvdefheekieegqddukedutdekheduqdgsug hrrghgohhnpeephfhrvggvuefuffdrohhrghesihhmrghprdgttg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 5D0C1C200A6; Wed, 26 Aug 2020 15:23:15 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-232-g4bdb081-fm-20200825.002-g4bdb081a Mime-Version: 1.0 Message-Id: <043633bb-4660-4639-a2b6-84a25f40ca26@www.fastmail.com> In-Reply-To: References: <202008260237.07Q2bhwF045988@repo.freebsd.org> <7e0abc1a-a397-46c3-b283-2c1ab21a9c4d@www.fastmail.com> <2534D2E5-2974-4067-8B9C-53EE3E8C6A68@freebsd.org> Date: Wed, 26 Aug 2020 14:22:53 -0500 From: "Brandon Bergren" To: "Jessica Clarke" Cc: "Alan Somers" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: =?UTF-8?Q?Re:_svn_commit:_r364799_-_in_head:_share/man/man9_sys/crypto/c?= =?UTF-8?Q?cp_sys/dev/cxgbe/crypto_sys/dev/sec_sys/kern_sys/opencrypto?= Content-Type: text/plain X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:23:19 -0000 > No, I mean literally. What scope is cb coming from? It's not a variable > that is in scope for that function as far as I can tell. > Naturally, about two seconds after I sent this, I realized that you meant that it was a powerpc-specific driver and that's why the other platforms don't catch it. Will fix it myself. -- Brandon Bergren bdragon@FreeBSD.org From owner-svn-src-all@freebsd.org Wed Aug 26 19:26:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 21DDE3B9936; Wed, 26 Aug 2020 19:26:49 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcG7s02PQz4X4g; Wed, 26 Aug 2020 19:26:49 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D432818286; Wed, 26 Aug 2020 19:26:48 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QJQmns099755; Wed, 26 Aug 2020 19:26:48 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QJQm9V099752; Wed, 26 Aug 2020 19:26:48 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202008261926.07QJQm9V099752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Wed, 26 Aug 2020 19:26:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364831 - head/usr.bin/lockf X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/usr.bin/lockf X-SVN-Commit-Revision: 364831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:26:49 -0000 Author: cperciva Date: Wed Aug 26 19:26:48 2020 New Revision: 364831 URL: https://svnweb.freebsd.org/changeset/base/364831 Log: Add -w option to lockf(1). By default, lockf(1) opens its lock file O_RDONLY|O_EXLOCK. On NFS, if the file already exists, this is split into opening the file read-only and then requesting an exclusive lock -- and the second step fails because NFS does not permit exclusive locking on files which are opened read-only. The new -w option changes the open flags to O_WRONLY|O_EXLOCK, allowing it to work on NFS -- at the cost of not working if the file cannot be opened for writing. (Whether the traditional BSD behaviour of allowing exclusive locks to be obtained on a file which cannot be opened for writing is a good idea is perhaps questionable since it may allow less-privileged users to perform a local denial of service; however this behaviour has been present for a long time and changing it now seems like it would cause problems.) Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D26005 Modified: head/usr.bin/lockf/lockf.1 head/usr.bin/lockf/lockf.c Modified: head/usr.bin/lockf/lockf.1 ============================================================================== --- head/usr.bin/lockf/lockf.1 Wed Aug 26 19:03:15 2020 (r364830) +++ head/usr.bin/lockf/lockf.1 Wed Aug 26 19:26:48 2020 (r364831) @@ -1,4 +1,4 @@ -.\" + .\" .\" Copyright (C) 1998 John D. Polstra. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 18, 2020 +.Dd August 26, 2020 .Dt LOCKF 1 .Os .Sh NAME @@ -32,7 +32,7 @@ .Nd execute a command while holding a file lock .Sh SYNOPSIS .Nm -.Op Fl kns +.Op Fl knsw .Op Fl t Ar seconds .Ar file .Ar command @@ -121,6 +121,14 @@ When a lock times out, is .Em not executed. +.It Fl w +Causes +.Nm +to open +.Ar file +for writing rather than reading. +This is necessary on filesystems (including NFSv4) where a file which +has been opened read-only cannot be exclusively locked. .El .Pp In no event will Modified: head/usr.bin/lockf/lockf.c ============================================================================== --- head/usr.bin/lockf/lockf.c Wed Aug 26 19:03:15 2020 (r364830) +++ head/usr.bin/lockf/lockf.c Wed Aug 26 19:26:48 2020 (r364831) @@ -62,9 +62,9 @@ main(int argc, char **argv) pid_t child; silent = keep = 0; - flags = O_CREAT; + flags = O_CREAT | O_RDONLY; waitsec = -1; /* Infinite. */ - while ((ch = getopt(argc, argv, "sknt:")) != -1) { + while ((ch = getopt(argc, argv, "sknt:w")) != -1) { switch (ch) { case 'k': keep = 1; @@ -84,6 +84,9 @@ main(int argc, char **argv) "invalid timeout \"%s\"", optarg); } break; + case 'w': + flags = (flags & ~O_RDONLY) | O_WRONLY; + break; default: usage(); } @@ -171,7 +174,7 @@ acquire_lock(const char *name, int flags) { int fd; - if ((fd = open(name, O_RDONLY|O_EXLOCK|flags, 0666)) == -1) { + if ((fd = open(name, O_EXLOCK|flags, 0666)) == -1) { if (errno == EAGAIN || errno == EINTR) return (-1); else if (errno == ENOENT && (flags & O_CREAT) == 0) From owner-svn-src-all@freebsd.org Wed Aug 26 19:27:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 88CF13B9274; Wed, 26 Aug 2020 19:27:12 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcG8H751Fz4XHL; Wed, 26 Aug 2020 19:27:11 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ot1-f51.google.com with SMTP id e23so1687224otk.7; Wed, 26 Aug 2020 12:27:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BWw+drxS7w6tP/jIa6PjUGEnoOI5AqSgggc+hX1DyeA=; b=NHXrd+y0BjCvO3DYdftQPHMDf5vQtazm0dry8WLQUKrMSc0HGT6IBBHM3Hx+szSr3M 9JK6pdICf5KfkXyyn2BFBZonILZ9Oj5NCx/8ESUC6UN3RPm6G2jtbAqnmuwFeYDo4QJy M++Ubpr0FxW6odyWBY9O/dh/W7RTrgpPYkPRkOiBbmVU4NrfthusO2xUGZ8ClkGgz57P f26YDU8vQ8JzGEKJMZv7BuUL1qAPSWJKHPf12H5IZ0yeVG8r8sxNKWY/eAojESDEXnqz vJ7gLO70UA56qIUgIQfLSI1xEMTl84nS3NatJHUCbrnfktOLENXAKS+z7IeJHA34uOTc qu1Q== X-Gm-Message-State: AOAM53343u/iebLK7ImswmEB9p5s2Lsr27eLXLJ1OycxZuCE5Bid5cQo G2+rnYjOszd8mXRtiV25FvF14P8d5Jzh5tqFLobjFj9dwhR4xA== X-Google-Smtp-Source: ABdhPJzvGZEdamVRc+h8b05je+xd9gpM4bmMJ5ULx3dY1Nt3LSfqvmJpQEm0ITNwSrgm9lGhJz2t3bQtF5GjgH6sQWk= X-Received: by 2002:a9d:7856:: with SMTP id c22mr1612837otm.18.1598470030466; Wed, 26 Aug 2020 12:27:10 -0700 (PDT) MIME-Version: 1.0 References: <202008260237.07Q2bhwF045988@repo.freebsd.org> <7e0abc1a-a397-46c3-b283-2c1ab21a9c4d@www.fastmail.com> <2534D2E5-2974-4067-8B9C-53EE3E8C6A68@freebsd.org> <043633bb-4660-4639-a2b6-84a25f40ca26@www.fastmail.com> In-Reply-To: <043633bb-4660-4639-a2b6-84a25f40ca26@www.fastmail.com> From: Alan Somers Date: Wed, 26 Aug 2020 13:26:59 -0600 Message-ID: Subject: Re: svn commit: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto To: Brandon Bergren Cc: Jessica Clarke , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BcG8H751Fz4XHL X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:27:12 -0000 On Wed, Aug 26, 2020 at 1:23 PM Brandon Bergren wrote: > > > No, I mean literally. What scope is cb coming from? It's not a variable > > that is in scope for that function as far as I can tell. > > > > Naturally, about two seconds after I sent this, I realized that you meant > that it was a powerpc-specific driver and that's why the other platforms > don't catch it. > > Will fix it myself. > > -- > Brandon Bergren > bdragon@FreeBSD.org > It probably came copy/pasted from another file :( . I'll fix it; and figure out why my universe build didn't catch this. -Alan From owner-svn-src-all@freebsd.org Wed Aug 26 19:28:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B9E63B9A62; Wed, 26 Aug 2020 19:28:31 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcG9q0MQKz4XMX; Wed, 26 Aug 2020 19:28:31 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E538217AEA; Wed, 26 Aug 2020 19:28:30 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QJSUh3099882; Wed, 26 Aug 2020 19:28:30 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QJSUrq099881; Wed, 26 Aug 2020 19:28:30 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202008261928.07QJSUrq099881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Wed, 26 Aug 2020 19:28:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364832 - head/usr.bin/lockf X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/usr.bin/lockf X-SVN-Commit-Revision: 364832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:28:31 -0000 Author: cperciva Date: Wed Aug 26 19:28:30 2020 New Revision: 364832 URL: https://svnweb.freebsd.org/changeset/base/364832 Log: Remove whitespace which accidentaly snuck into r364831. Modified: head/usr.bin/lockf/lockf.1 Modified: head/usr.bin/lockf/lockf.1 ============================================================================== --- head/usr.bin/lockf/lockf.1 Wed Aug 26 19:26:48 2020 (r364831) +++ head/usr.bin/lockf/lockf.1 Wed Aug 26 19:28:30 2020 (r364832) @@ -1,4 +1,4 @@ - .\" +.\" .\" Copyright (C) 1998 John D. Polstra. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without From owner-svn-src-all@freebsd.org Wed Aug 26 19:30:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 414EB3B9C91; Wed, 26 Aug 2020 19:30:25 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcGD06YKsz4XLB; Wed, 26 Aug 2020 19:30:24 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f171.google.com with SMTP id k4so2800288ilr.12; Wed, 26 Aug 2020 12:30:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=54Zls/TBfWKx3UzA5XbeG5/uPe8kHj1BRykl5Wq8U6Q=; b=d0FaaeFD5UuRpItxPhAbdHwpXm9UFmmFEIb7nJNkYsNm0obeEVP9d7z59P6zq5JLx+ FlrJ6U6kMkfGUQ8/6dZ1jf1V93jssTyH6PYHJxxL8UTx4MHaLjQ+qMc6G/bIONzCbqfI EbNME9ZR0pVVhq5Q1PdyxnUjQqpi3bWrEHYbwhsGVTL8hmMMl6eRhpMJAmKKe26pYFuW iDv6zt0qCwBtSb7oxzxl0B7l7oThceboq0B17mlZcyyNji0z8opHhQjCB7ZSLPF/RSd0 xR+bPxfCTw7WBq+S3zRYcZGKIHBx44BEchGLTYPgR4jqZG+audZ7FstI+m2Va2MOtiLn Ppug== X-Gm-Message-State: AOAM532dUyIh25hWBXVUHrf76m6hfY0CrTdIb6ftW5+FLoRaK4xO8QYX sRDPXynw691SkPe1qk1rJ78bAkRMJrBzgTPnDbjVzGFj X-Google-Smtp-Source: ABdhPJxuBLNpjqrxysnA4Z0doWu+/+nOxSxxe5H5XxlBB/0cj+YQsn8CjcAfYxQ4rv+NIsbAZu3yYsAVK5uiMaOZiR8= X-Received: by 2002:a92:d711:: with SMTP id m17mr12056610iln.256.1598470222647; Wed, 26 Aug 2020 12:30:22 -0700 (PDT) MIME-Version: 1.0 References: <202008260237.07Q2bhwF045988@repo.freebsd.org> <7e0abc1a-a397-46c3-b283-2c1ab21a9c4d@www.fastmail.com> <2534D2E5-2974-4067-8B9C-53EE3E8C6A68@freebsd.org> <043633bb-4660-4639-a2b6-84a25f40ca26@www.fastmail.com> In-Reply-To: From: Ed Maste Date: Wed, 26 Aug 2020 15:30:10 -0400 Message-ID: Subject: Re: svn commit: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto To: Alan Somers Cc: Brandon Bergren , Jessica Clarke , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4BcGD06YKsz4XLB X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:30:25 -0000 On Wed, 26 Aug 2020 at 15:27, Alan Somers wrote: > > It probably came copy/pasted from another file :( . I'll fix it; and figure out why my universe build didn't catch this. IIRC powerpcspe is not included in universe/tinderbox. From owner-svn-src-all@freebsd.org Wed Aug 26 19:30:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45ECF3B9D93; Wed, 26 Aug 2020 19:30:43 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcGDM1CxXz4XLx; Wed, 26 Aug 2020 19:30:43 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D91B17D52; Wed, 26 Aug 2020 19:30:43 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QJUgqL000970; Wed, 26 Aug 2020 19:30:42 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QJUgOq000969; Wed, 26 Aug 2020 19:30:42 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202008261930.07QJUgOq000969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Wed, 26 Aug 2020 19:30:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364833 - head/sys/dev/sec X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/dev/sec X-SVN-Commit-Revision: 364833 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:30:43 -0000 Author: bdragon Date: Wed Aug 26 19:30:42 2020 New Revision: 364833 URL: https://svnweb.freebsd.org/changeset/base/364833 Log: [PowerPC] Fix build failure in sec.c Fix a typo in r364799 that was breaking powerpc and powerpcspe build. MFC with: 364799 Modified: head/sys/dev/sec/sec.c Modified: head/sys/dev/sec/sec.c ============================================================================== --- head/sys/dev/sec/sec.c Wed Aug 26 19:28:30 2020 (r364832) +++ head/sys/dev/sec/sec.c Wed Aug 26 19:30:42 2020 (r364833) @@ -852,7 +852,7 @@ sec_desc_map_dma(struct sec_softc *sc, struct sec_dma_ size = m_length(crp->crp_buf.cb_mbuf, NULL); break; case CRYPTO_BUF_VMPAGE: - size = PAGE_SIZE - cb->cb_vm_page_offset; + size = PAGE_SIZE - crp->crp_buf.cb_vm_page_offset; break; default: return (EINVAL); From owner-svn-src-all@freebsd.org Wed Aug 26 19:32:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B2C63B9E22; Wed, 26 Aug 2020 19:32:28 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oo1-f49.google.com (mail-oo1-f49.google.com [209.85.161.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcGGM6Skkz4Y1T; Wed, 26 Aug 2020 19:32:27 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oo1-f49.google.com with SMTP id j19so706674oor.2; Wed, 26 Aug 2020 12:32: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:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5nX6ggvy4vHMjMZAMWS2TDA9ynXI+xaHOTWuy7Loz08=; b=hXm4cPIbaL5BEBr7jQVES7OdAtEYXmv3xFHOiBUnWMTfIjbZ49iosNDm9KHgx/K158 fHVlMsN912M656eh9SudB4IuSOxjhepPsHYw/ng8aIE6dGVmD9mIRg6Nkg1KzSh5auDo EKFrq1PR2Hsoc2CnCQ90Q2LbpuRa1Mj/CINlcbaEPhUDOv5Z1D/NsXTAyo6T6/Pw70V7 SoMZ4cpz4D+F7k33J838AdJ19S7rl6rg11fV94Mifb5LYUzJZInaPRGQvs8xeZMMqlS/ oGHZj1UGnAsAo9XaJjuJ6JvUDit2pbHWDAURcA+/0CLh7Wa3v3XATUaZyY2eKFbgEaSO 3qww== X-Gm-Message-State: AOAM530kLtNtENGzWG69QhAUb5eriJoAiHX+WqoVc9e09I0YTO0FaWFM j6V4gffa87ipnOqlk7NIsqRGHu6sDYBFN70qm0wursHFjjKArA== X-Google-Smtp-Source: ABdhPJzvgh0H9i40Zg1PKx2txe7voAl1KSoUcVAld3vm4I0jxDt6szLeKkTfS7Zgj62aYfCSpr5hrdX1Kp17iArGry0= X-Received: by 2002:a4a:3553:: with SMTP id w19mr11693823oog.79.1598470346448; Wed, 26 Aug 2020 12:32:26 -0700 (PDT) MIME-Version: 1.0 References: <202008260237.07Q2bhwF045988@repo.freebsd.org> <7e0abc1a-a397-46c3-b283-2c1ab21a9c4d@www.fastmail.com> <2534D2E5-2974-4067-8B9C-53EE3E8C6A68@freebsd.org> <043633bb-4660-4639-a2b6-84a25f40ca26@www.fastmail.com> In-Reply-To: From: Alan Somers Date: Wed, 26 Aug 2020 13:32:15 -0600 Message-ID: Subject: Re: svn commit: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto To: Ed Maste Cc: Brandon Bergren , Jessica Clarke , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BcGGM6Skkz4Y1T X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:32:28 -0000 On Wed, Aug 26, 2020 at 1:30 PM Ed Maste wrote: > On Wed, 26 Aug 2020 at 15:27, Alan Somers wrote: > > > > It probably came copy/pasted from another file :( . I'll fix it; and > figure out why my universe build didn't catch this. > > IIRC powerpcspe is not included in universe/tinderbox. > Oh, it's only for powerpcspe and not for all powerpc? Now I don't feel so bad. -Alan From owner-svn-src-all@freebsd.org Wed Aug 26 19:32:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DDCE53B9CCF; Wed, 26 Aug 2020 19:32: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcGGN5fN6z4Y6P; Wed, 26 Aug 2020 19:32: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 A2C20180C4; Wed, 26 Aug 2020 19:32: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 07QJWSQS005747; Wed, 26 Aug 2020 19:32:28 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QJWSUb005732; Wed, 26 Aug 2020 19:32:28 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008261932.07QJWSUb005732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 26 Aug 2020 19:32:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364834 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 364834 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:32:28 -0000 Author: imp Date: Wed Aug 26 19:32:28 2020 New Revision: 364834 URL: https://svnweb.freebsd.org/changeset/base/364834 Log: Each entry in UPDATING needs a date It's rare for there to be two updating entries on the same day (once a decade or so), but we have that here. Add the date to the second one since devd and zfs are unrelated. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Aug 26 19:30:42 2020 (r364833) +++ head/UPDATING Wed Aug 26 19:32:28 2020 (r364834) @@ -32,7 +32,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: 'zpool upgrade' for the next few weeks. The change should be transparent unless you want to use new features. - +20200824: The resume code now notifies devd with the 'kernel' system rather than the old 'kern' subsystem to be consistent with other use. The old notification will be created as well, but From owner-svn-src-all@freebsd.org Wed Aug 26 19:33:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC5053BA044; Wed, 26 Aug 2020 19:33:13 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcGHF5vvbz4Y5T; Wed, 26 Aug 2020 19:33:13 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id A87D9236D9; Wed, 26 Aug 2020 19:33:13 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 8A81A27C0054; Wed, 26 Aug 2020 15:33:13 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute4.internal (MEProxy); Wed, 26 Aug 2020 15:33:13 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddvvddgudefiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculddutddmnecujfgurhepofgfggfkjghffffhvffutgesthdtredt reerjeenucfhrhhomhepfdeurhgrnhguohhnuceuvghrghhrvghnfdcuoegsughrrghgoh hnsefhrhgvvgeuufffrdhorhhgqeenucggtffrrghtthgvrhhnpeejhfeftddutdelgeek gedtgeejkeffvdejtddthefggfevuefggfefledvgefhgfenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsughrrghgohhnodhmvghsmhhtphgr uhhthhhpvghrshhonhgrlhhithihqddutdegvdefheekieegqddukedutdekheduqdgsug hrrghgohhnpeephfhrvggvuefuffdrohhrghesihhmrghprdgttg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 5C187C200A5; Wed, 26 Aug 2020 15:33:13 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-232-g4bdb081-fm-20200825.002-g4bdb081a Mime-Version: 1.0 Message-Id: <53bc8e18-d275-45f3-8f64-5a5f4b20e6b2@www.fastmail.com> In-Reply-To: References: <202008260237.07Q2bhwF045988@repo.freebsd.org> <7e0abc1a-a397-46c3-b283-2c1ab21a9c4d@www.fastmail.com> <2534D2E5-2974-4067-8B9C-53EE3E8C6A68@freebsd.org> <043633bb-4660-4639-a2b6-84a25f40ca26@www.fastmail.com> Date: Wed, 26 Aug 2020 14:32:51 -0500 From: "Brandon Bergren" To: "Ed Maste" , "Alan Somers" Cc: "Jessica Clarke" , src-committers , svn-src-all , svn-src-head Subject: =?UTF-8?Q?Re:_svn_commit:_r364799_-_in_head:_share/man/man9_sys/crypto/c?= =?UTF-8?Q?cp_sys/dev/cxgbe/crypto_sys/dev/sec_sys/kern_sys/opencrypto?= Content-Type: text/plain X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:33:14 -0000 r364833 On Wed, Aug 26, 2020, at 2:30 PM, Ed Maste wrote: > On Wed, 26 Aug 2020 at 15:27, Alan Somers wrote: > > > > It probably came copy/pasted from another file :( . I'll fix it; and figure out why my universe build didn't catch this. > > IIRC powerpcspe is not included in universe/tinderbox. > -- Brandon Bergren bdragon@FreeBSD.org From owner-svn-src-all@freebsd.org Wed Aug 26 19:34:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 351023BA0D3; Wed, 26 Aug 2020 19:34:20 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcGJW6MR7z4YVQ; Wed, 26 Aug 2020 19:34:19 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f173.google.com with SMTP id z22so2572746oid.1; Wed, 26 Aug 2020 12:34:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OHhCg7UisRLjz6StE47uVx/avG1Rzgkr6J9sA2i0m0Y=; b=hf4J1ViIaPUUP1a3QtBWtr0IXatchxjsFfEbklH40pD7o8X48aKAKgdHfxFaa+AJGc PnkoNhGr8D5hGbkudcncu05pYkTg2to5gYW27etxgEFGnzMYsuirpnG6NZuub7HJQOjL P0lefIaJRJ/jxwBr1K48omoRTyWu1q6Ac9c8CPyTBd6K2G0vRjfZiINymyPg9DzVae1y qvn2CvWIwqQ2dXPwAslutUVG91qHP7HJGAQUnY18ebQE01eoeBmZO+nHHRL1xiFyk3Fq oP5a6JDGWKssi0bM1rRN7buFa9/AH6wPpPId5kiB3lHOf/H4mhWN/xEV93dREVQ4J4wC HqBQ== X-Gm-Message-State: AOAM530uLhbooRohcn5iR3QLDEO5i/cqOqpsa35tGVajldA70MyiNpsd 9256A9RimPd3Tyea5T9eVxyLmjIIFQ6M9cB34i/fryb6Hqqu1w== X-Google-Smtp-Source: ABdhPJxzEruRvfTRvEciaRznMAkDXVOZ4yN5IUqT9dHSpmvxl2ylM2WPwTIw+xhjKROXujHwmRnB9o2M1JBZqTtT/ww= X-Received: by 2002:aca:1c0c:: with SMTP id c12mr4747025oic.73.1598470458390; Wed, 26 Aug 2020 12:34:18 -0700 (PDT) MIME-Version: 1.0 References: <202008261930.07QJUgOq000969@repo.freebsd.org> In-Reply-To: <202008261930.07QJUgOq000969@repo.freebsd.org> From: Alan Somers Date: Wed, 26 Aug 2020 13:34:07 -0600 Message-ID: Subject: Re: svn commit: r364833 - head/sys/dev/sec To: Brandon Bergren Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BcGJW6MR7z4YVQ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:34:20 -0000 On Wed, Aug 26, 2020 at 1:30 PM Brandon Bergren wrote: > Author: bdragon > Date: Wed Aug 26 19:30:42 2020 > New Revision: 364833 > URL: https://svnweb.freebsd.org/changeset/base/364833 > > Log: > [PowerPC] Fix build failure in sec.c > > Fix a typo in r364799 that was breaking powerpc and powerpcspe build. > > MFC with: 364799 > > Modified: > head/sys/dev/sec/sec.c > Thanks Brandon. From owner-svn-src-all@freebsd.org Wed Aug 26 19:36:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CA1A3B9FE2; Wed, 26 Aug 2020 19:36:51 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcGMR0wBbz4YSs; Wed, 26 Aug 2020 19:36:51 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id F0735236DA; Wed, 26 Aug 2020 19:36:50 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id E39E427C0054; Wed, 26 Aug 2020 15:36:50 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute4.internal (MEProxy); Wed, 26 Aug 2020 15:36:50 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddvvddgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculddutddmnecujfgurhepofgfggfkjghffffhvffutgesthdtredt reerjeenucfhrhhomhepfdeurhgrnhguohhnuceuvghrghhrvghnfdcuoegsughrrghgoh hnsefhrhgvvgeuufffrdhorhhgqeenucggtffrrghtthgvrhhnpeeutefhtdeitdeggefg keeiffehleeiheevveeugeegtefgiefhueehteehuefgveenucffohhmrghinhepghhith hhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepsggurhgrghhonhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqud dtgedvfeehkeeigedqudekuddtkeehuddqsggurhgrghhonheppefhrhgvvgeuufffrdho rhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 99C75C200A5; Wed, 26 Aug 2020 15:36:50 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-232-g4bdb081-fm-20200825.002-g4bdb081a Mime-Version: 1.0 Message-Id: <2c83de1f-2318-4878-b9fe-d21bb5dd6905@www.fastmail.com> In-Reply-To: <53bc8e18-d275-45f3-8f64-5a5f4b20e6b2@www.fastmail.com> References: <202008260237.07Q2bhwF045988@repo.freebsd.org> <7e0abc1a-a397-46c3-b283-2c1ab21a9c4d@www.fastmail.com> <2534D2E5-2974-4067-8B9C-53EE3E8C6A68@freebsd.org> <043633bb-4660-4639-a2b6-84a25f40ca26@www.fastmail.com> <53bc8e18-d275-45f3-8f64-5a5f4b20e6b2@www.fastmail.com> Date: Wed, 26 Aug 2020 14:36:30 -0500 From: "Brandon Bergren" To: "Ed Maste" , "Alan Somers" Cc: "Jessica Clarke" , src-committers , svn-src-all , svn-src-head Subject: =?UTF-8?Q?Re:_svn_commit:_r364799_-_in_head:_share/man/man9_sys/crypto/c?= =?UTF-8?Q?cp_sys/dev/cxgbe/crypto_sys/dev/sec_sys/kern_sys/opencrypto?= Content-Type: text/plain X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:36:51 -0000 My guess as to why universe didn't catch it on powerpc is that MPC85XX is a non GENERIC kernel that is specially built as an alternate kernel -- see https://github.com/freebsd/freebsd-ci/blob/master/jobs/FreeBSD-head-powerpc-build/src.conf On Wed, Aug 26, 2020, at 2:32 PM, Brandon Bergren wrote: > r364833 > > On Wed, Aug 26, 2020, at 2:30 PM, Ed Maste wrote: > > On Wed, 26 Aug 2020 at 15:27, Alan Somers wrote: > > > > > > It probably came copy/pasted from another file :( . I'll fix it; and figure out why my universe build didn't catch this. > > > > IIRC powerpcspe is not included in universe/tinderbox. > > -- Brandon Bergren bdragon@FreeBSD.org From owner-svn-src-all@freebsd.org Wed Aug 26 19:45:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C69673BA7EA; Wed, 26 Aug 2020 19:45:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcGY7429Zz4ZLR; Wed, 26 Aug 2020 19:45:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8681:1cb0:9808:df28:c1f9:5a05]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id A966D234AE; Wed, 26 Aug 2020 19:45:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r364799 - in head: share/man/man9 sys/crypto/ccp sys/dev/cxgbe/crypto sys/dev/sec sys/kern sys/opencrypto To: Brandon Bergren , Ed Maste , Alan Somers Cc: Jessica Clarke , src-committers , svn-src-all , svn-src-head References: <202008260237.07Q2bhwF045988@repo.freebsd.org> <7e0abc1a-a397-46c3-b283-2c1ab21a9c4d@www.fastmail.com> <2534D2E5-2974-4067-8B9C-53EE3E8C6A68@freebsd.org> <043633bb-4660-4639-a2b6-84a25f40ca26@www.fastmail.com> <53bc8e18-d275-45f3-8f64-5a5f4b20e6b2@www.fastmail.com> <2c83de1f-2318-4878-b9fe-d21bb5dd6905@www.fastmail.com> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Wed, 26 Aug 2020 12:45:12 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <2c83de1f-2318-4878-b9fe-d21bb5dd6905@www.fastmail.com> 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.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 19:45:15 -0000 On 8/26/20 12:36 PM, Brandon Bergren wrote: > My guess as to why universe didn't catch it on powerpc is that MPC85XX is a non GENERIC kernel that is specially built as an alternate kernel -- see https://github.com/freebsd/freebsd-ci/blob/master/jobs/FreeBSD-head-powerpc-build/src.conf It is also built as part of make universe/tinderbox. I've tended to only build a few specific kernel configs to cover crypto drivers not built in amd64's GENERIC build (i386 GENERIC for glxsb, MPC85XX for sec, XLP64 and OCTEON for the mips ones, aarch64 GENERIC for armv8crypto). I believe universe should cover all of those. -- John Baldwin From owner-svn-src-all@freebsd.org Wed Aug 26 20:30:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36E5F3BB923; Wed, 26 Aug 2020 20:30:01 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcHXn0dvBz4cGn; Wed, 26 Aug 2020 20:30:01 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE6CF18D03; Wed, 26 Aug 2020 20:30:00 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QKU0nu042109; Wed, 26 Aug 2020 20:30:00 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QKU0Tg042108; Wed, 26 Aug 2020 20:30:00 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202008262030.07QKU0Tg042108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 26 Aug 2020 20:30:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364835 - head/libexec/rc/rc.d X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/libexec/rc/rc.d X-SVN-Commit-Revision: 364835 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 20:30:01 -0000 Author: cy Date: Wed Aug 26 20:30:00 2020 New Revision: 364835 URL: https://svnweb.freebsd.org/changeset/base/364835 Log: To avoid breakage for those who build/install without ZFS only rely on rc.d/zpool's BEFORE specification. Reported by: rpokala Modified: head/libexec/rc/rc.d/mountcritlocal Modified: head/libexec/rc/rc.d/mountcritlocal ============================================================================== --- head/libexec/rc/rc.d/mountcritlocal Wed Aug 26 19:32:28 2020 (r364834) +++ head/libexec/rc/rc.d/mountcritlocal Wed Aug 26 20:30:00 2020 (r364835) @@ -4,7 +4,7 @@ # # PROVIDE: mountcritlocal -# REQUIRE: root hostid_save mdconfig zvol +# REQUIRE: root hostid_save mdconfig # KEYWORD: nojail shutdown . /etc/rc.subr From owner-svn-src-all@freebsd.org Wed Aug 26 20:46:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C39FD3BBC55 for ; Wed, 26 Aug 2020 20:46:31 +0000 (UTC) (envelope-from info.ditel@orange.fr) Received: from sender.230.com (5271.lesmails.xyz [91.236.254.197]) by mx1.freebsd.org (Postfix) with ESMTP id 4BcHvp0xPbz4cqb for ; Wed, 26 Aug 2020 20:46:29 +0000 (UTC) (envelope-from info.ditel@orange.fr) From: info.ditel@orange.fr Subject: logiciel Ditel SMS To: svn-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Wed, 26 Aug 2020 22:46:22 +0200 X-Rspamd-Queue-Id: 4BcHvp0xPbz4cqb X-Spamd-Bar: ++++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of info.ditel@orange.fr has no SPF policy when checking 91.236.254.197) smtp.mailfrom=info.ditel@orange.fr X-Spamd-Result: default: False [6.93 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[orange.fr]; FREEMAIL_FROM(0.00)[orange.fr]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[orange.fr]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_MEDIUM(0.93)[0.932]; MISSING_MID(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_LONG(0.98)[0.983]; FROM_NO_DN(0.00)[]; NEURAL_SPAM_SHORT(1.11)[1.112]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:197922, ipnet:91.236.254.0/24, country:FR]; MAILMAN_DEST(0.00)[svn-src-all] X-Spam: Yes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 20:46:31 -0000 G.C.U. Bonjour, En cette période difficile, notre logiciel Ditel SMS https://www.ditel.fr/produit-11-ditel-mailing-sms.html peut rendre de grands services dans le cadre de votre activité Campings Cette version avec modem utilise la carte SIM d'un GSM et rend l'envoi de SMS gratuit à la vitesse de 200 SMS / heure en personnalisant le message pour chacun de vos destinataires. Vous importez votre propre fichier Excel dans Ditel SMS en restant ainsi maitre de vos envois en toute confidentialité. Tarif de notre logiciel Ditel SMS avec modem 294 euros ht Bonne journée EQUIPE DITEL Daniel Navarro 04 77 90 47 47 Hotline Steve Schneider 08 92 06 00 57 Pour ne plus recevoir nos infos https://www.ditel.fr/desabonnement.html merci From owner-svn-src-all@freebsd.org Wed Aug 26 20:56:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D99AD3BC688; Wed, 26 Aug 2020 20:56:05 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcJ6s5Q99z4dkZ; Wed, 26 Aug 2020 20:56:05 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D30719026; Wed, 26 Aug 2020 20:56:05 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QKu5vW062221; Wed, 26 Aug 2020 20:56:05 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QKu5FA062220; Wed, 26 Aug 2020 20:56:05 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202008262056.07QKu5FA062220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 26 Aug 2020 20:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364836 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 364836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 20:56:05 -0000 Author: rmacklem Date: Wed Aug 26 20:56:05 2020 New Revision: 364836 URL: https://svnweb.freebsd.org/changeset/base/364836 Log: Add MNT_EXTLSxxx flags that will be used for NFS over TLS exports. These flags are not currently used, but will be used by future commits to implement export(5) requirements for the use of NFS over TLS by clients. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D26180 Modified: head/sys/sys/mount.h Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Wed Aug 26 20:30:00 2020 (r364835) +++ head/sys/sys/mount.h Wed Aug 26 20:56:05 2020 (r364836) @@ -365,6 +365,9 @@ struct mntoptnames { #define MNT_EXPORTANON 0x0000000000000400ULL /* anon uid mapping for all */ #define MNT_EXKERB 0x0000000000000800ULL /* exported with Kerberos */ #define MNT_EXPUBLIC 0x0000000020000000ULL /* public export (WebNFS) */ +#define MNT_EXTLS 0x0000004000000000ULL /* require TLS */ +#define MNT_EXTLSCERT 0x0000008000000000ULL /* require TLS with client cert */ +#define MNT_EXTLSCERTUSER 0x0000010000000000ULL /* require TLS with user cert */ /* * Flags set by internal operations, From owner-svn-src-all@freebsd.org Wed Aug 26 21:13:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D914A3BCAB6; Wed, 26 Aug 2020 21:13:36 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcJW45QY4z4fm5; Wed, 26 Aug 2020 21:13:36 +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 9D69A193D5; Wed, 26 Aug 2020 21:13:36 +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 07QLDaLT074289; Wed, 26 Aug 2020 21:13:36 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QLDa35074288; Wed, 26 Aug 2020 21:13:36 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008262113.07QLDa35074288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 26 Aug 2020 21:13:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364837 - head/sys/fs/fuse X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/fs/fuse X-SVN-Commit-Revision: 364837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 21:13:36 -0000 Author: mjg Date: Wed Aug 26 21:13:36 2020 New Revision: 364837 URL: https://svnweb.freebsd.org/changeset/base/364837 Log: fuse: unbreak after r364814 Reported by: kevans Modified: head/sys/fs/fuse/fuse_vnops.c Modified: head/sys/fs/fuse/fuse_vnops.c ============================================================================== --- head/sys/fs/fuse/fuse_vnops.c Wed Aug 26 20:56:05 2020 (r364836) +++ head/sys/fs/fuse/fuse_vnops.c Wed Aug 26 21:13:36 2020 (r364837) @@ -1035,8 +1035,9 @@ fuse_vnop_lookup(struct vop_lookup_args *ap) filesize = 0; } else { struct timespec now, timeout; + int ncpticks; /* here to accomodate for API contract */ - err = cache_lookup(dvp, vpp, cnp, &timeout, NULL); + err = cache_lookup(dvp, vpp, cnp, &timeout, &ncpticks); getnanouptime(&now); SDT_PROBE3(fusefs, , vnops, cache_lookup, err, &timeout, &now); switch (err) { From owner-svn-src-all@freebsd.org Wed Aug 26 21:17:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0CB103BCF3E; Wed, 26 Aug 2020 21:17:19 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcJbL6XXxz4g3N; Wed, 26 Aug 2020 21:17:18 +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 C4E87196A8; Wed, 26 Aug 2020 21:17:18 +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 07QLHIqv074883; Wed, 26 Aug 2020 21:17:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QLHIs8074882; Wed, 26 Aug 2020 21:17:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008262117.07QLHIs8074882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Aug 2020 21:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364838 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 364838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 21:17:19 -0000 Author: jhb Date: Wed Aug 26 21:17:18 2020 New Revision: 364838 URL: https://svnweb.freebsd.org/changeset/base/364838 Log: Simplify compat shims for /dev/crypto. - Make session handling always use the CIOGSESSION2 structure. CIOGSESSION requests use a thunk similar to COMPAT_FREEBSD32 session requests. This permits the ioctl handler to use the 'crid' field unconditionally. - Move COMPAT_FREEBSD32 handling out of the main ioctl handler body and instead do conversions in/out of thunk structures in dedicated blocks at the start and end of the ioctl function. Reviewed by: markj (earlier version) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D26178 Modified: head/sys/opencrypto/cryptodev.c Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Wed Aug 26 21:13:36 2020 (r364837) +++ head/sys/opencrypto/cryptodev.c Wed Aug 26 21:17:18 2020 (r364838) @@ -124,9 +124,10 @@ struct crypt_kop32 { #define CIOCKEY232 _IOWR('c', 107, struct crypt_kop32) static void -session_op_from_32(const struct session_op32 *from, struct session_op *to) +session_op_from_32(const struct session_op32 *from, struct session2_op *to) { + memset(to, 0, sizeof(*to)); CP(*from, *to, cipher); CP(*from, *to, mac); CP(*from, *to, keylen); @@ -134,19 +135,19 @@ session_op_from_32(const struct session_op32 *from, st CP(*from, *to, mackeylen); PTRIN_CP(*from, *to, mackey); CP(*from, *to, ses); + to->crid = CRYPTOCAP_F_HARDWARE; } static void session2_op_from_32(const struct session2_op32 *from, struct session2_op *to) { - session_op_from_32((const struct session_op32 *)from, - (struct session_op *)to); + session_op_from_32((const struct session_op32 *)from, to); CP(*from, *to, crid); } static void -session_op_to_32(const struct session_op *from, struct session_op32 *to) +session_op_to_32(const struct session2_op *from, struct session_op32 *to) { CP(*from, *to, cipher); @@ -162,8 +163,7 @@ static void session2_op_to_32(const struct session2_op *from, struct session2_op32 *to) { - session_op_to_32((const struct session_op *)from, - (struct session_op32 *)to); + session_op_to_32(from, (struct session_op32 *)to); CP(*from, *to, crid); } @@ -240,6 +240,22 @@ crypt_kop_to_32(const struct crypt_kop *from, struct c } #endif +static void +session2_op_from_op(const struct session_op *from, struct session2_op *to) +{ + + memset(to, 0, sizeof(*to)); + memcpy(to, from, sizeof(*from)); + to->crid = CRYPTOCAP_F_HARDWARE; +} + +static void +session2_op_to_op(const struct session2_op *from, struct session_op *to) +{ + + memcpy(to, from, sizeof(*to)); +} + struct csession { TAILQ_ENTRY(csession) next; crypto_session_t cses; @@ -354,11 +370,10 @@ cryptof_ioctl( struct ucred *active_cred, struct thread *td) { -#define SES2(p) ((struct session2_op *)p) struct crypto_session_params csp; struct fcrypt *fcr = fp->f_data; struct csession *cse; - struct session_op *sop; + struct session2_op *sop; struct crypt_op *cop; struct crypt_aead *caead; struct enc_xform *txform = NULL; @@ -369,27 +384,64 @@ cryptof_ioctl( crypto_session_t cses; u_int32_t ses; int error = 0, crid; + union { + struct session2_op sopc; #ifdef COMPAT_FREEBSD32 - struct session2_op sopc; - struct crypt_op copc; - struct crypt_kop kopc; + struct crypt_op copc; + struct crypt_kop kopc; #endif + }; +#ifdef COMPAT_FREEBSD32 + u_long cmd32; + void *data32; + cmd32 = 0; + data32 = NULL; switch (cmd) { - case CIOCGSESSION: - case CIOCGSESSION2: -#ifdef COMPAT_FREEBSD32 case CIOCGSESSION32: + cmd32 = cmd; + data32 = data; + cmd = CIOCGSESSION; + data = &sopc; + session_op_from_32((struct session_op32 *)data32, &sopc); + break; case CIOCGSESSION232: - if (cmd == CIOCGSESSION32) { - session_op_from_32(data, (struct session_op *)&sopc); - sop = (struct session_op *)&sopc; - } else if (cmd == CIOCGSESSION232) { - session2_op_from_32(data, &sopc); - sop = (struct session_op *)&sopc; - } else + cmd32 = cmd; + data32 = data; + cmd = CIOCGSESSION2; + data = &sopc; + session2_op_from_32((struct session2_op32 *)data32, &sopc); + break; + case CIOCCRYPT32: + cmd32 = cmd; + data32 = data; + cmd = CIOCCRYPT; + data = &copc; + crypt_op_from_32((struct crypt_op32 *)data32, &copc); + break; + case CIOCKEY32: + case CIOCKEY232: + cmd32 = cmd; + data32 = data; + if (cmd == CIOCKEY32) + cmd = CIOCKEY; + else + cmd = CIOCKEY2; + data = &kopc; + crypt_kop_from_32((struct crypt_kop32 *)data32, &kopc); + break; + } #endif - sop = (struct session_op *)data; + + switch (cmd) { + case CIOCGSESSION: + case CIOCGSESSION2: + if (cmd == CIOCGSESSION) { + session2_op_from_op(data, &sopc); + sop = &sopc; + } else + sop = (struct session2_op *)data; + switch (sop->cipher) { case 0: break; @@ -652,22 +704,14 @@ cryptof_ioctl( csp.csp_ivlen = AES_CCM_IV_LEN; } - /* NB: CIOCGSESSION2 has the crid */ - if (cmd == CIOCGSESSION2 -#ifdef COMPAT_FREEBSD32 - || cmd == CIOCGSESSION232 -#endif - ) { - crid = SES2(sop)->crid; - error = checkforsoftware(&crid); - if (error) { - CRYPTDEB("checkforsoftware"); - SDT_PROBE1(opencrypto, dev, ioctl, error, - __LINE__); - goto bail; - } - } else - crid = CRYPTOCAP_F_HARDWARE; + crid = sop->crid; + error = checkforsoftware(&crid); + if (error) { + CRYPTDEB("checkforsoftware"); + SDT_PROBE1(opencrypto, dev, ioctl, error, + __LINE__); + goto bail; + } error = crypto_newsession(&cses, &csp, crid); if (error) { CRYPTDEB("crypto_newsession"); @@ -685,28 +729,17 @@ cryptof_ioctl( goto bail; } sop->ses = cse->ses; - if (cmd == CIOCGSESSION2 -#ifdef COMPAT_FREEBSD32 - || cmd == CIOCGSESSION232 -#endif - ) { - /* return hardware/driver id */ - SES2(sop)->crid = crypto_ses2hid(cse->cses); - } + + /* return hardware/driver id */ + sop->crid = crypto_ses2hid(cse->cses); bail: if (error) { free(key, M_XDATA); free(mackey, M_XDATA); } -#ifdef COMPAT_FREEBSD32 - else { - if (cmd == CIOCGSESSION32) - session_op_to_32(sop, data); - else if (cmd == CIOCGSESSION232) - session2_op_to_32((struct session2_op *)sop, - data); - } -#endif + + if (cmd == CIOCGSESSION && error == 0) + session2_op_to_op(sop, data); break; case CIOCFSESSION: ses = *(u_int32_t *)data; @@ -716,14 +749,7 @@ bail: } break; case CIOCCRYPT: -#ifdef COMPAT_FREEBSD32 - case CIOCCRYPT32: - if (cmd == CIOCCRYPT32) { - cop = &copc; - crypt_op_from_32(data, cop); - } else -#endif - cop = (struct crypt_op *)data; + cop = (struct crypt_op *)data; cse = csefind(fcr, cop->ses); if (cse == NULL) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); @@ -731,33 +757,15 @@ bail: } error = cryptodev_op(cse, cop, active_cred, td); csefree(cse); -#ifdef COMPAT_FREEBSD32 - if (error == 0 && cmd == CIOCCRYPT32) - crypt_op_to_32(cop, data); -#endif break; case CIOCKEY: case CIOCKEY2: -#ifdef COMPAT_FREEBSD32 - case CIOCKEY32: - case CIOCKEY232: -#endif if (!crypto_userasymcrypto) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); return (EPERM); /* XXX compat? */ } -#ifdef COMPAT_FREEBSD32 - if (cmd == CIOCKEY32 || cmd == CIOCKEY232) { - kop = &kopc; - crypt_kop_from_32(data, kop); - } else -#endif - kop = (struct crypt_kop *)data; - if (cmd == CIOCKEY -#ifdef COMPAT_FREEBSD32 - || cmd == CIOCKEY32 -#endif - ) { + kop = (struct crypt_kop *)data; + if (cmd == CIOCKEY) { /* NB: crypto core enforces s/w driver use */ kop->crk_crid = CRYPTOCAP_F_HARDWARE | CRYPTOCAP_F_SOFTWARE; @@ -765,10 +773,6 @@ bail: mtx_lock(&Giant); error = cryptodev_key(kop); mtx_unlock(&Giant); -#ifdef COMPAT_FREEBSD32 - if (cmd == CIOCKEY32 || cmd == CIOCKEY232) - crypt_kop_to_32(kop, data); -#endif break; case CIOCASYMFEAT: if (!crypto_userasymcrypto) { @@ -804,8 +808,28 @@ bail: SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); break; } + +#ifdef COMPAT_FREEBSD32 + switch (cmd32) { + case CIOCGSESSION32: + if (error == 0) + session_op_to_32(data, data32); + break; + case CIOCGSESSION232: + if (error == 0) + session2_op_to_32(data, data32); + break; + case CIOCCRYPT32: + if (error == 0) + crypt_op_to_32(data, data32); + break; + case CIOCKEY32: + case CIOCKEY232: + crypt_kop_to_32(data, data32); + break; + } +#endif return (error); -#undef SES2 } static int cryptodev_cb(struct cryptop *); From owner-svn-src-all@freebsd.org Wed Aug 26 21:19:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E7283BD096; Wed, 26 Aug 2020 21:19:06 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcJdQ2spCz4g9b; Wed, 26 Aug 2020 21:19:06 +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 46199193D6; Wed, 26 Aug 2020 21:19:06 +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 07QLJ67K075205; Wed, 26 Aug 2020 21:19:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QLJ6UI075204; Wed, 26 Aug 2020 21:19:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008262119.07QLJ6UI075204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Aug 2020 21:19: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: r364839 - in stable: 11/tools/build/mk 12/tools/build/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/tools/build/mk 12/tools/build/mk X-SVN-Commit-Revision: 364839 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 21:19:06 -0000 Author: jhb Date: Wed Aug 26 21:19:05 2020 New Revision: 364839 URL: https://svnweb.freebsd.org/changeset/base/364839 Log: MFC 361093: Don't remove ubsec(4) manual page for WITHOUT_USB=yes. In head this manpage has been removed entirely, but ubsec(4) is a PCI device and not a USB device. Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 26 21:17:18 2020 (r364838) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 26 21:19:05 2020 (r364839) @@ -9309,7 +9309,6 @@ OLD_FILES+=usr/share/man/man4/uark.4.gz OLD_FILES+=usr/share/man/man4/uart.4.gz OLD_FILES+=usr/share/man/man4/uath.4.gz OLD_FILES+=usr/share/man/man4/ubsa.4.gz -OLD_FILES+=usr/share/man/man4/ubsec.4.gz OLD_FILES+=usr/share/man/man4/ubser.4.gz OLD_FILES+=usr/share/man/man4/ubtbcmfw.4.gz OLD_FILES+=usr/share/man/man4/uchcom.4.gz From owner-svn-src-all@freebsd.org Wed Aug 26 21:19:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2CF863BD102; Wed, 26 Aug 2020 21:19:06 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcJdQ0ShTz4gGG; Wed, 26 Aug 2020 21:19:06 +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 E760C19524; Wed, 26 Aug 2020 21:19:05 +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 07QLJ5Ja075198; Wed, 26 Aug 2020 21:19:05 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QLJ5Xo075197; Wed, 26 Aug 2020 21:19:05 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008262119.07QLJ5Xo075197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Aug 2020 21:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364839 - in stable: 11/tools/build/mk 12/tools/build/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/tools/build/mk 12/tools/build/mk X-SVN-Commit-Revision: 364839 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 21:19:06 -0000 Author: jhb Date: Wed Aug 26 21:19:05 2020 New Revision: 364839 URL: https://svnweb.freebsd.org/changeset/base/364839 Log: MFC 361093: Don't remove ubsec(4) manual page for WITHOUT_USB=yes. In head this manpage has been removed entirely, but ubsec(4) is a PCI device and not a USB device. Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/12/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 26 21:17:18 2020 (r364838) +++ stable/12/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 26 21:19:05 2020 (r364839) @@ -9892,7 +9892,6 @@ OLD_FILES+=usr/share/man/man4/uark.4.gz OLD_FILES+=usr/share/man/man4/uart.4.gz OLD_FILES+=usr/share/man/man4/uath.4.gz OLD_FILES+=usr/share/man/man4/ubsa.4.gz -OLD_FILES+=usr/share/man/man4/ubsec.4.gz OLD_FILES+=usr/share/man/man4/ubser.4.gz OLD_FILES+=usr/share/man/man4/ubtbcmfw.4.gz OLD_FILES+=usr/share/man/man4/uchcom.4.gz From owner-svn-src-all@freebsd.org Wed Aug 26 21:28:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E324F3BCB3F; Wed, 26 Aug 2020 21:28:47 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcJrb5gPvz3RdD; Wed, 26 Aug 2020 21:28:47 +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 A2FA9197D6; Wed, 26 Aug 2020 21:28:47 +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 07QLSlO9082654; Wed, 26 Aug 2020 21:28:47 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QLSlUS082653; Wed, 26 Aug 2020 21:28:47 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008262128.07QLSlUS082653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Aug 2020 21:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364840 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 364840 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 21:28:48 -0000 Author: jhb Date: Wed Aug 26 21:28:47 2020 New Revision: 364840 URL: https://svnweb.freebsd.org/changeset/base/364840 Log: Add freebsd32 compat support for CIOCCRYPTAEAD. Reviewed by: markj (earlier version) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D26179 Modified: head/sys/opencrypto/cryptodev.c Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Wed Aug 26 21:19:05 2020 (r364839) +++ head/sys/opencrypto/cryptodev.c Wed Aug 26 21:28:47 2020 (r364840) @@ -103,6 +103,20 @@ struct crypt_op32 { u_int32_t iv; }; +struct crypt_aead32 { + u_int32_t ses; + u_int16_t op; + u_int16_t flags; + u_int len; + u_int aadlen; + u_int ivlen; + u_int32_t src; + u_int32_t dst; + u_int32_t aad; + u_int32_t tag; + u_int32_t iv; +}; + struct crparam32 { u_int32_t crp_p; u_int crp_nbits; @@ -122,6 +136,7 @@ struct crypt_kop32 { #define CIOCKEY32 _IOWR('c', 104, struct crypt_kop32) #define CIOCGSESSION232 _IOWR('c', 106, struct session2_op32) #define CIOCKEY232 _IOWR('c', 107, struct crypt_kop32) +#define CIOCCRYPTAEAD32 _IOWR('c', 109, struct crypt_aead32) static void session_op_from_32(const struct session_op32 *from, struct session2_op *to) @@ -196,6 +211,40 @@ crypt_op_to_32(const struct crypt_op *from, struct cry } static void +crypt_aead_from_32(const struct crypt_aead32 *from, struct crypt_aead *to) +{ + + CP(*from, *to, ses); + CP(*from, *to, op); + CP(*from, *to, flags); + CP(*from, *to, len); + CP(*from, *to, aadlen); + CP(*from, *to, ivlen); + PTRIN_CP(*from, *to, src); + PTRIN_CP(*from, *to, dst); + PTRIN_CP(*from, *to, aad); + PTRIN_CP(*from, *to, tag); + PTRIN_CP(*from, *to, iv); +} + +static void +crypt_aead_to_32(const struct crypt_aead *from, struct crypt_aead32 *to) +{ + + CP(*from, *to, ses); + CP(*from, *to, op); + CP(*from, *to, flags); + CP(*from, *to, len); + CP(*from, *to, aadlen); + CP(*from, *to, ivlen); + PTROUT_CP(*from, *to, src); + PTROUT_CP(*from, *to, dst); + PTROUT_CP(*from, *to, aad); + PTROUT_CP(*from, *to, tag); + PTROUT_CP(*from, *to, iv); +} + +static void crparam_from_32(const struct crparam32 *from, struct crparam *to) { @@ -388,6 +437,7 @@ cryptof_ioctl( struct session2_op sopc; #ifdef COMPAT_FREEBSD32 struct crypt_op copc; + struct crypt_aead aeadc; struct crypt_kop kopc; #endif }; @@ -419,6 +469,13 @@ cryptof_ioctl( data = &copc; crypt_op_from_32((struct crypt_op32 *)data32, &copc); break; + case CIOCCRYPTAEAD32: + cmd32 = cmd; + data32 = data; + cmd = CIOCCRYPTAEAD; + data = &aeadc; + crypt_aead_from_32((struct crypt_aead32 *)data32, &aeadc); + break; case CIOCKEY32: case CIOCKEY232: cmd32 = cmd; @@ -822,6 +879,10 @@ bail: case CIOCCRYPT32: if (error == 0) crypt_op_to_32(data, data32); + break; + case CIOCCRYPTAEAD32: + if (error == 0) + crypt_aead_to_32(data, data32); break; case CIOCKEY32: case CIOCKEY232: From owner-svn-src-all@freebsd.org Wed Aug 26 21:30:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 551273BD354; Wed, 26 Aug 2020 21:30:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcJt018Z9z3SCG; Wed, 26 Aug 2020 21:30:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B3C0196CF; Wed, 26 Aug 2020 21:30:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QLTxcn082876; Wed, 26 Aug 2020 21:29:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QLTxAs082875; Wed, 26 Aug 2020 21:29:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008262129.07QLTxAs082875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Aug 2020 21:29:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364841 - in stable: 11/tools/build/mk 12/tools/build/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/tools/build/mk 12/tools/build/mk X-SVN-Commit-Revision: 364841 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 21:30:00 -0000 Author: jhb Date: Wed Aug 26 21:29:59 2020 New Revision: 364841 URL: https://svnweb.freebsd.org/changeset/base/364841 Log: MFC 359050: Add missing DTrace files for WITHOUT_CDDL=yes. Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/12/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 26 21:28:47 2020 (r364840) +++ stable/12/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 26 21:29:59 2020 (r364841) @@ -1162,13 +1162,18 @@ OLD_FILES+=usr/lib/dtrace/drti.o OLD_FILES+=usr/lib/dtrace/errno.d OLD_FILES+=usr/lib/dtrace/io.d OLD_FILES+=usr/lib/dtrace/ip.d +OLD_FILES+=usr/lib/dtrace/mbuf.d OLD_FILES+=usr/lib/dtrace/psinfo.d .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" OLD_FILES+=usr/lib/dtrace/regs_x86.d .endif +OLD_FILES+=usr/lib/dtrace/sctp.d +OLD_FILES+=usr/lib/dtrace/siftr.d OLD_FILES+=usr/lib/dtrace/signal.d +OLD_FILES+=usr/lib/dtrace/socket.d OLD_FILES+=usr/lib/dtrace/tcp.d OLD_FILES+=usr/lib/dtrace/udp.d +OLD_FILES+=usr/lib/dtrace/udplite.d OLD_FILES+=usr/lib/dtrace/unistd.d OLD_FILES+=usr/lib/libavl.a OLD_FILES+=usr/lib/libavl.so @@ -1216,29 +1221,120 @@ OLD_LIBS+=usr/lib32/libuutil.so.2 OLD_FILES+=usr/lib32/libuutil_p.a .endif OLD_LIBS+=lib/libdtrace.so.2 +OLD_FILES+=usr/libexec/dwatch/chmod +OLD_FILES+=usr/libexec/dwatch/errno +OLD_FILES+=usr/libexec/dwatch/fchmodat +OLD_FILES+=usr/libexec/dwatch/io +OLD_FILES+=usr/libexec/dwatch/io-done +OLD_FILES+=usr/libexec/dwatch/io-start +OLD_FILES+=usr/libexec/dwatch/ip +OLD_FILES+=usr/libexec/dwatch/ip-receive +OLD_FILES+=usr/libexec/dwatch/ip-send +OLD_FILES+=usr/libexec/dwatch/kill +OLD_FILES+=usr/libexec/dwatch/lchmod +OLD_FILES+=usr/libexec/dwatch/nanosleep +OLD_FILES+=usr/libexec/dwatch/open +OLD_FILES+=usr/libexec/dwatch/openat +OLD_FILES+=usr/libexec/dwatch/proc +OLD_FILES+=usr/libexec/dwatch/proc-create +OLD_FILES+=usr/libexec/dwatch/proc-exec +OLD_FILES+=usr/libexec/dwatch/proc-exec-failure +OLD_FILES+=usr/libexec/dwatch/proc-exec-success +OLD_FILES+=usr/libexec/dwatch/proc-exit +OLD_FILES+=usr/libexec/dwatch/proc-signal +OLD_FILES+=usr/libexec/dwatch/proc-signal-clear +OLD_FILES+=usr/libexec/dwatch/proc-signal-discard +OLD_FILES+=usr/libexec/dwatch/proc-signal-send +OLD_FILES+=usr/libexec/dwatch/proc-status +OLD_FILES+=usr/libexec/dwatch/read +OLD_FILES+=usr/libexec/dwatch/recv +OLD_FILES+=usr/libexec/dwatch/recvfrom +OLD_FILES+=usr/libexec/dwatch/recvmsg +OLD_FILES+=usr/libexec/dwatch/rw +OLD_FILES+=usr/libexec/dwatch/sched +OLD_FILES+=usr/libexec/dwatch/sched-change-pri +OLD_FILES+=usr/libexec/dwatch/sched-cpu +OLD_FILES+=usr/libexec/dwatch/sched-dequeue +OLD_FILES+=usr/libexec/dwatch/sched-enqueue +OLD_FILES+=usr/libexec/dwatch/sched-exec +OLD_FILES+=usr/libexec/dwatch/sched-lend-pri +OLD_FILES+=usr/libexec/dwatch/sched-load-change +OLD_FILES+=usr/libexec/dwatch/sched-off-cpu +OLD_FILES+=usr/libexec/dwatch/sched-on-cpu +OLD_FILES+=usr/libexec/dwatch/sched-preempt +OLD_FILES+=usr/libexec/dwatch/sched-pri +OLD_FILES+=usr/libexec/dwatch/sched-queue +OLD_FILES+=usr/libexec/dwatch/sched-remain-cpu +OLD_FILES+=usr/libexec/dwatch/sched-sleep +OLD_FILES+=usr/libexec/dwatch/sched-surrender +OLD_FILES+=usr/libexec/dwatch/sched-tick +OLD_FILES+=usr/libexec/dwatch/sched-wakeup +OLD_FILES+=usr/libexec/dwatch/send +OLD_FILES+=usr/libexec/dwatch/sendmsg +OLD_FILES+=usr/libexec/dwatch/sendrecv +OLD_FILES+=usr/libexec/dwatch/sendto +OLD_FILES+=usr/libexec/dwatch/systop +OLD_FILES+=usr/libexec/dwatch/tcp +OLD_FILES+=usr/libexec/dwatch/tcp-accept +OLD_FILES+=usr/libexec/dwatch/tcp-accept-established +OLD_FILES+=usr/libexec/dwatch/tcp-accept-refused +OLD_FILES+=usr/libexec/dwatch/tcp-connect +OLD_FILES+=usr/libexec/dwatch/tcp-connect-established +OLD_FILES+=usr/libexec/dwatch/tcp-connect-refused +OLD_FILES+=usr/libexec/dwatch/tcp-connect-request +OLD_FILES+=usr/libexec/dwatch/tcp-established +OLD_FILES+=usr/libexec/dwatch/tcp-init +OLD_FILES+=usr/libexec/dwatch/tcp-io +OLD_FILES+=usr/libexec/dwatch/tcp-receive +OLD_FILES+=usr/libexec/dwatch/tcp-refused +OLD_FILES+=usr/libexec/dwatch/tcp-send +OLD_FILES+=usr/libexec/dwatch/tcp-state-change +OLD_FILES+=usr/libexec/dwatch/tcp-status +OLD_FILES+=usr/libexec/dwatch/udp +OLD_FILES+=usr/libexec/dwatch/udp-receive +OLD_FILES+=usr/libexec/dwatch/udp-send +OLD_FILES+=usr/libexec/dwatch/udplite +OLD_FILES+=usr/libexec/dwatch/udplite-receive +OLD_FILES+=usr/libexec/dwatch/udplite-send +OLD_FILES+=usr/libexec/dwatch/vop_create +OLD_FILES+=usr/libexec/dwatch/vop_lookup +OLD_FILES+=usr/libexec/dwatch/vop_mkdir +OLD_FILES+=usr/libexec/dwatch/vop_mknod +OLD_FILES+=usr/libexec/dwatch/vop_readdir +OLD_FILES+=usr/libexec/dwatch/vop_remove +OLD_FILES+=usr/libexec/dwatch/vop_rename +OLD_FILES+=usr/libexec/dwatch/vop_rmdir +OLD_FILES+=usr/libexec/dwatch/vop_symlink +OLD_FILES+=usr/libexec/dwatch/write OLD_FILES+=usr/sbin/dtrace +OLD_FILES+=usr/sbin/dwatch OLD_FILES+=usr/sbin/lockstat OLD_FILES+=usr/sbin/plockstat OLD_FILES+=usr/share/man/man1/dtrace.1.gz OLD_FILES+=usr/share/man/man1/dtruss.1.gz OLD_FILES+=usr/share/man/man1/lockstat.1.gz OLD_FILES+=usr/share/man/man1/plockstat.1.gz +OLD_FILES+=usr/share/dtrace/blocking OLD_FILES+=usr/share/dtrace/disklatency OLD_FILES+=usr/share/dtrace/disklatencycmd OLD_FILES+=usr/share/dtrace/hotopen +OLD_FILES+=usr/share/dtrace/nfsattrstats OLD_FILES+=usr/share/dtrace/nfsclienttime +OLD_FILES+=usr/share/dtrace/siftr OLD_FILES+=usr/share/dtrace/toolkit/execsnoop OLD_FILES+=usr/share/dtrace/toolkit/hotkernel OLD_FILES+=usr/share/dtrace/toolkit/hotuser OLD_FILES+=usr/share/dtrace/toolkit/opensnoop OLD_FILES+=usr/share/dtrace/toolkit/procsystime OLD_FILES+=usr/share/dtrace/tcpconn +OLD_FILES+=usr/share/dtrace/tcpdebug OLD_FILES+=usr/share/dtrace/tcpstate OLD_FILES+=usr/share/dtrace/tcptrack OLD_FILES+=usr/share/dtrace/udptrack OLD_FILES+=usr/share/man/man1/dtrace.1.gz OLD_DIRS+=usr/lib/dtrace OLD_DIRS+=usr/lib32/dtrace +OLD_DIRS+=usr/libexec/dwatch OLD_DIRS+=usr/share/dtrace/toolkit OLD_DIRS+=usr/share/dtrace .endif From owner-svn-src-all@freebsd.org Wed Aug 26 21:30:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B9E83BD5A4; Wed, 26 Aug 2020 21:30:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcJt03fP8z3SF7; Wed, 26 Aug 2020 21:30:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60DB0197D9; Wed, 26 Aug 2020 21:30:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QLU0W1082921; Wed, 26 Aug 2020 21:30:00 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QLU0m5082920; Wed, 26 Aug 2020 21:30:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008262130.07QLU0m5082920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Aug 2020 21:30: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: r364841 - in stable: 11/tools/build/mk 12/tools/build/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/tools/build/mk 12/tools/build/mk X-SVN-Commit-Revision: 364841 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 21:30:00 -0000 Author: jhb Date: Wed Aug 26 21:29:59 2020 New Revision: 364841 URL: https://svnweb.freebsd.org/changeset/base/364841 Log: MFC 359050: Add missing DTrace files for WITHOUT_CDDL=yes. Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 26 21:28:47 2020 (r364840) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 26 21:29:59 2020 (r364841) @@ -1179,13 +1179,18 @@ OLD_FILES+=usr/lib/dtrace/drti.o OLD_FILES+=usr/lib/dtrace/errno.d OLD_FILES+=usr/lib/dtrace/io.d OLD_FILES+=usr/lib/dtrace/ip.d +OLD_FILES+=usr/lib/dtrace/mbuf.d OLD_FILES+=usr/lib/dtrace/psinfo.d .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" OLD_FILES+=usr/lib/dtrace/regs_x86.d .endif +OLD_FILES+=usr/lib/dtrace/sctp.d +OLD_FILES+=usr/lib/dtrace/siftr.d OLD_FILES+=usr/lib/dtrace/signal.d +OLD_FILES+=usr/lib/dtrace/socket.d OLD_FILES+=usr/lib/dtrace/tcp.d OLD_FILES+=usr/lib/dtrace/udp.d +OLD_FILES+=usr/lib/dtrace/udplite.d OLD_FILES+=usr/lib/dtrace/unistd.d OLD_FILES+=usr/lib/libavl.a OLD_FILES+=usr/lib/libavl.so @@ -1233,29 +1238,120 @@ OLD_LIBS+=usr/lib32/libuutil.so.2 OLD_FILES+=usr/lib32/libuutil_p.a .endif OLD_LIBS+=lib/libdtrace.so.2 +OLD_FILES+=usr/libexec/dwatch/chmod +OLD_FILES+=usr/libexec/dwatch/errno +OLD_FILES+=usr/libexec/dwatch/fchmodat +OLD_FILES+=usr/libexec/dwatch/io +OLD_FILES+=usr/libexec/dwatch/io-done +OLD_FILES+=usr/libexec/dwatch/io-start +OLD_FILES+=usr/libexec/dwatch/ip +OLD_FILES+=usr/libexec/dwatch/ip-receive +OLD_FILES+=usr/libexec/dwatch/ip-send +OLD_FILES+=usr/libexec/dwatch/kill +OLD_FILES+=usr/libexec/dwatch/lchmod +OLD_FILES+=usr/libexec/dwatch/nanosleep +OLD_FILES+=usr/libexec/dwatch/open +OLD_FILES+=usr/libexec/dwatch/openat +OLD_FILES+=usr/libexec/dwatch/proc +OLD_FILES+=usr/libexec/dwatch/proc-create +OLD_FILES+=usr/libexec/dwatch/proc-exec +OLD_FILES+=usr/libexec/dwatch/proc-exec-failure +OLD_FILES+=usr/libexec/dwatch/proc-exec-success +OLD_FILES+=usr/libexec/dwatch/proc-exit +OLD_FILES+=usr/libexec/dwatch/proc-signal +OLD_FILES+=usr/libexec/dwatch/proc-signal-clear +OLD_FILES+=usr/libexec/dwatch/proc-signal-discard +OLD_FILES+=usr/libexec/dwatch/proc-signal-send +OLD_FILES+=usr/libexec/dwatch/proc-status +OLD_FILES+=usr/libexec/dwatch/read +OLD_FILES+=usr/libexec/dwatch/recv +OLD_FILES+=usr/libexec/dwatch/recvfrom +OLD_FILES+=usr/libexec/dwatch/recvmsg +OLD_FILES+=usr/libexec/dwatch/rw +OLD_FILES+=usr/libexec/dwatch/sched +OLD_FILES+=usr/libexec/dwatch/sched-change-pri +OLD_FILES+=usr/libexec/dwatch/sched-cpu +OLD_FILES+=usr/libexec/dwatch/sched-dequeue +OLD_FILES+=usr/libexec/dwatch/sched-enqueue +OLD_FILES+=usr/libexec/dwatch/sched-exec +OLD_FILES+=usr/libexec/dwatch/sched-lend-pri +OLD_FILES+=usr/libexec/dwatch/sched-load-change +OLD_FILES+=usr/libexec/dwatch/sched-off-cpu +OLD_FILES+=usr/libexec/dwatch/sched-on-cpu +OLD_FILES+=usr/libexec/dwatch/sched-preempt +OLD_FILES+=usr/libexec/dwatch/sched-pri +OLD_FILES+=usr/libexec/dwatch/sched-queue +OLD_FILES+=usr/libexec/dwatch/sched-remain-cpu +OLD_FILES+=usr/libexec/dwatch/sched-sleep +OLD_FILES+=usr/libexec/dwatch/sched-surrender +OLD_FILES+=usr/libexec/dwatch/sched-tick +OLD_FILES+=usr/libexec/dwatch/sched-wakeup +OLD_FILES+=usr/libexec/dwatch/send +OLD_FILES+=usr/libexec/dwatch/sendmsg +OLD_FILES+=usr/libexec/dwatch/sendrecv +OLD_FILES+=usr/libexec/dwatch/sendto +OLD_FILES+=usr/libexec/dwatch/systop +OLD_FILES+=usr/libexec/dwatch/tcp +OLD_FILES+=usr/libexec/dwatch/tcp-accept +OLD_FILES+=usr/libexec/dwatch/tcp-accept-established +OLD_FILES+=usr/libexec/dwatch/tcp-accept-refused +OLD_FILES+=usr/libexec/dwatch/tcp-connect +OLD_FILES+=usr/libexec/dwatch/tcp-connect-established +OLD_FILES+=usr/libexec/dwatch/tcp-connect-refused +OLD_FILES+=usr/libexec/dwatch/tcp-connect-request +OLD_FILES+=usr/libexec/dwatch/tcp-established +OLD_FILES+=usr/libexec/dwatch/tcp-init +OLD_FILES+=usr/libexec/dwatch/tcp-io +OLD_FILES+=usr/libexec/dwatch/tcp-receive +OLD_FILES+=usr/libexec/dwatch/tcp-refused +OLD_FILES+=usr/libexec/dwatch/tcp-send +OLD_FILES+=usr/libexec/dwatch/tcp-state-change +OLD_FILES+=usr/libexec/dwatch/tcp-status +OLD_FILES+=usr/libexec/dwatch/udp +OLD_FILES+=usr/libexec/dwatch/udp-receive +OLD_FILES+=usr/libexec/dwatch/udp-send +OLD_FILES+=usr/libexec/dwatch/udplite +OLD_FILES+=usr/libexec/dwatch/udplite-receive +OLD_FILES+=usr/libexec/dwatch/udplite-send +OLD_FILES+=usr/libexec/dwatch/vop_create +OLD_FILES+=usr/libexec/dwatch/vop_lookup +OLD_FILES+=usr/libexec/dwatch/vop_mkdir +OLD_FILES+=usr/libexec/dwatch/vop_mknod +OLD_FILES+=usr/libexec/dwatch/vop_readdir +OLD_FILES+=usr/libexec/dwatch/vop_remove +OLD_FILES+=usr/libexec/dwatch/vop_rename +OLD_FILES+=usr/libexec/dwatch/vop_rmdir +OLD_FILES+=usr/libexec/dwatch/vop_symlink +OLD_FILES+=usr/libexec/dwatch/write OLD_FILES+=usr/sbin/dtrace +OLD_FILES+=usr/sbin/dwatch OLD_FILES+=usr/sbin/lockstat OLD_FILES+=usr/sbin/plockstat OLD_FILES+=usr/share/man/man1/dtrace.1.gz OLD_FILES+=usr/share/man/man1/dtruss.1.gz OLD_FILES+=usr/share/man/man1/lockstat.1.gz OLD_FILES+=usr/share/man/man1/plockstat.1.gz +OLD_FILES+=usr/share/dtrace/blocking OLD_FILES+=usr/share/dtrace/disklatency OLD_FILES+=usr/share/dtrace/disklatencycmd OLD_FILES+=usr/share/dtrace/hotopen +OLD_FILES+=usr/share/dtrace/nfsattrstats OLD_FILES+=usr/share/dtrace/nfsclienttime +OLD_FILES+=usr/share/dtrace/siftr OLD_FILES+=usr/share/dtrace/toolkit/execsnoop OLD_FILES+=usr/share/dtrace/toolkit/hotkernel OLD_FILES+=usr/share/dtrace/toolkit/hotuser OLD_FILES+=usr/share/dtrace/toolkit/opensnoop OLD_FILES+=usr/share/dtrace/toolkit/procsystime OLD_FILES+=usr/share/dtrace/tcpconn +OLD_FILES+=usr/share/dtrace/tcpdebug OLD_FILES+=usr/share/dtrace/tcpstate OLD_FILES+=usr/share/dtrace/tcptrack OLD_FILES+=usr/share/dtrace/udptrack OLD_FILES+=usr/share/man/man1/dtrace.1.gz OLD_DIRS+=usr/lib/dtrace OLD_DIRS+=usr/lib32/dtrace +OLD_DIRS+=usr/libexec/dwatch OLD_DIRS+=usr/share/dtrace/toolkit OLD_DIRS+=usr/share/dtrace .endif From owner-svn-src-all@freebsd.org Wed Aug 26 21:35:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28B0B3BCB7E; Wed, 26 Aug 2020 21:35:29 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcK0J73Xbz3SZZ; Wed, 26 Aug 2020 21:35:28 +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 D6C6D198A7; Wed, 26 Aug 2020 21:35:28 +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 07QLZSaa089206; Wed, 26 Aug 2020 21:35:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QLZSvY089205; Wed, 26 Aug 2020 21:35:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008262135.07QLZSvY089205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Aug 2020 21:35:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364842 - in stable: 11/sys/opencrypto 12/sys/opencrypto X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/opencrypto 12/sys/opencrypto X-SVN-Commit-Revision: 364842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 21:35:29 -0000 Author: jhb Date: Wed Aug 26 21:35:28 2020 New Revision: 364842 URL: https://svnweb.freebsd.org/changeset/base/364842 Log: MFC 361393: Correct the minimum key length for Camellia to 16 bytes (128 bits). Modified: stable/12/sys/opencrypto/cryptodev.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/opencrypto/cryptodev.h Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/opencrypto/cryptodev.h ============================================================================== --- stable/12/sys/opencrypto/cryptodev.h Wed Aug 26 21:29:59 2020 (r364841) +++ stable/12/sys/opencrypto/cryptodev.h Wed Aug 26 21:35:28 2020 (r364842) @@ -158,7 +158,7 @@ #define AES_XTS_MAX_KEY (2 * AES_MAX_KEY) #define ARC4_MIN_KEY 1 #define ARC4_MAX_KEY 32 -#define CAMELLIA_MIN_KEY 8 +#define CAMELLIA_MIN_KEY 16 #define CAMELLIA_MAX_KEY 32 /* Maximum hash algorithm result length */ From owner-svn-src-all@freebsd.org Wed Aug 26 21:35:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5706C3BD8CA; Wed, 26 Aug 2020 21:35:29 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcK0K1k68z3SR1; Wed, 26 Aug 2020 21:35:29 +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 183C1195E7; Wed, 26 Aug 2020 21:35:29 +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 07QLZSng089213; Wed, 26 Aug 2020 21:35:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QLZSgH089212; Wed, 26 Aug 2020 21:35:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008262135.07QLZSgH089212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Aug 2020 21:35: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: r364842 - in stable: 11/sys/opencrypto 12/sys/opencrypto X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/opencrypto 12/sys/opencrypto X-SVN-Commit-Revision: 364842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 21:35:29 -0000 Author: jhb Date: Wed Aug 26 21:35:28 2020 New Revision: 364842 URL: https://svnweb.freebsd.org/changeset/base/364842 Log: MFC 361393: Correct the minimum key length for Camellia to 16 bytes (128 bits). Modified: stable/11/sys/opencrypto/cryptodev.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/opencrypto/cryptodev.h Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/opencrypto/cryptodev.h ============================================================================== --- stable/11/sys/opencrypto/cryptodev.h Wed Aug 26 21:29:59 2020 (r364841) +++ stable/11/sys/opencrypto/cryptodev.h Wed Aug 26 21:35:28 2020 (r364842) @@ -148,7 +148,7 @@ #define AES_XTS_MAX_KEY (2 * AES_MAX_KEY) #define ARC4_MIN_KEY 1 #define ARC4_MAX_KEY 32 -#define CAMELLIA_MIN_KEY 8 +#define CAMELLIA_MIN_KEY 16 #define CAMELLIA_MAX_KEY 32 /* Maximum hash algorithm result length */ From owner-svn-src-all@freebsd.org Wed Aug 26 21:41:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 27BC43BDC2D; Wed, 26 Aug 2020 21:41:15 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcK6z0CqVz3TCM; Wed, 26 Aug 2020 21:41:15 +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 DEFCE199E1; Wed, 26 Aug 2020 21:41:14 +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 07QLfEIq090157; Wed, 26 Aug 2020 21:41:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QLfEsr090156; Wed, 26 Aug 2020 21:41:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008262141.07QLfEsr090156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Aug 2020 21:41:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364843 - in stable: 11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 364843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 21:41:15 -0000 Author: jhb Date: Wed Aug 26 21:41:14 2020 New Revision: 364843 URL: https://svnweb.freebsd.org/changeset/base/364843 Log: MFC 361220: Correct the order of arguments to copyin() for Q_SETQUOTA. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Aug 26 21:35:28 2020 (r364842) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Aug 26 21:41:14 2020 (r364843) @@ -268,7 +268,7 @@ zfs_quotactl(vfs_t *vfsp, int cmds, uid_t id, void *ar vfs_unbusy(vfsp); break; case Q_SETQUOTA: - error = copyin(&dqblk, arg, sizeof(dqblk)); + error = copyin(arg, &dqblk, sizeof(dqblk)); if (error == 0) error = zfs_set_userquota(zfsvfs, quota_type, "", id, dbtob(dqblk.dqb_bhardlimit)); From owner-svn-src-all@freebsd.org Wed Aug 26 21:41:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7601E3BDA1D; Wed, 26 Aug 2020 21:41:15 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcK6z2Xj2z3T6V; Wed, 26 Aug 2020 21:41:15 +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 3A9A6198B2; Wed, 26 Aug 2020 21:41:15 +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 07QLfFCM090163; Wed, 26 Aug 2020 21:41:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QLfFT6090162; Wed, 26 Aug 2020 21:41:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008262141.07QLfFT6090162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Aug 2020 21:41: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: r364843 - in stable: 11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 364843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 21:41:15 -0000 Author: jhb Date: Wed Aug 26 21:41:14 2020 New Revision: 364843 URL: https://svnweb.freebsd.org/changeset/base/364843 Log: MFC 361220: Correct the order of arguments to copyin() for Q_SETQUOTA. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Aug 26 21:35:28 2020 (r364842) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Aug 26 21:41:14 2020 (r364843) @@ -264,7 +264,7 @@ zfs_quotactl(vfs_t *vfsp, int cmds, uid_t id, void *ar vfs_unbusy(vfsp); break; case Q_SETQUOTA: - error = copyin(&dqblk, arg, sizeof(dqblk)); + error = copyin(arg, &dqblk, sizeof(dqblk)); if (error == 0) error = zfs_set_userquota(zfsvfs, quota_type, "", id, dbtob(dqblk.dqb_bhardlimit)); From owner-svn-src-all@freebsd.org Wed Aug 26 21:49:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ADEC13BDDC5; Wed, 26 Aug 2020 21:49:43 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcKJl4Brcz3TSq; Wed, 26 Aug 2020 21:49:43 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 73C0819A9B; Wed, 26 Aug 2020 21:49:43 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07QLnhj6097230; Wed, 26 Aug 2020 21:49:43 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QLnhMI097229; Wed, 26 Aug 2020 21:49:43 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202008262149.07QLnhMI097229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 26 Aug 2020 21:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364844 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 21:49:43 -0000 Author: rmacklem Date: Wed Aug 26 21:49:43 2020 New Revision: 364844 URL: https://svnweb.freebsd.org/changeset/base/364844 Log: Fix a "v_seqc_users == 0 not met" panic when VFS_STATFS() fails during mount. r363210 introduced v_seqc_users to the vnodes. This change requires a vn_seqc_write_end() to match the vn_seqc_write_begin() in vfs_cache_root_clear(). mjg@ provided this patch which seems to fix the panic. Tested for an NFS mount where the VFS_STATFS() call will fail. Submitted by: mjg Reviewed by: mjg Differential Revision: https://reviews.freebsd.org/D26160 Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Wed Aug 26 21:41:14 2020 (r364843) +++ head/sys/kern/vfs_mount.c Wed Aug 26 21:49:43 2020 (r364844) @@ -969,11 +969,14 @@ vfs_domount_first( if ((error = VFS_MOUNT(mp)) != 0 || (error1 = VFS_STATFS(mp, &mp->mnt_stat)) != 0 || (error1 = VFS_ROOT(mp, LK_EXCLUSIVE, &newdp)) != 0) { + rootvp = NULL; if (error1 != 0) { error = error1; rootvp = vfs_cache_root_clear(mp); - if (rootvp != NULL) + if (rootvp != NULL) { + vhold(rootvp); vrele(rootvp); + } if ((error1 = VFS_UNMOUNT(mp, 0)) != 0) printf("VFS_UNMOUNT returned %d\n", error1); } @@ -983,6 +986,10 @@ vfs_domount_first( VI_LOCK(vp); vp->v_iflag &= ~VI_MOUNT; VI_UNLOCK(vp); + if (rootvp != NULL) { + vn_seqc_write_end(rootvp); + vdrop(rootvp); + } vn_seqc_write_end(vp); vrele(vp); return (error); From owner-svn-src-all@freebsd.org Wed Aug 26 22:11:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 736993BE873; Wed, 26 Aug 2020 22:11:23 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcKnl2LzBz3W0k; Wed, 26 Aug 2020 22:11:23 +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 34AC21A153; Wed, 26 Aug 2020 22:11:23 +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 07QMBN1k013509; Wed, 26 Aug 2020 22:11:23 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QMBNq4013508; Wed, 26 Aug 2020 22:11:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008262211.07QMBNq4013508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Aug 2020 22:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364845 - stable/12/sys/dev/cxgbe/crypto X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe/crypto X-SVN-Commit-Revision: 364845 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 22:11:23 -0000 Author: jhb Date: Wed Aug 26 22:11:22 2020 New Revision: 364845 URL: https://svnweb.freebsd.org/changeset/base/364845 Log: MFC 361776: Explicitly zero AES key schedules on the stack. Modified: stable/12/sys/dev/cxgbe/crypto/t4_keyctx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/crypto/t4_keyctx.c ============================================================================== --- stable/12/sys/dev/cxgbe/crypto/t4_keyctx.c Wed Aug 26 21:49:43 2020 (r364844) +++ stable/12/sys/dev/cxgbe/crypto/t4_keyctx.c Wed Aug 26 22:11:22 2020 (r364845) @@ -75,6 +75,7 @@ t4_init_gmac_hash(const char *key, int klen, char *gha rounds = rijndaelKeySetupEnc(keysched, key, klen); rijndaelEncrypt(keysched, rounds, zeroes, ghash); + explicit_bzero(keysched, sizeof(keysched)); } /* Copy out the partial hash state from a software hash implementation. */ @@ -195,4 +196,5 @@ t4_aes_getdeckey(void *dec_key, const void *enc_key, u break; } MPASS(dkey == dec_key); + explicit_bzero(ek, sizeof(ek)); } From owner-svn-src-all@freebsd.org Wed Aug 26 22:27:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C73403BF40B; Wed, 26 Aug 2020 22:27:51 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.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 4BcL8k6lpdz3Wsp; Wed, 26 Aug 2020 22:27:50 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.1.2] (pool-74-110-137-7.rcmdva.fios.verizon.net [74.110.137.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id 9D6C4270002B; Wed, 26 Aug 2020 18:27:49 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu 9D6C4270002B DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1598480869; bh=I9ArfqY757mNFg0ZmLU4qoE/Rt+ME+PxAg5RhrxU7Is=; h=Subject:To:From:Date:From; b=CUOfc9IVntZRHKgyHRSaE/dTCPiuLNDKBclbxaMY+auiZHPebWE8M8iYnhV56Ey+o pYzDh68uyjI12nvJqTCBGcM7GfYh+Ivqheo/p5Avq37/jEsvsyxYRVHktcjTG9xO7U NhPfnaC0uesFYk81gTqkDs03FXntk37fKE758QFkbCuImklbKik3P0/bZcl0PcN5Lt yrNJFA7Gwq5i486CvB3q45dk+zaR5jOi1blJnM863JYyDp0ycVJ4eMXNhscte6dvWC qFJBe2+yXBXSnQjfpIb7R+EHs7BhJZrQCVGpdldiagSKOPJHy1laYKB0yaYKaY/KIm 3oDYoLuJqMwqQ== Subject: Re: svn commit: r364736 - in vendor-sys/openzfs: . dist dist/cmd dist/cmd/arc_summary dist/cmd/arcstat dist/cmd/dbufstat dist/cmd/fsck_zfs dist/cmd/mount_zfs dist/cmd/raidz_test dist/cmd/vdev_id dist/c... To: Matt Macy , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org References: <202008242248.07OMmLDF010834@repo.freebsd.org> From: Andrew Gallatin Message-ID: <0aa19832-c670-ff5b-bf1f-8ae152c9a79b@cs.duke.edu> Date: Wed, 26 Aug 2020 18:27:48 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <202008242248.07OMmLDF010834@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BcL8k6lpdz3Wsp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cs.duke.edu header.s=mail0816 header.b=CUOfc9IV; dmarc=pass (policy=none) header.from=cs.duke.edu; spf=pass (mx1.freebsd.org: domain of gallatin@cs.duke.edu designates 152.3.140.1 as permitted sender) smtp.mailfrom=gallatin@cs.duke.edu X-Spamd-Result: default: False [-4.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[cs.duke.edu:s=mail0816]; FREEFALL_USER(0.00)[gallatin]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:152.3.140.0/23]; NEURAL_HAM_LONG(-1.00)[-0.998]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_LOW(-1.00)[duke.edu:dkim]; RCVD_IN_DNSWL_LOW(-0.10)[152.3.140.1:from]; NEURAL_HAM_MEDIUM(-0.96)[-0.956]; DKIM_TRACE(0.00)[cs.duke.edu:+]; DMARC_POLICY_ALLOW(-0.50)[cs.duke.edu,none]; NEURAL_HAM_SHORT(-0.45)[-0.445]; RECEIVED_SPAMHAUS_PBL(0.00)[74.110.137.7:received]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13371, ipnet:152.3.128.0/17, country:US]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-vendor]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 22:27:51 -0000 On 2020-08-24 18:48, Matt Macy wrote: > Log: > Vendor import of openzfs master @ 184df27eef0abdc7ab2105b21257f753834b936b > > Sponsored by: iX Systems, Inc. > Just wanted to say "thank you" to you and iX for this. I'm glad this has landed! Drew From owner-svn-src-all@freebsd.org Wed Aug 26 22:36:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98FC63BF53F; Wed, 26 Aug 2020 22:36:09 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcLLK3Vwkz3XP5; Wed, 26 Aug 2020 22:36:09 +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 5AEBB1A50D; Wed, 26 Aug 2020 22:36:09 +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 07QMa9VX031066; Wed, 26 Aug 2020 22:36:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QMa9ZR031065; Wed, 26 Aug 2020 22:36:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008262236.07QMa9ZR031065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Aug 2020 22:36:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364846 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 364846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 22:36:09 -0000 Author: jhb Date: Wed Aug 26 22:36:08 2020 New Revision: 364846 URL: https://svnweb.freebsd.org/changeset/base/364846 Log: Name the on-stack union of compat thunks. C does not permit an anonymous union at a top-level scope. Pointy hat to: jhb Modified: head/sys/opencrypto/cryptodev.c Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Wed Aug 26 22:11:22 2020 (r364845) +++ head/sys/opencrypto/cryptodev.c Wed Aug 26 22:36:08 2020 (r364846) @@ -440,7 +440,7 @@ cryptof_ioctl( struct crypt_aead aeadc; struct crypt_kop kopc; #endif - }; + } thunk; #ifdef COMPAT_FREEBSD32 u_long cmd32; void *data32; @@ -452,29 +452,30 @@ cryptof_ioctl( cmd32 = cmd; data32 = data; cmd = CIOCGSESSION; - data = &sopc; - session_op_from_32((struct session_op32 *)data32, &sopc); + data = &thunk.sopc; + session_op_from_32((struct session_op32 *)data32, &thunk.sopc); break; case CIOCGSESSION232: cmd32 = cmd; data32 = data; cmd = CIOCGSESSION2; - data = &sopc; - session2_op_from_32((struct session2_op32 *)data32, &sopc); + data = &thunk.sopc; + session2_op_from_32((struct session2_op32 *)data32, + &thunk.sopc); break; case CIOCCRYPT32: cmd32 = cmd; data32 = data; cmd = CIOCCRYPT; - data = &copc; - crypt_op_from_32((struct crypt_op32 *)data32, &copc); + data = &thunk.copc; + crypt_op_from_32((struct crypt_op32 *)data32, &thunk.copc); break; case CIOCCRYPTAEAD32: cmd32 = cmd; data32 = data; cmd = CIOCCRYPTAEAD; - data = &aeadc; - crypt_aead_from_32((struct crypt_aead32 *)data32, &aeadc); + data = &thunk.aeadc; + crypt_aead_from_32((struct crypt_aead32 *)data32, &thunk.aeadc); break; case CIOCKEY32: case CIOCKEY232: @@ -484,8 +485,8 @@ cryptof_ioctl( cmd = CIOCKEY; else cmd = CIOCKEY2; - data = &kopc; - crypt_kop_from_32((struct crypt_kop32 *)data32, &kopc); + data = &thunk.kopc; + crypt_kop_from_32((struct crypt_kop32 *)data32, &thunk.kopc); break; } #endif @@ -494,8 +495,8 @@ cryptof_ioctl( case CIOCGSESSION: case CIOCGSESSION2: if (cmd == CIOCGSESSION) { - session2_op_from_op(data, &sopc); - sop = &sopc; + session2_op_from_op(data, &thunk.sopc); + sop = &thunk.sopc; } else sop = (struct session2_op *)data; From owner-svn-src-all@freebsd.org Wed Aug 26 22:41:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F11BD3BF895; Wed, 26 Aug 2020 22:41:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcLSz69GCz3XkJ; Wed, 26 Aug 2020 22:41:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8681:1cb0:9808:df28:c1f9:5a05]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 5187224ED4; Wed, 26 Aug 2020 22:41:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r364846 - head/sys/opencrypto From: John Baldwin To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202008262236.07QMa9ZR031065@repo.freebsd.org> Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Wed, 26 Aug 2020 15:41:53 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <202008262236.07QMa9ZR031065@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.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 22:41:56 -0000 On 8/26/20 3:36 PM, John Baldwin wrote: > Author: jhb > Date: Wed Aug 26 22:36:08 2020 > New Revision: 364846 > URL: https://svnweb.freebsd.org/changeset/base/364846 > > Log: > Name the on-stack union of compat thunks. > > C does not permit an anonymous union at a top-level scope. > > Pointy hat to: jhb I thought I had compiled and tested the previous version prior to commit. While the checkout I had been reset to the reworked version with the union, the cryptodev.ko in the build dir was from two days ago so I tested a pre-union version today apparently. :-/ -- John Baldwin From owner-svn-src-all@freebsd.org Wed Aug 26 22:52:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E0B7C3BFC30; Wed, 26 Aug 2020 22:52:08 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcLhm5hq4z3Y8y; Wed, 26 Aug 2020 22:52:08 +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 8E94C1A6AB; Wed, 26 Aug 2020 22:52:08 +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 07QMq8wR042192; Wed, 26 Aug 2020 22:52:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QMq8sZ042191; Wed, 26 Aug 2020 22:52:08 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008262252.07QMq8sZ042191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Aug 2020 22: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: r364847 - in stable: 11/lib/libc/sys 12/lib/libc/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/lib/libc/sys 12/lib/libc/sys X-SVN-Commit-Revision: 364847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 22:52:08 -0000 Author: jhb Date: Wed Aug 26 22:52:07 2020 New Revision: 364847 URL: https://svnweb.freebsd.org/changeset/base/364847 Log: MFC 361767: Document SO_NO_OFFLOADS and SO_NO_DDP. Modified: stable/11/lib/libc/sys/getsockopt.2 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/lib/libc/sys/getsockopt.2 Directory Properties: stable/12/ (props changed) Modified: stable/11/lib/libc/sys/getsockopt.2 ============================================================================== --- stable/11/lib/libc/sys/getsockopt.2 Wed Aug 26 22:36:08 2020 (r364846) +++ stable/11/lib/libc/sys/getsockopt.2 Wed Aug 26 22:52:07 2020 (r364847) @@ -28,7 +28,7 @@ .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd September 11, 2019 +.Dd June 03, 2020 .Dt GETSOCKOPT 2 .Os .Sh NAME @@ -188,6 +188,8 @@ The following options are recognized in .It Dv SO_LISTENINCQLEN Ta "get incomplete queue length of the socket (get only)" .It Dv SO_USER_COOKIE Ta "set the 'so_user_cookie' value for the socket (uint32_t, set only)" .It Dv SO_TS_CLOCK Ta "set specific format of timestamp returned by SO_TIMESTAMP" +.It Dv SO_NO_OFFLOAD Ta "disables protocol offloads" +.It Dv SO_NO_DDP Ta "disables direct data placement offload" .El .Pp .Dv SO_DEBUG @@ -500,7 +502,6 @@ the error status. It may be used to check for asynchronous errors on connected datagram sockets or for other asynchronous errors. .Pp -Finally, .Dv SO_LABEL returns the MAC label of the socket. .Dv SO_PEERLABEL @@ -509,6 +510,7 @@ Note that your kernel must be compiled with MAC suppor See .Xr mac 3 for more information. +.Pp .Dv SO_LISTENQLIMIT returns the maximal number of queued connections, as set by .Xr listen 2 . @@ -516,6 +518,17 @@ returns the maximal number of queued connections, as s returns the number of unaccepted complete connections. .Dv SO_LISTENINCQLEN returns the number of unaccepted incomplete connections. +.Pp +.Dv SO_NO_OFFLOAD +disables support for protocol offloads. +At present, this prevents TCP sockets from using TCP offload engines. +.Dv SO_NO_DDP +disables support for a specific TCP offload known as direct data +placement (DDP). +DDP is an offload supported by Chelsio network adapters that permits +reassembled TCP data streams to be received via zero-copy in +user-supplied buffers using +.Xr aio_read 2 . .Sh RETURN VALUES .Rv -std .Sh ERRORS From owner-svn-src-all@freebsd.org Wed Aug 26 22:52:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9646B3BFCC1; Wed, 26 Aug 2020 22:52:08 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcLhm3Q3nz3YYX; Wed, 26 Aug 2020 22:52:08 +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 59CCE1A81C; Wed, 26 Aug 2020 22:52:08 +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 07QMq8Ev042186; Wed, 26 Aug 2020 22:52:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QMq8BK042185; Wed, 26 Aug 2020 22:52:08 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008262252.07QMq8BK042185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 26 Aug 2020 22:52:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364847 - in stable: 11/lib/libc/sys 12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/lib/libc/sys 12/lib/libc/sys X-SVN-Commit-Revision: 364847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 22:52:08 -0000 Author: jhb Date: Wed Aug 26 22:52:07 2020 New Revision: 364847 URL: https://svnweb.freebsd.org/changeset/base/364847 Log: MFC 361767: Document SO_NO_OFFLOADS and SO_NO_DDP. Modified: stable/12/lib/libc/sys/getsockopt.2 Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libc/sys/getsockopt.2 Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libc/sys/getsockopt.2 ============================================================================== --- stable/12/lib/libc/sys/getsockopt.2 Wed Aug 26 22:36:08 2020 (r364846) +++ stable/12/lib/libc/sys/getsockopt.2 Wed Aug 26 22:52:07 2020 (r364847) @@ -28,7 +28,7 @@ .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd September 11, 2019 +.Dd June 03, 2020 .Dt GETSOCKOPT 2 .Os .Sh NAME @@ -191,6 +191,8 @@ The following options are recognized in .It Dv SO_USER_COOKIE Ta "set the 'so_user_cookie' value for the socket (uint32_t, set only)" .It Dv SO_TS_CLOCK Ta "set specific format of timestamp returned by SO_TIMESTAMP" .It Dv SO_MAX_PACING_RATE Ta "set the maximum transmit rate in bytes per second for the socket" +.It Dv SO_NO_OFFLOAD Ta "disables protocol offloads" +.It Dv SO_NO_DDP Ta "disables direct data placement offload" .El .Pp .Dv SO_DEBUG @@ -512,7 +514,6 @@ the error status. It may be used to check for asynchronous errors on connected datagram sockets or for other asynchronous errors. .Pp -Finally, .Dv SO_LABEL returns the MAC label of the socket. .Dv SO_PEERLABEL @@ -521,6 +522,7 @@ Note that your kernel must be compiled with MAC suppor See .Xr mac 3 for more information. +.Pp .Dv SO_LISTENQLIMIT returns the maximal number of queued connections, as set by .Xr listen 2 . @@ -532,6 +534,17 @@ returns the number of unaccepted incomplete connection .Dv SO_MAX_PACING_RATE instruct the socket and underlying network adapter layers to limit the transfer rate to the given unsigned 32-bit value in bytes per second. +.Pp +.Dv SO_NO_OFFLOAD +disables support for protocol offloads. +At present, this prevents TCP sockets from using TCP offload engines. +.Dv SO_NO_DDP +disables support for a specific TCP offload known as direct data +placement (DDP). +DDP is an offload supported by Chelsio network adapters that permits +reassembled TCP data streams to be received via zero-copy in +user-supplied buffers using +.Xr aio_read 2 . .Sh RETURN VALUES .Rv -std .Sh ERRORS From owner-svn-src-all@freebsd.org Wed Aug 26 23:21:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B8033C08E0; Wed, 26 Aug 2020 23:21:28 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcMLb6tTYz3Zgn; Wed, 26 Aug 2020 23:21:27 +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 CED9C1AD87; Wed, 26 Aug 2020 23:21:27 +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 07QNLR5m056562; Wed, 26 Aug 2020 23:21:27 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QNLQMa056553; Wed, 26 Aug 2020 23:21:26 GMT (envelope-from np@FreeBSD.org) Message-Id: <202008262321.07QNLQMa056553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 26 Aug 2020 23:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364848 - in stable/12/sys/dev/cxgbe: . common X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/12/sys/dev/cxgbe: . common X-SVN-Commit-Revision: 364848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 23:21:28 -0000 Author: np Date: Wed Aug 26 23:21:26 2020 New Revision: 364848 URL: https://svnweb.freebsd.org/changeset/base/364848 Log: MFC r340023 (by jhb@), r362905, r362938, and r363167. r340023: Check cannot_use_txpkts() rather than needs_tso() in add_to_txpkts(). Currently this is a no-op, but will matter in the future when cannot_use_txpkts() starts checking other conditions than just needs_tso(). r362905: cxgbe(4): changes in the Tx path to help increase tx coalescing. - Ask the firmware for the number of frames that can be stuffed in one work request. - Modify mp_ring to increase the likelihood of tx coalescing when there are just one or two threads that are doing most of the tx. Add teeth to the abdication mechanism by pushing the consumer lock into mp_ring. This reduces the likelihood that a consumer will get stuck with all the work even though it is above its budget. - Add support for coalesced tx WR to the VF driver. This, with the changes above, results in a 7x improvement in the tx pps of the VF driver for some common cases. The firmware vets the L2 headers submitted by the VF driver and it's a big win if the checks are performed for a batch of packets and not each one individually. r362938: cxgbe(4): Fix a bug (introduced in r362905) where some tx traffic wasn't being reported to BPF. r363167: cxgbev(4): Compare at most 16 bytes of the Ethernet header when trying to coalesce tx work requests. Note that Coverity will still treat this as an out-of-bounds access. We do want to compare 16B starting from ethmacdst but cmp_l2hdr was was going beyond that by 2B. cmp_l2hdr was introduced in r362905. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/common/common.h stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/cxgbe/t4_mp_ring.c stable/12/sys/dev/cxgbe/t4_mp_ring.h stable/12/sys/dev/cxgbe/t4_sge.c stable/12/sys/dev/cxgbe/t4_vf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Wed Aug 26 22:52:07 2020 (r364847) +++ stable/12/sys/dev/cxgbe/adapter.h Wed Aug 26 23:21:26 2020 (r364848) @@ -546,6 +546,23 @@ struct sge_fl { struct mp_ring; +struct txpkts { + uint8_t wr_type; /* type 0 or type 1 */ + uint8_t npkt; /* # of packets in this work request */ + uint8_t len16; /* # of 16B pieces used by this work request */ + uint8_t score; /* 1-10. coalescing attempted if score > 3 */ + uint8_t max_npkt; /* maximum number of packets allowed */ + uint16_t plen; /* total payload (sum of all packets) */ + + /* straight from fw_eth_tx_pkts_vm_wr. */ + __u8 ethmacdst[6]; + __u8 ethmacsrc[6]; + __be16 ethtype; + __be16 vlantci; + + struct mbuf *mb[15]; +}; + /* txq: SGE egress queue + what's needed for Ethernet NIC */ struct sge_txq { struct sge_eq eq; /* MUST be first */ @@ -556,6 +573,7 @@ struct sge_txq { struct sglist *gl; __be32 cpl_ctrl0; /* for convenience */ int tc_idx; /* traffic class */ + struct txpkts txp; struct task tx_reclaim_task; /* stats for common events first */ Modified: stable/12/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/12/sys/dev/cxgbe/common/common.h Wed Aug 26 22:52:07 2020 (r364847) +++ stable/12/sys/dev/cxgbe/common/common.h Wed Aug 26 23:21:26 2020 (r364848) @@ -393,6 +393,7 @@ struct adapter_params { bool ulptx_memwrite_dsgl; /* use of T5 DSGL allowed */ bool fr_nsmr_tpte_wr_support; /* FW support for FR_NSMR_TPTE_WR */ bool viid_smt_extn_support; /* FW returns vin, vfvld & smt index? */ + unsigned int max_pkts_per_eth_tx_pkts_wr; }; #define CHELSIO_T4 0x4 Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Wed Aug 26 22:52:07 2020 (r364847) +++ stable/12/sys/dev/cxgbe/t4_main.c Wed Aug 26 23:21:26 2020 (r364848) @@ -2107,7 +2107,7 @@ cxgbe_transmit(struct ifnet *ifp, struct mbuf *m) vi->rsrv_noflowq); items[0] = m; - rc = mp_ring_enqueue(txq->r, items, 1, 4096); + rc = mp_ring_enqueue(txq->r, items, 1, 256); if (__predict_false(rc != 0)) m_freem(m); @@ -2128,7 +2128,7 @@ cxgbe_qflush(struct ifnet *ifp) txq->eq.flags |= EQ_QFLUSH; TXQ_UNLOCK(txq); while (!mp_ring_is_idle(txq->r)) { - mp_ring_check_drainage(txq->r, 0); + mp_ring_check_drainage(txq->r, 4096); pause("qflush", 1); } TXQ_LOCK(txq); @@ -2177,7 +2177,7 @@ vi_get_counter(struct ifnet *ifp, ift_counter c) struct sge_txq *txq; for_each_txq(vi, i, txq) - drops += counter_u64_fetch(txq->r->drops); + drops += counter_u64_fetch(txq->r->dropped); } return (drops); @@ -2242,7 +2242,7 @@ cxgbe_get_counter(struct ifnet *ifp, ift_counter c) struct sge_txq *txq; for_each_txq(vi, i, txq) - drops += counter_u64_fetch(txq->r->drops); + drops += counter_u64_fetch(txq->r->dropped); } return (drops); @@ -4276,6 +4276,13 @@ get_params__post_init(struct adapter *sc) else sc->params.fr_nsmr_tpte_wr_support = false; + param[0] = FW_PARAM_PFVF(MAX_PKTS_PER_ETH_TX_PKTS_WR); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, param, val); + if (rc == 0) + sc->params.max_pkts_per_eth_tx_pkts_wr = val[0]; + else + sc->params.max_pkts_per_eth_tx_pkts_wr = 15; + /* get capabilites */ bzero(&caps, sizeof(caps)); caps.op_to_write = htobe32(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) | @@ -5687,7 +5694,7 @@ quiesce_txq(struct adapter *sc, struct sge_txq *txq) /* Wait for the mp_ring to empty. */ while (!mp_ring_is_idle(txq->r)) { - mp_ring_check_drainage(txq->r, 0); + mp_ring_check_drainage(txq->r, 4096); pause("rquiesce", 1); } Modified: stable/12/sys/dev/cxgbe/t4_mp_ring.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_mp_ring.c Wed Aug 26 22:52:07 2020 (r364847) +++ stable/12/sys/dev/cxgbe/t4_mp_ring.c Wed Aug 26 23:21:26 2020 (r364848) @@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include "t4_mp_ring.h" @@ -43,6 +45,23 @@ __FBSDID("$FreeBSD$"); #define atomic_cmpset_rel_64 atomic_cmpset_64 #endif +/* + * mp_ring handles multiple threads (producers) enqueueing data to a tx queue. + * The thread that is writing the hardware descriptors is the consumer and it + * runs with the consumer lock held. A producer becomes the consumer if there + * isn't one already. The consumer runs with the flags sets to BUSY and + * consumes everything (IDLE or COALESCING) or gets STALLED. If it is running + * over its budget it sets flags to TOO_BUSY. A producer that observes a + * TOO_BUSY consumer will become the new consumer by setting flags to + * TAKING_OVER. The original consumer stops and sets the flags back to BUSY for + * the new consumer. + * + * COALESCING is the same as IDLE except there are items being held in the hope + * that they can be coalesced with items that follow. The driver must arrange + * for a tx update or some other event that transmits all the held items in a + * timely manner if nothing else is enqueued. + */ + union ring_state { struct { uint16_t pidx_head; @@ -54,13 +73,21 @@ union ring_state { }; enum { - IDLE = 0, /* consumer ran to completion, nothing more to do. */ + IDLE = 0, /* tx is all caught up, nothing to do. */ + COALESCING, /* IDLE, but tx frames are being held for coalescing */ BUSY, /* consumer is running already, or will be shortly. */ + TOO_BUSY, /* consumer is running and is beyond its budget */ + TAKING_OVER, /* new consumer taking over from a TOO_BUSY consumer */ STALLED, /* consumer stopped due to lack of resources. */ - ABDICATED, /* consumer stopped even though there was work to be - done because it wants another thread to take over. */ }; +enum { + C_FAST = 0, + C_2, + C_3, + C_TAKEOVER, +}; + static inline uint16_t space_available(struct mp_ring *r, union ring_state s) { @@ -83,93 +110,104 @@ increment_idx(struct mp_ring *r, uint16_t idx, uint16_ return (x > n ? idx + n : n - x); } -/* Consumer is about to update the ring's state to s */ -static inline uint16_t -state_to_flags(union ring_state s, int abdicate) -{ - - if (s.cidx == s.pidx_tail) - return (IDLE); - else if (abdicate && s.pidx_tail != s.pidx_head) - return (ABDICATED); - - return (BUSY); -} - /* - * Caller passes in a state, with a guarantee that there is work to do and that - * all items up to the pidx_tail in the state are visible. + * Consumer. Called with the consumer lock held and a guarantee that there is + * work to do. */ static void -drain_ring(struct mp_ring *r, union ring_state os, uint16_t prev, int budget) +drain_ring(struct mp_ring *r, int budget) { - union ring_state ns; + union ring_state os, ns; int n, pending, total; - uint16_t cidx = os.cidx; - uint16_t pidx = os.pidx_tail; + uint16_t cidx; + uint16_t pidx; + bool coalescing; + mtx_assert(r->cons_lock, MA_OWNED); + + os.state = atomic_load_acq_64(&r->state); MPASS(os.flags == BUSY); + + cidx = os.cidx; + pidx = os.pidx_tail; MPASS(cidx != pidx); - if (prev == IDLE) - counter_u64_add(r->starts, 1); pending = 0; total = 0; while (cidx != pidx) { /* Items from cidx to pidx are available for consumption. */ - n = r->drain(r, cidx, pidx); + n = r->drain(r, cidx, pidx, &coalescing); if (n == 0) { critical_enter(); - os.state = r->state; + os.state = atomic_load_64(&r->state); do { ns.state = os.state; ns.cidx = cidx; - ns.flags = STALLED; + + MPASS(os.flags == BUSY || + os.flags == TOO_BUSY || + os.flags == TAKING_OVER); + + if (os.flags == TAKING_OVER) + ns.flags = BUSY; + else + ns.flags = STALLED; } while (atomic_fcmpset_64(&r->state, &os.state, ns.state) == 0); critical_exit(); - if (prev != STALLED) + if (os.flags == TAKING_OVER) + counter_u64_add(r->abdications, 1); + else if (ns.flags == STALLED) counter_u64_add(r->stalls, 1); - else if (total > 0) { - counter_u64_add(r->restarts, 1); - counter_u64_add(r->stalls, 1); - } break; } cidx = increment_idx(r, cidx, n); pending += n; total += n; + counter_u64_add(r->consumed, n); - /* - * We update the cidx only if we've caught up with the pidx, the - * real cidx is getting too far ahead of the one visible to - * everyone else, or we have exceeded our budget. - */ - if (cidx != pidx && pending < 64 && total < budget) - continue; - critical_enter(); - os.state = r->state; + os.state = atomic_load_64(&r->state); do { + MPASS(os.flags == BUSY || os.flags == TOO_BUSY || + os.flags == TAKING_OVER); + ns.state = os.state; ns.cidx = cidx; - ns.flags = state_to_flags(ns, total >= budget); + if (__predict_false(os.flags == TAKING_OVER)) { + MPASS(total >= budget); + ns.flags = BUSY; + continue; + } + if (cidx == os.pidx_tail) { + ns.flags = coalescing ? COALESCING : IDLE; + continue; + } + if (total >= budget) { + ns.flags = TOO_BUSY; + continue; + } + MPASS(os.flags == BUSY); + if (pending < 32) + break; } while (atomic_fcmpset_acq_64(&r->state, &os.state, ns.state) == 0); - critical_exit(); - if (ns.flags == ABDICATED) + if (__predict_false(os.flags == TAKING_OVER)) { + MPASS(ns.flags == BUSY); counter_u64_add(r->abdications, 1); - if (ns.flags != BUSY) { - /* Wrong loop exit if we're going to stall. */ - MPASS(ns.flags != STALLED); - if (prev == STALLED) { - MPASS(total > 0); - counter_u64_add(r->restarts, 1); - } break; } + if (ns.flags == IDLE || ns.flags == COALESCING) { + MPASS(ns.pidx_tail == cidx); + if (ns.pidx_head != ns.pidx_tail) + counter_u64_add(r->cons_idle2, 1); + else + counter_u64_add(r->cons_idle, 1); + break; + } + /* * The acquire style atomic above guarantees visibility of items * associated with any pidx change that we notice here. @@ -177,13 +215,55 @@ drain_ring(struct mp_ring *r, union ring_state os, uin pidx = ns.pidx_tail; pending = 0; } + +#ifdef INVARIANTS + if (os.flags == TAKING_OVER) + MPASS(ns.flags == BUSY); + else { + MPASS(ns.flags == IDLE || ns.flags == COALESCING || + ns.flags == STALLED); + } +#endif } +static void +drain_txpkts(struct mp_ring *r, union ring_state os, int budget) +{ + union ring_state ns; + uint16_t cidx = os.cidx; + uint16_t pidx = os.pidx_tail; + bool coalescing; + + mtx_assert(r->cons_lock, MA_OWNED); + MPASS(os.flags == BUSY); + MPASS(cidx == pidx); + + r->drain(r, cidx, pidx, &coalescing); + MPASS(coalescing == false); + critical_enter(); + os.state = atomic_load_64(&r->state); + do { + ns.state = os.state; + MPASS(os.flags == BUSY); + MPASS(os.cidx == cidx); + if (ns.cidx == ns.pidx_tail) + ns.flags = IDLE; + else + ns.flags = BUSY; + } while (atomic_fcmpset_acq_64(&r->state, &os.state, ns.state) == 0); + critical_exit(); + + if (ns.flags == BUSY) + drain_ring(r, budget); +} + int mp_ring_alloc(struct mp_ring **pr, int size, void *cookie, ring_drain_t drain, - ring_can_drain_t can_drain, struct malloc_type *mt, int flags) + ring_can_drain_t can_drain, struct malloc_type *mt, struct mtx *lck, + int flags) { struct mp_ring *r; + int i; /* All idx are 16b so size can be 65536 at most */ if (pr == NULL || size < 2 || size > 65536 || drain == NULL || @@ -201,43 +281,59 @@ mp_ring_alloc(struct mp_ring **pr, int size, void *coo r->mt = mt; r->drain = drain; r->can_drain = can_drain; - r->enqueues = counter_u64_alloc(flags); - r->drops = counter_u64_alloc(flags); - r->starts = counter_u64_alloc(flags); - r->stalls = counter_u64_alloc(flags); - r->restarts = counter_u64_alloc(flags); - r->abdications = counter_u64_alloc(flags); - if (r->enqueues == NULL || r->drops == NULL || r->starts == NULL || - r->stalls == NULL || r->restarts == NULL || - r->abdications == NULL) { - mp_ring_free(r); - return (ENOMEM); + r->cons_lock = lck; + if ((r->dropped = counter_u64_alloc(flags)) == NULL) + goto failed; + for (i = 0; i < nitems(r->consumer); i++) { + if ((r->consumer[i] = counter_u64_alloc(flags)) == NULL) + goto failed; } - + if ((r->not_consumer = counter_u64_alloc(flags)) == NULL) + goto failed; + if ((r->abdications = counter_u64_alloc(flags)) == NULL) + goto failed; + if ((r->stalls = counter_u64_alloc(flags)) == NULL) + goto failed; + if ((r->consumed = counter_u64_alloc(flags)) == NULL) + goto failed; + if ((r->cons_idle = counter_u64_alloc(flags)) == NULL) + goto failed; + if ((r->cons_idle2 = counter_u64_alloc(flags)) == NULL) + goto failed; *pr = r; return (0); +failed: + mp_ring_free(r); + return (ENOMEM); } void mp_ring_free(struct mp_ring *r) { + int i; if (r == NULL) return; - if (r->enqueues != NULL) - counter_u64_free(r->enqueues); - if (r->drops != NULL) - counter_u64_free(r->drops); - if (r->starts != NULL) - counter_u64_free(r->starts); - if (r->stalls != NULL) - counter_u64_free(r->stalls); - if (r->restarts != NULL) - counter_u64_free(r->restarts); + if (r->dropped != NULL) + counter_u64_free(r->dropped); + for (i = 0; i < nitems(r->consumer); i++) { + if (r->consumer[i] != NULL) + counter_u64_free(r->consumer[i]); + } + if (r->not_consumer != NULL) + counter_u64_free(r->not_consumer); if (r->abdications != NULL) counter_u64_free(r->abdications); + if (r->stalls != NULL) + counter_u64_free(r->stalls); + if (r->consumed != NULL) + counter_u64_free(r->consumed); + if (r->cons_idle != NULL) + counter_u64_free(r->cons_idle); + if (r->cons_idle2 != NULL) + counter_u64_free(r->cons_idle2); free(r, r->mt); } @@ -252,7 +348,8 @@ mp_ring_enqueue(struct mp_ring *r, void **items, int n { union ring_state os, ns; uint16_t pidx_start, pidx_stop; - int i; + int i, nospc, cons; + bool consumer; MPASS(items != NULL); MPASS(n > 0); @@ -261,26 +358,70 @@ mp_ring_enqueue(struct mp_ring *r, void **items, int n * Reserve room for the new items. Our reservation, if successful, is * from 'pidx_start' to 'pidx_stop'. */ - os.state = r->state; + nospc = 0; + os.state = atomic_load_64(&r->state); for (;;) { - if (n >= space_available(r, os)) { - counter_u64_add(r->drops, n); + for (;;) { + if (__predict_true(space_available(r, os) >= n)) + break; + + /* Not enough room in the ring. */ + MPASS(os.flags != IDLE); + MPASS(os.flags != COALESCING); + if (__predict_false(++nospc > 100)) { + counter_u64_add(r->dropped, n); + return (ENOBUFS); + } if (os.flags == STALLED) - mp_ring_check_drainage(r, 0); - return (ENOBUFS); + mp_ring_check_drainage(r, 64); + else + cpu_spinwait(); + os.state = atomic_load_64(&r->state); } + + /* There is room in the ring. */ + + cons = -1; ns.state = os.state; ns.pidx_head = increment_idx(r, os.pidx_head, n); + if (os.flags == IDLE || os.flags == COALESCING) { + MPASS(os.pidx_tail == os.cidx); + if (os.pidx_head == os.pidx_tail) { + cons = C_FAST; + ns.pidx_tail = increment_idx(r, os.pidx_tail, n); + } else + cons = C_2; + ns.flags = BUSY; + } else if (os.flags == TOO_BUSY) { + cons = C_TAKEOVER; + ns.flags = TAKING_OVER; + } critical_enter(); if (atomic_fcmpset_64(&r->state, &os.state, ns.state)) break; critical_exit(); cpu_spinwait(); - } + }; + pidx_start = os.pidx_head; pidx_stop = ns.pidx_head; + if (cons == C_FAST) { + i = pidx_start; + do { + r->items[i] = *items++; + if (__predict_false(++i == r->size)) + i = 0; + } while (i != pidx_stop); + critical_exit(); + counter_u64_add(r->consumer[C_FAST], 1); + mtx_lock(r->cons_lock); + drain_ring(r, budget); + mtx_unlock(r->cons_lock); + return (0); + } + /* * Wait for other producers who got in ahead of us to enqueue their * items, one producer at a time. It is our turn when the ring's @@ -288,7 +429,7 @@ mp_ring_enqueue(struct mp_ring *r, void **items, int n */ while (ns.pidx_tail != pidx_start) { cpu_spinwait(); - ns.state = r->state; + ns.state = atomic_load_64(&r->state); } /* Now it is our turn to fill up the area we reserved earlier. */ @@ -303,21 +444,33 @@ mp_ring_enqueue(struct mp_ring *r, void **items, int n * Update the ring's pidx_tail. The release style atomic guarantees * that the items are visible to any thread that sees the updated pidx. */ - os.state = r->state; + os.state = atomic_load_64(&r->state); do { + consumer = false; ns.state = os.state; ns.pidx_tail = pidx_stop; - ns.flags = BUSY; + if (os.flags == IDLE || os.flags == COALESCING || + (os.flags == STALLED && r->can_drain(r))) { + MPASS(cons == -1); + consumer = true; + ns.flags = BUSY; + } } while (atomic_fcmpset_rel_64(&r->state, &os.state, ns.state) == 0); critical_exit(); - counter_u64_add(r->enqueues, n); - /* - * Turn into a consumer if some other thread isn't active as a consumer - * already. - */ - if (os.flags != BUSY) - drain_ring(r, ns, os.flags, budget); + if (cons == -1) { + if (consumer) + cons = C_3; + else { + counter_u64_add(r->not_consumer, 1); + return (0); + } + } + MPASS(cons > C_FAST && cons < nitems(r->consumer)); + counter_u64_add(r->consumer[cons], 1); + mtx_lock(r->cons_lock); + drain_ring(r, budget); + mtx_unlock(r->cons_lock); return (0); } @@ -327,46 +480,96 @@ mp_ring_check_drainage(struct mp_ring *r, int budget) { union ring_state os, ns; - os.state = r->state; - if (os.flags != STALLED || os.pidx_head != os.pidx_tail || - r->can_drain(r) == 0) - return; - - MPASS(os.cidx != os.pidx_tail); /* implied by STALLED */ - ns.state = os.state; - ns.flags = BUSY; - - /* - * The acquire style atomic guarantees visibility of items associated - * with the pidx that we read here. - */ - if (!atomic_cmpset_acq_64(&r->state, os.state, ns.state)) - return; - - drain_ring(r, ns, os.flags, budget); + os.state = atomic_load_64(&r->state); + if (os.flags == STALLED && r->can_drain(r)) { + MPASS(os.cidx != os.pidx_tail); /* implied by STALLED */ + ns.state = os.state; + ns.flags = BUSY; + if (atomic_cmpset_acq_64(&r->state, os.state, ns.state)) { + mtx_lock(r->cons_lock); + drain_ring(r, budget); + mtx_unlock(r->cons_lock); + } + } else if (os.flags == COALESCING) { + MPASS(os.cidx == os.pidx_tail); + ns.state = os.state; + ns.flags = BUSY; + if (atomic_cmpset_acq_64(&r->state, os.state, ns.state)) { + mtx_lock(r->cons_lock); + drain_txpkts(r, ns, budget); + mtx_unlock(r->cons_lock); + } + } } void mp_ring_reset_stats(struct mp_ring *r) { + int i; - counter_u64_zero(r->enqueues); - counter_u64_zero(r->drops); - counter_u64_zero(r->starts); - counter_u64_zero(r->stalls); - counter_u64_zero(r->restarts); + counter_u64_zero(r->dropped); + for (i = 0; i < nitems(r->consumer); i++) + counter_u64_zero(r->consumer[i]); + counter_u64_zero(r->not_consumer); counter_u64_zero(r->abdications); + counter_u64_zero(r->stalls); + counter_u64_zero(r->consumed); + counter_u64_zero(r->cons_idle); + counter_u64_zero(r->cons_idle2); } -int +bool mp_ring_is_idle(struct mp_ring *r) { union ring_state s; - s.state = r->state; + s.state = atomic_load_64(&r->state); if (s.pidx_head == s.pidx_tail && s.pidx_tail == s.cidx && s.flags == IDLE) - return (1); + return (true); - return (0); + return (false); +} + +void +mp_ring_sysctls(struct mp_ring *r, struct sysctl_ctx_list *ctx, + struct sysctl_oid_list *children) +{ + struct sysctl_oid *oid; + + oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "mp_ring", CTLFLAG_RD | + CTLFLAG_MPSAFE, NULL, "mp_ring statistics"); + children = SYSCTL_CHILDREN(oid); + + SYSCTL_ADD_U64(ctx, children, OID_AUTO, "state", CTLFLAG_RD, + __DEVOLATILE(uint64_t *, &r->state), 0, "ring state"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "dropped", CTLFLAG_RD, + &r->dropped, "# of items dropped"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "consumed", + CTLFLAG_RD, &r->consumed, "# of items consumed"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "fast_consumer", + CTLFLAG_RD, &r->consumer[C_FAST], + "# of times producer became consumer (fast)"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "consumer2", + CTLFLAG_RD, &r->consumer[C_2], + "# of times producer became consumer (2)"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "consumer3", + CTLFLAG_RD, &r->consumer[C_3], + "# of times producer became consumer (3)"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "takeovers", + CTLFLAG_RD, &r->consumer[C_TAKEOVER], + "# of times producer took over from another consumer."); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "not_consumer", + CTLFLAG_RD, &r->not_consumer, + "# of times producer did not become consumer"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "abdications", + CTLFLAG_RD, &r->abdications, "# of consumer abdications"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "stalls", + CTLFLAG_RD, &r->stalls, "# of consumer stalls"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "cons_idle", + CTLFLAG_RD, &r->cons_idle, + "# of times consumer ran fully to completion"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "cons_idle2", + CTLFLAG_RD, &r->cons_idle2, + "# of times consumer idled when another enqueue was in progress"); } Modified: stable/12/sys/dev/cxgbe/t4_mp_ring.h ============================================================================== --- stable/12/sys/dev/cxgbe/t4_mp_ring.h Wed Aug 26 22:52:07 2020 (r364847) +++ stable/12/sys/dev/cxgbe/t4_mp_ring.h Wed Aug 26 23:21:26 2020 (r364848) @@ -36,33 +36,38 @@ #endif struct mp_ring; -typedef u_int (*ring_drain_t)(struct mp_ring *, u_int, u_int); +typedef u_int (*ring_drain_t)(struct mp_ring *, u_int, u_int, bool *); typedef u_int (*ring_can_drain_t)(struct mp_ring *); struct mp_ring { volatile uint64_t state __aligned(CACHE_LINE_SIZE); + struct malloc_type * mt; int size __aligned(CACHE_LINE_SIZE); void * cookie; - struct malloc_type * mt; ring_drain_t drain; ring_can_drain_t can_drain; /* cheap, may be unreliable */ - counter_u64_t enqueues; - counter_u64_t drops; - counter_u64_t starts; - counter_u64_t stalls; - counter_u64_t restarts; /* recovered after stalling */ + struct mtx * cons_lock; + counter_u64_t dropped; + counter_u64_t consumer[4]; + counter_u64_t not_consumer; counter_u64_t abdications; + counter_u64_t consumed; + counter_u64_t cons_idle; + counter_u64_t cons_idle2; + counter_u64_t stalls; void * volatile items[] __aligned(CACHE_LINE_SIZE); }; int mp_ring_alloc(struct mp_ring **, int, void *, ring_drain_t, - ring_can_drain_t, struct malloc_type *, int); + ring_can_drain_t, struct malloc_type *, struct mtx *, int); void mp_ring_free(struct mp_ring *); int mp_ring_enqueue(struct mp_ring *, void **, int, int); void mp_ring_check_drainage(struct mp_ring *, int); void mp_ring_reset_stats(struct mp_ring *); -int mp_ring_is_idle(struct mp_ring *); +bool mp_ring_is_idle(struct mp_ring *); +void mp_ring_sysctls(struct mp_ring *, struct sysctl_ctx_list *, + struct sysctl_oid_list *); #endif Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Wed Aug 26 22:52:07 2020 (r364847) +++ stable/12/sys/dev/cxgbe/t4_sge.c Wed Aug 26 23:21:26 2020 (r364848) @@ -198,19 +198,6 @@ static int lro_mbufs = 0; SYSCTL_INT(_hw_cxgbe, OID_AUTO, lro_mbufs, CTLFLAG_RDTUN, &lro_mbufs, 0, "Enable presorting of LRO frames"); -struct txpkts { - u_int wr_type; /* type 0 or type 1 */ - u_int npkt; /* # of packets in this work request */ - u_int plen; /* total payload (sum of all packets) */ - u_int len16; /* # of 16B pieces used by this work request */ -}; - -/* A packet's SGL. This + m_pkthdr has all info needed for tx */ -struct sgl { - struct sglist sg; - struct sglist_seg seg[TX_SGL_SEGS]; -}; - static int service_iq(struct sge_iq *, int); static int service_iq_fl(struct sge_iq *, int); static struct mbuf *get_fl_payload(struct adapter *, struct sge_fl *, uint32_t); @@ -279,14 +266,16 @@ static inline u_int txpkt_vm_len16(u_int, u_int); static inline u_int txpkts0_len16(u_int); static inline u_int txpkts1_len16(void); static u_int write_raw_wr(struct sge_txq *, void *, struct mbuf *, u_int); -static u_int write_txpkt_wr(struct adapter *, struct sge_txq *, - struct fw_eth_tx_pkt_wr *, struct mbuf *, u_int); +static u_int write_txpkt_wr(struct adapter *, struct sge_txq *, struct mbuf *, + u_int); static u_int write_txpkt_vm_wr(struct adapter *, struct sge_txq *, - struct fw_eth_tx_pkt_vm_wr *, struct mbuf *, u_int); -static int try_txpkts(struct mbuf *, struct mbuf *, struct txpkts *, u_int); -static int add_to_txpkts(struct mbuf *, struct txpkts *, u_int); -static u_int write_txpkts_wr(struct adapter *, struct sge_txq *, - struct fw_eth_tx_pkts_wr *, struct mbuf *, const struct txpkts *, u_int); + struct mbuf *); +static int add_to_txpkts_vf(struct adapter *, struct sge_txq *, struct mbuf *, + int, bool *); +static int add_to_txpkts_pf(struct adapter *, struct sge_txq *, struct mbuf *, + int, bool *); +static u_int write_txpkts_wr(struct adapter *, struct sge_txq *); +static u_int write_txpkts_vm_wr(struct adapter *, struct sge_txq *); static void write_gl_to_txd(struct sge_txq *, struct mbuf *, caddr_t *, int); static inline void copy_to_txd(struct sge_eq *, caddr_t, caddr_t *, int); static inline void ring_eq_db(struct adapter *, struct sge_eq *, u_int); @@ -2653,7 +2642,7 @@ can_resume_eth_tx(struct mp_ring *r) return (total_available_tx_desc(eq) > eq->sidx / 8); } -static inline int +static inline bool cannot_use_txpkts(struct mbuf *m) { /* maybe put a GL limit too, to avoid silliness? */ @@ -2669,8 +2658,9 @@ discard_tx(struct sge_eq *eq) } static inline int -wr_can_update_eq(struct fw_eth_tx_pkts_wr *wr) +wr_can_update_eq(void *p) { + struct fw_eth_tx_pkts_wr *wr = p; switch (G_FW_WR_OP(be32toh(wr->op_pkd))) { case FW_ULPTX_WR: @@ -2678,149 +2668,226 @@ wr_can_update_eq(struct fw_eth_tx_pkts_wr *wr) case FW_ETH_TX_PKTS_WR: case FW_ETH_TX_PKTS2_WR: case FW_ETH_TX_PKT_VM_WR: + case FW_ETH_TX_PKTS_VM_WR: return (1); default: return (0); } } +static inline void +set_txupdate_flags(struct sge_txq *txq, u_int avail, + struct fw_eth_tx_pkt_wr *wr) +{ + struct sge_eq *eq = &txq->eq; + struct txpkts *txp = &txq->txp; + + if ((txp->npkt > 0 || avail < eq->sidx / 2) && + atomic_cmpset_int(&eq->equiq, 0, 1)) { + wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ | F_FW_WR_EQUIQ); + eq->equeqidx = eq->pidx; + } else if (IDXDIFF(eq->pidx, eq->equeqidx, eq->sidx) >= 32) { + wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); + eq->equeqidx = eq->pidx; + } +} + /* * r->items[cidx] to r->items[pidx], with a wraparound at r->size, are ready to * be consumed. Return the actual number consumed. 0 indicates a stall. */ static u_int -eth_tx(struct mp_ring *r, u_int cidx, u_int pidx) +eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool *coalescing) { struct sge_txq *txq = r->cookie; - struct sge_eq *eq = &txq->eq; struct ifnet *ifp = txq->ifp; + struct sge_eq *eq = &txq->eq; + struct txpkts *txp = &txq->txp; struct vi_info *vi = ifp->if_softc; struct adapter *sc = vi->adapter; u_int total, remaining; /* # of packets */ - u_int available, dbdiff; /* # of hardware descriptors */ - u_int n, next_cidx; - struct mbuf *m0, *tail; - struct txpkts txp; - struct fw_eth_tx_pkts_wr *wr; /* any fw WR struct will do */ + u_int n, avail, dbdiff; /* # of hardware descriptors */ + int i, rc; + struct mbuf *m0; + bool snd; + void *wr; /* start of the last WR written to the ring */ - remaining = IDXDIFF(pidx, cidx, r->size); - MPASS(remaining > 0); /* Must not be called without work to do. */ - total = 0; + TXQ_LOCK_ASSERT_OWNED(txq); - TXQ_LOCK(txq); + remaining = IDXDIFF(pidx, cidx, r->size); if (__predict_false(discard_tx(eq))) { + for (i = 0; i < txp->npkt; i++) + m_freem(txp->mb[i]); + txp->npkt = 0; while (cidx != pidx) { m0 = r->items[cidx]; m_freem(m0); if (++cidx == r->size) cidx = 0; } - reclaim_tx_descs(txq, 2048); - total = remaining; - goto done; + reclaim_tx_descs(txq, eq->sidx); + *coalescing = false; + return (remaining); /* emptied */ } /* How many hardware descriptors do we have readily available. */ - if (eq->pidx == eq->cidx) - available = eq->sidx - 1; - else - available = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1; - dbdiff = IDXDIFF(eq->pidx, eq->dbidx, eq->sidx); + if (eq->pidx == eq->cidx) { + avail = eq->sidx - 1; + if (txp->score++ >= 5) + txp->score = 5; /* tx is completely idle, reset. */ + } else + avail = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1; - while (remaining > 0) { + total = 0; + if (remaining == 0) { + if (txp->score-- == 1) /* egr_update had to drain txpkts */ + txp->score = 1; + goto send_txpkts; + } + dbdiff = 0; + MPASS(remaining > 0); + while (remaining > 0) { m0 = r->items[cidx]; M_ASSERTPKTHDR(m0); MPASS(m0->m_nextpkt == NULL); - if (available < tx_len16_to_desc(mbuf_len16(m0))) { - available += reclaim_tx_descs(txq, 64); - if (available < tx_len16_to_desc(mbuf_len16(m0))) - break; /* out of descriptors */ - } + if (avail < 2 * SGE_MAX_WR_NDESC) + avail += reclaim_tx_descs(txq, 64); - next_cidx = cidx + 1; - if (__predict_false(next_cidx == r->size)) - next_cidx = 0; - - wr = (void *)&eq->desc[eq->pidx]; - if (sc->flags & IS_VF) { - total++; - remaining--; - ETHER_BPF_MTAP(ifp, m0); - n = write_txpkt_vm_wr(sc, txq, (void *)wr, m0, - available); - } else if (remaining > 1 && - try_txpkts(m0, r->items[next_cidx], &txp, available) == 0) { - - /* pkts at cidx, next_cidx should both be in txp. */ - MPASS(txp.npkt == 2); - tail = r->items[next_cidx]; - MPASS(tail->m_nextpkt == NULL); - ETHER_BPF_MTAP(ifp, m0); - ETHER_BPF_MTAP(ifp, tail); - m0->m_nextpkt = tail; - - if (__predict_false(++next_cidx == r->size)) - next_cidx = 0; - - while (next_cidx != pidx) { - if (add_to_txpkts(r->items[next_cidx], &txp, - available) != 0) - break; - tail->m_nextpkt = r->items[next_cidx]; - tail = tail->m_nextpkt; - ETHER_BPF_MTAP(ifp, tail); - if (__predict_false(++next_cidx == r->size)) - next_cidx = 0; + if (txp->npkt > 0 || remaining > 1 || txp->score > 3 || + atomic_load_int(&txq->eq.equiq) != 0) { + if (sc->flags & IS_VF) + rc = add_to_txpkts_vf(sc, txq, m0, avail, &snd); + else + rc = add_to_txpkts_pf(sc, txq, m0, avail, &snd); + } else { + snd = false; + rc = EINVAL; + } + if (snd) { + MPASS(txp->npkt > 0); + for (i = 0; i < txp->npkt; i++) + ETHER_BPF_MTAP(ifp, txp->mb[i]); + if (txp->npkt > 1) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Aug 26 23:41:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E8033C0F1E; Wed, 26 Aug 2020 23:41:47 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcMp30Tc6z3bMh; Wed, 26 Aug 2020 23:41:47 +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 E80DA1ADD2; Wed, 26 Aug 2020 23:41:46 +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 07QNfkFm071909; Wed, 26 Aug 2020 23:41:46 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07QNfkno071908; Wed, 26 Aug 2020 23:41:46 GMT (envelope-from np@FreeBSD.org) Message-Id: <202008262341.07QNfkno071908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 26 Aug 2020 23:41:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364849 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 364849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 26 Aug 2020 23:41:47 -0000 Author: np Date: Wed Aug 26 23:41:46 2020 New Revision: 364849 URL: https://svnweb.freebsd.org/changeset/base/364849 Log: MFC r358924: cxgbe(4): Do not display error messages related to the CLIP table if it's not in use by TOE or KTLS. Modified: stable/12/sys/dev/cxgbe/t4_clip.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_clip.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_clip.c Wed Aug 26 23:21:26 2020 (r364848) +++ stable/12/sys/dev/cxgbe/t4_clip.c Wed Aug 26 23:41:46 2020 (r364849) @@ -273,8 +273,11 @@ update_clip_table(struct adapter *sc) inet_ntop(AF_INET6, &ce->lip, &ip[0], sizeof(ip)); - log(LOG_ERR, "%s: could not add %s (%d)\n", - __func__, ip, rc); + if (sc->active_ulds != 0) { + log(LOG_ERR, + "%s: could not add %s (%d)\n", + __func__, ip, rc); + } free(ce, M_CXGBE); } next: From owner-svn-src-all@freebsd.org Thu Aug 27 00:17:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5A3F3C1864; Thu, 27 Aug 2020 00:17:17 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcNb15928z3cPR; Thu, 27 Aug 2020 00:17:17 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95CD11B572; Thu, 27 Aug 2020 00:17:17 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07R0HHNO092262; Thu, 27 Aug 2020 00:17:17 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07R0HHgJ092261; Thu, 27 Aug 2020 00:17:17 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <202008270017.07R0HHgJ092261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Thu, 27 Aug 2020 00:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364850 - head/usr.sbin/jail X-SVN-Group: head X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: head/usr.sbin/jail X-SVN-Commit-Revision: 364850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 00:17:17 -0000 Author: jamie Date: Thu Aug 27 00:17:17 2020 New Revision: 364850 URL: https://svnweb.freebsd.org/changeset/base/364850 Log: Don't allow jail.conf variables to have the same names as jail parameters. It was already not allowed in many cases, but crashed instead of giving an error. PR: 248444 Modified: head/usr.sbin/jail/config.c Modified: head/usr.sbin/jail/config.c ============================================================================== --- head/usr.sbin/jail/config.c Wed Aug 26 23:41:46 2020 (r364849) +++ head/usr.sbin/jail/config.c Thu Aug 27 00:17:17 2020 (r364850) @@ -366,8 +366,13 @@ add_param(struct cfjail *j, const struct cfparam *p, e break; if (dp != NULL) { /* Found it - append or replace. */ + if ((flags ^ dp->flags) & PF_VAR) { + jail_warnx(j, "variable \"$%s\" cannot have the same " + "name as a parameter.", name); + return; + } if (dp->flags & PF_IMMUTABLE) { - jail_warnx(j, "cannot redefine variable \"%s\".", + jail_warnx(j, "cannot redefine parameter \"%s\".", dp->name); return; } @@ -394,6 +399,14 @@ add_param(struct cfjail *j, const struct cfparam *p, e for (ipnum = IP__NULL + 1; ipnum < IP_NPARAM; ipnum++) if (!(intparams[ipnum].flags & PF_CONV) && equalopts(name, intparams[ipnum].name)) { + if (flags & PF_VAR) { + jail_warnx(j, + "variable \"$%s\" " + "cannot have the same " + "name as a parameter.", + name); + return; + } j->intparams[ipnum] = np; np->flags |= intparams[ipnum].flags; break; From owner-svn-src-all@freebsd.org Thu Aug 27 00:28:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CA103C2399; Thu, 27 Aug 2020 00:28: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcNrB1JDtz3fFf; Thu, 27 Aug 2020 00:28: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 10E5E1B9DD; Thu, 27 Aug 2020 00:28: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 07R0SfMn099264; Thu, 27 Aug 2020 00:28:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07R0SfLn099263; Thu, 27 Aug 2020 00:28:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202008270028.07R0SfLn099263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 27 Aug 2020 00:28:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364851 - stable/12/sys/netpfil/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw X-SVN-Commit-Revision: 364851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 00:28:42 -0000 Author: emaste Date: Thu Aug 27 00:28:41 2020 New Revision: 364851 URL: https://svnweb.freebsd.org/changeset/base/364851 Log: MFC r364426: ipfw: style(9) fixes Submitted by: Neel Chauhan Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw2.c Thu Aug 27 00:17:17 2020 (r364850) +++ stable/12/sys/netpfil/ipfw/ip_fw2.c Thu Aug 27 00:28:41 2020 (r364851) @@ -754,17 +754,17 @@ ipfw_send_pkt(struct mbuf *replyto, struct ipfw_flow_i * ipv6 specific rules here... */ static __inline int -icmp6type_match (int type, ipfw_insn_u32 *cmd) +icmp6type_match(int type, ipfw_insn_u32 *cmd) { return (type <= ICMP6_MAXTYPE && (cmd->d[type/32] & (1<<(type%32)) ) ); } static int -flow6id_match( int curr_flow, ipfw_insn_u32 *cmd ) +flow6id_match(int curr_flow, ipfw_insn_u32 *cmd) { int i; - for (i=0; i <= cmd->o.arg1; ++i ) - if (curr_flow == cmd->d[i] ) + for (i=0; i <= cmd->o.arg1; ++i) + if (curr_flow == cmd->d[i]) return 1; return 0; } From owner-svn-src-all@freebsd.org Thu Aug 27 00:32:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66A533C24C1; Thu, 27 Aug 2020 00:32:12 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcNwD27NNz3fhw; Thu, 27 Aug 2020 00:32:12 +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 2C8BE1B751; Thu, 27 Aug 2020 00:32:12 +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 07R0WCc5004100; Thu, 27 Aug 2020 00:32:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07R0WCiY004099; Thu, 27 Aug 2020 00:32:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202008270032.07R0WCiY004099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 27 Aug 2020 00:32:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364852 - stable/12/lib/libc/gen X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/lib/libc/gen X-SVN-Commit-Revision: 364852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 00:32:12 -0000 Author: kib Date: Thu Aug 27 00:32:11 2020 New Revision: 364852 URL: https://svnweb.freebsd.org/changeset/base/364852 Log: MFC r364423: dl_iterate_phdr(3): provide exclusive locking for callback when statically linked. Modified: stable/12/lib/libc/gen/dlfcn.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/gen/dlfcn.c ============================================================================== --- stable/12/lib/libc/gen/dlfcn.c Thu Aug 27 00:28:41 2020 (r364851) +++ stable/12/lib/libc/gen/dlfcn.c Thu Aug 27 00:32:11 2020 (r364852) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" #include "libc_private.h" +#include "reentrant.h" static char sorry[] = "Service unavailable"; @@ -164,6 +165,7 @@ _rtld_thread_init(void *li __unused) #ifndef IN_LIBDL static pthread_once_t dl_phdr_info_once = PTHREAD_ONCE_INIT; static struct dl_phdr_info phdr_info; +static mutex_t dl_phdr_info_lock = MUTEX_INITIALIZER; static void dl_init_phdr_info(void) @@ -204,13 +206,17 @@ int dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *) __unused, void *data __unused) { - #ifndef IN_LIBDL + int ret; + __init_elf_aux_vector(); if (__elf_aux_vector == NULL) return (1); _once(&dl_phdr_info_once, dl_init_phdr_info); - return (callback(&phdr_info, sizeof(phdr_info), data)); + mutex_lock(&dl_phdr_info_lock); + ret = callback(&phdr_info, sizeof(phdr_info), data); + mutex_unlock(&dl_phdr_info_lock); + return (ret); #else return (0); #endif From owner-svn-src-all@freebsd.org Thu Aug 27 00:33:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF12E3C269D; Thu, 27 Aug 2020 00:33:01 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcNx953tRz3fvw; Thu, 27 Aug 2020 00:33:01 +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 9095E1B85D; Thu, 27 Aug 2020 00:33:01 +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 07R0X172005070; Thu, 27 Aug 2020 00:33:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07R0X1u2005069; Thu, 27 Aug 2020 00:33:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202008270033.07R0X1u2005069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 27 Aug 2020 00:33: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: r364853 - stable/11/lib/libc/gen X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/lib/libc/gen X-SVN-Commit-Revision: 364853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 00:33:01 -0000 Author: kib Date: Thu Aug 27 00:33:01 2020 New Revision: 364853 URL: https://svnweb.freebsd.org/changeset/base/364853 Log: MFC r364423: dl_iterate_phdr(3): provide exclusive locking for callback when statically linked. Modified: stable/11/lib/libc/gen/dlfcn.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/dlfcn.c ============================================================================== --- stable/11/lib/libc/gen/dlfcn.c Thu Aug 27 00:32:11 2020 (r364852) +++ stable/11/lib/libc/gen/dlfcn.c Thu Aug 27 00:33:01 2020 (r364853) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" #include "libc_private.h" +#include "reentrant.h" static char sorry[] = "Service unavailable"; @@ -162,6 +163,7 @@ _rtld_thread_init(void *li __unused) #ifndef IN_LIBDL static pthread_once_t dl_phdr_info_once = PTHREAD_ONCE_INIT; static struct dl_phdr_info phdr_info; +static mutex_t dl_phdr_info_lock = MUTEX_INITIALIZER; static void dl_init_phdr_info(void) @@ -202,13 +204,17 @@ int dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *) __unused, void *data __unused) { - #ifndef IN_LIBDL + int ret; + __init_elf_aux_vector(); if (__elf_aux_vector == NULL) return (1); _once(&dl_phdr_info_once, dl_init_phdr_info); - return (callback(&phdr_info, sizeof(phdr_info), data)); + mutex_lock(&dl_phdr_info_lock); + ret = callback(&phdr_info, sizeof(phdr_info), data); + mutex_unlock(&dl_phdr_info_lock); + return (ret); #else return (0); #endif From owner-svn-src-all@freebsd.org Thu Aug 27 03:50:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70D6F3C5B38; Thu, 27 Aug 2020 03:50:35 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcTK72Bh7z44tV; Thu, 27 Aug 2020 03:50:35 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2FA851DCB1; Thu, 27 Aug 2020 03:50:35 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07R3oZD3036009; Thu, 27 Aug 2020 03:50:35 GMT (envelope-from grog@FreeBSD.org) Received: (from grog@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07R3oZ6n036008; Thu, 27 Aug 2020 03:50:35 GMT (envelope-from grog@FreeBSD.org) Message-Id: <202008270350.07R3oZ6n036008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grog set sender to grog@FreeBSD.org using -f From: Greg Lehey Date: Thu, 27 Aug 2020 03:50:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364854 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: grog X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 364854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 03:50:35 -0000 Author: grog Date: Thu Aug 27 03:50:34 2020 New Revision: 364854 URL: https://svnweb.freebsd.org/changeset/base/364854 Log: Update Hong Kong Liberation Day (hah!) Modified: head/usr.bin/calendar/calendars/calendar.holiday Modified: head/usr.bin/calendar/calendars/calendar.holiday ============================================================================== --- head/usr.bin/calendar/calendars/calendar.holiday Thu Aug 27 00:33:01 2020 (r364853) +++ head/usr.bin/calendar/calendars/calendar.holiday Thu Aug 27 03:50:34 2020 (r364854) @@ -350,7 +350,7 @@ 08/25 Independence Day in Uruguay 08/26 Susan B. Anthony Day in Massachusetts 08/26* Bank Holiday in England and Wales -08/27 Liberation Day in Hong Kong +08/MonLast Liberation Day in Hong Kong 08/28 Heroes Day in Philippines 08/30 Huey P. Long Day in Louisiana 08/30 Victory Day in Turkey From owner-svn-src-all@freebsd.org Thu Aug 27 05:11:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 671EA3C6DE9; Thu, 27 Aug 2020 05:11: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcW6D27ZGz47yK; Thu, 27 Aug 2020 05:11: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 2DF1F1EC44; Thu, 27 Aug 2020 05:11: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 07R5BGdo093767; Thu, 27 Aug 2020 05:11:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07R5BFJm093764; Thu, 27 Aug 2020 05:11:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008270511.07R5BFJm093764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 27 Aug 2020 05:11:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364855 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 05:11:16 -0000 Author: imp Date: Thu Aug 27 05:11:15 2020 New Revision: 364855 URL: https://svnweb.freebsd.org/changeset/base/364855 Log: Implement FLUSHO Turn FLUSHO on/off with ^O (or whatever VDISCARD is). Honor that to throw away output quickly. This tries to remain true to 4.4BSD behavior (since that was the origin of this feature), with any corrections NetBSD has done. Since the implemenations are a little different, though, some edge conditions may be handled differently. Reviewed by: kib, kevans Differential Review: https://reviews.freebsd.org/D26148 Modified: head/sys/kern/tty.c head/sys/kern/tty_ttydisc.c Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Thu Aug 27 03:50:34 2020 (r364854) +++ head/sys/kern/tty.c Thu Aug 27 05:11:15 2020 (r364855) @@ -1467,6 +1467,7 @@ tty_signal_sessleader(struct tty *tp, int sig) /* Make signals start output again. */ tp->t_flags &= ~TF_STOPPED; + tp->t_termios.c_lflag &= ~FLUSHO; if (tp->t_session != NULL && tp->t_session->s_leader != NULL) { p = tp->t_session->s_leader; @@ -1486,6 +1487,7 @@ tty_signal_pgrp(struct tty *tp, int sig) /* Make signals start output again. */ tp->t_flags &= ~TF_STOPPED; + tp->t_termios.c_lflag &= ~FLUSHO; if (sig == SIGINFO && !(tp->t_termios.c_lflag & NOKERNINFO)) tty_info(tp); @@ -1930,6 +1932,7 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *da return (0); case TIOCSTART: tp->t_flags &= ~TF_STOPPED; + tp->t_termios.c_lflag &= ~FLUSHO; ttydevsw_outwakeup(tp); ttydevsw_pktnotify(tp, TIOCPKT_START); return (0); Modified: head/sys/kern/tty_ttydisc.c ============================================================================== --- head/sys/kern/tty_ttydisc.c Thu Aug 27 03:50:34 2020 (r364854) +++ head/sys/kern/tty_ttydisc.c Thu Aug 27 05:11:15 2020 (r364855) @@ -95,6 +95,7 @@ ttydisc_close(struct tty *tp) /* Clean up our flags when leaving the discipline. */ tp->t_flags &= ~(TF_STOPPED|TF_HIWAT|TF_ZOMBIE); + tp->t_termios.c_lflag &= ~FLUSHO; /* * POSIX states that we must drain output and flush input on @@ -474,6 +475,12 @@ ttydisc_write(struct tty *tp, struct uio *uio, int iof MPASS(oblen == 0); + if (CMP_FLAG(l, FLUSHO)) { + uio->uio_offset += uio->uio_resid; + uio->uio_resid = 0; + return (0); + } + /* Step 1: read data. */ obstart = ob; nlen = MIN(uio->uio_resid, sizeof ob); @@ -495,6 +502,12 @@ ttydisc_write(struct tty *tp, struct uio *uio, int iof do { unsigned int plen, wlen; + if (CMP_FLAG(l, FLUSHO)) { + uio->uio_offset += uio->uio_resid; + uio->uio_resid = 0; + return (0); + } + /* Search for special characters for post processing. */ if (CMP_FLAG(o, OPOST)) { plen = ttydisc_findchar(obstart, oblen); @@ -629,6 +642,9 @@ static int ttydisc_echo_force(struct tty *tp, char c, int quote) { + if (CMP_FLAG(l, FLUSHO)) + return 0; + if (CMP_FLAG(o, OPOST) && CTL_ECHO(c, quote)) { /* * Only perform postprocessing when OPOST is turned on @@ -879,8 +895,10 @@ ttydisc_rint(struct tty *tp, char c, int flags) } /* Allow any character to perform a wakeup. */ - if (CMP_FLAG(i, IXANY)) + if (CMP_FLAG(i, IXANY)) { tp->t_flags &= ~TF_STOPPED; + tp->t_termios.c_lflag &= ~FLUSHO; + } /* Remove the top bit. */ if (CMP_FLAG(i, ISTRIP)) @@ -905,6 +923,18 @@ ttydisc_rint(struct tty *tp, char c, int flags) } tp->t_flags |= TF_LITERAL; return (0); + } + /* Discard processing */ + if (CMP_CC(VDISCARD, c)) { + if (CMP_FLAG(l, FLUSHO)) { + tp->t_termios.c_lflag &= ~FLUSHO; + } else { + tty_flush(tp, FWRITE); + ttydisc_echo(tp, c, 0); + if (tp->t_inq.ti_end > 0) + ttydisc_reprint(tp); + tp->t_termios.c_lflag |= FLUSHO; + } } } From owner-svn-src-all@freebsd.org Thu Aug 27 06:30:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31D7F3C89EE; Thu, 27 Aug 2020 06:30:41 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcXss0drNz4DxW; Thu, 27 Aug 2020 06:30:41 +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 EE8221FD17; Thu, 27 Aug 2020 06:30:40 +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 07R6UeIj048657; Thu, 27 Aug 2020 06:30:40 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07R6Ueaa048656; Thu, 27 Aug 2020 06:30:40 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008270630.07R6Ueaa048656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 27 Aug 2020 06:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364856 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 06:30:41 -0000 Author: mjg Date: Thu Aug 27 06:30:40 2020 New Revision: 364856 URL: https://svnweb.freebsd.org/changeset/base/364856 Log: cache: ncp = NULL early to account for sdt probes in ailure path CID: 1432106 Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Thu Aug 27 05:11:15 2020 (r364855) +++ head/sys/kern/vfs_cache.c Thu Aug 27 06:30:40 2020 (r364856) @@ -2938,6 +2938,7 @@ vn_fullpath_any_smr(struct vnode *vp, struct vnode *rd i = 0; #endif error = -1; + ncp = NULL; /* for sdt probe down below */ vp_seqc = vn_seqc_read_any(vp); if (seqc_in_modify(vp_seqc)) { cache_rev_failed(&reason); From owner-svn-src-all@freebsd.org Thu Aug 27 06:31:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 728D73C8D65; Thu, 27 Aug 2020 06:31:28 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcXtm17Dwz4F3Z; Thu, 27 Aug 2020 06:31:28 +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 0AE6F1FCDE; Thu, 27 Aug 2020 06:31:28 +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 07R6VRkW050407; Thu, 27 Aug 2020 06:31:27 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07R6VRsE050406; Thu, 27 Aug 2020 06:31:27 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008270631.07R6VRsE050406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 27 Aug 2020 06:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364857 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 06:31:28 -0000 Author: mjg Date: Thu Aug 27 06:31:27 2020 New Revision: 364857 URL: https://svnweb.freebsd.org/changeset/base/364857 Log: cache: assorted clean ups In particular remove spurious comments, duplicate assertions and the inconsistently done KTR support. Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Thu Aug 27 06:30:40 2020 (r364856) +++ head/sys/kern/vfs_cache.c Thu Aug 27 06:31:27 2020 (r364857) @@ -999,9 +999,6 @@ cache_zap_locked(struct namecache *ncp) cache_assert_vnode_locked(ncp->nc_dvp); cache_assert_bucket_locked(ncp); - CTR2(KTR_VFS, "cache_zap(%p) vp %p", ncp, - (ncp->nc_flag & NCF_NEGATIVE) ? NULL : ncp->nc_vp); - cache_ncp_invalidate(ncp); ncpp = NCP2BUCKET(ncp); @@ -1260,6 +1257,83 @@ cache_zap_locked_bucket_kl(struct namecache *ncp, stru return (EAGAIN); } +static __noinline int +cache_remove_cnp(struct vnode *dvp, struct componentname *cnp) +{ + struct namecache *ncp; + struct mtx *blp; + struct mtx *dvlp, *dvlp2; + uint32_t hash; + int error; + + if (cnp->cn_namelen == 2 && + cnp->cn_nameptr[0] == '.' && cnp->cn_nameptr[1] == '.') { + dvlp = VP2VNODELOCK(dvp); + dvlp2 = NULL; + mtx_lock(dvlp); +retry_dotdot: + ncp = dvp->v_cache_dd; + if (ncp == NULL) { + mtx_unlock(dvlp); + if (dvlp2 != NULL) + mtx_unlock(dvlp2); + SDT_PROBE2(vfs, namecache, removecnp, miss, dvp, cnp); + return (0); + } + if ((ncp->nc_flag & NCF_ISDOTDOT) != 0) { + if (!cache_zap_locked_vnode_kl2(ncp, dvp, &dvlp2)) + goto retry_dotdot; + MPASS(dvp->v_cache_dd == NULL); + mtx_unlock(dvlp); + if (dvlp2 != NULL) + mtx_unlock(dvlp2); + cache_free(ncp); + } else { + vn_seqc_write_begin(dvp); + dvp->v_cache_dd = NULL; + vn_seqc_write_end(dvp); + mtx_unlock(dvlp); + if (dvlp2 != NULL) + mtx_unlock(dvlp2); + } + SDT_PROBE2(vfs, namecache, removecnp, hit, dvp, cnp); + return (1); + } + + hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp); + blp = HASH2BUCKETLOCK(hash); +retry: + if (CK_SLIST_EMPTY(NCHHASH(hash))) + goto out_no_entry; + + mtx_lock(blp); + + CK_SLIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { + if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen && + !bcmp(ncp->nc_name, cnp->cn_nameptr, ncp->nc_nlen)) + break; + } + + if (ncp == NULL) { + mtx_unlock(blp); + goto out_no_entry; + } + + error = cache_zap_locked_bucket(ncp, cnp, hash, blp); + if (__predict_false(error != 0)) { + zap_and_exit_bucket_fail++; + goto retry; + } + counter_u64_add(numposzaps, 1); + SDT_PROBE2(vfs, namecache, removecnp, hit, dvp, cnp); + cache_free(ncp); + return (1); +out_no_entry: + counter_u64_add(nummisszap, 1); + SDT_PROBE2(vfs, namecache, removecnp, miss, dvp, cnp); + return (0); +} + static int __noinline cache_lookup_dot(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct timespec *tsp, int *ticksp) @@ -1267,8 +1341,6 @@ cache_lookup_dot(struct vnode *dvp, struct vnode **vpp int ltype; *vpp = dvp; - CTR2(KTR_VFS, "cache_lookup(%p, %s) found via .", - dvp, cnp->cn_nameptr); counter_u64_add(dothits, 1); SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ".", *vpp); if (tsp != NULL) @@ -1296,10 +1368,6 @@ cache_lookup_dot(struct vnode *dvp, struct vnode **vpp return (-1); } -static __noinline int -cache_remove_cnp(struct vnode *dvp, struct componentname *cnp); - - static int __noinline cache_lookup_dotdot(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct timespec *tsp, int *ticksp) @@ -1324,8 +1392,7 @@ retry: mtx_lock(dvlp); ncp = dvp->v_cache_dd; if (ncp == NULL) { - SDT_PROBE3(vfs, namecache, lookup, miss, dvp, - "..", NULL); + SDT_PROBE3(vfs, namecache, lookup, miss, dvp, "..", NULL); mtx_unlock(dvlp); return (0); } @@ -1336,13 +1403,9 @@ retry: *vpp = ncp->nc_vp; } else *vpp = ncp->nc_dvp; - /* Return failure if negative entry was found. */ if (*vpp == NULL) goto negative_success; - CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..", - dvp, cnp->cn_nameptr, *vpp); - SDT_PROBE3(vfs, namecache, lookup, hit, dvp, "..", - *vpp); + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, "..", *vpp); cache_out_ts(ncp, tsp, ticksp); if ((ncp->nc_flag & (NCF_ISDOTDOT | NCF_DTS)) == NCF_DTS && tsp != NULL) { @@ -1350,12 +1413,7 @@ retry: *tsp = ncp_ts->nc_dotdottime; } - /* - * On success we return a locked and ref'd vnode as per the lookup - * protocol. - */ MPASS(dvp != *vpp); - ltype = 0; /* silence gcc warning */ ltype = VOP_ISLOCKED(dvp); VOP_UNLOCK(dvp); vs = vget_prep(*vpp); @@ -1372,10 +1430,6 @@ retry: *vpp = NULL; goto retry; } - if ((cnp->cn_flags & ISLASTCN) && - (cnp->cn_lkflags & LK_TYPE_MASK) == LK_EXCLUSIVE) { - ASSERT_VOP_ELOCKED(*vpp, "cache_lookup"); - } return (-1); negative_success: if (__predict_false(cnp->cn_nameiop == CREATE)) { @@ -1402,87 +1456,6 @@ negative_success: return (ENOENT); } -static __noinline int -cache_remove_cnp(struct vnode *dvp, struct componentname *cnp) -{ - struct namecache *ncp; - struct mtx *blp; - struct mtx *dvlp, *dvlp2; - uint32_t hash; - int error; - - if (cnp->cn_namelen == 2 && - cnp->cn_nameptr[0] == '.' && cnp->cn_nameptr[1] == '.') { - dvlp = VP2VNODELOCK(dvp); - dvlp2 = NULL; - mtx_lock(dvlp); -retry_dotdot: - ncp = dvp->v_cache_dd; - if (ncp == NULL) { - mtx_unlock(dvlp); - if (dvlp2 != NULL) - mtx_unlock(dvlp2); - SDT_PROBE2(vfs, namecache, removecnp, miss, dvp, cnp); - return (0); - } - if ((ncp->nc_flag & NCF_ISDOTDOT) != 0) { - if (ncp->nc_dvp != dvp) - panic("dvp %p v_cache_dd %p\n", dvp, ncp); - if (!cache_zap_locked_vnode_kl2(ncp, - dvp, &dvlp2)) - goto retry_dotdot; - MPASS(dvp->v_cache_dd == NULL); - mtx_unlock(dvlp); - if (dvlp2 != NULL) - mtx_unlock(dvlp2); - cache_free(ncp); - } else { - vn_seqc_write_begin(dvp); - dvp->v_cache_dd = NULL; - vn_seqc_write_end(dvp); - mtx_unlock(dvlp); - if (dvlp2 != NULL) - mtx_unlock(dvlp2); - } - SDT_PROBE2(vfs, namecache, removecnp, hit, dvp, cnp); - return (1); - } - - hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp); - blp = HASH2BUCKETLOCK(hash); -retry: - if (CK_SLIST_EMPTY(NCHHASH(hash))) - goto out_no_entry; - - mtx_lock(blp); - - CK_SLIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { - if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen && - !bcmp(ncp->nc_name, cnp->cn_nameptr, ncp->nc_nlen)) - break; - } - - /* We failed to find an entry */ - if (ncp == NULL) { - mtx_unlock(blp); - goto out_no_entry; - } - - error = cache_zap_locked_bucket(ncp, cnp, hash, blp); - if (__predict_false(error != 0)) { - zap_and_exit_bucket_fail++; - goto retry; - } - counter_u64_add(numposzaps, 1); - cache_free(ncp); - SDT_PROBE2(vfs, namecache, removecnp, hit, dvp, cnp); - return (1); -out_no_entry: - SDT_PROBE2(vfs, namecache, removecnp, miss, dvp, cnp); - counter_u64_add(nummisszap, 1); - return (0); -} - /** * Lookup a name in the name cache * @@ -1504,6 +1477,8 @@ out_no_entry: * that was current when the cache entry was created, unless cnp * was ".". * + * Either both tsp and ticks have to be provided or neither of them. + * * # Returns * * - -1: A positive cache hit. vpp will contain the desired vnode. @@ -1543,7 +1518,6 @@ retry: break; } - /* We failed to find an entry */ if (__predict_false(ncp == NULL)) { mtx_unlock(blp); SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr, @@ -1555,18 +1529,10 @@ retry: if (ncp->nc_flag & NCF_NEGATIVE) goto negative_success; - /* We found a "positive" match, return the vnode */ counter_u64_add(numposhits, 1); *vpp = ncp->nc_vp; - CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p", - dvp, cnp->cn_nameptr, *vpp, ncp); - SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ncp->nc_name, - *vpp); + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ncp->nc_name, *vpp); cache_out_ts(ncp, tsp, ticksp); - /* - * On success we return a locked and ref'd vnode as per the lookup - * protocol. - */ MPASS(dvp != *vpp); vs = vget_prep(*vpp); mtx_unlock(blp); @@ -1575,14 +1541,8 @@ retry: *vpp = NULL; goto retry; } - if ((cnp->cn_flags & ISLASTCN) && - (cnp->cn_lkflags & LK_TYPE_MASK) == LK_EXCLUSIVE) { - ASSERT_VOP_ELOCKED(*vpp, "cache_lookup"); - } return (-1); - negative_success: - /* We found a negative match, and want to create it, so purge */ if (__predict_false(cnp->cn_nameiop == CREATE)) { if (cnp->cn_flags & ISLASTCN) { counter_u64_add(numnegzaps, 1); @@ -1651,7 +1611,6 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st break; } - /* We failed to find an entry */ if (__predict_false(ncp == NULL)) { vfs_smr_exit(); SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr, @@ -1664,18 +1623,10 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st if (nc_flag & NCF_NEGATIVE) goto negative_success; - /* We found a "positive" match, return the vnode */ counter_u64_add(numposhits, 1); *vpp = ncp->nc_vp; - CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p", - dvp, cnp->cn_nameptr, *vpp, ncp); - SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ncp->nc_name, - *vpp); + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ncp->nc_name, *vpp); cache_out_ts(ncp, tsp, ticksp); - /* - * On success we return a locked and ref'd vnode as per the lookup - * protocol. - */ MPASS(dvp != *vpp); if (!cache_ncp_canuse(ncp)) { vfs_smr_exit(); @@ -1693,12 +1644,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st *vpp = NULL; goto out_fallback; } - if ((cnp->cn_flags & ISLASTCN) && - (cnp->cn_lkflags & LK_TYPE_MASK) == LK_EXCLUSIVE) { - ASSERT_VOP_ELOCKED(*vpp, "cache_lookup"); - } return (-1); - negative_success: if (__predict_false(cnp->cn_nameiop == CREATE)) { if (cnp->cn_flags & ISLASTCN) { @@ -1712,7 +1658,8 @@ negative_success: counter_u64_add(numneghits, 1); whiteout = (ncp->nc_flag & NCF_WHITE); /* - * We need to take locks to promote an entry. + * TODO: We need to take locks to promote an entry. Code doing it + * in SMR lookup can be modified to be shared. */ negstate = NCP2NEGSTATE(ncp); if ((negstate->neg_flag & NEG_HOT) == 0 || @@ -1850,8 +1797,7 @@ cache_unlock_buckets_cel(struct celockstate *cel) * * This means vnodelocks for dvp, vp and the relevant bucketlock. * However, insertion can result in removal of an old entry. In this - * case we have an additional vnode and bucketlock pair to lock. If the - * entry is negative, ncelock is locked instead of the vnode. + * case we have an additional vnode and bucketlock pair to lock. * * That is, in the worst case we have to lock 3 vnodes and 2 bucketlocks, while * preserving the locking order (smaller address first). @@ -1986,7 +1932,6 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, int len; u_long lnumcache; - CTR3(KTR_VFS, "cache_enter(%p, %p, %s)", dvp, vp, cnp->cn_nameptr); VNPASS(!VN_IS_DOOMED(dvp), dvp); VNPASS(dvp->v_type != VNON, dvp); if (vp != NULL) { @@ -2416,7 +2361,6 @@ cache_purge_negative(struct vnode *vp) struct namecache *ncp, *nnp; struct mtx *vlp; - CTR1(KTR_VFS, "cache_purge_negative(%p)", vp); SDT_PROBE1(vfs, namecache, purge_negative, done, vp); if (LIST_EMPTY(&vp->v_cache_src)) return; From owner-svn-src-all@freebsd.org Thu Aug 27 06:31:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A6553C8E0E; Thu, 27 Aug 2020 06:31:56 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcXvJ2G0hz4FQt; Thu, 27 Aug 2020 06:31:56 +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 300201FD22; Thu, 27 Aug 2020 06:31:56 +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 07R6VuTW051194; Thu, 27 Aug 2020 06:31:56 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07R6Vudd051193; Thu, 27 Aug 2020 06:31:56 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202008270631.07R6Vudd051193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 27 Aug 2020 06:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364858 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 06:31:56 -0000 Author: mjg Date: Thu Aug 27 06:31:55 2020 New Revision: 364858 URL: https://svnweb.freebsd.org/changeset/base/364858 Log: cache: don't update timestmaps on found entry Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Thu Aug 27 06:31:27 2020 (r364857) +++ head/sys/kern/vfs_cache.c Thu Aug 27 06:31:55 2020 (r364858) @@ -1925,7 +1925,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, { struct celockstate cel; struct namecache *ncp, *n2, *ndd; - struct namecache_ts *ncp_ts, *n2_ts; + struct namecache_ts *ncp_ts; struct nchashhead *ncpp; uint32_t hash; int flag; @@ -2013,6 +2013,17 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, KASSERT(n2->nc_vp == vp, ("%s: found entry pointing to a different vnode (%p != %p)", __func__, n2->nc_vp, vp)); + /* + * Entries are supposed to be immutable unless in the + * process of getting destroyed. Accommodating for + * changing timestamps is possible but not worth it. + * This should be harmless in terms of correctness, in + * the worst case resulting in an earlier expiration. + * Alternatively, the found entry can be replaced + * altogether. + */ + MPASS((n2->nc_flag & (NCF_TS | NCF_DTS)) == (ncp->nc_flag & (NCF_TS | NCF_DTS))); +#if 0 if (tsp != NULL) { KASSERT((n2->nc_flag & NCF_TS) != 0, ("no NCF_TS")); @@ -2024,6 +2035,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, n2_ts->nc_nc.nc_flag |= NCF_DTS; } } +#endif goto out_unlock_free; } } From owner-svn-src-all@freebsd.org Thu Aug 27 08:08:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5BA173CAE30; Thu, 27 Aug 2020 08:08:50 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcb361m6zz4L0p; Thu, 27 Aug 2020 08:08:50 +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 1FA3A20CBC; Thu, 27 Aug 2020 08:08:50 +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 07R88oeM011669; Thu, 27 Aug 2020 08:08:50 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07R88nQE011668; Thu, 27 Aug 2020 08:08:49 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202008270808.07R88nQE011668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 27 Aug 2020 08:08:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364859 - head/sys/arm/ti X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/ti X-SVN-Commit-Revision: 364859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 08:08:50 -0000 Author: manu Date: Thu Aug 27 08:08:49 2020 New Revision: 364859 URL: https://svnweb.freebsd.org/changeset/base/364859 Log: arm: ti: Fix Beaglebone black MMC after DTS update After DTS sync with Linux kernel 5.8 this patch was included: "ARM: dts: Move am33xx and am43xx mmc nodes to sdhci-omap driver" https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/am33xx-l4.dtsi?h=v5.9-rc2&id=0b4edf111870b83ea77b1d7e16b8ceac29f9f388 Current will not load any driver for MMC and not mount the rootfs. Simple patch add "ti,am335-sdhci" to compability strings in ti_sdhci.c Submitted by: oskar.holmlund@ohdata.se Reported by: phk X-MFC-With: 363853 Modified: head/sys/arm/ti/ti_sdhci.c Modified: head/sys/arm/ti/ti_sdhci.c ============================================================================== --- head/sys/arm/ti/ti_sdhci.c Thu Aug 27 06:31:55 2020 (r364858) +++ head/sys/arm/ti/ti_sdhci.c Thu Aug 27 08:08:49 2020 (r364859) @@ -93,6 +93,7 @@ struct ti_sdhci_softc { * Note that vendor Beaglebone dtsi files use "ti,omap3-hsmmc" for the am335x. */ static struct ofw_compat_data compat_data[] = { + {"ti,am335-sdhci", 1}, {"ti,omap3-hsmmc", 1}, {"ti,omap4-hsmmc", 1}, {"ti,mmchs", 1}, From owner-svn-src-all@freebsd.org Thu Aug 27 08:10:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAD053CAD78; Thu, 27 Aug 2020 08:10:08 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcb4c0gwpz4LMq; Thu, 27 Aug 2020 08:10:07 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1598515800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1p9q29ydXi/Cf/8MJTfIzu7YzW3aKcsyVuNLicTwDlk=; b=GADf6cigohvccq/rvvWJXRh1kObrmYu0IBzZqmVhplxvaur2Ecz05dvz9+TWeV+7w5MElr RstDHBPq/mjZnuN7pZLCMgcOdC5U6BSDEPLwO6pzB+bfMDXJJnMLr8XIu6ffxOLM7vM0Dc tWs3tVRBY0KngXtoQCmcWFnKTnR/KtA= Received: from amy.home (lfbn-idf2-1-1138-237.w90-92.abo.wanadoo.fr [90.92.20.237]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 2889ed38 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 27 Aug 2020 08:09:59 +0000 (UTC) Date: Thu, 27 Aug 2020 10:09:59 +0200 From: Emmanuel Vadot To: Emmanuel Vadot Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364859 - head/sys/arm/ti Message-Id: <20200827100959.a8ff47ba248c3d8a44402175@bidouilliste.com> In-Reply-To: <202008270808.07R88nQE011668@repo.freebsd.org> References: <202008270808.07R88nQE011668@repo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Bcb4c0gwpz4LMq X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 08:10:08 -0000 On Thu, 27 Aug 2020 08:08:49 +0000 (UTC) Emmanuel Vadot wrote: > Author: manu > Date: Thu Aug 27 08:08:49 2020 > New Revision: 364859 > URL: https://svnweb.freebsd.org/changeset/base/364859 > > Log: > arm: ti: Fix Beaglebone black MMC after DTS update > > After DTS sync with Linux kernel 5.8 this patch was included: > "ARM: dts: Move am33xx and am43xx mmc nodes to sdhci-omap driver" > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/am33xx-l4.dtsi?h=v5.9-rc2&id=0b4edf111870b83ea77b1d7e16b8ceac29f9f388 > > Current will not load any driver for MMC and not mount the rootfs. > Simple patch add "ti,am335-sdhci" to compability strings in ti_sdhci.c > > Submitted by: oskar.holmlund@ohdata.se > Reported by: phk > X-MFC-With: 363853 Differential Revision: https://reviews.freebsd.org/D26194 > > Modified: > head/sys/arm/ti/ti_sdhci.c > > Modified: head/sys/arm/ti/ti_sdhci.c > ============================================================================== > --- head/sys/arm/ti/ti_sdhci.c Thu Aug 27 06:31:55 2020 (r364858) > +++ head/sys/arm/ti/ti_sdhci.c Thu Aug 27 08:08:49 2020 (r364859) > @@ -93,6 +93,7 @@ struct ti_sdhci_softc { > * Note that vendor Beaglebone dtsi files use "ti,omap3-hsmmc" for the am335x. > */ > static struct ofw_compat_data compat_data[] = { > + {"ti,am335-sdhci", 1}, > {"ti,omap3-hsmmc", 1}, > {"ti,omap4-hsmmc", 1}, > {"ti,mmchs", 1}, -- Emmanuel Vadot From owner-svn-src-all@freebsd.org Thu Aug 27 08:54:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E4403CB9E2; Thu, 27 Aug 2020 08:54:07 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcc3L4PMLz4N4w; Thu, 27 Aug 2020 08:54:06 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f181.google.com with SMTP id w14so5542867ljj.4; Thu, 27 Aug 2020 01:54:06 -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:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=vlAjSTUAa0MC7qEW9AO0fAH1FtBM05QfssBMY6oklD0=; b=PXhdHp7xhGshL3DdYzxkNMvi+MKifvn3xOHov0NFh8afrnVJVdo9lWdU5uy+D/Snsh JcdAEx83EJUXj2snWxKGxlu88/L4YajE89czxFi5Fw26slC8ODgI/NQ/vFhFkx8JpLmR qxU/RDmTngi08qRNUJ1MmvFre0te3dhBplOSSJwppH3umZio0xPNZMRsqiB4B5PslMGn 7GF66ls43Pimx02/BQmfximr+gHJ2JR3OkZZ0xrXd18bnqo3xi84acgm6GVDC0mk0Syn 1/Ys2rjzPPFt+G+X94Cn4um1ZeH6HcSLIO5NRPzWd6BzeZOA82bs+oheaMLgNr5V8eMw 03pQ== X-Gm-Message-State: AOAM532Q2UXV2KEr7J/UDeVeqleogg0wRE/2jF0FxJ2+CSD0eXXczE3d Lpw1//JF7ARjrvjlrq0I79j0Iun1AOE= X-Google-Smtp-Source: ABdhPJyzbd2+hoq0rd+I3kTBFJTTGp6Zjvy5RHbsCaivdpERpP/gyoN3Ey8oIxWrnxh/Jh6+9rwOtw== X-Received: by 2002:a2e:8904:: with SMTP id d4mr8568602lji.400.1598518444240; Thu, 27 Aug 2020 01:54:04 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id 7sm330821ljf.38.2020.08.27.01.54.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Aug 2020 01:54:03 -0700 (PDT) Subject: Re: svn commit: r364817 - head/libexec/rc/rc.d To: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202008261313.07QDDwRm040119@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABtB5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz6JAlQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryLkCDQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAYkCPAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> Date: Thu, 27 Aug 2020 11:54:02 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <202008261313.07QDDwRm040119@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Bcc3L4PMLz4N4w X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.208.181 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-0.80 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; ARC_NA(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.15)[-0.154]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-0.62)[-0.616]; NEURAL_HAM_SHORT(-0.03)[-0.030]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.181:from]; RECEIVED_SPAMHAUS_PBL(0.00)[93.72.151.96:received]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.181:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 08:54:07 -0000 On 26/08/2020 16:13, Cy Schubert wrote: > Author: cy > Date: Wed Aug 26 13:13:57 2020 > New Revision: 364817 > URL: https://svnweb.freebsd.org/changeset/base/364817 > > Log: > As of r364746 (OpenZFS import) existing ZPOOLs are not imported > prior to zvol and mountcritlocal resulting in ZVOLs (swap and I probably missed some discussion, so I am curious why that is. > virtual machine UFS filesystems) being unavailable, leading to > boot failures. > We move the zpool import from zfs to a new zpool script, with the > -N option to avoid mounting datasets while making the ZPOOL's > datasets available for "legacy" mount (mountpoint=legacy) and ZVOLs > available for subsequent use for swap (in the zvol rc sript) or > for UFS or other filesystems in fstab(5), mounted by mountcritlocal. > > Reviewed by: freqlabs (previous version) > Differential Revision: https://reviews.freebsd.org/D26185 > > Added: > head/libexec/rc/rc.d/zpool (contents, props changed) [snip] > +zpool_start() > +{ > + local cachefile > + > + for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do > + if [ -r $cachefile ]; then > + zpool import -c $cachefile -a -N I would add a break here, so that pools are imported either from one cache file or the other but not both. It makes sense to have two cache file definitions for migration, but I think that it does not make sense to split pools between the cache files. > + fi > + done > +} -- Andriy Gapon From owner-svn-src-all@freebsd.org Thu Aug 27 10:28:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 953B23CD5DE; Thu, 27 Aug 2020 10:28:13 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcf7x3Zh5z4Rcy; Thu, 27 Aug 2020 10:28:13 +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 5E110225D9; Thu, 27 Aug 2020 10:28:13 +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 07RASDF1004725; Thu, 27 Aug 2020 10:28:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RASCFB004722; Thu, 27 Aug 2020 10:28:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202008271028.07RASCFB004722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 27 Aug 2020 10:28:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364860 - in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf modules/linuxkpi X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys: compat/linuxkpi/common/include/linux compat/linuxkpi/common/src conf modules/linuxkpi X-SVN-Commit-Revision: 364860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 10:28:13 -0000 Author: hselasky Date: Thu Aug 27 10:28:12 2020 New Revision: 364860 URL: https://svnweb.freebsd.org/changeset/base/364860 Log: Implement extensible arrays API using the existing radix tree implementation in the LinuxKPI. Differential Revision: https://reviews.freebsd.org/D25101 Reviewed by: kib @ MFC after: 1 week Sponsored by: Mellanox Technologies Added: head/sys/compat/linuxkpi/common/include/linux/xarray.h (contents, props changed) head/sys/compat/linuxkpi/common/src/linux_xarray.c (contents, props changed) Modified: head/sys/conf/files head/sys/modules/linuxkpi/Makefile Added: head/sys/compat/linuxkpi/common/include/linux/xarray.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linuxkpi/common/include/linux/xarray.h Thu Aug 27 10:28:12 2020 (r364860) @@ -0,0 +1,94 @@ +/*- + * Copyright (c) 2020 Mellanox Technologies, Ltd. + * 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 unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ +#ifndef _LINUX_XARRAY_H_ +#define _LINUX_XARRAY_H_ + +#include +#include +#include + +#include +#include + +#define XA_LIMIT(min, max) \ + ({ CTASSERT((min) == 0); (uint32_t)(max); }) + +#define XA_FLAGS_ALLOC (1U << 0) +#define XA_FLAGS_LOCK_IRQ (1U << 1) + +#define XA_ERROR(x) \ + ERR_PTR(x) + +#define xa_limit_32b XA_LIMIT(0, 0xFFFFFFFF) + +#define XA_ASSERT_LOCKED(xa) mtx_assert(&(xa)->mtx, MA_OWNED) +#define xa_lock(xa) mtx_lock(&(xa)->mtx) +#define xa_unlock(xa) mtx_unlock(&(xa)->mtx) + +struct xarray { + struct radix_tree_root root; + struct mtx mtx; /* internal mutex */ +}; + +/* + * Extensible arrays API implemented as a wrapper + * around the radix tree implementation. + */ +void *xa_erase(struct xarray *, uint32_t); +void *xa_load(struct xarray *, uint32_t); +int xa_alloc(struct xarray *, uint32_t *, void *, uint32_t, gfp_t); +int xa_alloc_cyclic(struct xarray *, uint32_t *, void *, uint32_t, uint32_t *, gfp_t); +int xa_insert(struct xarray *, uint32_t, void *, gfp_t); +void *xa_store(struct xarray *, uint32_t, void *, gfp_t); +void xa_init_flags(struct xarray *, uint32_t); +bool xa_empty(struct xarray *); +void xa_destroy(struct xarray *); +void *xa_next(struct xarray *, unsigned long *, bool); + +#define xa_for_each(xa, index, entry) \ + for ((entry) = NULL, (index) = 0; \ + ((entry) = xa_next(xa, &index, (entry) != NULL)) != NULL; ) + +/* + * Unlocked version of functions above. + */ +void *__xa_erase(struct xarray *, uint32_t); +int __xa_alloc(struct xarray *, uint32_t *, void *, uint32_t, gfp_t); +int __xa_alloc_cyclic(struct xarray *, uint32_t *, void *, uint32_t, uint32_t *, gfp_t); +int __xa_insert(struct xarray *, uint32_t, void *, gfp_t); +void *__xa_store(struct xarray *, uint32_t, void *, gfp_t); +bool __xa_empty(struct xarray *); +void *__xa_next(struct xarray *, unsigned long *, bool); + +static inline int +xa_err(void *ptr) +{ + return (PTR_ERR_OR_ZERO(ptr)); +} + +#endif /* _LINUX_XARRAY_H_ */ Added: head/sys/compat/linuxkpi/common/src/linux_xarray.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linuxkpi/common/src/linux_xarray.c Thu Aug 27 10:28:12 2020 (r364860) @@ -0,0 +1,391 @@ +/*- + * Copyright (c) 2020 Mellanox Technologies, Ltd. + * 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 unmodified, 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include + +/* + * This function removes the element at the given index and returns + * the pointer to the removed element, if any. + */ +void * +__xa_erase(struct xarray *xa, uint32_t index) +{ + XA_ASSERT_LOCKED(xa); + + return (radix_tree_delete(&xa->root, index)); +} + +void * +xa_erase(struct xarray *xa, uint32_t index) +{ + void *retval; + + xa_lock(xa); + retval = __xa_erase(xa, index); + xa_unlock(xa); + + return (retval); +} + +/* + * This function returns the element pointer at the given index. A + * value of NULL is returned if the element does not exist. + */ +void * +xa_load(struct xarray *xa, uint32_t index) +{ + void *retval; + + xa_lock(xa); + retval = radix_tree_lookup(&xa->root, index); + xa_unlock(xa); + + return (retval); +} + +/* + * This is an internal function used to sleep until more memory + * becomes available. + */ +static void +xa_vm_wait_locked(struct xarray *xa) +{ + xa_unlock(xa); + vm_wait(NULL); + xa_lock(xa); +} + +/* + * This function iterates the xarray until it finds a free slot where + * it can insert the element pointer to by "ptr". It starts at the + * index pointed to by "pindex" and updates this value at return. The + * "mask" argument defines the maximum index allowed, inclusivly, and + * must be a power of two minus one value. The "gfp" argument + * basically tells if we can wait for more memory to become available + * or not. This function returns zero upon success or a negative error + * code on failure. A typical error code is -ENOMEM which means either + * the xarray is full, or there was not enough internal memory + * available to complete the radix tree insertion. + */ +int +__xa_alloc(struct xarray *xa, uint32_t *pindex, void *ptr, uint32_t mask, gfp_t gfp) +{ + int retval; + + XA_ASSERT_LOCKED(xa); + + /* mask cannot be zero */ + MPASS(mask != 0); + + /* mask can be any power of two value minus one */ + MPASS((mask & (mask + 1)) == 0); + + *pindex = 0; +retry: + retval = radix_tree_insert(&xa->root, *pindex, ptr); + + switch (retval) { + case -EEXIST: + if (likely(*pindex != mask)) { + (*pindex)++; + goto retry; + } + retval = -ENOMEM; + break; + case -ENOMEM: + if (likely(gfp & M_WAITOK)) { + xa_vm_wait_locked(xa); + goto retry; + } + break; + default: + break; + } + return (retval); +} + +int +xa_alloc(struct xarray *xa, uint32_t *pindex, void *ptr, uint32_t mask, gfp_t gfp) +{ + int retval; + + xa_lock(xa); + retval = __xa_alloc(xa, pindex, ptr, mask, gfp); + xa_unlock(xa); + + return (retval); +} + +/* + * This function works the same like the "xa_alloc" function, except + * it wraps the next index value to zero when there are no entries + * left at the end of the xarray searching for a free slot from the + * beginning of the array. If the xarray is full -ENOMEM is returned. + */ +int +__xa_alloc_cyclic(struct xarray *xa, uint32_t *pindex, void *ptr, uint32_t mask, + uint32_t *pnext_index, gfp_t gfp) +{ + int retval; + int timeout = 1; + + XA_ASSERT_LOCKED(xa); + + /* mask cannot be zero */ + MPASS(mask != 0); + + /* mask can be any power of two value minus one */ + MPASS((mask & (mask + 1)) == 0); + + *pnext_index = 0; +retry: + retval = radix_tree_insert(&xa->root, *pnext_index, ptr); + + switch (retval) { + case -EEXIST: + if (unlikely(*pnext_index == mask) && !timeout--) { + retval = -ENOMEM; + break; + } + (*pnext_index)++; + (*pnext_index) &= mask; + goto retry; + case -ENOMEM: + if (likely(gfp & M_WAITOK)) { + xa_vm_wait_locked(xa); + goto retry; + } + break; + default: + break; + } + *pindex = *pnext_index; + + return (retval); +} + +int +xa_alloc_cyclic(struct xarray *xa, uint32_t *pindex, void *ptr, uint32_t mask, + uint32_t *pnext_index, gfp_t gfp) +{ + int retval; + + xa_lock(xa); + retval = __xa_alloc_cyclic(xa, pindex, ptr, mask, pnext_index, gfp); + xa_unlock(xa); + + return (retval); +} + +/* + * This function tries to insert an element at the given index. The + * "gfp" argument basically decides of this function can sleep or not + * trying to allocate internal memory for its radix tree. The + * function returns an error code upon failure. Typical error codes + * are element exists (-EEXIST) or out of memory (-ENOMEM). + */ +int +__xa_insert(struct xarray *xa, uint32_t index, void *ptr, gfp_t gfp) +{ + int retval; + + XA_ASSERT_LOCKED(xa); +retry: + retval = radix_tree_insert(&xa->root, index, ptr); + + switch (retval) { + case -ENOMEM: + if (likely(gfp & M_WAITOK)) { + xa_vm_wait_locked(xa); + goto retry; + } + break; + default: + break; + } + return (retval); +} + +int +xa_insert(struct xarray *xa, uint32_t index, void *ptr, gfp_t gfp) +{ + int retval; + + xa_lock(xa); + retval = __xa_insert(xa, index, ptr, gfp); + xa_unlock(xa); + + return (retval); +} + +/* + * This function updates the element at the given index and returns a + * pointer to the old element. The "gfp" argument basically decides of + * this function can sleep or not trying to allocate internal memory + * for its radix tree. The function returns an XA_ERROR() pointer code + * upon failure. Code using this function must always check if the + * return value is an XA_ERROR() code before using the returned value. + */ +void * +__xa_store(struct xarray *xa, uint32_t index, void *ptr, gfp_t gfp) +{ + int retval; + + XA_ASSERT_LOCKED(xa); +retry: + retval = radix_tree_store(&xa->root, index, &ptr); + + switch (retval) { + case 0: + break; + case -ENOMEM: + if (likely(gfp & M_WAITOK)) { + xa_vm_wait_locked(xa); + goto retry; + } + ptr = XA_ERROR(retval); + break; + default: + ptr = XA_ERROR(retval); + break; + } + return (ptr); +} + +void * +xa_store(struct xarray *xa, uint32_t index, void *ptr, gfp_t gfp) +{ + void *retval; + + xa_lock(xa); + retval = __xa_store(xa, index, ptr, gfp); + xa_unlock(xa); + + return (retval); +} + +/* + * This function initialize an xarray structure. + */ +void +xa_init_flags(struct xarray *xa, uint32_t flags) +{ + memset(xa, 0, sizeof(*xa)); + + mtx_init(&xa->mtx, "lkpi-xarray", NULL, MTX_DEF | MTX_RECURSE); + xa->root.gfp_mask = GFP_NOWAIT; +} + +/* + * This function destroys an xarray structure and all its internal + * memory and locks. + */ +void +xa_destroy(struct xarray *xa) +{ + struct radix_tree_iter iter; + void **ppslot; + + radix_tree_for_each_slot(ppslot, &xa->root, &iter, 0) + radix_tree_iter_delete(&xa->root, &iter, ppslot); + mtx_destroy(&xa->mtx); +} + +/* + * This function checks if an xarray is empty or not. + * It returns true if empty, else false. + */ +bool +__xa_empty(struct xarray *xa) +{ + struct radix_tree_iter iter = {}; + void **temp; + + XA_ASSERT_LOCKED(xa); + + return (!radix_tree_iter_find(&xa->root, &iter, &temp)); +} + +bool +xa_empty(struct xarray *xa) +{ + bool retval; + + xa_lock(xa); + retval = __xa_empty(xa); + xa_unlock(xa); + + return (retval); +} + +/* + * This function returns the next valid xarray entry based on the + * index given by "pindex". The valued pointed to by "pindex" is + * updated before return. + */ +void * +__xa_next(struct xarray *xa, unsigned long *pindex, bool not_first) +{ + struct radix_tree_iter iter = { .index = *pindex }; + void **ppslot; + void *retval; + bool found; + + XA_ASSERT_LOCKED(xa); + + if (not_first) { + /* advance to next index, if any */ + iter.index++; + if (iter.index == 0) + return (NULL); + } + + found = radix_tree_iter_find(&xa->root, &iter, &ppslot); + if (likely(found)) { + retval = *ppslot; + *pindex = iter.index; + } else { + retval = NULL; + } + return (retval); +} + +void * +xa_next(struct xarray *xa, unsigned long *pindex, bool not_first) +{ + void *retval; + + xa_lock(xa); + retval = __xa_next(xa, pindex, not_first); + xa_unlock(xa); + + return (retval); +} Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Aug 27 08:08:49 2020 (r364859) +++ head/sys/conf/files Thu Aug 27 10:28:12 2020 (r364860) @@ -4534,6 +4534,8 @@ compat/linuxkpi/common/src/linux_usb.c optional compa compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_work.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_xarray.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_seq_file.c optional compat_linuxkpi | lindebugfs \ compile-with "${LINUXKPI_C}" Modified: head/sys/modules/linuxkpi/Makefile ============================================================================== --- head/sys/modules/linuxkpi/Makefile Thu Aug 27 08:08:49 2020 (r364859) +++ head/sys/modules/linuxkpi/Makefile Thu Aug 27 10:28:12 2020 (r364860) @@ -19,7 +19,8 @@ SRCS= linux_compat.c \ linux_slab.c \ linux_tasklet.c \ linux_usb.c \ - linux_work.c + linux_work.c \ + linux_xarray.c SRCS+= ${LINUXKPI_GENSRCS} From owner-svn-src-all@freebsd.org Thu Aug 27 13:05:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F2E8A3B0B97; Thu, 27 Aug 2020 13:05:41 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcjdd6B2tz4ZkV; Thu, 27 Aug 2020 13:05:41 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8AF624792; Thu, 27 Aug 2020 13:05:41 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07RD5fCI003234; Thu, 27 Aug 2020 13:05:41 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RD5fCL003233; Thu, 27 Aug 2020 13:05:41 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202008271305.07RD5fCL003233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Thu, 27 Aug 2020 13:05:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364861 - in head: cddl/lib/libzfs share/mk X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in head: cddl/lib/libzfs share/mk X-SVN-Commit-Revision: 364861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 13:05:42 -0000 Author: freqlabs Date: Thu Aug 27 13:05:41 2020 New Revision: 364861 URL: https://svnweb.freebsd.org/changeset/base/364861 Log: libzfs: Add missing crypto dependency libzfs_crypto.c uses PKCS5_PBKDF2_HMAC_SHA1 from libcrypto. Reported by: John Kennedy Sponsored by: iXsystems, Inc. Modified: head/cddl/lib/libzfs/Makefile head/share/mk/src.libnames.mk Modified: head/cddl/lib/libzfs/Makefile ============================================================================== --- head/cddl/lib/libzfs/Makefile Thu Aug 27 10:28:12 2020 (r364860) +++ head/cddl/lib/libzfs/Makefile Thu Aug 27 13:05:41 2020 (r364861) @@ -12,7 +12,21 @@ PACKAGE= runtime LIB= zfs -LIBADD= md pthread umem util uutil m avl bsdxml geom nvpair z zfs_core zutil +LIBADD= \ + avl \ + bsdxml \ + crypto \ + geom \ + m \ + md \ + nvpair \ + pthread \ + umem \ + util \ + uutil \ + z \ + zfs_core \ + zutil INCS= libzfs.h USER_C = \ Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Thu Aug 27 10:28:12 2020 (r364860) +++ head/share/mk/src.libnames.mk Thu Aug 27 13:05:41 2020 (r364861) @@ -382,7 +382,7 @@ _DP_fifolog= z _DP_ipf= kvm _DP_tpool= spl _DP_uutil= avl spl -_DP_zfs= md pthread umem util uutil m avl bsdxml geom nvpair \ +_DP_zfs= md pthread umem util uutil m avl bsdxml crypto geom nvpair \ z zfs_core zutil _DP_zfs_core= nvpair _DP_zpool= md pthread z icp spl nvpair avl umem From owner-svn-src-all@freebsd.org Thu Aug 27 13:12:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E13BD3B127A; Thu, 27 Aug 2020 13:12:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcjnW5hgxz4Zy8; Thu, 27 Aug 2020 13:12:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id A65F52B4E1; Thu, 27 Aug 2020 13:12:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f177.google.com with SMTP id n129so5769572qkd.6; Thu, 27 Aug 2020 06:12:31 -0700 (PDT) X-Gm-Message-State: AOAM530CiufwmsJnAvMkYjmPKRDXY+peayCfeUfmxk+uroaVItXvnNeX TEHhcrBN1dFZBJI3oHu3omBxGshJYHJXBb+ByGA= X-Google-Smtp-Source: ABdhPJz1IIpmnL9hc0IC4RIpGikWFJwDIUSOEfYyeVX+0BsoFfPO6xIvUKBrCPBXhshHFylsatpSO9f3HHMk/FyrvLY= X-Received: by 2002:a05:620a:12ef:: with SMTP id f15mr19280670qkl.120.1598533951329; Thu, 27 Aug 2020 06:12:31 -0700 (PDT) MIME-Version: 1.0 References: <202008271305.07RD5fCL003233@repo.freebsd.org> In-Reply-To: <202008271305.07RD5fCL003233@repo.freebsd.org> From: Kyle Evans Date: Thu, 27 Aug 2020 08:12:19 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r364861 - in head: cddl/lib/libzfs share/mk To: Ryan Moeller Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 13:12:31 -0000 On Thu, Aug 27, 2020 at 8:05 AM Ryan Moeller wrote: > > Author: freqlabs > Date: Thu Aug 27 13:05:41 2020 > New Revision: 364861 > URL: https://svnweb.freebsd.org/changeset/base/364861 > > Log: > libzfs: Add missing crypto dependency > > libzfs_crypto.c uses PKCS5_PBKDF2_HMAC_SHA1 from libcrypto. > Hmm, interesting; I think this needs an __L dependency in ^/Makefile.inc1 as well, since they're both part of _prebuild_libs if MK_CRYPT+MK_OPENSSL+MK_ZFS. From owner-svn-src-all@freebsd.org Thu Aug 27 13:20:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E0F873B1827; Thu, 27 Aug 2020 13:20:13 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcjyP5k1Mz4bmb; Thu, 27 Aug 2020 13:20:13 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p4fd3a495.dip0.t-ipconnect.de [79.211.164.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 517E32ACE0; Thu, 27 Aug 2020 13:20:13 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Thu, 27 Aug 2020 15:20:14 +0200 From: Gordon Bergling To: Hiroki Sato Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364449 - head/bin/ls Message-ID: <20200827132014.GA65182@lion.0xfce3.net> References: <202008210620.07L6KC6M091289@repo.freebsd.org> <20200822.194438.808130473746317382.hrs@FreeBSD.org> <20200824085223.GA28970@lion.0xfce3.net> <20200825.232147.141648624023404568.hrs@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IJpNTDwzlM2Ie8A6" Content-Disposition: inline In-Reply-To: <20200825.232147.141648624023404568.hrs@FreeBSD.org> X-Url: X-Operating-System: FreeBSD 12.1-STABLE amd64 X-Host-Uptime: 2:17PM up 15 days, 15:46, 3 users, load averages: 4.06, 4.07, 4.03 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 13:20:13 -0000 --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 25, 2020 at 11:21:47PM +0900, Hiroki Sato wrote: > Gordon Bergling wrote > in <20200824085223.GA28970@lion.0xfce3.net>: >=20 > gb> thanks for your feedback. I can only define POSIX.1-200{1,8} or -susv= 4. So what > gb> do you think about the following STANDARDS section? > gb>=20 > gb> For the options that are non-existing I could correct them to -2001 a= nd mention > gb> also -susv4. > gb>=20 > gb> STANDARDS > gb> With the exception of options -g, -n and -o, the ls utility conf= orms to > gb> IEEE Std 1003.1-2001 (=E2=80=9CPOSIX.1=E2=80=9D) and Version=C2= =A04 of the Single UNIX > gb> Specification (=E2=80=9CSUSv4=E2=80=9D). The options -B, -D, -G= , -I, -T, -U, -W, -Z, -b, > gb> -h, -w, -y and -, are compatible extensions not defined in IEEE = Std > gb> 1003.1-2001 (=E2=80=9CPOSIX.1=E2=80=9D). >=20 > It might be a bit tedious, but just adding -2008 looks good to me > like the following: >=20 > |.St -p1003.1-2001 > |and > |.St -p1003.1-2008 . >=20 > p1003.1-2004 is a subset of SUSv3 (and -2008 is one of SUSv4), so > using p1003.1-YYYY consistently sounds less confusing when describing > the conformance within the subsets. >=20 > Regarding the non-standard extensions, I am not sure what > "compatible" means. Some of them are extensions commonly seen on > other BSD-derived OSes, some are available only on FreeBSD, and some > have the same names with GNU's counterpart but different meanings. > Is just mentioning "...are non-standard extensions" with no > specification name sufficient and easier? I have no strong opinion > on that part, but this is just my two cents. >=20 > -- Hiroki I followed your suggestions and created the following differential for further discussions. https://reviews.freebsd.org/D26210 --Gordon --IJpNTDwzlM2Ie8A6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEEYbWI0KY5X7yH/Fy4OQX2V8rP09wFAl9HswxfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDYx QjU4OEQwQTYzOTVGQkM4N0ZDNUNCODM5MDVGNjU3Q0FDRkQzREMACgkQOQX2V8rP 09zYpAgAvq9kQo4AgQwWdfnwkHj1mrZL4PYi3wVPSsq9Dmf4hBBtmLjkrjiE5iOy 1FoHgZl576Sr6GOAGWVVay8mdBMjCc2rPudZHcxmQ9cmKthyO4Iby1R46tpXuvU0 DvehfLfIq7dKpDq61kVFj1ldi8W7iCmJ3J8UzhAdZYbd+uE4zL9vX49t6oWpwJCS 5EMt86p9dL9pT3OJz4DZN9cNCk4W+qEupRj6GFXr4l8eTXnhiUwBOI5vbzTPhIXK x0j8RRxPORO6egseyR4+zA/ocwRnPjuIBSAQndSWUOhYvtPkUHhhxAe8CYqpxdJv lZsr501gum2Kcp5Jxfq+1U1nxUvPdw== =eXIV -----END PGP SIGNATURE----- --IJpNTDwzlM2Ie8A6-- From owner-svn-src-all@freebsd.org Thu Aug 27 13:26:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 991FD3B1762; Thu, 27 Aug 2020 13:26:37 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bck5n3ffXz4cWZ; Thu, 27 Aug 2020 13:26:37 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6043924847; Thu, 27 Aug 2020 13:26:37 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07RDQbDK016045; Thu, 27 Aug 2020 13:26:37 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RDQbGd016044; Thu, 27 Aug 2020 13:26:37 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202008271326.07RDQbGd016044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Thu, 27 Aug 2020 13:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364863 - head X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 364863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 13:26:37 -0000 Author: freqlabs Date: Thu Aug 27 13:26:36 2020 New Revision: 364863 URL: https://svnweb.freebsd.org/changeset/base/364863 Log: libzfs: Also add the crypto dependency to Makefile.inc1 Reported by: kevans Discussed with: kevans Sponsored by: iXsystems, Inc. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Aug 27 13:25:24 2020 (r364862) +++ head/Makefile.inc1 Thu Aug 27 13:26:36 2020 (r364863) @@ -2929,6 +2929,7 @@ cddl/lib/libzfs__L: cddl/lib/libzfs_core__L lib/msun__ cddl/lib/libzfs__L: lib/libthr__L lib/libmd__L lib/libz__L cddl/lib/libumem__L cddl/lib/libzfs__L: cddl/lib/libuutil__L cddl/lib/libavl__L lib/libgeom__L cddl/lib/libzfs__L: cddl/lib/libnvpair__L cddl/lib/libzutil__L +cddl/lib/libzfs__L: secure/lib/libcrypto__L lib/libbe__L: cddl/lib/libzfs__L .endif From owner-svn-src-all@freebsd.org Thu Aug 27 13:38:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 90E003B2493; Thu, 27 Aug 2020 13:38:21 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BckMK3HVNz4dZK; Thu, 27 Aug 2020 13:38:21 +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 54C7024AA9; Thu, 27 Aug 2020 13:38:21 +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 07RDcLx0022100; Thu, 27 Aug 2020 13:38:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RDcL52022099; Thu, 27 Aug 2020 13:38:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202008271338.07RDcL52022099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 27 Aug 2020 13:38:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364865 - stable/12/sys/cam/scsi X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/sys/cam/scsi X-SVN-Commit-Revision: 364865 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 13:38:21 -0000 Author: avg Date: Thu Aug 27 13:38:20 2020 New Revision: 364865 URL: https://svnweb.freebsd.org/changeset/base/364865 Log: MFC r354621-r354623 by imp: scsi_da state machine improvements r354621 Require and enforce that dareprobe() has to be called with the periph lock held. r354622 Update the softc state of the da driver before releasing the CCB. r354623 Add asserts for some state transitions Modified: stable/12/sys/cam/scsi/scsi_da.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/12/sys/cam/scsi/scsi_da.c Thu Aug 27 13:33:21 2020 (r364864) +++ stable/12/sys/cam/scsi/scsi_da.c Thu Aug 27 13:38:20 2020 (r364865) @@ -2130,8 +2130,8 @@ daasync(void *callback_arg, u_int32_t code, "Capacity data has changed\n"); cam_periph_lock(periph); softc->flags &= ~DA_FLAG_PROBED; - cam_periph_unlock(periph); dareprobe(periph); + cam_periph_unlock(periph); } else if (asc == 0x28 && ascq == 0x00) { cam_periph_lock(periph); softc->flags &= ~DA_FLAG_PROBED; @@ -2142,8 +2142,8 @@ daasync(void *callback_arg, u_int32_t code, "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; @@ -4593,6 +4593,14 @@ dadone_probewp(struct cam_periph *periph, union ccb *d cam_periph_assert(periph, MA_OWNED); + KASSERT(softc->state == DA_STATE_PROBE_WP, + ("State (%d) not PROBE_WP in dadone_probewp, periph %p ccb %p", + softc->state, periph, done_ccb)); + KASSERT((csio->ccb_h.ccb_state & DA_CCB_TYPE_MASK) == DA_CCB_PROBE_WP, + ("CCB State (%lu) not PROBE_WP in dadone_probewp, periph %p ccb %p", + (unsigned long)csio->ccb_h.ccb_state & DA_CCB_TYPE_MASK, periph, + done_ccb)); + if (softc->minimum_cmd_size > 6) { mode_hdr10 = (struct scsi_mode_header_10 *)csio->data_ptr; dev_spec = mode_hdr10->dev_spec; @@ -4625,11 +4633,11 @@ dadone_probewp(struct cam_periph *periph, union ccb *d } free(csio->data_ptr, M_SCSIDA); - xpt_release_ccb(done_ccb); if ((softc->flags & DA_FLAG_CAN_RC16) != 0) softc->state = DA_STATE_PROBE_RC16; else softc->state = DA_STATE_PROBE_RC; + xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; } @@ -4653,6 +4661,13 @@ dadone_proberc(struct cam_periph *periph, union ccb *d csio = &done_ccb->csio; state = csio->ccb_h.ccb_state & DA_CCB_TYPE_MASK; + KASSERT(softc->state == DA_STATE_PROBE_RC || softc->state == DA_STATE_PROBE_RC16, + ("State (%d) not PROBE_RC* in dadone_proberc, periph %p ccb %p", + softc->state, periph, done_ccb)); + KASSERT(state == DA_CCB_PROBE_RC || state == DA_CCB_PROBE_RC16, + ("CCB State (%lu) not PROBE_RC* in dadone_probewp, periph %p ccb %p", + (unsigned long)state, periph, done_ccb)); + lbp = 0; rdcap = NULL; rcaplong = NULL; @@ -4689,8 +4704,8 @@ dadone_proberc(struct cam_periph *periph, union ccb *d */ if (maxsector == 0xffffffff) { free(rdcap, M_SCSIDA); - xpt_release_ccb(done_ccb); softc->state = DA_STATE_PROBE_RC16; + xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; } @@ -4796,8 +4811,8 @@ dadone_proberc(struct cam_periph *periph, union ccb *d cam_periph_assert(periph, MA_OWNED); softc->flags &= ~DA_FLAG_CAN_RC16; free(rdcap, M_SCSIDA); - xpt_release_ccb(done_ccb); softc->state = DA_STATE_PROBE_RC; + xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; } @@ -4904,14 +4919,14 @@ dadone_proberc(struct cam_periph *periph, union ccb *d dadeleteflag(softc, DA_DELETE_WS10, 1); dadeleteflag(softc, DA_DELETE_UNMAP, 1); - xpt_release_ccb(done_ccb); softc->state = DA_STATE_PROBE_LBP; + xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; } - xpt_release_ccb(done_ccb); softc->state = DA_STATE_PROBE_BDC; + xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; } @@ -4968,8 +4983,8 @@ dadone_probelbp(struct cam_periph *periph, union ccb * } free(lbp, M_SCSIDA); - xpt_release_ccb(done_ccb); softc->state = DA_STATE_PROBE_BLK_LIMITS; + xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; } @@ -5062,8 +5077,8 @@ dadone_probeblklimits(struct cam_periph *periph, union } free(block_limits, M_SCSIDA); - xpt_release_ccb(done_ccb); softc->state = DA_STATE_PROBE_BDC; + xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; } @@ -5163,8 +5178,8 @@ dadone_probebdc(struct cam_periph *periph, union ccb * } free(bdc, M_SCSIDA); - xpt_release_ccb(done_ccb); softc->state = DA_STATE_PROBE_ATA; + xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; } @@ -5303,8 +5318,8 @@ dadone_probeata(struct cam_periph *periph, union ccb * continue_probe = 1; } if (continue_probe != 0) { - xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); + xpt_release_ccb(done_ccb); return; } else daprobedone(periph, done_ccb); @@ -5793,8 +5808,8 @@ dadone_tur(struct cam_periph *periph, union ccb *done_ /*timeout*/0, /*getcount_only*/0); } - xpt_release_ccb(done_ccb); softc->flags &= ~DA_FLAG_TUR_PENDING; + xpt_release_ccb(done_ccb); da_periph_release_locked(periph, DA_REF_TUR); return; } @@ -5806,6 +5821,8 @@ dareprobe(struct cam_periph *periph) int status; softc = (struct da_softc *)periph->softc; + + cam_periph_assert(periph, MA_OWNED); /* Probe in progress; don't interfere. */ if (softc->state != DA_STATE_NORMAL) From owner-svn-src-all@freebsd.org Thu Aug 27 13:50:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D63B03B25A1; Thu, 27 Aug 2020 13:50:23 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 4BckdC16Thz4dtD; Thu, 27 Aug 2020 13:50:22 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id BIIEkwq27ng7KBIIGk57tA; Thu, 27 Aug 2020 07:50:20 -0600 X-Authority-Analysis: v=2.3 cv=ecemg4MH c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=y4yBn9ojGxQA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=bIl-2ox-_QApRB5rmloA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 58AF216C; Thu, 27 Aug 2020 06:50:18 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 07RDoGqn055838; Thu, 27 Aug 2020 06:50:16 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202008271350.07RDoGqn055838@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Andriy Gapon cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364817 - head/libexec/rc/rc.d In-reply-to: <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> References: <202008261313.07QDDwRm040119@repo.freebsd.org> <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> Comments: In-reply-to Andriy Gapon message dated "Thu, 27 Aug 2020 11:54:02 +0300." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 27 Aug 2020 06:50:16 -0700 X-CMAE-Envelope: MS4wfOJ0aGetAk7Vp1O7f/DECEji61e7MZq2o5qXZC7SPsnCdsf/P/r2xaOP60e6kng9iVKmxAOJ+//mf+Y3Y2W9BUTcKqGkd2BNiRJdjv+6x30JhRN8DYRp a+cC3K5OAi3HrQPa7N1tcd1UATQsBQhhc00ks9EoVgg45fNdpUN7e4McY8PQ6IgJLyDsumDSJi31BGo0claPbAGrQEI+CDrvV/HiesCH3LKPPLjDBjZ7ToVb CZW/s9Pmj90Td5m+V+s/3xFOkUPMbxvs117wAKMxzOkw8w0omDc6CxbynJsqZ3MiwT/JYdf77glCLgKERNyk4A== X-Rspamd-Queue-Id: 4BckdC16Thz4dtD X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 13:50:23 -0000 In message <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org>, Andriy Gapon wri tes: > On 26/08/2020 16:13, Cy Schubert wrote: > > Author: cy > > Date: Wed Aug 26 13:13:57 2020 > > New Revision: 364817 > > URL: https://svnweb.freebsd.org/changeset/base/364817 > > > > Log: > > As of r364746 (OpenZFS import) existing ZPOOLs are not imported > > prior to zvol and mountcritlocal resulting in ZVOLs (swap and > > I probably missed some discussion, so I am curious why that is. This is because r364746 added the code below to rc.d/zfs and by then it was too late. I simply moved it to a new file that allowed rc.d/zvol and rc.d/mountcritlocal with legacy mounts to work again. This was copied from rc.d/zfs, which was added by r364746. There was no need for a zpool import under the previous version of ZFS, whereas it appears that OpenZFS requires it. > > > virtual machine UFS filesystems) being unavailable, leading to > > boot failures. > > We move the zpool import from zfs to a new zpool script, with the > > -N option to avoid mounting datasets while making the ZPOOL's > > datasets available for "legacy" mount (mountpoint=legacy) and ZVOLs > > available for subsequent use for swap (in the zvol rc sript) or > > for UFS or other filesystems in fstab(5), mounted by mountcritlocal. > > > > Reviewed by: freqlabs (previous version) > > Differential Revision: https://reviews.freebsd.org/D26185 > > > > Added: > > head/libexec/rc/rc.d/zpool (contents, props changed) > [snip] > > +zpool_start() > > +{ > > + local cachefile > > + > > + for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do > > + if [ -r $cachefile ]; then > > + zpool import -c $cachefile -a -N > > I would add a break here, so that pools are imported either from one cache fi > le > or the other but not both. It makes sense to have two cache file definitions > for migration, but I think that it does not make sense to split pools between > the cache files. Agreed. > > > + fi > > + done > > +} > > > -- > Andriy Gapon -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Thu Aug 27 13:54:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FB963B29C8; Thu, 27 Aug 2020 13:54:34 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (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 4Bckk04kmMz4fNj; Thu, 27 Aug 2020 13:54:32 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id BIMHkYwsS695cBIMJkPRxo; Thu, 27 Aug 2020 07:54:31 -0600 X-Authority-Analysis: v=2.3 cv=fZA2N3YF c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=y4yBn9ojGxQA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=BHo-iyq49Ao6tAWaz-oA:9 a=CjuIK1q_8ugA:10 a=2Q2bHuj3vkAA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 84CA01C1; Thu, 27 Aug 2020 06:54:29 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 07RDsTeW084744; Thu, 27 Aug 2020 06:54:29 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202008271354.07RDsTeW084744@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Andriy Gapon cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364817 - head/libexec/rc/rc.d In-reply-to: <202008271350.07RDoGqn055838@slippy.cwsent.com> References: <202008261313.07QDDwRm040119@repo.freebsd.org> <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> <202008271350.07RDoGqn055838@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Thu, 27 Aug 2020 06:50:16 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 27 Aug 2020 06:54:29 -0700 X-CMAE-Envelope: MS4wfETUKaKvp5rGlPB4NdPS0RZuUx0vqXg1CTEnzsUTzM8URlbqFbRs8u4Yd8pU1pgv6Mtp8PKOOI85a+VT1RFDt2XpeGGCUu540tHtlBWIMpZg1mETSPqS tdzCt16s5VMj6eu1SaPWV5Hk1rzqbr94GT4O9XjBfDbqcqaMj4+Lgir/mnQNG2iPlYFWtFbcYqdJSA7VrhcMd9RbeyGT4UlY0kyxPtRiaSjnutsq+iyOhUVW vmed8oyZ7UfzpUzbNtxSbGoisL0rJ3O9dnWI0auqFSkbnRjW/5ZnSsGY/Vn9NqWLp4zSYFeN+TCxqePmbl4xwg== X-Rspamd-Queue-Id: 4Bckk04kmMz4fNj X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.137) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [1.67 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; ARC_NA(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-0.09)[-0.090]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.27)[0.269]; NEURAL_SPAM_MEDIUM(0.19)[0.195]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.125.17:received]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.136.137:from] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 13:54:34 -0000 In message <202008271350.07RDoGqn055838@slippy.cwsent.com>, Cy Schubert writes: > In message <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org>, Andriy Gapon > wri > tes: > > On 26/08/2020 16:13, Cy Schubert wrote: > > > Author: cy > > > Date: Wed Aug 26 13:13:57 2020 > > > New Revision: 364817 > > > URL: https://svnweb.freebsd.org/changeset/base/364817 > > > > > > Log: > > > As of r364746 (OpenZFS import) existing ZPOOLs are not imported > > > prior to zvol and mountcritlocal resulting in ZVOLs (swap and > > > > I probably missed some discussion, so I am curious why that is. > > This is because r364746 added the code below to rc.d/zfs and by then it was > too late. I simply moved it to a new file that allowed rc.d/zvol and > rc.d/mountcritlocal with legacy mounts to work again. This was copied from > rc.d/zfs, which was added by r364746. There was no need for a zpool import > under the previous version of ZFS, whereas it appears that OpenZFS requires > it. Let me add, one could say this is a regression. > > > > > > virtual machine UFS filesystems) being unavailable, leading to > > > boot failures. > > > We move the zpool import from zfs to a new zpool script, with the > > > -N option to avoid mounting datasets while making the ZPOOL's > > > datasets available for "legacy" mount (mountpoint=legacy) and ZVOLs > > > available for subsequent use for swap (in the zvol rc sript) or > > > for UFS or other filesystems in fstab(5), mounted by mountcritlocal. > > > > > > Reviewed by: freqlabs (previous version) > > > Differential Revision: https://reviews.freebsd.org/D26185 > > > > > > Added: > > > head/libexec/rc/rc.d/zpool (contents, props changed) > > [snip] > > > +zpool_start() > > > +{ > > > + local cachefile > > > + > > > + for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do > > > + if [ -r $cachefile ]; then > > > + zpool import -c $cachefile -a -N > > > > I would add a break here, so that pools are imported either from one cache > fi > > le > > or the other but not both. It makes sense to have two cache file definitio > ns > > for migration, but I think that it does not make sense to split pools betwe > en > > the cache files. > > Agreed. > > > > > > + fi > > > + done > > > +} > > > > > > -- > > Andriy Gapon -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Thu Aug 27 14:03:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FB923B38E8; Thu, 27 Aug 2020 14:03:35 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (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 4BckwP6sm4z3S6F; Thu, 27 Aug 2020 14:03:33 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id BIV1kYzcu695cBIV2kPTaZ; Thu, 27 Aug 2020 08:03:32 -0600 X-Authority-Analysis: v=2.3 cv=fZA2N3YF c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=y4yBn9ojGxQA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=VxmjJ2MpAAAA:8 a=REGUHbn5vBxifwaQ5q0A:9 a=CjuIK1q_8ugA:10 a=wak2c0yCqP4A:10 a=2Q2bHuj3vkAA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=7gXAzLPJhVmCkEl4_tsf:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id AD29F1E3; Thu, 27 Aug 2020 07:03:30 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 07RE3U56090900; Thu, 27 Aug 2020 07:03:30 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202008271403.07RE3U56090900@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: Andriy Gapon , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364817 - head/libexec/rc/rc.d In-reply-to: <202008271354.07RDsTeW084744@slippy.cwsent.com> References: <202008261313.07QDDwRm040119@repo.freebsd.org> <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> <202008271350.07RDoGqn055838@slippy.cwsent.com> <202008271354.07RDsTeW084744@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Thu, 27 Aug 2020 06:54:29 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 27 Aug 2020 07:03:30 -0700 X-CMAE-Envelope: MS4wfGIZt2q0BAjZ0xfVqzK1FOe3170e+knqFlNCY6KROSo9NMhSi7CvwgmU9LfmkRuj7CIXA48u5fKf59tvQPQSu9RjffjfdXsvDz+0kS08AU+DcUB6dX7K l3XSZH1KhpAOnAj7M4XiLXTSx//3mQi6P3rTJrgsmTRuAJ0Za14T1/6NUcrB0auq6KuNPakDlGpdP5+CUZ0ricbP1LUp/pfxdppYMgJEGgUBNQ7jLa4AdDqb p5LOn63lUYm6bNebgxD2D7rTxTlHG0bTm7CZjOW4pB5dH5IVtVQPGHTx3WKiDxZUveEglFvxan+FA77b7FOl3A== X-Rspamd-Queue-Id: 4BckwP6sm4z3S6F X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.138) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [0.86 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[4]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.125.17:received]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.136.138:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.29)[-0.293]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.07)[0.074]; NEURAL_HAM_LONG(-0.22)[-0.223]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_POSSIBLE(0.00)[64.59.136.138:from]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 14:03:35 -0000 What would you suggest in this case, where /etc/zfs/zpool.cache is newer than /boot/zfs/zpool.cache? slippy$ lh /boot/zfs/zpool.cache /etc/zfs/zpool.cache -rw-r--r-- 1 root wheel 4.6K Aug 25 07:19 /boot/zfs/zpool.cache -rw-r--r-- 1 root wheel 4.7K Aug 27 06:20 /etc/zfs/zpool.cache slippy$ Something like, for I in $(ls -t /etc/zfs/zpool.cache /boot/zfs/zpool.cache) with the break? -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. In message <202008271354.07RDsTeW084744@slippy.cwsent.com>, Cy Schubert writes: > In message <202008271350.07RDoGqn055838@slippy.cwsent.com>, Cy Schubert > writes: > > In message <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org>, Andriy Gapon > > > wri > > tes: > > > On 26/08/2020 16:13, Cy Schubert wrote: > > > > Author: cy > > > > Date: Wed Aug 26 13:13:57 2020 > > > > New Revision: 364817 > > > > URL: https://svnweb.freebsd.org/changeset/base/364817 > > > > > > > > Log: > > > > As of r364746 (OpenZFS import) existing ZPOOLs are not imported > > > > prior to zvol and mountcritlocal resulting in ZVOLs (swap and > > > > > > I probably missed some discussion, so I am curious why that is. > > > > This is because r364746 added the code below to rc.d/zfs and by then it was > > > too late. I simply moved it to a new file that allowed rc.d/zvol and > > rc.d/mountcritlocal with legacy mounts to work again. This was copied from > > rc.d/zfs, which was added by r364746. There was no need for a zpool import > > under the previous version of ZFS, whereas it appears that OpenZFS requires > > > it. > > Let me add, one could say this is a regression. > > > > > > > > > > virtual machine UFS filesystems) being unavailable, leading to > > > > boot failures. > > > > We move the zpool import from zfs to a new zpool script, with the > > > > -N option to avoid mounting datasets while making the ZPOOL's > > > > datasets available for "legacy" mount (mountpoint=legacy) and ZVOLs > > > > available for subsequent use for swap (in the zvol rc sript) or > > > > for UFS or other filesystems in fstab(5), mounted by mountcritlocal. > > > > > > > > Reviewed by: freqlabs (previous version) > > > > Differential Revision: https://reviews.freebsd.org/D26185 > > > > > > > > Added: > > > > head/libexec/rc/rc.d/zpool (contents, props changed) > > > [snip] > > > > +zpool_start() > > > > +{ > > > > + local cachefile > > > > + > > > > + for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do > > > > + if [ -r $cachefile ]; then > > > > + zpool import -c $cachefile -a -N > > > > > > I would add a break here, so that pools are imported either from one cach > e > > fi > > > le > > > or the other but not both. It makes sense to have two cache file definit > io > > ns > > > for migration, but I think that it does not make sense to split pools bet > we > > en > > > the cache files. > > > > Agreed. > > > > > > > > > + fi > > > > + done > > > > +} > > > > > > > > > -- > > > Andriy Gapon > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > The need of the many outweighs the greed of the few. > From owner-svn-src-all@freebsd.org Thu Aug 27 14:05:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6D7553B3A7A; Thu, 27 Aug 2020 14:05:35 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bckyl2HYJz3SCs; Thu, 27 Aug 2020 14:05:35 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 2CE5A2B1CD; Thu, 27 Aug 2020 14:05:35 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f174.google.com with SMTP id o196so5395138qke.8; Thu, 27 Aug 2020 07:05:35 -0700 (PDT) X-Gm-Message-State: AOAM532OZPKn76eR42evKR67bpkXmr2LVz14mwAjHACdNfbJhbsK0/WF 4zY5kcTPm4p5GrWf0ch58i73NK018UCdbeIWy2o= X-Google-Smtp-Source: ABdhPJwItZLo8FW+0XSmZ3nE8lSPp/HH66X5J1a3d9okvmalcfdFeRIfFs+pIAW6dNM5IH+u58elFdiHfldfxhffoOA= X-Received: by 2002:a37:6155:: with SMTP id v82mr18290781qkb.34.1598537134708; Thu, 27 Aug 2020 07:05:34 -0700 (PDT) MIME-Version: 1.0 References: <202008261313.07QDDwRm040119@repo.freebsd.org> <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> <202008271350.07RDoGqn055838@slippy.cwsent.com> <202008271354.07RDsTeW084744@slippy.cwsent.com> <202008271403.07RE3U56090900@slippy.cwsent.com> In-Reply-To: <202008271403.07RE3U56090900@slippy.cwsent.com> From: Kyle Evans Date: Thu, 27 Aug 2020 09:05:23 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r364817 - head/libexec/rc/rc.d To: Cy Schubert Cc: Andriy Gapon , Cy Schubert , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 14:05:35 -0000 On Thu, Aug 27, 2020 at 9:03 AM Cy Schubert wrote: > > What would you suggest in this case, where /etc/zfs/zpool.cache is newer > than /boot/zfs/zpool.cache? > > slippy$ lh /boot/zfs/zpool.cache /etc/zfs/zpool.cache > -rw-r--r-- 1 root wheel 4.6K Aug 25 07:19 /boot/zfs/zpool.cache > -rw-r--r-- 1 root wheel 4.7K Aug 27 06:20 /etc/zfs/zpool.cache > slippy$ > > Something like, for I in $(ls -t /etc/zfs/zpool.cache > /boot/zfs/zpool.cache) with the break? > /etc/zfs/zpool.cache is the new location and should generally be favored if it exists, I reckon. From owner-svn-src-all@freebsd.org Thu Aug 27 14:07:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A36023B3D3D for ; Thu, 27 Aug 2020 14:07:08 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcl0X3x7zz3SPH for ; Thu, 27 Aug 2020 14:07:08 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 6AA062B9C4 for ; Thu, 27 Aug 2020 14:07:08 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f179.google.com with SMTP id b3so3412348qtg.13 for ; Thu, 27 Aug 2020 07:07:08 -0700 (PDT) X-Gm-Message-State: AOAM531EhJWGWb3WjGu1JDD8NszifgSTlKneAGzaaj+IgaR2dHHCyETv 1SniF6emPKLGu4E0hotE19FfetUaz1k4i7b+Bac= X-Received: by 2002:ac8:6052:: with SMTP id k18mt18770616qtm.60.1598537227998; Thu, 27 Aug 2020 07:07:07 -0700 (PDT) MIME-Version: 1.0 References: <202008261313.07QDDwRm040119@repo.freebsd.org> <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> <202008271350.07RDoGqn055838@slippy.cwsent.com> <202008271354.07RDsTeW084744@slippy.cwsent.com> <202008271403.07RE3U56090900@slippy.cwsent.com> In-Reply-To: From: Kyle Evans Date: Thu, 27 Aug 2020 09:06:56 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r364817 - head/libexec/rc/rc.d Cc: Cy Schubert , Andriy Gapon , Cy Schubert , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 14:07:08 -0000 On Thu, Aug 27, 2020 at 9:05 AM Kyle Evans wrote: > > On Thu, Aug 27, 2020 at 9:03 AM Cy Schubert wrote: > > > > What would you suggest in this case, where /etc/zfs/zpool.cache is newer > > than /boot/zfs/zpool.cache? > > > > slippy$ lh /boot/zfs/zpool.cache /etc/zfs/zpool.cache > > -rw-r--r-- 1 root wheel 4.6K Aug 25 07:19 /boot/zfs/zpool.cache > > -rw-r--r-- 1 root wheel 4.7K Aug 27 06:20 /etc/zfs/zpool.cache > > slippy$ > > > > Something like, for I in $(ls -t /etc/zfs/zpool.cache > > /boot/zfs/zpool.cache) with the break? > > > > /etc/zfs/zpool.cache is the new location and should generally be > favored if it exists, I reckon. I retract the above. :-) ls -t makes sense. From owner-svn-src-all@freebsd.org Thu Aug 27 14:33:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F5E33B45FF; Thu, 27 Aug 2020 14:33:47 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BclbH2XjQz3Tyr; Thu, 27 Aug 2020 14:33:47 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3ABAB25361; Thu, 27 Aug 2020 14:33:47 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07REXlHZ058637; Thu, 27 Aug 2020 14:33:47 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07REXlqu058636; Thu, 27 Aug 2020 14:33:47 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202008271433.07REXlqu058636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 27 Aug 2020 14:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364867 - head/libexec/rc/rc.d X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/libexec/rc/rc.d X-SVN-Commit-Revision: 364867 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 14:33:47 -0000 Author: cy Date: Thu Aug 27 14:33:46 2020 New Revision: 364867 URL: https://svnweb.freebsd.org/changeset/base/364867 Log: /etc/zfs/zpool.cache is the preferred (and new) location of zpool.cache. Check for it first. Only use /boot/zfs/zpool.cache if the /etc/zfs version is not found and good. Reported by: avg Suggested by: avg, kevans Modified: head/libexec/rc/rc.d/zpool Modified: head/libexec/rc/rc.d/zpool ============================================================================== --- head/libexec/rc/rc.d/zpool Thu Aug 27 14:29:06 2020 (r364866) +++ head/libexec/rc/rc.d/zpool Thu Aug 27 14:33:46 2020 (r364867) @@ -20,9 +20,9 @@ zpool_start() { local cachefile - for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do + for cachefile in /etc/zfs/zpool.cache /boot/zfs/zpool.cache; do if [ -r $cachefile ]; then - zpool import -c $cachefile -a -N + zpool import -c $cachefile -a -N && break fi done } From owner-svn-src-all@freebsd.org Thu Aug 27 14:50:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 578E83B5541; Thu, 27 Aug 2020 14:50:49 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bclyx1rMtz3WB1; Thu, 27 Aug 2020 14:50:49 +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 23D59256E8; Thu, 27 Aug 2020 14:50:49 +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 07REonEt066137; Thu, 27 Aug 2020 14:50:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07REonnO066136; Thu, 27 Aug 2020 14:50:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008271450.07REonnO066136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 27 Aug 2020 14:50:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364869 - stable/12/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Commit-Revision: 364869 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 14:50:49 -0000 Author: markj Date: Thu Aug 27 14:50:48 2020 New Revision: 364869 URL: https://svnweb.freebsd.org/changeset/base/364869 Log: MFC r364437: Remove non-FreeBSD ifdefs from dt_link.c. Modified: stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Aug 27 14:36:00 2020 (r364868) +++ stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Aug 27 14:50:48 2020 (r364869) @@ -25,38 +25,23 @@ * Copyright 2017-2018 Mark Johnston */ -#pragma ident "%Z%%M% %I% %E% SMI" +#include +#include +#include -#define ELF_TARGET_ALL +#include #include - -#include -#ifdef illumos -#include -#else -#define P2ROUNDUP(x, align) (-(-(x) & -(align))) -#endif - -#include -#include -#ifdef illumos -#include -#endif +#include +#include #include #include -#include #include -#include +#include +#include #include -#ifdef illumos -#include -#else -#include +#include + #include -#include -#include -#endif -#include #include #include @@ -82,11 +67,7 @@ static const char DTRACE_SHSTRTAB32[] = "\0" ".SUNW_dof\0" /* 11 */ ".strtab\0" /* 21 */ ".symtab\0" /* 29 */ -#ifdef __sparc -".rela.SUNW_dof"; /* 37 */ -#else ".rel.SUNW_dof"; /* 37 */ -#endif static const char DTRACE_SHSTRTAB64[] = "\0" ".shstrtab\0" /* 1 */ @@ -106,11 +87,7 @@ typedef struct dt_link_pair { typedef struct dof_elf32 { uint32_t de_nrel; /* relocation count */ -#ifdef __sparc - Elf32_Rela *de_rel; /* array of relocations for sparc */ -#else Elf32_Rel *de_rel; /* array of relocations for x86 */ -#endif uint32_t de_nsym; /* symbol count */ Elf32_Sym *de_sym; /* array of symbols */ uint32_t de_strlen; /* size of of string table */ @@ -130,11 +107,7 @@ prepare_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, uint32_t count = 0; size_t base; Elf32_Sym *sym; -#ifdef __sparc - Elf32_Rela *rel; -#else Elf32_Rel *rel; -#endif /*LINTED*/ dofs = (dof_sec_t *)((char *)dof + dof->dofh_secoff); @@ -324,11 +297,7 @@ prepare_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof, char *strtab; int i, j, nrel; size_t strtabsz = 1; -#ifdef illumos - uint32_t count = 0; -#else uint64_t count = 0; -#endif size_t base; Elf64_Sym *sym; Elf64_Rela *rel; @@ -530,9 +499,7 @@ dump_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, in #else elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2LSB; #endif -#if defined(__FreeBSD__) elf_file.ehdr.e_ident[EI_OSABI] = ELFOSABI_FREEBSD; -#endif elf_file.ehdr.e_type = ET_REL; #if defined(__arm__) elf_file.ehdr.e_machine = EM_ARM; @@ -540,8 +507,6 @@ dump_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, in elf_file.ehdr.e_machine = EM_MIPS; #elif defined(__powerpc__) elf_file.ehdr.e_machine = EM_PPC; -#elif defined(__sparc) - elf_file.ehdr.e_machine = EM_SPARC; #elif defined(__i386) || defined(__amd64) elf_file.ehdr.e_machine = EM_386; #elif defined(__aarch64__) @@ -562,7 +527,7 @@ dump_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, in shp->sh_offset = off; shp->sh_size = sizeof (DTRACE_SHSTRTAB32); shp->sh_addralign = sizeof (char); - off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 8); + off = roundup2(shp->sh_offset + shp->sh_size, 8); shp = &elf_file.shdr[ESHDR_DOF]; shp->sh_name = 11; /* DTRACE_SHSTRTAB32[11] = ".SUNW_dof" */ @@ -580,7 +545,7 @@ dump_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, in shp->sh_offset = off; shp->sh_size = de.de_strlen; shp->sh_addralign = sizeof (char); - off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 4); + off = roundup2(shp->sh_offset + shp->sh_size, 4); shp = &elf_file.shdr[ESHDR_SYMTAB]; shp->sh_name = 29; /* DTRACE_SHSTRTAB32[29] = ".symtab" */ @@ -592,7 +557,7 @@ dump_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, in shp->sh_info = de.de_global; shp->sh_size = de.de_nsym * sizeof (Elf32_Sym); shp->sh_addralign = 4; - off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 4); + off = roundup2(shp->sh_offset + shp->sh_size, 4); if (de.de_nrel == 0) { if (dt_write(dtp, fd, &elf_file, @@ -607,11 +572,7 @@ dump_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, in shp = &elf_file.shdr[ESHDR_REL]; shp->sh_name = 37; /* DTRACE_SHSTRTAB32[37] = ".rel.SUNW_dof" */ shp->sh_flags = SHF_ALLOC; -#ifdef __sparc - shp->sh_type = SHT_RELA; -#else shp->sh_type = SHT_REL; -#endif shp->sh_entsize = sizeof (de.de_rel[0]); shp->sh_link = ESHDR_SYMTAB; shp->sh_info = ESHDR_DOF; @@ -678,9 +639,7 @@ dump_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof, in #else elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2LSB; #endif -#if defined(__FreeBSD__) elf_file.ehdr.e_ident[EI_OSABI] = ELFOSABI_FREEBSD; -#endif elf_file.ehdr.e_type = ET_REL; #if defined(__arm__) elf_file.ehdr.e_machine = EM_ARM; @@ -688,8 +647,6 @@ dump_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof, in elf_file.ehdr.e_machine = EM_MIPS; #elif defined(__powerpc64__) elf_file.ehdr.e_machine = EM_PPC64; -#elif defined(__sparc) - elf_file.ehdr.e_machine = EM_SPARCV9; #elif defined(__i386) || defined(__amd64) elf_file.ehdr.e_machine = EM_AMD64; #elif defined(__aarch64__) @@ -710,7 +667,7 @@ dump_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof, in shp->sh_offset = off; shp->sh_size = sizeof (DTRACE_SHSTRTAB64); shp->sh_addralign = sizeof (char); - off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 8); + off = roundup2(shp->sh_offset + shp->sh_size, 8); shp = &elf_file.shdr[ESHDR_DOF]; shp->sh_name = 11; /* DTRACE_SHSTRTAB64[11] = ".SUNW_dof" */ @@ -728,7 +685,7 @@ dump_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof, in shp->sh_offset = off; shp->sh_size = de.de_strlen; shp->sh_addralign = sizeof (char); - off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 8); + off = roundup2(shp->sh_offset + shp->sh_size, 8); shp = &elf_file.shdr[ESHDR_SYMTAB]; shp->sh_name = 29; /* DTRACE_SHSTRTAB64[29] = ".symtab" */ @@ -740,7 +697,7 @@ dump_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof, in shp->sh_info = de.de_global; shp->sh_size = de.de_nsym * sizeof (Elf64_Sym); shp->sh_addralign = 8; - off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 8); + off = roundup2(shp->sh_offset + shp->sh_size, 8); if (de.de_nrel == 0) { if (dt_write(dtp, fd, &elf_file, @@ -981,133 +938,7 @@ dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, __FILE__, __LINE__); return (-1); } -#elif defined(__sparc) -#define DT_OP_RET 0x81c7e008 -#define DT_OP_NOP 0x01000000 -#define DT_OP_CALL 0x40000000 -#define DT_OP_CLR_O0 0x90102000 - -#define DT_IS_MOV_O7(inst) (((inst) & 0xffffe000) == 0x9e100000) -#define DT_IS_RESTORE(inst) (((inst) & 0xc1f80000) == 0x81e80000) -#define DT_IS_RETL(inst) (((inst) & 0xfff83fff) == 0x81c02008) - -#define DT_RS2(inst) ((inst) & 0x1f) -#define DT_MAKE_RETL(reg) (0x81c02008 | ((reg) << 14)) - -/*ARGSUSED*/ -static int -dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, GElf_Rela *rela, - uint32_t *off) -{ - uint32_t *ip; - - if ((rela->r_offset & (sizeof (uint32_t) - 1)) != 0) - return (-1); - - /*LINTED*/ - ip = (uint32_t *)(p + rela->r_offset); - - /* - * We only know about some specific relocation types. - */ - if (GELF_R_TYPE(rela->r_info) != R_SPARC_WDISP30 && - GELF_R_TYPE(rela->r_info) != R_SPARC_WPLT30) - return (-1); - - /* - * We may have already processed this object file in an earlier linker - * invocation. Check to see if the present instruction sequence matches - * the one we would install below. - */ - if (isenabled) { - if (ip[0] == DT_OP_NOP) { - (*off) += sizeof (ip[0]); - return (0); - } - } else { - if (DT_IS_RESTORE(ip[1])) { - if (ip[0] == DT_OP_RET) { - (*off) += sizeof (ip[0]); - return (0); - } - } else if (DT_IS_MOV_O7(ip[1])) { - if (DT_IS_RETL(ip[0])) - return (0); - } else { - if (ip[0] == DT_OP_NOP) { - (*off) += sizeof (ip[0]); - return (0); - } - } - } - - /* - * We only expect call instructions with a displacement of 0. - */ - if (ip[0] != DT_OP_CALL) { - dt_dprintf("found %x instead of a call instruction at %llx\n", - ip[0], (u_longlong_t)rela->r_offset); - return (-1); - } - - if (isenabled) { - /* - * It would necessarily indicate incorrect usage if an is- - * enabled probe were tail-called so flag that as an error. - * It's also potentially (very) tricky to handle gracefully, - * but could be done if this were a desired use scenario. - */ - if (DT_IS_RESTORE(ip[1]) || DT_IS_MOV_O7(ip[1])) { - dt_dprintf("tail call to is-enabled probe at %llx\n", - (u_longlong_t)rela->r_offset); - return (-1); - } - - - /* - * On SPARC, we take advantage of the fact that the first - * argument shares the same register as for the return value. - * The macro handles the work of zeroing that register so we - * don't need to do anything special here. We instrument the - * instruction in the delay slot as we'll need to modify the - * return register after that instruction has been emulated. - */ - ip[0] = DT_OP_NOP; - (*off) += sizeof (ip[0]); - } else { - /* - * If the call is followed by a restore, it's a tail call so - * change the call to a ret. If the call if followed by a mov - * of a register into %o7, it's a tail call in leaf context - * so change the call to a retl-like instruction that returns - * to that register value + 8 (rather than the typical %o7 + - * 8); the delay slot instruction is left, but should have no - * effect. Otherwise we change the call to be a nop. We - * identify the subsequent instruction as the probe point in - * all but the leaf tail-call case to ensure that arguments to - * the probe are complete and consistent. An astute, though - * largely hypothetical, observer would note that there is the - * possibility of a false-positive probe firing if the function - * contained a branch to the instruction in the delay slot of - * the call. Fixing this would require significant in-kernel - * modifications, and isn't worth doing until we see it in the - * wild. - */ - if (DT_IS_RESTORE(ip[1])) { - ip[0] = DT_OP_RET; - (*off) += sizeof (ip[0]); - } else if (DT_IS_MOV_O7(ip[1])) { - ip[0] = DT_MAKE_RETL(DT_RS2(ip[1])); - } else { - ip[0] = DT_OP_NOP; - (*off) += sizeof (ip[0]); - } - } - - return (0); -} - #elif defined(__i386) || defined(__amd64) #define DT_OP_NOP 0x90 @@ -1328,8 +1159,6 @@ process_obj(dtrace_hdl_t *dtp, const char *obj, int *e emachine1 = emachine2 = EM_MIPS; #elif defined(__powerpc__) emachine1 = emachine2 = EM_PPC64; -#elif defined(__sparc) - emachine1 = emachine2 = EM_SPARCV9; #elif defined(__i386) || defined(__amd64) emachine1 = emachine2 = EM_AMD64; #elif defined(__aarch64__) @@ -1344,9 +1173,6 @@ process_obj(dtrace_hdl_t *dtp, const char *obj, int *e emachine1 = emachine2 = EM_MIPS; #elif defined(__powerpc__) emachine1 = emachine2 = EM_PPC; -#elif defined(__sparc) - emachine1 = EM_SPARC; - emachine2 = EM_SPARC32PLUS; #elif defined(__i386) || defined(__amd64) emachine1 = emachine2 = EM_386; #endif @@ -1710,7 +1536,7 @@ process_obj(dtrace_hdl_t *dtp, const char *obj, int *e return (dt_link_error(dtp, elf, fd, bufs, "failed to allocate space for probe")); } -#ifndef illumos + /* * Our linker doesn't understand the SUNW_IGNORE ndx and * will try to use this relocation when we build the @@ -1732,7 +1558,6 @@ process_obj(dtrace_hdl_t *dtp, const char *obj, int *e rel.r_info = 0; (void) gelf_update_rel(data_rel, i, &rel); } -#endif mod = 1; (void) elf_flagdata(data_tgt, ELF_C_SET, ELF_F_DIRTY); @@ -1744,11 +1569,8 @@ process_obj(dtrace_hdl_t *dtp, const char *obj, int *e * already been processed by an earlier link * invocation. */ -#ifndef illumos -#define SHN_SUNW_IGNORE SHN_ABS -#endif - if (rsym.st_shndx != SHN_SUNW_IGNORE) { - rsym.st_shndx = SHN_SUNW_IGNORE; + if (rsym.st_shndx != SHN_ABS) { + rsym.st_shndx = SHN_ABS; (void) gelf_update_sym(data_sym, ndx, &rsym); } } @@ -1778,9 +1600,7 @@ int dtrace_program_link(dtrace_hdl_t *dtp, dtrace_prog_t *pgp, uint_t dflags, const char *file, int objc, char *const objv[]) { -#ifndef illumos char tfile[PATH_MAX]; -#endif char drti[PATH_MAX]; dof_hdr_t *dof; int fd, status, i, cur; @@ -1788,7 +1608,6 @@ dtrace_program_link(dtrace_hdl_t *dtp, dtrace_prog_t * size_t len; int eprobes = 0, ret = 0; -#ifndef illumos if (access(file, R_OK) == 0) { fprintf(stderr, "dtrace: target object (%s) already exists. " "Please remove the target\ndtrace: object and rebuild all " @@ -1801,7 +1620,6 @@ dtrace_program_link(dtrace_hdl_t *dtp, dtrace_prog_t * */ return (0); } -#endif /* * A NULL program indicates a special use in which we just link @@ -1864,23 +1682,11 @@ dtrace_program_link(dtrace_hdl_t *dtp, dtrace_prog_t * if ((dof = dtrace_dof_create(dtp, pgp, dflags)) == NULL) return (-1); /* errno is set for us */ -#ifdef illumos - /* - * Create a temporary file and then unlink it if we're going to - * combine it with drti.o later. We can still refer to it in child - * processes as /dev/fd/. - */ - if ((fd = open64(file, O_RDWR | O_CREAT | O_TRUNC, 0666)) == -1) { - return (dt_link_error(dtp, NULL, -1, NULL, - "failed to open %s: %s", file, strerror(errno))); - } -#else snprintf(tfile, sizeof(tfile), "%s.XXXXXX", file); if ((fd = mkostemp(tfile, O_CLOEXEC)) == -1) return (dt_link_error(dtp, NULL, -1, NULL, "failed to create temporary file %s: %s", tfile, strerror(errno))); -#endif /* * If -xlinktype=DOF has been selected, just write out the DOF. @@ -1910,47 +1716,17 @@ dtrace_program_link(dtrace_hdl_t *dtp, dtrace_prog_t * } -#ifdef illumos - if (!dtp->dt_lazyload) - (void) unlink(file); -#endif - if (dtp->dt_oflags & DTRACE_O_LP64) status = dump_elf64(dtp, dof, fd); else status = dump_elf32(dtp, dof, fd); -#ifdef illumos - if (status != 0 || lseek(fd, 0, SEEK_SET) != 0) { - return (dt_link_error(dtp, NULL, -1, NULL, - "failed to write %s: %s", file, strerror(errno))); - } -#else if (status != 0) return (dt_link_error(dtp, NULL, -1, NULL, "failed to write %s: %s", tfile, strerror(dtrace_errno(dtp)))); -#endif if (!dtp->dt_lazyload) { -#ifdef illumos - const char *fmt = "%s -o %s -r -Blocal -Breduce /dev/fd/%d %s"; - - if (dtp->dt_oflags & DTRACE_O_LP64) { - (void) snprintf(drti, sizeof (drti), - "%s/64/drti.o", _dtrace_libdir); - } else { - (void) snprintf(drti, sizeof (drti), - "%s/drti.o", _dtrace_libdir); - } - - len = snprintf(&tmp, 1, fmt, dtp->dt_ld_path, file, fd, - drti) + 1; - - cmd = alloca(len); - - (void) snprintf(cmd, len, fmt, dtp->dt_ld_path, file, fd, drti); -#else const char *fmt = "%s -o %s -r %s %s"; dt_dirpath_t *dp = dt_list_next(&dtp->dt_lib_path); @@ -1963,7 +1739,6 @@ dtrace_program_link(dtrace_hdl_t *dtp, dtrace_prog_t * (void) snprintf(cmd, len, fmt, dtp->dt_ld_path, file, tfile, drti); -#endif if ((status = system(cmd)) == -1) { ret = dt_link_error(dtp, NULL, fd, NULL, "failed to run %s: %s", dtp->dt_ld_path, @@ -1986,7 +1761,6 @@ dtrace_program_link(dtrace_hdl_t *dtp, dtrace_prog_t * } (void) close(fd); /* release temporary file */ -#ifdef __FreeBSD__ /* * Now that we've linked drti.o, reduce the global __SUNW_dof * symbol to a local symbol. This is needed to so that multiple @@ -2019,25 +1793,20 @@ dtrace_program_link(dtrace_hdl_t *dtp, dtrace_prog_t * file, dtp->dt_objcopy_path, WEXITSTATUS(status)); goto done; } -#endif } else { -#ifdef __FreeBSD__ if (rename(tfile, file) != 0) { ret = dt_link_error(dtp, NULL, fd, NULL, "failed to rename %s to %s: %s", tfile, file, strerror(errno)); goto done; } -#endif (void) close(fd); } done: dtrace_dof_destroy(dtp, dof); -#ifdef __FreeBSD__ if (!dtp->dt_lazyload) (void) unlink(tfile); -#endif return (ret); } From owner-svn-src-all@freebsd.org Thu Aug 27 14:51:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1ECD23B5735; Thu, 27 Aug 2020 14:51:45 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcm0101d1z3WMd; Thu, 27 Aug 2020 14:51:45 +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 D7E6A25856; Thu, 27 Aug 2020 14:51:44 +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 07REpiCF066962; Thu, 27 Aug 2020 14:51:44 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07REpidL066961; Thu, 27 Aug 2020 14:51:44 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008271451.07REpidL066961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 27 Aug 2020 14:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364870 - stable/12/sys/arm64/acpica X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/arm64/acpica X-SVN-Commit-Revision: 364870 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 14:51:45 -0000 Author: markj Date: Thu Aug 27 14:51:44 2020 New Revision: 364870 URL: https://svnweb.freebsd.org/changeset/base/364870 Log: MFC r364410: Remove an unused parameter from map_table(). Modified: stable/12/sys/arm64/acpica/acpi_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/acpica/acpi_machdep.c ============================================================================== --- stable/12/sys/arm64/acpica/acpi_machdep.c Thu Aug 27 14:50:48 2020 (r364869) +++ stable/12/sys/arm64/acpica/acpi_machdep.c Thu Aug 27 14:51:44 2020 (r364870) @@ -61,7 +61,7 @@ acpi_machdep_quirks(int *quirks) } static void * -map_table(vm_paddr_t pa, int offset, const char *sig) +map_table(vm_paddr_t pa, const char *sig) { ACPI_TABLE_HEADER *header; vm_offset_t length; @@ -130,7 +130,7 @@ void * acpi_map_table(vm_paddr_t pa, const char *sig) { - return (map_table(pa, 0, sig)); + return (map_table(pa, sig)); } /* @@ -176,7 +176,7 @@ acpi_find_table(const char *sig) printf("ACPI: RSDP failed extended checksum\n"); return (0); } - xsdt = map_table(rsdp->XsdtPhysicalAddress, 2, ACPI_SIG_XSDT); + xsdt = map_table(rsdp->XsdtPhysicalAddress, ACPI_SIG_XSDT); if (xsdt == NULL) { if (bootverbose) printf("ACPI: Failed to map XSDT\n"); @@ -202,7 +202,7 @@ acpi_find_table(const char *sig) * Verify that we can map the full table and that its checksum is * correct, etc. */ - table = map_table(addr, 0, sig); + table = map_table(addr, sig); if (table == NULL) return (0); acpi_unmap_table(table); From owner-svn-src-all@freebsd.org Thu Aug 27 15:59:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1882B3B7414; Thu, 27 Aug 2020 15:59:27 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcnV61Bkqz3b4N; Thu, 27 Aug 2020 15:59:25 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-pf1-f180.google.com with SMTP id m71so3852591pfd.1; Thu, 27 Aug 2020 08:59:25 -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:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=U2LKHxB9zKw54pnLLppK08vNoJGjL7POI3Tl/r9k098=; b=cpYo6b4xAa10CsvPcnKAofJcDMkqubcpmqsCNmFlhyS5PayY7PrrArjKpxhfSznl6q 1RMRgb6dbN/BpdHtjSPiS/AH4FZ+ndKDR94F8fz1kmeCUa6BY0zlOofjhEN6C8KG8M2o MNbpEsdYRV2HfiBe1RcpBoVxK5WMmkxtyv6HrSdfrRpuZeulFU7MNsUPM77B6gk+Sh0j Lwiee4KPCUPtUdNxdkgUDohKgoUPUa7UjUDqMwN8WSHIUHdeF2nLkrduX217X7GIZWhD O/CuE0rwXooJAO+H8/9U1Lhb+PD8Zx+I+ihdP3P+EnQfQ+Hvzd+usjnhwmr7KziwTBCE r0xw== X-Gm-Message-State: AOAM5337wHH4yVFuf+Zmh/tc/wnbShaoKCzkbLmsVPUdR9EydjPXCZ6I K44/A0Ib0NzT7pcodBHPdALh1fXJ888= X-Google-Smtp-Source: ABdhPJzX/OHEDMsyPokvOlTgIOvr0+j2i/oyJ7yalbte9tEeHXojs7XKzPZksaBH35Eb3YoC+NMndQ== X-Received: by 2002:a17:902:690a:: with SMTP id j10mr17233224plk.155.1598543964181; Thu, 27 Aug 2020 08:59:24 -0700 (PDT) Received: from [192.168.0.135] ([195.64.148.76]) by smtp.googlemail.com with ESMTPSA id y196sm3261283pfc.202.2020.08.27.08.59.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Aug 2020 08:59:23 -0700 (PDT) Subject: Re: svn commit: r364817 - head/libexec/rc/rc.d To: Kyle Evans Cc: Cy Schubert , Cy Schubert , src-committers , svn-src-all , svn-src-head References: <202008261313.07QDDwRm040119@repo.freebsd.org> <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> <202008271350.07RDoGqn055838@slippy.cwsent.com> <202008271354.07RDsTeW084744@slippy.cwsent.com> <202008271403.07RE3U56090900@slippy.cwsent.com> From: Andriy Gapon Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mDMEXxhZ/BYJKwYBBAHaRw8BAQdAcr09MGWggRAy8POEInH6mCbjrO8kgtRyHbst99gQlvy0 HkFuZHJpeSBHYXBvbiA8YXZnQEZyZWVCU0Qub3JnPoiWBBMWCAA+FiEE+nF8afRo79+kdvKg LcuxURQbv/YFAl8YWfwCGwMFCQlmAYAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQLcux URQbv/b/ngD/cTPdaKXZ8O1KzZ6BwqHuoJEL4qIjT3MiiovorL7WisABALU4NV3jAKu9hgSc Wl1QVjQ1NpzbY5gsMxZbuRlHwfAJuDgEXxhZ/BIKKwYBBAGXVQEFAQEHQKws2uTFgRunZ2Ip 1OYj0+cJOObFTfEDDI9hh2Fed7pFAwEIB4h+BBgWCAAmFiEE+nF8afRo79+kdvKgLcuxURQb v/YFAl8YWfwCGwwFCQlmAYAACgkQLcuxURQbv/apxgD/f6ml+zRTb/uB6zO/e4RS2S+V+rGf CTw551MKSZmkp1sA/2QbLsnmeHrsIPvY5Wn97BMmMQsDu+fxMSagSbSMa7YJ Message-ID: <5e96ff14-1d81-c42f-21f6-1ae55aa9ce76@FreeBSD.org> Date: Thu, 27 Aug 2020 18:59:20 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BcnV61Bkqz3b4N X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.210.180 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-1.43 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[209.85.210.180:from]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; ARC_NA(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.65)[-0.653]; NEURAL_SPAM_LONG(0.15)[0.154]; RCVD_IN_DNSWL_NONE(0.00)[209.85.210.180:from]; NEURAL_HAM_MEDIUM(-0.94)[-0.936]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 15:59:27 -0000 On 2020-08-27 17:06, Kyle Evans wrote: > On Thu, Aug 27, 2020 at 9:05 AM Kyle Evans wrote: >> >> On Thu, Aug 27, 2020 at 9:03 AM Cy Schubert wrote: >>> >>> What would you suggest in this case, where /etc/zfs/zpool.cache is newer >>> than /boot/zfs/zpool.cache? >>> >>> slippy$ lh /boot/zfs/zpool.cache /etc/zfs/zpool.cache >>> -rw-r--r-- 1 root wheel 4.6K Aug 25 07:19 /boot/zfs/zpool.cache >>> -rw-r--r-- 1 root wheel 4.7K Aug 27 06:20 /etc/zfs/zpool.cache >>> slippy$ >>> >>> Something like, for I in $(ls -t /etc/zfs/zpool.cache >>> /boot/zfs/zpool.cache) with the break? >>> >> >> /etc/zfs/zpool.cache is the new location and should generally be >> favored if it exists, I reckon. > > I retract the above. :-) ls -t makes sense. > I actually was about to agree with your first suggestion. -- Andriy Gapon From owner-svn-src-all@freebsd.org Thu Aug 27 16:04:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5C203B72F7; Thu, 27 Aug 2020 16:04:09 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcnbX4306z3bGS; Thu, 27 Aug 2020 16:04:08 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-pg1-f171.google.com with SMTP id 67so3665742pgd.12; Thu, 27 Aug 2020 09:04:08 -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:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=1rSIm+AXrArXxigZp1X+VBLdH6WpfjWS8T4eqHRvCqM=; b=BIJaLXQDm8kbmv/NSuWLe5IYV9tD38T5FHr0uLtTYxM6nDhoMfV2TPsqV0vSD1iknw ZAIm3ChQSmM09fZMMYpPU/OXesnRgw4zKX8bQurwEBNOzweLRkuwgoBrnK4ll2as3AzU QxzxrRUXF6y97Y4+L3U+nnDHqUxIb1AkK27W81x27IyqfaFkvfA5tyEqHd8LQae0daed kv27Fadqcv9cVmemczRtLCKWOeZILQjIsb4LRqUeaTNLuLp1TtMKI+uJrXkW1wNwPXYg GEvfPG11CG36v+IRVQlUWP4RwfptzCjPnhIo3MXrTu8WgNoNKbM4v74aQgpLdUCFvb2V uhSA== X-Gm-Message-State: AOAM533ImL5MRumqOOxzfZA4a3FvBSb99k5Gv/0acHyes4TWU2Am3kgM R/TG88mjTcqjd5zJsA15ModU+XuK3mc= X-Google-Smtp-Source: ABdhPJwQN2/GWSaMlCBWVIKaBBeKR3mfGIyNcdYyJGacrQuaiTngPjs5AjM2G0hM7nVK5rx+ONaPUg== X-Received: by 2002:a17:902:d681:: with SMTP id v1mr3131361ply.34.1598544246290; Thu, 27 Aug 2020 09:04:06 -0700 (PDT) Received: from [192.168.0.135] ([195.64.148.76]) by smtp.googlemail.com with ESMTPSA id w3sm3452519pff.56.2020.08.27.09.04.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Aug 2020 09:04:05 -0700 (PDT) Subject: Re: svn commit: r364817 - head/libexec/rc/rc.d To: Cy Schubert Cc: Cy Schubert , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <202008261313.07QDDwRm040119@repo.freebsd.org> <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> <202008271350.07RDoGqn055838@slippy.cwsent.com> <202008271354.07RDsTeW084744@slippy.cwsent.com> From: Andriy Gapon Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mDMEXxhZ/BYJKwYBBAHaRw8BAQdAcr09MGWggRAy8POEInH6mCbjrO8kgtRyHbst99gQlvy0 HkFuZHJpeSBHYXBvbiA8YXZnQEZyZWVCU0Qub3JnPoiWBBMWCAA+FiEE+nF8afRo79+kdvKg LcuxURQbv/YFAl8YWfwCGwMFCQlmAYAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQLcux URQbv/b/ngD/cTPdaKXZ8O1KzZ6BwqHuoJEL4qIjT3MiiovorL7WisABALU4NV3jAKu9hgSc Wl1QVjQ1NpzbY5gsMxZbuRlHwfAJuDgEXxhZ/BIKKwYBBAGXVQEFAQEHQKws2uTFgRunZ2Ip 1OYj0+cJOObFTfEDDI9hh2Fed7pFAwEIB4h+BBgWCAAmFiEE+nF8afRo79+kdvKgLcuxURQb v/YFAl8YWfwCGwwFCQlmAYAACgkQLcuxURQbv/apxgD/f6ml+zRTb/uB6zO/e4RS2S+V+rGf CTw551MKSZmkp1sA/2QbLsnmeHrsIPvY5Wn97BMmMQsDu+fxMSagSbSMa7YJ Message-ID: <66b4c241-a06e-4f91-f979-c87db45d5435@FreeBSD.org> Date: Thu, 27 Aug 2020 19:04:04 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <202008271354.07RDsTeW084744@slippy.cwsent.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BcnbX4306z3bGS X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.215.171 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-1.56 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.87)[-0.870]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.72)[-0.715]; NEURAL_SPAM_LONG(0.02)[0.025]; RCVD_IN_DNSWL_NONE(0.00)[209.85.215.171:from]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.215.171:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 16:04:09 -0000 On 2020-08-27 16:54, Cy Schubert wrote: > In message <202008271350.07RDoGqn055838@slippy.cwsent.com>, Cy Schubert > writes: >> In message <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org>, Andriy Gapon >> wri >> tes: >>> On 26/08/2020 16:13, Cy Schubert wrote: >>>> Author: cy >>>> Date: Wed Aug 26 13:13:57 2020 >>>> New Revision: 364817 >>>> URL: https://svnweb.freebsd.org/changeset/base/364817 >>>> >>>> Log: >>>> As of r364746 (OpenZFS import) existing ZPOOLs are not imported >>>> prior to zvol and mountcritlocal resulting in ZVOLs (swap and >>> >>> I probably missed some discussion, so I am curious why that is. >> >> This is because r364746 added the code below to rc.d/zfs and by then it was >> too late. I simply moved it to a new file that allowed rc.d/zvol and >> rc.d/mountcritlocal with legacy mounts to work again. This was copied from >> rc.d/zfs, which was added by r364746. There was no need for a zpool import >> under the previous version of ZFS, whereas it appears that OpenZFS requires >> it. > > Let me add, one could say this is a regression. Yes, I was actually curious about this change in ZFS driver behavior. -- Andriy Gapon From owner-svn-src-all@freebsd.org Thu Aug 27 16:20:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 160EB3B7A87; Thu, 27 Aug 2020 16:20:12 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcny36tM4z3cLB; Thu, 27 Aug 2020 16:20:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id CA6A82C151; Thu, 27 Aug 2020 16:20:11 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f177.google.com with SMTP id u3so6361718qkd.9; Thu, 27 Aug 2020 09:20:11 -0700 (PDT) X-Gm-Message-State: AOAM531Rw/ultIw0sXu7v8XAFzzp7ZjYWJ83FCLwStBEkt64WO4+CqcL P0LRwVuOxzOC1t78z3xKRbsISNwwXvzpG0lAols= X-Google-Smtp-Source: ABdhPJxNZl1LRUG61OB5qYLtrcwC/M9bYjs+meLMwAqA/Q6ocBmE0dW4m00buISqrw1TY1izOr5902tcBZXPifDXVPg= X-Received: by 2002:a05:620a:24d5:: with SMTP id m21mr2673187qkn.103.1598545211467; Thu, 27 Aug 2020 09:20:11 -0700 (PDT) MIME-Version: 1.0 References: <202008261313.07QDDwRm040119@repo.freebsd.org> <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> <202008271350.07RDoGqn055838@slippy.cwsent.com> <202008271354.07RDsTeW084744@slippy.cwsent.com> <202008271403.07RE3U56090900@slippy.cwsent.com> <5e96ff14-1d81-c42f-21f6-1ae55aa9ce76@FreeBSD.org> In-Reply-To: <5e96ff14-1d81-c42f-21f6-1ae55aa9ce76@FreeBSD.org> From: Kyle Evans Date: Thu, 27 Aug 2020 11:19:59 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r364817 - head/libexec/rc/rc.d To: Andriy Gapon Cc: Cy Schubert , Cy Schubert , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 16:20:12 -0000 On Thu, Aug 27, 2020 at 10:59 AM Andriy Gapon wrote: > > On 2020-08-27 17:06, Kyle Evans wrote: > > On Thu, Aug 27, 2020 at 9:05 AM Kyle Evans wrote: > >> > >> On Thu, Aug 27, 2020 at 9:03 AM Cy Schubert wrote: > >>> > >>> What would you suggest in this case, where /etc/zfs/zpool.cache is newer > >>> than /boot/zfs/zpool.cache? > >>> > >>> slippy$ lh /boot/zfs/zpool.cache /etc/zfs/zpool.cache > >>> -rw-r--r-- 1 root wheel 4.6K Aug 25 07:19 /boot/zfs/zpool.cache > >>> -rw-r--r-- 1 root wheel 4.7K Aug 27 06:20 /etc/zfs/zpool.cache > >>> slippy$ > >>> > >>> Something like, for I in $(ls -t /etc/zfs/zpool.cache > >>> /boot/zfs/zpool.cache) with the break? > >>> > >> > >> /etc/zfs/zpool.cache is the new location and should generally be > >> favored if it exists, I reckon. > > > > I retract the above. :-) ls -t makes sense. > > > > I actually was about to agree with your first suggestion. > I think it's the correct long-term solution, but it kind of depends on what we're thinking now- if we expect one might test-boot a disk on an older FreeBSD/ZFS that's still using /boot, there's a chance it will contain the more recent data. From owner-svn-src-all@freebsd.org Thu Aug 27 16:34:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C6F33B7FDE; Thu, 27 Aug 2020 16:34:21 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcpGP0x95z3df9; Thu, 27 Aug 2020 16:34:21 +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 0438826F89; Thu, 27 Aug 2020 16:34:21 +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 07RGYKFx033320; Thu, 27 Aug 2020 16:34:20 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RGYKu8033319; Thu, 27 Aug 2020 16:34:20 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008271634.07RGYKu8033319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 27 Aug 2020 16:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364871 - head/sys/dev/asmc X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/asmc X-SVN-Commit-Revision: 364871 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 16:34:21 -0000 Author: markj Date: Thu Aug 27 16:34:20 2020 New Revision: 364871 URL: https://svnweb.freebsd.org/changeset/base/364871 Log: asmc(4): Handle errors from asmc_key_read() properly. asmc_key_read() returns only 0 and 1, some callers were checking incorrectly for failure. PR: 248939 Submitted by: Tong Zhang MFC after: 1 week Modified: head/sys/dev/asmc/asmc.c Modified: head/sys/dev/asmc/asmc.c ============================================================================== --- head/sys/dev/asmc/asmc.c Thu Aug 27 14:51:44 2020 (r364870) +++ head/sys/dev/asmc/asmc.c Thu Aug 27 16:34:20 2020 (r364871) @@ -1073,7 +1073,7 @@ asmc_fan_count(device_t dev) { uint8_t buf[1]; - if (asmc_key_read(dev, ASMC_KEY_FANCOUNT, buf, sizeof buf) < 0) + if (asmc_key_read(dev, ASMC_KEY_FANCOUNT, buf, sizeof buf) != 0) return (-1); return (buf[0]); @@ -1087,7 +1087,7 @@ asmc_fan_getvalue(device_t dev, const char *key, int f char fankey[5]; snprintf(fankey, sizeof(fankey), key, fan); - if (asmc_key_read(dev, fankey, buf, sizeof buf) < 0) + if (asmc_key_read(dev, fankey, buf, sizeof buf) != 0) return (-1); speed = (buf[0] << 6) | (buf[1] >> 2); @@ -1101,7 +1101,7 @@ asmc_fan_getstring(device_t dev, const char *key, int char* desc; snprintf(fankey, sizeof(fankey), key, fan); - if (asmc_key_read(dev, fankey, buf, buflen) < 0) + if (asmc_key_read(dev, fankey, buf, buflen) != 0) return (NULL); desc = buf+4; @@ -1240,7 +1240,7 @@ asmc_temp_getvalue(device_t dev, const char *key) /* * Check for invalid temperatures. */ - if (asmc_key_read(dev, key, buf, sizeof buf) < 0) + if (asmc_key_read(dev, key, buf, sizeof buf) != 0) return (-1); return (buf[0]); From owner-svn-src-all@freebsd.org Thu Aug 27 16:34:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A88373B7F7A; Thu, 27 Aug 2020 16:34:34 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcpGf455xz3dlr; Thu, 27 Aug 2020 16:34:34 +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 701D32700A; Thu, 27 Aug 2020 16:34:34 +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 07RGYYUm033391; Thu, 27 Aug 2020 16:34:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RGYYl7033390; Thu, 27 Aug 2020 16:34:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008271634.07RGYYl7033390@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 27 Aug 2020 16:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364872 - head/sys/dev/fdc X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/fdc X-SVN-Commit-Revision: 364872 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 16:34:34 -0000 Author: markj Date: Thu Aug 27 16:34:33 2020 New Revision: 364872 URL: https://svnweb.freebsd.org/changeset/base/364872 Log: fdc(4): Handle errors from fdc_in() properly. fdc_in() returns only 0 and 1, some callers were checking incorrectly for failure. PR: 248940 Submitted by: Tong Zhang MFC after: 1 week Modified: head/sys/dev/fdc/fdc.c Modified: head/sys/dev/fdc/fdc.c ============================================================================== --- head/sys/dev/fdc/fdc.c Thu Aug 27 16:34:20 2020 (r364871) +++ head/sys/dev/fdc/fdc.c Thu Aug 27 16:34:33 2020 (r364872) @@ -492,7 +492,7 @@ fdc_cmd(struct fdc_data *fdc, int n_out, ...) n_in = va_arg(ap, int); for (n = 0; n < n_in; n++) { int *ptr = va_arg(ap, int *); - if (fdc_in(fdc, ptr) < 0) { + if (fdc_in(fdc, ptr) != 0) { char msg[50]; snprintf(msg, sizeof(msg), "cmd %02x failed at in byte %d of %d\n", @@ -587,7 +587,7 @@ fdc_sense_int(struct fdc_data *fdc, int *st0p, int *cy return (FD_NOT_VALID); } - if (fdc_in(fdc, &cyl) < 0) + if (fdc_in(fdc, &cyl) != 0) return fdc_err(fdc, "can't get cyl num\n"); if (cylp) From owner-svn-src-all@freebsd.org Thu Aug 27 16:36:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41DFB3B7F9F; Thu, 27 Aug 2020 16:36:08 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcpJS0Mr5z3dqR; Thu, 27 Aug 2020 16:36:08 +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 E3E9126DB1; Thu, 27 Aug 2020 16:36:07 +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 07RGa73c033657; Thu, 27 Aug 2020 16:36:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RGa7LT033656; Thu, 27 Aug 2020 16:36:07 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008271636.07RGa7LT033656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 27 Aug 2020 16:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364873 - head/sys/dev/sound/pci X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/sound/pci X-SVN-Commit-Revision: 364873 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 16:36:08 -0000 Author: markj Date: Thu Aug 27 16:36:07 2020 New Revision: 364873 URL: https://svnweb.freebsd.org/changeset/base/364873 Log: snd_ich(4): Handle errors from ich_init() properly during resume. ich_init() returns an errno value or 0, but ich_pci_resume() was comparing the return value with -1 to determine whether an error had occurred. PR: 248941 Submitted by: Tong Zhang MFC after: 1 week Modified: head/sys/dev/sound/pci/ich.c Modified: head/sys/dev/sound/pci/ich.c ============================================================================== --- head/sys/dev/sound/pci/ich.c Thu Aug 27 16:34:33 2020 (r364872) +++ head/sys/dev/sound/pci/ich.c Thu Aug 27 16:36:07 2020 (r364873) @@ -1190,16 +1190,17 @@ static int ich_pci_resume(device_t dev) { struct sc_info *sc; - int i; + int err, i; sc = pcm_getdevinfo(dev); ICH_LOCK(sc); /* Reinit audio device */ - if (ich_init(sc) == -1) { + err = ich_init(sc); + if (err != 0) { device_printf(dev, "unable to reinitialize the card\n"); ICH_UNLOCK(sc); - return (ENXIO); + return (err); } /* Reinit mixer */ ich_pci_codec_reset(sc); From owner-svn-src-all@freebsd.org Thu Aug 27 16:51:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5359A3B8855; Thu, 27 Aug 2020 16:51:59 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcpfl1Zpwz3g1C; Thu, 27 Aug 2020 16:51:59 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id F40632CB39; Thu, 27 Aug 2020 16:51:58 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id AC85427C0054; Thu, 27 Aug 2020 12:51:58 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute4.internal (MEProxy); Thu, 27 Aug 2020 12:51:58 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddvgedguddtvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculddutddmnecujfgurhepofgfggfkjghffffhvffutgesthdtredt reertdenucfhrhhomhepfdeurhgrnhguohhnuceuvghrghhrvghnfdcuoegsughrrghgoh hnsefhrhgvvgeuufffrdhorhhgqeenucggtffrrghtthgvrhhnpeetteelffduvddttdeu vdfhfeehjedvvdfgvdekvdeftefhgeekvdekleevuedvudenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsughrrghgohhnodhmvghsmhhtphgr uhhthhhpvghrshhonhgrlhhithihqddutdegvdefheekieegqddukedutdekheduqdgsug hrrghgohhnpeephfhrvggvuefuffdrohhrghesihhmrghprdgttg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 42470C200A5; Thu, 27 Aug 2020 12:51:58 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-232-g4bdb081-fm-20200825.002-g4bdb081a Mime-Version: 1.0 Message-Id: In-Reply-To: References: <202008261313.07QDDwRm040119@repo.freebsd.org> <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> <202008271350.07RDoGqn055838@slippy.cwsent.com> <202008271354.07RDsTeW084744@slippy.cwsent.com> <202008271403.07RE3U56090900@slippy.cwsent.com> <5e96ff14-1d81-c42f-21f6-1ae55aa9ce76@FreeBSD.org> Date: Thu, 27 Aug 2020 11:51:37 -0500 From: "Brandon Bergren" To: "Kyle Evans" , "Andriy Gapon" Cc: "Cy Schubert" , "Cy Schubert" , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r364817 - head/libexec/rc/rc.d Content-Type: text/plain X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 16:51:59 -0000 On Thu, Aug 27, 2020, at 11:19 AM, Kyle Evans wrote: > On Thu, Aug 27, 2020 at 10:59 AM Andriy Gapon wrote: > > > > On 2020-08-27 17:06, Kyle Evans wrote: > > > On Thu, Aug 27, 2020 at 9:05 AM Kyle Evans wrote: > > >> > > >> On Thu, Aug 27, 2020 at 9:03 AM Cy Schubert wrote: > > >>> > > >>> What would you suggest in this case, where /etc/zfs/zpool.cache is newer > > >>> than /boot/zfs/zpool.cache? > > >>> > > >>> slippy$ lh /boot/zfs/zpool.cache /etc/zfs/zpool.cache > > >>> -rw-r--r-- 1 root wheel 4.6K Aug 25 07:19 /boot/zfs/zpool.cache > > >>> -rw-r--r-- 1 root wheel 4.7K Aug 27 06:20 /etc/zfs/zpool.cache > > >>> slippy$ > > >>> > > >>> Something like, for I in $(ls -t /etc/zfs/zpool.cache > > >>> /boot/zfs/zpool.cache) with the break? > > >>> > > >> > > >> /etc/zfs/zpool.cache is the new location and should generally be > > >> favored if it exists, I reckon. > > > > > > I retract the above. :-) ls -t makes sense. > > > > > > > I actually was about to agree with your first suggestion. > > > > I think it's the correct long-term solution, but it kind of depends on > what we're thinking now- if we expect one might test-boot a disk on an > older FreeBSD/ZFS that's still using /boot, there's a chance it will > contain the more recent data. > FWIW, on powerpc64, using /etc/zfs/zpool.cache is great because it avoids the problem of having to unmount /boot (which is an msdos filesystem because peitiboot doesn't understand ufs or zfs) to update the copy of zpool.cache that is on the root filesystem in /boot instead of only changing the one in the runtime /boot (which was mounted on top, and is never useful because it's not mounted at the time that zpool.cache is actually needed to import pools.) In any case, the correct way on ZFS to control where the cachefile is written is to set the cachefile property on the zpool to the specific path. The correct behavior regarding boot time auto import of pools is to honor that property as found on the pool the boot filesystem was on, so that other pools sharing the same cachefile path will be imported. Multiple cache files and pools not actually listed in a cachefile are valid scenarios for pools. -- Brandon Bergren bdragon@FreeBSD.org From owner-svn-src-all@freebsd.org Thu Aug 27 17:04:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8169E3B921A; Thu, 27 Aug 2020 17:04:56 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcpxh2kWXz3yK6; Thu, 27 Aug 2020 17:04:56 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 42040275D1; Thu, 27 Aug 2020 17:04:56 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07RH4uGQ052771; Thu, 27 Aug 2020 17:04:56 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RH4uiw052770; Thu, 27 Aug 2020 17:04:56 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <202008271704.07RH4uiw052770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Thu, 27 Aug 2020 17:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364874 - head/usr.sbin/jail X-SVN-Group: head X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: head/usr.sbin/jail X-SVN-Commit-Revision: 364874 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 17:04:56 -0000 Author: jamie Date: Thu Aug 27 17:04:55 2020 New Revision: 364874 URL: https://svnweb.freebsd.org/changeset/base/364874 Log: Disregard jails in jail.conf that have bad parameters (parameter/variable clash, or redefining name/jid). The current behvaior, of merely warning and moving on, can lead to unexpected behavior when a jail is created without the offending parameter defined at all. Modified: head/usr.sbin/jail/config.c Modified: head/usr.sbin/jail/config.c ============================================================================== --- head/usr.sbin/jail/config.c Thu Aug 27 16:36:07 2020 (r364873) +++ head/usr.sbin/jail/config.c Thu Aug 27 17:04:55 2020 (r364874) @@ -369,11 +369,13 @@ add_param(struct cfjail *j, const struct cfparam *p, e if ((flags ^ dp->flags) & PF_VAR) { jail_warnx(j, "variable \"$%s\" cannot have the same " "name as a parameter.", name); + j->flags |= JF_FAILED; return; } if (dp->flags & PF_IMMUTABLE) { jail_warnx(j, "cannot redefine parameter \"%s\".", dp->name); + j->flags |= JF_FAILED; return; } if (strcmp(dp->name, name)) { @@ -405,6 +407,7 @@ add_param(struct cfjail *j, const struct cfparam *p, e "cannot have the same " "name as a parameter.", name); + j->flags |= JF_FAILED; return; } j->intparams[ipnum] = np; From owner-svn-src-all@freebsd.org Thu Aug 27 17:30:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8CDCF3B9F8A; Thu, 27 Aug 2020 17:30:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcqWk3G7lz40y6; Thu, 27 Aug 2020 17:30: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 539B6277A7; Thu, 27 Aug 2020 17:30: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 07RHUwWg066038; Thu, 27 Aug 2020 17:30:58 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RHUwOF066037; Thu, 27 Aug 2020 17:30:58 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008271730.07RHUwOF066037@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 27 Aug 2020 17:30:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364875 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 364875 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 17:30:58 -0000 Author: imp Date: Thu Aug 27 17:30:57 2020 New Revision: 364875 URL: https://svnweb.freebsd.org/changeset/base/364875 Log: Add note about NO_CLEAN build. NO_CLEAN doesn't quite work for some scenarios when rebuilding older kernels, but the kernels build w/o NO_CLEAN. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Aug 27 17:04:55 2020 (r364874) +++ head/UPDATING Thu Aug 27 17:30:57 2020 (r364875) @@ -32,6 +32,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: 'zpool upgrade' for the next few weeks. The change should be transparent unless you want to use new features. + Not all "NO_CLEAN" build scenarios work across these changes. Many + scenarios have been tested and fixed, but rebuilding kernels without + rebuilding world may fail. + 20200824: The resume code now notifies devd with the 'kernel' system rather than the old 'kern' subsystem to be consistent with From owner-svn-src-all@freebsd.org Thu Aug 27 17:36:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 678553B9CFE; Thu, 27 Aug 2020 17:36:07 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcqdg25rDz4138; Thu, 27 Aug 2020 17:36:07 +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 2B4A927B85; Thu, 27 Aug 2020 17:36:07 +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 07RHa6kA071950; Thu, 27 Aug 2020 17:36:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RHa6iP071949; Thu, 27 Aug 2020 17:36:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202008271736.07RHa6iP071949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 27 Aug 2020 17:36:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364876 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 17:36:07 -0000 Author: markj Date: Thu Aug 27 17:36:06 2020 New Revision: 364876 URL: https://svnweb.freebsd.org/changeset/base/364876 Log: Fix writing of the final block of encrypted, compressed kernel dumps. Previously any residual data in the final block of a compressed kernel dump would be written unencrypted. Note, such a configuration already does not work properly when using AES-CBC since the compressed data is typically not a multiple of the AES block length in size and EKCD does not implement any padding scheme. However, EKCD more recently gained support for using the ChaCha20 cipher, which being a stream cipher does not have this problem. Submitted by: sigsys@gmail.com Reviewed by: cem MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26188 Modified: head/sys/kern/kern_shutdown.c Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Thu Aug 27 17:30:57 2020 (r364875) +++ head/sys/kern/kern_shutdown.c Thu Aug 27 17:36:06 2020 (r364876) @@ -1464,6 +1464,7 @@ kerneldumpcomp_write_cb(void *base, size_t length, off } resid = length - rlength; memmove(di->blockbuf, (uint8_t *)base + rlength, resid); + bzero((uint8_t *)di->blockbuf + resid, di->blocksize - resid); di->kdcomp->kdc_resid = resid; return (EAGAIN); } @@ -1680,9 +1681,10 @@ dump_finish(struct dumperinfo *di, struct kerneldumphe error = compressor_flush(di->kdcomp->kdc_stream); if (error == EAGAIN) { /* We have residual data in di->blockbuf. */ - error = dump_write(di, di->blockbuf, 0, di->dumpoff, - di->blocksize); - di->dumpoff += di->kdcomp->kdc_resid; + error = _dump_append(di, di->blockbuf, 0, di->blocksize); + if (error == 0) + /* Compensate for _dump_append()'s adjustment. */ + di->dumpoff -= di->blocksize - di->kdcomp->kdc_resid; di->kdcomp->kdc_resid = 0; } if (error != 0) From owner-svn-src-all@freebsd.org Thu Aug 27 17:44:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE7723BA466; Thu, 27 Aug 2020 17:44:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcqpy5SJgz426l; Thu, 27 Aug 2020 17:44:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 99E6B2D361; Thu, 27 Aug 2020 17:44:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f177.google.com with SMTP id z2so1153141qtv.12; Thu, 27 Aug 2020 10:44:10 -0700 (PDT) X-Gm-Message-State: AOAM533Jak6ot6VlKHaZWf/zq+rSE74WkZwoFEIkYKLjVJ/7kWI0VHAk tBZ4F5vWyci/6/mu+t/YglqPrOAMR2a9chuYpKU= X-Google-Smtp-Source: ABdhPJxYZuH877XCKQeSYl0ZCAVk5WqaUdKNKJ1N536JGdTgJUTXJ+C/to2IMYhnbHveGSUbzdqPo4FvFxE/V09pHxY= X-Received: by 2002:ac8:7443:: with SMTP id h3mr2148988qtr.310.1598550250259; Thu, 27 Aug 2020 10:44:10 -0700 (PDT) MIME-Version: 1.0 References: <202008270017.07R0HHgJ092261@repo.freebsd.org> In-Reply-To: <202008270017.07R0HHgJ092261@repo.freebsd.org> From: Kyle Evans Date: Thu, 27 Aug 2020 12:43:59 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r364850 - head/usr.sbin/jail To: Jamie Gritton Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 17:44:10 -0000 On Wed, Aug 26, 2020 at 7:17 PM Jamie Gritton wrote: > > Author: jamie > Date: Thu Aug 27 00:17:17 2020 > New Revision: 364850 > URL: https://svnweb.freebsd.org/changeset/base/364850 > > Log: > Don't allow jail.conf variables to have the same names as jail parameters. > It was already not allowed in many cases, but crashed instead of giving an > error. > > PR: 248444 > Thanks for the quick backout and fix! From owner-svn-src-all@freebsd.org Thu Aug 27 17:46:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC9ED3BA36B; Thu, 27 Aug 2020 17:46: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcqsK5X81z42Jb; Thu, 27 Aug 2020 17:46:13 +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 A164E27D46; Thu, 27 Aug 2020 17:46:13 +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 07RHkD6f078435; Thu, 27 Aug 2020 17:46:13 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RHkD4V078434; Thu, 27 Aug 2020 17:46:13 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008271746.07RHkD4V078434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 27 Aug 2020 17:46:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364877 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 364877 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 17:46:13 -0000 Author: imp Date: Thu Aug 27 17:46:13 2020 New Revision: 364877 URL: https://svnweb.freebsd.org/changeset/base/364877 Log: Fix tiny style nit. Modified: head/sys/cam/cam_xpt_internal.h Modified: head/sys/cam/cam_xpt_internal.h ============================================================================== --- head/sys/cam/cam_xpt_internal.h Thu Aug 27 17:36:06 2020 (r364876) +++ head/sys/cam/cam_xpt_internal.h Thu Aug 27 17:46:13 2020 (r364877) @@ -107,7 +107,7 @@ struct cam_ed { struct cam_ccbq ccbq; /* Queue of pending ccbs */ struct async_list asyncs; /* Async callback info for this B/T/L */ struct periph_list periphs; /* All attached devices */ - u_int generation; /* Generation number */ + u_int generation; /* Generation number */ void *quirk; /* Oddities about this device */ u_int maxtags; u_int mintags; From owner-svn-src-all@freebsd.org Thu Aug 27 18:38:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF2283BC403; Thu, 27 Aug 2020 18:38:33 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcs1j0W2Fz46rg; Thu, 27 Aug 2020 18:38:32 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f176.google.com with SMTP id m22so7568435ljj.5; Thu, 27 Aug 2020 11:38:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=tN/Pb3/V8XqYsEMnW4ma0cHyp9flSb00KF+eoxQLPkE=; b=ktoM3VTkVkRAhFWcKtWFXpyRb88H9FrLHpVxxDLGR9nvAuzhD0VDEfUU+YrDhvYr27 BuTe3fO9ty6AwFPJld65P3dgYwBL2VMtO5t3ptgziHtsQMkvNKpcsSALHylJ7I1ko/bW OIU8pt3MzVOzYtnX98ZeBMgbtn/hJ1/Q1Bh2jvlg/HDc7RlthecrI8dAl1FlxsWS8O0U 4yD+XDg/STI3pFhLRI0oh2gsXOVY0OYBrZflc6uiT6dLtv6El55BmMUaZ4OWcX2l4SpN xOZ2N86hKwiqUoOlEP6DPNpJL0ZVzkzdlxTDwCmoBsB4ZK8Ws9nnv15BuQluOdkO1dXl RNwQ== X-Gm-Message-State: AOAM533KD2iMcyJvz51KdVxiEhXUIcibfBvucmt3P+4fZTTYOa9tf2zl sNw52WECFEqpLfhftPg/U0R/n1h274S/Cg== X-Google-Smtp-Source: ABdhPJzTbPRxbfPQPXRHUn4qB5fzzUPZOXTVjvH7iFRDTaMkN0kThSJOkyOQENW2clYIuiLRshS3xw== X-Received: by 2002:a2e:9f4e:: with SMTP id v14mr10945850ljk.72.1598553511053; Thu, 27 Aug 2020 11:38:31 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id q14sm176916lfo.82.2020.08.27.11.38.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Aug 2020 11:38:30 -0700 (PDT) Subject: Re: svn commit: r364817 - head/libexec/rc/rc.d To: Brandon Bergren , Kyle Evans Cc: Cy Schubert , Cy Schubert , src-committers , svn-src-all , svn-src-head References: <202008261313.07QDDwRm040119@repo.freebsd.org> <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> <202008271350.07RDoGqn055838@slippy.cwsent.com> <202008271354.07RDsTeW084744@slippy.cwsent.com> <202008271403.07RE3U56090900@slippy.cwsent.com> <5e96ff14-1d81-c42f-21f6-1ae55aa9ce76@FreeBSD.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABtB5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz6JAlQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryLkCDQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAYkCPAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: Date: Thu, 27 Aug 2020 21:38:29 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Bcs1j0W2Fz46rg X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.208.176 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-0.56 / 15.00]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.33)[-0.328]; NEURAL_SPAM_LONG(0.68)[0.679]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.176:from]; NEURAL_HAM_MEDIUM(-0.91)[-0.907]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.176:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all]; RECEIVED_SPAMHAUS_PBL(0.00)[93.72.151.96:received] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 18:38:33 -0000 On 27/08/2020 19:51, Brandon Bergren wrote: > FWIW, on powerpc64, using /etc/zfs/zpool.cache is great because it avoids the problem of having to unmount /boot (which is an msdos filesystem because peitiboot doesn't understand ufs or zfs) to update the copy of zpool.cache that is on the root filesystem in /boot instead of only changing the one in the runtime /boot (which was mounted on top, and is never useful because it's not mounted at the time that zpool.cache is actually needed to import pools.) > > In any case, the correct way on ZFS to control where the cachefile is written is to set the cachefile property on the zpool to the specific path. The correct behavior regarding boot time auto import of pools is to honor that property as found on the pool the boot filesystem was on, so that other pools sharing the same cachefile path will be imported. Multiple cache files and pools not actually listed in a cachefile are valid scenarios for pools. Just want to express my complete agreement. -- Andriy Gapon From owner-svn-src-all@freebsd.org Thu Aug 27 18:45:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 59D363BCB6F; Thu, 27 Aug 2020 18:45:53 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 4BcsB63d3Hz49yX; Thu, 27 Aug 2020 18:45:48 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id BMu7kyczjng7KBMu8k6J27; Thu, 27 Aug 2020 12:45:45 -0600 X-Authority-Analysis: v=2.3 cv=ecemg4MH c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=y4yBn9ojGxQA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=0lLUxovU0v1GWiWp7KwA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id CEB04689; Thu, 27 Aug 2020 11:45:41 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 07RIjfK6011041; Thu, 27 Aug 2020 11:45:41 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202008271845.07RIjfK6011041@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Andriy Gapon cc: Brandon Bergren , Kyle Evans , Cy Schubert , Cy Schubert , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r364817 - head/libexec/rc/rc.d In-reply-to: References: <202008261313.07QDDwRm040119@repo.freebsd.org> <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> <202008271350.07RDoGqn055838@slippy.cwsent.com> <202008271354.07RDsTeW084744@slippy.cwsent.com> <202008271403.07RE3U56090900@slippy.cwsent.com> <5e96ff14-1d81-c42f-21f6-1ae55aa9ce76@FreeBSD.org> Comments: In-reply-to Andriy Gapon message dated "Thu, 27 Aug 2020 21:38:29 +0300." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 27 Aug 2020 11:45:41 -0700 X-CMAE-Envelope: MS4wfDC8VQwO7z4YlBCNZWk9ZvD5TgGE6wQ7ylPjSxkOtqPYrBSNatQwuGrX6q2JL8TqR6XFJPKLwgvdwbZO2m0086oSWcvOSARurn0r0Q5X7gy67al0iJtc xw9wG78ppJWFs7TFshZXnop5V/848bW2UiBdDSXQHum5cYh/z2R7+ZbUtnF09lJqExMCYyuiISMCDTG5QNPuyUXuigOlrTxHItuVGleeyhSfazMesQqwEeY4 LiiNqdnym1po6rTHxvezWz6pEEkEzc9uZ+HohP8BDaNrQ25Cfq11twFCDSzVaW2ej4KqbHYnD1auSwnx3dzQllWTJ+nZQq851AMx5ZGF5zn4jg6pX9FBNwyN x8goj2sKTcUODwB9kwQmPdmP8K+ybA== X-Rspamd-Queue-Id: 4BcsB63d3Hz49yX X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 18:45:53 -0000 In message , Andriy Gapon wri tes: > On 27/08/2020 19:51, Brandon Bergren wrote: > > FWIW, on powerpc64, using /etc/zfs/zpool.cache is great because it avoids t > he problem of having to unmount /boot (which is an msdos filesystem because p > eitiboot doesn't understand ufs or zfs) to update the copy of zpool.cache tha > t is on the root filesystem in /boot instead of only changing the one in the > runtime /boot (which was mounted on top, and is never useful because it's not > mounted at the time that zpool.cache is actually needed to import pools.) > > > > In any case, the correct way on ZFS to control where the cachefile is writt > en is to set the cachefile property on the zpool to the specific path. The co > rrect behavior regarding boot time auto import of pools is to honor that prop > erty as found on the pool the boot filesystem was on, so that other pools sha > ring the same cachefile path will be imported. Multiple cache files and pools > not actually listed in a cachefile are valid scenarios for pools. > > > Just want to express my complete agreement. Agreed with the above, however: I still think that using a zpool import in rc.d is a regression. I understand why the OpenZFS folks did what they did. Linux with it's filesystem agnostic grub and initramfs monstrosity requires that they externalize this. I'm not happy about the regression but understand why they did it. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Thu Aug 27 19:15:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 263183BF09F; Thu, 27 Aug 2020 19:15:13 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcsr01NR0z4Z0l; Thu, 27 Aug 2020 19:15:10 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4EE9900E; Thu, 27 Aug 2020 19:15:09 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07RJF9JZ067860; Thu, 27 Aug 2020 19:15:09 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RJF9do067859; Thu, 27 Aug 2020 19:15:09 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202008271915.07RJF9do067859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 27 Aug 2020 19:15: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: r364879 - stable/11/sys/dev/e1000 X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/11/sys/dev/e1000 X-SVN-Commit-Revision: 364879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 19:15:14 -0000 Author: vmaffione Date: Thu Aug 27 19:15:09 2020 New Revision: 364879 URL: https://svnweb.freebsd.org/changeset/base/364879 Log: MFC r363995 em(4): honor vlanhwtag offload The FreeBSD em driver fails to properly reset the VME flag in the e1000 CTRL register oneg the following ifconfig command ifconfig em1 -vlanhwtag Tested on the e1000 device emulated by QEMU, and on a real NIC (chip=0x10d38086). PR: 236584 Submitted by: murat@sunnyvalley.io Reported by: murat@sunnyvalley.io Differential Revision: https://reviews.freebsd.org/D25286 Modified: stable/11/sys/dev/e1000/if_em.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/e1000/if_em.c ============================================================================== --- stable/11/sys/dev/e1000/if_em.c Thu Aug 27 19:12:39 2020 (r364878) +++ stable/11/sys/dev/e1000/if_em.c Thu Aug 27 19:15:09 2020 (r364879) @@ -1451,6 +1451,11 @@ em_init_locked(struct adapter *adapter) ctrl |= E1000_CTRL_VME; E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); } + } else { + u32 ctrl; + ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL); + ctrl &= ~E1000_CTRL_VME; + E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); } /* Don't lose promiscuous settings */ From owner-svn-src-all@freebsd.org Thu Aug 27 19:12:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1FFC63BF088; Thu, 27 Aug 2020 19:12:48 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcsn670bsz4XLG; Thu, 27 Aug 2020 19:12:42 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8B738DB5; Thu, 27 Aug 2020 19:12:40 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07RJCePB067498; Thu, 27 Aug 2020 19:12:40 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RJCeXd067497; Thu, 27 Aug 2020 19:12:40 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202008271912.07RJCeXd067497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Thu, 27 Aug 2020 19:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364878 - stable/12/sys/dev/e1000 X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/sys/dev/e1000 X-SVN-Commit-Revision: 364878 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 19:12:49 -0000 Author: vmaffione Date: Thu Aug 27 19:12:39 2020 New Revision: 364878 URL: https://svnweb.freebsd.org/changeset/base/364878 Log: MFC r363995 em(4): honor vlanhwtag offload The FreeBSD em driver fails to properly reset the VME flag in the e1000 CTRL register oneg the following ifconfig command ifconfig em1 -vlanhwtag Tested on the e1000 device emulated by QEMU, and on a real NIC (chip=0x10d38086). PR: 236584 Submitted by: murat@sunnyvalley.io Reported by: murat@sunnyvalley.io Differential Revision: https://reviews.freebsd.org/D25286 Modified: stable/12/sys/dev/e1000/if_em.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/e1000/if_em.c ============================================================================== --- stable/12/sys/dev/e1000/if_em.c Thu Aug 27 17:46:13 2020 (r364877) +++ stable/12/sys/dev/e1000/if_em.c Thu Aug 27 19:12:39 2020 (r364878) @@ -1330,6 +1330,11 @@ em_if_init(if_ctx_t ctx) ctrl |= E1000_CTRL_VME; E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); } + } else { + u32 ctrl; + ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL); + ctrl &= ~E1000_CTRL_VME; + E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); } /* Don't lose promiscuous settings */ From owner-svn-src-all@freebsd.org Thu Aug 27 19:35:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78A173C1339; Thu, 27 Aug 2020 19:35:04 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BctGw2cDGz4fqJ; Thu, 27 Aug 2020 19:35:04 +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 228EA9339; Thu, 27 Aug 2020 19:35:04 +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 07RJZ4ea080223; Thu, 27 Aug 2020 19:35:04 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RJZ26L080216; Thu, 27 Aug 2020 19:35:02 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008271935.07RJZ26L080216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 27 Aug 2020 19:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364880 - in stable/12/libexec/rc: . rc.d X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/libexec/rc: . rc.d X-SVN-Commit-Revision: 364880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 19:35:04 -0000 Author: trasz Date: Thu Aug 27 19:35:02 2020 New Revision: 364880 URL: https://svnweb.freebsd.org/changeset/base/364880 Log: MFC r352836: Move the SysV IPC stuff out of the 'abi' rc script, into a new one: 'sysvipc' - it has nothing to do with ABIs, and I'd like to later rename 'abi' to 'linux', which better describes its purpose and also matches the rcvar name. Sponsored by: The FreeBSD Foundation Added: stable/12/libexec/rc/rc.d/sysvipc - copied unchanged from r352836, head/libexec/rc/rc.d/sysvipc Modified: stable/12/libexec/rc/rc.conf stable/12/libexec/rc/rc.d/Makefile stable/12/libexec/rc/rc.d/SERVERS stable/12/libexec/rc/rc.d/abi stable/12/libexec/rc/rc.d/localpkg Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/rc.conf ============================================================================== --- stable/12/libexec/rc/rc.conf Thu Aug 27 19:15:09 2020 (r364879) +++ stable/12/libexec/rc/rc.conf Thu Aug 27 19:35:02 2020 (r364880) @@ -640,8 +640,6 @@ ibcs2_loaders="coff" # List of additional Ibcs2 loader firstboot_sentinel="/firstboot" # Scripts with "firstboot" keyword are run if # this file exists. Should be on a R/W filesystem so # the file can be deleted after the boot completes. - -# Emulation/compatibility services provided by /etc/rc.d/abi sysvipc_enable="NO" # Load System V IPC primitives at startup (or NO). linux_enable="NO" # Linux binary compatibility loaded at startup (or NO). clear_tmp_enable="NO" # Clear /tmp at startup. Modified: stable/12/libexec/rc/rc.d/Makefile ============================================================================== --- stable/12/libexec/rc/rc.d/Makefile Thu Aug 27 19:15:09 2020 (r364879) +++ stable/12/libexec/rc/rc.d/Makefile Thu Aug 27 19:35:02 2020 (r364880) @@ -111,6 +111,7 @@ CONFS= DAEMON \ swaplate \ sysctl \ syslogd \ + sysvipc \ tmp \ ${_ubthidhci} \ ugidfw \ Modified: stable/12/libexec/rc/rc.d/SERVERS ============================================================================== --- stable/12/libexec/rc/rc.d/SERVERS Thu Aug 27 19:15:09 2020 (r364879) +++ stable/12/libexec/rc/rc.d/SERVERS Thu Aug 27 19:35:02 2020 (r364880) @@ -4,7 +4,7 @@ # # PROVIDE: SERVERS -# REQUIRE: mountcritremote abi ldconfig savecore watchdogd +# REQUIRE: mountcritremote sysvipc abi ldconfig savecore watchdogd # This is a dummy dependency, for early-start servers relying on # some basic configuration. Modified: stable/12/libexec/rc/rc.d/abi ============================================================================== --- stable/12/libexec/rc/rc.d/abi Thu Aug 27 19:15:09 2020 (r364879) +++ stable/12/libexec/rc/rc.d/abi Thu Aug 27 19:35:02 2020 (r364880) @@ -14,14 +14,6 @@ desc="Enable foreign ABIs" start_cmd="${name}_start" stop_cmd=":" -sysv_start() -{ - echo -n ' sysvipc' - load_kld sysvmsg - load_kld sysvsem - load_kld sysvshm -} - linux_start() { local _tmpdir @@ -48,12 +40,11 @@ abi_start() local _echostop _echostop= - if checkyesno sysvipc_enable || checkyesno linux_enable; then + if checkyesno linux_enable; then echo -n 'Additional ABI support:' _echostop=yes fi - checkyesno sysvipc_enable && sysv_start checkyesno linux_enable && linux_start [ -n "${_echostop}" ] && echo '.' Modified: stable/12/libexec/rc/rc.d/localpkg ============================================================================== --- stable/12/libexec/rc/rc.d/localpkg Thu Aug 27 19:15:09 2020 (r364879) +++ stable/12/libexec/rc/rc.d/localpkg Thu Aug 27 19:35:02 2020 (r364880) @@ -4,7 +4,7 @@ # # PROVIDE: localpkg -# REQUIRE: abi +# REQUIRE: sysvipc abi # BEFORE: securelevel # KEYWORD: shutdown Copied: stable/12/libexec/rc/rc.d/sysvipc (from r352836, head/libexec/rc/rc.d/sysvipc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/libexec/rc/rc.d/sysvipc Thu Aug 27 19:35:02 2020 (r364880, copy of r352836, head/libexec/rc/rc.d/sysvipc) @@ -0,0 +1,26 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: sysvipc +# REQUIRE: archdep +# KEYWORD: nojail + +. /etc/rc.subr + +name="sysvipc" +desc="Load SysV IPC modules" +rcvar="sysvipc_enable" +start_cmd="${name}_start" +stop_cmd=":" + +sysvipc_start() +{ + load_kld sysvmsg + load_kld sysvsem + load_kld sysvshm +} + +load_rc_config $name +run_rc_command "$1" From owner-svn-src-all@freebsd.org Thu Aug 27 19:37:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E1223C1799; Thu, 27 Aug 2020 19:37:29 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BctKj2jgtz4fwy; Thu, 27 Aug 2020 19:37:29 +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 28D4F93DF; Thu, 27 Aug 2020 19:37:29 +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 07RJbTpg080541; Thu, 27 Aug 2020 19:37:29 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RJbS7o080538; Thu, 27 Aug 2020 19:37:28 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008271937.07RJbS7o080538@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 27 Aug 2020 19:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364881 - stable/12/libexec/rc/rc.d X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/libexec/rc/rc.d X-SVN-Commit-Revision: 364881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 19:37:29 -0000 Author: trasz Date: Thu Aug 27 19:37:28 2020 New Revision: 364881 URL: https://svnweb.freebsd.org/changeset/base/364881 Log: MFC r352999: Rename etc/rc.d/abi to etc/rc.d/linux; after moving out the SysV IPC stuff it's entirely linux-specific. MFC r353054: Add rcvar back to the linux rc script. Without it it was enabled unconditionally. Sponsored by: The FreeBSD Foundation Added: stable/12/libexec/rc/rc.d/linux - copied, changed from r352999, head/libexec/rc/rc.d/linux Deleted: stable/12/libexec/rc/rc.d/abi Modified: stable/12/libexec/rc/rc.d/Makefile stable/12/libexec/rc/rc.d/SERVERS stable/12/libexec/rc/rc.d/localpkg Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/rc.d/Makefile ============================================================================== --- stable/12/libexec/rc/rc.d/Makefile Thu Aug 27 19:35:02 2020 (r364880) +++ stable/12/libexec/rc/rc.d/Makefile Thu Aug 27 19:37:28 2020 (r364881) @@ -11,7 +11,6 @@ CONFS= DAEMON \ LOGIN \ NETWORKING \ SERVERS \ - abi \ addswap \ adjkerntz \ archdep \ @@ -54,6 +53,7 @@ CONFS= DAEMON \ kldxref \ ${_kpasswdd} \ ldconfig \ + linux \ local \ localpkg \ lockd \ Modified: stable/12/libexec/rc/rc.d/SERVERS ============================================================================== --- stable/12/libexec/rc/rc.d/SERVERS Thu Aug 27 19:35:02 2020 (r364880) +++ stable/12/libexec/rc/rc.d/SERVERS Thu Aug 27 19:37:28 2020 (r364881) @@ -4,7 +4,7 @@ # # PROVIDE: SERVERS -# REQUIRE: mountcritremote sysvipc abi ldconfig savecore watchdogd +# REQUIRE: mountcritremote sysvipc linux ldconfig savecore watchdogd # This is a dummy dependency, for early-start servers relying on # some basic configuration. Copied and modified: stable/12/libexec/rc/rc.d/linux (from r352999, head/libexec/rc/rc.d/linux) ============================================================================== --- head/libexec/rc/rc.d/linux Wed Oct 2 11:40:40 2019 (r352999, copy source) +++ stable/12/libexec/rc/rc.d/linux Thu Aug 27 19:37:28 2020 (r364881) @@ -11,6 +11,7 @@ name="linux" desc="Enable Linux ABI" +rcvar="linux_enable" start_cmd="${name}_start" stop_cmd=":" Modified: stable/12/libexec/rc/rc.d/localpkg ============================================================================== --- stable/12/libexec/rc/rc.d/localpkg Thu Aug 27 19:35:02 2020 (r364880) +++ stable/12/libexec/rc/rc.d/localpkg Thu Aug 27 19:37:28 2020 (r364881) @@ -4,7 +4,7 @@ # # PROVIDE: localpkg -# REQUIRE: sysvipc abi +# REQUIRE: sysvipc linux # BEFORE: securelevel # KEYWORD: shutdown From owner-svn-src-all@freebsd.org Thu Aug 27 19:40:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 906803C1869; Thu, 27 Aug 2020 19:40:38 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BctPL1CCBz4gL5; Thu, 27 Aug 2020 19:40:37 +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 600A0940C; Thu, 27 Aug 2020 19:40:34 +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 07RJeYcO081022; Thu, 27 Aug 2020 19:40:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RJeYvw081021; Thu, 27 Aug 2020 19:40:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008271940.07RJeYvw081021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 27 Aug 2020 19:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364882 - stable/12/libexec/rc/rc.d X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/libexec/rc/rc.d X-SVN-Commit-Revision: 364882 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 19:40:38 -0000 Author: trasz Date: Thu Aug 27 19:40:33 2020 New Revision: 364882 URL: https://svnweb.freebsd.org/changeset/base/364882 Log: MFC r354458: Extend the linux rc script to mount the neccessary file systems, set ELF fallback brand, and load pty(4). Sponsored by: The FreeBSD Foundation Modified: stable/12/libexec/rc/rc.d/linux Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/rc.d/linux ============================================================================== --- stable/12/libexec/rc/rc.d/linux Thu Aug 27 19:37:28 2020 (r364881) +++ stable/12/libexec/rc/rc.d/linux Thu Aug 27 19:40:33 2020 (r364882) @@ -17,7 +17,7 @@ stop_cmd=":" linux_start() { - local _tmpdir + local _emul_path _tmpdir load_kld -e 'linux(aout|elf)' linux case `sysctl -n hw.machine_arch` in @@ -33,6 +33,25 @@ linux_start() fi rm -rf ${_tmpdir} fi + + # Linux uses the pre-pts(4) tty naming scheme. + load_kld pty + + # Handle unbranded ELF executables by defaulting to ELFOSABI_LINUX. + if [ `sysctl -ni kern.elf64.fallback_brand` -eq "-1" ]; then + sysctl kern.elf64.fallback_brand=3 > /dev/null + fi + + if [ `sysctl -ni kern.elf32.fallback_brand` -eq "-1" ]; then + sysctl kern.elf32.fallback_brand=3 > /dev/null + fi + + _emul_path="/compat/linux" + mount -o nocover -t linprocfs linprocfs "${_emul_path}/proc" + mount -o nocover -t linsysfs linsysfs "${_emul_path}/sys" + mount -o nocover -t devfs devfs "${_emul_path}/dev" + mount -o nocover -t fdescfs fdescfs "${_emul_path}/dev/fd" + mount -o nocover,mode=1777 -t tmpfs tmpfs "${_emul_path}/dev/shm" } load_rc_config $name From owner-svn-src-all@freebsd.org Thu Aug 27 19:41:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83B4D3C1C17; Thu, 27 Aug 2020 19:41:32 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BctQN2twqz4gdN; Thu, 27 Aug 2020 19:41:32 +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 4782A9343; Thu, 27 Aug 2020 19:41:32 +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 07RJfWMS082810; Thu, 27 Aug 2020 19:41:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RJfV2q082808; Thu, 27 Aug 2020 19:41:31 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008271941.07RJfV2q082808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 27 Aug 2020 19:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364883 - in stable/12/libexec/rc: . rc.d X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/libexec/rc: . rc.d X-SVN-Commit-Revision: 364883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 19:41:32 -0000 Author: trasz Date: Thu Aug 27 19:41:31 2020 New Revision: 364883 URL: https://svnweb.freebsd.org/changeset/base/364883 Log: MFC r354690: Add 'linux_mounts_enable' rc.conf(5) variable, to make it possible to disable mounting Linux-specific filesystems under /compat/linux when 'linux_enable' is set to YES. Relnotes: yes Sponsored by: The FreeBSD Foundation Modified: stable/12/libexec/rc/rc.conf stable/12/libexec/rc/rc.d/linux Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/rc.conf ============================================================================== --- stable/12/libexec/rc/rc.conf Thu Aug 27 19:40:33 2020 (r364882) +++ stable/12/libexec/rc/rc.conf Thu Aug 27 19:41:31 2020 (r364883) @@ -642,6 +642,8 @@ firstboot_sentinel="/firstboot" # Scripts with "firstb # the file can be deleted after the boot completes. sysvipc_enable="NO" # Load System V IPC primitives at startup (or NO). linux_enable="NO" # Linux binary compatibility loaded at startup (or NO). +linux_mounts_enable="YES" # If linux_enable is set to YES, mount Linux-specific + # filesystems at startup. clear_tmp_enable="NO" # Clear /tmp at startup. clear_tmp_X="YES" # Clear and recreate X11-related directories in /tmp ldconfig_insecure="NO" # Set to YES to disable ldconfig security checks Modified: stable/12/libexec/rc/rc.d/linux ============================================================================== --- stable/12/libexec/rc/rc.d/linux Thu Aug 27 19:40:33 2020 (r364882) +++ stable/12/libexec/rc/rc.d/linux Thu Aug 27 19:41:31 2020 (r364883) @@ -46,12 +46,14 @@ linux_start() sysctl kern.elf32.fallback_brand=3 > /dev/null fi - _emul_path="/compat/linux" - mount -o nocover -t linprocfs linprocfs "${_emul_path}/proc" - mount -o nocover -t linsysfs linsysfs "${_emul_path}/sys" - mount -o nocover -t devfs devfs "${_emul_path}/dev" - mount -o nocover -t fdescfs fdescfs "${_emul_path}/dev/fd" - mount -o nocover,mode=1777 -t tmpfs tmpfs "${_emul_path}/dev/shm" + if checkyesno linux_mounts_enable; then + _emul_path="/compat/linux" + mount -o nocover -t linprocfs linprocfs "${_emul_path}/proc" + mount -o nocover -t linsysfs linsysfs "${_emul_path}/sys" + mount -o nocover -t devfs devfs "${_emul_path}/dev" + mount -o nocover -t fdescfs fdescfs "${_emul_path}/dev/fd" + mount -o nocover,mode=1777 -t tmpfs tmpfs "${_emul_path}/dev/shm" + fi } load_rc_config $name From owner-svn-src-all@freebsd.org Thu Aug 27 19:42:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3F8E3C1D81; Thu, 27 Aug 2020 19:42:53 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BctRx4fhZz4h1N; Thu, 27 Aug 2020 19:42:53 +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 838D49056; Thu, 27 Aug 2020 19:42:53 +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 07RJgrrg087061; Thu, 27 Aug 2020 19:42:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RJgruX087060; Thu, 27 Aug 2020 19:42:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008271942.07RJgruX087060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 27 Aug 2020 19:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364884 - in stable/12: libexec/rc/rc.d share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12: libexec/rc/rc.d share/man/man4 X-SVN-Commit-Revision: 364884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 19:42:53 -0000 Author: trasz Date: Thu Aug 27 19:42:52 2020 New Revision: 364884 URL: https://svnweb.freebsd.org/changeset/base/364884 Log: MFC r362935: Make the linux rc script use linrdlnk by default. This fixes Linux gettyname(3), with caveats (see PR). PR: kern/240767 Sponsored by: The FreeBSD Foundation Modified: stable/12/libexec/rc/rc.d/linux stable/12/share/man/man4/linux.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/rc.d/linux ============================================================================== --- stable/12/libexec/rc/rc.d/linux Thu Aug 27 19:41:31 2020 (r364883) +++ stable/12/libexec/rc/rc.d/linux Thu Aug 27 19:42:52 2020 (r364884) @@ -51,7 +51,7 @@ linux_start() mount -o nocover -t linprocfs linprocfs "${_emul_path}/proc" mount -o nocover -t linsysfs linsysfs "${_emul_path}/sys" mount -o nocover -t devfs devfs "${_emul_path}/dev" - mount -o nocover -t fdescfs fdescfs "${_emul_path}/dev/fd" + mount -o nocover,linrdlnk -t fdescfs fdescfs "${_emul_path}/dev/fd" mount -o nocover,mode=1777 -t tmpfs tmpfs "${_emul_path}/dev/shm" fi } Modified: stable/12/share/man/man4/linux.4 ============================================================================== --- stable/12/share/man/man4/linux.4 Thu Aug 27 19:41:31 2020 (r364883) +++ stable/12/share/man/man4/linux.4 Thu Aug 27 19:42:52 2020 (r364884) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 12, 2020 +.Dd July 4, 2020 .Dt LINUX 4 .Os .Sh NAME @@ -130,7 +130,9 @@ Defaults to 0. .It Pa /compat/linux minimal Linux run-time environment .It Pa /compat/linux/dev/fd -file-descriptor file system, see +file descriptor file system mounted with the +.Cm linrdlnk +option, see .Xr fdescfs 5 .It Pa /compat/linux/dev/shm in-memory file system, see From owner-svn-src-all@freebsd.org Thu Aug 27 19:44:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A39363C1C49; Thu, 27 Aug 2020 19:44:09 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BctTP3pn6z4hHw; Thu, 27 Aug 2020 19:44:09 +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 65FC5959B; Thu, 27 Aug 2020 19:44:09 +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 07RJi97U087319; Thu, 27 Aug 2020 19:44:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RJi99N087318; Thu, 27 Aug 2020 19:44:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008271944.07RJi99N087318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 27 Aug 2020 19:44:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364885 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 364885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 19:44:09 -0000 Author: trasz Date: Thu Aug 27 19:44:08 2020 New Revision: 364885 URL: https://svnweb.freebsd.org/changeset/base/364885 Log: MFC r362943: Make linux(4) man page also mention /compat/linux/dev. Sponsored by: The FreeBSD Foundation Modified: stable/12/share/man/man4/linux.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/linux.4 ============================================================================== --- stable/12/share/man/man4/linux.4 Thu Aug 27 19:42:52 2020 (r364884) +++ stable/12/share/man/man4/linux.4 Thu Aug 27 19:44:08 2020 (r364885) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2020 +.Dd July 5, 2020 .Dt LINUX 4 .Os .Sh NAME @@ -129,6 +129,9 @@ Defaults to 0. .Bl -tag -width /compat/linux/dev/shm -compact .It Pa /compat/linux minimal Linux run-time environment +.It Pa /compat/linux/dev +device file system, see +.Xr devfs 5 .It Pa /compat/linux/dev/fd file descriptor file system mounted with the .Cm linrdlnk From owner-svn-src-all@freebsd.org Thu Aug 27 20:25:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED1A73C27D8; Thu, 27 Aug 2020 20:25:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcvNj621vz4kF8; Thu, 27 Aug 2020 20:25:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8681:1cb0:5020:a607:a136:c9b6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 31C352E4F3; Thu, 27 Aug 2020 20:25:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm To: Jung-uk Kim , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202008261655.07QGtSZx096979@repo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <75f5b8e6-7c3f-00cb-5830-6b329e58213f@FreeBSD.org> Date: Thu, 27 Aug 2020 13:25:07 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <202008261655.07QGtSZx096979@repo.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.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 20:25:10 -0000 On 8/26/20 9:55 AM, Jung-uk Kim wrote: > Author: jkim > Date: Wed Aug 26 16:55:28 2020 > New Revision: 364822 > URL: https://svnweb.freebsd.org/changeset/base/364822 > > Log: > Fix Clang version detection. > > We prepend "FreeBSD" to Clang version string. This broke compiler test for > AVX instruction support. Have you opened a PR upstream to fix this? They should be willing to accept it since it probably affects clang on OS X as well? -- John Baldwin From owner-svn-src-all@freebsd.org Thu Aug 27 20:28:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A62C3C2C2B; Thu, 27 Aug 2020 20:28:25 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcvSS6mZzz4kk2; Thu, 27 Aug 2020 20:28:24 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot1-x331.google.com with SMTP id a65so5521779otc.8; Thu, 27 Aug 2020 13:28:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vvf3+UzW+BRFfhw3z/wJ8qlEIyabez2nZ5iUrt1bNRw=; b=Z53+Ztto63L97ZBkF0Q3xZkaohc4lFKc9zI5AR7pOC/SngZRvJYi0gySYnHHiEqoIF t8nDdrs/MP3Mrr6Txy0huj5wqG/i1cfLaT/2AahHUhRinUSxgmffNk6m4+yH3DnGoZRV VttrhvpeLvXIW/mdcv4H4qi7w4NRmMG6/jpzFqqOy8Dw+1j5XyTEQ1eycvtURl+iQnPE dErjixgnb7TSlElQjh0XI1/SL03IQDaEMx+MnwCtK9QSjvMpokfI0zYmV4C9gS04GuTJ sChYpO6+tau245xK3IKOq0G1JK+SnNWjKyoqux5fIRZh6Gr2cRmifQivlCZiHTPy/KjA z4gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vvf3+UzW+BRFfhw3z/wJ8qlEIyabez2nZ5iUrt1bNRw=; b=bkgp6rEZtz04WjioHIhrHln8ldIoEPV00CFKfUHeMRAiNXvTKghD0rQ0w5lOrEyDJV uzGYPLmbBgWUA3qvs3Te/Votrt5EOWhTJq2sPRor6BPN2f/jU3cSRmbp064ZPKnLiins +MHeTejhX4VN4cGbXwn9I5eIhm0mz6I4Ux9KKRifnr/4Ux7Dina6kPaBdOX9zwgNpT04 9oeYTFzd06AeDfl2PCYO95tHvKXDV1RyR2/OPwxAY21XCCfNV/ekzh1nnBKy8+LjChob Zk92HeL18vMO98JHtwQBiEJGpxRep9IzEyaT2diWrkQw+JlhKFh6owgN0pNHIE25a4Gk wGug== X-Gm-Message-State: AOAM532roK4+ueztUmYb1E+LEr8rBEWXB5XndQvMG+ot/IOa7MfpYw5o t6emUt3kjh1xNdyWV5UCQrYnQEIjXdbJh0xyVTSAuLJQTdGfyw== X-Google-Smtp-Source: ABdhPJwpajlgho8gKUgEBJzR/HDuoKJA8OeI9UQh8jh+HjyxyRfg8KPjFVP8QQKqOBjM1TtsfiWZ3gYqLjKx8YfGuY8= X-Received: by 2002:a9d:3984:: with SMTP id y4mr1853085otb.117.1598560103116; Thu, 27 Aug 2020 13:28:23 -0700 (PDT) MIME-Version: 1.0 References: <202008261655.07QGtSZx096979@repo.freebsd.org> <75f5b8e6-7c3f-00cb-5830-6b329e58213f@FreeBSD.org> In-Reply-To: <75f5b8e6-7c3f-00cb-5830-6b329e58213f@FreeBSD.org> From: Benjamin Kaduk Date: Thu, 27 Aug 2020 13:28:12 -0700 Message-ID: Subject: Re: svn commit: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm To: John Baldwin Cc: Jung-uk Kim , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 4BcvSS6mZzz4kk2 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 20:28:25 -0000 On Thu, Aug 27, 2020 at 1:25 PM John Baldwin wrote: > On 8/26/20 9:55 AM, Jung-uk Kim wrote: > > Author: jkim > > Date: Wed Aug 26 16:55:28 2020 > > New Revision: 364822 > > URL: https://svnweb.freebsd.org/changeset/base/364822 > > > > Log: > > Fix Clang version detection. > > > > We prepend "FreeBSD" to Clang version string. This broke compiler > test for > > AVX instruction support. > > Have you opened a PR upstream to fix this? They should be willing to > accept it since it probably affects clang on OS X as well? > > https://github.com/openssl/openssl/pull/12725 should land in a few hours. -Ben From owner-svn-src-all@freebsd.org Thu Aug 27 20:30:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D1A133C2CD0; Thu, 27 Aug 2020 20:30:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcvW946FDz4l1F; Thu, 27 Aug 2020 20:30:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8681:1cb0:5020:a607:a136:c9b6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id CAC712E90D; Thu, 27 Aug 2020 20:30:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm To: Benjamin Kaduk Cc: Jung-uk Kim , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202008261655.07QGtSZx096979@repo.freebsd.org> <75f5b8e6-7c3f-00cb-5830-6b329e58213f@FreeBSD.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Thu, 27 Aug 2020 13:30:42 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.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.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 20:30:45 -0000 On 8/27/20 1:28 PM, Benjamin Kaduk wrote: > On Thu, Aug 27, 2020 at 1:25 PM John Baldwin wrote: > >> On 8/26/20 9:55 AM, Jung-uk Kim wrote: >>> Author: jkim >>> Date: Wed Aug 26 16:55:28 2020 >>> New Revision: 364822 >>> URL: https://svnweb.freebsd.org/changeset/base/364822 >>> >>> Log: >>> Fix Clang version detection. >>> >>> We prepend "FreeBSD" to Clang version string. This broke compiler >> test for >>> AVX instruction support. >> >> Have you opened a PR upstream to fix this? They should be willing to >> accept it since it probably affects clang on OS X as well? >> >> > https://github.com/openssl/openssl/pull/12725 should land in a few hours. Yes, mail failure on my part as I missed another place where I'd already asked this (and subsequently forgot :( ). -- John Baldwin From owner-svn-src-all@freebsd.org Thu Aug 27 21:19:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C52AD3C3DCD; Thu, 27 Aug 2020 21:19:18 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcwbB5Hv1z4njX; Thu, 27 Aug 2020 21:19:18 +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 7EFEFA34B; Thu, 27 Aug 2020 21:19:18 +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 07RLJI0d043898; Thu, 27 Aug 2020 21:19:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RLJGgb043888; Thu, 27 Aug 2020 21:19:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202008272119.07RLJGgb043888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 27 Aug 2020 21:19:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364891 - in head: . release release/scripts X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in head: . release release/scripts X-SVN-Commit-Revision: 364891 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 21:19:18 -0000 Author: gjb Date: Thu Aug 27 21:19:16 2020 New Revision: 364891 URL: https://svnweb.freebsd.org/changeset/base/364891 Log: Merge the projects/release-git branch to head. This allows building 13.x from Git instead of Subversion. No MFC to stable branches is planned at this time. [1] Discussed with: git working group [1] Sponsored by: Rubicon Communications, LLC (netgate.com) Added: head/release/Makefile.inc1 - copied unchanged from r364890, projects/release-git/release/Makefile.inc1 Deleted: head/release/scripts/relnotes-search.sh Modified: head/Makefile.inc1 head/release/Makefile head/release/Makefile.azure head/release/Makefile.ec2 head/release/Makefile.gce head/release/Makefile.mirrors head/release/Makefile.vagrant head/release/release.conf.sample head/release/release.sh Directory Properties: head/ (props changed) head/cddl/ (props changed) head/cddl/contrib/opensolaris/ (props changed) head/contrib/bc/ (props changed) head/contrib/byacc/ (props changed) head/contrib/elftoolchain/ (props changed) head/contrib/ipfilter/ (props changed) head/contrib/llvm-project/ (props changed) head/contrib/llvm-project/clang/ (props changed) head/contrib/llvm-project/compiler-rt/ (props changed) head/contrib/llvm-project/libcxx/ (props changed) head/contrib/llvm-project/libunwind/ (props changed) head/contrib/llvm-project/lld/ (props changed) head/contrib/llvm-project/lldb/ (props changed) head/contrib/llvm-project/llvm/ (props changed) head/contrib/llvm-project/openmp/ (props changed) head/contrib/lua/ (props changed) head/contrib/mtree/ (props changed) head/contrib/netbsd-tests/ (props changed) head/contrib/openbsm/ (props changed) head/contrib/sendmail/ (props changed) head/contrib/sqlite3/ (props changed) head/contrib/unbound/ (props changed) head/crypto/openssh/ (props changed) head/crypto/openssl/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) head/sys/contrib/dev/acpica/ (props changed) head/sys/contrib/ipfilter/ (props changed) head/sys/gnu/dts/arm/ (props changed) head/sys/gnu/dts/arm64/ (props changed) head/sys/gnu/dts/include/ (props changed) head/sys/gnu/dts/riscv/ (props changed) Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Aug 27 21:09:17 2020 (r364890) +++ head/Makefile.inc1 Thu Aug 27 21:19:16 2020 (r364891) @@ -510,6 +510,15 @@ VCS_REVISION= $$(echo r${_VCS_REVISION}) .export VCS_REVISION .endif +.if !defined(GIT_CMD) || empty(GIT_CMD) +. for _P in /usr/bin /usr/local/bin +. if exists(${_P}/git) +GIT_CMD= ${_P}/git +. endif +. endfor +.export GIT_CMD +.endif + .if !defined(OSRELDATE) .if exists(/usr/include/osreldate.h) OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Thu Aug 27 21:09:17 2020 (r364890) +++ head/release/Makefile Thu Aug 27 21:19:16 2020 (r364891) @@ -90,15 +90,6 @@ EXTRA_PACKAGES+= src.txz .endif .if !defined(NODOC) EXTRA_PACKAGES+= reldoc -. if !defined(SVN) || empty(SVN) -. for S in svn svnlite -. for D in /usr/local/bin /usr/bin -. if(exists(${D}/${S})) -SVN?= ${D}/${S} -. endif -. endfor -. endfor -. endif .endif RELEASE_TARGETS= ftp @@ -173,7 +164,6 @@ ports.txz: reldoc: cd ${DOCDIR}/en_US.ISO8859-1/htdocs/releases/${REVISION}R && \ env MAN4DIR=${WORLDDIR}/share/man/man4 \ - SVN=${SVN} \ _BRANCH=${BRANCH} \ ${MAKE} all install clean "FORMATS=html txt" \ INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc \ @@ -336,4 +326,5 @@ release-install: cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512 cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 +.include "${.CURDIR}/Makefile.inc1" .include "${.CURDIR}/Makefile.vm" Modified: head/release/Makefile.azure ============================================================================== --- head/release/Makefile.azure Thu Aug 27 21:09:17 2020 (r364890) +++ head/release/Makefile.azure Thu Aug 27 21:19:16 2020 (r364891) @@ -17,7 +17,7 @@ AZURE${VAR}!= grep -E ^AZURE${VAR} ${AZURE_UPLOAD_CONF .endif .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" || ${BRANCH} == "PRERELEASE" -SNAPSHOT_DATE!= date +-%Y-%m-%d +SNAPSHOT_DATE!= date +-${BUILDDATE} .endif AZURE_TARGET:= ${OSRELEASE}${SNAPSHOT_DATE}.vhd Modified: head/release/Makefile.ec2 ============================================================================== --- head/release/Makefile.ec2 Thu Aug 27 21:09:17 2020 (r364890) +++ head/release/Makefile.ec2 Thu Aug 27 21:19:16 2020 (r364891) @@ -5,32 +5,8 @@ # Makefile for creating an EC2 AMI from a disk image. # -# Figure out where SVN is -.if !defined(SVN_CMD) || empty(SVN_CMD) -. for _P in /usr/bin /usr/local/bin -. for _S in svn svnlite -. if exists(${_P}/${_S}) -SVN_CMD= ${_P}/${_S} -. endif -. endfor -. endfor -.endif -.if exists(${SRCTOP}/.svn) -. if empty(EC2_SVNBRANCH) - EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} 2>/dev/null | sed -e 's/\^\///' -. export EC2_SVNBRANCH -. endif -. if empty(EC2_SVNREV) - EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} 2>/dev/null || true -. export EC2_SVNREV -. endif -.else -EC2_SVNBRANCH= unknown -EC2_SVNREV= unknown -.endif - .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" || ${BRANCH} == "PRERELEASE" -AMINAMESUFFIX!= date +-%Y-%m-%d +AMINAMESUFFIX!= date +-${BUILDDATE} .endif .if defined(EC2PUBLIC) && !empty(EC2PUBLIC) PUBLISH= --public @@ -40,7 +16,7 @@ PUBLICSNAP= --publicsnap .endif .if defined(EC2SNSTOPIC) && !empty(EC2SNSTOPIC) EC2SNSREL= ${REVISION}-${BRANCH} -EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV} +EC2SNSVERS= ${GITBRANCH}@${GITREV} .endif .if ${TARGET_ARCH} != "amd64" EC2ARCH= --${TARGET_ARCH:S/aarch64/arm64/} @@ -89,7 +65,7 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} ${EC2ARCH} --sriov --ena \ ${.OBJDIR}/ec2.raw \ "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ - "${TYPE}/${TARGET} ${EC2_SVNBRANCH}@${EC2_SVNREV}" \ + "${TYPE}/${TARGET} ${GITBRANCH}@${GITREV}" \ ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} @touch ${.TARGET} Modified: head/release/Makefile.gce ============================================================================== --- head/release/Makefile.gce Thu Aug 27 21:09:17 2020 (r364890) +++ head/release/Makefile.gce Thu Aug 27 21:19:16 2020 (r364891) @@ -24,8 +24,7 @@ GCE_FAMILY= ${TYPE:tl}-${REVISION:S,.,-,} .endif .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" || ${BRANCH} == "PRERELEASE" -_SNAPSHOT_DATE!= date +%Y%m%d -SNAPSHOT_DATE= -v${_SNAPSHOT_DATE} +SNAPSHOT_DATE= -v${BUILDDATE} GCE_FAMILY_SUFX= -snap .endif Copied: head/release/Makefile.inc1 (from r364890, projects/release-git/release/Makefile.inc1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/Makefile.inc1 Thu Aug 27 21:19:16 2020 (r364891, copy of r364890, projects/release-git/release/Makefile.inc1) @@ -0,0 +1,31 @@ +# +# $FreeBSD$ +# + +# Figure out where the git binary is. +.for _P in /usr/bin /usr/local/bin +. if !defined(GIT_CMD) || empty(GIT_CMD) +. if exists(${_P}/git) +GIT_CMD= ${_P}/git +. endif +. endif +.endfor +.if !defined(GIT_CMD) && empty(GIT_CMD) +. error "Git binary not found. Set GIT_CMD appropriately." +.endif + +# Set the git branch and hash to export where needed. +.if !defined(GITBRANCH) || empty(GITBRANCH) +GITBRANCH!= ${GIT_CMD} -C ${.CURDIR} rev-parse --abbrev-ref HEAD 2>/dev/null | sed -e 's/\^\///' +.export GITBRANCH +.endif +.if !defined(GITREV) || empty(GITREV) +GITREV!= ${GIT_CMD} -C ${.CURDIR} rev-parse --verify --short HEAD 2>/dev/null || true +.export GITREV +.endif + +# Set the build date, primarily for snapshot builds. +.if !defined(BUILDDATE) || empty(BUILDDATE) +BUILDDATE!= date +%Y%m%d +.export BUILDDATE +.endif Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Thu Aug 27 21:09:17 2020 (r364890) +++ head/release/Makefile.mirrors Thu Aug 27 21:19:16 2020 (r364891) @@ -19,7 +19,6 @@ FTPDIR?= ${RELEASEDIR}/ftp-stage .if exists(${RELEASEDIR}) STAGE_TARGETS?= iso-images-stage .endif -SRCBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} .if (defined(EMBEDDED_TARGET) && !empty(EMBEDDED_TARGET)) || (defined(EMBEDDEDBUILD) && !empty(EMBEDDEDBUILD)) . if ${TARGET:Marm*} != "" || ${EMBEDDED_TARGET:Marm*} != "" @@ -31,26 +30,10 @@ EMBEDDED= 1 .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" || ${BRANCH} == "PRERELEASE" || ${BRANCH:MALPHA*} != "" SNAPSHOT= 1 TLD?= ${FTPDIR}/snapshots -. if !defined(SVNREVISION) || empty(SVNREVISION) -. for _D in /usr/bin /usr/local/bin -. for _S in svnversion svnliteversion -. if exists(${_D}/${_S}) -SVNVERSION?= ${_D}/${_S} -. endif -. endfor -. endfor -. if exists(${SVNVERSION}) && !empty(SVNVERSION) -SVNREVISION!= ${SVNVERSION} ${WORLDDIR}/Makefile -. endif -. endif # !defined(SVNREVISION) -. if !defined(BUILDDATE) || empty(BUILDDATE) -. if exists(${.CURDIR}/${.OBJDIR}/dist/base/bin/sh) -BUILDDATE!= cd ${.CURDIR} && date -j -f '%s' $$(stat -f "%c" ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d -. else +.if !defined(BUILDDATE) || empty(BUILDDATE) BUILDDATE!= date +%Y%m%d -. endif -. endif -_SNAP_SUFFIX:= ${BUILDDATE}-r${SVNREVISION} +.endif +_SNAP_SUFFIX:= ${BUILDDATE}-${GITREV} .else # release SNAPSHOT= @@ -187,8 +170,8 @@ iso-images-stage: mkdir -p ${FTP_DIR} cp -p ${RELEASEDIR}/ftp/*.txz ${RELEASEDIR}/ftp/MANIFEST ${FTP_DIR} echo ${BUILDDATE} > ${FTP_DIR}/BUILDDATE - echo ${SRCBRANCH} > ${FTP_DIR}/SRCBRANCH - echo r${SVNREVISION} > ${FTP_DIR}/REVISION + echo ${GITBRANCH} > ${FTP_DIR}/GITBRANCH + echo ${GITREV} > ${FTP_DIR}/REVISION cd ${TLD}/${TARGET} && \ ln -s ${TARGET_ARCH}/${REVISION}-${BRANCH} \ ${REVISION}-${BRANCH} Modified: head/release/Makefile.vagrant ============================================================================== --- head/release/Makefile.vagrant Thu Aug 27 21:09:17 2020 (r364890) +++ head/release/Makefile.vagrant Thu Aug 27 21:19:16 2020 (r364891) @@ -29,7 +29,7 @@ ATLAS${VAR}:= ${VAGRANT${VAR}} .endif .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" || ${BRANCH} == "PRERELEASE" -SNAPSHOT_DATE!= date +-%Y%m%d +SNAPSHOT_DATE!= date +-${BUILDDATE} .endif VAGRANT_VERSION!= date +%Y.%m.%d Modified: head/release/release.conf.sample ============================================================================== --- head/release/release.conf.sample Thu Aug 27 21:09:17 2020 (r364890) +++ head/release/release.conf.sample Thu Aug 27 21:19:16 2020 (r364891) @@ -12,23 +12,19 @@ ## Set the directory within which the release will be built. CHROOTDIR="/scratch" -## Set the svn host. -SVNROOT="svn://svn.FreeBSD.org/" +## Set the version control system host. +GITROOT="https://cgit-beta.freebsd.org/" +GITSRC="src.git" +GITPORTS="ports.git" +GITDOC="doc.git" ## Set the src/, ports/, and doc/ branches or tags. -SRCBRANCH="base/head@rHEAD" -DOCBRANCH="doc/head@rHEAD" -PORTBRANCH="ports/head@rHEAD" +SRCBRANCH="main" +DOCBRANCH="main" +PORTBRANCH="main" -## Run svn co --force for src checkout. -#SRC_FORCE_CHECKOUT=yes - -## Sample configuration for using git instead of svn. -#VCSCMD="/usr/local/bin/git clone --branch master" -#SVNROOT="" -#SRCBRANCH="https://github.com/freebsd/freebsd" -#DOCBRANCH="https://github.com/freebsd/freebsd-doc" -#PORTBRANCH="https://github.com/freebsd/freebsd-ports" +## Sample configuration for using git from ports. +#GITCMD="/usr/local/bin/git clone -q --branch main" ## Set to override the default target architecture. #TARGET="amd64" Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Thu Aug 27 21:09:17 2020 (r364890) +++ head/release/release.sh Thu Aug 27 21:19:16 2020 (r364891) @@ -1,6 +1,7 @@ #!/bin/sh #- -# Copyright (c) 2013-2018 The FreeBSD Foundation +# Copyright (c) 2020 Rubicon Communications, LLC (netgate.com) +# Copyright (c) 2013-2019 The FreeBSD Foundation # Copyright (c) 2013 Glen Barber # Copyright (c) 2011 Nathan Whitehorn # All rights reserved. @@ -38,7 +39,7 @@ export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin" -VERSION=2 +VERSION=3 # Prototypes that can be redefined per-chroot or per-target. load_chroot_env() { } @@ -51,7 +52,7 @@ usage() { } # env_setup(): Set up the default build environment variables, such as the -# CHROOTDIR, VCSCMD, SVNROOT, etc. This is called before the release.conf +# CHROOTDIR, VCSCMD, GITROOT, etc. This is called before the release.conf # file is sourced, if '-c ' is specified. env_setup() { # The directory within which the release will be built. @@ -60,27 +61,29 @@ env_setup() { # The default version control system command to obtain the sources. for _dir in /usr/bin /usr/local/bin; do - for _svn in svn svnlite; do - [ -x "${_dir}/${_svn}" ] && VCSCMD="${_dir}/${_svn}" - [ ! -z "${VCSCMD}" ] && break 2 - done + [ -x "${_dir}/git" ] && VCSCMD="/${_dir}/git" + [ ! -z "${VCSCMD}" ] && break 2 done - VCSCMD="${VCSCMD} checkout" - # The default svn checkout server, and svn branches for src/, doc/, + if [ -z "${VCSCMD}" ]; then + echo "*** The devel/git port/package is required." + exit 1 + fi + VCSCMD="/usr/local/bin/git clone -q" + + # The default git checkout server, and branches for src/, doc/, # and ports/. - SVNROOT="svn://svn.FreeBSD.org/" - SRCBRANCH="base/head@rHEAD" - DOCBRANCH="doc/head@rHEAD" - PORTBRANCH="ports/head@rHEAD" + GITROOT="https://cgit-beta.FreeBSD.org/" + SRCBRANCH="main" + DOCBRANCH="main" + PORTBRANCH="main" + GITSRC="src.git" + GITPORTS="ports.git" + GITDOC="doc.git" # Set for embedded device builds. EMBEDDEDBUILD= - # Sometimes one needs to checkout src with --force svn option. - # If custom kernel configs copied to src tree before checkout, e.g. - SRC_FORCE_CHECKOUT= - # The default make.conf and src.conf to use. Set to /dev/null # by default to avoid polluting the chroot(8) environment with # non-default settings. @@ -128,20 +131,11 @@ env_setup() { # in env_setup() if '-c ' is specified. env_check() { chroot_build_release_cmd="chroot_build_release" - # Fix for backwards-compatibility with release.conf that does not have - # the trailing '/'. - case ${SVNROOT} in - *svn*) - SVNROOT="${SVNROOT}/" - ;; - *) - ;; - esac - # Prefix the branches with the SVNROOT for the full checkout URL. - SRCBRANCH="${SVNROOT}${SRCBRANCH}" - DOCBRANCH="${SVNROOT}${DOCBRANCH}" - PORTBRANCH="${SVNROOT}${PORTBRANCH}" + # Prefix the branches with the GITROOT for the full checkout URL. + SRC="${GITROOT}${GITSRC}" + DOC="${GITROOT}${GITDOC}" + PORT="${GITROOT}${GITPORTS}" if [ -n "${EMBEDDEDBUILD}" ]; then WITH_DVD= @@ -187,11 +181,6 @@ env_check() { else ARCH_FLAGS= fi - # Force src checkout if configured - FORCE_SRC_KEY= - if [ -n "${SRC_FORCE_CHECKOUT}" ]; then - FORCE_SRC_KEY="--force" - fi if [ -z "${CHROOTDIR}" ]; then echo "Please set CHROOTDIR." @@ -231,13 +220,13 @@ chroot_setup() { mkdir -p ${CHROOTDIR}/usr if [ -z "${SRC_UPDATE_SKIP}" ]; then - ${VCSCMD} ${FORCE_SRC_KEY} ${SRCBRANCH} ${CHROOTDIR}/usr/src + ${VCSCMD} ${SRC} -b ${SRCBRANCH} ${CHROOTDIR}/usr/src fi if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then - ${VCSCMD} ${DOCBRANCH} ${CHROOTDIR}/usr/doc + ${VCSCMD} ${DOC} -b ${DOCBRANCH} ${CHROOTDIR}/usr/doc fi if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then - ${VCSCMD} ${PORTBRANCH} ${CHROOTDIR}/usr/ports + ${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports fi if [ -z "${CHROOTBUILD_SKIP}" ]; then @@ -274,6 +263,26 @@ extra_chroot_setup() { cp ${SRC_CONF} ${CHROOTDIR}/${SRC_CONF} fi + # Install git from ports or packages if the ports tree is + # available and VCSCMD is unset. + _gitcmd="$(which git)" + if [ -d ${CHROOTDIR}/usr/ports -a -z "${_gitcmd}" ]; then + # Trick the ports 'run-autotools-fixup' target to do the right + # thing. + _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) + REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) + BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) + UNAME_r=${REVISION}-${BRANCH} + GITUNSETOPTS="CONTRIB CURL CVS GITWEB GUI HTMLDOCS" + GITUNSETOPTS="${GITUNSETOPTS} ICONV NLS P4 PERL" + GITUNSETOPTS="${GITUNSETOPTS} SEND_EMAIL SUBTREE SVN" + GITUNSETOPTS="${GITUNSETOPTS} PCRE PCRE2" + eval chroot ${CHROOTDIR} env OPTIONS_UNSET=\"${GITUNSETOPTS}\" \ + make -C /usr/ports/devel/git FORCE_PKG_REGISTER=1 \ + WRKDIRPREFIX=/tmp/ports \ + DISTDIR=/tmp/distfiles \ + install clean distclean + fi if [ -d ${CHROOTDIR}/usr/ports ]; then # Trick the ports 'run-autotools-fixup' target to do the right # thing. From owner-svn-src-all@freebsd.org Thu Aug 27 21:37:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5EB733C4061; Thu, 27 Aug 2020 21:37:24 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcx041hF3z4pl2; Thu, 27 Aug 2020 21:37:24 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p4fd3a495.dip0.t-ipconnect.de [79.211.164.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id D1FAC2EED9; Thu, 27 Aug 2020 21:37:23 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Thu, 27 Aug 2020 23:37:26 +0200 From: Gordon Bergling To: Glen Barber Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364891 - in head: . release release/scripts Message-ID: <20200827213726.GA74980@lion.0xfce3.net> References: <202008272119.07RLJGgb043888@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline In-Reply-To: <202008272119.07RLJGgb043888@repo.freebsd.org> X-Url: X-Operating-System: FreeBSD 12.1-STABLE amd64 X-Host-Uptime: 11:29PM up 16 days, 57 mins, 1 user, load averages: 0.07, 0.27, 0.31 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 21:37:24 -0000 --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 27, 2020 at 09:19:16PM +0000, Glen Barber wrote: > Author: gjb > Date: Thu Aug 27 21:19:16 2020 > New Revision: 364891 > URL: https://svnweb.freebsd.org/changeset/base/364891 >=20 > Log: > Merge the projects/release-git branch to head. > This allows building 13.x from Git instead of Subversion. > =20 > No MFC to stable branches is planned at this time. [1] > =20 > Discussed with: git working group [1] > Sponsored by: Rubicon Communications, LLC (netgate.com) Thanks for accomplishing this! Is there any difference on building -CURRENT using the github.com mirror compared to FreeBSD's own git sources? --Gordon --envbJBWh7q8WU6mo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEEYbWI0KY5X7yH/Fy4OQX2V8rP09wFAl9IJ5VfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDYx QjU4OEQwQTYzOTVGQkM4N0ZDNUNCODM5MDVGNjU3Q0FDRkQzREMACgkQOQX2V8rP 09wHmwgAgKSHgnV+cgelJlFYbcoD5BQzpnj0srUsy5lbshQvuGzcx0Tefu9wbYtY XJYP+L1hTU6BSPGaCDOe0THMWDN6/zZ9raJnPrTiYSlCW786Cd9fxoMnBeKagbDj sGMfztasd17jeEmvgrf5P6bSo+2l84Cq9Nn15rmZrAa9979rCIijA1M+EK+yM8uY KQLASHlnp9A8KJ5zyOuuj3LpHnb54JIFmWDM4YAHufldm63zBnpTelwAfaew8yGn 1zUUtyeBDPIT9E5A3zwuN0sOUJcxR8XgSkBsd2wHtaLT1im7SjySGdVi0b8rgjln XWAkIK8pp1jqJN/dJK1P21G6cSRbYg== =8HWN -----END PGP SIGNATURE----- --envbJBWh7q8WU6mo-- From owner-svn-src-all@freebsd.org Thu Aug 27 21:37:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ADA2C3C43FE; Thu, 27 Aug 2020 21:37:36 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcx0J4F2Lz4pZV; Thu, 27 Aug 2020 21:37:36 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 70D83AA94; Thu, 27 Aug 2020 21:37:36 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07RLbamb056313; Thu, 27 Aug 2020 21:37:36 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RLbaCF056312; Thu, 27 Aug 2020 21:37:36 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008272137.07RLbaCF056312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 27 Aug 2020 21:37:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364893 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 364893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 21:37:36 -0000 Author: mmacy Date: Thu Aug 27 21:37:35 2020 New Revision: 364893 URL: https://svnweb.freebsd.org/changeset/base/364893 Log: ZFS: remove duplicate "com.datto:encryption" from loader Modified: head/stand/libsa/zfs/zfsimpl.c Modified: head/stand/libsa/zfs/zfsimpl.c ============================================================================== --- head/stand/libsa/zfs/zfsimpl.c Thu Aug 27 21:25:21 2020 (r364892) +++ head/stand/libsa/zfs/zfsimpl.c Thu Aug 27 21:37:35 2020 (r364893) @@ -128,7 +128,6 @@ static const char *features_for_read[] = { "com.delphix:obsolete_counts", "com.intel:allocation_classes", "org.freebsd:zstd_compress", - "com.datto:encryption", NULL }; From owner-svn-src-all@freebsd.org Thu Aug 27 21:43:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E59FA3C47B6; Thu, 27 Aug 2020 21:43:18 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bcx6t5RWHz4qTZ; Thu, 27 Aug 2020 21:43:18 +0000 (UTC) (envelope-from gjb@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1598564598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vWb3rHG+//Leo6X9Zm3YloqoLILC7zNezK4xHlYc7Lw=; b=FEaTEby5591Vb6kB9OvGw6yMuPJNfWxqkqa/26nSQ6XhBdb/KXbKxz36rIyV7ajNkkwS8A v9x1cesedJ74/HMFTNWUuR9pmBf/l0yf/Q9b1W0RPZ6jC3NiS1dcCt8Hf4xlPisP7ds7k0 h4Yd8C7nnZ3NIP9uC6qCfmNXNDdTBVxmWifVaPbsx1v+mkownl3S7jAIbbLeS/ndakffQa 8y1RJbEdXUvUT4ZlwSR1J1GaUe+PzqHSYLxKWZ0F+danO6ejB45bduOlgx/3u6y6zgtKnV YRz0Y+LLie/OKSF3V3gzNk2UdaMglRzLAfo5wBzfQREiQvRK+hnrGgld56BlRg== Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 4596E1D8D1; Thu, 27 Aug 2020 21:43:18 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Thu, 27 Aug 2020 21:43:16 +0000 From: Glen Barber To: Gordon Bergling Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364891 - in head: . release release/scripts Message-ID: <20200827214316.GZ61041@FreeBSD.org> References: <202008272119.07RLJGgb043888@repo.freebsd.org> <20200827213726.GA74980@lion.0xfce3.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qRu+kOci6Aaql5G6" Content-Disposition: inline In-Reply-To: <20200827213726.GA74980@lion.0xfce3.net> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1598564598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vWb3rHG+//Leo6X9Zm3YloqoLILC7zNezK4xHlYc7Lw=; b=rvgjbSGF8XSzLiPue5KdULFZaXlP6pD694Jjcf6Sz0+d+w2Xq0utLAmKo4VfzXYAn2/waT 7OM6wc/071JKj5BNh0Ur5OiFWvVbnsY5Kr/kQmQbWTAEt8uox/CpPbS0AuqC7diqd8mLPU gQLNBcLAw53WUf8efkaIDJ0lhPKx7mpPGWexkpmjLsXzs0L3cyEX1+oFeKVWydh9l4oL+o Bc0SqXey4P/B+hT28Z6iO1HhLk+PHczNNgWXUCyR4ByiOJBp/ln1lH0apxP4Xv7YJUdLGy i8eQgBQ2HI9GHTFNFPwBSIx/V2E751lxGG63cjlfsf3lGwVeyl5GxDCP1ScptQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1598564598; a=rsa-sha256; cv=none; b=xFZvJoL7YQeUHO7cegdCKNqPP1h6vI6e48jtt0USZwP6ElfXgEkRggT7TwArLr1lxllai7 cbzfrlvEHHJx0u/8hHlMEGVeqCMtoNHv1E8DAfLHR7X/75QVkzJYNUSYNqGQquWmNxkT0J QC3HbDMpRzzm1dFGKufdWvHYf4V9zBK33isq2EMCQJp6q9pkj+zFhO0SCsWweLGJufUQKs 7VZwbALwSLkeMrt1+GtC+gNRhQbHSwczNXN9q2TdJL/Q8zsIlZqeWLqvKDK4Uv+uoZihak b1obHgOKdLEkrwc4+8l4vwKRMcBpzWPoVZpM3R1dmTrsyR9oz7mCR+SjvPS0rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 21:43:19 -0000 --qRu+kOci6Aaql5G6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 27, 2020 at 11:37:26PM +0200, Gordon Bergling wrote: > On Thu, Aug 27, 2020 at 09:19:16PM +0000, Glen Barber wrote: > > Author: gjb > > Date: Thu Aug 27 21:19:16 2020 > > New Revision: 364891 > > URL: https://svnweb.freebsd.org/changeset/base/364891 > >=20 > > Log: > > Merge the projects/release-git branch to head. > > This allows building 13.x from Git instead of Subversion. > > =20 > > No MFC to stable branches is planned at this time. [1] > > =20 > > Discussed with: git working group [1] > > Sponsored by: Rubicon Communications, LLC (netgate.com) >=20 > Thanks for accomplishing this! >=20 Thank you. > Is there any difference on building -CURRENT using the github.com > mirror compared to FreeBSD's own git sources? >=20 The only difference is the project branches are not in the FreeBSD git repository (as far as I know, that is the only thing). Otherwise, head builds just fine(tm) using either. Oh, and the github mirror still uses the 'master' branch, whereas the FreeBSD repo uses 'main'. I think that's the only noticeable thing. Glen --qRu+kOci6Aaql5G6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAl9IKPQACgkQAxRYpUeP 4pMsMw//eIt/fpi8VClAJ2vBOhklO1yKn5zQKH11ZuEb4PkxTI7qyTL3Ps9hoTSO rgVoyiGylIlJBBhbLNWzYQpvYophzVTrPlfK1q+Y2PatwUcJzPvP1JMVKHFwNlN0 e6j3Wp0SwzJnjnGdW9YChXBWWMuriZuQ2tP/fSez5P+gBQdlOUfMsUO8deuNQiuO ewwMJgbyeAUsuiPokqIwmMJqk/pJsPNQb0/klBBGLmfHe22j2jSN6RyfAsCqxS+m L5UXgBEowcP7Ca55Fo9cOF/u8nVim1klMm/RNLFgC8YrCYkiFsWuhW0GqEsBiQm+ 4brCJHJfhchyonMUG+Qn2V8FvuBzKqdGxZtwbyp5J/yLAWCsXj8shlBX9VFNnTjP pl3Fl6j3aZ3Xvq7+3hopezS6JMFusi/02JDNM23FHLMs85eeNCWV1saSkBNdpmyV x+LlM+dkSFOau54vPqs7U/Jijx4h9GBNhSlXFpLSiZO53vxJxJ8dgFCwk121xXrc ntmgpA9f4VmesOR81//iy4HQwvbwSnuonyEw0Nbmnnn1jWFyu8c5QVbZldI9lLZ5 ame8dElKtrxOJE/BftS+Y4N6tFOx4sy2mQG42cK+EKExkJlNf1HcoUNyvoObLreG jbZXXgfOma1PmjEUgsDAwNtBbsnYBaYHxG1Gl0YcEKTVqpkCIBc= =R+Hn -----END PGP SIGNATURE----- --qRu+kOci6Aaql5G6-- From owner-svn-src-all@freebsd.org Thu Aug 27 22:14:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7EE033C5480; Thu, 27 Aug 2020 22:14:59 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BcxqR2m7Sz4ryS; Thu, 27 Aug 2020 22:14:59 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3DDABB201; Thu, 27 Aug 2020 22:14:59 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07RMExgt080415; Thu, 27 Aug 2020 22:14:59 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RMExfE080414; Thu, 27 Aug 2020 22:14:59 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202008272214.07RMExfE080414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 27 Aug 2020 22:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364895 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364895 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 22:14:59 -0000 Author: mckusick Date: Thu Aug 27 22:14:58 2020 New Revision: 364895 URL: https://svnweb.freebsd.org/changeset/base/364895 Log: Add a comment to clarify when and why cached names are deleted during pathname lookup. Reviewed by: kib MFC after: 3 days Sponsored by: Netflix Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Thu Aug 27 21:47:43 2020 (r364894) +++ head/sys/kern/vfs_lookup.c Thu Aug 27 22:14:58 2020 (r364895) @@ -785,6 +785,16 @@ lookup(struct nameidata *ndp) wantparent = cnp->cn_flags & (LOCKPARENT | WANTPARENT); KASSERT(cnp->cn_nameiop == LOOKUP || wantparent, ("CREATE, DELETE, RENAME require LOCKPARENT or WANTPARENT.")); + /* + * When set to zero, docache causes the last component of the + * pathname to be deleted from the cache and the full lookup + * of the name to be done (via VOP_CACHEDLOOKUP()). Often + * filesystems need some pre-computed values that are made + * during the full lookup, for instance UFS sets dp->i_offset. + * + * The docache variable is set to zero when requested by the + * NOCACHE flag and for all modifying operations except CREATE. + */ docache = (cnp->cn_flags & NOCACHE) ^ NOCACHE; if (cnp->cn_nameiop == DELETE || (wantparent && cnp->cn_nameiop != CREATE && From owner-svn-src-all@freebsd.org Thu Aug 27 23:57:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3322D3C6DD2; Thu, 27 Aug 2020 23:57:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bd05n0wQwz3SSj; Thu, 27 Aug 2020 23:57:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD85DBDF9; Thu, 27 Aug 2020 23:57:32 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07RNvWeh042137; Thu, 27 Aug 2020 23:57:32 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RNvVRf042127; Thu, 27 Aug 2020 23:57:31 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202008272357.07RNvVRf042127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 27 Aug 2020 23:57:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364896 - in head/sys/fs: nfs nfsclient nfsserver X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys/fs: nfs nfsclient nfsserver X-SVN-Commit-Revision: 364896 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 27 Aug 2020 23:57:33 -0000 Author: rmacklem Date: Thu Aug 27 23:57:30 2020 New Revision: 364896 URL: https://svnweb.freebsd.org/changeset/base/364896 Log: Add flags to enable NFS over TLS to the NFS client and server. An Internet Draft titled "Towards Remote Procedure Call Encryption By Default" (soon to be an RFC I think) describes how Sun RPC is to use TLS with NFS as a specific application case. Various commits prepared the NFS code to use KERN_TLS, mainly enabling use of ext_pgs mbufs for large RPC messages. r364475 added TLS support to the kernel RPC. This commit (which is the final one for kernel changes required to do NFS over TLS) adds support for three export flags: MNT_EXTLS - Requires a TLS connection. MNT_EXTLSCERT - Requires a TLS connection where the client presents a valid X.509 certificate during TLS handshake. MNT_EXTLSCERTUSER - Requires a TLS connection where the client presents a valid X.509 certificate with "user@domain" in the otherName field of the SubjectAltName during TLS handshake. Without these export options, clients are permitted, but not required, to use TLS. For the client, a new nmount(2) option called "tls" makes the client do a STARTTLS Null RPC and TLS handshake for all TCP connections used for the mount. The CLSET_TLS client control option is used to indicate to the kernel RPC that this should be done. Unless the above export flags or "tls" option is used, semantics should not change for the NFS client nor server. For NFS over TLS to work, the userspace daemons rpctlscd(8) { for client } or rpctlssd(8) daemon { for server } must be running. Modified: head/sys/fs/nfs/nfs_commonkrpc.c head/sys/fs/nfs/nfsdport.h head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clkrpc.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/fs/nfsclient/nfsmount.h head/sys/fs/nfsserver/nfs_nfsdkrpc.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/fs/nfsserver/nfs_nfsdserv.c head/sys/fs/nfsserver/nfs_nfsdsubs.c Modified: head/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- head/sys/fs/nfs/nfs_commonkrpc.c Thu Aug 27 22:14:58 2020 (r364895) +++ head/sys/fs/nfs/nfs_commonkrpc.c Thu Aug 27 23:57:30 2020 (r364896) @@ -281,6 +281,8 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq CLNT_CONTROL(client, CLSET_INTERRUPTIBLE, &one); if ((nmp->nm_flag & NFSMNT_RESVPORT)) CLNT_CONTROL(client, CLSET_PRIVPORT, &one); + if (NFSHASTLS(nmp)) + CLNT_CONTROL(client, CLSET_TLS, &one); if (NFSHASSOFT(nmp)) { if (nmp->nm_sotype == SOCK_DGRAM) /* Modified: head/sys/fs/nfs/nfsdport.h ============================================================================== --- head/sys/fs/nfs/nfsdport.h Thu Aug 27 22:14:58 2020 (r364895) +++ head/sys/fs/nfs/nfsdport.h Thu Aug 27 23:57:30 2020 (r364896) @@ -81,6 +81,9 @@ struct nfsexstuff { #define NFSVNO_EXPORTANON(e) ((e)->nes_exflag & MNT_EXPORTANON) #define NFSVNO_EXSTRICTACCESS(e) ((e)->nes_exflag & MNT_EXSTRICTACCESS) #define NFSVNO_EXV4ONLY(e) ((e)->nes_exflag & MNT_EXV4ONLY) +#define NFSVNO_EXTLS(e) ((e)->nes_exflag & MNT_EXTLS) +#define NFSVNO_EXTLSCERT(e) ((e)->nes_exflag & MNT_EXTLSCERT) +#define NFSVNO_EXTLSCERTUSER(e) ((e)->nes_exflag & MNT_EXTLSCERTUSER) #define NFSVNO_SETEXRDONLY(e) ((e)->nes_exflag = (MNT_EXPORTED|MNT_EXRDONLY)) Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Thu Aug 27 22:14:58 2020 (r364895) +++ head/sys/fs/nfs/nfsport.h Thu Aug 27 23:57:30 2020 (r364896) @@ -1055,6 +1055,7 @@ bool ncl_pager_setsize(struct vnode *vp, u_quad_t *nsi #define NFSHASOPENMODE(n) ((n)->nm_state & NFSSTA_OPENMODE) #define NFSHASONEOPENOWN(n) (((n)->nm_flag & NFSMNT_ONEOPENOWN) != 0 && \ (n)->nm_minorvers > 0) +#define NFSHASTLS(n) (((n)->nm_newflag & NFSMNT_TLS) != 0) /* * Set boottime. Modified: head/sys/fs/nfsclient/nfs_clkrpc.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clkrpc.c Thu Aug 27 22:14:58 2020 (r364895) +++ head/sys/fs/nfsclient/nfs_clkrpc.c Thu Aug 27 23:57:30 2020 (r364896) @@ -37,12 +37,14 @@ __FBSDID("$FreeBSD$"); #include "opt_kgssapi.h" +#include "opt_kern_tls.h" #include #include -#include #include +#include +#include NFSDLOCKMUTEX; @@ -67,6 +69,9 @@ nfscb_program(struct svc_req *rqst, SVCXPRT *xprt) { struct nfsrv_descript nd; int cacherep, credflavor; +#ifdef KERN_TLS + u_int maxlen; +#endif memset(&nd, 0, sizeof(nd)); if (rqst->rq_proc != NFSPROC_NULL && @@ -107,6 +112,13 @@ nfscb_program(struct svc_req *rqst, SVCXPRT *xprt) #ifdef MAC mac_cred_associate_nfsd(nd.nd_cred); #endif +#endif +#ifdef KERN_TLS + if ((xprt->xp_tls & RPCTLS_FLAGS_HANDSHAKE) != 0 && + rpctls_getinfo(&maxlen, false, false)) { + nd.nd_flag |= ND_EXTPG; + nd.nd_maxextsiz = maxlen; + } #endif cacherep = nfs_cbproc(&nd, rqst->rq_xid); } else { Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Thu Aug 27 22:14:58 2020 (r364895) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Thu Aug 27 23:57:30 2020 (r364896) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include "opt_bootp.h" #include "opt_nfsroot.h" +#include "opt_kern_tls.h" #include #include @@ -77,6 +78,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + FEATURE(nfscl, "NFSv4 client"); extern int nfscl_ticks; @@ -117,7 +120,7 @@ static void nfs_decode_args(struct mount *mp, struct n static int mountnfs(struct nfs_args *, struct mount *, struct sockaddr *, char *, u_char *, int, u_char *, int, u_char *, int, struct vnode **, struct ucred *, - struct thread *, int, int, int); + struct thread *, int, int, int, uint32_t); static void nfs_getnlminfo(struct vnode *, uint8_t *, size_t *, struct sockaddr_storage *, int *, off_t *, struct timeval *); @@ -544,7 +547,7 @@ nfs_mountdiskless(char *path, nam = sodupsockaddr((struct sockaddr *)sin, M_WAITOK); if ((error = mountnfs(args, mp, nam, path, NULL, 0, dirpath, dirlen, NULL, 0, vpp, td->td_ucred, td, NFS_DEFAULT_NAMETIMEO, - NFS_DEFAULT_NEGNAMETIMEO, 0)) != 0) { + NFS_DEFAULT_NEGNAMETIMEO, 0, 0)) != 0) { printf("nfs_mountroot: mount %s on /: %d\n", path, error); return (error); } @@ -746,7 +749,7 @@ static const char *nfs_opts[] = { "from", "nfs_args", "resvport", "readahead", "hostname", "timeo", "timeout", "addr", "fh", "nfsv3", "sec", "principal", "nfsv4", "gssname", "allgssname", "dirpath", "minorversion", "nametimeo", "negnametimeo", "nocto", "noncontigwr", - "pnfs", "wcommitsize", "oneopenown", + "pnfs", "wcommitsize", "oneopenown", "tls", NULL }; /* @@ -897,9 +900,11 @@ nfs_mount(struct mount *mp) int dirlen, has_nfs_args_opt, has_nfs_from_opt, krbnamelen, srvkrbnamelen; size_t hstlen; + uint32_t newflag; has_nfs_args_opt = 0; has_nfs_from_opt = 0; + newflag = 0; hst = malloc(MNAMELEN, M_TEMP, M_WAITOK); if (vfs_filteropt(mp->mnt_optnew, nfs_opts)) { error = EINVAL; @@ -983,6 +988,8 @@ nfs_mount(struct mount *mp) args.flags |= NFSMNT_PNFS; if (vfs_getopt(mp->mnt_optnew, "oneopenown", NULL, NULL) == 0) args.flags |= NFSMNT_ONEOPENOWN; + if (vfs_getopt(mp->mnt_optnew, "tls", NULL, NULL) == 0) + newflag |= NFSMNT_TLS; if (vfs_getopt(mp->mnt_optnew, "readdirsize", (void **)&opt, NULL) == 0) { if (opt == NULL) { vfs_mount_error(mp, "illegal readdirsize"); @@ -1337,7 +1344,7 @@ nfs_mount(struct mount *mp) args.fh = nfh; error = mountnfs(&args, mp, nam, hst, krbname, krbnamelen, dirpath, dirlen, srvkrbname, srvkrbnamelen, &vp, td->td_ucred, td, - nametimeo, negnametimeo, minvers); + nametimeo, negnametimeo, minvers, newflag); out: if (!error) { MNT_ILOCK(mp); @@ -1386,7 +1393,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, stru char *hst, u_char *krbname, int krbnamelen, u_char *dirpath, int dirlen, u_char *srvkrbname, int srvkrbnamelen, struct vnode **vpp, struct ucred *cred, struct thread *td, int nametimeo, int negnametimeo, - int minvers) + int minvers, uint32_t newflag) { struct nfsmount *nmp; struct nfsnode *np; @@ -1396,6 +1403,9 @@ mountnfs(struct nfs_args *argp, struct mount *mp, stru struct nfsclds *dsp, *tdsp; uint32_t lease; static u_int64_t clval = 0; +#ifdef KERN_TLS + u_int maxlen; +#endif NFSCL_DEBUG(3, "in mnt\n"); clp = NULL; @@ -1405,9 +1415,22 @@ mountnfs(struct nfs_args *argp, struct mount *mp, stru free(nam, M_SONAME); return (0); } else { + /* NFS-over-TLS requires that rpctls be functioning. */ + if ((newflag & NFSMNT_TLS) != 0) { + error = EINVAL; +#ifdef KERN_TLS + if (rpctls_getinfo(&maxlen, true, false)) + error = 0; +#endif + if (error != 0) { + free(nam, M_SONAME); + return (error); + } + } nmp = malloc(sizeof (struct nfsmount) + krbnamelen + dirlen + srvkrbnamelen + 2, M_NEWNFSMNT, M_WAITOK | M_ZERO); + nmp->nm_newflag = newflag; TAILQ_INIT(&nmp->nm_bufq); TAILQ_INIT(&nmp->nm_sess); if (clval == 0) @@ -2011,6 +2034,8 @@ void nfscl_retopts(struct nfsmount *nmp, char *buffer, nfscl_printopt(nmp, nmp->nm_sotype != SOCK_STREAM, ",udp", &buf, &blen); nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_RESVPORT) != 0, ",resvport", &buf, &blen); + nfscl_printopt(nmp, (nmp->nm_newflag & NFSMNT_TLS) != 0, ",tls", &buf, + &blen); nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_NOCONN) != 0, ",noconn", &buf, &blen); nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_SOFT) == 0, ",hard", &buf, Modified: head/sys/fs/nfsclient/nfsmount.h ============================================================================== --- head/sys/fs/nfsclient/nfsmount.h Thu Aug 27 22:14:58 2020 (r364895) +++ head/sys/fs/nfsclient/nfsmount.h Thu Aug 27 23:57:30 2020 (r364896) @@ -47,6 +47,7 @@ struct nfsmount { struct nfsmount_common nm_com; /* Common fields for nlm */ uint32_t nm_privflag; /* Private flags */ + uint32_t nm_newflag; /* New mount flags */ int nm_numgrps; /* Max. size of groupslist */ u_char nm_fh[NFSX_FHMAX]; /* File handle of root dir */ int nm_fhsize; /* Size of root file handle */ @@ -113,6 +114,9 @@ struct nfsmount { #define NFSMNTP_NOXATTR 0x00000080 #define NFSMNTP_NOADVISE 0x00000100 #define NFSMNTP_NOALLOCATE 0x00000200 + +/* New mount flags only used by the kernel via nmount(2). */ +#define NFSMNT_TLS 0x00000001 #define NFSMNT_DIRPATH(m) (&((m)->nm_name[(m)->nm_krbnamelen + 1])) #define NFSMNT_SRVKRBNAME(m) \ Modified: head/sys/fs/nfsserver/nfs_nfsdkrpc.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdkrpc.c Thu Aug 27 22:14:58 2020 (r364895) +++ head/sys/fs/nfsserver/nfs_nfsdkrpc.c Thu Aug 27 23:57:30 2020 (r364896) @@ -38,11 +38,13 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include "opt_kgssapi.h" +#include "opt_kern_tls.h" #include #include #include +#include #include @@ -120,6 +122,9 @@ nfssvc_program(struct svc_req *rqst, SVCXPRT *xprt) struct nfsrv_descript nd; struct nfsrvcache *rp = NULL; int cacherep, credflavor; +#ifdef KERN_TLS + u_int maxlen; +#endif memset(&nd, 0, sizeof(nd)); if (rqst->rq_vers == NFS_VER2) { @@ -234,6 +239,14 @@ nfssvc_program(struct svc_req *rqst, SVCXPRT *xprt) goto out; } + if ((xprt->xp_tls & RPCTLS_FLAGS_HANDSHAKE) != 0) { + nd.nd_flag |= ND_TLS; + if ((xprt->xp_tls & RPCTLS_FLAGS_VERIFIED) != 0) + nd.nd_flag |= ND_TLSCERT; + if ((xprt->xp_tls & RPCTLS_FLAGS_CERTUSER) != 0) + nd.nd_flag |= ND_TLSCERTUSER; + } + nd.nd_maxextsiz = 16384; #ifdef MAC mac_cred_associate_nfsd(nd.nd_cred); #endif @@ -268,6 +281,11 @@ nfssvc_program(struct svc_req *rqst, SVCXPRT *xprt) } } +#ifdef KERN_TLS + if ((xprt->xp_tls & RPCTLS_FLAGS_HANDSHAKE) != 0 && + rpctls_getinfo(&maxlen, false, false)) + nd.nd_maxextsiz = maxlen; +#endif cacherep = nfs_proc(&nd, rqst->rq_xid, xprt, &rp); NFSLOCKV4ROOTMUTEX(); nfsv4_relref(&nfsd_suspend_lock); Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Thu Aug 27 22:14:58 2020 (r364895) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Thu Aug 27 23:57:30 2020 (r364896) @@ -3284,6 +3284,19 @@ nfsd_fhtovp(struct nfsrv_descript *nd, struct nfsrvfh } /* + * If TLS is required by the export, check the flags in nd_flag. + */ + if (nd->nd_repstat == 0 && ((NFSVNO_EXTLS(exp) && + (nd->nd_flag & ND_TLS) == 0) || + (NFSVNO_EXTLSCERT(exp) && + (nd->nd_flag & ND_TLSCERT) == 0) || + (NFSVNO_EXTLSCERTUSER(exp) && + (nd->nd_flag & ND_TLSCERTUSER) == 0))) { + vput(*vpp); + nd->nd_repstat = NFSERR_ACCES; + } + + /* * Personally, I've never seen any point in requiring a * reserved port#, since only in the rare case where the * clients are all boxes with secure system privileges, @@ -3545,6 +3558,15 @@ nfsvno_v4rootexport(struct nfsrv_descript *nd) nd->nd_flag |= ND_EXGSSINTEGRITY; else if (secflavors[i] == RPCSEC_GSS_KRB5P) nd->nd_flag |= ND_EXGSSPRIVACY; + } + + /* And set ND_EXxx flags for TLS. */ + if ((exflags & MNT_EXTLS) != 0) { + nd->nd_flag |= ND_EXTLS; + if ((exflags & MNT_EXTLSCERT) != 0) + nd->nd_flag |= ND_EXTLSCERT; + if ((exflags & MNT_EXTLSCERTUSER) != 0) + nd->nd_flag |= ND_EXTLSCERTUSER; } out: Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdserv.c Thu Aug 27 22:14:58 2020 (r364895) +++ head/sys/fs/nfsserver/nfs_nfsdserv.c Thu Aug 27 23:57:30 2020 (r364896) @@ -3816,6 +3816,11 @@ nfsrvd_setclientid(struct nfsrv_descript *nd, __unused clp->lc_uid = nd->nd_cred->cr_uid; clp->lc_gid = nd->nd_cred->cr_gid; } + + /* If the client is using TLS, do so for the callback connection. */ + if (nd->nd_flag & ND_TLS) + clp->lc_flags |= LCL_TLSCB; + NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); clp->lc_program = fxdr_unsigned(u_int32_t, *tl); error = nfsrv_getclientipaddr(nd, clp); Modified: head/sys/fs/nfsserver/nfs_nfsdsubs.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdsubs.c Thu Aug 27 22:14:58 2020 (r364895) +++ head/sys/fs/nfsserver/nfs_nfsdsubs.c Thu Aug 27 23:57:30 2020 (r364896) @@ -2114,15 +2114,28 @@ nfsd_checkrootexp(struct nfsrv_descript *nd) { if ((nd->nd_flag & (ND_GSS | ND_EXAUTHSYS)) == ND_EXAUTHSYS) - return (0); + goto checktls; if ((nd->nd_flag & (ND_GSSINTEGRITY | ND_EXGSSINTEGRITY)) == (ND_GSSINTEGRITY | ND_EXGSSINTEGRITY)) - return (0); + goto checktls; if ((nd->nd_flag & (ND_GSSPRIVACY | ND_EXGSSPRIVACY)) == (ND_GSSPRIVACY | ND_EXGSSPRIVACY)) - return (0); + goto checktls; if ((nd->nd_flag & (ND_GSS | ND_GSSINTEGRITY | ND_GSSPRIVACY | ND_EXGSS)) == (ND_GSS | ND_EXGSS)) + goto checktls; + return (1); +checktls: + if ((nd->nd_flag & ND_EXTLS) == 0) + return (0); + if ((nd->nd_flag & (ND_TLSCERTUSER | ND_EXTLSCERTUSER)) == + (ND_TLSCERTUSER | ND_EXTLSCERTUSER)) + return (0); + if ((nd->nd_flag & (ND_TLSCERT | ND_EXTLSCERT | ND_EXTLSCERTUSER)) == + (ND_TLSCERT | ND_EXTLSCERT)) + return (0); + if ((nd->nd_flag & (ND_TLS | ND_EXTLSCERTUSER | ND_EXTLSCERT)) == + ND_TLS) return (0); return (1); } From owner-svn-src-all@freebsd.org Fri Aug 28 00:00:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 14C683C726B; Fri, 28 Aug 2020 00:00:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bd09L6rGPz3Swr; Fri, 28 Aug 2020 00:00:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE5CCC39C; Fri, 28 Aug 2020 00:00:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07S00ceK042397; Fri, 28 Aug 2020 00:00:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07S00cm0042394; Fri, 28 Aug 2020 00:00:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202008280000.07S00cm0042394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 28 Aug 2020 00:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364897 - in stable/12: . lib/clang sys/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable/12: . lib/clang sys/conf X-SVN-Commit-Revision: 364897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 00:00:39 -0000 Author: gjb Date: Fri Aug 28 00:00:37 2020 New Revision: 364897 URL: https://svnweb.freebsd.org/changeset/base/364897 Log: Rename stable/12 to 12.2-PRERELEASE, marking the start of the 12.2 release cycle. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: stable/12/Makefile.inc1 stable/12/Makefile.libcompat stable/12/lib/clang/llvm.build.mk stable/12/sys/conf/newvers.sh Modified: stable/12/Makefile.inc1 ============================================================================== --- stable/12/Makefile.inc1 Thu Aug 27 23:57:30 2020 (r364896) +++ stable/12/Makefile.inc1 Fri Aug 28 00:00:37 2020 (r364897) @@ -126,9 +126,9 @@ TARGET_ABI= gnueabi .endif .endif MACHINE_ABI?= unknown -MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd12.1 +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd12.2 TARGET_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd12.1 +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd12.2 KNOWN_ARCHES?= aarch64/arm64 \ amd64 \ arm \ Modified: stable/12/Makefile.libcompat ============================================================================== --- stable/12/Makefile.libcompat Thu Aug 27 23:57:30 2020 (r364896) +++ stable/12/Makefile.libcompat Fri Aug 28 00:00:37 2020 (r364897) @@ -17,7 +17,7 @@ LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .if ${WANT_COMPILER_TYPE} == gcc || \ (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) .else -LIB32CPUFLAGS+= -target x86_64-unknown-freebsd12.1 +LIB32CPUFLAGS+= -target x86_64-unknown-freebsd12.2 .endif LIB32CPUFLAGS+= -m32 LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ @@ -49,9 +49,9 @@ LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif .else .if ${TARGET_ARCH:Mmips64el*} != "" -LIB32CPUFLAGS= -target mipsel-unknown-freebsd12.1 +LIB32CPUFLAGS= -target mipsel-unknown-freebsd12.2 .else -LIB32CPUFLAGS= -target mips-unknown-freebsd12.1 +LIB32CPUFLAGS= -target mips-unknown-freebsd12.2 .endif .endif LIB32CPUFLAGS+= -mabi=32 Modified: stable/12/lib/clang/llvm.build.mk ============================================================================== --- stable/12/lib/clang/llvm.build.mk Thu Aug 27 23:57:30 2020 (r364896) +++ stable/12/lib/clang/llvm.build.mk Fri Aug 28 00:00:37 2020 (r364897) @@ -40,7 +40,7 @@ TARGET_ABI= -gnueabi TARGET_ABI= .endif VENDOR= unknown -OS_VERSION= freebsd12.1 +OS_VERSION= freebsd12.2 LLVM_TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} LLVM_BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION} Modified: stable/12/sys/conf/newvers.sh ============================================================================== --- stable/12/sys/conf/newvers.sh Thu Aug 27 23:57:30 2020 (r364896) +++ stable/12/sys/conf/newvers.sh Fri Aug 28 00:00:37 2020 (r364897) @@ -48,8 +48,8 @@ # upper case variables starting in column 1 are on one line w/o continuation. TYPE="FreeBSD" -REVISION="12.1" -BRANCH=${BRANCH_OVERRIDE:-STABLE} +REVISION="12.2" +BRANCH=${BRANCH_OVERRIDE:-PRERELEASE} RELEASE="${REVISION}-${BRANCH}" VERSION="${TYPE} ${RELEASE}" From owner-svn-src-all@freebsd.org Fri Aug 28 00:28:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E60C73C7EED; Fri, 28 Aug 2020 00:28:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bd0nF1srjz3Txx; Fri, 28 Aug 2020 00:28:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-qt1-x835.google.com with SMTP id e5so6184180qth.5; Thu, 27 Aug 2020 17:28:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jE9HewZlAoa9RxhNBEUf73wnjVWpvK14yYF3Xmq/q/U=; b=sknQwUbGP/QsPZZaczeOE/fcjZfywYk+pJDSj+QOWfhzUiWr65uqCJPIQWmHqykJ2+ YDFDTAQoCL3TM9b7KorPfrsUP5NjNKmhf4L/BRFTgKNsZ+iq0SKt24TwjlN3YHsxe91m ATrMV7ICOFLKlRO63je52voL3lExrlqGyQX2naEmeXkMFmJVbqzj4lIwMlEBIXrui8uK qkJVQ51MIed1P6rihwLknkbr2l3qojZpgAAp8q4RJZ/6yJG3lwrHA5Po4SzPOsxYLvwW 8pH/82Rr7m9FW3CiysWTFVMTM4CXCe/JWlTevuPmdsPK9+86lH29VmgcGYjb0P+yoB3W rdWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jE9HewZlAoa9RxhNBEUf73wnjVWpvK14yYF3Xmq/q/U=; b=rEkBsIwhx/rakJ+Ri9l+YOxW8upkP0th+FSTGbTci6aB8tv3ZakrIBwKJAjaZGEY48 5h6pqk/PiUMCM2RdAz8zi60Q9tYcoWX4PEXwLXg3+7jsShpRwrYaB5ph+NdK5KzdLJa9 l+rEtQpVxAS7SyiQALCeSWxU6E0BY6xZYa6HicnsLKibDxkrbkcnFzeIPmZKwxirvL6Q +rXGjjOVHsIu7K3zTFj/1a1B4FhuQIMWxZzp0L4/a+zg+Wm6agyYfY68s/SO/jDnBdqf JR+o4mKx9tzplenBBRQGJ4t1jp8YlgyRb5VigQ6sNc22IINyLkSDA6+NiaQLdpP7fbaO Uzeg== X-Gm-Message-State: AOAM532ziUdy6kPTiOqsCO0xzDq+0p/VMAY6Jpr4YfGsKOhxLBb2OAbH quEIM0Zomu+VVKUdKjQSf8UYeh9PhjhM5/stm+VHcMusLRRpLA== X-Google-Smtp-Source: ABdhPJwtxVIkSO4RjINX/QPltmWALKT4l2NMYrB1+pkTjiRCCi3S16lwRQj5b4v8H1eOPA5XsJXZpr+OpuiPZkqd7mk= X-Received: by 2002:ac8:31c7:: with SMTP id i7mr19724801qte.223.1598574495409; Thu, 27 Aug 2020 17:28:15 -0700 (PDT) MIME-Version: 1.0 References: <202008102141.07ALfnDj009838@repo.freebsd.org> In-Reply-To: <202008102141.07ALfnDj009838@repo.freebsd.org> From: Adrian Chadd Date: Thu, 27 Aug 2020 17:28:03 -0700 Message-ID: Subject: Re: svn commit: r364091 - head/lib/libc/gen To: Konstantin Belousov Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4Bd0nF1srjz3Txx X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=sknQwUbG; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 2607:f8b0:4864:20::835 as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-3.06 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.03)[-1.035]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.96)[-0.963]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::835:from]; NEURAL_HAM_SHORT(-0.07)[-0.065]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 00:28:18 -0000 Hi! This breaks when compiling FreeBSD-mips on GCC-9. :( In file included from /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/gen/scandir.c:50, from /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/gen/scandir_b.c:29: /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/include/block_abi.h:45:2: error: anonymous struct declared inside parameter list will not be visible outside of this definition or declarati 45 | struct {\ | ^~~~~~ /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/gen/scandir.c:67:5: note: in expansion of macro 'DECLARE_BLOCK' 67 | DECLARE_BLOCK(int, dcomp, const struct dirent **, const struct dirent **)) | ^~~~~~~~~~~~~ /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/include/block_abi.h:45:2: error: anonymous struct declared inside parameter list will not be visible outside of this definition or declarati 45 | struct {\ | ^~~~~~ /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/gen/scandir.c:66:5: note: in expansion of macro 'DECLARE_BLOCK' 66 | DECLARE_BLOCK(int, select, const struct dirent *), | ^~~~~~~~~~~~~ cc1: all warnings being treated as errors --- scandir_b.o --- *** [scandir_b.o] Error code 1 -adrian From owner-svn-src-all@freebsd.org Fri Aug 28 00:32:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 164013C8203; Fri, 28 Aug 2020 00:32:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bd0t00q6Sz3VTX; Fri, 28 Aug 2020 00:32:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-qv1-xf2e.google.com with SMTP id l13so3603123qvt.10; Thu, 27 Aug 2020 17:32:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Jq4SUwLieMk8RW06gNDKGyIITJPPOUBXdf1sC2TOHa4=; b=XGvQKAMJ2gqUYpgzWtLamC0gQKKg9mJLnH4Ixpso7lOqydKoLew0TrqPWO6e8d8fT6 YuMbNMp9aPPvkTzuk3/XQdwSOWyFtfp7Lg/6CPzDIf2VdW8zGnhQKrrEio/oVqrqR+zx huk9JrtGVYs1cX3SyDDLQ5xefDtNIbdsnmNHwKN0KOk8wdPFPZzYa9XdynqSleZkQrg0 9El2bCW+QhMfWkGGJ72Wcs+BPT7v1P/D7flK7l7cRGHNB+mX5Ip6b2rkfSMmU/AYp8Fz vYm3Y8VJIGiYavSOZGeog9E53FjYNiGXvnzogwjJATG4pUkizr08oqZZAx3aVtN39SKT st4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Jq4SUwLieMk8RW06gNDKGyIITJPPOUBXdf1sC2TOHa4=; b=fMjWnEn3pgeW8uvBTL5+FyNH73jtvINE++aLztRan3CnRXtfsclmwygfQStn/nhzHy 4ZVuHH9YZB8xsqSLoScs2Ii7NTyJVUbKeoThHn4T/c5sZgNbMK8E3nAOhPRouqa8cwyV FIKjS1usfsnEVBvYTcB8u98Gsz0/CSqmIh7RbgeKe1Gh3QqYHJQRAShq+3FpfbZFOqaU +PKraqlrioS+DiOcctItK2K5krc6VarE7pG34XjhcuX6Oc/3ueOWx3srOktn/NoExS1c PYztxFnymYetp/gqhceLH1+wtcZpVZtHeMujAFzZAAdpWsPHko9SsfKeXNiXARsgqxjZ VcnA== X-Gm-Message-State: AOAM532WATbAFZldEqcEP/rp9teg3nzmHTYf5FSW3NIGlIqXhfs0+wfd MHCm1D7vzBxAqKAQfJnw+Jx7JhUX52gFnTDTjaiFSWeIE/U= X-Google-Smtp-Source: ABdhPJy7H2m0hg9uh2wIJAKk+rWExHBZfRF5saXfnspxPBer03/xCMnKcfgDc7eq2A96LEb/+FFKWyUv1SxL8q0lC0Y= X-Received: by 2002:ad4:5345:: with SMTP id v5mr21811453qvs.28.1598574742716; Thu, 27 Aug 2020 17:32:22 -0700 (PDT) MIME-Version: 1.0 References: <202008102141.07ALfnDj009838@repo.freebsd.org> In-Reply-To: From: Adrian Chadd Date: Thu, 27 Aug 2020 17:32:10 -0700 Message-ID: Subject: Re: svn commit: r364091 - head/lib/libc/gen To: Konstantin Belousov Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4Bd0t00q6Sz3VTX X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=XGvQKAMJ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 2607:f8b0:4864:20::f2e as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-3.07 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.03)[-1.034]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; NEURAL_HAM_LONG(-0.96)[-0.964]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f2e:from]; NEURAL_HAM_SHORT(-0.07)[-0.073]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 00:32:25 -0000 {snip} and for completeness sake, bsearch_b.c has the same issue but isn't included in lib/Makefile; thus why it's not tripping the compiler error. -adrian From owner-svn-src-all@freebsd.org Fri Aug 28 02:09:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B62E3C9DE5; Fri, 28 Aug 2020 02:09:11 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bd31g39wtz3ZKp; Fri, 28 Aug 2020 02:09:11 +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 50B67DA40; Fri, 28 Aug 2020 02:09:11 +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 07S29B7b021393; Fri, 28 Aug 2020 02:09:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07S29BLS021392; Fri, 28 Aug 2020 02:09:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202008280209.07S29BLS021392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 28 Aug 2020 02:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364899 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 364899 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 02:09:11 -0000 Author: gjb Date: Fri Aug 28 02:09:10 2020 New Revision: 364899 URL: https://svnweb.freebsd.org/changeset/base/364899 Log: Add a new line to force a commit to verify if lwhsu did indeed fix the jenkins build by adding git to the dependency list. Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: head/release/Makefile.inc1 Modified: head/release/Makefile.inc1 ============================================================================== --- head/release/Makefile.inc1 Fri Aug 28 01:55:35 2020 (r364898) +++ head/release/Makefile.inc1 Fri Aug 28 02:09:10 2020 (r364899) @@ -29,3 +29,4 @@ GITREV!= ${GIT_CMD} -C ${.CURDIR} rev-parse --verify - BUILDDATE!= date +%Y%m%d .export BUILDDATE .endif + From owner-svn-src-all@freebsd.org Fri Aug 28 05:40:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 452643CEAA0; Fri, 28 Aug 2020 05: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bd7hz17tfz42pS; Fri, 28 Aug 2020 05:40:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B5E3102C1; Fri, 28 Aug 2020 05:40:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07S5e2mA051279; Fri, 28 Aug 2020 05:40:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07S5e2pI051278; Fri, 28 Aug 2020 05:40:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008280540.07S5e2pI051278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 28 Aug 2020 05:40:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364901 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 364901 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 05:40:03 -0000 Author: imp Date: Fri Aug 28 05:40:02 2020 New Revision: 364901 URL: https://svnweb.freebsd.org/changeset/base/364901 Log: Declare time() Time is used and was accidentally brought in through header pollution. Declare it in stand.h directly instead. Modified: head/stand/libsa/stand.h Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Fri Aug 28 02:20:25 2020 (r364900) +++ head/stand/libsa/stand.h Fri Aug 28 05:40:02 2020 (r364901) @@ -409,6 +409,11 @@ extern struct fs_ops *exclusive_file_system; extern struct devsw *devsw[]; /* + * Time routines + */ +time_t time(time_t *); + +/* * Expose byteorder(3) functions. */ #ifndef _BYTEORDER_PROTOTYPED From owner-svn-src-all@freebsd.org Fri Aug 28 08:13:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28EFC3D16B8; Fri, 28 Aug 2020 08:13:50 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdC6Q0FpXz4CnC; Fri, 28 Aug 2020 08:13:50 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5FE811FA6; Fri, 28 Aug 2020 08:13:49 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07S8Dn08048904; Fri, 28 Aug 2020 08:13:49 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07S8DnsQ048903; Fri, 28 Aug 2020 08:13:49 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202008280813.07S8DnsQ048903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Fri, 28 Aug 2020 08:13:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364902 - in stable/12: share/zoneinfo usr.sbin/tzsetup X-SVN-Group: stable-12 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: in stable/12: share/zoneinfo usr.sbin/tzsetup X-SVN-Commit-Revision: 364902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 08:13:50 -0000 Author: philip Date: Fri Aug 28 08:13:49 2020 New Revision: 364902 URL: https://svnweb.freebsd.org/changeset/base/364902 Log: MFC r350079: tzsetup: upgrade to zone1970.tab zone.tab is deprecated. Install zone1970.tab alongside it, and use it for tzsetup(8). This is also useful for other applications that need the modern better maintained file. PR: 243394 Submitted by: tmunro Modified: stable/12/share/zoneinfo/Makefile stable/12/usr.sbin/tzsetup/tzsetup.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/zoneinfo/Makefile ============================================================================== --- stable/12/share/zoneinfo/Makefile Fri Aug 28 05:40:02 2020 (r364901) +++ stable/12/share/zoneinfo/Makefile Fri Aug 28 08:13:49 2020 (r364902) @@ -104,6 +104,8 @@ install-zoneinfo: .endfor ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ + ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ + ${CONTRIBDIR}/zone1970.tab ${DESTDIR}/usr/share/zoneinfo/ afterinstall: # Modified: stable/12/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- stable/12/usr.sbin/tzsetup/tzsetup.c Fri Aug 28 05:40:02 2020 (r364901) +++ stable/12/usr.sbin/tzsetup/tzsetup.c Fri Aug 28 08:13:49 2020 (r364902) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include #endif -#define _PATH_ZONETAB "/usr/share/zoneinfo/zone.tab" +#define _PATH_ZONETAB "/usr/share/zoneinfo/zone1970.tab" #define _PATH_ISO3166 "/usr/share/misc/iso3166" #define _PATH_ZONEINFO "/usr/share/zoneinfo" #define _PATH_LOCALTIME "/etc/localtime" @@ -217,7 +217,7 @@ struct continent { int nitems; }; -static struct continent africa, america, antarctica, arctic, asia, atlantic; +static struct continent africa, america, antarctica, asia, atlantic; static struct continent australia, europe, indian, pacific, utc; static struct continent_names { @@ -227,7 +227,6 @@ static struct continent_names { { "Africa", &africa }, { "America", &america }, { "Antarctica", &antarctica }, - { "Arctic", &arctic }, { "Asia", &asia }, { "Atlantic", &atlantic }, { "Australia", &australia }, @@ -244,21 +243,20 @@ static struct continent_items { { "1", "Africa" }, { "2", "America -- North and South" }, { "3", "Antarctica" }, - { "4", "Arctic Ocean" }, - { "5", "Asia" }, - { "6", "Atlantic Ocean" }, - { "7", "Australia" }, - { "8", "Europe" }, - { "9", "Indian Ocean" }, - { "0", "Pacific Ocean" }, - { "a", "UTC" } + { "4", "Asia" }, + { "5", "Atlantic Ocean" }, + { "6", "Australia" }, + { "7", "Europe" }, + { "8", "Indian Ocean" }, + { "9", "Pacific Ocean" }, + { "0", "UTC" } }; #define NCONTINENTS \ (int)((sizeof(continent_items)) / (sizeof(continent_items[0]))) static dialogMenuItem continents[NCONTINENTS]; -#define OCEANP(x) ((x) == 3 || (x) == 5 || (x) == 8 || (x) == 9) +#define OCEANP(x) ((x) == 4 || (x) == 7 || (x) == 8) static int continent_country_menu(dialogMenuItem *continent) @@ -482,7 +480,7 @@ read_zones(void) FILE *fp; struct continent *cont; size_t len, contlen; - char *line, *tlc, *file, *descr, *p; + char *line, *country_list, *tlc, *file, *descr, *p; int lineno; fp = fopen(path_zonetab, "r"); @@ -498,10 +496,7 @@ read_zones(void) if (line[0] == '#') continue; - tlc = strsep(&line, "\t"); - if (strlen(tlc) != 2) - errx(1, "%s:%d: invalid country code `%s'", - path_zonetab, lineno, tlc); + country_list = strsep(&line, "\t"); /* coord = */ strsep(&line, "\t"); /* Unused */ file = strsep(&line, "\t"); /* get continent portion from continent/country */ @@ -521,7 +516,13 @@ read_zones(void) descr = (line != NULL && *line != '\0') ? line : NULL; - add_zone_to_country(lineno, tlc, descr, file, cont); + while (country_list != NULL) { + tlc = strsep(&country_list, ","); + if (strlen(tlc) != 2) + errx(1, "%s:%d: invalid country code `%s'", + path_zonetab, lineno, tlc); + add_zone_to_country(lineno, tlc, descr, file, cont); + } } fclose(fp); } From owner-svn-src-all@freebsd.org Fri Aug 28 08:14:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 37E6C3D15B9; Fri, 28 Aug 2020 08:14:20 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdC700pGZz4CfM; Fri, 28 Aug 2020 08:14:20 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F391F11C4F; Fri, 28 Aug 2020 08:14:19 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07S8EJEL048984; Fri, 28 Aug 2020 08:14:19 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07S8EJqo048983; Fri, 28 Aug 2020 08:14:19 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202008280814.07S8EJqo048983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Fri, 28 Aug 2020 08:14: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: r364903 - in stable/11: share/zoneinfo usr.sbin/tzsetup X-SVN-Group: stable-11 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: in stable/11: share/zoneinfo usr.sbin/tzsetup X-SVN-Commit-Revision: 364903 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 08:14:20 -0000 Author: philip Date: Fri Aug 28 08:14:19 2020 New Revision: 364903 URL: https://svnweb.freebsd.org/changeset/base/364903 Log: MFC r350079: tzsetup: upgrade to zone1970.tab zone.tab is deprecated. Install zone1970.tab alongside it, and use it for tzsetup(8). This is also useful for other applications that need the modern better maintained file. PR: 243394 Submitted by: tmunro Modified: stable/11/share/zoneinfo/Makefile stable/11/usr.sbin/tzsetup/tzsetup.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/zoneinfo/Makefile ============================================================================== --- stable/11/share/zoneinfo/Makefile Fri Aug 28 08:13:49 2020 (r364902) +++ stable/11/share/zoneinfo/Makefile Fri Aug 28 08:14:19 2020 (r364903) @@ -94,6 +94,8 @@ install-zoneinfo: \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/ + ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ + ${CONTRIBDIR}/zone1970.tab ${DESTDIR}/usr/share/zoneinfo/ afterinstall: # Modified: stable/11/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- stable/11/usr.sbin/tzsetup/tzsetup.c Fri Aug 28 08:13:49 2020 (r364902) +++ stable/11/usr.sbin/tzsetup/tzsetup.c Fri Aug 28 08:14:19 2020 (r364903) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include #endif -#define _PATH_ZONETAB "/usr/share/zoneinfo/zone.tab" +#define _PATH_ZONETAB "/usr/share/zoneinfo/zone1970.tab" #define _PATH_ISO3166 "/usr/share/misc/iso3166" #define _PATH_ZONEINFO "/usr/share/zoneinfo" #define _PATH_LOCALTIME "/etc/localtime" @@ -217,7 +217,7 @@ struct continent { int nitems; }; -static struct continent africa, america, antarctica, arctic, asia, atlantic; +static struct continent africa, america, antarctica, asia, atlantic; static struct continent australia, europe, indian, pacific, utc; static struct continent_names { @@ -227,7 +227,6 @@ static struct continent_names { { "Africa", &africa }, { "America", &america }, { "Antarctica", &antarctica }, - { "Arctic", &arctic }, { "Asia", &asia }, { "Atlantic", &atlantic }, { "Australia", &australia }, @@ -244,21 +243,20 @@ static struct continent_items { { "1", "Africa" }, { "2", "America -- North and South" }, { "3", "Antarctica" }, - { "4", "Arctic Ocean" }, - { "5", "Asia" }, - { "6", "Atlantic Ocean" }, - { "7", "Australia" }, - { "8", "Europe" }, - { "9", "Indian Ocean" }, - { "0", "Pacific Ocean" }, - { "a", "UTC" } + { "4", "Asia" }, + { "5", "Atlantic Ocean" }, + { "6", "Australia" }, + { "7", "Europe" }, + { "8", "Indian Ocean" }, + { "9", "Pacific Ocean" }, + { "0", "UTC" } }; #define NCONTINENTS \ (int)((sizeof(continent_items)) / (sizeof(continent_items[0]))) static dialogMenuItem continents[NCONTINENTS]; -#define OCEANP(x) ((x) == 3 || (x) == 5 || (x) == 8 || (x) == 9) +#define OCEANP(x) ((x) == 4 || (x) == 7 || (x) == 8) static int continent_country_menu(dialogMenuItem *continent) @@ -482,7 +480,7 @@ read_zones(void) FILE *fp; struct continent *cont; size_t len, contlen; - char *line, *tlc, *file, *descr, *p; + char *line, *country_list, *tlc, *file, *descr, *p; int lineno; fp = fopen(path_zonetab, "r"); @@ -498,10 +496,7 @@ read_zones(void) if (line[0] == '#') continue; - tlc = strsep(&line, "\t"); - if (strlen(tlc) != 2) - errx(1, "%s:%d: invalid country code `%s'", - path_zonetab, lineno, tlc); + country_list = strsep(&line, "\t"); /* coord = */ strsep(&line, "\t"); /* Unused */ file = strsep(&line, "\t"); /* get continent portion from continent/country */ @@ -521,7 +516,13 @@ read_zones(void) descr = (line != NULL && *line != '\0') ? line : NULL; - add_zone_to_country(lineno, tlc, descr, file, cont); + while (country_list != NULL) { + tlc = strsep(&country_list, ","); + if (strlen(tlc) != 2) + errx(1, "%s:%d: invalid country code `%s'", + path_zonetab, lineno, tlc); + add_zone_to_country(lineno, tlc, descr, file, cont); + } } fclose(fp); } From owner-svn-src-all@freebsd.org Fri Aug 28 08:50:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 705D73D201A; Fri, 28 Aug 2020 08:50:08 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdCwJ2T1zz4FM6; Fri, 28 Aug 2020 08:50:08 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3994D1260B; Fri, 28 Aug 2020 08:50:08 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07S8o8Qp067304; Fri, 28 Aug 2020 08:50:08 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07S8o8Ro067303; Fri, 28 Aug 2020 08:50:08 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202008280850.07S8o8Ro067303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Fri, 28 Aug 2020 08:50:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364904 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 364904 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 08:50:08 -0000 Author: gbe (doc committer) Date: Fri Aug 28 08:50:07 2020 New Revision: 364904 URL: https://svnweb.freebsd.org/changeset/base/364904 Log: MFC r364450: gre(4): Mention sysctl for nesting gre tunnels PR: 228465 Submitted by: Sergey Akhmatov Reviewed by: bcr Approved by: bcr Differential Revision: https://reviews.freebsd.org/D26097 Modified: stable/12/share/man/man4/gre.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/gre.4 ============================================================================== --- stable/12/share/man/man4/gre.4 Fri Aug 28 08:14:19 2020 (r364903) +++ stable/12/share/man/man4/gre.4 Fri Aug 28 08:50:07 2020 (r364904) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 29, 2020 +.Dd August 21, 2020 .Dt GRE 4 .Os .Sh NAME @@ -210,6 +210,15 @@ The kernel must be set to forward datagrams by setting .Va net.inet.ip.forwarding .Xr sysctl 8 variable to non-zero. +.Pp +By default, +.Nm +tunnels may not be nested. +This behavior may be modified at runtime by setting the +.Xr sysctl 8 +variable +.Va net.link.gre.max_nesting +to the desired level of nesting. .Sh SEE ALSO .Xr gif 4 , .Xr inet 4 , From owner-svn-src-all@freebsd.org Fri Aug 28 08:52:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49C783D22C2; Fri, 28 Aug 2020 08:52:01 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdCyT1HNhz4FP5; Fri, 28 Aug 2020 08:52:01 +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 0F866124A8; Fri, 28 Aug 2020 08:52:01 +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 07S8q03J070990; Fri, 28 Aug 2020 08:52:00 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07S8q0mh070989; Fri, 28 Aug 2020 08:52:00 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202008280852.07S8q0mh070989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 28 Aug 2020 08:52:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364905 - stable/12/sys/cam/scsi X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/sys/cam/scsi X-SVN-Commit-Revision: 364905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 08:52:01 -0000 Author: avg Date: Fri Aug 28 08:52:00 2020 New Revision: 364905 URL: https://svnweb.freebsd.org/changeset/base/364905 Log: MFC r354668 by imp: Fix a race between daopen and damediapoll Modified: stable/12/sys/cam/scsi/scsi_da.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/12/sys/cam/scsi/scsi_da.c Fri Aug 28 08:50:07 2020 (r364904) +++ stable/12/sys/cam/scsi/scsi_da.c Fri Aug 28 08:52:00 2020 (r364905) @@ -5929,6 +5929,7 @@ damediapoll(void *arg) if (!cam_iosched_has_work_flags(softc->cam_iosched, DA_WORK_TUR) && (softc->flags & DA_FLAG_TUR_PENDING) == 0 && + softc->state == DA_STATE_NORMAL && LIST_EMPTY(&softc->pending_ccbs)) { if (da_periph_acquire(periph, DA_REF_TUR) == 0) { cam_iosched_set_work_flags(softc->cam_iosched, DA_WORK_TUR); From owner-svn-src-all@freebsd.org Fri Aug 28 08:54:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 605883D252A; Fri, 28 Aug 2020 08:54:28 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdD1J1xqQz4FrY; Fri, 28 Aug 2020 08:54:28 +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 25E1C1243E; Fri, 28 Aug 2020 08:54:28 +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 07S8sSmn073669; Fri, 28 Aug 2020 08:54:28 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07S8sSBC073668; Fri, 28 Aug 2020 08:54:28 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202008280854.07S8sSBC073668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 28 Aug 2020 08:54:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364906 - stable/12/sys/cam X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/sys/cam X-SVN-Commit-Revision: 364906 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 08:54:28 -0000 Author: avg Date: Fri Aug 28 08:54:27 2020 New Revision: 364906 URL: https://svnweb.freebsd.org/changeset/base/364906 Log: MFC r358662 by imp: xpt_async is submitting a CCB, not finishing it up, so use xpt_action() instead of xpt_done(). Modified: stable/12/sys/cam/cam_xpt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/cam_xpt.c ============================================================================== --- stable/12/sys/cam/cam_xpt.c Fri Aug 28 08:52:00 2020 (r364905) +++ stable/12/sys/cam/cam_xpt.c Fri Aug 28 08:54:27 2020 (r364906) @@ -3171,6 +3171,10 @@ call_sim: start_ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(start_ccb); break; + case XPT_ASYNC: + start_ccb->ccb_h.status = CAM_REQ_CMP; + xpt_done(start_ccb); + break; default: case XPT_SDEV_TYPE: case XPT_TERM_IO: @@ -4462,7 +4466,7 @@ xpt_async(u_int32_t async_code, struct cam_path *path, xpt_freeze_devq(path, 1); else xpt_freeze_simq(path->bus->sim, 1); - xpt_done(ccb); + xpt_action(ccb); } static void From owner-svn-src-all@freebsd.org Fri Aug 28 10:01:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 01A543D3A04; Fri, 28 Aug 2020 10:01: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdFV767rfz4JKL; Fri, 28 Aug 2020 10:01:03 +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 B6329131A7; Fri, 28 Aug 2020 10:01:03 +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 07SA13kO011190; Fri, 28 Aug 2020 10:01:03 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SA13gG011188; Fri, 28 Aug 2020 10:01:03 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202008281001.07SA13gG011188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 28 Aug 2020 10:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364907 - stable/12/sys/cam X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/sys/cam X-SVN-Commit-Revision: 364907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 10:01:04 -0000 Author: avg Date: Fri Aug 28 10:01:03 2020 New Revision: 364907 URL: https://svnweb.freebsd.org/changeset/base/364907 Log: MFC r358864 by imp: Eliminate xpt_copy_path. Modified: stable/12/sys/cam/cam_xpt.c stable/12/sys/cam/cam_xpt.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/cam_xpt.c ============================================================================== --- stable/12/sys/cam/cam_xpt.c Fri Aug 28 08:54:27 2020 (r364906) +++ stable/12/sys/cam/cam_xpt.c Fri Aug 28 10:01:03 2020 (r364907) @@ -804,7 +804,8 @@ static void xpt_scanner_thread(void *dummy) { union ccb *ccb; - struct cam_path path; + struct mtx *mtx; + struct cam_ed *device; xpt_lock_buses(); for (;;) { @@ -816,15 +817,22 @@ xpt_scanner_thread(void *dummy) xpt_unlock_buses(); /* - * Since lock can be dropped inside and path freed - * by completion callback even before return here, - * take our own path copy for reference. + * We need to lock the device's mutex which we use as + * the path mutex. We can't do it directly because the + * cam_path in the ccb may wind up going away because + * the path lock may be dropped and the path retired in + * the completion callback. We do this directly to keep + * the reference counts in cam_path sane. We also have + * to copy the device pointer because ccb_h.path may + * be freed in the callback. */ - xpt_copy_path(&path, ccb->ccb_h.path); - xpt_path_lock(&path); + mtx = xpt_path_mtx(ccb->ccb_h.path); + device = ccb->ccb_h.path->device; + xpt_acquire_device(device); + mtx_lock(mtx); xpt_action(ccb); - xpt_path_unlock(&path); - xpt_release_path(&path); + mtx_unlock(mtx); + xpt_release_device(device); xpt_lock_buses(); } @@ -3701,15 +3709,6 @@ xpt_clone_path(struct cam_path **new_path_ptr, struct new_path = (struct cam_path *)malloc(sizeof(*path), M_CAMPATH, M_NOWAIT); if (new_path == NULL) return(CAM_RESRC_UNAVAIL); - xpt_copy_path(new_path, path); - *new_path_ptr = new_path; - return (CAM_REQ_CMP); -} - -void -xpt_copy_path(struct cam_path *new_path, struct cam_path *path) -{ - *new_path = *path; if (path->bus != NULL) xpt_acquire_bus(path->bus); @@ -3717,6 +3716,8 @@ xpt_copy_path(struct cam_path *new_path, struct cam_pa xpt_acquire_target(path->target); if (path->device != NULL) xpt_acquire_device(path->device); + *new_path_ptr = new_path; + return (CAM_REQ_CMP); } void Modified: stable/12/sys/cam/cam_xpt.h ============================================================================== --- stable/12/sys/cam/cam_xpt.h Fri Aug 28 08:54:27 2020 (r364906) +++ stable/12/sys/cam/cam_xpt.h Fri Aug 28 10:01:03 2020 (r364907) @@ -140,8 +140,6 @@ cam_status xpt_compile_path(struct cam_path *new_path lun_id_t lun_id); cam_status xpt_clone_path(struct cam_path **new_path, struct cam_path *path); -void xpt_copy_path(struct cam_path *new_path, - struct cam_path *path); void xpt_release_path(struct cam_path *path); From owner-svn-src-all@freebsd.org Fri Aug 28 10:15:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 073A03D3DE9; Fri, 28 Aug 2020 10:15:55 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdFqG6S8bz4KKL; Fri, 28 Aug 2020 10:15: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 C0B02131ED; Fri, 28 Aug 2020 10:15: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 07SAFsBo022711; Fri, 28 Aug 2020 10:15:54 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SAFsL9022710; Fri, 28 Aug 2020 10:15:54 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202008281015.07SAFsL9022710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 28 Aug 2020 10:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364908 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 364908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 10:15:55 -0000 Author: avg Date: Fri Aug 28 10:15:54 2020 New Revision: 364908 URL: https://svnweb.freebsd.org/changeset/base/364908 Log: MFC r363905: gpiokeys: add a basic manual page Added: stable/12/share/man/man4/gpiokeys.4 - copied unchanged from r363905, head/share/man/man4/gpiokeys.4 Modified: Directory Properties: stable/12/ (props changed) Copied: stable/12/share/man/man4/gpiokeys.4 (from r363905, head/share/man/man4/gpiokeys.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/man/man4/gpiokeys.4 Fri Aug 28 10:15:54 2020 (r364908, copy of r363905, head/share/man/man4/gpiokeys.4) @@ -0,0 +1,152 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2020 Andriy Gapon +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 5, 2020 +.Dt GPIOKEYS 4 +.Os +.Sh NAME +.Nm gpiokeys +.Nd GPIO keys device driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "options FDT" +.Cd "device gpio" +.Cd "device gpiokeys" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +gpiokeys_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides a way to represent a set of general purpose inputs as a +.Xr keyboard 4 +device. +At the moment the driver supports only +.Xr FDT 4 +based systems. +The DTS determines what pins are mapped to buttons and what key codes are +generated for each virtual button. +The +.Xr keyboard 4 +device can be used from userland to monitor for input changes. +.Pp +On an +.Xr FDT 4 +based system +the DTS part for a +.Nm +device usually looks like: +.Bd -literal +/ { + + ... + + gpio_keys { + compatible = "gpio-keys"; + + btn1 { + label = "button1"; + linux,code = ; + gpios = <&gpio 0 3 GPIO_ACTIVE_LOW> + }; + + btn2 { + label = "button2"; + linux,code = ; + gpios = <&gpio 0 4 GPIO_ACTIVE_LOW> + }; + }; +}; +.Ed +.Pp +For more details about the +.Va gpios +property, please consult +.Pa /usr/src/sys/dts/bindings-gpio.txt . +.Pp +The +.Nm +driver supports two properties for specifying a key code. +.Pp +The property +.Va freebsd,code +specifies a +.Fx +native scancode compatible with +.Xr kbdmap 5 +keyboard maps. +.Pp +The property +.Va linux,code +specifies an evdev scancode. +That scancode is internally translated to a native scancode. +Note that not all evdev scancodes have corresponding native scancodes. +If a scancode cannot be translated, then a diagnostic message is printed +and the input is ignored. +.Pp +The property +.Va label +is a descriptive name of a button. +It is used for diagnostic messages only. +This property is optional. +If not set, the node name is used in its place. +.Pp +The property +.Va autorepeat +determines whether autorepeat is enabled for a button. +.Pp +The property +.Va debounce-interval +defines debouncing interval time in milliseconds. +If not specified the interval defaults to 5. +.Sh SEE ALSO +.Xr fdt 4 , +.Xr gpio 4 , +.Xr keyboard 4 , +.Xr kbdmap 5 +.Sh HISTORY +The +.Nm +manual page first appeared in +.Fx 12.2 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Oleksandr Tymoshenko Aq Mt gonzo@FreeBSD.org . +This +manual page was written by +.An Andriy Gapon Aq Mt avg@FreeBSD.org . From owner-svn-src-all@freebsd.org Fri Aug 28 10:17:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F2163D3E1B; Fri, 28 Aug 2020 10:17: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdFrk0wjfz4KVS; Fri, 28 Aug 2020 10:17: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 0398F1368B; Fri, 28 Aug 2020 10:17: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 07SAH9xn022844; Fri, 28 Aug 2020 10:17:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SAH9Qa022843; Fri, 28 Aug 2020 10:17:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202008281017.07SAH9Qa022843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 28 Aug 2020 10:17:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364909 - stable/12/sys/arm/allwinner/clkng X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/sys/arm/allwinner/clkng X-SVN-Commit-Revision: 364909 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 10:17:10 -0000 Author: avg Date: Fri Aug 28 10:17:09 2020 New Revision: 364909 URL: https://svnweb.freebsd.org/changeset/base/364909 Log: MFC r363948: ccu_sun8i_r: minor comment update Modified: stable/12/sys/arm/allwinner/clkng/ccu_sun8i_r.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/allwinner/clkng/ccu_sun8i_r.c ============================================================================== --- stable/12/sys/arm/allwinner/clkng/ccu_sun8i_r.c Fri Aug 28 10:15:54 2020 (r364908) +++ stable/12/sys/arm/allwinner/clkng/ccu_sun8i_r.c Fri Aug 28 10:17:09 2020 (r364909) @@ -119,7 +119,7 @@ NM_CLK(r_ccu_ir_clk, "ir", r_ccu_ir_parents, /* names, parents */ 0x54, /* offset */ 0, 4, 0, 0, /* N factor */ - 16, 2, 0, 0, /* M flags */ + 16, 2, 0, 0, /* M factor */ 24, 2, /* mux */ 31, /* gate */ AW_CLK_HAS_MUX | AW_CLK_REPARENT | AW_CLK_HAS_GATE);/* flags */ From owner-svn-src-all@freebsd.org Fri Aug 28 10:18:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ABB5A3D400A; Fri, 28 Aug 2020 10:18: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdFtG43ndz4KYh; Fri, 28 Aug 2020 10:18: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 7038D1368C; Fri, 28 Aug 2020 10:18: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 07SAIUHX022969; Fri, 28 Aug 2020 10:18:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SAIUFA022968; Fri, 28 Aug 2020 10:18:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202008281018.07SAIUFA022968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 28 Aug 2020 10:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364910 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 364910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 10:18:30 -0000 Author: avg Date: Fri Aug 28 10:18:30 2020 New Revision: 364910 URL: https://svnweb.freebsd.org/changeset/base/364910 Log: MFC r364155: hook cp2112.4 to the build Modified: stable/12/share/man/man4/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/Makefile ============================================================================== --- stable/12/share/man/man4/Makefile Fri Aug 28 10:17:09 2020 (r364909) +++ stable/12/share/man/man4/Makefile Fri Aug 28 10:18:30 2020 (r364910) @@ -119,6 +119,7 @@ MAN= aac.4 \ cloudabi.4 \ cmx.4 \ ${_coretemp.4} \ + cp2112.4 \ ${_cpuctl.4} \ cpufreq.4 \ crypto.4 \ From owner-svn-src-all@freebsd.org Fri Aug 28 10:21:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B6533D3F3C; Fri, 28 Aug 2020 10:21:12 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdFxN2HY1z4KrH; Fri, 28 Aug 2020 10:21:12 +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 32DBC13805; Fri, 28 Aug 2020 10:21:12 +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 07SALCnE023968; Fri, 28 Aug 2020 10:21:12 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SALCdb023967; Fri, 28 Aug 2020 10:21:12 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202008281021.07SALCdb023967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 28 Aug 2020 10:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364911 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 364911 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 10:21:12 -0000 Author: avg Date: Fri Aug 28 10:21:11 2020 New Revision: 364911 URL: https://svnweb.freebsd.org/changeset/base/364911 Log: MFC r364154: hook gpiokeys.4 to the build Modified: stable/12/share/man/man4/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/Makefile ============================================================================== --- stable/12/share/man/man4/Makefile Fri Aug 28 10:18:30 2020 (r364910) +++ stable/12/share/man/man4/Makefile Fri Aug 28 10:21:11 2020 (r364911) @@ -183,6 +183,7 @@ MAN= aac.4 \ gif.4 \ gpio.4 \ gpioiic.4 \ + gpiokeys.4 \ gpioled.4 \ gpioths.4 \ gre.4 \ From owner-svn-src-all@freebsd.org Fri Aug 28 10:24:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BDCA43D40DD; Fri, 28 Aug 2020 10:24:15 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdG0t4zT2z4LG6; Fri, 28 Aug 2020 10:24:14 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf1-f52.google.com with SMTP id u25so430252lfm.10; Fri, 28 Aug 2020 03:24:14 -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:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=EmJFt0IaTafC7nDhuawlYTxWqRVshdsqZIbvwNJ5LTk=; b=fh1a8Dw5P7/2r4lKUTbgnfRenMXSyFh/dhNDtE27qe7rdoo+yOuuksssSC6EAVoJsy muWLWgDDbe4zwAPUtmGKwiM8phwTlB7rZAm29qCRQSZO1ZiS+0FxqgzS7zJnKfd7lc2V Ikfd00ZHC3CUDWGqSQ1fKemFbZJTyJ/YNSf8aZ+28/GmYcgtarUa2C7B5GJBl00JnuoO Ub3uk2RFOI5kmCrBg+v95fccZATwHydla1WLISIK0V5iwEPyfI2+F1AUC8DboAY+Q0+C zSQH1i77+KBM8Bf8V3i1GMwaBfz2PPcpkZj+QCg7os6+IyJlD1iekLOBXnxuKkq8o/Zx li2g== X-Gm-Message-State: AOAM533DHfZ+TlMtrSJzE7eVL17ZgmNYjoyzS3wLvTGod2XEpnqcQxdE SIcGKGO3cHuj4iVEMgQQ0Nj66mrSLl0= X-Google-Smtp-Source: ABdhPJzqB+fhjl3KzBXil/cfyDbQvof5ZR37gMrJRuWWoqJmJ2pGTJ8y/RkoQ5KCx4ns7DRluAHC6g== X-Received: by 2002:a19:cca:: with SMTP id 193mr482403lfm.208.1598610252330; Fri, 28 Aug 2020 03:24:12 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id j2sm112197ljb.98.2020.08.28.03.24.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Aug 2020 03:24:11 -0700 (PDT) Subject: Re: svn commit: r364910 - stable/12/share/man/man4 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org References: <202008281018.07SAIUFA022968@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABtB5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz6JAlQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryLkCDQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAYkCPAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: Date: Fri, 28 Aug 2020 13:24:10 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <202008281018.07SAIUFA022968@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BdG0t4zT2z4LG6 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.167.52 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-1.22 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.67)[-0.670]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-0.64)[-0.639]; NEURAL_SPAM_SHORT(0.09)[0.088]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.52:from]; RECEIVED_SPAMHAUS_PBL(0.00)[93.72.151.96:received]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.52:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MAILMAN_DEST(0.00)[svn-src-stable-12,svn-src-stable,svn-src-all] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 10:24:15 -0000 On 28/08/2020 13:18, Andriy Gapon wrote: > Author: avg > Date: Fri Aug 28 10:18:30 2020 > New Revision: 364910 > URL: https://svnweb.freebsd.org/changeset/base/364910 > > Log: > MFC r364155: hook cp2112.4 to the build This was merged out-of-order. My apologies. > Modified: > stable/12/share/man/man4/Makefile > Directory Properties: > stable/12/ (props changed) > > Modified: stable/12/share/man/man4/Makefile > ============================================================================== > --- stable/12/share/man/man4/Makefile Fri Aug 28 10:17:09 2020 (r364909) > +++ stable/12/share/man/man4/Makefile Fri Aug 28 10:18:30 2020 (r364910) > @@ -119,6 +119,7 @@ MAN= aac.4 \ > cloudabi.4 \ > cmx.4 \ > ${_coretemp.4} \ > + cp2112.4 \ > ${_cpuctl.4} \ > cpufreq.4 \ > crypto.4 \ > -- Andriy Gapon From owner-svn-src-all@freebsd.org Fri Aug 28 10:27:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 42A2A3D3E7A; Fri, 28 Aug 2020 10:27:25 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdG4Y0cTqz4LWN; Fri, 28 Aug 2020 10:27:25 +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 EC1F11391C; Fri, 28 Aug 2020 10:27:24 +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 07SARO3Y029079; Fri, 28 Aug 2020 10:27:24 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SAROiY029076; Fri, 28 Aug 2020 10:27:24 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202008281027.07SAROiY029076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 28 Aug 2020 10:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364912 - in stable/12: share/man/man4 sys/conf sys/dev/usb/misc sys/modules/usb sys/modules/usb/cp2112 X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/conf sys/dev/usb/misc sys/modules/usb sys/modules/usb/cp2112 X-SVN-Commit-Revision: 364912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 10:27:25 -0000 Author: avg Date: Fri Aug 28 10:27:24 2020 New Revision: 364912 URL: https://svnweb.freebsd.org/changeset/base/364912 Log: MFC r363951,r364143,r364144: cp2112: driver for the namesake GPIO and I2C master gadget Added: stable/12/share/man/man4/cp2112.4 - copied unchanged from r364144, head/share/man/man4/cp2112.4 stable/12/sys/dev/usb/misc/cp2112.c - copied, changed from r363951, head/sys/dev/usb/misc/cp2112.c stable/12/sys/modules/usb/cp2112/ - copied from r363951, head/sys/modules/usb/cp2112/ Modified: stable/12/sys/conf/files stable/12/sys/modules/usb/Makefile Directory Properties: stable/12/ (props changed) Copied: stable/12/share/man/man4/cp2112.4 (from r364144, head/share/man/man4/cp2112.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/man/man4/cp2112.4 Fri Aug 28 10:27:24 2020 (r364912, copy of r364144, head/share/man/man4/cp2112.4) @@ -0,0 +1,87 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" +.\" Copyright (c) 2020 Andriy Gapon +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 12, 2020 +.Dt CP2112 4 +.Os +.Sh NAME +.Nm cp2112 +.Nd driver for a USB GPIO and I2C peripheral device +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device cp2112" +.Cd "device usb" +.Cd "device gpio" +.Cd "device iicbus" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +cp2112_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for Silicon Labs CP2112 device. +The device has 8 general purpose I/O pins and an I2C controller that supports +a subset of the I2C protocol. +.Pp +All pins support both input and output modes. +An output pin can be configured either for open-drain or push-pull operation. +Pins 0, 1 and 7 support special functions: I2C transmit indication, +I2C receive indication and clock output respectively. +At the moment the +.Nm +driver does not provide a way to enable and configure the special functions. +.Pp +The I2C controller supports read transactions with up to 512 bytes of data, +write transactions with up to 61 bytes of data and a write followed by +the repeated start followed by a read transactions where the write can be +up to 16 bytes and the read can be up to 512 bytes. +Zero length transfers are not supported. +The +.Nm +driver creates a +.Xr gpio 4 +and +.Xr iicbus 4 +child buses to expose the respective functions. +.Sh SEE ALSO +.Xr gpio 4 , +.Xr iicbus 4 , +.Xr usb 4 +.Sh HISTORY +The +.Nm +driver and this manual page was written by +.An Andriy Gapon Aq Mt avg@FreeBSD.org . Modified: stable/12/sys/conf/files ============================================================================== --- stable/12/sys/conf/files Fri Aug 28 10:21:11 2020 (r364911) +++ stable/12/sys/conf/files Fri Aug 28 10:27:24 2020 (r364912) @@ -3438,6 +3438,7 @@ dev/usb/serial/usb_serial.c optional ucom | u3g | uar # # USB misc drivers # +dev/usb/misc/cp2112.c optional cp2112 dev/usb/misc/ufm.c optional ufm dev/usb/misc/udbp.c optional udbp dev/usb/misc/ugold.c optional ugold Copied and modified: stable/12/sys/dev/usb/misc/cp2112.c (from r363951, head/sys/dev/usb/misc/cp2112.c) ============================================================================== --- head/sys/dev/usb/misc/cp2112.c Thu Aug 6 13:41:42 2020 (r363951, copy source) +++ stable/12/sys/dev/usb/misc/cp2112.c Fri Aug 28 10:27:24 2020 (r364912) @@ -66,6 +66,8 @@ __FBSDID("$FreeBSD$"); #define USB_DEBUG_VAR usb_debug #include +#define SIZEOF_FIELD(_s, _f) sizeof(((struct _s *)NULL)->_f) + #define CP2112GPIO_LOCK(sc) sx_xlock(&sc->gpio_lock) #define CP2112GPIO_UNLOCK(sc) sx_xunlock(&sc->gpio_lock) #define CP2112GPIO_LOCKED(sc) sx_assert(&sc->gpio_lock, SX_XLOCKED) @@ -93,8 +95,13 @@ __FBSDID("$FreeBSD$"); #define CP2112_REQ_LOCK 0x20 #define CP2112_REQ_USB_CFG 0x21 +#define CP2112_IIC_MAX_READ_LEN 512 #define CP2112_IIC_REPSTART_VER 2 /* Erratum CP2112_E10. */ +#define CP2112_GPIO_SPEC_CLK7 1 /* Pin 7 is clock output. */ +#define CP2112_GPIO_SPEC_TX0 2 /* Pin 0 pulses on USB TX. */ +#define CP2112_GPIO_SPEC_RX1 4 /* Pin 1 pulses on USB RX. */ + #define CP2112_IIC_STATUS0_IDLE 0 #define CP2112_IIC_STATUS0_BUSY 1 #define CP2112_IIC_STATUS0_CMP 2 @@ -104,7 +111,112 @@ __FBSDID("$FreeBSD$"); #define CP2112_IIC_STATUS1_TIMEOUT_BUS 1 #define CP2112_IIC_STATUS1_ARB_LOST 2 +/* CP2112_REQ_VERSION */ +struct version_request { + uint8_t id; + uint8_t part_num; + uint8_t version; +} __packed; +/* CP2112_REQ_GPIO_GET */ +struct gpio_get_req { + uint8_t id; + uint8_t state; +} __packed; + +/* CP2112_REQ_GPIO_SET */ +struct gpio_set_req { + uint8_t id; + uint8_t state; + uint8_t mask; +} __packed; + +/* CP2112_REQ_GPIO_CFG */ +struct gpio_config_req { + uint8_t id; + uint8_t output; + uint8_t pushpull; + uint8_t special; + uint8_t divider; +} __packed; + +/* CP2112_REQ_SMB_XFER_STATUS_REQ */ +struct i2c_xfer_status_req { + uint8_t id; + uint8_t request; +} __packed; + +/* CP2112_REQ_SMB_XFER_STATUS_RESP */ +struct i2c_xfer_status_resp { + uint8_t id; + uint8_t status0; + uint8_t status1; + uint16_t status2; + uint16_t status3; +} __packed; + +/* CP2112_REQ_SMB_READ_FORCE_SEND */ +struct i2c_data_read_force_send_req { + uint8_t id; + uint16_t len; +} __packed; + +/* CP2112_REQ_SMB_READ_RESPONSE */ +struct i2c_data_read_resp { + uint8_t id; + uint8_t status; + uint8_t len; + uint8_t data[61]; +} __packed; + +/* CP2112_REQ_SMB_READ */ +struct i2c_write_read_req { + uint8_t id; + uint8_t slave; + uint16_t rlen; + uint8_t wlen; + uint8_t wdata[16]; +} __packed; + +/* CP2112_REQ_SMB_WRITE */ +struct i2c_read_req { + uint8_t id; + uint8_t slave; + uint16_t len; +} __packed; + +/* CP2112_REQ_SMB_WRITE_READ */ +struct i2c_write_req { + uint8_t id; + uint8_t slave; + uint8_t len; + uint8_t data[61]; +} __packed; + +/* CP2112_REQ_SMB_CFG */ +struct i2c_cfg_req { + uint8_t id; + uint32_t speed; /* Hz */ + uint8_t slave_addr; /* ACK only */ + uint8_t auto_send_read; /* boolean */ + uint16_t write_timeout; /* 0-1000 ms, 0 ~ no timeout */ + uint16_t read_timeout; /* 0-1000 ms, 0 ~ no timeout */ + uint8_t scl_low_timeout;/* boolean */ + uint16_t retry_count; /* 1-1000, 0 ~ forever */ +} __packed; + +enum cp2112_out_mode { + OUT_OD, + OUT_PP, + OUT_KEEP +}; + +enum { + CP2112_INTR_OUT = 0, + CP2112_INTR_IN, + CP2112_N_TRANSFER, +}; + struct cp2112_softc { device_t sc_gpio_dev; device_t sc_iic_dev; @@ -120,10 +232,38 @@ struct cp2112gpio_softc { struct gpio_pin pins[CP2112_GPIO_COUNT]; }; +struct cp2112iic_softc { + device_t dev; + device_t iicbus_dev; + struct usb_xfer *xfers[CP2112_N_TRANSFER]; + u_char own_addr; + struct { + struct mtx lock; + struct cv cv; + struct { + uint8_t *data; + int len; + int done; + int error; + } in; + struct { + const uint8_t *data; + int len; + int done; + int error; + } out; + } io; +}; + static int cp2112_detach(device_t dev); static int cp2112gpio_detach(device_t dev); static int cp2112iic_detach(device_t dev); +static const STRUCT_USB_HOST_ID cp2112_devs[] = { + { USB_VP(USB_VENDOR_SILABS, USB_PRODUCT_SILABS_CP2112) }, + { USB_VP(0x1009, USB_PRODUCT_SILABS_CP2112) }, /* XXX */ +}; + static int cp2112_get_report(device_t dev, uint8_t id, void *data, uint16_t len) { @@ -143,25 +283,103 @@ cp2112_set_report(device_t dev, uint8_t id, void *data int err; sc = device_get_softc(dev); + *(uint8_t *)data = id; err = usbd_req_set_report(sc->sc_udev, NULL, data, len, sc->sc_iface_index, UHID_FEATURE_REPORT, id); return (err); } static int +cp2112_probe(device_t dev) +{ + struct usb_attach_arg *uaa; + + uaa = device_get_ivars(dev); + if (uaa->usb_mode != USB_MODE_HOST) + return (ENXIO); + if (uaa->info.bInterfaceClass != UICLASS_HID) + return (ENXIO); + + if (usbd_lookup_id_by_uaa(cp2112_devs, sizeof(cp2112_devs), uaa) == 0) + return (BUS_PROBE_DEFAULT); + return (ENXIO); +} + +static int +cp2112_attach(device_t dev) +{ + struct version_request vdata; + struct usb_attach_arg *uaa; + struct cp2112_softc *sc; + int err; + + uaa = device_get_ivars(dev); + sc = device_get_softc(dev); + + device_set_usb_desc(dev); + + sc->sc_udev = uaa->device; + sc->sc_iface_index = uaa->info.bIfaceIndex; + + err = cp2112_get_report(dev, CP2112_REQ_VERSION, &vdata, sizeof(vdata)); + if (err != 0) + goto detach; + device_printf(dev, "part number 0x%02x, version 0x%02x\n", + vdata.part_num, vdata.version); + if (vdata.part_num != CP2112_PART_NUM) { + device_printf(dev, "unsupported part number\n"); + goto detach; + } + sc->sc_version = vdata.version; + sc->sc_gpio_dev = device_add_child(dev, "gpio", -1); + if (sc->sc_gpio_dev != NULL) { + err = device_probe_and_attach(sc->sc_gpio_dev); + if (err != 0) { + device_printf(dev, "failed to attach gpio child\n"); + } + } else { + device_printf(dev, "failed to create gpio child\n"); + } + + sc->sc_iic_dev = device_add_child(dev, "iichb", -1); + if (sc->sc_iic_dev != NULL) { + err = device_probe_and_attach(sc->sc_iic_dev); + if (err != 0) { + device_printf(dev, "failed to attach iic child\n"); + } + } else { + device_printf(dev, "failed to create iic child\n"); + } + + return (0); + +detach: + cp2112_detach(dev); + return (ENXIO); +} + +static int +cp2112_detach(device_t dev) +{ + int err; + + err = bus_generic_detach(dev); + if (err != 0) + return (err); + device_delete_children(dev); + return (0); +} + +static int cp2112_gpio_read_pin(device_t dev, uint32_t pin_num, bool *on) { - struct { - uint8_t id; - uint8_t state; - } __packed data; + struct gpio_get_req data; struct cp2112gpio_softc *sc; int err; sc = device_get_softc(dev); CP2112GPIO_LOCKED(sc); - data.id = CP2112_REQ_GPIO_GET; err = cp2112_get_report(device_get_parent(dev), CP2112_REQ_GPIO_GET, &data, sizeof(data)); if (err != 0) @@ -174,11 +392,7 @@ cp2112_gpio_read_pin(device_t dev, uint32_t pin_num, b static int cp2112_gpio_write_pin(device_t dev, uint32_t pin_num, bool on) { - struct { - uint8_t id; - uint8_t state; - uint8_t mask; - } __packed data; + struct gpio_set_req data; struct cp2112gpio_softc *sc; int err; bool actual; @@ -186,10 +400,8 @@ cp2112_gpio_write_pin(device_t dev, uint32_t pin_num, sc = device_get_softc(dev); CP2112GPIO_LOCKED(sc); - data.id = CP2112_REQ_GPIO_SET; data.state = (uint8_t)on << pin_num; data.mask = (uint8_t)1 << pin_num; - err = cp2112_set_report(device_get_parent(dev), CP2112_REQ_GPIO_SET, &data, sizeof(data)); if (err != 0) @@ -204,15 +416,9 @@ cp2112_gpio_write_pin(device_t dev, uint32_t pin_num, static int cp2112_gpio_configure_write_pin(device_t dev, uint32_t pin_num, - bool output, bool pushpull) + bool output, enum cp2112_out_mode *mode) { - struct { - uint8_t id; - uint8_t output; - uint8_t pushpull; - uint8_t special; - uint8_t divider; - } __packed data; + struct gpio_config_req data; struct cp2112gpio_softc *sc; int err; uint8_t mask; @@ -220,21 +426,26 @@ cp2112_gpio_configure_write_pin(device_t dev, uint32_t sc = device_get_softc(dev); CP2112GPIO_LOCKED(sc); - mask = (uint8_t)1 << pin_num; - data.id = CP2112_REQ_GPIO_CFG; err = cp2112_get_report(device_get_parent(dev), CP2112_REQ_GPIO_CFG, &data, sizeof(data)); if (err != 0) return (err); + + mask = (uint8_t)1 << pin_num; if (output) { data.output |= mask; - if (pushpull) + switch (*mode) { + case OUT_PP: data.pushpull |= mask; - else + break; + case OUT_OD: data.pushpull &= ~mask; + break; + default: + break; + } } else { data.output &= ~mask; - data.pushpull &= ~mask; } err = cp2112_set_report(device_get_parent(dev), @@ -247,10 +458,25 @@ cp2112_gpio_configure_write_pin(device_t dev, uint32_t CP2112_REQ_GPIO_CFG, &data, sizeof(data)); if (err != 0) return (err); + if (((data.output & mask) != 0) != output) return (EIO); - if (((data.pushpull & mask) != 0) != pushpull) - return (EIO); + if (output) { + switch (*mode) { + case OUT_PP: + if ((data.pushpull & mask) == 0) + return (EIO); + break; + case OUT_OD: + if ((data.pushpull & mask) != 0) + return (EIO); + break; + default: + *mode = (data.pushpull & mask) != 0 ? + OUT_PP : OUT_OD; + break; + } + } return (0); } @@ -381,6 +607,7 @@ cp2112_gpio_pin_setflags(device_t dev, uint32_t pin_nu { struct cp2112gpio_softc *sc; struct gpio_pin *pin; + enum cp2112_out_mode out_mode; int err; if (pin_num >= CP2112_GPIO_COUNT) @@ -405,118 +632,45 @@ cp2112_gpio_pin_setflags(device_t dev, uint32_t pin_nu return (EINVAL); } - CP2112GPIO_LOCK(sc); - pin = &sc->pins[pin_num]; - /* - * If neither push-pull or opendrain is explcitely requested, then + * If neither push-pull or open-drain is explicitly requested, then * preserve the current state. */ - if ((flags & GPIO_PIN_OUTPUT) != 0 && - (flags & (GPIO_PIN_OPENDRAIN | GPIO_PIN_PUSHPULL)) == 0) - flags |= pin->gp_flags & (GPIO_PIN_OPENDRAIN|GPIO_PIN_PUSHPULL); + out_mode = OUT_KEEP; + if ((flags & GPIO_PIN_OUTPUT) != 0) { + if ((flags & GPIO_PIN_OPENDRAIN) != 0) + out_mode = OUT_OD; + if ((flags & GPIO_PIN_PUSHPULL) != 0) + out_mode = OUT_PP; + } + + CP2112GPIO_LOCK(sc); + pin = &sc->pins[pin_num]; err = cp2112_gpio_configure_write_pin(dev, pin_num, - (flags & GPIO_PIN_OUTPUT) != 0, - (flags & GPIO_PIN_PUSHPULL) != 0); - if (err == 0) + (flags & GPIO_PIN_OUTPUT) != 0, &out_mode); + if (err == 0) { + /* + * If neither open-drain or push-pull was requested, then see + * what hardware actually had. Otherwise, it has been + * reconfigured as requested. + */ + if ((flags & GPIO_PIN_OUTPUT) != 0 && + (flags & (GPIO_PIN_OPENDRAIN | GPIO_PIN_PUSHPULL)) == 0) { + KASSERT(out_mode != OUT_KEEP, + ("impossible current output mode")); + if (out_mode == OUT_OD) + flags |= GPIO_PIN_OPENDRAIN; + else + flags |= GPIO_PIN_PUSHPULL; + } pin->gp_flags = flags; + } CP2112GPIO_UNLOCK(sc); return (err); } -static const STRUCT_USB_HOST_ID cp2112_devs[] = { - { USB_VP(USB_VENDOR_SILABS, USB_PRODUCT_SILABS_CP2112) }, - { USB_VP(0x1009, USB_PRODUCT_SILABS_CP2112) }, /* XXX */ -}; - static int -cp2112_probe(device_t dev) -{ - struct usb_attach_arg *uaa; - - uaa = device_get_ivars(dev); - if (uaa->usb_mode != USB_MODE_HOST) - return (ENXIO); - if (uaa->info.bInterfaceClass != UICLASS_HID) - return (ENXIO); - - if (usbd_lookup_id_by_uaa(cp2112_devs, sizeof(cp2112_devs), uaa) == 0) - return (BUS_PROBE_DEFAULT); - return (ENXIO); -} - -static int -cp2112_attach(device_t dev) -{ - struct { - uint8_t id; - uint8_t part_num; - uint8_t version; - } __packed vdata; - struct usb_attach_arg *uaa; - struct cp2112_softc *sc; - int err; - - uaa = device_get_ivars(dev); - sc = device_get_softc(dev); - - device_set_usb_desc(dev); - - sc->sc_udev = uaa->device; - sc->sc_iface_index = uaa->info.bIfaceIndex; - - vdata.id = CP2112_REQ_VERSION; - err = cp2112_get_report(dev, CP2112_REQ_VERSION, &vdata, sizeof(vdata)); - if (err != 0) - goto detach; - device_printf(dev, "part number 0x%02x, version 0x%02x\n", - vdata.part_num, vdata.version); - if (vdata.part_num != CP2112_PART_NUM) { - device_printf(dev, "unsupported part number\n"); - goto detach; - } - sc->sc_version = vdata.version; - sc->sc_gpio_dev = device_add_child(dev, "gpio", -1); - if (sc->sc_gpio_dev != NULL) { - err = device_probe_and_attach(sc->sc_gpio_dev); - if (err != 0) { - device_printf(dev, "failed to attach gpio child\n"); - } - } else { - device_printf(dev, "failed to create gpio child\n"); - } - - sc->sc_iic_dev = device_add_child(dev, "iichb", -1); - if (sc->sc_iic_dev != NULL) { - err = device_probe_and_attach(sc->sc_iic_dev); - if (err != 0) { - device_printf(dev, "failed to attach iic child\n"); - } - } else { - device_printf(dev, "failed to create iic child\n"); - } - - return (0); - -detach: - cp2112_detach(dev); - return (ENXIO); -} - -static int -cp2112_detach(device_t dev) -{ - int err; - - err = bus_generic_detach(dev); - if (err != 0) - return (err); - device_delete_children(dev); - return (0); -} - -static int cp2112gpio_probe(device_t dev) { device_set_desc(dev, "CP2112 GPIO interface"); @@ -526,13 +680,7 @@ cp2112gpio_probe(device_t dev) static int cp2112gpio_attach(device_t dev) { - struct { - uint8_t id; - uint8_t output; - uint8_t pushpull; - uint8_t special; - uint8_t divider; - } __packed data; + struct gpio_config_req data; struct cp2112gpio_softc *sc; device_t cp2112; int err; @@ -546,7 +694,6 @@ cp2112gpio_attach(device_t dev) sc->gpio_caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_OPENDRAIN | GPIO_PIN_PUSHPULL; - data.id = CP2112_REQ_GPIO_CFG; err = cp2112_get_report(cp2112, CP2112_REQ_GPIO_CFG, &data, sizeof(data)); if (err != 0) @@ -562,7 +709,11 @@ cp2112gpio_attach(device_t dev) snprintf(pin->gp_name, GPIOMAXNAME, "GPIO%u", i); pin->gp_name[GPIOMAXNAME - 1] = '\0'; - if ((data.output & mask) != 0) { + if ((i == 0 && (data.special & CP2112_GPIO_SPEC_TX0) != 0) || + (i == 1 && (data.special & CP2112_GPIO_SPEC_RX1) != 0) || + (i == 7 && (data.special & CP2112_GPIO_SPEC_CLK7) != 0)) { + /* Special mode means that a pin is not for GPIO. */ + } else if ((data.output & mask) != 0) { pin->gp_flags |= GPIO_PIN_OUTPUT; if ((data.pushpull & mask) != 0) pin->gp_flags |= GPIO_PIN_PUSHPULL; @@ -597,94 +748,6 @@ cp2112gpio_detach(device_t dev) return (0); } -static device_method_t cp2112hid_methods[] = { - DEVMETHOD(device_probe, cp2112_probe), - DEVMETHOD(device_attach, cp2112_attach), - DEVMETHOD(device_detach, cp2112_detach), - - DEVMETHOD_END -}; - -static device_method_t cp2112gpio_methods[] = { - /* Device */ - DEVMETHOD(device_probe, cp2112gpio_probe), - DEVMETHOD(device_attach, cp2112gpio_attach), - DEVMETHOD(device_detach, cp2112gpio_detach), - - /* GPIO */ - DEVMETHOD(gpio_get_bus, cp2112_gpio_get_bus), - DEVMETHOD(gpio_pin_max, cp2112_gpio_pin_max), - DEVMETHOD(gpio_pin_get, cp2112_gpio_pin_get), - DEVMETHOD(gpio_pin_set, cp2112_gpio_pin_set), - DEVMETHOD(gpio_pin_toggle, cp2112_gpio_pin_toggle), - DEVMETHOD(gpio_pin_getname, cp2112_gpio_pin_getname), - DEVMETHOD(gpio_pin_getcaps, cp2112_gpio_pin_getcaps), - DEVMETHOD(gpio_pin_getflags, cp2112_gpio_pin_getflags), - DEVMETHOD(gpio_pin_setflags, cp2112_gpio_pin_setflags), - - DEVMETHOD_END -}; - -static driver_t cp2112hid_driver = { - .name = "cp2112hid", - .methods = cp2112hid_methods, - .size = sizeof(struct cp2112_softc), -}; - -static devclass_t cp2112hid_devclass; -DRIVER_MODULE(cp2112hid, uhub, cp2112hid_driver, cp2112hid_devclass, - NULL, NULL); -MODULE_DEPEND(cp2112hid, usb, 1, 1, 1); -MODULE_VERSION(cp2112hid, 1); -USB_PNP_HOST_INFO(cp2112_devs); - -static driver_t cp2112gpio_driver = { - .name = "gpio", - .methods = cp2112gpio_methods, - .size = sizeof(struct cp2112gpio_softc), -}; - -static devclass_t cp2112gpio_devclass; -DRIVER_MODULE(cp2112gpio, cp2112hid, cp2112gpio_driver, cp2112gpio_devclass, - NULL, NULL); -MODULE_DEPEND(cp2112gpio, cp2112hid, 1, 1, 1); -MODULE_DEPEND(cp2112gpio, gpiobus, 1, 1, 1); -MODULE_VERSION(cp2112gpio, 1); - - - -/* CP2112 I2C driver code. */ - - -enum { - CP2112_INTR_OUT = 0, - CP2112_INTR_IN, - CP2112_N_TRANSFER, -}; - -struct cp2112iic_softc { - device_t dev; - device_t iicbus_dev; - struct usb_xfer *xfers[CP2112_N_TRANSFER]; - u_char own_addr; - struct { - struct mtx lock; - struct cv cv; - struct { - uint8_t *data; - int len; - int done; - int error; - } in; - struct { - const uint8_t *data; - int len; - int done; - int error; - } out; - } io; -}; - static void cp2112iic_intr_write_callback(struct usb_xfer *xfer, usb_error_t error) { @@ -890,17 +953,8 @@ cp2112iic_req_resp(struct cp2112iic_softc *sc, const v static int cp2112iic_check_req_status(struct cp2112iic_softc *sc) { - struct { - uint8_t id; - uint8_t request; - } __packed xfer_status_req; - struct { - uint8_t id; - uint8_t status0; - uint8_t status1; - uint16_t status2; - uint16_t status3; - } __packed xfer_status_resp; + struct i2c_xfer_status_req xfer_status_req; + struct i2c_xfer_status_resp xfer_status_resp; int err; mtx_assert(&sc->io.lock, MA_OWNED); @@ -971,16 +1025,8 @@ static int cp2112iic_read_data(struct cp2112iic_softc *sc, void *data, uint16_t in_len, uint16_t *out_len) { - struct { - uint8_t id; - uint16_t length; - } __packed data_read_force_send; - struct { - uint8_t id; - uint8_t status; - uint8_t length; - uint8_t data[61]; - } __packed data_read_resp; + struct i2c_data_read_force_send_req data_read_force_send; + struct i2c_data_read_resp data_read_resp; int err; mtx_assert(&sc->io.lock, MA_OWNED); @@ -993,7 +1039,7 @@ cp2112iic_read_data(struct cp2112iic_softc *sc, void * if (in_len > sizeof(data_read_resp.data)) in_len = sizeof(data_read_resp.data); data_read_force_send.id = CP2112_REQ_SMB_READ_FORCE_SEND; - data_read_force_send.length = htobe16(in_len); + data_read_force_send.len = htobe16(in_len); err = cp2112iic_req_resp(sc, &data_read_force_send, sizeof(data_read_force_send), &data_read_resp, sizeof(data_read_resp)); @@ -1009,7 +1055,7 @@ cp2112iic_read_data(struct cp2112iic_softc *sc, void * } DTRACE_PROBE2(read__response, uint8_t, data_read_resp.status, - uint8_t, data_read_resp.length); + uint8_t, data_read_resp.len); /* * We expect either the request completed status or, more typical for @@ -1021,13 +1067,13 @@ cp2112iic_read_data(struct cp2112iic_softc *sc, void * err = IIC_EBUSERR; goto out; } - if (data_read_resp.length > in_len) { + if (data_read_resp.len > in_len) { device_printf(sc->dev, "device returns more data than asked\n"); err = IIC_EOVERFLOW; goto out; } - *out_len = data_read_resp.length; + *out_len = data_read_resp.len; if (*out_len > 0) memcpy(data, data_read_resp.data, *out_len); out: @@ -1070,11 +1116,13 @@ cp2112iic_transfer(device_t dev, struct iic_msg *msgs, reason = "message with no data"; break; } - if ((msgs[i].flags & IIC_M_RD) != 0 && msgs[i].len > 512) { + if ((msgs[i].flags & IIC_M_RD) != 0 && + msgs[i].len > CP2112_IIC_MAX_READ_LEN) { reason = "too long read"; break; } - if ((msgs[i].flags & IIC_M_RD) == 0 && msgs[i].len > 61) { + if ((msgs[i].flags & IIC_M_RD) == 0 && + msgs[i].len > SIZEOF_FIELD(i2c_write_req, data)) { reason = "too long write"; break; } @@ -1092,7 +1140,8 @@ cp2112iic_transfer(device_t dev, struct iic_msg *msgs, reason = "write without stop"; break; } - if ((msgs[i].flags & IIC_M_NOSTOP) != 0 && msgs[i].len > 16) { + if ((msgs[i].flags & IIC_M_NOSTOP) != 0 && + msgs[i].len > SIZEOF_FIELD(i2c_write_read_req, wdata)) { reason = "too long write without stop"; break; } @@ -1120,22 +1169,16 @@ cp2112iic_transfer(device_t dev, struct iic_msg *msgs, for (i = 0; i < nmsgs; i++) { if (i + 1 < nmsgs && (msgs[i].flags & IIC_M_NOSTOP) != 0) { - KASSERT((msgs[i].flags & IIC_M_RD) == 0, - ("read without stop")); - KASSERT((msgs[i + 1].flags & IIC_M_RD) != 0, - ("write after write without stop")); /* * Combine into a single * CP2112 operation. */ - struct { - uint8_t id; - uint8_t slave; - uint16_t rlen; - uint8_t wlen; - uint8_t wdata[16]; - } __packed req; + struct i2c_write_read_req req; + KASSERT((msgs[i].flags & IIC_M_RD) == 0, + ("read without stop")); + KASSERT((msgs[i + 1].flags & IIC_M_RD) != 0, + ("write after write without stop")); req.id = CP2112_REQ_SMB_WRITE_READ; req.slave = msgs[i].slave & ~LSB; to_read = msgs[i + 1].len; @@ -1150,11 +1193,7 @@ cp2112iic_transfer(device_t dev, struct iic_msg *msgs, */ i++; } else if ((msgs[i].flags & IIC_M_RD) != 0) { - struct { - uint8_t id; - uint8_t slave; - uint16_t len; - } __packed req; + struct i2c_read_req req; req.id = CP2112_REQ_SMB_READ; req.slave = msgs[i].slave & ~LSB; @@ -1162,12 +1201,7 @@ cp2112iic_transfer(device_t dev, struct iic_msg *msgs, req.len = htobe16(to_read); err = cp2112iic_send_req(sc, &req, sizeof(req)); } else { - struct { - uint8_t id; - uint8_t slave; - uint8_t len; - uint8_t data[61]; - } __packed req; + struct i2c_write_req req; req.id = CP2112_REQ_SMB_WRITE; req.slave = msgs[i].slave & ~LSB; @@ -1207,16 +1241,7 @@ cp2112iic_transfer(device_t dev, struct iic_msg *msgs, static int cp2112iic_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) { - struct { - uint8_t id; - uint32_t speed; /* Hz */ - uint8_t slave_addr; /* ACK only */ - uint8_t auto_send_read; /* boolean */ - uint16_t write_timeout; /* 0-1000 ms, 0 ~ no timeout */ - uint16_t read_timeout; /* 0-1000 ms, 0 ~ no timeout */ - uint8_t scl_low_timeout;/* boolean */ - uint16_t retry_count; /* 1-1000, 0 ~ forever */ - } __packed smb_cfg; + struct i2c_cfg_req i2c_cfg; struct cp2112iic_softc *sc; device_t cp2112; u_int busfreq; @@ -1229,16 +1254,15 @@ cp2112iic_reset(device_t dev, u_char speed, u_char add else busfreq = IICBUS_GET_FREQUENCY(sc->iicbus_dev, speed); - smb_cfg.id = CP2112_REQ_SMB_CFG; err = cp2112_get_report(cp2112, CP2112_REQ_SMB_CFG, - &smb_cfg, sizeof(smb_cfg)); + &i2c_cfg, sizeof(i2c_cfg)); if (err != 0) { device_printf(dev, "failed to get CP2112_REQ_SMB_CFG report\n"); return (err); } if (oldaddr != NULL) - *oldaddr = smb_cfg.slave_addr; + *oldaddr = i2c_cfg.slave_addr; /* * For simplicity we do not enable Auto Send Read * because of erratum CP2112_E101 (fixed in version 3). @@ -1251,28 +1275,28 @@ cp2112iic_reset(device_t dev, u_char speed, u_char add * TODO: should the device reset request (0x01) be sent? * If the device disconnects as a result, then no. */ - smb_cfg.speed = htobe32(busfreq); + i2c_cfg.speed = htobe32(busfreq); if (addr != 0) - smb_cfg.slave_addr = addr; - smb_cfg.auto_send_read = 0; - smb_cfg.retry_count = htobe16(1); - smb_cfg.scl_low_timeout = 0; + i2c_cfg.slave_addr = addr; + i2c_cfg.auto_send_read = 0; + i2c_cfg.retry_count = htobe16(1); + i2c_cfg.scl_low_timeout = 0; if (bootverbose) { - device_printf(dev, "speed %d Hz\n", be32toh(smb_cfg.speed)); - device_printf(dev, "slave addr 0x%02x\n", smb_cfg.slave_addr); + device_printf(dev, "speed %d Hz\n", be32toh(i2c_cfg.speed)); + device_printf(dev, "slave addr 0x%02x\n", i2c_cfg.slave_addr); device_printf(dev, "auto send read %s\n", - smb_cfg.auto_send_read ? "on" : "off"); + i2c_cfg.auto_send_read ? "on" : "off"); device_printf(dev, "write timeout %d ms (0 - disabled)\n", - be16toh(smb_cfg.write_timeout)); + be16toh(i2c_cfg.write_timeout)); device_printf(dev, "read timeout %d ms (0 - disabled)\n", - be16toh(smb_cfg.read_timeout)); + be16toh(i2c_cfg.read_timeout)); device_printf(dev, "scl low timeout %s\n", - smb_cfg.scl_low_timeout ? "on" : "off"); + i2c_cfg.scl_low_timeout ? "on" : "off"); device_printf(dev, "retry count %d (0 - no limit)\n", - be16toh(smb_cfg.retry_count)); + be16toh(i2c_cfg.retry_count)); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Aug 28 10:28:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E26EF3D4065; Fri, 28 Aug 2020 10:28:52 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdG6D5bcSz4LPW; Fri, 28 Aug 2020 10:28:52 +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 A499413A05; Fri, 28 Aug 2020 10:28:52 +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 07SASqbT029205; Fri, 28 Aug 2020 10:28:52 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SASqSt029204; Fri, 28 Aug 2020 10:28:52 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202008281028.07SASqSt029204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 28 Aug 2020 10:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364913 - stable/12/sys/modules/usb/cp2112 X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/sys/modules/usb/cp2112 X-SVN-Commit-Revision: 364913 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 10:28:53 -0000 Author: avg Date: Fri Aug 28 10:28:52 2020 New Revision: 364913 URL: https://svnweb.freebsd.org/changeset/base/364913 Log: MFC r364269 by eugen: Unbreak building cp2112(8) as a module... outside of kernel build environment. Modified: stable/12/sys/modules/usb/cp2112/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/modules/usb/cp2112/Makefile ============================================================================== --- stable/12/sys/modules/usb/cp2112/Makefile Fri Aug 28 10:27:24 2020 (r364912) +++ stable/12/sys/modules/usb/cp2112/Makefile Fri Aug 28 10:28:52 2020 (r364913) @@ -31,7 +31,7 @@ S= ${SRCTOP}/sys KMOD= cp2112 SRCS= cp2112.c -SRCS+= opt_bus.h opt_usb.h +SRCS+= opt_bus.h opt_platform.h opt_usb.h SRCS+= device_if.h bus_if.h gpio_if.h iicbus_if.h usb_if.h usbdevs.h .include From owner-svn-src-all@freebsd.org Fri Aug 28 10:30:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99B003D4535; Fri, 28 Aug 2020 10:30: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdG8J3YZZz4LYL; Fri, 28 Aug 2020 10:30:40 +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 5D4DC13A09; Fri, 28 Aug 2020 10:30:40 +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 07SAUe6W029389; Fri, 28 Aug 2020 10:30:40 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SAUevm029388; Fri, 28 Aug 2020 10:30:40 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202008281030.07SAUevm029388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 28 Aug 2020 10:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364914 - stable/12/sys/dev/iicbus/mux X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/sys/dev/iicbus/mux X-SVN-Commit-Revision: 364914 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 10:30:40 -0000 Author: avg Date: Fri Aug 28 10:30:39 2020 New Revision: 364914 URL: https://svnweb.freebsd.org/changeset/base/364914 Log: MFC r364344: iicmux: fix a sign error in comparison Modified: stable/12/sys/dev/iicbus/mux/iicmux.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/iicbus/mux/iicmux.c ============================================================================== --- stable/12/sys/dev/iicbus/mux/iicmux.c Fri Aug 28 10:28:52 2020 (r364913) +++ stable/12/sys/dev/iicbus/mux/iicmux.c Fri Aug 28 10:30:39 2020 (r364914) @@ -283,7 +283,7 @@ iicmux_attach_children(struct iicmux_softc *sc) } sc->childdevs[idx] = device_add_child(sc->dev, "iicbus", -1); sc->childnodes[idx] = child; - if (sc->maxbus < idx) + if (sc->maxbus < (int)idx) sc->maxbus = idx; } From owner-svn-src-all@freebsd.org Fri Aug 28 10:32:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B52673D48C4; Fri, 28 Aug 2020 10:32:03 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdG9v4Tcbz4M3J; Fri, 28 Aug 2020 10:32:03 +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 7BF9613BCA; Fri, 28 Aug 2020 10:32:03 +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 07SAW3v3034161; Fri, 28 Aug 2020 10:32:03 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SAW307034160; Fri, 28 Aug 2020 10:32:03 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202008281032.07SAW307034160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 28 Aug 2020 10:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364915 - stable/12/sys/arm/allwinner X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/sys/arm/allwinner X-SVN-Commit-Revision: 364915 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 10:32:03 -0000 Author: avg Date: Fri Aug 28 10:32:03 2020 New Revision: 364915 URL: https://svnweb.freebsd.org/changeset/base/364915 Log: MFC r364146: aw_cir: add support for allwinner,sun6i-a31-ir (found, e.g., on h3) Modified: stable/12/sys/arm/allwinner/aw_cir.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/allwinner/aw_cir.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_cir.c Fri Aug 28 10:30:39 2020 (r364914) +++ stable/12/sys/arm/allwinner/aw_cir.c Fri Aug 28 10:32:03 2020 (r364915) @@ -134,8 +134,11 @@ __FBSDID("$FreeBSD$"); #define INV_CODE_MASK 0xff00ff00 #define VALID_CODE_MASK 0x00ff0000 -#define A10_IR 1 -#define A13_IR 2 +enum { + A10_IR = 1, + A13_IR, + A31_IR, +}; #define AW_IR_RAW_BUF_SIZE 128 @@ -158,6 +161,7 @@ static struct resource_spec aw_ir_spec[] = { static struct ofw_compat_data compat_data[] = { { "allwinner,sun4i-a10-ir", A10_IR }, { "allwinner,sun5i-a13-ir", A13_IR }, + { "allwinner,sun6i-a31-ir", A31_IR }, { NULL, 0 } }; @@ -414,6 +418,7 @@ aw_ir_attach(device_t dev) sc->fifo_size = 16; break; case A13_IR: + case A31_IR: sc->fifo_size = 64; break; } From owner-svn-src-all@freebsd.org Fri Aug 28 10:33:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8CAF23D4B85; Fri, 28 Aug 2020 10:33: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdGCN39tgz4MJ6; Fri, 28 Aug 2020 10:33:20 +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 50B1813A97; Fri, 28 Aug 2020 10:33:20 +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 07SAXKcq035058; Fri, 28 Aug 2020 10:33:20 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SAXKx4035057; Fri, 28 Aug 2020 10:33:20 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202008281033.07SAXKx4035057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 28 Aug 2020 10:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364916 - stable/12/sys/arm/allwinner X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/12/sys/arm/allwinner X-SVN-Commit-Revision: 364916 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 10:33:20 -0000 Author: avg Date: Fri Aug 28 10:33:19 2020 New Revision: 364916 URL: https://svnweb.freebsd.org/changeset/base/364916 Log: MFC r364147: aw_cir: minor cleanups Modified: stable/12/sys/arm/allwinner/aw_cir.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/allwinner/aw_cir.c ============================================================================== --- stable/12/sys/arm/allwinner/aw_cir.c Fri Aug 28 10:32:03 2020 (r364915) +++ stable/12/sys/arm/allwinner/aw_cir.c Fri Aug 28 10:33:19 2020 (r364916) @@ -368,7 +368,7 @@ aw_ir_intr(void *arg) device_printf(sc->dev, "IR code status: %d\n", stat); } - sc->dcnt = 0; + aw_ir_buf_reset(sc); } if (val & AW_IR_RXINT_ROI_EN) { /* RX FIFO overflow */ @@ -469,7 +469,8 @@ aw_ir_attach(device_t dev) &sc->intrhand)) { bus_release_resources(dev, aw_ir_spec, sc->res); device_printf(dev, "cannot setup interrupt handler\n"); - return (ENXIO); + err = ENXIO; + goto error; } /* Enable CIR Mode */ From owner-svn-src-all@freebsd.org Fri Aug 28 12:09:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 74D003D78D2; Fri, 28 Aug 2020 12:09:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdJLk3bRTz4TQb; Fri, 28 Aug 2020 12:09:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 07SC9ahH055466 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 28 Aug 2020 15:09:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 07SC9ahH055466 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 07SC9aVc055465; Fri, 28 Aug 2020 15:09:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 28 Aug 2020 15:09:36 +0300 From: Konstantin Belousov To: Adrian Chadd Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r364091 - head/lib/libc/gen Message-ID: <20200828120936.GC2713@kib.kiev.ua> References: <202008102141.07ALfnDj009838@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4BdJLk3bRTz4TQb X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [0.70 / 15.00]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-0.16)[-0.163]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; NEURAL_SPAM_MEDIUM(0.35)[0.350]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.51)[0.512]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 12:09:51 -0000 On Thu, Aug 27, 2020 at 05:28:03PM -0700, Adrian Chadd wrote: > Hi! > > This breaks when compiling FreeBSD-mips on GCC-9. :( > > In file included from > /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/gen/scandir.c:50, > from > /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/gen/scandir_b.c:29: > /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/include/block_abi.h:45:2: > error: anonymous struct declared inside parameter list will not be visible > outside of this definition or declarati > 45 | struct {\ > | ^~~~~~ > /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/gen/scandir.c:67:5: > note: in expansion of macro 'DECLARE_BLOCK' > 67 | DECLARE_BLOCK(int, dcomp, const struct dirent **, const struct > dirent **)) > | ^~~~~~~~~~~~~ > /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/include/block_abi.h:45:2: > error: anonymous struct declared inside parameter list will not be visible > outside of this definition or declarati > 45 | struct {\ > | ^~~~~~ > /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/gen/scandir.c:66:5: > note: in expansion of macro 'DECLARE_BLOCK' > 66 | DECLARE_BLOCK(int, select, const struct dirent *), > | ^~~~~~~~~~~~~ > cc1: all warnings being treated as errors > --- scandir_b.o --- > *** [scandir_b.o] Error code 1 You did not show the exact command line for your compilation failure. Since gcc does not support blocks, I think the best route is to add something like the following to lib/libc/gen/Makefile.inc: CWARNFLAGS.gcc.scandir_b.c= -Wno-error (I did not even tried to test it). From owner-svn-src-all@freebsd.org Fri Aug 28 12:51:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C794C3B0449; Fri, 28 Aug 2020 12:51:31 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdKGp754dz4X4G; Fri, 28 Aug 2020 12:51:30 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (mh0.gentlemail.de [78.138.80.135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id 07SCpLId016019; Fri, 28 Aug 2020 14:51:21 +0200 (CEST) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id ADA8EF52; Fri, 28 Aug 2020 14:51:20 +0200 (CEST) Subject: Re: svn commit: r364863 - head To: Ryan Moeller , Kyle Evans , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202008271326.07RDQbGd016044@repo.freebsd.org> From: Harry Schmalzbauer Organization: OmniLAN Message-ID: Date: Fri, 28 Aug 2020 14:51:20 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <202008271326.07RDQbGd016044@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Greylist: ACL 136 matched, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [78.138.80.130]); Fri, 28 Aug 2020 14:51:21 +0200 (CEST) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: 78.138.80.135; Sender-helo: mh0.gentlemail.de; ) X-Rspamd-Queue-Id: 4BdKGp754dz4X4G X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@omnilan.de designates 2a00:e10:2800::a130 as permitted sender) smtp.mailfrom=freebsd@omnilan.de X-Spamd-Result: default: False [-2.55 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+mx]; DMARC_NA(0.00)[omnilan.de]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-0.94)[-0.940]; NEURAL_HAM_LONG(-0.96)[-0.965]; NEURAL_HAM_SHORT(-0.35)[-0.347]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:61157, ipnet:2a00:e10:2800::/38, country:DE]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 12:51:31 -0000 Am 27.08.2020 um 15:26 schrieb Ryan Moeller: > Author: freqlabs > Date: Thu Aug 27 13:26:36 2020 > New Revision: 364863 > URL: https://svnweb.freebsd.org/changeset/base/364863 > > Log: > libzfs: Also add the crypto dependency to Makefile.inc1 > > Reported by: kevans > Discussed with: kevans > Sponsored by: iXsystems, Inc. > > Modified: > head/Makefile.inc1 Hello, this still doesn't allwo me to compile ZFS into the kernel: linking kernel.full ld: error: undefined symbol: zfs_zstd_compress >>> referenced by zio_compress.c >>>               zio_compress.o:(zio_compress_table) ld: error: undefined symbol: zfs_zstd_decompress >>> referenced by zio_compress.c >>>               zio_compress.o:(zio_compress_table) ld: error: undefined symbol: zfs_zstd_decompress_level >>> referenced by zio_compress.c >>>               zio_compress.o:(zio_compress_table) *** Error code 1 According to src/sys/amd64/conf/NOTES, "options ZFS" should still be supported. Unfortunately I have no adhoc idea how to fix. Anybody else? Thanks, -harry From owner-svn-src-all@freebsd.org Fri Aug 28 13:15:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC6053B11AC; Fri, 28 Aug 2020 13:15:15 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdKpC5w10z4YGB; Fri, 28 Aug 2020 13:15:15 +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 AF2D71535A; Fri, 28 Aug 2020 13:15:15 +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 07SDFF4N034370; Fri, 28 Aug 2020 13:15:15 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SDFDcC034359; Fri, 28 Aug 2020 13:15:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202008281315.07SDFDcC034359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 28 Aug 2020 13:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364917 - in stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-12 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Commit-Revision: 364917 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 13:15:15 -0000 Author: avg Date: Fri Aug 28 13:15:13 2020 New Revision: 364917 URL: https://svnweb.freebsd.org/changeset/base/364917 Log: MFC r362047,r362048: rework how ZVOLs are updated in response to DSL operations Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Fri Aug 28 10:33:19 2020 (r364916) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Fri Aug 28 13:15:13 2020 (r364917) @@ -1053,6 +1053,9 @@ dmu_objset_create_sync(void *arg, dmu_tx_t *tx) doca->doca_cred, tx); } +#if defined(__FreeBSD__) && defined(_KERNEL) + zvol_create_minors(dp->dp_spa, doca->doca_name); +#endif spa_history_log_internal_ds(ds, "create", tx, ""); dsl_dataset_rele(ds, FTAG); dsl_dir_rele(pdd, FTAG); @@ -1148,6 +1151,9 @@ dmu_objset_clone_sync(void *arg, dmu_tx_t *tx) VERIFY0(dsl_dataset_hold_obj(pdd->dd_pool, obj, FTAG, &ds)); dsl_dataset_name(origin, namebuf); +#if defined(__FreeBSD__) && defined(_KERNEL) + zvol_create_minors(dp->dp_spa, doca->doca_clone); +#endif spa_history_log_internal_ds(ds, "clone", tx, "origin=%s (%llu)", namebuf, origin->ds_object); dsl_dataset_rele(ds, FTAG); Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Fri Aug 28 10:33:19 2020 (r364916) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Fri Aug 28 13:15:13 2020 (r364917) @@ -57,6 +57,9 @@ #include #include #include +#ifdef __FreeBSD__ +#include +#endif #ifdef __FreeBSD__ #undef dump_write @@ -3445,6 +3448,11 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *tx) drc->drc_newsnapobj = dsl_dataset_phys(drc->drc_ds)->ds_prev_snap_obj; } + +#if defined(__FreeBSD__) && defined(_KERNEL) + zvol_create_minors(dp->dp_spa, drc->drc_tofs); +#endif + /* * Release the hold from dmu_recv_begin. This must be done before * we return to open context, so that when we free the dataset's dnode, Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Aug 28 10:33:19 2020 (r364916) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Aug 28 13:15:13 2020 (r364917) @@ -1572,6 +1572,9 @@ dsl_dataset_snapshot_sync(void *arg, dmu_tx_t *tx) dsl_props_set_sync_impl(ds->ds_prev, ZPROP_SRC_LOCAL, ddsa->ddsa_props, tx); } +#if defined(__FreeBSD__) && defined(_KERNEL) + zvol_create_minors(dp->dp_spa, name); +#endif dsl_dataset_rele(ds, FTAG); } } @@ -1646,17 +1649,6 @@ dsl_dataset_snapshot(nvlist_t *snaps, nvlist_t *props, fnvlist_free(suspended); } -#ifdef __FreeBSD__ -#ifdef _KERNEL - if (error == 0) { - for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL; - pair = nvlist_next_nvpair(snaps, pair)) { - char *snapname = nvpair_name(pair); - zvol_create_minors(snapname); - } - } -#endif -#endif return (error); } @@ -2535,7 +2527,7 @@ dsl_dataset_rename_snapshot_sync_impl(dsl_pool_t *dp, snprintf(newname, ZFS_MAX_DATASET_NAME_LEN, "%s@%s", ddrsa->ddrsa_fsname, ddrsa->ddrsa_newsnapname); zfsvfs_update_fromname(oldname, newname); - zvol_rename_minors(oldname, newname); + zvol_rename_minors(dp->dp_spa, oldname, newname); kmem_free(newname, ZFS_MAX_DATASET_NAME_LEN); kmem_free(oldname, ZFS_MAX_DATASET_NAME_LEN); #endif @@ -3087,9 +3079,6 @@ dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx) } #if defined(__FreeBSD__) && defined(_KERNEL) - /* Take the spa_namespace_lock early so zvol renames don't deadlock. */ - mutex_enter(&spa_namespace_lock); - oldname = kmem_alloc(ZFS_MAX_DATASET_NAME_LEN, KM_SLEEP); newname = kmem_alloc(ZFS_MAX_DATASET_NAME_LEN, KM_SLEEP); #endif @@ -3135,7 +3124,7 @@ dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx) #if defined(__FreeBSD__) && defined(_KERNEL) dsl_dataset_name(ds, newname); zfsvfs_update_fromname(oldname, newname); - zvol_rename_minors(oldname, newname); + zvol_rename_minors(dp->dp_spa, oldname, newname); #endif /* move any clone references */ @@ -3177,8 +3166,6 @@ dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx) } #if defined(__FreeBSD__) && defined(_KERNEL) - mutex_exit(&spa_namespace_lock); - kmem_free(newname, ZFS_MAX_DATASET_NAME_LEN); kmem_free(oldname, ZFS_MAX_DATASET_NAME_LEN); #endif Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Fri Aug 28 10:33:19 2020 (r364916) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Fri Aug 28 13:15:13 2020 (r364917) @@ -43,7 +43,11 @@ #include #include #include +#if defined(__FreeBSD__) && defined(_KERNEL) +#include +#endif + int dsl_destroy_snapshot_check_impl(dsl_dataset_t *ds, boolean_t defer) { @@ -489,6 +493,14 @@ dsl_destroy_snapshot_sync_impl(dsl_dataset_t *ds, bool if (dsl_dataset_phys(ds)->ds_userrefs_obj != 0) VERIFY0(zap_destroy(mos, dsl_dataset_phys(ds)->ds_userrefs_obj, tx)); + +#if defined(__FreeBSD__) && defined(_KERNEL) + char dsname[ZFS_MAX_DATASET_NAME_LEN]; + + dsl_dataset_name(ds, dsname); + zvol_remove_minors(dp->dp_spa, dsname); +#endif + dsl_dir_rele(ds->ds_dir, ds); ds->ds_dir = NULL; dmu_object_free_zapified(mos, obj, tx); @@ -979,6 +991,9 @@ dsl_destroy_head_sync(void *arg, dmu_tx_t *tx) VERIFY0(dsl_dataset_hold(dp, ddha->ddha_name, FTAG, &ds)); dsl_destroy_head_sync_impl(ds, tx); +#if defined(__FreeBSD__) && defined(_KERNEL) + zvol_remove_minors(dp->dp_spa, ddha->ddha_name); +#endif dsl_dataset_rele(ds, FTAG); } Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Fri Aug 28 10:33:19 2020 (r364916) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Fri Aug 28 13:15:13 2020 (r364917) @@ -2093,7 +2093,7 @@ dsl_dir_rename_sync(void *arg, dmu_tx_t *tx) #ifdef __FreeBSD__ #ifdef _KERNEL zfsvfs_update_fromname(ddra->ddra_oldname, ddra->ddra_newname); - zvol_rename_minors(ddra->ddra_oldname, ddra->ddra_newname); + zvol_rename_minors(dp->dp_spa, ddra->ddra_oldname, ddra->ddra_newname); #endif #endif Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Fri Aug 28 10:33:19 2020 (r364916) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Fri Aug 28 13:15:13 2020 (r364917) @@ -32,6 +32,7 @@ * Copyright (c) 2017, Intel Corporation. * Copyright (c) 2017 Datto Inc. * Copyright 2018 OmniOS Community Edition (OmniOSce) Association. + * Copyright (c) 2016 Actifio, Inc. All rights reserved. */ /* @@ -1280,6 +1281,24 @@ spa_activate(spa_t *spa, int mode) */ trim_thread_create(spa); + /* + * This taskq is used to perform zvol-minor-related tasks + * asynchronously. This has several advantages, including easy + * resolution of various deadlocks (zfsonlinux bug #3681). + * + * The taskq must be single threaded to ensure tasks are always + * processed in the order in which they were dispatched. + * + * A taskq per pool allows one to keep the pools independent. + * This way if one pool is suspended, it will not impact another. + * + * The preferred location to dispatch a zvol minor task is a sync + * task. In this context, there is easy access to the spa_t and minimal + * error handling is required because the sync task must succeed. + */ + spa->spa_zvol_taskq = taskq_create("z_zvol", 1, minclsyspri, + 1, INT_MAX, 0); + for (size_t i = 0; i < TXG_SIZE; i++) { spa->spa_txg_zio[i] = zio_root(spa, NULL, NULL, ZIO_FLAG_CANFAIL); @@ -1323,6 +1342,11 @@ spa_deactivate(spa_t *spa) spa_evicting_os_wait(spa); + if (spa->spa_zvol_taskq) { + taskq_destroy(spa->spa_zvol_taskq); + spa->spa_zvol_taskq = NULL; + } + txg_list_destroy(&spa->spa_vdev_txg_list); list_destroy(&spa->spa_config_dirty_list); @@ -4614,7 +4638,7 @@ spa_open_common(const char *pool, spa_t **spapp, void #ifdef __FreeBSD__ #ifdef _KERNEL if (firstopen) - zvol_create_minors(spa->spa_name); + zvol_create_minors(spa, spa->spa_name); #endif #endif } @@ -5970,7 +5994,7 @@ spa_import(const char *pool, nvlist_t *config, nvlist_ #ifdef __FreeBSD__ #ifdef _KERNEL - zvol_create_minors(pool); + zvol_create_minors(spa, pool); #endif #endif return (0); @@ -6119,6 +6143,12 @@ spa_export_common(char *pool, int new_state, nvlist_t spa_open_ref(spa, FTAG); mutex_exit(&spa_namespace_lock); spa_async_suspend(spa); + if (spa->spa_zvol_taskq) { +#ifdef _KERNEL + zvol_remove_minors(spa, spa_name(spa)); +#endif + taskq_wait(spa->spa_zvol_taskq); + } mutex_enter(&spa_namespace_lock); spa_close(spa, FTAG); Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Fri Aug 28 10:33:19 2020 (r364916) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Fri Aug 28 13:15:13 2020 (r364917) @@ -27,6 +27,7 @@ * Copyright 2013 Saso Kiselkov. All rights reserved. * Copyright (c) 2017 Datto Inc. * Copyright (c) 2017, Intel Corporation. + * Copyright (c) 2016 Actifio, Inc. All rights reserved. */ #ifndef _SYS_SPA_IMPL_H @@ -398,6 +399,8 @@ struct spa { uint64_t spa_lowmem_last_txg; /* txg window start */ hrtime_t spa_ccw_fail_time; /* Conf cache write fail time */ + + taskq_t *spa_zvol_taskq; /* Taskq for minor management */ uint64_t spa_multihost; /* multihost aware (mmp) */ mmp_thread_t spa_mmp; /* multihost mmp thread */ Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h Fri Aug 28 10:33:19 2020 (r364916) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h Fri Aug 28 13:15:13 2020 (r364917) @@ -21,6 +21,7 @@ /* * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016 Actifio, Inc. All rights reserved. */ #ifndef _SYS_ZVOL_H @@ -40,9 +41,6 @@ extern int zvol_check_volsize(uint64_t volsize, uint64 extern int zvol_check_volblocksize(uint64_t volblocksize); extern int zvol_get_stats(objset_t *os, nvlist_t *nv); extern void zvol_create_cb(objset_t *os, void *arg, cred_t *cr, dmu_tx_t *tx); -extern int zvol_create_minor(const char *); -extern int zvol_remove_minor(const char *); -extern void zvol_remove_minors(const char *); extern int zvol_set_volsize(const char *, uint64_t); #ifdef illumos @@ -72,8 +70,10 @@ extern void zvol_log_write_minor(void *minor_hdl, dmu_ #endif /* illumos */ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -extern int zvol_create_minors(const char *name); -extern void zvol_rename_minors(const char *oldname, const char *newname); +extern void zvol_create_minors(spa_t *spa, const char *name); +extern void zvol_remove_minors(spa_t *spa, const char *name); +extern void zvol_rename_minors(spa_t *spa, const char *oldname, + const char *newname); #endif #endif /* _KERNEL */ Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Aug 28 10:33:19 2020 (r364916) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Aug 28 13:15:13 2020 (r364917) @@ -1642,8 +1642,10 @@ zfs_ioc_pool_destroy(zfs_cmd_t *zc) int error; zfs_log_history(zc); error = spa_destroy(zc->zc_name); +#ifndef __FreeBSD__ if (error == 0) zvol_remove_minors(zc->zc_name); +#endif return (error); } @@ -1694,8 +1696,10 @@ zfs_ioc_pool_export(zfs_cmd_t *zc) zfs_log_history(zc); error = spa_export(zc->zc_name, NULL, force, hardforce); +#ifndef __FreeBSD__ if (error == 0) zvol_remove_minors(zc->zc_name); +#endif return (error); } @@ -3395,13 +3399,23 @@ zfs_ioc_create(const char *fsname, nvlist_t *innvl, nv if (error == 0) { error = zfs_set_prop_nvlist(fsname, ZPROP_SRC_LOCAL, nvprops, outnvl); +#if defined(__FreeBSD__) && defined(_KERNEL) + /* + * Wait for ZVOL operations to settle down before destroying. + */ + if (error != 0) { + spa_t *spa; + + if (spa_open(fsname, &spa, FTAG) == 0) { + taskqueue_drain_all( + spa->spa_zvol_taskq->tq_queue); + spa_close(spa, FTAG); + } + } +#endif if (error != 0) (void) dsl_destroy_head(fsname); } -#ifdef __FreeBSD__ - if (error == 0 && type == DMU_OST_ZVOL) - zvol_create_minors(fsname); -#endif return (error); } @@ -3443,10 +3457,6 @@ zfs_ioc_clone(const char *fsname, nvlist_t *innvl, nvl if (error != 0) (void) dsl_destroy_head(fsname); } -#ifdef __FreeBSD__ - if (error == 0) - zvol_create_minors(fsname); -#endif return (error); } @@ -3738,9 +3748,6 @@ zfs_ioc_destroy_snaps(const char *poolname, nvlist_t * return (SET_ERROR(EXDEV)); zfs_unmount_snap(nvpair_name(pair)); -#if defined(__FreeBSD__) - zvol_remove_minors(name); -#endif } return (dsl_destroy_snapshots_nvl(snaps, defer, outnvl)); @@ -3924,10 +3931,8 @@ zfs_ioc_destroy(zfs_cmd_t *zc) err = dsl_destroy_snapshot(zc->zc_name, zc->zc_defer_destroy); else err = dsl_destroy_head(zc->zc_name); +#ifndef __FreeBSD__ if (ost == DMU_OST_ZVOL && err == 0) -#ifdef __FreeBSD__ - zvol_remove_minors(zc->zc_name); -#else (void) zvol_remove_minor(zc->zc_name); #endif return (err); @@ -4813,11 +4818,6 @@ zfs_ioc_recv(zfs_cmd_t *zc) } #endif -#ifdef __FreeBSD__ - if (error == 0) - zvol_create_minors(tofs); -#endif - /* * On error, restore the original props. */ @@ -6958,6 +6958,24 @@ zfsdev_ioctl(struct cdev *dev, u_long zcmd, caddr_t ar out: nvlist_free(innvl); + +#if defined(__FreeBSD__) && defined(_KERNEL) + /* + * Wait for ZVOL changes to get applied. + * NB: taskqueue_drain_all() does less than taskq_wait(), + * but enough for what we want. + * And there is no equivalent illumos API. + */ + if (error == 0) { + spa_t *spa; + + if (spa_open(saved_poolname, &spa, FTAG) == 0) { + taskqueue_drain_all( + spa->spa_zvol_taskq->tq_queue); + spa_close(spa, FTAG); + } + } +#endif #ifdef illumos rc = ddi_copyout(zc, (void *)arg, sizeof (zfs_cmd_t), flag); Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Aug 28 10:33:19 2020 (r364916) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Aug 28 13:15:13 2020 (r364917) @@ -30,6 +30,7 @@ * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright (c) 2016 Actifio, Inc. All rights reserved. */ /* Portions Copyright 2011 Martin Matuska */ @@ -184,6 +185,20 @@ typedef struct zvol_state { #endif } zvol_state_t; +typedef enum { + ZVOL_ASYNC_CREATE_MINORS, + ZVOL_ASYNC_REMOVE_MINORS, + ZVOL_ASYNC_RENAME_MINORS, + ZVOL_ASYNC_MAX +} zvol_async_op_t; + +typedef struct { + zvol_async_op_t op; + char pool[ZFS_MAX_DATASET_NAME_LEN]; + char name1[ZFS_MAX_DATASET_NAME_LEN]; + char name2[ZFS_MAX_DATASET_NAME_LEN]; +} zvol_task_t; + #ifndef illumos static LIST_HEAD(, zvol_state) all_zvols; #endif @@ -606,7 +621,7 @@ zvol_name2minor(const char *name, minor_t *minor) /* * Create a minor node (plus a whole lot more) for the specified volume. */ -int +static int zvol_create_minor(const char *name) { zfs_soft_state_t *zs; @@ -690,7 +705,6 @@ zvol_create_minor(const char *name) if (error != 0 || mode == ZFS_VOLMODE_DEFAULT) mode = volmode; - DROP_GIANT(); zv->zv_volmode = mode; if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { g_topology_lock(); @@ -765,7 +779,6 @@ zvol_create_minor(const char *name) zvol_geom_run(zv); g_topology_unlock(); } - PICKUP_GIANT(); ZFS_LOG(1, "ZVOL %s created.", name); #endif @@ -819,22 +832,6 @@ zvol_remove_zv(zvol_state_t *zv) } int -zvol_remove_minor(const char *name) -{ - zvol_state_t *zv; - int rc; - - mutex_enter(&zfsdev_state_lock); - if ((zv = zvol_minor_lookup(name)) == NULL) { - mutex_exit(&zfsdev_state_lock); - return (SET_ERROR(ENXIO)); - } - rc = zvol_remove_zv(zv); - mutex_exit(&zfsdev_state_lock); - return (rc); -} - -int zvol_first_open(zvol_state_t *zv) { dmu_object_info_t doi; @@ -975,7 +972,7 @@ zvol_update_volsize(objset_t *os, uint64_t volsize) } void -zvol_remove_minors(const char *name) +zvol_remove_minors_impl(const char *name) { #ifdef illumos zvol_state_t *zv; @@ -1003,7 +1000,6 @@ zvol_remove_minors(const char *name) namelen = strlen(name); - DROP_GIANT(); mutex_enter(&zfsdev_state_lock); LIST_FOREACH_SAFE(zv, &all_zvols, zv_links, tzv) { @@ -1016,7 +1012,6 @@ zvol_remove_minors(const char *name) } mutex_exit(&zfsdev_state_lock); - PICKUP_GIANT(); #endif /* illumos */ } @@ -2919,7 +2914,7 @@ zvol_create_snapshots(objset_t *os, const char *name) } int -zvol_create_minors(const char *name) +zvol_create_minors_impl(const char *name) { uint64_t cookie; objset_t *os; @@ -2975,7 +2970,7 @@ zvol_create_minors(const char *name) while (dmu_dir_list_next(os, MAXPATHLEN - (p - osname), p, NULL, &cookie) == 0) { dmu_objset_rele(os, FTAG); - (void)zvol_create_minors(osname); + (void)zvol_create_minors_impl(osname); if ((error = dmu_objset_hold(name, FTAG, &os)) != 0) { printf("ZFS WARNING: Unable to put hold on %s (error=%d).\n", name, error); @@ -3044,7 +3039,7 @@ zvol_rename_minor(zvol_state_t *zv, const char *newnam } void -zvol_rename_minors(const char *oldname, const char *newname) +zvol_rename_minors_impl(const char *oldname, const char *newname) { char name[MAXPATHLEN]; struct g_provider *pp; @@ -3057,7 +3052,6 @@ zvol_rename_minors(const char *oldname, const char *ne oldnamelen = strlen(oldname); newnamelen = strlen(newname); - DROP_GIANT(); /* See comment in zvol_open(). */ if (!MUTEX_HELD(&zfsdev_state_lock)) { mutex_enter(&zfsdev_state_lock); @@ -3079,7 +3073,88 @@ zvol_rename_minors(const char *oldname, const char *ne if (locked) mutex_exit(&zfsdev_state_lock); - PICKUP_GIANT(); +} + +static zvol_task_t * +zvol_task_alloc(zvol_async_op_t op, const char *name1, const char *name2) +{ + zvol_task_t *task; + char *delim; + + task = kmem_zalloc(sizeof (zvol_task_t), KM_SLEEP); + task->op = op; + delim = strchr(name1, '/'); + strlcpy(task->pool, name1, delim ? (delim - name1 + 1) : MAXNAMELEN); + + strlcpy(task->name1, name1, MAXNAMELEN); + if (name2 != NULL) + strlcpy(task->name2, name2, MAXNAMELEN); + + return (task); +} + +static void +zvol_task_free(zvol_task_t *task) +{ + kmem_free(task, sizeof (zvol_task_t)); +} + +/* + * The worker thread function performed asynchronously. + */ +static void +zvol_task_cb(void *param) +{ + zvol_task_t *task = (zvol_task_t *)param; + + switch (task->op) { + case ZVOL_ASYNC_CREATE_MINORS: + (void) zvol_create_minors_impl(task->name1); + break; + case ZVOL_ASYNC_REMOVE_MINORS: + zvol_remove_minors_impl(task->name1); + break; + case ZVOL_ASYNC_RENAME_MINORS: + zvol_rename_minors_impl(task->name1, task->name2); + break; + default: + VERIFY(0); + break; + } + + zvol_task_free(task); +} + +static void +zvol_minors_helper(spa_t *spa, zvol_async_op_t op, const char *name1, + const char *name2) +{ + zvol_task_t *task; + + if (dataset_name_hidden(name1)) + return; + if (name2 != NULL && dataset_name_hidden(name2)) + return; + task = zvol_task_alloc(op, name1, name2); + (void)taskq_dispatch(spa->spa_zvol_taskq, zvol_task_cb, task, TQ_SLEEP); +} + +void +zvol_create_minors(spa_t *spa, const char *name) +{ + zvol_minors_helper(spa, ZVOL_ASYNC_CREATE_MINORS, name, NULL); +} + +void +zvol_remove_minors(spa_t *spa, const char *name) +{ + zvol_minors_helper(spa, ZVOL_ASYNC_REMOVE_MINORS, name, NULL); +} + +void +zvol_rename_minors(spa_t *spa, const char *oldname, const char *newname) +{ + zvol_minors_helper(spa, ZVOL_ASYNC_RENAME_MINORS, oldname, newname); } static int From owner-svn-src-all@freebsd.org Fri Aug 28 15:09:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD4D83B4551; Fri, 28 Aug 2020 15:09:43 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdNLH51Hmz3SvB; Fri, 28 Aug 2020 15:09: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 8F0C616C1F; Fri, 28 Aug 2020 15:09:43 +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 07SF9hGP002269; Fri, 28 Aug 2020 15:09:43 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SF9h8C002268; Fri, 28 Aug 2020 15:09:43 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008281509.07SF9h8C002268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 28 Aug 2020 15:09:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364918 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 364918 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 15:09:43 -0000 Author: imp Date: Fri Aug 28 15:09:43 2020 New Revision: 364918 URL: https://svnweb.freebsd.org/changeset/base/364918 Log: remove splbio and splcam splbio and splcan have been completely removed from the tree. We can now remove their definitions here. They've been nops for a long time and were only preserved to give hints on how to lock drivers. All drivers have been deleted or converted, so they can be deleted now. Modified: head/sys/sys/systm.h Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Fri Aug 28 13:15:13 2020 (r364917) +++ head/sys/sys/systm.h Fri Aug 28 15:09:43 2020 (r364918) @@ -497,8 +497,6 @@ void kern_reboot(int) __dead2; void shutdown_nice(int); /* Stubs for obsolete functions that used to be for interrupt management */ -static __inline intrmask_t splbio(void) { return 0; } -static __inline intrmask_t splcam(void) { return 0; } static __inline intrmask_t splclock(void) { return 0; } static __inline intrmask_t splhigh(void) { return 0; } static __inline intrmask_t splimp(void) { return 0; } From owner-svn-src-all@freebsd.org Fri Aug 28 15:35:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C8B33B518E; Fri, 28 Aug 2020 15:35:47 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdNwM0xLhz3VCb; Fri, 28 Aug 2020 15:35:47 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F31B516ED9; Fri, 28 Aug 2020 15:35:46 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07SFZkJW020312; Fri, 28 Aug 2020 15:35:46 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SFZjKb020308; Fri, 28 Aug 2020 15:35:45 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <202008281535.07SFZjKb020308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 28 Aug 2020 15:35:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364919 - in head/bin/sh: . tests/execution X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in head/bin/sh: . tests/execution X-SVN-Commit-Revision: 364919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 15:35:47 -0000 Author: jilles Date: Fri Aug 28 15:35:45 2020 New Revision: 364919 URL: https://svnweb.freebsd.org/changeset/base/364919 Log: sh: Keep ignored SIGINT/SIGQUIT after set in a background job If job control is not enabled, a background job (... &) ignores SIGINT and SIGQUIT, but this can be reverted using the trap builtin in the same shell environment. Using the set builtin to change options would also revert SIGINT and SIGQUIT to their previous dispositions. This broke due to r317298. Calling setsignal() reverts the effect of ignoresig(). Reported by: bdrewery MFC after: 1 week Added: head/bin/sh/tests/execution/bg13.0 (contents, props changed) Modified: head/bin/sh/main.c head/bin/sh/tests/execution/Makefile head/bin/sh/trap.c head/bin/sh/trap.h Modified: head/bin/sh/main.c ============================================================================== --- head/bin/sh/main.c Fri Aug 28 15:09:43 2020 (r364918) +++ head/bin/sh/main.c Fri Aug 28 15:35:45 2020 (r364919) @@ -134,6 +134,7 @@ main(int argc, char *argv[]) setstackmark(&smark); setstackmark(&smark2); procargs(argc, argv); + trap_init(); pwd_init(iflag); INTON; if (iflag) Modified: head/bin/sh/tests/execution/Makefile ============================================================================== --- head/bin/sh/tests/execution/Makefile Fri Aug 28 15:09:43 2020 (r364918) +++ head/bin/sh/tests/execution/Makefile Fri Aug 28 15:35:45 2020 (r364919) @@ -19,6 +19,7 @@ ${PACKAGE}FILES+= bg9.0 ${PACKAGE}FILES+= bg10.0 bg10.0.stdout ${PACKAGE}FILES+= bg11.0 ${PACKAGE}FILES+= bg12.0 +${PACKAGE}FILES+= bg13.0 ${PACKAGE}FILES+= env1.0 ${PACKAGE}FILES+= fork1.0 ${PACKAGE}FILES+= fork2.0 Added: head/bin/sh/tests/execution/bg13.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/execution/bg13.0 Fri Aug 28 15:35:45 2020 (r364919) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +T=`mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXXXX` +trap 'rm -rf $T' 0 +cd $T || exit 3 +mkfifo fifo1 +# Use a trap, not the default action, since the shell may catch SIGINT and +# therefore its processing may be delayed. +{ set -C; trap 'exit 5' TERM; read dummy fifo1 +kill -INT "$!" +kill -TERM "$!" +exec 3>&- +wait "$!" +r=$? +[ "$r" = 5 ] Modified: head/bin/sh/trap.c ============================================================================== --- head/bin/sh/trap.c Fri Aug 28 15:09:43 2020 (r364918) +++ head/bin/sh/trap.c Fri Aug 28 15:35:45 2020 (r364919) @@ -474,14 +474,20 @@ dotrap(void) } +void +trap_init(void) +{ + setsignal(SIGINT); + setsignal(SIGQUIT); +} + + /* * Controls whether the shell is interactive or not based on iflag. */ void setinteractive(void) { - setsignal(SIGINT); - setsignal(SIGQUIT); setsignal(SIGTERM); } Modified: head/bin/sh/trap.h ============================================================================== --- head/bin/sh/trap.h Fri Aug 28 15:09:43 2020 (r364918) +++ head/bin/sh/trap.h Fri Aug 28 15:35:45 2020 (r364919) @@ -45,6 +45,7 @@ void ignoresig(int); int issigchldtrapped(void); void onsig(int); void dotrap(void); +void trap_init(void); void setinteractive(void); void exitshell(int) __dead2; void exitshell_savedstatus(void) __dead2; From owner-svn-src-all@freebsd.org Fri Aug 28 15:43:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 85C153B51B5; Fri, 28 Aug 2020 15:43:33 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdP5K2wwpz3VrH; Fri, 28 Aug 2020 15:43:33 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from Ryans-MBP.attlocal.net (unknown [IPv6:2600:1700:358a:c660:44b0:df85:5e43:f180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: freqlabs/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 0FCED36E92; Fri, 28 Aug 2020 15:43:33 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Subject: Re: svn commit: r364863 - head To: Harry Schmalzbauer , Ryan Moeller , Kyle Evans , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202008271326.07RDQbGd016044@repo.freebsd.org> From: Ryan Moeller Message-ID: <1e71689e-5dca-f5cc-bc3a-177b45621431@FreeBSD.org> Date: Fri, 28 Aug 2020 11:43:32 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 15:43:33 -0000 On 8/28/20 8:51 AM, Harry Schmalzbauer wrote: > Am 27.08.2020 um 15:26 schrieb Ryan Moeller: >> Author: freqlabs >> Date: Thu Aug 27 13:26:36 2020 >> New Revision: 364863 >> URL: https://svnweb.freebsd.org/changeset/base/364863 >> >> Log: >>    libzfs: Also add the crypto dependency to Makefile.inc1 >>       Reported by:    kevans >>    Discussed with:    kevans >>    Sponsored by:    iXsystems, Inc. >> >> Modified: >>    head/Makefile.inc1 > > > Hello, > > this still doesn't allwo me to compile ZFS into the kernel: > linking kernel.full > ld: error: undefined symbol: zfs_zstd_compress > >>> referenced by zio_compress.c > >>>               zio_compress.o:(zio_compress_table) > > ld: error: undefined symbol: zfs_zstd_decompress > >>> referenced by zio_compress.c > >>>               zio_compress.o:(zio_compress_table) > > ld: error: undefined symbol: zfs_zstd_decompress_level > >>> referenced by zio_compress.c > >>>               zio_compress.o:(zio_compress_table) > *** Error code 1 > > According to src/sys/amd64/conf/NOTES, "options ZFS" should still be > supported. > Unfortunately I have no adhoc idea how to fix. Anybody else? You need options ZSTDIO, too. NOTES needs to be updated. -Ryan > > Thanks, > -harry From owner-svn-src-all@freebsd.org Fri Aug 28 16:26:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD7B13B673C; Fri, 28 Aug 2020 16:26:04 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdQ2M02hjz3YvQ; Fri, 28 Aug 2020 16:26:02 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (ezra.dcm1.omnilan.net [78.138.80.135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id 07SGPwED018368; Fri, 28 Aug 2020 18:25:58 +0200 (CEST) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id F0DE5F9E; Fri, 28 Aug 2020 18:25:57 +0200 (CEST) Subject: Re: svn commit: r364863 - head To: Ryan Moeller , Kyle Evans , svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <202008271326.07RDQbGd016044@repo.freebsd.org> <1e71689e-5dca-f5cc-bc3a-177b45621431@FreeBSD.org> From: Harry Schmalzbauer Organization: OmniLAN Message-ID: <1003ad68-5339-789c-1451-f26ff2a31606@omnilan.de> Date: Fri, 28 Aug 2020 18:25:56 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1e71689e-5dca-f5cc-bc3a-177b45621431@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: ACL 136 matched, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [78.138.80.130]); Fri, 28 Aug 2020 18:25:58 +0200 (CEST) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: 78.138.80.135; Sender-helo: mh0.gentlemail.de; ) X-Rspamd-Queue-Id: 4BdQ2M02hjz3YvQ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@omnilan.de designates 2a00:e10:2800::a130 as permitted sender) smtp.mailfrom=freebsd@omnilan.de X-Spamd-Result: default: False [-2.19 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+mx]; DMARC_NA(0.00)[omnilan.de]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-0.92)[-0.920]; NEURAL_HAM_LONG(-0.97)[-0.966]; NEURAL_HAM_SHORT(-0.00)[-0.005]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:61157, ipnet:2a00:e10:2800::/38, country:DE]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 16:26:04 -0000 Am 28.08.2020 um 17:43 schrieb Ryan Moeller: … >> ld: error: undefined symbol: zfs_zstd_decompress_level >> >>> referenced by zio_compress.c >> >>>               zio_compress.o:(zio_compress_table) >> *** Error code 1 >> >> According to src/sys/amd64/conf/NOTES, "options ZFS" should still be >> supported. >> Unfortunately I have no adhoc idea how to fix. Anybody else? > > > You need options ZSTDIO, too. NOTES needs to be updated. Thanks a lot! May I suggest the following change: Index: sys/contrib/openzfs/man/man8/zfsprops.8 =================================================================== --- sys/contrib/openzfs/man/man8/zfsprops.8 (Revision 364900) +++ sys/contrib/openzfs/man/man8/zfsprops.8 (Arbeitskopie) @@ -1049,8 +1049,9 @@ dataset creation time and it cannot be changed afterwards. .Pp For more details and caveats about encryption see the -.Sy Encryption -section. +.Em Encryption +section of +.Xr zfs-load-key 8 . .It Sy keyformat Ns = Ns Sy raw Ns | Ns Sy hex Ns | Ns Sy passphrase Controls what format the user's encryption key will be provided as. This property is only set when the dataset is encrypted. Curious about the new OpenZFS bells and whistles, I promptly struggeld over finding "the Encryption section". Some lines above, the man page already mentiones explicitly zfs-load-key.8 while referencing the Encryption section, so I just copied the macros used there - not much clue about man here… Thanks, -harry From owner-svn-src-all@freebsd.org Fri Aug 28 16:40:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 845033B73B3; Fri, 28 Aug 2020 16:40: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdQM631W1z3bLV; Fri, 28 Aug 2020 16:40:34 +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 4C6B7175DE; Fri, 28 Aug 2020 16:40:34 +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 07SGeYr0058101; Fri, 28 Aug 2020 16:40:34 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SGeXTb058099; Fri, 28 Aug 2020 16:40:33 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008281640.07SGeXTb058099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 28 Aug 2020 16:40:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364920 - in head/sys: dev/speaker sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: dev/speaker sys X-SVN-Commit-Revision: 364920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 16:40:34 -0000 Author: imp Date: Fri Aug 28 16:40:33 2020 New Revision: 364920 URL: https://svnweb.freebsd.org/changeset/base/364920 Log: Remove splclock(). It's not useful to keep. splclock is used in one driver (spkr) to control access to timer_spkr_* routines. However, nothing else does. So it shows no useful locking info to someone that would want to lock spkr. NOTE: I think there's races with timer_spkr_{acquire,release} since there's no interlock in those routines, despite there being a spin lock to protect the clock. Current other users appear to use no extra locking protocol, though they themselves appear to be at least attempting to make sure that only a single thread calls these routines. I suspect the right answer is to update these routines to take/release the clock spin lock since they are short and to the point, but that's beyond the scope of this commit. Modified: head/sys/dev/speaker/spkr.c head/sys/sys/systm.h Modified: head/sys/dev/speaker/spkr.c ============================================================================== --- head/sys/dev/speaker/spkr.c Fri Aug 28 15:35:45 2020 (r364919) +++ head/sys/dev/speaker/spkr.c Fri Aug 28 16:40:33 2020 (r364920) @@ -65,7 +65,7 @@ static void playstring(char *cp, size_t slen); static void tone(unsigned int thz, unsigned int centisecs) { - int sps, timo; + int timo; if (thz <= 0) return; @@ -75,14 +75,10 @@ tone(unsigned int thz, unsigned int centisecs) #endif /* DEBUG */ /* set timer to generate clicks at given frequency in Hertz */ - sps = splclock(); - if (timer_spkr_acquire()) { /* enter list of waiting procs ??? */ - splx(sps); return; } - splx(sps); disable_intr(); timer_spkr_setfreq(thz); enable_intr(); @@ -95,9 +91,7 @@ tone(unsigned int thz, unsigned int centisecs) timo = centisecs * hz / 100; if (timo > 0) tsleep(&endtone, SPKRPRI | PCATCH, "spkrtn", timo); - sps = splclock(); timer_spkr_release(); - splx(sps); } /* Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Fri Aug 28 15:35:45 2020 (r364919) +++ head/sys/sys/systm.h Fri Aug 28 16:40:33 2020 (r364920) @@ -497,7 +497,6 @@ void kern_reboot(int) __dead2; void shutdown_nice(int); /* Stubs for obsolete functions that used to be for interrupt management */ -static __inline intrmask_t splclock(void) { return 0; } static __inline intrmask_t splhigh(void) { return 0; } static __inline intrmask_t splimp(void) { return 0; } static __inline intrmask_t splnet(void) { return 0; } From owner-svn-src-all@freebsd.org Fri Aug 28 16:40:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD1EF3B7277; Fri, 28 Aug 2020 16:40:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdQMC3833z3bJk; Fri, 28 Aug 2020 16:40:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E59717DBC; Fri, 28 Aug 2020 16:40:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07SGedXg058161; Fri, 28 Aug 2020 16:40:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SGedQU058160; Fri, 28 Aug 2020 16:40:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202008281640.07SGedQU058160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 28 Aug 2020 16:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364921 - in stable: 11/usr.sbin/fifolog/lib 12/usr.sbin/fifolog/lib X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 11/usr.sbin/fifolog/lib 12/usr.sbin/fifolog/lib X-SVN-Commit-Revision: 364921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 16:40:39 -0000 Author: gjb Date: Fri Aug 28 16:40:38 2020 New Revision: 364921 URL: https://svnweb.freebsd.org/changeset/base/364921 Log: MFC r362718 (adrian): [fifolog] wrap the recno when we hit the end of the provided file size. Without this the log just keeps growing to infinity. Reported by: phk Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: stable/12/usr.sbin/fifolog/lib/fifolog_write_poll.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/fifolog/lib/fifolog_write_poll.c Directory Properties: stable/11/ (props changed) Modified: stable/12/usr.sbin/fifolog/lib/fifolog_write_poll.c ============================================================================== --- stable/12/usr.sbin/fifolog/lib/fifolog_write_poll.c Fri Aug 28 16:40:33 2020 (r364920) +++ stable/12/usr.sbin/fifolog/lib/fifolog_write_poll.c Fri Aug 28 16:40:38 2020 (r364921) @@ -239,6 +239,14 @@ fifolog_write_output(struct fifolog_writer *f, int fl, */ f->seq++; f->recno++; + + /* + * Ensure we wrap recno once we hit the file size (in records.) + */ + if (f->recno >= f->ff->logsize) + /* recno 0 is header; skip */ + f->recno = 1; + f->flag = 0; memset(f->obuf, 0, f->obufsize); From owner-svn-src-all@freebsd.org Fri Aug 28 16:40:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B0FF3B72F0; Fri, 28 Aug 2020 16:40:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdQMC1pbxz3bLj; Fri, 28 Aug 2020 16:40:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 17B4E175E0; Fri, 28 Aug 2020 16:40:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07SGecGm058155; Fri, 28 Aug 2020 16:40:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SGecX2058154; Fri, 28 Aug 2020 16:40:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202008281640.07SGecX2058154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 28 Aug 2020 16:40: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: r364921 - in stable: 11/usr.sbin/fifolog/lib 12/usr.sbin/fifolog/lib X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 11/usr.sbin/fifolog/lib 12/usr.sbin/fifolog/lib X-SVN-Commit-Revision: 364921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 16:40:39 -0000 Author: gjb Date: Fri Aug 28 16:40:38 2020 New Revision: 364921 URL: https://svnweb.freebsd.org/changeset/base/364921 Log: MFC r362718 (adrian): [fifolog] wrap the recno when we hit the end of the provided file size. Without this the log just keeps growing to infinity. Reported by: phk Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: stable/11/usr.sbin/fifolog/lib/fifolog_write_poll.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.sbin/fifolog/lib/fifolog_write_poll.c Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.sbin/fifolog/lib/fifolog_write_poll.c ============================================================================== --- stable/11/usr.sbin/fifolog/lib/fifolog_write_poll.c Fri Aug 28 16:40:33 2020 (r364920) +++ stable/11/usr.sbin/fifolog/lib/fifolog_write_poll.c Fri Aug 28 16:40:38 2020 (r364921) @@ -239,6 +239,14 @@ fifolog_write_output(struct fifolog_writer *f, int fl, */ f->seq++; f->recno++; + + /* + * Ensure we wrap recno once we hit the file size (in records.) + */ + if (f->recno >= f->ff->logsize) + /* recno 0 is header; skip */ + f->recno = 1; + f->flag = 0; memset(f->obuf, 0, f->obufsize); From owner-svn-src-all@freebsd.org Fri Aug 28 17:05:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B40F3B85E1; Fri, 28 Aug 2020 17:05:08 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdQvR5BCHz3fHb; Fri, 28 Aug 2020 17:05:07 +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 5B97017E7E; Fri, 28 Aug 2020 17:05:07 +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 07SH57D3076801; Fri, 28 Aug 2020 17:05:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SH57Jj076800; Fri, 28 Aug 2020 17:05:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008281705.07SH57Jj076800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 28 Aug 2020 17:05:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364922 - head/sys/dev/mn X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/mn X-SVN-Commit-Revision: 364922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 17:05:08 -0000 Author: imp Date: Fri Aug 28 17:05:06 2020 New Revision: 364922 URL: https://svnweb.freebsd.org/changeset/base/364922 Log: Update outdated comment There is no splnet anymore, so update the comment to drop references to it. Modified: head/sys/dev/mn/if_mn.c Modified: head/sys/dev/mn/if_mn.c ============================================================================== --- head/sys/dev/mn/if_mn.c Fri Aug 28 16:40:38 2020 (r364921) +++ head/sys/dev/mn/if_mn.c Fri Aug 28 17:05:06 2020 (r364922) @@ -743,7 +743,7 @@ ngmn_connect(hook_p hook) if (!(u & 1)) printf("%s: init chan %d stat %08x\n", sc->name, chan, u); sc->m32x->stat = 1; - /* probably not at splnet, force outward queueing */ + /* force outward queueing */ NG_HOOK_FORCE_QUEUE(NG_HOOK_PEER(hook)); return (0); From owner-svn-src-all@freebsd.org Fri Aug 28 17:06:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 909813B8673; Fri, 28 Aug 2020 17:06:36 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdQx82txvz3fDm; Fri, 28 Aug 2020 17:06:36 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4690E18481; Fri, 28 Aug 2020 17:06:36 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07SH6agd076963; Fri, 28 Aug 2020 17:06:36 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SH6Zo3076962; Fri, 28 Aug 2020 17:06:35 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008281706.07SH6Zo3076962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Fri, 28 Aug 2020 17:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364923 - in head/sys: amd64/conf conf X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: amd64/conf conf X-SVN-Commit-Revision: 364923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 17:06:36 -0000 Author: mmacy Date: Fri Aug 28 17:06:35 2020 New Revision: 364923 URL: https://svnweb.freebsd.org/changeset/base/364923 Log: ZFS: clarify dependencies for static linking Modified: head/sys/amd64/conf/NOTES head/sys/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Fri Aug 28 17:05:06 2020 (r364922) +++ head/sys/amd64/conf/NOTES Fri Aug 28 17:06:35 2020 (r364923) @@ -635,6 +635,7 @@ options LINSYSFS ##################################################################### # ZFS support +# NB: This depends on crypto, cryptodev and ZSTDIO options ZFS ##################################################################### Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Fri Aug 28 17:05:06 2020 (r364922) +++ head/sys/conf/NOTES Fri Aug 28 17:06:35 2020 (r364923) @@ -2807,7 +2807,8 @@ options IMAGACT_BINMISC options GZIO # zstd support -# This enables support for Zstd compressed core dumps and GEOM_UZIP images. +# This enables support for Zstd compressed core dumps, GEOM_UZIP images, +# and is required by zfs if statically linked. options ZSTDIO # BHND(4) drivers From owner-svn-src-all@freebsd.org Fri Aug 28 17:11:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AAABE3B8AAE for ; Fri, 28 Aug 2020 17:11:19 +0000 (UTC) (envelope-from bounce.L12170S116983M31471@panel.portabilidadesmovil.com) Received: from 185139.pf07.portabilidadesmovil.com (185139.pf07.portabilidadesmovil.com [179.60.185.139]) by mx1.freebsd.org (Postfix) with ESMTP id 4BdR2Z5z1xz3ft3 for ; Fri, 28 Aug 2020 17:11:18 +0000 (UTC) (envelope-from bounce.L12170S116983M31471@panel.portabilidadesmovil.com) Date: Fri, 28 Aug 2020 13:51:14 -0300 To: svn-src-all@freebsd.org From: =?utf-8?Q?Romina_Mart=C3=ADnez_-_Movistar_Negocios?= Reply-To: comercial@portabilidadesmoviles.com Subject: Movistar Negocios | Portabilidad - 70% OFF en todos los planes Message-ID: X-Mailer: FMMailer v3 X-Data: ZXxzdm4tc3JjLWFsbEBmcmVlYnNkLm9yZ3w= X-Fid: eGZpZC1zdm4tc3JjLWFsbEBmcmVlYnNkLm9yZy0zMTQ3MS0xMjE3MC0xMTY5ODMtNDM3LXBhbmVsLnBvcnRhYmlsaWRhZGVzbW92aWwuY29t X-fmbh: c3ZuLXNyYy1hbGxAZnJlZWJzZC5vcmc7MzE0NzE7MTIxNzA7MTE2OTgzOzQzNw== X-bhid: X-bhd: 31471;12170;116983 X-AntiAbuse: abuse@outservices.net Precedence: bulk Feedback-ID: 31471:12170s116983:125099:WPservicesESP X-Transport: 185139tecsid MIME-Version: 1.0 DKIM-Signature: v=1; d=panel.portabilidadesmovil.com; s=fm; a=rsa-sha256; q=dns/txt; t=1598633474; c=relaxed/simple; h=Date:To:From:Reply-To:Subject:Message-ID:X-Mailer:X-Data:X-Fid:X-fmbh:List-Unsubscribe:X-AntiAbuse:Feedback-ID:List-ID:MIME-Version:Content-Type; z=Date:Fri,=2028=20Aug=202020=2013:51:14=20-0300 |To:svn-src-all@freebsd.org |From:=3D?utf-8?Q?Romina_Mart=3DC3=3DADnez_-_Movistar_Negocios?=3D=20 |Reply-To:comercial@portabilidadesmoviles.com |Subject:Movistar=20Negocios=20=7C=20Portabilidad=20-=2070%=20OFF=20en=20t odos=20los=20planes |Message-ID: |X-Mailer:FMMailer=20v3 |X-Data:ZXxzdm4tc3JjLWFsbEBmcmVlYnNkLm9yZ3w=3D |X-Fid:eGZpZC1zdm4tc3JjLWFsbEBmcmVlYnNkLm9yZy0zMTQ3MS0xMjE3MC0xMTY5ODMtNDM 3LXBhbmVsLnBvcnRhYmlsaWRhZGVzbW92aWwuY29t |X-fmbh:c3ZuLXNyYy1hbGxAZnJlZWJzZC5vcmc7MzE0NzE7MTIxNzA7MTE2OTgzOzQzNw=3D= 3D |List-Unsubscribe: |X-AntiAbuse:abuse@outservices.net |Feedback-ID:31471:12170s116983:125099:WPservicesESP |List-ID:<146040:2105694> |MIME-Version:1.0 |Content-Type:multipart/alternative=3B=20boundary=3D"b1_SUA3gh9FuT1mBZdUal ndXglw9SBR234QJZqKVkfuk"; bh=rUCGZHqmlOnu8mic3sNDK+k1YbnLXVcPjL/8BH/ax+c=; b=otM5NLps/ABsBq89WHamGz+B82/NhFN0fgbOzx096Jyw49OfbLzOCRQaNyXy9YtceMTIkLwim s7o5hcRCWbQTybS1rG5bG/qiMA0IUMeYkOXDtx1xeNZunpoMZteqnErSMwf5v5nwwBPEjFi2r S5n3q+OT3dtWWn3wGE0bhY+RI= X-Spamd-Bar: ++++++++++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=panel.portabilidadesmovil.com header.s=fm header.b=otM5NLps; dmarc=none; spf=pass (mx1.freebsd.org: domain of bounce.L12170S116983M31471@panel.portabilidadesmovil.com designates 179.60.185.139 as permitted sender) smtp.mailfrom=bounce.L12170S116983M31471@panel.portabilidadesmovil.com X-Rspamd-Fuzzy: f32015afef19ebc252ab26811ab65d26738afc31790f53e8722bafeaf17b5d2d1721b64e3dcd5828d6e884487b7c57b09f7a93a43b464b76e1feef2a76b3d026 X-Rspamd-Fuzzy: a2206319a6afb829de5e8bb979779eedb7d8e26ec5fd18ff10ee30185d3c978cfc3e5c8c5dfd930cf5628c87482c83de33349a1c439526778d0809f66594326a X-Spamd-Result: default: False [14.26 / 15.00]; HAS_REPLYTO(0.00)[comercial@portabilidadesmoviles.com]; R_SPF_ALLOW(0.00)[+ip4:179.60.184.0/21:c]; TO_DN_NONE(0.00)[]; FUZZY_DENIED(10.51)[1:f32015afef:1.00:txt,1:a2206319a6:0.81:txt]; DKIM_TRACE(0.00)[panel.portabilidadesmovil.com:+]; FORGED_SENDER(0.30)[romina.martinez@portabilidadesmovil.com,bounce.L12170S116983M31471@panel.portabilidadesmovil.com]; HAS_X_ANTIABUSE(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_MIXED_CHARSET(0.52)[]; ASN(0.00)[asn:20207, ipnet:179.60.184.0/21, country:AR]; FROM_NEQ_ENVFROM(0.00)[romina.martinez@portabilidadesmovil.com,bounce.L12170S116983M31471@panel.portabilidadesmovil.com]; ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[panel.portabilidadesmovil.com:s=fm]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PRECEDENCE_BULK(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; HAS_PHPMAILER_SIG(0.00)[]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; BAD_REP_POLICIES(0.10)[]; NEURAL_SPAM_MEDIUM(0.98)[0.985]; DMARC_NA(0.00)[portabilidadesmovil.com]; NEURAL_SPAM_SHORT(0.94)[0.940]; NEURAL_SPAM_LONG(1.01)[1.012]; GREYLIST(0.00)[pass,body]; MAILMAN_DEST(0.00)[svn-src-all] X-Rspamd-Queue-Id: 4BdR2Z5z1xz3ft3 X-Spam: Yes Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 List-Id: "SVN commit messages 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, 28 Aug 2020 17:11:19 -0000 =0ANewsletter=0A=0A=0A=0A=0A=0A =0A =0A =0A =0A =0A=0AEleg=C3=AD el mejo= r plan para tu negocio=0A=0A =0A=0AEstimados, buenos d=C3=ADas.=0A=0AS= oy Romina Martinez de Movistar Negocios.=0A=0ASi actualmente tenes una pyme= , un comercio o sos profesional seguramente est=C3=A9s tratando de producir= m=C3=A1s y de bajar todos los costos posibles. =0A=0AEn ese contexto,= y si les parece bien,  me gustar=C3=ADa poder enviarles un presupuest= o sin ningun tipo de compromiso para que puedan comparar con su proveedor a= ctual. =0A=0AEs importante destacar que si decidieran traer sus l= =C3=ADneas a Movistar obetendr=C3=ADan el 70% de descuento sobre todos= nuestros planes durante 12 meses. =0A=0ASi estuvieran interesados en = analizar nuestra propuesta, ser=C3=ADa bueno saber: =0A=0A - = ;Cantidad de l=C3=ADneas (aprox).=0A=0A - Tel=C3=A9fono de contac= to.=0A=0A - Compa=C3=B1ia actual.=0A=0ATramite 100% digital sin m= overte desde tu casa. En ning=C3=BAn momento se quedan incomunicados, recib= en los chips en el domicilio indicado. =0A=0A =0A=0APasate a Movi= star y obten=C3=A9 los mejores beneficios para tu empresa o negocio.=0A=0A&= nbsp;=0A=0A=0A=0A =0A =0A Planes con el 70% de descuento ya aplicado=0A =0A= =0A =0A =0A 1 GB=0A 3 GB=0A 5 GB=0A 7 GB=0A 10 GB=0A 30 GB=0A =0A =0A =0A = =0A $155/mes=0A $ 228/mes=0A $ 318/mes=0A $ 429/mes=0A $ 540/mes=0A $ 1005/= mes=0A =0A =0A =0A =0A Precio vigente con descuento. Precio m=C3=A1s Impues= tos.=0A =0A =0A HABL=C3=81=0A Llamadas ilimitadas a todos los movistar=0A = =0A =0A 10.000 minutos a otras compa=C3=B1ias=0A =0A =0A MENSAJE=C3=81=0A W= hatsApp Gratis=0A =0A =0A 5.000 SMS=0A =0A =0A NOVEDAD=0A =0A Ahora con los= planes Movistar pod=C3=A9s=0A PASAR gigas =0A =C2=A1GRATIS!=0A = =0A Ahora con los planes Movistar pod=C3=A9s=0A PASAR gigas =0A = =C2=A1GRATIS!=0A =0A Ahora con los planes Movistar pod=C3=A9s=0A PASAR = ;gigas =0A =C2=A1GRATIS!=0A =0A Ahora con los planes Movistar pod= =C3=A9s=0A PASAR gigas =0A =C2=A1GRATIS!=0A Roaming en el mundo s= in cargo adicional.=0A =0A =0A=0A=0ALos precios est=C3=A1n expresados en pe= sos Argentinos y son m=C3=A1s impuestos, los cuales dependen de la condici= =C3=B3n tributaria de cada cliente. Promoci=C3=B3n v=C3=A1lida para la Rep= =C3=BAblica Argentina. Promoci=C3=B3n por tiempo limitado. Promoci=C3=B3n e= xclusiva para l=C3=ADneas de portabilidad o alta de l=C3=ADnea nueva. Los p= recios expresados cuentan con una bonificaci=C3=B3n del 70% sobre el precio= de lista vigente.=0A=0A=0A=0A=0A =0A =0A =0A =0A=0A=0A=0A=0A=0A=0A=0A=0A= =0A=0A=0APara remover su dirección de esta lista haga click aquí From owner-svn-src-all@freebsd.org Fri Aug 28 17:36:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E6A73B94C8; Fri, 28 Aug 2020 17:36:15 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdRbL6d5vz3ynJ; Fri, 28 Aug 2020 17:36:14 +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 C6D8F1864E; Fri, 28 Aug 2020 17:36:14 +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 07SHaEHC096076; Fri, 28 Aug 2020 17:36:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SHaEqE096075; Fri, 28 Aug 2020 17:36:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008281736.07SHaEqE096075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 28 Aug 2020 17:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364924 - head/stand X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand X-SVN-Commit-Revision: 364924 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 17:36:15 -0000 Author: imp Date: Fri Aug 28 17:36:14 2020 New Revision: 364924 URL: https://svnweb.freebsd.org/changeset/base/364924 Log: Create CFLAGS_EARLY.file for boot loader. Some external code requires a specific set of include paths to work properly since it emulates the typical environment the code is used in. Enable this by creating a CFLAGS_EARLY.file variable that can be used to build this stack. Otherwise the include stack we build for stand programs may get in the way. Code that uses this feature has to tolerate the normal stack of inclues being last on the list (and presumably unused), though. Generally, it it should only be used for the specific include directories. Defines and that sort of thing should be done in the normal CFLAGS variable. There is a global CFLAGS_EARY hook as well for everything in a Makefile. Modified: head/stand/defs.mk Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Fri Aug 28 17:06:35 2020 (r364923) +++ head/stand/defs.mk Fri Aug 28 17:36:14 2020 (r364924) @@ -55,6 +55,11 @@ LIBSA32= ${BOOTOBJ}/libsa32/libsa32.a # Standard options: CFLAGS+= -nostdinc +# Allow CFLAGS_EARLY.file/target so that code that needs specific stack +# of include paths can set them up before our include paths. Normally +# the only thing that should be there are -I directives, and as few of +# those as possible. +CFLAGS+= ${CFLAGS_EARLY} ${CFLAGS_EARLY.${.IMPSRC:T}} ${CFLAGS_EARLY.${.TARGET:T}} .if ${MACHINE_ARCH} == "amd64" && ${DO32:U0} == 1 CFLAGS+= -I${BOOTOBJ}/libsa32 .else From owner-svn-src-all@freebsd.org Fri Aug 28 17:49:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D33B93B9F2F; Fri, 28 Aug 2020 17:49:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdRv86x2xz41sJ; Fri, 28 Aug 2020 17:49:56 +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 A786D18A20; Fri, 28 Aug 2020 17:49:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07SHnuql002978; Fri, 28 Aug 2020 17:49:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SHnujY002977; Fri, 28 Aug 2020 17:49:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008281749.07SHnujY002977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 28 Aug 2020 17:49:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364925 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 364925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 17:50:01 -0000 Author: imp Date: Fri Aug 28 17:49:56 2020 New Revision: 364925 URL: https://svnweb.freebsd.org/changeset/base/364925 Log: Allow the pseudo-errnos to be returned as well in boot loader Expose the pseudo-errno values in _STANDALONE is defined so that code in the boot loader can make use of them. Nothing uses them today, but the zstd support that's coming will need them. Modified: head/sys/sys/errno.h Modified: head/sys/sys/errno.h ============================================================================== --- head/sys/sys/errno.h Fri Aug 28 17:36:14 2020 (r364924) +++ head/sys/sys/errno.h Fri Aug 28 17:49:56 2020 (r364925) @@ -187,7 +187,7 @@ __END_DECLS #define ELAST 97 /* Must be equal largest errno */ #endif /* _POSIX_SOURCE */ -#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) +#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) || defined(_STANDALONE) /* pseudo-errors returned inside kernel to modify return to process */ #define ERESTART (-1) /* restart syscall */ #define EJUSTRETURN (-2) /* don't modify regs, just return */ From owner-svn-src-all@freebsd.org Fri Aug 28 17:55:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D5CB3BA41C; Fri, 28 Aug 2020 17:55:55 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdS233jLGz42VZ; Fri, 28 Aug 2020 17:55:55 +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 6384D1867B; Fri, 28 Aug 2020 17:55:55 +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 07SHttkx008965; Fri, 28 Aug 2020 17:55:55 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SHttMO008964; Fri, 28 Aug 2020 17:55:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008281755.07SHttMO008964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 28 Aug 2020 17:55:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364926 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 364926 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 17:55:55 -0000 Author: imp Date: Fri Aug 28 17:55:54 2020 New Revision: 364926 URL: https://svnweb.freebsd.org/changeset/base/364926 Log: Treat the boot loader as the same as the kernel for what's visible The boot loader will be growing some (limited) support for some kernel interfaces for some of the timekeeping routines to support zstd code. Allow the declarations for them to be visible when compiling for the boot loader, rather than treating it like a user-space environment (which stand.h already provides to a limited degree). Modified: head/sys/sys/time.h Modified: head/sys/sys/time.h ============================================================================== --- head/sys/sys/time.h Fri Aug 28 17:49:56 2020 (r364925) +++ head/sys/sys/time.h Fri Aug 28 17:55:54 2020 (r364926) @@ -492,7 +492,7 @@ struct clockinfo { #define CPUCLOCK_WHICH_TID 1 #endif -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_STANDALONE) /* * Kernel to clock driver interface. @@ -600,7 +600,7 @@ int tvtohz(struct timeval *tv); (((sbt2) >= sbt_timethreshold) ? \ ((*(sbt) = getsbinuptime()), 1) : ((*(sbt) = sbinuptime()), 0)) -#else /* !_KERNEL */ +#else /* !_KERNEL && !_STANDALONE */ #include #include From owner-svn-src-all@freebsd.org Fri Aug 28 18:25:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FEA03BB154; Fri, 28 Aug 2020 18:25:46 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdShV2QtGz45sS; Fri, 28 Aug 2020 18:25:46 +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 3703A18ED5; Fri, 28 Aug 2020 18:25:46 +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 07SIPktB029647; Fri, 28 Aug 2020 18:25:46 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SIPkBa029646; Fri, 28 Aug 2020 18:25:46 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202008281825.07SIPkBa029646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 28 Aug 2020 18:25:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364927 - 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: 364927 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 18:25:46 -0000 Author: manu Date: Fri Aug 28 18:25:45 2020 New Revision: 364927 URL: https://svnweb.freebsd.org/changeset/base/364927 Log: arm: allwinner: clk: Add printfs when we cannot set the correct freq For some unknown reason this seems to fix this function when we printf the best variable. This isn't a delay problem as doing a printf without it doesn't solve this problem. This is way above my pay grade so add some printf that shouldn't be printed in 99% of the case anyway. Fix booting on most Allwinner boards as the mmc IP uses a NM clock. Reported by: Alexander Mishin MFC after: 3 days X-MFC-With: 363887 Modified: head/sys/arm/allwinner/clkng/aw_clk_nm.c Modified: head/sys/arm/allwinner/clkng/aw_clk_nm.c ============================================================================== --- head/sys/arm/allwinner/clkng/aw_clk_nm.c Fri Aug 28 17:55:54 2020 (r364926) +++ head/sys/arm/allwinner/clkng/aw_clk_nm.c Fri Aug 28 18:25:45 2020 (r364927) @@ -221,11 +221,15 @@ aw_clk_nm_set_freq(struct clknode *clk, uint64_t fpare if ((best < *fout) && ((flags & CLK_SET_ROUND_DOWN) == 0)) { *stop = 1; + printf("best freq (%llu) < requested freq(%llu)\n", + best, *fout); return (ERANGE); } if ((best > *fout) && ((flags & CLK_SET_ROUND_UP) == 0)) { *stop = 1; + printf("best freq (%llu) > requested freq(%llu)\n", + best, *fout); return (ERANGE); } From owner-svn-src-all@freebsd.org Fri Aug 28 18:41:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C56CE3BBAB7; Fri, 28 Aug 2020 18:41:39 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdT2q56RMz46fr; Fri, 28 Aug 2020 18:41:39 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79AC61958B; Fri, 28 Aug 2020 18:41:39 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07SIfdBf040429; Fri, 28 Aug 2020 18:41:39 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SIfS0B040376; Fri, 28 Aug 2020 18:41:28 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008281841.07SIfS0B040376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Fri, 28 Aug 2020 18:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r364928 - in vendor-sys/openzfs/dist: . cmd/zpool include include/os/freebsd/spl/sys include/sys/fs lib/libspl/include/os/freebsd/sys lib/libzfs man/man1 man/man5 man/man8 module module... X-SVN-Group: vendor-sys X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in vendor-sys/openzfs/dist: . cmd/zpool include include/os/freebsd/spl/sys include/sys/fs lib/libspl/include/os/freebsd/sys lib/libzfs man/man1 man/man5 man/man8 module module/lua/setjmp module/os/fre... X-SVN-Commit-Revision: 364928 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 18:41:39 -0000 Author: mmacy Date: Fri Aug 28 18:41:28 2020 New Revision: 364928 URL: https://svnweb.freebsd.org/changeset/base/364928 Log: update vendor openzfs to a00c61 (2.0-rc1) Added: vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_new_props.ksh Modified: vendor-sys/openzfs/dist/META vendor-sys/openzfs/dist/NEWS vendor-sys/openzfs/dist/cmd/zpool/zpool_main.c vendor-sys/openzfs/dist/include/libzfs_impl.h vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/acl_impl.h vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/cmn_err.h vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/extdirent.h vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/list.h vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/list_impl.h vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/zmod.h vendor-sys/openzfs/dist/include/sys/fs/zfs.h vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/mount.h vendor-sys/openzfs/dist/lib/libzfs/libzfs_sendrecv.c vendor-sys/openzfs/dist/lib/libzfs/libzfs_util.c vendor-sys/openzfs/dist/man/man1/arcstat.1 vendor-sys/openzfs/dist/man/man1/cstyle.1 vendor-sys/openzfs/dist/man/man1/raidz_test.1 vendor-sys/openzfs/dist/man/man1/zhack.1 vendor-sys/openzfs/dist/man/man1/ztest.1 vendor-sys/openzfs/dist/man/man5/spl-module-parameters.5 vendor-sys/openzfs/dist/man/man5/vdev_id.conf.5 vendor-sys/openzfs/dist/man/man5/zfs-events.5 vendor-sys/openzfs/dist/man/man5/zfs-module-parameters.5 vendor-sys/openzfs/dist/man/man5/zpool-features.5 vendor-sys/openzfs/dist/man/man8/fsck.zfs.8 vendor-sys/openzfs/dist/man/man8/mount.zfs.8 vendor-sys/openzfs/dist/man/man8/vdev_id.8 vendor-sys/openzfs/dist/man/man8/zed.8.in vendor-sys/openzfs/dist/man/man8/zfs-mount-generator.8.in vendor-sys/openzfs/dist/man/man8/zfs.8 vendor-sys/openzfs/dist/man/man8/zinject.8 vendor-sys/openzfs/dist/man/man8/zpool-iostat.8 vendor-sys/openzfs/dist/man/man8/zpool.8 vendor-sys/openzfs/dist/man/man8/zstreamdump.8 vendor-sys/openzfs/dist/module/Makefile.bsd vendor-sys/openzfs/dist/module/lua/setjmp/setjmp_ppc.S vendor-sys/openzfs/dist/module/os/freebsd/spl/list.c vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_ctldir.c vendor-sys/openzfs/dist/module/zcommon/zfs_fletcher.c vendor-sys/openzfs/dist/module/zfs/arc.c vendor-sys/openzfs/dist/module/zfs/dmu.c vendor-sys/openzfs/dist/module/zfs/dnode_sync.c vendor-sys/openzfs/dist/module/zfs/dsl_dir.c vendor-sys/openzfs/dist/module/zfs/sa.c vendor-sys/openzfs/dist/module/zfs/spa.c vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math.c vendor-sys/openzfs/dist/module/zstd/Makefile.in vendor-sys/openzfs/dist/tests/runfiles/common.run vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am Modified: vendor-sys/openzfs/dist/META ============================================================================== --- vendor-sys/openzfs/dist/META Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/META Fri Aug 28 18:41:28 2020 (r364928) @@ -1,10 +1,10 @@ Meta: 1 Name: zfs Branch: 1.0 -Version: 0.8.0 -Release: 1 +Version: 2.0.0 +Release: rc1 Release-Tags: relext License: CDDL -Author: OpenZFS on Linux -Linux-Maximum: 5.6 +Author: OpenZFS +Linux-Maximum: 5.8 Linux-Minimum: 3.10 Modified: vendor-sys/openzfs/dist/NEWS ============================================================================== --- vendor-sys/openzfs/dist/NEWS Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/NEWS Fri Aug 28 18:41:28 2020 (r364928) @@ -1,3 +1,3 @@ Descriptions of all releases can be found on github: -https://github.com/zfsonlinux/zfs/releases +https://github.com/openzfs/zfs/releases Modified: vendor-sys/openzfs/dist/cmd/zpool/zpool_main.c ============================================================================== --- vendor-sys/openzfs/dist/cmd/zpool/zpool_main.c Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/cmd/zpool/zpool_main.c Fri Aug 28 18:41:28 2020 (r364928) @@ -2816,7 +2816,8 @@ show_import(nvlist_t *config) if (msgid != NULL) { (void) printf(gettext( - " see: https://zfsonlinux.org/msg/%s\n"), msgid); + " see: https://openzfs.github.io/openzfs-docs/msg/%s\n"), + msgid); } (void) printf(gettext(" config:\n\n")); @@ -7804,7 +7805,7 @@ print_dedup_stats(nvlist_t *config) * pool: tank * status: DEGRADED * reason: One or more devices ... - * see: https://zfsonlinux.org/msg/ZFS-xxxx-01 + * see: https://openzfs.github.io/openzfs-docs/msg/ZFS-xxxx-01 * config: * mirror DEGRADED * c1t0d0 OK @@ -8193,7 +8194,9 @@ status_callback(zpool_handle_t *zhp, void *data) if (msgid != NULL) { printf(" "); printf_color(ANSI_BOLD, gettext("see:")); - printf(gettext(" https://zfsonlinux.org/msg/%s\n"), msgid); + printf(gettext( + " https://openzfs.github.io/openzfs-docs/msg/%s\n"), + msgid); } if (config != NULL) { Modified: vendor-sys/openzfs/dist/include/libzfs_impl.h ============================================================================== --- vendor-sys/openzfs/dist/include/libzfs_impl.h Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/include/libzfs_impl.h Fri Aug 28 18:41:28 2020 (r364928) @@ -71,6 +71,7 @@ struct libzfs_handle { char libzfs_chassis_id[256]; boolean_t libzfs_prop_debug; regex_t libzfs_urire; + uint64_t libzfs_max_nvlist; }; struct zfs_handle { Modified: vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/acl_impl.h ============================================================================== --- vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/acl_impl.h Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/acl_impl.h Fri Aug 28 18:41:28 2020 (r364928) @@ -26,8 +26,6 @@ #ifndef _SYS_ACL_IMPL_H #define _SYS_ACL_IMPL_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif Modified: vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/cmn_err.h ============================================================================== --- vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/cmn_err.h Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/cmn_err.h Fri Aug 28 18:41:28 2020 (r364928) @@ -31,8 +31,6 @@ #ifndef _SYS_CMN_ERR_H #define _SYS_CMN_ERR_H -#pragma ident "%Z%%M% %I% %E% SMI" - #if !defined(_ASM) #include #endif Modified: vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/extdirent.h ============================================================================== --- vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/extdirent.h Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/extdirent.h Fri Aug 28 18:41:28 2020 (r364928) @@ -26,8 +26,6 @@ #ifndef _SYS_EXTDIRENT_H #define _SYS_EXTDIRENT_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif Modified: vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/list.h ============================================================================== --- vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/list.h Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/list.h Fri Aug 28 18:41:28 2020 (r364928) @@ -26,8 +26,6 @@ #ifndef _SYS_LIST_H #define _SYS_LIST_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #ifdef __cplusplus Modified: vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/list_impl.h ============================================================================== --- vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/list_impl.h Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/list_impl.h Fri Aug 28 18:41:28 2020 (r364928) @@ -27,8 +27,6 @@ #ifndef _SYS_LIST_IMPL_H #define _SYS_LIST_IMPL_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #ifdef __cplusplus Modified: vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/zmod.h ============================================================================== --- vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/zmod.h Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/include/os/freebsd/spl/sys/zmod.h Fri Aug 28 18:41:28 2020 (r364928) @@ -27,8 +27,6 @@ #ifndef _ZMOD_H #define _ZMOD_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif Modified: vendor-sys/openzfs/dist/include/sys/fs/zfs.h ============================================================================== --- vendor-sys/openzfs/dist/include/sys/fs/zfs.h Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/include/sys/fs/zfs.h Fri Aug 28 18:41:28 2020 (r364928) @@ -1013,10 +1013,10 @@ typedef struct vdev_rebuild_stat { } vdev_rebuild_stat_t; /* - * Errata described by https://zfsonlinux.org/msg/ZFS-8000-ER. The ordering - * of this enum must be maintained to ensure the errata identifiers map to - * the correct documentation. New errata may only be appended to the list - * and must contain corresponding documentation at the above link. + * Errata described by https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-ER. + * The ordering of this enum must be maintained to ensure the errata identifiers + * map to the correct documentation. New errata may only be appended to the + * list and must contain corresponding documentation at the above link. */ typedef enum zpool_errata { ZPOOL_ERRATA_NONE, Modified: vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/mount.h ============================================================================== --- vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/mount.h Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/lib/libspl/include/os/freebsd/sys/mount.h Fri Aug 28 18:41:28 2020 (r364928) @@ -35,12 +35,8 @@ #include #include -/* - * Some old glibc headers don't define BLKGETSIZE64 - * and we don't want to require the kernel headers - */ #if !defined(BLKGETSIZE64) -#define BLKGETSIZE64 _IOR(0x12, 114, size_t) +#define BLKGETSIZE64 DIOCGMEDIASIZE #endif /* Modified: vendor-sys/openzfs/dist/lib/libzfs/libzfs_sendrecv.c ============================================================================== --- vendor-sys/openzfs/dist/lib/libzfs/libzfs_sendrecv.c Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/lib/libzfs/libzfs_sendrecv.c Fri Aug 28 18:41:28 2020 (r364928) @@ -610,6 +610,18 @@ send_iterate_fs(zfs_handle_t *zhp, void *arg) fnvlist_free(sd->snapprops); fnvlist_free(sd->snapholds); + /* Do not allow the size of the properties list to exceed the limit */ + if ((fnvlist_size(nvfs) + fnvlist_size(sd->fss)) > + zhp->zfs_hdl->libzfs_max_nvlist) { + (void) fprintf(stderr, dgettext(TEXT_DOMAIN, + "warning: cannot send %s@%s: the size of the list of " + "snapshots and properties is too large to be received " + "successfully.\n" + "Select a smaller number of snapshots to send.\n"), + zhp->zfs_name, sd->tosnap); + rv = EZFS_NOSPC; + goto out; + } /* add this fs to nvlist */ (void) snprintf(guidstring, sizeof (guidstring), "0x%llx", (longlong_t)guid); @@ -2015,6 +2027,21 @@ send_prelim_records(zfs_handle_t *zhp, const char *fro return (zfs_error(zhp->zfs_hdl, EZFS_BADBACKUP, errbuf)); } + /* + * Do not allow the size of the properties list to exceed + * the limit + */ + if ((fnvlist_size(fss) + fnvlist_size(hdrnv)) > + zhp->zfs_hdl->libzfs_max_nvlist) { + (void) snprintf(errbuf, sizeof (errbuf), + dgettext(TEXT_DOMAIN, "warning: cannot send '%s': " + "the size of the list of snapshots and properties " + "is too large to be received successfully.\n" + "Select a smaller number of snapshots to send.\n"), + zhp->zfs_name); + return (zfs_error(zhp->zfs_hdl, EZFS_NOSPC, + errbuf)); + } fnvlist_add_nvlist(hdrnv, "fss", fss); VERIFY0(nvlist_pack(hdrnv, &packbuf, &buflen, NV_ENCODE_XDR, 0)); @@ -2578,8 +2605,6 @@ recv_read(libzfs_handle_t *hdl, int fd, void *buf, int int rv; int len = ilen; - assert(ilen <= SPA_MAXBLOCKSIZE); - do { rv = read(fd, cp, len); cp += rv; @@ -2613,6 +2638,11 @@ recv_read_nvlist(libzfs_handle_t *hdl, int fd, int len if (buf == NULL) return (ENOMEM); + if (len > hdl->libzfs_max_nvlist) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "nvlist too large")); + return (ENOMEM); + } + err = recv_read(hdl, fd, buf, len, byteswap, zc); if (err != 0) { free(buf); @@ -3783,6 +3813,7 @@ recv_skip(libzfs_handle_t *hdl, int fd, boolean_t byte } payload_size = DRR_WRITE_PAYLOAD_SIZE(&drr->drr_u.drr_write); + assert(payload_size <= SPA_MAXBLOCKSIZE); (void) recv_read(hdl, fd, buf, payload_size, B_FALSE, NULL); break; @@ -4819,7 +4850,8 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const case ZFS_ERR_FROM_IVSET_GUID_MISSING: zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "IV set guid missing. See errata %u at " - "https://zfsonlinux.org/msg/ZFS-8000-ER."), + "https://openzfs.github.io/openzfs-docs/msg/" + "ZFS-8000-ER."), ZPOOL_ERRATA_ZOL_8308_ENCRYPTION); (void) zfs_error(hdl, EZFS_BADSTREAM, errbuf); break; Modified: vendor-sys/openzfs/dist/lib/libzfs/libzfs_util.c ============================================================================== --- vendor-sys/openzfs/dist/lib/libzfs/libzfs_util.c Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/lib/libzfs/libzfs_util.c Fri Aug 28 18:41:28 2020 (r364928) @@ -1008,6 +1008,7 @@ libzfs_init(void) { libzfs_handle_t *hdl; int error; + char *env; error = libzfs_load_module(); if (error) { @@ -1054,6 +1055,15 @@ libzfs_init(void) if (getenv("ZFS_PROP_DEBUG") != NULL) { hdl->libzfs_prop_debug = B_TRUE; + } + if ((env = getenv("ZFS_SENDRECV_MAX_NVLIST")) != NULL) { + if ((error = zfs_nicestrtonum(hdl, env, + &hdl->libzfs_max_nvlist))) { + errno = error; + return (NULL); + } + } else { + hdl->libzfs_max_nvlist = (SPA_MAXBLOCKSIZE * 4); } /* Modified: vendor-sys/openzfs/dist/man/man1/arcstat.1 ============================================================================== --- vendor-sys/openzfs/dist/man/man1/arcstat.1 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man1/arcstat.1 Fri Aug 28 18:41:28 2020 (r364928) @@ -13,7 +13,7 @@ .\" Copyright (c) 2015 by Delphix. All rights reserved. .\" Copyright (c) 2020 by AJ Jordan. All rights reserved. .\" -.TH ARCSTAT 1 "May 7, 2020" +.TH ARCSTAT 1 "Aug 24, 2020" OpenZFS .SH NAME arcstat \- report ZFS ARC and L2ARC statistics .SH SYNOPSIS Modified: vendor-sys/openzfs/dist/man/man1/cstyle.1 ============================================================================== --- vendor-sys/openzfs/dist/man/man1/cstyle.1 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man1/cstyle.1 Fri Aug 28 18:41:28 2020 (r364928) @@ -20,7 +20,7 @@ .\" .\" CDDL HEADER END .\" -.TH cstyle 1 "28 March 2005" +.TH CSTYLE 1 "Aug 24, 2020" OpenZFS .SH NAME .I cstyle \- check for some common stylistic errors in C source files Modified: vendor-sys/openzfs/dist/man/man1/raidz_test.1 ============================================================================== --- vendor-sys/openzfs/dist/man/man1/raidz_test.1 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man1/raidz_test.1 Fri Aug 28 18:41:28 2020 (r364928) @@ -22,7 +22,7 @@ .\" .\" Copyright (c) 2016 Gvozden NeÅ¡ković. All rights reserved. .\" -.TH raidz_test 1 "2016" "ZFS on Linux" "User Commands" +.TH RAIDZ_TEST 1 "Aug 24, 2020" OpenZFS .SH NAME \fBraidz_test\fR \- raidz implementation verification and benchmarking tool Modified: vendor-sys/openzfs/dist/man/man1/zhack.1 ============================================================================== --- vendor-sys/openzfs/dist/man/man1/zhack.1 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man1/zhack.1 Fri Aug 28 18:41:28 2020 (r364928) @@ -22,7 +22,7 @@ .\" .\" Copyright 2013 Darik Horn . All rights reserved. .\" -.TH zhack 1 "2013 MAR 16" "ZFS on Linux" "User Commands" +.TH ZHACK 1 "Aug 24, 2020" OpenZFS .SH NAME zhack \- libzpool debugging tool Modified: vendor-sys/openzfs/dist/man/man1/ztest.1 ============================================================================== --- vendor-sys/openzfs/dist/man/man1/ztest.1 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man1/ztest.1 Fri Aug 28 18:41:28 2020 (r364928) @@ -24,7 +24,7 @@ .\" Copyright (c) 2009 Michael Gebetsroither . All rights .\" reserved. .\" -.TH ztest 1 "2009 NOV 01" "ZFS on Linux" "User Commands" +.TH ZTEST 1 "Aug 24, 2020" OpenZFS .SH NAME \fBztest\fR \- was written by the ZFS Developers as a ZFS unit test. Modified: vendor-sys/openzfs/dist/man/man5/spl-module-parameters.5 ============================================================================== --- vendor-sys/openzfs/dist/man/man5/spl-module-parameters.5 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man5/spl-module-parameters.5 Fri Aug 28 18:41:28 2020 (r364928) @@ -2,7 +2,7 @@ .\" .\" Copyright 2013 Turbo Fredriksson . All rights reserved. .\" -.TH SPL-MODULE-PARAMETERS 5 "Oct 28, 2017" +.TH SPL-MODULE-PARAMETERS 5 "Aug 24, 2020" OpenZFS .SH NAME spl\-module\-parameters \- SPL module parameters .SH DESCRIPTION @@ -225,7 +225,7 @@ Default value: \fB/etc/hostid\fR \fBspl_panic_halt\fR (uint) .ad .RS 12n -Cause a kernel panic on assertion failures. When not enabled, the thread is +Cause a kernel panic on assertion failures. When not enabled, the thread is halted to facilitate further debugging. .sp Set to a non-zero value to enable. Modified: vendor-sys/openzfs/dist/man/man5/vdev_id.conf.5 ============================================================================== --- vendor-sys/openzfs/dist/man/man5/vdev_id.conf.5 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man5/vdev_id.conf.5 Fri Aug 28 18:41:28 2020 (r364928) @@ -1,4 +1,4 @@ -.TH vdev_id.conf 5 +.TH VDEV_ID.CONF 5 "Aug 24, 2020" OpenZFS .SH NAME vdev_id.conf \- Configuration file for vdev_id .SH DESCRIPTION Modified: vendor-sys/openzfs/dist/man/man5/zfs-events.5 ============================================================================== --- vendor-sys/openzfs/dist/man/man5/zfs-events.5 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man5/zfs-events.5 Fri Aug 28 18:41:28 2020 (r364928) @@ -13,7 +13,7 @@ .\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your .\" own identifying information: .\" Portions Copyright [yyyy] [name of copyright owner] -.TH ZFS-EVENTS 5 "Oct 24, 2018" +.TH ZFS-EVENTS 5 "Aug 24, 2020" OpenZFS .SH NAME zfs\-events \- Events created by the ZFS filesystem. .SH DESCRIPTION Modified: vendor-sys/openzfs/dist/man/man5/zfs-module-parameters.5 ============================================================================== --- vendor-sys/openzfs/dist/man/man5/zfs-module-parameters.5 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man5/zfs-module-parameters.5 Fri Aug 28 18:41:28 2020 (r364928) @@ -14,7 +14,7 @@ .\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your .\" own identifying information: .\" Portions Copyright [yyyy] [name of copyright owner] -.TH ZFS-MODULE-PARAMETERS 5 "Feb 15, 2019" +.TH ZFS-MODULE-PARAMETERS 5 "Aug 24, 2020" OpenZFS .SH NAME zfs\-module\-parameters \- ZFS module parameters .SH DESCRIPTION @@ -201,6 +201,20 @@ Default value: \fB200\fR%. .sp .ne 2 .na +\fBl2arc_meta_percent\fR (int) +.ad +.RS 12n +Percent of ARC size allowed for L2ARC-only headers. +Since L2ARC buffers are not evicted on memory pressure, too large amount of +headers on system with irrationaly large L2ARC can render it slow or unusable. +This parameter limits L2ARC writes and rebuild to achieve it. +.sp +Default value: \fB33\fR%. +.RE + +.sp +.ne 2 +.na \fBl2arc_trim_ahead\fR (ulong) .ad .RS 12n @@ -426,7 +440,7 @@ Default value: \fB16,777,216\fR (16MB) .RS 12n If we are not searching forward (due to metaslab_df_max_search, metaslab_df_free_pct, or metaslab_df_alloc_threshold), this tunable controls -what segment is used. If it is set, we will use the largest free segment. +what segment is used. If it is set, we will use the largest free segment. If it is not set, we will use a segment of exactly the requested size (or larger). .sp @@ -3256,7 +3270,7 @@ Default value: \fB25\fR. \fBzfs_sync_pass_dont_compress\fR (int) .ad .RS 12n -Starting in this sync pass, we disable compression (including of metadata). +Starting in this sync pass, we disable compression (including of metadata). With the default setting, in practice, we don't have this many sync passes, so this has no effect. .sp Modified: vendor-sys/openzfs/dist/man/man5/zpool-features.5 ============================================================================== --- vendor-sys/openzfs/dist/man/man5/zpool-features.5 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man5/zpool-features.5 Fri Aug 28 18:41:28 2020 (r364928) @@ -16,7 +16,7 @@ .\" Portions Copyright [yyyy] [name of copyright owner] .\" Copyright (c) 2019, Klara Inc. .\" Copyright (c) 2019, Allan Jude -.TH ZPOOL-FEATURES 5 "Jun 8, 2018" +.TH ZPOOL-FEATURES 5 "Aug 24, 2020" OpenZFS .SH NAME zpool\-features \- ZFS pool feature descriptions .SH DESCRIPTION Modified: vendor-sys/openzfs/dist/man/man8/fsck.zfs.8 ============================================================================== --- vendor-sys/openzfs/dist/man/man8/fsck.zfs.8 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man8/fsck.zfs.8 Fri Aug 28 18:41:28 2020 (r364928) @@ -22,7 +22,7 @@ .\" .\" Copyright 2013 Darik Horn . All rights reserved. .\" -.TH fsck.zfs 8 "2013 MAR 16" "ZFS on Linux" "System Administration Commands" +.TH FSCK.ZFS 8 "Aug 24, 2020" OpenZFS .SH NAME fsck.zfs \- Dummy ZFS filesystem checker. Modified: vendor-sys/openzfs/dist/man/man8/mount.zfs.8 ============================================================================== --- vendor-sys/openzfs/dist/man/man8/mount.zfs.8 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man8/mount.zfs.8 Fri Aug 28 18:41:28 2020 (r364928) @@ -22,7 +22,7 @@ .\" .\" Copyright 2013 Darik Horn . All rights reserved. .\" -.TH mount.zfs 8 "2013 FEB 28" "ZFS on Linux" "System Administration Commands" +.TH MOUNT.ZFS 8 "Aug 24, 2020" OpenZFS .SH NAME mount.zfs \- mount a ZFS filesystem Modified: vendor-sys/openzfs/dist/man/man8/vdev_id.8 ============================================================================== --- vendor-sys/openzfs/dist/man/man8/vdev_id.8 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man8/vdev_id.8 Fri Aug 28 18:41:28 2020 (r364928) @@ -1,4 +1,4 @@ -.TH vdev_id 8 +.TH VDEV_ID 8 "Aug 24, 2020" OpenZFS .SH NAME vdev_id \- generate user-friendly names for JBOD disks .SH SYNOPSIS Modified: vendor-sys/openzfs/dist/man/man8/zed.8.in ============================================================================== --- vendor-sys/openzfs/dist/man/man8/zed.8.in Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man8/zed.8.in Fri Aug 28 18:41:28 2020 (r364928) @@ -11,7 +11,7 @@ .\" "OPENSOLARIS.LICENSE" or at . .\" You may not use this file except in compliance with the license. .\" -.TH ZED 8 "Octember 1, 2013" "ZFS on Linux" "System Administration Commands" +.TH ZED 8 "Aug 24, 2020" OpenZFS .SH NAME ZED \- ZFS Event Daemon Modified: vendor-sys/openzfs/dist/man/man8/zfs-mount-generator.8.in ============================================================================== --- vendor-sys/openzfs/dist/man/man8/zfs-mount-generator.8.in Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man8/zfs-mount-generator.8.in Fri Aug 28 18:41:28 2020 (r364928) @@ -22,7 +22,7 @@ .\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION .\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -.TH "ZFS\-MOUNT\-GENERATOR" "8" "2020-01-19" "ZFS" "zfs-mount-generator" "\"" +.TH ZFS-MOUNT-GENERATOR 8 "Aug 24, 2020" OpenZFS .SH "NAME" zfs\-mount\-generator \- generates systemd mount units for ZFS Modified: vendor-sys/openzfs/dist/man/man8/zfs.8 ============================================================================== --- vendor-sys/openzfs/dist/man/man8/zfs.8 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man8/zfs.8 Fri Aug 28 18:41:28 2020 (r364928) @@ -736,6 +736,42 @@ to mount zfs datasets. This option is provided for bac .Xr mount 8 , .Xr net 8 , .Xr selinux 8 , +.Xr zfs-allow 8 , +.Xr zfs-bookmark 8 , +.Xr zfs-change-key 8 , +.Xr zfs-clone 8 , +.Xr zfs-create 8 , +.Xr zfs-destroy 8 , +.Xr zfs-diff 8 , +.Xr zfs-get 8 , +.Xr zfs-groupspace 8 , +.Xr zfs-hold 8 , +.Xr zfs-inherit 8 , +.Xr zfs-jail 8 , +.Xr zfs-list 8 , +.Xr zfs-load-key 8 , +.Xr zfs-mount 8 , +.Xr zfs-program 8 , +.Xr zfs-project 8 , +.Xr zfs-projectspace 8 , +.Xr zfs-promote 8 , +.Xr zfs-receive 8 , +.Xr zfs-redact 8 , +.Xr zfs-release 8 , +.Xr zfs-rename 8 , +.Xr zfs-rollback 8 , +.Xr zfs-send 8 , +.Xr zfs-set 8 , +.Xr zfs-share 8 , +.Xr zfs-snapshot 8 , +.Xr zfs-unallow 8 , +.Xr zfs-unjail 8 , +.Xr zfs-unload-key 8 , +.Xr zfs-unmount 8 , +.Xr zfs-unshare 8 , +.Xr zfs-upgrade 8 , +.Xr zfs-userspace 8 , +.Xr zfs-wait 8 , .Xr zfsconcepts 8 , .Xr zfsprops 8 , .Xr zpool 8 Modified: vendor-sys/openzfs/dist/man/man8/zinject.8 ============================================================================== --- vendor-sys/openzfs/dist/man/man8/zinject.8 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man8/zinject.8 Fri Aug 28 18:41:28 2020 (r364928) @@ -22,7 +22,7 @@ .\" .\" Copyright 2013 Darik Horn . All rights reserved. .\" -.TH zinject 8 "2013 FEB 28" "ZFS on Linux" "System Administration Commands" +.TH ZINJECT 8 "Aug 24, 2020" OpenZFS .SH NAME zinject \- ZFS Fault Injector Modified: vendor-sys/openzfs/dist/man/man8/zpool-iostat.8 ============================================================================== --- vendor-sys/openzfs/dist/man/man8/zpool-iostat.8 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man8/zpool-iostat.8 Fri Aug 28 18:41:28 2020 (r364928) @@ -65,9 +65,9 @@ When given an .Ar interval , the statistics are printed every .Ar interval -seconds until ^C is pressed. If +seconds until ^C is pressed. If .Fl n -flag is specified the headers are displayed only once, otherwise they are +flag is specified the headers are displayed only once, otherwise they are displayed periodically. If count is specified, the command exits after count reports are printed. The first report printed is always the statistics since boot regardless of whether Modified: vendor-sys/openzfs/dist/man/man8/zpool.8 ============================================================================== --- vendor-sys/openzfs/dist/man/man8/zpool.8 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man8/zpool.8 Fri Aug 28 18:41:28 2020 (r364928) @@ -559,10 +559,41 @@ is not set, it is assumed that the user is allowed to .Sh INTERFACE STABILITY .Sy Evolving .Sh SEE ALSO -.Xr zpoolconcepts 8 , -.Xr zpoolprops 8 , .Xr zfs-events 5 , .Xr zfs-module-parameters 5 , .Xr zpool-features 5 , .Xr zed 8 , -.Xr zfs 8 +.Xr zfs 8 , +.Xr zpool-add 8 , +.Xr zpool-attach 8 , +.Xr zpool-checkpoint 8 , +.Xr zpool-clear 8 , +.Xr zpool-create 8 , +.Xr zpool-destroy 8 , +.Xr zpool-detach 8 , +.Xr zpool-events 8 , +.Xr zpool-export 8 , +.Xr zpool-get 8 , +.Xr zpool-history 8 , +.Xr zpool-import 8 , +.Xr zpool-initialize 8 , +.Xr zpool-iostat 8 , +.Xr zpool-labelclear 8 , +.Xr zpool-list 8 , +.Xr zpool-offline 8 , +.Xr zpool-online 8 , +.Xr zpool-reguid 8 , +.Xr zpool-remove 8 , +.Xr zpool-reopen 8 , +.Xr zpool-replace 8 , +.Xr zpool-resilver 8 , +.Xr zpool-scrub 8 , +.Xr zpool-set 8 , +.Xr zpool-split 8 , +.Xr zpool-status 8 , +.Xr zpool-sync 8 , +.Xr zpool-trim 8 , +.Xr zpool-upgrade 8 , +.Xr zpool-wait 8 , +.Xr zpoolconcepts 8 , +.Xr zpoolprops 8 Modified: vendor-sys/openzfs/dist/man/man8/zstreamdump.8 ============================================================================== --- vendor-sys/openzfs/dist/man/man8/zstreamdump.8 Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/man/man8/zstreamdump.8 Fri Aug 28 18:41:28 2020 (r364928) @@ -3,7 +3,7 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH zstreamdump 8 "29 Aug 2012" "ZFS pool 28, filesystem 5" "System Administration Commands" +.TH ZSTREAMDUMP 8 "Aug 24, 2020" OpenZFS .SH NAME zstreamdump \- filter data in zfs send stream .SH SYNOPSIS Modified: vendor-sys/openzfs/dist/module/Makefile.bsd ============================================================================== --- vendor-sys/openzfs/dist/module/Makefile.bsd Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/module/Makefile.bsd Fri Aug 28 18:41:28 2020 (r364928) @@ -356,4 +356,4 @@ CFLAGS.zil.c= -Wno-cast-qual CFLAGS.zio.c= -Wno-cast-qual CFLAGS.zrlock.c= -Wno-cast-qual CFLAGS.zfs_zstd.c= -Wno-cast-qual -Wno-pointer-arith -CFLAGS.zstd.c= -fno-tree-vectorize +CFLAGS.zstd.c= -fno-tree-vectorize -U__BMI__ Modified: vendor-sys/openzfs/dist/module/lua/setjmp/setjmp_ppc.S ============================================================================== --- vendor-sys/openzfs/dist/module/lua/setjmp/setjmp_ppc.S Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/module/lua/setjmp/setjmp_ppc.S Fri Aug 28 18:41:28 2020 (r364928) @@ -56,7 +56,7 @@ #define ENTRY(name) \ .align 2 ; \ .type name,@function; \ - .globl name; \ + .weak name; \ name: #else /* PPC64_ELF_ABI_v1 */ @@ -65,8 +65,8 @@ name: #define GLUE(a,b) XGLUE(a,b) #define ENTRY(name) \ .align 2 ; \ - .globl name; \ - .globl GLUE(.,name); \ + .weak name; \ + .weak GLUE(.,name); \ .pushsection ".opd","aw"; \ name: \ .quad GLUE(.,name); \ @@ -83,8 +83,8 @@ GLUE(.,name): #define ENTRY(name) \ .text; \ .p2align 4; \ - .globl name; \ - .type name,@function; \ + .weak name; \ + .type name,@function; \ name: #endif /* __powerpc64__ */ Modified: vendor-sys/openzfs/dist/module/os/freebsd/spl/list.c ============================================================================== --- vendor-sys/openzfs/dist/module/os/freebsd/spl/list.c Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/module/os/freebsd/spl/list.c Fri Aug 28 18:41:28 2020 (r364928) @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Generic doubly-linked list implementation */ Modified: vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_ctldir.c ============================================================================== --- vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_ctldir.c Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/module/os/linux/zfs/zfs_ctldir.c Fri Aug 28 18:41:28 2020 (r364928) @@ -31,6 +31,7 @@ * Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. * Copyright (c) 2018 George Melikov. All Rights Reserved. * Copyright (c) 2019 Datto, Inc. All rights reserved. + * Copyright (c) 2020 The MathWorks, Inc. All rights reserved. */ /* @@ -978,6 +979,22 @@ out: } /* + * Flush everything out of the kernel's export table and such. + * This is needed as once the snapshot is used over NFS, its + * entries in svc_export and svc_expkey caches hold reference + * to the snapshot mount point. There is no known way of flushing + * only the entries related to the snapshot. + */ +static void +exportfs_flush(void) +{ + char *argv[] = { "/usr/sbin/exportfs", "-f", NULL }; + char *envp[] = { NULL }; + + (void) call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC); +} + +/* * Attempt to unmount a snapshot by making a call to user space. * There is no assurance that this can or will succeed, is just a * best effort. In the case where it does fail, perhaps because @@ -998,6 +1015,8 @@ zfsctl_snapshot_unmount(char *snapname, int flags) return (SET_ERROR(ENOENT)); } rw_exit(&zfs_snapshot_lock); + + exportfs_flush(); if (flags & MNT_FORCE) argv[4] = "-fn"; Modified: vendor-sys/openzfs/dist/module/zcommon/zfs_fletcher.c ============================================================================== --- vendor-sys/openzfs/dist/module/zcommon/zfs_fletcher.c Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/module/zcommon/zfs_fletcher.c Fri Aug 28 18:41:28 2020 (r364928) @@ -187,7 +187,7 @@ static const fletcher_4_ops_t *fletcher_4_impls[] = { #if defined(__x86_64) && defined(HAVE_AVX512BW) &fletcher_4_avx512bw_ops, #endif -#if defined(__aarch64__) +#if defined(__aarch64__) && !defined(__FreeBSD__) &fletcher_4_aarch64_neon_ops, #endif }; Modified: vendor-sys/openzfs/dist/module/zfs/arc.c ============================================================================== --- vendor-sys/openzfs/dist/module/zfs/arc.c Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/module/zfs/arc.c Fri Aug 28 18:41:28 2020 (r364928) @@ -823,6 +823,7 @@ unsigned long l2arc_feed_min_ms = L2ARC_FEED_MIN_MS; / int l2arc_noprefetch = B_TRUE; /* don't cache prefetch bufs */ int l2arc_feed_again = B_TRUE; /* turbo warmup */ int l2arc_norw = B_FALSE; /* no reads during writes */ +int l2arc_meta_percent = 33; /* limit on headers size */ /* * L2ARC Internals @@ -4988,9 +4989,6 @@ arc_adapt(int bytes, arc_state_t *state) int64_t mrug_size = zfs_refcount_count(&arc_mru_ghost->arcs_size); int64_t mfug_size = zfs_refcount_count(&arc_mfu_ghost->arcs_size); - if (state == arc_l2c_only) - return; - ASSERT(bytes > 0); /* * Adapt the target size of the MRU list: @@ -9144,6 +9142,15 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint return (write_asize); } +static boolean_t +l2arc_hdr_limit_reached(void) +{ + int64_t s = aggsum_upper_bound(&astat_l2_hdr_size); + + return (arc_reclaim_needed() || (s > arc_meta_limit * 3 / 4) || + (s > (arc_warm ? arc_c : arc_c_max) * l2arc_meta_percent / 100)); +} + /* * This thread feeds the L2ARC at regular intervals. This is the beating * heart of the L2ARC. @@ -9211,7 +9218,7 @@ l2arc_feed_thread(void *unused) /* * Avoid contributing to memory pressure. */ - if (arc_reclaim_needed()) { + if (l2arc_hdr_limit_reached()) { ARCSTAT_BUMP(arcstat_l2_abort_lowmem); spa_config_exit(spa, SCL_L2ARC, dev); continue; @@ -9662,7 +9669,7 @@ l2arc_rebuild(l2arc_dev_t *dev) * online the L2ARC dev at a later time (or re-import the pool) * to reconstruct it (when there's less memory pressure). */ - if (arc_reclaim_needed()) { + if (l2arc_hdr_limit_reached()) { ARCSTAT_BUMP(arcstat_l2_rebuild_abort_lowmem); cmn_err(CE_NOTE, "System running low on memory, " "aborting L2ARC rebuild."); @@ -10002,6 +10009,13 @@ l2arc_log_blk_restore(l2arc_dev_t *dev, const l2arc_lo uint64_t size = 0, asize = 0; uint64_t log_entries = dev->l2ad_log_entries; + /* + * Usually arc_adapt() is called only for data, not headers, but + * since we may allocate significant amount of memory here, let ARC + * grow its arc_c. + */ + arc_adapt(log_entries * HDR_L2ONLY_SIZE, arc_l2c_only); + for (int i = log_entries - 1; i >= 0; i--) { /* * Restore goes in the reverse temporal direction to preserve @@ -10537,6 +10551,9 @@ ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, feed_again, INT, Z ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, norw, INT, ZMOD_RW, "No reads during writes"); + +ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, meta_percent, INT, ZMOD_RW, + "Percent of ARC size allowed for L2ARC-only headers"); ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, rebuild_enabled, INT, ZMOD_RW, "Rebuild the L2ARC when importing a pool"); Modified: vendor-sys/openzfs/dist/module/zfs/dmu.c ============================================================================== --- vendor-sys/openzfs/dist/module/zfs/dmu.c Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/module/zfs/dmu.c Fri Aug 28 18:41:28 2020 (r364928) @@ -2458,6 +2458,7 @@ EXPORT_SYMBOL(dmu_object_set_blocksize); EXPORT_SYMBOL(dmu_object_set_maxblkid); EXPORT_SYMBOL(dmu_object_set_checksum); EXPORT_SYMBOL(dmu_object_set_compress); +EXPORT_SYMBOL(dmu_offset_next); EXPORT_SYMBOL(dmu_write_policy); EXPORT_SYMBOL(dmu_sync); EXPORT_SYMBOL(dmu_request_arcbuf); Modified: vendor-sys/openzfs/dist/module/zfs/dnode_sync.c ============================================================================== --- vendor-sys/openzfs/dist/module/zfs/dnode_sync.c Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/module/zfs/dnode_sync.c Fri Aug 28 18:41:28 2020 (r364928) @@ -23,6 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2018 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. + * Copyright 2020 Oxide Computer Company */ #include @@ -762,13 +763,22 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) dsfra.dsfra_dnode = dn; dsfra.dsfra_tx = tx; dsfra.dsfra_free_indirects = freeing_dnode; + mutex_enter(&dn->dn_mtx); if (freeing_dnode) { ASSERT(range_tree_contains(dn->dn_free_ranges[txgoff], 0, dn->dn_maxblkid + 1)); } - mutex_enter(&dn->dn_mtx); - range_tree_vacate(dn->dn_free_ranges[txgoff], + /* + * Because dnode_sync_free_range() must drop dn_mtx during its + * processing, using it as a callback to range_tree_vacate() is + * not safe. No other operations (besides destroy) are allowed + * once range_tree_vacate() has begun, and dropping dn_mtx + * would leave a window open for another thread to observe that + * invalid (and unsafe) state. + */ + range_tree_walk(dn->dn_free_ranges[txgoff], dnode_sync_free_range, &dsfra); + range_tree_vacate(dn->dn_free_ranges[txgoff], NULL, NULL); range_tree_destroy(dn->dn_free_ranges[txgoff]); dn->dn_free_ranges[txgoff] = NULL; mutex_exit(&dn->dn_mtx); Modified: vendor-sys/openzfs/dist/module/zfs/dsl_dir.c ============================================================================== --- vendor-sys/openzfs/dist/module/zfs/dsl_dir.c Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/module/zfs/dsl_dir.c Fri Aug 28 18:41:28 2020 (r364928) @@ -121,13 +121,6 @@ * and updated by dsl_fs_ss_count_adjust(). A new limit value is setup in * dsl_dir_activate_fs_ss_limit() and the counts are adjusted, if necessary, by * dsl_dir_init_fs_ss_count(). - * - * There is a special case when we receive a filesystem that already exists. In - * this case a temporary clone name of %X is created (see dmu_recv_begin). We - * never update the filesystem counts for temporary clones. - * - * Likewise, we do not update the snapshot counts for temporary snapshots, - * such as those created by zfs diff. */ extern inline dsl_dir_phys_t *dsl_dir_phys(dsl_dir_t *dd); @@ -593,11 +586,9 @@ dsl_dir_init_fs_ss_count(dsl_dir_t *dd, dmu_tx_t *tx) &chld_dd)); /* - * Ignore hidden ($FREE, $MOS & $ORIGIN) objsets and - * temporary datasets. + * Ignore hidden ($FREE, $MOS & $ORIGIN) objsets. */ - if (chld_dd->dd_myname[0] == '$' || - chld_dd->dd_myname[0] == '%') { + if (chld_dd->dd_myname[0] == '$') { dsl_dir_rele(chld_dd, FTAG); continue; } @@ -910,14 +901,12 @@ dsl_fs_ss_count_adjust(dsl_dir_t *dd, int64_t delta, c strcmp(prop, DD_FIELD_SNAPSHOT_COUNT) == 0); /* - * When we receive an incremental stream into a filesystem that already - * exists, a temporary clone is created. We don't count this temporary - * clone, whose name begins with a '%'. We also ignore hidden ($FREE, - * $MOS & $ORIGIN) objsets. + * We don't do accounting for hidden ($FREE, $MOS & $ORIGIN) objsets. */ - if ((dd->dd_myname[0] == '%' || dd->dd_myname[0] == '$') && - strcmp(prop, DD_FIELD_FILESYSTEM_COUNT) == 0) + if (dd->dd_myname[0] == '$' && strcmp(prop, + DD_FIELD_FILESYSTEM_COUNT) == 0) { return; + } /* * e.g. if renaming a dataset with no snapshots, count adjustment is 0 Modified: vendor-sys/openzfs/dist/module/zfs/sa.c ============================================================================== --- vendor-sys/openzfs/dist/module/zfs/sa.c Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/module/zfs/sa.c Fri Aug 28 18:41:28 2020 (r364928) @@ -39,7 +39,6 @@ #include #include #include -#include #include #include Modified: vendor-sys/openzfs/dist/module/zfs/spa.c ============================================================================== --- vendor-sys/openzfs/dist/module/zfs/spa.c Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/module/zfs/spa.c Fri Aug 28 18:41:28 2020 (r364928) @@ -3201,7 +3201,8 @@ spa_verify_host(spa_t *spa, nvlist_t *mos_config) cmn_err(CE_WARN, "pool '%s' could not be " "loaded as it was last accessed by " "another system (host: %s hostid: 0x%llx). " - "See: http://illumos.org/msg/ZFS-8000-EY", + "See: https://openzfs.github.io/openzfs-docs/msg/" + "ZFS-8000-EY", spa_name(spa), hostname, (u_longlong_t)hostid); spa_load_failed(spa, "hostid verification failed: pool " "last accessed by host: %s (hostid: 0x%llx)", Modified: vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math.c ============================================================================== --- vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math.c Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/module/zfs/vdev_raidz_math.c Fri Aug 28 18:41:28 2020 (r364928) @@ -61,7 +61,7 @@ const raidz_impl_ops_t *raidz_all_maths[] = { #if defined(__x86_64) && defined(HAVE_AVX512BW) /* only x86_64 for now */ &vdev_raidz_avx512bw_impl, #endif -#if defined(__aarch64__) +#if defined(__aarch64__) && !defined(__FreeBSD__) &vdev_raidz_aarch64_neon_impl, &vdev_raidz_aarch64_neonx2_impl, #endif Modified: vendor-sys/openzfs/dist/module/zstd/Makefile.in ============================================================================== --- vendor-sys/openzfs/dist/module/zstd/Makefile.in Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/module/zstd/Makefile.in Fri Aug 28 18:41:28 2020 (r364928) @@ -20,6 +20,9 @@ ccflags-y += -O3 # Set it for other compilers, too. $(obj)/lib/zstd.o: c_flags += -fno-tree-vectorize +# SSE register return with SSE disabled if -march=znverX is passed +$(obj)/lib/zstd.o: c_flags += -U__BMI__ + # Quiet warnings about frame size due to unused code in unmodified zstd lib $(obj)/lib/zstd.o: c_flags += -Wframe-larger-than=20480 Modified: vendor-sys/openzfs/dist/tests/runfiles/common.run ============================================================================== --- vendor-sys/openzfs/dist/tests/runfiles/common.run Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/tests/runfiles/common.run Fri Aug 28 18:41:28 2020 (r364928) @@ -216,7 +216,7 @@ tests = ['zfs_receive_001_pos', 'zfs_receive_002_pos', 'zfs_receive_016_pos', 'receive-o-x_props_override', 'zfs_receive_from_encrypted', 'zfs_receive_to_encrypted', 'zfs_receive_raw', 'zfs_receive_raw_incremental', 'zfs_receive_-e', - 'zfs_receive_raw_-d', 'zfs_receive_from_zstd'] + 'zfs_receive_raw_-d', 'zfs_receive_from_zstd', 'zfs_receive_new_props'] tags = ['functional', 'cli_root', 'zfs_receive'] [tests/functional/cli_root/zfs_rename] Modified: vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am ============================================================================== --- vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am Fri Aug 28 18:25:45 2020 (r364927) +++ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am Fri Aug 28 18:41:28 2020 (r364928) @@ -21,6 +21,7 @@ dist_pkgdata_SCRIPTS = \ receive-o-x_props_override.ksh \ zfs_receive_from_encrypted.ksh \ zfs_receive_from_zstd.ksh \ + zfs_receive_new_props.ksh \ zfs_receive_to_encrypted.ksh \ zfs_receive_raw.ksh \ zfs_receive_raw_incremental.ksh \ Added: vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_new_props.ksh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_new_props.ksh Fri Aug 28 18:41:28 2020 (r364928) @@ -0,0 +1,77 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2020 by Delphix. All rights reserved. +# + +. $STF_SUITE/include/libtest.shlib + +# +# DESCRIPTION: +# ZFS receive test to handle Issue #10698 +# +# STRATEGY: +# 1. Create a pool with filesystem_limits disabled +# 2. Create a filesystem on that pool +# 3. Enable filesystem limits on that pool +# 4. On a pool with filesystem limits enabled, create a filesystem and set a +# limit +# 5. Snapshot limited filesystem +# 6. send -R limited filesystem and receive over filesystem with limits disabled +# + +verify_runnable "both" + +function cleanup +{ + destroy_pool "$poolname" + destroy_pool "$rpoolname" + log_must rm -f "$vdevfile" + log_must rm -f "$rvdevfile" + log_must rm -f "$streamfile" +} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Aug 28 18:45:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56C653BB9F5; Fri, 28 Aug 2020 18:45:15 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdT6z1cBzz4730; Fri, 28 Aug 2020 18:45:15 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0053A190F3; Fri, 28 Aug 2020 18:45:15 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07SIjEca042478; Fri, 28 Aug 2020 18:45:14 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SIjENw042477; Fri, 28 Aug 2020 18:45:14 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008281845.07SIjENw042477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Fri, 28 Aug 2020 18:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r364929 - vendor-sys/openzfs/2.0-rc1-ga00c61 X-SVN-Group: vendor-sys X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: vendor-sys/openzfs/2.0-rc1-ga00c61 X-SVN-Commit-Revision: 364929 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 18:45:15 -0000 Author: mmacy Date: Fri Aug 28 18:45:14 2020 New Revision: 364929 URL: https://svnweb.freebsd.org/changeset/base/364929 Log: openzfs: tag latest Added: vendor-sys/openzfs/2.0-rc1-ga00c61/ - copied from r364928, vendor-sys/openzfs/dist/ From owner-svn-src-all@freebsd.org Fri Aug 28 18:53:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 041843BC2BA; Fri, 28 Aug 2020 18:53:54 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdTJx6gVqz48lj; Fri, 28 Aug 2020 18:53:53 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C95D7193D3; Fri, 28 Aug 2020 18:53:53 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07SIrrlx049032; Fri, 28 Aug 2020 18:53:53 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SIrjDK048986; Fri, 28 Aug 2020 18:53:45 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008281853.07SIrjDK048986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Fri, 28 Aug 2020 18:53:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364930 - in head/sys/contrib/openzfs: . cmd/zpool include include/sys/fs lib/libspl/include/os/freebsd/sys lib/libzfs man/man1 man/man5 man/man8 module module/lua/setjmp module/os/linu... X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys/contrib/openzfs: . cmd/zpool include include/sys/fs lib/libspl/include/os/freebsd/sys lib/libzfs man/man1 man/man5 man/man8 module module/lua/setjmp module/os/linux/zfs module/zcommon modu... X-SVN-Commit-Revision: 364930 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 18:53:54 -0000 Author: mmacy Date: Fri Aug 28 18:53:45 2020 New Revision: 364930 URL: https://svnweb.freebsd.org/changeset/base/364930 Log: ZFS: MFV 2.0-rc1-ga00c61 Added: head/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_new_props.ksh - copied unchanged from r364929, vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_new_props.ksh Modified: head/sys/contrib/openzfs/META head/sys/contrib/openzfs/NEWS head/sys/contrib/openzfs/cmd/zpool/zpool_main.c head/sys/contrib/openzfs/include/libzfs_impl.h head/sys/contrib/openzfs/include/sys/fs/zfs.h head/sys/contrib/openzfs/lib/libspl/include/os/freebsd/sys/mount.h head/sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c head/sys/contrib/openzfs/lib/libzfs/libzfs_util.c head/sys/contrib/openzfs/man/man1/arcstat.1 head/sys/contrib/openzfs/man/man1/cstyle.1 head/sys/contrib/openzfs/man/man1/raidz_test.1 head/sys/contrib/openzfs/man/man1/zhack.1 head/sys/contrib/openzfs/man/man1/ztest.1 head/sys/contrib/openzfs/man/man5/spl-module-parameters.5 head/sys/contrib/openzfs/man/man5/vdev_id.conf.5 head/sys/contrib/openzfs/man/man5/zfs-events.5 head/sys/contrib/openzfs/man/man5/zfs-module-parameters.5 head/sys/contrib/openzfs/man/man5/zpool-features.5 head/sys/contrib/openzfs/man/man8/fsck.zfs.8 head/sys/contrib/openzfs/man/man8/mount.zfs.8 head/sys/contrib/openzfs/man/man8/vdev_id.8 head/sys/contrib/openzfs/man/man8/zed.8.in head/sys/contrib/openzfs/man/man8/zfs-mount-generator.8.in head/sys/contrib/openzfs/man/man8/zfs.8 head/sys/contrib/openzfs/man/man8/zinject.8 head/sys/contrib/openzfs/man/man8/zpool-iostat.8 head/sys/contrib/openzfs/man/man8/zpool.8 head/sys/contrib/openzfs/man/man8/zstreamdump.8 head/sys/contrib/openzfs/module/Makefile.bsd head/sys/contrib/openzfs/module/lua/setjmp/setjmp_ppc.S head/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c head/sys/contrib/openzfs/module/zcommon/zfs_fletcher.c head/sys/contrib/openzfs/module/zfs/arc.c head/sys/contrib/openzfs/module/zfs/dmu.c head/sys/contrib/openzfs/module/zfs/dnode_sync.c head/sys/contrib/openzfs/module/zfs/dsl_dir.c head/sys/contrib/openzfs/module/zfs/sa.c head/sys/contrib/openzfs/module/zfs/spa.c head/sys/contrib/openzfs/module/zfs/vdev_raidz_math.c head/sys/contrib/openzfs/module/zstd/Makefile.in head/sys/contrib/openzfs/tests/runfiles/common.run head/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am Directory Properties: head/sys/contrib/openzfs/ (props changed) Modified: head/sys/contrib/openzfs/META ============================================================================== --- head/sys/contrib/openzfs/META Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/META Fri Aug 28 18:53:45 2020 (r364930) @@ -1,10 +1,10 @@ Meta: 1 Name: zfs Branch: 1.0 -Version: 0.8.0 -Release: 1 +Version: 2.0.0 +Release: rc1 Release-Tags: relext License: CDDL -Author: OpenZFS on Linux -Linux-Maximum: 5.6 +Author: OpenZFS +Linux-Maximum: 5.8 Linux-Minimum: 3.10 Modified: head/sys/contrib/openzfs/NEWS ============================================================================== --- head/sys/contrib/openzfs/NEWS Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/NEWS Fri Aug 28 18:53:45 2020 (r364930) @@ -1,3 +1,3 @@ Descriptions of all releases can be found on github: -https://github.com/zfsonlinux/zfs/releases +https://github.com/openzfs/zfs/releases Modified: head/sys/contrib/openzfs/cmd/zpool/zpool_main.c ============================================================================== --- head/sys/contrib/openzfs/cmd/zpool/zpool_main.c Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/cmd/zpool/zpool_main.c Fri Aug 28 18:53:45 2020 (r364930) @@ -2816,7 +2816,8 @@ show_import(nvlist_t *config) if (msgid != NULL) { (void) printf(gettext( - " see: https://zfsonlinux.org/msg/%s\n"), msgid); + " see: https://openzfs.github.io/openzfs-docs/msg/%s\n"), + msgid); } (void) printf(gettext(" config:\n\n")); @@ -7804,7 +7805,7 @@ print_dedup_stats(nvlist_t *config) * pool: tank * status: DEGRADED * reason: One or more devices ... - * see: https://zfsonlinux.org/msg/ZFS-xxxx-01 + * see: https://openzfs.github.io/openzfs-docs/msg/ZFS-xxxx-01 * config: * mirror DEGRADED * c1t0d0 OK @@ -8193,7 +8194,9 @@ status_callback(zpool_handle_t *zhp, void *data) if (msgid != NULL) { printf(" "); printf_color(ANSI_BOLD, gettext("see:")); - printf(gettext(" https://zfsonlinux.org/msg/%s\n"), msgid); + printf(gettext( + " https://openzfs.github.io/openzfs-docs/msg/%s\n"), + msgid); } if (config != NULL) { Modified: head/sys/contrib/openzfs/include/libzfs_impl.h ============================================================================== --- head/sys/contrib/openzfs/include/libzfs_impl.h Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/include/libzfs_impl.h Fri Aug 28 18:53:45 2020 (r364930) @@ -71,6 +71,7 @@ struct libzfs_handle { char libzfs_chassis_id[256]; boolean_t libzfs_prop_debug; regex_t libzfs_urire; + uint64_t libzfs_max_nvlist; }; struct zfs_handle { Modified: head/sys/contrib/openzfs/include/sys/fs/zfs.h ============================================================================== --- head/sys/contrib/openzfs/include/sys/fs/zfs.h Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/include/sys/fs/zfs.h Fri Aug 28 18:53:45 2020 (r364930) @@ -1013,10 +1013,10 @@ typedef struct vdev_rebuild_stat { } vdev_rebuild_stat_t; /* - * Errata described by https://zfsonlinux.org/msg/ZFS-8000-ER. The ordering - * of this enum must be maintained to ensure the errata identifiers map to - * the correct documentation. New errata may only be appended to the list - * and must contain corresponding documentation at the above link. + * Errata described by https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-ER. + * The ordering of this enum must be maintained to ensure the errata identifiers + * map to the correct documentation. New errata may only be appended to the + * list and must contain corresponding documentation at the above link. */ typedef enum zpool_errata { ZPOOL_ERRATA_NONE, Modified: head/sys/contrib/openzfs/lib/libspl/include/os/freebsd/sys/mount.h ============================================================================== --- head/sys/contrib/openzfs/lib/libspl/include/os/freebsd/sys/mount.h Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/lib/libspl/include/os/freebsd/sys/mount.h Fri Aug 28 18:53:45 2020 (r364930) @@ -35,12 +35,8 @@ #include #include -/* - * Some old glibc headers don't define BLKGETSIZE64 - * and we don't want to require the kernel headers - */ #if !defined(BLKGETSIZE64) -#define BLKGETSIZE64 _IOR(0x12, 114, size_t) +#define BLKGETSIZE64 DIOCGMEDIASIZE #endif /* Modified: head/sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c ============================================================================== --- head/sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c Fri Aug 28 18:53:45 2020 (r364930) @@ -610,6 +610,18 @@ send_iterate_fs(zfs_handle_t *zhp, void *arg) fnvlist_free(sd->snapprops); fnvlist_free(sd->snapholds); + /* Do not allow the size of the properties list to exceed the limit */ + if ((fnvlist_size(nvfs) + fnvlist_size(sd->fss)) > + zhp->zfs_hdl->libzfs_max_nvlist) { + (void) fprintf(stderr, dgettext(TEXT_DOMAIN, + "warning: cannot send %s@%s: the size of the list of " + "snapshots and properties is too large to be received " + "successfully.\n" + "Select a smaller number of snapshots to send.\n"), + zhp->zfs_name, sd->tosnap); + rv = EZFS_NOSPC; + goto out; + } /* add this fs to nvlist */ (void) snprintf(guidstring, sizeof (guidstring), "0x%llx", (longlong_t)guid); @@ -2015,6 +2027,21 @@ send_prelim_records(zfs_handle_t *zhp, const char *fro return (zfs_error(zhp->zfs_hdl, EZFS_BADBACKUP, errbuf)); } + /* + * Do not allow the size of the properties list to exceed + * the limit + */ + if ((fnvlist_size(fss) + fnvlist_size(hdrnv)) > + zhp->zfs_hdl->libzfs_max_nvlist) { + (void) snprintf(errbuf, sizeof (errbuf), + dgettext(TEXT_DOMAIN, "warning: cannot send '%s': " + "the size of the list of snapshots and properties " + "is too large to be received successfully.\n" + "Select a smaller number of snapshots to send.\n"), + zhp->zfs_name); + return (zfs_error(zhp->zfs_hdl, EZFS_NOSPC, + errbuf)); + } fnvlist_add_nvlist(hdrnv, "fss", fss); VERIFY0(nvlist_pack(hdrnv, &packbuf, &buflen, NV_ENCODE_XDR, 0)); @@ -2578,8 +2605,6 @@ recv_read(libzfs_handle_t *hdl, int fd, void *buf, int int rv; int len = ilen; - assert(ilen <= SPA_MAXBLOCKSIZE); - do { rv = read(fd, cp, len); cp += rv; @@ -2613,6 +2638,11 @@ recv_read_nvlist(libzfs_handle_t *hdl, int fd, int len if (buf == NULL) return (ENOMEM); + if (len > hdl->libzfs_max_nvlist) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "nvlist too large")); + return (ENOMEM); + } + err = recv_read(hdl, fd, buf, len, byteswap, zc); if (err != 0) { free(buf); @@ -3783,6 +3813,7 @@ recv_skip(libzfs_handle_t *hdl, int fd, boolean_t byte } payload_size = DRR_WRITE_PAYLOAD_SIZE(&drr->drr_u.drr_write); + assert(payload_size <= SPA_MAXBLOCKSIZE); (void) recv_read(hdl, fd, buf, payload_size, B_FALSE, NULL); break; @@ -4819,7 +4850,8 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const case ZFS_ERR_FROM_IVSET_GUID_MISSING: zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "IV set guid missing. See errata %u at " - "https://zfsonlinux.org/msg/ZFS-8000-ER."), + "https://openzfs.github.io/openzfs-docs/msg/" + "ZFS-8000-ER."), ZPOOL_ERRATA_ZOL_8308_ENCRYPTION); (void) zfs_error(hdl, EZFS_BADSTREAM, errbuf); break; Modified: head/sys/contrib/openzfs/lib/libzfs/libzfs_util.c ============================================================================== --- head/sys/contrib/openzfs/lib/libzfs/libzfs_util.c Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/lib/libzfs/libzfs_util.c Fri Aug 28 18:53:45 2020 (r364930) @@ -1008,6 +1008,7 @@ libzfs_init(void) { libzfs_handle_t *hdl; int error; + char *env; error = libzfs_load_module(); if (error) { @@ -1054,6 +1055,15 @@ libzfs_init(void) if (getenv("ZFS_PROP_DEBUG") != NULL) { hdl->libzfs_prop_debug = B_TRUE; + } + if ((env = getenv("ZFS_SENDRECV_MAX_NVLIST")) != NULL) { + if ((error = zfs_nicestrtonum(hdl, env, + &hdl->libzfs_max_nvlist))) { + errno = error; + return (NULL); + } + } else { + hdl->libzfs_max_nvlist = (SPA_MAXBLOCKSIZE * 4); } /* Modified: head/sys/contrib/openzfs/man/man1/arcstat.1 ============================================================================== --- head/sys/contrib/openzfs/man/man1/arcstat.1 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man1/arcstat.1 Fri Aug 28 18:53:45 2020 (r364930) @@ -13,7 +13,7 @@ .\" Copyright (c) 2015 by Delphix. All rights reserved. .\" Copyright (c) 2020 by AJ Jordan. All rights reserved. .\" -.TH ARCSTAT 1 "May 7, 2020" +.TH ARCSTAT 1 "Aug 24, 2020" OpenZFS .SH NAME arcstat \- report ZFS ARC and L2ARC statistics .SH SYNOPSIS Modified: head/sys/contrib/openzfs/man/man1/cstyle.1 ============================================================================== --- head/sys/contrib/openzfs/man/man1/cstyle.1 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man1/cstyle.1 Fri Aug 28 18:53:45 2020 (r364930) @@ -20,7 +20,7 @@ .\" .\" CDDL HEADER END .\" -.TH cstyle 1 "28 March 2005" +.TH CSTYLE 1 "Aug 24, 2020" OpenZFS .SH NAME .I cstyle \- check for some common stylistic errors in C source files Modified: head/sys/contrib/openzfs/man/man1/raidz_test.1 ============================================================================== --- head/sys/contrib/openzfs/man/man1/raidz_test.1 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man1/raidz_test.1 Fri Aug 28 18:53:45 2020 (r364930) @@ -22,7 +22,7 @@ .\" .\" Copyright (c) 2016 Gvozden NeÅ¡ković. All rights reserved. .\" -.TH raidz_test 1 "2016" "ZFS on Linux" "User Commands" +.TH RAIDZ_TEST 1 "Aug 24, 2020" OpenZFS .SH NAME \fBraidz_test\fR \- raidz implementation verification and benchmarking tool Modified: head/sys/contrib/openzfs/man/man1/zhack.1 ============================================================================== --- head/sys/contrib/openzfs/man/man1/zhack.1 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man1/zhack.1 Fri Aug 28 18:53:45 2020 (r364930) @@ -22,7 +22,7 @@ .\" .\" Copyright 2013 Darik Horn . All rights reserved. .\" -.TH zhack 1 "2013 MAR 16" "ZFS on Linux" "User Commands" +.TH ZHACK 1 "Aug 24, 2020" OpenZFS .SH NAME zhack \- libzpool debugging tool Modified: head/sys/contrib/openzfs/man/man1/ztest.1 ============================================================================== --- head/sys/contrib/openzfs/man/man1/ztest.1 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man1/ztest.1 Fri Aug 28 18:53:45 2020 (r364930) @@ -24,7 +24,7 @@ .\" Copyright (c) 2009 Michael Gebetsroither . All rights .\" reserved. .\" -.TH ztest 1 "2009 NOV 01" "ZFS on Linux" "User Commands" +.TH ZTEST 1 "Aug 24, 2020" OpenZFS .SH NAME \fBztest\fR \- was written by the ZFS Developers as a ZFS unit test. Modified: head/sys/contrib/openzfs/man/man5/spl-module-parameters.5 ============================================================================== --- head/sys/contrib/openzfs/man/man5/spl-module-parameters.5 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man5/spl-module-parameters.5 Fri Aug 28 18:53:45 2020 (r364930) @@ -2,7 +2,7 @@ .\" .\" Copyright 2013 Turbo Fredriksson . All rights reserved. .\" -.TH SPL-MODULE-PARAMETERS 5 "Oct 28, 2017" +.TH SPL-MODULE-PARAMETERS 5 "Aug 24, 2020" OpenZFS .SH NAME spl\-module\-parameters \- SPL module parameters .SH DESCRIPTION @@ -225,7 +225,7 @@ Default value: \fB/etc/hostid\fR \fBspl_panic_halt\fR (uint) .ad .RS 12n -Cause a kernel panic on assertion failures. When not enabled, the thread is +Cause a kernel panic on assertion failures. When not enabled, the thread is halted to facilitate further debugging. .sp Set to a non-zero value to enable. Modified: head/sys/contrib/openzfs/man/man5/vdev_id.conf.5 ============================================================================== --- head/sys/contrib/openzfs/man/man5/vdev_id.conf.5 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man5/vdev_id.conf.5 Fri Aug 28 18:53:45 2020 (r364930) @@ -1,4 +1,4 @@ -.TH vdev_id.conf 5 +.TH VDEV_ID.CONF 5 "Aug 24, 2020" OpenZFS .SH NAME vdev_id.conf \- Configuration file for vdev_id .SH DESCRIPTION Modified: head/sys/contrib/openzfs/man/man5/zfs-events.5 ============================================================================== --- head/sys/contrib/openzfs/man/man5/zfs-events.5 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man5/zfs-events.5 Fri Aug 28 18:53:45 2020 (r364930) @@ -13,7 +13,7 @@ .\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your .\" own identifying information: .\" Portions Copyright [yyyy] [name of copyright owner] -.TH ZFS-EVENTS 5 "Oct 24, 2018" +.TH ZFS-EVENTS 5 "Aug 24, 2020" OpenZFS .SH NAME zfs\-events \- Events created by the ZFS filesystem. .SH DESCRIPTION Modified: head/sys/contrib/openzfs/man/man5/zfs-module-parameters.5 ============================================================================== --- head/sys/contrib/openzfs/man/man5/zfs-module-parameters.5 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man5/zfs-module-parameters.5 Fri Aug 28 18:53:45 2020 (r364930) @@ -14,7 +14,7 @@ .\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your .\" own identifying information: .\" Portions Copyright [yyyy] [name of copyright owner] -.TH ZFS-MODULE-PARAMETERS 5 "Feb 15, 2019" +.TH ZFS-MODULE-PARAMETERS 5 "Aug 24, 2020" OpenZFS .SH NAME zfs\-module\-parameters \- ZFS module parameters .SH DESCRIPTION @@ -201,6 +201,20 @@ Default value: \fB200\fR%. .sp .ne 2 .na +\fBl2arc_meta_percent\fR (int) +.ad +.RS 12n +Percent of ARC size allowed for L2ARC-only headers. +Since L2ARC buffers are not evicted on memory pressure, too large amount of +headers on system with irrationaly large L2ARC can render it slow or unusable. +This parameter limits L2ARC writes and rebuild to achieve it. +.sp +Default value: \fB33\fR%. +.RE + +.sp +.ne 2 +.na \fBl2arc_trim_ahead\fR (ulong) .ad .RS 12n @@ -426,7 +440,7 @@ Default value: \fB16,777,216\fR (16MB) .RS 12n If we are not searching forward (due to metaslab_df_max_search, metaslab_df_free_pct, or metaslab_df_alloc_threshold), this tunable controls -what segment is used. If it is set, we will use the largest free segment. +what segment is used. If it is set, we will use the largest free segment. If it is not set, we will use a segment of exactly the requested size (or larger). .sp @@ -3256,7 +3270,7 @@ Default value: \fB25\fR. \fBzfs_sync_pass_dont_compress\fR (int) .ad .RS 12n -Starting in this sync pass, we disable compression (including of metadata). +Starting in this sync pass, we disable compression (including of metadata). With the default setting, in practice, we don't have this many sync passes, so this has no effect. .sp Modified: head/sys/contrib/openzfs/man/man5/zpool-features.5 ============================================================================== --- head/sys/contrib/openzfs/man/man5/zpool-features.5 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man5/zpool-features.5 Fri Aug 28 18:53:45 2020 (r364930) @@ -16,7 +16,7 @@ .\" Portions Copyright [yyyy] [name of copyright owner] .\" Copyright (c) 2019, Klara Inc. .\" Copyright (c) 2019, Allan Jude -.TH ZPOOL-FEATURES 5 "Jun 8, 2018" +.TH ZPOOL-FEATURES 5 "Aug 24, 2020" OpenZFS .SH NAME zpool\-features \- ZFS pool feature descriptions .SH DESCRIPTION Modified: head/sys/contrib/openzfs/man/man8/fsck.zfs.8 ============================================================================== --- head/sys/contrib/openzfs/man/man8/fsck.zfs.8 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man8/fsck.zfs.8 Fri Aug 28 18:53:45 2020 (r364930) @@ -22,7 +22,7 @@ .\" .\" Copyright 2013 Darik Horn . All rights reserved. .\" -.TH fsck.zfs 8 "2013 MAR 16" "ZFS on Linux" "System Administration Commands" +.TH FSCK.ZFS 8 "Aug 24, 2020" OpenZFS .SH NAME fsck.zfs \- Dummy ZFS filesystem checker. Modified: head/sys/contrib/openzfs/man/man8/mount.zfs.8 ============================================================================== --- head/sys/contrib/openzfs/man/man8/mount.zfs.8 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man8/mount.zfs.8 Fri Aug 28 18:53:45 2020 (r364930) @@ -22,7 +22,7 @@ .\" .\" Copyright 2013 Darik Horn . All rights reserved. .\" -.TH mount.zfs 8 "2013 FEB 28" "ZFS on Linux" "System Administration Commands" +.TH MOUNT.ZFS 8 "Aug 24, 2020" OpenZFS .SH NAME mount.zfs \- mount a ZFS filesystem Modified: head/sys/contrib/openzfs/man/man8/vdev_id.8 ============================================================================== --- head/sys/contrib/openzfs/man/man8/vdev_id.8 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man8/vdev_id.8 Fri Aug 28 18:53:45 2020 (r364930) @@ -1,4 +1,4 @@ -.TH vdev_id 8 +.TH VDEV_ID 8 "Aug 24, 2020" OpenZFS .SH NAME vdev_id \- generate user-friendly names for JBOD disks .SH SYNOPSIS Modified: head/sys/contrib/openzfs/man/man8/zed.8.in ============================================================================== --- head/sys/contrib/openzfs/man/man8/zed.8.in Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man8/zed.8.in Fri Aug 28 18:53:45 2020 (r364930) @@ -11,7 +11,7 @@ .\" "OPENSOLARIS.LICENSE" or at . .\" You may not use this file except in compliance with the license. .\" -.TH ZED 8 "Octember 1, 2013" "ZFS on Linux" "System Administration Commands" +.TH ZED 8 "Aug 24, 2020" OpenZFS .SH NAME ZED \- ZFS Event Daemon Modified: head/sys/contrib/openzfs/man/man8/zfs-mount-generator.8.in ============================================================================== --- head/sys/contrib/openzfs/man/man8/zfs-mount-generator.8.in Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man8/zfs-mount-generator.8.in Fri Aug 28 18:53:45 2020 (r364930) @@ -22,7 +22,7 @@ .\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION .\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -.TH "ZFS\-MOUNT\-GENERATOR" "8" "2020-01-19" "ZFS" "zfs-mount-generator" "\"" +.TH ZFS-MOUNT-GENERATOR 8 "Aug 24, 2020" OpenZFS .SH "NAME" zfs\-mount\-generator \- generates systemd mount units for ZFS Modified: head/sys/contrib/openzfs/man/man8/zfs.8 ============================================================================== --- head/sys/contrib/openzfs/man/man8/zfs.8 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man8/zfs.8 Fri Aug 28 18:53:45 2020 (r364930) @@ -736,6 +736,42 @@ to mount zfs datasets. This option is provided for bac .Xr mount 8 , .Xr net 8 , .Xr selinux 8 , +.Xr zfs-allow 8 , +.Xr zfs-bookmark 8 , +.Xr zfs-change-key 8 , +.Xr zfs-clone 8 , +.Xr zfs-create 8 , +.Xr zfs-destroy 8 , +.Xr zfs-diff 8 , +.Xr zfs-get 8 , +.Xr zfs-groupspace 8 , +.Xr zfs-hold 8 , +.Xr zfs-inherit 8 , +.Xr zfs-jail 8 , +.Xr zfs-list 8 , +.Xr zfs-load-key 8 , +.Xr zfs-mount 8 , +.Xr zfs-program 8 , +.Xr zfs-project 8 , +.Xr zfs-projectspace 8 , +.Xr zfs-promote 8 , +.Xr zfs-receive 8 , +.Xr zfs-redact 8 , +.Xr zfs-release 8 , +.Xr zfs-rename 8 , +.Xr zfs-rollback 8 , +.Xr zfs-send 8 , +.Xr zfs-set 8 , +.Xr zfs-share 8 , +.Xr zfs-snapshot 8 , +.Xr zfs-unallow 8 , +.Xr zfs-unjail 8 , +.Xr zfs-unload-key 8 , +.Xr zfs-unmount 8 , +.Xr zfs-unshare 8 , +.Xr zfs-upgrade 8 , +.Xr zfs-userspace 8 , +.Xr zfs-wait 8 , .Xr zfsconcepts 8 , .Xr zfsprops 8 , .Xr zpool 8 Modified: head/sys/contrib/openzfs/man/man8/zinject.8 ============================================================================== --- head/sys/contrib/openzfs/man/man8/zinject.8 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man8/zinject.8 Fri Aug 28 18:53:45 2020 (r364930) @@ -22,7 +22,7 @@ .\" .\" Copyright 2013 Darik Horn . All rights reserved. .\" -.TH zinject 8 "2013 FEB 28" "ZFS on Linux" "System Administration Commands" +.TH ZINJECT 8 "Aug 24, 2020" OpenZFS .SH NAME zinject \- ZFS Fault Injector Modified: head/sys/contrib/openzfs/man/man8/zpool-iostat.8 ============================================================================== --- head/sys/contrib/openzfs/man/man8/zpool-iostat.8 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man8/zpool-iostat.8 Fri Aug 28 18:53:45 2020 (r364930) @@ -65,9 +65,9 @@ When given an .Ar interval , the statistics are printed every .Ar interval -seconds until ^C is pressed. If +seconds until ^C is pressed. If .Fl n -flag is specified the headers are displayed only once, otherwise they are +flag is specified the headers are displayed only once, otherwise they are displayed periodically. If count is specified, the command exits after count reports are printed. The first report printed is always the statistics since boot regardless of whether Modified: head/sys/contrib/openzfs/man/man8/zpool.8 ============================================================================== --- head/sys/contrib/openzfs/man/man8/zpool.8 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man8/zpool.8 Fri Aug 28 18:53:45 2020 (r364930) @@ -559,10 +559,41 @@ is not set, it is assumed that the user is allowed to .Sh INTERFACE STABILITY .Sy Evolving .Sh SEE ALSO -.Xr zpoolconcepts 8 , -.Xr zpoolprops 8 , .Xr zfs-events 5 , .Xr zfs-module-parameters 5 , .Xr zpool-features 5 , .Xr zed 8 , -.Xr zfs 8 +.Xr zfs 8 , +.Xr zpool-add 8 , +.Xr zpool-attach 8 , +.Xr zpool-checkpoint 8 , +.Xr zpool-clear 8 , +.Xr zpool-create 8 , +.Xr zpool-destroy 8 , +.Xr zpool-detach 8 , +.Xr zpool-events 8 , +.Xr zpool-export 8 , +.Xr zpool-get 8 , +.Xr zpool-history 8 , +.Xr zpool-import 8 , +.Xr zpool-initialize 8 , +.Xr zpool-iostat 8 , +.Xr zpool-labelclear 8 , +.Xr zpool-list 8 , +.Xr zpool-offline 8 , +.Xr zpool-online 8 , +.Xr zpool-reguid 8 , +.Xr zpool-remove 8 , +.Xr zpool-reopen 8 , +.Xr zpool-replace 8 , +.Xr zpool-resilver 8 , +.Xr zpool-scrub 8 , +.Xr zpool-set 8 , +.Xr zpool-split 8 , +.Xr zpool-status 8 , +.Xr zpool-sync 8 , +.Xr zpool-trim 8 , +.Xr zpool-upgrade 8 , +.Xr zpool-wait 8 , +.Xr zpoolconcepts 8 , +.Xr zpoolprops 8 Modified: head/sys/contrib/openzfs/man/man8/zstreamdump.8 ============================================================================== --- head/sys/contrib/openzfs/man/man8/zstreamdump.8 Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/man/man8/zstreamdump.8 Fri Aug 28 18:53:45 2020 (r364930) @@ -3,7 +3,7 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH zstreamdump 8 "29 Aug 2012" "ZFS pool 28, filesystem 5" "System Administration Commands" +.TH ZSTREAMDUMP 8 "Aug 24, 2020" OpenZFS .SH NAME zstreamdump \- filter data in zfs send stream .SH SYNOPSIS Modified: head/sys/contrib/openzfs/module/Makefile.bsd ============================================================================== --- head/sys/contrib/openzfs/module/Makefile.bsd Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/module/Makefile.bsd Fri Aug 28 18:53:45 2020 (r364930) @@ -356,4 +356,4 @@ CFLAGS.zil.c= -Wno-cast-qual CFLAGS.zio.c= -Wno-cast-qual CFLAGS.zrlock.c= -Wno-cast-qual CFLAGS.zfs_zstd.c= -Wno-cast-qual -Wno-pointer-arith -CFLAGS.zstd.c= -fno-tree-vectorize +CFLAGS.zstd.c= -fno-tree-vectorize -U__BMI__ Modified: head/sys/contrib/openzfs/module/lua/setjmp/setjmp_ppc.S ============================================================================== --- head/sys/contrib/openzfs/module/lua/setjmp/setjmp_ppc.S Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/module/lua/setjmp/setjmp_ppc.S Fri Aug 28 18:53:45 2020 (r364930) @@ -56,7 +56,7 @@ #define ENTRY(name) \ .align 2 ; \ .type name,@function; \ - .globl name; \ + .weak name; \ name: #else /* PPC64_ELF_ABI_v1 */ @@ -65,8 +65,8 @@ name: #define GLUE(a,b) XGLUE(a,b) #define ENTRY(name) \ .align 2 ; \ - .globl name; \ - .globl GLUE(.,name); \ + .weak name; \ + .weak GLUE(.,name); \ .pushsection ".opd","aw"; \ name: \ .quad GLUE(.,name); \ @@ -83,8 +83,8 @@ GLUE(.,name): #define ENTRY(name) \ .text; \ .p2align 4; \ - .globl name; \ - .type name,@function; \ + .weak name; \ + .type name,@function; \ name: #endif /* __powerpc64__ */ Modified: head/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c ============================================================================== --- head/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/module/os/linux/zfs/zfs_ctldir.c Fri Aug 28 18:53:45 2020 (r364930) @@ -31,6 +31,7 @@ * Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. * Copyright (c) 2018 George Melikov. All Rights Reserved. * Copyright (c) 2019 Datto, Inc. All rights reserved. + * Copyright (c) 2020 The MathWorks, Inc. All rights reserved. */ /* @@ -978,6 +979,22 @@ out: } /* + * Flush everything out of the kernel's export table and such. + * This is needed as once the snapshot is used over NFS, its + * entries in svc_export and svc_expkey caches hold reference + * to the snapshot mount point. There is no known way of flushing + * only the entries related to the snapshot. + */ +static void +exportfs_flush(void) +{ + char *argv[] = { "/usr/sbin/exportfs", "-f", NULL }; + char *envp[] = { NULL }; + + (void) call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC); +} + +/* * Attempt to unmount a snapshot by making a call to user space. * There is no assurance that this can or will succeed, is just a * best effort. In the case where it does fail, perhaps because @@ -998,6 +1015,8 @@ zfsctl_snapshot_unmount(char *snapname, int flags) return (SET_ERROR(ENOENT)); } rw_exit(&zfs_snapshot_lock); + + exportfs_flush(); if (flags & MNT_FORCE) argv[4] = "-fn"; Modified: head/sys/contrib/openzfs/module/zcommon/zfs_fletcher.c ============================================================================== --- head/sys/contrib/openzfs/module/zcommon/zfs_fletcher.c Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/module/zcommon/zfs_fletcher.c Fri Aug 28 18:53:45 2020 (r364930) @@ -187,7 +187,7 @@ static const fletcher_4_ops_t *fletcher_4_impls[] = { #if defined(__x86_64) && defined(HAVE_AVX512BW) &fletcher_4_avx512bw_ops, #endif -#if defined(__aarch64__) +#if defined(__aarch64__) && !defined(__FreeBSD__) &fletcher_4_aarch64_neon_ops, #endif }; Modified: head/sys/contrib/openzfs/module/zfs/arc.c ============================================================================== --- head/sys/contrib/openzfs/module/zfs/arc.c Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/module/zfs/arc.c Fri Aug 28 18:53:45 2020 (r364930) @@ -823,6 +823,7 @@ unsigned long l2arc_feed_min_ms = L2ARC_FEED_MIN_MS; / int l2arc_noprefetch = B_TRUE; /* don't cache prefetch bufs */ int l2arc_feed_again = B_TRUE; /* turbo warmup */ int l2arc_norw = B_FALSE; /* no reads during writes */ +int l2arc_meta_percent = 33; /* limit on headers size */ /* * L2ARC Internals @@ -4988,9 +4989,6 @@ arc_adapt(int bytes, arc_state_t *state) int64_t mrug_size = zfs_refcount_count(&arc_mru_ghost->arcs_size); int64_t mfug_size = zfs_refcount_count(&arc_mfu_ghost->arcs_size); - if (state == arc_l2c_only) - return; - ASSERT(bytes > 0); /* * Adapt the target size of the MRU list: @@ -9144,6 +9142,15 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint return (write_asize); } +static boolean_t +l2arc_hdr_limit_reached(void) +{ + int64_t s = aggsum_upper_bound(&astat_l2_hdr_size); + + return (arc_reclaim_needed() || (s > arc_meta_limit * 3 / 4) || + (s > (arc_warm ? arc_c : arc_c_max) * l2arc_meta_percent / 100)); +} + /* * This thread feeds the L2ARC at regular intervals. This is the beating * heart of the L2ARC. @@ -9211,7 +9218,7 @@ l2arc_feed_thread(void *unused) /* * Avoid contributing to memory pressure. */ - if (arc_reclaim_needed()) { + if (l2arc_hdr_limit_reached()) { ARCSTAT_BUMP(arcstat_l2_abort_lowmem); spa_config_exit(spa, SCL_L2ARC, dev); continue; @@ -9662,7 +9669,7 @@ l2arc_rebuild(l2arc_dev_t *dev) * online the L2ARC dev at a later time (or re-import the pool) * to reconstruct it (when there's less memory pressure). */ - if (arc_reclaim_needed()) { + if (l2arc_hdr_limit_reached()) { ARCSTAT_BUMP(arcstat_l2_rebuild_abort_lowmem); cmn_err(CE_NOTE, "System running low on memory, " "aborting L2ARC rebuild."); @@ -10002,6 +10009,13 @@ l2arc_log_blk_restore(l2arc_dev_t *dev, const l2arc_lo uint64_t size = 0, asize = 0; uint64_t log_entries = dev->l2ad_log_entries; + /* + * Usually arc_adapt() is called only for data, not headers, but + * since we may allocate significant amount of memory here, let ARC + * grow its arc_c. + */ + arc_adapt(log_entries * HDR_L2ONLY_SIZE, arc_l2c_only); + for (int i = log_entries - 1; i >= 0; i--) { /* * Restore goes in the reverse temporal direction to preserve @@ -10537,6 +10551,9 @@ ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, feed_again, INT, Z ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, norw, INT, ZMOD_RW, "No reads during writes"); + +ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, meta_percent, INT, ZMOD_RW, + "Percent of ARC size allowed for L2ARC-only headers"); ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, rebuild_enabled, INT, ZMOD_RW, "Rebuild the L2ARC when importing a pool"); Modified: head/sys/contrib/openzfs/module/zfs/dmu.c ============================================================================== --- head/sys/contrib/openzfs/module/zfs/dmu.c Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/module/zfs/dmu.c Fri Aug 28 18:53:45 2020 (r364930) @@ -2458,6 +2458,7 @@ EXPORT_SYMBOL(dmu_object_set_blocksize); EXPORT_SYMBOL(dmu_object_set_maxblkid); EXPORT_SYMBOL(dmu_object_set_checksum); EXPORT_SYMBOL(dmu_object_set_compress); +EXPORT_SYMBOL(dmu_offset_next); EXPORT_SYMBOL(dmu_write_policy); EXPORT_SYMBOL(dmu_sync); EXPORT_SYMBOL(dmu_request_arcbuf); Modified: head/sys/contrib/openzfs/module/zfs/dnode_sync.c ============================================================================== --- head/sys/contrib/openzfs/module/zfs/dnode_sync.c Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/module/zfs/dnode_sync.c Fri Aug 28 18:53:45 2020 (r364930) @@ -23,6 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2018 by Delphix. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. + * Copyright 2020 Oxide Computer Company */ #include @@ -762,13 +763,22 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) dsfra.dsfra_dnode = dn; dsfra.dsfra_tx = tx; dsfra.dsfra_free_indirects = freeing_dnode; + mutex_enter(&dn->dn_mtx); if (freeing_dnode) { ASSERT(range_tree_contains(dn->dn_free_ranges[txgoff], 0, dn->dn_maxblkid + 1)); } - mutex_enter(&dn->dn_mtx); - range_tree_vacate(dn->dn_free_ranges[txgoff], + /* + * Because dnode_sync_free_range() must drop dn_mtx during its + * processing, using it as a callback to range_tree_vacate() is + * not safe. No other operations (besides destroy) are allowed + * once range_tree_vacate() has begun, and dropping dn_mtx + * would leave a window open for another thread to observe that + * invalid (and unsafe) state. + */ + range_tree_walk(dn->dn_free_ranges[txgoff], dnode_sync_free_range, &dsfra); + range_tree_vacate(dn->dn_free_ranges[txgoff], NULL, NULL); range_tree_destroy(dn->dn_free_ranges[txgoff]); dn->dn_free_ranges[txgoff] = NULL; mutex_exit(&dn->dn_mtx); Modified: head/sys/contrib/openzfs/module/zfs/dsl_dir.c ============================================================================== --- head/sys/contrib/openzfs/module/zfs/dsl_dir.c Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/module/zfs/dsl_dir.c Fri Aug 28 18:53:45 2020 (r364930) @@ -121,13 +121,6 @@ * and updated by dsl_fs_ss_count_adjust(). A new limit value is setup in * dsl_dir_activate_fs_ss_limit() and the counts are adjusted, if necessary, by * dsl_dir_init_fs_ss_count(). - * - * There is a special case when we receive a filesystem that already exists. In - * this case a temporary clone name of %X is created (see dmu_recv_begin). We - * never update the filesystem counts for temporary clones. - * - * Likewise, we do not update the snapshot counts for temporary snapshots, - * such as those created by zfs diff. */ extern inline dsl_dir_phys_t *dsl_dir_phys(dsl_dir_t *dd); @@ -593,11 +586,9 @@ dsl_dir_init_fs_ss_count(dsl_dir_t *dd, dmu_tx_t *tx) &chld_dd)); /* - * Ignore hidden ($FREE, $MOS & $ORIGIN) objsets and - * temporary datasets. + * Ignore hidden ($FREE, $MOS & $ORIGIN) objsets. */ - if (chld_dd->dd_myname[0] == '$' || - chld_dd->dd_myname[0] == '%') { + if (chld_dd->dd_myname[0] == '$') { dsl_dir_rele(chld_dd, FTAG); continue; } @@ -910,14 +901,12 @@ dsl_fs_ss_count_adjust(dsl_dir_t *dd, int64_t delta, c strcmp(prop, DD_FIELD_SNAPSHOT_COUNT) == 0); /* - * When we receive an incremental stream into a filesystem that already - * exists, a temporary clone is created. We don't count this temporary - * clone, whose name begins with a '%'. We also ignore hidden ($FREE, - * $MOS & $ORIGIN) objsets. + * We don't do accounting for hidden ($FREE, $MOS & $ORIGIN) objsets. */ - if ((dd->dd_myname[0] == '%' || dd->dd_myname[0] == '$') && - strcmp(prop, DD_FIELD_FILESYSTEM_COUNT) == 0) + if (dd->dd_myname[0] == '$' && strcmp(prop, + DD_FIELD_FILESYSTEM_COUNT) == 0) { return; + } /* * e.g. if renaming a dataset with no snapshots, count adjustment is 0 Modified: head/sys/contrib/openzfs/module/zfs/sa.c ============================================================================== --- head/sys/contrib/openzfs/module/zfs/sa.c Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/module/zfs/sa.c Fri Aug 28 18:53:45 2020 (r364930) @@ -39,7 +39,6 @@ #include #include #include -#include #include #include Modified: head/sys/contrib/openzfs/module/zfs/spa.c ============================================================================== --- head/sys/contrib/openzfs/module/zfs/spa.c Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/module/zfs/spa.c Fri Aug 28 18:53:45 2020 (r364930) @@ -3201,7 +3201,8 @@ spa_verify_host(spa_t *spa, nvlist_t *mos_config) cmn_err(CE_WARN, "pool '%s' could not be " "loaded as it was last accessed by " "another system (host: %s hostid: 0x%llx). " - "See: http://illumos.org/msg/ZFS-8000-EY", + "See: https://openzfs.github.io/openzfs-docs/msg/" + "ZFS-8000-EY", spa_name(spa), hostname, (u_longlong_t)hostid); spa_load_failed(spa, "hostid verification failed: pool " "last accessed by host: %s (hostid: 0x%llx)", Modified: head/sys/contrib/openzfs/module/zfs/vdev_raidz_math.c ============================================================================== --- head/sys/contrib/openzfs/module/zfs/vdev_raidz_math.c Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/module/zfs/vdev_raidz_math.c Fri Aug 28 18:53:45 2020 (r364930) @@ -61,7 +61,7 @@ const raidz_impl_ops_t *raidz_all_maths[] = { #if defined(__x86_64) && defined(HAVE_AVX512BW) /* only x86_64 for now */ &vdev_raidz_avx512bw_impl, #endif -#if defined(__aarch64__) +#if defined(__aarch64__) && !defined(__FreeBSD__) &vdev_raidz_aarch64_neon_impl, &vdev_raidz_aarch64_neonx2_impl, #endif Modified: head/sys/contrib/openzfs/module/zstd/Makefile.in ============================================================================== --- head/sys/contrib/openzfs/module/zstd/Makefile.in Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/module/zstd/Makefile.in Fri Aug 28 18:53:45 2020 (r364930) @@ -20,6 +20,9 @@ ccflags-y += -O3 # Set it for other compilers, too. $(obj)/lib/zstd.o: c_flags += -fno-tree-vectorize +# SSE register return with SSE disabled if -march=znverX is passed +$(obj)/lib/zstd.o: c_flags += -U__BMI__ + # Quiet warnings about frame size due to unused code in unmodified zstd lib $(obj)/lib/zstd.o: c_flags += -Wframe-larger-than=20480 Modified: head/sys/contrib/openzfs/tests/runfiles/common.run ============================================================================== --- head/sys/contrib/openzfs/tests/runfiles/common.run Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/tests/runfiles/common.run Fri Aug 28 18:53:45 2020 (r364930) @@ -216,7 +216,7 @@ tests = ['zfs_receive_001_pos', 'zfs_receive_002_pos', 'zfs_receive_016_pos', 'receive-o-x_props_override', 'zfs_receive_from_encrypted', 'zfs_receive_to_encrypted', 'zfs_receive_raw', 'zfs_receive_raw_incremental', 'zfs_receive_-e', - 'zfs_receive_raw_-d', 'zfs_receive_from_zstd'] + 'zfs_receive_raw_-d', 'zfs_receive_from_zstd', 'zfs_receive_new_props'] tags = ['functional', 'cli_root', 'zfs_receive'] [tests/functional/cli_root/zfs_rename] Modified: head/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am ============================================================================== --- head/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am Fri Aug 28 18:45:14 2020 (r364929) +++ head/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am Fri Aug 28 18:53:45 2020 (r364930) @@ -21,6 +21,7 @@ dist_pkgdata_SCRIPTS = \ receive-o-x_props_override.ksh \ zfs_receive_from_encrypted.ksh \ zfs_receive_from_zstd.ksh \ + zfs_receive_new_props.ksh \ zfs_receive_to_encrypted.ksh \ zfs_receive_raw.ksh \ zfs_receive_raw_incremental.ksh \ Copied: head/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_new_props.ksh (from r364929, vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_new_props.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_new_props.ksh Fri Aug 28 18:53:45 2020 (r364930, copy of r364929, vendor-sys/openzfs/dist/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_new_props.ksh) @@ -0,0 +1,77 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2020 by Delphix. All rights reserved. +# + +. $STF_SUITE/include/libtest.shlib + +# +# DESCRIPTION: +# ZFS receive test to handle Issue #10698 +# +# STRATEGY: +# 1. Create a pool with filesystem_limits disabled +# 2. Create a filesystem on that pool +# 3. Enable filesystem limits on that pool +# 4. On a pool with filesystem limits enabled, create a filesystem and set a +# limit +# 5. Snapshot limited filesystem +# 6. send -R limited filesystem and receive over filesystem with limits disabled +# + +verify_runnable "both" + +function cleanup +{ + destroy_pool "$poolname" + destroy_pool "$rpoolname" + log_must rm -f "$vdevfile" + log_must rm -f "$rvdevfile" + log_must rm -f "$streamfile" +} + +log_onexit cleanup + +log_assert "ZFS should handle receiving streams with filesystem limits on \ + pools where the feature was recently enabled" + +poolname=sendpool +rpoolname=recvpool +vdevfile="$TEST_BASE_DIR/vdevfile.$$" +rvdevfile="$TEST_BASE_DIR/rvdevfile.$$" +sendfs="$poolname/fs" +recvfs="$rpoolname/rfs" +streamfile="$TEST_BASE_DIR/streamfile.$$" + +log_must truncate -s $MINVDEVSIZE "$rvdevfile" +log_must truncate -s $MINVDEVSIZE "$vdevfile" +log_must zpool create -O mountpoint=none -o feature@filesystem_limits=disabled \ + "$rpoolname" "$rvdevfile" +log_must zpool create -O mountpoint=none "$poolname" "$vdevfile" + +log_must zfs create "$recvfs" +log_must zpool set feature@filesystem_limits=enabled "$rpoolname" + +log_must zfs create -o filesystem_limit=100 "$sendfs" +log_must zfs snapshot "$sendfs@a" + +log_must zfs send -R "$sendfs@a" >"$streamfile" +log_must eval "zfs recv -svuF $recvfs <$streamfile" + +log_pass "ZFS can handle receiving streams with filesystem limits on \ + pools where the feature was recently enabled" From owner-svn-src-all@freebsd.org Fri Aug 28 19:02:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D6FFB3BC914; Fri, 28 Aug 2020 19:02:05 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdTVP5PN8z49rs; Fri, 28 Aug 2020 19:02:05 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DE3319A3F; Fri, 28 Aug 2020 19:02:05 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07SJ25rW054315; Fri, 28 Aug 2020 19:02:05 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SJ25VK054314; Fri, 28 Aug 2020 19:02:05 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202008281902.07SJ25VK054314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Fri, 28 Aug 2020 19:02:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364931 - head/sys/arm64/conf X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/arm64/conf X-SVN-Commit-Revision: 364931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 19:02:05 -0000 Author: mmacy Date: Fri Aug 28 19:02:05 2020 New Revision: 364931 URL: https://svnweb.freebsd.org/changeset/base/364931 Log: ZFS: add to arm64 NOTES to minimize potential for missing symbols Modified: head/sys/arm64/conf/NOTES Modified: head/sys/arm64/conf/NOTES ============================================================================== --- head/sys/arm64/conf/NOTES Fri Aug 28 18:53:45 2020 (r364930) +++ head/sys/arm64/conf/NOTES Fri Aug 28 19:02:05 2020 (r364931) @@ -231,3 +231,8 @@ nooptions COMPAT_FREEBSD10 # arm64 supports 32-bit FreeBSD/arm binaries (armv[67] ABIs) options COMPAT_FREEBSD32 # Compatible with FreeBSD/arm + +##################################################################### +# ZFS support + +options ZFS From owner-svn-src-all@freebsd.org Fri Aug 28 19:21:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B01A3BD484; Fri, 28 Aug 2020 19:21:12 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdTwR73bYz4DQ7; Fri, 28 Aug 2020 19:21: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 D6C8E19AC4; Fri, 28 Aug 2020 19:21: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 07SJLBfv066270; Fri, 28 Aug 2020 19:21:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SJLBE2066269; Fri, 28 Aug 2020 19:21:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202008281921.07SJLBE2066269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 28 Aug 2020 19:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364932 - head/sys/dev/usb X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb X-SVN-Commit-Revision: 364932 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 19:21:12 -0000 Author: hselasky Date: Fri Aug 28 19:21:11 2020 New Revision: 364932 URL: https://svnweb.freebsd.org/changeset/base/364932 Log: Allow slow USB devices to be given more time to return their USB descriptors, like Logitech HD Pro Webcam C920. PR: 248926 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/usb_request.c Modified: head/sys/dev/usb/usb_request.c ============================================================================== --- head/sys/dev/usb/usb_request.c Fri Aug 28 19:02:05 2020 (r364931) +++ head/sys/dev/usb/usb_request.c Fri Aug 28 19:21:11 2020 (r364932) @@ -721,7 +721,8 @@ done: case USB_ERR_CANCELLED: break; default: - DPRINTF("I/O error - waiting a bit for TT cleanup\n"); + DPRINTF("error=%s - waiting a bit for TT cleanup\n", + usbd_errstr(err)); usb_pause_mtx(mtx, hz / 16); break; } @@ -1010,7 +1011,7 @@ usbd_req_get_desc(struct usb_device *udev, USETW(req.wLength, min_len); err = usbd_do_request_flags(udev, mtx, &req, - desc, 0, NULL, 500 /* ms */); + desc, 0, NULL, 1000 /* ms */); if (err != 0 && err != USB_ERR_TIMEOUT && min_len != max_len) { @@ -1021,7 +1022,7 @@ usbd_req_get_desc(struct usb_device *udev, USETW(req.wLength, max_len); err = usbd_do_request_flags(udev, mtx, &req, - desc, USB_SHORT_XFER_OK, NULL, 500 /* ms */); + desc, USB_SHORT_XFER_OK, NULL, 1000 /* ms */); if (err == 0) { /* verify length */ From owner-svn-src-all@freebsd.org Fri Aug 28 19:50:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E0AAB3BE89E; Fri, 28 Aug 2020 19:50:40 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdVZS5gK2z4GwG; Fri, 28 Aug 2020 19:50:40 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A63841A283; Fri, 28 Aug 2020 19:50:40 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07SJoe49081487; Fri, 28 Aug 2020 19:50:40 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SJoepc081486; Fri, 28 Aug 2020 19:50:40 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <202008281950.07SJoepc081486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 28 Aug 2020 19:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364933 - in head: lib/libmemstat sys/vm X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: in head: lib/libmemstat sys/vm X-SVN-Commit-Revision: 364933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 19:50:40 -0000 Author: vangyzen Date: Fri Aug 28 19:50:40 2020 New Revision: 364933 URL: https://svnweb.freebsd.org/changeset/base/364933 Log: memstat_kvm_uma: fix reading of uma_zone_domain structures Coverity flagged the scaling by sizeof(uzd). That is the type of the pointer, so the scaling was already done by pointer arithmetic. However, this was also passing a stack frame pointer to kvm_read, so it was doubly wrong. Move ZDOM_GET into the !_KERNEL section and use it in libmemstat. Reported by: Coverity Reviewed by: markj MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26213 Modified: head/lib/libmemstat/memstat_uma.c head/sys/vm/uma_int.h Modified: head/lib/libmemstat/memstat_uma.c ============================================================================== --- head/lib/libmemstat/memstat_uma.c Fri Aug 28 19:21:11 2020 (r364932) +++ head/lib/libmemstat/memstat_uma.c Fri Aug 28 19:50:40 2020 (r364933) @@ -455,9 +455,8 @@ skip_percpu: mtp->mt_byteslimit = mtp->mt_countlimit * mtp->mt_size; mtp->mt_count = mtp->mt_numallocs - mtp->mt_numfrees; for (i = 0; i < ndomains; i++) { - ret = kread(kvm, - &uz.uz_cpu[mp_maxid + 1] + i * sizeof(uzd), - &uzd, sizeof(uzd), 0); + ret = kread(kvm, ZDOM_GET(uzp, i), &uzd, + sizeof(uzd), 0); if (ret != 0) continue; for (ubp = Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Fri Aug 28 19:21:11 2020 (r364932) +++ head/sys/vm/uma_int.h Fri Aug 28 19:50:40 2020 (r364933) @@ -526,6 +526,10 @@ struct uma_zone { KASSERT(uma_zone_get_allocs((z)) == 0, \ ("zone %s initialization after use.", (z)->uz_name)) +/* Domains are contiguous after the last CPU */ +#define ZDOM_GET(z, n) \ + (&((uma_zone_domain_t)&(z)->uz_cpu[mp_maxid + 1])[n]) + #undef UMA_ALIGN #ifdef _KERNEL @@ -560,10 +564,6 @@ static __inline uma_slab_t hash_sfind(struct uma_hash #define KEG_ASSERT_COLD(k) \ KASSERT(uma_keg_get_allocs((k)) == 0, \ ("keg %s initialization after use.", (k)->uk_name)) - -/* Domains are contiguous after the last CPU */ -#define ZDOM_GET(z, n) \ - (&((uma_zone_domain_t)&(z)->uz_cpu[mp_maxid + 1])[n]) #define ZDOM_LOCK_INIT(z, zdom, lc) \ do { \ From owner-svn-src-all@freebsd.org Fri Aug 28 19:52:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 888623BE4B8; Fri, 28 Aug 2020 19:52:17 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdVcK38fgz4Gq1; Fri, 28 Aug 2020 19:52:17 +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 4FB8E19FF4; Fri, 28 Aug 2020 19:52:17 +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 07SJqH3p087008; Fri, 28 Aug 2020 19:52:17 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SJqHKe087007; Fri, 28 Aug 2020 19:52:17 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008281952.07SJqHKe087007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 28 Aug 2020 19:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364934 - in stable: 11/sys/kern 12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/kern 12/sys/kern X-SVN-Commit-Revision: 364934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 19:52:17 -0000 Author: jhb Date: Fri Aug 28 19:52:16 2020 New Revision: 364934 URL: https://svnweb.freebsd.org/changeset/base/364934 Log: MFC 361613: Permit SO_NO_DDP and SO_NO_OFFLOAD to be read via getsockopt(2). Modified: stable/12/sys/kern/uipc_socket.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/kern/uipc_socket.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/kern/uipc_socket.c ============================================================================== --- stable/12/sys/kern/uipc_socket.c Fri Aug 28 19:50:40 2020 (r364933) +++ stable/12/sys/kern/uipc_socket.c Fri Aug 28 19:52:16 2020 (r364934) @@ -3023,6 +3023,8 @@ sogetopt(struct socket *so, struct sockopt *sopt) case SO_TIMESTAMP: case SO_BINTIME: case SO_NOSIGPIPE: + case SO_NO_DDP: + case SO_NO_OFFLOAD: optval = so->so_options & sopt->sopt_name; integer: error = sooptcopyout(sopt, &optval, sizeof optval); From owner-svn-src-all@freebsd.org Fri Aug 28 19:52:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E007D3BE737; Fri, 28 Aug 2020 19:52:17 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdVcK5YLjz4H39; Fri, 28 Aug 2020 19:52:17 +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 A1B721A2A4; Fri, 28 Aug 2020 19:52:17 +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 07SJqHgj087014; Fri, 28 Aug 2020 19:52:17 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SJqH27087013; Fri, 28 Aug 2020 19:52:17 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202008281952.07SJqH27087013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 28 Aug 2020 19:52:17 +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: r364934 - in stable: 11/sys/kern 12/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/kern 12/sys/kern X-SVN-Commit-Revision: 364934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 19:52:17 -0000 Author: jhb Date: Fri Aug 28 19:52:16 2020 New Revision: 364934 URL: https://svnweb.freebsd.org/changeset/base/364934 Log: MFC 361613: Permit SO_NO_DDP and SO_NO_OFFLOAD to be read via getsockopt(2). Modified: stable/11/sys/kern/uipc_socket.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/kern/uipc_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/kern/uipc_socket.c ============================================================================== --- stable/11/sys/kern/uipc_socket.c Fri Aug 28 19:50:40 2020 (r364933) +++ stable/11/sys/kern/uipc_socket.c Fri Aug 28 19:52:16 2020 (r364934) @@ -2805,6 +2805,8 @@ sogetopt(struct socket *so, struct sockopt *sopt) case SO_TIMESTAMP: case SO_BINTIME: case SO_NOSIGPIPE: + case SO_NO_DDP: + case SO_NO_OFFLOAD: optval = so->so_options & sopt->sopt_name; integer: error = sooptcopyout(sopt, &optval, sizeof optval); From owner-svn-src-all@freebsd.org Fri Aug 28 19:59:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F4A13BECC7; Fri, 28 Aug 2020 19:59:03 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdVm72PtTz4J0D; Fri, 28 Aug 2020 19:59:03 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 367711A40C; Fri, 28 Aug 2020 19:59:03 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07SJx2VW087622; Fri, 28 Aug 2020 19:59:02 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SJx2bV087621; Fri, 28 Aug 2020 19:59:02 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <202008281959.07SJx2bV087621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 28 Aug 2020 19:59:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364935 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 364935 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 19:59:03 -0000 Author: vangyzen Date: Fri Aug 28 19:59:02 2020 New Revision: 364935 URL: https://svnweb.freebsd.org/changeset/base/364935 Log: vm_pageout_scan_active: ensure ps_delta is initialized Reported by: Coverity Reviewed by: markj MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26212 Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Fri Aug 28 19:52:16 2020 (r364934) +++ head/sys/vm/vm_pageout.c Fri Aug 28 19:59:02 2020 (r364935) @@ -1287,8 +1287,10 @@ act_scan: * so, discarding any references collected by * pmap_ts_referenced(). */ - if (__predict_false(_vm_page_queue(old) == PQ_NONE)) + if (__predict_false(_vm_page_queue(old) == PQ_NONE)) { + ps_delta = 0; break; + } /* * Advance or decay the act_count based on recent usage. From owner-svn-src-all@freebsd.org Fri Aug 28 20:03:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5D8AC3BF2D4; Fri, 28 Aug 2020 20:03:56 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdVsm2CP9z4JRl; Fri, 28 Aug 2020 20:03:56 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 302431A3E0; Fri, 28 Aug 2020 20:03:56 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07SK3uja093530; Fri, 28 Aug 2020 20:03:56 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SK3tuD093523; Fri, 28 Aug 2020 20:03:55 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202008282003.07SK3tuD093523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Fri, 28 Aug 2020 20:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364936 - in head: lib lib/libnetmap share/mk X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in head: lib lib/libnetmap share/mk X-SVN-Commit-Revision: 364936 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 20:03:56 -0000 Author: vmaffione Date: Fri Aug 28 20:03:54 2020 New Revision: 364936 URL: https://svnweb.freebsd.org/changeset/base/364936 Log: lib: add libnetmap This changeset introduces the new libnetmap library for writing netmap applications. Before libnetmap, applications could either use the kernel API directly (e.g. NIOCREGIF/NIOCCTRL) or the simple header-only-library netmap_user.h (e.g. nm_open(), nm_close(), nm_mmap() etc.) The new library offers more functionalities than netmap_user.h: - Support for complex netmap options, such as external memory allocators or per-buffer offsets. This opens the way to future extensions. - More flexibility in the netmap port bind options, such as non-numeric names for pipes, or the ability to specify the netmap allocator that must be used for a given port. - Automatic tracking of the netmap memory regions in use across the open ports. At the moment there is no man page, but the libnetmap.h header file has in-depth documentation. Reviewed by: hrs MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26171 Added: head/lib/libnetmap/ head/lib/libnetmap/Makefile (contents, props changed) head/lib/libnetmap/libnetmap.h (contents, props changed) head/lib/libnetmap/nmctx-pthreads.c (contents, props changed) head/lib/libnetmap/nmctx.c (contents, props changed) head/lib/libnetmap/nmport.c (contents, props changed) head/lib/libnetmap/nmreq.c (contents, props changed) Modified: head/lib/Makefile head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Fri Aug 28 19:59:02 2020 (r364935) +++ head/lib/Makefile Fri Aug 28 20:03:54 2020 (r364936) @@ -71,6 +71,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libmt \ lib80211 \ libnetbsd \ + libnetmap \ libnv \ libopenbsd \ libopie \ Added: head/lib/libnetmap/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnetmap/Makefile Fri Aug 28 20:03:54 2020 (r364936) @@ -0,0 +1,16 @@ +# +# $FreeBSD$ +# + +.include + +PACKAGE= lib${LIB} +LIB= netmap +SRCS= nmctx.c nmport.c \ + nmctx-pthreads.c nmreq.c +INCS= libnetmap.h +#MAN= libnetmap.3 +CFLAGS+= -I${SRCTOP}/sys/net -I${.CURDIR} +WARNS?= 2 + +.include Added: head/lib/libnetmap/libnetmap.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnetmap/libnetmap.h Fri Aug 28 20:03:54 2020 (r364936) @@ -0,0 +1,660 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 2018 Universita` di Pisa + * 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$ + */ + +#ifndef LIBNETMAP_H_ +#define LIBNETMAP_H_ +/* if thread-safety is not needed, define LIBNETMAP_NOTHREADSAFE before including + * this file. + */ + +/* NOTE: we include net/netmap_user.h without defining NETMAP_WITH_LIBS, which + * is deprecated. If you still need it, please define NETMAP_WITH_LIBS and + * include net/netmap_user.h before including this file. + */ +#include + +struct nmctx; +struct nmport_d; +struct nmem_d; + +/* + * A port open specification (portspec for brevity) has the following syntax + * (square brackets delimit optional parts): + * + * subsystem:vpname[mode][options] + * + * The "subsystem" is denoted by a prefix, possibly followed by an identifier. + * There can be several kinds of subsystems, each one selected by a unique + * prefix. Currently defined subsystems are: + * + * netmap (no id allowed) + * the standard subsystem + * + * vale (followed by a possibly empty id) + * the vpname is connected to a VALE switch identified by + * the id (an empty id selects the default switch) + * + * The "vpname" has the following syntax: + * + * identifier or + * identifier1{identifier2 or + * identifier1}identifier2 + * + * Identifiers are sequences of alphanumeric characters. The part that begins + * with either '{' or '}', when present, denotes a netmap pipe opened in the + * same memory region as the subsystem:indentifier1 port. + * + * The "mode" can be one of the following: + * + * ^ bind all host (sw) ring pairs + * ^NN bind individual host ring pair + * * bind host and NIC ring pairs + * -NN bind individual NIC ring pair + * @NN open the port in the NN memory region + * a suffix starting with / and the following flags, + * in any order: + * x exclusive access + * z zero copy monitor (both tx and rx) + * t monitor tx side (copy monitor) + * r monitor rx side (copy monitor) + * R bind only RX ring(s) + * T bind only TX ring(s) + * + * The "options" start at the first '@' character not followed by a number. + * Each option starts with '@' and has the following syntax: + * + * option (flag option) + * option=value (single key option) + * option:key1=value1,key2=value2,... (multi-key option) + * + * For multi-key options, the keys can be assigned in any order, but they + * cannot be assigned more than once. It is not necessary to assign all the + * option keys: unmentioned keys will receive default values. Some multi-key + * options define a default key and also accept the single-key syntax, by + * assigning the value to this key. + * + * NOTE: Options may be silently ignored if the port is already open by some + * other process. + * + * The currently available options are (default keys, when defined, are marked + * with '*'): + * + * share (single-key) + * open the port in the same memory region used by the + * given port name (the port name must be given in + * subsystem:vpname form) + * + * conf (multi-key) + * specify the rings/slots numbers (effective only on + * ports that are created by the open operation itself, + * and ignored otherwise). + * + * The keys are: + * + * *rings number of tx and rx rings + * tx-rings number of tx rings + * rx-rings number of rx rings + * host-rings number of tx and rx host rings + * host-tx-rings number of host tx rings + * host-rx-rings number of host rx rings + * slots number of slots in each tx and rx + * ring + * tx-slots number of slots in each tx ring + * rx-slots number of slots in each rx ring + * + * (more specific keys override the less specific ones) + * All keys default to zero if not assigned, and the + * corresponding value will be chosen by netmap. + * + * extmem (multi-key) + * open the port in the memory region obtained by + * mmap()ing the given file. + * + * The keys are: + * + * *file the file to mmap + * if-num number of pre-allocated netmap_if's + * if-size size of each netmap_if + * ring-num number of pre-allocated netmap_ring's + * ring-size size of each netmap_ring + * buf-num number of pre-allocated buffers + * buf-size size of each buffer + * + * file must be assigned. The other keys default to zero, + * causing netmap to take the corresponding values from + * the priv_{if,ring,buf}_{num,size} sysctls. + * + */ + + +/* nmport manipulation */ + +/* struct nmport_d - describes a netmap port */ +struct nmport_d { + /* see net/netmap.h for the definition of these fields */ + struct nmreq_header hdr; + struct nmreq_register reg; + + /* all the fields below should be considered read-only */ + + /* if the same context is used throughout the program, d1->mem == + * d2->mem iff d1 and d2 are using the memory region (i.e., zero + * copy is possible between the two ports) + */ + struct nmem_d *mem; + + /* the nmctx used when this nmport_d was created */ + struct nmctx *ctx; + + int register_done; /* nmport_register() has been called */ + int mmap_done; /* nmport_mmap() has been called */ + /* pointer to the extmem option contained in the hdr options, if any */ + struct nmreq_opt_extmem *extmem; + + /* the fields below are compatible with nm_open() */ + int fd; /* "/dev/netmap", -1 if not open */ + struct netmap_if *nifp; /* pointer to the netmap_if */ + uint16_t first_tx_ring; + uint16_t last_tx_ring; + uint16_t first_rx_ring; + uint16_t last_rx_ring; + uint16_t cur_tx_ring; /* used by nmport_inject */ + uint16_t cur_rx_ring; + + /* LIFO list of cleanup functions (used internally) */ + struct nmport_cleanup_d *clist; +}; + +/* nmport_open - opens a port from a portspec + * @portspec the port opening specification + * + * If successful, the function returns a new nmport_d describing a netmap + * port, opened according to the port specification, ready to be used for rx + * and/or tx. + * + * The rings available for tx are in the [first_tx_ring, last_tx_ring] + * interval, and similarly for rx. One or both intervals may be empty. + * + * When done using it, the nmport_d descriptor must be closed using + * nmport_close(). + * + * In case of error, NULL is returned, errno is set to some error, and an + * error message is sent through the error() method of the current context. + */ +struct nmport_d * nmport_open(const char *portspec); + +/* nport_close - close a netmap port + * @d the port we want to close + * + * Undoes the actions performed by the nmport_open that created d, then + * frees the descriptor. + */ +void nmport_close(struct nmport_d *d); + +/* nmport_inject - sends a packet + * @d the port through which we want to send + * @buf base address of the packet + * @size its size in bytes + * + * Sends a packet using the cur_tx_ring and updates the index + * to use all available tx rings in turn. Note: the packet is copied. + * + * Returns 0 on success an -1 on error. + */ +int nmport_inject(struct nmport_d *d, const void *buf, size_t size); + +/* + * the functions below can be used to split the functionality of + * nmport_open when special features (e.g., extra buffers) are needed + * + * The relation among the functions is as follows: + * + * |nmport_new + * |nmport_prepare = | + * | |nmport_parse + * nmport_open =| + * | |nmport_register + * |nmport_open_desc =| + * |nmport_mmap + * + */ + +/* nmport_new - create a new nmport_d + * + * Creates a new nmport_d using the malloc() method of the current default + * context. Returns NULL on error, setting errno to an error value. + */ +struct nmport_d *nmport_new(void); + +/* nmport_parse - fills the nmport_d netmap-register request + * @d the nmport to be filled + * @portspec the port opening specification + * + * This function parses the portspec and initizalizes the @d->hdr and @d->reg + * fields. It may need to allocate a list of options. If an extmem option is + * found, it may also mmap() the corresponding file. + * + * It returns 0 on success. On failure it returns -1, sets errno to an error + * value and sends an error message to the error() method of the context used + * when @d was created. Moreover, *@d is left unchanged. + */ +int nmport_parse(struct nmport_d *d, const char *portspec); + +/* nmport_register - registers the port with netmap + * @d the nmport to be registered + * + * This function obtains a netmap file descriptor and registers the port with + * netmap. The @d->hdr and @d->reg data structures must have been previously + * initialized (via nmport_parse() or otherwise). + * + * It returns 0 on success. On failure it returns -1, sets errno to an error + * value and sends an error message to the error() method of the context used + * when @d was created. Moreover, *@d is left unchanged. + */ +int nmport_register(struct nmport_d *); + +/* nmport_mmap - maps the port resources into the process memory + * @d the nmport to be mapped + * + * The port must have been previously been registered using nmport_register. + * + * Note that if extmem is used (either via an option or by calling an + * nmport_extmem_* function before nmport_register()), no new mmap() is issued. + * + * It returns 0 on success. On failure it returns -1, sets errno to an error + * value and sends an error message to the error() method of the context used + * when @d was created. Moreover, *@d is left unchanged. + */ +int nmport_mmap(struct nmport_d *); + +/* the following functions undo the actions of nmport_new(), nmport_parse(), + * nmport_register() and nmport_mmap(), respectively. + */ +void nmport_delete(struct nmport_d *); +void nmport_undo_parse(struct nmport_d *); +void nmport_undo_register(struct nmport_d *); +void nmport_undo_mmap(struct nmport_d *); + +/* nmport_prepare - create a port descriptor, but do not open it + * @portspec the port opening specification + * + * This functions creates a new nmport_d and initializes it according to + * @portspec. It is equivalent to nmport_new() followed by nmport_parse(). + * + * It returns 0 on success. On failure it returns -1, sets errno to an error + * value and sends an error message to the error() method of the context used + * when @d was created. Moreover, *@d is left unchanged. + */ +struct nmport_d *nmport_prepare(const char *portspec); + +/* nmport_open_desc - open an initialized port descriptor + * @d the descriptor we want to open + * + * Registers the port with netmap and maps the rings and buffers into the + * process memory. It is equivalent to nmport_register() followed by + * nmport_mmap(). + * + * It returns 0 on success. On failure it returns -1, sets errno to an error + * value and sends an error message to the error() method of the context used + * when @d was created. Moreover, *@d is left unchanged. + */ +int nmport_open_desc(struct nmport_d *d); + +/* the following functions undo the actions of nmport_prepare() + * and nmport_open_desc(), respectively. + */ +void nmport_undo_prepare(struct nmport_d *); +void nmport_undo_open_desc(struct nmport_d *); + +/* nmport_clone - copy an nmport_d + * @d the nmport_d we want to copy + * + * Copying an nmport_d by hand should be avoided, since adjustments are needed + * and some part of the state cannot be easily duplicated. This function + * creates a copy of @d in a safe way. The returned nmport_d contains + * nmreq_header and nmreq_register structures equivalent to those contained in + * @d, except for the option list, which is ignored. The returned nmport_d is + * already nmport_prepare()d, but it must still be nmport_open_desc()ed. The + * new nmport_d uses the same nmctx as @d. + * + * If extmem was used for @d, then @d cannot be nmport_clone()d until it has + * been nmport_register()ed. + * + * In case of error, the function returns NULL, sets errno to an error value + * and sends an error message to the nmctx error() method. + */ +struct nmport_d *nmport_clone(struct nmport_d *); + +/* nmport_extmem - use extmem for this port + * @d the port we want to use the extmem for + * @base the base address of the extmem region + * @size the size in bytes of the extmem region + * + * the memory that contains the netmap ifs, rings and buffers is usually + * allocated by netmap and later mmap()ed by the applications. It is sometimes + * useful to reverse this process, by having the applications allocate some + * memory (through mmap() or otherwise) and then let netmap use it. The extmem + * option can be used to implement this latter strategy. The option can be + * passed through the portspec using the '@extmem:...' syntax, or + * programmatically by calling nmport_extmem() or nmport_extmem_from_file() + * between nmport_parse() and nmport_register() (or between nmport_prepare() + * and nmport_open_desc()). + * + * It returns 0 on success. On failure it returns -1, sets errno to an error + * value and sends an error message to the error() method of the context used + * when @d was created. Moreover, *@d is left unchanged. + */ +int nmport_extmem(struct nmport_d *d, void *base, size_t size); + +/* nmport_extmem_from_file - use the extmem obtained by mapping a file + * @d the port we want to use the extmem for + * @fname path of the file we want to map + * + * This works like nmport_extmem, but the extmem memory is obtained by + * mmap()ping @fname. nmport_close() will also automatically munmap() the file. + * + * It returns 0 on success. On failure it returns -1, sets errno to an error + * value and sends an error message to the error() method of the context used + * when @d was created. Moreover, *@d is left unchanged. + */ +int nmport_extmem_from_file(struct nmport_d *d, const char *fname); + +/* nmport_extmem_getinfo - opbtai a pointer to the extmem configuration + * @d the port we want to obtain the pointer from + * + * Returns a pointer to the nmreq_pools_info structure containing the + * configuration of the extmem attached to port @d, or NULL if no extmem + * is attached. This can be used to set the desired configuration before + * registering the port, or to read the actual configuration after + * registration. + */ +struct nmreq_pools_info* nmport_extmem_getinfo(struct nmport_d *d); + + +/* enable/disable options + * + * These functions can be used to disable options that the application cannot + * or doesn't want to handle, or to enable options that require special support + * from the application and are, therefore, disabled by default. Disabled + * options will cause an error if encountered during option parsing. + * + * If the option is unknown, nmport_disable_option is a NOP, while + * nmport_enable_option returns -1 and sets errno to EOPNOTSUPP. + * + * These functions are not threadsafe and are meant to be used at the beginning + * of the program. + */ +void nmport_disable_option(const char *opt); +int nmport_enable_option(const char *opt); + +/* nmreq manipulation + * + * nmreq_header_init - initialize an nmreq_header + * @hdr the nmreq_header to initialize + * @reqtype the kind of netmap request + * @body the body of the request + * + * Initialize the nr_version, nr_reqtype and nr_body fields of *@hdr. + * The other fields are set to zero. + */ +void nmreq_header_init(struct nmreq_header *hdr, uint16_t reqtype, void *body); + +/* + * These functions allow for finer grained parsing of portspecs. They are used + * internally by nmport_parse(). + */ + +/* nmreq_header_decode - initialize an nmreq_header + * @ppspec: (in/out) pointer to a pointer to the portspec + * @hdr: pointer to the nmreq_header to be initialized + * @ctx: pointer to the nmctx to use (for errors) + * + * This function fills the @hdr the nr_name field with the port name extracted + * from *@pifname. The other fields of *@hdr are unchanged. The @pifname is + * updated to point at the first char past the port name. + * + * Returns 0 on success. In case of error, -1 is returned with errno set to + * EINVAL, @pifname is unchanged, *@hdr is also unchanged, and an error message + * is sent through @ctx->error(). + */ +int nmreq_header_decode(const char **ppspec, struct nmreq_header *hdr, + struct nmctx *ctx); + +/* nmreq_regiter_decode - initialize an nmreq_register + * @pmode: (in/out) pointer to a pointer to an opening mode + * @reg: pointer to the nmreq_register to be initialized + * @ctx: pointer to the nmctx to use (for errors) + * + * This function fills the nr_mode, nr_ringid, nr_flags and nr_mem_id fields of + * the structure pointed by @reg, according to the opening mode specified by + * *@pmode. The other fields of *@reg are unchanged. The @pmode is updated to + * point at the first char past the opening mode. + * + * If a '@' is encountered followed by something which is not a number, parsing + * stops (without error) and @pmode is left pointing at the '@' char. The + * nr_mode, nr_ringid and nr_flags fields are still updated, but nr_mem_id is + * not touched and the interpretation of the '@' field is left to the caller. + * + * Returns 0 on success. In case of error, -1 is returned with errno set to + * EINVAL, @pmode is unchanged, *@reg is also unchanged, and an error message + * is sent through @ctx->error(). + */ +int nmreq_register_decode(const char **pmode, struct nmreq_register *reg, + struct nmctx *ctx); + +/* nmreq_options_decode - parse the "options" part of the portspec + * @opt: pointer to the option list + * @parsers: list of option parsers + * @token: token to pass to each parser + * @ctx: pointer to the nmctx to use (for errors and malloc/free) + * + * This function parses each option in @opt. Each option is matched (based on + * the "option" prefix) to a corresponding parser in @parsers. The function + * checks that the syntax is appropriate for the parser and it assigns all the + * keys mentioned in the option. It then passes control to the parser, to + * interpret the keys values. + * + * Returns 0 on success. In case of error, -1 is returned, errno is set to an + * error value and a message is sent to @ctx->error(). The effects of partially + * interpreted options may not be undone. + */ +struct nmreq_opt_parser; +int nmreq_options_decode(const char *opt, struct nmreq_opt_parser *parsers, + void *token, struct nmctx *ctx); + +struct nmreq_parse_ctx; +/* type of the option-parsers callbacks */ +typedef int (*nmreq_opt_parser_cb)(struct nmreq_parse_ctx *); + +#define NMREQ_OPT_MAXKEYS 16 /* max nr of recognized keys per option */ + +/* struct nmreq_opt_key - describes an option key */ +struct nmreq_opt_key { + const char *key; /* the key name */ + int id; /* its position in the parse context */ + unsigned int flags; +#define NMREQ_OPTK_ALLOWEMPTY (1U << 0) /* =value may be omitted */ +#define NMREQ_OPTK_MUSTSET (1U << 1) /* the key is mandatory */ +#define NMREQ_OPTK_DEFAULT (1U << 2) /* this is the default key */ +}; + +/* struct nmreq_opt_parser - describes an option parser */ +struct nmreq_opt_parser { + const char *prefix; /* matches one option prefix */ + nmreq_opt_parser_cb parse; /* the parse callback */ + int default_key; /* which option is the default if the + parser is multi-key (-1 if none) */ + int nr_keys; + unsigned int flags; +#define NMREQ_OPTF_DISABLED (1U << 0) +#define NMREQ_OPTF_ALLOWEMPTY (1U << 1) /* =value can be omitted */ + + struct nmreq_opt_parser *next; /* list of options */ + + /* recognized keys */ + struct nmreq_opt_key keys[NMREQ_OPT_MAXKEYS]; +} __attribute__((aligned(16))); + +/* struct nmreq_parse_ctx - the parse context received by the parse callback */ +struct nmreq_parse_ctx { + struct nmctx *ctx; /* the nmctx for errors and malloc/free */ + void *token; /* the token passed to nmreq_options_parse */ + + /* the value (i.e., the part after the = sign) of each recognized key + * is assigned to the corresponding entry in this array, based on the + * key id. Unassigned keys are left at NULL. + */ + const char *keys[NMREQ_OPT_MAXKEYS]; +}; + +/* nmreq_get_mem_id - get the mem_id of the given port + * @portname pointer to a pointer to the portname + * @ctx pointer to the nmctx to use (for errors) + * + * *@portname must point to a substem:vpname porname, possibly followed by + * something else. + * + * If successful, returns the mem_id of *@portname and moves @portname past the + * subsystem:vpname part of the input. In case of error it returns -1, sets + * errno to an error value and sends an error message to ctx->error(). + */ +int32_t nmreq_get_mem_id(const char **portname, struct nmctx *ctx); + +/* option list manipulation */ +void nmreq_push_option(struct nmreq_header *, struct nmreq_option *); +void nmreq_remove_option(struct nmreq_header *, struct nmreq_option *); +struct nmreq_option *nmreq_find_option(struct nmreq_header *, uint32_t); +void nmreq_free_options(struct nmreq_header *); +const char* nmreq_option_name(uint32_t); +#define nmreq_foreach_option(h_, o_) \ + for ((o_) = (struct nmreq_option *)((h_)->nr_options);\ + (o_) != NULL;\ + (o_) = (struct nmreq_option *)((o_)->nro_next)) + +/* nmctx manipulation */ + +/* the nmctx serves a few purposes: + * + * - maintain a list of all memory regions open by the program, so that two + * ports that are using the same region (as identified by the mem_id) will + * point to the same nmem_d instance. + * + * - allow the user to specify how to lock accesses to the above list, if + * needed (lock() callback) + * + * - allow the user to specify how error messages should be delivered (error() + * callback) + * + * - select the verbosity of the library (verbose field); if verbose==0, no + * errors are sent to the error() callback + * + * - allow the user to override the malloc/free functions used by the library + * (malloc() and free() callbacks) + * + */ +typedef void (*nmctx_error_cb)(struct nmctx *, const char *); +typedef void *(*nmctx_malloc_cb)(struct nmctx *,size_t); +typedef void (*nmctx_free_cb)(struct nmctx *,void *); +typedef void (*nmctx_lock_cb)(struct nmctx *, int); + +struct nmctx { + int verbose; + nmctx_error_cb error; + nmctx_malloc_cb malloc; + nmctx_free_cb free; + nmctx_lock_cb lock; + + struct nmem_d *mem_descs; +}; + +/* nmctx_get - obtain a pointer to the current default context */ +struct nmctx *nmctx_get(void); + +/* nmctx_set_default - change the default context + * @ctx pointer to the new context + * + * Returns a pointer to the previous default context. + */ +struct nmctx *nmctx_set_default(struct nmctx *ctx); + +/* internal functions and data structures */ + +/* struct nmem_d - describes a memory region currently used */ +struct nmem_d { + uint16_t mem_id; /* the region netmap identifier */ + int refcount; /* how many nmport_d's point here */ + void *mem; /* memory region base address */ + size_t size; /* memory region size */ + int is_extmem; /* was it obtained via extmem? */ + + /* pointers for the circular list implementation. + * The list head is the mem_descs filed in the nmctx + */ + struct nmem_d *next; + struct nmem_d *prev; +}; + +/* a trick to force the inclusion of libpthread only if requested. If + * LIBNETMAP_NOTHREADSAFE is defined, no pthread symbol is imported. + * + * There is no need to actually call this function: the ((used)) attribute is + * sufficient to include it in the image. + */ +static __attribute__((used)) void libnetmap_init(void) +{ +#ifndef LIBNETMAP_NOTHREADSAFE + extern int nmctx_threadsafe; + /* dummy assignment to link-in the nmctx-pthread.o object. The proper + * inizialization is performed only once in the library constructor + * defined there. + */ + nmctx_threadsafe = 1; +#endif /* LIBNETMAP_NOTHREADSAFE */ +} + +/* nmctx_set_threadsafe - install a threadsafe default context + * + * called by the constructor in nmctx-pthread.o to initialize a lock and install + * the lock() callback in the default context. + */ +void nmctx_set_threadsafe(void); + +/* nmctx_ferror - format and send an error message */ +void nmctx_ferror(struct nmctx *, const char *, ...); +/* nmctx_malloc - allocate memory */ +void *nmctx_malloc(struct nmctx *, size_t); +/* nmctx_free - free memory allocated via nmctx_malloc */ +void nmctx_free(struct nmctx *, void *); +/* nmctx_lock - lock the list of nmem_d */ +void nmctx_lock(struct nmctx *); +/* nmctx_unlock - unlock the list of nmem_d */ +void nmctx_unlock(struct nmctx *); + +#endif /* LIBNETMAP_H_ */ Added: head/lib/libnetmap/nmctx-pthreads.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnetmap/nmctx-pthreads.c Fri Aug 28 20:03:54 2020 (r364936) @@ -0,0 +1,47 @@ +/* $FreeBSD$ */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "libnetmap.h" + +struct nmctx_pthread { + struct nmctx up; + pthread_mutex_t mutex; +}; + +static struct nmctx_pthread nmctx_pthreadsafe; + +static void +nmctx_pthread_lock(struct nmctx *ctx, int lock) +{ + struct nmctx_pthread *ctxp = + (struct nmctx_pthread *)ctx; + if (lock) { + pthread_mutex_lock(&ctxp->mutex); + } else { + pthread_mutex_unlock(&ctxp->mutex); + } +} + +void __attribute__ ((constructor)) +nmctx_set_threadsafe(void) +{ + struct nmctx *old; + + pthread_mutex_init(&nmctx_pthreadsafe.mutex, NULL); + old = nmctx_set_default(&nmctx_pthreadsafe.up); + nmctx_pthreadsafe.up = *old; + nmctx_pthreadsafe.up.lock = nmctx_pthread_lock; +} + +int nmctx_threadsafe; Added: head/lib/libnetmap/nmctx.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnetmap/nmctx.c Fri Aug 28 20:03:54 2020 (r364936) @@ -0,0 +1,111 @@ +/* $FreeBSD$ */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define LIBNETMAP_NOTHREADSAFE +#include "libnetmap.h" + +static void +nmctx_default_error(struct nmctx *ctx, const char *errmsg) +{ + fprintf(stderr, "%s\n", errmsg); +} + +static void * +nmctx_default_malloc(struct nmctx *ctx, size_t sz) +{ + (void)ctx; + return malloc(sz); +} + +static void +nmctx_default_free(struct nmctx *ctx, void *p) +{ + (void)ctx; + free(p); +} + +static struct nmctx nmctx_global = { + .verbose = 1, + .error = nmctx_default_error, + .malloc = nmctx_default_malloc, + .free = nmctx_default_free, + .lock = NULL, +}; + +static struct nmctx *nmctx_default = &nmctx_global; + +struct nmctx * +nmctx_get(void) +{ + return nmctx_default; +} + +struct nmctx * +nmctx_set_default(struct nmctx *ctx) +{ + struct nmctx *old = nmctx_default; + nmctx_default = ctx; + return old; +} + +#define MAXERRMSG 1000 +void +nmctx_ferror(struct nmctx *ctx, const char *fmt, ...) +{ + char errmsg[MAXERRMSG]; + va_list ap; + int rv; + + if (!ctx->verbose) + return; + + va_start(ap, fmt); + rv = vsnprintf(errmsg, MAXERRMSG, fmt, ap); + va_end(ap); + + if (rv > 0) { + if (rv < MAXERRMSG) { + ctx->error(ctx, errmsg); + } else { + ctx->error(ctx, "error message too long"); + } + } else { + ctx->error(ctx, "internal error"); + } +} + +void * +nmctx_malloc(struct nmctx *ctx, size_t sz) +{ + return ctx->malloc(ctx, sz); +} + +void +nmctx_free(struct nmctx *ctx, void *p) +{ + ctx->free(ctx, p); +} + +void +nmctx_lock(struct nmctx *ctx) +{ + if (ctx->lock != NULL) + ctx->lock(ctx, 1); +} + +void +nmctx_unlock(struct nmctx *ctx) +{ + if (ctx->lock != NULL) + ctx->lock(ctx, 0); +} Added: head/lib/libnetmap/nmport.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnetmap/nmport.c Fri Aug 28 20:03:54 2020 (r364936) @@ -0,0 +1,810 @@ +/* $FreeBSD$ */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define LIBNETMAP_NOTHREADSAFE +#include "libnetmap.h" + +struct nmport_cleanup_d { + struct nmport_cleanup_d *next; + void (*cleanup)(struct nmport_cleanup_d *, struct nmport_d *); +}; + +static void +nmport_push_cleanup(struct nmport_d *d, struct nmport_cleanup_d *c) +{ + c->next = d->clist; + d->clist = c; +} + +static void +nmport_pop_cleanup(struct nmport_d *d) +{ + struct nmport_cleanup_d *top; + + top = d->clist; + d->clist = d->clist->next; + (*top->cleanup)(top, d); + nmctx_free(d->ctx, top); +} + +void nmport_do_cleanup(struct nmport_d *d) +{ + while (d->clist != NULL) { + nmport_pop_cleanup(d); + } +} + +static struct nmport_d * +nmport_new_with_ctx(struct nmctx *ctx) +{ + struct nmport_d *d; + + /* allocate a descriptor */ + d = nmctx_malloc(ctx, sizeof(*d)); + if (d == NULL) { + nmctx_ferror(ctx, "cannot allocate nmport descriptor"); + goto out; + } + memset(d, 0, sizeof(*d)); + + nmreq_header_init(&d->hdr, NETMAP_REQ_REGISTER, &d->reg); + + d->ctx = ctx; + d->fd = -1; + +out: + return d; +} + +struct nmport_d * +nmport_new(void) +{ + struct nmctx *ctx = nmctx_get(); + return nmport_new_with_ctx(ctx); +} + + +void +nmport_delete(struct nmport_d *d) +{ + nmctx_free(d->ctx, d); +} + +void +nmport_extmem_cleanup(struct nmport_cleanup_d *c, struct nmport_d *d) +{ + (void)c; + + if (d->extmem == NULL) + return; + + nmreq_remove_option(&d->hdr, &d->extmem->nro_opt); + nmctx_free(d->ctx, d->extmem); + d->extmem = NULL; +} + + +int +nmport_extmem(struct nmport_d *d, void *base, size_t size) +{ + struct nmctx *ctx = d->ctx; + struct nmport_cleanup_d *clnup = NULL; + + if (d->register_done) { + nmctx_ferror(ctx, "%s: cannot set extmem of an already registered port", d->hdr.nr_name); + errno = EINVAL; + return -1; + } + + if (d->extmem != NULL) { + nmctx_ferror(ctx, "%s: extmem already in use", d->hdr.nr_name); + errno = EINVAL; + return -1; + } + + clnup = (struct nmport_cleanup_d *)nmctx_malloc(ctx, sizeof(*clnup)); + if (clnup == NULL) { + nmctx_ferror(ctx, "failed to allocate cleanup descriptor"); + errno = ENOMEM; + return -1; + } + + d->extmem = nmctx_malloc(ctx, sizeof(*d->extmem)); + if (d->extmem == NULL) { + nmctx_ferror(ctx, "%s: cannot allocate extmem option", d->hdr.nr_name); + nmctx_free(ctx, clnup); + errno = ENOMEM; + return -1; + } + memset(d->extmem, 0, sizeof(*d->extmem)); + d->extmem->nro_usrptr = (uintptr_t)base; + d->extmem->nro_opt.nro_reqtype = NETMAP_REQ_OPT_EXTMEM; + d->extmem->nro_info.nr_memsize = size; + nmreq_push_option(&d->hdr, &d->extmem->nro_opt); + + clnup->cleanup = nmport_extmem_cleanup; + nmport_push_cleanup(d, clnup); + + return 0; +} + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Aug 28 20:05:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D34633BF16C; Fri, 28 Aug 2020 20:05:18 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdVvL5HCfz4JxB; Fri, 28 Aug 2020 20:05:18 +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 98B6819E65; Fri, 28 Aug 2020 20:05:18 +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 07SK5IVL093672; Fri, 28 Aug 2020 20:05:18 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SK5I6N093671; Fri, 28 Aug 2020 20:05:18 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008282005.07SK5I6N093671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 28 Aug 2020 20:05:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364937 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 364937 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 20:05:18 -0000 Author: tuexen Date: Fri Aug 28 20:05:18 2020 New Revision: 364937 URL: https://svnweb.freebsd.org/changeset/base/364937 Log: Fix a regression with the explicit EOR mode I introduced in r364268. A short MFC time as discussed with the secteam. Reported by: Taylor Brandstetter MFC after: 1 day Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Fri Aug 28 20:03:54 2020 (r364936) +++ head/sys/netinet/sctp_output.c Fri Aug 28 20:05:18 2020 (r364937) @@ -13118,11 +13118,10 @@ skip_preblock: error = EINVAL; goto out; } - SCTP_TCB_SEND_UNLOCK(stcb); - strm = &stcb->asoc.strmout[srcv->sinfo_stream]; if (strm->last_msg_incomplete == 0) { do_a_copy_in: + SCTP_TCB_SEND_UNLOCK(stcb); sp = sctp_copy_it_in(stcb, asoc, srcv, uio, net, max_len, user_marks_eor, &error); if (error) { goto out; @@ -13151,19 +13150,8 @@ skip_preblock: sp->processing = 1; TAILQ_INSERT_TAIL(&strm->outqueue, sp, next); stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, asoc, strm, sp, 1); - SCTP_TCB_SEND_UNLOCK(stcb); } else { - SCTP_TCB_SEND_LOCK(stcb); sp = TAILQ_LAST(&strm->outqueue, sctp_streamhead); - if (sp->processing) { - SCTP_TCB_SEND_UNLOCK(stcb); - SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); - error = EINVAL; - goto out; - } else { - sp->processing = 1; - } - SCTP_TCB_SEND_UNLOCK(stcb); if (sp == NULL) { /* ???? Huh ??? last msg is gone */ #ifdef INVARIANTS @@ -13175,7 +13163,16 @@ skip_preblock: goto do_a_copy_in; } + if (sp->processing) { + SCTP_TCB_SEND_UNLOCK(stcb); + SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); + error = EINVAL; + goto out; + } else { + sp->processing = 1; + } } + SCTP_TCB_SEND_UNLOCK(stcb); while (uio->uio_resid > 0) { /* How much room do we have? */ struct mbuf *new_tail, *mm; @@ -13200,6 +13197,11 @@ skip_preblock: if (mm) { sctp_m_freem(mm); } + SCTP_TCB_SEND_LOCK(stcb); + if (sp != NULL) { + sp->processing = 0; + } + SCTP_TCB_SEND_UNLOCK(stcb); goto out; } /* Update the mbuf and count */ @@ -13215,6 +13217,9 @@ skip_preblock: SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ECONNRESET); error = ECONNRESET; } + if (sp != NULL) { + sp->processing = 0; + } SCTP_TCB_SEND_UNLOCK(stcb); goto out; } @@ -13274,6 +13279,11 @@ skip_preblock: /* wait for space now */ if (non_blocking) { /* Non-blocking io in place out */ + SCTP_TCB_SEND_LOCK(stcb); + if (sp != NULL) { + sp->processing = 0; + } + SCTP_TCB_SEND_UNLOCK(stcb); goto skip_out_eof; } /* What about the INIT, send it maybe */ @@ -13401,6 +13411,11 @@ skip_preblock: } } SOCKBUF_UNLOCK(&so->so_snd); + SCTP_TCB_SEND_LOCK(stcb); + if (sp != NULL) { + sp->processing = 0; + } + SCTP_TCB_SEND_UNLOCK(stcb); goto out_unlocked; } @@ -13410,9 +13425,15 @@ skip_preblock: } } SOCKBUF_UNLOCK(&so->so_snd); + SCTP_TCB_SEND_LOCK(stcb); if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { + if (sp != NULL) { + sp->processing = 0; + } + SCTP_TCB_SEND_UNLOCK(stcb); goto out_unlocked; } + SCTP_TCB_SEND_UNLOCK(stcb); } SCTP_TCB_SEND_LOCK(stcb); if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) || From owner-svn-src-all@freebsd.org Fri Aug 28 20:25:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 869153BFCC5; Fri, 28 Aug 2020 20:25:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdWL83MK3z4M7V; Fri, 28 Aug 2020 20:25:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B8FE1A821; Fri, 28 Aug 2020 20:25:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07SKP4CG007107; Fri, 28 Aug 2020 20:25:04 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SKP30t007104; Fri, 28 Aug 2020 20:25:03 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202008282025.07SKP30t007104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 28 Aug 2020 20:25:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364938 - stable/12/sys/arm64/rockchip/clk X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/sys/arm64/rockchip/clk X-SVN-Commit-Revision: 364938 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 20:25:04 -0000 Author: gonzo Date: Fri Aug 28 20:25:03 2020 New Revision: 364938 URL: https://svnweb.freebsd.org/changeset/base/364938 Log: MFC r357250, r363926-r363927 r357250 (by ganbold@): Add USB3 related clock definitions for Rockchip RK3328 SoC. Reviewed by: manu r363926: Add flag for SYSCON-controlled clocks on Rockhip platform Ethernet clocks on RK3328 are controlled by SYSCON registers, so add RK_CLK_COMPOSITE_GRF flag to indicate that clock node should access grf registers instead of CRU's Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D25918 r363927: Add clocks for ethernet controllers on RK3328 Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D25918 Modified: stable/12/sys/arm64/rockchip/clk/rk3328_cru.c stable/12/sys/arm64/rockchip/clk/rk_clk_composite.c stable/12/sys/arm64/rockchip/clk/rk_clk_composite.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/clk/rk3328_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3328_cru.c Fri Aug 28 20:05:18 2020 (r364937) +++ stable/12/sys/arm64/rockchip/clk/rk3328_cru.c Fri Aug 28 20:25:03 2020 (r364938) @@ -50,8 +50,31 @@ __FBSDID("$FreeBSD$"); #include +/* Registers */ +#define RK3328_GRF_SOC_CON4 0x410 +#define RK3328_GRF_MAC_CON1 0x904 +#define RK3328_GRF_MAC_CON2 0x908 + /* GATES */ +#define SCLK_MAC2PHY_RXTX 83 +#define SCLK_MAC2PHY_SRC 84 +#define SCLK_MAC2PHY_REF 85 +#define SCLK_MAC2PHY_OUT 86 +#define SCLK_MAC2IO_RX 87 +#define SCLK_MAC2IO_TX 88 +#define SCLK_MAC2IO_REFOUT 89 +#define SCLK_MAC2IO_REF 90 +#define SCLK_MAC2IO_OUT 91 +#define SCLK_USB3OTG_REF 96 +#define SCLK_MAC2IO_SRC 99 +#define SCLK_MAC2IO 100 +#define SCLK_MAC2PHY 101 +#define SCLK_MAC2IO_EXT 102 +#define ACLK_USB3OTG 132 +#define ACLK_GMAC 146 +#define ACLK_MAC2PHY 149 +#define ACLK_MAC2IO 150 #define ACLK_PERI 153 #define PCLK_GPIO0 200 #define PCLK_GPIO1 201 @@ -62,6 +85,12 @@ __FBSDID("$FreeBSD$"); #define PCLK_I2C2 207 #define PCLK_I2C3 208 #define PCLK_TSADC 213 +#define PCLK_GMAC 220 +#define PCLK_MAC2PHY 222 +#define PCLK_MAC2IO 223 +#define PCLK_USB3PHY_OTG 224 +#define PCLK_USB3PHY_PIPE 225 +#define PCLK_USB3_GRF 226 #define HCLK_SDMMC 317 #define HCLK_SDIO 318 #define HCLK_EMMC 319 @@ -77,11 +106,20 @@ static struct rk_cru_gate rk3328_gates[] = { /* CRU_CLKGATE_CON4 */ CRU_GATE(0, "gpll_peri", "gpll", 0x210, 0) CRU_GATE(0, "cpll_peri", "cpll", 0x210, 1) + CRU_GATE(SCLK_USB3OTG_REF, "clk_usb3otg_ref", "xin24m", 0x210, 7) /* CRU_CLKGATE_CON8 */ CRU_GATE(0, "pclk_bus", "pclk_bus_pre", 0x220, 3) CRU_GATE(0, "pclk_phy_pre", "pclk_bus_pre", 0x220, 4) + /* CRU_CLKGATE_CON8 */ + CRU_GATE(SCLK_MAC2IO_REF, "clk_mac2io_ref", "clk_mac2io", 0x224, 7) + CRU_GATE(SCLK_MAC2IO_REFOUT, "clk_mac2io_refout", "clk_mac2io", 0x224, 6) + CRU_GATE(SCLK_MAC2IO_TX, "clk_mac2io_tx", "clk_mac2io", 0x224, 5) + CRU_GATE(SCLK_MAC2IO_RX, "clk_mac2io_rx", "clk_mac2io", 0x224, 4) + CRU_GATE(SCLK_MAC2PHY_REF, "clk_mac2phy_ref", "clk_mac2phy", 0x224, 3) + CRU_GATE(SCLK_MAC2PHY_RXTX, "clk_mac2phy_rxtx", "clk_mac2phy", 0x224, 1) + /* CRU_CLKGATE_CON10 */ CRU_GATE(ACLK_PERI, "aclk_peri", "aclk_peri_pre", 0x228, 0) @@ -99,13 +137,27 @@ static struct rk_cru_gate rk3328_gates[] = { CRU_GATE(PCLK_GPIO2, "pclk_gpio2", "pclk_bus", 0x240, 9) CRU_GATE(PCLK_GPIO3, "pclk_gpio3", "pclk_bus", 0x240, 10) + /* CRU_CLKGATE_CON17 */ + CRU_GATE(PCLK_USB3_GRF, "pclk_usb3_grf", "pclk_phy_pre", 0x244, 2) + /* CRU_CLKGATE_CON19 */ CRU_GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_peri", 0x24C, 0) CRU_GATE(HCLK_SDIO, "hclk_sdio", "hclk_peri", 0x24C, 1) CRU_GATE(HCLK_EMMC, "hclk_emmc", "hclk_peri", 0x24C, 2) CRU_GATE(0, "hclk_peri_niu", "hclk_peri", 0x24C, 12) CRU_GATE(0, "pclk_peri_niu", "hclk_peri", 0x24C, 13) + CRU_GATE(ACLK_USB3OTG, "aclk_usb3otg", "aclk_peri", 0x24C, 14) CRU_GATE(HCLK_SDMMC_EXT, "hclk_sdmmc_ext", "hclk_peri", 0x24C, 15) + + /* CRU_CLKGATE_CON26 */ + CRU_GATE(ACLK_MAC2PHY, "aclk_mac2phy", "aclk_gmac", 0x268, 0) + CRU_GATE(PCLK_MAC2PHY, "pclk_mac2phy", "pclk_gmac", 0x268, 1) + CRU_GATE(ACLK_MAC2IO, "aclk_mac2io", "aclk_gmac", 0x268, 2) + CRU_GATE(PCLK_MAC2IO, "pclk_mac2io", "pclk_gmac", 0x268, 3) + + /* CRU_CLKGATE_CON28 */ + CRU_GATE(PCLK_USB3PHY_OTG, "pclk_usb3phy_otg", "pclk_phy_pre", 0x270, 1) + CRU_GATE(PCLK_USB3PHY_PIPE, "pclk_usb3phy_pipe", "pclk_phy_pre", 0x270, 2) }; /* @@ -992,6 +1044,282 @@ static struct rk_clk_composite_def i2c3 = { .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, }; +#define SCLK_USB3_REF 72 +#define SCLK_USB3_SUSPEND 73 +#define SCLK_USB3PHY_REF 94 +#define SCLK_REF_USB3OTG 95 +#define SCLK_USB3OTG_SUSPEND 97 +#define SCLK_REF_USB3OTG_SRC 98 + +static const char *ref_usb3otg_parents[] = { "xin24m", "clk_usb3otg_ref" }; + +static struct rk_clk_composite_def ref_usb3otg = { + .clkdef = { + .id = SCLK_REF_USB3OTG, + .name = "clk_ref_usb3otg", + .parent_names = ref_usb3otg_parents, + .parent_cnt = nitems(ref_usb3otg_parents), + }, + .muxdiv_offset = 0x1B4, + + .mux_shift = 8, + .mux_width = 1, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX, +}; + +static const char *usb3otg_suspend_parents[] = { "xin24m"/*, "clk_rtc32k" */}; + +static struct rk_clk_composite_def usb3otg_suspend = { + .clkdef = { + .id = SCLK_USB3OTG_SUSPEND, + .name = "clk_usb3otg_suspend", + .parent_names = usb3otg_suspend_parents, + .parent_cnt = nitems(usb3otg_suspend_parents), + }, + .muxdiv_offset = 0x184, + + .mux_shift = 15, + .mux_width = 1, + + .div_shift = 0, + .div_width = 10, + + /* CRU_CLKGATE_CON4 */ + .gate_offset = 0x210, + .gate_shift = 8, + + .flags = RK_CLK_COMPOSITE_HAVE_GATE, +}; + +static const char *ref_usb3otg_src_parents[] = { "cpll", "gpll" }; + +static struct rk_clk_composite_def ref_usb3otg_src = { + .clkdef = { + .id = SCLK_REF_USB3OTG_SRC, + .name = "clk_ref_usb3otg_src", + .parent_names = ref_usb3otg_src_parents, + .parent_cnt = nitems(ref_usb3otg_src_parents), + }, + .muxdiv_offset = 0x1B4, + + .mux_shift = 7, + .mux_width = 1, + + .div_shift = 0, + .div_width = 7, + + /* CRU_CLKGATE_CON4 */ + .gate_offset = 0x210, + .gate_shift = 9, + + .flags = RK_CLK_COMPOSITE_HAVE_GATE, +}; + +static const char *mac2io_src_parents[] = { "cpll", "gpll" }; + +static struct rk_clk_composite_def mac2io_src = { + .clkdef = { + .id = SCLK_MAC2IO_SRC, + .name = "clk_mac2io_src", + .parent_names = mac2io_src_parents, + .parent_cnt = nitems(mac2io_src_parents), + }, + /* CRU_CLKSEL_CON27 */ + .muxdiv_offset = 0x16c, + + .mux_shift = 7, + .mux_width = 1, + + .div_shift = 0, + .div_width = 5, + + /* CRU_CLKGATE_CON3 */ + .gate_offset = 0x20c, + .gate_shift = 1, + + .flags = RK_CLK_COMPOSITE_HAVE_GATE | RK_CLK_COMPOSITE_HAVE_MUX, +}; + +static const char *mac2io_out_parents[] = { "cpll", "gpll" }; + +static struct rk_clk_composite_def mac2io_out = { + .clkdef = { + .id = SCLK_MAC2IO_OUT, + .name = "clk_mac2io_out", + .parent_names = mac2io_out_parents, + .parent_cnt = nitems(mac2io_out_parents), + }, + /* CRU_CLKSEL_CON27 */ + .muxdiv_offset = 0x16c, + + .mux_shift = 15, + .mux_width = 1, + + .div_shift = 8, + .div_width = 5, + + /* CRU_CLKGATE_CON3 */ + .gate_offset = 0x20c, + .gate_shift = 5, + + .flags = RK_CLK_COMPOSITE_HAVE_GATE | RK_CLK_COMPOSITE_HAVE_MUX, +}; + +static const char *mac2io_parents[] = { "clk_mac2io_src", "gmac_clkin" }; + +static struct rk_clk_composite_def mac2io = { + .clkdef = { + .id = SCLK_MAC2IO, + .name = "clk_mac2io", + .parent_names = mac2io_parents, + .parent_cnt = nitems(mac2io_parents), + }, + .muxdiv_offset = RK3328_GRF_MAC_CON1, + + .mux_shift = 10, + .mux_width = 1, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_GRF +}; + +static const char *mac2io_ext_parents[] = { "clk_mac2io", "gmac_clkin" }; + +static struct rk_clk_composite_def mac2io_ext = { + .clkdef = { + .id = SCLK_MAC2IO_EXT, + .name = "clk_mac2io_ext", + .parent_names = mac2io_ext_parents, + .parent_cnt = nitems(mac2io_ext_parents), + }, + .muxdiv_offset = RK3328_GRF_SOC_CON4, + + .mux_shift = 14, + .mux_width = 1, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_GRF +}; + +static const char *mac2phy_src_parents[] = { "cpll", "gpll" }; + +static struct rk_clk_composite_def mac2phy_src = { + .clkdef = { + .id = SCLK_MAC2PHY_SRC, + .name = "clk_mac2phy_src", + .parent_names = mac2phy_src_parents, + .parent_cnt = nitems(mac2phy_src_parents), + }, + /* CRU_CLKSEL_CON26 */ + .muxdiv_offset = 0x168, + + .mux_shift = 7, + .mux_width = 1, + + .div_shift = 0, + .div_width = 5, + + /* CRU_CLKGATE_CON3 */ + .gate_offset = 0x20c, + .gate_shift = 0, + + .flags = RK_CLK_COMPOSITE_HAVE_GATE | RK_CLK_COMPOSITE_HAVE_MUX, +}; + +static const char *mac2phy_parents[] = { "clk_mac2phy_src", "phy_50m_out" }; + +static struct rk_clk_composite_def mac2phy = { + .clkdef = { + .id = SCLK_MAC2PHY, + .name = "clk_mac2phy", + .parent_names = mac2phy_parents, + .parent_cnt = nitems(mac2phy_parents), + }, + .muxdiv_offset = RK3328_GRF_MAC_CON2, + + .mux_shift = 10, + .mux_width = 1, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_GRF +}; + +static const char *mac2phy_out_parents[] = { "clk_mac2phy" }; + +static struct rk_clk_composite_def mac2phy_out = { + .clkdef = { + .id = SCLK_MAC2PHY_OUT, + .name = "clk_mac2phy_out", + .parent_names = mac2phy_out_parents, + .parent_cnt = nitems(mac2phy_out_parents), + }, + /* CRU_CLKSEL_CON26 */ + .muxdiv_offset = 0x168, + + .div_shift = 8, + .div_width = 2, + + /* CRU_CLKGATE_CON9 */ + .gate_offset = 0x224, + .gate_shift = 2, + + .flags = RK_CLK_COMPOSITE_HAVE_GATE +}; + +static struct clk_fixed_def phy_50m_out = { + .clkdef.name = "phy_50m_out", + .freq = 50000000, +}; + +static struct clk_link_def gmac_clkin = { + .clkdef.name = "gmac_clkin", +}; + +static const char *aclk_gmac_parents[] = { "cpll", "gpll" }; + +static struct rk_clk_composite_def aclk_gmac = { + .clkdef = { + .id = ACLK_GMAC, + .name = "aclk_gmac", + .parent_names = aclk_gmac_parents, + .parent_cnt = nitems(aclk_gmac_parents), + }, + /* CRU_CLKSEL_CON35 */ + .muxdiv_offset = 0x18c, + + .mux_shift = 6, + .mux_width = 2, + + .div_shift = 0, + .div_width = 5, + + /* CRU_CLKGATE_CON3 */ + .gate_offset = 0x20c, + .gate_shift = 2, + + .flags = RK_CLK_COMPOSITE_HAVE_GATE | RK_CLK_COMPOSITE_HAVE_MUX, +}; + +static const char *pclk_gmac_parents[] = { "aclk_gmac" }; + +static struct rk_clk_composite_def pclk_gmac = { + .clkdef = { + .id = PCLK_GMAC, + .name = "pclk_gmac", + .parent_names = pclk_gmac_parents, + .parent_cnt = nitems(pclk_gmac_parents), + }, + /* CRU_CLKSEL_CON25 */ + .muxdiv_offset = 0x164, + + .div_shift = 8, + .div_width = 3, + + /* CRU_CLKGATE_CON9 */ + .gate_offset = 0x224, + .gate_shift = 0, + + .flags = RK_CLK_COMPOSITE_HAVE_GATE +}; + static struct rk_clk rk3328_clks[] = { { .type = RK3328_CLK_PLL, @@ -1076,6 +1404,63 @@ static struct rk_clk rk3328_clks[] = { { .type = RK_CLK_COMPOSITE, .clk.composite = &i2c3 + }, + + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &ref_usb3otg + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &ref_usb3otg_src + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &usb3otg_suspend + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &mac2io_src + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &mac2io + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &mac2io_out + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &mac2io_ext + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &mac2phy_src + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &mac2phy + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &mac2phy_out + }, + { + .type = RK_CLK_FIXED, + .clk.fixed = &phy_50m_out + }, + { + .type = RK_CLK_LINK, + .clk.link = &gmac_clkin + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &aclk_gmac + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &pclk_gmac }, }; Modified: stable/12/sys/arm64/rockchip/clk/rk_clk_composite.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk_clk_composite.c Fri Aug 28 20:05:18 2020 (r364937) +++ stable/12/sys/arm64/rockchip/clk/rk_clk_composite.c Fri Aug 28 20:25:03 2020 (r364938) @@ -36,10 +36,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "clkdev_if.h" +#include "syscon_if.h" struct rk_clk_composite_sc { uint32_t muxdiv_offset; @@ -55,12 +57,14 @@ struct rk_clk_composite_sc { uint32_t gate_shift; uint32_t flags; + + struct syscon *grf; }; #define WRITE4(_clk, off, val) \ - CLKDEV_WRITE_4(clknode_get_device(_clk), off, val) + rk_clk_composite_write_4(_clk, off, val) #define READ4(_clk, off, val) \ - CLKDEV_READ_4(clknode_get_device(_clk), off, val) + rk_clk_composite_read_4(_clk, off, val) #define DEVICE_LOCK(_clk) \ CLKDEV_DEVICE_LOCK(clknode_get_device(_clk)) #define DEVICE_UNLOCK(_clk) \ @@ -75,6 +79,49 @@ struct rk_clk_composite_sc { #define dprintf(format, arg...) #endif +static void +rk_clk_composite_read_4(struct clknode *clk, bus_addr_t addr, uint32_t *val) +{ + struct rk_clk_composite_sc *sc; + + sc = clknode_get_softc(clk); + if (sc->grf) + *val = SYSCON_READ_4(sc->grf, addr); + else + CLKDEV_READ_4(clknode_get_device(clk), addr, val); +} + +static void +rk_clk_composite_write_4(struct clknode *clk, bus_addr_t addr, uint32_t val) +{ + struct rk_clk_composite_sc *sc; + + sc = clknode_get_softc(clk); + if (sc->grf) + SYSCON_WRITE_4(sc->grf, addr, val | (0xffff << 16)); + else + CLKDEV_WRITE_4(clknode_get_device(clk), addr, val); +} + +static struct syscon * +rk_clk_composite_get_grf(struct clknode *clk) +{ + device_t dev; + phandle_t node; + struct syscon *grf; + + grf = NULL; + dev = clknode_get_device(clk); + node = ofw_bus_get_node(dev); + if (OF_hasprop(node, "rockchip,grf") && + syscon_get_by_ofw_property(dev, node, + "rockchip,grf", &grf) != 0) { + return (NULL); + } + + return (grf); +} + static int rk_clk_composite_init(struct clknode *clk, device_t dev) { @@ -82,6 +129,12 @@ rk_clk_composite_init(struct clknode *clk, device_t de uint32_t val, idx; sc = clknode_get_softc(clk); + if ((sc->flags & RK_CLK_COMPOSITE_GRF) != 0) { + sc->grf = rk_clk_composite_get_grf(clk); + if (sc->grf == NULL) + panic("clock %s has GRF flag set but no syscon is available", + clknode_get_name(clk)); + } idx = 0; if ((sc->flags & RK_CLK_COMPOSITE_HAVE_MUX) != 0) { Modified: stable/12/sys/arm64/rockchip/clk/rk_clk_composite.h ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk_clk_composite.h Fri Aug 28 20:05:18 2020 (r364937) +++ stable/12/sys/arm64/rockchip/clk/rk_clk_composite.h Fri Aug 28 20:25:03 2020 (r364938) @@ -54,6 +54,7 @@ struct rk_clk_composite_def { #define RK_CLK_COMPOSITE_HAVE_GATE 0x0002 #define RK_CLK_COMPOSITE_DIV_EXP 0x0004 /* Register 0, 1, 2, 2, ... */ /* Divider 1, 2, 4, 8, ... */ +#define RK_CLK_COMPOSITE_GRF 0x0008 /* Use syscon registers instead of CRU's */ int rk_clk_composite_register(struct clkdom *clkdom, struct rk_clk_composite_def *clkdef); From owner-svn-src-all@freebsd.org Fri Aug 28 20:37:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 933883C1171; Fri, 28 Aug 2020 20:37:58 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdWd23Swpz4NrR; Fri, 28 Aug 2020 20:37:58 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3784E1A954; Fri, 28 Aug 2020 20:37:58 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07SKbv4W013550; Fri, 28 Aug 2020 20:37:57 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SKbvvx013549; Fri, 28 Aug 2020 20:37:57 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202008282037.07SKbvvx013549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 28 Aug 2020 20:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364939 - stable/12/release/tools X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/release/tools X-SVN-Commit-Revision: 364939 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 20:37:58 -0000 Author: gonzo Date: Fri Aug 28 20:37:57 2020 New Revision: 364939 URL: https://svnweb.freebsd.org/changeset/base/364939 Log: MFC r363187: Enable EFI system partition on amd64 and i386 VM images EFI support is a hard requirement for generating Hyper-V Gen2 VM images. Reviewed by: gjb Differential Revision: https://reviews.freebsd.org/D25655 Modified: stable/12/release/tools/vmimage.subr Directory Properties: stable/12/ (props changed) Modified: stable/12/release/tools/vmimage.subr ============================================================================== --- stable/12/release/tools/vmimage.subr Fri Aug 28 20:25:03 2020 (r364938) +++ stable/12/release/tools/vmimage.subr Fri Aug 28 20:37:57 2020 (r364939) @@ -21,12 +21,17 @@ write_partition_layout() { case "${TARGET}:${TARGET_ARCH}" in amd64:amd64 | i386:i386) + # Create an ESP + espfilename=$(mktemp /tmp/efiboot.XXXXXX) + make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi mkimg -s gpt -f ${VMFORMAT} \ -b ${BOOTFILES}/i386/pmbr/pmbr \ -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot \ + -p efi:=${espfilename} \ ${SWAPOPT} \ -p freebsd-ufs/rootfs:=${VMBASE} \ -o ${VMIMAGE} + rm ${espfilename} ;; arm64:aarch64) mkimg -s mbr -f ${VMFORMAT} \ From owner-svn-src-all@freebsd.org Fri Aug 28 21:31:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 099E23C2653; Fri, 28 Aug 2020 21:31:40 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (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 4BdXpy24Klz4Rvs; Fri, 28 Aug 2020 21:31:38 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from localhost ([127.0.0.1] helo=id.bluezbox.com) by id.bluezbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94 (FreeBSD)) (envelope-from ) id 1kBly6-000JSR-KD; Fri, 28 Aug 2020 14:31:31 -0700 Received: (from gonzo@localhost) by id.bluezbox.com (8.15.2/8.15.2/Submit) id 07SLVUeZ074798; Fri, 28 Aug 2020 14:31:30 -0700 (PDT) (envelope-from gonzo@bluezbox.com) X-Authentication-Warning: id.bluezbox.com: gonzo set sender to gonzo@bluezbox.com using -f Date: Fri, 28 Aug 2020 14:31:30 -0700 From: Oleksandr Tymoshenko To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r353419 - head/sys/net Message-ID: <20200828213130.GA74775@bluezbox.com> References: <201910102342.x9ANguvu083989@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201910102342.x9ANguvu083989@repo.freebsd.org> X-Operating-System: FreeBSD/11.2-RELEASE-p10 (amd64) X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: Gleb Smirnoff (glebius@FreeBSD.org) wrote: > Author: glebius > Date: Thu Oct 10 23:42:55 2019 > New Revision: 353419 > URL: https://svnweb.freebsd.org/changeset/base/353419 > > Log: > Provide new KPI [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Rspamd-Queue-Id: 4BdXpy24Klz4Rvs X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of gonzo@bluezbox.com designates 45.55.20.155 as permitted sender) smtp.mailfrom=gonzo@bluezbox.com X-Spamd-Result: default: False [-1.84 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[gonzo]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; DMARC_NA(0.00)[bluezbox.com]; MID_RHS_MATCH_FROM(0.00)[]; NEURAL_HAM_LONG(-0.94)[-0.944]; NEURAL_HAM_MEDIUM(-0.83)[-0.831]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_SPAM_SHORT(0.24)[0.239]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14061, ipnet:45.55.0.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 21:31:40 -0000 Gleb Smirnoff (glebius@FreeBSD.org) wrote: > Author: glebius > Date: Thu Oct 10 23:42:55 2019 > New Revision: 353419 > URL: https://svnweb.freebsd.org/changeset/base/353419 > > Log: > Provide new KPI for network drivers to access lists of interface > addresses. The KPI doesn't reveal neither how addresses are stored, > how the access to them is synchronized, neither reveal struct ifaddr > and struct ifmaddr. > > Reviewed by: gallatin, erj, hselasky, philip, stevek > Differential Revision: https://reviews.freebsd.org/D21943 Hi Gleb, Are there any plans to MFC this change and the subsequent API consumer changes? Lack of this API in 12 makes MFCing unrelated eth driver fixes hard. -- gonzo From owner-svn-src-all@freebsd.org Fri Aug 28 21:59:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC6933C38FF; Fri, 28 Aug 2020 21:59:10 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdYQk6Pjcz4VMl; Fri, 28 Aug 2020 21:59:10 +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 C01721B945; Fri, 28 Aug 2020 21:59:10 +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 07SLxAmw063628; Fri, 28 Aug 2020 21:59:10 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SLxAEE063626; Fri, 28 Aug 2020 21:59:10 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202008282159.07SLxAEE063626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 28 Aug 2020 21:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364940 - head/sys/net/route X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/net/route X-SVN-Commit-Revision: 364940 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 21:59:11 -0000 Author: melifaro Date: Fri Aug 28 21:59:10 2020 New Revision: 364940 URL: https://svnweb.freebsd.org/changeset/base/364940 Log: Further split nhop creation and rtable operations. As nexthops are immutable, some operations such as route attribute changes require nexthop fetching, forking, modification and route switching. These operations are not atomic, so they may need to be retried multiple times in presence of multiple speakers changing the same route. This change introduces "synchronisation" primitive: route_update_conditional(), simplifying logic for route changes and upcoming multipath operations. Differential Revision: https://reviews.freebsd.org/D26216 Modified: head/sys/net/route/route_ctl.c head/sys/net/route/route_var.h Modified: head/sys/net/route/route_ctl.c ============================================================================== --- head/sys/net/route/route_ctl.c Fri Aug 28 20:37:57 2020 (r364939) +++ head/sys/net/route/route_ctl.c Fri Aug 28 21:59:10 2020 (r364940) @@ -78,9 +78,15 @@ struct rib_subscription { static int add_route(struct rib_head *rnh, struct rt_addrinfo *info, struct rib_cmd_info *rc); +static int add_route_nhop(struct rib_head *rnh, struct rtentry *rt, + struct rt_addrinfo *info, struct route_nhop_data *rnd, + struct rib_cmd_info *rc); static int del_route(struct rib_head *rnh, struct rt_addrinfo *info, struct rib_cmd_info *rc); -static int change_route(struct rib_head *, struct rt_addrinfo *, +static int change_route(struct rib_head *rnh, struct rt_addrinfo *info, + struct route_nhop_data *nhd_orig, struct rib_cmd_info *rc); +static int change_route_nhop(struct rib_head *rnh, struct rtentry *rt, + struct rt_addrinfo *info, struct route_nhop_data *rnd, struct rib_cmd_info *rc); static void rib_notify(struct rib_head *rnh, enum rib_subscription_type type, struct rib_cmd_info *rc); @@ -202,14 +208,18 @@ rib_add_route(uint32_t fibnum, struct rt_addrinfo *inf return (add_route(rnh, info, rc)); } +/* + * Creates rtentry and nexthop based on @info data. + * Return 0 and fills in rtentry into @prt on success, + * return errno otherwise. + */ static int -add_route(struct rib_head *rnh, struct rt_addrinfo *info, - struct rib_cmd_info *rc) +create_rtentry(struct rib_head *rnh, struct rt_addrinfo *info, + struct rtentry **prt) { struct sockaddr *dst, *ndst, *gateway, *netmask; - struct rtentry *rt, *rt_old; + struct rtentry *rt; struct nhop_object *nh; - struct radix_node *rn; struct ifaddr *ifa; int error, flags; @@ -276,8 +286,29 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *in rt->rt_weight = 1; rt_setmetrics(info, rt); - rt_old = NULL; + *prt = rt; + return (0); +} + +static int +add_route(struct rib_head *rnh, struct rt_addrinfo *info, + struct rib_cmd_info *rc) +{ + struct sockaddr *ndst, *netmask; + struct route_nhop_data rnd; + struct nhop_object *nh; + struct rtentry *rt; + int error; + + error = create_rtentry(rnh, info, &rt); + if (error != 0) + return (error); + + rnd.rnd_nhop = rt->rt_nhop; + rnd.rnd_weight = rt->rt_weight; + nh = rt->rt_nhop; + RIB_WLOCK(rnh); #ifdef RADIX_MPATH /* do not permit exactly the same dst/mask/gw pair */ @@ -290,76 +321,42 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *in return (EEXIST); } #endif + error = add_route_nhop(rnh, rt, info, &rnd, rc); + if (error == 0) { + rt = NULL; + nh = NULL; + } else if ((error == EEXIST) && ((info->rti_flags & RTF_PINNED) != 0)) { + struct rtentry *rt_orig; + struct nhop_object *nh_orig; + struct radix_node *rn; - rn = rnh->rnh_addaddr(ndst, netmask, &rnh->head, rt->rt_nodes); - - if (rn != NULL) { - /* Most common usecase */ - if (rt->rt_expire > 0) - tmproutes_update(rnh, rt); - - /* Finalize notification */ - rnh->rnh_gen++; - - rc->rc_rt = rt; - rc->rc_nh_new = nh; - rc->rc_nh_weight = rt->rt_weight; - - rib_notify(rnh, RIB_NOTIFY_IMMEDIATE, rc); - } else if ((info->rti_flags & RTF_PINNED) != 0) { - - /* - * Force removal and re-try addition - * TODO: better multipath&pinned support - */ - struct sockaddr *info_dst = info->rti_info[RTAX_DST]; - info->rti_info[RTAX_DST] = ndst; - /* Do not delete existing PINNED(interface) routes */ - info->rti_flags &= ~RTF_PINNED; - rt_old = rt_unlinkrte(rnh, info, &error); - info->rti_flags |= RTF_PINNED; - info->rti_info[RTAX_DST] = info_dst; - if (rt_old != NULL) { - rn = rnh->rnh_addaddr(ndst, netmask, &rnh->head, - rt->rt_nodes); - - /* Finalize notification */ - rnh->rnh_gen++; - - if (rn != NULL) { - rc->rc_cmd = RTM_CHANGE; - rc->rc_rt = rt; - rc->rc_nh_old = rt_old->rt_nhop; - rc->rc_nh_new = nh; - rc->rc_nh_weight = rt->rt_weight; - } else { - rc->rc_cmd = RTM_DELETE; - rc->rc_rt = rt_old; - rc->rc_nh_old = rt_old->rt_nhop; - rc->rc_nh_weight = rt_old->rt_weight; + ndst = (struct sockaddr *)rt_key(rt); + netmask = info->rti_info[RTAX_NETMASK]; + rn = rnh->rnh_lookup(ndst, netmask, &rnh->head); + rt_orig = (struct rtentry *)rn; + if (rt_orig != NULL) { + nh_orig = rt_orig->rt_nhop; + if ((nhop_get_rtflags(nh_orig) & RTF_PINNED) == 0) { + /* Current nexhop is not PINNED, can update */ + error = change_route_nhop(rnh, rt_orig, + info, &rnd, rc); + if (error == 0) + nh = NULL; } - rib_notify(rnh, RIB_NOTIFY_IMMEDIATE, rc); - } + } else + error = ENOBUFS; } RIB_WUNLOCK(rnh); - if ((rn != NULL) || (rt_old != NULL)) + if (error == 0) rib_notify(rnh, RIB_NOTIFY_DELAYED, rc); - if (rt_old != NULL) - rtfree(rt_old); - - /* - * If it still failed to go into the tree, - * then un-make it (this should be a function) - */ - if (rn == NULL) { + if (nh != NULL) nhop_free(nh); + if (rt != NULL) uma_zfree(V_rtzone, rt); - return (EEXIST); - } - return (0); + return (error); } @@ -508,7 +505,11 @@ int rib_change_route(uint32_t fibnum, struct rt_addrinfo *info, struct rib_cmd_info *rc) { + RIB_RLOCK_TRACKER; + struct route_nhop_data rnd_orig; struct rib_head *rnh; + struct rtentry *rt; + int error; NET_EPOCH_ASSERT(); @@ -519,18 +520,18 @@ rib_change_route(uint32_t fibnum, struct rt_addrinfo * bzero(rc, sizeof(struct rib_cmd_info)); rc->rc_cmd = RTM_CHANGE; - return (change_route(rnh, info, rc)); -} + /* Check if updated gateway exists */ + if ((info->rti_flags & RTF_GATEWAY) && + (info->rti_info[RTAX_GATEWAY] == NULL)) + return (EINVAL); -static int -change_route_one(struct rib_head *rnh, struct rt_addrinfo *info, - struct rib_cmd_info *rc) -{ - RIB_RLOCK_TRACKER; - struct rtentry *rt = NULL; - int error = 0; - int free_ifa = 0; - struct nhop_object *nh, *nh_orig; + /* + * route change is done in multiple steps, with dropping and + * reacquiring lock. In the situations with multiple processes + * changes the same route in can lead to the case when route + * is changed between the steps. Address it by retrying the operation + * multiple times before failing. + */ RIB_RLOCK(rnh); rt = (struct rtentry *)rnh->rnh_lookup(info->rti_info[RTAX_DST], @@ -554,12 +555,33 @@ change_route_one(struct rib_head *rnh, struct rt_addri } } #endif - nh_orig = rt->rt_nhop; + rnd_orig.rnd_nhop = rt->rt_nhop; + rnd_orig.rnd_weight = rt->rt_weight; RIB_RUNLOCK(rnh); - rt = NULL; + for (int i = 0; i < RIB_MAX_RETRIES; i++) { + error = change_route(rnh, info, &rnd_orig, rc); + if (error != EAGAIN) + break; + } + + return (error); +} + +static int +change_route(struct rib_head *rnh, struct rt_addrinfo *info, + struct route_nhop_data *rnd_orig, struct rib_cmd_info *rc) +{ + int error = 0; + int free_ifa = 0; + struct nhop_object *nh, *nh_orig; + struct route_nhop_data rnd_new; + nh = NULL; + nh_orig = rnd_orig->rnd_nhop; + if (nh_orig == NULL) + return (ESRCH); /* * New gateway could require new ifaddr, ifp; @@ -593,71 +615,168 @@ change_route_one(struct rib_head *rnh, struct rt_addri if (error != 0) return (error); - RIB_WLOCK(rnh); + rnd_new.rnd_nhop = nh; + if (info->rti_mflags & RTV_WEIGHT) + rnd_new.rnd_weight = info->rti_rmx->rmx_weight; + else + rnd_new.rnd_weight = rnd_orig->rnd_weight; - /* Lookup rtentry once again and check if nexthop is still the same */ - rt = (struct rtentry *)rnh->rnh_lookup(info->rti_info[RTAX_DST], - info->rti_info[RTAX_NETMASK], &rnh->head); + error = change_route_conditional(rnh, NULL, info, rnd_orig, &rnd_new, rc); - if (rt == NULL) { - RIB_WUNLOCK(rnh); - nhop_free(nh); - return (ESRCH); - } + return (error); +} - if (rt->rt_nhop != nh_orig) { - RIB_WUNLOCK(rnh); - nhop_free(nh); - return (EAGAIN); +/* + * Insert @rt with nhop data from @rnd_new to @rnh. + * Returns 0 on success. + */ +static int +add_route_nhop(struct rib_head *rnh, struct rtentry *rt, + struct rt_addrinfo *info, struct route_nhop_data *rnd, + struct rib_cmd_info *rc) +{ + struct sockaddr *ndst, *netmask; + struct radix_node *rn; + int error = 0; + + RIB_WLOCK_ASSERT(rnh); + + ndst = (struct sockaddr *)rt_key(rt); + netmask = info->rti_info[RTAX_NETMASK]; + + rt->rt_nhop = rnd->rnd_nhop; + rt->rt_weight = rnd->rnd_weight; + rn = rnh->rnh_addaddr(ndst, netmask, &rnh->head, rt->rt_nodes); + + if (rn != NULL) { + if (rt->rt_expire > 0) + tmproutes_update(rnh, rt); + + /* Finalize notification */ + rnh->rnh_gen++; + + rc->rc_cmd = RTM_ADD; + rc->rc_rt = rt; + rc->rc_nh_old = NULL; + rc->rc_nh_new = rnd->rnd_nhop; + rc->rc_nh_weight = rnd->rnd_weight; + + rib_notify(rnh, RIB_NOTIFY_IMMEDIATE, rc); + } else { + /* Existing route or memory allocation failure */ + error = EEXIST; } - /* Proceed with the update */ + return (error); +} - /* Provide notification to the protocols.*/ - rt->rt_nhop = nh; - rt_setmetrics(info, rt); +/* + * Switch @rt nhop/weigh to the ones specified in @rnd. + * Conditionally set rt_expire if set in @info. + * Returns 0 on success. + */ +static int +change_route_nhop(struct rib_head *rnh, struct rtentry *rt, + struct rt_addrinfo *info, struct route_nhop_data *rnd, + struct rib_cmd_info *rc) +{ + struct nhop_object *nh_orig; + RIB_WLOCK_ASSERT(rnh); + + nh_orig = rt->rt_nhop; + + if (rnd->rnd_nhop != NULL) { + /* Changing expiration & nexthop & weight to a new one */ + rt_setmetrics(info, rt); + rt->rt_nhop = rnd->rnd_nhop; + rt->rt_weight = rnd->rnd_weight; + if (rt->rt_expire > 0) + tmproutes_update(rnh, rt); + } else { + /* Route deletion requested. */ + struct sockaddr *ndst, *netmask; + struct radix_node *rn; + + ndst = (struct sockaddr *)rt_key(rt); + netmask = info->rti_info[RTAX_NETMASK]; + rn = rnh->rnh_deladdr(ndst, netmask, &rnh->head); + if (rn == NULL) + return (ESRCH); + } + /* Finalize notification */ rnh->rnh_gen++; + rc->rc_cmd = (rnd->rnd_nhop != NULL) ? RTM_CHANGE : RTM_DELETE; rc->rc_rt = rt; rc->rc_nh_old = nh_orig; - rc->rc_nh_new = rt->rt_nhop; - rc->rc_nh_weight = rt->rt_weight; + rc->rc_nh_new = rnd->rnd_nhop; + rc->rc_nh_weight = rnd->rnd_weight; rib_notify(rnh, RIB_NOTIFY_IMMEDIATE, rc); - RIB_WUNLOCK(rnh); - - rib_notify(rnh, RIB_NOTIFY_DELAYED, rc); - - nhop_free(nh_orig); - return (0); } -static int -change_route(struct rib_head *rnh, struct rt_addrinfo *info, - struct rib_cmd_info *rc) +/* + * Conditionally update route nhop/weight IFF data in @nhd_orig is + * consistent with the current route data. + * Nexthop in @nhd_new is consumed. + */ +int +change_route_conditional(struct rib_head *rnh, struct rtentry *rt, + struct rt_addrinfo *info, struct route_nhop_data *rnd_orig, + struct route_nhop_data *rnd_new, struct rib_cmd_info *rc) { - int error; + struct rtentry *rt_new; + int error = 0; - /* Check if updated gateway exists */ - if ((info->rti_flags & RTF_GATEWAY) && - (info->rti_info[RTAX_GATEWAY] == NULL)) - return (EINVAL); + RIB_WLOCK(rnh); - /* - * route change is done in multiple steps, with dropping and - * reacquiring lock. In the situations with multiple processes - * changes the same route in can lead to the case when route - * is changed between the steps. Address it by retrying the operation - * multiple times before failing. - */ - for (int i = 0; i < RIB_MAX_RETRIES; i++) { - error = change_route_one(rnh, info, rc); - if (error != EAGAIN) - break; + rt_new = (struct rtentry *)rnh->rnh_lookup(info->rti_info[RTAX_DST], + info->rti_info[RTAX_NETMASK], &rnh->head); + + if (rt_new == NULL) { + if (rnd_orig->rnd_nhop == NULL) + error = add_route_nhop(rnh, rt, info, rnd_new, rc); + else { + /* + * Prefix does not exist, which was not our assumption. + * Update @rnd_orig with the new data and return + */ + rnd_orig->rnd_nhop = NULL; + rnd_orig->rnd_weight = 0; + error = EAGAIN; + } + } else { + /* Prefix exists, try to update */ + if (rnd_orig->rnd_nhop == rt_new->rt_nhop) { + + /* + * Nhop/mpath group hasn't changed. Flip + * to the new precalculated one and return + */ + error = change_route_nhop(rnh, rt_new, info, rnd_new, rc); + } else { + /* Update and retry */ + rnd_orig->rnd_nhop = rt_new->rt_nhop; + rnd_orig->rnd_weight = rt_new->rt_weight; + error = EAGAIN; + } + } + + RIB_WUNLOCK(rnh); + + if (error == 0) { + rib_notify(rnh, RIB_NOTIFY_DELAYED, rc); + + if (rnd_orig->rnd_nhop != NULL) + nhop_free_any(rnd_orig->rnd_nhop); + + } else { + if (rnd_new->rnd_nhop != NULL) + nhop_free_any(rnd_new->rnd_nhop); } return (error); Modified: head/sys/net/route/route_var.h ============================================================================== --- head/sys/net/route/route_var.h Fri Aug 28 20:37:57 2020 (r364939) +++ head/sys/net/route/route_var.h Fri Aug 28 21:59:10 2020 (r364940) @@ -226,6 +226,14 @@ void tmproutes_init(struct rib_head *rh); void tmproutes_destroy(struct rib_head *rh); /* route_ctl.c */ +struct route_nhop_data { + struct nhop_object *rnd_nhop; + uint32_t rnd_weight; +}; +int change_route_conditional(struct rib_head *rnh, struct rtentry *rt, + struct rt_addrinfo *info, struct route_nhop_data *nhd_orig, + struct route_nhop_data *nhd_new, struct rib_cmd_info *rc); + void vnet_rtzone_init(void); void vnet_rtzone_destroy(void); From owner-svn-src-all@freebsd.org Fri Aug 28 22:50:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB3F83C4AE0; Fri, 28 Aug 2020 22:50:23 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdZYq5X4Gz4Yx0; Fri, 28 Aug 2020 22:50:23 +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 9CF2D1C40A; Fri, 28 Aug 2020 22:50:23 +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 07SMoNPe095765; Fri, 28 Aug 2020 22:50:23 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SMoL7I095754; Fri, 28 Aug 2020 22:50:21 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202008282250.07SMoL7I095754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 28 Aug 2020 22:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364941 - in head/sys: net net/route netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: net net/route netinet netinet6 X-SVN-Commit-Revision: 364941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 22:50:23 -0000 Author: melifaro Date: Fri Aug 28 22:50:20 2020 New Revision: 364941 URL: https://svnweb.freebsd.org/changeset/base/364941 Log: Move net/route/shared.h definitions to net/route/route_var.h. No functional changes. net/route/shared.h was created in the inital phases of nexthop conversion. It was intended to serve the same purpose as route_var.h - share definitions of functions and structures between the routing subsystem components. At that time route_var.h was included by many files external to the routing subsystem, which largerly defeats its purpose. As currently this is not the case anymore and amount of route_var.h includes is roughly the same as shared.h, retire the latter in favour of the former. Deleted: head/sys/net/route/shared.h Modified: head/sys/net/radix_mpath.c head/sys/net/route.c head/sys/net/route/nhop.c head/sys/net/route/nhop_ctl.c head/sys/net/route/route_ctl.c head/sys/net/route/route_helpers.c head/sys/net/route/route_var.h head/sys/net/rtsock.c head/sys/netinet/in_fib.c head/sys/netinet/in_rmx.c head/sys/netinet6/in6_fib.c head/sys/netinet6/in6_rmx.c Modified: head/sys/net/radix_mpath.c ============================================================================== --- head/sys/net/radix_mpath.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/radix_mpath.c Fri Aug 28 22:50:20 2020 (r364941) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/route.c Fri Aug 28 22:50:20 2020 (r364941) @@ -64,7 +64,6 @@ #include #include #include -#include #include #ifdef RADIX_MPATH Modified: head/sys/net/route/nhop.c ============================================================================== --- head/sys/net/route/nhop.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/route/nhop.c Fri Aug 28 22:50:20 2020 (r364941) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* Modified: head/sys/net/route/nhop_ctl.c ============================================================================== --- head/sys/net/route/nhop_ctl.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/route/nhop_ctl.c Fri Aug 28 22:50:20 2020 (r364941) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* Modified: head/sys/net/route/route_ctl.c ============================================================================== --- head/sys/net/route/route_ctl.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/route/route_ctl.c Fri Aug 28 22:50:20 2020 (r364941) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifdef RADIX_MPATH Modified: head/sys/net/route/route_helpers.c ============================================================================== --- head/sys/net/route/route_helpers.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/route/route_helpers.c Fri Aug 28 22:50:20 2020 (r364941) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #ifdef INET #include #endif Modified: head/sys/net/route/route_var.h ============================================================================== --- head/sys/net/route/route_var.h Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/route/route_var.h Fri Aug 28 22:50:20 2020 (r364941) @@ -39,7 +39,14 @@ #include #include /* struct sockaddr_in */ #include +#include +#ifdef RTDEBUG +#define DPRINTF(_fmt, ...) printf("%s: " _fmt "\n", __func__ , ## __VA_ARGS__) +#else +#define DPRINTF(_fmt, ...) +#endif + struct nh_control; typedef int rnh_preadd_entry_f_t(u_int fibnum, const struct sockaddr *addr, const struct sockaddr *mask, struct nhop_object *nh); @@ -221,6 +228,7 @@ fib_rte_to_nh_flags(int rt_flags) return (res); } +/* route_temporal.c */ void tmproutes_update(struct rib_head *rnh, struct rtentry *rt); void tmproutes_init(struct rib_head *rh); void tmproutes_destroy(struct rib_head *rh); @@ -236,5 +244,33 @@ int change_route_conditional(struct rib_head *rnh, str void vnet_rtzone_init(void); void vnet_rtzone_destroy(void); + +/* subscriptions */ +void rib_init_subscriptions(struct rib_head *rnh); +void rib_destroy_subscriptions(struct rib_head *rnh); + +/* Nexhops */ +void nhops_init(void); +int nhops_init_rib(struct rib_head *rh); +void nhops_destroy_rib(struct rib_head *rh); +void nhop_ref_object(struct nhop_object *nh); +int nhop_try_ref_object(struct nhop_object *nh); +int nhop_ref_any(struct nhop_object *nh); +void nhop_free_any(struct nhop_object *nh); + +void nhop_set_type(struct nhop_object *nh, enum nhop_type nh_type); +void nhop_set_rtflags(struct nhop_object *nh, int rt_flags); + +int nhop_create_from_info(struct rib_head *rnh, struct rt_addrinfo *info, + struct nhop_object **nh_ret); +int nhop_create_from_nhop(struct rib_head *rnh, const struct nhop_object *nh_orig, + struct rt_addrinfo *info, struct nhop_object **pnh_priv); + +void nhops_update_ifmtu(struct rib_head *rh, struct ifnet *ifp, uint32_t mtu); +int nhops_dump_sysctl(struct rib_head *rh, struct sysctl_req *w); + +/* route */ +struct rtentry *rt_unlinkrte(struct rib_head *rnh, struct rt_addrinfo *info, + int *perror); #endif Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/net/rtsock.c Fri Aug 28 22:50:20 2020 (r364941) @@ -77,7 +77,6 @@ #include #endif #include -#include #ifdef COMPAT_FREEBSD32 #include Modified: head/sys/netinet/in_fib.c ============================================================================== --- head/sys/netinet/in_fib.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/netinet/in_fib.c Fri Aug 28 22:50:20 2020 (r364941) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifdef RADIX_MPATH Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/netinet/in_rmx.c Fri Aug 28 22:50:20 2020 (r364941) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/netinet6/in6_fib.c ============================================================================== --- head/sys/netinet6/in6_fib.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/netinet6/in6_fib.c Fri Aug 28 22:50:20 2020 (r364941) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifdef RADIX_MPATH Modified: head/sys/netinet6/in6_rmx.c ============================================================================== --- head/sys/netinet6/in6_rmx.c Fri Aug 28 21:59:10 2020 (r364940) +++ head/sys/netinet6/in6_rmx.c Fri Aug 28 22:50:20 2020 (r364941) @@ -84,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include From owner-svn-src-all@freebsd.org Fri Aug 28 23:01:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 82B5C3C5404; Fri, 28 Aug 2020 23:01:57 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdZq92tT8z4b4V; Fri, 28 Aug 2020 23:01:57 +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 4627B1BE7E; Fri, 28 Aug 2020 23:01:57 +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 07SN1vrg003489; Fri, 28 Aug 2020 23:01:57 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07SN1uhd003488; Fri, 28 Aug 2020 23:01:56 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202008282301.07SN1uhd003488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 28 Aug 2020 23:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364942 - head/sys/net/route X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/net/route X-SVN-Commit-Revision: 364942 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 28 Aug 2020 23:01:57 -0000 Author: melifaro Date: Fri Aug 28 23:01:56 2020 New Revision: 364942 URL: https://svnweb.freebsd.org/changeset/base/364942 Log: Move fib_rte_to_nh_flags() from net/route_var.h to net/route/nhop_ctl.c. No functional changes. Initially this function was created to perform runtime flag conversions for the previous incarnation of fib lookup functions. As these functions got deprecated, move the function to the file with the only remaining caller. Lastly, rename it to convert_rt_to_nh_flags() to follow the naming notation. Modified: head/sys/net/route/nhop_ctl.c head/sys/net/route/route_var.h Modified: head/sys/net/route/nhop_ctl.c ============================================================================== --- head/sys/net/route/nhop_ctl.c Fri Aug 28 22:50:20 2020 (r364941) +++ head/sys/net/route/nhop_ctl.c Fri Aug 28 23:01:56 2020 (r364942) @@ -244,6 +244,21 @@ set_nhop_gw_from_info(struct nhop_object *nh, struct r return (0); } +static uint16_t +convert_rt_to_nh_flags(int rt_flags) +{ + uint16_t res; + + res = (rt_flags & RTF_REJECT) ? NHF_REJECT : 0; + res |= (rt_flags & RTF_HOST) ? NHF_HOST : 0; + res |= (rt_flags & RTF_BLACKHOLE) ? NHF_BLACKHOLE : 0; + res |= (rt_flags & (RTF_DYNAMIC|RTF_MODIFIED)) ? NHF_REDIRECT : 0; + res |= (rt_flags & RTF_BROADCAST) ? NHF_BROADCAST : 0; + res |= (rt_flags & RTF_GATEWAY) ? NHF_GATEWAY : 0; + + return (res); +} + static int fill_nhop_from_info(struct nhop_priv *nh_priv, struct rt_addrinfo *info) { @@ -258,7 +273,7 @@ fill_nhop_from_info(struct nhop_priv *nh_priv, struct nh_priv->nh_family = info->rti_info[RTAX_DST]->sa_family; nh_priv->nh_type = 0; // hook responsibility to set nhop type - nh->nh_flags = fib_rte_to_nh_flags(rt_flags); + nh->nh_flags = convert_rt_to_nh_flags(rt_flags); set_nhop_mtu_from_info(nh, info); nh->nh_ifp = info->rti_ifa->ifa_ifp; nh->nh_ifa = info->rti_ifa; @@ -397,7 +412,7 @@ alter_nhop_from_info(struct nhop_object *nh, struct rt nh->nh_priv->rt_flags |= (RTF_GATEWAY & info->rti_flags); } /* Update datapath flags */ - nh->nh_flags = fib_rte_to_nh_flags(nh->nh_priv->rt_flags); + nh->nh_flags = convert_rt_to_nh_flags(nh->nh_priv->rt_flags); if (info->rti_ifa != NULL) nh->nh_ifa = info->rti_ifa; Modified: head/sys/net/route/route_var.h ============================================================================== --- head/sys/net/route/route_var.h Fri Aug 28 22:50:20 2020 (r364941) +++ head/sys/net/route/route_var.h Fri Aug 28 23:01:56 2020 (r364942) @@ -212,22 +212,6 @@ struct rtentry { ((!NH_IS_MULTIPATH(_nh)) ? (_nh) : _SELECT_NHOP(_nh, _flowid)) #define RT_SELECT_NHOP(_rt, _flowid) _RT_SELECT_NHOP((_rt)->rt_nhop, _flowid) -/* rte<>nhop translation */ -static inline uint16_t -fib_rte_to_nh_flags(int rt_flags) -{ - uint16_t res; - - res = (rt_flags & RTF_REJECT) ? NHF_REJECT : 0; - res |= (rt_flags & RTF_HOST) ? NHF_HOST : 0; - res |= (rt_flags & RTF_BLACKHOLE) ? NHF_BLACKHOLE : 0; - res |= (rt_flags & (RTF_DYNAMIC|RTF_MODIFIED)) ? NHF_REDIRECT : 0; - res |= (rt_flags & RTF_BROADCAST) ? NHF_BROADCAST : 0; - res |= (rt_flags & RTF_GATEWAY) ? NHF_GATEWAY : 0; - - return (res); -} - /* route_temporal.c */ void tmproutes_update(struct rib_head *rnh, struct rtentry *rt); void tmproutes_init(struct rib_head *rh); From owner-svn-src-all@freebsd.org Sat Aug 29 00:56:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F26223C8D00; Sat, 29 Aug 2020 00:56:39 +0000 (UTC) (envelope-from dch@skunkwerks.at) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (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 4BddMW5fqcz3Sjf; Sat, 29 Aug 2020 00:56:39 +0000 (UTC) (envelope-from dch@skunkwerks.at) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 3798DD62; Fri, 28 Aug 2020 20:56:38 -0400 (EDT) Received: from imap6 ([10.202.2.56]) by compute4.internal (MEProxy); Fri, 28 Aug 2020 20:56:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skunkwerks.at; h=mime-version:message-id:in-reply-to:references:date:from:to :cc:subject:content-type; s=fm3; bh=trFl0u5sLPAMoRyc+dhtAkadJE1f /G1twBoqufs9boA=; b=Jdd4MkhcxcYGz/3eZTU67lFUtHBIMFjmQ8VhdkFxYwOP tZ3l8MX/glaBIMXeYicd5Il1aJpJrKawAiSnjFn30gbhv00k35CZK8x/nFmP08ht Cu0JGV4Cti2YIAASvdFRMbvny7oDkFTn37mbRGNpNDUzA6WKw6e6KT67iA4iLz2Z gMhp2hOE47BGliht96mmjQxoaVNRzbW+CxDQDNnTBvbDQ3NZpJ0Yhfn3VMq5ZVaX EIUOt80MpSMt8QO3q3kFvuzu2xmR5btdiXMLd67WTRgLPAyuksObWS56+D/WqTL1 rAR/8tlqMrAI3UXs/iQC/fAXqi6unYhwekUmwkBwzQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=trFl0u 5sLPAMoRyc+dhtAkadJE1f/G1twBoqufs9boA=; b=Chxc5bw5MMZOjIlZ3x3mG0 KYLX+WLOroKAaAO6NDqXY0WCjSBOJcp5cXWcCw0eA7CbD8VnIIfNEMQ7ChTZwEhw 2GM/3ThICQK2+5prgNzyhOylymjsyWAtkmWDVFbPNgeq2oBVWhQhfNHSVCJQoaJ9 KzB5Spr8g0PHCJ2ZLgEST+jvhl5CFbvtKTuzjmT63BnjLfB9JuAdDUlB0BYQ7fw2 CCoDXJIX3LuAHFc8UZzAGREuKeFyhyLbECfwjPiXw9yqSArIDnPrbVTk6yegBNi5 xiprdiY0yZ90EwXUqjQT8F/w3LPptzMG5PVFzHiyCzkptQsncJF5Ea74fBdMdn/A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudeftddgvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderredtnecuhfhrohhmpedfffgrvhgvucevohhtthhlvghhuhgsvghrfdcuoegutghh sehskhhunhhkfigvrhhkshdrrghtqeenucggtffrrghtthgvrhhnpedvteeljefhveetie egfeeggeetjeeiffdufedviedvgfetieehgfeugffghfekheenucffohhmrghinhepfhhr vggvsghsugdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegutghhsehskhhunhhkfigvrhhkshdrrght X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id C728B1400A1; Fri, 28 Aug 2020 20:56:36 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-232-g4bdb081-fm-20200825.002-g4bdb081a Mime-Version: 1.0 Message-Id: <98502308-cc22-4819-87be-2acccd71e0a4@www.fastmail.com> In-Reply-To: <202008281825.07SIPkBa029646@repo.freebsd.org> References: <202008281825.07SIPkBa029646@repo.freebsd.org> Date: Sat, 29 Aug 2020 00:56:16 +0000 From: "Dave Cottlehuber" To: "Emmanuel Vadot" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364927 - head/sys/arm/allwinner/clkng Content-Type: text/plain X-Rspamd-Queue-Id: 4BddMW5fqcz3Sjf X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 00:56:40 -0000 On Fri, 28 Aug 2020, at 18:25, Emmanuel Vadot wrote: > Author: manu > Date: Fri Aug 28 18:25:45 2020 > New Revision: 364927 > URL: https://svnweb.freebsd.org/changeset/base/364927 > > Log: > arm: allwinner: clk: Add printfs when we cannot set the correct freq > > For some unknown reason this seems to fix this function when we printf > the best variable. This isn't a delay problem as doing a printf without > it doesn't solve this problem. > This is way above my pay grade so add some printf that shouldn't be printed > in 99% of the case anyway. > Fix booting on most Allwinner boards as the mmc IP uses a NM clock. > > Reported by: Alexander Mishin > MFC after: 3 days > X-MFC-With: 363887 > > Modified: > head/sys/arm/allwinner/clkng/aw_clk_nm.c > > Modified: head/sys/arm/allwinner/clkng/aw_clk_nm.c > ============================================================================== > --- head/sys/arm/allwinner/clkng/aw_clk_nm.c Fri Aug 28 17:55:54 2020 (r364926) > +++ head/sys/arm/allwinner/clkng/aw_clk_nm.c Fri Aug 28 18:25:45 2020 (r364927) > @@ -221,11 +221,15 @@ aw_clk_nm_set_freq(struct clknode *clk, uint64_t fpare > if ((best < *fout) && > ((flags & CLK_SET_ROUND_DOWN) == 0)) { > *stop = 1; > + printf("best freq (%llu) < requested freq(%llu)\n", Salut Manu, Fails to build on aarch64 unless this is reverted, or I use printf("best freq (%lu) < requested freq(%lu)\n", > + best, *fout); > return (ERANGE); > } > if ((best > *fout) && > ((flags & CLK_SET_ROUND_UP) == 0)) { > *stop = 1; > + printf("best freq (%llu) > requested freq(%llu)\n", & again printf("best freq (%lu) > requested freq(%lu)\n", A+ Dave -------------------------------------------------------------- >>> stage 3.1: building everything -------------------------------------------------------------- /usr/src/sys/arm/allwinner/clkng/aw_clk_nm.c:225:7: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat] best, *fout); ^~~~ /usr/src/sys/arm/allwinner/clkng/aw_clk_nm.c:225:13: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat] best, *fout); ^~~~~ /usr/src/sys/arm/allwinner/clkng/aw_clk_nm.c:232:7: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat] best, *fout); ^~~~ /usr/src/sys/arm/allwinner/clkng/aw_clk_nm.c:232:13: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat] best, *fout); ^~~~~ 4 errors generated. --- aw_clk_nm.o --- *** [aw_clk_nm.o] Error code 1 From owner-svn-src-all@freebsd.org Sat Aug 29 02:46:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8BECC3CB449; Sat, 29 Aug 2020 02:46: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdgpB3W3Tz3Ytt; Sat, 29 Aug 2020 02:46: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 5C7341EFE6; Sat, 29 Aug 2020 02:46: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 07T2kQH1044664; Sat, 29 Aug 2020 02:46:26 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07T2kPiH044660; Sat, 29 Aug 2020 02:46:25 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202008290246.07T2kPiH044660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 29 Aug 2020 02:46:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364943 - head/secure/caroot/trusted X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/secure/caroot/trusted X-SVN-Commit-Revision: 364943 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 02:46:26 -0000 Author: kevans Date: Sat Aug 29 02:46:25 2020 New Revision: 364943 URL: https://svnweb.freebsd.org/changeset/base/364943 Log: carrot: update bundle Stats: - Seven (7) removed - Four (4) added MFC after: 3 days Added: head/secure/caroot/trusted/Microsoft_ECC_Root_Certificate_Authority_2017.pem (contents, props changed) head/secure/caroot/trusted/Microsoft_RSA_Root_Certificate_Authority_2017.pem (contents, props changed) head/secure/caroot/trusted/certSIGN_Root_CA_G2.pem (contents, props changed) head/secure/caroot/trusted/e-Szigno_Root_CA_2017.pem (contents, props changed) Deleted: head/secure/caroot/trusted/AddTrust_External_Root.pem head/secure/caroot/trusted/AddTrust_Low-Value_Services_Root.pem head/secure/caroot/trusted/LuxTrust_Global_Root_2.pem head/secure/caroot/trusted/Staat_der_Nederlanden_Root_CA_-_G2.pem head/secure/caroot/trusted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G4.pem head/secure/caroot/trusted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G4.pem head/secure/caroot/trusted/Verisign_Class_3_Public_Primary_Certification_Authority_-_G3.pem Added: head/secure/caroot/trusted/Microsoft_ECC_Root_Certificate_Authority_2017.pem ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/trusted/Microsoft_ECC_Root_Certificate_Authority_2017.pem Sat Aug 29 02:46:25 2020 (r364943) @@ -0,0 +1,68 @@ +## +## Microsoft ECC Root Certificate Authority 2017 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 66:f2:3d:af:87:de:8b:b1:4a:ea:0c:57:31:01:c2:ec + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = US, O = Microsoft Corporation, CN = Microsoft ECC Root Certificate Authority 2017 + Validity + Not Before: Dec 18 23:06:45 2019 GMT + Not After : Jul 18 23:16:04 2042 GMT + Subject: C = US, O = Microsoft Corporation, CN = Microsoft ECC Root Certificate Authority 2017 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:d4:bc:3d:02:42:75:41:13:23:cd:80:04:86:02: + 51:2f:6a:a8:81:62:0b:65:cc:f6:ca:9d:1e:6f:4a: + 66:51:a2:03:d9:9d:91:fa:b6:16:b1:8c:6e:de:7c: + cd:db:79:a6:2f:ce:bb:ce:71:2f:e5:a5:ab:28:ec: + 63:04:66:99:f8:fa:f2:93:10:05:e1:81:28:42:e3: + c6:68:f4:e6:1b:84:60:4a:89:af:ed:79:0f:3b:ce: + f1:f6:44:f5:01:78:c0 + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + C8:CB:99:72:70:52:0C:F8:E6:BE:B2:04:57:29:2A:CF:42:10:ED:35 + 1.3.6.1.4.1.311.21.1: + ... + Signature Algorithm: ecdsa-with-SHA384 + 30:65:02:30:58:f2:4d:ea:0c:f9:5f:5e:ee:60:29:cb:3a:f2: + db:d6:32:84:19:3f:7c:d5:2f:c2:b1:cc:93:ae:50:bb:09:32: + c6:c6:ed:7e:c9:36:94:12:e4:68:85:06:a2:1b:d0:2f:02:31: + 00:99:e9:16:b4:0e:fa:56:48:d4:a4:30:16:91:78:db:54:8c: + 65:01:8a:e7:50:66:c2:31:b7:39:ba:b8:1a:22:07:4e:fc:6b: + 54:16:20:ff:2b:b5:e7:4c:0c:4d:a6:4f:73 +SHA1 Fingerprint=99:9A:64:C3:7F:F4:7D:9F:AB:95:F1:47:69:89:14:60:EE:C4:C3:C5 +-----BEGIN CERTIFICATE----- +MIICWTCCAd+gAwIBAgIQZvI9r4fei7FK6gxXMQHC7DAKBggqhkjOPQQDAzBlMQsw +CQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYD +VQQDEy1NaWNyb3NvZnQgRUNDIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIw +MTcwHhcNMTkxMjE4MjMwNjQ1WhcNNDIwNzE4MjMxNjA0WjBlMQswCQYDVQQGEwJV +UzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNy +b3NvZnQgRUNDIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwdjAQBgcq +hkjOPQIBBgUrgQQAIgNiAATUvD0CQnVBEyPNgASGAlEvaqiBYgtlzPbKnR5vSmZR +ogPZnZH6thaxjG7efM3beaYvzrvOcS/lpaso7GMEZpn4+vKTEAXhgShC48Zo9OYb +hGBKia/teQ87zvH2RPUBeMCjVDBSMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8E +BTADAQH/MB0GA1UdDgQWBBTIy5lycFIM+Oa+sgRXKSrPQhDtNTAQBgkrBgEEAYI3 +FQEEAwIBADAKBggqhkjOPQQDAwNoADBlAjBY8k3qDPlfXu5gKcs68tvWMoQZP3zV +L8KxzJOuULsJMsbG7X7JNpQS5GiFBqIb0C8CMQCZ6Ra0DvpWSNSkMBaReNtUjGUB +iudQZsIxtzm6uBoiB078a1QWIP8rtedMDE2mT3M= +-----END CERTIFICATE----- Added: head/secure/caroot/trusted/Microsoft_RSA_Root_Certificate_Authority_2017.pem ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/trusted/Microsoft_RSA_Root_Certificate_Authority_2017.pem Sat Aug 29 02:46:25 2020 (r364943) @@ -0,0 +1,136 @@ +## +## Microsoft RSA Root Certificate Authority 2017 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 1e:d3:97:09:5f:d8:b4:b3:47:70:1e:aa:be:7f:45:b3 + Signature Algorithm: sha384WithRSAEncryption + Issuer: C = US, O = Microsoft Corporation, CN = Microsoft RSA Root Certificate Authority 2017 + Validity + Not Before: Dec 18 22:51:22 2019 GMT + Not After : Jul 18 23:00:23 2042 GMT + Subject: C = US, O = Microsoft Corporation, CN = Microsoft RSA Root Certificate Authority 2017 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:ca:5b:be:94:33:8c:29:95:91:16:0a:95:bd:47: + 62:c1:89:f3:99:36:df:46:90:c9:a5:ed:78:6a:6f: + 47:91:68:f8:27:67:50:33:1d:a1:a6:fb:e0:e5:43: + a3:84:02:57:01:5d:9c:48:40:82:53:10:bc:bf:c7: + 3b:68:90:b6:82:2d:e5:f4:65:d0:cc:6d:19:cc:95: + f9:7b:ac:4a:94:ad:0e:de:4b:43:1d:87:07:92:13: + 90:80:83:64:35:39:04:fc:e5:e9:6c:b3:b6:1f:50: + 94:38:65:50:5c:17:46:b9:b6:85:b5:1c:b5:17:e8: + d6:45:9d:d8:b2:26:b0:ca:c4:70:4a:ae:60:a4:dd: + b3:d9:ec:fc:3b:d5:57:72:bc:3f:c8:c9:b2:de:4b: + 6b:f8:23:6c:03:c0:05:bd:95:c7:cd:73:3b:66:80: + 64:e3:1a:ac:2e:f9:47:05:f2:06:b6:9b:73:f5:78: + 33:5b:c7:a1:fb:27:2a:a1:b4:9a:91:8c:91:d3:3a: + 82:3e:76:40:b4:cd:52:61:51:70:28:3f:c5:c5:5a: + f2:c9:8c:49:bb:14:5b:4d:c8:ff:67:4d:4c:12:96: + ad:f5:fe:78:a8:97:87:d7:fd:5e:20:80:dc:a1:4b: + 22:fb:d4:89:ad:ba:ce:47:97:47:55:7b:8f:45:c8: + 67:28:84:95:1c:68:30:ef:ef:49:e0:35:7b:64:e7: + 98:b0:94:da:4d:85:3b:3e:55:c4:28:af:57:f3:9e: + 13:db:46:27:9f:1e:a2:5e:44:83:a4:a5:ca:d5:13: + b3:4b:3f:c4:e3:c2:e6:86:61:a4:52:30:b9:7a:20: + 4f:6f:0f:38:53:cb:33:0c:13:2b:8f:d6:9a:bd:2a: + c8:2d:b1:1c:7d:4b:51:ca:47:d1:48:27:72:5d:87: + eb:d5:45:e6:48:65:9d:af:52:90:ba:5b:a2:18:65: + 57:12:9f:68:b9:d4:15:6b:94:c4:69:22:98:f4:33: + e0:ed:f9:51:8e:41:50:c9:34:4f:76:90:ac:fc:38: + c1:d8:e1:7b:b9:e3:e3:94:e1:46:69:cb:0e:0a:50: + 6b:13:ba:ac:0f:37:5a:b7:12:b5:90:81:1e:56:ae: + 57:22:86:d9:c9:d2:d1:d7:51:e3:ab:3b:c6:55:fd: + 1e:0e:d3:74:0a:d1:da:aa:ea:69:b8:97:28:8f:48: + c4:07:f8:52:43:3a:f4:ca:55:35:2c:b0:a6:6a:c0: + 9c:f9:f2:81:e1:12:6a:c0:45:d9:67:b3:ce:ff:23: + a2:89:0a:54:d4:14:b9:2a:a8:d7:ec:f9:ab:cd:25: + 58:32:79:8f:90:5b:98:39:c4:08:06:c1:ac:7f:0e: + 3d:00:a5 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 09:CB:59:7F:86:B2:70:8F:1A:C3:39:E3:C0:D9:E9:BF:BB:4D:B2:23 + 1.3.6.1.4.1.311.21.1: + ... + Signature Algorithm: sha384WithRSAEncryption + ac:af:3e:5d:c2:11:96:89:8e:a3:e7:92:d6:97:15:b8:13:a2: + a6:42:2e:02:cd:16:05:59:27:ca:20:e8:ba:b8:e8:1a:ec:4d: + a8:97:56:ae:65:43:b1:8f:00:9b:52:cd:55:cd:53:39:6d:62: + 4c:8b:0d:5b:7c:2e:44:bf:83:10:8f:f3:53:82:80:c3:4f:3a: + c7:6e:11:3f:e6:e3:16:91:84:fb:6d:84:7f:34:74:ad:89:a7: + ce:b9:d7:d7:9f:84:64:92:be:95:a1:ad:09:53:33:dd:ee:0a: + ea:4a:51:8e:6f:55:ab:ba:b5:94:46:ae:8c:7f:d8:a2:50:25: + 65:60:80:46:db:33:04:ae:6c:b5:98:74:54:25:dc:93:e4:f8: + e3:55:15:3d:b8:6d:c3:0a:a4:12:c1:69:85:6e:df:64:f1:53: + 99:e1:4a:75:20:9d:95:0f:e4:d6:dc:03:f1:59:18:e8:47:89: + b2:57:5a:94:b6:a9:d8:17:2b:17:49:e5:76:cb:c1:56:99:3a: + 37:b1:ff:69:2c:91:91:93:e1:df:4c:a3:37:76:4d:a1:9f:f8: + 6d:1e:1d:d3:fa:ec:fb:f4:45:1d:13:6d:cf:f7:59:e5:22:27: + 72:2b:86:f3:57:bb:30:ed:24:4d:dc:7d:56:bb:a3:b3:f8:34: + 79:89:c1:e0:f2:02:61:f7:a6:fc:0f:bb:1c:17:0b:ae:41:d9: + 7c:bd:27:a3:fd:2e:3a:d1:93:94:b1:73:1d:24:8b:af:5b:20: + 89:ad:b7:67:66:79:f5:3a:c6:a6:96:33:fe:53:92:c8:46:b1: + 11:91:c6:99:7f:8f:c9:d6:66:31:20:41:10:87:2d:0c:d6:c1: + af:34:98:ca:64:83:fb:13:57:d1:c1:f0:3c:7a:8c:a5:c1:fd: + 95:21:a0:71:c1:93:67:71:12:ea:8f:88:0a:69:19:64:99:23: + 56:fb:ac:2a:2e:70:be:66:c4:0c:84:ef:e5:8b:f3:93:01:f8: + 6a:90:93:67:4b:b2:68:a3:b5:62:8f:e9:3f:8c:7a:3b:5e:0f: + e7:8c:b8:c6:7c:ef:37:fd:74:e2:c8:4f:33:72:e1:94:39:6d: + bd:12:af:be:0c:4e:70:7c:1b:6f:8d:b3:32:93:73:44:16:6d: + e8:f4:f7:e0:95:80:8f:96:5d:38:a4:f4:ab:de:0a:30:87:93: + d8:4d:00:71:62:45:27:4b:3a:42:84:5b:7f:65:b7:67:34:52: + 2d:9c:16:6b:aa:a8:d8:7b:a3:42:4c:71:c7:0c:ca:3e:83:e4: + a6:ef:b7:01:30:5e:51:a3:79:f5:70:69:a6:41:44:0f:86:b0: + 2c:91:c6:3d:ea:ae:0f:84 +SHA1 Fingerprint=73:A5:E6:4A:3B:FF:83:16:FF:0E:DC:CC:61:8A:90:6E:4E:AE:4D:74 +-----BEGIN CERTIFICATE----- +MIIFqDCCA5CgAwIBAgIQHtOXCV/YtLNHcB6qvn9FszANBgkqhkiG9w0BAQwFADBl +MQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYw +NAYDVQQDEy1NaWNyb3NvZnQgUlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5 +IDIwMTcwHhcNMTkxMjE4MjI1MTIyWhcNNDIwNzE4MjMwMDIzWjBlMQswCQYDVQQG +EwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1N +aWNyb3NvZnQgUlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKW76UM4wplZEWCpW9R2LBifOZ +Nt9GkMml7Xhqb0eRaPgnZ1AzHaGm++DlQ6OEAlcBXZxIQIJTELy/xztokLaCLeX0 +ZdDMbRnMlfl7rEqUrQ7eS0MdhweSE5CAg2Q1OQT85elss7YfUJQ4ZVBcF0a5toW1 +HLUX6NZFndiyJrDKxHBKrmCk3bPZ7Pw71VdyvD/IybLeS2v4I2wDwAW9lcfNcztm +gGTjGqwu+UcF8ga2m3P1eDNbx6H7JyqhtJqRjJHTOoI+dkC0zVJhUXAoP8XFWvLJ +jEm7FFtNyP9nTUwSlq31/niol4fX/V4ggNyhSyL71Imtus5Hl0dVe49FyGcohJUc +aDDv70ngNXtk55iwlNpNhTs+VcQor1fznhPbRiefHqJeRIOkpcrVE7NLP8TjwuaG +YaRSMLl6IE9vDzhTyzMMEyuP1pq9KsgtsRx9S1HKR9FIJ3Jdh+vVReZIZZ2vUpC6 +W6IYZVcSn2i51BVrlMRpIpj0M+Dt+VGOQVDJNE92kKz8OMHY4Xu54+OU4UZpyw4K +UGsTuqwPN1q3ErWQgR5WrlcihtnJ0tHXUeOrO8ZV/R4O03QK0dqq6mm4lyiPSMQH ++FJDOvTKVTUssKZqwJz58oHhEmrARdlns87/I6KJClTUFLkqqNfs+avNJVgyeY+Q +W5g5xAgGwax/Dj0ApQIDAQABo1QwUjAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/ +BAUwAwEB/zAdBgNVHQ4EFgQUCctZf4aycI8awznjwNnpv7tNsiMwEAYJKwYBBAGC +NxUBBAMCAQAwDQYJKoZIhvcNAQEMBQADggIBAKyvPl3CEZaJjqPnktaXFbgToqZC +LgLNFgVZJ8og6Lq46BrsTaiXVq5lQ7GPAJtSzVXNUzltYkyLDVt8LkS/gxCP81OC +gMNPOsduET/m4xaRhPtthH80dK2Jp86519efhGSSvpWhrQlTM93uCupKUY5vVau6 +tZRGrox/2KJQJWVggEbbMwSubLWYdFQl3JPk+ONVFT24bcMKpBLBaYVu32TxU5nh +SnUgnZUP5NbcA/FZGOhHibJXWpS2qdgXKxdJ5XbLwVaZOjex/2kskZGT4d9Mozd2 +TaGf+G0eHdP67Pv0RR0Tbc/3WeUiJ3IrhvNXuzDtJE3cfVa7o7P4NHmJweDyAmH3 +pvwPuxwXC65B2Xy9J6P9LjrRk5Sxcx0ki69bIImtt2dmefU6xqaWM/5TkshGsRGR +xpl/j8nWZjEgQRCHLQzWwa80mMpkg/sTV9HB8Dx6jKXB/ZUhoHHBk2dxEuqPiApp +GWSZI1b7rCoucL5mxAyE7+WL85MB+GqQk2dLsmijtWKP6T+MejteD+eMuMZ87zf9 +dOLITzNy4ZQ5bb0Sr74MTnB8G2+NszKTc0QWbej09+CVgI+WXTik9KveCjCHk9hN +AHFiRSdLOkKEW39lt2c0Ui2cFmuqqNh7o0JMcccMyj6D5KbvtwEwXlGjefVwaaZB +RA+GsCyRxj3qrg+E +-----END CERTIFICATE----- Added: head/secure/caroot/trusted/certSIGN_Root_CA_G2.pem ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/trusted/certSIGN_Root_CA_G2.pem Sat Aug 29 02:46:25 2020 (r364943) @@ -0,0 +1,132 @@ +## +## certSIGN Root CA G2 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 11:00:34:b6:4e:c6:36:2d:36 + Signature Algorithm: sha256WithRSAEncryption + Issuer: C = RO, O = CERTSIGN SA, OU = certSIGN ROOT CA G2 + Validity + Not Before: Feb 6 09:27:35 2017 GMT + Not After : Feb 6 09:27:35 2042 GMT + Subject: C = RO, O = CERTSIGN SA, OU = certSIGN ROOT CA G2 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:c0:c5:75:19:91:7d:44:74:74:87:fe:0e:3b:96: + dc:d8:01:16:cc:ee:63:91:e7:0b:6f:ce:3b:0a:69: + 1a:7c:c2:e3:af:82:8e:86:d7:5e:8f:57:eb:d3:21: + 59:fd:39:37:42:30:be:50:ea:b6:0f:a9:88:d8:2e: + 2d:69:21:e7:d1:37:18:4e:7d:91:d5:16:5f:6b:5b: + 00:c2:39:43:0d:36:85:52:b9:53:65:0f:1d:42:e5: + 8f:cf:05:d3:ee:dc:0c:1a:d9:b8:8b:78:22:67:e4: + 69:b0:68:c5:3c:e4:6c:5a:46:e7:cd:c7:fa:ef:c4: + ec:4b:bd:6a:a4:ac:fd:cc:28:51:ef:92:b4:29:ab: + ab:35:9a:4c:e4:c4:08:c6:26:cc:f8:69:9f:e4:9c: + f0:29:d3:5c:f9:c6:16:25:9e:23:c3:20:c1:3d:0f: + 3f:38:40:b0:fe:82:44:38:aa:5a:1a:8a:6b:63:58: + 38:b4:15:d3:b6:11:69:7b:1e:54:ee:8c:1a:22:ac: + 72:97:3f:23:59:9b:c9:22:84:c1:07:4f:cc:7f:e2: + 57:ca:12:70:bb:a6:65:f3:69:75:63:bd:95:fb:1b: + 97:cd:e4:a8:af:f6:d1:4e:a8:d9:8a:71:24:cd:36: + 3d:bc:96:c4:f1:6c:a9:ae:e5:cf:0d:6e:28:0d:b0: + 0e:b5:ca:51:7b:78:14:c3:20:2f:7f:fb:14:55:e1: + 11:99:fd:d5:0a:a1:9e:02:e3:62:5f:eb:35:4b:2c: + b8:72:e8:3e:3d:4f:ac:2c:bb:2e:86:e2:a3:76:8f: + e5:93:2a:cf:a5:ab:c8:5c:8d:4b:06:ff:12:46:ac: + 78:cb:14:07:35:e0:a9:df:8b:e9:af:15:4f:16:89: + 5b:bd:f6:8d:c6:59:ae:88:85:0e:c1:89:eb:1f:67: + c5:45:8e:ff:6d:37:36:2b:78:66:83:91:51:2b:3d: + ff:51:77:76:62:a1:ec:67:3e:3e:81:83:e0:56:a9: + 50:1f:1f:7a:99:ab:63:bf:84:17:77:f1:0d:3b:df: + f7:9c:61:b3:35:98:8a:3a:b2:ec:3c:1a:37:3f:7e: + 8f:92:cf:d9:12:14:64:da:10:02:15:41:ff:4f:c4: + eb:1c:a3:c9:fa:99:f7:46:e9:e1:18:d9:b1:b8:32: + 2d:cb:14:0c:50:d8:83:65:83:ee:b9:5c:cf:cb:05: + 5a:4c:fa:19:97:6b:d6:5d:13:d3:c2:5c:54:bc:32: + 73:a0:78:f5:f1:6d:1e:cb:9f:a5:a6:9f:22:dc:d1: + 51:9e:82:79:64:60:29:13:3e:a3:fd:4f:72:6a:ab: + e2:d4:e5:b8:24:55:2c:44:4b:8a:88:44:9c:ca:84: + d3:2a:3b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 82:21:2D:66:C6:D7:A0:E0:15:EB:CE:4C:09:77:C4:60:9E:54:6E:03 + Signature Algorithm: sha256WithRSAEncryption + 60:de:1a:b8:e7:f2:60:82:d5:03:33:81:cb:06:8a:f1:22:49: + e9:e8:ea:91:7f:c6:33:5e:68:19:03:86:3b:43:01:cf:07:70: + e4:08:1e:65:85:91:e6:11:22:b7:f5:02:23:8e:ae:b9:1e:7d: + 1f:7e:6c:e6:bd:25:d5:95:1a:f2:05:a6:af:85:02:6f:ae:f8: + d6:31:ff:25:c9:4a:c8:c7:8a:a9:d9:9f:4b:49:9b:11:57:99: + 92:43:11:de:b6:33:a4:cc:d7:8d:64:7d:d4:cd:3c:28:2c:b4: + 9a:96:ea:4d:f5:c4:44:c4:25:aa:20:80:d8:29:55:f7:e0:41: + fc:06:26:ff:b9:36:f5:43:14:03:66:78:e1:11:b1:da:20:5f: + 46:00:78:00:21:a5:1e:00:28:61:78:6f:a8:01:01:8f:9d:34: + 9a:ff:f4:38:90:fb:b8:d1:b3:72:06:c9:71:e6:81:c5:79:ed: + 0b:a6:79:f2:13:0b:9c:f7:5d:0e:7b:24:93:b4:48:db:86:5f: + de:50:86:78:e7:40:e6:31:a8:90:76:70:61:af:9c:37:2c:11: + b5:82:b7:aa:ae:24:34:5b:72:0c:69:0d:cd:59:9f:f6:71:af: + 9c:0b:d1:0a:38:f9:06:22:83:53:25:0c:fc:51:c4:e6:be:e2: + 39:95:0b:24:ad:af:d1:95:e4:96:d7:74:64:6b:71:4e:02:3c: + aa:85:f3:20:a3:43:39:76:5b:6c:50:fe:9a:9c:14:1e:65:14: + 8a:15:bd:a3:82:45:5a:49:56:6a:d2:9c:b1:63:32:e5:61:e0: + 53:22:0e:a7:0a:49:ea:cb:7e:1f:a8:e2:62:80:f6:10:45:52: + 98:06:18:de:a5:cd:2f:7f:aa:d4:e9:3e:08:72:ec:23:03:02: + 3c:a6:aa:d8:bc:67:74:3d:14:17:fb:54:4b:17:e3:d3:79:3d: + 6d:6b:49:c9:28:0e:2e:74:50:bf:0c:d9:46:3a:10:86:c9:a7: + 3f:e9:a0:ec:7f:eb:a5:77:58:69:71:e6:83:0a:37:f2:86:49: + 6a:be:79:08:90:f6:02:16:64:3e:e5:da:4c:7e:0c:34:c9:f9: + 5f:b6:b3:28:51:a7:a7:2b:aa:49:fa:8d:65:29:4e:e3:6b:13: + a7:94:a3:2d:51:6d:78:0c:44:cb:df:de:08:6f:ce:a3:64:ab: + d3:95:84:d4:b9:52:54:72:7b:96:25:cc:bc:69:e3:48:6e:0d: + d0:c7:9d:27:9a:aa:f8:13:92:dd:1e:df:63:9f:35:a9:16:36: + ec:8c:b8:83:f4:3d:89:8f:cd:b4:17:5e:d7:b3:17:41:10:5d: + 27:73:60:85:57:49:22:07 +SHA1 Fingerprint=26:F9:93:B4:ED:3D:28:27:B0:B9:4B:A7:E9:15:1D:A3:8D:92:E5:32 +-----BEGIN CERTIFICATE----- +MIIFRzCCAy+gAwIBAgIJEQA0tk7GNi02MA0GCSqGSIb3DQEBCwUAMEExCzAJBgNV +BAYTAlJPMRQwEgYDVQQKEwtDRVJUU0lHTiBTQTEcMBoGA1UECxMTY2VydFNJR04g +Uk9PVCBDQSBHMjAeFw0xNzAyMDYwOTI3MzVaFw00MjAyMDYwOTI3MzVaMEExCzAJ +BgNVBAYTAlJPMRQwEgYDVQQKEwtDRVJUU0lHTiBTQTEcMBoGA1UECxMTY2VydFNJ +R04gUk9PVCBDQSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDF +dRmRfUR0dIf+DjuW3NgBFszuY5HnC2/OOwppGnzC46+CjobXXo9X69MhWf05N0Iw +vlDqtg+piNguLWkh59E3GE59kdUWX2tbAMI5Qw02hVK5U2UPHULlj88F0+7cDBrZ +uIt4ImfkabBoxTzkbFpG583H+u/E7Eu9aqSs/cwoUe+StCmrqzWaTOTECMYmzPhp +n+Sc8CnTXPnGFiWeI8MgwT0PPzhAsP6CRDiqWhqKa2NYOLQV07YRaXseVO6MGiKs +cpc/I1mbySKEwQdPzH/iV8oScLumZfNpdWO9lfsbl83kqK/20U6o2YpxJM02PbyW +xPFsqa7lzw1uKA2wDrXKUXt4FMMgL3/7FFXhEZn91QqhngLjYl/rNUssuHLoPj1P +rCy7Lobio3aP5ZMqz6WryFyNSwb/EkaseMsUBzXgqd+L6a8VTxaJW732jcZZroiF +DsGJ6x9nxUWO/203Nit4ZoORUSs9/1F3dmKh7Gc+PoGD4FapUB8fepmrY7+EF3fx +DTvf95xhszWYijqy7DwaNz9+j5LP2RIUZNoQAhVB/0/E6xyjyfqZ90bp4RjZsbgy +LcsUDFDYg2WD7rlcz8sFWkz6GZdr1l0T08JcVLwyc6B49fFtHsufpaafItzRUZ6C +eWRgKRM+o/1Pcmqr4tTluCRVLERLiohEnMqE0yo7AgMBAAGjQjBAMA8GA1UdEwEB +/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSCIS1mxteg4BXrzkwJ +d8RgnlRuAzANBgkqhkiG9w0BAQsFAAOCAgEAYN4auOfyYILVAzOBywaK8SJJ6ejq +kX/GM15oGQOGO0MBzwdw5AgeZYWR5hEit/UCI46uuR59H35s5r0l1ZUa8gWmr4UC +b6741jH/JclKyMeKqdmfS0mbEVeZkkMR3rYzpMzXjWR91M08KCy0mpbqTfXERMQl +qiCA2ClV9+BB/AYm/7k29UMUA2Z44RGx2iBfRgB4ACGlHgAoYXhvqAEBj500mv/0 +OJD7uNGzcgbJceaBxXntC6Z58hMLnPddDnskk7RI24Zf3lCGeOdA5jGokHZwYa+c +NywRtYK3qq4kNFtyDGkNzVmf9nGvnAvRCjj5BiKDUyUM/FHE5r7iOZULJK2v0ZXk +ltd0ZGtxTgI8qoXzIKNDOXZbbFD+mpwUHmUUihW9o4JFWklWatKcsWMy5WHgUyIO +pwpJ6st+H6jiYoD2EEVSmAYY3qXNL3+q1Ok+CHLsIwMCPKaq2LxndD0UF/tUSxfj +03k9bWtJySgOLnRQvwzZRjoQhsmnP+mg7H/rpXdYaXHmgwo38oZJar55CJD2AhZk +PuXaTH4MNMn5X7azKFGnpyuqSfqNZSlO42sTp5SjLVFteAxEy9/eCG/Oo2Sr05WE +1LlSVHJ7liXMvGnjSG4N0MedJ5qq+BOS3R7fY581qRY27Iy4g/Q9iY/NtBde17MX +QRBdJ3NghVdJIgc= +-----END CERTIFICATE----- Added: head/secure/caroot/trusted/e-Szigno_Root_CA_2017.pem ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/caroot/trusted/e-Szigno_Root_CA_2017.pem Sat Aug 29 02:46:25 2020 (r364943) @@ -0,0 +1,65 @@ +## +## e-Szigno Root CA 2017 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## Extracted from nss +## with $FreeBSD: head/secure/caroot/MAca-bundle.pl 352951 2019-10-02 01:27:50Z kevans $ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 01:54:48:ef:21:fd:97:59:0d:f5:04:0a + Signature Algorithm: ecdsa-with-SHA256 + Issuer: C = HU, L = Budapest, O = Microsec Ltd., organizationIdentifier = VATHU-23584497, CN = e-Szigno Root CA 2017 + Validity + Not Before: Aug 22 12:07:06 2017 GMT + Not After : Aug 22 12:07:06 2042 GMT + Subject: C = HU, L = Budapest, O = Microsec Ltd., organizationIdentifier = VATHU-23584497, CN = e-Szigno Root CA 2017 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (256 bit) + pub: + 04:96:dc:3d:8a:d8:b0:7b:6f:c6:27:be:44:90:b1: + b3:56:15:7b:8e:43:24:7d:1a:84:59:ee:63:68:b2: + c6:5e:87:d0:15:48:1e:a8:90:ad:bd:53:a2:da:de: + 3a:90:a6:60:5f:68:32:b5:86:41:df:87:5b:2c:7b: + c5:fe:7c:7a:da + ASN1 OID: prime256v1 + NIST CURVE: P-256 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 87:11:15:08:D1:AA:C1:78:0C:B1:AF:CE:C6:C9:90:EF:BF:30:04:C0 + X509v3 Authority Key Identifier: + keyid:87:11:15:08:D1:AA:C1:78:0C:B1:AF:CE:C6:C9:90:EF:BF:30:04:C0 + + Signature Algorithm: ecdsa-with-SHA256 + 30:46:02:21:00:b5:57:dd:d7:8a:55:0b:36:e1:86:44:fa:d4: + d9:68:8d:b8:dc:23:8a:8a:0d:d4:2f:7d:ea:73:ec:bf:4d:6c: + a8:02:21:00:cb:a5:b4:12:fa:e7:b5:e8:cf:7e:93:fc:f3:35: + 8f:6f:4e:5a:7c:b4:bc:4e:b2:fc:72:aa:5b:59:f9:e7:dc:31 +SHA1 Fingerprint=89:D4:83:03:4F:9E:9A:48:80:5F:72:37:D4:A9:A6:EF:CB:7C:1F:D1 +-----BEGIN CERTIFICATE----- +MIICQDCCAeWgAwIBAgIMAVRI7yH9l1kN9QQKMAoGCCqGSM49BAMCMHExCzAJBgNV +BAYTAkhVMREwDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMgTHRk +LjEXMBUGA1UEYQwOVkFUSFUtMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3ppZ25vIFJv +b3QgQ0EgMjAxNzAeFw0xNzA4MjIxMjA3MDZaFw00MjA4MjIxMjA3MDZaMHExCzAJ +BgNVBAYTAkhVMREwDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMg +THRkLjEXMBUGA1UEYQwOVkFUSFUtMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3ppZ25v +IFJvb3QgQ0EgMjAxNzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJbcPYrYsHtv +xie+RJCxs1YVe45DJH0ahFnuY2iyxl6H0BVIHqiQrb1TotreOpCmYF9oMrWGQd+H +Wyx7xf58etqjYzBhMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G +A1UdDgQWBBSHERUI0arBeAyxr87GyZDvvzAEwDAfBgNVHSMEGDAWgBSHERUI0arB +eAyxr87GyZDvvzAEwDAKBggqhkjOPQQDAgNJADBGAiEAtVfd14pVCzbhhkT61Nlo +jbjcI4qKDdQvfepz7L9NbKgCIQDLpbQS+ue16M9+k/zzNY9vTlp8tLxOsvxyqltZ ++efcMQ== +-----END CERTIFICATE----- From owner-svn-src-all@freebsd.org Sat Aug 29 04:29:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31D423CCB97; Sat, 29 Aug 2020 04:29: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bdk5Z0PzZz3dwr; Sat, 29 Aug 2020 04:29:54 +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 E675520411; Sat, 29 Aug 2020 04:29:53 +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 07T4Trvc007765; Sat, 29 Aug 2020 04:29:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07T4TrbH007764; Sat, 29 Aug 2020 04:29:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008290429.07T4TrbH007764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 29 Aug 2020 04:29:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364944 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 04:29:54 -0000 Author: imp Date: Sat Aug 29 04:29:53 2020 New Revision: 364944 URL: https://svnweb.freebsd.org/changeset/base/364944 Log: devctl: move to using a uma zone Convert the memory management of devctl. Rewrite if to make better use of memory. This eliminates several mallocs (5? worse case) needed to send a message. It's now possible to always send a message, though if things are really backed up the oldest message will be dropped to free up space for the newest. Add a static bus_child_{location,pnpinfo}_sb to start migrating to sbuf instead of buffer + length. Use it in the new code. Other code will be converted later (bus_child_*_str is only used inside of subr_bus.c, though implemented in ~100 places in the tree). Reviewed by: markj@ Differential Revision: https://reviews.freebsd.org/D26140 Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Sat Aug 29 02:46:25 2020 (r364943) +++ head/sys/kern/subr_bus.c Sat Aug 29 04:29:53 2020 (r364944) @@ -156,6 +156,8 @@ EVENTHANDLER_LIST_DEFINE(device_attach); EVENTHANDLER_LIST_DEFINE(device_detach); EVENTHANDLER_LIST_DEFINE(dev_lookup); +static int bus_child_location_sb(device_t child, struct sbuf *sb); +static int bus_child_pnpinfo_sb(device_t child, struct sbuf *sb); static void devctl2_init(void); static bool device_frozen; @@ -392,9 +394,10 @@ static struct cdevsw dev_cdevsw = { .d_name = "devctl", }; +#define DEVCTL_BUFFER (1024 - sizeof(void *)) struct dev_event_info { - char *dei_data; STAILQ_ENTRY(dev_event_info) dei_link; + char dei_data[DEVCTL_BUFFER]; }; STAILQ_HEAD(devq, dev_event_info); @@ -409,6 +412,7 @@ static struct dev_softc { struct selinfo sel; struct devq devq; struct sigio *sigio; + uma_zone_t zone; } devsoftc; static void filt_devctl_detach(struct knote *kn); @@ -431,6 +435,11 @@ devinit(void) cv_init(&devsoftc.cv, "dev cv"); STAILQ_INIT(&devsoftc.devq); knlist_init_mtx(&devsoftc.sel.si_note, &devsoftc.mtx); + if (devctl_queue_length > 0) { + devsoftc.zone = uma_zcreate("DEVCTL", sizeof(struct dev_event_info), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + uma_prealloc(devsoftc.zone, devctl_queue_length); + } devctl2_init(); } @@ -495,8 +504,7 @@ devread(struct cdev *dev, struct uio *uio, int ioflag) devsoftc.queued--; mtx_unlock(&devsoftc.mtx); rv = uiomove(n1->dei_data, strlen(n1->dei_data), uio); - free(n1->dei_data, M_BUS); - free(n1, M_BUS); + uma_zfree(devsoftc.zone, n1); return (rv); } @@ -585,42 +593,51 @@ devctl_process_running(void) return (devsoftc.inuse == 1); } -/** - * @brief Queue data to be read from the devctl device - * - * Generic interface to queue data to the devctl device. It is - * assumed that @p data is properly formatted. It is further assumed - * that @p data is allocated using the M_BUS malloc type. - */ -static void -devctl_queue_data_f(char *data, int flags) +static struct dev_event_info * +devctl_alloc_dei(void) { - struct dev_event_info *n1 = NULL, *n2 = NULL; + struct dev_event_info *dei = NULL; - if (strlen(data) == 0) - goto out; + mtx_lock(&devsoftc.mtx); if (devctl_queue_length == 0) goto out; - n1 = malloc(sizeof(*n1), M_BUS, flags); - if (n1 == NULL) - goto out; - n1->dei_data = data; - mtx_lock(&devsoftc.mtx); - if (devctl_queue_length == 0) { - mtx_unlock(&devsoftc.mtx); - free(n1->dei_data, M_BUS); - free(n1, M_BUS); - return; - } - /* Leave at least one spot in the queue... */ - while (devsoftc.queued > devctl_queue_length - 1) { - n2 = STAILQ_FIRST(&devsoftc.devq); + if (devctl_queue_length == devsoftc.queued) { + dei = STAILQ_FIRST(&devsoftc.devq); STAILQ_REMOVE_HEAD(&devsoftc.devq, dei_link); - free(n2->dei_data, M_BUS); - free(n2, M_BUS); devsoftc.queued--; + } else { + /* dei can't be NULL -- we know we have at least one in the zone */ + dei = uma_zalloc(devsoftc.zone, M_NOWAIT); + MPASS(dei != NULL); } - STAILQ_INSERT_TAIL(&devsoftc.devq, n1, dei_link); + *dei->dei_data = '\0'; +out: + mtx_unlock(&devsoftc.mtx); + return (dei); +} + +static struct dev_event_info * +devctl_alloc_dei_sb(struct sbuf *sb) +{ + struct dev_event_info *dei; + + dei = devctl_alloc_dei(); + if (dei != NULL) + sbuf_new(sb, dei->dei_data, sizeof(dei->dei_data), SBUF_FIXEDLEN); + return (dei); +} + +static void +devctl_free_dei(struct dev_event_info *dei) +{ + uma_zfree(devsoftc.zone, dei); +} + +static void +devctl_queue(struct dev_event_info *dei) +{ + mtx_lock(&devsoftc.mtx); + STAILQ_INSERT_TAIL(&devsoftc.devq, dei, dei_link); devsoftc.queued++; cv_broadcast(&devsoftc.cv); KNOTE_LOCKED(&devsoftc.sel.si_note, 0); @@ -628,55 +645,38 @@ devctl_queue_data_f(char *data, int flags) selwakeup(&devsoftc.sel); if (devsoftc.async && devsoftc.sigio != NULL) pgsigio(&devsoftc.sigio, SIGIO, 0); - return; -out: - /* - * We have to free data on all error paths since the caller - * assumes it will be free'd when this item is dequeued. - */ - free(data, M_BUS); - return; } -static void -devctl_queue_data(char *data) -{ - devctl_queue_data_f(data, M_NOWAIT); -} - /** * @brief Send a 'notification' to userland, using standard ways */ void devctl_notify_f(const char *system, const char *subsystem, const char *type, - const char *data, int flags) + const char *data, int flags __unused) { - int len = 0; - char *msg; + struct dev_event_info *dei; + struct sbuf sb; - if (system == NULL) - return; /* BOGUS! Must specify system. */ - if (subsystem == NULL) - return; /* BOGUS! Must specify subsystem. */ - if (type == NULL) - return; /* BOGUS! Must specify type. */ - len += strlen(" system=") + strlen(system); - len += strlen(" subsystem=") + strlen(subsystem); - len += strlen(" type=") + strlen(type); - /* add in the data message plus newline. */ - if (data != NULL) - len += strlen(data); - len += 3; /* '!', '\n', and NUL */ - msg = malloc(len, M_BUS, flags); - if (msg == NULL) - return; /* Drop it on the floor */ - if (data != NULL) - snprintf(msg, len, "!system=%s subsystem=%s type=%s %s\n", - system, subsystem, type, data); + if (system == NULL || subsystem == NULL || type == NULL) + return; + dei = devctl_alloc_dei_sb(&sb); + if (dei == NULL) + return; + sbuf_cpy(&sb, "!system="); + sbuf_cat(&sb, system); + sbuf_cat(&sb, " subsystem="); + sbuf_cat(&sb, subsystem); + sbuf_cat(&sb, " type="); + sbuf_cat(&sb, type); + if (data != NULL) { + sbuf_putc(&sb, ' '); + sbuf_cat(&sb, data); + } + sbuf_putc(&sb, '\n'); + if (sbuf_finish(&sb) != 0) + devctl_free_dei(dei); /* overflow -> drop it */ else - snprintf(msg, len, "!system=%s subsystem=%s type=%s\n", - system, subsystem, type); - devctl_queue_data_f(msg, flags); + devctl_queue(dei); } void @@ -698,53 +698,46 @@ devctl_notify(const char *system, const char *subsyste * object of that event, plus the plug and play info and location info * for that event. This is likely most useful for devices, but less * useful for other consumers of this interface. Those should use - * the devctl_queue_data() interface instead. + * the devctl_notify() interface instead. + * + * Output: + * ${type}${what} at $(location dev) $(pnp-info dev) on $(parent dev) */ static void devaddq(const char *type, const char *what, device_t dev) { - char *data = NULL; - char *loc = NULL; - char *pnp = NULL; + struct dev_event_info *dei; const char *parstr; + struct sbuf sb; - if (!devctl_queue_length)/* Rare race, but lost races safely discard */ + dei = devctl_alloc_dei_sb(&sb); + if (dei == NULL) return; - data = malloc(1024, M_BUS, M_NOWAIT); - if (data == NULL) - goto bad; + sbuf_cpy(&sb, type); + sbuf_cat(&sb, what); + sbuf_cat(&sb, " at "); - /* get the bus specific location of this device */ - loc = malloc(1024, M_BUS, M_NOWAIT); - if (loc == NULL) - goto bad; - *loc = '\0'; - bus_child_location_str(dev, loc, 1024); + /* Add in the location */ + bus_child_location_sb(dev, &sb); + sbuf_putc(&sb, ' '); - /* Get the bus specific pnp info of this device */ - pnp = malloc(1024, M_BUS, M_NOWAIT); - if (pnp == NULL) - goto bad; - *pnp = '\0'; - bus_child_pnpinfo_str(dev, pnp, 1024); + /* Add in pnpinfo */ + bus_child_pnpinfo_sb(dev, &sb); /* Get the parent of this device, or / if high enough in the tree. */ if (device_get_parent(dev) == NULL) parstr = "."; /* Or '/' ? */ else parstr = device_get_nameunit(device_get_parent(dev)); - /* String it all together. */ - snprintf(data, 1024, "%s%s at %s %s on %s\n", type, what, loc, pnp, - parstr); - free(loc, M_BUS); - free(pnp, M_BUS); - devctl_queue_data(data); + sbuf_cat(&sb, " on "); + sbuf_cat(&sb, parstr); + sbuf_putc(&sb, '\n'); + if (sbuf_finish(&sb) != 0) + goto bad; + devctl_queue(dei); return; bad: - free(pnp, M_BUS); - free(loc, M_BUS); - free(data, M_BUS); - return; + devctl_free_dei(dei); } /* @@ -786,7 +779,6 @@ devnomatch(device_t dev) static int sysctl_devctl_queue(SYSCTL_HANDLER_ARGS) { - struct dev_event_info *n1; int q, error; q = devctl_queue_length; @@ -795,18 +787,32 @@ sysctl_devctl_queue(SYSCTL_HANDLER_ARGS) return (error); if (q < 0) return (EINVAL); - if (mtx_initialized(&devsoftc.mtx)) - mtx_lock(&devsoftc.mtx); - devctl_queue_length = q; - while (devsoftc.queued > devctl_queue_length) { - n1 = STAILQ_FIRST(&devsoftc.devq); - STAILQ_REMOVE_HEAD(&devsoftc.devq, dei_link); - free(n1->dei_data, M_BUS); - free(n1, M_BUS); - devsoftc.queued--; + + /* + * When set as a tunable, we've not yet initialized the mutex. + * It is safe to just assign to devctl_queue_length and return + * as we're racing no one. We'll use whatever value set in + * devinit. + */ + if (!mtx_initialized(&devsoftc.mtx)) { + devctl_queue_length = q; + return (0); } - if (mtx_initialized(&devsoftc.mtx)) - mtx_unlock(&devsoftc.mtx); + + /* + * XXX It's hard to grow or shrink the UMA zone. Only allow + * disabling the queue size for the moment until underlying + * UMA issues can be sorted out. + */ + if (q != 0) + return (EINVAL); + if (q == devctl_queue_length) + return (0); + mtx_lock(&devsoftc.mtx); + devctl_queue_length = 0; + uma_zdestroy(devsoftc.zone); + devsoftc.zone = 0; + mtx_unlock(&devsoftc.mtx); return (0); } @@ -4918,6 +4924,70 @@ bus_child_location_str(device_t child, char *buf, size } return (BUS_CHILD_LOCATION_STR(parent, child, buf, buflen)); } + +/** + * @brief Wrapper function for bus_child_pnpinfo_str using sbuf + * + * A convenient wrapper frunction for bus_child_pnpinfo_str that allows + * us to splat that into an sbuf. It uses unholy knowledge of sbuf to + * accomplish this, however. It is an interim function until we can convert + * this interface more fully. + */ +/* Note: we reach inside of sbuf because it's API isn't rich enough to do this */ +#define SPACE(s) ((s)->s_size - (s)->s_len) +#define EOB(s) ((s)->s_buf + (s)->s_len) + +static int +bus_child_pnpinfo_sb(device_t dev, struct sbuf *sb) +{ + char *p; + size_t space; + + MPASS((sb->s_flags & SBUF_INCLUDENUL) == 0); + if (sb->s_error != 0) + return (-1); + p = EOB(sb); + *p = '\0'; /* sbuf buffer isn't NUL terminated until sbuf_finish() */ + space = SPACE(sb); + if (space <= 1) { + sb->s_error = ENOMEM; + return (-1); + } + bus_child_pnpinfo_str(dev, p, space); + sb->s_len += strlen(p); + return (0); +} + +/** + * @brief Wrapper function for bus_child_pnpinfo_str using sbuf + * + * A convenient wrapper frunction for bus_child_pnpinfo_str that allows + * us to splat that into an sbuf. It uses unholy knowledge of sbuf to + * accomplish this, however. It is an interim function until we can convert + * this interface more fully. + */ +static int +bus_child_location_sb(device_t dev, struct sbuf *sb) +{ + char *p; + size_t space; + + MPASS((sb->s_flags & SBUF_INCLUDENUL) == 0); + if (sb->s_error != 0) + return (-1); + p = EOB(sb); + *p = '\0'; /* sbuf buffer isn't NUL terminated until sbuf_finish() */ + space = SPACE(sb); + if (space <= 1) { + sb->s_error = ENOMEM; + return (-1); + } + bus_child_location_str(dev, p, space); + sb->s_len += strlen(p); + return (0); +} +#undef SPACE +#undef EOB /** * @brief Wrapper function for BUS_GET_CPUS(). From owner-svn-src-all@freebsd.org Sat Aug 29 04:30:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A70A3CC26A; Sat, 29 Aug 2020 04:30:09 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bdk5s0HtRz3dln; Sat, 29 Aug 2020 04:30:08 +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 20A741FC6F; Sat, 29 Aug 2020 04:30:07 +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 07T4U72D007877; Sat, 29 Aug 2020 04:30:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07T4U6ZC007871; Sat, 29 Aug 2020 04:30:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008290430.07T4U6ZC007871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 29 Aug 2020 04:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364945 - in head/sys: arm/ti/am335x geom kern sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: arm/ti/am335x geom kern sys X-SVN-Commit-Revision: 364945 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 04:30:09 -0000 Author: imp Date: Sat Aug 29 04:30:06 2020 New Revision: 364945 URL: https://svnweb.freebsd.org/changeset/base/364945 Log: Retire devctl_notify_f() devctl_notify_f isn't needed, so retire it. The flags argument is now unused, so rather than keep it around, retire it. Convert all old users of it to devctl_notify(). This path no longer sleeps, so is safe to call from any context. Since it doesn't sleep, it doesn't need to know if it is OK to sleep or not. Reviewed by: markj@ Differential Revision: https://reviews.freebsd.org/D26140 Modified: head/sys/arm/ti/am335x/am335x_pmic.c head/sys/geom/geom_dev.c head/sys/kern/kern_conf.c head/sys/kern/kern_rctl.c head/sys/kern/subr_bus.c head/sys/sys/devctl.h Modified: head/sys/arm/ti/am335x/am335x_pmic.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_pmic.c Sat Aug 29 04:29:53 2020 (r364944) +++ head/sys/arm/ti/am335x/am335x_pmic.c Sat Aug 29 04:30:06 2020 (r364945) @@ -113,7 +113,7 @@ am335x_pmic_intr(void *arg) if (int_reg.aci) { snprintf(notify_buf, sizeof(notify_buf), "notify=0x%02x", status_reg.acpwr); - devctl_notify_f("ACPI", "ACAD", "power", notify_buf, M_NOWAIT); + devctl_notify("ACPI", "ACAD", "power", notify_buf); } } Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Sat Aug 29 04:29:53 2020 (r364944) +++ head/sys/geom/geom_dev.c Sat Aug 29 04:30:06 2020 (r364945) @@ -213,7 +213,7 @@ g_dev_destroy(void *arg, int flags __unused) sc = cp->private; g_trace(G_T_TOPOLOGY, "g_dev_destroy(%p(%s))", cp, gp->name); snprintf(buf, sizeof(buf), "cdev=%s", gp->name); - devctl_notify_f("GEOM", "DEV", "DESTROY", buf, M_WAITOK); + devctl_notify("GEOM", "DEV", "DESTROY", buf); if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) g_access(cp, -cp->acr, -cp->acw, -cp->ace); g_detach(cp); @@ -277,13 +277,13 @@ g_dev_set_media(struct g_consumer *cp) sc = cp->private; dev = sc->sc_dev; snprintf(buf, sizeof(buf), "cdev=%s", dev->si_name); - devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, M_WAITOK); - devctl_notify_f("GEOM", "DEV", "MEDIACHANGE", buf, M_WAITOK); + devctl_notify("DEVFS", "CDEV", "MEDIACHANGE", buf); + devctl_notify("GEOM", "DEV", "MEDIACHANGE", buf); dev = sc->sc_alias; if (dev != NULL) { snprintf(buf, sizeof(buf), "cdev=%s", dev->si_name); - devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, M_WAITOK); - devctl_notify_f("GEOM", "DEV", "MEDIACHANGE", buf, M_WAITOK); + devctl_notify("DEVFS", "CDEV", "MEDIACHANGE", buf); + devctl_notify("GEOM", "DEV", "MEDIACHANGE", buf); } } @@ -308,7 +308,7 @@ g_dev_resize(struct g_consumer *cp) char buf[SPECNAMELEN + 6]; snprintf(buf, sizeof(buf), "cdev=%s", cp->provider->name); - devctl_notify_f("GEOM", "DEV", "SIZECHANGE", buf, M_WAITOK); + devctl_notify("GEOM", "DEV", "SIZECHANGE", buf); } struct g_provider * @@ -379,7 +379,7 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, g_dev_attrchanged(cp, "GEOM::physpath"); snprintf(buf, sizeof(buf), "cdev=%s", gp->name); - devctl_notify_f("GEOM", "DEV", "CREATE", buf, M_WAITOK); + devctl_notify("GEOM", "DEV", "CREATE", buf); /* * Now add all the aliases for this drive */ @@ -392,7 +392,7 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, continue; } snprintf(buf, sizeof(buf), "cdev=%s", gap->ga_alias); - devctl_notify_f("GEOM", "DEV", "CREATE", buf, M_WAITOK); + devctl_notify("GEOM", "DEV", "CREATE", buf); } return (gp); Modified: head/sys/kern/kern_conf.c ============================================================================== --- head/sys/kern/kern_conf.c Sat Aug 29 04:29:53 2020 (r364944) +++ head/sys/kern/kern_conf.c Sat Aug 29 04:30:06 2020 (r364945) @@ -546,7 +546,7 @@ notify(struct cdev *dev, const char *ev, int flags) return; memcpy(data, prefix, sizeof(prefix) - 1); memcpy(data + sizeof(prefix) - 1, dev->si_name, namelen + 1); - devctl_notify_f("DEVFS", "CDEV", ev, data, mflags); + devctl_notify("DEVFS", "CDEV", ev, data); free(data, M_TEMP); } Modified: head/sys/kern/kern_rctl.c ============================================================================== --- head/sys/kern/kern_rctl.c Sat Aug 29 04:29:53 2020 (r364944) +++ head/sys/kern/kern_rctl.c Sat Aug 29 04:30:06 2020 (r364945) @@ -591,8 +591,8 @@ rctl_enforce(struct proc *p, int resource, uint64_t am p->p_pid, p->p_ucred->cr_ruid, p->p_ucred->cr_prison->pr_prison_racct->prr_name); sbuf_finish(&sb); - devctl_notify_f("RCTL", "rule", "matched", - sbuf_data(&sb), M_NOWAIT); + devctl_notify("RCTL", "rule", "matched", + sbuf_data(&sb)); sbuf_delete(&sb); free(buf, M_RCTL); link->rrl_exceeded = 1; Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Sat Aug 29 04:29:53 2020 (r364944) +++ head/sys/kern/subr_bus.c Sat Aug 29 04:30:06 2020 (r364945) @@ -651,8 +651,8 @@ devctl_queue(struct dev_event_info *dei) * @brief Send a 'notification' to userland, using standard ways */ void -devctl_notify_f(const char *system, const char *subsystem, const char *type, - const char *data, int flags __unused) +devctl_notify(const char *system, const char *subsystem, const char *type, + const char *data) { struct dev_event_info *dei; struct sbuf sb; @@ -677,13 +677,6 @@ devctl_notify_f(const char *system, const char *subsys devctl_free_dei(dei); /* overflow -> drop it */ else devctl_queue(dei); -} - -void -devctl_notify(const char *system, const char *subsystem, const char *type, - const char *data) -{ - devctl_notify_f(system, subsystem, type, data, M_NOWAIT); } /* Modified: head/sys/sys/devctl.h ============================================================================== --- head/sys/sys/devctl.h Sat Aug 29 04:29:53 2020 (r364944) +++ head/sys/sys/devctl.h Sat Aug 29 04:30:06 2020 (r364945) @@ -36,8 +36,6 @@ * hook to send the message. */ boolean_t devctl_process_running(void); -void devctl_notify_f(const char *__system, const char *__subsystem, - const char *__type, const char *__data, int __flags); void devctl_notify(const char *__system, const char *__subsystem, const char *__type, const char *__data); struct sbuf; From owner-svn-src-all@freebsd.org Sat Aug 29 04:30:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45DE83CC26C; Sat, 29 Aug 2020 04:30: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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bdk5w5ZQMz3dvW; Sat, 29 Aug 2020 04:30:12 +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 87A692048A; Sat, 29 Aug 2020 04:30:12 +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 07T4UCk7007929; Sat, 29 Aug 2020 04:30:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07T4UCM4007928; Sat, 29 Aug 2020 04:30:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008290430.07T4UCM4007928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 29 Aug 2020 04:30:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364946 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364946 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 04:30:13 -0000 Author: imp Date: Sat Aug 29 04:30:12 2020 New Revision: 364946 URL: https://svnweb.freebsd.org/changeset/base/364946 Log: Move to using sbuf for some sysctl in newbus Convert two different sysctl to using sbuf. First, for all the default sysctls we implement for each device driver that's attached. This is a pure sbuf conversion. Second, convert sysctl_devices to fill its buffer with sbuf rather than a hand-rolled crappy thing I wrote years ago. Reviewed by: cem, markj Differential Revision: https://reviews.freebsd.org/D26206 Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Sat Aug 29 04:30:06 2020 (r364945) +++ head/sys/kern/subr_bus.c Sat Aug 29 04:30:12 2020 (r364946) @@ -260,36 +260,33 @@ enum { static int device_sysctl_handler(SYSCTL_HANDLER_ARGS) { + struct sbuf sb; device_t dev = (device_t)arg1; - const char *value; - char *buf; int error; - buf = NULL; + sbuf_new_for_sysctl(&sb, NULL, 1024, req); switch (arg2) { case DEVICE_SYSCTL_DESC: - value = dev->desc ? dev->desc : ""; + sbuf_cpy(&sb, dev->desc ? dev->desc : ""); break; case DEVICE_SYSCTL_DRIVER: - value = dev->driver ? dev->driver->name : ""; + sbuf_cpy(&sb, dev->driver ? dev->driver->name : ""); break; case DEVICE_SYSCTL_LOCATION: - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); - bus_child_location_str(dev, buf, 1024); + bus_child_location_sb(dev, &sb); break; case DEVICE_SYSCTL_PNPINFO: - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); - bus_child_pnpinfo_str(dev, buf, 1024); + bus_child_pnpinfo_sb(dev, &sb); break; case DEVICE_SYSCTL_PARENT: - value = dev->parent ? dev->parent->nameunit : ""; + sbuf_cpy(&sb, dev->parent ? dev->parent->nameunit : ""); break; default: + sbuf_delete(&sb); return (EINVAL); } - error = SYSCTL_OUT_STR(req, value); - if (buf != NULL) - free(buf, M_BUS); + error = sbuf_finish(&sb); + sbuf_delete(&sb); return (error); } @@ -5464,13 +5461,13 @@ SYSCTL_PROC(_hw_bus, OID_AUTO, info, CTLTYPE_STRUCT | static int sysctl_devices(SYSCTL_HANDLER_ARGS) { + struct sbuf sb; int *name = (int *)arg1; u_int namelen = arg2; int index; device_t dev; struct u_device *udev; int error; - char *walker, *ep; if (namelen != 2) return (EINVAL); @@ -5501,34 +5498,21 @@ sysctl_devices(SYSCTL_HANDLER_ARGS) udev->dv_devflags = dev->devflags; udev->dv_flags = dev->flags; udev->dv_state = dev->state; - walker = udev->dv_fields; - ep = walker + sizeof(udev->dv_fields); -#define CP(src) \ - if ((src) == NULL) \ - *walker++ = '\0'; \ - else { \ - strlcpy(walker, (src), ep - walker); \ - walker += strlen(walker) + 1; \ - } \ - if (walker >= ep) \ - break; - - do { - CP(dev->nameunit); - CP(dev->desc); - CP(dev->driver != NULL ? dev->driver->name : NULL); - bus_child_pnpinfo_str(dev, walker, ep - walker); - walker += strlen(walker) + 1; - if (walker >= ep) - break; - bus_child_location_str(dev, walker, ep - walker); - walker += strlen(walker) + 1; - if (walker >= ep) - break; - *walker++ = '\0'; - } while (0); -#undef CP - error = SYSCTL_OUT(req, udev, sizeof(*udev)); + sbuf_new(&sb, udev->dv_fields, sizeof(udev->dv_fields), SBUF_FIXEDLEN); + sbuf_cat(&sb, dev->nameunit); + sbuf_putc(&sb, '\0'); + sbuf_cat(&sb, dev->desc); + sbuf_putc(&sb, '\0'); + sbuf_cat(&sb, dev->driver != NULL ? dev->driver->name : '\0'); + sbuf_putc(&sb, '\0'); + bus_child_pnpinfo_sb(dev, &sb); + sbuf_putc(&sb, '\0'); + bus_child_location_sb(dev, &sb); + sbuf_putc(&sb, '\0'); + error = sbuf_finish(&sb); + if (error == 0) + error = SYSCTL_OUT(req, udev, sizeof(*udev)); + sbuf_delete(&sb); free(udev, M_BUS); return (error); } From owner-svn-src-all@freebsd.org Sat Aug 29 06:54:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D7B53CF6FB; Sat, 29 Aug 2020 06:54:40 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdnJc0QRSz42bK; Sat, 29 Aug 2020 06:54:40 +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 E54DC21F8D; Sat, 29 Aug 2020 06:54:39 +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 07T6sdcN099511; Sat, 29 Aug 2020 06:54:39 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07T6sdg7099510; Sat, 29 Aug 2020 06:54:39 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008290654.07T6sdg7099510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 29 Aug 2020 06:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364947 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364947 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 06:54:40 -0000 Author: tuexen Date: Sat Aug 29 06:54:39 2020 New Revision: 364947 URL: https://svnweb.freebsd.org/changeset/base/364947 Log: MFC r364937: Fix a regression with the explicit EOR mode I introduced in r364268. Modified: stable/12/sys/netinet/sctp_output.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Sat Aug 29 04:30:12 2020 (r364946) +++ stable/12/sys/netinet/sctp_output.c Sat Aug 29 06:54:39 2020 (r364947) @@ -13121,11 +13121,10 @@ skip_preblock: error = EINVAL; goto out; } - SCTP_TCB_SEND_UNLOCK(stcb); - strm = &stcb->asoc.strmout[srcv->sinfo_stream]; if (strm->last_msg_incomplete == 0) { do_a_copy_in: + SCTP_TCB_SEND_UNLOCK(stcb); sp = sctp_copy_it_in(stcb, asoc, srcv, uio, net, max_len, user_marks_eor, &error); if (error) { goto out; @@ -13154,19 +13153,8 @@ skip_preblock: sp->processing = 1; TAILQ_INSERT_TAIL(&strm->outqueue, sp, next); stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, asoc, strm, sp, 1); - SCTP_TCB_SEND_UNLOCK(stcb); } else { - SCTP_TCB_SEND_LOCK(stcb); sp = TAILQ_LAST(&strm->outqueue, sctp_streamhead); - if (sp->processing) { - SCTP_TCB_SEND_UNLOCK(stcb); - SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); - error = EINVAL; - goto out; - } else { - sp->processing = 1; - } - SCTP_TCB_SEND_UNLOCK(stcb); if (sp == NULL) { /* ???? Huh ??? last msg is gone */ #ifdef INVARIANTS @@ -13178,7 +13166,16 @@ skip_preblock: goto do_a_copy_in; } + if (sp->processing) { + SCTP_TCB_SEND_UNLOCK(stcb); + SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); + error = EINVAL; + goto out; + } else { + sp->processing = 1; + } } + SCTP_TCB_SEND_UNLOCK(stcb); while (uio->uio_resid > 0) { /* How much room do we have? */ struct mbuf *new_tail, *mm; @@ -13203,6 +13200,11 @@ skip_preblock: if (mm) { sctp_m_freem(mm); } + SCTP_TCB_SEND_LOCK(stcb); + if (sp != NULL) { + sp->processing = 0; + } + SCTP_TCB_SEND_UNLOCK(stcb); goto out; } /* Update the mbuf and count */ @@ -13218,6 +13220,9 @@ skip_preblock: SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ECONNRESET); error = ECONNRESET; } + if (sp != NULL) { + sp->processing = 0; + } SCTP_TCB_SEND_UNLOCK(stcb); goto out; } @@ -13277,6 +13282,11 @@ skip_preblock: /* wait for space now */ if (non_blocking) { /* Non-blocking io in place out */ + SCTP_TCB_SEND_LOCK(stcb); + if (sp != NULL) { + sp->processing = 0; + } + SCTP_TCB_SEND_UNLOCK(stcb); goto skip_out_eof; } /* What about the INIT, send it maybe */ @@ -13400,6 +13410,11 @@ skip_preblock: } } SOCKBUF_UNLOCK(&so->so_snd); + SCTP_TCB_SEND_LOCK(stcb); + if (sp != NULL) { + sp->processing = 0; + } + SCTP_TCB_SEND_UNLOCK(stcb); goto out_unlocked; } @@ -13409,9 +13424,15 @@ skip_preblock: } } SOCKBUF_UNLOCK(&so->so_snd); + SCTP_TCB_SEND_LOCK(stcb); if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { + if (sp != NULL) { + sp->processing = 0; + } + SCTP_TCB_SEND_UNLOCK(stcb); goto out_unlocked; } + SCTP_TCB_SEND_UNLOCK(stcb); } SCTP_TCB_SEND_LOCK(stcb); if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) || From owner-svn-src-all@freebsd.org Sat Aug 29 06:55:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 630343CF922; Sat, 29 Aug 2020 06:55:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdnKC1zK6z42c1; Sat, 29 Aug 2020 06:55:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 26FCF21C4C; Sat, 29 Aug 2020 06:55:11 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07T6tBqM099615; Sat, 29 Aug 2020 06:55:11 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07T6tBof099614; Sat, 29 Aug 2020 06:55:11 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008290655.07T6tBof099614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 29 Aug 2020 06:55: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: r364948 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 364948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 06:55:11 -0000 Author: tuexen Date: Sat Aug 29 06:55:10 2020 New Revision: 364948 URL: https://svnweb.freebsd.org/changeset/base/364948 Log: MFC r364937: Fix a regression with the explicit EOR mode I introduced in r364268. Modified: stable/11/sys/netinet/sctp_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_output.c ============================================================================== --- stable/11/sys/netinet/sctp_output.c Sat Aug 29 06:54:39 2020 (r364947) +++ stable/11/sys/netinet/sctp_output.c Sat Aug 29 06:55:10 2020 (r364948) @@ -13202,11 +13202,10 @@ skip_preblock: error = EINVAL; goto out; } - SCTP_TCB_SEND_UNLOCK(stcb); - strm = &stcb->asoc.strmout[srcv->sinfo_stream]; if (strm->last_msg_incomplete == 0) { do_a_copy_in: + SCTP_TCB_SEND_UNLOCK(stcb); sp = sctp_copy_it_in(stcb, asoc, srcv, uio, net, max_len, user_marks_eor, &error); if (error) { goto out; @@ -13235,19 +13234,8 @@ skip_preblock: sp->processing = 1; TAILQ_INSERT_TAIL(&strm->outqueue, sp, next); stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, asoc, strm, sp, 1); - SCTP_TCB_SEND_UNLOCK(stcb); } else { - SCTP_TCB_SEND_LOCK(stcb); sp = TAILQ_LAST(&strm->outqueue, sctp_streamhead); - if (sp->processing) { - SCTP_TCB_SEND_UNLOCK(stcb); - SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); - error = EINVAL; - goto out; - } else { - sp->processing = 1; - } - SCTP_TCB_SEND_UNLOCK(stcb); if (sp == NULL) { /* ???? Huh ??? last msg is gone */ #ifdef INVARIANTS @@ -13259,7 +13247,16 @@ skip_preblock: goto do_a_copy_in; } + if (sp->processing) { + SCTP_TCB_SEND_UNLOCK(stcb); + SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); + error = EINVAL; + goto out; + } else { + sp->processing = 1; + } } + SCTP_TCB_SEND_UNLOCK(stcb); while (uio->uio_resid > 0) { /* How much room do we have? */ struct mbuf *new_tail, *mm; @@ -13284,6 +13281,11 @@ skip_preblock: if (mm) { sctp_m_freem(mm); } + SCTP_TCB_SEND_LOCK(stcb); + if (sp != NULL) { + sp->processing = 0; + } + SCTP_TCB_SEND_UNLOCK(stcb); goto out; } /* Update the mbuf and count */ @@ -13299,6 +13301,9 @@ skip_preblock: SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ECONNRESET); error = ECONNRESET; } + if (sp != NULL) { + sp->processing = 0; + } SCTP_TCB_SEND_UNLOCK(stcb); goto out; } @@ -13358,6 +13363,11 @@ skip_preblock: /* wait for space now */ if (non_blocking) { /* Non-blocking io in place out */ + SCTP_TCB_SEND_LOCK(stcb); + if (sp != NULL) { + sp->processing = 0; + } + SCTP_TCB_SEND_UNLOCK(stcb); goto skip_out_eof; } /* What about the INIT, send it maybe */ @@ -13481,6 +13491,11 @@ skip_preblock: } } SOCKBUF_UNLOCK(&so->so_snd); + SCTP_TCB_SEND_LOCK(stcb); + if (sp != NULL) { + sp->processing = 0; + } + SCTP_TCB_SEND_UNLOCK(stcb); goto out_unlocked; } @@ -13490,9 +13505,15 @@ skip_preblock: } } SOCKBUF_UNLOCK(&so->so_snd); + SCTP_TCB_SEND_LOCK(stcb); if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { + if (sp != NULL) { + sp->processing = 0; + } + SCTP_TCB_SEND_UNLOCK(stcb); goto out_unlocked; } + SCTP_TCB_SEND_UNLOCK(stcb); } SCTP_TCB_SEND_LOCK(stcb); if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) || From owner-svn-src-all@freebsd.org Sat Aug 29 07:09:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0350C3D0025; Sat, 29 Aug 2020 07:09:12 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdndM3V0Jz43ZC; Sat, 29 Aug 2020 07:09:11 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x443.google.com with SMTP id f7so1141165wrw.1; Sat, 29 Aug 2020 00:09:11 -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=fr+XgDr1LRxwO6sKj9p+ER5WnSKmqsBFFhMYokA0lCg=; b=j2G9mEy2Ys3HVj9M7A+B4FBbacg78q9ke1IOH7KpctooeWeOuXk2Inedir7j1VDpRM 4lkkiRbiFbgMfe8cl6dRaLq6FvtLH/9iIUJl3KlGAYkJIMlub+WRZy4QYAqpG6/wPdpg W1SkMw+XG9XlxzZSNbPJIFwOwD9tmzjGXcKDtE7Iv/caGZrkNJDNsJuIxuUJoONvfPLm hCySIhSkNtkCgVW/WP9niCZVjfoR/anjEFy4fXZ/vKnl028weVRGj88pDAVOnXOggxUv 3G3i+nuB2fQbdosH7nWqbL3l67p7fYB+fuk4Q32lAt2/BV882YeTmZEVL4udFUyP+QBh LoYw== 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=fr+XgDr1LRxwO6sKj9p+ER5WnSKmqsBFFhMYokA0lCg=; b=ihw2k5HeQL5cpxSYGIpaJPI7x30XtIJz3Qa1doudWMLHdtdY9okKRxvnhnCF7w8tgV S27dS7ztFiUsl2nJtUaWDKVxbA+V1I/DRUBzcsck0AcqcAwF7IokgnDX5YBR7LRV3S0r xxfCNKqzl6cHSseCEqSPqig+gsNXayYdYvgeccymqC6NVdudkKHfnDO5QMGGJ9h+OJMd xQYzRzAKx2nsVG4aFynAlQHeLWmVx2OwzVdmcbL0yHrK2cUsL71vRU+fNfHADN4x1m87 3DWQ2YFpE0TNl3ETBitcphCNVaZh16nlM8UroMMA/JwxGmbG8Hr9m5ZstHYEyDIFqCni 97+w== X-Gm-Message-State: AOAM532Fw6mCvSWaPoM8ZEq88POWIrvnHjim8dGqAxjoU5mZKGc53jL5 IK3My+ARxKwavnTKTE8kyeWzwKEjHppDiN6R2ssS1lKp X-Google-Smtp-Source: ABdhPJyit1/adjopwey0inVvO4+M/reOOyi8UllS2fiq8G7YXxkmKbXkaHnbnQe6BWL7h5AkY+cA/OOLyCvY+heBA0w= X-Received: by 2002:adf:f8d0:: with SMTP id f16mr2549616wrq.66.1598684949249; Sat, 29 Aug 2020 00:09:09 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:5347:0:0:0:0:0 with HTTP; Sat, 29 Aug 2020 00:09:08 -0700 (PDT) In-Reply-To: <202008290430.07T4UCM4007928@repo.freebsd.org> References: <202008290430.07T4UCM4007928@repo.freebsd.org> From: Mateusz Guzik Date: Sat, 29 Aug 2020 09:09:08 +0200 Message-ID: Subject: Re: svn commit: r364946 - head/sys/kern To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4BdndM3V0Jz43ZC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 07:09:12 -0000 This crashes on boot for me: atal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x0 fault code = supervisor read data, page not present instruction pointer = 0x20:0xffffffff805b0a7f stack pointer = 0x28:0xfffffe002366a7f0 frame pointer = 0x28:0xfffffe002366a7f0 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 89 (devmatch) trap number = 12 panic: page fault cpuid = 0 time = 1598692135 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe002366a4a0 vpanic() at vpanic+0x182/frame 0xfffffe002366a4f0 panic() at panic+0x43/frame 0xfffffe002366a550 trap_fatal() at trap_fatal+0x387/frame 0xfffffe002366a5b0 trap_pfault() at trap_pfault+0x4f/frame 0xfffffe002366a610 trap() at trap+0x27d/frame 0xfffffe002366a720 calltrap() at calltrap+0x8/frame 0xfffffe002366a720 --- trap 0xc, rip = 0xffffffff805b0a7f, rsp = 0xfffffe002366a7f0, rbp = 0xfffffe002366a7f0 --- strlen() at strlen+0x1f/frame 0xfffffe002366a7f0 sbuf_cat() at sbuf_cat+0x15/frame 0xfffffe002366a810 sysctl_devices() at sysctl_devices+0x104/frame 0xfffffe002366a8a0 sysctl_root_handler_locked() at sysctl_root_handler_locked+0x91/frame 0xfffffe002366a8f0 sysctl_root() at sysctl_root+0x249/frame 0xfffffe002366a970 userland_sysctl() at userland_sysctl+0x170/frame 0xfffffe002366aa20 sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe002366aad0 amd64_syscall() at amd64_syscall+0x10c/frame 0xfffffe002366abf0 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe002366abf0 --- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x80041c0ea, rsp = 0x7fffffffda78, rbp = 0x7fffffffdab0 --- KDB: enter: panic [ thread pid 89 tid 100067 ] Stopped at kdb_enter+0x37: movq $0,0x7e2616(%rip) On 8/29/20, Warner Losh wrote: > Author: imp > Date: Sat Aug 29 04:30:12 2020 > New Revision: 364946 > URL: https://svnweb.freebsd.org/changeset/base/364946 > > Log: > Move to using sbuf for some sysctl in newbus > > Convert two different sysctl to using sbuf. First, for all the default > sysctls we implement for each device driver that's attached. This is a > pure sbuf conversion. > > Second, convert sysctl_devices to fill its buffer with sbuf rather > than a hand-rolled crappy thing I wrote years ago. > > Reviewed by: cem, markj > Differential Revision: https://reviews.freebsd.org/D26206 > > Modified: > head/sys/kern/subr_bus.c > > Modified: head/sys/kern/subr_bus.c > ============================================================================== > --- head/sys/kern/subr_bus.c Sat Aug 29 04:30:06 2020 (r364945) > +++ head/sys/kern/subr_bus.c Sat Aug 29 04:30:12 2020 (r364946) > @@ -260,36 +260,33 @@ enum { > static int > device_sysctl_handler(SYSCTL_HANDLER_ARGS) > { > + struct sbuf sb; > device_t dev = (device_t)arg1; > - const char *value; > - char *buf; > int error; > > - buf = NULL; > + sbuf_new_for_sysctl(&sb, NULL, 1024, req); > switch (arg2) { > case DEVICE_SYSCTL_DESC: > - value = dev->desc ? dev->desc : ""; > + sbuf_cpy(&sb, dev->desc ? dev->desc : ""); > break; > case DEVICE_SYSCTL_DRIVER: > - value = dev->driver ? dev->driver->name : ""; > + sbuf_cpy(&sb, dev->driver ? dev->driver->name : ""); > break; > case DEVICE_SYSCTL_LOCATION: > - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); > - bus_child_location_str(dev, buf, 1024); > + bus_child_location_sb(dev, &sb); > break; > case DEVICE_SYSCTL_PNPINFO: > - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); > - bus_child_pnpinfo_str(dev, buf, 1024); > + bus_child_pnpinfo_sb(dev, &sb); > break; > case DEVICE_SYSCTL_PARENT: > - value = dev->parent ? dev->parent->nameunit : ""; > + sbuf_cpy(&sb, dev->parent ? dev->parent->nameunit : ""); > break; > default: > + sbuf_delete(&sb); > return (EINVAL); > } > - error = SYSCTL_OUT_STR(req, value); > - if (buf != NULL) > - free(buf, M_BUS); > + error = sbuf_finish(&sb); > + sbuf_delete(&sb); > return (error); > } > > @@ -5464,13 +5461,13 @@ SYSCTL_PROC(_hw_bus, OID_AUTO, info, CTLTYPE_STRUCT > | > static int > sysctl_devices(SYSCTL_HANDLER_ARGS) > { > + struct sbuf sb; > int *name = (int *)arg1; > u_int namelen = arg2; > int index; > device_t dev; > struct u_device *udev; > int error; > - char *walker, *ep; > > if (namelen != 2) > return (EINVAL); > @@ -5501,34 +5498,21 @@ sysctl_devices(SYSCTL_HANDLER_ARGS) > udev->dv_devflags = dev->devflags; > udev->dv_flags = dev->flags; > udev->dv_state = dev->state; > - walker = udev->dv_fields; > - ep = walker + sizeof(udev->dv_fields); > -#define CP(src) \ > - if ((src) == NULL) \ > - *walker++ = '\0'; \ > - else { \ > - strlcpy(walker, (src), ep - walker); \ > - walker += strlen(walker) + 1; \ > - } \ > - if (walker >= ep) \ > - break; > - > - do { > - CP(dev->nameunit); > - CP(dev->desc); > - CP(dev->driver != NULL ? dev->driver->name : NULL); > - bus_child_pnpinfo_str(dev, walker, ep - walker); > - walker += strlen(walker) + 1; > - if (walker >= ep) > - break; > - bus_child_location_str(dev, walker, ep - walker); > - walker += strlen(walker) + 1; > - if (walker >= ep) > - break; > - *walker++ = '\0'; > - } while (0); > -#undef CP > - error = SYSCTL_OUT(req, udev, sizeof(*udev)); > + sbuf_new(&sb, udev->dv_fields, sizeof(udev->dv_fields), SBUF_FIXEDLEN); > + sbuf_cat(&sb, dev->nameunit); > + sbuf_putc(&sb, '\0'); > + sbuf_cat(&sb, dev->desc); > + sbuf_putc(&sb, '\0'); > + sbuf_cat(&sb, dev->driver != NULL ? dev->driver->name : '\0'); > + sbuf_putc(&sb, '\0'); > + bus_child_pnpinfo_sb(dev, &sb); > + sbuf_putc(&sb, '\0'); > + bus_child_location_sb(dev, &sb); > + sbuf_putc(&sb, '\0'); > + error = sbuf_finish(&sb); > + if (error == 0) > + error = SYSCTL_OUT(req, udev, sizeof(*udev)); > + sbuf_delete(&sb); > free(udev, M_BUS); > return (error); > } > -- Mateusz Guzik From owner-svn-src-all@freebsd.org Sat Aug 29 08:56:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F9B03D221C; Sat, 29 Aug 2020 08:56:49 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bdr1X67G9z48tn; Sat, 29 Aug 2020 08:56:48 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5F54D26024C; Sat, 29 Aug 2020 10:56:41 +0200 (CEST) Subject: Re: svn commit: r364944 - head/sys/kern To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202008290429.07T4TrbH007764@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <25be5af1-76a9-78a1-4e4f-2777b0e7f350@selasky.org> Date: Sat, 29 Aug 2020 10:56:12 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <202008290429.07T4TrbH007764@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Bdr1X67G9z48tn X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 08:56:49 -0000 On 2020-08-29 06:29, Warner Losh wrote: > +#define DEVCTL_BUFFER (1024 - sizeof(void *)) > struct dev_event_info { > - char *dei_data; > STAILQ_ENTRY(dev_event_info) dei_link; > + char dei_data[DEVCTL_BUFFER]; > }; Maybe add: CTASSERT(sizeof(struct dev_event_info) == 1024); Not sure if STAILQ's can have some debug fields in them. --HPS From owner-svn-src-all@freebsd.org Sat Aug 29 09:44:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ABC283D35DA; Sat, 29 Aug 2020 09:44:16 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bds4H1pLfz4DqM; Sat, 29 Aug 2020 09:44:14 +0000 (UTC) (envelope-from ohartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1598694253; bh=Bxov30qVuC2YzECV5Qq7h8SRPDecyF2CtW/SUdSCAxk=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=bMdxS0r+BTzY4qmt8Coagxj4iv9kSoEPf7PYK3/RR5e8GIOq5eT47REcGQWcy6FuF gb8E/ECYYreFxvw/3KwIc0WSHUwsCNwR8P84gJoQnzatYlbCOxBlGZjXOmcZqs4AhQ ZLXUlFmkisp6Sm/hzp2bfCY6MYJy27FCrRVm3BQE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from hermann.fritz.box ([78.55.153.100]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MD9XF-1kKzoS0NW5-009BOI; Sat, 29 Aug 2020 11:44:13 +0200 Date: Sat, 29 Aug 2020 11:44:04 +0200 From: "Hartmann, O." To: "Alexander V. Chernikov" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364941 - in head/sys: net net/route netinet netinet6 Message-ID: <20200829114404.2fbdb73d@hermann.fritz.box> In-Reply-To: <202008282250.07SMoL7I095754@repo.freebsd.org> References: <202008282250.07SMoL7I095754@repo.freebsd.org> Organization: walstatt.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/BkXhTkDbEWYS4IuN+9OceSu"; protocol="application/pgp-signature" X-Provags-ID: V03:K1:UpUdPCyzXm5Mkp6pbNTxyOl1I6olMtun/KvJLSs2EL4HnRIHkN7 2jG/2kXfGGwUhlaeqQtJUGfHCAoimxBwSWRDqhy139qIpFs/OEiTuf6kHYh/kwd2Zq6chUW 8feq2kxO7DbQKqas6bsyKb8QR1v6K6lBQdVGa6KJuYGbLB1Pb6GK1C7sdYZAYz72eVUztd7 NmlD90KiuSdkYdtFVrL4g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:DA8xGfCGMqY=:zBvrx3XgV8HZZybTfB8ln0 R9CdlbkkFCpkOxq+z+wbf5jYE5S1szRxsWOQ/yEoHy/XS9Nd8LFeebUTDsPVcd3zG+asgM3Yg 93C8AvKxOUT6WlMkeNQgywm1A7ClreTHyt3FAdGG8RMnBDT1AKqtmXwQJLpd8fKZm9vE5/6sc ZyH4R4rUo+v6NQi7Y4bHuk8+aJ9uNndwLJpGiN+eLr/6GfX/Mryr8Y7nYL82siaLmhfMn5kng Muc3XS7MIHPAwsperloaaHiMMOPZOD94hJGrOmxLPE2rzTHQJnwVhs8joEeytkzSzhdo9n8In h7TDfHrYUYKMxZOODX9volxpfuC7ZpEfZxZtQn7zUcE2IDZviQ5Ya202OgvQNl/uOJsSIBSlS ZpYPQpsJGRucxrjAPNFLsT/c8D9soejJiP2vSRHkxOlZMpQ+qLgg+cbMuYHaWYKAmYdkPQvND NZTRQp4bDnWAmckpd44q+x8yhJOpCiPiXT0B9DUOVZBICzNdzp0Gg1iihnNoolSEu62QRTkoi zQ9xcdmXScGSnQyEFv/szfGgf6hflCw3YzHCEEgnL+C1RJ69jug22JvAr2n1GENoLdwt0zWGR oHLAE7Y2J7y7UL1mgTfwxTOlpn/16kbRK24/KK7ZhyyPV6DQ0XqZ9Tgr0yaASqWUSAGF5eRKt bIMNFC2u1HDvAuWqO213n+SOepkid0suF+U76fHAU7Y84U/o/sVjcyBs1RxHTOdOwppRkm5zF 57q9gO+pwV0rvUX0hCuYZbGpa3JK6JVGfpidHXTd5GZX98ZRhaStPRzUCQs4hrv5r9VGNmIZL dh8VVsQmTWibXhGJn/WlZ7WuXjOdcDTYHjppr78UA2+YYeti6aT77gNplL6KPkaKgyokGcxGN aMuibYP08BgHPaEBdhuHLN0Nij97t+OgPnZ8Ui4OufjrjNDIuO5wT5jQEpjGKZ1+2gz03JbuI RQ6/tXsd0Ah9fg8vDWxIDsndHl31J6j8it5ozibRbf3hcmwb2RWhCv8Q+6tugx270ygeCaI2V t6jPGF2E2wDQpUIw/24w6B4r23vLLb5kfjsV/I0Ay98kAJ89lBL+oLxnsUwO6sB7xWG22hoFa AxNq8toy9ppXN71NN9AjCkVqD6ihYFNFUO1ThwKzHbtivKKJuUGp4FfUsJa3xmYPDL6A6IG1P jhqw+m0/LI/7d/iePol3uhSXodfhJ2fMLS6ZV57kV67CbbWAXBpZl2HVRLyb1R/job+qOa+zN /EfZx5fgkB1CK/xHlHjKL6lJFb/VtarTzCxmqFA== X-Rspamd-Queue-Id: 4Bds4H1pLfz4DqM X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=bMdxS0r+; dmarc=none; spf=none (mx1.freebsd.org: domain of ohartmann@walstatt.org has no SPF policy when checking 212.227.17.22) smtp.mailfrom=ohartmann@walstatt.org X-Spamd-Result: default: False [-2.62 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; RWL_MAILSPIKE_POSSIBLE(0.00)[212.227.17.22:from]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[walstatt.org]; ARC_NA(0.00)[]; NEURAL_HAM_LONG(-0.93)[-0.926]; HAS_ORG_HEADER(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[78.55.153.100:received]; NEURAL_HAM_MEDIUM(-0.84)[-0.836]; DKIM_TRACE(0.00)[gmx.net:+]; NEURAL_HAM_SHORT(-0.36)[-0.361]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_IN_DNSWL_LOW(-0.10)[212.227.17.22:from] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 09:44:16 -0000 --Sig_/BkXhTkDbEWYS4IuN+9OceSu Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 28 Aug 2020 22:50:21 +0000 (UTC) "Alexander V. Chernikov" wrote: > Author: melifaro > Date: Fri Aug 28 22:50:20 2020 > New Revision: 364941 > URL: https://svnweb.freebsd.org/changeset/base/364941 >=20 > Log: > Move net/route/shared.h definitions to net/route/route_var.h. > =20 > No functional changes. > =20 > net/route/shared.h was created in the inital phases of nexthop > conversion. It was intended to serve the same purpose as route_var.h > - share definitions of functions and structures between the routing > subsystem components. At that time route_var.h was included by many > files external to the routing subsystem, which largerly defeats its > purpose.=20 > As currently this is not the case anymore and amount of route_var.h > includes is roughly the same as shared.h, retire the latter in favour > of the former. >=20 > Deleted: > head/sys/net/route/shared.h > Modified: > head/sys/net/radix_mpath.c > head/sys/net/route.c > head/sys/net/route/nhop.c > head/sys/net/route/nhop_ctl.c > head/sys/net/route/route_ctl.c > head/sys/net/route/route_helpers.c > head/sys/net/route/route_var.h > head/sys/net/rtsock.c > head/sys/netinet/in_fib.c > head/sys/netinet/in_rmx.c > head/sys/netinet6/in6_fib.c > head/sys/netinet6/in6_rmx.c >=20 > Modified: head/sys/net/radix_mpath.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/net/radix_mpath.c Fri Aug 28 21:59:10 2020 > (r364940) +++ head/sys/net/radix_mpath.c Fri Aug 28 22:50:20 > 2020 (r364941) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > #include > #include >=20 > Modified: head/sys/net/route.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/net/route.c Fri Aug 28 21:59:10 2020 > (r364940) +++ head/sys/net/route.c Fri Aug 28 22:50:20 > 2020 (r364941) @@ -64,7 +64,6 @@ > #include > #include > #include > -#include > #include > =20 > #ifdef RADIX_MPATH >=20 > Modified: head/sys/net/route/nhop.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/net/route/nhop.c Fri Aug 28 21:59:10 2020 > (r364940) +++ head/sys/net/route/nhop.c Fri Aug 28 22:50:20 > 2020 (r364941) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > =20 > /* >=20 > Modified: head/sys/net/route/nhop_ctl.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/net/route/nhop_ctl.c Fri Aug 28 21:59:10 > 2020 (r364940) +++ head/sys/net/route/nhop_ctl.c Fri > Aug 28 22:50:20 2020 (r364941) @@ -49,7 +49,6 @@ > __FBSDID("$FreeBSD$"); #include > #include > #include > -#include > #include > =20 > /* >=20 > Modified: head/sys/net/route/route_ctl.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/net/route/route_ctl.c Fri Aug 28 21:59:10 > 2020 (r364940) +++ head/sys/net/route/route_ctl.c Fri > Aug 28 22:50:20 2020 (r364941) @@ -52,7 +52,6 @@ > __FBSDID("$FreeBSD$"); #include > #include > #include > -#include > #include > =20 > #ifdef RADIX_MPATH >=20 > Modified: head/sys/net/route/route_helpers.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/net/route/route_helpers.c Fri Aug 28 21:59:10 > 2020 (r364940) +++ head/sys/net/route/route_helpers.c > Fri Aug 28 22:50:20 2020 (r364941) @@ -55,7 +55,6 @@ > __FBSDID("$FreeBSD$"); #include > #include > #include > -#include > #ifdef INET > #include > #endif >=20 > Modified: head/sys/net/route/route_var.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/net/route/route_var.h Fri Aug 28 21:59:10 > 2020 (r364940) +++ head/sys/net/route/route_var.h Fri > Aug 28 22:50:20 2020 (r364941) @@ -39,7 +39,14 @@ > #include > #include /* struct sockaddr_in */ > #include > +#include > =20 > +#ifdef RTDEBUG > +#define DPRINTF(_fmt, ...) printf("%s: " _fmt "\n", > __func__ , ## __VA_ARGS__) +#else > +#define DPRINTF(_fmt, ...) > +#endif > + > struct nh_control; > typedef int rnh_preadd_entry_f_t(u_int fibnum, const struct sockaddr > *addr, const struct sockaddr *mask, struct nhop_object *nh); > @@ -221,6 +228,7 @@ fib_rte_to_nh_flags(int rt_flags) > return (res); > } > =20 > +/* route_temporal.c */ > void tmproutes_update(struct rib_head *rnh, struct rtentry *rt); > void tmproutes_init(struct rib_head *rh); > void tmproutes_destroy(struct rib_head *rh); > @@ -236,5 +244,33 @@ int change_route_conditional(struct rib_head > *rnh, str=20 > void vnet_rtzone_init(void); > void vnet_rtzone_destroy(void); > + > +/* subscriptions */ > +void rib_init_subscriptions(struct rib_head *rnh); > +void rib_destroy_subscriptions(struct rib_head *rnh); > + > +/* Nexhops */ > +void nhops_init(void); > +int nhops_init_rib(struct rib_head *rh); > +void nhops_destroy_rib(struct rib_head *rh); > +void nhop_ref_object(struct nhop_object *nh); > +int nhop_try_ref_object(struct nhop_object *nh); > +int nhop_ref_any(struct nhop_object *nh); > +void nhop_free_any(struct nhop_object *nh); > + > +void nhop_set_type(struct nhop_object *nh, enum nhop_type nh_type); > +void nhop_set_rtflags(struct nhop_object *nh, int rt_flags); > + > +int nhop_create_from_info(struct rib_head *rnh, struct rt_addrinfo > *info, > + struct nhop_object **nh_ret); > +int nhop_create_from_nhop(struct rib_head *rnh, const struct > nhop_object *nh_orig, > + struct rt_addrinfo *info, struct nhop_object **pnh_priv); > + > +void nhops_update_ifmtu(struct rib_head *rh, struct ifnet *ifp, > uint32_t mtu); +int nhops_dump_sysctl(struct rib_head *rh, struct > sysctl_req *w); + > +/* route */ > +struct rtentry *rt_unlinkrte(struct rib_head *rnh, struct > rt_addrinfo *info, > + int *perror); > =20 > #endif >=20 > Modified: head/sys/net/rtsock.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/net/rtsock.c Fri Aug 28 21:59:10 2020 > (r364940) +++ head/sys/net/rtsock.c Fri Aug 28 22:50:20 > 2020 (r364941) @@ -77,7 +77,6 @@ > #include > #endif > #include > -#include > =20 > #ifdef COMPAT_FREEBSD32 > #include >=20 > Modified: head/sys/netinet/in_fib.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/in_fib.c Fri Aug 28 21:59:10 2020 > (r364940) +++ head/sys/netinet/in_fib.c Fri Aug 28 22:50:20 > 2020 (r364941) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > =20 > #ifdef RADIX_MPATH >=20 > Modified: head/sys/netinet/in_rmx.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/in_rmx.c Fri Aug 28 21:59:10 2020 > (r364940) +++ head/sys/netinet/in_rmx.c Fri Aug 28 22:50:20 > 2020 (r364941) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > =20 > #include >=20 > Modified: head/sys/netinet6/in6_fib.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet6/in6_fib.c Fri Aug 28 21:59:10 > 2020 (r364940) +++ head/sys/netinet6/in6_fib.c Fri Aug > 28 22:50:20 2020 (r364941) @@ -51,7 +51,6 @@ > __FBSDID("$FreeBSD$"); #include > #include > #include > -#include > #include > =20 > #ifdef RADIX_MPATH >=20 > Modified: head/sys/netinet6/in6_rmx.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet6/in6_rmx.c Fri Aug 28 21:59:10 > 2020 (r364940) +++ head/sys/netinet6/in6_rmx.c Fri Aug > 28 22:50:20 2020 (r364941) @@ -84,7 +84,6 @@ > __FBSDID("$FreeBSD$"); #include > #include > #include > -#include > =20 > #include > #include > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to > "svn-src-head-unsubscribe@freebsd.org" This commit breaks "make buildkernel" on CURRENT for me on several CURRENT boxes: [...] x86 -> /usr/src/sys/x86/include --- route_ctl.o --- /usr/src/sys/net/route/route_ctl.c:315:30: error: variable 'netmask' is uninitialized when used here [-Werror,-Wuninitialized] rt_mpath_conflict(rnh, rt, netmask)) { ^~~~~~~ /usr/src/sys/net/route/route_ctl.c:297:33: note: initialize the variable 'netmask' to silence this warning --- modules-all --- --- all_subdir_acpi/acpi_video --- =3D=3D=3D> acpi/acpi_video (all) --- route_ctl.o --- struct sockaddr *ndst, *netmask; ^ =3D NULL --- modules-all --- --- all_subdir_amdgpio --- [...] Greetings, oh --Sig_/BkXhTkDbEWYS4IuN+9OceSu Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSy8IBxAPDkqVBaTJ44N1ZZPba5RwUCX0ojZQAKCRA4N1ZZPba5 R+ZeAQD5LeXZv0dgpNNRqQvknjeiyG6sxAzB5Ay2SIyDBq3C7wD+KDsFEY+YmPIf pDjjP+EX81EXnFIMRyEuY/5PsSTJ5w4= =RiTg -----END PGP SIGNATURE----- --Sig_/BkXhTkDbEWYS4IuN+9OceSu-- From owner-svn-src-all@freebsd.org Sat Aug 29 09:59:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0DAD83D36E9; Sat, 29 Aug 2020 09:59:53 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdsQJ6YHvz4FDY; Sat, 29 Aug 2020 09:59: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 C459D23F2F; Sat, 29 Aug 2020 09:59: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 07T9xqfH011902; Sat, 29 Aug 2020 09:59:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07T9xq5K011901; Sat, 29 Aug 2020 09:59:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008290959.07T9xq5K011901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 29 Aug 2020 09:59:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364949 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 09:59:53 -0000 Author: imp Date: Sat Aug 29 09:59:52 2020 New Revision: 364949 URL: https://svnweb.freebsd.org/changeset/base/364949 Log: Avoid NULL pointer dereferences Add back NULL pointer checks accidentally dropped in r364946. We need to append a NUL character when that happens. Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Sat Aug 29 06:55:10 2020 (r364948) +++ head/sys/kern/subr_bus.c Sat Aug 29 09:59:52 2020 (r364949) @@ -5499,11 +5499,20 @@ sysctl_devices(SYSCTL_HANDLER_ARGS) udev->dv_flags = dev->flags; udev->dv_state = dev->state; sbuf_new(&sb, udev->dv_fields, sizeof(udev->dv_fields), SBUF_FIXEDLEN); - sbuf_cat(&sb, dev->nameunit); + if (dev->nameunit != NULL) + sbuf_cat(&sb, dev->nameunit); + else + sbuf_putc(&sb, '\0'); sbuf_putc(&sb, '\0'); - sbuf_cat(&sb, dev->desc); + if (dev->desc != NULL) + sbuf_cat(&sb, dev->desc); + else + sbuf_putc(&sb, '\0'); sbuf_putc(&sb, '\0'); - sbuf_cat(&sb, dev->driver != NULL ? dev->driver->name : '\0'); + if (dev->driver != NULL) + sbuf_cat(&sb, dev->driver->name); + else + sbuf_putc(&sb, '\0'); sbuf_putc(&sb, '\0'); bus_child_pnpinfo_sb(dev, &sb); sbuf_putc(&sb, '\0'); From owner-svn-src-all@freebsd.org Sat Aug 29 10:05:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4472F3D39DC for ; Sat, 29 Aug 2020 10:05:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdsXM1yLkz4Fnd for ; Sat, 29 Aug 2020 10:05:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x736.google.com with SMTP id u3so1941854qkd.9 for ; Sat, 29 Aug 2020 03:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fHWPOBbKafawZ0WGTH4sb0VjMATu9lFMcSQou1fqz7c=; b=OqxJ1zF7BCBMEUxLG7fJKj1/jwNmz7AA/qfGAz6y8On9/t+Pxj3OGjctrMWWz+AEKD 4XZGkxOqEDXBTwLJFBZXBgHJeqhrspFW4BvcCXBkZjV3sKjIsXbKThDkMn+JehKVVYFv PH7MAhsysj+IUGJt5l1VCL83485xdzpZvbbDBLSoSzu/CL7tvHl/4D0t7Mn2HRHynVDv LYAaTsd99Scg1TRrJ8MwznAZRueG+F3SdMqN0kF8F1LMWbqi2NXqL0wqQtG2cbIv6stZ ejSIxXtVlFxlDCcA/dDxvIBK4Ye7OVz9ajjxd4tkytvtp5WVtBU/50OfKlc+Qm1TRV0y LgWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fHWPOBbKafawZ0WGTH4sb0VjMATu9lFMcSQou1fqz7c=; b=M+7vLK1MfKDSO5ad4tYnn4CXzuiUc0Cmx/IZXtXhuIZVOxWAdXX7gufGscQQTSquR6 iUOmnyr2ww9HTT4YQdeGPBHKQt5dcgwXhrrP3X99/RXpJoFd7/G1P6Zojga0IAaXJYHM V4k9Tq6cpwl2XiW2crp4sydo8h5g/X1K8wvFUoK8zEePz4o2WVxDLocSZXZqzX1ZQYnW +/hA0OIfnb7ItCLlrkvfrwZdmsuwQlwffYAd9btmtqQbXIywtmliBdU/hyml8LuBrMzJ /fAhq5z2FhCCKE014C6ORJn3ndjf6+n//Y+wGfYmB2SCgBu8Hiy/LSvXQf9WcwfXXpV4 4KBA== X-Gm-Message-State: AOAM530eaEcpBOll/iyINnHWRF3UkHRCEnle6HRSGYrx37V5K5gGabWV ktj1x6x6WFplw0FjvLO1X2SA1CxK/PMScxBTfN9b9g== X-Google-Smtp-Source: ABdhPJwJRD1adpgazsM2JVtlvlfGQov/TPXBNSg9hMiFT10D86x2aSOpo0vepuCM/1LH+8o/p8fwZ6sl9x5tgWZAs4Q= X-Received: by 2002:a37:b801:: with SMTP id i1mr2628648qkf.240.1598695506179; Sat, 29 Aug 2020 03:05:06 -0700 (PDT) MIME-Version: 1.0 References: <202008290430.07T4UCM4007928@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Sat, 29 Aug 2020 04:04:55 -0600 Message-ID: Subject: Re: svn commit: r364946 - head/sys/kern To: Mateusz Guzik Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BdsXM1yLkz4Fnd X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=OqxJ1zF7; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::736) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.99 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.81)[-0.813]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.95)[-0.948]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.23)[-0.225]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::736:from]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-all] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 10:05:08 -0000 On Sat, Aug 29, 2020 at 1:09 AM Mateusz Guzik wrote: > This crashes on boot for me: > I wasn't able to get it to crash on boot for me, but I was able to recreate it. Fixed in r364949. I think it didn't crash on boot for me because kldxref failed due to the segment thing so devmatch didn't run which would have triggered this bug. devinfo did trigger a very similar crash, and r364949 fixes that crash. Even a new kldxref failed due to the too many segments thing, so I can't confirm that's what you hit, but I'm pretty sure it is... Warner > atal trap 12: page fault while in kernel mode > cpuid = 0; apic id = 00 > fault virtual address = 0x0 > fault code = supervisor read data, page not present > instruction pointer = 0x20:0xffffffff805b0a7f > stack pointer = 0x28:0xfffffe002366a7f0 > frame pointer = 0x28:0xfffffe002366a7f0 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 89 (devmatch) > trap number = 12 > panic: page fault > cpuid = 0 > time = 1598692135 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > 0xfffffe002366a4a0 > vpanic() at vpanic+0x182/frame 0xfffffe002366a4f0 > panic() at panic+0x43/frame 0xfffffe002366a550 > trap_fatal() at trap_fatal+0x387/frame 0xfffffe002366a5b0 > trap_pfault() at trap_pfault+0x4f/frame 0xfffffe002366a610 > trap() at trap+0x27d/frame 0xfffffe002366a720 > calltrap() at calltrap+0x8/frame 0xfffffe002366a720 > --- trap 0xc, rip = 0xffffffff805b0a7f, rsp = 0xfffffe002366a7f0, rbp > = 0xfffffe002366a7f0 --- > strlen() at strlen+0x1f/frame 0xfffffe002366a7f0 > sbuf_cat() at sbuf_cat+0x15/frame 0xfffffe002366a810 > sysctl_devices() at sysctl_devices+0x104/frame 0xfffffe002366a8a0 > sysctl_root_handler_locked() at sysctl_root_handler_locked+0x91/frame > 0xfffffe002366a8f0 > sysctl_root() at sysctl_root+0x249/frame 0xfffffe002366a970 > userland_sysctl() at userland_sysctl+0x170/frame 0xfffffe002366aa20 > sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe002366aad0 > amd64_syscall() at amd64_syscall+0x10c/frame 0xfffffe002366abf0 > fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe002366abf0 > --- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x80041c0ea, rsp > = 0x7fffffffda78, rbp = 0x7fffffffdab0 --- > KDB: enter: panic > [ thread pid 89 tid 100067 ] > Stopped at kdb_enter+0x37: movq $0,0x7e2616(%rip) > > > On 8/29/20, Warner Losh wrote: > > Author: imp > > Date: Sat Aug 29 04:30:12 2020 > > New Revision: 364946 > > URL: https://svnweb.freebsd.org/changeset/base/364946 > > > > Log: > > Move to using sbuf for some sysctl in newbus > > > > Convert two different sysctl to using sbuf. First, for all the default > > sysctls we implement for each device driver that's attached. This is a > > pure sbuf conversion. > > > > Second, convert sysctl_devices to fill its buffer with sbuf rather > > than a hand-rolled crappy thing I wrote years ago. > > > > Reviewed by: cem, markj > > Differential Revision: https://reviews.freebsd.org/D26206 > > > > Modified: > > head/sys/kern/subr_bus.c > > > > Modified: head/sys/kern/subr_bus.c > > > ============================================================================== > > --- head/sys/kern/subr_bus.c Sat Aug 29 04:30:06 2020 (r364945) > > +++ head/sys/kern/subr_bus.c Sat Aug 29 04:30:12 2020 (r364946) > > @@ -260,36 +260,33 @@ enum { > > static int > > device_sysctl_handler(SYSCTL_HANDLER_ARGS) > > { > > + struct sbuf sb; > > device_t dev = (device_t)arg1; > > - const char *value; > > - char *buf; > > int error; > > > > - buf = NULL; > > + sbuf_new_for_sysctl(&sb, NULL, 1024, req); > > switch (arg2) { > > case DEVICE_SYSCTL_DESC: > > - value = dev->desc ? dev->desc : ""; > > + sbuf_cpy(&sb, dev->desc ? dev->desc : ""); > > break; > > case DEVICE_SYSCTL_DRIVER: > > - value = dev->driver ? dev->driver->name : ""; > > + sbuf_cpy(&sb, dev->driver ? dev->driver->name : ""); > > break; > > case DEVICE_SYSCTL_LOCATION: > > - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); > > - bus_child_location_str(dev, buf, 1024); > > + bus_child_location_sb(dev, &sb); > > break; > > case DEVICE_SYSCTL_PNPINFO: > > - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); > > - bus_child_pnpinfo_str(dev, buf, 1024); > > + bus_child_pnpinfo_sb(dev, &sb); > > break; > > case DEVICE_SYSCTL_PARENT: > > - value = dev->parent ? dev->parent->nameunit : ""; > > + sbuf_cpy(&sb, dev->parent ? dev->parent->nameunit : ""); > > break; > > default: > > + sbuf_delete(&sb); > > return (EINVAL); > > } > > - error = SYSCTL_OUT_STR(req, value); > > - if (buf != NULL) > > - free(buf, M_BUS); > > + error = sbuf_finish(&sb); > > + sbuf_delete(&sb); > > return (error); > > } > > > > @@ -5464,13 +5461,13 @@ SYSCTL_PROC(_hw_bus, OID_AUTO, info, > CTLTYPE_STRUCT > > | > > static int > > sysctl_devices(SYSCTL_HANDLER_ARGS) > > { > > + struct sbuf sb; > > int *name = (int *)arg1; > > u_int namelen = arg2; > > int index; > > device_t dev; > > struct u_device *udev; > > int error; > > - char *walker, *ep; > > > > if (namelen != 2) > > return (EINVAL); > > @@ -5501,34 +5498,21 @@ sysctl_devices(SYSCTL_HANDLER_ARGS) > > udev->dv_devflags = dev->devflags; > > udev->dv_flags = dev->flags; > > udev->dv_state = dev->state; > > - walker = udev->dv_fields; > > - ep = walker + sizeof(udev->dv_fields); > > -#define CP(src) \ > > - if ((src) == NULL) \ > > - *walker++ = '\0'; \ > > - else { \ > > - strlcpy(walker, (src), ep - walker); \ > > - walker += strlen(walker) + 1; \ > > - } \ > > - if (walker >= ep) \ > > - break; > > - > > - do { > > - CP(dev->nameunit); > > - CP(dev->desc); > > - CP(dev->driver != NULL ? dev->driver->name : NULL); > > - bus_child_pnpinfo_str(dev, walker, ep - walker); > > - walker += strlen(walker) + 1; > > - if (walker >= ep) > > - break; > > - bus_child_location_str(dev, walker, ep - walker); > > - walker += strlen(walker) + 1; > > - if (walker >= ep) > > - break; > > - *walker++ = '\0'; > > - } while (0); > > -#undef CP > > - error = SYSCTL_OUT(req, udev, sizeof(*udev)); > > + sbuf_new(&sb, udev->dv_fields, sizeof(udev->dv_fields), > SBUF_FIXEDLEN); > > + sbuf_cat(&sb, dev->nameunit); > > + sbuf_putc(&sb, '\0'); > > + sbuf_cat(&sb, dev->desc); > > + sbuf_putc(&sb, '\0'); > > + sbuf_cat(&sb, dev->driver != NULL ? dev->driver->name : '\0'); > > + sbuf_putc(&sb, '\0'); > > + bus_child_pnpinfo_sb(dev, &sb); > > + sbuf_putc(&sb, '\0'); > > + bus_child_location_sb(dev, &sb); > > + sbuf_putc(&sb, '\0'); > > + error = sbuf_finish(&sb); > > + if (error == 0) > > + error = SYSCTL_OUT(req, udev, sizeof(*udev)); > > + sbuf_delete(&sb); > > free(udev, M_BUS); > > return (error); > > } > > > > > -- > Mateusz Guzik > From owner-svn-src-all@freebsd.org Sat Aug 29 10:38:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 53EFD3D4968; Sat, 29 Aug 2020 10:38:26 +0000 (UTC) (envelope-from meloun.michal@gmail.com) Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdtGn4dMRz4HYq; Sat, 29 Aug 2020 10:38:25 +0000 (UTC) (envelope-from meloun.michal@gmail.com) Received: by mail-wr1-x441.google.com with SMTP id b18so1434635wrs.7; Sat, 29 Aug 2020 03:38:25 -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=VVFV1yBTnxUIwL5QN4/6lDv/ifz3VmDDy3L8220G9ac=; b=eRHxeMHH9lQgTgp+5MRXZLeqGZ5H80Un31KractYxenW9t3K1Rs/JeqbiXaKcfiMMY yTxbWTrhv0BXlU++mh9ANHiq5zpdy+xdZcu1ECIt+15FAhQHYLXYMDpKC3B1RyNW1DYv maWjILeOGc5k+AVEw5pomFEowcNWjQhW20MlvnoOD93qjKQK+Ysznyxz4hIKmRvydC6H dXBRQSlva4RIiJ7Suzkkq4JWe9le4HQqWQvDjKegbsX66H/HmlPrPPLPnk83YfadwHh+ c0YQBLVlH0HnDesJWtIZDIbBvoUpk9gWKXJZOASNd0p1o4es5hPJwySl46gBvD4PbA6i TbVA== 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=VVFV1yBTnxUIwL5QN4/6lDv/ifz3VmDDy3L8220G9ac=; b=q8pcZs+f0glhGIz9+4kNo1YpG/+mfVpkEIxLW1x97WlBI7o7DBGCH1eCPupR+edatC 9W07cfDbsFSmG9Rhds99eaW1+qtjz7fK5eKIp7TTJIk4Mbx9IXbaieLlNnzqKcSZGaQA eaQ3HRXMoisA4Bm1FsyymEDM7yCY3LePN2O/ynUrt7n3NuO8g7Hk8wASDBcV3o1RJB53 +33dMjE8CowUSKGHkXB3kkhrYMU+Bh2PHOsb62RuRMFf+nGPi/EXh1l3tVEogMCTM6zJ cPrlIy4RKtPR9nZF9Pbt17bDBP9QG1dUmYqA4jj+iQwXCxlt3+3gH00FxyYe15IQYo5R kWZg== X-Gm-Message-State: AOAM532qvvoR2hQLmYHBhELgbJ52Tf13davs4R2nbBpdrGAfuY8gW+OB vFiWw28c8GWk6CD/ptUIkSw2oGpVbFk= X-Google-Smtp-Source: ABdhPJz58qD3cLhCnTq7Z5ZYQNWjLPLJs0BsXMZXULjFFrV0jKMIeUpNFH4ge8R9bgcWAskVS13TSg== X-Received: by 2002:adf:dd51:: with SMTP id u17mr2955745wrm.355.1598697503911; Sat, 29 Aug 2020 03:38:23 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id t4sm3041141wre.30.2020.08.29.03.38.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 Aug 2020 03:38:23 -0700 (PDT) Sender: Michal Meloun Reply-To: meloun.michal@gmail.com Subject: Re: svn commit: r364946 - head/sys/kern To: Warner Losh , Mateusz Guzik Cc: Warner Losh , src-committers , svn-src-all , svn-src-head References: <202008290430.07T4UCM4007928@repo.freebsd.org> From: Michal Meloun Message-ID: Date: Sat, 29 Aug 2020 12:38:24 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BdtGn4dMRz4HYq X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=eRHxeMHH; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of melounmichal@gmail.com designates 2a00:1450:4864:20::441 as permitted sender) smtp.mailfrom=melounmichal@gmail.com X-Spamd-Result: default: False [-3.12 / 15.00]; HAS_REPLYTO(0.00)[meloun.michal@gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.19)[-0.193]; FREEMAIL_TO(0.00)[bsdimp.com,gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.972]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.95)[-0.955]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[gmail.com]; REPLYTO_DOM_EQ_FROM_DOM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::441:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 10:38:26 -0000 On 29.08.2020 12:04, Warner Losh wrote: > On Sat, Aug 29, 2020 at 1:09 AM Mateusz Guzik wrote: > >> This crashes on boot for me: >> > > I wasn't able to get it to crash on boot for me, but I was able to recreate > it. It crashed on ofw based systems where some enumerated devices have not a suitable driver, see: --------------------------------------- sysctl_devices: nameunit: root0, descs: System root bus, driver: root sysctl_devices: nameunit: nexus0, descs: (null), driver: nexus sysctl_devices: nameunit: ofwbus0, descs: Open Firmware Device Tree, driver: ofwbus sysctl_devices: nameunit: pcib0, descs: Nvidia Integrated PCI/PCI-E Controller, driver: pcib sysctl_devices: nameunit: simplebus0, descs: Flattened device tree simple bus, driver: simplebus sysctl_devices: nameunit: gic0, descs: ARM Generic Interrupt Controller, driver: gic sysctl_devices: nameunit: (null), descs: (null), driver: sysctl_devices: nameunit: lic0, descs: (null), driver: lic sysctl_devices: nameunit: (null), descs: (null), driver: sysctl_devices: nameunit: car0, descs: Tegra Clock Driver, driver: car .... ---------------------------------------------------------------------- > Fixed in r364949.Confirmed. I think it didn't crash on boot for me because > kldxref failed due to the segment thing so devmatch didn't run which would > have triggered this bug. devinfo did trigger a very similar crash, and > r364949 fixes that crash. Even a new kldxref failed due to the too many > segments thing, so I can't confirm that's what you hit, but I'm pretty sure > it is... > But there is another issue in device_sysctl_handler() (not analyzed yet): root@tegra210:~ # sysctl dev.cpu. dev.cpu.3.temperature: 50.5C dev.cpu.3panic: sbuf_clear makes no sense on sbuf 0xffff00006f21a528 with drain cpuid = 2 time = 1598696937 KDB: stack backtrace: db_trace_self() at db_fetch_ksymtab+0x164 pc = 0xffff0000006787f4 lr = 0xffff000000153400 sp = 0xffff00006f21a1b0 fp = 0xffff00006f21a3b0 db_fetch_ksymtab() at vpanic+0x198 pc = 0xffff000000153400 lr = 0xffff00000036b274 sp = 0xffff00006f21a3c0 fp = 0xffff00006f21a420 vpanic() at panic+0x44 pc = 0xffff00000036b274 lr = 0xffff00000036b018 sp = 0xffff00006f21a430 fp = 0xffff00006f21a4e0 panic() at sbuf_clear+0xa0 pc = 0xffff00000036b018 lr = 0xffff0000003c17c8 sp = 0xffff00006f21a4f0 fp = 0xffff00006f21a4f0 sbuf_clear() at sbuf_cpy+0x58 pc = 0xffff0000003c17c8 lr = 0xffff0000003c1ff0 sp = 0xffff00006f21a500 fp = 0xffff00006f21a500 sbuf_cpy() at _gone_in_dev+0x560 pc = 0xffff0000003c1ff0 lr = 0xffff0000003a9078 sp = 0xffff00006f21a510 fp = 0xffff00006f21a570 _gone_in_dev() at sbuf_new_for_sysctl+0x170 pc = 0xffff0000003a9078 lr = 0xffff00000037c1a8 sp = 0xffff00006f21a580 fp = 0xffff00006f21a5a0 sbuf_new_for_sysctl() at kernel_sysctl+0x36c pc = 0xffff00000037c1a8 lr = 0xffff00000037b63c sp = 0xffff00006f21a5b0 fp = 0xffff00006f21a630 kernel_sysctl() at userland_sysctl+0xf4 pc = 0xffff00000037b63c lr = 0xffff00000037bc5c sp = 0xffff00006f21a640 fp = 0xffff00006f21a6d0 userland_sysctl() at sys___sysctl+0x68 pc = 0xffff00000037bc5c lr = 0xffff00000037bb28 sp = 0xffff00006f21a6e0 fp = 0xffff00006f21a790 sys___sysctl() at do_el0_sync+0x4e0 pc = 0xffff00000037bb28 lr = 0xffff000000697918 sp = 0xffff00006f21a7a0 fp = 0xffff00006f21a830 do_el0_sync() at handle_el0_sync+0x90 pc = 0xffff000000697918 lr = 0xffff00000067aa24 sp = 0xffff00006f21a840 fp = 0xffff00006f21a980 handle_el0_sync() at 0x4047764c pc = 0xffff00000067aa24 lr = 0x000000004047764c sp = 0xffff00006f21a990 fp = 0x0000ffffffffc250 KDB: enter: panic [ thread pid 1263 tid 100092 ] Stopped at 0x40477fb4: undefined 54000042 > Warner > > >> atal trap 12: page fault while in kernel mode >> cpuid = 0; apic id = 00 >> fault virtual address = 0x0 >> fault code = supervisor read data, page not present >> instruction pointer = 0x20:0xffffffff805b0a7f >> stack pointer = 0x28:0xfffffe002366a7f0 >> frame pointer = 0x28:0xfffffe002366a7f0 >> code segment = base 0x0, limit 0xfffff, type 0x1b >> = DPL 0, pres 1, long 1, def32 0, gran 1 >> processor eflags = interrupt enabled, resume, IOPL = 0 >> current process = 89 (devmatch) >> trap number = 12 >> panic: page fault >> cpuid = 0 >> time = 1598692135 >> KDB: stack backtrace: >> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame >> 0xfffffe002366a4a0 >> vpanic() at vpanic+0x182/frame 0xfffffe002366a4f0 >> panic() at panic+0x43/frame 0xfffffe002366a550 >> trap_fatal() at trap_fatal+0x387/frame 0xfffffe002366a5b0 >> trap_pfault() at trap_pfault+0x4f/frame 0xfffffe002366a610 >> trap() at trap+0x27d/frame 0xfffffe002366a720 >> calltrap() at calltrap+0x8/frame 0xfffffe002366a720 >> --- trap 0xc, rip = 0xffffffff805b0a7f, rsp = 0xfffffe002366a7f0, rbp >> = 0xfffffe002366a7f0 --- >> strlen() at strlen+0x1f/frame 0xfffffe002366a7f0 >> sbuf_cat() at sbuf_cat+0x15/frame 0xfffffe002366a810 >> sysctl_devices() at sysctl_devices+0x104/frame 0xfffffe002366a8a0 >> sysctl_root_handler_locked() at sysctl_root_handler_locked+0x91/frame >> 0xfffffe002366a8f0 >> sysctl_root() at sysctl_root+0x249/frame 0xfffffe002366a970 >> userland_sysctl() at userland_sysctl+0x170/frame 0xfffffe002366aa20 >> sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe002366aad0 >> amd64_syscall() at amd64_syscall+0x10c/frame 0xfffffe002366abf0 >> fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe002366abf0 >> --- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x80041c0ea, rsp >> = 0x7fffffffda78, rbp = 0x7fffffffdab0 --- >> KDB: enter: panic >> [ thread pid 89 tid 100067 ] >> Stopped at kdb_enter+0x37: movq $0,0x7e2616(%rip) >> >> >> On 8/29/20, Warner Losh wrote: >>> Author: imp >>> Date: Sat Aug 29 04:30:12 2020 >>> New Revision: 364946 >>> URL: https://svnweb.freebsd.org/changeset/base/364946 >>> >>> Log: >>> Move to using sbuf for some sysctl in newbus >>> >>> Convert two different sysctl to using sbuf. First, for all the default >>> sysctls we implement for each device driver that's attached. This is a >>> pure sbuf conversion. >>> >>> Second, convert sysctl_devices to fill its buffer with sbuf rather >>> than a hand-rolled crappy thing I wrote years ago. >>> >>> Reviewed by: cem, markj >>> Differential Revision: https://reviews.freebsd.org/D26206 >>> >>> Modified: >>> head/sys/kern/subr_bus.c >>> >>> Modified: head/sys/kern/subr_bus.c >>> >> ============================================================================== >>> --- head/sys/kern/subr_bus.c Sat Aug 29 04:30:06 2020 (r364945) >>> +++ head/sys/kern/subr_bus.c Sat Aug 29 04:30:12 2020 (r364946) >>> @@ -260,36 +260,33 @@ enum { >>> static int >>> device_sysctl_handler(SYSCTL_HANDLER_ARGS) >>> { >>> + struct sbuf sb; >>> device_t dev = (device_t)arg1; >>> - const char *value; >>> - char *buf; >>> int error; >>> >>> - buf = NULL; >>> + sbuf_new_for_sysctl(&sb, NULL, 1024, req); >>> switch (arg2) { >>> case DEVICE_SYSCTL_DESC: >>> - value = dev->desc ? dev->desc : ""; >>> + sbuf_cpy(&sb, dev->desc ? dev->desc : ""); >>> break; >>> case DEVICE_SYSCTL_DRIVER: >>> - value = dev->driver ? dev->driver->name : ""; >>> + sbuf_cpy(&sb, dev->driver ? dev->driver->name : ""); >>> break; >>> case DEVICE_SYSCTL_LOCATION: >>> - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); >>> - bus_child_location_str(dev, buf, 1024); >>> + bus_child_location_sb(dev, &sb); >>> break; >>> case DEVICE_SYSCTL_PNPINFO: >>> - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); >>> - bus_child_pnpinfo_str(dev, buf, 1024); >>> + bus_child_pnpinfo_sb(dev, &sb); >>> break; >>> case DEVICE_SYSCTL_PARENT: >>> - value = dev->parent ? dev->parent->nameunit : ""; >>> + sbuf_cpy(&sb, dev->parent ? dev->parent->nameunit : ""); >>> break; >>> default: >>> + sbuf_delete(&sb); >>> return (EINVAL); >>> } >>> - error = SYSCTL_OUT_STR(req, value); >>> - if (buf != NULL) >>> - free(buf, M_BUS); >>> + error = sbuf_finish(&sb); >>> + sbuf_delete(&sb); >>> return (error); >>> } >>> >>> @@ -5464,13 +5461,13 @@ SYSCTL_PROC(_hw_bus, OID_AUTO, info, >> CTLTYPE_STRUCT >>> | >>> static int >>> sysctl_devices(SYSCTL_HANDLER_ARGS) >>> { >>> + struct sbuf sb; >>> int *name = (int *)arg1; >>> u_int namelen = arg2; >>> int index; >>> device_t dev; >>> struct u_device *udev; >>> int error; >>> - char *walker, *ep; >>> >>> if (namelen != 2) >>> return (EINVAL); >>> @@ -5501,34 +5498,21 @@ sysctl_devices(SYSCTL_HANDLER_ARGS) >>> udev->dv_devflags = dev->devflags; >>> udev->dv_flags = dev->flags; >>> udev->dv_state = dev->state; >>> - walker = udev->dv_fields; >>> - ep = walker + sizeof(udev->dv_fields); >>> -#define CP(src) \ >>> - if ((src) == NULL) \ >>> - *walker++ = '\0'; \ >>> - else { \ >>> - strlcpy(walker, (src), ep - walker); \ >>> - walker += strlen(walker) + 1; \ >>> - } \ >>> - if (walker >= ep) \ >>> - break; >>> - >>> - do { >>> - CP(dev->nameunit); >>> - CP(dev->desc); >>> - CP(dev->driver != NULL ? dev->driver->name : NULL); >>> - bus_child_pnpinfo_str(dev, walker, ep - walker); >>> - walker += strlen(walker) + 1; >>> - if (walker >= ep) >>> - break; >>> - bus_child_location_str(dev, walker, ep - walker); >>> - walker += strlen(walker) + 1; >>> - if (walker >= ep) >>> - break; >>> - *walker++ = '\0'; >>> - } while (0); >>> -#undef CP >>> - error = SYSCTL_OUT(req, udev, sizeof(*udev)); >>> + sbuf_new(&sb, udev->dv_fields, sizeof(udev->dv_fields), >> SBUF_FIXEDLEN); >>> + sbuf_cat(&sb, dev->nameunit); >>> + sbuf_putc(&sb, '\0'); >>> + sbuf_cat(&sb, dev->desc); >>> + sbuf_putc(&sb, '\0'); >>> + sbuf_cat(&sb, dev->driver != NULL ? dev->driver->name : '\0'); >>> + sbuf_putc(&sb, '\0'); >>> + bus_child_pnpinfo_sb(dev, &sb); >>> + sbuf_putc(&sb, '\0'); >>> + bus_child_location_sb(dev, &sb); >>> + sbuf_putc(&sb, '\0'); >>> + error = sbuf_finish(&sb); >>> + if (error == 0) >>> + error = SYSCTL_OUT(req, udev, sizeof(*udev)); >>> + sbuf_delete(&sb); >>> free(udev, M_BUS); >>> return (error); >>> } >>> >> >> >> -- >> Mateusz Guzik >> > From owner-svn-src-all@freebsd.org Sat Aug 29 11:03:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 95D293D5128 for ; Sat, 29 Aug 2020 11:03:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf41.google.com (mail-qv1-xf41.google.com [IPv6:2607:f8b0:4864:20::f41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bdtq62GWzz4Jv2 for ; Sat, 29 Aug 2020 11:02:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf41.google.com with SMTP id cy2so108544qvb.0 for ; Sat, 29 Aug 2020 04:02:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5JX5XGQxWbgwzF+Jxo6O+N3j3HLDuQezWZ2nsQfvtWk=; b=ZqxHqnb7DCkKWOMEiTdPwzJiTqwlURYoiVaG6BdvFmoGHUN3tRl6gYiCqLm2eRzYW/ HSQFGBrHi122mVdUOYAjWGK7PwKQROSYkHYcVE33Gf5gS/YFZMuE8Y7qkDPskIwisqeD +MReBMQFQQfFhTnEBAYBajGIzVqDjiT4FwYOl5++DI6Whys2y1hoVg9E71en750N6pvU S8M6QQ10c+PYkH94qAVJCEweG2oTBhTHwBJFlxl/sM+OtL289iUPWE5QnPjL+kYNv7Wn TSuFPV/UHeW5hT1vkfFzi0NHh4n6GTdCgvNoY7XFFxSta2xvK90nBBUAJ9YKcN1AkKra 8tWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5JX5XGQxWbgwzF+Jxo6O+N3j3HLDuQezWZ2nsQfvtWk=; b=K+5ElzHR3C1ixH6o+MRv5ifVFhtXDLkwivjRLCvqlQPVaEhuN5eu9Jrg4T2TOtGhGI v74q3Vsg4dIimfRFMz0PCsp5n4kNB5t7HNfj2VmF9XXGYQzSFeUiAt6gxhpqqqDxM+6M XlagYgvAwQ2ioKfrki29YYJaIhzfrpz2M4fPFi8PHUbqIMs+WY+AxrC1AG0smnkkv28T CkOacXuA6cJAzYtx1tVHsQr1uCVuYFd0F0xM61qpLYP9ecC0nuGN9VLftX9mdIvnzNyM aIsI1LwnDx9dVZCuaKXMLgiy+pawWZ9XY9F/wsQdBn4B8ZJzaYKeoOZZijxEfwzgnYOu abaQ== X-Gm-Message-State: AOAM530v8t3E2pfvvehA9pGql4cs8vJwvKbUbAaNLteDFn97ncrMPskq vfecGsCCAvliwiAy/qhi2HOaGsoA5WStazvLAk2yNg== X-Google-Smtp-Source: ABdhPJx4XX6rLB6pK+xyP0xl8ViiH2F3OylTPOayGhXvkVFvOxGe18MVE3VGrrswyrhkuNB6PvMdtvLlUTWq3hAJLMQ= X-Received: by 2002:a0c:b61c:: with SMTP id f28mr2455558qve.92.1598698976591; Sat, 29 Aug 2020 04:02:56 -0700 (PDT) MIME-Version: 1.0 References: <202008290430.07T4UCM4007928@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Sat, 29 Aug 2020 05:02:45 -0600 Message-ID: Subject: Re: svn commit: r364946 - head/sys/kern To: meloun.michal@gmail.com Cc: Mateusz Guzik , Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4Bdtq62GWzz4Jv2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=ZqxHqnb7; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f41) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.29 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.78)[-0.780]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_HAM_LONG(-0.97)[-0.967]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; RCPT_COUNT_FIVE(0.00)[6]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.54)[-0.541]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f41:from]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-all] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 11:03:01 -0000 On Sat, Aug 29, 2020 at 4:38 AM Michal Meloun wrote: > > > On 29.08.2020 12:04, Warner Losh wrote: > > On Sat, Aug 29, 2020 at 1:09 AM Mateusz Guzik wrote: > > > >> This crashes on boot for me: > >> > > > > I wasn't able to get it to crash on boot for me, but I was able to > recreate > > it. > It crashed on ofw based systems where some enumerated devices have not a > suitable driver, see: > --------------------------------------- > sysctl_devices: nameunit: root0, descs: System root bus, driver: root > sysctl_devices: nameunit: nexus0, descs: (null), driver: nexus > sysctl_devices: nameunit: ofwbus0, descs: Open Firmware Device Tree, > driver: ofwbus > sysctl_devices: nameunit: pcib0, descs: Nvidia Integrated PCI/PCI-E > Controller, driver: pcib > sysctl_devices: nameunit: simplebus0, descs: Flattened device tree > simple bus, driver: simplebus > sysctl_devices: nameunit: gic0, descs: ARM Generic Interrupt Controller, > driver: gic > sysctl_devices: nameunit: (null), descs: (null), driver: > sysctl_devices: nameunit: lic0, descs: (null), driver: lic > sysctl_devices: nameunit: (null), descs: (null), driver: > sysctl_devices: nameunit: car0, descs: Tegra Clock Driver, driver: car > .... > ---------------------------------------------------------------------- > > Fixed in r364949.Confirmed. > I think it didn't crash on boot for me because > > kldxref failed due to the segment thing so devmatch didn't run which > would > > have triggered this bug. devinfo did trigger a very similar crash, and > > r364949 fixes that crash. Even a new kldxref failed due to the too many > > segments thing, so I can't confirm that's what you hit, but I'm pretty > sure > > it is... > > > But there is another issue in device_sysctl_handler() (not analyzed yet): > root@tegra210:~ # sysctl dev.cpu. > dev.cpu.3.temperature: 50.5C > dev.cpu.3panic: sbuf_clear makes no sense on sbuf 0xffff00006f21a528 > with drain > cpuid = 2 > time = 1598696937 > KDB: stack backtrace: > db_trace_self() at db_fetch_ksymtab+0x164 > pc = 0xffff0000006787f4 lr = 0xffff000000153400 > sp = 0xffff00006f21a1b0 fp = 0xffff00006f21a3b0 > > db_fetch_ksymtab() at vpanic+0x198 > pc = 0xffff000000153400 lr = 0xffff00000036b274 > sp = 0xffff00006f21a3c0 fp = 0xffff00006f21a420 > > vpanic() at panic+0x44 > pc = 0xffff00000036b274 lr = 0xffff00000036b018 > sp = 0xffff00006f21a430 fp = 0xffff00006f21a4e0 > > panic() at sbuf_clear+0xa0 > pc = 0xffff00000036b018 lr = 0xffff0000003c17c8 > sp = 0xffff00006f21a4f0 fp = 0xffff00006f21a4f0 > > sbuf_clear() at sbuf_cpy+0x58 > pc = 0xffff0000003c17c8 lr = 0xffff0000003c1ff0 > sp = 0xffff00006f21a500 fp = 0xffff00006f21a500 > > sbuf_cpy() at _gone_in_dev+0x560 > pc = 0xffff0000003c1ff0 lr = 0xffff0000003a9078 > sp = 0xffff00006f21a510 fp = 0xffff00006f21a570 > > _gone_in_dev() at sbuf_new_for_sysctl+0x170 > pc = 0xffff0000003a9078 lr = 0xffff00000037c1a8 > sp = 0xffff00006f21a580 fp = 0xffff00006f21a5a0 > > sbuf_new_for_sysctl() at kernel_sysctl+0x36c > pc = 0xffff00000037c1a8 lr = 0xffff00000037b63c > sp = 0xffff00006f21a5b0 fp = 0xffff00006f21a630 > This traceback is all kinds of crazy. sbuf_new_for_sysctl doesn't call _gone_in_dev(), which doesn't do sbuf stuff at all. And neither does it call sbuf_cpy(). Though I get a crash that looks like: Tracing pid 66442 tid 101464 td 0xfffffe02f47b7c00 kdb_enter() at kdb_enter+0x37/frame 0xfffffe02f4ae3740 vpanic() at vpanic+0x19e/frame 0xfffffe02f4ae3790 panic() at panic+0x43/frame 0xfffffe02f4ae37f0 sbuf_clear() at sbuf_clear+0xac/frame 0xfffffe02f4ae3800 sbuf_cpy() at sbuf_cpy+0x5a/frame 0xfffffe02f4ae3820 device_sysctl_handler() at device_sysctl_handler+0x133/frame 0xfffffe02f4ae38a0 sysctl_root_handler_locked() at sysctl_root_handler_locked+0x9c/frame 0xfffffe02f4ae38f0 sysctl_root() at sysctl_root+0x20a/frame 0xfffffe02f4ae3970 userland_sysctl() at userland_sysctl+0x17d/frame 0xfffffe02f4ae3a20 sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe02f4ae3ad0 amd64_syscall() at amd64_syscall+0x140/frame 0xfffffe02f4ae3bf0 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe02f4ae3bf0 --- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x80042d50a, rsp = 0x7fffffffd458, rbp = 0x7fffffffd490 --- on a sysctl -a which I think makes more sense... I'll see if I can track it down... I think it's because sbuf_cpy does an unconditional clear, which triggers this assert, which is likely bogus for this case. sbuf_cat doesn't seem to have this issue... I'll confirm and commit. Warner > kernel_sysctl() at userland_sysctl+0xf4 > pc = 0xffff00000037b63c lr = 0xffff00000037bc5c > sp = 0xffff00006f21a640 fp = 0xffff00006f21a6d0 > > userland_sysctl() at sys___sysctl+0x68 > pc = 0xffff00000037bc5c lr = 0xffff00000037bb28 > sp = 0xffff00006f21a6e0 fp = 0xffff00006f21a790 > > sys___sysctl() at do_el0_sync+0x4e0 > pc = 0xffff00000037bb28 lr = 0xffff000000697918 > sp = 0xffff00006f21a7a0 fp = 0xffff00006f21a830 > > do_el0_sync() at handle_el0_sync+0x90 > pc = 0xffff000000697918 lr = 0xffff00000067aa24 > sp = 0xffff00006f21a840 fp = 0xffff00006f21a980 > > handle_el0_sync() at 0x4047764c > pc = 0xffff00000067aa24 lr = 0x000000004047764c > sp = 0xffff00006f21a990 fp = 0x0000ffffffffc250 > > KDB: enter: panic > [ thread pid 1263 tid 100092 ] > Stopped at 0x40477fb4: undefined 54000042 > > > Warner > > > > > > >> atal trap 12: page fault while in kernel mode > >> cpuid = 0; apic id = 00 > >> fault virtual address = 0x0 > >> fault code = supervisor read data, page not present > >> instruction pointer = 0x20:0xffffffff805b0a7f > >> stack pointer = 0x28:0xfffffe002366a7f0 > >> frame pointer = 0x28:0xfffffe002366a7f0 > >> code segment = base 0x0, limit 0xfffff, type 0x1b > >> = DPL 0, pres 1, long 1, def32 0, gran 1 > >> processor eflags = interrupt enabled, resume, IOPL = 0 > >> current process = 89 (devmatch) > >> trap number = 12 > >> panic: page fault > >> cpuid = 0 > >> time = 1598692135 > >> KDB: stack backtrace: > >> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > >> 0xfffffe002366a4a0 > >> vpanic() at vpanic+0x182/frame 0xfffffe002366a4f0 > >> panic() at panic+0x43/frame 0xfffffe002366a550 > >> trap_fatal() at trap_fatal+0x387/frame 0xfffffe002366a5b0 > >> trap_pfault() at trap_pfault+0x4f/frame 0xfffffe002366a610 > >> trap() at trap+0x27d/frame 0xfffffe002366a720 > >> calltrap() at calltrap+0x8/frame 0xfffffe002366a720 > >> --- trap 0xc, rip = 0xffffffff805b0a7f, rsp = 0xfffffe002366a7f0, rbp > >> = 0xfffffe002366a7f0 --- > >> strlen() at strlen+0x1f/frame 0xfffffe002366a7f0 > >> sbuf_cat() at sbuf_cat+0x15/frame 0xfffffe002366a810 > >> sysctl_devices() at sysctl_devices+0x104/frame 0xfffffe002366a8a0 > >> sysctl_root_handler_locked() at sysctl_root_handler_locked+0x91/frame > >> 0xfffffe002366a8f0 > >> sysctl_root() at sysctl_root+0x249/frame 0xfffffe002366a970 > >> userland_sysctl() at userland_sysctl+0x170/frame 0xfffffe002366aa20 > >> sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe002366aad0 > >> amd64_syscall() at amd64_syscall+0x10c/frame 0xfffffe002366abf0 > >> fast_syscall_common() at fast_syscall_common+0xf8/frame > 0xfffffe002366abf0 > >> --- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x80041c0ea, rsp > >> = 0x7fffffffda78, rbp = 0x7fffffffdab0 --- > >> KDB: enter: panic > >> [ thread pid 89 tid 100067 ] > >> Stopped at kdb_enter+0x37: movq $0,0x7e2616(%rip) > >> > >> > >> On 8/29/20, Warner Losh wrote: > >>> Author: imp > >>> Date: Sat Aug 29 04:30:12 2020 > >>> New Revision: 364946 > >>> URL: https://svnweb.freebsd.org/changeset/base/364946 > >>> > >>> Log: > >>> Move to using sbuf for some sysctl in newbus > >>> > >>> Convert two different sysctl to using sbuf. First, for all the > default > >>> sysctls we implement for each device driver that's attached. This is > a > >>> pure sbuf conversion. > >>> > >>> Second, convert sysctl_devices to fill its buffer with sbuf rather > >>> than a hand-rolled crappy thing I wrote years ago. > >>> > >>> Reviewed by: cem, markj > >>> Differential Revision: https://reviews.freebsd.org/D26206 > >>> > >>> Modified: > >>> head/sys/kern/subr_bus.c > >>> > >>> Modified: head/sys/kern/subr_bus.c > >>> > >> > ============================================================================== > >>> --- head/sys/kern/subr_bus.c Sat Aug 29 04:30:06 2020 (r364945) > >>> +++ head/sys/kern/subr_bus.c Sat Aug 29 04:30:12 2020 (r364946) > >>> @@ -260,36 +260,33 @@ enum { > >>> static int > >>> device_sysctl_handler(SYSCTL_HANDLER_ARGS) > >>> { > >>> + struct sbuf sb; > >>> device_t dev = (device_t)arg1; > >>> - const char *value; > >>> - char *buf; > >>> int error; > >>> > >>> - buf = NULL; > >>> + sbuf_new_for_sysctl(&sb, NULL, 1024, req); > >>> switch (arg2) { > >>> case DEVICE_SYSCTL_DESC: > >>> - value = dev->desc ? dev->desc : ""; > >>> + sbuf_cpy(&sb, dev->desc ? dev->desc : ""); > >>> break; > >>> case DEVICE_SYSCTL_DRIVER: > >>> - value = dev->driver ? dev->driver->name : ""; > >>> + sbuf_cpy(&sb, dev->driver ? dev->driver->name : ""); > >>> break; > >>> case DEVICE_SYSCTL_LOCATION: > >>> - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); > >>> - bus_child_location_str(dev, buf, 1024); > >>> + bus_child_location_sb(dev, &sb); > >>> break; > >>> case DEVICE_SYSCTL_PNPINFO: > >>> - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); > >>> - bus_child_pnpinfo_str(dev, buf, 1024); > >>> + bus_child_pnpinfo_sb(dev, &sb); > >>> break; > >>> case DEVICE_SYSCTL_PARENT: > >>> - value = dev->parent ? dev->parent->nameunit : ""; > >>> + sbuf_cpy(&sb, dev->parent ? dev->parent->nameunit : ""); > >>> break; > >>> default: > >>> + sbuf_delete(&sb); > >>> return (EINVAL); > >>> } > >>> - error = SYSCTL_OUT_STR(req, value); > >>> - if (buf != NULL) > >>> - free(buf, M_BUS); > >>> + error = sbuf_finish(&sb); > >>> + sbuf_delete(&sb); > >>> return (error); > >>> } > >>> > >>> @@ -5464,13 +5461,13 @@ SYSCTL_PROC(_hw_bus, OID_AUTO, info, > >> CTLTYPE_STRUCT > >>> | > >>> static int > >>> sysctl_devices(SYSCTL_HANDLER_ARGS) > >>> { > >>> + struct sbuf sb; > >>> int *name = (int *)arg1; > >>> u_int namelen = arg2; > >>> int index; > >>> device_t dev; > >>> struct u_device *udev; > >>> int error; > >>> - char *walker, *ep; > >>> > >>> if (namelen != 2) > >>> return (EINVAL); > >>> @@ -5501,34 +5498,21 @@ sysctl_devices(SYSCTL_HANDLER_ARGS) > >>> udev->dv_devflags = dev->devflags; > >>> udev->dv_flags = dev->flags; > >>> udev->dv_state = dev->state; > >>> - walker = udev->dv_fields; > >>> - ep = walker + sizeof(udev->dv_fields); > >>> -#define CP(src) \ > >>> - if ((src) == NULL) \ > >>> - *walker++ = '\0'; \ > >>> - else { \ > >>> - strlcpy(walker, (src), ep - walker); \ > >>> - walker += strlen(walker) + 1; \ > >>> - } \ > >>> - if (walker >= ep) \ > >>> - break; > >>> - > >>> - do { > >>> - CP(dev->nameunit); > >>> - CP(dev->desc); > >>> - CP(dev->driver != NULL ? dev->driver->name : NULL); > >>> - bus_child_pnpinfo_str(dev, walker, ep - walker); > >>> - walker += strlen(walker) + 1; > >>> - if (walker >= ep) > >>> - break; > >>> - bus_child_location_str(dev, walker, ep - walker); > >>> - walker += strlen(walker) + 1; > >>> - if (walker >= ep) > >>> - break; > >>> - *walker++ = '\0'; > >>> - } while (0); > >>> -#undef CP > >>> - error = SYSCTL_OUT(req, udev, sizeof(*udev)); > >>> + sbuf_new(&sb, udev->dv_fields, sizeof(udev->dv_fields), > >> SBUF_FIXEDLEN); > >>> + sbuf_cat(&sb, dev->nameunit); > >>> + sbuf_putc(&sb, '\0'); > >>> + sbuf_cat(&sb, dev->desc); > >>> + sbuf_putc(&sb, '\0'); > >>> + sbuf_cat(&sb, dev->driver != NULL ? dev->driver->name : '\0'); > >>> + sbuf_putc(&sb, '\0'); > >>> + bus_child_pnpinfo_sb(dev, &sb); > >>> + sbuf_putc(&sb, '\0'); > >>> + bus_child_location_sb(dev, &sb); > >>> + sbuf_putc(&sb, '\0'); > >>> + error = sbuf_finish(&sb); > >>> + if (error == 0) > >>> + error = SYSCTL_OUT(req, udev, sizeof(*udev)); > >>> + sbuf_delete(&sb); > >>> free(udev, M_BUS); > >>> return (error); > >>> } > >>> > >> > >> > >> -- > >> Mateusz Guzik > >> > > > From owner-svn-src-all@freebsd.org Sat Aug 29 11:04:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 88BFB3D4C7C; Sat, 29 Aug 2020 11:04:25 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bdtrn2pgPz4Jq5; Sat, 29 Aug 2020 11:04:25 +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 43BA924BA4; Sat, 29 Aug 2020 11:04:25 +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 07TB4P2P055371; Sat, 29 Aug 2020 11:04:25 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TB4PHE055370; Sat, 29 Aug 2020 11:04:25 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202008291104.07TB4PHE055370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 29 Aug 2020 11:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364950 - head/sys/net/route X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/net/route X-SVN-Commit-Revision: 364950 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 11:04:25 -0000 Author: melifaro Date: Sat Aug 29 11:04:24 2020 New Revision: 364950 URL: https://svnweb.freebsd.org/changeset/base/364950 Log: Fix build with RADIX_MPATH. Reported by: Hartmann, O Modified: head/sys/net/route/route_ctl.c Modified: head/sys/net/route/route_ctl.c ============================================================================== --- head/sys/net/route/route_ctl.c Sat Aug 29 09:59:52 2020 (r364949) +++ head/sys/net/route/route_ctl.c Sat Aug 29 11:04:24 2020 (r364950) @@ -101,7 +101,7 @@ vnet_rtzone_init() { V_rtzone = uma_zcreate("rtentry", sizeof(struct rtentry), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); + NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, 0); } #ifdef VIMAGE @@ -310,6 +310,7 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *in RIB_WLOCK(rnh); #ifdef RADIX_MPATH + netmask = info->rti_info[RTAX_NETMASK]; /* do not permit exactly the same dst/mask/gw pair */ if (rt_mpath_capable(rnh) && rt_mpath_conflict(rnh, rt, netmask)) { From owner-svn-src-all@freebsd.org Sat Aug 29 11:18:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8BF993D5427; Sat, 29 Aug 2020 11:18:11 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bdv8g2kHCz4KT8; Sat, 29 Aug 2020 11:18:11 +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 40C9624D47; Sat, 29 Aug 2020 11:18:11 +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 07TBIBYK062384; Sat, 29 Aug 2020 11:18:11 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TBIBs3062383; Sat, 29 Aug 2020 11:18:11 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008291118.07TBIBs3062383@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 29 Aug 2020 11:18:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364951 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364951 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 11:18:11 -0000 Author: imp Date: Sat Aug 29 11:18:10 2020 New Revision: 364951 URL: https://svnweb.freebsd.org/changeset/base/364951 Log: Use sbuf_cat instead of sbuf_cpy sbuf_cpy doesn't work with sysctl sbufs because of the drain function. Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Sat Aug 29 11:04:24 2020 (r364950) +++ head/sys/kern/subr_bus.c Sat Aug 29 11:18:10 2020 (r364951) @@ -267,10 +267,10 @@ device_sysctl_handler(SYSCTL_HANDLER_ARGS) sbuf_new_for_sysctl(&sb, NULL, 1024, req); switch (arg2) { case DEVICE_SYSCTL_DESC: - sbuf_cpy(&sb, dev->desc ? dev->desc : ""); + sbuf_cat(&sb, dev->desc ? dev->desc : ""); break; case DEVICE_SYSCTL_DRIVER: - sbuf_cpy(&sb, dev->driver ? dev->driver->name : ""); + sbuf_cat(&sb, dev->driver ? dev->driver->name : ""); break; case DEVICE_SYSCTL_LOCATION: bus_child_location_sb(dev, &sb); @@ -279,7 +279,7 @@ device_sysctl_handler(SYSCTL_HANDLER_ARGS) bus_child_pnpinfo_sb(dev, &sb); break; case DEVICE_SYSCTL_PARENT: - sbuf_cpy(&sb, dev->parent ? dev->parent->nameunit : ""); + sbuf_cat(&sb, dev->parent ? dev->parent->nameunit : ""); break; default: sbuf_delete(&sb); From owner-svn-src-all@freebsd.org Sat Aug 29 11:25:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D1C673D5617; Sat, 29 Aug 2020 11:25:19 +0000 (UTC) (envelope-from meloun.michal@gmail.com) Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdvJt3jQ3z4L5N; Sat, 29 Aug 2020 11:25:18 +0000 (UTC) (envelope-from meloun.michal@gmail.com) Received: by mail-wm1-x341.google.com with SMTP id b79so1374676wmb.4; Sat, 29 Aug 2020 04:25:18 -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=gWhTosAX5BqH7KHV8hZ/BkWkRe470qZCELJXQtDT9WM=; b=O6R6DUmvqgkN8RVjjseIOGuE++/0FOqu27+LKI1VHBhCbBPb4dxKMe38CYv9JrVfF/ 0TJz8narsAWrIaRUI1WBR9k93CMgij4yscyBM5bh6TtpMei/P+sW+O6U96OjijAhS8V1 eeS+wuqiIThP/VMUGvx8RCIC/rHvMzi+SY22qM7LiibqIhuScleYWgNv9lNQiDFzwXOR EwDTDa56w5KntwG8AcD5CYshTi+suuyFMcn87RmCnQabia377eFr+fY5J9RyT+mSa5YE Sr296UcwDTEjXV4GRwLogshDFkcr2BzQ411nTPNjeaHEFysQnqjHT6RjSFM+UoLY87vA hC/A== 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=gWhTosAX5BqH7KHV8hZ/BkWkRe470qZCELJXQtDT9WM=; b=EAYShP2p65fsjMren9HnDONiTxWrbgBPptytGGhmQMvtLyqiCQ16zg6ERJXhI/phAP OrKe0hzRYRzXu0kIB1kLH4DbcbO+D/b8UXj1lUnEVb3EHVI7ZDvKa/qhHg+K6VA43WQB 0+QqvKyRt0WAycKDXdH7O6r6G4qTLGuPYHi+oLYULZkazYVSfda5IdX033IaGNbYKszx PXlB+BE9WdkuewjEPwvMQuiLleRy6DlvIGEZEmRsE0xPmUf1qFSTQb9IfiPJZ2CzfPzt M/rXUdb+6jPEyJzmLSAungXP7JbYHGz9gNG/5AkuTs/R5fva2PR3h1Z/XItb+Y8zexDT Cgfw== X-Gm-Message-State: AOAM530MQRi9PpIoMpeJHfTHD1Ew0bO3JPYQpi36wy/QDnhY/U3wh8ST R70mhXs2/ti3rcPXSufj9NCYsFoE9pOpZA== X-Google-Smtp-Source: ABdhPJw4Fy4DqYosTfG6YtTP+4RYTd5w80fJBOOhof+G6eGU4nVg+r5rxbKfVhdDjw5A+RM0m+xd1Q== X-Received: by 2002:a1c:cc0d:: with SMTP id h13mr2783984wmb.44.1598700315514; Sat, 29 Aug 2020 04:25:15 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id r18sm3350559wrg.64.2020.08.29.04.25.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 Aug 2020 04:25:14 -0700 (PDT) Sender: Michal Meloun Reply-To: meloun.michal@gmail.com Subject: Re: svn commit: r364946 - head/sys/kern To: Warner Losh Cc: Mateusz Guzik , Warner Losh , src-committers , svn-src-all , svn-src-head References: <202008290430.07T4UCM4007928@repo.freebsd.org> From: Michal Meloun Message-ID: <213fcb81-ceab-677f-98dc-e8cb33fef7d1@gmail.com> Date: Sat, 29 Aug 2020 13:25:16 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BdvJt3jQ3z4L5N X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=O6R6DUmv; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of melounmichal@gmail.com designates 2a00:1450:4864:20::341 as permitted sender) smtp.mailfrom=melounmichal@gmail.com X-Spamd-Result: default: False [-3.19 / 15.00]; HAS_REPLYTO(0.00)[meloun.michal@gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.26)[-0.255]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.977]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.96)[-0.962]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[gmail.com]; REPLYTO_DOM_EQ_FROM_DOM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::341:from]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 11:25:19 -0000 On 29.08.2020 13:02, Warner Losh wrote: > On Sat, Aug 29, 2020 at 4:38 AM Michal Meloun > wrote: > >> >> >> On 29.08.2020 12:04, Warner Losh wrote: >>> On Sat, Aug 29, 2020 at 1:09 AM Mateusz Guzik wrote: >>> >>>> This crashes on boot for me: >>>> >>> >>> I wasn't able to get it to crash on boot for me, but I was able to >> recreate >>> it. >> It crashed on ofw based systems where some enumerated devices have not a >> suitable driver, see: >> --------------------------------------- >> sysctl_devices: nameunit: root0, descs: System root bus, driver: root >> sysctl_devices: nameunit: nexus0, descs: (null), driver: nexus >> sysctl_devices: nameunit: ofwbus0, descs: Open Firmware Device Tree, >> driver: ofwbus >> sysctl_devices: nameunit: pcib0, descs: Nvidia Integrated PCI/PCI-E >> Controller, driver: pcib >> sysctl_devices: nameunit: simplebus0, descs: Flattened device tree >> simple bus, driver: simplebus >> sysctl_devices: nameunit: gic0, descs: ARM Generic Interrupt Controller, >> driver: gic >> sysctl_devices: nameunit: (null), descs: (null), driver: >> sysctl_devices: nameunit: lic0, descs: (null), driver: lic >> sysctl_devices: nameunit: (null), descs: (null), driver: >> sysctl_devices: nameunit: car0, descs: Tegra Clock Driver, driver: car >> .... >> ---------------------------------------------------------------------- >>> Fixed in r364949.Confirmed. >> I think it didn't crash on boot for me because >>> kldxref failed due to the segment thing so devmatch didn't run which >> would >>> have triggered this bug. devinfo did trigger a very similar crash, and >>> r364949 fixes that crash. Even a new kldxref failed due to the too many >>> segments thing, so I can't confirm that's what you hit, but I'm pretty >> sure >>> it is... >>> >> But there is another issue in device_sysctl_handler() (not analyzed yet): >> root@tegra210:~ # sysctl dev.cpu. >> dev.cpu.3.temperature: 50.5C >> dev.cpu.3panic: sbuf_clear makes no sense on sbuf 0xffff00006f21a528 >> with drain >> cpuid = 2 >> time = 1598696937 >> KDB: stack backtrace: >> db_trace_self() at db_fetch_ksymtab+0x164 >> pc = 0xffff0000006787f4 lr = 0xffff000000153400 >> sp = 0xffff00006f21a1b0 fp = 0xffff00006f21a3b0 >> >> db_fetch_ksymtab() at vpanic+0x198 >> pc = 0xffff000000153400 lr = 0xffff00000036b274 >> sp = 0xffff00006f21a3c0 fp = 0xffff00006f21a420 >> >> vpanic() at panic+0x44 >> pc = 0xffff00000036b274 lr = 0xffff00000036b018 >> sp = 0xffff00006f21a430 fp = 0xffff00006f21a4e0 >> >> panic() at sbuf_clear+0xa0 >> pc = 0xffff00000036b018 lr = 0xffff0000003c17c8 >> sp = 0xffff00006f21a4f0 fp = 0xffff00006f21a4f0 >> >> sbuf_clear() at sbuf_cpy+0x58 >> pc = 0xffff0000003c17c8 lr = 0xffff0000003c1ff0 >> sp = 0xffff00006f21a500 fp = 0xffff00006f21a500 >> >> sbuf_cpy() at _gone_in_dev+0x560 >> pc = 0xffff0000003c1ff0 lr = 0xffff0000003a9078 >> sp = 0xffff00006f21a510 fp = 0xffff00006f21a570 >> >> _gone_in_dev() at sbuf_new_for_sysctl+0x170 >> pc = 0xffff0000003a9078 lr = 0xffff00000037c1a8 >> sp = 0xffff00006f21a580 fp = 0xffff00006f21a5a0 >> >> sbuf_new_for_sysctl() at kernel_sysctl+0x36c >> pc = 0xffff00000037c1a8 lr = 0xffff00000037b63c >> sp = 0xffff00006f21a5b0 fp = 0xffff00006f21a630 >> > > This traceback is all kinds of crazy. sbuf_new_for_sysctl doesn't call > _gone_in_dev(), which doesn't do sbuf stuff at all. And neither does it > call sbuf_cpy(). Though I get a crash that looks like: > Tracing pid 66442 tid 101464 td 0xfffffe02f47b7c00 > kdb_enter() at kdb_enter+0x37/frame 0xfffffe02f4ae3740 > vpanic() at vpanic+0x19e/frame 0xfffffe02f4ae3790 > panic() at panic+0x43/frame 0xfffffe02f4ae37f0 > sbuf_clear() at sbuf_clear+0xac/frame 0xfffffe02f4ae3800 > sbuf_cpy() at sbuf_cpy+0x5a/frame 0xfffffe02f4ae3820 > device_sysctl_handler() at device_sysctl_handler+0x133/frame > 0xfffffe02f4ae38a0 > sysctl_root_handler_locked() at sysctl_root_handler_locked+0x9c/frame > 0xfffffe02f4ae38f0 > sysctl_root() at sysctl_root+0x20a/frame 0xfffffe02f4ae3970 > userland_sysctl() at userland_sysctl+0x17d/frame 0xfffffe02f4ae3a20 > sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe02f4ae3ad0 > amd64_syscall() at amd64_syscall+0x140/frame 0xfffffe02f4ae3bf0 > fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe02f4ae3bf0 > --- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x80042d50a, rsp = > 0x7fffffffd458, rbp = 0x7fffffffd490 --- > > on a sysctl -a which I think makes more sense... I'll see if I can track > it down... I think it's because sbuf_cpy does an unconditional clear, which > triggers this assert, which is likely bogus for this case. sbuf_cat doesn't > seem to have this issue... I'll confirm and commit. > > Warner Yeah, sorry. Local symbols are not available for netbooted kernel :(. And i csan confirm that problem is cause by using sbuf_cpy() on sbuf allocated by sbuf_new_for_sysctl() (thus with drain handler) in device_sysctl_handler(). But pure replacing sbuf_cpy() by sbuf_cat() gives me another panic: panic: Assertion (sb->s_flags & SBUF_INCLUDENUL) == 0 failed at /usr2/Meloun/git/pmap/sys/kern/subr_bus.c:4936 (still as respose for sysctl dev.cpu) Michal > >> kernel_sysctl() at userland_sysctl+0xf4 >> pc = 0xffff00000037b63c lr = 0xffff00000037bc5c >> sp = 0xffff00006f21a640 fp = 0xffff00006f21a6d0 >> >> userland_sysctl() at sys___sysctl+0x68 >> pc = 0xffff00000037bc5c lr = 0xffff00000037bb28 >> sp = 0xffff00006f21a6e0 fp = 0xffff00006f21a790 >> >> sys___sysctl() at do_el0_sync+0x4e0 >> pc = 0xffff00000037bb28 lr = 0xffff000000697918 >> sp = 0xffff00006f21a7a0 fp = 0xffff00006f21a830 >> >> do_el0_sync() at handle_el0_sync+0x90 >> pc = 0xffff000000697918 lr = 0xffff00000067aa24 >> sp = 0xffff00006f21a840 fp = 0xffff00006f21a980 >> >> handle_el0_sync() at 0x4047764c >> pc = 0xffff00000067aa24 lr = 0x000000004047764c >> sp = 0xffff00006f21a990 fp = 0x0000ffffffffc250 >> >> KDB: enter: panic >> [ thread pid 1263 tid 100092 ] >> Stopped at 0x40477fb4: undefined 54000042 >> >>> Warner >>> >> >>> >>>> atal trap 12: page fault while in kernel mode >>>> cpuid = 0; apic id = 00 >>>> fault virtual address = 0x0 >>>> fault code = supervisor read data, page not present >>>> instruction pointer = 0x20:0xffffffff805b0a7f >>>> stack pointer = 0x28:0xfffffe002366a7f0 >>>> frame pointer = 0x28:0xfffffe002366a7f0 >>>> code segment = base 0x0, limit 0xfffff, type 0x1b >>>> = DPL 0, pres 1, long 1, def32 0, gran 1 >>>> processor eflags = interrupt enabled, resume, IOPL = 0 >>>> current process = 89 (devmatch) >>>> trap number = 12 >>>> panic: page fault >>>> cpuid = 0 >>>> time = 1598692135 >>>> KDB: stack backtrace: >>>> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame >>>> 0xfffffe002366a4a0 >>>> vpanic() at vpanic+0x182/frame 0xfffffe002366a4f0 >>>> panic() at panic+0x43/frame 0xfffffe002366a550 >>>> trap_fatal() at trap_fatal+0x387/frame 0xfffffe002366a5b0 >>>> trap_pfault() at trap_pfault+0x4f/frame 0xfffffe002366a610 >>>> trap() at trap+0x27d/frame 0xfffffe002366a720 >>>> calltrap() at calltrap+0x8/frame 0xfffffe002366a720 >>>> --- trap 0xc, rip = 0xffffffff805b0a7f, rsp = 0xfffffe002366a7f0, rbp >>>> = 0xfffffe002366a7f0 --- >>>> strlen() at strlen+0x1f/frame 0xfffffe002366a7f0 >>>> sbuf_cat() at sbuf_cat+0x15/frame 0xfffffe002366a810 >>>> sysctl_devices() at sysctl_devices+0x104/frame 0xfffffe002366a8a0 >>>> sysctl_root_handler_locked() at sysctl_root_handler_locked+0x91/frame >>>> 0xfffffe002366a8f0 >>>> sysctl_root() at sysctl_root+0x249/frame 0xfffffe002366a970 >>>> userland_sysctl() at userland_sysctl+0x170/frame 0xfffffe002366aa20 >>>> sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe002366aad0 >>>> amd64_syscall() at amd64_syscall+0x10c/frame 0xfffffe002366abf0 >>>> fast_syscall_common() at fast_syscall_common+0xf8/frame >> 0xfffffe002366abf0 >>>> --- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x80041c0ea, rsp >>>> = 0x7fffffffda78, rbp = 0x7fffffffdab0 --- >>>> KDB: enter: panic >>>> [ thread pid 89 tid 100067 ] >>>> Stopped at kdb_enter+0x37: movq $0,0x7e2616(%rip) >>>> >>>> >>>> On 8/29/20, Warner Losh wrote: >>>>> Author: imp >>>>> Date: Sat Aug 29 04:30:12 2020 >>>>> New Revision: 364946 >>>>> URL: https://svnweb.freebsd.org/changeset/base/364946 >>>>> >>>>> Log: >>>>> Move to using sbuf for some sysctl in newbus >>>>> >>>>> Convert two different sysctl to using sbuf. First, for all the >> default >>>>> sysctls we implement for each device driver that's attached. This is >> a >>>>> pure sbuf conversion. >>>>> >>>>> Second, convert sysctl_devices to fill its buffer with sbuf rather >>>>> than a hand-rolled crappy thing I wrote years ago. >>>>> >>>>> Reviewed by: cem, markj >>>>> Differential Revision: https://reviews.freebsd.org/D26206 >>>>> >>>>> Modified: >>>>> head/sys/kern/subr_bus.c >>>>> >>>>> Modified: head/sys/kern/subr_bus.c >>>>> >>>> >> ============================================================================== >>>>> --- head/sys/kern/subr_bus.c Sat Aug 29 04:30:06 2020 (r364945) >>>>> +++ head/sys/kern/subr_bus.c Sat Aug 29 04:30:12 2020 (r364946) >>>>> @@ -260,36 +260,33 @@ enum { >>>>> static int >>>>> device_sysctl_handler(SYSCTL_HANDLER_ARGS) >>>>> { >>>>> + struct sbuf sb; >>>>> device_t dev = (device_t)arg1; >>>>> - const char *value; >>>>> - char *buf; >>>>> int error; >>>>> >>>>> - buf = NULL; >>>>> + sbuf_new_for_sysctl(&sb, NULL, 1024, req); >>>>> switch (arg2) { >>>>> case DEVICE_SYSCTL_DESC: >>>>> - value = dev->desc ? dev->desc : ""; >>>>> + sbuf_cpy(&sb, dev->desc ? dev->desc : ""); >>>>> break; >>>>> case DEVICE_SYSCTL_DRIVER: >>>>> - value = dev->driver ? dev->driver->name : ""; >>>>> + sbuf_cpy(&sb, dev->driver ? dev->driver->name : ""); >>>>> break; >>>>> case DEVICE_SYSCTL_LOCATION: >>>>> - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); >>>>> - bus_child_location_str(dev, buf, 1024); >>>>> + bus_child_location_sb(dev, &sb); >>>>> break; >>>>> case DEVICE_SYSCTL_PNPINFO: >>>>> - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); >>>>> - bus_child_pnpinfo_str(dev, buf, 1024); >>>>> + bus_child_pnpinfo_sb(dev, &sb); >>>>> break; >>>>> case DEVICE_SYSCTL_PARENT: >>>>> - value = dev->parent ? dev->parent->nameunit : ""; >>>>> + sbuf_cpy(&sb, dev->parent ? dev->parent->nameunit : ""); >>>>> break; >>>>> default: >>>>> + sbuf_delete(&sb); >>>>> return (EINVAL); >>>>> } >>>>> - error = SYSCTL_OUT_STR(req, value); >>>>> - if (buf != NULL) >>>>> - free(buf, M_BUS); >>>>> + error = sbuf_finish(&sb); >>>>> + sbuf_delete(&sb); >>>>> return (error); >>>>> } >>>>> >>>>> @@ -5464,13 +5461,13 @@ SYSCTL_PROC(_hw_bus, OID_AUTO, info, >>>> CTLTYPE_STRUCT >>>>> | >>>>> static int >>>>> sysctl_devices(SYSCTL_HANDLER_ARGS) >>>>> { >>>>> + struct sbuf sb; >>>>> int *name = (int *)arg1; >>>>> u_int namelen = arg2; >>>>> int index; >>>>> device_t dev; >>>>> struct u_device *udev; >>>>> int error; >>>>> - char *walker, *ep; >>>>> >>>>> if (namelen != 2) >>>>> return (EINVAL); >>>>> @@ -5501,34 +5498,21 @@ sysctl_devices(SYSCTL_HANDLER_ARGS) >>>>> udev->dv_devflags = dev->devflags; >>>>> udev->dv_flags = dev->flags; >>>>> udev->dv_state = dev->state; >>>>> - walker = udev->dv_fields; >>>>> - ep = walker + sizeof(udev->dv_fields); >>>>> -#define CP(src) \ >>>>> - if ((src) == NULL) \ >>>>> - *walker++ = '\0'; \ >>>>> - else { \ >>>>> - strlcpy(walker, (src), ep - walker); \ >>>>> - walker += strlen(walker) + 1; \ >>>>> - } \ >>>>> - if (walker >= ep) \ >>>>> - break; >>>>> - >>>>> - do { >>>>> - CP(dev->nameunit); >>>>> - CP(dev->desc); >>>>> - CP(dev->driver != NULL ? dev->driver->name : NULL); >>>>> - bus_child_pnpinfo_str(dev, walker, ep - walker); >>>>> - walker += strlen(walker) + 1; >>>>> - if (walker >= ep) >>>>> - break; >>>>> - bus_child_location_str(dev, walker, ep - walker); >>>>> - walker += strlen(walker) + 1; >>>>> - if (walker >= ep) >>>>> - break; >>>>> - *walker++ = '\0'; >>>>> - } while (0); >>>>> -#undef CP >>>>> - error = SYSCTL_OUT(req, udev, sizeof(*udev)); >>>>> + sbuf_new(&sb, udev->dv_fields, sizeof(udev->dv_fields), >>>> SBUF_FIXEDLEN); >>>>> + sbuf_cat(&sb, dev->nameunit); >>>>> + sbuf_putc(&sb, '\0'); >>>>> + sbuf_cat(&sb, dev->desc); >>>>> + sbuf_putc(&sb, '\0'); >>>>> + sbuf_cat(&sb, dev->driver != NULL ? dev->driver->name : '\0'); >>>>> + sbuf_putc(&sb, '\0'); >>>>> + bus_child_pnpinfo_sb(dev, &sb); >>>>> + sbuf_putc(&sb, '\0'); >>>>> + bus_child_location_sb(dev, &sb); >>>>> + sbuf_putc(&sb, '\0'); >>>>> + error = sbuf_finish(&sb); >>>>> + if (error == 0) >>>>> + error = SYSCTL_OUT(req, udev, sizeof(*udev)); >>>>> + sbuf_delete(&sb); >>>>> free(udev, M_BUS); >>>>> return (error); >>>>> } >>>>> >>>> >>>> >>>> -- >>>> Mateusz Guzik >>>> >>> >> > From owner-svn-src-all@freebsd.org Sat Aug 29 11:34:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC71F3D5ADA for ; Sat, 29 Aug 2020 11:34:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdvWl6VNZz4LVX for ; Sat, 29 Aug 2020 11:34:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x843.google.com with SMTP id v54so103510qtj.7 for ; Sat, 29 Aug 2020 04:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o3jXBz5nDIIFj1L25ZpT0GFXgwQPFG2rTkKUrxndlNc=; b=mK03SkZsVRQWQp79F+HjPDFtIYikCaZmX5hf1/yVxfDE0sQxccMoMg0biShxbttm2y z0KKlObT1tOm+08Wcq44Y7hPZ+arq3Eh3dkoGKOjj2lnVMMcZwPb6FrFu/u/Gr1A01L9 V9BDs1syUwkd+aBgHqremThTrcIOKI/TTBie6NBTqM3T8fLbs6+VoR0btoQhXv2ONmR8 l9bOMeuIAxQRwDoWYgCVyOPN458fzQpmHbbdPi2xXSPQgV3DG9tKxmP7G8y9JBW2qk36 Nb1AbmHAelzrAYvmjvQi46edCIErH7mJPMPT+jUQVOtLRy34EoFAcxDGlSQa6Gs59MZu 29TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o3jXBz5nDIIFj1L25ZpT0GFXgwQPFG2rTkKUrxndlNc=; b=DOMW04YtxhHqegPKNb25B6nC2IyRxP06WV4N5tXA0KYS9UOjZTR+l6bIblrsYFp0Wb heOddwQufy7Xp/TT6RkaBKu4qZWKsFuYkBF0TV4cKcauKw0EAcCBpAhsxiXjywPRdGnx b5jyfFXOHeLJiHXosbTwrl//6KD/2cS6INWQrpO3oEFb9q2dB7hT1j8qpl5o2D95hBb4 QPKwgJnbpP99oWzmK8cnu9tvwX5CnWNsccLLlBjUgkEGpFcea2/sM9sm/+XMzrAGNgpg jFIcBiNT9KTE3/62PGmxeGxql2PH1tpxJjpKHAZ01oX9WdblQemRcX7o8rSRCVMz9Zbb 4P1w== X-Gm-Message-State: AOAM5330Qf7/tohAOTRLQuzqsGoW99PNti8KnKXF5ztiBecNDt7uf1no wgx7zIxWZZO4DDgUdd8YofQoly2NySEeXCM3gJsUig== X-Google-Smtp-Source: ABdhPJwMwO0kS+RyMpvWY9xALIYh3+Sn874NDIe4svZvS3EKXW8DVEhl5ZXRmycrSDiCqsEe9Ppj4KrT0cF9A3qfwN4= X-Received: by 2002:ac8:47c8:: with SMTP id d8mr5073129qtr.32.1598700882798; Sat, 29 Aug 2020 04:34:42 -0700 (PDT) MIME-Version: 1.0 References: <202008290430.07T4UCM4007928@repo.freebsd.org> <213fcb81-ceab-677f-98dc-e8cb33fef7d1@gmail.com> In-Reply-To: <213fcb81-ceab-677f-98dc-e8cb33fef7d1@gmail.com> From: Warner Losh Date: Sat, 29 Aug 2020 05:34:31 -0600 Message-ID: Subject: Re: svn commit: r364946 - head/sys/kern To: meloun.michal@gmail.com Cc: Mateusz Guzik , Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BdvWl6VNZz4LVX X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=mK03SkZs; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::843) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.57 / 15.00]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.78)[-0.780]; NEURAL_HAM_LONG(-0.97)[-0.967]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; RCPT_COUNT_FIVE(0.00)[6]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.82)[-0.825]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::843:from]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 11:34:44 -0000 On Sat, Aug 29, 2020 at 5:25 AM Michal Meloun wrote: > > > On 29.08.2020 13:02, Warner Losh wrote: > > On Sat, Aug 29, 2020 at 4:38 AM Michal Meloun > > wrote: > > > >> > >> > >> On 29.08.2020 12:04, Warner Losh wrote: > >>> On Sat, Aug 29, 2020 at 1:09 AM Mateusz Guzik > wrote: > >>> > >>>> This crashes on boot for me: > >>>> > >>> > >>> I wasn't able to get it to crash on boot for me, but I was able to > >> recreate > >>> it. > >> It crashed on ofw based systems where some enumerated devices have not a > >> suitable driver, see: > >> --------------------------------------- > >> sysctl_devices: nameunit: root0, descs: System root bus, driver: root > >> sysctl_devices: nameunit: nexus0, descs: (null), driver: nexus > >> sysctl_devices: nameunit: ofwbus0, descs: Open Firmware Device Tree, > >> driver: ofwbus > >> sysctl_devices: nameunit: pcib0, descs: Nvidia Integrated PCI/PCI-E > >> Controller, driver: pcib > >> sysctl_devices: nameunit: simplebus0, descs: Flattened device tree > >> simple bus, driver: simplebus > >> sysctl_devices: nameunit: gic0, descs: ARM Generic Interrupt Controller, > >> driver: gic > >> sysctl_devices: nameunit: (null), descs: (null), driver: > >> sysctl_devices: nameunit: lic0, descs: (null), driver: lic > >> sysctl_devices: nameunit: (null), descs: (null), driver: > >> sysctl_devices: nameunit: car0, descs: Tegra Clock Driver, driver: car > >> .... > >> ---------------------------------------------------------------------- > >>> Fixed in r364949.Confirmed. > >> I think it didn't crash on boot for me because > >>> kldxref failed due to the segment thing so devmatch didn't run which > >> would > >>> have triggered this bug. devinfo did trigger a very similar crash, and > >>> r364949 fixes that crash. Even a new kldxref failed due to the too many > >>> segments thing, so I can't confirm that's what you hit, but I'm pretty > >> sure > >>> it is... > >>> > >> But there is another issue in device_sysctl_handler() (not analyzed > yet): > >> root@tegra210:~ # sysctl dev.cpu. > >> dev.cpu.3.temperature: 50.5C > >> dev.cpu.3panic: sbuf_clear makes no sense on sbuf 0xffff00006f21a528 > >> with drain > >> cpuid = 2 > >> time = 1598696937 > >> KDB: stack backtrace: > >> db_trace_self() at db_fetch_ksymtab+0x164 > >> pc = 0xffff0000006787f4 lr = 0xffff000000153400 > >> sp = 0xffff00006f21a1b0 fp = 0xffff00006f21a3b0 > >> > >> db_fetch_ksymtab() at vpanic+0x198 > >> pc = 0xffff000000153400 lr = 0xffff00000036b274 > >> sp = 0xffff00006f21a3c0 fp = 0xffff00006f21a420 > >> > >> vpanic() at panic+0x44 > >> pc = 0xffff00000036b274 lr = 0xffff00000036b018 > >> sp = 0xffff00006f21a430 fp = 0xffff00006f21a4e0 > >> > >> panic() at sbuf_clear+0xa0 > >> pc = 0xffff00000036b018 lr = 0xffff0000003c17c8 > >> sp = 0xffff00006f21a4f0 fp = 0xffff00006f21a4f0 > >> > >> sbuf_clear() at sbuf_cpy+0x58 > >> pc = 0xffff0000003c17c8 lr = 0xffff0000003c1ff0 > >> sp = 0xffff00006f21a500 fp = 0xffff00006f21a500 > >> > >> sbuf_cpy() at _gone_in_dev+0x560 > >> pc = 0xffff0000003c1ff0 lr = 0xffff0000003a9078 > >> sp = 0xffff00006f21a510 fp = 0xffff00006f21a570 > >> > >> _gone_in_dev() at sbuf_new_for_sysctl+0x170 > >> pc = 0xffff0000003a9078 lr = 0xffff00000037c1a8 > >> sp = 0xffff00006f21a580 fp = 0xffff00006f21a5a0 > >> > >> sbuf_new_for_sysctl() at kernel_sysctl+0x36c > >> pc = 0xffff00000037c1a8 lr = 0xffff00000037b63c > >> sp = 0xffff00006f21a5b0 fp = 0xffff00006f21a630 > >> > > > > This traceback is all kinds of crazy. sbuf_new_for_sysctl doesn't call > > _gone_in_dev(), which doesn't do sbuf stuff at all. And neither does it > > call sbuf_cpy(). Though I get a crash that looks like: > > Tracing pid 66442 tid 101464 td 0xfffffe02f47b7c00 > > kdb_enter() at kdb_enter+0x37/frame 0xfffffe02f4ae3740 > > vpanic() at vpanic+0x19e/frame 0xfffffe02f4ae3790 > > panic() at panic+0x43/frame 0xfffffe02f4ae37f0 > > sbuf_clear() at sbuf_clear+0xac/frame 0xfffffe02f4ae3800 > > sbuf_cpy() at sbuf_cpy+0x5a/frame 0xfffffe02f4ae3820 > > device_sysctl_handler() at device_sysctl_handler+0x133/frame > > 0xfffffe02f4ae38a0 > > sysctl_root_handler_locked() at sysctl_root_handler_locked+0x9c/frame > > 0xfffffe02f4ae38f0 > > sysctl_root() at sysctl_root+0x20a/frame 0xfffffe02f4ae3970 > > userland_sysctl() at userland_sysctl+0x17d/frame 0xfffffe02f4ae3a20 > > sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe02f4ae3ad0 > > amd64_syscall() at amd64_syscall+0x140/frame 0xfffffe02f4ae3bf0 > > fast_syscall_common() at fast_syscall_common+0xf8/frame > 0xfffffe02f4ae3bf0 > > --- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x80042d50a, rsp = > > 0x7fffffffd458, rbp = 0x7fffffffd490 --- > > > > on a sysctl -a which I think makes more sense... I'll see if I can track > > it down... I think it's because sbuf_cpy does an unconditional clear, > which > > triggers this assert, which is likely bogus for this case. sbuf_cat > doesn't > > seem to have this issue... I'll confirm and commit. > > > > Warner > > Yeah, sorry. Local symbols are not available for netbooted kernel :(. > And i csan confirm that problem is cause by using sbuf_cpy() on sbuf > allocated by sbuf_new_for_sysctl() (thus with drain handler) in > device_sysctl_handler(). But pure replacing sbuf_cpy() by sbuf_cat() > gives me another panic: > panic: Assertion (sb->s_flags & SBUF_INCLUDENUL) == 0 failed at > /usr2/Meloun/git/pmap/sys/kern/subr_bus.c:4936 > (still as respose for sysctl dev.cpu) > OK. My bouncer system here has something wrong with /, but I changed the sbuf_cpy to sbuf_cat. Can you confirm that it works for you? Warner > > > > > >> kernel_sysctl() at userland_sysctl+0xf4 > >> pc = 0xffff00000037b63c lr = 0xffff00000037bc5c > >> sp = 0xffff00006f21a640 fp = 0xffff00006f21a6d0 > >> > >> userland_sysctl() at sys___sysctl+0x68 > >> pc = 0xffff00000037bc5c lr = 0xffff00000037bb28 > >> sp = 0xffff00006f21a6e0 fp = 0xffff00006f21a790 > >> > >> sys___sysctl() at do_el0_sync+0x4e0 > >> pc = 0xffff00000037bb28 lr = 0xffff000000697918 > >> sp = 0xffff00006f21a7a0 fp = 0xffff00006f21a830 > >> > >> do_el0_sync() at handle_el0_sync+0x90 > >> pc = 0xffff000000697918 lr = 0xffff00000067aa24 > >> sp = 0xffff00006f21a840 fp = 0xffff00006f21a980 > >> > >> handle_el0_sync() at 0x4047764c > >> pc = 0xffff00000067aa24 lr = 0x000000004047764c > >> sp = 0xffff00006f21a990 fp = 0x0000ffffffffc250 > >> > >> KDB: enter: panic > >> [ thread pid 1263 tid 100092 ] > >> Stopped at 0x40477fb4: undefined 54000042 > >> > >>> Warner > >>> > >> > >>> > >>>> atal trap 12: page fault while in kernel mode > >>>> cpuid = 0; apic id = 00 > >>>> fault virtual address = 0x0 > >>>> fault code = supervisor read data, page not present > >>>> instruction pointer = 0x20:0xffffffff805b0a7f > >>>> stack pointer = 0x28:0xfffffe002366a7f0 > >>>> frame pointer = 0x28:0xfffffe002366a7f0 > >>>> code segment = base 0x0, limit 0xfffff, type 0x1b > >>>> = DPL 0, pres 1, long 1, def32 0, gran 1 > >>>> processor eflags = interrupt enabled, resume, IOPL = 0 > >>>> current process = 89 (devmatch) > >>>> trap number = 12 > >>>> panic: page fault > >>>> cpuid = 0 > >>>> time = 1598692135 > >>>> KDB: stack backtrace: > >>>> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > >>>> 0xfffffe002366a4a0 > >>>> vpanic() at vpanic+0x182/frame 0xfffffe002366a4f0 > >>>> panic() at panic+0x43/frame 0xfffffe002366a550 > >>>> trap_fatal() at trap_fatal+0x387/frame 0xfffffe002366a5b0 > >>>> trap_pfault() at trap_pfault+0x4f/frame 0xfffffe002366a610 > >>>> trap() at trap+0x27d/frame 0xfffffe002366a720 > >>>> calltrap() at calltrap+0x8/frame 0xfffffe002366a720 > >>>> --- trap 0xc, rip = 0xffffffff805b0a7f, rsp = 0xfffffe002366a7f0, rbp > >>>> = 0xfffffe002366a7f0 --- > >>>> strlen() at strlen+0x1f/frame 0xfffffe002366a7f0 > >>>> sbuf_cat() at sbuf_cat+0x15/frame 0xfffffe002366a810 > >>>> sysctl_devices() at sysctl_devices+0x104/frame 0xfffffe002366a8a0 > >>>> sysctl_root_handler_locked() at sysctl_root_handler_locked+0x91/frame > >>>> 0xfffffe002366a8f0 > >>>> sysctl_root() at sysctl_root+0x249/frame 0xfffffe002366a970 > >>>> userland_sysctl() at userland_sysctl+0x170/frame 0xfffffe002366aa20 > >>>> sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe002366aad0 > >>>> amd64_syscall() at amd64_syscall+0x10c/frame 0xfffffe002366abf0 > >>>> fast_syscall_common() at fast_syscall_common+0xf8/frame > >> 0xfffffe002366abf0 > >>>> --- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x80041c0ea, rsp > >>>> = 0x7fffffffda78, rbp = 0x7fffffffdab0 --- > >>>> KDB: enter: panic > >>>> [ thread pid 89 tid 100067 ] > >>>> Stopped at kdb_enter+0x37: movq $0,0x7e2616(%rip) > >>>> > >>>> > >>>> On 8/29/20, Warner Losh wrote: > >>>>> Author: imp > >>>>> Date: Sat Aug 29 04:30:12 2020 > >>>>> New Revision: 364946 > >>>>> URL: https://svnweb.freebsd.org/changeset/base/364946 > >>>>> > >>>>> Log: > >>>>> Move to using sbuf for some sysctl in newbus > >>>>> > >>>>> Convert two different sysctl to using sbuf. First, for all the > >> default > >>>>> sysctls we implement for each device driver that's attached. This > is > >> a > >>>>> pure sbuf conversion. > >>>>> > >>>>> Second, convert sysctl_devices to fill its buffer with sbuf rather > >>>>> than a hand-rolled crappy thing I wrote years ago. > >>>>> > >>>>> Reviewed by: cem, markj > >>>>> Differential Revision: https://reviews.freebsd.org/D26206 > >>>>> > >>>>> Modified: > >>>>> head/sys/kern/subr_bus.c > >>>>> > >>>>> Modified: head/sys/kern/subr_bus.c > >>>>> > >>>> > >> > ============================================================================== > >>>>> --- head/sys/kern/subr_bus.c Sat Aug 29 04:30:06 2020 > (r364945) > >>>>> +++ head/sys/kern/subr_bus.c Sat Aug 29 04:30:12 2020 > (r364946) > >>>>> @@ -260,36 +260,33 @@ enum { > >>>>> static int > >>>>> device_sysctl_handler(SYSCTL_HANDLER_ARGS) > >>>>> { > >>>>> + struct sbuf sb; > >>>>> device_t dev = (device_t)arg1; > >>>>> - const char *value; > >>>>> - char *buf; > >>>>> int error; > >>>>> > >>>>> - buf = NULL; > >>>>> + sbuf_new_for_sysctl(&sb, NULL, 1024, req); > >>>>> switch (arg2) { > >>>>> case DEVICE_SYSCTL_DESC: > >>>>> - value = dev->desc ? dev->desc : ""; > >>>>> + sbuf_cpy(&sb, dev->desc ? dev->desc : ""); > >>>>> break; > >>>>> case DEVICE_SYSCTL_DRIVER: > >>>>> - value = dev->driver ? dev->driver->name : ""; > >>>>> + sbuf_cpy(&sb, dev->driver ? dev->driver->name : ""); > >>>>> break; > >>>>> case DEVICE_SYSCTL_LOCATION: > >>>>> - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); > >>>>> - bus_child_location_str(dev, buf, 1024); > >>>>> + bus_child_location_sb(dev, &sb); > >>>>> break; > >>>>> case DEVICE_SYSCTL_PNPINFO: > >>>>> - value = buf = malloc(1024, M_BUS, M_WAITOK | M_ZERO); > >>>>> - bus_child_pnpinfo_str(dev, buf, 1024); > >>>>> + bus_child_pnpinfo_sb(dev, &sb); > >>>>> break; > >>>>> case DEVICE_SYSCTL_PARENT: > >>>>> - value = dev->parent ? dev->parent->nameunit : ""; > >>>>> + sbuf_cpy(&sb, dev->parent ? dev->parent->nameunit : > ""); > >>>>> break; > >>>>> default: > >>>>> + sbuf_delete(&sb); > >>>>> return (EINVAL); > >>>>> } > >>>>> - error = SYSCTL_OUT_STR(req, value); > >>>>> - if (buf != NULL) > >>>>> - free(buf, M_BUS); > >>>>> + error = sbuf_finish(&sb); > >>>>> + sbuf_delete(&sb); > >>>>> return (error); > >>>>> } > >>>>> > >>>>> @@ -5464,13 +5461,13 @@ SYSCTL_PROC(_hw_bus, OID_AUTO, info, > >>>> CTLTYPE_STRUCT > >>>>> | > >>>>> static int > >>>>> sysctl_devices(SYSCTL_HANDLER_ARGS) > >>>>> { > >>>>> + struct sbuf sb; > >>>>> int *name = (int *)arg1; > >>>>> u_int namelen = arg2; > >>>>> int index; > >>>>> device_t dev; > >>>>> struct u_device *udev; > >>>>> int error; > >>>>> - char *walker, *ep; > >>>>> > >>>>> if (namelen != 2) > >>>>> return (EINVAL); > >>>>> @@ -5501,34 +5498,21 @@ sysctl_devices(SYSCTL_HANDLER_ARGS) > >>>>> udev->dv_devflags = dev->devflags; > >>>>> udev->dv_flags = dev->flags; > >>>>> udev->dv_state = dev->state; > >>>>> - walker = udev->dv_fields; > >>>>> - ep = walker + sizeof(udev->dv_fields); > >>>>> -#define CP(src) \ > >>>>> - if ((src) == NULL) \ > >>>>> - *walker++ = '\0'; \ > >>>>> - else { \ > >>>>> - strlcpy(walker, (src), ep - walker); \ > >>>>> - walker += strlen(walker) + 1; \ > >>>>> - } \ > >>>>> - if (walker >= ep) \ > >>>>> - break; > >>>>> - > >>>>> - do { > >>>>> - CP(dev->nameunit); > >>>>> - CP(dev->desc); > >>>>> - CP(dev->driver != NULL ? dev->driver->name : NULL); > >>>>> - bus_child_pnpinfo_str(dev, walker, ep - walker); > >>>>> - walker += strlen(walker) + 1; > >>>>> - if (walker >= ep) > >>>>> - break; > >>>>> - bus_child_location_str(dev, walker, ep - walker); > >>>>> - walker += strlen(walker) + 1; > >>>>> - if (walker >= ep) > >>>>> - break; > >>>>> - *walker++ = '\0'; > >>>>> - } while (0); > >>>>> -#undef CP > >>>>> - error = SYSCTL_OUT(req, udev, sizeof(*udev)); > >>>>> + sbuf_new(&sb, udev->dv_fields, sizeof(udev->dv_fields), > >>>> SBUF_FIXEDLEN); > >>>>> + sbuf_cat(&sb, dev->nameunit); > >>>>> + sbuf_putc(&sb, '\0'); > >>>>> + sbuf_cat(&sb, dev->desc); > >>>>> + sbuf_putc(&sb, '\0'); > >>>>> + sbuf_cat(&sb, dev->driver != NULL ? dev->driver->name : '\0'); > >>>>> + sbuf_putc(&sb, '\0'); > >>>>> + bus_child_pnpinfo_sb(dev, &sb); > >>>>> + sbuf_putc(&sb, '\0'); > >>>>> + bus_child_location_sb(dev, &sb); > >>>>> + sbuf_putc(&sb, '\0'); > >>>>> + error = sbuf_finish(&sb); > >>>>> + if (error == 0) > >>>>> + error = SYSCTL_OUT(req, udev, sizeof(*udev)); > >>>>> + sbuf_delete(&sb); > >>>>> free(udev, M_BUS); > >>>>> return (error); > >>>>> } > >>>>> > >>>> > >>>> > >>>> -- > >>>> Mateusz Guzik > >>>> > >>> > >> > > > From owner-svn-src-all@freebsd.org Sat Aug 29 11:39:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8747C3D5D44; Sat, 29 Aug 2020 11:39:54 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bdvdk2zbHz4LhV; Sat, 29 Aug 2020 11:39:54 +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 4A0B6250B7; Sat, 29 Aug 2020 11:39:54 +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 07TBdsiL074266; Sat, 29 Aug 2020 11:39:54 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TBdsVO074265; Sat, 29 Aug 2020 11:39:54 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202008291139.07TBdsVO074265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 29 Aug 2020 11:39:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364952 - 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: 364952 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 11:39:54 -0000 Author: manu Date: Sat Aug 29 11:39:53 2020 New Revision: 364952 URL: https://svnweb.freebsd.org/changeset/base/364952 Log: Fix arm64 build after r364927 Reported by: jenkins, dch Pointy hat to: manu Modified: head/sys/arm/allwinner/clkng/aw_clk_nm.c Modified: head/sys/arm/allwinner/clkng/aw_clk_nm.c ============================================================================== --- head/sys/arm/allwinner/clkng/aw_clk_nm.c Sat Aug 29 11:18:10 2020 (r364951) +++ head/sys/arm/allwinner/clkng/aw_clk_nm.c Sat Aug 29 11:39:53 2020 (r364952) @@ -221,14 +221,14 @@ aw_clk_nm_set_freq(struct clknode *clk, uint64_t fpare if ((best < *fout) && ((flags & CLK_SET_ROUND_DOWN) == 0)) { *stop = 1; - printf("best freq (%llu) < requested freq(%llu)\n", + printf("best freq (%ju) < requested freq(%ju)\n", best, *fout); return (ERANGE); } if ((best > *fout) && ((flags & CLK_SET_ROUND_UP) == 0)) { *stop = 1; - printf("best freq (%llu) > requested freq(%llu)\n", + printf("best freq (%ju) > requested freq(%ju)\n", best, *fout); return (ERANGE); } From owner-svn-src-all@freebsd.org Sat Aug 29 11:46:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23C003D5FC4; Sat, 29 Aug 2020 11:46:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bdvnk6sZYz4MNX; Sat, 29 Aug 2020 11:46:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CEEF2250D9; Sat, 29 Aug 2020 11:46:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07TBko6k080085; Sat, 29 Aug 2020 11:46:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TBkoD6080084; Sat, 29 Aug 2020 11:46:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202008291146.07TBkoD6080084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 29 Aug 2020 11:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364953 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 364953 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 11:46:51 -0000 Author: imp Date: Sat Aug 29 11:46:50 2020 New Revision: 364953 URL: https://svnweb.freebsd.org/changeset/base/364953 Log: We don't need to INCLUDENUL, so turn it off to avoid assertion... sbuf_new_for_sysctl turns on INCLUDENUL, but we don't need it. And we assert for it in the new bus_pnpinfo_sb and bus_location_sb strings. Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Sat Aug 29 11:39:53 2020 (r364952) +++ head/sys/kern/subr_bus.c Sat Aug 29 11:46:50 2020 (r364953) @@ -265,6 +265,7 @@ device_sysctl_handler(SYSCTL_HANDLER_ARGS) int error; sbuf_new_for_sysctl(&sb, NULL, 1024, req); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); switch (arg2) { case DEVICE_SYSCTL_DESC: sbuf_cat(&sb, dev->desc ? dev->desc : ""); From owner-svn-src-all@freebsd.org Sat Aug 29 12:04:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD0AE3D69FF; Sat, 29 Aug 2020 12:04:13 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bdw9n4ZGMz4NvS; Sat, 29 Aug 2020 12:04:13 +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 803CA25998; Sat, 29 Aug 2020 12:04:13 +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 07TC4D2b092607; Sat, 29 Aug 2020 12:04:13 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TC4DWZ092606; Sat, 29 Aug 2020 12:04:13 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202008291204.07TC4DWZ092606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 29 Aug 2020 12:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364954 - head/sys/net/route X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/net/route X-SVN-Commit-Revision: 364954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 12:04:13 -0000 Author: melifaro Date: Sat Aug 29 12:04:13 2020 New Revision: 364954 URL: https://svnweb.freebsd.org/changeset/base/364954 Log: Revert uma zone alignemnt cache unadvertenly committed in r364950. Modified: head/sys/net/route/route_ctl.c Modified: head/sys/net/route/route_ctl.c ============================================================================== --- head/sys/net/route/route_ctl.c Sat Aug 29 11:46:50 2020 (r364953) +++ head/sys/net/route/route_ctl.c Sat Aug 29 12:04:13 2020 (r364954) @@ -101,7 +101,7 @@ vnet_rtzone_init() { V_rtzone = uma_zcreate("rtentry", sizeof(struct rtentry), - NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, 0); + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); } #ifdef VIMAGE From owner-svn-src-all@freebsd.org Sat Aug 29 12:54:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 599523D7F84; Sat, 29 Aug 2020 12:54:18 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdxHZ1gr2z4RVl; Sat, 29 Aug 2020 12:54:18 +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 1E131260B3; Sat, 29 Aug 2020 12:54:18 +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 07TCsHB5022933; Sat, 29 Aug 2020 12:54:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TCsHPj022932; Sat, 29 Aug 2020 12:54:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008291254.07TCsHPj022932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 29 Aug 2020 12:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364955 - stable/12/libexec/rc/rc.d X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/libexec/rc/rc.d X-SVN-Commit-Revision: 364955 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 12:54:18 -0000 Author: trasz Date: Sat Aug 29 12:54:17 2020 New Revision: 364955 URL: https://svnweb.freebsd.org/changeset/base/364955 Log: Drop the "nocover" option from the linux rc script; the option is not yet supported in 12-STABLE. This is a direct commit intended as a temporary workaround. Reported by: scf@ Sponsored by: The FreeBSD Foundation Modified: stable/12/libexec/rc/rc.d/linux Modified: stable/12/libexec/rc/rc.d/linux ============================================================================== --- stable/12/libexec/rc/rc.d/linux Sat Aug 29 12:04:13 2020 (r364954) +++ stable/12/libexec/rc/rc.d/linux Sat Aug 29 12:54:17 2020 (r364955) @@ -48,11 +48,11 @@ linux_start() if checkyesno linux_mounts_enable; then _emul_path="/compat/linux" - mount -o nocover -t linprocfs linprocfs "${_emul_path}/proc" - mount -o nocover -t linsysfs linsysfs "${_emul_path}/sys" - mount -o nocover -t devfs devfs "${_emul_path}/dev" - mount -o nocover,linrdlnk -t fdescfs fdescfs "${_emul_path}/dev/fd" - mount -o nocover,mode=1777 -t tmpfs tmpfs "${_emul_path}/dev/shm" + mount -t linprocfs linprocfs "${_emul_path}/proc" + mount -t linsysfs linsysfs "${_emul_path}/sys" + mount -t devfs devfs "${_emul_path}/dev" + mount -o linrdlnk -t fdescfs fdescfs "${_emul_path}/dev/fd" + mount -o mode=1777 -t tmpfs tmpfs "${_emul_path}/dev/shm" fi } From owner-svn-src-all@freebsd.org Sat Aug 29 14:44:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC6983B2299; Sat, 29 Aug 2020 14:44:57 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BdzlF5Ysmz4Zgl; Sat, 29 Aug 2020 14:44:57 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 9C2721963B; Sat, 29 Aug 2020 14:44:57 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 54D1727C005A; Sat, 29 Aug 2020 10:44:57 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute4.internal (MEProxy); Sat, 29 Aug 2020 10:44:57 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudefuddgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder redtnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepteetleffuddvtddtuedv hfefheejvddvgfdvkedvfeethfegkedvkeelveeuvddunecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id F3EB6C200A5; Sat, 29 Aug 2020 10:44:56 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-232-g4bdb081-fm-20200825.002-g4bdb081a Mime-Version: 1.0 Message-Id: <0b054da5-3d76-413c-b14f-58b819312c85@www.fastmail.com> In-Reply-To: References: <202008290430.07T4UCM4007928@repo.freebsd.org> <213fcb81-ceab-677f-98dc-e8cb33fef7d1@gmail.com> Date: Sat, 29 Aug 2020 09:44:37 -0500 From: "Brandon Bergren" To: "Warner Losh" , meloun.michal@gmail.com Cc: "Mateusz Guzik" , "Warner Losh" , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r364946 - head/sys/kern Content-Type: text/plain X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 14:44:58 -0000 On Sat, Aug 29, 2020, at 6:34 AM, Warner Losh wrote: > > > On Sat, Aug 29, 2020 at 5:25 AM Michal Meloun wrote: > > Yeah, sorry. Local symbols are not available for netbooted kernel :(. > > And i csan confirm that problem is cause by using sbuf_cpy() on sbuf > > allocated by sbuf_new_for_sysctl() (thus with drain handler) in > > device_sysctl_handler(). But pure replacing sbuf_cpy() by sbuf_cat() > > gives me another panic: > > panic: Assertion (sb->s_flags & SBUF_INCLUDENUL) == 0 failed at > > /usr2/Meloun/git/pmap/sys/kern/subr_bus.c:4936 > > (still as respose for sysctl dev.cpu) > By the way, on powerpc*, we have a little hack in place to be able to load symbols even when loader isn't in use -- in petitboot, if you provide a second copy of the kernel as the initrd, it will be used at runtime to load symbols. (the powerpc code has special probing to skip attaching the initrd as a md device if it looks like an ELF file) And on powerpc32, you can actually netboot loader instead of netbooting the kernel (with a little dhcpd magic) and get symbols loaded the "normal" way. -- Brandon Bergren bdragon@FreeBSD.org From owner-svn-src-all@freebsd.org Sat Aug 29 15:13:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1962B3B30EC; Sat, 29 Aug 2020 15:13:08 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf0Ml6vhWz4cQ1; Sat, 29 Aug 2020 15:13:07 +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 D048327B60; Sat, 29 Aug 2020 15:13:07 +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 07TFD7ph010786; Sat, 29 Aug 2020 15:13:07 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TFD7gA010785; Sat, 29 Aug 2020 15:13:07 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202008291513.07TFD7gA010785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 29 Aug 2020 15:13:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364956 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 364956 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 15:13:08 -0000 Author: gjb Date: Sat Aug 29 15:13:07 2020 New Revision: 364956 URL: https://svnweb.freebsd.org/changeset/base/364956 Log: Install devel/git from packages if NOPORTS is set in the release.sh configuration file. Reported by: Michael Butler Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: head/release/release.sh Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Sat Aug 29 12:54:17 2020 (r364955) +++ head/release/release.sh Sat Aug 29 15:13:07 2020 (r364956) @@ -282,6 +282,11 @@ extra_chroot_setup() { WRKDIRPREFIX=/tmp/ports \ DISTDIR=/tmp/distfiles \ install clean distclean + else + eval chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \ + pkg install -y devel/git + eval chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \ + pkg clean -y fi if [ -d ${CHROOTDIR}/usr/ports ]; then # Trick the ports 'run-autotools-fixup' target to do the right From owner-svn-src-all@freebsd.org Sat Aug 29 15:30:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C44F3B384A; Sat, 29 Aug 2020 15:30:22 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf0ld71jTz4dbW; Sat, 29 Aug 2020 15:30:21 +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 D586727A33; Sat, 29 Aug 2020 15:30:21 +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 07TFUL7W017630; Sat, 29 Aug 2020 15:30:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TFULLm017629; Sat, 29 Aug 2020 15:30:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202008291530.07TFULLm017629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 29 Aug 2020 15:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364957 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 364957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 15:30:22 -0000 Author: gjb Date: Sat Aug 29 15:30:21 2020 New Revision: 364957 URL: https://svnweb.freebsd.org/changeset/base/364957 Log: Avoid the build from falling over if devel/git is not installed on the system. Set a null branch/hash in this case, to avoid undefined GITREV/GITBRANCH variables from falling over in other areas. Reported by: many Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: head/release/Makefile.inc1 Modified: head/release/Makefile.inc1 ============================================================================== --- head/release/Makefile.inc1 Sat Aug 29 15:13:07 2020 (r364956) +++ head/release/Makefile.inc1 Sat Aug 29 15:30:21 2020 (r364957) @@ -10,10 +10,8 @@ GIT_CMD= ${_P}/git . endif . endif .endfor -.if !defined(GIT_CMD) && empty(GIT_CMD) -. error "Git binary not found. Set GIT_CMD appropriately." -.endif +.if !empty(GIT_CMD) && exists(${GIT_CMD}) # Set the git branch and hash to export where needed. .if !defined(GITBRANCH) || empty(GITBRANCH) GITBRANCH!= ${GIT_CMD} -C ${.CURDIR} rev-parse --abbrev-ref HEAD 2>/dev/null | sed -e 's/\^\///' @@ -21,6 +19,12 @@ GITBRANCH!= ${GIT_CMD} -C ${.CURDIR} rev-parse --abbre .endif .if !defined(GITREV) || empty(GITREV) GITREV!= ${GIT_CMD} -C ${.CURDIR} rev-parse --verify --short HEAD 2>/dev/null || true +.export GITREV +.endif +.else +GITBRANCH= nullbranch +GITREV= nullhash +.export GITBRANCH .export GITREV .endif From owner-svn-src-all@freebsd.org Sat Aug 29 15:31:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E85833B3D02; Sat, 29 Aug 2020 15:31:23 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf0mq5vFTz4dnZ; Sat, 29 Aug 2020 15:31:23 +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 ADB0D27CA4; Sat, 29 Aug 2020 15:31:23 +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 07TFVNcF018465; Sat, 29 Aug 2020 15:31:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TFVNXF018464; Sat, 29 Aug 2020 15:31:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202008291531.07TFVNXF018464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 29 Aug 2020 15:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364958 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 364958 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 15:31:24 -0000 Author: gjb Date: Sat Aug 29 15:31:23 2020 New Revision: 364958 URL: https://svnweb.freebsd.org/changeset/base/364958 Log: Indentation fixes. No functional changes. Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: head/release/Makefile.inc1 Modified: head/release/Makefile.inc1 ============================================================================== --- head/release/Makefile.inc1 Sat Aug 29 15:30:21 2020 (r364957) +++ head/release/Makefile.inc1 Sat Aug 29 15:31:23 2020 (r364958) @@ -13,19 +13,19 @@ GIT_CMD= ${_P}/git .if !empty(GIT_CMD) && exists(${GIT_CMD}) # Set the git branch and hash to export where needed. -.if !defined(GITBRANCH) || empty(GITBRANCH) +. if !defined(GITBRANCH) || empty(GITBRANCH) GITBRANCH!= ${GIT_CMD} -C ${.CURDIR} rev-parse --abbrev-ref HEAD 2>/dev/null | sed -e 's/\^\///' -.export GITBRANCH -.endif -.if !defined(GITREV) || empty(GITREV) +. export GITBRANCH +. endif +. if !defined(GITREV) || empty(GITREV) GITREV!= ${GIT_CMD} -C ${.CURDIR} rev-parse --verify --short HEAD 2>/dev/null || true -.export GITREV -.endif +. export GITREV +. endif .else GITBRANCH= nullbranch GITREV= nullhash -.export GITBRANCH -.export GITREV +. export GITBRANCH +. export GITREV .endif # Set the build date, primarily for snapshot builds. From owner-svn-src-all@freebsd.org Sat Aug 29 15:50:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98A093B44A2; Sat, 29 Aug 2020 15:50:28 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf1Br39q4z4fr0; Sat, 29 Aug 2020 15:50:28 +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 504F127EDB; Sat, 29 Aug 2020 15:50:28 +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 07TFoSej029726; Sat, 29 Aug 2020 15:50:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TFoS7O029724; Sat, 29 Aug 2020 15:50:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202008291550.07TFoS7O029724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 29 Aug 2020 15:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364959 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 364959 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 15:50:28 -0000 Author: gjb Date: Sat Aug 29 15:50:27 2020 New Revision: 364959 URL: https://svnweb.freebsd.org/changeset/base/364959 Log: Add a VCSUPDATE command to run 'git pull' instead of 'git clone' if the tree already exists. Reported by: Michael Butler Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: head/release/release.sh Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Sat Aug 29 15:31:23 2020 (r364958) +++ head/release/release.sh Sat Aug 29 15:50:27 2020 (r364959) @@ -70,6 +70,7 @@ env_setup() { exit 1 fi VCSCMD="/usr/local/bin/git clone -q" + VCSUPDATE="/usr/local/bin/git pull -q" # The default git checkout server, and branches for src/, doc/, # and ports/. @@ -220,13 +221,25 @@ chroot_setup() { mkdir -p ${CHROOTDIR}/usr if [ -z "${SRC_UPDATE_SKIP}" ]; then - ${VCSCMD} ${SRC} -b ${SRCBRANCH} ${CHROOTDIR}/usr/src + if [ -d "${CHROOTDIR}/usr/src" ]; then + cd ${CHROOTDIR}/usr/src && ${VCSUPDATE} && cd - + else + ${VCSCMD} ${SRC} -b ${SRCBRANCH} ${CHROOTDIR}/usr/src + fi fi if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then - ${VCSCMD} ${DOC} -b ${DOCBRANCH} ${CHROOTDIR}/usr/doc + if [ -d "${CHROOTDIR}/usr/doc" ]; then + cd ${CHROOTDIR}/usr/doc && ${VCSUPDATE} && cd - + else + ${VCSCMD} ${DOC} -b ${DOCBRANCH} ${CHROOTDIR}/usr/doc + fi fi if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then - ${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports + if [ -d "${CHROOTDIR}/usr/ports" ]; then + cd ${CHROOTDIR}/usr/ports && ${VCSUPDATE} && cd - + else + ${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports + fi fi if [ -z "${CHROOTBUILD_SKIP}" ]; then From owner-svn-src-all@freebsd.org Sat Aug 29 16:04:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D56B3B4D1A; Sat, 29 Aug 2020 16:04:03 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf1VW3fNDz3SSg; Sat, 29 Aug 2020 16:04:03 +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 6055D8397; Sat, 29 Aug 2020 16:04:03 +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 07TG433c041727; Sat, 29 Aug 2020 16:04:03 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TG43bY041726; Sat, 29 Aug 2020 16:04:03 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202008291604.07TG43bY041726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 29 Aug 2020 16:04:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364960 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 364960 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 16:04:03 -0000 Author: gjb Date: Sat Aug 29 16:04:02 2020 New Revision: 364960 URL: https://svnweb.freebsd.org/changeset/base/364960 Log: Refine the VCSUPDATE logic further: - Look for the .git directory instead of top-level directory. - Use 'git -C' instead of cd(1). Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: head/release/release.sh Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Sat Aug 29 15:50:27 2020 (r364959) +++ head/release/release.sh Sat Aug 29 16:04:02 2020 (r364960) @@ -221,22 +221,22 @@ chroot_setup() { mkdir -p ${CHROOTDIR}/usr if [ -z "${SRC_UPDATE_SKIP}" ]; then - if [ -d "${CHROOTDIR}/usr/src" ]; then - cd ${CHROOTDIR}/usr/src && ${VCSUPDATE} && cd - + if [ -d "${CHROOTDIR}/usr/src/.git" ]; then + ${VCSUPDATE} -C ${CHROOTDIR}/usr/src else ${VCSCMD} ${SRC} -b ${SRCBRANCH} ${CHROOTDIR}/usr/src fi fi if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then - if [ -d "${CHROOTDIR}/usr/doc" ]; then - cd ${CHROOTDIR}/usr/doc && ${VCSUPDATE} && cd - + if [ -d "${CHROOTDIR}/usr/doc/.git" ]; then + ${VCSUPDATE} -C ${CHROOTDIR}/usr/doc else ${VCSCMD} ${DOC} -b ${DOCBRANCH} ${CHROOTDIR}/usr/doc fi fi if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then - if [ -d "${CHROOTDIR}/usr/ports" ]; then - cd ${CHROOTDIR}/usr/ports && ${VCSUPDATE} && cd - + if [ -d "${CHROOTDIR}/usr/ports/.git" ]; then + ${VCSUPDATE} -C ${CHROOTDIR}/usr/ports else ${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports fi From owner-svn-src-all@freebsd.org Sat Aug 29 16:11:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07CFA3B51B4; Sat, 29 Aug 2020 16:11:09 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (mail.farley.org [IPv6:2001:470:1f07:14d3:2::11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf1fh2HLRz3TNK; Sat, 29 Aug 2020 16:11:08 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (thor.farley.org [IPv6:2001:470:1f07:14d3:1:0:0:5]) by mail.farley.org (8.16.1/8.16.1) with ESMTP id 07TGB0Hr025029; Sat, 29 Aug 2020 12:11:00 -0400 (EDT) (envelope-from scf@FreeBSD.org) Date: Sat, 29 Aug 2020 12:11:00 -0400 (EDT) From: "Sean C. Farley" To: Edward Tomasz Napierala cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: Re: svn commit: r364955 - stable/12/libexec/rc/rc.d In-Reply-To: <202008291254.07TCsHPj022932@repo.freebsd.org> Message-ID: <19ab7ff-43ca-50c8-b8f2-aad62c50648e@FreeBSD.org> References: <202008291254.07TCsHPj022932@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-1.0 required=4.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.farley.org X-Rspamd-Queue-Id: 4Bf1fh2HLRz3TNK X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; local_wl_from(0.00)[FreeBSD.org] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 16:11:09 -0000 On Sat, 29 Aug 2020, Edward Tomasz Napierala wrote: > Author: trasz > Date: Sat Aug 29 12:54:17 2020 > New Revision: 364955 > URL: https://svnweb.freebsd.org/changeset/base/364955 > > Log: > Drop the "nocover" option from the linux rc script; the option > is not yet supported in 12-STABLE. > > This is a direct commit intended as a temporary workaround. > > Reported by: scf@ > Sponsored by: The FreeBSD Foundation > > Modified: > stable/12/libexec/rc/rc.d/linux Thank you! Sean -- scf@FreeBSD.org From owner-svn-src-all@freebsd.org Sat Aug 29 16:23:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBDDC3B57F3; Sat, 29 Aug 2020 16:23:01 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf1wP5sZDz3V1H; Sat, 29 Aug 2020 16:23:01 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD8BD8821; Sat, 29 Aug 2020 16:23:01 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07TGN1Hw054107; Sat, 29 Aug 2020 16:23:01 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TGN0Fl054104; Sat, 29 Aug 2020 16:23:00 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <202008291623.07TGN0Fl054104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sat, 29 Aug 2020 16:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364961 - in stable/12: lib/libsecureboot stand/common stand/uboot/lib sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in stable/12: lib/libsecureboot stand/common stand/uboot/lib sys/kern X-SVN-Commit-Revision: 364961 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 16:23:02 -0000 Author: sjg Date: Sat Aug 29 16:23:00 2020 New Revision: 364961 URL: https://svnweb.freebsd.org/changeset/base/364961 Log: MFC loader fixes r361710: stand/uboot: fix setting of gateip.s_addr Missplaced paren. r361933: loader: install allow for more complete device spec in url Rework to simplify and impose sane url syntax. That is we allow for file://[devname[:fstype]]/package r362127: verify_pcr_export: bump kenv_mvallen if needed r362231: make KENV_MVALLEN tunable When doing secure boot, loader wants to export loader.ve.hashed the value of which typically exceeds KENV_MVALLEN. Replace use of KENV_MVALLEN with tunable kenv_mvallen. Add getenv_string_buffer() for the case where a stack buffer cannot be created and use uma_zone_t kenv_zone for suitably sized buffers. r364443: veloader: insist on verifying .4th .lua etc When files are read from .rc or .4th, verify_file is asked to guess the severity (VE_TRY,VE_WANT,VE_MUST) Reviewed by: imp, stevek, kevans Modified: stable/12/lib/libsecureboot/verify_file.c stable/12/stand/common/install.c stable/12/stand/uboot/lib/net.c stable/12/sys/kern/kern_environment.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libsecureboot/verify_file.c ============================================================================== --- stable/12/lib/libsecureboot/verify_file.c Sat Aug 29 16:04:02 2020 (r364960) +++ stable/12/lib/libsecureboot/verify_file.c Sat Aug 29 16:23:00 2020 (r364961) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017-2018, Juniper Networks, Inc. + * Copyright (c) 2017-2020, Juniper Networks, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "libsecureboot.h" #include @@ -254,6 +255,10 @@ severity_guess(const char *filename) strcmp(cp, ".cookie") == 0 || strcmp(cp, ".hints") == 0) return (VE_TRY); + if (strcmp(cp, ".4th") == 0 || + strcmp(cp, ".lua") == 0 || + strcmp(cp, ".rc") == 0) + return (VE_MUST); } return (VE_WANT); } @@ -532,6 +537,19 @@ verify_pcr_export(void) DEBUG_PRINTF(1, ("%s: setenv(loader.ve.hashed, %s\n", __func__, hinfo)); + if ((hlen = strlen(hinfo)) > KENV_MVALLEN) { + /* + * bump kenv_mvallen + * roundup to multiple of KENV_MVALLEN + */ + char mvallen[16]; + + hlen += KENV_MVALLEN - + (hlen % KENV_MVALLEN); + if (snprintf(mvallen, sizeof(mvallen), + "%d", (int) hlen) < sizeof(mvallen)) + setenv("kenv_mvallen", mvallen, 1); + } free(hinfo); } } Modified: stable/12/stand/common/install.c ============================================================================== --- stable/12/stand/common/install.c Sat Aug 29 16:04:02 2020 (r364960) +++ stable/12/stand/common/install.c Sat Aug 29 16:23:00 2020 (r364961) @@ -184,7 +184,8 @@ cleanup(void) /* * usage: install URL - * where: URL = (tftp|file)://[host]/ + * where: URL = tftp://[host]/ + * or file://[devname[:fstype]]/ */ static int install(char *pkgname) @@ -192,8 +193,9 @@ install(char *pkgname) static char buf[256]; struct fs_ops *proto; struct preloaded_file *fp; - char *s, *currdev; - const char *devname; + char *e, *s, *currdev; + char *devname; + size_t devnamelen; int error, fd, i, local; s = strstr(pkgname, "://"); @@ -201,34 +203,74 @@ install(char *pkgname) goto invalid_url; i = s - pkgname; + s += 3; + if (*s == '\0') + goto invalid_url; + + devname = NULL; + devnamelen = 0; + proto = NULL; + local = 0; + if (i == 4 && !strncasecmp(pkgname, "tftp", i)) { devname = "net0"; + devnamelen = 4; proto = &tftp_fsops; - local = 0; } else if (i == 4 && !strncasecmp(pkgname, "file", i)) { currdev = getenv("currdev"); - if (currdev != NULL && strcmp(currdev, "pxe0:") == 0) { - devname = "pxe0"; - proto = NULL; + local = 1; + + if (*s == '/') { /* file:/// */ + if (devname == NULL) + devname = currdev; + if (devname == NULL) + devname = "disk1"; + } else { /* file://devname[:fstype]/ */ + devname = s; + e = strchr(devname, '/'); + if (!e) + goto invalid_url; + devnamelen = e - devname; + s = e; /* consume devname */ + } + if ((e = strchr(devname, ':')) != NULL) { + /* could be :fstype */ + devnamelen = e - devname; + switch (e[1]) { + case '\0': /* just currdev */ + break; + case 'd': + proto = &dosfs_fsops; + break; #ifdef HOSTPROG - } else if (currdev != NULL && strcmp(currdev, "host0:") == 0) { - extern struct fs_ops host_fsops; + case 'h': + { + extern struct fs_ops host_fsops; - devname = "host0"; - proto = &host_fsops; + proto = &host_fsops; + } + break; #endif - } else { - devname = "disk1"; + case 'u': + proto = &ufs_fsops; + break; + } + } + if (proto == NULL && strncmp(devname, "disk", 4) == 0) { proto = &dosfs_fsops; } - local = 1; - } else - goto invalid_url; + } - s += 3; - if (*s == '\0') + if (devname == NULL) goto invalid_url; + if (devnamelen == 0) { + /* default is currdev which ends with ':' */ + devnamelen = strlen(devname); + if (devname[devnamelen - 1] == ':') + devnamelen--; + } + if (*s != '/' ) { if (local) goto invalid_url; @@ -252,11 +294,12 @@ install(char *pkgname) } else pkgname = s; - if (strlen(devname) + strlen(pkgname) + 2 > sizeof(buf)) { + i = snprintf(buf, sizeof(buf), "%.*s:%s", + (int) devnamelen, devname, pkgname); + if (i >= (int) sizeof(buf)) { command_errmsg = "package name too long"; return (CMD_ERROR); } - sprintf(buf, "%s:%s", devname, pkgname); setenv("install_package", buf, 1); error = pkgfs_init(buf, proto); Modified: stable/12/stand/uboot/lib/net.c ============================================================================== --- stable/12/stand/uboot/lib/net.c Sat Aug 29 16:04:02 2020 (r364960) +++ stable/12/stand/uboot/lib/net.c Sat Aug 29 16:23:00 2020 (r364961) @@ -187,7 +187,7 @@ get_env_net_params() rootip.s_addr = 0; return; } - if ((gateip.s_addr = inet_addr(envstr) == INADDR_NONE)) { + if ((gateip.s_addr = inet_addr(envstr)) == INADDR_NONE) { printf("Could not parse gatewayip '%s'\n", envstr); rootip.s_addr = 0; return; Modified: stable/12/sys/kern/kern_environment.c ============================================================================== --- stable/12/sys/kern/kern_environment.c Sat Aug 29 16:04:02 2020 (r364960) +++ stable/12/sys/kern/kern_environment.c Sat Aug 29 16:23:00 2020 (r364961) @@ -63,6 +63,9 @@ static MALLOC_DEFINE(M_KENV, "kenv", "kernel environme #define KENV_SIZE 512 /* Maximum number of environment strings */ +static uma_zone_t kenv_zone; +static int kenv_mvallen = KENV_MVALLEN; + /* pointer to the config-generated static environment */ char *kern_envp; @@ -85,6 +88,8 @@ bool dynamic_kenv; #define KENV_CHECK if (!dynamic_kenv) \ panic("%s: called before SI_SUB_KMEM", __func__) +static char *getenv_string_buffer(const char *); + int sys_kenv(td, uap) struct thread *td; @@ -110,9 +115,9 @@ sys_kenv(td, uap) #endif done = needed = 0; buflen = uap->len; - if (buflen > KENV_SIZE * (KENV_MNAMELEN + KENV_MVALLEN + 2)) + if (buflen > KENV_SIZE * (KENV_MNAMELEN + kenv_mvallen + 2)) buflen = KENV_SIZE * (KENV_MNAMELEN + - KENV_MVALLEN + 2); + kenv_mvallen + 2); if (uap->len > 0 && uap->value != NULL) buffer = malloc(buflen, M_TEMP, M_WAITOK|M_ZERO); mtx_lock(&kenv_lock); @@ -185,8 +190,8 @@ sys_kenv(td, uap) error = EINVAL; goto done; } - if (len > KENV_MVALLEN + 1) - len = KENV_MVALLEN + 1; + if (len > kenv_mvallen + 1) + len = kenv_mvallen + 1; value = malloc(len, M_TEMP, M_WAITOK); error = copyinstr(uap->value, value, len, NULL); if (error) { @@ -327,7 +332,7 @@ init_dynamic_kenv_from(char *init_env, int *curpos) for (cp = init_env; cp != NULL; cp = cpnext) { cpnext = kernenv_next(cp); len = strlen(cp) + 1; - if (len > KENV_MNAMELEN + 1 + KENV_MVALLEN + 1) { + if (len > KENV_MNAMELEN + 1 + kenv_mvallen + 1) { printf( "WARNING: too long kenv string, ignoring %s\n", cp); @@ -375,7 +380,14 @@ static void init_dynamic_kenv(void *data __unused) { int dynamic_envpos; + int size; + TUNABLE_INT_FETCH("kenv_mvallen", &kenv_mvallen); + size = KENV_MNAMELEN + 1 + kenv_mvallen + 1; + + kenv_zone = uma_zcreate("kenv", size, NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, 0); + kenvp = malloc((KENV_SIZE + 1) * sizeof(char *), M_KENV, M_WAITOK | M_ZERO); @@ -395,7 +407,7 @@ freeenv(char *env) if (dynamic_kenv && env != NULL) { explicit_bzero(env, strlen(env)); - free(env, M_KENV); + uma_zfree(kenv_zone, env); } } @@ -470,14 +482,11 @@ _getenv_static(const char *name) char * kern_getenv(const char *name) { - char buf[KENV_MNAMELEN + 1 + KENV_MVALLEN + 1]; char *ret; if (dynamic_kenv) { - if (getenv_string(name, buf, sizeof(buf))) { - ret = strdup(buf, M_KENV); - } else { - ret = NULL; + ret = getenv_string_buffer(name); + if (ret == NULL) { WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "getenv"); } @@ -548,7 +557,7 @@ kern_setenv(const char *name, const char *value) if (namelen > KENV_MNAMELEN + 1) return (-1); vallen = strlen(value) + 1; - if (vallen > KENV_MVALLEN + 1) + if (vallen > kenv_mvallen + 1) return (-1); buf = malloc(namelen + vallen, M_KENV, M_WAITOK); sprintf(buf, "%s=%s", name, value); @@ -607,6 +616,33 @@ kern_unsetenv(const char *name) } /* + * Return a buffer containing the string value from an environment variable + */ +static char * +getenv_string_buffer(const char *name) +{ + char *cp, *ret; + int len; + + if (dynamic_kenv) { + len = KENV_MNAMELEN + 1 + kenv_mvallen + 1; + ret = uma_zalloc(kenv_zone, M_WAITOK | M_ZERO); + mtx_lock(&kenv_lock); + cp = _getenv_dynamic(name, NULL); + if (cp != NULL) + strlcpy(ret, cp, len); + mtx_unlock(&kenv_lock); + if (cp == NULL) { + uma_zfree(kenv_zone, ret); + ret = NULL; + } + } else + ret = _getenv_static(name); + + return (ret); +} + +/* * Return a string value from an environment variable. */ int @@ -635,17 +671,19 @@ int getenv_array(const char *name, void *pdata, int size, int *psize, int type_size, bool allow_signed) { - char buf[KENV_MNAMELEN + 1 + KENV_MVALLEN + 1]; uint8_t shift; int64_t value; int64_t old; + char *buf; char *end; char *ptr; int n; + int rc; - if (getenv_string(name, buf, sizeof(buf)) == 0) + if ((buf = getenv_string_buffer(name)) == NULL) return (0); + rc = 0; /* assume failure */ /* get maximum number of elements */ size /= type_size; @@ -758,9 +796,11 @@ getenv_array(const char *name, void *pdata, int size, *psize = n * type_size; if (n != 0) - return (1); /* success */ + rc = 1; /* success */ error: - return (0); /* failure */ + if (dynamic_kenv) + uma_zfree(kenv_zone, buf); + return (rc); } /* @@ -859,15 +899,17 @@ getenv_ulong(const char *name, unsigned long *data) int getenv_quad(const char *name, quad_t *data) { - char value[KENV_MNAMELEN + 1 + KENV_MVALLEN + 1]; - char *vtp; + char *value, *vtp; quad_t iv; - if (!getenv_string(name, value, sizeof(value))) + value = getenv_string_buffer(name); + if (value == NULL) return (0); iv = strtoq(value, &vtp, 0); - if (vtp == value || (vtp[0] != '\0' && vtp[1] != '\0')) + if (vtp == value || (vtp[0] != '\0' && vtp[1] != '\0')) { + freeenv(value); return (0); + } switch (vtp[0]) { case 't': case 'T': iv *= 1024; @@ -883,8 +925,10 @@ getenv_quad(const char *name, quad_t *data) case '\0': break; default: + freeenv(value); return (0); } + freeenv(value); *data = iv; return (1); } From owner-svn-src-all@freebsd.org Sat Aug 29 16:27:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3955D3B5E8E; Sat, 29 Aug 2020 16:27:22 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf21Q0WBFz3VGP; Sat, 29 Aug 2020 16:27:22 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5193837E; Sat, 29 Aug 2020 16:27:21 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07TGRLE8054350; Sat, 29 Aug 2020 16:27:21 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TGRLSv054349; Sat, 29 Aug 2020 16:27:21 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <202008291627.07TGRLSv054349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sat, 29 Aug 2020 16:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364962 - stable/12/sys/security/mac_veriexec X-SVN-Group: stable-12 X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: stable/12/sys/security/mac_veriexec X-SVN-Commit-Revision: 364962 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 16:27:22 -0000 Author: sjg Date: Sat Aug 29 16:27:21 2020 New Revision: 364962 URL: https://svnweb.freebsd.org/changeset/base/364962 Log: mac_veriexec_fingerprint_check_vnode: v_writecount > 0 means active writers v_writecount can actually be < 0 for text, so check for v_writecount > 0 MFC of r362125 Reviewed by: stevek Modified: stable/12/sys/security/mac_veriexec/veriexec_fingerprint.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/security/mac_veriexec/veriexec_fingerprint.c ============================================================================== --- stable/12/sys/security/mac_veriexec/veriexec_fingerprint.c Sat Aug 29 16:23:00 2020 (r364961) +++ stable/12/sys/security/mac_veriexec/veriexec_fingerprint.c Sat Aug 29 16:27:21 2020 (r364962) @@ -214,7 +214,7 @@ mac_veriexec_fingerprint_check_vnode(struct vnode *vp, int error; /* reject fingerprint if writers are active */ - if (vp->v_writecount) + if (vp->v_writecount > 0) return (ETXTBSY); if ((vp->v_mount->mnt_flag & MNT_VERIFIED) != 0) { From owner-svn-src-all@freebsd.org Sat Aug 29 17:04:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E6D93B665C for ; Sat, 29 Aug 2020 17:04:58 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf2rp0QGSz3WxY for ; Sat, 29 Aug 2020 17:04:57 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1598720696; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=Js5teUxyltSINvRkR8Q3tZPiNRCF2UegrYWtGvyl49q7aWYu+MmI4cw+IxkTk1II8WKpv1KHiG/eP qQKTp18D7SVOPM9tjwttvs6NOQp6YRBzjviOak6ZpdQeKe7dQXoJBkkFOXPB37G7wT2R5Uu1l7mDSv vCtkuHzJg1kOYQ8o8D3JP5WWAoR+pbhc+SsX4O8Mhw9ztqM+pOxDLNnTDsgHOn4W13cfnYWfV7JXc1 4F+5jhFHHJgjRj8taTX9m/1cnLHgTOnagEZHZp7SMnGppLlDQMm7BawX43tasghFJFLO7yypX4b8ZA /2TqAmA+zksDCywv+o1yNOzN059pxbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=VYq6hPTT70YeMAZ3R9B0riPxM+Udz7KFGVS536dwSCA=; b=HIVGrY48XQa7T5C+6k8FiWhJ6EerzzmtJttWKZW1Bg+4KSfOkSqmDKGJ391GF3eauh6bU1P0pWzng oTYq9dAH2Jbje8GC6qUlgNmDyUa6YBr7Hm5zy30gpIM59Rng3vAVGPcWSxIozoX1ANIYRnPUsKLYeX 43Ngleu6zNvNwSUNlLL4hxWMlD6XnUA9P6u69GdSdhpk+IQ51bxrYR/2ASYjwFRzv07Ax4iB6QObgB IDj9NOA42/eTv99jQ9jgGeqSORt+Kf+our7i9Wyq2zFiMH9n1M+hYsB5BxQdEE6tCZHXR4sjosqGCK u07Aozzx/WG8auCoUgwMqlOkBLYqEDg== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=VYq6hPTT70YeMAZ3R9B0riPxM+Udz7KFGVS536dwSCA=; b=UtxOSV7uAupSk+4qwu1zVj8yAhS+k2WNnGiA/VwEQ6p96jG45ThYPxMzlukrF/3xfyh9pwruLzxYX ifxpdXj/NKGfljgIgODmQ6JB3XIc+Fh+I7/qQwtul2s1g0uQcwY++hlBvcQ+jlhuVulTxJcYUDHoOE 8w2UqQMba+0YDV0kNIIr5cAbBslVW3YWTx5c+3V0GU6e+CwdMXmYBHezW1Hp0r4gthU7yEGSVmVhwl 4S3diOe9RiP1B4GKvordD1GKN51GVGB+EtYGw+26BeC+PvlF4hFQN9FUOIqJXKpkb0RlQ0za8X5aYs ZBhk9dY/9DZkCsjbASxkXhErK3jS46Q== X-MHO-RoutePath: aGlwcGll X-MHO-User: c1d63bad-ea19-11ea-b630-6b8aa7872eb8 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 (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id c1d63bad-ea19-11ea-b630-6b8aa7872eb8; Sat, 29 Aug 2020 17:04:55 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 07TH4rOH030633; Sat, 29 Aug 2020 11:04:53 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <0799731356a4ccffedf3ac10048611bec72f7eba.camel@freebsd.org> Subject: Re: svn commit: r364946 - head/sys/kern From: Ian Lepore To: Warner Losh , meloun.michal@gmail.com Cc: Mateusz Guzik , Warner Losh , src-committers , svn-src-all , svn-src-head Date: Sat, 29 Aug 2020 11:04:53 -0600 In-Reply-To: References: <202008290430.07T4UCM4007928@repo.freebsd.org> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Bf2rp0QGSz3WxY X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; TAGGED_RCPT(0.00)[]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 17:04:58 -0000 On Sat, 2020-08-29 at 05:02 -0600, Warner Losh wrote: > > > > sbuf_cpy() at _gone_in_dev+0x560 > > pc = 0xffff0000003c1ff0 lr = 0xffff0000003a9078 > > sp = 0xffff00006f21a510 fp = 0xffff00006f21a570 > > > > _gone_in_dev() at sbuf_new_for_sysctl+0x170 > > pc = 0xffff0000003a9078 lr = 0xffff00000037c1a8 > > sp = 0xffff00006f21a580 fp = 0xffff00006f21a5a0 > > > > sbuf_new_for_sysctl() at kernel_sysctl+0x36c > > pc = 0xffff00000037c1a8 lr = 0xffff00000037b63c > > sp = 0xffff00006f21a5b0 fp = 0xffff00006f21a630 > > > > This traceback is all kinds of crazy. sbuf_new_for_sysctl doesn't call > _gone_in_dev(), which doesn't do sbuf stuff at all. And neither does it > call sbuf_cpy(). Though I get a crash that looks like: > Tracing pid 66442 tid 101464 td 0xfffffe02f47b7c00 > kdb_enter() at kdb_enter+0x37/frame 0xfffffe02f4ae3740 > vpanic() at vpanic+0x19e/frame 0xfffffe02f4ae3790 > panic() at panic+0x43/frame 0xfffffe02f4ae37f0 > sbuf_clear() at sbuf_clear+0xac/frame 0xfffffe02f4ae3800 > sbuf_cpy() at sbuf_cpy+0x5a/frame 0xfffffe02f4ae3820 > device_sysctl_handler() at device_sysctl_handler+0x133/frame > 0xfffffe02f4ae38a0 > sysctl_root_handler_locked() at sysctl_root_handler_locked+0x9c/frame > 0xfffffe02f4ae38f0 > sysctl_root() at sysctl_root+0x20a/frame 0xfffffe02f4ae3970 > userland_sysctl() at userland_sysctl+0x17d/frame 0xfffffe02f4ae3a20 > sys___sysctl() at sys___sysctl+0x5f/frame 0xfffffe02f4ae3ad0 > amd64_syscall() at amd64_syscall+0x140/frame 0xfffffe02f4ae3bf0 > fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe02f4ae3bf0 > --- syscall (202, FreeBSD ELF64, sys___sysctl), rip = 0x80042d50a, rsp = > 0x7fffffffd458, rbp = 0x7fffffffd490 --- > > on a sysctl -a which I think makes more sense... I'll see if I can track > it down... I think it's because sbuf_cpy does an unconditional clear, which > triggers this assert, which is likely bogus for this case. sbuf_cat doesn't > seem to have this issue... I'll confirm and commit. > > Warner This kind of crazy happens when the traceback just reports the name of the nearest global symbol it can find because static or other local symbols aren't available to it. The clue that that's what's going on tends to be in things like: sbuf_cpy() at _gone_in_dev+0x560 It's almost certain that _gone_in_dev() isn't a big enough function that an offset of 0x560 is still in that function, so it's really in some static function that got linked nearby but the symbols for statics got stripped. Usually you can use addr2line on kernel.full to get the real names for the pc and lr values. -- Ian From owner-svn-src-all@freebsd.org Sat Aug 29 18:11:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A74C63B7D4D; Sat, 29 Aug 2020 18:11:42 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf4Kp41yfz3bZj; Sat, 29 Aug 2020 18:11:42 +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 6D49C9C31; Sat, 29 Aug 2020 18:11:42 +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 07TIBgMj021060; Sat, 29 Aug 2020 18:11:42 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TIBbu3021036; Sat, 29 Aug 2020 18:11:37 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202008291811.07TIBbu3021036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 29 Aug 2020 18:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364963 - in stable/12: crypto/openssl/crypto/aes/asm crypto/openssl/crypto/bn/asm crypto/openssl/crypto/chacha/asm crypto/openssl/crypto/ec/asm crypto/openssl/crypto/modes/asm crypto/o... X-SVN-Group: stable-12 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in stable/12: crypto/openssl/crypto/aes/asm crypto/openssl/crypto/bn/asm crypto/openssl/crypto/chacha/asm crypto/openssl/crypto/ec/asm crypto/openssl/crypto/modes/asm crypto/openssl/crypto/poly1305/as... X-SVN-Commit-Revision: 364963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 18:11:42 -0000 Author: jkim Date: Sat Aug 29 18:11:37 2020 New Revision: 364963 URL: https://svnweb.freebsd.org/changeset/base/364963 Log: MFC: r364822, r364823 Fix Clang version detection and regen X86 assembly files. Modified: stable/12/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl stable/12/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl stable/12/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl stable/12/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl stable/12/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl stable/12/crypto/openssl/crypto/bn/asm/x86_64-mont.pl stable/12/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl stable/12/crypto/openssl/crypto/chacha/asm/chacha-x86.pl stable/12/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl stable/12/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl stable/12/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl stable/12/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-586.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl stable/12/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl stable/12/crypto/openssl/crypto/sha/asm/sha256-586.pl stable/12/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl stable/12/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl stable/12/secure/lib/libcrypto/amd64/aesni-gcm-x86_64.S stable/12/secure/lib/libcrypto/amd64/aesni-mb-x86_64.S stable/12/secure/lib/libcrypto/amd64/aesni-sha1-x86_64.S stable/12/secure/lib/libcrypto/amd64/aesni-sha256-x86_64.S stable/12/secure/lib/libcrypto/amd64/chacha-x86_64.S stable/12/secure/lib/libcrypto/amd64/ecp_nistz256-x86_64.S stable/12/secure/lib/libcrypto/amd64/ghash-x86_64.S stable/12/secure/lib/libcrypto/amd64/poly1305-x86_64.S stable/12/secure/lib/libcrypto/amd64/rsaz-avx2.S stable/12/secure/lib/libcrypto/amd64/rsaz-x86_64.S stable/12/secure/lib/libcrypto/amd64/sha1-mb-x86_64.S stable/12/secure/lib/libcrypto/amd64/sha1-x86_64.S stable/12/secure/lib/libcrypto/amd64/sha256-mb-x86_64.S stable/12/secure/lib/libcrypto/amd64/sha256-x86_64.S stable/12/secure/lib/libcrypto/amd64/sha512-x86_64.S stable/12/secure/lib/libcrypto/amd64/x25519-x86_64.S stable/12/secure/lib/libcrypto/amd64/x86_64-mont.S stable/12/secure/lib/libcrypto/amd64/x86_64-mont5.S stable/12/secure/lib/libcrypto/i386/chacha-x86.S stable/12/secure/lib/libcrypto/i386/poly1305-x86.S stable/12/secure/lib/libcrypto/i386/sha1-586.S stable/12/secure/lib/libcrypto/i386/sha256-586.S Directory Properties: stable/12/ (props changed) Modified: stable/12/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl ============================================================================== --- stable/12/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -70,7 +70,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: stable/12/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl ============================================================================== --- stable/12/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -108,7 +108,7 @@ $avx=1 if (!$avx && $win64 && ($flavour =~ /nasm/ || $ $avx=1 if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) && `ml64 2>&1` =~ /Version ([0-9]+)\./ && $1>=10); -$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0); +$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0); $shaext=1; ### set to zero if compiling for 1.0.1 Modified: stable/12/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl ============================================================================== --- stable/12/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -70,7 +70,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=12); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: stable/12/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl ============================================================================== --- stable/12/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/bn/asm/rsaz-avx2.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -66,7 +66,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $addx = ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([0-9]+)\.([0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) ([0-9]+)\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $avx = ($ver>=3.0) + ($ver>=3.01); $addx = ($ver>=3.03); Modified: stable/12/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl ============================================================================== --- stable/12/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -81,7 +81,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $addx = ($ver>=3.03); } Modified: stable/12/crypto/openssl/crypto/bn/asm/x86_64-mont.pl ============================================================================== --- stable/12/crypto/openssl/crypto/bn/asm/x86_64-mont.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/bn/asm/x86_64-mont.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -75,7 +75,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $addx = ($ver>=3.03); } Modified: stable/12/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl ============================================================================== --- stable/12/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -60,7 +60,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $addx = ($ver>=3.03); } Modified: stable/12/crypto/openssl/crypto/chacha/asm/chacha-x86.pl ============================================================================== --- stable/12/crypto/openssl/crypto/chacha/asm/chacha-x86.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/chacha/asm/chacha-x86.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -62,7 +62,7 @@ $ymm=1 if ($xmm && !$ymm && $ARGV[0] eq "win32" && $1>=10); # first version supporting AVX $ymm=1 if ($xmm && !$ymm && - `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/ && + `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0); # first version supporting AVX $a="eax"; Modified: stable/12/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl ============================================================================== --- stable/12/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/chacha/asm/chacha-x86_64.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -85,7 +85,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl ============================================================================== --- stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-avx2.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -47,7 +47,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([0-9]+)\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) ([0-9]+)\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $avx = ($ver>=3.0) + ($ver>=3.01); $addx = ($ver>=3.03); Modified: stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl ============================================================================== --- stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -72,7 +72,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $avx = ($ver>=3.0) + ($ver>=3.01); $addx = ($ver>=3.03); Modified: stable/12/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl ============================================================================== --- stable/12/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/ec/asm/x25519-x86_64.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -90,7 +90,7 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{AS $addx = ($1>=12); } -if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { +if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+)\.([0-9]+)/) { my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 $addx = ($ver>=3.03); } Modified: stable/12/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl ============================================================================== --- stable/12/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -66,7 +66,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: stable/12/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl ============================================================================== --- stable/12/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -116,7 +116,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl ============================================================================== --- stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-x86.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -71,7 +71,7 @@ if ($sse2) { $avx = ($1>=2.09) + ($1>=2.10); } - if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/) { + if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } } Modified: stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl ============================================================================== --- stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/poly1305/asm/poly1305-x86_64.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -90,7 +90,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=12); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: stable/12/crypto/openssl/crypto/sha/asm/sha1-586.pl ============================================================================== --- stable/12/crypto/openssl/crypto/sha/asm/sha1-586.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/sha/asm/sha1-586.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -144,7 +144,7 @@ $ymm=1 if ($xmm && !$ymm && $ARGV[0] eq "win32" && `ml 2>&1` =~ /Version ([0-9]+)\./ && $1>=10); # first version supporting AVX -$ymm=1 if ($xmm && !$ymm && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/ && +$ymm=1 if ($xmm && !$ymm && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0); # first version supporting AVX $shaext=$xmm; ### set to zero if compiling for 1.0.1 Modified: stable/12/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl ============================================================================== --- stable/12/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -66,7 +66,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: stable/12/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl ============================================================================== --- stable/12/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -119,7 +119,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: stable/12/crypto/openssl/crypto/sha/asm/sha256-586.pl ============================================================================== --- stable/12/crypto/openssl/crypto/sha/asm/sha256-586.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/sha/asm/sha256-586.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -96,7 +96,7 @@ if ($xmm && !$avx && $ARGV[0] eq "win32" && $avx = ($1>=10) + ($1>=11); } -if ($xmm && !$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/) { +if ($xmm && !$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: stable/12/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl ============================================================================== --- stable/12/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -67,7 +67,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: stable/12/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl ============================================================================== --- stable/12/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl Sat Aug 29 18:11:37 2020 (r364963) @@ -135,7 +135,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM $avx = ($1>=10) + ($1>=11); } -if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { +if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) { $avx = ($2>=3.0) + ($2>3.0); } Modified: stable/12/secure/lib/libcrypto/amd64/aesni-gcm-x86_64.S ============================================================================== --- stable/12/secure/lib/libcrypto/amd64/aesni-gcm-x86_64.S Sat Aug 29 16:27:21 2020 (r364962) +++ stable/12/secure/lib/libcrypto/amd64/aesni-gcm-x86_64.S Sat Aug 29 18:11:37 2020 (r364963) @@ -2,20 +2,790 @@ /* Do not modify. This file is auto-generated from aesni-gcm-x86_64.pl. */ .text -.globl aesni_gcm_encrypt -.type aesni_gcm_encrypt,@function -aesni_gcm_encrypt: +.type _aesni_ctr32_ghash_6x,@function +.align 32 +_aesni_ctr32_ghash_6x: .cfi_startproc - xorl %eax,%eax + vmovdqu 32(%r11),%xmm2 + subq $6,%rdx + vpxor %xmm4,%xmm4,%xmm4 + vmovdqu 0-128(%rcx),%xmm15 + vpaddb %xmm2,%xmm1,%xmm10 + vpaddb %xmm2,%xmm10,%xmm11 + vpaddb %xmm2,%xmm11,%xmm12 + vpaddb %xmm2,%xmm12,%xmm13 + vpaddb %xmm2,%xmm13,%xmm14 + vpxor %xmm15,%xmm1,%xmm9 + vmovdqu %xmm4,16+8(%rsp) + jmp .Loop6x + +.align 32 +.Loop6x: + addl $100663296,%ebx + jc .Lhandle_ctr32 + vmovdqu 0-32(%r9),%xmm3 + vpaddb %xmm2,%xmm14,%xmm1 + vpxor %xmm15,%xmm10,%xmm10 + vpxor %xmm15,%xmm11,%xmm11 + +.Lresume_ctr32: + vmovdqu %xmm1,(%r8) + vpclmulqdq $0x10,%xmm3,%xmm7,%xmm5 + vpxor %xmm15,%xmm12,%xmm12 + vmovups 16-128(%rcx),%xmm2 + vpclmulqdq $0x01,%xmm3,%xmm7,%xmm6 + xorq %r12,%r12 + cmpq %r14,%r15 + + vaesenc %xmm2,%xmm9,%xmm9 + vmovdqu 48+8(%rsp),%xmm0 + vpxor %xmm15,%xmm13,%xmm13 + vpclmulqdq $0x00,%xmm3,%xmm7,%xmm1 + vaesenc %xmm2,%xmm10,%xmm10 + vpxor %xmm15,%xmm14,%xmm14 + setnc %r12b + vpclmulqdq $0x11,%xmm3,%xmm7,%xmm7 + vaesenc %xmm2,%xmm11,%xmm11 + vmovdqu 16-32(%r9),%xmm3 + negq %r12 + vaesenc %xmm2,%xmm12,%xmm12 + vpxor %xmm5,%xmm6,%xmm6 + vpclmulqdq $0x00,%xmm3,%xmm0,%xmm5 + vpxor %xmm4,%xmm8,%xmm8 + vaesenc %xmm2,%xmm13,%xmm13 + vpxor %xmm5,%xmm1,%xmm4 + andq $0x60,%r12 + vmovups 32-128(%rcx),%xmm15 + vpclmulqdq $0x10,%xmm3,%xmm0,%xmm1 + vaesenc %xmm2,%xmm14,%xmm14 + + vpclmulqdq $0x01,%xmm3,%xmm0,%xmm2 + leaq (%r14,%r12,1),%r14 + vaesenc %xmm15,%xmm9,%xmm9 + vpxor 16+8(%rsp),%xmm8,%xmm8 + vpclmulqdq $0x11,%xmm3,%xmm0,%xmm3 + vmovdqu 64+8(%rsp),%xmm0 + vaesenc %xmm15,%xmm10,%xmm10 + movbeq 88(%r14),%r13 + vaesenc %xmm15,%xmm11,%xmm11 + movbeq 80(%r14),%r12 + vaesenc %xmm15,%xmm12,%xmm12 + movq %r13,32+8(%rsp) + vaesenc %xmm15,%xmm13,%xmm13 + movq %r12,40+8(%rsp) + vmovdqu 48-32(%r9),%xmm5 + vaesenc %xmm15,%xmm14,%xmm14 + + vmovups 48-128(%rcx),%xmm15 + vpxor %xmm1,%xmm6,%xmm6 + vpclmulqdq $0x00,%xmm5,%xmm0,%xmm1 + vaesenc %xmm15,%xmm9,%xmm9 + vpxor %xmm2,%xmm6,%xmm6 + vpclmulqdq $0x10,%xmm5,%xmm0,%xmm2 + vaesenc %xmm15,%xmm10,%xmm10 + vpxor %xmm3,%xmm7,%xmm7 + vpclmulqdq $0x01,%xmm5,%xmm0,%xmm3 + vaesenc %xmm15,%xmm11,%xmm11 + vpclmulqdq $0x11,%xmm5,%xmm0,%xmm5 + vmovdqu 80+8(%rsp),%xmm0 + vaesenc %xmm15,%xmm12,%xmm12 + vaesenc %xmm15,%xmm13,%xmm13 + vpxor %xmm1,%xmm4,%xmm4 + vmovdqu 64-32(%r9),%xmm1 + vaesenc %xmm15,%xmm14,%xmm14 + + vmovups 64-128(%rcx),%xmm15 + vpxor %xmm2,%xmm6,%xmm6 + vpclmulqdq $0x00,%xmm1,%xmm0,%xmm2 + vaesenc %xmm15,%xmm9,%xmm9 + vpxor %xmm3,%xmm6,%xmm6 + vpclmulqdq $0x10,%xmm1,%xmm0,%xmm3 + vaesenc %xmm15,%xmm10,%xmm10 + movbeq 72(%r14),%r13 + vpxor %xmm5,%xmm7,%xmm7 + vpclmulqdq $0x01,%xmm1,%xmm0,%xmm5 + vaesenc %xmm15,%xmm11,%xmm11 + movbeq 64(%r14),%r12 + vpclmulqdq $0x11,%xmm1,%xmm0,%xmm1 + vmovdqu 96+8(%rsp),%xmm0 + vaesenc %xmm15,%xmm12,%xmm12 + movq %r13,48+8(%rsp) + vaesenc %xmm15,%xmm13,%xmm13 + movq %r12,56+8(%rsp) + vpxor %xmm2,%xmm4,%xmm4 + vmovdqu 96-32(%r9),%xmm2 + vaesenc %xmm15,%xmm14,%xmm14 + + vmovups 80-128(%rcx),%xmm15 + vpxor %xmm3,%xmm6,%xmm6 + vpclmulqdq $0x00,%xmm2,%xmm0,%xmm3 + vaesenc %xmm15,%xmm9,%xmm9 + vpxor %xmm5,%xmm6,%xmm6 + vpclmulqdq $0x10,%xmm2,%xmm0,%xmm5 + vaesenc %xmm15,%xmm10,%xmm10 + movbeq 56(%r14),%r13 + vpxor %xmm1,%xmm7,%xmm7 + vpclmulqdq $0x01,%xmm2,%xmm0,%xmm1 + vpxor 112+8(%rsp),%xmm8,%xmm8 + vaesenc %xmm15,%xmm11,%xmm11 + movbeq 48(%r14),%r12 + vpclmulqdq $0x11,%xmm2,%xmm0,%xmm2 + vaesenc %xmm15,%xmm12,%xmm12 + movq %r13,64+8(%rsp) + vaesenc %xmm15,%xmm13,%xmm13 + movq %r12,72+8(%rsp) + vpxor %xmm3,%xmm4,%xmm4 + vmovdqu 112-32(%r9),%xmm3 + vaesenc %xmm15,%xmm14,%xmm14 + + vmovups 96-128(%rcx),%xmm15 + vpxor %xmm5,%xmm6,%xmm6 + vpclmulqdq $0x10,%xmm3,%xmm8,%xmm5 + vaesenc %xmm15,%xmm9,%xmm9 + vpxor %xmm1,%xmm6,%xmm6 + vpclmulqdq $0x01,%xmm3,%xmm8,%xmm1 + vaesenc %xmm15,%xmm10,%xmm10 + movbeq 40(%r14),%r13 + vpxor %xmm2,%xmm7,%xmm7 + vpclmulqdq $0x00,%xmm3,%xmm8,%xmm2 + vaesenc %xmm15,%xmm11,%xmm11 + movbeq 32(%r14),%r12 + vpclmulqdq $0x11,%xmm3,%xmm8,%xmm8 + vaesenc %xmm15,%xmm12,%xmm12 + movq %r13,80+8(%rsp) + vaesenc %xmm15,%xmm13,%xmm13 + movq %r12,88+8(%rsp) + vpxor %xmm5,%xmm6,%xmm6 + vaesenc %xmm15,%xmm14,%xmm14 + vpxor %xmm1,%xmm6,%xmm6 + + vmovups 112-128(%rcx),%xmm15 + vpslldq $8,%xmm6,%xmm5 + vpxor %xmm2,%xmm4,%xmm4 + vmovdqu 16(%r11),%xmm3 + + vaesenc %xmm15,%xmm9,%xmm9 + vpxor %xmm8,%xmm7,%xmm7 + vaesenc %xmm15,%xmm10,%xmm10 + vpxor %xmm5,%xmm4,%xmm4 + movbeq 24(%r14),%r13 + vaesenc %xmm15,%xmm11,%xmm11 + movbeq 16(%r14),%r12 + vpalignr $8,%xmm4,%xmm4,%xmm0 + vpclmulqdq $0x10,%xmm3,%xmm4,%xmm4 + movq %r13,96+8(%rsp) + vaesenc %xmm15,%xmm12,%xmm12 + movq %r12,104+8(%rsp) + vaesenc %xmm15,%xmm13,%xmm13 + vmovups 128-128(%rcx),%xmm1 + vaesenc %xmm15,%xmm14,%xmm14 + + vaesenc %xmm1,%xmm9,%xmm9 + vmovups 144-128(%rcx),%xmm15 + vaesenc %xmm1,%xmm10,%xmm10 + vpsrldq $8,%xmm6,%xmm6 + vaesenc %xmm1,%xmm11,%xmm11 + vpxor %xmm6,%xmm7,%xmm7 + vaesenc %xmm1,%xmm12,%xmm12 + vpxor %xmm0,%xmm4,%xmm4 + movbeq 8(%r14),%r13 + vaesenc %xmm1,%xmm13,%xmm13 + movbeq 0(%r14),%r12 + vaesenc %xmm1,%xmm14,%xmm14 + vmovups 160-128(%rcx),%xmm1 + cmpl $11,%ebp + jb .Lenc_tail + + vaesenc %xmm15,%xmm9,%xmm9 + vaesenc %xmm15,%xmm10,%xmm10 + vaesenc %xmm15,%xmm11,%xmm11 + vaesenc %xmm15,%xmm12,%xmm12 + vaesenc %xmm15,%xmm13,%xmm13 + vaesenc %xmm15,%xmm14,%xmm14 + + vaesenc %xmm1,%xmm9,%xmm9 + vaesenc %xmm1,%xmm10,%xmm10 + vaesenc %xmm1,%xmm11,%xmm11 + vaesenc %xmm1,%xmm12,%xmm12 + vaesenc %xmm1,%xmm13,%xmm13 + vmovups 176-128(%rcx),%xmm15 + vaesenc %xmm1,%xmm14,%xmm14 + vmovups 192-128(%rcx),%xmm1 + je .Lenc_tail + + vaesenc %xmm15,%xmm9,%xmm9 + vaesenc %xmm15,%xmm10,%xmm10 + vaesenc %xmm15,%xmm11,%xmm11 + vaesenc %xmm15,%xmm12,%xmm12 + vaesenc %xmm15,%xmm13,%xmm13 + vaesenc %xmm15,%xmm14,%xmm14 + + vaesenc %xmm1,%xmm9,%xmm9 + vaesenc %xmm1,%xmm10,%xmm10 + vaesenc %xmm1,%xmm11,%xmm11 + vaesenc %xmm1,%xmm12,%xmm12 + vaesenc %xmm1,%xmm13,%xmm13 + vmovups 208-128(%rcx),%xmm15 + vaesenc %xmm1,%xmm14,%xmm14 + vmovups 224-128(%rcx),%xmm1 + jmp .Lenc_tail + +.align 32 +.Lhandle_ctr32: + vmovdqu (%r11),%xmm0 + vpshufb %xmm0,%xmm1,%xmm6 + vmovdqu 48(%r11),%xmm5 + vpaddd 64(%r11),%xmm6,%xmm10 + vpaddd %xmm5,%xmm6,%xmm11 + vmovdqu 0-32(%r9),%xmm3 + vpaddd %xmm5,%xmm10,%xmm12 + vpshufb %xmm0,%xmm10,%xmm10 + vpaddd %xmm5,%xmm11,%xmm13 + vpshufb %xmm0,%xmm11,%xmm11 + vpxor %xmm15,%xmm10,%xmm10 + vpaddd %xmm5,%xmm12,%xmm14 + vpshufb %xmm0,%xmm12,%xmm12 + vpxor %xmm15,%xmm11,%xmm11 + vpaddd %xmm5,%xmm13,%xmm1 + vpshufb %xmm0,%xmm13,%xmm13 + vpshufb %xmm0,%xmm14,%xmm14 + vpshufb %xmm0,%xmm1,%xmm1 + jmp .Lresume_ctr32 + +.align 32 +.Lenc_tail: + vaesenc %xmm15,%xmm9,%xmm9 + vmovdqu %xmm7,16+8(%rsp) + vpalignr $8,%xmm4,%xmm4,%xmm8 + vaesenc %xmm15,%xmm10,%xmm10 + vpclmulqdq $0x10,%xmm3,%xmm4,%xmm4 + vpxor 0(%rdi),%xmm1,%xmm2 + vaesenc %xmm15,%xmm11,%xmm11 + vpxor 16(%rdi),%xmm1,%xmm0 + vaesenc %xmm15,%xmm12,%xmm12 + vpxor 32(%rdi),%xmm1,%xmm5 + vaesenc %xmm15,%xmm13,%xmm13 + vpxor 48(%rdi),%xmm1,%xmm6 + vaesenc %xmm15,%xmm14,%xmm14 + vpxor 64(%rdi),%xmm1,%xmm7 + vpxor 80(%rdi),%xmm1,%xmm3 + vmovdqu (%r8),%xmm1 + + vaesenclast %xmm2,%xmm9,%xmm9 + vmovdqu 32(%r11),%xmm2 + vaesenclast %xmm0,%xmm10,%xmm10 + vpaddb %xmm2,%xmm1,%xmm0 + movq %r13,112+8(%rsp) + leaq 96(%rdi),%rdi + vaesenclast %xmm5,%xmm11,%xmm11 + vpaddb %xmm2,%xmm0,%xmm5 + movq %r12,120+8(%rsp) + leaq 96(%rsi),%rsi + vmovdqu 0-128(%rcx),%xmm15 + vaesenclast %xmm6,%xmm12,%xmm12 + vpaddb %xmm2,%xmm5,%xmm6 + vaesenclast %xmm7,%xmm13,%xmm13 + vpaddb %xmm2,%xmm6,%xmm7 + vaesenclast %xmm3,%xmm14,%xmm14 + vpaddb %xmm2,%xmm7,%xmm3 + + addq $0x60,%r10 + subq $0x6,%rdx + jc .L6x_done + + vmovups %xmm9,-96(%rsi) + vpxor %xmm15,%xmm1,%xmm9 + vmovups %xmm10,-80(%rsi) + vmovdqa %xmm0,%xmm10 + vmovups %xmm11,-64(%rsi) + vmovdqa %xmm5,%xmm11 + vmovups %xmm12,-48(%rsi) + vmovdqa %xmm6,%xmm12 + vmovups %xmm13,-32(%rsi) + vmovdqa %xmm7,%xmm13 + vmovups %xmm14,-16(%rsi) + vmovdqa %xmm3,%xmm14 + vmovdqu 32+8(%rsp),%xmm7 + jmp .Loop6x + +.L6x_done: + vpxor 16+8(%rsp),%xmm8,%xmm8 + vpxor %xmm4,%xmm8,%xmm8 + .byte 0xf3,0xc3 .cfi_endproc -.size aesni_gcm_encrypt,.-aesni_gcm_encrypt - +.size _aesni_ctr32_ghash_6x,.-_aesni_ctr32_ghash_6x .globl aesni_gcm_decrypt .type aesni_gcm_decrypt,@function +.align 32 aesni_gcm_decrypt: .cfi_startproc - xorl %eax,%eax + xorq %r10,%r10 + cmpq $0x60,%rdx + jb .Lgcm_dec_abort + + leaq (%rsp),%rax +.cfi_def_cfa_register %rax + pushq %rbx +.cfi_offset %rbx,-16 + pushq %rbp +.cfi_offset %rbp,-24 + pushq %r12 +.cfi_offset %r12,-32 + pushq %r13 +.cfi_offset %r13,-40 + pushq %r14 +.cfi_offset %r14,-48 + pushq %r15 +.cfi_offset %r15,-56 + vzeroupper + + vmovdqu (%r8),%xmm1 + addq $-128,%rsp + movl 12(%r8),%ebx + leaq .Lbswap_mask(%rip),%r11 + leaq -128(%rcx),%r14 + movq $0xf80,%r15 + vmovdqu (%r9),%xmm8 + andq $-128,%rsp + vmovdqu (%r11),%xmm0 + leaq 128(%rcx),%rcx + leaq 32+32(%r9),%r9 + movl 240-128(%rcx),%ebp + vpshufb %xmm0,%xmm8,%xmm8 + + andq %r15,%r14 + andq %rsp,%r15 + subq %r14,%r15 + jc .Ldec_no_key_aliasing + cmpq $768,%r15 + jnc .Ldec_no_key_aliasing + subq %r15,%rsp +.Ldec_no_key_aliasing: + + vmovdqu 80(%rdi),%xmm7 + leaq (%rdi),%r14 + vmovdqu 64(%rdi),%xmm4 + leaq -192(%rdi,%rdx,1),%r15 + vmovdqu 48(%rdi),%xmm5 + shrq $4,%rdx + xorq %r10,%r10 + vmovdqu 32(%rdi),%xmm6 + vpshufb %xmm0,%xmm7,%xmm7 + vmovdqu 16(%rdi),%xmm2 + vpshufb %xmm0,%xmm4,%xmm4 + vmovdqu (%rdi),%xmm3 + vpshufb %xmm0,%xmm5,%xmm5 + vmovdqu %xmm4,48(%rsp) + vpshufb %xmm0,%xmm6,%xmm6 + vmovdqu %xmm5,64(%rsp) + vpshufb %xmm0,%xmm2,%xmm2 + vmovdqu %xmm6,80(%rsp) + vpshufb %xmm0,%xmm3,%xmm3 + vmovdqu %xmm2,96(%rsp) + vmovdqu %xmm3,112(%rsp) + + call _aesni_ctr32_ghash_6x + + vmovups %xmm9,-96(%rsi) + vmovups %xmm10,-80(%rsi) + vmovups %xmm11,-64(%rsi) + vmovups %xmm12,-48(%rsi) + vmovups %xmm13,-32(%rsi) + vmovups %xmm14,-16(%rsi) + + vpshufb (%r11),%xmm8,%xmm8 + vmovdqu %xmm8,-64(%r9) + + vzeroupper + movq -48(%rax),%r15 +.cfi_restore %r15 + movq -40(%rax),%r14 +.cfi_restore %r14 + movq -32(%rax),%r13 +.cfi_restore %r13 + movq -24(%rax),%r12 +.cfi_restore %r12 + movq -16(%rax),%rbp +.cfi_restore %rbp + movq -8(%rax),%rbx +.cfi_restore %rbx + leaq (%rax),%rsp +.cfi_def_cfa_register %rsp +.Lgcm_dec_abort: + movq %r10,%rax .byte 0xf3,0xc3 .cfi_endproc .size aesni_gcm_decrypt,.-aesni_gcm_decrypt +.type _aesni_ctr32_6x,@function +.align 32 +_aesni_ctr32_6x: +.cfi_startproc + vmovdqu 0-128(%rcx),%xmm4 + vmovdqu 32(%r11),%xmm2 + leaq -1(%rbp),%r13 + vmovups 16-128(%rcx),%xmm15 + leaq 32-128(%rcx),%r12 + vpxor %xmm4,%xmm1,%xmm9 + addl $100663296,%ebx + jc .Lhandle_ctr32_2 + vpaddb %xmm2,%xmm1,%xmm10 + vpaddb %xmm2,%xmm10,%xmm11 + vpxor %xmm4,%xmm10,%xmm10 + vpaddb %xmm2,%xmm11,%xmm12 + vpxor %xmm4,%xmm11,%xmm11 + vpaddb %xmm2,%xmm12,%xmm13 + vpxor %xmm4,%xmm12,%xmm12 + vpaddb %xmm2,%xmm13,%xmm14 + vpxor %xmm4,%xmm13,%xmm13 + vpaddb %xmm2,%xmm14,%xmm1 + vpxor %xmm4,%xmm14,%xmm14 + jmp .Loop_ctr32 + +.align 16 +.Loop_ctr32: + vaesenc %xmm15,%xmm9,%xmm9 + vaesenc %xmm15,%xmm10,%xmm10 + vaesenc %xmm15,%xmm11,%xmm11 + vaesenc %xmm15,%xmm12,%xmm12 + vaesenc %xmm15,%xmm13,%xmm13 + vaesenc %xmm15,%xmm14,%xmm14 + vmovups (%r12),%xmm15 + leaq 16(%r12),%r12 + decl %r13d + jnz .Loop_ctr32 + + vmovdqu (%r12),%xmm3 + vaesenc %xmm15,%xmm9,%xmm9 + vpxor 0(%rdi),%xmm3,%xmm4 + vaesenc %xmm15,%xmm10,%xmm10 + vpxor 16(%rdi),%xmm3,%xmm5 + vaesenc %xmm15,%xmm11,%xmm11 + vpxor 32(%rdi),%xmm3,%xmm6 + vaesenc %xmm15,%xmm12,%xmm12 + vpxor 48(%rdi),%xmm3,%xmm8 + vaesenc %xmm15,%xmm13,%xmm13 + vpxor 64(%rdi),%xmm3,%xmm2 + vaesenc %xmm15,%xmm14,%xmm14 + vpxor 80(%rdi),%xmm3,%xmm3 + leaq 96(%rdi),%rdi + + vaesenclast %xmm4,%xmm9,%xmm9 + vaesenclast %xmm5,%xmm10,%xmm10 + vaesenclast %xmm6,%xmm11,%xmm11 + vaesenclast %xmm8,%xmm12,%xmm12 + vaesenclast %xmm2,%xmm13,%xmm13 + vaesenclast %xmm3,%xmm14,%xmm14 + vmovups %xmm9,0(%rsi) + vmovups %xmm10,16(%rsi) + vmovups %xmm11,32(%rsi) + vmovups %xmm12,48(%rsi) + vmovups %xmm13,64(%rsi) + vmovups %xmm14,80(%rsi) + leaq 96(%rsi),%rsi + + .byte 0xf3,0xc3 +.align 32 +.Lhandle_ctr32_2: + vpshufb %xmm0,%xmm1,%xmm6 + vmovdqu 48(%r11),%xmm5 + vpaddd 64(%r11),%xmm6,%xmm10 + vpaddd %xmm5,%xmm6,%xmm11 + vpaddd %xmm5,%xmm10,%xmm12 + vpshufb %xmm0,%xmm10,%xmm10 + vpaddd %xmm5,%xmm11,%xmm13 + vpshufb %xmm0,%xmm11,%xmm11 + vpxor %xmm4,%xmm10,%xmm10 + vpaddd %xmm5,%xmm12,%xmm14 + vpshufb %xmm0,%xmm12,%xmm12 + vpxor %xmm4,%xmm11,%xmm11 + vpaddd %xmm5,%xmm13,%xmm1 + vpshufb %xmm0,%xmm13,%xmm13 + vpxor %xmm4,%xmm12,%xmm12 + vpshufb %xmm0,%xmm14,%xmm14 + vpxor %xmm4,%xmm13,%xmm13 + vpshufb %xmm0,%xmm1,%xmm1 + vpxor %xmm4,%xmm14,%xmm14 + jmp .Loop_ctr32 +.cfi_endproc +.size _aesni_ctr32_6x,.-_aesni_ctr32_6x + +.globl aesni_gcm_encrypt +.type aesni_gcm_encrypt,@function +.align 32 +aesni_gcm_encrypt: +.cfi_startproc + xorq %r10,%r10 + cmpq $288,%rdx + jb .Lgcm_enc_abort + + leaq (%rsp),%rax +.cfi_def_cfa_register %rax + pushq %rbx +.cfi_offset %rbx,-16 + pushq %rbp +.cfi_offset %rbp,-24 + pushq %r12 +.cfi_offset %r12,-32 + pushq %r13 +.cfi_offset %r13,-40 + pushq %r14 +.cfi_offset %r14,-48 + pushq %r15 +.cfi_offset %r15,-56 + vzeroupper + + vmovdqu (%r8),%xmm1 + addq $-128,%rsp + movl 12(%r8),%ebx + leaq .Lbswap_mask(%rip),%r11 + leaq -128(%rcx),%r14 + movq $0xf80,%r15 + leaq 128(%rcx),%rcx + vmovdqu (%r11),%xmm0 + andq $-128,%rsp + movl 240-128(%rcx),%ebp + + andq %r15,%r14 + andq %rsp,%r15 + subq %r14,%r15 + jc .Lenc_no_key_aliasing + cmpq $768,%r15 + jnc .Lenc_no_key_aliasing + subq %r15,%rsp +.Lenc_no_key_aliasing: + + leaq (%rsi),%r14 + leaq -192(%rsi,%rdx,1),%r15 + shrq $4,%rdx + + call _aesni_ctr32_6x + vpshufb %xmm0,%xmm9,%xmm8 + vpshufb %xmm0,%xmm10,%xmm2 + vmovdqu %xmm8,112(%rsp) + vpshufb %xmm0,%xmm11,%xmm4 + vmovdqu %xmm2,96(%rsp) + vpshufb %xmm0,%xmm12,%xmm5 + vmovdqu %xmm4,80(%rsp) + vpshufb %xmm0,%xmm13,%xmm6 + vmovdqu %xmm5,64(%rsp) + vpshufb %xmm0,%xmm14,%xmm7 + vmovdqu %xmm6,48(%rsp) + + call _aesni_ctr32_6x + + vmovdqu (%r9),%xmm8 + leaq 32+32(%r9),%r9 + subq $12,%rdx + movq $192,%r10 + vpshufb %xmm0,%xmm8,%xmm8 + + call _aesni_ctr32_ghash_6x + vmovdqu 32(%rsp),%xmm7 + vmovdqu (%r11),%xmm0 + vmovdqu 0-32(%r9),%xmm3 + vpunpckhqdq %xmm7,%xmm7,%xmm1 + vmovdqu 32-32(%r9),%xmm15 + vmovups %xmm9,-96(%rsi) + vpshufb %xmm0,%xmm9,%xmm9 + vpxor %xmm7,%xmm1,%xmm1 + vmovups %xmm10,-80(%rsi) + vpshufb %xmm0,%xmm10,%xmm10 + vmovups %xmm11,-64(%rsi) + vpshufb %xmm0,%xmm11,%xmm11 + vmovups %xmm12,-48(%rsi) + vpshufb %xmm0,%xmm12,%xmm12 + vmovups %xmm13,-32(%rsi) + vpshufb %xmm0,%xmm13,%xmm13 + vmovups %xmm14,-16(%rsi) + vpshufb %xmm0,%xmm14,%xmm14 + vmovdqu %xmm9,16(%rsp) + vmovdqu 48(%rsp),%xmm6 + vmovdqu 16-32(%r9),%xmm0 + vpunpckhqdq %xmm6,%xmm6,%xmm2 + vpclmulqdq $0x00,%xmm3,%xmm7,%xmm5 + vpxor %xmm6,%xmm2,%xmm2 + vpclmulqdq $0x11,%xmm3,%xmm7,%xmm7 + vpclmulqdq $0x00,%xmm15,%xmm1,%xmm1 + + vmovdqu 64(%rsp),%xmm9 + vpclmulqdq $0x00,%xmm0,%xmm6,%xmm4 + vmovdqu 48-32(%r9),%xmm3 + vpxor %xmm5,%xmm4,%xmm4 + vpunpckhqdq %xmm9,%xmm9,%xmm5 + vpclmulqdq $0x11,%xmm0,%xmm6,%xmm6 + vpxor %xmm9,%xmm5,%xmm5 + vpxor %xmm7,%xmm6,%xmm6 + vpclmulqdq $0x10,%xmm15,%xmm2,%xmm2 + vmovdqu 80-32(%r9),%xmm15 + vpxor %xmm1,%xmm2,%xmm2 + + vmovdqu 80(%rsp),%xmm1 + vpclmulqdq $0x00,%xmm3,%xmm9,%xmm7 + vmovdqu 64-32(%r9),%xmm0 + vpxor %xmm4,%xmm7,%xmm7 + vpunpckhqdq %xmm1,%xmm1,%xmm4 + vpclmulqdq $0x11,%xmm3,%xmm9,%xmm9 + vpxor %xmm1,%xmm4,%xmm4 + vpxor %xmm6,%xmm9,%xmm9 + vpclmulqdq $0x00,%xmm15,%xmm5,%xmm5 + vpxor %xmm2,%xmm5,%xmm5 + + vmovdqu 96(%rsp),%xmm2 + vpclmulqdq $0x00,%xmm0,%xmm1,%xmm6 + vmovdqu 96-32(%r9),%xmm3 + vpxor %xmm7,%xmm6,%xmm6 + vpunpckhqdq %xmm2,%xmm2,%xmm7 + vpclmulqdq $0x11,%xmm0,%xmm1,%xmm1 + vpxor %xmm2,%xmm7,%xmm7 + vpxor %xmm9,%xmm1,%xmm1 + vpclmulqdq $0x10,%xmm15,%xmm4,%xmm4 + vmovdqu 128-32(%r9),%xmm15 + vpxor %xmm5,%xmm4,%xmm4 + + vpxor 112(%rsp),%xmm8,%xmm8 + vpclmulqdq $0x00,%xmm3,%xmm2,%xmm5 + vmovdqu 112-32(%r9),%xmm0 + vpunpckhqdq %xmm8,%xmm8,%xmm9 + vpxor %xmm6,%xmm5,%xmm5 + vpclmulqdq $0x11,%xmm3,%xmm2,%xmm2 + vpxor %xmm8,%xmm9,%xmm9 + vpxor %xmm1,%xmm2,%xmm2 + vpclmulqdq $0x00,%xmm15,%xmm7,%xmm7 + vpxor %xmm4,%xmm7,%xmm4 + + vpclmulqdq $0x00,%xmm0,%xmm8,%xmm6 + vmovdqu 0-32(%r9),%xmm3 + vpunpckhqdq %xmm14,%xmm14,%xmm1 + vpclmulqdq $0x11,%xmm0,%xmm8,%xmm8 + vpxor %xmm14,%xmm1,%xmm1 + vpxor %xmm5,%xmm6,%xmm5 + vpclmulqdq $0x10,%xmm15,%xmm9,%xmm9 + vmovdqu 32-32(%r9),%xmm15 + vpxor %xmm2,%xmm8,%xmm7 + vpxor %xmm4,%xmm9,%xmm6 + + vmovdqu 16-32(%r9),%xmm0 + vpxor %xmm5,%xmm7,%xmm9 + vpclmulqdq $0x00,%xmm3,%xmm14,%xmm4 + vpxor %xmm9,%xmm6,%xmm6 + vpunpckhqdq %xmm13,%xmm13,%xmm2 + vpclmulqdq $0x11,%xmm3,%xmm14,%xmm14 + vpxor %xmm13,%xmm2,%xmm2 + vpslldq $8,%xmm6,%xmm9 + vpclmulqdq $0x00,%xmm15,%xmm1,%xmm1 + vpxor %xmm9,%xmm5,%xmm8 + vpsrldq $8,%xmm6,%xmm6 + vpxor %xmm6,%xmm7,%xmm7 + + vpclmulqdq $0x00,%xmm0,%xmm13,%xmm5 + vmovdqu 48-32(%r9),%xmm3 + vpxor %xmm4,%xmm5,%xmm5 + vpunpckhqdq %xmm12,%xmm12,%xmm9 + vpclmulqdq $0x11,%xmm0,%xmm13,%xmm13 + vpxor %xmm12,%xmm9,%xmm9 + vpxor %xmm14,%xmm13,%xmm13 + vpalignr $8,%xmm8,%xmm8,%xmm14 + vpclmulqdq $0x10,%xmm15,%xmm2,%xmm2 + vmovdqu 80-32(%r9),%xmm15 + vpxor %xmm1,%xmm2,%xmm2 + + vpclmulqdq $0x00,%xmm3,%xmm12,%xmm4 + vmovdqu 64-32(%r9),%xmm0 + vpxor %xmm5,%xmm4,%xmm4 + vpunpckhqdq %xmm11,%xmm11,%xmm1 + vpclmulqdq $0x11,%xmm3,%xmm12,%xmm12 + vpxor %xmm11,%xmm1,%xmm1 + vpxor %xmm13,%xmm12,%xmm12 + vxorps 16(%rsp),%xmm7,%xmm7 + vpclmulqdq $0x00,%xmm15,%xmm9,%xmm9 + vpxor %xmm2,%xmm9,%xmm9 + + vpclmulqdq $0x10,16(%r11),%xmm8,%xmm8 + vxorps %xmm14,%xmm8,%xmm8 + + vpclmulqdq $0x00,%xmm0,%xmm11,%xmm5 + vmovdqu 96-32(%r9),%xmm3 + vpxor %xmm4,%xmm5,%xmm5 + vpunpckhqdq %xmm10,%xmm10,%xmm2 + vpclmulqdq $0x11,%xmm0,%xmm11,%xmm11 + vpxor %xmm10,%xmm2,%xmm2 + vpalignr $8,%xmm8,%xmm8,%xmm14 + vpxor %xmm12,%xmm11,%xmm11 + vpclmulqdq $0x10,%xmm15,%xmm1,%xmm1 + vmovdqu 128-32(%r9),%xmm15 + vpxor %xmm9,%xmm1,%xmm1 + + vxorps %xmm7,%xmm14,%xmm14 + vpclmulqdq $0x10,16(%r11),%xmm8,%xmm8 + vxorps %xmm14,%xmm8,%xmm8 + + vpclmulqdq $0x00,%xmm3,%xmm10,%xmm4 + vmovdqu 112-32(%r9),%xmm0 + vpxor %xmm5,%xmm4,%xmm4 + vpunpckhqdq %xmm8,%xmm8,%xmm9 + vpclmulqdq $0x11,%xmm3,%xmm10,%xmm10 + vpxor %xmm8,%xmm9,%xmm9 + vpxor %xmm11,%xmm10,%xmm10 + vpclmulqdq $0x00,%xmm15,%xmm2,%xmm2 + vpxor %xmm1,%xmm2,%xmm2 + + vpclmulqdq $0x00,%xmm0,%xmm8,%xmm5 + vpclmulqdq $0x11,%xmm0,%xmm8,%xmm7 + vpxor %xmm4,%xmm5,%xmm5 + vpclmulqdq $0x10,%xmm15,%xmm9,%xmm6 + vpxor %xmm10,%xmm7,%xmm7 + vpxor %xmm2,%xmm6,%xmm6 + + vpxor %xmm5,%xmm7,%xmm4 + vpxor %xmm4,%xmm6,%xmm6 + vpslldq $8,%xmm6,%xmm1 + vmovdqu 16(%r11),%xmm3 + vpsrldq $8,%xmm6,%xmm6 + vpxor %xmm1,%xmm5,%xmm8 + vpxor %xmm6,%xmm7,%xmm7 + + vpalignr $8,%xmm8,%xmm8,%xmm2 + vpclmulqdq $0x10,%xmm3,%xmm8,%xmm8 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Aug 29 19:26:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC5A03B9CFB; Sat, 29 Aug 2020 19:26:32 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf6085T7lz3frt; Sat, 29 Aug 2020 19:26:32 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9EE34A4ED; Sat, 29 Aug 2020 19:26:32 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07TJQWmv065640; Sat, 29 Aug 2020 19:26:32 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TJQV3G065634; Sat, 29 Aug 2020 19:26:31 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202008291926.07TJQV3G065634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sat, 29 Aug 2020 19:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364964 - in head: share/man/man9 sys/compat/linuxkpi/common/include/linux sys/kern sys/sys sys/vm X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: in head: share/man/man9 sys/compat/linuxkpi/common/include/linux sys/kern sys/sys sys/vm X-SVN-Commit-Revision: 364964 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 19:26:32 -0000 Author: wulf Date: Sat Aug 29 19:26:31 2020 New Revision: 364964 URL: https://svnweb.freebsd.org/changeset/base/364964 Log: LinuxKPI: Implement ksize() function. In Linux, ksize() gets the actual amount of memory allocated for a given object. This commit adds malloc_usable_size() to FreeBSD KPI which does the same. It also maps LinuxKPI ksize() to newly created function. ksize() function is used by drm-kmod. Reviewed by: hselasky, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26215 Modified: head/share/man/man9/malloc.9 head/sys/compat/linuxkpi/common/include/linux/slab.h head/sys/kern/kern_malloc.c head/sys/sys/malloc.h head/sys/vm/memguard.c head/sys/vm/memguard.h Modified: head/share/man/man9/malloc.9 ============================================================================== --- head/share/man/man9/malloc.9 Sat Aug 29 18:11:37 2020 (r364963) +++ head/share/man/man9/malloc.9 Sat Aug 29 19:26:31 2020 (r364964) @@ -29,7 +29,7 @@ .\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $ .\" $FreeBSD$ .\" -.Dd August 3, 2020 +.Dd August 28, 2020 .Dt MALLOC 9 .Os .Sh NAME @@ -55,6 +55,8 @@ .Fn realloc "void *addr" "size_t size" "struct malloc_type *type" "int flags" .Ft void * .Fn reallocf "void *addr" "size_t size" "struct malloc_type *type" "int flags" +.Ft size_t +.Fn malloc_usable_size "const void *addr" .Fn MALLOC_DECLARE type .In sys/param.h .In sys/malloc.h @@ -149,6 +151,13 @@ function is identical to .Fn realloc except that it will free the passed pointer when the requested memory cannot be allocated. +.Pp +The +.Fn malloc_usable_size +function returns the usable size of the allocation pointed to by +.Fa addr . +The return value may be larger than the size that was requested during +allocation. .Pp Unlike its standard C library counterpart .Pq Xr malloc 3 , Modified: head/sys/compat/linuxkpi/common/include/linux/slab.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/slab.h Sat Aug 29 18:11:37 2020 (r364963) +++ head/sys/compat/linuxkpi/common/include/linux/slab.h Sat Aug 29 19:26:31 2020 (r364964) @@ -154,6 +154,12 @@ kfree(const void *ptr) free(__DECONST(void *, ptr), M_KMALLOC); } +static inline size_t +ksize(const void *ptr) +{ + return (malloc_usable_size(ptr)); +} + extern struct linux_kmem_cache *linux_kmem_cache_create(const char *name, size_t size, size_t align, unsigned flags, linux_kmem_ctor_t *ctor); Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Sat Aug 29 18:11:37 2020 (r364963) +++ head/sys/kern/kern_malloc.c Sat Aug 29 19:26:31 2020 (r364964) @@ -938,6 +938,42 @@ reallocf(void *addr, size_t size, struct malloc_type * return (mem); } +/* + * malloc_usable_size: returns the usable size of the allocation. + */ +size_t +malloc_usable_size(const void *addr) +{ +#ifndef DEBUG_REDZONE + uma_zone_t zone; + uma_slab_t slab; +#endif + u_long size; + + if (addr == NULL) + return (0); + +#ifdef DEBUG_MEMGUARD + if (is_memguard_addr(__DECONST(void *, addr))) + return (memguard_get_req_size(addr)); +#endif + +#ifdef DEBUG_REDZONE + size = redzone_get_size(__DECONST(void *, addr)); +#else + vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab); + if (slab == NULL) + panic("malloc_usable_size: address %p(%p) is not allocated.\n", + addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); + + if (!malloc_large_slab(slab)) + size = zone->uz_size; + else + size = malloc_large_size(slab); +#endif + return (size); +} + CTASSERT(VM_KMEM_SIZE_SCALE >= 1); /* Modified: head/sys/sys/malloc.h ============================================================================== --- head/sys/sys/malloc.h Sat Aug 29 18:11:37 2020 (r364963) +++ head/sys/sys/malloc.h Sat Aug 29 19:26:31 2020 (r364964) @@ -244,6 +244,7 @@ void malloc_type_allocated(struct malloc_type *type, u void malloc_type_freed(struct malloc_type *type, unsigned long size); void malloc_type_list(malloc_type_list_func_t *, void *); void malloc_uninit(void *); +size_t malloc_usable_size(const void *); void *realloc(void *addr, size_t size, struct malloc_type *type, int flags) __result_use_check __alloc_size(2); void *reallocf(void *addr, size_t size, struct malloc_type *type, int flags) Modified: head/sys/vm/memguard.c ============================================================================== --- head/sys/vm/memguard.c Sat Aug 29 18:11:37 2020 (r364963) +++ head/sys/vm/memguard.c Sat Aug 29 19:26:31 2020 (r364964) @@ -504,3 +504,9 @@ memguard_cmp_zone(uma_zone_t zone) */ return (strcmp(zone->uz_name, vm_memguard_desc) == 0); } + +unsigned long +memguard_get_req_size(const void *addr) +{ + return (*v2sizep(trunc_page((uintptr_t)addr))); +} Modified: head/sys/vm/memguard.h ============================================================================== --- head/sys/vm/memguard.h Sat Aug 29 18:11:37 2020 (r364963) +++ head/sys/vm/memguard.h Sat Aug 29 19:26:31 2020 (r364964) @@ -43,6 +43,7 @@ void memguard_init(struct vmem *); void *memguard_alloc(unsigned long, int); void *memguard_realloc(void *, unsigned long, struct malloc_type *, int); void memguard_free(void *); +unsigned long memguard_get_req_size(const void *); int memguard_cmp_mtp(struct malloc_type *, unsigned long); int memguard_cmp_zone(uma_zone_t); int is_memguard_addr(void *); @@ -52,6 +53,7 @@ int is_memguard_addr(void *); #define memguard_alloc(size, flags) NULL #define memguard_realloc(a, s, mtp, f) NULL #define memguard_free(addr) do { } while (0) +#define memguard_get_req_size(addr) 0 #define memguard_cmp_mtp(mtp, size) 0 #define memguard_cmp_zone(zone) 0 #define is_memguard_addr(addr) 0 From owner-svn-src-all@freebsd.org Sat Aug 29 21:05:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 20C393BC6B4; Sat, 29 Aug 2020 21:05:45 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf8Bd0748z43J0; Sat, 29 Aug 2020 21:05:45 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DCDF8BF84; Sat, 29 Aug 2020 21:05:44 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07TL5iZD028940; Sat, 29 Aug 2020 21:05:44 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TL5hQ2028933; Sat, 29 Aug 2020 21:05:43 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <202008292105.07TL5hQ2028933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sat, 29 Aug 2020 21:05:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364965 - in head/stand: common libsa X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in head/stand: common libsa X-SVN-Commit-Revision: 364965 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 21:05:45 -0000 Author: sjg Date: Sat Aug 29 21:05:43 2020 New Revision: 364965 URL: https://svnweb.freebsd.org/changeset/base/364965 Log: zalloc_malloc:Free hexdump preceeding buffer when we detect overflow Move hexdump from stand/common/misc.c to stand/libsa/hexdump.c (svn cp) Disable use of pager - causes linking issue for boot1 can be re-enabled by defining HEXDUMP_PAGER. Reviewed by: stevek, imp MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D26235 Added: head/stand/libsa/hexdump.c (contents, props changed) - copied, changed from r364346, head/stand/common/misc.c Modified: head/stand/common/bootstrap.h head/stand/common/misc.c head/stand/libsa/Makefile head/stand/libsa/pkgfs.c head/stand/libsa/stand.h head/stand/libsa/zalloc_malloc.c Modified: head/stand/common/bootstrap.h ============================================================================== --- head/stand/common/bootstrap.h Sat Aug 29 19:26:31 2020 (r364964) +++ head/stand/common/bootstrap.h Sat Aug 29 21:05:43 2020 (r364965) @@ -68,7 +68,6 @@ int getrootmount(char *rootdev); /* misc.c */ char *unargv(int argc, char *argv[]); -void hexdump(caddr_t region, size_t len); size_t strlenout(vm_offset_t str); char *strdupout(vm_offset_t str); void kern_bzero(vm_offset_t dest, size_t len); Modified: head/stand/common/misc.c ============================================================================== --- head/stand/common/misc.c Sat Aug 29 19:26:31 2020 (r364964) +++ head/stand/common/misc.c Sat Aug 29 21:05:43 2020 (r364965) @@ -169,46 +169,6 @@ alloc_pread(readin_handle_t fd, off_t off, size_t len) return (buf); } -/* - * Display a region in traditional hexdump format. - */ -void -hexdump(caddr_t region, size_t len) -{ - caddr_t line; - int x, c; - char lbuf[80]; -#define emit(fmt, args...) {sprintf(lbuf, fmt , ## args); pager_output(lbuf);} - - pager_open(); - for (line = region; line < (region + len); line += 16) { - emit("%08lx ", (long) line); - - for (x = 0; x < 16; x++) { - if ((line + x) < (region + len)) { - emit("%02x ", *(uint8_t *)(line + x)); - } else { - emit("-- "); - } - if (x == 7) - emit(" "); - } - emit(" |"); - for (x = 0; x < 16; x++) { - if ((line + x) < (region + len)) { - c = *(uint8_t *)(line + x); - if ((c < ' ') || (c > '~')) /* !isprint(c) */ - c = '.'; - emit("%c", c); - } else { - emit(" "); - } - } - emit("|\n"); - } - pager_close(); -} - void dev_cleanup(void) { Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Sat Aug 29 19:26:31 2020 (r364964) +++ head/stand/libsa/Makefile Sat Aug 29 21:05:43 2020 (r364965) @@ -13,8 +13,9 @@ LIBSA_CPUARCH?=${MACHINE_CPUARCH} LIB?= sa # standalone components and stuff we have modified locally -SRCS+= gzguts.h zutil.h __main.c abort.c assert.c bcd.c environment.c getopt.c gets.c \ - globals.c pager.c panic.c printf.c strdup.c strerror.c \ +SRCS+= gzguts.h zutil.h __main.c abort.c assert.c bcd.c environment.c \ + getopt.c gets.c globals.c \ + hexdump.c pager.c panic.c printf.c strdup.c strerror.c \ random.c sbrk.c twiddle.c zalloc.c zalloc_malloc.c # private (pruned) versions of libc string functions Copied and modified: head/stand/libsa/hexdump.c (from r364346, head/stand/common/misc.c) ============================================================================== --- head/stand/common/misc.c Tue Aug 18 14:17:14 2020 (r364346, copy source) +++ head/stand/libsa/hexdump.c Sat Aug 29 21:05:43 2020 (r364965) @@ -29,147 +29,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include /* - * Concatenate the (argc) elements of (argv) into a single string, and return - * a copy of same. - */ -char * -unargv(int argc, char *argv[]) -{ - size_t hlong; - int i; - char *cp; - - for (i = 0, hlong = 0; i < argc; i++) - hlong += strlen(argv[i]) + 2; - - if(hlong == 0) - return(NULL); - - cp = malloc(hlong); - cp[0] = 0; - for (i = 0; i < argc; i++) { - strcat(cp, argv[i]); - if (i < (argc - 1)) - strcat(cp, " "); - } - - return(cp); -} - -/* - * Get the length of a string in kernel space - */ -size_t -strlenout(vm_offset_t src) -{ - char c; - size_t len; - - for (len = 0; ; len++) { - archsw.arch_copyout(src++, &c, 1); - if (c == 0) - break; - } - return(len); -} - -/* - * Make a duplicate copy of a string in kernel space - */ -char * -strdupout(vm_offset_t str) -{ - char *result, *cp; - - result = malloc(strlenout(str) + 1); - for (cp = result; ;cp++) { - archsw.arch_copyout(str++, cp, 1); - if (*cp == 0) - break; - } - return(result); -} - -/* Zero a region in kernel space. */ -void -kern_bzero(vm_offset_t dest, size_t len) -{ - char buf[256]; - size_t chunk, resid; - - bzero(buf, sizeof(buf)); - resid = len; - while (resid > 0) { - chunk = min(sizeof(buf), resid); - archsw.arch_copyin(buf, dest, chunk); - resid -= chunk; - dest += chunk; - } -} - -/* - * Read the specified part of a file to kernel space. Unlike regular - * pread, the file pointer is advanced to the end of the read data, - * and it just returns 0 if successful. - */ -int -kern_pread(readin_handle_t fd, vm_offset_t dest, size_t len, off_t off) -{ - - if (VECTX_LSEEK(fd, off, SEEK_SET) == -1) { -#ifdef DEBUG - printf("\nlseek failed\n"); -#endif - return (-1); - } - if ((size_t)archsw.arch_readin(fd, dest, len) != len) { -#ifdef DEBUG - printf("\nreadin failed\n"); -#endif - return (-1); - } - return (0); -} - -/* - * Read the specified part of a file to a malloced buffer. The file - * pointer is advanced to the end of the read data. - */ -/* coverity[ -tainted_data_return ] */ -void * -alloc_pread(readin_handle_t fd, off_t off, size_t len) -{ - void *buf; - - buf = malloc(len); - if (buf == NULL) { -#ifdef DEBUG - printf("\nmalloc(%d) failed\n", (int)len); -#endif - errno = ENOMEM; - return (NULL); - } - if (VECTX_LSEEK(fd, off, SEEK_SET) == -1) { -#ifdef DEBUG - printf("\nlseek failed\n"); -#endif - free(buf); - return (NULL); - } - if ((size_t)VECTX_READ(fd, buf, len) != len) { -#ifdef DEBUG - printf("\nread failed\n"); -#endif - free(buf); - return (NULL); - } - return (buf); -} - -/* * Display a region in traditional hexdump format. */ void @@ -177,10 +38,16 @@ hexdump(caddr_t region, size_t len) { caddr_t line; int x, c; - char lbuf[80]; +#ifdef HEXDUMP_PAGER + /* pager causes linking issues for some apps */ #define emit(fmt, args...) {sprintf(lbuf, fmt , ## args); pager_output(lbuf);} + char lbuf[80]; pager_open(); +#else +#define emit(fmt, args...) printf(fmt, ## args) +#endif + for (line = region; line < (region + len); line += 16) { emit("%08lx ", (long) line); @@ -206,16 +73,7 @@ hexdump(caddr_t region, size_t len) } emit("|\n"); } +#ifdef HEXDUMP_PAGER pager_close(); -} - -void -dev_cleanup(void) -{ - int i; - - /* Call cleanup routines */ - for (i = 0; devsw[i] != NULL; ++i) - if (devsw[i]->dv_cleanup != NULL) - (devsw[i]->dv_cleanup)(); +#endif } Modified: head/stand/libsa/pkgfs.c ============================================================================== --- head/stand/libsa/pkgfs.c Sat Aug 29 19:26:31 2020 (r364964) +++ head/stand/libsa/pkgfs.c Sat Aug 29 21:05:43 2020 (r364965) @@ -60,7 +60,7 @@ struct fs_ops pkgfs_fsops = { }; #define PKG_BUFSIZE 512 -#define PKG_MAXCACHESZ (16384 * 3) +#define PKG_MAXCACHESZ (512 * 1024) #define PKG_FILEEXT ".tgz" Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Sat Aug 29 19:26:31 2020 (r364964) +++ head/stand/libsa/stand.h Sat Aug 29 21:05:43 2020 (r364965) @@ -470,4 +470,7 @@ extern void *reallocf(void *, size_t); */ caddr_t ptov(uintptr_t); +/* hexdump.c */ +void hexdump(caddr_t region, size_t len); + #endif /* STAND_H */ Modified: head/stand/libsa/zalloc_malloc.c ============================================================================== --- head/stand/libsa/zalloc_malloc.c Sat Aug 29 19:26:31 2020 (r364964) +++ head/stand/libsa/zalloc_malloc.c Sat Aug 29 21:05:43 2020 (r364965) @@ -52,6 +52,10 @@ void mallocstats(void); static void *Malloc_align(size_t, size_t); +#ifndef MIN +# define MIN(a,b) ((a) <= (b)) ? (a) : (b) +#endif + void * Malloc(size_t bytes, const char *file __unused, int line __unused) { @@ -119,9 +123,14 @@ Free(void *ptr, const char *file, int line) ptr, file, line); return; } - if (res->ga_Magic != GAMAGIC) + if (res->ga_Magic != GAMAGIC) { + size_t dump_bytes; + + dump_bytes = MIN((ptr - MallocPool.mp_Base), 512); + hexdump(ptr - dump_bytes, dump_bytes); panic("free: guard1 fail @ %p from %s:%d", ptr, file, line); + } res->ga_Magic = GAFREE; #endif #ifdef USEENDGUARD From owner-svn-src-all@freebsd.org Sat Aug 29 21:43:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 263CF3BDBAA; Sat, 29 Aug 2020 21:43:00 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf91c0H8Wz45ts; Sat, 29 Aug 2020 21:43:00 +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 E1B42C3C2; Sat, 29 Aug 2020 21:42:59 +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 07TLgxIw053201; Sat, 29 Aug 2020 21:42:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TLgxE1053200; Sat, 29 Aug 2020 21:42:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202008292142.07TLgxE1053200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 29 Aug 2020 21:42:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364966 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 364966 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 21:43:00 -0000 Author: gjb Date: Sat Aug 29 21:42:59 2020 New Revision: 364966 URL: https://svnweb.freebsd.org/changeset/base/364966 Log: Remove the VCSUPDATE command, because git is too stupid to have the '-C ' after the subcommand. Meanwhile, hard-code 'git -C <...> pull' for now. Reported by: Michael Butler Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: head/release/release.sh Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Sat Aug 29 21:05:43 2020 (r364965) +++ head/release/release.sh Sat Aug 29 21:42:59 2020 (r364966) @@ -70,7 +70,6 @@ env_setup() { exit 1 fi VCSCMD="/usr/local/bin/git clone -q" - VCSUPDATE="/usr/local/bin/git pull -q" # The default git checkout server, and branches for src/, doc/, # and ports/. @@ -222,21 +221,21 @@ chroot_setup() { if [ -z "${SRC_UPDATE_SKIP}" ]; then if [ -d "${CHROOTDIR}/usr/src/.git" ]; then - ${VCSUPDATE} -C ${CHROOTDIR}/usr/src + git -C ${CHROOTDIR}/usr/src pull else ${VCSCMD} ${SRC} -b ${SRCBRANCH} ${CHROOTDIR}/usr/src fi fi if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then if [ -d "${CHROOTDIR}/usr/doc/.git" ]; then - ${VCSUPDATE} -C ${CHROOTDIR}/usr/doc + git -C ${CHROOTDIR}/usr/doc pull else ${VCSCMD} ${DOC} -b ${DOCBRANCH} ${CHROOTDIR}/usr/doc fi fi if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then if [ -d "${CHROOTDIR}/usr/ports/.git" ]; then - ${VCSUPDATE} -C ${CHROOTDIR}/usr/ports + git -C ${CHROOTDIR}/usr/ports pull else ${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports fi From owner-svn-src-all@freebsd.org Sat Aug 29 21:46:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6ADBB3BDF73; Sat, 29 Aug 2020 21:46:35 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf95l2F9qz466S; Sat, 29 Aug 2020 21:46:35 +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 2C627C412; Sat, 29 Aug 2020 21:46:35 +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 07TLkYde053483; Sat, 29 Aug 2020 21:46:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TLkYSK053482; Sat, 29 Aug 2020 21:46:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202008292146.07TLkYSK053482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 29 Aug 2020 21:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364967 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 364967 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 21:46:35 -0000 Author: gjb Date: Sat Aug 29 21:46:34 2020 New Revision: 364967 URL: https://svnweb.freebsd.org/changeset/base/364967 Log: Restore the '-q' flag to the 'git pull' command. Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: head/release/release.sh Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Sat Aug 29 21:42:59 2020 (r364966) +++ head/release/release.sh Sat Aug 29 21:46:34 2020 (r364967) @@ -221,21 +221,21 @@ chroot_setup() { if [ -z "${SRC_UPDATE_SKIP}" ]; then if [ -d "${CHROOTDIR}/usr/src/.git" ]; then - git -C ${CHROOTDIR}/usr/src pull + git -C ${CHROOTDIR}/usr/src -q pull else ${VCSCMD} ${SRC} -b ${SRCBRANCH} ${CHROOTDIR}/usr/src fi fi if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then if [ -d "${CHROOTDIR}/usr/doc/.git" ]; then - git -C ${CHROOTDIR}/usr/doc pull + git -C ${CHROOTDIR}/usr/doc -q pull else ${VCSCMD} ${DOC} -b ${DOCBRANCH} ${CHROOTDIR}/usr/doc fi fi if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then if [ -d "${CHROOTDIR}/usr/ports/.git" ]; then - git -C ${CHROOTDIR}/usr/ports pull + git -C ${CHROOTDIR}/usr/ports -q pull else ${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports fi From owner-svn-src-all@freebsd.org Sat Aug 29 21:47:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60C733BE2B2; Sat, 29 Aug 2020 21:47:50 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf97B21PBz46MD; Sat, 29 Aug 2020 21:47:50 +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 28242BF54; Sat, 29 Aug 2020 21:47:50 +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 07TLloOi053594; Sat, 29 Aug 2020 21:47:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TLlow9053593; Sat, 29 Aug 2020 21:47:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202008292147.07TLlow9053593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 29 Aug 2020 21:47:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364968 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 364968 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 21:47:50 -0000 Author: gjb Date: Sat Aug 29 21:47:49 2020 New Revision: 364968 URL: https://svnweb.freebsd.org/changeset/base/364968 Log: Fix ordering of the 'pull' subcommand and the '-q' flag. Pointyhat to: gjb (myself) Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: head/release/release.sh Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Sat Aug 29 21:46:34 2020 (r364967) +++ head/release/release.sh Sat Aug 29 21:47:49 2020 (r364968) @@ -221,21 +221,21 @@ chroot_setup() { if [ -z "${SRC_UPDATE_SKIP}" ]; then if [ -d "${CHROOTDIR}/usr/src/.git" ]; then - git -C ${CHROOTDIR}/usr/src -q pull + git -C ${CHROOTDIR}/usr/src pull -q else ${VCSCMD} ${SRC} -b ${SRCBRANCH} ${CHROOTDIR}/usr/src fi fi if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then if [ -d "${CHROOTDIR}/usr/doc/.git" ]; then - git -C ${CHROOTDIR}/usr/doc -q pull + git -C ${CHROOTDIR}/usr/doc pull -q else ${VCSCMD} ${DOC} -b ${DOCBRANCH} ${CHROOTDIR}/usr/doc fi fi if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then if [ -d "${CHROOTDIR}/usr/ports/.git" ]; then - git -C ${CHROOTDIR}/usr/ports -q pull + git -C ${CHROOTDIR}/usr/ports pull -q else ${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports fi From owner-svn-src-all@freebsd.org Sat Aug 29 22:09:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 18F8B3BF35C; Sat, 29 Aug 2020 22:09:37 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf9cJ70LGz48d7; Sat, 29 Aug 2020 22:09:36 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D47D8C820; Sat, 29 Aug 2020 22:09:36 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07TM9aKj065430; Sat, 29 Aug 2020 22:09:36 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TM9a48065429; Sat, 29 Aug 2020 22:09:36 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <202008292209.07TM9a48065429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Sat, 29 Aug 2020 22:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364969 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 364969 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 22:09:37 -0000 Author: jamie Date: Sat Aug 29 22:09:36 2020 New Revision: 364969 URL: https://svnweb.freebsd.org/changeset/base/364969 Log: Fix a null dereference when debug.disablefullpath=1 and jail created with path=/. PR: 214881 Submitted by: aler (at) playground.ru Reported by: aler (at) playground.ru Modified: stable/12/sys/kern/kern_jail.c Modified: stable/12/sys/kern/kern_jail.c ============================================================================== --- stable/12/sys/kern/kern_jail.c Sat Aug 29 21:47:49 2020 (r364968) +++ stable/12/sys/kern/kern_jail.c Sat Aug 29 22:09:36 2020 (r364969) @@ -943,40 +943,45 @@ kern_jail_set(struct thread *td, struct uio *optuio, i error = EINVAL; goto done_free; } - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, - path, td); - error = namei(&nd); - if (error) - goto done_free; - root = nd.ni_vp; - NDFREE(&nd, NDF_ONLY_PNBUF); - g_path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); - strlcpy(g_path, path, MAXPATHLEN); - error = vn_path_to_global_path(td, root, g_path, MAXPATHLEN); - if (error == 0) - path = g_path; - else if (error == ENODEV) { - /* proceed if sysctl debug.disablefullpath == 1 */ - fullpath_disabled = 1; - if (len < 2 || (len == 2 && path[0] == '/')) - path = NULL; - } else { - /* exit on other errors */ - goto done_free; - } - if (root->v_type != VDIR) { - error = ENOTDIR; - vput(root); - goto done_free; - } - VOP_UNLOCK(root, 0); - if (fullpath_disabled) { - /* Leave room for a real-root full pathname. */ - if (len + (path[0] == '/' && strcmp(mypr->pr_path, "/") - ? strlen(mypr->pr_path) : 0) > MAXPATHLEN) { - error = ENAMETOOLONG; - vrele(root); + if (len < 2 || (len == 2 && path[0] == '/')) + path = NULL; + else + { + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, + path, td); + error = namei(&nd); + if (error) goto done_free; + root = nd.ni_vp; + NDFREE(&nd, NDF_ONLY_PNBUF); + g_path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); + strlcpy(g_path, path, MAXPATHLEN); + error = vn_path_to_global_path(td, root, g_path, + MAXPATHLEN); + if (error == 0) + path = g_path; + else if (error == ENODEV) { + /* means sysctl debug.disablefullpath == 1 */ + fullpath_disabled = 1; + } else { + /* exit on other errors */ + goto done_free; + } + if (root->v_type != VDIR) { + error = ENOTDIR; + vput(root); + goto done_free; + } + VOP_UNLOCK(root, 0); + if (fullpath_disabled) { + /* Leave room for a real-root full pathname. */ + if (len + (path[0] == '/' && + strcmp(mypr->pr_path, "/") + ? strlen(mypr->pr_path) : 0) > MAXPATHLEN) { + error = ENAMETOOLONG; + vrele(root); + goto done_free; + } } } } From owner-svn-src-all@freebsd.org Sat Aug 29 22:24:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 483523BF9B9; Sat, 29 Aug 2020 22:24:42 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf9xk161Fz4BGN; Sat, 29 Aug 2020 22:24:42 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0944BCBD2; Sat, 29 Aug 2020 22:24:42 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07TMOfip077957; Sat, 29 Aug 2020 22:24:41 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TMOfs2077956; Sat, 29 Aug 2020 22:24:41 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <202008292224.07TMOfs2077956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Sat, 29 Aug 2020 22:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364970 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 364970 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages 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, 29 Aug 2020 22:24:42 -0000 Author: jamie Date: Sat Aug 29 22:24:41 2020 New Revision: 364970 URL: https://svnweb.freebsd.org/changeset/base/364970 Log: Add __BEGIN_DECLS to jail.h to keep C++ happy. PR: 238928 Reported by: yuri@ Modified: head/sys/sys/jail.h Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Sat Aug 29 22:09:36 2020 (r364969) +++ head/sys/sys/jail.h Sat Aug 29 22:24:41 2020 (r364970) @@ -110,11 +110,13 @@ struct xprison { struct iovec; +__BEGIN_DECLS int jail(struct jail *); int jail_set(struct iovec *, unsigned int, int); int jail_get(struct iovec *, unsigned int, int); int jail_attach(int); int jail_remove(int); +__END_DECLS #else /* _KERNEL */